diff --git a/.env b/.env index 7ed171f0..af261858 100644 --- a/.env +++ b/.env @@ -2,3 +2,4 @@ VITE_VERSION=$npm_package_version VITE_NAME=$npm_package_name FAST_REFRESH=false VITE_VIDISPINE_URL=$VIDISPINE_URL +BASE_URL='/admin-tool' diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index cc3604df..00000000 --- a/.eslintrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": "airbnb", - "parserOptions": { - "ecmaVersion": 2021 - }, - "rules": { - "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], - "react/prop-types": [2, { "skipUndeclared": true }], - "camelcase": [0, {"properties": "never"}], - "import/prefer-default-export": ["off"], - "react/jsx-props-no-spreading": ["off"], - "react/destructuring-assignment": ["off"], - "jsx-a11y/control-has-associated-label": ["off"], - "jsx-a11y/no-static-element-interactions": [0, {"handlers": ["onClick"]}], - "dot-notation": ["error", { "allowPattern": "^__*" }], - "jsx-a11y/media-has-caption": [0, {"video": ["Video"]}], - "jsx-a11y/mouse-events-have-key-events": "off", - "jsx-a11y/anchor-is-valid": [ "error", { - "components": [ "Link" ], - "specialLink": [ "to", "hrefLeft", "hrefRight" ], - "aspects": [ "noHref", "invalidHref", "preferButton" ] - }] - }, - "env": { - "browser": true - } -} diff --git a/.github/workflows/build-with-public-url.yml b/.github/workflows/build-with-public-url.yml index 38cd71ff..7c069a05 100644 --- a/.github/workflows/build-with-public-url.yml +++ b/.github/workflows/build-with-public-url.yml @@ -23,9 +23,10 @@ jobs: - name: Install dependencies run: npm ci - name: Build site - run: PUBLIC_URL=${PUBLIC_URL} GENERATE_SOURCEMAP=false npm run build + run: VITE_GIT_COMMIT=${VITE_GIT_COMMIT} BASE_URL=${BASE_URL} npm run build env: - PUBLIC_URL: ${{ github.event.inputs.public_url }} + BASE_URL: ${{ github.event.inputs.public_url }} + VITE_GIT_COMMIT: ${{ steps.artifact-vars.outputs.sha_short }} - name: Upload artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 53f6151a..03c9d0f2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,6 +25,5 @@ jobs: run: npm ci shell: bash - name: Build the Docker image - run: PUBLIC_URL=/admin-tool npm run docker:buildx:push + run: VITE_GIT_COMMIT=$(git rev-parse --short HEAD) BASE_URL=/admin-tool npm run docker:buildx:push shell: bash - diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 09f48dfc..bdf2b554 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -19,7 +19,7 @@ jobs: - name: Publish to GitHub Pages run: | git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - PUBLIC_URL="https://${GITHUB_REPOSITORY%/*}.github.io/${GITHUB_REPOSITORY#*/}" GENERATE_SOURCEMAP=false npm run build + VITE_GIT_COMMIT=$(git rev-parse --short HEAD) BASE_URL="https://${GITHUB_REPOSITORY%/*}.github.io/${GITHUB_REPOSITORY#*/}" npm run build npm run gh-pages -- -d build -u "github-actions-bot " env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index c568aed6..64dd8db5 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ npm-error.log* yarn-debug.log* yarn-error.log* *.tar.gz +.eslintcache \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..1d7ac851 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] +} diff --git a/.vscode/launch.json b/.vscode/launch.json index 1dd8285f..59830896 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,15 +3,29 @@ { "name": "start", "request": "launch", - "runtimeArgs": ["start"], + "runtimeArgs": [ + "start" + ], "runtimeExecutable": "npm", - "skipFiles": ["/**"], + "skipFiles": [ + "/**" + ], "type": "node", - "env": { "VITE_VIDISPINE_URL": "${input:vidicoreUrl}"}, - "stopOnEntry": true + "env": { + "VITE_VIDISPINE_URL": "${input:vidicoreUrl}" + }, + "stopOnEntry": true, + "sourceMaps": true, + "serverReadyAction": { + "action": "debugWithChrome", + "killOnServerStop": true, + "pattern": ".*Local:.+(https?://.+)", + "uriFormat": "%s", + "webRoot": "${workspaceFolder}" + } } ], - "inputs": [ + "inputs": [ { "id": "vidicoreUrl", "type": "promptString", @@ -19,4 +33,4 @@ "default": "http://localhost:8080" } ] -} +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 5bde7840..15300288 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,9 @@ { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.rulers": [100], "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" } -} \ No newline at end of file +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..44472d6a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,27 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "label": "prettier:check", + "script": "prettier:check" + }, + { + "type": "npm", + "label": "prettier:write", + "script": "prettier:write" + }, + { + "type": "npm", + "label": "lint:check", + "script": "lint:check", + "problemMatcher": [] + }, + { + "type": "npm", + "label": "lint:fix", + "script": "lint:fix", + "problemMatcher": [] + } + ] +} diff --git a/Dockerfile b/Dockerfile index f1a58fb4..fc1dd618 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM nginx -ARG PUBLIC_URL -COPY build /usr/share/nginx/html${PUBLIC_URL} +ARG BASE_URL +COPY build /usr/share/nginx/html${BASE_URL} COPY build/index.html /usr/share/nginx/html/ COPY proxy.template /etc/nginx/conf.d/proxy.template ENV VIDISPINE_URL=http://localhost:8080 diff --git a/LICENSE.md b/LICENSE.md index 50d79061..7c801ac8 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,12 +1,12 @@ SUBJECT OF THIS SOURCE CODE LICENSE AGREEMENT ("Agreement") is that Vidispine AB, Sweden (“Vidispine”) hereby grants to an active customer on VidiNet a license to reproduce, store, make modifications, and distribute the Work in Object (non-source) form. -0. NON-LEGALESE SUMMARY – this section is not part of the Agreement -The Vidispine Development Toolkit is provided by Vidispine to simplify your application develop-ment. You have access to and have the right to use the code in the Vidispine Development Toolkit as long as you are an active customer of Vidinet services, e.g., by running a VidiCore API instance in VidiNet, or using VidiNet Apps or Services for at least USD 50 per month. -As part of the agreement you are allowed to develop and market applications based on the code, as well as make changes to the code if needed to build your application. If you want to make the changes a permanent part of the Vidispine Development Toolkit we will ask you to transfer the Intellectual Property of that code to Vidispine. -The agreement does not allow you distribute the source code. +0. NON-LEGALESE SUMMARY – this section is not part of the Agreement + The Vidispine Development Toolkit is provided by Vidispine to simplify your application develop-ment. You have access to and have the right to use the code in the Vidispine Development Toolkit as long as you are an active customer of Vidinet services, e.g., by running a VidiCore API instance in VidiNet, or using VidiNet Apps or Services for at least USD 50 per month. + As part of the agreement you are allowed to develop and market applications based on the code, as well as make changes to the code if needed to build your application. If you want to make the changes a permanent part of the Vidispine Development Toolkit we will ask you to transfer the Intellectual Property of that code to Vidispine. + The agreement does not allow you distribute the source code. - 1. DEFINITIONS. -"Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code. +1. DEFINITIONS. + "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: (i) any addition to or deletion from the contents of a file containing Original Code or previous Modifications; (ii) any new file that contains any part of the Original Code, or previous Modifications. @@ -14,41 +14,41 @@ The agreement does not allow you distribute the source code. "Software" means the Covered Code and accompanying documentation and support files including Updates (if any). -"Updates" means any patches, bug fixes, upgrades, and new versions of the Software made gen-erally available by Vidispine during the term of this Agreement. +"Updates" means any patches, bug fixes, upgrades, and new versions of the Software made gen-erally available by Vidispine during the term of this Agreement. -"Source Code" means computer programming code in human readable form that is not suitable for machine execution without the intervening steps of interpretation or compilation, meaning the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable Object Code, or source code differential comparisons against the Original Code. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. +"Source Code" means computer programming code in human readable form that is not suitable for machine execution without the intervening steps of interpretation or compilation, meaning the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable Object Code, or source code differential comparisons against the Original Code. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. "Executable Object Code" means the computer programming code in any other form than Source Code that is not readily perceivable by humans and suitable for machine execution without the intervening steps of interpretation or compilation. -"Run-Time Module" means the Executable Object Code derived from compiling the Software to be incorporated into a Target Application as inseparably embedded code. +"Run-Time Module" means the Executable Object Code derived from compiling the Software to be incorporated into a Target Application as inseparably embedded code. -"Target Application" means an end-user item, such as a software product that is possibly replicated in identical form and offered for sale or licensed to third parties, or a device or system developed by Customer pursuant to a Project that contains a Run-Time Module, or any portion thereof. +"Target Application" means an end-user item, such as a software product that is possibly replicated in identical form and offered for sale or licensed to third parties, or a device or system developed by Customer pursuant to a Project that contains a Run-Time Module, or any portion thereof. -"Downstream Customer" means any person or business entity that acquires the Target Application directly from the Customer or from another Downstream Customer of the Customer’s. +"Downstream Customer" means any person or business entity that acquires the Target Application directly from the Customer or from another Downstream Customer of the Customer’s. "Active Customer of the Vidinet Services" means a Customer that is actively using services on the Vidinet platform (www.vidinet.net). "Actively using services", means that the Customer has an API instance running on Vidinet (in trial or invoicing account) or that the Customer is using Vidinet Me-dia Services for USD 50 per month or more. 2. SOURCE CODE LICENSE. -Subject to Customer’s compliance with the terms and conditions of this Agreement, Vidispine hereby grants to Customer a non-transferable, nonexclusive, worldwide, royalty-free, license: (i) to reproduce and use the Software solely by the Customer; (ii) to store the Software in a source code repository; (iii) to create Modifications and other derivative works of the Software, solely to the extent necessary to support the development of the Target Application; (iv) to compile the Soft-ware, including any Modifications and derivative works thereof, into Run-Time Modules; (v) to re-produce an unlimited number of Run-Time Modules or Source-Code Modules for physical incorpo-ration into the Target Application; and (vi) to market, sell, and distribute the Target Application. + Subject to Customer’s compliance with the terms and conditions of this Agreement, Vidispine hereby grants to Customer a non-transferable, nonexclusive, worldwide, royalty-free, license: (i) to reproduce and use the Software solely by the Customer; (ii) to store the Software in a source code repository; (iii) to create Modifications and other derivative works of the Software, solely to the extent necessary to support the development of the Target Application; (iv) to compile the Soft-ware, including any Modifications and derivative works thereof, into Run-Time Modules; (v) to re-produce an unlimited number of Run-Time Modules or Source-Code Modules for physical incorpo-ration into the Target Application; and (vi) to market, sell, and distribute the Target Application. 3. RESTRICTIONS. -Customer shall reproduce and include any and all copyright notices and proprietary rights legends, as such notices and legends appear in the original Software, on any copy of the Software, or portion thereof. -The Software may be used from a single machine, a set of machines, or a network file server con-nected via an intranet of local and remote users, but there shall be no access to the Software from any external network not being operated by or on behalf of Customer. -The Customer obliges to prohibit Downstream Customers from using the Software and Target Ap-plication unless they are an Active Customer of the Vidinet Services, unless (i) the Downstream Customers are using a service based on the Vidispine API as a service on Vidinet, running on the Customer’s account, and (ii) the Downstream Customer are prevented any rights to the Source code. -The Customer obliges to prohibit Downstream Customers from making any Modifications or Down-stream Customers should acquire additional Commercial Licenses from the Vidispine. + Customer shall reproduce and include any and all copyright notices and proprietary rights legends, as such notices and legends appear in the original Software, on any copy of the Software, or portion thereof. + The Software may be used from a single machine, a set of machines, or a network file server con-nected via an intranet of local and remote users, but there shall be no access to the Software from any external network not being operated by or on behalf of Customer. + The Customer obliges to prohibit Downstream Customers from using the Software and Target Ap-plication unless they are an Active Customer of the Vidinet Services, unless (i) the Downstream Customers are using a service based on the Vidispine API as a service on Vidinet, running on the Customer’s account, and (ii) the Downstream Customer are prevented any rights to the Source code. + The Customer obliges to prohibit Downstream Customers from making any Modifications or Down-stream Customers should acquire additional Commercial Licenses from the Vidispine. -4. OWNERSHIP. -Vidispine represents and warrants to Customer that Vidispine has all rights in the Software neces-sary to grant the rights and license granted to Customer in this Agreement. Notwithstanding the foregoing, Vidispine and its licensors shall retain exclusive ownership of all worldwide Intellectual Property Rights in and to the Software. Customer acknowledges that this Agreement does not grant to Customer any Intellectual Property Rights in or to the Software other than the limited rights with respect to the Software as set forth in Section 2. +4. OWNERSHIP. + Vidispine represents and warrants to Customer that Vidispine has all rights in the Software neces-sary to grant the rights and license granted to Customer in this Agreement. Notwithstanding the foregoing, Vidispine and its licensors shall retain exclusive ownership of all worldwide Intellectual Property Rights in and to the Software. Customer acknowledges that this Agreement does not grant to Customer any Intellectual Property Rights in or to the Software other than the limited rights with respect to the Software as set forth in Section 2. -5. DELIVERY AND PAYMENT. -Immediately following the Effective Date, Vidispine grants Customer the right to install the Soft-ware and use the Software as set forth in Section 2 subject to the restrictions listed in Section 3. This Agreement shall be the sole and exclusive agreement governing Customer's use of the Soft-ware. There is no payment for the Software, but Customer must be an Active Customer on the Vidinet services to use the Software in any form. +5. DELIVERY AND PAYMENT. + Immediately following the Effective Date, Vidispine grants Customer the right to install the Soft-ware and use the Software as set forth in Section 2 subject to the restrictions listed in Section 3. This Agreement shall be the sole and exclusive agreement governing Customer's use of the Soft-ware. There is no payment for the Software, but Customer must be an Active Customer on the Vidinet services to use the Software in any form. -6. TERM AND TERMINATION. -This Agreement shall commence upon the Effective Date and is granted in perpetuity, but may be terminated without notice in the following circumstances: if Customer is no longer an Active Cus-tomer of the Vidinet Services; if Customer breaches any term of this agreement, unless such breach is curable and is cured by Customer within thirty (30) days after notice of such breach is pro-vided by Vidispine; if Customer becomes the subject of insolvency proceedings; if Customer, being a firm or partnership, is dissolved; or if Customer destroys the Software for any reason. Upon ter-mination, Customer shall destroy any remaining copies of the Software or otherwise return or dis-pose of such material. Termination pursuant to this clause shall not affect any rights or remedies, which Vidispine may have otherwise under this license or at law. The following Sections shall sur-vive any termination of this Agreement: Sections 1, 4, 6, 8. Termination of this Agreement, if any, shall not affect any licenses or other grants of any rights, titles, or interests of Customer in or to any Run-Time Modules or the Target Application. +6. TERM AND TERMINATION. + This Agreement shall commence upon the Effective Date and is granted in perpetuity, but may be terminated without notice in the following circumstances: if Customer is no longer an Active Cus-tomer of the Vidinet Services; if Customer breaches any term of this agreement, unless such breach is curable and is cured by Customer within thirty (30) days after notice of such breach is pro-vided by Vidispine; if Customer becomes the subject of insolvency proceedings; if Customer, being a firm or partnership, is dissolved; or if Customer destroys the Software for any reason. Upon ter-mination, Customer shall destroy any remaining copies of the Software or otherwise return or dis-pose of such material. Termination pursuant to this clause shall not affect any rights or remedies, which Vidispine may have otherwise under this license or at law. The following Sections shall sur-vive any termination of this Agreement: Sections 1, 4, 6, 8. Termination of this Agreement, if any, shall not affect any licenses or other grants of any rights, titles, or interests of Customer in or to any Run-Time Modules or the Target Application. -7. LIMITED WARRANTY. -The SOFTWARE and the DOCUMENTATION are provided "as is." Vidispine points out expressly that the software is not covered by any support agreements that the Customer or Downstream Cus-tomer may have Vidispine regarding other software or services. -EXCEPT AS EXPRESSLY SET FORTH IN SECTIONS 7 AND 8 OF THIS AGREEMENT, VIDISPINE AND ITS LICENSORS DISCLAIM ALL WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, AND ANYWARRANTY THAT MAY ARISE BY REASON OF TRADE USAGE, CUSTOM, OR COURSEOF DEALING. WITHOUT LIMITING THE FOREGOING, CUSTOMER ACKNOWLEDGES THAT THE SOFTWARE IS PROVIDED "AS IS" AND THAT VIDISPINE DOES NOT WARRANT THE SOFTWARE WILL RUN UNINTERRUPTED OR ERROR FREE. THE ENTIRE RISK AS TO RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY CUSTOMER. UNDER NO CIRCUMSTANCES WILL VIDISPINE BE LIABLE FOR ANY SPECIAL, INDIRECT,INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES OF ANY KIND OR NATUREWHATSOEVER, WHETHER BASED ON CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, ARISING OUT OF OR IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF VIDISPINE HAS BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGE OR IF SUCH DAMAGE COULD HAVE BEEN REASONABLY FORESEEN, AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY EXCLUSIVE REMEDY PROVIDED. SUCH LIMITATION ON DAMAGES INCLUDES, BUT IS NOT LIMITED TO, DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOSS OF DATA OR SOFTWARE, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION OR IMPAIRMENT OF OTHER GOODS. IN NO EVENT WILL VIDISPINE BE LIABLE FOR THE COSTS OF PROCUREMENT OF SUBSTITUTE SOFTWARE OR SERVICES. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +7. LIMITED WARRANTY. + The SOFTWARE and the DOCUMENTATION are provided "as is." Vidispine points out expressly that the software is not covered by any support agreements that the Customer or Downstream Cus-tomer may have Vidispine regarding other software or services. + EXCEPT AS EXPRESSLY SET FORTH IN SECTIONS 7 AND 8 OF THIS AGREEMENT, VIDISPINE AND ITS LICENSORS DISCLAIM ALL WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, AND ANYWARRANTY THAT MAY ARISE BY REASON OF TRADE USAGE, CUSTOM, OR COURSEOF DEALING. WITHOUT LIMITING THE FOREGOING, CUSTOMER ACKNOWLEDGES THAT THE SOFTWARE IS PROVIDED "AS IS" AND THAT VIDISPINE DOES NOT WARRANT THE SOFTWARE WILL RUN UNINTERRUPTED OR ERROR FREE. THE ENTIRE RISK AS TO RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY CUSTOMER. UNDER NO CIRCUMSTANCES WILL VIDISPINE BE LIABLE FOR ANY SPECIAL, INDIRECT,INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES OF ANY KIND OR NATUREWHATSOEVER, WHETHER BASED ON CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, ARISING OUT OF OR IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF VIDISPINE HAS BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGE OR IF SUCH DAMAGE COULD HAVE BEEN REASONABLY FORESEEN, AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY EXCLUSIVE REMEDY PROVIDED. SUCH LIMITATION ON DAMAGES INCLUDES, BUT IS NOT LIMITED TO, DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOSS OF DATA OR SOFTWARE, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION OR IMPAIRMENT OF OTHER GOODS. IN NO EVENT WILL VIDISPINE BE LIABLE FOR THE COSTS OF PROCUREMENT OF SUBSTITUTE SOFTWARE OR SERVICES. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. INFRINGEMENT INDEMNITY DISCLAIMER. Customer expressly acknowledges and agrees that although Vidispine grants the licenses to the Software set forth herein, no assurances are provided by Vidispine that the Software does not infringe the patent or other intellectual property rights of any other entity. Vidispine disclaims any liability to Customer for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, Customer hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third-party patent license is re-quired to allow Customer to distribute the Software, it is the Customers responsibility to acquire that license before distributing the Software. diff --git a/README.md b/README.md index 98950c72..523adde8 100644 --- a/README.md +++ b/README.md @@ -2,76 +2,84 @@ See [Knowledge Base](https://support.vidispine.com/space/CKB/2249949244/VidiCore+Admin+Tool) for more information on the initial setup. -The VidiCore Admin Tool showcases Vidispine API features within a simple user interface. The application runs in a web browser and communicates directly with the API without the need for any middleware. It works out of the box with any VidiCore API server without the need for any configuration except CORS if you run the application remotely. +The VidiCore Admin Tool showcases Vidispine API features within a simple user interface. The application runs in a web browser and communicates directly with the API without the need for any middleware. It works out of the box with any VidiCore API server without the need for any configuration except CORS if you run the application remotely. -The application runs in a single webpage which means that a bundle of static files need to be downloaded once, then the browser will dynamically rendered pages based on the JSON data returned from the Vidispine API. The bundle can be hosted by any webserver, including an S3 bucket. This means updates to the application can be simply rolled out by updating the bundle and reloading the browser. +The application runs in a single webpage which means that a bundle of static files need to be downloaded once, then the browser will dynamically rendered pages based on the JSON data returned from the Vidispine API. The bundle can be hosted by any webserver, including an S3 bucket. This means updates to the application can be simply rolled out by updating the bundle and reloading the browser. The intention of the application is to demonstrate all API endpoints with a consistent user experience. This includes viewing lists or entities, forms that allow entry of any possible value within the schema, and actions to create/update/remove entities. -An icon in the toolbar displays the data returned from the VidiCore API which has been used to render the UI. For further detail, the API requests can be monitored via the browser's inspector tools. This demonstrates to developers the correct syntax to use when integrating VidiCore API into their own products. - +An icon in the toolbar displays the data returned from the VidiCore API which has been used to render the UI. For further detail, the API requests can be monitored via the browser's inspector tools. This demonstrates to developers the correct syntax to use when integrating VidiCore API into their own products. # Get Started ## Source -* Install `nodejs`. +- Install `nodejs`. + +- Clone this project and change into the project folder. -* Clone this project and change into the project folder. +- Install dependencies. -* Install dependencies. ``` npm install ``` -* Start the [vite dev server](https://vitejs.dev/guide/cli.html#dev-server) +- Start the [vite dev server](https://vitejs.dev/guide/cli.html#dev-server) + ``` npm run start ``` -* (Optionally) Set the `VITE_VIDISPINE_URL` to configure the [proxy](https://vitejs.dev/config/server-options.html#server-proxy) to avoid configuring CORS. +- (Optionally) Set the `VITE_VIDISPINE_URL` to configure the [proxy](https://vitejs.dev/config/server-options.html#server-proxy) to avoid configuring CORS. _MacOS, Linux_ + ```bash VITE_VIDISPINE_URL='https://example.myvidispine.com' npm run start ``` _Windows_ + ```cmd set VITE_VIDISPINE_URL='https://example.myvidispine.com'& npm run start ``` -* Open http://localhost:3000/ in a browser. +- Open http://localhost:3000/ in a browser. ### VSCode -* Use the _Run and Debug_ console to launch the dev server and set the VidiCore URL. See [launch.json](.vscode/launch.json). +- Use the _Run and Debug_ console to launch the dev server and set the VidiCore URL. See [launch.json](.vscode/launch.json). ### Build -* Compile the application locally. +- Compile the application locally. + ``` npm run build ``` -* Build the docker image with the `latest` tag. -Note that only files/folders specified with `!` prefix in the docker compose run -e DEBUG=1 web python console.py will be included. +- Build the docker image with the `latest` tag. + Note that only files/folders specified with `!` prefix in the docker compose run -e DEBUG=1 web python console.py will be included. + ``` npm run docker:build ``` + ## Docker Docker Containers can be downloaded from Dockerhub https://hub.docker.com/r/vidispine/admin-tool/tags ### Run -* Pull the latest image +- Pull the latest image + ``` docker image pull vidispine/admin-tool:latest ``` -* Start the container with the latest image. - - Try changing the port from `-p 80:80` to `-p 8088:80` if running on Windows. +- Start the container with the latest image. + - Try changing the port from `-p 80:80` to `-p 8088:80` if running on Windows. + ``` docker run \ --name vidispine-admin-tool \ @@ -82,9 +90,10 @@ docker run \ -e VIDISPINE_URL='http://my-vidispine-server:8080' \ -p 80:80 \ 'vidispine/admin-tool:latest' -``` +``` + +- Alternatively, start the container without specifying a VidiCore server. -* Alternatively, start the container without specifying a VidiCore server. ``` docker run \ --name vidispine-admin-tool \ @@ -95,9 +104,10 @@ docker run \ -e CONTAINER_PROXY='true' \ -p 80:80 \ 'vidispine/admin-tool:latest' -``` +``` + +- Alternatively, use `docker compose` with the linked [`docker-compose.yaml`](./docker-compose.yaml). -* Alternatively, use `docker compose` with the linked [`docker-compose.yaml`](./docker-compose.yaml). ``` docker compose up -d \ --detach \ @@ -108,15 +118,15 @@ docker compose up -d \ #### Run Environment Variables -* **VIDISPINE_URL**: The URL (including http/s and port) to access the Vidispine API. +- **VIDISPINE_URL**: The URL (including http/s and port) to access the Vidispine API. - Do not include a trailing `/` on the URL as it will break the Nginx proxy. - If running in Compose/Kubernetes, this should be the service name. - If running on localhost either use `host.docker.internal`, the IP address of the host on the docker network, or use `--net=host`. -* **NGINX_RESOLVER**: Nginx will proxy requests to an upstream VidiCore server, this will require a DNS address for the [resolver](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) if using a hostname. +- **NGINX_RESOLVER**: Nginx will proxy requests to an upstream VidiCore server, this will require a DNS address for the [resolver](https://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) if using a hostname. - Set this to `127.0.0.11` if using within Docker Compose. - Set this to `169.254.169.253` if using in AWS ECS (or your [Route 53 Resolver](https://docs.aws.amazon.com/vpc/latest/userguide/AmazonDNS-concepts.html#AmazonDNS)). -* **CONTAINER_PROXY**: Sets the `X-Proxy-URL` header on frontend requests and proxy via Nginx. +- **CONTAINER_PROXY**: Sets the `X-Proxy-URL` header on frontend requests and proxy via Nginx. #### Ports -* **80**: Web service +- **80**: Web service diff --git a/TODO.md b/TODO.md index f65f81da..2fe41adc 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,4 @@ -TO-DO -=== +# TO-DO 1. ~~Placeholder notifications not associated with entities~~ 2. Notifications on specific entities. @@ -48,33 +47,33 @@ TO-DO 45. Reindex libraries 46. Auto-projection rules 47. Bulky metadata editing -49. Global metadata -50. Search document metadata -51. Document metadata changesets -52. Modify entity metadata changesets -53. Entity Metadata Graph -54. Metadata locks -55. Metadata field enumaration values -56. Terse schema -57. Metadata field ACLs -58. Metadata migrations -59. Metadata schema -60. Item export subtitles -61. Specify timezone on requests -62. Projects -63. Search by metadata group -64. Secrets -65. Test shape-tag script -66. Auto-import rules per storage -67. Upload file to storage -68. Import file from path -69. Reindex single file -70. Import/export storage definition -71. Shape filename rules -72. Shape storage rules -73. Shape-tag storage rules -74. Transfer logs -75. Vidinet cost estimate -76. Extract logs -77. Resource tags -78. Export templates \ No newline at end of file +48. Global metadata +49. Search document metadata +50. Document metadata changesets +51. Modify entity metadata changesets +52. Entity Metadata Graph +53. Metadata locks +54. Metadata field enumaration values +55. Terse schema +56. Metadata field ACLs +57. Metadata migrations +58. Metadata schema +59. Item export subtitles +60. Specify timezone on requests +61. Projects +62. Search by metadata group +63. Secrets +64. Test shape-tag script +65. Auto-import rules per storage +66. Upload file to storage +67. Import file from path +68. Reindex single file +69. Import/export storage definition +70. Shape filename rules +71. Shape storage rules +72. Shape-tag storage rules +73. Transfer logs +74. Vidinet cost estimate +75. Extract logs +76. Resource tags +77. Export templates diff --git a/docker-compose.yaml b/docker-compose.yaml index e30ad4bb..f20b0fec 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,4 +6,4 @@ services: NGINX_RESOLVER: 127.0.0.11 CONTAINER_PROXY: true ports: - - ${ADMINTOOL_PORT:-80}:80 \ No newline at end of file + - ${ADMINTOOL_PORT:-80}:80 diff --git a/index.html b/index.html index 7c9329af..6a6cbc44 100644 --- a/index.html +++ b/index.html @@ -1,29 +1,27 @@ - + - - - - - + + + + + VidiCore Admin - +
diff --git a/package-lock.json b/package-lock.json index 024824f0..506dec68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vidispine/admin-tool", - "version": "25.1.0", + "version": "25.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@vidispine/admin-tool", - "version": "25.1.0", + "version": "25.2.0", "dependencies": { "@devbookhq/splitter": "^1.3.2", "@fontsource/open-sans": "4.5.2", @@ -39,27 +39,16 @@ "swagger-ui-react": "5.17.14" }, "devDependencies": { + "@vidispine/eslint-config-react": "24.3.0", + "@vidispine/prettier-config": "24.4.0-pre.1", "@vitejs/plugin-react": "^4.0.4", - "eslint": "7.11.0", - "eslint-config-airbnb": "18.2.1", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-jsx-a11y": "6.4.1", - "eslint-plugin-react": "7.21.5", - "eslint-plugin-react-hooks": "1.7.0", + "eslint": "8.57.1", "gh-pages": "6.1.1", + "prettier": "3.5.3", "sass": "^1.64.2", "vite": "4.5.5" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -430,6 +419,37 @@ "react-is": "^17.0.2" } }, + "node_modules/@emnapi/core": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz", + "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", + "dev": true, + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.0.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz", + "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "dev": true, + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.2.tgz", + "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", + "dev": true, + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emotion/babel-plugin": { "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", @@ -916,34 +936,63 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -952,6 +1001,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@fontsource/open-sans": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-4.5.2.tgz", @@ -968,6 +1026,41 @@ "dot-wasm": "bin/dot-wasm.js" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -1175,6 +1268,68 @@ "react-dom": "^16.8.0 || ^17.0.0" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.11.tgz", + "integrity": "sha512-9DPkXtvHydrcOsopiYpUgPHpmj0HWZKMUnL2dZqpvC42lsratuBG06V5ipyno0fUek5VlFsNQ+AcFATSrJXgMA==", + "dev": true, + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.9.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true, + "engines": { + "node": ">=12.4.0" + } + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true + }, "node_modules/@swagger-api/apidom-ast": { "version": "1.0.0-alpha.6", "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-1.0.0-alpha.6.tgz", @@ -1640,6 +1795,16 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@tybys/wasm-util": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", + "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "dev": true, + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1703,6 +1868,12 @@ "hoist-non-react-statics": "^3.3.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -1766,6 +1937,12 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" }, + "node_modules/@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "dev": true + }, "node_modules/@types/unist": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", @@ -1776,178 +1953,811 @@ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" }, - "node_modules/@vidispine/types": { - "version": "24.4.0-pre.1", - "resolved": "https://registry.npmjs.org/@vidispine/types/-/types-24.4.0-pre.1.tgz", - "integrity": "sha512-axfgTS9dIp1f0kOPKWnuxzgVeP6Pv00CUsUyqzC/LwlR1vRRg74/0kferQCHaJGrDUCAEBmCebFImTVS+MFdJw==" - }, - "node_modules/@vidispine/vdt-api": { - "version": "24.4.0-pre.1", - "resolved": "https://registry.npmjs.org/@vidispine/vdt-api/-/vdt-api-24.4.0-pre.1.tgz", - "integrity": "sha512-OVectyhe3fj182n5TH1o2Uhya1Pan+Hj2nVlVJjw4Y42GCiIgmdlmqbqwVZeLQVVef7NyL9fnzLpAcn0A0m0GQ==", - "dependencies": { - "axios": ">1.7.4", - "buffer": "6.0.3" - } - }, - "node_modules/@vidispine/vdt-js": { - "version": "24.4.0-pre.1", - "resolved": "https://registry.npmjs.org/@vidispine/vdt-js/-/vdt-js-24.4.0-pre.1.tgz", - "integrity": "sha512-I/6exiUrid6YL9eZ6B6re0JoFCRVlPwTXJFuqNaiFhpNstVRHljpq4VHwwN0nOs7kOTVCXJ1jcxxwhD6IncPiQ==", - "dependencies": { - "@vidispine/types": "24.4.0-pre.1", - "filesize": "^10.1.0", - "lodash.merge": "^4.6.2", - "url-join": "^5.0.0" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", - "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", "dev": true, "dependencies": { - "@babel/core": "^7.23.5", - "@babel/plugin-transform-react-jsx-self": "^7.23.3", - "@babel/plugin-transform-react-jsx-source": "^7.23.3", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.14.0" + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "bin": { - "acorn": "bin/acorn" + "semver": "bin/semver.js" }, "engines": { - "node": ">=0.4.0" + "node": ">=10" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, "engines": { - "node": ">=6" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, "engines": { - "node": ">=8" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">=4" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/apg-lite": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/apg-lite/-/apg-lite-1.0.4.tgz", - "integrity": "sha512-B32zCN3IdHIc99Vy7V9BaYTUzLeRA8YXYY1aQD1/5I2aqIrO0coi4t6hJPqMisidlBxhyME8UexkHt31SlR6Og==" - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "balanced-match": "^1.0.0" } }, - "node_modules/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.7.12.tgz", + "integrity": "sha512-C//UObaqVcGKpRMMThzBCDxbqM9YQg2dtWy3OwcERLu+qzLa781AqvGdgqwqakRO+cWCK6dl75ebAcsSozmARg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.7.12.tgz", + "integrity": "sha512-eRXO0uPaZtWIogCeVlpSCfzKr3ZJynQl3IRzhFucrA+efdjAylS+ZemWFfnhGbQgWv4lItKCfCpxGuZsosudWw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.7.12.tgz", + "integrity": "sha512-VUdT2CwMoyWy9Jolavu2fWTcusiA9FePjSyMLIrZvAeC2PMnM9msF3HJkO/j0S2fZkzgZy+UBBZjJwG0Mfds0g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.7.12.tgz", + "integrity": "sha512-hbWi7U2UlglpT1LQZbm7He3YpSRYGoHwFMMKC+oCD9UzPImFJZOFrQUL4FQVsOaxxz0ggWK1Q/ZcK23LpG2STg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.7.12.tgz", + "integrity": "sha512-KBblhYFUhUTVSkTKxxaw4cFS3qgQMs2oM1DUSNrsFX7uRBG6SxXkLXGKua+uWq+G0vT7pp30BPXJ7c4I6vRGcw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.7.12.tgz", + "integrity": "sha512-A5jGMNiY5F/KyeLkph5/gaNXNs/P/FUJvhKIP79mIOn9KUqjqx+UbhZQ1UrRuGHsh0gXPVSnu2UJdhnvJsnEyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.7.12.tgz", + "integrity": "sha512-Gv/duj5YStydJTNu2vSHFbSrRimpA6mnVmAnKTe1xMfhqDCm10EP/U6u7NII1jAjbpaRmqtnvFhtndzGxDyfhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.7.12.tgz", + "integrity": "sha512-BTjdqhVVl1Q8dZCdNkVXZrfFyqNRdWizFuY5N0eHP7zgtNmqwJ3F/eJF/60GnabIcmWHvWvugby2VqHZtW/bQw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.7.12.tgz", + "integrity": "sha512-YkjQuWGi1o174Xz2R+oQOOYQgViCwkSdpsHGmLr0QRYgQclJCQ4ug6qT+EGTYi1g4994q3BAaFVgV0GzEM1YSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.7.12.tgz", + "integrity": "sha512-9ud5x0qYBuk1rGdGzdjKQq/o7tObgI3IdjaufxKLD6kJIQi6vqww1mfoJklYw2OR5JXOWc6WLNKHa0Rr9aFZsw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.7.12.tgz", + "integrity": "sha512-3CNVBpgsvZ4Vrr18JAxQ8Qxz+k4PqTJR05/xn5Tczs9jFEuxPDxZKFskv9QnK3flJtx+ur9MayiTGgFZQAa7hA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.7.12.tgz", + "integrity": "sha512-bPACcY7lEp3M8IItjXEppQEsQ2N54a1aLb1yCWD16lccl8OG9aXQvji9x9VVcmdqR4JV4oWXzr0uIrZ+oFNvOw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.12.tgz", + "integrity": "sha512-86WuRbj+0tK3qWPthfsR952CHxE23lDTjbKfHOczIkjRvKP/ggAzaiNMOEljxB5iel4HhGTQZBp1lx61aw2q/g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.12.tgz", + "integrity": "sha512-RzWV0OyeARtKRNHSbVZyj869P+WHzT2OFEgigs+5qEIM8X3QzbQ90Ye/1hCvgu0zi/cDCXtKWp8Utr1Oym2UIA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.11" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.7.12.tgz", + "integrity": "sha512-s9FdWj2QFT6PLNY/jPPmd7jF1Fn2HNSuLbZqUpdcSaMdeBGaDvy2C/eBYgGhrK7g8kIYUecT1LdT+SuDs6h+YA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.7.12.tgz", + "integrity": "sha512-Fo4Op3Il/6HZ8Gm+YhqBkRZpTGe/QJZWAsCB/CLYBDqJ2NjXptgFsuIvlgXv95+WUkoTw6ifRgxE9gwtcAk5YA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.7.12.tgz", + "integrity": "sha512-00cVr73Qizmx7qycr9aO5NBofoAHuQIhNsuqj+I2Bun/yMddLfpXk86K3GWj096jXLzk0u/77u3qUTJPhuYWiw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@vidispine/eslint-config-base": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/eslint-config-base/-/eslint-config-base-24.3.0.tgz", + "integrity": "sha512-LR7h+EntTdfTHQSBLVHuZSDOP4zojw9iyE0KARvGM5iopUGaeD90lNOfMDyfqKUZVbYU2R/QM3ORD7PTa0ihWg==", + "dev": true, + "dependencies": { + "@vidispine/eslint-config-typescript": "24.3.0", + "@vidispine/prettier-config": "24.3.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.29.0" + }, + "peerDependencies": { + "eslint": "^8.0.0" + } + }, + "node_modules/@vidispine/eslint-config-base/node_modules/@vidispine/prettier-config": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/prettier-config/-/prettier-config-24.3.0.tgz", + "integrity": "sha512-17burPnSmQtN0orVE83O+0C9hwqyehb0sT6t2zkwT5FMsEJphxRb4Ksa6N69cQJ9XZGbQY67qzDkxDlvoAyl+w==", + "dev": true, + "peerDependencies": { + "prettier": "^2.0.0 || ^3.0.0" + } + }, + "node_modules/@vidispine/eslint-config-react": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/eslint-config-react/-/eslint-config-react-24.3.0.tgz", + "integrity": "sha512-bYfmuzOtx1qJAT2AfPF9vKJXxiUX2aSo0NxhbXwzgBsYjQuuHW6+1jtm+SCcEOqdadZl/02KwOH3iPnHdUD/Rw==", + "dev": true, + "dependencies": { + "@vidispine/eslint-config-base": "24.3.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "0.4.5" + }, + "peerDependencies": { + "eslint": "^8.0.0" + } + }, + "node_modules/@vidispine/eslint-config-typescript": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/eslint-config-typescript/-/eslint-config-typescript-24.3.0.tgz", + "integrity": "sha512-97oc2DlH77ZBZ6vFGpHCyqv8WGHhvWSqQUA4WfDuexN/dNXSiJYciPIkxqTE1jamLUmWj6Ffzja+Qdtj/Tt37Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", + "eslint-config-airbnb-typescript": "^17.1.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0" + }, + "peerDependencies": { + "eslint": "^8.0.0" + } + }, + "node_modules/@vidispine/prettier-config": { + "version": "24.4.0-pre.1", + "resolved": "https://registry.npmjs.org/@vidispine/prettier-config/-/prettier-config-24.4.0-pre.1.tgz", + "integrity": "sha512-Lt5GcXwviSBI+P89BCqhyyzKlfoH49QLwBzCn1nAoI55AN0XyM5jjCG6H7tjoJXQUBOFTS+n+lujBQMrQfuFmw==", + "dev": true, + "peerDependencies": { + "prettier": "^2.0.0 || ^3.0.0" + } + }, + "node_modules/@vidispine/types": { + "version": "24.4.0-pre.1", + "resolved": "https://registry.npmjs.org/@vidispine/types/-/types-24.4.0-pre.1.tgz", + "integrity": "sha512-axfgTS9dIp1f0kOPKWnuxzgVeP6Pv00CUsUyqzC/LwlR1vRRg74/0kferQCHaJGrDUCAEBmCebFImTVS+MFdJw==" + }, + "node_modules/@vidispine/vdt-api": { + "version": "24.4.0-pre.1", + "resolved": "https://registry.npmjs.org/@vidispine/vdt-api/-/vdt-api-24.4.0-pre.1.tgz", + "integrity": "sha512-OVectyhe3fj182n5TH1o2Uhya1Pan+Hj2nVlVJjw4Y42GCiIgmdlmqbqwVZeLQVVef7NyL9fnzLpAcn0A0m0GQ==", + "dependencies": { + "axios": ">1.7.4", + "buffer": "6.0.3" + } + }, + "node_modules/@vidispine/vdt-js": { + "version": "24.4.0-pre.1", + "resolved": "https://registry.npmjs.org/@vidispine/vdt-js/-/vdt-js-24.4.0-pre.1.tgz", + "integrity": "sha512-I/6exiUrid6YL9eZ6B6re0JoFCRVlPwTXJFuqNaiFhpNstVRHljpq4VHwwN0nOs7kOTVCXJ1jcxxwhD6IncPiQ==", + "dependencies": { + "@vidispine/types": "24.4.0-pre.1", + "filesize": "^10.1.0", + "lodash.merge": "^4.6.2", + "url-join": "^5.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz", + "integrity": "sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.5", + "@babel/plugin-transform-react-jsx-self": "^7.23.3", + "@babel/plugin-transform-react-jsx-source": "^7.23.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/apg-lite": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/apg-lite/-/apg-lite-1.0.4.tgz", + "integrity": "sha512-B32zCN3IdHIc99Vy7V9BaYTUzLeRA8YXYY1aQD1/5I2aqIrO0coi4t6hJPqMisidlBxhyME8UexkHt31SlR6Og==" + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-string": "^1.0.7" + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -1956,37 +2766,34 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "dependencies": { - "array-uniq": "^1.0.1" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1995,37 +2802,35 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", - "is-shared-array-buffer": "^1.0.2" + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" }, "engines": { "node": ">= 0.4" @@ -2040,26 +2845,26 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, "node_modules/ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", "dev": true }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", "dev": true }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2074,10 +2879,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2086,9 +2894,9 @@ } }, "node_modules/axe-core": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.3.tgz", - "integrity": "sha512-d5ZQHPSPkF9Tw+yfyDcRoUOc4g/8UloJJe5J8m4L5+c7AtDdjDLRxew/knnI4CxvtdxEUVgWz4x3OIQUIFiMfw==", + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", + "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", "dev": true, "engines": { "node": ">=4" @@ -2105,10 +2913,13 @@ } }, "node_modules/axobject-query": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", - "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + } }, "node_modules/babel-plugin-macros": { "version": "3.1.0", @@ -2297,15 +3108,42 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -2551,15 +3389,6 @@ "date-now": "^0.1.4" } }, - "node_modules/contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha512-OKZnPGeMQy2RPaUIBPFFd71iNf4791H12MCRuVQDnzGRwCYNYmTDy5pdafo2SLAcEMKzTOQnLWG4QdcjeJUMEg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2630,9 +3459,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -2801,6 +3630,57 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -2864,6 +3744,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -2910,16 +3791,28 @@ "node": ">=8" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "dependencies": { "esutils": "^2.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=0.10.0" } }, "node_modules/dom-helpers": { @@ -2999,6 +3892,19 @@ "node": ">=4" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.622", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.622.tgz", @@ -3026,19 +3932,6 @@ "once": "^1.4.0" } }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", @@ -3053,50 +3946,65 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" }, "engines": { "node": ">= 0.4" @@ -3106,12 +4014,9 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "engines": { "node": ">= 0.4" } @@ -3124,38 +4029,80 @@ "node": ">= 0.4" } }, + "node_modules/es-iterator-helpers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", + "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.6", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.4", + "safe-array-concat": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -3223,96 +4170,126 @@ } }, "node_modules/eslint": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", - "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", - "ajv": "^6.10.0", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-airbnb": { - "version": "18.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", - "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, "dependencies": { - "eslint-config-airbnb-base": "^14.2.1", + "eslint-config-airbnb-base": "^15.0.0", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5" }, "engines": { - "node": ">= 6" + "node": "^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-react": "^7.21.5", - "eslint-plugin-react-hooks": "^4 || ^3 || ^2.3.0 || ^1.7.0" + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0" } }, "node_modules/eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "dependencies": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "engines": { - "node": ">= 6" + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-config-airbnb-typescript": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.1.0.tgz", + "integrity": "sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==", + "dev": true, + "dependencies": { + "eslint-config-airbnb-base": "^15.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.13.0 || ^6.0.0", + "@typescript-eslint/parser": "^5.0.0 || ^6.0.0", + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" }, "peerDependencies": { - "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", - "eslint-plugin-import": "^2.22.1" + "eslint": ">=7.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -3335,10 +4312,67 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz", + "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==", + "dev": true, + "dependencies": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.4.0", + "get-tsconfig": "^4.10.0", + "is-bun-module": "^2.0.0", + "stable-hash": "^0.0.5", + "tinyglobby": "^0.2.13", + "unrs-resolver": "^1.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -3362,184 +4396,172 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "dev": true, + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" } }, "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha512-lsGyRuYr4/PIB0txi+Fy2xOMI2dGaTguCaotzFGkVZuKR5usKfcRWIFKNM3QNrU7hh/+w2bwTW+ZeXPK5l8uVg==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "ms": "^2.1.1" } }, - "node_modules/eslint-plugin-import/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", - "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.11.2", - "aria-query": "^4.2.2", - "array-includes": "^3.1.1", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.0.2", - "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.6", - "emoji-regex": "^9.0.0", - "has": "^1.0.3", - "jsx-ast-utils": "^3.1.0", - "language-tags": "^1.0.5" + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", + "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "dev": true, + "dependencies": { + "aria-query": "^5.3.2", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.1" }, "engines": { "node": ">=4.0" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, "node_modules/eslint-plugin-react": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz", - "integrity": "sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g==", + "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", "dev": true, "dependencies": { - "array-includes": "^3.1.1", - "array.prototype.flatmap": "^1.2.3", + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.3", + "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "has": "^1.0.3", + "es-iterator-helpers": "^1.2.1", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "object.entries": "^1.1.2", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.18.1", - "string.prototype.matchall": "^4.0.2" + "minimatch": "^3.1.2", + "object.entries": "^1.1.9", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.1", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.12", + "string.prototype.repeat": "^1.0.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "node_modules/eslint-plugin-react-hooks": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz", - "integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "engines": { - "node": ">=7" + "node": ">=10" }, "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" } }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", + "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" + "peerDependencies": { + "eslint": ">=7" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" }, - "engines": { - "node": ">=8.0.0" + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/ansi-styles": { @@ -3591,13 +4613,65 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/eslint/node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/eslint/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -3615,31 +4689,49 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/lru-cache": { + "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "p-locate": "^5.0.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "yocto-queue": "^0.1.0" }, - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/supports-color": { @@ -3654,52 +4746,27 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -3708,15 +4775,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -3729,7 +4787,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -3738,15 +4796,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -3787,6 +4836,22 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-json-patch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", @@ -3804,6 +4869,15 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fault": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", @@ -3843,16 +4917,30 @@ "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz", "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==" }, + "node_modules/fdir": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", + "dev": true, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/filename-reserved-regex": { @@ -3937,23 +5025,23 @@ } }, "node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, "node_modules/flux": { @@ -3988,12 +5076,18 @@ } }, "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "dev": true, "dependencies": { - "is-callable": "^1.1.3" + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/form-data": { @@ -4065,15 +5159,17 @@ } }, "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" }, "engines": { "node": ">= 0.4" @@ -4082,12 +5178,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -4115,15 +5205,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4143,14 +5238,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -4159,6 +5267,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/gh-pages": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-6.1.1.tgz", @@ -4228,12 +5348,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -4259,11 +5380,11 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4275,20 +5396,20 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4305,6 +5426,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -4313,9 +5435,13 @@ } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -4324,9 +5450,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "engines": { "node": ">= 0.4" }, @@ -4335,12 +5461,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -4350,9 +5476,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -4414,12 +5540,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, "node_modules/htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", @@ -4457,9 +5577,9 @@ ] }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -4521,14 +5641,14 @@ "optional": true }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4565,14 +5685,17 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4583,13 +5706,35 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4608,13 +5753,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4623,6 +5768,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", + "dev": true, + "dependencies": { + "semver": "^7.7.1" + } + }, + "node_modules/is-bun-module/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -4636,23 +5802,44 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, "dependencies": { - "hasown": "^2.0.0" + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4679,13 +5866,37 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", "dev": true, + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-glob": { @@ -4714,10 +5925,22 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -4736,12 +5959,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4761,19 +5985,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -4793,25 +6028,41 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4821,12 +6072,14 @@ } }, "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -4836,13 +6089,25 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -4851,12 +6116,31 @@ } }, "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4873,6 +6157,23 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/iterator.prototype": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/js-file-download": { "version": "0.4.12", "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", @@ -4884,18 +6185,21 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4947,6 +6251,12 @@ "node": ">=0.8.0" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -5090,10 +6400,19 @@ "node": ">=4.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", "dev": true }, "node_modules/language-tags": { @@ -5126,33 +6445,6 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, - "node_modules/load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -5262,11 +6554,41 @@ "react-dom": "^16.3.0" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -5343,18 +6665,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -5405,6 +6715,21 @@ "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "optional": true }, + "node_modules/napi-postinstall": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.2.4.tgz", + "integrity": "sha512-ZEzHJwBhZ8qQSbknHqYcdtQVr8zUgGyM/q6h6qAyhtyVMNrSgDhrC4disf03dYW0e+czXyLnZINnCTEkWy0eJg==", + "dev": true, + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5499,27 +6824,6 @@ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5538,9 +6842,12 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5555,14 +6862,16 @@ } }, "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" }, "engines": { @@ -5573,28 +6882,30 @@ } }, "node_modules/object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", + "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -5603,15 +6914,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -5651,22 +6977,39 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -5860,6 +7203,15 @@ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz", "integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA==" }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.33", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", @@ -5923,6 +7275,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", @@ -5939,15 +7306,6 @@ "node": ">= 0.6.0" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -6031,6 +7389,26 @@ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ramda": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.30.1.tgz", @@ -6408,112 +7786,6 @@ "react-dom": ">=16.6.0" } }, - "node_modules/read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==", - "dev": true, - "dependencies": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==", - "dev": true, - "dependencies": { - "pify": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -6591,6 +7863,28 @@ "immutable": "^3.8.1 || ^4.0.0-rc.1" } }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/refractor": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", @@ -6619,14 +7913,17 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -6635,18 +7932,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/remarkable": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", @@ -6717,6 +8002,15 @@ "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/ret": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", @@ -6725,16 +8019,30 @@ "node": ">=4" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rollup": { @@ -6753,15 +8061,39 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "engines": { @@ -6796,15 +8128,40 @@ } ] }, - "node_modules/safe-regex-test": { + "node_modules/safe-push-apply": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6859,21 +8216,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -6887,14 +8234,29 @@ } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -6948,14 +8310,65 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -7009,18 +8422,13 @@ "simple-concat": "^1.0.0" } }, - "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/source-map": { @@ -7049,118 +8457,99 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "node_modules/stable-hash": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", + "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", "dev": true }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", "dev": true, "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, - "node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/string.prototype.includes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", + "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3" }, "engines": { - "node": ">=6" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" + "node": ">= 0.4" } }, - "node_modules/string-width/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/string.prototype.matchall": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", "dev": true, "dependencies": { - "ansi-regex": "^4.1.0" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.matchall": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", - "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "regexp.prototype.flags": "^1.5.0", - "set-function-name": "^2.0.0", - "side-channel": "^1.0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7170,28 +8559,35 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7308,11 +8704,6 @@ "traverse": "=0.6.8" } }, - "node_modules/swagger-client/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, "node_modules/swagger-client/node_modules/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", @@ -7321,17 +8712,6 @@ "node": ">= 0.6" } }, - "node_modules/swagger-client/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/swagger-ui-react": { "version": "5.17.14", "resolved": "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-5.17.14.tgz", @@ -7376,11 +8756,6 @@ "react-dom": ">=16.8.0 <19" } }, - "node_modules/swagger-ui-react/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, "node_modules/swagger-ui-react/node_modules/immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", @@ -7389,17 +8764,6 @@ "node": ">=0.10.0" } }, - "node_modules/swagger-ui-react/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/swagger-ui-react/node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -7448,21 +8812,6 @@ "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==" }, - "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -7530,6 +8879,34 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -7614,6 +8991,18 @@ "node": ">=0.10.0" } }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-mixer": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", @@ -7678,38 +9067,41 @@ } }, "node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -7719,16 +9111,18 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" }, "engines": { "node": ">= 0.4" @@ -7738,14 +9132,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7782,15 +9182,18 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7819,6 +9222,38 @@ "resolved": "https://registry.npmjs.org/unraw/-/unraw-3.0.0.tgz", "integrity": "sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==" }, + "node_modules/unrs-resolver": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.7.12.tgz", + "integrity": "sha512-pfcdDxrVoUc5ZB3VCVJNSWbs63lgQVYLVw4k/rCr8Smi/V2Sxi1odEckVq6Zf803OtbYia1+YpiGCZoODfWLsQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "napi-postinstall": "^0.2.2" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-darwin-arm64": "1.7.12", + "@unrs/resolver-binding-darwin-x64": "1.7.12", + "@unrs/resolver-binding-freebsd-x64": "1.7.12", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.12", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.7.12", + "@unrs/resolver-binding-linux-arm64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-arm64-musl": "1.7.12", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-riscv64-musl": "1.7.12", + "@unrs/resolver-binding-linux-s390x-gnu": "1.7.12", + "@unrs/resolver-binding-linux-x64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-x64-musl": "1.7.12", + "@unrs/resolver-binding-wasm32-wasi": "1.7.12", + "@unrs/resolver-binding-win32-arm64-msvc": "1.7.12", + "@unrs/resolver-binding-win32-ia32-msvc": "1.7.12", + "@unrs/resolver-binding-win32-x64-msvc": "1.7.12" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", @@ -7926,22 +9361,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "optional": true }, - "node_modules/v8-compile-cache": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", - "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", - "dev": true - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", @@ -8046,32 +9465,88 @@ } }, "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -8080,6 +9555,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -8157,18 +9641,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", @@ -8263,6 +9735,18 @@ "node": ">=8" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zenscroll": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", @@ -8270,12 +9754,6 @@ } }, "dependencies": { - "@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true - }, "@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -8549,6 +10027,37 @@ "react-is": "^17.0.2" } }, + "@emnapi/core": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.3.tgz", + "integrity": "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==", + "dev": true, + "optional": true, + "requires": { + "@emnapi/wasi-threads": "1.0.2", + "tslib": "^2.4.0" + } + }, + "@emnapi/runtime": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz", + "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==", + "dev": true, + "optional": true, + "requires": { + "tslib": "^2.4.0" + } + }, + "@emnapi/wasi-threads": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.2.tgz", + "integrity": "sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==", + "dev": true, + "optional": true, + "requires": { + "tslib": "^2.4.0" + } + }, "@emotion/babel-plugin": { "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", @@ -8824,35 +10333,55 @@ "dev": true, "optional": true }, + "@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.4.3" + } + }, + "@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true + }, "@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } } } }, + "@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true + }, "@fontsource/open-sans": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-4.5.2.tgz", @@ -8866,6 +10395,29 @@ "yargs": "17.7.2" } }, + "@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, "@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -8981,6 +10533,56 @@ "react-is": "^16.8.0 || ^17.0.0" } }, + "@napi-rs/wasm-runtime": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.11.tgz", + "integrity": "sha512-9DPkXtvHydrcOsopiYpUgPHpmj0HWZKMUnL2dZqpvC42lsratuBG06V5ipyno0fUek5VlFsNQ+AcFATSrJXgMA==", + "dev": true, + "optional": true, + "requires": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.9.0" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true + }, + "@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true + }, "@swagger-api/apidom-ast": { "version": "1.0.0-alpha.6", "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-1.0.0-alpha.6.tgz", @@ -9440,6 +11042,16 @@ } } }, + "@tybys/wasm-util": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", + "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "dev": true, + "optional": true, + "requires": { + "tslib": "^2.4.0" + } + }, "@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -9503,6 +11115,12 @@ "hoist-non-react-statics": "^3.3.0" } }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -9568,6 +11186,12 @@ "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" }, + "@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "dev": true + }, "@types/unist": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", @@ -9578,6 +11202,353 @@ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" }, + "@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "dependencies": { + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } + } + }, + "@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + } + }, + "@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "dependencies": { + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } + } + }, + "@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "dependencies": { + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "requires": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + } + }, + "@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true + }, + "@unrs/resolver-binding-darwin-arm64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.7.12.tgz", + "integrity": "sha512-C//UObaqVcGKpRMMThzBCDxbqM9YQg2dtWy3OwcERLu+qzLa781AqvGdgqwqakRO+cWCK6dl75ebAcsSozmARg==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-darwin-x64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.7.12.tgz", + "integrity": "sha512-eRXO0uPaZtWIogCeVlpSCfzKr3ZJynQl3IRzhFucrA+efdjAylS+ZemWFfnhGbQgWv4lItKCfCpxGuZsosudWw==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-freebsd-x64": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.7.12.tgz", + "integrity": "sha512-VUdT2CwMoyWy9Jolavu2fWTcusiA9FePjSyMLIrZvAeC2PMnM9msF3HJkO/j0S2fZkzgZy+UBBZjJwG0Mfds0g==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.7.12.tgz", + "integrity": "sha512-hbWi7U2UlglpT1LQZbm7He3YpSRYGoHwFMMKC+oCD9UzPImFJZOFrQUL4FQVsOaxxz0ggWK1Q/ZcK23LpG2STg==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.7.12.tgz", + "integrity": "sha512-KBblhYFUhUTVSkTKxxaw4cFS3qgQMs2oM1DUSNrsFX7uRBG6SxXkLXGKua+uWq+G0vT7pp30BPXJ7c4I6vRGcw==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.7.12.tgz", + "integrity": "sha512-A5jGMNiY5F/KyeLkph5/gaNXNs/P/FUJvhKIP79mIOn9KUqjqx+UbhZQ1UrRuGHsh0gXPVSnu2UJdhnvJsnEyw==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.7.12.tgz", + "integrity": "sha512-Gv/duj5YStydJTNu2vSHFbSrRimpA6mnVmAnKTe1xMfhqDCm10EP/U6u7NII1jAjbpaRmqtnvFhtndzGxDyfhA==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.7.12.tgz", + "integrity": "sha512-BTjdqhVVl1Q8dZCdNkVXZrfFyqNRdWizFuY5N0eHP7zgtNmqwJ3F/eJF/60GnabIcmWHvWvugby2VqHZtW/bQw==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.7.12.tgz", + "integrity": "sha512-YkjQuWGi1o174Xz2R+oQOOYQgViCwkSdpsHGmLr0QRYgQclJCQ4ug6qT+EGTYi1g4994q3BAaFVgV0GzEM1YSQ==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.7.12.tgz", + "integrity": "sha512-9ud5x0qYBuk1rGdGzdjKQq/o7tObgI3IdjaufxKLD6kJIQi6vqww1mfoJklYw2OR5JXOWc6WLNKHa0Rr9aFZsw==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.7.12.tgz", + "integrity": "sha512-3CNVBpgsvZ4Vrr18JAxQ8Qxz+k4PqTJR05/xn5Tczs9jFEuxPDxZKFskv9QnK3flJtx+ur9MayiTGgFZQAa7hA==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.7.12.tgz", + "integrity": "sha512-bPACcY7lEp3M8IItjXEppQEsQ2N54a1aLb1yCWD16lccl8OG9aXQvji9x9VVcmdqR4JV4oWXzr0uIrZ+oFNvOw==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-linux-x64-musl": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.12.tgz", + "integrity": "sha512-86WuRbj+0tK3qWPthfsR952CHxE23lDTjbKfHOczIkjRvKP/ggAzaiNMOEljxB5iel4HhGTQZBp1lx61aw2q/g==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-wasm32-wasi": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.12.tgz", + "integrity": "sha512-RzWV0OyeARtKRNHSbVZyj869P+WHzT2OFEgigs+5qEIM8X3QzbQ90Ye/1hCvgu0zi/cDCXtKWp8Utr1Oym2UIA==", + "dev": true, + "optional": true, + "requires": { + "@napi-rs/wasm-runtime": "^0.2.11" + } + }, + "@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.7.12.tgz", + "integrity": "sha512-s9FdWj2QFT6PLNY/jPPmd7jF1Fn2HNSuLbZqUpdcSaMdeBGaDvy2C/eBYgGhrK7g8kIYUecT1LdT+SuDs6h+YA==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.7.12.tgz", + "integrity": "sha512-Fo4Op3Il/6HZ8Gm+YhqBkRZpTGe/QJZWAsCB/CLYBDqJ2NjXptgFsuIvlgXv95+WUkoTw6ifRgxE9gwtcAk5YA==", + "dev": true, + "optional": true + }, + "@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.7.12.tgz", + "integrity": "sha512-00cVr73Qizmx7qycr9aO5NBofoAHuQIhNsuqj+I2Bun/yMddLfpXk86K3GWj096jXLzk0u/77u3qUTJPhuYWiw==", + "dev": true, + "optional": true + }, + "@vidispine/eslint-config-base": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/eslint-config-base/-/eslint-config-base-24.3.0.tgz", + "integrity": "sha512-LR7h+EntTdfTHQSBLVHuZSDOP4zojw9iyE0KARvGM5iopUGaeD90lNOfMDyfqKUZVbYU2R/QM3ORD7PTa0ihWg==", + "dev": true, + "requires": { + "@vidispine/eslint-config-typescript": "24.3.0", + "@vidispine/prettier-config": "24.3.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.29.0" + }, + "dependencies": { + "@vidispine/prettier-config": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/prettier-config/-/prettier-config-24.3.0.tgz", + "integrity": "sha512-17burPnSmQtN0orVE83O+0C9hwqyehb0sT6t2zkwT5FMsEJphxRb4Ksa6N69cQJ9XZGbQY67qzDkxDlvoAyl+w==", + "dev": true + } + } + }, + "@vidispine/eslint-config-react": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/eslint-config-react/-/eslint-config-react-24.3.0.tgz", + "integrity": "sha512-bYfmuzOtx1qJAT2AfPF9vKJXxiUX2aSo0NxhbXwzgBsYjQuuHW6+1jtm+SCcEOqdadZl/02KwOH3iPnHdUD/Rw==", + "dev": true, + "requires": { + "@vidispine/eslint-config-base": "24.3.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "0.4.5" + } + }, + "@vidispine/eslint-config-typescript": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@vidispine/eslint-config-typescript/-/eslint-config-typescript-24.3.0.tgz", + "integrity": "sha512-97oc2DlH77ZBZ6vFGpHCyqv8WGHhvWSqQUA4WfDuexN/dNXSiJYciPIkxqTE1jamLUmWj6Ffzja+Qdtj/Tt37Q==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", + "eslint-config-airbnb-typescript": "^17.1.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0" + } + }, + "@vidispine/prettier-config": { + "version": "24.4.0-pre.1", + "resolved": "https://registry.npmjs.org/@vidispine/prettier-config/-/prettier-config-24.4.0-pre.1.tgz", + "integrity": "sha512-Lt5GcXwviSBI+P89BCqhyyzKlfoH49QLwBzCn1nAoI55AN0XyM5jjCG6H7tjoJXQUBOFTS+n+lujBQMrQfuFmw==", + "dev": true + }, "@vidispine/types": { "version": "24.4.0-pre.1", "resolved": "https://registry.npmjs.org/@vidispine/types/-/types-24.4.0-pre.1.tgz", @@ -9617,9 +11588,9 @@ } }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true }, "acorn-jsx": { @@ -9640,12 +11611,6 @@ "uri-js": "^4.2.2" } }, - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -9683,36 +11648,35 @@ } }, "aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" - } + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "dev": true }, "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" } }, "array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-string": "^1.0.7" + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" } }, "array-union": { @@ -9730,43 +11694,85 @@ "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", "dev": true }, + "array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + } + }, "array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" } }, "array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "requires": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + } + }, + "array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" } }, "arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", "dev": true, "requires": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", - "is-shared-array-buffer": "^1.0.2" + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" } }, "asap": { @@ -9775,15 +11781,9 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, "ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", - "dev": true - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", "dev": true }, "async": { @@ -9792,6 +11792,12 @@ "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", "dev": true }, + "async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -9806,15 +11812,18 @@ } }, "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "requires": { + "possible-typed-array-names": "^1.0.0" + } }, "axe-core": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.3.tgz", - "integrity": "sha512-d5ZQHPSPkF9Tw+yfyDcRoUOc4g/8UloJJe5J8m4L5+c7AtDdjDLRxew/knnI4CxvtdxEUVgWz4x3OIQUIFiMfw==", + "version": "4.10.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.3.tgz", + "integrity": "sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==", "dev": true }, "axios": { @@ -9828,9 +11837,9 @@ } }, "axobject-query": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", - "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", "dev": true }, "babel-plugin-macros": { @@ -9946,16 +11955,34 @@ "ieee754": "^1.2.1" } }, - "call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "requires": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + } + }, + "call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + } + }, + "call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "requires": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" } }, "callsites": { @@ -10129,12 +12156,6 @@ "date-now": "^0.1.4" } }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha512-OKZnPGeMQy2RPaUIBPFFd71iNf4791H12MCRuVQDnzGRwCYNYmTDy5pdafo2SLAcEMKzTOQnLWG4QdcjeJUMEg==", - "dev": true - }, "convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -10194,9 +12215,9 @@ } }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -10320,6 +12341,39 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "requires": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + } + }, + "data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "requires": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + } + }, + "data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "requires": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -10363,6 +12417,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, "requires": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -10391,10 +12446,19 @@ "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", "optional": true }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -10469,6 +12533,16 @@ "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==" }, + "dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "requires": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + } + }, "electron-to-chromium": { "version": "1.4.622", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.622.tgz", @@ -10496,16 +12570,6 @@ "once": "^1.4.0" } }, - "enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - } - }, "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", @@ -10520,94 +12584,139 @@ } }, "es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "requires": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" } }, "es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "requires": { - "get-intrinsic": "^1.2.4" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" }, "es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" }, + "es-iterator-helpers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", + "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", + "dev": true, + "requires": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.6", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.4", + "safe-array-concat": "^1.1.3" + } + }, + "es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "requires": { + "es-errors": "^1.3.0" + } + }, "es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", "dev": true, "requires": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" } }, "es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", "dev": true, "requires": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" } }, "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" } }, "es6-error": { @@ -10656,48 +12765,49 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "eslint": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", - "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", - "ajv": "^6.10.0", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "dependencies": { "ansi-styles": { @@ -10734,13 +12844,47 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "has-flag": { @@ -10749,22 +12893,31 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "lru-cache": { + "locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "yallist": "^4.0.0" + "p-locate": "^5.0.0" } }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "lru-cache": "^6.0.0" + "p-limit": "^3.0.2" } }, "supports-color": { @@ -10775,37 +12928,47 @@ "requires": { "has-flag": "^4.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, "eslint-config-airbnb": { - "version": "18.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", - "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, "requires": { - "eslint-config-airbnb-base": "^14.2.1", + "eslint-config-airbnb-base": "^15.0.0", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5" } }, "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "requires": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" + } + }, + "eslint-config-airbnb-typescript": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.1.0.tgz", + "integrity": "sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==", + "dev": true, + "requires": { + "eslint-config-airbnb-base": "^15.0.0" } }, + "eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true + }, "eslint-import-resolver-node": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", @@ -10828,10 +12991,42 @@ } } }, + "eslint-import-resolver-typescript": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz", + "integrity": "sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ==", + "dev": true, + "requires": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.4.0", + "get-tsconfig": "^4.10.0", + "is-bun-module": "^2.0.0", + "stable-hash": "^0.0.5", + "tinyglobby": "^0.2.13", + "unrs-resolver": "^1.6.2" + }, + "dependencies": { + "debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, "eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", "dev": true, "requires": { "debug": "^3.2.7" @@ -10849,187 +13044,151 @@ } }, "eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "dev": true, + "requires": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha512-lsGyRuYr4/PIB0txi+Fy2xOMI2dGaTguCaotzFGkVZuKR5usKfcRWIFKNM3QNrU7hh/+w2bwTW+ZeXPK5l8uVg==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "ms": "^2.1.1" } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true } } }, "eslint-plugin-jsx-a11y": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", - "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.11.2", - "aria-query": "^4.2.2", - "array-includes": "^3.1.1", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.0.2", - "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.6", - "emoji-regex": "^9.0.0", - "has": "^1.0.3", - "jsx-ast-utils": "^3.1.0", - "language-tags": "^1.0.5" + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", + "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", + "dev": true, + "requires": { + "aria-query": "^5.3.2", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.1" } }, "eslint-plugin-react": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz", - "integrity": "sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g==", + "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", "dev": true, "requires": { - "array-includes": "^3.1.1", - "array.prototype.flatmap": "^1.2.3", + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.3", + "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "has": "^1.0.3", + "es-iterator-helpers": "^1.2.1", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "object.entries": "^1.1.2", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.18.1", - "string.prototype.matchall": "^4.0.2" + "minimatch": "^3.1.2", + "object.entries": "^1.1.9", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.1", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.12", + "string.prototype.repeat": "^1.0.0" }, "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", "dev": true, "requires": { - "esutils": "^2.0.2" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } } } }, "eslint-plugin-react-hooks": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz", - "integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "dev": true + }, + "eslint-plugin-react-refresh": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", + "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", "dev": true }, "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "estraverse": "^5.2.0" } }, "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "esrecurse": { @@ -11039,20 +13198,12 @@ "dev": true, "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -11083,6 +13234,19 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + } + }, "fast-json-patch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", @@ -11100,6 +13264,15 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "fault": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", @@ -11135,13 +13308,19 @@ "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz", "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==" }, + "fdir": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz", + "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==", + "dev": true + }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "filename-reserved-regex": { @@ -11202,20 +13381,20 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true }, "flux": { @@ -11233,12 +13412,12 @@ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", "dev": true, "requires": { - "is-callable": "^1.1.3" + "is-callable": "^1.2.7" } }, "form-data": { @@ -11291,23 +13470,19 @@ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -11326,15 +13501,20 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "requires": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" } }, "get-own-enumerable-keys": { @@ -11342,14 +13522,33 @@ "resolved": "https://registry.npmjs.org/get-own-enumerable-keys/-/get-own-enumerable-keys-1.0.0.tgz", "integrity": "sha512-PKsK2FSrQCyxcGHsGrLDcK0lx+0Ke+6e8KFFozA9/fIQLhQzPaRvJFdcz7+Axg3jUH/Mq+NI4xa5u/UT2tQskA==" }, + "get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "requires": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + } + }, "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "requires": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + } + }, + "get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "resolve-pkg-maps": "^1.0.0" } }, "gh-pages": { @@ -11402,12 +13601,13 @@ "dev": true }, "globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "requires": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" } }, "globby": { @@ -11424,12 +13624,9 @@ } }, "gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "requires": { - "get-intrinsic": "^1.1.3" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" }, "graceful-fs": { "version": "4.2.11", @@ -11437,16 +13634,16 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", "dev": true }, "has-flag": { @@ -11458,33 +13655,38 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, "requires": { "es-define-property": "^1.0.0" } }, "has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "requires": { + "dunder-proto": "^1.0.0" + } }, "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" }, "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" } }, "hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "requires": { "function-bind": "^1.1.2" } @@ -11534,12 +13736,6 @@ } } }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, "htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", @@ -11563,9 +13759,9 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, "immutability-helper": { @@ -11615,14 +13811,14 @@ "optional": true }, "internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "dev": true, "requires": { - "get-intrinsic": "^1.2.2", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" } }, "invariant": { @@ -11648,14 +13844,14 @@ } }, "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" } }, "is-arrayish": { @@ -11663,13 +13859,26 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" }, + "is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "requires": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + } + }, "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "dev": true, "requires": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" } }, "is-binary-path": { @@ -11682,13 +13891,30 @@ } }, "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "requires": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + } + }, + "is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "semver": "^7.7.1" + }, + "dependencies": { + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } } }, "is-callable": { @@ -11698,20 +13924,32 @@ "dev": true }, "is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "requires": { + "hasown": "^2.0.2" + } + }, + "is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, "requires": { - "hasown": "^2.0.0" + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" } }, "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "dev": true, "requires": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" } }, "is-decimal": { @@ -11725,11 +13963,26 @@ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true + "is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "requires": { + "call-bound": "^1.0.3" + } + }, + "is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "dev": true, + "requires": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + } }, "is-glob": { "version": "4.0.3", @@ -11750,10 +14003,16 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" }, + "is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true + }, "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true }, "is-number": { @@ -11763,12 +14022,13 @@ "dev": true }, "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "dev": true, "requires": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" } }, "is-obj": { @@ -11776,19 +14036,27 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-3.0.0.tgz", "integrity": "sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ==" }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" }, "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" } }, "is-regexp": { @@ -11796,49 +14064,74 @@ "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-3.1.0.tgz", "integrity": "sha512-rbku49cWloU5bSMI+zaRaXdQHXnthP6DZ/vLnfdSKyL4zUzuWnomtOEiZZOd+ioQ+avFo/qau3KPTc7Fjy1uPA==" }, + "is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true + }, "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3" } }, "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "dev": true, "requires": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" } }, "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" } }, "is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", "dev": true, "requires": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.16" } }, + "is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true + }, "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "requires": { + "call-bound": "^1.0.3" + } + }, + "is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" } }, "isarray": { @@ -11852,6 +14145,20 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "iterator.prototype": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", + "dev": true, + "requires": { + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + } + }, "js-file-download": { "version": "0.4.12", "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", @@ -11863,13 +14170,18 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + } } }, "jsesc": { @@ -11907,6 +14219,12 @@ } } }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -12037,10 +14355,19 @@ "object.values": "^1.1.6" } }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, "language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", "dev": true }, "language-tags": { @@ -12067,29 +14394,6 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - } - } - }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -12178,11 +14482,32 @@ "prop-types": "^15.6.1" } }, + "math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" + }, "memoize-one": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "requires": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + } + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -12233,15 +14558,6 @@ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "devOptional": true }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, "mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", @@ -12277,6 +14593,12 @@ "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "optional": true }, + "napi-postinstall": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.2.4.tgz", + "integrity": "sha512-ZEzHJwBhZ8qQSbknHqYcdtQVr8zUgGyM/q6h6qAyhtyVMNrSgDhrC4disf03dYW0e+czXyLnZINnCTEkWy0eJg==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -12333,26 +14655,6 @@ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - } - } - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -12365,9 +14667,9 @@ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==" }, "object-keys": { "version": "1.1.1", @@ -12376,48 +14678,64 @@ "dev": true }, "object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", "dev": true, "requires": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", "object-keys": "^1.1.1" } }, "object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", + "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.1" } }, "object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + } + }, + "object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" } }, "object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" } }, "once": { @@ -12445,17 +14763,28 @@ } }, "optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "requires": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + } + }, + "own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" } }, "p-limit": { @@ -12596,6 +14925,12 @@ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz", "integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA==" }, + "possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true + }, "postcss": { "version": "8.4.33", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", @@ -12633,6 +14968,12 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true + }, "prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", @@ -12643,12 +14984,6 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -12721,6 +15056,12 @@ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "ramda": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.30.1.tgz", @@ -12978,119 +15319,36 @@ } }, "react-syntax-highlighter": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", - "integrity": "sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==", - "requires": { - "@babel/runtime": "^7.3.1", - "highlight.js": "^10.4.1", - "lowlight": "^1.17.0", - "prismjs": "^1.27.0", - "refractor": "^3.6.0" - } - }, - "react-textarea-autosize": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", - "integrity": "sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==", - "requires": { - "@babel/runtime": "^7.20.13", - "use-composed-ref": "^1.3.0", - "use-latest": "^1.2.1" - } - }, - "react-transition-group": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", - "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", - "requires": { - "@babel/runtime": "^7.5.5", - "dom-helpers": "^5.0.1", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2" - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - } + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz", + "integrity": "sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg==", + "requires": { + "@babel/runtime": "^7.3.1", + "highlight.js": "^10.4.1", + "lowlight": "^1.17.0", + "prismjs": "^1.27.0", + "refractor": "^3.6.0" + } + }, + "react-textarea-autosize": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", + "integrity": "sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==", + "requires": { + "@babel/runtime": "^7.20.13", + "use-composed-ref": "^1.3.0", + "use-latest": "^1.2.1" + } + }, + "react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "requires": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" } }, "readable-stream": { @@ -13148,6 +15406,22 @@ "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==" }, + "reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "requires": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + } + }, "refractor": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", @@ -13171,22 +15445,19 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "remarkable": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", @@ -13236,15 +15507,27 @@ "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true + }, "ret": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==" }, + "reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true + }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -13259,15 +15542,25 @@ "fsevents": "~2.3.2" } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", "isarray": "^2.0.5" }, "dependencies": { @@ -13284,15 +15577,33 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, - "safe-regex-test": { + "safe-push-apply": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "requires": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" } }, "sass": { @@ -13327,19 +15638,13 @@ "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", "requires": { "type-fest": "^0.20.2" - }, - "dependencies": { - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" - } } }, "set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, "requires": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -13350,14 +15655,26 @@ } }, "set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "requires": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" + } + }, + "set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "requires": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" } }, "setimmediate": { @@ -13395,14 +15712,47 @@ "integrity": "sha512-cMGfwNyfDZ/nzJ2k2M+ClthBIh//GlZl1JEf47Uoa9XR11bz8Pa2T2wQO4bVrRdH48LrIDWJahQziKo3MjhsWg==" }, "side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "requires": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + } + }, + "side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "requires": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + } + }, + "side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "requires": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + } + }, + "side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "requires": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" } }, "simple-concat": { @@ -13422,16 +15772,11 @@ "simple-concat": "^1.0.0" } }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - } + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true }, "source-map": { "version": "0.5.7", @@ -13449,130 +15794,110 @@ "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==" }, - "spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "stable-hash": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", + "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", "dev": true }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" } }, - "spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" - }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "string.prototype.includes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", + "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3" } }, "string.prototype.matchall": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", - "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", + "dev": true, + "requires": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" + } + }, + "string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "regexp.prototype.flags": "^1.5.0", - "set-function-name": "^2.0.0", - "side-channel": "^1.0.4" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, "string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" } }, "string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" } }, "string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" } }, "stringify-object": { @@ -13656,23 +15981,10 @@ "traverse": "=0.6.8" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, "cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } } } }, @@ -13716,24 +16028,11 @@ "zenscroll": "^4.0.2" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, "immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", "integrity": "sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg==" }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, "react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", @@ -13759,18 +16058,6 @@ } } }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - } - }, "tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -13834,6 +16121,24 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "requires": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "dependencies": { + "picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true + } + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -13900,6 +16205,12 @@ "escape-string-regexp": "^1.0.2" } }, + "ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true + }, "ts-mixer": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", @@ -13957,56 +16268,61 @@ } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" }, "typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" } }, "typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" } }, "typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" } }, "typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" } }, "types-ramda": { @@ -14023,15 +16339,15 @@ "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==" }, "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", "dev": true, "requires": { - "call-bind": "^1.0.2", + "call-bound": "^1.0.3", "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" } }, "universal-cookie": { @@ -14054,6 +16370,32 @@ "resolved": "https://registry.npmjs.org/unraw/-/unraw-3.0.0.tgz", "integrity": "sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==" }, + "unrs-resolver": { + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.7.12.tgz", + "integrity": "sha512-pfcdDxrVoUc5ZB3VCVJNSWbs63lgQVYLVw4k/rCr8Smi/V2Sxi1odEckVq6Zf803OtbYia1+YpiGCZoODfWLsQ==", + "dev": true, + "requires": { + "@unrs/resolver-binding-darwin-arm64": "1.7.12", + "@unrs/resolver-binding-darwin-x64": "1.7.12", + "@unrs/resolver-binding-freebsd-x64": "1.7.12", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.12", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.7.12", + "@unrs/resolver-binding-linux-arm64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-arm64-musl": "1.7.12", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-riscv64-musl": "1.7.12", + "@unrs/resolver-binding-linux-s390x-gnu": "1.7.12", + "@unrs/resolver-binding-linux-x64-gnu": "1.7.12", + "@unrs/resolver-binding-linux-x64-musl": "1.7.12", + "@unrs/resolver-binding-wasm32-wasi": "1.7.12", + "@unrs/resolver-binding-win32-arm64-msvc": "1.7.12", + "@unrs/resolver-binding-win32-ia32-msvc": "1.7.12", + "@unrs/resolver-binding-win32-x64-msvc": "1.7.12", + "napi-postinstall": "^0.2.2" + } + }, "update-browserslist-db": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", @@ -14116,22 +16458,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "optional": true }, - "v8-compile-cache": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", - "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", @@ -14184,31 +16510,80 @@ } }, "which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "requires": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + } + }, + "which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "requires": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "which-collection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" } }, "which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" } }, + "word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -14267,15 +16642,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", @@ -14351,6 +16717,12 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + }, "zenscroll": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", diff --git a/package.json b/package.json index fb580b75..afeb86d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vidispine/admin-tool", - "version": "25.1.0", + "version": "25.2.0", "private": true, "dependencies": { "@devbookhq/splitter": "^1.3.2", @@ -55,30 +55,38 @@ "postbuild": "cp build/index.html build/404.html", "gh-pages-clean": "gh-pages-clean", "gh-pages": "gh-pages", - "predocker:buildx": "GENERATE_SOURCEMAP=false npm run build", - "predocker:buildx:push": "GENERATE_SOURCEMAP=false npm run build", - "docker:buildx": "docker buildx build --build-arg PUBLIC_URL --platform=linux/amd64,linux/arm64 -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" .", - "docker:buildx:push": "docker buildx build --platform=linux/amd64,linux/arm64 --build-arg PUBLIC_URL -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" --push .", + "predocker:buildx": "npm run build", + "predocker:buildx:push": "npm run build", + "docker:buildx": "docker buildx build --build-arg BASE_URL --platform=linux/amd64,linux/arm64 -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" .", + "docker:buildx:push": "docker buildx build --platform=linux/amd64,linux/arm64 --build-arg BASE_URL -t \"${npm_package_name:1}:latest\" -t \"${npm_package_name:1}:${npm_package_version}\" --push .", "docker:push": "docker push \"${npm_package_name:1}:${npm_package_version}\" && docker push \"${npm_package_name:1}:latest\"", - "docker:run": "docker run --name \"${npm_package_name/@vidispine\\//vidispine_}\" --rm -dti -e VIDISPINE_URL=$VIDISPINE_URL -e NGINX_RESOLVER=1.1.1.1 -p 80:80 \"${npm_package_name:1}:${npm_package_version}\"", - "docker:stop": "docker stop \"${npm_package_name/@vidispine\\//vidispine_}\"" + "docker:run": "docker run --name \"${npm_package_name/@vidispine\\//vidispine_}\" --rm -dti -e VIDISPINE_URL=$VIDISPINE_URL -e NGINX_RESOLVER=1.1.1.1 -e CONTAINER_PROXY=$CONTAINER_PROXY -p 80:80 \"${npm_package_name:1}:${npm_package_version}\"", + "docker:stop": "docker stop \"${npm_package_name/@vidispine\\//vidispine_}\"", + "prettier:check": "prettier . --check", + "prettier:write": "prettier . --write", + "lint:check": "eslint . --cache --max-warnings=0 --ext .js,.jsx", + "lint:fix": "eslint . --fix --cache --max-warnings=0 --ext .js,.jsx" }, "devDependencies": { + "@vidispine/eslint-config-react": "24.3.0", + "@vidispine/prettier-config": "24.4.0-pre.1", "@vitejs/plugin-react": "^4.0.4", - "eslint": "7.11.0", - "eslint-config-airbnb": "18.2.1", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-jsx-a11y": "6.4.1", - "eslint-plugin-react": "7.21.5", - "eslint-plugin-react-hooks": "1.7.0", + "eslint": "8.57.1", "gh-pages": "6.1.1", + "prettier": "3.5.3", "sass": "^1.64.2", "vite": "4.5.5" }, - "browserslist": [ - ">0.2%", - "not dead", - "not ie <= 11", - "not op_mini all" - ] -} + "prettier": "@vidispine/prettier-config", + "eslintConfig": { + "parserOptions": { + "ecmaVersion": 2024 + }, + "extends": [ + "@vidispine/eslint-config-react" + ], + "rules": { + "react-refresh/only-export-components": "off" + } + } +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico index 1e7b7cf7..c1852d26 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/src/actions/index.js b/src/actions/index.js index 5839f17a..dbfa4c8f 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -1,5 +1,3 @@ import * as ui from './ui'; -export { - ui, -}; +export { ui }; diff --git a/src/actions/ui.js b/src/actions/ui.js index 8219a657..a4d6ba9c 100644 --- a/src/actions/ui.js +++ b/src/actions/ui.js @@ -6,9 +6,9 @@ export const SNACKBAR_RECEIVE = 'SNACKBAR_RECEIVE'; export const LOADING_RECEIVE = 'LOADING_RECEIVE'; export function closeModal() { - return ({ + return { type: MODAL_RESET, - }); + }; } export function openModal({ modalName, ...props }) { @@ -40,14 +40,14 @@ export function toggleMainMenu() { } export function closeSnackBar() { - return ({ + return { type: SNACKBAR_RESET, - }); + }; } export function openSnackBar({ ...props }) { - return ({ + return { type: SNACKBAR_RECEIVE, ...props, - }); + }; } diff --git a/src/assets/header-logo.svg b/src/assets/header-logo.svg index cef379fd..c4587739 100644 --- a/src/assets/header-logo.svg +++ b/src/assets/header-logo.svg @@ -1 +1,17 @@ -Vidispine-icon-RGB \ No newline at end of file + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/logo.svg b/src/assets/logo.svg index b323fab0..399ec2eb 100644 --- a/src/assets/logo.svg +++ b/src/assets/logo.svg @@ -1 +1 @@ -Vidispine-stacked-RGB \ No newline at end of file + \ No newline at end of file diff --git a/src/components/access/AccessControlCard.jsx b/src/components/access/AccessControlCard.jsx index 2390fa59..905f0b5c 100644 --- a/src/components/access/AccessControlCard.jsx +++ b/src/components/access/AccessControlCard.jsx @@ -1,7 +1,7 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import AccessControlEditor from './AccessControlEditor'; export default function AccessControlCard({ diff --git a/src/components/access/AccessControlDialog.jsx b/src/components/access/AccessControlDialog.jsx index 7ac7feb7..403a8373 100644 --- a/src/components/access/AccessControlDialog.jsx +++ b/src/components/access/AccessControlDialog.jsx @@ -1,17 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import AccessControlForm from './AccessControlForm'; import * as formActions from '../../formactions/access'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import AccessControlForm from './AccessControlForm'; + const EDIT_ACCESSCONTROL_FORM = 'EDIT_ACCESSCONTROL_FORM'; function AccessControlDialog({ @@ -54,18 +54,10 @@ function AccessControlDialog({ - - @@ -73,4 +65,9 @@ function AccessControlDialog({ ); } -export default compose(withUI, withFormActions)(AccessControlDialog); +const AccessControlDialogWithUiWithFormActions = compose( + withUI, + withFormActions, +)(AccessControlDialog); + +export default AccessControlDialogWithUiWithFormActions; diff --git a/src/components/access/AccessControlDisplay.jsx b/src/components/access/AccessControlDisplay.jsx index 76407388..347b4b81 100644 --- a/src/components/access/AccessControlDisplay.jsx +++ b/src/components/access/AccessControlDisplay.jsx @@ -1,44 +1,39 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -const AccessControlUriType = ({ uri }) => ( - -); - -const AccessControlShapeType = ({ shape }) => ( - -); +function AccessControlUriType({ uri }) { + return ; +} -const AccessControlMetadataType = ({ metadata }) => ( - -); +function AccessControlShapeType({ shape }) { + return ; +} -export const AccessControlType = ({ access }) => ( - <> - { access.user - && } - { access.group - && } - - - - - { (access.operation && access.operation.uri) - && } - { (access.operation && access.operation.shape) - && } - { (access.operation && access.operation.metadata) - && } - -); +function AccessControlMetadataType({ metadata }) { + return ; +} -export default function AccessControlDisplay({ - accessControlDocument, -}) { +export function AccessControlType({ access }) { return ( - + <> + {access.user && } + {access.group && } + + + + + {access.operation && access.operation.uri && ( + + )} + {access.operation && access.operation.shape && ( + + )} + {access.operation && access.operation.metadata && ( + + )} + ); } + +export default function AccessControlDisplay({ accessControlDocument }) { + return ; +} diff --git a/src/components/access/AccessControlEditor.jsx b/src/components/access/AccessControlEditor.jsx index dfcf7a5b..e7327310 100644 --- a/src/components/access/AccessControlEditor.jsx +++ b/src/components/access/AccessControlEditor.jsx @@ -1,6 +1,5 @@ -import React from 'react'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; import IconButton from '@material-ui/core/IconButton'; import Delete from '@material-ui/icons/Delete'; @@ -23,10 +22,7 @@ export default function AccessControlEditor({ } return ( <> - + ( - -); - -export const AccessControlShapeType = () => ( - -); - -export const AccessControlUriType = () => ( - -); - -const AccessControlType = () => ( - <> +export function AccessControlMetadataType() { + return ( - - Permission - - Read - Write - All - Owner - None - - - - - )} - label="Recursive" + ); +} + +export function AccessControlShapeType() { + return ( + - -); + ); +} -const AccessControlQueryParams = () => ( - ; +} + +function AccessControlType() { + return ( + <> + + + Permission + + Read + Write + All + Owner + None + + + + } + label="Recursive" /> - )} - label="Allow Duplicate" - /> -); + + ); +} -function AccessControlForm({ - error, - handleSubmit, -}) { +function AccessControlQueryParams() { + return ( + } + label="Allow Duplicate" + /> + ); +} + +function AccessControlForm({ error, handleSubmit }) { return (
{error && {error}} @@ -109,21 +87,9 @@ function AccessControlForm({ label="Entity" fullWidth choices={{ - user: ( - - ), + user: , group: ( - + ), }} > @@ -160,17 +126,13 @@ function AccessControlForm({ Shape URI - - + + - diff --git a/src/components/access/AccessGraphDisplay.jsx b/src/components/access/AccessGraphDisplay.jsx index f894950a..6f16dd73 100644 --- a/src/components/access/AccessGraphDisplay.jsx +++ b/src/components/access/AccessGraphDisplay.jsx @@ -1,5 +1,5 @@ -import React from 'react'; import { withStyles } from '@material-ui/core/styles'; + import GraphViz from '../ui/GraphViz'; import ImgExpandButton from '../ui/ImgExpandButton'; @@ -10,14 +10,10 @@ const styles = () => ({ }, }); -function AccessGraphDisplay({ - classes, useGraphViz, graphDot, graphImage, -}) { +function AccessGraphDisplay({ classes, useGraphViz, graphDot, graphImage }) { return ( <> - {useGraphViz && graphDot ? ( - - ) : null} + {useGraphViz && graphDot ? : null} {useGraphViz === false && graphImage ? (
diff --git a/src/components/access/AccessGraphParams.jsx b/src/components/access/AccessGraphParams.jsx index df7e9e0e..077d061c 100644 --- a/src/components/access/AccessGraphParams.jsx +++ b/src/components/access/AccessGraphParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import AccessGraphParamsForm from './AccessGraphParamsForm'; +import * as formActions from '../../formactions/access'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/access'; + +import AccessGraphParamsForm from './AccessGraphParamsForm'; export const FORM_NAME = 'ACCESS_GRAPH_PARAMS_FORM'; diff --git a/src/components/access/AccessGraphParamsForm.jsx b/src/components/access/AccessGraphParamsForm.jsx index fa42a342..5ff0ff6c 100644 --- a/src/components/access/AccessGraphParamsForm.jsx +++ b/src/components/access/AccessGraphParamsForm.jsx @@ -1,13 +1,12 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { Select } from '../form'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; export const queryParams = () => ( <> @@ -39,11 +38,7 @@ function AccessGraphParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/analyzepreset/AnalyzePresetCard.jsx b/src/components/analyzepreset/AnalyzePresetCard.jsx index 0f5b5295..f507e74b 100644 --- a/src/components/analyzepreset/AnalyzePresetCard.jsx +++ b/src/components/analyzepreset/AnalyzePresetCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import Card from '@material-ui/core/Card'; + import AnalyzePresetEditor from './AnalyzePresetEditor'; export default function AnalyzePresetCard(props) { return ( - + ); } diff --git a/src/components/analyzepreset/AnalyzePresetDialog.jsx b/src/components/analyzepreset/AnalyzePresetDialog.jsx index a66fa4db..0858738e 100644 --- a/src/components/analyzepreset/AnalyzePresetDialog.jsx +++ b/src/components/analyzepreset/AnalyzePresetDialog.jsx @@ -1,20 +1,14 @@ -import React from 'react'; +import Dialog from '@material-ui/core/Dialog'; import DialogTitle from '@material-ui/core/DialogTitle'; -import Dialog from '@material-ui/core/Dialog'; -import AnalyzePresetForm from './AnalyzePresetForm'; import * as formActions from '../../formactions/analyzepreset'; -import WizardForm from '../ui/WizardForm'; import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import WizardForm from '../ui/WizardForm'; + +import AnalyzePresetForm from './AnalyzePresetForm'; -function AnalyzePresetDialog({ - open, - onClose, - openSnackBar, - onSuccess, - onFail, -}) { +function AnalyzePresetDialog({ open, onClose, openSnackBar, onSuccess, onFail }) { const onSubmitSuccess = (response) => { const { preset } = response; const messageContent = `Analyze Preset ${preset} Created`; @@ -28,12 +22,7 @@ function AnalyzePresetDialog({ if (onFail) onFail(error); }; return ( - + New Analyze Preset { switch (key) { @@ -13,40 +11,19 @@ const setVariant = (key) => { } }; -const KeyValueType = ({ value = {} }) => ( - <> - - -); - -const AnalyzePresetType = ({ value = {} }) => ( - <> - - - -); +function KeyValueType({ value = {} }) { + return ; +} -export default function AnalyzePresetDisplay({ - analyzePresetDocument, -}) { +function AnalyzePresetType({ value = {} }) { return ( <> - + + ); } + +export default function AnalyzePresetDisplay({ analyzePresetDocument }) { + return ; +} diff --git a/src/components/analyzepreset/AnalyzePresetEditor.jsx b/src/components/analyzepreset/AnalyzePresetEditor.jsx index 5ae28f7b..4e476c06 100644 --- a/src/components/analyzepreset/AnalyzePresetEditor.jsx +++ b/src/components/analyzepreset/AnalyzePresetEditor.jsx @@ -1,30 +1,26 @@ -import React from 'react'; - import * as formActions from '../../formactions/analyzepreset'; +import withUI from '../../hoc/withUI'; +import Editor from '../ui/Editor'; + import AnalyzePresetDisplay from './AnalyzePresetDisplay'; import AnalyzePresetForm from './AnalyzePresetForm'; -import Editor from '../ui/Editor'; -import withUI from '../../hoc/withUI'; - const EDIT_ANALYZEPRESET_FORM = 'EDIT_ANALYZEPRESET_FORM'; -function AnalyzePresetEditor({ - analyzePresetDocument, - preset, - openSnackBar, - onSuccess, - onFail, -}) { +function AnalyzePresetEditor({ analyzePresetDocument, preset, openSnackBar, onSuccess, onFail }) { const onSubmitSuccess = () => { const messageContent = 'Analyze Preset Saved'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Analyze Preset'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(); } + if (onFail) { + onFail(); + } }; return ( ( - <> - - - -); +function KeyValueType() { + return ( + <> + + + + ); +} -const AnalyzePresetType = () => ( - <> - - - -); +function AnalyzePresetType() { + return ( + <> + + + + ); +} -const AnalyzePresetForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - diff --git a/src/components/analyzepreset/AnalyzePresetListParamsForm.jsx b/src/components/analyzepreset/AnalyzePresetListParamsForm.jsx index d3f25935..49ee7815 100644 --- a/src/components/analyzepreset/AnalyzePresetListParamsForm.jsx +++ b/src/components/analyzepreset/AnalyzePresetListParamsForm.jsx @@ -1,35 +1,23 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; import BoolCheckbox from '../ui/BoolCheckbox'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( - )} + control={} label="Include Document" /> ); -function AnalyzePresetListParamsForm({ - error, - handleSubmit, -}) { +function AnalyzePresetListParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/autoimport/AutoImportRuleRow.jsx b/src/components/autoimport/AutoImportRuleRow.jsx index fe44c7f3..b9300284 100644 --- a/src/components/autoimport/AutoImportRuleRow.jsx +++ b/src/components/autoimport/AutoImportRuleRow.jsx @@ -1,16 +1,12 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; + import TableRowLink from '../ui/TableRowLink'; -export default function AutoImportRuleRow({ - autoImportRule, -}) { +export default function AutoImportRuleRow({ autoImportRule }) { const { storage: storageId } = autoImportRule; return ( - - {storageId} - + {storageId} ); diff --git a/src/components/autoimport/AutoImportRuleTitle.jsx b/src/components/autoimport/AutoImportRuleTitle.jsx index 7d08813f..f58fd4f8 100644 --- a/src/components/autoimport/AutoImportRuleTitle.jsx +++ b/src/components/autoimport/AutoImportRuleTitle.jsx @@ -1,11 +1,6 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; -export default function AutoImportRuleTitle({ - storageId, - ...props -}) { +export default function AutoImportRuleTitle({ storageId, ...props }) { return ( ( - <> - - -); - -export const BulkyMetadataMap = ({ value = {} }) => ( - <> - - -); +export function BulkyMetadataEntry({ value = {} }) { + return ; +} -export const BulkyMetadataMaps = ({ value = {} }) => ( - <> - - -); +export function BulkyMetadataMap({ value = {} }) { + return ; +} -export const BulkyMetadataType = ({ value }) => ( -
- {value.value && ( - - )} - {value.maps && ( - - )} -
-); +export function BulkyMetadataMaps({ value = {} }) { + return ; +} -export default function BulkyMetadataDisplay({ - bulkyMetadataDocument, -}) { - const { field = [] } = bulkyMetadataDocument; +export function BulkyMetadataType({ value }) { return ( - <> - - +
+ {value.value && ( + + )} + {value.maps && ( + + )} +
); } + +export default function BulkyMetadataDisplay({ bulkyMetadataDocument }) { + const { field = [] } = bulkyMetadataDocument; + return ; +} diff --git a/src/components/bulkymetadata/BulkyMetadataDownloadDialog.jsx b/src/components/bulkymetadata/BulkyMetadataDownloadDialog.jsx index 5b209de2..b46c03e3 100644 --- a/src/components/bulkymetadata/BulkyMetadataDownloadDialog.jsx +++ b/src/components/bulkymetadata/BulkyMetadataDownloadDialog.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/bulkymetadata'; -import BulkyMetadataDownloadForm from './BulkyMetadataDownloadForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; -import DialogContent from '../ui/DialogContent'; +import withUI from '../../hoc/withUI'; import downloadFile from '../../utils/downloadFile'; +import DialogContent from '../ui/DialogContent'; + +import BulkyMetadataDownloadForm from './BulkyMetadataDownloadForm'; const BULKYMETADATA_DOWNLOAD_FORM = 'BULKYMETADATA_DOWNLOAD_FORM'; @@ -48,21 +47,20 @@ function BulkyMetadataDownloadDialog({ const { data, headers } = response; const fileName = filenameFromHeaders(headers) || bulkyMetadataKey; downloadFile({ data, fileName }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Starting Download'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + {`Download ${bulkyMetadataKey}`} - - diff --git a/src/components/bulkymetadata/BulkyMetadataDownloadForm.jsx b/src/components/bulkymetadata/BulkyMetadataDownloadForm.jsx index e6498539..7bc32901 100644 --- a/src/components/bulkymetadata/BulkyMetadataDownloadForm.jsx +++ b/src/components/bulkymetadata/BulkyMetadataDownloadForm.jsx @@ -1,83 +1,31 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; -import { required } from '../../utils/FieldValidation'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - - - - - - + + + + + + ); -function BulkyMetadataDownloadForm({ - error, - handleSubmit, - itemId, - bulkyMetadataKey, -}) { +function BulkyMetadataDownloadForm({ error, handleSubmit, itemId, bulkyMetadataKey }) { return (
{error && {error}} - {!itemId && ( - - )} + {!itemId && } {!bulkyMetadataKey && ( - + )} - + - diff --git a/src/components/collection/CollectionEntityAdd.jsx b/src/components/collection/CollectionEntityAdd.jsx index 1a3ddfab..d974c4ec 100644 --- a/src/components/collection/CollectionEntityAdd.jsx +++ b/src/components/collection/CollectionEntityAdd.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import CollectionEntityAddForm from './CollectionEntityAddForm'; import * as formActions from '../../formactions/collection'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import CollectionEntityAddForm from './CollectionEntityAddForm'; + export const COLLECTION_ENTITY_ADD_FORM = 'COLLECTION_ENTITY_ADD_FORM'; function CollectionEntityAdd({ @@ -29,13 +28,17 @@ function CollectionEntityAdd({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Collection Entity Added'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Adding Collection Entity'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -53,18 +56,10 @@ function CollectionEntityAdd({
- - diff --git a/src/components/collection/CollectionEntityAddForm.jsx b/src/components/collection/CollectionEntityAddForm.jsx index 013c15af..43333e96 100644 --- a/src/components/collection/CollectionEntityAddForm.jsx +++ b/src/components/collection/CollectionEntityAddForm.jsx @@ -1,39 +1,30 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import MenuItem from '@material-ui/core/MenuItem'; -import InputLabel from '@material-ui/core/InputLabel'; import Grid from '@material-ui/core/Grid'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; -const KeyValueType = () => ( - - - - - - +function KeyValueType() { + return ( + + + + + + + - -); + ); +} const queryParams = () => ( <> @@ -46,12 +37,7 @@ const queryParams = () => (
- )} + control={} label="Add Items" /> ( ); -function CollectionEntityAddForm({ - error, - handleSubmit, - collectionId, - entityId, - initialValues, -}) { +function CollectionEntityAddForm({ error, handleSubmit, collectionId, entityId, initialValues }) { return (
{error && {error}} {!collectionId && ( - - )} - {!entityId && ( - + )} - + {!entityId && } + - diff --git a/src/components/collection/CollectionExportForm.jsx b/src/components/collection/CollectionExportForm.jsx index 2aa4996b..3a673c53 100644 --- a/src/components/collection/CollectionExportForm.jsx +++ b/src/components/collection/CollectionExportForm.jsx @@ -1,31 +1,26 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import { required } from '../../utils/FieldValidation'; import { loadExportLocationOptions } from '../exportlocation/ExportLocationSelect'; +import { TextField, Select } from '../form'; import { loadProjectionOptions } from '../projection/ProjectionSelect'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + control={} label="Metadata Sidecar" /> ( isClearable fullWidth /> - + ( dense /> - )} + control={} label="Use Original Filename" /> - )} + control={} label="Use Original Component Filename" /> ( isClearable fullWidth /> - - + + - )} + control={} label="Allow Missing" /> - - - + + + ); -function CollectionExportForm({ - error, - handleSubmit, - collectionId, -}) { +function CollectionExportForm({ error, handleSubmit, collectionId }) { return (
{error && {error}} {!collectionId && ( - + )} - + - {{ - false: ( - - ), - true: ( - - ), - }[isFolderMapped]} + { + { + false: ( + + ), + true: ( + + ), + }[isFolderMapped] + }
); diff --git a/src/components/collection/CollectionFolderMapUpdateForm.jsx b/src/components/collection/CollectionFolderMapUpdateForm.jsx index f7b91d6d..87381611 100644 --- a/src/components/collection/CollectionFolderMapUpdateForm.jsx +++ b/src/components/collection/CollectionFolderMapUpdateForm.jsx @@ -1,44 +1,29 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import { required } from '../../utils/FieldValidation'; +import { TextField } from '../form'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( - <> - - + ); -function CollectionFolderMapUpdateForm({ - error, - handleSubmit, - collectionId, -}) { +function CollectionFolderMapUpdateForm({ error, handleSubmit, collectionId }) { return (
{error && {error}} {!collectionId && ( - + )} - + - diff --git a/src/components/collection/CollectionRename.jsx b/src/components/collection/CollectionRename.jsx index 4a019dfb..21d41f7f 100644 --- a/src/components/collection/CollectionRename.jsx +++ b/src/components/collection/CollectionRename.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import CollectionRenameForm from './CollectionRenameForm'; import * as formActions from '../../formactions/collection'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import CollectionRenameForm from './CollectionRenameForm'; + export const COLLECTION_RENAME_FORM = 'COLLECTION_RENAME_FORM'; function CollectionRename({ @@ -28,13 +27,17 @@ function CollectionRename({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Collection Name Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Collection Name'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; const { name } = collectionDocument; const initialValues = { queryParams: { name } }; @@ -53,18 +56,10 @@ function CollectionRename({ - - diff --git a/src/components/collection/CollectionRenameForm.jsx b/src/components/collection/CollectionRenameForm.jsx index d8c1b51d..4a5b6ff3 100644 --- a/src/components/collection/CollectionRenameForm.jsx +++ b/src/components/collection/CollectionRenameForm.jsx @@ -1,30 +1,17 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; -const queryParams = () => ( - -); +const queryParams = () => ; -function CollectionContentParamsForm({ - error, - handleSubmit, -}) { +function CollectionContentParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/collection/CollectionSearchParams.jsx b/src/components/collection/CollectionSearchParams.jsx index 4ff0e400..60d60df1 100644 --- a/src/components/collection/CollectionSearchParams.jsx +++ b/src/components/collection/CollectionSearchParams.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import Accordion from '@material-ui/core/Accordion'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import { compose } from 'redux'; -import CollectionSearchParamsForm from './CollectionSearchParamsForm'; +import * as formActions from '../../formactions/collection'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/collection'; + +import CollectionSearchParamsForm from './CollectionSearchParamsForm'; export const COLLECTION_SEARCH_PARAMS_FORM = 'COLLECTION_SEARCH_PARAMS_FORM'; @@ -30,19 +29,22 @@ function CollectionSearchParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching Collections'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Collection Search Params @@ -59,17 +61,10 @@ function CollectionSearchParams({ - - diff --git a/src/components/collection/CollectionSearchParamsForm.jsx b/src/components/collection/CollectionSearchParamsForm.jsx index 918bd531..b0b035c4 100644 --- a/src/components/collection/CollectionSearchParamsForm.jsx +++ b/src/components/collection/CollectionSearchParamsForm.jsx @@ -1,55 +1,28 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; + import { queryParams as contentQueryParams } from './CollectionContentParamsForm'; const queryParams = () => ( <> - - )} - label="Count" - /> - - + } label="Count" /> + + ); -function CollectionSearchParamsForm({ - error, - handleSubmit, -}) { +function CollectionSearchParamsForm({ error, handleSubmit }) { return (
{error && {error}} - - + + - diff --git a/src/components/configuration/bulkymetadata/BulkyMetadataCard.jsx b/src/components/configuration/bulkymetadata/BulkyMetadataCard.jsx index fb31f4f7..53a85d60 100644 --- a/src/components/configuration/bulkymetadata/BulkyMetadataCard.jsx +++ b/src/components/configuration/bulkymetadata/BulkyMetadataCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../../ui/SquareCard'; + import BulkyMetadataEditor from './BulkyMetadataEditor'; export default function BulkyMetadataCard(props) { return ( - + ); } diff --git a/src/components/configuration/bulkymetadata/BulkyMetadataDisplay.jsx b/src/components/configuration/bulkymetadata/BulkyMetadataDisplay.jsx index ca025fa6..a71e0dd7 100644 --- a/src/components/configuration/bulkymetadata/BulkyMetadataDisplay.jsx +++ b/src/components/configuration/bulkymetadata/BulkyMetadataDisplay.jsx @@ -1,55 +1,33 @@ -import React from 'react'; - import TextGrid from '../../ui/TextGrid'; import TypeSection from '../../ui/TypeSection'; -const BulkyMetadataConfigurationType = ({ value = {} }) => ( - <> - - - ( - <> - - - - - )} - /> - -); - -export default function BulkyMetadataDisplay({ - bulkyMetadataConfigurationDocument, +function BulkyMetadataConfigurationStatusType({ + value: { metadataInDatabase, metadataOnStorage, storageStatus } = {}, }) { return ( <> - + + + + + ); +} + +function BulkyMetadataConfigurationType({ value = {} }) { + return ( + <> + + + ); } + +export default function BulkyMetadataDisplay({ bulkyMetadataConfigurationDocument }) { + return ( + + ); +} diff --git a/src/components/configuration/bulkymetadata/BulkyMetadataEditor.jsx b/src/components/configuration/bulkymetadata/BulkyMetadataEditor.jsx index 2a4e9793..4fd506b0 100644 --- a/src/components/configuration/bulkymetadata/BulkyMetadataEditor.jsx +++ b/src/components/configuration/bulkymetadata/BulkyMetadataEditor.jsx @@ -1,10 +1,9 @@ -import React from 'react'; - import * as formActions from '../../../formactions/configuration'; +import withSnackbar from '../../../hoc/withSnackbar'; import Editor from '../../ui/Editor'; -import BulkyMetadataForm from './BulkyMetadataForm'; + import BulkyMetadataDisplay from './BulkyMetadataDisplay'; -import withSnackbar from '../../../hoc/withSnackbar'; +import BulkyMetadataForm from './BulkyMetadataForm'; const EDIT_BULKYMETADATA_FORM = 'EDIT_BULKYMETADATA_FORM'; @@ -17,7 +16,9 @@ function BulkyMetadataEditor({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Bulky Metadata Configuration Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Bulky Metadata Configuration'; diff --git a/src/components/configuration/bulkymetadata/BulkyMetadataForm.jsx b/src/components/configuration/bulkymetadata/BulkyMetadataForm.jsx index 69b319be..4584994a 100644 --- a/src/components/configuration/bulkymetadata/BulkyMetadataForm.jsx +++ b/src/components/configuration/bulkymetadata/BulkyMetadataForm.jsx @@ -1,37 +1,25 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import FormSection from '../../ui/FormSection'; -import Field from '../../ui/Field'; import BoolCheckbox from '../../ui/BoolCheckbox'; +import Field from '../../ui/Field'; +import FormSection from '../../ui/FormSection'; import UrlField from '../../ui/UrlField'; -const BulkyMetadataConfigurationType = () => ( - <> - - - )} - label="Storage Disabled" - /> - -); +function BulkyMetadataConfigurationType() { + return ( + <> + + } + label="Storage Disabled" + /> + + ); +} -function BulkyMetadataForm({ - error, - handleSubmit, -}) { +function BulkyMetadataForm({ error, handleSubmit }) { return (
{error && {error}} diff --git a/src/components/configuration/bulkymetadata/BulkyMetadataRemove.jsx b/src/components/configuration/bulkymetadata/BulkyMetadataRemove.jsx index 8113c6c2..3814dfbe 100644 --- a/src/components/configuration/bulkymetadata/BulkyMetadataRemove.jsx +++ b/src/components/configuration/bulkymetadata/BulkyMetadataRemove.jsx @@ -1,19 +1,13 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { configuration as ConfigurationApi } from '@vidispine/vdt-api'; + import withUI from '../../../hoc/withUI'; -function BulkyMetadataRemove({ - open, - onClose, - openSnackBar, - onSuccess, - onError, -}) { +function BulkyMetadataRemove({ open, onClose, openSnackBar, onSuccess, onError }) { const onRemove = () => { ConfigurationApi.updateBulkyMetadataConfiguration({ bulkyMetadataConfigurationDocument: { uri: null }, @@ -32,19 +26,12 @@ function BulkyMetadataRemove({ }; return ( - - Remove Bulky Metadata Configuration? - + Remove Bulky Metadata Configuration? - diff --git a/src/components/configuration/cors/CorsCard.jsx b/src/components/configuration/cors/CorsCard.jsx index 1f98777c..6339da8f 100644 --- a/src/components/configuration/cors/CorsCard.jsx +++ b/src/components/configuration/cors/CorsCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../../ui/SquareCard'; + import CorsEditor from './CorsEditor'; export default function CorsCard(props) { return ( - + ); } diff --git a/src/components/configuration/cors/CorsDisplay.jsx b/src/components/configuration/cors/CorsDisplay.jsx index 95243681..fe18d27c 100644 --- a/src/components/configuration/cors/CorsDisplay.jsx +++ b/src/components/configuration/cors/CorsDisplay.jsx @@ -1,110 +1,53 @@ -import React from 'react'; - +import { KeyValuePairType } from '../../ui/DisplayType'; import TextGrid from '../../ui/TextGrid'; -import TypeSection from '../../ui/TypeSection'; import TypeArray from '../../ui/TypeArray'; -import { KeyValuePairType } from '../../ui/DisplayType'; - -const CORSConfigurationEntryRequest = ({ value = {} }) => ( - <> - - - - - - -); - -const CORSConfigurationEntryResponse = ({ value = {} }) => ( - <> - - - - - - -); +import TypeSection from '../../ui/TypeSection'; -const CORSConfigurationEntry = ({ value = {} }) => ( - <> - - - -); +function CORSConfigurationEntryRequest({ value = {} }) { + return ( + <> + + + + + + + ); +} -const CORSConfigurationType = ({ value = {} }) => ( - <> - - -); +function CORSConfigurationEntryResponse({ value = {} }) { + return ( + <> + + + + + + + ); +} -export default function CorsDisplay({ - corsConfigurationDocument, -}) { +function CORSConfigurationEntry({ value = {} }) { return ( <> + ); } + +function CORSConfigurationType({ value = {} }) { + return ; +} + +export default function CorsDisplay({ corsConfigurationDocument }) { + return ; +} diff --git a/src/components/configuration/cors/CorsEditor.jsx b/src/components/configuration/cors/CorsEditor.jsx index d258cf89..b9209a82 100644 --- a/src/components/configuration/cors/CorsEditor.jsx +++ b/src/components/configuration/cors/CorsEditor.jsx @@ -1,20 +1,18 @@ -import React from 'react'; import * as formActions from '../../../formactions/configuration'; +import withSnackbar from '../../../hoc/withSnackbar'; import Editor from '../../ui/Editor'; -import CorsForm from './CorsForm'; + import CorsDisplay from './CorsDisplay'; -import withSnackbar from '../../../hoc/withSnackbar'; +import CorsForm from './CorsForm'; -function CorsEditor({ - corsConfigurationDocument, - openSnackBar, - onSuccess, -}) { +function CorsEditor({ corsConfigurationDocument, openSnackBar, onSuccess }) { const EDIT_CORS_FORM = 'EDIT_CORS_FORM'; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'CORS Configuration Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating CORS Configuration'; diff --git a/src/components/configuration/cors/CorsForm.jsx b/src/components/configuration/cors/CorsForm.jsx index 9ab9602e..d456aee6 100644 --- a/src/components/configuration/cors/CorsForm.jsx +++ b/src/components/configuration/cors/CorsForm.jsx @@ -1,118 +1,65 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../../form'; -import FormSection from '../../ui/FormSection'; -import FieldTypeArray from '../../ui/FieldTypeArray'; -import Field from '../../ui/Field'; +import { TextField } from '../../form'; import ChipInput from '../../ui/ChipInput'; +import Field from '../../ui/Field'; +import FieldTypeArray from '../../ui/FieldTypeArray'; +import FormSection from '../../ui/FormSection'; import { KeyValuePairType } from '../../ui/FormType'; -const CORSConfigurationEntryRequest = () => ( - <> - - - - - - -); +function CORSConfigurationEntryRequest() { + return ( + <> + + + + + + + ); +} -const CORSConfigurationEntryResponse = () => ( - <> - - - - - - -); +function CORSConfigurationEntryResponse() { + return ( + <> + + + + + + + ); +} -const CORSConfigurationEntry = () => ( - <> - - - -); +function CORSConfigurationEntry() { + return ( + <> + + + + ); +} -const CORSConfigurationType = () => ( - <> - - -); +function CORSConfigurationType() { + return ; +} -function CorsForm({ - error, - handleSubmit, -}) { +function CorsForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/configuration/ftppool/FtpPoolCard.jsx b/src/components/configuration/ftppool/FtpPoolCard.jsx index 5e646d7c..2f79d2bb 100644 --- a/src/components/configuration/ftppool/FtpPoolCard.jsx +++ b/src/components/configuration/ftppool/FtpPoolCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../../ui/SquareCard'; + import FtpPoolEditor from './FtpPoolEditor'; export default function FtpPoolCard(props) { return ( - + ); } diff --git a/src/components/configuration/ftppool/FtpPoolDisplay.jsx b/src/components/configuration/ftppool/FtpPoolDisplay.jsx index 2afb7b1f..30bb7ca8 100644 --- a/src/components/configuration/ftppool/FtpPoolDisplay.jsx +++ b/src/components/configuration/ftppool/FtpPoolDisplay.jsx @@ -1,52 +1,21 @@ -import React from 'react'; - import TextGrid from '../../ui/TextGrid'; import TypeSection from '../../ui/TypeSection'; -const ConnectionPoolType = ({ value = {} }) => ( - <> - - - - - -); - -const FtpPoolConfigurationType = ({ value = {} }) => ( - <> - - -); - -export default function FtpPoolDisplay({ - ftpPoolConfigurationDocument, -}) { +function ConnectionPoolType({ value = {} }) { return ( <> - + + + + ); } + +function FtpPoolConfigurationType({ value = {} }) { + return ; +} + +export default function FtpPoolDisplay({ ftpPoolConfigurationDocument }) { + return ; +} diff --git a/src/components/configuration/ftppool/FtpPoolEditor.jsx b/src/components/configuration/ftppool/FtpPoolEditor.jsx index 9b8e9bb0..93d5715a 100644 --- a/src/components/configuration/ftppool/FtpPoolEditor.jsx +++ b/src/components/configuration/ftppool/FtpPoolEditor.jsx @@ -1,20 +1,18 @@ -import React from 'react'; import * as formActions from '../../../formactions/configuration'; +import withSnackbar from '../../../hoc/withSnackbar'; import Editor from '../../ui/Editor'; -import FtpPoolForm from './FtpPoolForm'; + import FtpPoolDisplay from './FtpPoolDisplay'; -import withSnackbar from '../../../hoc/withSnackbar'; +import FtpPoolForm from './FtpPoolForm'; -function FtpPoolEditor({ - ftpPoolConfigurationDocument, - openSnackBar, - onSuccess, -}) { +function FtpPoolEditor({ ftpPoolConfigurationDocument, openSnackBar, onSuccess }) { const EDIT_FTPPOOL_FORM = 'EDIT_FTPPOOL_FORM'; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'FTP Pool Configuration Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating FTP Pool Configuration'; diff --git a/src/components/configuration/ftppool/FtpPoolForm.jsx b/src/components/configuration/ftppool/FtpPoolForm.jsx index 6a11291d..8feecec2 100644 --- a/src/components/configuration/ftppool/FtpPoolForm.jsx +++ b/src/components/configuration/ftppool/FtpPoolForm.jsx @@ -1,60 +1,30 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../../form'; -import FormSection from '../../ui/FormSection'; +import { TextField } from '../../form'; import Field from '../../ui/Field'; +import FormSection from '../../ui/FormSection'; -const ConnectionPoolType = () => ( - <> - - - - - -); +function ConnectionPoolType() { + return ( + <> + + + + + + ); +} -const FtpPoolConfigurationType = () => ( - <> - - -); +function FtpPoolConfigurationType() { + return ; +} -function FtpPoolForm({ - error, - handleSubmit, -}) { +function FtpPoolForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/configuration/indexing/IndexingCard.jsx b/src/components/configuration/indexing/IndexingCard.jsx index 26dbaddc..98c006c3 100644 --- a/src/components/configuration/indexing/IndexingCard.jsx +++ b/src/components/configuration/indexing/IndexingCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../../ui/SquareCard'; + import IndexingEditor from './IndexingEditor'; export default function IndexingCard(props) { return ( - + ); } diff --git a/src/components/configuration/indexing/IndexingDisplay.jsx b/src/components/configuration/indexing/IndexingDisplay.jsx index e6ce4557..9f84edff 100644 --- a/src/components/configuration/indexing/IndexingDisplay.jsx +++ b/src/components/configuration/indexing/IndexingDisplay.jsx @@ -1,95 +1,41 @@ -import React from 'react'; - import TextGrid from '../../ui/TextGrid'; -import TypeSection from '../../ui/TypeSection'; import TypeArray from '../../ui/TypeArray'; +import TypeSection from '../../ui/TypeSection'; -const IndexingConfigurationType = ({ value = {} }) => ( - <> - - - - - - - - - - - ( - <> - - - - )} - arrayTitle="Pools" - dense - /> - -); +function IndexingConfigurationFieldType({ name, fullText } = {}) { + return ( + <> + + + + ); +} -export default function IndexingDisplay({ - indexingConfigurationDocument, -}) { +function IndexingConfigurationType({ value = {} }) { return ( <> - + + + + + + + + + + ); } + +export default function IndexingDisplay({ indexingConfigurationDocument }) { + return ( + + ); +} diff --git a/src/components/configuration/indexing/IndexingEditor.jsx b/src/components/configuration/indexing/IndexingEditor.jsx index af10e5cb..ef6f9646 100644 --- a/src/components/configuration/indexing/IndexingEditor.jsx +++ b/src/components/configuration/indexing/IndexingEditor.jsx @@ -1,20 +1,18 @@ -import React from 'react'; import * as formActions from '../../../formactions/configuration'; +import withSnackbar from '../../../hoc/withSnackbar'; import Editor from '../../ui/Editor'; -import IndexingForm from './IndexingForm'; + import IndexingDisplay from './IndexingDisplay'; -import withSnackbar from '../../../hoc/withSnackbar'; +import IndexingForm from './IndexingForm'; -function IndexingEditor({ - indexingConfigurationDocument, - openSnackBar, - onSuccess, -}) { +function IndexingEditor({ indexingConfigurationDocument, openSnackBar, onSuccess }) { const EDIT_INDEXING_FORM = 'EDIT_INDEXING_FORM'; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Indexing Configuration Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Indexing Configuration'; diff --git a/src/components/configuration/indexing/IndexingForm.jsx b/src/components/configuration/indexing/IndexingForm.jsx index d2323d46..fd3b5a67 100644 --- a/src/components/configuration/indexing/IndexingForm.jsx +++ b/src/components/configuration/indexing/IndexingForm.jsx @@ -1,113 +1,55 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; import { TextField } from '../../form'; +import BoolCheckbox from '../../ui/BoolCheckbox'; +import Field from '../../ui/Field'; import FieldTypeArray from '../../ui/FieldTypeArray'; import FormSection from '../../ui/FormSection'; -import Field from '../../ui/Field'; -import BoolCheckbox from '../../ui/BoolCheckbox'; -const IndexingFieldDefaultType = () => ( - <> - - - )} - label="Full Text" - /> - -); +function IndexingFieldDefaultType() { + return ( + <> + + } + label="Full Text" + /> + + ); +} -const IndexingConfigurationType = () => ( - <> - - - - - - - - )} - label="Auto Soft Commit" - /> - - - - - -); +function IndexingConfigurationType() { + return ( + <> + + + + + + + } + label="Auto Soft Commit" + /> + + + + + + ); +} -function IndexingForm({ - error, - handleSubmit, -}) { +function IndexingForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/configuration/jobpriority/JobPriorityCard.jsx b/src/components/configuration/jobpriority/JobPriorityCard.jsx index 85bf61ee..06bbbb3c 100644 --- a/src/components/configuration/jobpriority/JobPriorityCard.jsx +++ b/src/components/configuration/jobpriority/JobPriorityCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../../ui/SquareCard'; + import JobPriorityEditor from './JobPriorityEditor'; export default function JobPriorityCard(props) { return ( - + ); } diff --git a/src/components/configuration/jobpriority/JobPriorityDisplay.jsx b/src/components/configuration/jobpriority/JobPriorityDisplay.jsx index c1923c87..178d3c8d 100644 --- a/src/components/configuration/jobpriority/JobPriorityDisplay.jsx +++ b/src/components/configuration/jobpriority/JobPriorityDisplay.jsx @@ -1,42 +1,32 @@ -import React from 'react'; - import TextGrid from '../../ui/TextGrid'; -import TypeSection from '../../ui/TypeSection'; import TypeArray from '../../ui/TypeArray'; +import TypeSection from '../../ui/TypeSection'; -const JobPriorityConfigurationType = ({ value = {} }) => ( - <> +function JobPriorityConfigurationTypeType({ value }) { + return ( + <> + + + + ); +} + +function JobPriorityConfigurationType({ value = {} }) { + return ( ( - <> - - - - )} + component={JobPriorityConfigurationTypeType} /> - -); + ); +} -export default function JobPriorityDisplay({ - jobPriorityConfigurationDocument, -}) { +export default function JobPriorityDisplay({ jobPriorityConfigurationDocument }) { return ( - <> - - + ); } diff --git a/src/components/configuration/jobpriority/JobPriorityEditor.jsx b/src/components/configuration/jobpriority/JobPriorityEditor.jsx index a61489cf..de05496d 100644 --- a/src/components/configuration/jobpriority/JobPriorityEditor.jsx +++ b/src/components/configuration/jobpriority/JobPriorityEditor.jsx @@ -1,10 +1,9 @@ -import React from 'react'; - import * as formActions from '../../../formactions/configuration'; +import withSnackbar from '../../../hoc/withSnackbar'; import Editor from '../../ui/Editor'; -import JobPriorityForm from './JobPriorityForm'; + import JobPriorityDisplay from './JobPriorityDisplay'; -import withSnackbar from '../../../hoc/withSnackbar'; +import JobPriorityForm from './JobPriorityForm'; const EDIT_JOBPRIORITY_FORM = 'EDIT_JOBPRIORITY_FORM'; @@ -17,7 +16,9 @@ function JobPriorityEditor({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Job Priority Configuration Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Job Priority Configuration'; diff --git a/src/components/configuration/jobpriority/JobPriorityForm.jsx b/src/components/configuration/jobpriority/JobPriorityForm.jsx index d53e71be..a172ff92 100644 --- a/src/components/configuration/jobpriority/JobPriorityForm.jsx +++ b/src/components/configuration/jobpriority/JobPriorityForm.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormSection from '../../ui/FormSection'; +import JobPriority from '../../../const/JobPriority'; +import { Select } from '../../form'; +import { loadJobTypeOptions } from '../../jobtype/JobTypeSelect'; import Field from '../../ui/Field'; import FieldTypeArray from '../../ui/FieldTypeArray'; +import FormSection from '../../ui/FormSection'; import { StatefulAsyncSelect } from '../../ui/Select'; -import { loadJobTypeOptions } from '../../jobtype/JobTypeSelect'; -import JobPriority from '../../../const/JobPriority'; -import { Select } from '../../form'; const job = () => ( <> @@ -35,22 +34,13 @@ const job = () => (
- ); -const JobPriorityConfigurationType = () => ( - -); +function JobPriorityConfigurationType() { + return ; +} -function JobPriorityForm({ - error, - handleSubmit, -}) { +function JobPriorityForm({ error, handleSubmit }) { return (
{error && {error}} diff --git a/src/components/configuration/jobpriority/JobPriorityRemove.jsx b/src/components/configuration/jobpriority/JobPriorityRemove.jsx index 906db909..ee6d8104 100644 --- a/src/components/configuration/jobpriority/JobPriorityRemove.jsx +++ b/src/components/configuration/jobpriority/JobPriorityRemove.jsx @@ -1,22 +1,16 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { configuration as ConfigurationApi } from '@vidispine/vdt-api'; + import withUI from '../../../hoc/withUI'; -function JobPriorityRemove({ - open, - onClose, - openSnackBar, - onSuccess, - onError, -}) { +function JobPriorityRemove({ open, onClose, openSnackBar, onSuccess, onError }) { const onRemove = () => { ConfigurationApi.updateJobPriorityConfiguration({ - jobPriorityConfigurationDocument: { }, + jobPriorityConfigurationDocument: {}, }) .then(() => { const messageContent = 'Job Priority Configuration Removed'; @@ -32,19 +26,12 @@ function JobPriorityRemove({ }; return ( - - Remove Job Priority Configuration? - + Remove Job Priority Configuration? - diff --git a/src/components/configuration/logreport/LogReportCard.jsx b/src/components/configuration/logreport/LogReportCard.jsx index 4cec0016..8a027a1e 100644 --- a/src/components/configuration/logreport/LogReportCard.jsx +++ b/src/components/configuration/logreport/LogReportCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../../ui/SquareCard'; + import LogReportEditor from './LogReportEditor'; export default function LogReportCard(props) { return ( - + ); } diff --git a/src/components/configuration/logreport/LogReportDisplay.jsx b/src/components/configuration/logreport/LogReportDisplay.jsx index 3d406c4e..ebd9eed8 100644 --- a/src/components/configuration/logreport/LogReportDisplay.jsx +++ b/src/components/configuration/logreport/LogReportDisplay.jsx @@ -1,52 +1,21 @@ -import React from 'react'; - import TextGrid from '../../ui/TextGrid'; import TypeSection from '../../ui/TypeSection'; -const LogReportConfigurationType = ({ value = {} }) => ( - <> - - - - - - - -); - -export default function LogReportDisplay({ - logReportConfigurationDocument, -}) { +function LogReportConfigurationType({ value = {} }) { return ( <> - + + + + + + ); } + +export default function LogReportDisplay({ logReportConfigurationDocument }) { + return ( + + ); +} diff --git a/src/components/configuration/logreport/LogReportEditor.jsx b/src/components/configuration/logreport/LogReportEditor.jsx index 24d4a1b4..44555abb 100644 --- a/src/components/configuration/logreport/LogReportEditor.jsx +++ b/src/components/configuration/logreport/LogReportEditor.jsx @@ -1,21 +1,18 @@ -import React from 'react'; - import * as formActions from '../../../formactions/configuration'; +import withSnackbar from '../../../hoc/withSnackbar'; import Editor from '../../ui/Editor'; -import LogReportForm from './LogReportForm'; + import LogReportDisplay from './LogReportDisplay'; -import withSnackbar from '../../../hoc/withSnackbar'; +import LogReportForm from './LogReportForm'; -function LogReportEditor({ - logReportConfigurationDocument, - openSnackBar, - onSuccess, -}) { +function LogReportEditor({ logReportConfigurationDocument, openSnackBar, onSuccess }) { const EDIT_LOGREPORT_FORM = 'EDIT_LOGREPORT_FORM'; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'LogReport Configuration Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating LogReport Configuration'; diff --git a/src/components/configuration/logreport/LogReportForm.jsx b/src/components/configuration/logreport/LogReportForm.jsx index d56dba93..42003d80 100644 --- a/src/components/configuration/logreport/LogReportForm.jsx +++ b/src/components/configuration/logreport/LogReportForm.jsx @@ -1,57 +1,28 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; import { TextField } from '../../form'; -import FormSection from '../../ui/FormSection'; import Field from '../../ui/Field'; +import FormSection from '../../ui/FormSection'; -const LogReportConfigurationType = () => ( - <> - - - - - - - -); +function LogReportConfigurationType() { + return ( + <> + + + + + + + + ); +} -function LogReportForm({ - error, - handleSubmit, -}) { +function LogReportForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/configuration/properties/PropertiesRow.jsx b/src/components/configuration/properties/PropertiesRow.jsx index 4d254ebc..c4775e41 100644 --- a/src/components/configuration/properties/PropertiesRow.jsx +++ b/src/components/configuration/properties/PropertiesRow.jsx @@ -1,39 +1,32 @@ -import React from 'react'; -import DeleteForever from '@material-ui/icons/DeleteForever'; -import Edit from '@material-ui/icons/Edit'; import IconButton from '@material-ui/core/IconButton'; import Typography from '@material-ui/core/Typography'; +import DeleteForever from '@material-ui/icons/DeleteForever'; +import Edit from '@material-ui/icons/Edit'; import moment from 'moment'; import TableCell from '../../ui/TableCell'; import TableRow from '../../ui/TableRow'; -export default function PropertiesRow({ - configurationPropertyDocument = {}, - onRemove, - onEdit, -}) { +export default function PropertiesRow({ configurationPropertyDocument = {}, onRemove, onEdit }) { return ( - <> - - {configurationPropertyDocument.key} - - - {configurationPropertyDocument.value} - - - - {configurationPropertyDocument.lastChange ? moment(configurationPropertyDocument.lastChange).fromNow().toString() : ''} - - - onRemove({ propertyKey: configurationPropertyDocument.key })}> - - - onEdit({ configurationPropertyDocument })}> - - - - - + + {configurationPropertyDocument.key} + + {configurationPropertyDocument.value} + + + {configurationPropertyDocument.lastChange + ? moment(configurationPropertyDocument.lastChange).fromNow().toString() + : ''} + + + onRemove({ propertyKey: configurationPropertyDocument.key })}> + + + onEdit({ configurationPropertyDocument })}> + + + + ); } diff --git a/src/components/configuration/properties/PropertiesTable.jsx b/src/components/configuration/properties/PropertiesTable.jsx index df7a8b70..82fe62bd 100644 --- a/src/components/configuration/properties/PropertiesTable.jsx +++ b/src/components/configuration/properties/PropertiesTable.jsx @@ -1,16 +1,14 @@ -import React from 'react'; - +import withDialogProps from '../../../hoc/withDialogProps'; +import sortKeyCaseInsensitive from '../../../utils/sortKeyCaseInsensitive'; import FixedTable from '../../ui/FixedTable'; import TableBody from '../../ui/TableBody'; import TableCell from '../../ui/TableCell'; import TableHead from '../../ui/TableHead'; import TableRow from '../../ui/TableRow'; -import withDialogProps from '../../../hoc/withDialogProps'; -import PropertiesRow from './PropertiesRow'; -import PropertiesRemove from './PropertiesRemove'; import PropertiesDialog from './PropertiesDialog'; -import sortKeyCaseInsensitive from '../../../utils/sortKeyCaseInsensitive'; +import PropertiesRemove from './PropertiesRemove'; +import PropertiesRow from './PropertiesRow'; const REMOVE_CONFIGURATIONPROPERTIES_DIALOG = 'REMOVE_CONFIGURATIONPROPERTIES_DIALOG'; const CONFIGURATIONPROPERTIES_EDIT_MODAL = 'CONFIGURATIONPROPERTIES_EDIT_MODAL'; diff --git a/src/components/conform/ConformCreate.jsx b/src/components/conform/ConformCreate.jsx index 3bd0aef2..c839cb3b 100644 --- a/src/components/conform/ConformCreate.jsx +++ b/src/components/conform/ConformCreate.jsx @@ -1,28 +1,27 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { submit, isSubmitting } from 'redux-form'; import Button from '@material-ui/core/Button'; -import Typography from '@material-ui/core/Typography'; import CardContent from '@material-ui/core/CardContent'; import Grid from '@material-ui/core/Grid'; +import Typography from '@material-ui/core/Typography'; +import { connect } from 'react-redux'; +import { submit, isSubmitting } from 'redux-form'; -import ConformParamsForm from './ConformParamsForm'; -import ConformForm from './ConformForm'; -import ConformMetadataForm from './ConformMetadataForm'; import * as formActions from '../../formactions/conform'; import SquareCard from '../ui/SquareCard'; +import ConformForm from './ConformForm'; +import ConformMetadataForm from './ConformMetadataForm'; +import ConformParamsForm from './ConformParamsForm'; + export const EDIT_CONFORM_FORM = 'EDIT_CONFORM_FORM'; -function ConformCreate({ - submitForm, - history, -}) { +function ConformCreate({ submitForm, history }) { const onSubmitSuccess = (response, dispatch, props) => { formActions.onCreateSubmitSuccess(response, dispatch, props); const { jobDocument } = response; const { jobId } = jobDocument; - if (history) { history.push(`/job/${jobId}`); } + if (history) { + history.push(`/job/${jobId}`); + } }; const queryParams = { tag: ['original'], @@ -30,17 +29,10 @@ function ConformCreate({ return ( <> - + Timeline - @@ -50,11 +42,7 @@ function ConformCreate({ onSubmitSuccess={onSubmitSuccess} onSubmitFail={formActions.onCreateSubmitFail} /> - + Settings @@ -68,11 +56,7 @@ function ConformCreate({ /> - + Metadata - + ); } -export function SegmentArray({ - fields, - maxFields = Infinity, - minFields = 0, - label, -}) { +export function SegmentArray({ fields, maxFields = Infinity, minFields = 0, label }) { const addField = () => fields.push({}); return ( <> @@ -63,25 +51,17 @@ export function SegmentArray({ - { label - && ( + {label && ( - {label} - {' '} - {index + 1} + {label} {index + 1} - )} + )} - { minFields < fields.length - && ( - + {minFields < fields.length && ( + )} @@ -112,22 +92,18 @@ export function SegmentArray({ ))} - { maxFields > fields.length - && ( + {maxFields > fields.length && ( Add Segment - )} + )} ); } -function ConformForm({ - error, - handleSubmit, -}) { +function ConformForm({ error, handleSubmit }) { return (
{error && {error}} diff --git a/src/components/conform/ConformMetadataForm.jsx b/src/components/conform/ConformMetadataForm.jsx index 8fb75cd6..b680e2ca 100644 --- a/src/components/conform/ConformMetadataForm.jsx +++ b/src/components/conform/ConformMetadataForm.jsx @@ -1,21 +1,14 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; import { MetadataType } from '../metadata/MetadataForm'; +import FormSection from '../ui/FormSection'; -function ConformMetadataForm({ - error, - handleSubmit, -}) { +function ConformMetadataForm({ error, handleSubmit }) { return ( {error && {error}} - + - )} + } />
- +
- ); } diff --git a/src/components/debug/EchoForm.jsx b/src/components/debug/EchoForm.jsx index be69123b..ea2d0d92 100644 --- a/src/components/debug/EchoForm.jsx +++ b/src/components/debug/EchoForm.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import { reduxForm, Field } from 'redux-form'; @@ -7,10 +6,7 @@ import CodeField from '../ui/CodeField'; const styles = {}; -function EchoForm({ - error, - handleSubmit, -}) { +function EchoForm({ error, handleSubmit }) { return ( {error && {error}} @@ -26,7 +22,6 @@ function EchoForm({ gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'], autofocus: true, extraKeys: { 'Cmd-Enter': () => handleSubmit(), 'Ctrl-Enter': () => handleSubmit() }, - }} /> diff --git a/src/components/deletionlock/DeletionLockCard.jsx b/src/components/deletionlock/DeletionLockCard.jsx index 099e44c6..c4cecc3f 100644 --- a/src/components/deletionlock/DeletionLockCard.jsx +++ b/src/components/deletionlock/DeletionLockCard.jsx @@ -1,16 +1,11 @@ -import React from 'react'; - import SquareCard from '../ui/SquareCard'; + import DeletionLockEditor from './DeletionLockEditor'; export default function DeletionLockCard(props) { return ( - <> - - - - + + + ); } diff --git a/src/components/deletionlock/DeletionLockDisplay.jsx b/src/components/deletionlock/DeletionLockDisplay.jsx index 7b988ebf..4dc9bad8 100644 --- a/src/components/deletionlock/DeletionLockDisplay.jsx +++ b/src/components/deletionlock/DeletionLockDisplay.jsx @@ -1,77 +1,40 @@ -import React from 'react'; - +import { SimpleMetadataType } from '../ui/DisplayType'; import TextGrid from '../ui/TextGrid'; import TypeSection from '../ui/TypeSection'; -import { SimpleMetadataType } from '../ui/DisplayType'; - -const DeletionLockType = ({ value = {}, showMetadataType = false }) => ( - <> - - - - - - - - - - {showMetadataType && ( - - )} - -); -export default function DeletionLockDisplay({ - deletionLockDocument, - showMetadataType, -}) { +function DeletionLockType({ value = {}, showMetadataType = false }) { return ( <> - + + + + + + + + + {showMetadataType && } ); } + +export default function DeletionLockDisplay({ deletionLockDocument, showMetadataType }) { + return ( + + ); +} diff --git a/src/components/deletionlock/DeletionLockEditor.jsx b/src/components/deletionlock/DeletionLockEditor.jsx index e7f74998..cde88351 100644 --- a/src/components/deletionlock/DeletionLockEditor.jsx +++ b/src/components/deletionlock/DeletionLockEditor.jsx @@ -1,22 +1,20 @@ -import React from 'react'; import { connect } from 'react-redux'; -import * as formActions from '../../formactions/deletionlock'; + import * as actions from '../../actions'; +import * as formActions from '../../formactions/deletionlock'; import Editor from '../ui/Editor'; + import DeletionLockDisplay from './DeletionLockDisplay'; import DeletionLockForm from './DeletionLockForm'; -function DeletionLockEditor({ - deletionLockDocument, - lockId, - openSnackBar, - onRefresh, -}) { +function DeletionLockEditor({ deletionLockDocument, lockId, openSnackBar, onRefresh }) { const EDIT_DELETIONLOCK_FORM = 'EDIT_DELETIONLOCK_FORM'; const onSubmitSuccess = () => { const messageContent = 'Deletion Lock Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Deletion Lock'; diff --git a/src/components/deletionlock/DeletionLockForm.jsx b/src/components/deletionlock/DeletionLockForm.jsx index 3b7fd125..f960b22f 100644 --- a/src/components/deletionlock/DeletionLockForm.jsx +++ b/src/components/deletionlock/DeletionLockForm.jsx @@ -1,123 +1,62 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { SimpleMetadataType } from '../ui/FormType'; -import BoolCheckbox from '../ui/BoolCheckbox'; -const DeletionLockType = ({ - showMetadataType, - isNew, - entityId, - entityType, -}) => ( - <> - {!isNew && ( - <> - - - - )} - - {!isNew && ( - - )} - {!entityType && ( - - Entity Type - - Item - Collection - File - - - )} - {!entityId && ( - - )} - {!isNew && ( - <> - - )} - label="Effective" - /> - - )} - label="Inherited" - /> - - )} - label="Expired" - /> - - )} - { showMetadataType && ( - - )} - -); +function DeletionLockType({ showMetadataType, isNew, entityId, entityType }) { + return ( + <> + {!isNew && ( + <> + + + + )} + + {!isNew && } + {!entityType && ( + + Entity Type + + Item + Collection + File + + + )} + {!entityId && ( + + )} + {!isNew && ( + <> + } + label="Effective" + /> + } + label="Inherited" + /> + } + label="Expired" + /> + + )} + {showMetadataType && } + + ); +} -function DeletionLockForm({ - error, - handleSubmit, - showMetadataType, - isNew, - entityId, - entityType, -}) { +function DeletionLockForm({ error, handleSubmit, showMetadataType, isNew, entityId, entityType }) { return (
{error && {error}} diff --git a/src/components/deletionlock/DeletionLockListCard.jsx b/src/components/deletionlock/DeletionLockListCard.jsx index 08c9f834..92538f22 100644 --- a/src/components/deletionlock/DeletionLockListCard.jsx +++ b/src/components/deletionlock/DeletionLockListCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import DeletionLockListTable from './DeletionLockListTable'; -export default function DeletionLockListCard({ - ...props -}) { +export default function DeletionLockListCard({ ...props }) { return ( - + ); diff --git a/src/components/deletionlock/DeletionLockListFilter.jsx b/src/components/deletionlock/DeletionLockListFilter.jsx index 2f0ed470..a22e6659 100644 --- a/src/components/deletionlock/DeletionLockListFilter.jsx +++ b/src/components/deletionlock/DeletionLockListFilter.jsx @@ -1,15 +1,15 @@ -import React from 'react'; -import CardContent from '@material-ui/core/CardContent'; -import Divider from '@material-ui/core/Divider'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; import DialogActions from '@material-ui/core/DialogActions'; +import Divider from '@material-ui/core/Divider'; import { compose } from 'redux'; import * as formActions from '../../formactions/deletionlock'; -import DeletionLockListFilterForm from './DeletionLockListFilterForm'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import DeletionLockListFilterForm from './DeletionLockListFilterForm'; + function DeletionLockListFilter({ onClose, onSuccess, @@ -22,7 +22,9 @@ function DeletionLockListFilter({ entityType, }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Listing Deletion Lock list'; @@ -37,8 +39,9 @@ function DeletionLockListFilter({ - - diff --git a/src/components/deletionlock/DeletionLockListFilterCard.jsx b/src/components/deletionlock/DeletionLockListFilterCard.jsx index fe433075..9ee57011 100644 --- a/src/components/deletionlock/DeletionLockListFilterCard.jsx +++ b/src/components/deletionlock/DeletionLockListFilterCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import DeletionLockListFilter from './DeletionLockListFilter'; -export default function DeletionLockListFilterCard({ - ...props -}) { +export default function DeletionLockListFilterCard({ ...props }) { return ( - + ); diff --git a/src/components/deletionlock/DeletionLockListFilterForm.jsx b/src/components/deletionlock/DeletionLockListFilterForm.jsx index bad949c7..0de26b70 100644 --- a/src/components/deletionlock/DeletionLockListFilterForm.jsx +++ b/src/components/deletionlock/DeletionLockListFilterForm.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { TextField, Select } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import { loadUserOptions } from '../user/UserSelect'; -import { StatefulAsyncSelect } from '../ui/Select'; -import BoolCheckbox from '../ui/BoolCheckbox'; import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; +import { loadUserOptions } from '../user/UserSelect'; const queryParams = ({ entityType }) => ( <> @@ -28,18 +27,8 @@ const queryParams = ({ entityType }) => ( )} - - + + ( isClearable fullWidth /> - + - )} + control={} label="Only Effective" /> - + ); -function DeletionLockListFilterForm({ - error, - handleSubmit, - entityType, -}) { +function DeletionLockListFilterForm({ error, handleSubmit, entityType }) { return ( {error && {error}} - + - diff --git a/src/components/fieldgroup/FieldGroupRow.jsx b/src/components/fieldgroup/FieldGroupRow.jsx index e836376d..eb92a84a 100644 --- a/src/components/fieldgroup/FieldGroupRow.jsx +++ b/src/components/fieldgroup/FieldGroupRow.jsx @@ -1,27 +1,28 @@ -import React from 'react'; +import IconButton from '@material-ui/core/IconButton'; import Check from '@material-ui/icons/Check'; import DeleteForever from '@material-ui/icons/DeleteForever'; -import IconButton from '@material-ui/core/IconButton'; -import UnstyledLink from '../ui/UnstyledLink'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRow'; +import UnstyledLink from '../ui/UnstyledLink'; -export default function FieldGroupRow({ - metadataFieldGroupDocument = {}, - onOpen, -}) { +export default function FieldGroupRow({ metadataFieldGroupDocument = {}, onOpen }) { return ( - {metadataFieldGroupDocument.name} + + {metadataFieldGroupDocument.name} + {metadataFieldGroupDocument.inheritance === 'true' && } - onOpen({ - childGroupName: metadataFieldGroupDocument.name, - groupName: metadataFieldGroupDocument.name, - })} + + onOpen({ + childGroupName: metadataFieldGroupDocument.name, + groupName: metadataFieldGroupDocument.name, + }) + } > diff --git a/src/components/fieldgroup/FieldGroupSearch.jsx b/src/components/fieldgroup/FieldGroupSearch.jsx index a410c2a5..b82730cf 100644 --- a/src/components/fieldgroup/FieldGroupSearch.jsx +++ b/src/components/fieldgroup/FieldGroupSearch.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; - -import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; -import Typography from '@material-ui/core/Typography'; import Accordion from '@material-ui/core/Accordion'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; +import Button from '@material-ui/core/Button'; import CardContent from '@material-ui/core/CardContent'; +import Divider from '@material-ui/core/Divider'; +import Typography from '@material-ui/core/Typography'; +import { compose } from 'redux'; -import FieldSearchGroupForm from './FieldSearchGroupForm'; +import * as formActions from '../../formactions/fieldgroup'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/fieldgroup'; + +import FieldSearchGroupForm from './FieldSearchGroupForm'; export const FIELDGROUP_SEARCH_FORM = 'FIELDGROUP_SEARCH_FORM'; @@ -30,19 +29,22 @@ function FieldGroupSearch({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching Field Groups'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Field Group Search Document @@ -59,17 +61,10 @@ function FieldGroupSearch({
- - diff --git a/src/components/fieldgroup/FieldGroupSearchListTable.jsx b/src/components/fieldgroup/FieldGroupSearchListTable.jsx index 16005ec9..1eab9bdd 100644 --- a/src/components/fieldgroup/FieldGroupSearchListTable.jsx +++ b/src/components/fieldgroup/FieldGroupSearchListTable.jsx @@ -1,27 +1,21 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; import Table from '@material-ui/core/Table'; -import TableRow from '@material-ui/core/TableRow'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; -import TableHead from '@material-ui/core/TableHead'; import TableFooter from '@material-ui/core/TableFooter'; +import TableHead from '@material-ui/core/TableHead'; import TablePagination from '@material-ui/core/TablePagination'; +import TableRow from '@material-ui/core/TableRow'; import TableSortLabel from '@material-ui/core/TableSortLabel'; +import startCase from 'lodash.startcase'; import TableActions from '../ui/TableActions'; import TableRowLink from '../ui/TableRowLink'; -const TableHeadCell = ({ - orderBy, - orderDirection, - onChangeOrder, - name, -}) => ( - onChangeOrder ? ( +function TableHeadCell({ orderBy, orderDirection, onChangeOrder, name }) { + return onChangeOrder ? ( @@ -29,27 +23,19 @@ const TableHeadCell = ({ ) : ( - - {startCase(name)} - - ) -); + {startCase(name)} + ); +} -const FieldGroupRow = ({ fieldGroupType }) => { - const { - name, - uuid, - } = fieldGroupType; +function FieldGroupRow({ fieldGroupType }) { + const { name, uuid } = fieldGroupType; return ( - + {uuid} {name} ); -}; +} function FieldGroupSearchListTable({ metadataFieldResultDocument, @@ -59,42 +45,39 @@ function FieldGroupSearchListTable({ page, rowsPerPage, }) { - if (metadataFieldResultDocument === undefined) { return null; } + if (metadataFieldResultDocument === undefined) { + return null; + } const { group: groupList = [], hits: count = 0 } = metadataFieldResultDocument; return ( - <> - - +
+ + + + + + + + {groupList.map((fieldGroupType) => ( + + ))} + + {onChangePage && onChangeRowsPerPage && ( + - - - - - - {groupList.map((fieldGroupType) => ( - - ))} - - {(onChangePage && onChangeRowsPerPage) && ( - - - - - - )} -
- + + + )} + ); } diff --git a/src/components/fieldgroup/FieldGroupSearchParams.jsx b/src/components/fieldgroup/FieldGroupSearchParams.jsx index e86f5731..39e8d06e 100644 --- a/src/components/fieldgroup/FieldGroupSearchParams.jsx +++ b/src/components/fieldgroup/FieldGroupSearchParams.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import Accordion from '@material-ui/core/Accordion'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import { compose } from 'redux'; -import FieldGroupSearchParamsForm from './FieldGroupSearchParamsForm'; +import * as formActions from '../../formactions/fieldgroup'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/fieldgroup'; + +import FieldGroupSearchParamsForm from './FieldGroupSearchParamsForm'; export const FIELDGROUP_SEARCH_PARAMS_FORM = 'FIELDGROUP_SEARCH_PARAMS_FORM'; @@ -30,19 +29,22 @@ function FieldGroupSearchParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching Field Groups'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Field Group Search Params @@ -59,17 +61,10 @@ function FieldGroupSearchParams({ - - diff --git a/src/components/fieldgroup/FieldGroupSearchParamsForm.jsx b/src/components/fieldgroup/FieldGroupSearchParamsForm.jsx index 8662f959..af986153 100644 --- a/src/components/fieldgroup/FieldGroupSearchParamsForm.jsx +++ b/src/components/fieldgroup/FieldGroupSearchParamsForm.jsx @@ -1,13 +1,13 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; + import { loadFieldGroupOptions } from './FieldGroupSelect'; const queryParams = () => ( @@ -34,73 +34,33 @@ const queryParams = () => ( isMulti creatable /> - + - )} + control={} label="Traverse" /> - )} + control={} label="Include Value" /> - )} + control={} label="Include Definition" /> - )} + control={} label="Include Source" /> - - + + ); -function FieldGroupSearchParamsForm({ - error, - handleSubmit, -}) { +function FieldGroupSearchParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/file/FileAnalyze.jsx b/src/components/file/FileAnalyze.jsx index b0e00757..5ed2eb14 100644 --- a/src/components/file/FileAnalyze.jsx +++ b/src/components/file/FileAnalyze.jsx @@ -1,33 +1,30 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogActions from '@material-ui/core/DialogActions'; -import Divider from '@material-ui/core/Divider'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; import { compose } from 'redux'; import * as formActions from '../../formactions/file'; -import FileAnalyzeForm from './FileAnalyzeForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import FileAnalyzeForm from './FileAnalyzeForm'; const FILE_ANALYZE_FORM = 'FILE_ANALYZE_FORM'; -function FileAnalyze({ - open, - onClose, - onSuccess, - openSnackBar, - submitForm, - fileDocument, -}) { - if (fileDocument === undefined) { return null; } +function FileAnalyze({ open, onClose, onSuccess, openSnackBar, submitForm, fileDocument }) { + if (fileDocument === undefined) { + return null; + } const { id: fileId } = fileDocument; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Starting Shape Deduction Job'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -35,12 +32,7 @@ function FileAnalyze({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + Run Shape Deduction Job - - diff --git a/src/components/file/FileAnalyzeForm.jsx b/src/components/file/FileAnalyzeForm.jsx index ffd234a4..e2979bae 100644 --- a/src/components/file/FileAnalyzeForm.jsx +++ b/src/components/file/FileAnalyzeForm.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; const queryParams = () => ( <> @@ -25,21 +24,9 @@ const queryParams = () => ( ))}
- - - + + + ( ); -function FileAnalyzeForm({ - error, - handleSubmit, - fileId, -}) { +function FileAnalyzeForm({ error, handleSubmit, fileId }) { return (
{error && {error}} - {!fileId && ( - - )} - + {!fileId && } + - diff --git a/src/components/file/FileDeleteForm.jsx b/src/components/file/FileDeleteForm.jsx index c07b6d4b..e93441da 100644 --- a/src/components/file/FileDeleteForm.jsx +++ b/src/components/file/FileDeleteForm.jsx @@ -1,15 +1,14 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import JobPriority from '../../const/JobPriority'; +import { TextField, Select } from '../form'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( @@ -24,16 +23,8 @@ const queryParams = () => ( ))} - - + + ( ); -function FileDeleteForm({ - error, - handleSubmit, -}) { +function FileDeleteForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/file/FileEntityForm.jsx b/src/components/file/FileEntityForm.jsx index 39be0075..1e9c236b 100644 --- a/src/components/file/FileEntityForm.jsx +++ b/src/components/file/FileEntityForm.jsx @@ -1,32 +1,23 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import FileStates from '../../const/FileStates'; +import { TextField, Select } from '../form'; import { loadStorageOptions } from '../storage/StorageSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; import { SimpleMetadataTypeForm } from '../ui/SimpleMetadataField'; const fileDocument = () => ( <> - - + + State @@ -37,51 +28,22 @@ const fileDocument = () => ( ))} - - - - - + + + + + ); const queryParams = () => ( - <> - - )} - label="Create Only" - /> - + } + label="Create Only" + /> ); -function FileEntityForm({ - error, - handleSubmit, -}) { +function FileEntityForm({ error, handleSubmit }) { return (
{error && {error}} @@ -94,14 +56,8 @@ function FileEntityForm({ required fullWidth /> - - + + - diff --git a/src/components/file/FileHash.jsx b/src/components/file/FileHash.jsx index 067f1052..49648b91 100644 --- a/src/components/file/FileHash.jsx +++ b/src/components/file/FileHash.jsx @@ -1,33 +1,30 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogActions from '@material-ui/core/DialogActions'; -import Divider from '@material-ui/core/Divider'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; import { compose } from 'redux'; import * as formActions from '../../formactions/file'; -import FileHashForm from './FileHashForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import FileHashForm from './FileHashForm'; const FILE_HASH_FORM = 'FILE_HASH_FORM'; -function FileHash({ - open, - onClose, - onSuccess, - openSnackBar, - submitForm, - fileDocument, -}) { - if (fileDocument === undefined) { return null; } +function FileHash({ open, onClose, onSuccess, openSnackBar, submitForm, fileDocument }) { + if (fileDocument === undefined) { + return null; + } const { id: fileId } = fileDocument; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Checksum Hash Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -35,12 +32,7 @@ function FileHash({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + Set File Checksum Hash - - diff --git a/src/components/file/FileHashForm.jsx b/src/components/file/FileHashForm.jsx index 1cd02d0d..20dd9a43 100644 --- a/src/components/file/FileHashForm.jsx +++ b/src/components/file/FileHashForm.jsx @@ -1,48 +1,20 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import { required } from '../../utils/FieldValidation'; +import { TextField } from '../form'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; -const queryParams = () => ( - <> - - -); +const queryParams = () => ; -function FileHashForm({ - error, - handleSubmit, - fileId, -}) { +function FileHashForm({ error, handleSubmit, fileId }) { return (
{error && {error}} - {!fileId && ( - - )} - - + {!fileId && } + + - diff --git a/src/components/file/FileListFilter.jsx b/src/components/file/FileListFilter.jsx index 9b359ec6..62d1dfd1 100644 --- a/src/components/file/FileListFilter.jsx +++ b/src/components/file/FileListFilter.jsx @@ -1,18 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; -import Divider from '@material-ui/core/Divider'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; +import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; import * as formActions from '../../formactions/file'; -import FileFilterForm from './FileListFilterForm'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import FileFilterForm from './FileListFilterForm'; + function FileListFilter({ onClose, onSuccess, @@ -21,9 +21,19 @@ function FileListFilter({ resetForm, form = 'FILE_FILTER_FORM', changeForm, + initialValues = { + queryParams: { + first: 0, + number: 10, + prefixFirst: 0, + prefixNumber: 10, + }, + }, }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Listing Files'; @@ -33,14 +43,7 @@ function FileListFilter({ await changeForm(form, 'queryParams.first', 0); submitForm(form); }; - const initialValues = { - queryParams: { - first: 0, - number: 10, - prefixFirst: 0, - prefixNumber: 10, - }, - }; + return ( @@ -61,17 +64,10 @@ function FileListFilter({ - - diff --git a/src/components/file/FileListFilterForm.jsx b/src/components/file/FileListFilterForm.jsx index 08cd3469..f1a2d610 100644 --- a/src/components/file/FileListFilterForm.jsx +++ b/src/components/file/FileListFilterForm.jsx @@ -1,96 +1,44 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormLabel from '@material-ui/core/FormLabel'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; import Radio from '@material-ui/core/Radio'; -import { TextField, Select, RadioGroup } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import FieldTypeArray from '../ui/FieldTypeArray'; +import FileStates from '../../const/FileStates'; +import { TextField, Select, RadioGroup } from '../form'; import { loadStorageOptions } from '../storage/StorageSelect'; import { loadStorageGroupOptions } from '../storagegroup/StorageGroupSelect'; -import { StatefulAsyncSelect } from '../ui/Select'; import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; -import FileStates from '../../const/FileStates'; +import Field from '../ui/Field'; +import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - - + + - )} + control={} label="Ignore Case" /> - )} + control={} label="Recursive" /> - )} + control={} label="Wildcard" /> - - )} - label="Count" - /> - - )} - label="Prefix" - /> - - + } label="Count" /> + } label="Prefix" /> + + State @@ -101,61 +49,15 @@ const queryParams = () => ( ))} - - - - - - - - - + + + + + + + + + ( File Association - } - label="All" - /> - } - label="With Item" - /> - } - label="Not Associated" - /> + } label="All" /> + } label="With Item" /> + } label="Not Associated" /> - )} + control={} label="Exclude Queued" /> - )} + control={} label="Include Item" /> ); -function FileListFilterForm({ - error, - handleSubmit, -}) { +function FileListFilterForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/file/FileMoveForm.jsx b/src/components/file/FileMoveForm.jsx index 23fbae66..8829b83f 100644 --- a/src/components/file/FileMoveForm.jsx +++ b/src/components/file/FileMoveForm.jsx @@ -1,20 +1,19 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import FieldTypeArray from '../ui/FieldTypeArray'; +import JobPriority from '../../const/JobPriority'; +import { TextField, Select } from '../form'; import { loadStorageOptions } from '../storage/StorageSelect'; -import { StatefulAsyncSelect } from '../ui/Select'; import BoolCheckbox from '../ui/BoolCheckbox'; -import JobPriority from '../../const/JobPriority'; +import Field from '../ui/Field'; +import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> @@ -25,11 +24,7 @@ const queryParams = () => ( Move
- + Priority @@ -41,36 +36,13 @@ const queryParams = () => ( - )} + control={} label="Use Original Filename" /> - - - - + + + + ( ); -function FileMoveForm({ - error, - handleSubmit, -}) { +function FileMoveForm({ error, handleSubmit }) { return (
{error && {error}} @@ -95,10 +64,7 @@ function FileMoveForm({ required fullWidth /> - + - diff --git a/src/components/file/FileOverwriteForm.jsx b/src/components/file/FileOverwriteForm.jsx index be315e8e..1c9fcbd3 100644 --- a/src/components/file/FileOverwriteForm.jsx +++ b/src/components/file/FileOverwriteForm.jsx @@ -1,48 +1,24 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import UploadButton from '../ui/UploadButton'; const queryParams = () => ( <> - - + + ); -function FileOverwriteForm({ - error, - handleSubmit, - submitting, -}) { +function FileOverwriteForm({ error, handleSubmit, submitting }) { return (
{error && {error}} - - + + - diff --git a/src/components/file/FileParamsForm.jsx b/src/components/file/FileParamsForm.jsx index 79d855a2..e8c26531 100644 --- a/src/components/file/FileParamsForm.jsx +++ b/src/components/file/FileParamsForm.jsx @@ -1,69 +1,36 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - - - - + + + + - )} + control={} label="Include Item" /> - )} + control={} label="Include Shapes" /> ); -function FileParamsForm({ - error, - handleSubmit, -}) { +function FileParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/file/FilePathForm.jsx b/src/components/file/FilePathForm.jsx index 2d0c2c41..adbb0cd7 100644 --- a/src/components/file/FilePathForm.jsx +++ b/src/components/file/FilePathForm.jsx @@ -1,27 +1,21 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import FileStates from '../../const/FileStates'; +import { TextField, Select } from '../form'; import { loadStorageOptions } from '../storage/StorageSelect'; -import { StatefulAsyncSelect } from '../ui/Select'; import BoolCheckbox from '../ui/BoolCheckbox'; -import FileStates from '../../const/FileStates'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( - )} + control={} label="Duplicate" /> ); -function FilePathForm({ - error, - handleSubmit, -}) { +function FilePathForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/group/GroupUserEditor.jsx b/src/components/group/GroupUserEditor.jsx index 7ecae9d5..dcb72bd8 100644 --- a/src/components/group/GroupUserEditor.jsx +++ b/src/components/group/GroupUserEditor.jsx @@ -1,29 +1,24 @@ -import React from 'react'; -import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; -import Tooltip from '@material-ui/core/Tooltip'; -import IconButton from '@material-ui/core/IconButton'; +import CardHeader from '@material-ui/core/CardHeader'; import Grid from '@material-ui/core/Grid'; +import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; import Typography from '@material-ui/core/Typography'; -import CardHeader from '@material-ui/core/CardHeader'; +import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; +import withModal from '../../hoc/withModal'; import UserTable from '../user/UserTable'; + import GroupUserDialog from './GroupUserDialog'; -import withModal from '../../hoc/withModal'; const ADD_GROUP_USER = 'ADD_GROUP_USER'; -function GroupUserEditor({ - groupName, - onSuccess, - groupDocument, - onOpen, -}) { +function GroupUserEditor({ groupName, onSuccess, groupDocument, onOpen }) { return ( <> Users
} - action={( + action={ @@ -33,7 +28,7 @@ function GroupUserEditor({ - )} + } /> { const messageContent = 'Group Created'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating Group'; diff --git a/src/components/imf/ImportImpFileAdvancedForm.jsx b/src/components/imf/ImportImpFileAdvancedForm.jsx index 50246615..3be43ce5 100644 --- a/src/components/imf/ImportImpFileAdvancedForm.jsx +++ b/src/components/imf/ImportImpFileAdvancedForm.jsx @@ -1,77 +1,32 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - )} + control={} label="Override FastStart" /> - )} + control={} label="Require FastStart" /> - - - - - - - - + + + + + + + + ( ); -function ImportImpAdvancedForm({ - error, - handleSubmit, -}) { +function ImportImpAdvancedForm({ error, handleSubmit }) { return (
{error && {error}} - + - )} + } /> @@ -75,11 +78,7 @@ function ImportImpFileWizard({ /> - @@ -101,14 +100,8 @@ function ImportImpFileWizard({ /> - - + @@ -130,9 +123,7 @@ function ImportImpFileWizard({ /> - + diff --git a/src/components/imf/ImportImpPathAdvancedForm.jsx b/src/components/imf/ImportImpPathAdvancedForm.jsx index 50246615..3be43ce5 100644 --- a/src/components/imf/ImportImpPathAdvancedForm.jsx +++ b/src/components/imf/ImportImpPathAdvancedForm.jsx @@ -1,77 +1,32 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - )} + control={} label="Override FastStart" /> - )} + control={} label="Require FastStart" /> - - - - - - - - + + + + + + + + ( ); -function ImportImpAdvancedForm({ - error, - handleSubmit, -}) { +function ImportImpAdvancedForm({ error, handleSubmit }) { return (
{error && {error}} - + - )} + } /> @@ -75,11 +78,7 @@ function ImportImpPathWizard({ /> - @@ -101,14 +100,8 @@ function ImportImpPathWizard({ /> - - + @@ -130,9 +123,7 @@ function ImportImpPathWizard({ /> - + diff --git a/src/components/imf/ImportImpUrlAdvancedForm.jsx b/src/components/imf/ImportImpUrlAdvancedForm.jsx index b7543a13..e253e483 100644 --- a/src/components/imf/ImportImpUrlAdvancedForm.jsx +++ b/src/components/imf/ImportImpUrlAdvancedForm.jsx @@ -1,106 +1,37 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - )} + control={} label="Override FastStart" /> - )} + control={} label="Require FastStart" /> - - )} - label="Growing" - /> - - - - - - - - - - - - + } label="Growing" /> + + + + + + + + + + + + ( ); -function ImportImpAdvancedForm({ - error, - handleSubmit, -}) { +function ImportImpAdvancedForm({ error, handleSubmit }) { return (
{error && {error}} - + - )} + } /> @@ -75,11 +78,7 @@ function ImportImpUrlWizard({ /> - @@ -101,14 +100,8 @@ function ImportImpUrlWizard({ /> - - + @@ -130,9 +123,7 @@ function ImportImpUrlWizard({ /> - + diff --git a/src/components/import/ImportCollectionWizard.jsx b/src/components/import/ImportCollectionWizard.jsx index a94458d4..63abb42b 100644 --- a/src/components/import/ImportCollectionWizard.jsx +++ b/src/components/import/ImportCollectionWizard.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; -import CardContent from '@material-ui/core/CardContent'; +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import Stepper from '@material-ui/core/Stepper'; +import CardContent from '@material-ui/core/CardContent'; import Step from '@material-ui/core/Step'; -import StepLabel from '@material-ui/core/StepLabel'; import StepContent from '@material-ui/core/StepContent'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import StepLabel from '@material-ui/core/StepLabel'; +import Stepper from '@material-ui/core/Stepper'; +import { compose } from 'redux'; -import { CollectionDocumentForm, CollectionQueryParamsForm } from '../collection/CollectionForm'; -import SquareCard from '../ui/SquareCard'; import * as formActions from '../../formactions/collection'; import withFormActions from '../../hoc/withFormActions'; -import withUI from '../../hoc/withUI'; import withStepper from '../../hoc/withStepper'; +import withUI from '../../hoc/withUI'; +import { CollectionDocumentForm, CollectionQueryParamsForm } from '../collection/CollectionForm'; +import SquareCard from '../ui/SquareCard'; import TitleHeader from '../ui/TitleHeader'; export const EDIT_COLLECTION_FORM = 'EDIT_COLLECTION_FORM'; @@ -30,12 +29,16 @@ function ImportCollectionWizard({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Collection Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Collection'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( <> diff --git a/src/components/import/ImportComponentForm.jsx b/src/components/import/ImportComponentForm.jsx index 88e9d06b..96434bd6 100644 --- a/src/components/import/ImportComponentForm.jsx +++ b/src/components/import/ImportComponentForm.jsx @@ -1,25 +1,24 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormGroup from '@material-ui/core/FormGroup'; import FormHelperText from '@material-ui/core/FormHelperText'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import Field from '../ui/Field'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; import { TextField, Select } from '../form'; import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import { loadStorageOptions } from '../storage/StorageSelect'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { required } from '../../utils/FieldValidation'; -import FormSection from '../ui/FormSection'; import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import JobPriority from '../../const/JobPriority'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( @@ -43,10 +42,9 @@ const queryParams = () => ( label="Allow Reimport" /> - True - import the file to this shape even if the file is already - importing or is already part of another item. False - Reject the request - if the file with the given id has already been imported or is currently - importing + True - import the file to this shape even if the file is already importing or is already + part of another item. False - Reject the request if the file with the given id has already + been imported or is currently importing ( control={} label="No Transcoding" /> - - Disable transcoding even if the tags parameter is set - + Disable transcoding even if the tags parameter is set } label="Create Thumbnails" /> - - Generate thumbnails as per defined by shape tag - + Generate thumbnails as per defined by shape tag ( fullWidth /> - Use transcoder’s estimate of the duration for allocating header space in - MOV files and similar files + Use transcoder’s estimate of the duration for allocating header space in MOV files and + similar files @@ -139,8 +133,8 @@ const queryParams = () => ( fullWidth /> - True - try to put the index tables (header) in front of the file. - False - put header at end of file + True - try to put the index tables (header) in front of the file. False - put header at end + of file ( The input file is still written to, so enables growing file support - + ( ); -function ImportComponentForm({ - error, - handleSubmit, -}) { +function ImportComponentForm({ error, handleSubmit }) { return (
{error && {error}} diff --git a/src/components/import/ImportComponentWizard.jsx b/src/components/import/ImportComponentWizard.jsx index e0247207..aa42c568 100644 --- a/src/components/import/ImportComponentWizard.jsx +++ b/src/components/import/ImportComponentWizard.jsx @@ -1,23 +1,22 @@ -import React from 'react'; -import { compose } from 'redux'; - -import CardContent from '@material-ui/core/CardContent'; +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import Stepper from '@material-ui/core/Stepper'; +import CardContent from '@material-ui/core/CardContent'; import Step from '@material-ui/core/Step'; -import StepLabel from '@material-ui/core/StepLabel'; import StepContent from '@material-ui/core/StepContent'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import StepLabel from '@material-ui/core/StepLabel'; +import Stepper from '@material-ui/core/Stepper'; +import { compose } from 'redux'; -import ImportComponentForm from './ImportComponentForm'; -import MetadataForm from '../metadata/MetadataForm'; -import SquareCard from '../ui/SquareCard'; import * as formActions from '../../formactions/import'; import withFormActions from '../../hoc/withFormActions'; -import withUI from '../../hoc/withUI'; import withStepper from '../../hoc/withStepper'; +import withUI from '../../hoc/withUI'; +import MetadataForm from '../metadata/MetadataForm'; +import SquareCard from '../ui/SquareCard'; import TitleHeader from '../ui/TitleHeader'; +import ImportComponentForm from './ImportComponentForm'; + export const EDIT_IMPORTCOMPONENT_FORM = 'EDIT_IMPORTCOMPONENT_FORM'; function ImportComponentWizard({ @@ -33,12 +32,16 @@ function ImportComponentWizard({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Job Started'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Starting Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; const defaultValues = { component: initialValues?.component || 'container', diff --git a/src/components/import/ImportFileForm.jsx b/src/components/import/ImportFileForm.jsx index 1fe365ac..cc59f9db 100644 --- a/src/components/import/ImportFileForm.jsx +++ b/src/components/import/ImportFileForm.jsx @@ -1,24 +1,23 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormGroup from '@material-ui/core/FormGroup'; import FormHelperText from '@material-ui/core/FormHelperText'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import Field from '../ui/Field'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; import { TextField, Select } from '../form'; import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { required } from '../../utils/FieldValidation'; -import FormSection from '../ui/FormSection'; import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import JobPriority from '../../const/JobPriority'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( @@ -35,10 +34,9 @@ const queryParams = () => ( label="Allow Reimport" /> - True - import the file to this shape even if the file is already - importing or is already part of another item. False - Reject the request - if the file with the given id has already been imported or is currently - importing + True - import the file to this shape even if the file is already importing or is already + part of another item. False - Reject the request if the file with the given id has already + been imported or is currently importing ( control={} label="Create Thumbnails" /> - - Generate thumbnails as per defined by shape tag - + Generate thumbnails as per defined by shape tag ( control={} label="No Transcoding" /> - - Disable transcoding even if the tags parameter is set - + Disable transcoding even if the tags parameter is set ( fullWidth /> - Use transcoder’s estimate of the duration for allocating header space in - MOV files and similar files + Use transcoder’s estimate of the duration for allocating header space in MOV files and + similar files @@ -135,8 +129,8 @@ const queryParams = () => ( fullWidth /> - If true try to put the index tables (header) in front of the file, if - false put header at end of file + If true try to put the index tables (header) in front of the file, if false put header at + end of file ( component={TextField} fullWidth /> - + { const messageContent = 'Job Started'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Starting Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; const defaultValues = { ...initialValues }; return ( diff --git a/src/components/import/ImportPlaceholderForm.jsx b/src/components/import/ImportPlaceholderForm.jsx index 3a3945a2..9bd1816f 100644 --- a/src/components/import/ImportPlaceholderForm.jsx +++ b/src/components/import/ImportPlaceholderForm.jsx @@ -1,12 +1,11 @@ -import React from 'react'; +import FormGroup from '@material-ui/core/FormGroup'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormGroup from '@material-ui/core/FormGroup'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( @@ -82,17 +81,11 @@ const queryParams = () => ( ); -function ImportPlaceholderForm({ - error, - handleSubmit, -}) { +function ImportPlaceholderForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/importaccess/ImportAccessForm.jsx b/src/components/importaccess/ImportAccessForm.jsx index 820b4a3f..def7c417 100644 --- a/src/components/importaccess/ImportAccessForm.jsx +++ b/src/components/importaccess/ImportAccessForm.jsx @@ -1,31 +1,29 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm, Field, FormSection } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm, Field, FormSection } from 'redux-form'; +import { Select } from '../form'; import { loadGroupOptions } from '../group/GroupSelect'; import { StatefulAsyncSelect } from '../ui/Select'; -const ImportAccessQueryParams = () => ( - - Permission - - Read - Write - All - Owner - None - - -); +function ImportAccessQueryParams() { + return ( + + Permission + + Read + Write + All + Owner + None + + + ); +} -function ImportAccessForm({ - error, - handleSubmit, -}) { +function ImportAccessForm({ error, handleSubmit }) { return (
{error && {error}} @@ -37,10 +35,7 @@ function ImportAccessForm({ cacheOptions isClearable /> - + - diff --git a/src/components/importaccess/ImportAccessRow.jsx b/src/components/importaccess/ImportAccessRow.jsx index 76c6afa7..28448df9 100644 --- a/src/components/importaccess/ImportAccessRow.jsx +++ b/src/components/importaccess/ImportAccessRow.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; import TableRow from '@material-ui/core/TableRow'; import Typography from '@material-ui/core/Typography'; @@ -6,17 +5,11 @@ import Typography from '@material-ui/core/Typography'; import Menu, { MenuItem } from '../ui/Menu'; import UnstyledLink from '../ui/UnstyledLink'; -export default function ImportAccessRow({ - group, - openRemove, - openEdit, -}) { +export default function ImportAccessRow({ group, openRemove, openEdit }) { return ( - - {group.name} - + {group.name} {group.permission} e.stopPropagation()}> diff --git a/src/components/importaccess/ImportAccessTable.jsx b/src/components/importaccess/ImportAccessTable.jsx index c7805c8d..34817b32 100644 --- a/src/components/importaccess/ImportAccessTable.jsx +++ b/src/components/importaccess/ImportAccessTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; diff --git a/src/components/importaccess/ImportAccessTitle.jsx b/src/components/importaccess/ImportAccessTitle.jsx index 78de7263..683fbdd7 100644 --- a/src/components/importaccess/ImportAccessTitle.jsx +++ b/src/components/importaccess/ImportAccessTitle.jsx @@ -1,13 +1,6 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; -export default function ImportAccessTitle({ - openCode, - openCreate, - onRefresh, - userName, -}) { +export default function ImportAccessTitle({ openCode, openCreate, onRefresh, userName }) { return ( diff --git a/src/components/importsettings/ImportSettingsDialog.jsx b/src/components/importsettings/ImportSettingsDialog.jsx index 132cbc4e..ade3b0bb 100644 --- a/src/components/importsettings/ImportSettingsDialog.jsx +++ b/src/components/importsettings/ImportSettingsDialog.jsx @@ -1,26 +1,20 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { submit } from 'redux-form'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { connect } from 'react-redux'; +import { submit } from 'redux-form'; -import ImportSettingsForm from './ImportSettingsForm'; -import * as formActions from '../../formactions/importsettings'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/importsettings'; + +import ImportSettingsForm from './ImportSettingsForm'; const EDIT_IMPORTSETTINGS_FORM = 'EDIT_IMPORTSETTINGS_FORM'; -function ImportSettingsDialog({ - submitForm, - closeModal, - isOpen, - history, - openSnackBar, -}) { +function ImportSettingsDialog({ submitForm, closeModal, isOpen, history, openSnackBar }) { const onSubmitSuccess = (response) => { const { importSettingsDocument } = response; const { id: settingsId } = importSettingsDocument; @@ -46,18 +40,10 @@ function ImportSettingsDialog({ - - diff --git a/src/components/importsettings/ImportSettingsDisplay.jsx b/src/components/importsettings/ImportSettingsDisplay.jsx index 9990d7ff..dfceeea8 100644 --- a/src/components/importsettings/ImportSettingsDisplay.jsx +++ b/src/components/importsettings/ImportSettingsDisplay.jsx @@ -1,24 +1,23 @@ -import React from 'react'; +import { Fragment } from 'react'; + import Divider from '@material-ui/core/Divider'; -import TextGrid from '../ui/TextGrid'; import { AccessControlType } from '../access/AccessControlDisplay'; +import TextGrid from '../ui/TextGrid'; export default function ImportSettingsDisplay({ importSettingsDocument = {} }) { const { access: accessList = [] } = importSettingsDocument; return ( <> - { - accessList.map((access, index) => ( - - - - - )) - } + {accessList.map((access, index) => ( + + + + + ))} ); } diff --git a/src/components/importsettings/ImportSettingsEditor.jsx b/src/components/importsettings/ImportSettingsEditor.jsx index ffafada6..09a816df 100644 --- a/src/components/importsettings/ImportSettingsEditor.jsx +++ b/src/components/importsettings/ImportSettingsEditor.jsx @@ -1,23 +1,25 @@ -import React from 'react'; -import Grid from '@material-ui/core/Grid'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import Switch from '@material-ui/core/Switch'; +import { PureComponent } from 'react'; + +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Divider from '@material-ui/core/Divider'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Grid from '@material-ui/core/Grid'; +import Switch from '@material-ui/core/Switch'; import { connect } from 'react-redux'; import { submit } from 'redux-form'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Divider from '@material-ui/core/Divider'; -import ImportSettingsForm from './ImportSettingsForm'; -import ImportSettingsDisplay from './ImportSettingsDisplay'; -import * as formActions from '../../formactions/importsettings'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/importsettings'; + +import ImportSettingsDisplay from './ImportSettingsDisplay'; +import ImportSettingsForm from './ImportSettingsForm'; const EDIT_IMPORTSETTINGS_FORM = 'EDIT_IMPORTSETTINGS_FORM'; -class ImportSettingsEditor extends React.PureComponent { +class ImportSettingsEditor extends PureComponent { constructor(props) { super(props); this.toggleEdit = this.toggleEdit.bind(this); @@ -32,16 +34,8 @@ class ImportSettingsEditor extends React.PureComponent { } render() { - const { - importSettingsDocument, - submitForm, - settingsId, - onRefresh, - openSnackBar, - } = this.props; - const { - isEditing, - } = this.state; + const { importSettingsDocument, submitForm, settingsId, onRefresh, openSnackBar } = this.props; + const { isEditing } = this.state; const initialValues = { importSettingsDocument, }; @@ -49,7 +43,9 @@ class ImportSettingsEditor extends React.PureComponent { this.toggleEdit(); const messageContent = 'Import Settings Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Import Settings'; @@ -58,7 +54,7 @@ class ImportSettingsEditor extends React.PureComponent { return ( <> - )} + } /> - {isEditing - ? ( - - ) - : ( - - )} + {isEditing ? ( + + ) : ( + + )} - {isEditing - && ( + {isEditing && ( <> - - diff --git a/src/components/importsettings/ImportSettingsTitle.jsx b/src/components/importsettings/ImportSettingsTitle.jsx index d0e364ab..9074792c 100644 --- a/src/components/importsettings/ImportSettingsTitle.jsx +++ b/src/components/importsettings/ImportSettingsTitle.jsx @@ -1,15 +1,9 @@ -import React from 'react'; -import DeleteForever from '@material-ui/icons/DeleteForever'; import IconButton from '@material-ui/core/IconButton'; +import DeleteForever from '@material-ui/icons/DeleteForever'; import TitleHeader from '../ui/TitleHeader'; -export default function ImportSettingsTitle({ - openCode, - onRefresh, - settingsId, - openRemove, -}) { +export default function ImportSettingsTitle({ openCode, onRefresh, settingsId, openRemove }) { return ( - )} + } /> ); } diff --git a/src/components/item/EssenceVersionCard.jsx b/src/components/item/EssenceVersionCard.jsx index 6bb233f0..3caa7e5f 100644 --- a/src/components/item/EssenceVersionCard.jsx +++ b/src/components/item/EssenceVersionCard.jsx @@ -1,28 +1,25 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import CardHeader from '@material-ui/core/CardHeader'; import Typography from '@material-ui/core/Typography'; import SquareCard from '../ui/SquareCard'; + import EssenceVersionShapeTable from './EssenceVersionShapeTable'; export default function EssenceVersionCard({ title, essenceVersionDocument, ...props }) { - if (essenceVersionDocument === undefined) { return null; } + if (essenceVersionDocument === undefined) { + return null; + } return ( {title && ( {title}
- )} + title={{title}} /> )} - + ); diff --git a/src/components/item/EssenceVersionListCard.jsx b/src/components/item/EssenceVersionListCard.jsx index d89222a5..782dc2f9 100644 --- a/src/components/item/EssenceVersionListCard.jsx +++ b/src/components/item/EssenceVersionListCard.jsx @@ -1,21 +1,21 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import CardHeader from '@material-ui/core/CardHeader'; import Typography from '@material-ui/core/Typography'; import SquareCard from '../ui/SquareCard'; + import EssenceVersionListTable from './EssenceVersionListTable'; export default function EssenceVersionListCard({ title, essenceVersionListDocument, ...props }) { - if (essenceVersionListDocument === undefined) { return null; } + if (essenceVersionListDocument === undefined) { + return null; + } return ( {title && ( {title}
- )} + title={{title}} /> )} diff --git a/src/components/item/EssenceVersionListRow.jsx b/src/components/item/EssenceVersionListRow.jsx index 4f4cb0d9..c3ac51a9 100644 --- a/src/components/item/EssenceVersionListRow.jsx +++ b/src/components/item/EssenceVersionListRow.jsx @@ -1,18 +1,16 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; import TableRowLink from '../ui/TableRowLink'; -export default function EssenceVersionListRow({ - versionId, - created, - linkTo, - textTo, -}) { +export default function EssenceVersionListRow({ versionId, created, linkTo, textTo }) { const linkProps = {}; let versionText = versionId; - if (textTo) { versionText = textTo(versionId); } - if (linkTo) { linkProps.to = linkTo(versionId); } + if (textTo) { + versionText = textTo(versionId); + } + if (linkTo) { + linkProps.to = linkTo(versionId); + } return ( {versionText} diff --git a/src/components/item/EssenceVersionListTable.jsx b/src/components/item/EssenceVersionListTable.jsx index f5563d7d..ce31d467 100644 --- a/src/components/item/EssenceVersionListTable.jsx +++ b/src/components/item/EssenceVersionListTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; @@ -7,10 +6,7 @@ import TableRow from '@material-ui/core/TableRow'; import EssenceVersionListRow from './EssenceVersionListRow'; -export default function EssenceVersionListTable({ - essenceVersionListDocument = {}, - ...props -}) { +export default function EssenceVersionListTable({ essenceVersionListDocument = {}, ...props }) { const { version: versionList = [] } = essenceVersionListDocument; return ( diff --git a/src/components/item/EssenceVersionShapeTable.jsx b/src/components/item/EssenceVersionShapeTable.jsx index b8a2b62a..53c9374d 100644 --- a/src/components/item/EssenceVersionShapeTable.jsx +++ b/src/components/item/EssenceVersionShapeTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; @@ -8,7 +7,9 @@ import TableRow from '@material-ui/core/TableRow'; import TableRowLink from '../ui/TableRowLink'; export default function EssenceVersionCard({ essenceVersionDocument, linkTo, linkProps }) { - if (essenceVersionDocument === undefined) { return null; } + if (essenceVersionDocument === undefined) { + return null; + } const { shape: shapeList = [] } = essenceVersionDocument; return ( diff --git a/src/components/item/ItemAnalyze.jsx b/src/components/item/ItemAnalyze.jsx index 81f4c2be..043da87f 100644 --- a/src/components/item/ItemAnalyze.jsx +++ b/src/components/item/ItemAnalyze.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogContent from '@material-ui/core/DialogContent'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import ItemAnalyzeForm from './ItemAnalyzeForm'; import * as formActions from '../../formactions/item'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import ItemAnalyzeForm from './ItemAnalyzeForm'; const ITEM_ANALYZE_FORM = 'ITEM_ANALYZE_FORM'; @@ -28,13 +27,17 @@ function ItemAnalyze({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Analyze Job Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Analyze Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -51,18 +54,10 @@ function ItemAnalyze({ - - diff --git a/src/components/item/ItemAnalyzeForm.jsx b/src/components/item/ItemAnalyzeForm.jsx index 47b76039..a95cf58e 100644 --- a/src/components/item/ItemAnalyzeForm.jsx +++ b/src/components/item/ItemAnalyzeForm.jsx @@ -1,30 +1,24 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import { StatefulAsyncSelect } from '../ui/Select'; -import FieldTypeArray from '../ui/FieldTypeArray'; import JobPriority from '../../const/JobPriority'; -import { KeyValuePairType } from '../ui/FormType'; import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import { loadStorageOptions } from '../storage/StorageSelect'; import AnalyzeJobType from '../ui/AnalyzeJobType'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import Field from '../ui/Field'; +import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; +import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( isClearable fullWidth /> - - + + ( ); -function ItemAnalyzeForm({ - error, - handleSubmit, - itemId, -}) { +function ItemAnalyzeForm({ error, handleSubmit, itemId }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } + - + ); diff --git a/src/components/item/ItemCollectionTable.jsx b/src/components/item/ItemCollectionTable.jsx index c020038e..4a5e07ee 100644 --- a/src/components/item/ItemCollectionTable.jsx +++ b/src/components/item/ItemCollectionTable.jsx @@ -1,17 +1,14 @@ -import React from 'react'; - import MetadataCollectionTable from '../collection/MetadataCollectionTable'; export default function ItemCollectionTable({ metadataListDocument, ...props }) { - if (metadataListDocument === undefined) { return null; } + if (metadataListDocument === undefined) { + return null; + } const { item: itemList = [] } = metadataListDocument; - if (itemList.length !== 1) { return null; } + if (itemList.length !== 1) { + return null; + } const thisItem = itemList[0] || {}; const { metadata: metadataDocument = {} } = thisItem; - return ( - - ); + return ; } diff --git a/src/components/item/ItemContent.jsx b/src/components/item/ItemContent.jsx index 1798eaa7..c40f0335 100644 --- a/src/components/item/ItemContent.jsx +++ b/src/components/item/ItemContent.jsx @@ -1,51 +1,20 @@ -import React from 'react'; - -import ItemMetadataCard from './ItemMetadataCard'; import ShapeOverviewList from '../shape/ShapeOverviewList'; import UriListCard from '../ui/UriListCard'; +import ItemMetadataCard from './ItemMetadataCard'; + export default function ItemContent({ itemDocument }) { - if (itemDocument === undefined) { return null; } - const { - id: itemId, - metadata, - thumbnails, - posters, - files, - shape, - } = itemDocument; + if (itemDocument === undefined) { + return null; + } + const { id: itemId, metadata, thumbnails, posters, files, shape } = itemDocument; return ( <> - {metadata && ( - - )} - {thumbnails && ( - - )} - {posters && ( - - )} - {files && ( - - )} - {shape && ( - - )} + {metadata && } + {thumbnails && } + {posters && } + {files && } + {shape && } ); } diff --git a/src/components/item/ItemContentParams.jsx b/src/components/item/ItemContentParams.jsx index cd0d8448..07b69e90 100644 --- a/src/components/item/ItemContentParams.jsx +++ b/src/components/item/ItemContentParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ItemContentParamsForm from './ItemContentParamsForm'; +import * as formActions from '../../formactions/item'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/item'; + +import ItemContentParamsForm from './ItemContentParamsForm'; export const ITEM_PARAMS_FORM = 'ITEM_PARAMS_FORM'; @@ -27,12 +26,16 @@ function ItemContentParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Item Display'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -53,17 +56,10 @@ function ItemContentParams({ - - diff --git a/src/components/item/ItemContentParamsForm.jsx b/src/components/item/ItemContentParamsForm.jsx index 6c330c90..98d5fa67 100644 --- a/src/components/item/ItemContentParamsForm.jsx +++ b/src/components/item/ItemContentParamsForm.jsx @@ -1,22 +1,21 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { StatefulAsyncSelect } from '../ui/Select'; +import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import { loadStorageOptions } from '../storage/StorageSelect'; import { loadStorageGroupOptions } from '../storagegroup/StorageGroupSelect'; -import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; -import { KeyValuePairType } from '../ui/FormType'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; +import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; export const queryParams = () => ( <> @@ -36,12 +35,7 @@ export const queryParams = () => ( ]} fullWidth /> - + ( isMulti creatable /> - - - - - - - - - - - - - - + + + + + + + + + + + + + + Method Type @@ -129,11 +67,7 @@ export const queryParams = () => ( AZURE_SAS - + ( fullWidth isMulti /> - - + + - )} + control={} label="Closed Files" /> - )} + control={} label="No-Auth URL" /> - )} + control={} label="Conflict" /> + } label="Terse" /> - )} - label="Terse" - /> - - )} + control={} label="Default Value" /> - )} + control={} label="Include Transient Metadata" /> ( fullWidth isMulti /> - + - )} + control={} label="Start TC" /> ); -function ItemContentParamsForm({ - error, - handleSubmit, -}) { +function ItemContentParamsForm({ error, handleSubmit }) { return ( {error && {error}} - + ); } diff --git a/src/components/item/ItemDelete.jsx b/src/components/item/ItemDelete.jsx index f1df6f9f..5daa687e 100644 --- a/src/components/item/ItemDelete.jsx +++ b/src/components/item/ItemDelete.jsx @@ -1,47 +1,37 @@ -import React from 'react'; -import { compose } from 'redux'; - -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/item'; -import ItemDeleteForm from './ItemDeleteForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import ItemDeleteForm from './ItemDeleteForm'; + const ITEM_DELETE_FORM = 'ITEM_DELETE_FORM'; -function ItemDelete({ - open, - onClose, - onSuccess, - onFail, - openSnackBar, - submitForm, - itemId, -}) { +function ItemDelete({ open, onClose, onSuccess, onFail, openSnackBar, submitForm, itemId }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Item Deleted'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Deleting Item'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + {`Delete Item ${itemId}`} - - diff --git a/src/components/item/ItemDeleteForm.jsx b/src/components/item/ItemDeleteForm.jsx index 88ab9d81..34baa6e4 100644 --- a/src/components/item/ItemDeleteForm.jsx +++ b/src/components/item/ItemDeleteForm.jsx @@ -1,21 +1,15 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - + ( ); -function ItemDeleteForm({ - error, - handleSubmit, -}) { +function ItemDeleteForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/item/ItemExportForm.jsx b/src/components/item/ItemExportForm.jsx index cdd61497..96cdbfa5 100644 --- a/src/components/item/ItemExportForm.jsx +++ b/src/components/item/ItemExportForm.jsx @@ -1,31 +1,26 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import { required } from '../../utils/FieldValidation'; import { loadExportLocationOptions } from '../exportlocation/ExportLocationSelect'; +import { TextField, Select } from '../form'; import { loadProjectionOptions } from '../projection/ProjectionSelect'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + control={} label="Metadata Sidecar" /> ( isClearable fullWidth /> - + ( dense /> - )} + control={} label="Use Original Filename" /> - )} + control={} label="Use Original Component Filename" /> ( isClearable fullWidth /> - - - + + + - )} + control={} label="Allow Missing" /> - - + + ); -function ExportForm({ - error, - handleSubmit, - itemId, -}) { +function ExportForm({ error, handleSubmit, itemId }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } + - diff --git a/src/components/item/ItemImpExportForm.jsx b/src/components/item/ItemImpExportForm.jsx index 340e5d16..b90bf2b2 100644 --- a/src/components/item/ItemImpExportForm.jsx +++ b/src/components/item/ItemImpExportForm.jsx @@ -1,31 +1,26 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import { required } from '../../utils/FieldValidation'; import { loadExportLocationOptions } from '../exportlocation/ExportLocationSelect'; +import { TextField, Select } from '../form'; import { loadProjectionOptions } from '../projection/ProjectionSelect'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + control={} label="Metadata Sidecar" /> ( isClearable fullWidth /> - + ( dense /> - )} + control={} label="Use Original Filename" /> - )} + control={} label="Use Original Component Filename" /> ( isClearable fullWidth /> - - - + + + - )} + control={} label="Allow Missing" /> - - - + + + ); -function ExportImpForm({ - error, - handleSubmit, - itemId, -}) { +function ExportImpForm({ error, handleSubmit, itemId }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } + - diff --git a/src/components/item/ItemImpImportForm.jsx b/src/components/item/ItemImpImportForm.jsx index c7c46f0a..14ffc499 100644 --- a/src/components/item/ItemImpImportForm.jsx +++ b/src/components/item/ItemImpImportForm.jsx @@ -1,31 +1,25 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import { loadStorageOptions } from '../storage/StorageSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + } /> Priority @@ -63,11 +57,7 @@ const queryParams = () => ( ))} - + ( ); -function ItemImpImportForm({ - error, - handleSubmit, - itemId, -}) { +function ItemImpImportForm({ error, handleSubmit, itemId }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } +
- +
+ + + + {terse && + fieldList.map((fieldName) => ( + + ))} + + + + {itemList.map((itemType) => ( + + ))} + + {onChangePage && onChangeRowsPerPage && ( + - - {terse && ( - fieldList.map((fieldName) => ( - - )) - )} - - - {itemList.map((itemType) => ( - - ))} - - {(onChangePage && onChangeRowsPerPage) && ( - - - - - - )} -
- + + )} + ); } diff --git a/src/components/item/ItemListTableCard.jsx b/src/components/item/ItemListTableCard.jsx index e39a1369..3da2cf37 100644 --- a/src/components/item/ItemListTableCard.jsx +++ b/src/components/item/ItemListTableCard.jsx @@ -1,10 +1,10 @@ import { compose } from 'redux'; -import ItemListTable from './ItemListTable'; - import withCard from '../../hoc/withCard'; import withPaginationForm from '../../hoc/withPaginationForm'; +import ItemListTable from './ItemListTable'; + const ItemListTableCard = compose(withCard, withPaginationForm)(ItemListTable); export default ItemListTableCard; diff --git a/src/components/item/ItemMetadataCard.jsx b/src/components/item/ItemMetadataCard.jsx index 3b8b2f30..de63a54f 100644 --- a/src/components/item/ItemMetadataCard.jsx +++ b/src/components/item/ItemMetadataCard.jsx @@ -1,16 +1,13 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; -import SquareCard from '../ui/SquareCard'; import MetadataDisplay from '../metadata/MetadataDisplay'; +import SquareCard from '../ui/SquareCard'; export default function ItemMetadataCard({ ...props }) { return ( - + ); diff --git a/src/components/item/ItemMetadataChangeSetListParams.jsx b/src/components/item/ItemMetadataChangeSetListParams.jsx index 9fb7f9d7..cff97cca 100644 --- a/src/components/item/ItemMetadataChangeSetListParams.jsx +++ b/src/components/item/ItemMetadataChangeSetListParams.jsx @@ -1,12 +1,8 @@ -import React from 'react'; -import MetadataChangeSetListParams from '../metadata/MetadataChangeSetListParams'; import * as formActions from '../../formactions/item'; +import MetadataChangeSetListParams from '../metadata/MetadataChangeSetListParams'; export default function ItemMetadataChangeSetListParams({ ...props }) { return ( - + ); } diff --git a/src/components/item/ItemMetadataDisplayParams.jsx b/src/components/item/ItemMetadataDisplayParams.jsx index 09dfc15a..f2eb7953 100644 --- a/src/components/item/ItemMetadataDisplayParams.jsx +++ b/src/components/item/ItemMetadataDisplayParams.jsx @@ -1,12 +1,6 @@ -import React from 'react'; -import MetadataDisplayParams from '../metadata/MetadataDisplayParams'; import * as formActions from '../../formactions/item'; +import MetadataDisplayParams from '../metadata/MetadataDisplayParams'; export default function ItemMetadataDisplayParams({ ...props }) { - return ( - - ); + return ; } diff --git a/src/components/item/ItemMetadataEditor.jsx b/src/components/item/ItemMetadataEditor.jsx index b57bf924..dcf70fbe 100644 --- a/src/components/item/ItemMetadataEditor.jsx +++ b/src/components/item/ItemMetadataEditor.jsx @@ -1,6 +1,5 @@ -import React from 'react'; -import MetadataEditor from '../metadata/MetadataEditor'; import * as formActions from '../../formactions/item'; +import MetadataEditor from '../metadata/MetadataEditor'; export default function ItemMetadataEditor({ metadataDocument, ...props }) { return ( diff --git a/src/components/item/ItemMetadataEditorCard.jsx b/src/components/item/ItemMetadataEditorCard.jsx index f15070b0..80f9c8d6 100644 --- a/src/components/item/ItemMetadataEditorCard.jsx +++ b/src/components/item/ItemMetadataEditorCard.jsx @@ -1,16 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import ItemMetadataEditor from './ItemMetadataEditor'; export default function ItemMetadataEditorCard({ ...props }) { return ( - + ); diff --git a/src/components/item/ItemMetadataGroupSearch.jsx b/src/components/item/ItemMetadataGroupSearch.jsx index cbd4eec4..0ce4ceeb 100644 --- a/src/components/item/ItemMetadataGroupSearch.jsx +++ b/src/components/item/ItemMetadataGroupSearch.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import CardContent from '@material-ui/core/CardContent'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ItemMetadataGroupSearchForm from './ItemMetadataGroupSearchForm'; +import * as formActions from '../../formactions/item'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/item'; + +import ItemMetadataGroupSearchForm from './ItemMetadataGroupSearchForm'; export const ITEM_METADATAGROUPSEARCH_FORM = 'ITEM_METADATAGROUPSEARCH_FORM'; @@ -73,8 +72,4 @@ function ItemMetadataGroupSearch({ ); } -export default compose( - withSnackbar, - withFormActions, - withExpansion, -)(ItemMetadataGroupSearch); +export default compose(withSnackbar, withFormActions, withExpansion)(ItemMetadataGroupSearch); diff --git a/src/components/item/ItemMetadataGroupSearchForm.jsx b/src/components/item/ItemMetadataGroupSearchForm.jsx index 5425455f..192b1309 100644 --- a/src/components/item/ItemMetadataGroupSearchForm.jsx +++ b/src/components/item/ItemMetadataGroupSearchForm.jsx @@ -1,450 +1,341 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; -import Typography from '@material-ui/core/Typography'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import Grid from '@material-ui/core/Grid'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; +import { TextField, Select } from '../form'; +import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; +import ChipInput from '../ui/ChipInput'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import ChipInput from '../ui/ChipInput'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; -import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; + import { ItemSearchTextValueType, SearchFieldType, ItemCriterionType, SearchFilterType, - FacetFilterType, SearchFacetType, SearchHighlightType, } from './ItemSearchForm'; -const ItemSearchValueType = () => ( - - +function SearchGroupType() { + return ( + <> - - - - )} - label="No Escape" + - - - - )} - label="Minimum" + - - - - )} - label="Maximum" - /> - - -); - -const ItemSearchRangeType = () => ( - <> - - - - )} - label="Exclusive Minimum" - /> - - )} - label="Exclusive Maximum" - /> - -); - -const SearchGroupType = () => ( - <> - - - - - -); + + + ); +} -const SearchOperatorType = () => ( - <> - - Operation - - AND - OR - NOT - - - - - - - - -); +function SearchOperatorType() { + return ( + <> + + Operation + + AND + OR + NOT + + + + + + + + + ); +} -export const CriterionType = () => ( - <> - - - - -); +export function CriterionType() { + return ( + <> + + + + + ); +} -export const ShapeCriterionType = () => ( - <> - - - -); +export function ShapeCriterionType() { + return ( + <> + + + + ); +} -export const CollectionCriterionType = () => ( - <> - - - - - Relation - - - Child - Parent - Descendant - Ancestor - - - -); +export function CollectionCriterionType() { + return ( + <> + + + + + Relation + + + Child + Parent + Descendant + Ancestor + + + + ); +} -export const FacetRangeType = () => ( - <> - - - -); +export function FacetRangeType() { + return ( + <> + + + + ); +} -export const SearchFacetFilterType = () => ( - <> - - - - -); +export function SearchFacetFilterType() { + return ( + <> + + + + + ); +} -export const SearchSortType = () => ( - <> - - - order - - Ascending - Descending - - - -); +export function SearchSortType() { + return ( + <> + + + order + + Ascending + Descending + + + + ); +} -export const SuggestionSearchType = () => ( - <> - - - -); +export function SuggestionSearchType() { + return ( + <> + + + + ); +} -export const AutocompleteRequestType = () => ( - <> - - - - -); +export function AutocompleteRequestType() { + return ( + <> + + + + + ); +} -export const MetadataGroupSearchType = () => ( - <> - - - - - - - - - - -); +export function MetadataGroupSearchType() { + return ( + <> + + + + + + + + + + + ); +} function ItemMetadataGroupSearchForm({ error, handleSubmit }) { return (
{error && {error}} - + - { outgoingProjectionDocument && ( - + {outgoingProjectionDocument && ( + )} ); diff --git a/src/components/item/ItemProjectionCard.jsx b/src/components/item/ItemProjectionCard.jsx index 14f43b5f..b4c0c046 100644 --- a/src/components/item/ItemProjectionCard.jsx +++ b/src/components/item/ItemProjectionCard.jsx @@ -1,16 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; -import ItemProjection from './ItemProjection'; import SquareCard from '../ui/SquareCard'; +import ItemProjection from './ItemProjection'; + function ItemProjectionCard(props) { return ( - + ); diff --git a/src/components/item/ItemProjectionForm.jsx b/src/components/item/ItemProjectionForm.jsx index b83a7d87..ec2901ca 100644 --- a/src/components/item/ItemProjectionForm.jsx +++ b/src/components/item/ItemProjectionForm.jsx @@ -1,37 +1,28 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import { loadProjectionOptions } from '../projection/ProjectionSelect'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadProjectionOptions } from '../projection/ProjectionSelect'; const queryParams = () => ( - <> - - + ); -function ItemProjectionForm({ - error, - handleSubmit, -}) { +function ItemProjectionForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/item/ItemRelation.jsx b/src/components/item/ItemRelation.jsx index 403a620d..4cc40a6f 100644 --- a/src/components/item/ItemRelation.jsx +++ b/src/components/item/ItemRelation.jsx @@ -1,39 +1,34 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import ItemRelationForm from './ItemRelationForm'; import * as formActions from '../../formactions/item'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import ItemRelationForm from './ItemRelationForm'; const ITEM_RELATION_FORM = 'ITEM_RELATION_FORM'; -function ItemRelation({ - open, - onClose, - onSuccess, - onFail, - openSnackBar, - submitForm, - itemId, -}) { +function ItemRelation({ open, onClose, onSuccess, onFail, openSnackBar, submitForm, itemId }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Relation Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Relation'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -49,18 +44,10 @@ function ItemRelation({ - - diff --git a/src/components/item/ItemRelationEditor.jsx b/src/components/item/ItemRelationEditor.jsx index 403da176..e086cd46 100644 --- a/src/components/item/ItemRelationEditor.jsx +++ b/src/components/item/ItemRelationEditor.jsx @@ -1,85 +1,85 @@ -import React from 'react'; -import { compose } from 'redux'; import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import TextGrid from '../ui/TextGrid'; -import EditorCard from '../ui/EditorCard'; -import ItemRelationFormEdit from './ItemRelationFormEdit'; import * as formActions from '../../formactions/item'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import EditorCard from '../ui/EditorCard'; +import TextGrid from '../ui/TextGrid'; + +import ItemRelationFormEdit from './ItemRelationFormEdit'; const ITEM_RELATION_FORM_EDIT = 'ITEM_RELATION_FORM_EDIT'; -export const ItemRelationType = ({ itemRelationType }) => ( - <> - {itemRelationType.direction && ( - <> - - - - - )} - {itemRelationType.value && ( - <> - - - {itemRelationType.value.map((relationMetadata) => ( - - ))} - - )} - -); +export function ItemRelationType({ itemRelationType }) { + return ( + <> + {itemRelationType.direction && ( + <> + + + + + )} + {itemRelationType.value && ( + <> + + + {itemRelationType.value.map((relationMetadata) => ( + + ))} + + )} + + ); +} -const ItemRelationDisplay = ({ itemRelationType }) => ( - -); +function ItemRelationDisplay({ itemRelationType }) { + return ; +} -const ItemRelationEdit = ({ - itemRelationType, - toggleEdit, - openSnackBar, - onRefresh, -}) => ( - { toggleEdit(); onRefresh(); }} - onSubmitFail={() => openSnackBar({ messageContent: 'Error Updating Relation', messageColor: 'secondary' })} - relationId={itemRelationType.id} - initialValues={{ - queryParams: { - direction: itemRelationType.direction.type, - relationMetadata: itemRelationType.value, - }, - }} - /> -); +function ItemRelationEdit({ itemRelationType, toggleEdit, openSnackBar, onRefresh }) { + return ( + { + toggleEdit(); + onRefresh(); + }} + onSubmitFail={() => + openSnackBar({ messageContent: 'Error Updating Relation', messageColor: 'secondary' }) + } + relationId={itemRelationType.id} + initialValues={{ + queryParams: { + direction: itemRelationType.direction.type, + relationMetadata: itemRelationType.value, + }, + }} + /> + ); +} -const ItemRelationEditor = ({ - itemRelationType, - openRemove, - submitForm, - onRefresh, - openSnackBar, -}) => ( - submitForm(ITEM_RELATION_FORM_EDIT)} - onRefresh={onRefresh} - openSnackBar={openSnackBar} - /> -); +function ItemRelationEditor({ itemRelationType, openRemove, submitForm, onRefresh, openSnackBar }) { + return ( + submitForm(ITEM_RELATION_FORM_EDIT)} + onRefresh={onRefresh} + openSnackBar={openSnackBar} + /> + ); +} export default compose(withFormActions, withUI)(ItemRelationEditor); diff --git a/src/components/item/ItemRelationForm.jsx b/src/components/item/ItemRelationForm.jsx index 29bf4cf8..dbbe3e08 100644 --- a/src/components/item/ItemRelationForm.jsx +++ b/src/components/item/ItemRelationForm.jsx @@ -1,60 +1,55 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -export const DirectionQueryParam = () => ( - - Direction - - Unidirectional - Source - Target - - -); +export function DirectionQueryParam() { + return ( + + Direction + + Unidirectional + Source + Target + + + ); +} -export const AllowDuplicateQueryParam = () => ( - - )} - label="Allow Duplicates" - /> -); +export function AllowDuplicateQueryParam() { + return ( + } + label="Allow Duplicates" + /> + ); +} -export const RelationMetadataQueryParam = () => ( - -); +export function RelationMetadataQueryParam() { + return ( + + ); +} -export const RelationItemId = () => ( - -); +export function RelationItemId() { + return ; +} export const queryParams = () => ( <> @@ -64,19 +59,12 @@ export const queryParams = () => ( ); -function ItemRelationForm({ - error, - handleSubmit, -}) { +function ItemRelationForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/item/ItemRelationFormEdit.jsx b/src/components/item/ItemRelationFormEdit.jsx index 474be5ad..74a5f0c4 100644 --- a/src/components/item/ItemRelationFormEdit.jsx +++ b/src/components/item/ItemRelationFormEdit.jsx @@ -1,8 +1,8 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; import FormSection from '../ui/FormSection'; + import { DirectionQueryParam, RelationMetadataQueryParam } from './ItemRelationForm'; export const queryParams = () => ( @@ -12,18 +12,11 @@ export const queryParams = () => ( ); -function ItemRelationFormEdit({ - error, - handleSubmit, -}) { +function ItemRelationFormEdit({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/item/ItemRelationList.jsx b/src/components/item/ItemRelationList.jsx index 13c935be..ac41f9b9 100644 --- a/src/components/item/ItemRelationList.jsx +++ b/src/components/item/ItemRelationList.jsx @@ -1,20 +1,16 @@ -import React from 'react'; - import ItemRelationEditor from './ItemRelationEditor'; export default function ItemRelationList({ itemRelationListDocument, openRemove, onRefresh }) { - if (itemRelationListDocument === undefined) { return null; } - const { - relation: relationList = [], - } = itemRelationListDocument; - return ( - relationList.map((itemRelationType) => ( - - )) - ); + if (itemRelationListDocument === undefined) { + return null; + } + const { relation: relationList = [] } = itemRelationListDocument; + return relationList.map((itemRelationType) => ( + + )); } diff --git a/src/components/item/ItemRelationListParams.jsx b/src/components/item/ItemRelationListParams.jsx index e1841742..a270aa04 100644 --- a/src/components/item/ItemRelationListParams.jsx +++ b/src/components/item/ItemRelationListParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ItemRelationListParamsForm from './ItemRelationListParamsForm'; +import * as formActions from '../../formactions/item'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/item'; + +import ItemRelationListParamsForm from './ItemRelationListParamsForm'; export const ITEM_RELATION_LIST_PARAMS_FORM = 'ITEM_RELATION_LIST_PARAMS_FORM'; @@ -27,12 +26,16 @@ function ItemRelationListParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Item Relations'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -53,10 +56,7 @@ function ItemRelationListParams({ - - diff --git a/src/components/item/ItemSearch.jsx b/src/components/item/ItemSearch.jsx index 03ea0fa4..c4055d8a 100644 --- a/src/components/item/ItemSearch.jsx +++ b/src/components/item/ItemSearch.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import CardContent from '@material-ui/core/CardContent'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ItemSearchForm from './ItemSearchForm'; +import * as formActions from '../../formactions/item'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/item'; + +import ItemSearchForm from './ItemSearchForm'; export const ITEM_SEARCH_FORM = 'ITEM_SEARCH_FORM'; @@ -30,19 +29,22 @@ function ItemSearch({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching Items'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Item Search Document @@ -59,17 +61,10 @@ function ItemSearch({
- - diff --git a/src/components/item/ItemSearchDisplay.jsx b/src/components/item/ItemSearchDisplay.jsx index c6cdff64..94fcdb20 100644 --- a/src/components/item/ItemSearchDisplay.jsx +++ b/src/components/item/ItemSearchDisplay.jsx @@ -1,511 +1,247 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; import TextGridArray from '../ui/TextGridArray'; -import TypeSection from '../ui/TypeSection'; import TypeArray from '../ui/TypeArray'; +import TypeSection from '../ui/TypeSection'; -const ItemSearchTextValueType = ({ value }) => ( - <> - - - -); - -const ItemSearchValueType = ({ value }) => ( - <> - - - - - -); +function ItemSearchTextValueType({ value }) { + return ( + <> + + + + ); +} -const ItemSearchRangeType = ({ value }) => ( - <> - - - - - -); +function ItemSearchValueType({ value }) { + return ( + <> + + + + + + ); +} -const SearchFieldType = ({ value }) => ( - <> - - - - - -); +function ItemSearchRangeType({ value }) { + return ( + <> + + + + + + ); +} -const SearchGroupType = ({ value }) => ( - <> - - - - - -); +function SearchFieldType({ value }) { + return ( + <> + + + + + + ); +} -const SearchOperatorType = ({ value }) => ( - <> - - - - - - - -); +function SearchGroupType({ value }) { + return ( + <> + + + + + + ); +} -export const SearchFilterType = ({ value }) => ( - <> - - - - - - - -); +function SearchOperatorType({ value }) { + return ( + <> + + + + + + + + ); +} -const CriterionType = ({ value }) => ( - <> - - - - -); +export function SearchFilterType({ value }) { + return ( + <> + + + + + + + + ); +} -const ShapeCriterionType = ({ value }) => ( - <> - - - -); +function CriterionType({ value }) { + return ( + <> + + + + + ); +} -const ItemCriterionType = ({ value }) => ( - <> - - - - -); +function ShapeCriterionType({ value }) { + return ( + <> + + + + ); +} -const FacetRangeType = ({ value }) => ( - <> - - - -); +function ItemCriterionType({ value }) { + return ( + <> + + + + + ); +} -const SearchFacetFilterType = ({ value }) => ( - <> - - - - -); +function FacetRangeType({ value }) { + return ( + <> + + + + ); +} -const SearchFacetType = ({ value }) => ( - <> - - - - - - - - -); +function SearchFacetFilterType({ value }) { + return ( + <> + + + + + ); +} -const SearchSortType = ({ value }) => ( - <> - - - -); +function SearchFacetType({ value }) { + return ( + <> + + + + + + + + + ); +} -const SearchHighlightType = ({ value }) => ( - <> - - - - - -); +function SearchSortType({ value }) { + return ( + <> + + + + ); +} -const SuggestionSearchType = ({ value }) => ( - <> - - - -); +function SearchHighlightType({ value }) { + return ( + <> + + + + + + ); +} -const AutocompleteRequestType = ({ value }) => ( - <> - - - - -); +function SuggestionSearchType({ value }) { + return ( + <> + + + + ); +} -export const ItemSearchType = ({ value }) => ( - <> - - - - - - - - - - - - - - - - - - -); +function AutocompleteRequestType({ value }) { + return ( + <> + + + + + ); +} -export default function ItemSearchDisplay({ - itemSearchDocument, -}) { +export function ItemSearchType({ value }) { return ( <> + + + + + + + + + + + + + + + + ); } + +export default function ItemSearchDisplay({ itemSearchDocument }) { + return ; +} diff --git a/src/components/item/ItemSearchForm.jsx b/src/components/item/ItemSearchForm.jsx index 754e6653..ff7ae33c 100644 --- a/src/components/item/ItemSearchForm.jsx +++ b/src/components/item/ItemSearchForm.jsx @@ -1,688 +1,622 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; -import Typography from '@material-ui/core/Typography'; +import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import Grid from '@material-ui/core/Grid'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import FieldTypeArray from '../ui/FieldTypeArray'; +import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; +import { TextField, Select } from '../form'; +import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; +import Field from '../ui/Field'; +import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; -import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; -export const ItemSearchTextValueType = () => ( - - - - - - - )} - label="No Escape" - /> +export function ItemSearchTextValueType() { + return ( + + + + + + } + label="No Escape" + /> + - -); + ); +} -export const ItemSearchValueType = () => ( - - - +export function ItemSearchValueType() { + return ( + + + + + + } + label="No Escape" + /> + + + } + label="Minimum" + /> + + + } + label="Maximum" + /> + - - } - label="No Escape" + ); +} + +export function ItemSearchRangeType() { + return ( + <> + - - + } - label="Minimum" + control={} + label="Exclusive Minimum" /> - - } - label="Maximum" + control={} + label="Exclusive Maximum" /> - - -); - -export const ItemSearchRangeType = () => ( - <> - - - } - label="Exclusive Minimum" - /> - } - label="Exclusive Maximum" - /> - -); + + ); +} -export const SearchFieldType = () => ( - <> - - - - - Target - - Item - Shape - File - - - -); +export function SearchFieldType() { + return ( + <> + + + + + Target + + Item + Shape + File + + + + ); +} -export const SearchGroupType = () => ( - <> - - - - - -); +export function SearchGroupType() { + return ( + <> + + + + + + ); +} -export const SearchOperatorType = () => ( - <> - - Operation - - AND - OR - NOT - - - - - - - - -); +export function SearchOperatorType() { + return ( + <> + + Operation + + AND + OR + NOT + + + + + + + + + ); +} -export const SearchFilterType = () => ( - <> - - - Operation - - AND - OR - NOT - - - - - - - -); +export function SearchFilterType() { + return ( + <> + + + Operation + + AND + OR + NOT + + + + + + + + ); +} -export const CriterionType = () => ( - <> - - - - -); +export function CriterionType() { + return ( + <> + + + + + ); +} -export const ShapeCriterionType = () => ( - <> - - - -); +export function ShapeCriterionType() { + return ( + <> + + + + ); +} -export const ItemCriterionType = () => ( - <> - - - - -); +export function ItemCriterionType() { + return ( + <> + + + + + ); +} -export const CollectionCriterionType = () => ( - <> - - - - - Relation - - - Child - Parent - Descendant - Ancestor - - - -); +export function CollectionCriterionType() { + return ( + <> + + + + + Relation + + + Child + Parent + Descendant + Ancestor + + + + ); +} -export const FacetRangeType = () => ( - <> - - - -); +export function FacetRangeType() { + return ( + <> + + + + ); +} -export const FacetFilterType = () => ( - <> - - - - -); +export function FacetFilterType() { + return ( + <> + + + + + ); +} -export const SearchFacetFilterType = () => ( - <> - - - - -); +export function SearchFacetFilterType() { + return ( + <> + + + + + ); +} -export const SearchFacetType = () => ( - <> - - - - - )} - label="Count" - /> - - - - -); +export function SearchFacetType() { + return ( + <> + + + + } label="Count" /> + + + + + ); +} -export const SearchSortType = () => ( - <> - - - order - - Ascending - Descending - - - -); +export function SearchSortType() { + return ( + <> + + + order + + Ascending + Descending + + + + ); +} -export const SearchHighlightType = () => ( - <> - - - )} - label="Matching Only" - /> - - - -); +export function SearchHighlightType() { + return ( + <> + + } + label="Matching Only" + /> + + + + ); +} -export const SuggestionSearchType = () => ( - <> - - - -); +export function SuggestionSearchType() { + return ( + <> + + + + ); +} -export const AutocompleteRequestType = () => ( - <> - - - - -); +export function AutocompleteRequestType() { + return ( + <> + + + + + ); +} -export const ItemSearchType = () => ( - <> - - - - - - Intervals - - Generic - Timed - All - - - - - - - - - - - - - - - - -); +export function ItemSearchType() { + return ( + <> + + + + + + Intervals + + Generic + Timed + All + + + + + + + + + + + + + + + + + ); +} -function ItemSearchForm({ - error, - handleSubmit, -}) { +function ItemSearchForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/item/ItemSearchParamsForm.jsx b/src/components/item/ItemSearchParamsForm.jsx index 5f82e113..40ef86b8 100644 --- a/src/components/item/ItemSearchParamsForm.jsx +++ b/src/components/item/ItemSearchParamsForm.jsx @@ -1,18 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; -import { TextField, Select } from '../form'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField, Select } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { - queryParams as contentQueryParams, -} from './ItemContentParamsForm'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; + +import { queryParams as contentQueryParams } from './ItemContentParamsForm'; const queryParams = () => ( <> @@ -23,51 +21,13 @@ const queryParams = () => ( Library
- - )} - label="Count" - /> - - )} - label="Save" - /> - - - - - + } label="Count" /> + } label="Save" /> + + + + + Update Mode @@ -77,32 +37,18 @@ const queryParams = () => ( - )} + control={} label="Auto Refresh" /> ); -function ItemSearchParamsForm({ - error, - handleSubmit, -}) { +function ItemSearchParamsForm({ error, handleSubmit }) { return (
{error && {error}} - - + + - diff --git a/src/components/item/ItemSequenceDisplay.jsx b/src/components/item/ItemSequenceDisplay.jsx index 0c07b4dd..f826d047 100644 --- a/src/components/item/ItemSequenceDisplay.jsx +++ b/src/components/item/ItemSequenceDisplay.jsx @@ -1,5 +1,3 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; function ItemSequenceDisplay({ value, variant }) { diff --git a/src/components/item/ItemSequenceEditor.jsx b/src/components/item/ItemSequenceEditor.jsx index d4eda99d..9c34a46a 100644 --- a/src/components/item/ItemSequenceEditor.jsx +++ b/src/components/item/ItemSequenceEditor.jsx @@ -1,23 +1,14 @@ -import React from 'react'; - import * as formActions from '../../formactions/sequence'; - -import Editor from '../ui/Editor'; import withUI from '../../hoc/withUI'; +import formatXML from '../../utils/formatXML'; +import Editor from '../ui/Editor'; + import ItemSequenceDisplay from './ItemSequenceDisplay'; import ItemSequenceForm from './ItemSequenceForm'; -import formatXML from '../../utils/formatXML'; const EDIT_ITEM_SEQUENCE_FORM = 'EDIT_ITEM_SEQUENCE_FORM'; -function ItemSequenceEditor({ - body, - openSnackBar, - onRefresh, - contentType, - itemId, - format, -}) { +function ItemSequenceEditor({ body, openSnackBar, onRefresh, contentType, itemId, format }) { const onSubmitSuccess = () => { const messageContent = 'Sequence Saved'; openSnackBar({ messageContent }); diff --git a/src/components/item/ItemSequenceForm.jsx b/src/components/item/ItemSequenceForm.jsx index abc044b4..f1510be7 100644 --- a/src/components/item/ItemSequenceForm.jsx +++ b/src/components/item/ItemSequenceForm.jsx @@ -1,11 +1,11 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; + import { TextField } from '../form'; +import CodeField from '../ui/CodeField'; import Field from '../ui/Field'; -import InitialDisabledTextField from '../ui/InitialDisabledTextField'; import FormSection from '../ui/FormSection'; -import CodeField from '../ui/CodeField'; +import InitialDisabledTextField from '../ui/InitialDisabledTextField'; const queryParams = () => ( ( ); -const ItemSequenceForm = ({ - error, - handleSubmit, - codeFieldMode = 'application/xml', -}) => ( -
- {error && {error}} - - - - - - - diff --git a/src/components/item/ItemShapeCreateForm.jsx b/src/components/item/ItemShapeCreateForm.jsx index 29716642..b155afae 100644 --- a/src/components/item/ItemShapeCreateForm.jsx +++ b/src/components/item/ItemShapeCreateForm.jsx @@ -1,16 +1,15 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { StatefulAsyncSelect } from '../ui/Select'; import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; -import { required } from '../../utils/FieldValidation'; +import BoolCheckbox from '../ui/BoolCheckbox'; import CodeField from '../ui/CodeField'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> @@ -24,38 +23,18 @@ const queryParams = () => ( fullWidth /> - )} + control={} label="Update Item Metadata" /> - ); -function ItemShapeCreateForm({ - error, - handleSubmit, - itemId, -}) { +function ItemShapeCreateForm({ error, handleSubmit, itemId }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } + { const messageContent = 'Thumbnail Job Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Thumbnail Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -52,18 +55,10 @@ function ItemThumbnail({ - - diff --git a/src/components/item/ItemThumbnailDeleteDialog.jsx b/src/components/item/ItemThumbnailDeleteDialog.jsx index 6f99c109..6164aaab 100644 --- a/src/components/item/ItemThumbnailDeleteDialog.jsx +++ b/src/components/item/ItemThumbnailDeleteDialog.jsx @@ -1,44 +1,33 @@ -import React from 'react'; -import { compose } from 'redux'; -import { thumbnail as ThumbnailApi } from '@vidispine/vdt-api'; - -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogActions from '@material-ui/core/DialogActions'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import { compose } from 'redux'; + +import { thumbnail as ThumbnailApi } from '@vidispine/vdt-api'; import withUI from '../../hoc/withUI'; import parseThumbnailUri from '../../utils/parseThumbnailUri'; export const DIALOG_NAME = 'ITEMTHUMBNAILDELETE_DIALOG'; -function ItemThumbnailDeleteDialog({ - open, - onClose, - uri, - onSuccess, - onError, - openSnackBar, -}) { +function ItemThumbnailDeleteDialog({ open, onClose, uri, onSuccess, onError, openSnackBar }) { if (open === false) return null; - const { - resourceId, itemId, time, isPoster, - } = parseThumbnailUri(uri); - const apiHandler = isPoster - ? ThumbnailApi.removePoster - : ThumbnailApi.removeThumbnail; - const onClick = () => apiHandler({ resourceId, itemId, time }) - .then(() => { - const messageContent = 'Thumbnail Deleted'; - openSnackBar({ messageContent }); - if (onSuccess) onSuccess(); - onClose(); - }) - .catch(() => { - const messageContent = 'Error Deleting Thumbnail'; - openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onError) onError(); - }); + const { resourceId, itemId, time, isPoster } = parseThumbnailUri(uri); + const apiHandler = isPoster ? ThumbnailApi.removePoster : ThumbnailApi.removeThumbnail; + const onClick = () => + apiHandler({ resourceId, itemId, time }) + .then(() => { + const messageContent = 'Thumbnail Deleted'; + openSnackBar({ messageContent }); + if (onSuccess) onSuccess(); + onClose(); + }) + .catch(() => { + const messageContent = 'Error Deleting Thumbnail'; + openSnackBar({ messageContent, messageColor: 'secondary' }); + if (onError) onError(); + }); return ( {`Remove ${isPoster ? 'Poster' : 'Thumbnail'} ${time}?`} @@ -54,6 +43,4 @@ function ItemThumbnailDeleteDialog({ ); } -export default compose( - withUI, -)(ItemThumbnailDeleteDialog); +export default compose(withUI)(ItemThumbnailDeleteDialog); diff --git a/src/components/item/ItemThumbnailForm.jsx b/src/components/item/ItemThumbnailForm.jsx index 0a39aaff..e8b94736 100644 --- a/src/components/item/ItemThumbnailForm.jsx +++ b/src/components/item/ItemThumbnailForm.jsx @@ -1,75 +1,58 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; import InputLabel from '@material-ui/core/InputLabel'; -import { TextField, Select } from '../form'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import ChipInput from '../ui/ChipInput'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import JobPriority from '../../const/JobPriority'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = ({ variant }) => ( <> {variant !== 'thumbnail' && ( - <> - - - - - Poster Format - - JPEG - PNG - - - + <> + + + + + Poster Format + + JPEG + PNG + + + )} {variant !== 'poster' && ( - <> - - - - + <> + + + + )} Priority @@ -89,18 +72,8 @@ const queryParams = ({ variant }) => ( arrayHeader dense /> - - + + ( fullWidth isMulti /> - - - + + + ( ); -function ItemThumbnailForm({ - error, - handleSubmit, - variant, - itemId, -}) { +function ItemThumbnailForm({ error, handleSubmit, variant, itemId }) { return ( {error && {error}} - {!itemId && ( - - )} + {!itemId && } { let [output] = thisUri.split('?'); diff --git a/src/components/item/ItemThumbnailMenu.jsx b/src/components/item/ItemThumbnailMenu.jsx index 355be1a1..18596bb2 100644 --- a/src/components/item/ItemThumbnailMenu.jsx +++ b/src/components/item/ItemThumbnailMenu.jsx @@ -1,12 +1,10 @@ -import React from 'react'; - -import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; -import Menu, { MenuItem } from '../ui/Menu'; import withModal from '../../hoc/withModal'; import downloadThumbnail from '../../utils/downloadThumbnail'; import parseThumbnailUri from '../../utils/parseThumbnailUri'; +import Menu, { MenuItem } from '../ui/Menu'; import { DIALOG_NAME as ITEMTHUMBNAILDELETE_DIALOG } from './ItemThumbnailDeleteDialog'; @@ -19,11 +17,12 @@ const styles = (theme) => ({ function ItemThumbnailMenu({ classes, uri, onOpen }) { const onDelete = () => onOpen({ modalName: ITEMTHUMBNAILDELETE_DIALOG, uri }); const onDownload = () => { - const { - resourceId, itemId, time, isPoster, - } = parseThumbnailUri(uri); + const { resourceId, itemId, time, isPoster } = parseThumbnailUri(uri); downloadThumbnail({ - resourceId, itemId, time, isPoster, + resourceId, + itemId, + time, + isPoster, }); }; return ( diff --git a/src/components/item/ItemThumbnailSpritesheetDisplay.jsx b/src/components/item/ItemThumbnailSpritesheetDisplay.jsx index d5596d5d..a2bdb2ba 100644 --- a/src/components/item/ItemThumbnailSpritesheetDisplay.jsx +++ b/src/components/item/ItemThumbnailSpritesheetDisplay.jsx @@ -1,51 +1,37 @@ -import React from 'react'; import TextGrid from '../ui/TextGrid'; -import TypeSection from '../ui/TypeSection'; import TypeArray from '../ui/TypeArray'; +import TypeSection from '../ui/TypeSection'; -const ComplexType = ({ value = {} }) => ( - <> - - - - - - - -); -const ThumbnailSpriteSheetType = ({ value = {} }) => ( - <> - - - - - -); - -function ItemThumbnailSpritesheetDisplay({ - thumbnailSpriteSheetDocument, -}) { +function ComplexType({ value = {} }) { + return ( + <> + + + + + + + + ); +} +function ThumbnailSpriteSheetType({ value = {} }) { return ( - + <> + + + + + ); } +function ItemThumbnailSpritesheetDisplay({ thumbnailSpriteSheetDocument }) { + return ; +} + export default ItemThumbnailSpritesheetDisplay; diff --git a/src/components/item/ItemThumbnailSpritesheetImage.jsx b/src/components/item/ItemThumbnailSpritesheetImage.jsx index 134813c2..d98c8a39 100644 --- a/src/components/item/ItemThumbnailSpritesheetImage.jsx +++ b/src/components/item/ItemThumbnailSpritesheetImage.jsx @@ -1,29 +1,23 @@ -import React from 'react'; import ImgExpandButton from '../ui/ImgExpandButton'; -const spritesheetPathToUrl = ({ thumbnailSpriteSheetDocument, baseUrl }) => { +const spritesheetPathToUrl = ({ thumbnailSpriteSheetDocument, baseURL }) => { let imgUrl = thumbnailSpriteSheetDocument?.url?.[0]; if (imgUrl === undefined) return undefined; imgUrl = imgUrl.replaceAll('/API/', '/APInoauth/'); - if (baseUrl) { + if (baseURL) { const url = new URL(imgUrl); - imgUrl = [baseUrl, url.pathname, url.search].join(''); + imgUrl = [baseURL, url.pathname, url.search].join(''); } return imgUrl; }; -function ItemThumbnailSpritesheetImage({ - thumbnailSpriteSheetDocument, - baseUrl, -}) { +function ItemThumbnailSpritesheetImage({ thumbnailSpriteSheetDocument, baseURL }) { const imgSrc = spritesheetPathToUrl({ thumbnailSpriteSheetDocument, - baseUrl, + baseURL, }); if (imgSrc === undefined) return null; - return ( - - ); + return ; } export default ItemThumbnailSpritesheetImage; diff --git a/src/components/item/ItemThumbnailSpritesheetParams.jsx b/src/components/item/ItemThumbnailSpritesheetParams.jsx index 54c9cc03..07de4d00 100644 --- a/src/components/item/ItemThumbnailSpritesheetParams.jsx +++ b/src/components/item/ItemThumbnailSpritesheetParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ItemThumbnailSpritesheetParamsForm from './ItemThumbnailSpritesheetParamsForm'; +import * as formActions from '../../formactions/item'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/item'; + +import ItemThumbnailSpritesheetParamsForm from './ItemThumbnailSpritesheetParamsForm'; export const ITEM_THUMBNAILSPRITESHEET_PARAMS_FORM = 'ITEM_THUMBNAILSPRITESHEET_PARAMS_FORM'; @@ -69,7 +68,4 @@ function ItemThumbnailSpritesheetParams({ ); } -export default compose( - withSnackbar, - withFormActions, -)(ItemThumbnailSpritesheetParams); +export default compose(withSnackbar, withFormActions)(ItemThumbnailSpritesheetParams); diff --git a/src/components/item/ItemThumbnailSpritesheetParamsForm.jsx b/src/components/item/ItemThumbnailSpritesheetParamsForm.jsx index 89d2e2b9..6d14c8c5 100644 --- a/src/components/item/ItemThumbnailSpritesheetParamsForm.jsx +++ b/src/components/item/ItemThumbnailSpritesheetParamsForm.jsx @@ -1,24 +1,21 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; export const queryParams = () => ( - <> - - noauth-url - - True - False - - - + + noauth-url + + True + False + + ); export const headers = () => ( @@ -39,11 +36,7 @@ function ItemThumbnailSpritesheetParamsForm({ error, handleSubmit }) { return ( {error && {error}} - + ); diff --git a/src/components/item/ItemTitle.jsx b/src/components/item/ItemTitle.jsx index 803619a6..278d9aa7 100644 --- a/src/components/item/ItemTitle.jsx +++ b/src/components/item/ItemTitle.jsx @@ -1,42 +1,43 @@ -import React from 'react'; +import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; -import Typography from '@material-ui/core/Typography'; import Tooltip from '@material-ui/core/Tooltip'; -import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; +import Typography from '@material-ui/core/Typography'; import ArrowForwardIos from '@material-ui/icons/ArrowForwardIos'; -import Grid from '@material-ui/core/Grid'; +import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; import { Link } from 'react-router-dom'; -import TitleHeader from '../ui/TitleHeader'; +import routes from '../../const/routes'; +import { withModalNoRouter } from '../../hoc/withModal'; import Menu, { MenuItem } from '../ui/Menu'; +import TitleHeader from '../ui/TitleHeader'; import UnstyledLink from '../ui/UnstyledLink'; -import { withModalNoRouter } from '../../hoc/withModal'; -import routes from '../../const/routes'; -export const ItemHeading = ({ itemId }) => ( - - - - Item - - - - - - - - - - {itemId} - +export function ItemHeading({ itemId }) { + return ( + + + + Item + + + + + + + + + + {itemId} + + - -); + ); +} function ItemTitle({ itemId, @@ -74,13 +75,13 @@ function ItemTitle({ breadcrumbList={ Array.isArray(breadcrumbList) ? [ - { title: 'Item', to: routes.itemList() }, - { title: itemId, to: routes.item({ itemId }) }, - ...breadcrumbList, - ] + { title: 'Item', to: routes.itemList() }, + { title: itemId, to: routes.item({ itemId }) }, + ...breadcrumbList, + ] : undefined } - actionComponent={( + actionComponent={ <> {createModal && ( @@ -120,18 +121,12 @@ function ItemTitle({ Create Shape ) : null} - + - - Create Shape Placeholder - + Create Shape Placeholder - onOpen({ modalName: addToCollectionModal })} - > + onOpen({ modalName: addToCollectionModal })}> Add To Collection onOpen({ modalName: relationModal })}> @@ -152,9 +147,7 @@ function ItemTitle({ onOpen({ modalName: posterModal })}> Create Poster - onOpen({ modalName: createSequenceModal })} - > + onOpen({ modalName: createSequenceModal })}> Create Sequence onOpen({ modalName: exportModal })}> @@ -167,15 +160,13 @@ function ItemTitle({ Delete Item {removeAllShapesModal ? ( - onOpen({ modalName: removeAllShapesModal })} - > + onOpen({ modalName: removeAllShapesModal })}> Delete All Shapes ) : null} - )} + } {...props} /> ); diff --git a/src/components/item/ItemTranscode.jsx b/src/components/item/ItemTranscode.jsx index 8d7569f2..24206ddf 100644 --- a/src/components/item/ItemTranscode.jsx +++ b/src/components/item/ItemTranscode.jsx @@ -1,39 +1,34 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogContent from '@material-ui/core/DialogContent'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import ItemTranscodeForm from './ItemTranscodeForm'; import * as formActions from '../../formactions/item'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import ItemTranscodeForm from './ItemTranscodeForm'; const ITEM_TRANSCODE_FORM = 'EDIT_ITEM_TRANSCODE_FORM'; -function ItemTranscode({ - open, - onClose, - onSuccess, - onFail, - openSnackBar, - submitForm, - itemId, -}) { +function ItemTranscode({ open, onClose, onSuccess, onFail, openSnackBar, submitForm, itemId }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Transcode Job Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Transcode Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -49,18 +44,10 @@ function ItemTranscode({ - - diff --git a/src/components/item/ItemTranscodeForm.jsx b/src/components/item/ItemTranscodeForm.jsx index a8b84194..a362cade 100644 --- a/src/components/item/ItemTranscodeForm.jsx +++ b/src/components/item/ItemTranscodeForm.jsx @@ -1,23 +1,22 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import ChipInput from '../ui/ChipInput'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import { loadStorageOptions } from '../storage/StorageSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; -import FormSection from '../ui/FormSection'; +import ChipInput from '../ui/ChipInput'; import Field from '../ui/Field'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; -import { loadStorageOptions } from '../storage/StorageSelect'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> @@ -45,20 +44,9 @@ const queryParams = () => ( control={} label="Create Thumbnails" /> - + - + ( dense /> - - + + ( ); -function ItemTranscodeForm({ - error, - handleSubmit, - itemId, -}) { +function ItemTranscodeForm({ error, handleSubmit, itemId }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } + - diff --git a/src/components/item/ItemUriParamsForm.jsx b/src/components/item/ItemUriParamsForm.jsx index 77afc6a3..2c60ae8a 100644 --- a/src/components/item/ItemUriParamsForm.jsx +++ b/src/components/item/ItemUriParamsForm.jsx @@ -1,26 +1,21 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; -import { TextField, Select } from '../form'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import StorageTypes from '../../const/StorageTypes'; +import { TextField, Select } from '../form'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; -import StorageTypes from '../../const/StorageTypes'; const queryParams = () => ( <> - + ( fullWidth isMulti /> - + StorageType @@ -53,35 +44,19 @@ const queryParams = () => ( AZURE_SAS - + - )} + control={} label="Closed Files" /> ); -function ItemUriParamsForm({ - error, - handleSubmit, -}) { +function ItemUriParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/javascript/TestCard.jsx b/src/components/javascript/TestCard.jsx index 3b66667d..ec143bb1 100644 --- a/src/components/javascript/TestCard.jsx +++ b/src/components/javascript/TestCard.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; -import CardContent from '@material-ui/core/CardContent'; import Splitter, { SplitDirection, GutterTheme } from '@devbookhq/splitter'; +import CardContent from '@material-ui/core/CardContent'; +import red from '@material-ui/core/colors/red'; import { useTheme, withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; -import red from '@material-ui/core/colors/red'; +import { compose } from 'redux'; -import withSnackbar from '../../hoc/withSnackbar'; -import withFormActions from '../../hoc/withFormActions'; import * as formActions from '../../formactions/javascript'; +import withFormActions from '../../hoc/withFormActions'; +import withSnackbar from '../../hoc/withSnackbar'; +import formatJSON from '../../utils/formatJSON'; +import CodeMirror from '../ui/CodeMirror'; import SquareCard from '../ui/SquareCard'; import TestForm from './TestForm'; -import formatJSON from '../../utils/formatJSON'; -import CodeMirror from '../ui/CodeMirror'; const javascriptDocument = `/* global api */ const requestBody = { @@ -52,10 +51,8 @@ const styles = (theme) => ({ flexGrow: 1, overflow: 'auto', '& .CodeMirror-gutters': { - backgroundColor: - ({ error }) => (error !== undefined ? red.A700 : 'unset'), - text: - ({ error }) => (error !== undefined ? theme.palette.common.white : 'unset'), + backgroundColor: ({ error }) => (error !== undefined ? red.A700 : 'unset'), + text: ({ error }) => (error !== undefined ? theme.palette.common.white : 'unset'), }, }, }); @@ -89,65 +86,57 @@ function TestCard({ const theme = useTheme(); const gutterTheme = theme?.palette?.type === 'light' ? GutterTheme.Light : GutterTheme.Dark; return ( - <> -
- - - +
+ + + + + Input + + + + + + +
- Input + {error === undefined ? 'Result' : 'Error'} - - - - - -
- - {error === undefined ? 'Result' : 'Error'} - - {result !== undefined || error !== undefined ? ( - - ) : null} -
-
-
- -
- + {result !== undefined || error !== undefined ? ( + + ) : null} +
+
+
+
+
); } diff --git a/src/components/javascript/TestForm.jsx b/src/components/javascript/TestForm.jsx index 9b6add02..92fbc37b 100644 --- a/src/components/javascript/TestForm.jsx +++ b/src/components/javascript/TestForm.jsx @@ -1,13 +1,8 @@ -import React from 'react'; import { reduxForm, Field } from 'redux-form'; import CodeField from '../ui/CodeField'; -function TestForm({ - handleSubmit, - className, - style, -}) { +function TestForm({ handleSubmit, className, style }) { return (
{ const messageContent = 'Job Abort Requested'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -35,12 +32,7 @@ function JobAbort({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + {`Abort Job ${jobId}`} - - diff --git a/src/components/job/JobAbortForm.jsx b/src/components/job/JobAbortForm.jsx index ca4a65fd..1ff24aa2 100644 --- a/src/components/job/JobAbortForm.jsx +++ b/src/components/job/JobAbortForm.jsx @@ -1,43 +1,24 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - - - )} - label="Cleanup" - /> + + } label="Cleanup" /> ); -function JobAbortForm({ - error, - handleSubmit, -}) { +function JobAbortForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/job/JobCreateForm.jsx b/src/components/job/JobCreateForm.jsx index e5dc12df..9a6cb98b 100644 --- a/src/components/job/JobCreateForm.jsx +++ b/src/components/job/JobCreateForm.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import JobPriority from '../../const/JobPriority'; +import { TextField, Select } from '../form'; +import { loadJobTypeOptions } from '../jobtype/JobTypeSelect'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadJobTypeOptions } from '../jobtype/JobTypeSelect'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { TextField, Select } from '../form'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> @@ -43,11 +42,7 @@ const queryParams = () => ( ))}
- + ( ); -function JobCreateForm({ - error, - handleSubmit, -}) { +function JobCreateForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/job/JobFilter.jsx b/src/components/job/JobFilter.jsx index 149a4580..418b6cd8 100644 --- a/src/components/job/JobFilter.jsx +++ b/src/components/job/JobFilter.jsx @@ -1,18 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; -import Divider from '@material-ui/core/Divider'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; +import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; import * as formActions from '../../formactions/job'; -import JobFilterForm from './JobFilterForm'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import JobFilterForm from './JobFilterForm'; + function JobFilter({ onClose, onSuccess, @@ -23,7 +23,9 @@ function JobFilter({ changeForm, }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Listing Jobs'; @@ -61,17 +63,10 @@ function JobFilter({ - - diff --git a/src/components/job/JobFilterForm.jsx b/src/components/job/JobFilterForm.jsx index efc31be9..cd055f2f 100644 --- a/src/components/job/JobFilterForm.jsx +++ b/src/components/job/JobFilterForm.jsx @@ -1,76 +1,37 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import FieldTypeArray from '../ui/FieldTypeArray'; -import { StatefulAsyncSelect } from '../ui/Select'; +import JobStates from '../../const/JobStates'; +import { TextField, Select } from '../form'; import { loadJobTypeOptions } from '../jobtype/JobTypeSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; -import JobStates from '../../const/JobStates'; +import Field from '../ui/Field'; +import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + - )} + control={} label="Include Metadata" /> + } label="Only IDs" /> - )} - label="Only IDs" - /> - - )} + control={} label="Include Steps" /> - - - - + + + + State @@ -91,50 +52,21 @@ const queryParams = () => ( isClearable fullWidth /> - - - + + + - )} + control={} label="Only My User" /> ); -function JobFilterForm({ - error, - handleSubmit, -}) { +function JobFilterForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/job/JobRow.jsx b/src/components/job/JobRow.jsx index 274e2c50..f5f62d82 100644 --- a/src/components/job/JobRow.jsx +++ b/src/components/job/JobRow.jsx @@ -1,13 +1,11 @@ -import React from 'react'; import moment from 'moment'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRowLink'; + import JobStatus from './JobStatus'; -export default function JobListRow({ - jobDocument, -}) { +export default function JobListRow({ jobDocument }) { let durationHuman; const startMoment = moment(jobDocument.started); if (jobDocument.finished) { @@ -24,13 +22,19 @@ export default function JobListRow({ {jobDocument.jobId} {jobDocument.user} - {jobDocument.started ? moment(jobDocument.started).format('YYYY-MM-DD HH:mm').toString() : ''} + {jobDocument.started + ? moment(jobDocument.started).format('YYYY-MM-DD HH:mm').toString() + : ''} - {jobDocument.finished ? moment(jobDocument.finished).format('YYYY-MM-DD HH:mm').toString() : ''} + {jobDocument.finished + ? moment(jobDocument.finished).format('YYYY-MM-DD HH:mm').toString() + : ''} {durationHuman} - + + + {jobDocument.type} {jobDocument.priority} diff --git a/src/components/job/JobStatus.jsx b/src/components/job/JobStatus.jsx index 27466fea..283f06d3 100644 --- a/src/components/job/JobStatus.jsx +++ b/src/components/job/JobStatus.jsx @@ -1,27 +1,23 @@ -import React from 'react'; import Chip from '@material-ui/core/Chip'; import startCase from 'lodash.startcase'; -import { - OnlineIcon, - OfflineIcon, - WarningIcon, - LoadingIcon, -} from '../ui/StatusIcon'; import { OK_STATES, WARNING_STATES, RUNNING_STATES } from '../../const/JobStates'; +import { OnlineIcon, OfflineIcon, WarningIcon, LoadingIcon } from '../ui/StatusIcon'; -const JobStatus = ({ jobDocument }) => { - if (jobDocument === undefined) { return null; } +function JobStatus({ jobDocument }) { + if (jobDocument === undefined) { + return null; + } const { status } = jobDocument; const isLoading = RUNNING_STATES.includes(status); if (OK_STATES.includes(status)) { return ( - )} + } label={startCase(status.toLowerCase())} /> ); @@ -29,25 +25,25 @@ const JobStatus = ({ jobDocument }) => { if (WARNING_STATES.includes(status)) { return ( - )} + } label={startCase(status.toLowerCase())} /> ); } return ( - )} + } label={status ? startCase(status.toLowerCase()) : 'Unknown'} /> ); -}; +} export default JobStatus; diff --git a/src/components/job/JobTitle.jsx b/src/components/job/JobTitle.jsx index 7d22f967..a34cf277 100644 --- a/src/components/job/JobTitle.jsx +++ b/src/components/job/JobTitle.jsx @@ -1,21 +1,20 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; -import TitleHeader from '../ui/TitleHeader'; -import Menu, { MenuItem } from '../ui/Menu'; +import { RUNNING_STATES } from '../../const/JobStates'; import { withModalNoRouter } from '../../hoc/withModal'; +import Menu, { MenuItem } from '../ui/Menu'; +import TitleHeader from '../ui/TitleHeader'; + import JobStatus from './JobStatus'; -import { RUNNING_STATES } from '../../const/JobStates'; -const RunningMenuItem = ({ - jobDocument, - priorityDialog, - abortDialog, - onOpen, -}) => { - if (jobDocument === undefined) { return null; } +function RunningMenuItem({ jobDocument, priorityDialog, abortDialog, onOpen }) { + if (jobDocument === undefined) { + return null; + } const { status } = jobDocument; - if (!RUNNING_STATES.includes(status)) { return null; } + if (!RUNNING_STATES.includes(status)) { + return null; + } return ( <> onOpen({ modalName: priorityDialog })}> @@ -26,7 +25,7 @@ const RunningMenuItem = ({ ); -}; +} function JobTitle({ onOpen, @@ -42,7 +41,7 @@ function JobTitle({ parentTo="/job/" helpTo="/ref/job.html" codeModal="JobDocument" - iconList={( + iconList={ <> @@ -60,7 +59,7 @@ function JobTitle({ - )} + } {...props} /> ); diff --git a/src/components/jobtype/JobTypeDialog.jsx b/src/components/jobtype/JobTypeDialog.jsx index 3aeaebf4..6dad74e2 100644 --- a/src/components/jobtype/JobTypeDialog.jsx +++ b/src/components/jobtype/JobTypeDialog.jsx @@ -1,33 +1,29 @@ -import React from 'react'; -import { compose } from 'redux'; -import Divider from '@material-ui/core/Divider'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogContentText from '@material-ui/core/DialogContentText'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import JobTypeForm from './JobTypeForm'; import * as formActions from '../../formactions/taskdefinition'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import JobTypeForm from './JobTypeForm'; const EDIT_JOBTYPE_FORM = 'EDIT_JOBTYPE_FORM'; -function JobTypeDialog({ - submitForm, - openSnackBar, - onClose, - onSuccess, - open, -}) { +function JobTypeDialog({ submitForm, openSnackBar, onClose, onSuccess, open }) { const onSubmitSuccess = (response) => { const { jobType } = response; const messageContent = `Job Type ${jobType} Created`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(response); } + if (onSuccess) { + onSuccess(response); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating Job Type'; @@ -35,9 +31,7 @@ function JobTypeDialog({ }; return ( - - Create Job Type - + Create Job Type The recommended format of the type is VENDORPREFIX_JOBTYPE. @@ -51,17 +45,10 @@ function JobTypeDialog({ - - diff --git a/src/components/jobtype/JobTypeForm.jsx b/src/components/jobtype/JobTypeForm.jsx index 5fb50856..92ced4b5 100644 --- a/src/components/jobtype/JobTypeForm.jsx +++ b/src/components/jobtype/JobTypeForm.jsx @@ -1,35 +1,21 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; -const queryParams = () => ( - <> - - -); +const queryParams = () => ; -const ExportLocationForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - - diff --git a/src/components/jobtype/JobTypeSelect.jsx b/src/components/jobtype/JobTypeSelect.jsx index f721877f..d81a7e75 100644 --- a/src/components/jobtype/JobTypeSelect.jsx +++ b/src/components/jobtype/JobTypeSelect.jsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Field } from 'redux-form'; import debounce from 'lodash.debounce'; +import { Field } from 'redux-form'; import { taskdefinition as TaskDefinitionApi } from '@vidispine/vdt-api'; + import Select from '../ui/Select'; const debouncedListJobType = debounce(TaskDefinitionApi.listJobType, 500, { diff --git a/src/components/library/LibraryContentParams.jsx b/src/components/library/LibraryContentParams.jsx index 9c07dca2..276e1cfa 100644 --- a/src/components/library/LibraryContentParams.jsx +++ b/src/components/library/LibraryContentParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import LibraryContentParamsForm from './LibraryContentParamsForm'; +import * as formActions from '../../formactions/library'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/library'; + +import LibraryContentParamsForm from './LibraryContentParamsForm'; export const LIBRARY_CONTENT_PARAMS_FORM = 'LIBRARY_CONTENT_PARAMS_FORM'; @@ -29,19 +28,22 @@ function LibraryContentParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Library Display'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Library Content Display Options @@ -59,10 +61,7 @@ function LibraryContentParams({ - - diff --git a/src/components/library/LibraryExport.jsx b/src/components/library/LibraryExport.jsx index fc3b2a0d..2552e1a3 100644 --- a/src/components/library/LibraryExport.jsx +++ b/src/components/library/LibraryExport.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; import * as formActions from '../../formactions/library'; -import LibraryExportForm from './LibraryExportForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import LibraryExportForm from './LibraryExportForm'; const LIBRARY_EXPORT_FORM = 'LIBRARY_EXPORT_FORM'; @@ -28,21 +27,20 @@ function LibraryExport({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Export Started'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Starting Export'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Export Library - - diff --git a/src/components/library/LibraryExportForm.jsx b/src/components/library/LibraryExportForm.jsx index 416b1df4..f08d20eb 100644 --- a/src/components/library/LibraryExportForm.jsx +++ b/src/components/library/LibraryExportForm.jsx @@ -1,31 +1,26 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import { required } from '../../utils/FieldValidation'; import { loadExportLocationOptions } from '../exportlocation/ExportLocationSelect'; +import { TextField, Select } from '../form'; import { loadProjectionOptions } from '../projection/ProjectionSelect'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + control={} label="Metadata Sidecar" /> ( isClearable fullWidth /> - + ( dense /> - )} + control={} label="Use Original Filename" /> - )} + control={} label="Use Original Component Filename" /> ( isClearable fullWidth /> - - + + - )} + control={} label="Allow Missing" /> - - - + + + ); -function LibraryExportForm({ - error, - handleSubmit, - libraryId, -}) { +function LibraryExportForm({ error, handleSubmit, libraryId }) { return (
{error && {error}} {!libraryId && ( - + )} - + - diff --git a/src/components/library/LibraryItemMetadataForm.jsx b/src/components/library/LibraryItemMetadataForm.jsx index 27cec2fc..bb4134eb 100644 --- a/src/components/library/LibraryItemMetadataForm.jsx +++ b/src/components/library/LibraryItemMetadataForm.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; -import Typography from '@material-ui/core/Typography'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { TextField, Select } from '../form'; +import { MetadataType } from '../metadata/MetadataForm'; import Field from '../ui/Field'; -import FormSection from '../ui/FormSection'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { MetadataType } from '../metadata/MetadataForm'; const queryParams = () => ( <> @@ -33,11 +32,7 @@ const queryParams = () => ( arrayHeader dense /> - + ( ); -function LibraryItemMetadataForm({ - error, - handleSubmit, - libraryId, -}) { +function LibraryItemMetadataForm({ error, handleSubmit, libraryId }) { return (
{error && {error}} - {!libraryId && ( - - )} - - + {!libraryId && } + + ); } diff --git a/src/components/library/LibraryListParams.jsx b/src/components/library/LibraryListParams.jsx index b5519eeb..cf1cf0aa 100644 --- a/src/components/library/LibraryListParams.jsx +++ b/src/components/library/LibraryListParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import LibraryListParamsForm from './LibraryListParamsForm'; +import * as formActions from '../../formactions/library'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/library'; + +import LibraryListParamsForm from './LibraryListParamsForm'; export const LIBRARY_LIST_PARAMS_FORM = 'LIBRARY_LIST_PARAMS_FORM'; @@ -26,12 +25,16 @@ function LibraryListParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Library List'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -51,17 +54,10 @@ function LibraryListParams({ - - diff --git a/src/components/library/LibraryListParamsForm.jsx b/src/components/library/LibraryListParamsForm.jsx index 1c945dfb..7ed1bd17 100644 --- a/src/components/library/LibraryListParamsForm.jsx +++ b/src/components/library/LibraryListParamsForm.jsx @@ -1,64 +1,31 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - - + + - )} + control={} label="Auto Refresh" /> - - - + + + ); -function LibraryListParamsForm({ - error, - handleSubmit, -}) { +function LibraryListParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/library/LibraryRemove.jsx b/src/components/library/LibraryRemove.jsx index 3a9486b1..16031f60 100644 --- a/src/components/library/LibraryRemove.jsx +++ b/src/components/library/LibraryRemove.jsx @@ -1,47 +1,37 @@ -import React from 'react'; -import { compose } from 'redux'; - -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/library'; -import LibraryRemoveForm from './LibraryRemoveForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import LibraryRemoveForm from './LibraryRemoveForm'; + const LIBRARY_REMOVE_FORM = 'LIBRARY_REMOVE_FORM'; -function LibraryRemove({ - open, - onClose, - onSuccess, - onFail, - openSnackBar, - submitForm, - libraryId, -}) { +function LibraryRemove({ open, onClose, onSuccess, onFail, openSnackBar, submitForm, libraryId }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Library Deleted'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Deleting Library'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + {`Delete Library ${libraryId}`} - - diff --git a/src/components/library/LibraryRemoveForm.jsx b/src/components/library/LibraryRemoveForm.jsx index 0331d973..d23bc875 100644 --- a/src/components/library/LibraryRemoveForm.jsx +++ b/src/components/library/LibraryRemoveForm.jsx @@ -1,31 +1,22 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; -import Typography from '@material-ui/core/Typography'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; -import FormSection from '../ui/FormSection'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; const queryParams = () => ( <> - - )} - label="Async" - /> + } label="Async" /> Priority @@ -44,11 +35,7 @@ const queryParams = () => ( arrayHeader dense /> - + ( ); -function LibraryRemoveForm({ - error, - handleSubmit, - libraryId, -}) { +function LibraryRemoveForm({ error, handleSubmit, libraryId }) { return (
{error && {error}} {!libraryId && ( - + )} - + - diff --git a/src/components/library/LibraryUpdateForm.jsx b/src/components/library/LibraryUpdateForm.jsx index af41c1cb..21f5df79 100644 --- a/src/components/library/LibraryUpdateForm.jsx +++ b/src/components/library/LibraryUpdateForm.jsx @@ -1,32 +1,18 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; + import { ItemListDocument } from './LibraryForm'; -function LibraryUpdateForm({ - error, - handleSubmit, - libraryId, -}) { +function LibraryUpdateForm({ error, handleSubmit, libraryId }) { return (
{error && {error}} - {!libraryId && ( - - )} - + {!libraryId && } + diff --git a/src/components/login/LoginForm.jsx b/src/components/login/LoginForm.jsx index 785eeee2..91881abd 100644 --- a/src/components/login/LoginForm.jsx +++ b/src/components/login/LoginForm.jsx @@ -1,17 +1,14 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Typography from '@material-ui/core/Typography'; import { reduxForm, FormSection } from 'redux-form'; -import { TextField } from '../form'; import { required, isUrl } from '../../utils/FieldValidation'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; -const hasTokenOrValue = (value, { secretKey, headers = {} }) => ( - headers.token - || headers.bearer - || secretKey ? undefined : required(value)); +const hasTokenOrValue = (value, { secretKey, headers = {} }) => + headers.token || headers.bearer || secretKey ? undefined : required(value); const headers = () => ( <> @@ -39,34 +36,22 @@ const headers = () => ( ); const queryParams = () => ( - <> - - )} - label="Remember Me" - /> - + } + label="Remember Me" + /> ); -function LoginForm({ - error, - handleSubmit, - onTestUrl, - useDevProxy, -}) { +function LoginForm({ error, handleSubmit, onTestUrl, useDevProxy }) { return (
{error && {error}} onTestUrl(baseUrl)} + onBlur={(event, baseURL) => onTestUrl(baseURL)} fullWidth autoFocus validate={[required, isUrl]} diff --git a/src/components/login/LoginFormAdvanced.jsx b/src/components/login/LoginFormAdvanced.jsx index 7ba91a42..1ebfa15a 100644 --- a/src/components/login/LoginFormAdvanced.jsx +++ b/src/components/login/LoginFormAdvanced.jsx @@ -1,8 +1,7 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm, FormSection } from 'redux-form'; -import { TextField } from '../form'; +import { TextField } from '../form'; import Field from '../ui/Field'; const headers = () => ( @@ -35,34 +34,23 @@ const headers = () => ( ); const queryParams = () => ( - <> - - + ); -function LoginFormAdvanced({ - error, - handleSubmit, -}) { +function LoginFormAdvanced({ error, handleSubmit }) { return ( {error && {error}} - - + + @@ -102,75 +103,67 @@ const XML_TAB = 'XML_TAB'; const JSON_TAB = 'JSON_TAB'; const CURL_TAB = 'CURL_TAB'; -function LoginHelpDialog({ - open, - onClose, - baseUrl, -}) { - const [tab, setTab] = React.useState(CURL_TAB); +function LoginHelpDialog({ open, onClose, baseURL }) { + const [tab, setTab] = useState(CURL_TAB); const onChangeTab = (event, newTab) => setTab(newTab); return ( - + Configure CORS - Cross-Origin must be configured on the VidiCore server to allow browser requests from this location. + Cross-Origin must be configured on the VidiCore server to allow browser requests from this + location. - + - {{ - XML_TAB: ( - <> - - - - ), - JSON_TAB: ( - <> - + { + { + XML_TAB: ( + <> + + + + ), + JSON_TAB: ( + <> + + + + ), + CURL_TAB: ( - - ), - CURL_TAB: ( - - ), - }[tab]} + ), + }[tab] + } - diff --git a/src/components/metadata/MetadataChangeSetDelete.jsx b/src/components/metadata/MetadataChangeSetDelete.jsx index b55d3e4d..f7260d14 100644 --- a/src/components/metadata/MetadataChangeSetDelete.jsx +++ b/src/components/metadata/MetadataChangeSetDelete.jsx @@ -1,10 +1,10 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { metadata as MetadataApi } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; function MetadataChangeSetDelete({ diff --git a/src/components/metadata/MetadataChangeSetListCard.jsx b/src/components/metadata/MetadataChangeSetListCard.jsx index e87ff1fd..98f4c473 100644 --- a/src/components/metadata/MetadataChangeSetListCard.jsx +++ b/src/components/metadata/MetadataChangeSetListCard.jsx @@ -1,11 +1,11 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; -import Typography from '@material-ui/core/Typography'; import CardHeader from '@material-ui/core/CardHeader'; +import Typography from '@material-ui/core/Typography'; import SquareCard from '../ui/SquareCard'; -import MetadataDisplay from './MetadataDisplay'; + import MetadataChangeSetMenu from './MetadataChangeSetMenu'; +import MetadataDisplay from './MetadataDisplay'; function MetadataChangeSetListCard({ metadataChangeSetDocument, @@ -13,20 +13,17 @@ function MetadataChangeSetListCard({ ...props }) { const { changeSet: changeSetList } = metadataChangeSetDocument; - if (changeSetList === undefined || !Array.isArray(changeSetList)) { return null; } + if (changeSetList === undefined || !Array.isArray(changeSetList)) { + return null; + } return changeSetList.map((changeSet) => ( {`Change Set - ${changeSet.id}`} - } + title={{`Change Set - ${changeSet.id}`}} action={ MetadataChangeSetMenuProps ? ( - + ) : undefined } /> diff --git a/src/components/metadata/MetadataChangeSetListParams.jsx b/src/components/metadata/MetadataChangeSetListParams.jsx index 84fe9ff5..a758fcd5 100644 --- a/src/components/metadata/MetadataChangeSetListParams.jsx +++ b/src/components/metadata/MetadataChangeSetListParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import MetadataChangeSetListParamsForm from './MetadataChangeSetListParamsForm'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; +import MetadataChangeSetListParamsForm from './MetadataChangeSetListParamsForm'; + export const METADATACHANGESETLIST_FORM = 'METADATACHANGESETLIST_FORM'; function MetadataChangeSetListParams({ @@ -27,12 +26,16 @@ function MetadataChangeSetListParams({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Changeset List Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Changeset List'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -52,17 +55,10 @@ function MetadataChangeSetListParams({ - - diff --git a/src/components/metadata/MetadataChangeSetListParamsForm.jsx b/src/components/metadata/MetadataChangeSetListParamsForm.jsx index 4dbac8b1..082d9232 100644 --- a/src/components/metadata/MetadataChangeSetListParamsForm.jsx +++ b/src/components/metadata/MetadataChangeSetListParamsForm.jsx @@ -1,15 +1,14 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; +import { TextField } from '../form'; +import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; -import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; const queryParams = () => ( <> @@ -33,116 +32,42 @@ const queryParams = () => ( disableInitial creatable /> - - - - - - - - - - - - + + + + + + + + + + + + - )} + control={} label="Start TC" /> - )} + control={} label="Default Value" /> - )} + control={} label="Include Transient Metadata" /> - )} + control={} label="Conflict" /> ); -function MetadataChangeSetListParamsForm({ - error, - handleSubmit, -}) { +function MetadataChangeSetListParamsForm({ error, handleSubmit }) { return ( {error && {error}} - + ); } diff --git a/src/components/metadata/MetadataChangeSetMenu.jsx b/src/components/metadata/MetadataChangeSetMenu.jsx index 6bd4c3ca..29fd108e 100644 --- a/src/components/metadata/MetadataChangeSetMenu.jsx +++ b/src/components/metadata/MetadataChangeSetMenu.jsx @@ -1,33 +1,31 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; -import Menu, { MenuItem } from '../ui/Menu'; import { withModalNoRouter } from '../../hoc/withModal'; +import Menu, { MenuItem } from '../ui/Menu'; -function MetadataChangeSetMenu({ - changesetId, - onOpen, - trimModal, - removeModal, -}) { +function MetadataChangeSetMenu({ changesetId, onOpen, trimModal, removeModal }) { return ( {trimModal ? ( onOpen({ - modalName: trimModal, - changesetId, - })} + onClick={() => + onOpen({ + modalName: trimModal, + changesetId, + }) + } > Trim ) : null} {removeModal ? ( onOpen({ - modalName: removeModal, - changesetId, - })} + onClick={() => + onOpen({ + modalName: removeModal, + changesetId, + }) + } > Delete Changeset diff --git a/src/components/metadata/MetadataChangeSetTrim.jsx b/src/components/metadata/MetadataChangeSetTrim.jsx index 48e22f9e..80d3dc42 100644 --- a/src/components/metadata/MetadataChangeSetTrim.jsx +++ b/src/components/metadata/MetadataChangeSetTrim.jsx @@ -1,10 +1,10 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { metadata as MetadataApi } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; function MetadataChangeSetTrim({ diff --git a/src/components/metadata/MetadataDisplay.jsx b/src/components/metadata/MetadataDisplay.jsx index 490cfbbc..355e6120 100644 --- a/src/components/metadata/MetadataDisplay.jsx +++ b/src/components/metadata/MetadataDisplay.jsx @@ -1,32 +1,30 @@ -import React from 'react'; - +import { TEXT_TIME } from '../../const/Time'; +import formatTimeRepresentation from '../../utils/formatTimeRepresentation'; import TextGrid from '../ui/TextGrid'; import TextGridArray from '../ui/TextGridArray'; -import TypeSection from '../ui/TypeSection'; import TypeArray from '../ui/TypeArray'; -import formatTimeRepresentation from '../../utils/formatTimeRepresentation'; -import { TEXT_TIME } from '../../const/Time'; +import TypeSection from '../ui/TypeSection'; -export const MetadataFieldValueType = ({ value: metadataField = {}, onEdit }) => { +export function MetadataFieldValueType({ value: metadataField = {}, onEdit }) { const { value: metadataFieldValueList = [] } = metadataField; - const canEdit = onEdit - && !metadataField.name.startsWith('__') - && metadataField.inheritance === undefined; + const canEdit = + onEdit && !metadataField.name.startsWith('__') && metadataField.inheritance === undefined; const handleOnEdit = canEdit - ? (newValue, metadataFieldValue) => onEdit({ - field: [ - { - name: metadataField.name, - uuid: metadataField.uuid, - value: [ + ? (newValue, metadataFieldValue) => + onEdit({ + field: [ { - uuid: metadataFieldValue.uuid, - value: newValue, + name: metadataField.name, + uuid: metadataField.uuid, + value: [ + { + uuid: metadataFieldValue.uuid, + value: newValue, + }, + ], }, ], - }, - ], - }) + }) : undefined; return ( onEdit={handleOnEdit} /> ); -}; +} -export const MetadataGroupValueType = ({ value = {}, onEdit }) => { +export function MetadataGroupValueType({ value = {}, onEdit }) { const canEdit = onEdit && value.inheritance === undefined; const handleOnEdit = canEdit - ? (newValue) => onEdit({ - group: [ - { - name: value.name, - uuid: value.uuid, - ...newValue, - }, - ], - }) + ? (newValue) => + onEdit({ + group: [ + { + name: value.name, + uuid: value.uuid, + ...newValue, + }, + ], + }) : undefined; return (
@@ -88,12 +87,10 @@ export const MetadataGroupValueType = ({ value = {}, onEdit }) => { />
); -}; +} -export const MetadataTimespanType = ({ value = {}, timeRepresentation, onEdit }) => { - const { - start, end, field, group, - } = value; +export function MetadataTimespanType({ value = {}, timeRepresentation, onEdit }) { + const { start, end, field, group } = value; const startTime = formatTimeRepresentation({ from: TEXT_TIME, to: timeRepresentation?.to, @@ -107,15 +104,16 @@ export const MetadataTimespanType = ({ value = {}, timeRepresentation, onEdit }) value: end, }); const handleOnEdit = onEdit - ? (newValue) => onEdit({ - timespan: [ - { - start, - end, - ...newValue, - }, - ], - }) + ? (newValue) => + onEdit({ + timespan: [ + { + start, + end, + ...newValue, + }, + ], + }) : undefined; return ( @@ -146,10 +144,10 @@ export const MetadataTimespanType = ({ value = {}, timeRepresentation, onEdit }) /> ); -}; +} -export const MetadataType = ({ value = {}, timeRepresentation, onEdit }) => ( - <> +export function MetadataType({ value = {}, timeRepresentation, onEdit }) { + return ( ( timeRepresentation={timeRepresentation} onEdit={onEdit} /> - -); + ); +} export default function MetadataDisplay({ metadataDocument, timeRepresentation, onEdit }) { return ( - <> - - + ); } diff --git a/src/components/metadata/MetadataDisplayParams.jsx b/src/components/metadata/MetadataDisplayParams.jsx index cb6e47f5..399577b5 100644 --- a/src/components/metadata/MetadataDisplayParams.jsx +++ b/src/components/metadata/MetadataDisplayParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import MetadataDisplayParamsForm from './MetadataDisplayParamsForm'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; +import MetadataDisplayParamsForm from './MetadataDisplayParamsForm'; + export const METADATA_DISPLAY_FORM = 'METADATA_DISPLAY_FORM'; function MetadataDisplayParams({ @@ -27,12 +26,16 @@ function MetadataDisplayParams({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Display Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Display'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -52,17 +55,10 @@ function MetadataDisplayParams({ - - diff --git a/src/components/metadata/MetadataDisplayParamsForm.jsx b/src/components/metadata/MetadataDisplayParamsForm.jsx index 0c7cef01..d010dea3 100644 --- a/src/components/metadata/MetadataDisplayParamsForm.jsx +++ b/src/components/metadata/MetadataDisplayParamsForm.jsx @@ -1,15 +1,14 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; +import { TextField } from '../form'; +import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; -import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; const queryParams = () => ( <> @@ -33,115 +32,41 @@ const queryParams = () => ( disableInitial creatable /> - - - - - - - - - - + + + + + + + + + + - )} + control={} label="Conflict" /> - )} + control={} label="Default Value" /> - )} + control={} label="Start TC" /> + } label="Terse" /> - )} - label="Terse" - /> - - )} + control={} label="Include Transient Metadata" /> ); -function MetadataDisplayParamsForm({ - error, - handleSubmit, -}) { +function MetadataDisplayParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/metadata/MetadataEditor.jsx b/src/components/metadata/MetadataEditor.jsx index 2cd2ee29..8f9c7fd0 100644 --- a/src/components/metadata/MetadataEditor.jsx +++ b/src/components/metadata/MetadataEditor.jsx @@ -1,9 +1,9 @@ -import React from 'react'; -import Editor from '../ui/Editor'; -import MetadataForm from './MetadataForm'; -import MetadataDisplay from './MetadataDisplay'; import withSnackbar from '../../hoc/withSnackbar'; import metadataDocumentToForm from '../../utils/metadataDocumentToForm'; +import Editor from '../ui/Editor'; + +import MetadataDisplay from './MetadataDisplay'; +import MetadataForm from './MetadataForm'; function MetadataEditor({ metadataDocument, @@ -20,12 +20,16 @@ function MetadataEditor({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Metadata Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Metadata'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; const initialMetadataDocument = metadataDocumentToForm(metadataDocument); return ( diff --git a/src/components/metadata/MetadataEntryDisplay.jsx b/src/components/metadata/MetadataEntryDisplay.jsx index d2becd96..75949868 100644 --- a/src/components/metadata/MetadataEntryDisplay.jsx +++ b/src/components/metadata/MetadataEntryDisplay.jsx @@ -1,62 +1,29 @@ -import React from 'react'; - +import TextGrid from '../ui/TextGrid'; import TypeSection from '../ui/TypeSection'; + import { MetadataGroupValueType, MetadataFieldValueType } from './MetadataDisplay'; -import TextGrid from '../ui/TextGrid'; -export const MetadataEntrySourceType = ({ value = {} }) => ( - <> - - - - -); +export function MetadataEntrySourceType({ value = {} }) { + return ( + <> + + + + + ); +} -export default function MetadataEntryDisplay({ - metadataEntryDocument, -}) { - if (metadataEntryDocument === undefined) { return null; } - const { - group, - field, - value, - source, - } = metadataEntryDocument; +export default function MetadataEntryDisplay({ metadataEntryDocument }) { + if (metadataEntryDocument === undefined) { + return null; + } + const { group, field, value, source } = metadataEntryDocument; return ( <> - - - - + + + + ); } diff --git a/src/components/metadata/MetadataForm.jsx b/src/components/metadata/MetadataForm.jsx index c76bc072..7fcc80f9 100644 --- a/src/components/metadata/MetadataForm.jsx +++ b/src/components/metadata/MetadataForm.jsx @@ -1,52 +1,75 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import Grid from '@material-ui/core/Grid'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; +import { TextField, Select } from '../form'; +import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadFieldGroupOptions } from '../fieldgroup/FieldGroupSelect'; -import { loadMetadataFieldOptions } from '../metadatafield/MetadataFieldSelect'; -const MetadataValueType = () => ( - - - +function MetadataValueType() { + return ( + + + + + + + Mode + + Add + Remove + + + - - - Mode - - - Add - - - Remove - - - + ); +} + +function MetadataFieldValueType() { + return ( + + + + + + + - -); + ); +} -const MetadataFieldValueType = () => ( - - +function MetadataGroupValueType() { + return ( + <> ( disableInitial creatable /> - - - - -); - -const MetadataGroupValueType = () => ( - <> - - - - -); + + + ); +} -const MetadataTimespanType = () => ( - <> - - - - - - +function MetadataTimespanType() { + return ( + <> + + + + + + + - - - - -); + + + + ); +} -export const MetadataType = () => ( - <> +export function MetadataType() { + return ( ( removeLabel component={MetadataTimespanType} /> - -); + ); +} -function MetadataForm({ - error, - handleSubmit, -}) { +function MetadataForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/metadatadataset/MetadataDatasetDisplay.jsx b/src/components/metadatadataset/MetadataDatasetDisplay.jsx index b37c9024..313b0330 100644 --- a/src/components/metadatadataset/MetadataDatasetDisplay.jsx +++ b/src/components/metadatadataset/MetadataDatasetDisplay.jsx @@ -1,17 +1,7 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -function MetadataDatasetDisplay({ - value, -}) { - return ( - - ); +function MetadataDatasetDisplay({ value }) { + return ; } export default MetadataDatasetDisplay; diff --git a/src/components/metadatadataset/MetadataDatasetEditor.jsx b/src/components/metadatadataset/MetadataDatasetEditor.jsx index 3c58731a..21a0a370 100644 --- a/src/components/metadatadataset/MetadataDatasetEditor.jsx +++ b/src/components/metadatadataset/MetadataDatasetEditor.jsx @@ -1,24 +1,19 @@ -import React from 'react'; - import * as formActions from '../../formactions/metadatadataset'; - -import Editor from '../ui/Editor'; import withUI from '../../hoc/withUI'; +import Editor from '../ui/Editor'; + import MetadataDatasetDisplay from './MetadataDatasetDisplay'; import MetadataDatasetForm from './MetadataDatasetForm'; const EDIT_METADATADATASET_FORM = 'EDIT_METADATADATASET_FORM'; -function MetadataDatasetEditor({ - body, - datasetId, - openSnackBar, - onRefresh, -}) { +function MetadataDatasetEditor({ body, datasetId, openSnackBar, onRefresh }) { const onSubmitSuccess = () => { const messageContent = 'Metadata Dataset Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Metadata Dataset'; diff --git a/src/components/metadatadataset/MetadataDatasetForm.jsx b/src/components/metadatadataset/MetadataDatasetForm.jsx index 1fdd5f75..e8b7069e 100644 --- a/src/components/metadatadataset/MetadataDatasetForm.jsx +++ b/src/components/metadatadataset/MetadataDatasetForm.jsx @@ -1,23 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; + import { TextField, Select } from '../form'; +import CodeField from '../ui/CodeField'; import Field from '../ui/Field'; -import InitialDisabledTextField from '../ui/InitialDisabledTextField'; import FormSection from '../ui/FormSection'; -import CodeField from '../ui/CodeField'; +import InitialDisabledTextField from '../ui/InitialDisabledTextField'; -const queryParams = () => ( - -); +const queryParams = () => ; const headers = () => ( @@ -30,36 +23,27 @@ const headers = () => ( ); -const MetadataDatasetForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - - - - diff --git a/src/components/metadatadataset/MetadataDatasetRow.jsx b/src/components/metadatadataset/MetadataDatasetRow.jsx index 16ad4661..0e284e01 100644 --- a/src/components/metadatadataset/MetadataDatasetRow.jsx +++ b/src/components/metadatadataset/MetadataDatasetRow.jsx @@ -1,28 +1,22 @@ -import React from 'react'; -import DeleteForever from '@material-ui/icons/DeleteForever'; import IconButton from '@material-ui/core/IconButton'; +import DeleteForever from '@material-ui/icons/DeleteForever'; -import UnstyledLink from '../ui/UnstyledLink'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRow'; +import UnstyledLink from '../ui/UnstyledLink'; -function MetadataDatasetRow({ - datasetId, - onOpen, -}) { +function MetadataDatasetRow({ datasetId, onOpen }) { return ( - <> - - - {datasetId} - - - onOpen({ datasetId })}> - - - - - + + + {datasetId} + + + onOpen({ datasetId })}> + + + + ); } diff --git a/src/components/metadatadataset/MetadataDatasetTitle.jsx b/src/components/metadatadataset/MetadataDatasetTitle.jsx index 63980f35..9d87d6bd 100644 --- a/src/components/metadatadataset/MetadataDatasetTitle.jsx +++ b/src/components/metadatadataset/MetadataDatasetTitle.jsx @@ -1,5 +1,3 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; export default function MetadataDatasetTitle(props) { @@ -7,9 +5,9 @@ export default function MetadataDatasetTitle(props) { diff --git a/src/components/metadatafield/MetadataFieldAllowedValuesCard.jsx b/src/components/metadatafield/MetadataFieldAllowedValuesCard.jsx index 9a6223ad..badbe783 100644 --- a/src/components/metadatafield/MetadataFieldAllowedValuesCard.jsx +++ b/src/components/metadatafield/MetadataFieldAllowedValuesCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import SquareCard from '../ui/SquareCard'; + import MetadataFieldAllowedValuesTable from './MetadataFieldAllowedValuesTable'; export default function MetadataFieldAllowedValuesCard(props) { return ( - + ); } diff --git a/src/components/metadatafield/MetadataFieldAllowedValuesParams.jsx b/src/components/metadatafield/MetadataFieldAllowedValuesParams.jsx index 7e398d99..b09372c7 100644 --- a/src/components/metadatafield/MetadataFieldAllowedValuesParams.jsx +++ b/src/components/metadatafield/MetadataFieldAllowedValuesParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import MetadataFieldAllowedValuesParamsForm from './MetadataFieldAllowedValuesParamsForm'; +import * as formActions from '../../formactions/metadatafield'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/metadatafield'; + +import MetadataFieldAllowedValuesParamsForm from './MetadataFieldAllowedValuesParamsForm'; export const METADATAFIELDALLOWEDVALUES_PARAMS_FORM = 'METADATAFIELDALLOWEDVALUES_PARAMS_FORM'; @@ -29,12 +28,16 @@ function MetadataFieldAllowedValuesParams({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Allowed Values Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Allowed Values'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -55,10 +58,7 @@ function MetadataFieldAllowedValuesParams({ - - diff --git a/src/components/metadatafield/MetadataFieldRow.jsx b/src/components/metadatafield/MetadataFieldRow.jsx index 1c28660d..55dc18da 100644 --- a/src/components/metadatafield/MetadataFieldRow.jsx +++ b/src/components/metadatafield/MetadataFieldRow.jsx @@ -1,29 +1,23 @@ -import React from 'react'; +import IconButton from '@material-ui/core/IconButton'; import Check from '@material-ui/icons/Check'; import DeleteForever from '@material-ui/icons/DeleteForever'; -import IconButton from '@material-ui/core/IconButton'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRowLink'; -function MetadataFieldRow({ - metadataFieldDocument = {}, - onOpen, -}) { +function MetadataFieldRow({ metadataFieldDocument = {}, onOpen }) { return ( - <> - - {metadataFieldDocument.name} - {metadataFieldDocument.type} - {metadataFieldDocument.system && } - {metadataFieldDocument.inheritance === 'true' && } - - onOpen({ fieldName: metadataFieldDocument.name })}> - - - - - + + {metadataFieldDocument.name} + {metadataFieldDocument.type} + {metadataFieldDocument.system && } + {metadataFieldDocument.inheritance === 'true' && } + + onOpen({ fieldName: metadataFieldDocument.name })}> + + + + ); } diff --git a/src/components/metadatafield/MetadataFieldSelect.jsx b/src/components/metadatafield/MetadataFieldSelect.jsx index b031bd01..dda9f418 100644 --- a/src/components/metadatafield/MetadataFieldSelect.jsx +++ b/src/components/metadatafield/MetadataFieldSelect.jsx @@ -1,7 +1,7 @@ -import React from 'react'; +import debounce from 'lodash.debounce'; import { Field } from 'redux-form'; + import { metadatafield as MetadataFieldApi } from '@vidispine/vdt-api'; -import debounce from 'lodash.debounce'; import Select from '../ui/Select'; @@ -38,11 +38,10 @@ const TRANSIENT_FIELDS = [ { name: '__deletion_lock_expiry' }, ]; -const debouncedListMetadataField = debounce( - MetadataFieldApi.listMetadataField, - 500, - { leading: true, trailing: false }, -); +const debouncedListMetadataField = debounce(MetadataFieldApi.listMetadataField, 500, { + leading: true, + trailing: false, +}); export const loadMetadataFieldOptions = async (inputValue) => { const { data: fieldListType } = await debouncedListMetadataField(); diff --git a/src/components/metadatafield/MetadataFieldTitle.jsx b/src/components/metadatafield/MetadataFieldTitle.jsx index 1f2fe5f8..504e87e5 100644 --- a/src/components/metadatafield/MetadataFieldTitle.jsx +++ b/src/components/metadatafield/MetadataFieldTitle.jsx @@ -1,5 +1,3 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; export default function MetadataFieldTitle(props) { @@ -7,9 +5,9 @@ export default function MetadataFieldTitle(props) { diff --git a/src/components/notification/NotificationAction.jsx b/src/components/notification/NotificationAction.jsx index 5f02bcc3..5c8b432f 100644 --- a/src/components/notification/NotificationAction.jsx +++ b/src/components/notification/NotificationAction.jsx @@ -1,112 +1,125 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -const ActionType = ({ ...props }) => ( - <> - - - - - -); +function ActionType({ ...props }) { + return ( + <> + + + + + + ); +} -const HttpActionType = ({ action: { http } }) => ( - <> - - - - - - -); +function HttpActionType({ action: { http } }) { + return ( + <> + + + + + + + ); +} -const EjbActionType = ({ action: { ejb } }) => ( - <> - - - { ejb.data - && ejb.data.map((thisData) => ( - - ))} - - -); +function EjbActionType({ action: { ejb } }) { + return ( + <> + + + {ejb.data && + ejb.data.map((thisData) => )} + + + ); +} -const JmsActionType = ({ action: { jms } }) => ( - <> - - - - - - - -); +function JmsActionType({ action: { jms } }) { + return ( + <> + + + + + + + + ); +} -const SqsActionType = ({ action: { sqs } }) => ( - <> - - - - - - - - - - - -); +function SqsActionType({ action: { sqs } }) { + return ( + <> + + + + + + + + + + + + ); +} -const SnsActionType = ({ action: { sns } }) => ( - <> - - - - - - - - - - -); +function SnsActionType({ action: { sns } }) { + return ( + <> + + + + + + + + + + + ); +} -const JavascriptActionType = ({ action: { javascript } }) => ( - <> - - - -); +function JavascriptActionType({ action: { javascript } }) { + return ( + <> + + + + ); +} export function getActionType(action = {}) { if ('http' in action) { return 'http'; - } if ('ejb' in action) { + } + if ('ejb' in action) { return 'ejb'; - } if ('jms' in action) { + } + if ('jms' in action) { return 'jms'; - } if ('sqs' in action) { + } + if ('sqs' in action) { return 'sqs'; - } if ('sns' in action) { + } + if ('sns' in action) { return 'sns'; - } if ('javascript' in action) { + } + if ('javascript' in action) { return 'javascript'; } return undefined; } -export default function NotificationAction({ - action = {}, -}) { - let ActionComponent = <>; +export default function NotificationAction({ action = {} }) { + let ActionComponent = null; const actionType = getActionType(action); switch (actionType) { case 'http': diff --git a/src/components/notification/NotificationActionForm.jsx b/src/components/notification/NotificationActionForm.jsx index 6907aaaa..1a86f4e5 100644 --- a/src/components/notification/NotificationActionForm.jsx +++ b/src/components/notification/NotificationActionForm.jsx @@ -1,45 +1,22 @@ -import React from 'react'; -import { - reduxForm, Field, FormSection, FieldArray, -} from 'redux-form'; import MenuItem from '@material-ui/core/MenuItem'; import Typography from '@material-ui/core/Typography'; import update from 'immutability-helper'; -import { TextField } from '../form'; +import { reduxForm, Field, FormSection, FieldArray } from 'redux-form'; +import { TextField } from '../form'; import CodeField from '../ui/CodeField'; -import StatefulSelect from '../ui/StatefulSelect'; import SimpleMetadataField from '../ui/SimpleMetadataField'; +import StatefulSelect from '../ui/StatefulSelect'; + import { getActionType } from './NotificationAction'; function ActionTypeBase() { return ( <> - - - - + + + + ); } @@ -47,31 +24,10 @@ function ActionTypeBase() { function ActionTypeHttp() { return ( <> - - - - + + + + ); @@ -80,24 +36,9 @@ function ActionTypeHttp() { function ActionTypeEjb() { return ( <> - - - + + + ); @@ -106,36 +47,11 @@ function ActionTypeEjb() { function ActionTypeJms() { return ( <> - - - - - + + + + + ); @@ -144,60 +60,15 @@ function ActionTypeJms() { function ActionTypeSqs() { return ( <> - - - - - - - - - + + + + + + + + + ); @@ -206,54 +77,14 @@ function ActionTypeSqs() { function ActionTypeSns() { return ( <> - - - - - - - - + + + + + + + + ); @@ -288,37 +119,26 @@ function ActionTypeSelect(props) { const { action = {} } = notificationDocument; initialActionType = getActionType(action); } - - const TriggerComponent = (value) => { + // TODO Refactor this to a standalone component + // eslint-disable-next-line react/no-unstable-nested-components + function TriggerComponent(value) { switch (value) { case 'http': - return ( - - ); + return ; case 'ejb': - return ( - - ); + return ; case 'jms': - return ( - - ); + return ; case 'sqs': - return ( - - ); + return ; case 'sns': - return ( - - ); + return ; case 'javascript': - return ( - - ); + return ; default: return null; } - }; + } const onChange = (event, newValue, previousValue, name) => { const prevState = valueSelector(name); if (prevState) { @@ -328,41 +148,36 @@ function ActionTypeSelect(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, {}); + props?.change(name, {}); } }; return ( - <> - - HTTP - EJB - JMS - SQS - SNS - Javascript - - + + HTTP + EJB + JMS + SQS + SNS + Javascript + ); } function NotificationActionForm(props) { return ( -
- {props.error && {props.error}} - + + {props?.error && {props?.error}} + - - - ) : ( + {isEditing ? ( + <> - - )} + + + + + ) : ( + + + + )} )} diff --git a/src/components/notification/NotificationCreate.jsx b/src/components/notification/NotificationCreate.jsx index 9994f61f..0289d942 100644 --- a/src/components/notification/NotificationCreate.jsx +++ b/src/components/notification/NotificationCreate.jsx @@ -1,20 +1,20 @@ -import React from 'react'; -import { compose } from 'redux'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; +import { compose } from 'redux'; -import withUI from '../../hoc/withUI'; +import * as formActions from '../../formactions/notification'; import withFormActions from '../../hoc/withFormActions'; import withFormSelectors from '../../hoc/withFormSelectors'; +import withUI from '../../hoc/withUI'; +import capitalizeString from '../../utils/capitalizeString'; + import NotificationActionForm from './NotificationActionForm'; import NotificationTriggerForm from './NotificationTriggerForm'; -import * as formActions from '../../formactions/notification'; -import capitalizeString from '../../utils/capitalizeString'; export const NOTIFICATION_CREATE_FORM = 'NOTIFICATION_CREATE_FORM'; @@ -31,7 +31,9 @@ function NotificationCreate({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Notification Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -47,7 +49,8 @@ function NotificationCreate({ }; if (entityType) { initialValues.notificationDocument.trigger = {}; - if (entityType === 'deletion-lock') initialValues.notificationDocument.trigger.deletionLock = {}; + if (entityType === 'deletion-lock') + initialValues.notificationDocument.trigger.deletionLock = {}; else initialValues.notificationDocument.trigger[entityType] = {}; } return ( @@ -58,11 +61,7 @@ function NotificationCreate({ {entityType && ( <> - + Trigger )} - + Action - - diff --git a/src/components/notification/NotificationListCard.jsx b/src/components/notification/NotificationListCard.jsx index ba9a7216..e415883a 100644 --- a/src/components/notification/NotificationListCard.jsx +++ b/src/components/notification/NotificationListCard.jsx @@ -1,15 +1,12 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; import UriListTable from '../ui/UriListTable'; -export default function NotificationListCard({ - uriListDocument, - entityType, - entityId, -}) { - if (uriListDocument === undefined) { return null; } +export default function NotificationListCard({ uriListDocument, entityType, entityId }) { + if (uriListDocument === undefined) { + return null; + } const linkToResource = (uri) => `/notification/${entityType}/${uri.split('/').pop()}/`; const linkToEntity = (uri) => `/${entityType}/${entityId}/notification/${uri.split('/').pop()}/`; const linkToPlaceholder = (uri) => `/notification/${uri.split('/').pop()}/`; @@ -20,11 +17,7 @@ export default function NotificationListCard({ return ( - + ); diff --git a/src/components/notification/NotificationListRow.jsx b/src/components/notification/NotificationListRow.jsx index 5eb33905..d3f2a67b 100644 --- a/src/components/notification/NotificationListRow.jsx +++ b/src/components/notification/NotificationListRow.jsx @@ -1,11 +1,8 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; + import TableRowLink from '../ui/TableRowLink'; -export default function NotificationListRow({ - notification, - entityType, -}) { +export default function NotificationListRow({ notification, entityType }) { const notificationPath = new URL(notification).pathname; const notificationId = notificationPath.split('/').pop(); return ( diff --git a/src/components/notification/NotificationListTable.jsx b/src/components/notification/NotificationListTable.jsx index 82d3e992..e2ee8326 100644 --- a/src/components/notification/NotificationListTable.jsx +++ b/src/components/notification/NotificationListTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; @@ -7,10 +6,7 @@ import TableRow from '@material-ui/core/TableRow'; import NotificationListRow from './NotificationListRow'; -export default function NotificationListTable({ - notificationList = [], - entityType, -}) { +export default function NotificationListTable({ notificationList = [], entityType }) { return ( diff --git a/src/components/notification/NotificationListTitle.jsx b/src/components/notification/NotificationListTitle.jsx index 11760b11..01dd3546 100644 --- a/src/components/notification/NotificationListTitle.jsx +++ b/src/components/notification/NotificationListTitle.jsx @@ -1,14 +1,7 @@ -import React from 'react'; - -import TitleHeader from '../ui/TitleHeader'; import capitalizeString from '../../utils/capitalizeString'; +import TitleHeader from '../ui/TitleHeader'; -export default function NotificationListTitle({ - entityType, - openCode, - openCreate, - onRefresh, -}) { +export default function NotificationListTitle({ entityType, openCode, openCreate, onRefresh }) { return ( { const messageContent = 'Notification Updated'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } - if (toggleEdit) { toggleEdit(); } + if (onRefresh) { + onRefresh(); + } + if (toggleEdit) { + toggleEdit(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Notification'; @@ -78,10 +84,7 @@ function NotificationPlaceholderCard({ ) : ( - + )} diff --git a/src/components/notification/NotificationRemove.jsx b/src/components/notification/NotificationRemove.jsx index 07aabeb3..9e74260b 100644 --- a/src/components/notification/NotificationRemove.jsx +++ b/src/components/notification/NotificationRemove.jsx @@ -1,10 +1,10 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { notification as api } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; function NotificationRemove({ @@ -18,12 +18,15 @@ function NotificationRemove({ }) { const onRemovePlaceholder = () => { const path = `/API/notification/${notificationId}`; - api.removeNotification({ notificationId, entityType: 'placeholder', path }) + api + .removeNotification({ notificationId, entityType: 'placeholder', path }) .then(() => { const messageContent = `Notification ${notificationId} Removed`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Removing Notification'; @@ -31,12 +34,15 @@ function NotificationRemove({ }); }; const onRemoveResource = () => { - api.removeNotification({ notificationId, entityType }) + api + .removeNotification({ notificationId, entityType }) .then(() => { const messageContent = `Notification ${notificationId} Removed`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Removing Notification'; @@ -44,12 +50,15 @@ function NotificationRemove({ }); }; const onRemoveEntity = () => { - api.removeNotificationEntity({ notificationId, entityType, entityId }) + api + .removeNotificationEntity({ notificationId, entityType, entityId }) .then(() => { const messageContent = `Notification ${notificationId} Removed`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Removing Notification'; @@ -61,19 +70,12 @@ function NotificationRemove({ else if (entityType) onRemove = onRemoveResource; return ( - - {`Remove Notification ${notificationId}?`} - + {`Remove Notification ${notificationId}?`} - diff --git a/src/components/notification/NotificationTrigger.jsx b/src/components/notification/NotificationTrigger.jsx index 0364ed4f..f785d608 100644 --- a/src/components/notification/NotificationTrigger.jsx +++ b/src/components/notification/NotificationTrigger.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import TextGrid from '../ui/TextGrid'; export function getJobAction(job = {}) { @@ -53,39 +52,42 @@ export function getTriggerEntity(trigger) { return triggerEntity; } -const JobTriggerType = ({ trigger: { job } }) => { +function JobTriggerType({ trigger: { job } }) { const triggerAction = getJobAction(job); return ( <> - {job.filter - && ( + {job.filter && ( <> - {job.filter.jobdata - && ( + {job.filter.jobdata && ( <> - { job.filter.jobdata.key - && } - { job.filter.jobdata['key-regex'] - && } - { job.filter.jobdata.value - && } - { job.filter.jobdata['value-regex'] - && } + {job.filter.jobdata.key && ( + + )} + {job.filter.jobdata['key-regex'] && ( + + )} + {job.filter.jobdata.value && ( + + )} + {job.filter.jobdata['value-regex'] && ( + + )} - )} + )} - )} - {job.contentFilters - && } + )} + {job.contentFilters && ( + + )} ); -}; +} -const MetadataTriggerType = ({ trigger: { metadata } }) => { +function MetadataTriggerType({ trigger: { metadata } }) { let triggerAction; if ('modify' in metadata) { triggerAction = 'modify'; @@ -93,20 +95,19 @@ const MetadataTriggerType = ({ trigger: { metadata } }) => { return ( <> - {triggerAction === 'modify' - && ( - <> - - - - - + {triggerAction === 'modify' && ( + <> + + + + + )} ); -}; +} -const ItemTriggerType = ({ trigger: { item } }) => { +function ItemTriggerType({ trigger: { item } }) { let triggerAction; if ('modify' in item) { triggerAction = 'modify'; @@ -115,14 +116,10 @@ const ItemTriggerType = ({ trigger: { item } }) => { } else if ('delete' in item) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const CollectionTriggerType = ({ trigger: { collection } }) => { +function CollectionTriggerType({ trigger: { collection } }) { let triggerAction; if ('modify' in collection) { triggerAction = 'modify'; @@ -138,15 +135,17 @@ const CollectionTriggerType = ({ trigger: { collection } }) => { return ( <> - {triggerAction === 'metadata' - && } - {triggerAction === 'item' - && } + {triggerAction === 'metadata' && ( + + )} + {triggerAction === 'item' && ( + + )} ); -}; +} -const StorageTriggerType = ({ trigger: { storage } }) => { +function StorageTriggerType({ trigger: { storage } }) { let triggerAction; if ('filename' in storage) { triggerAction = 'filename'; @@ -155,14 +154,10 @@ const StorageTriggerType = ({ trigger: { storage } }) => { } else if ('delete' in storage) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const FileTriggerType = ({ trigger: { file } }) => { +function FileTriggerType({ trigger: { file } }) { let triggerAction; if ('new' in file) { triggerAction = 'new'; @@ -175,14 +170,10 @@ const FileTriggerType = ({ trigger: { file } }) => { } else if ('delete' in file) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const GroupTriggerType = ({ trigger: { group } }) => { +function GroupTriggerType({ trigger: { group } }) { let triggerAction; if ('modify' in group) { triggerAction = 'modify'; @@ -191,14 +182,10 @@ const GroupTriggerType = ({ trigger: { group } }) => { } else if ('delete' in group) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const ShapeTriggerType = ({ trigger: { shape } }) => { +function ShapeTriggerType({ trigger: { shape } }) { let triggerAction; if ('modify' in shape) { triggerAction = 'modify'; @@ -207,14 +194,10 @@ const ShapeTriggerType = ({ trigger: { shape } }) => { } else if ('delete' in shape) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const AccessTriggerType = ({ trigger: { access } }) => { +function AccessTriggerType({ trigger: { access } }) { let triggerAction; if ('change' in access) { triggerAction = 'change'; @@ -223,14 +206,10 @@ const AccessTriggerType = ({ trigger: { access } }) => { } else if ('delete' in access) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const QuotaTriggerType = ({ trigger: { quota } }) => { +function QuotaTriggerType({ trigger: { quota } }) { let triggerAction; if ('warning' in quota) { triggerAction = 'warning'; @@ -239,28 +218,20 @@ const QuotaTriggerType = ({ trigger: { quota } }) => { } else if ('delete' in quota) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const DocumentTriggerType = ({ trigger: { document } }) => { +function DocumentTriggerType({ trigger: { document } }) { let triggerAction; if ('create' in document) { triggerAction = 'create'; } else if ('delete' in document) { triggerAction = 'delete'; } - return ( - <> - - - ); -}; + return ; +} -const DeletionLockTriggerType = ({ trigger: { deletionLock } }) => { +function DeletionLockTriggerType({ trigger: { deletionLock } }) { let triggerAction; if ('create' in deletionLock) { triggerAction = 'create'; @@ -273,17 +244,11 @@ const DeletionLockTriggerType = ({ trigger: { deletionLock } }) => { } else if ('expire' in deletionLock) { triggerAction = 'expire'; } - return ( - <> - - - ); -}; + return ; +} -export default function NotificationTrigger({ - trigger = {}, -}) { - let TriggerComponent = <>; +export default function NotificationTrigger({ trigger = {} }) { + let TriggerComponent = null; const triggerEntity = getTriggerEntity(trigger); switch (triggerEntity) { case 'job': diff --git a/src/components/notification/NotificationTriggerForm.jsx b/src/components/notification/NotificationTriggerForm.jsx index 27188e5b..4db805f7 100644 --- a/src/components/notification/NotificationTriggerForm.jsx +++ b/src/components/notification/NotificationTriggerForm.jsx @@ -1,19 +1,19 @@ -import React from 'react'; -import { reduxForm, Field, FormSection } from 'redux-form'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import update from 'immutability-helper'; +import MenuItem from '@material-ui/core/MenuItem'; import Typography from '@material-ui/core/Typography'; -import { TextField } from '../form'; +import update from 'immutability-helper'; +import { reduxForm, Field, FormSection } from 'redux-form'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; import StatefulSelect from '../ui/StatefulSelect'; + import { getTriggerEntity, getJobAction } from './NotificationTrigger'; -import BoolCheckbox from '../ui/BoolCheckbox'; function NotificationTriggerItemType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.item'; + const name = props?.id || 'notificationDocument.trigger.item'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -34,9 +34,9 @@ function NotificationTriggerItemType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -59,7 +59,7 @@ function NotificationTriggerItemType(props) { function NotificationTriggerStorageType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.storage'; + const name = props?.id || 'notificationDocument.trigger.storage'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -80,9 +80,9 @@ function NotificationTriggerStorageType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -107,7 +107,7 @@ function NotificationTriggerStorageType(props) { function NotificationTriggerFileType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.file'; + const name = props?.id || 'notificationDocument.trigger.file'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -128,9 +128,9 @@ function NotificationTriggerFileType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -159,7 +159,7 @@ function NotificationTriggerFileType(props) { function NotificationTriggerGroupType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.group'; + const name = props?.id || 'notificationDocument.trigger.group'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -180,9 +180,9 @@ function NotificationTriggerGroupType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -207,7 +207,7 @@ function NotificationTriggerGroupType(props) { function NotificationTriggerShapeType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.shape'; + const name = props?.id || 'notificationDocument.trigger.shape'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -228,9 +228,9 @@ function NotificationTriggerShapeType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -255,7 +255,7 @@ function NotificationTriggerShapeType(props) { function NotificationTriggerAccessType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.access'; + const name = props?.id || 'notificationDocument.trigger.access'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -276,9 +276,9 @@ function NotificationTriggerAccessType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -303,7 +303,7 @@ function NotificationTriggerAccessType(props) { function NotificationTriggerQuotaType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.quota'; + const name = props?.id || 'notificationDocument.trigger.quota'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -324,9 +324,9 @@ function NotificationTriggerQuotaType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -351,7 +351,7 @@ function NotificationTriggerQuotaType(props) { function NotificationTriggerDocumentType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.document'; + const name = props?.id || 'notificationDocument.trigger.document'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -372,9 +372,9 @@ function NotificationTriggerDocumentType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -397,7 +397,7 @@ function NotificationTriggerDocumentType(props) { function NotificationTriggerDeletionLockType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.deletionLock'; + const name = props?.id || 'notificationDocument.trigger.deletionLock'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -418,9 +418,9 @@ function NotificationTriggerDeletionLockType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -450,37 +450,17 @@ function NotificationTriggerDeletionLockType(props) { function NotificationTriggerMetadataModifyType() { return ( <> - - - - + + + + ); } function NotificationTriggerMetadataType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.metadata'; + const name = props?.id || 'notificationDocument.trigger.metadata'; let initialvalue; if (dirty) { const metadata = valueSelector(name); @@ -496,8 +476,10 @@ function NotificationTriggerMetadataType(props) { const { metadata } = trigger; initialvalue = metadata && Object.keys(metadata)[0]; } + } catch (error) { // eslint-disable-next-line no-console - } catch (error) { console.log(error); } + console.log(error); + } } const onChange = (event, newValue, previousValue) => { const prevState = valueSelector(name); @@ -509,12 +491,14 @@ function NotificationTriggerMetadataType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; - const ValueComponent = (value) => { + // TODO Refactor as standalone component + // eslint-disable-next-line react/no-unstable-nested-components + function ValueComponent(value) { switch (value) { case 'modify': return ( @@ -528,7 +512,7 @@ function NotificationTriggerMetadataType(props) { default: return null; } - }; + } return ( <> Modify @@ -548,7 +533,7 @@ function NotificationTriggerMetadataType(props) { function NotificationTriggerCollectionType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.collection'; + const name = props?.id || 'notificationDocument.trigger.collection'; let initialvalue; if (dirty) { const item = valueSelector(name); @@ -569,12 +554,14 @@ function NotificationTriggerCollectionType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; - const ValueComponent = (value) => { + // TODO Refactor as standalone component + // eslint-disable-next-line react/no-unstable-nested-components + function ValueComponent(value) { switch (value) { case 'metadata': return ( @@ -588,7 +575,7 @@ function NotificationTriggerCollectionType(props) { default: return null; } - }; + } return ( <> Create @@ -614,45 +602,17 @@ function NotificationTriggerCollectionType(props) { function NotificationJobTriggerContentFiltersType() { return ( - <> - - + ); } function NotificationJobTriggerJobDataType() { return ( <> - - - - + + + + ); } @@ -660,30 +620,16 @@ function NotificationJobTriggerJobDataType() { function NotificationJobTriggerFilterType() { return ( <> - - - + + + ); } function NotificationJobTriggerType(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger.job'; + const name = props?.id || 'notificationDocument.trigger.job'; let initialJobAction; if (dirty) { const job = valueSelector(name); @@ -704,9 +650,9 @@ function NotificationJobTriggerType(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( @@ -724,35 +670,23 @@ function NotificationJobTriggerType(props) { Finish Fail - - + + - )} + control={} label="Placeholder" /> - ); } function TriggerEntitySelect(props) { const { initialValues = {}, valueSelector, dirty } = props; - const name = props.id || 'notificationDocument.trigger'; + const name = props?.id || 'notificationDocument.trigger'; let initialTriggerEntity; if (dirty) { const trigger = valueSelector(name); @@ -762,17 +696,14 @@ function TriggerEntitySelect(props) { const { trigger = {} } = notificationDocument; initialTriggerEntity = getTriggerEntity(trigger); } - - const TriggerComponent = (value) => { + // TODO Refactor as standalone component + // eslint-disable-next-line react/no-unstable-nested-components + function TriggerComponent(value) { switch (value) { case 'job': - return ( - - ); + return ; case 'item': - return ( - - ); + return ; case 'metadata': return ( @@ -782,41 +713,33 @@ function TriggerEntitySelect(props) { ); case 'storage': - return ( - - ); + return ; case 'file': - return ( - - ); + return ; case 'shape': - return ( - - ); + return ; case 'group': - return ( - - ); + return ; case 'access': - return ( - - ); + return ; case 'quota': - return ( - - ); + return ; case 'document': return ( ); case 'deletionLock': return ( - + ); default: return null; } - }; + } const onChange = (event, newValue, previousValue) => { const prevState = valueSelector(name); const setValue = {}; @@ -827,48 +750,43 @@ function TriggerEntitySelect(props) { }, $unset: [previousValue], }); - props.change(name, newState); + props?.change(name, newState); } else { - props.change(name, { [newValue]: setValue }); + props?.change(name, { [newValue]: setValue }); } }; return ( - <> - - Job - Item - Metadata - Collection - Storage - File - Shape - Group - Access - Quota - Access - Document - Deletion Lock - - + + Job + Item + Metadata + Collection + Storage + File + Shape + Group + Access + Quota + Access + Document + Deletion Lock + ); } function NotificationTriggerForm(props) { return ( -
- {props.error && {props.error}} - + + {props?.error && {props?.error}} + - )} + } /> Outgoing} disableTypography - action={( + action={ - )} + } /> { const messageContent = 'Projection Created'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating Projection'; @@ -51,11 +47,7 @@ function ProjectionCreateIncoming({ -
@@ -20,10 +17,7 @@ export default function ProjectionListTable({ {projectionList.map((projection) => ( - + ))}
diff --git a/src/components/projection/ProjectionListTitle.jsx b/src/components/projection/ProjectionListTitle.jsx index 0e2a1878..5896f66b 100644 --- a/src/components/projection/ProjectionListTitle.jsx +++ b/src/components/projection/ProjectionListTitle.jsx @@ -1,20 +1,14 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; -import TitleHeader from '../ui/TitleHeader'; -import Menu, { MenuItem } from '../ui/Menu'; import { withModalNoRouter } from '../../hoc/withModal'; +import Menu, { MenuItem } from '../ui/Menu'; +import TitleHeader from '../ui/TitleHeader'; -function ProjectionListTitle({ - incomingDialog, - outgoingDialog, - onOpen, - ...props -}) { +function ProjectionListTitle({ incomingDialog, outgoingDialog, onOpen, ...props }) { return ( onOpen({ modalName: incomingDialog })}> Create Incoming Projection @@ -23,7 +17,7 @@ function ProjectionListTitle({ Create Outgoing Projection
- )} + } /> ); } diff --git a/src/components/projection/ProjectionLookupForm.jsx b/src/components/projection/ProjectionLookupForm.jsx index c81c479c..9da73474 100644 --- a/src/components/projection/ProjectionLookupForm.jsx +++ b/src/components/projection/ProjectionLookupForm.jsx @@ -1,25 +1,16 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import ProjectionSelect from './ProjectionSelect'; -function ProjectionLookupForm({ - handleSubmit, -}) { +function ProjectionLookupForm({ handleSubmit }) { return (
- - Projection Name - - + Projection Name + - diff --git a/src/components/projection/ProjectionSelect.jsx b/src/components/projection/ProjectionSelect.jsx index 8ec76596..9de746c0 100644 --- a/src/components/projection/ProjectionSelect.jsx +++ b/src/components/projection/ProjectionSelect.jsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Field } from 'redux-form'; import debounce from 'lodash.debounce'; +import { Field } from 'redux-form'; import { projection as ProjectionApi } from '@vidispine/vdt-api'; + import { StatefulAsyncSelect } from '../ui/Select'; const debouncedListProjection = debounce(ProjectionApi.listProjection, 500, { diff --git a/src/components/quota/QuotaCard.jsx b/src/components/quota/QuotaCard.jsx index e14c027c..a9b76611 100644 --- a/src/components/quota/QuotaCard.jsx +++ b/src/components/quota/QuotaCard.jsx @@ -1,36 +1,31 @@ -import React from 'react'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; import IconButton from '@material-ui/core/IconButton'; import Delete from '@material-ui/icons/Delete'; +import ExternalIdLink from '../externalid/ExternalIdLink'; import SquareCard from '../ui/SquareCard'; + import QuotaDisplay from './QuotaDisplay'; -import ExternalIdLink from '../externalid/ExternalIdLink'; -export default function AccessControlCard({ - quotaRuleDocument, - openRemove, -}) { +export default function AccessControlCard({ quotaRuleDocument, openRemove }) { const { id: ruleId } = quotaRuleDocument; return ( - )} + } /> - + diff --git a/src/components/quota/QuotaDialog.jsx b/src/components/quota/QuotaDialog.jsx index c81db7ba..1c8df41f 100644 --- a/src/components/quota/QuotaDialog.jsx +++ b/src/components/quota/QuotaDialog.jsx @@ -1,26 +1,20 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { submit } from 'redux-form'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { connect } from 'react-redux'; +import { submit } from 'redux-form'; -import QuotaForm from './QuotaForm'; -import * as formActions from '../../formactions/quota'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/quota'; + +import QuotaForm from './QuotaForm'; const EDIT_QUOTA_FORM = 'EDIT_QUOTA_FORM'; -function QuotaDialog({ - submitForm, - closeModal, - isOpen, - onRefresh, - openSnackBar, -}) { +function QuotaDialog({ submitForm, closeModal, isOpen, onRefresh, openSnackBar }) { const onSubmitSuccess = (response) => { const { quotaRuleDocument } = response; const { id: ruleId } = quotaRuleDocument; @@ -52,18 +46,10 @@ function QuotaDialog({ - - diff --git a/src/components/quota/QuotaDisplay.jsx b/src/components/quota/QuotaDisplay.jsx index f4c1dee5..e405e1f2 100644 --- a/src/components/quota/QuotaDisplay.jsx +++ b/src/components/quota/QuotaDisplay.jsx @@ -1,55 +1,46 @@ -import React from 'react'; +import { Fragment } from 'react'; + import Divider from '@material-ui/core/Divider'; import LinearProgress from '@material-ui/core/LinearProgress'; import TextGrid from '../ui/TextGrid'; -export const QuotaRuleType = ({ rule }) => ( - <> - { rule.user - && } - { rule.group - && } - { rule.collection - && } - { rule.library - && } - { rule.tag - && } - { rule.storage - && } - { rule.storageGroup - && } - { rule.resource - && ( - <> - {rule.resource.map((resource) => ( - - - - - - - - - ))} - - - )} - - - - -); - -export default function QuotaRuleDisplay({ - quotaRuleDocument, -}) { +export function QuotaRuleType({ rule }) { return ( - + <> + {rule.user && } + {rule.group && } + {rule.collection && ( + + )} + {rule.library && } + {rule.tag && } + {rule.storage && } + {rule.storageGroup && } + {rule.resource && ( + <> + {rule.resource.map((resource) => ( + + + + + + + + ))} + + + )} + + + + ); } + +export default function QuotaRuleDisplay({ quotaRuleDocument }) { + return ; +} diff --git a/src/components/quota/QuotaFilter.jsx b/src/components/quota/QuotaFilter.jsx index 46402883..ec3164ae 100644 --- a/src/components/quota/QuotaFilter.jsx +++ b/src/components/quota/QuotaFilter.jsx @@ -1,22 +1,18 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { submit } from 'redux-form'; import Button from '@material-ui/core/Button'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import { connect } from 'react-redux'; +import { submit } from 'redux-form'; +import * as actions from '../../actions'; +import * as formActions from '../../formactions/quota'; import SquareCard from '../ui/SquareCard'; + import QuotaFilterForm from './QuotaFilterForm'; -import * as formActions from '../../formactions/quota'; -import * as actions from '../../actions'; const EDIT_QUOTA_FILTER_FORM = 'EDIT_QUOTA_FILTER_FORM'; -function QuotaFilter({ - submitForm, - onFilter, - openSnackBar, -}) { +function QuotaFilter({ submitForm, onFilter, openSnackBar }) { const onSubmitSuccess = (response) => { const { quotaRuleListDocument, queryParams } = response; onFilter({ quotaRuleListDocument, queryParams }); @@ -35,15 +31,11 @@ function QuotaFilter({ submitForm(EDIT_QUOTA_FILTER_FORM)} - > + action={ + - )} + } /> ( - <> - {fields.map((thisField, index) => ( - - - - Filter Key - - user - group - storage - storageGroup - collection - library - tag - - - - - - - - fields.remove(index)}> - - +function FilterArray({ fields }) { + return ( + <> + {fields.map((thisField, index) => ( + + + + Filter Key + + user + group + storage + storageGroup + collection + library + tag + + + + + + + + fields.remove(index)}> + + + - - ))} - fields.push()} color="primary" style={{ marginTop: 10 }}> - Add Filter - - -); + ))} + fields.push()} color="primary" style={{ marginTop: 10 }}> + Add Filter + + + ); +} -const QuotaFilterQueryParams = () => ( - <> - - + + + + } + label="Exceeded" /> - - - )} - label="Exceeded" - /> - - Content - - External - - - -); + + Content + + External + + + + ); +} -function QuotaFilterForm({ - error, - handleSubmit, -}) { +function QuotaFilterForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/quota/QuotaTitle.jsx b/src/components/quota/QuotaTitle.jsx index 65512a2f..230cac51 100644 --- a/src/components/quota/QuotaTitle.jsx +++ b/src/components/quota/QuotaTitle.jsx @@ -1,18 +1,7 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; -export default function QuotaTitle({ - openCode, - openCreate, - onRefresh, -}) { +export default function QuotaTitle({ openCode, openCreate, onRefresh }) { return ( - + ); } diff --git a/src/components/reindex/ReindexCard.jsx b/src/components/reindex/ReindexCard.jsx index f2b3f2f6..3f1dc972 100644 --- a/src/components/reindex/ReindexCard.jsx +++ b/src/components/reindex/ReindexCard.jsx @@ -1,31 +1,29 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; -import CardHeader from '@material-ui/core/CardHeader'; +import Button from '@material-ui/core/Button'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; import DialogActions from '@material-ui/core/DialogActions'; -import Button from '@material-ui/core/Button'; -import Typography from '@material-ui/core/Typography'; import Divider from '@material-ui/core/Divider'; +import Typography from '@material-ui/core/Typography'; +import startCase from 'lodash.startcase'; import { reindex as api } from '@vidispine/vdt-api'; + +import withSnackbar from '../../hoc/withUI'; import SquareCard from '../ui/SquareCard'; + import ReindexDisplay from './ReindexDisplay'; import ReindexStatus from './ReindexStatus'; -import withSnackbar from '../../hoc/withUI'; - -function ReindexCard({ - indexName, - reindexRequestDocument, - onSuccess, - openSnackBar, -}) { +function ReindexCard({ indexName, reindexRequestDocument, onSuccess, openSnackBar }) { const onUpdateReindex = (queryParams) => { - api.updateReindex({ indexName, queryParams }) + api + .updateReindex({ indexName, queryParams }) .then(() => { const messageContent = `Reindex Request ${indexName} Updated`; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(indexName); } + if (onSuccess) { + onSuccess(indexName); + } }) .catch(() => { const messageContent = `Error Updating Reindex ${indexName} Request`; @@ -41,9 +39,7 @@ function ReindexCard({ action={} /> - + diff --git a/src/components/reindex/ReindexDisplay.jsx b/src/components/reindex/ReindexDisplay.jsx index 4baf9c40..b3475eca 100644 --- a/src/components/reindex/ReindexDisplay.jsx +++ b/src/components/reindex/ReindexDisplay.jsx @@ -1,59 +1,20 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; import TypeSection from '../ui/TypeSection'; -const ReindexRequestType = ({ value = {} }) => ( - <> - - - - - - - - -); - -export default function ReindexDisplay({ - reindexRequestDocument, -}) { +function ReindexRequestType({ value = {} }) { return ( <> - + + + + + + + ); } + +export default function ReindexDisplay({ reindexRequestDocument }) { + return ; +} diff --git a/src/components/reindex/ReindexStatus.jsx b/src/components/reindex/ReindexStatus.jsx index 8624d8b9..f4324165 100644 --- a/src/components/reindex/ReindexStatus.jsx +++ b/src/components/reindex/ReindexStatus.jsx @@ -1,12 +1,13 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; import Chip from '@material-ui/core/Chip'; +import startCase from 'lodash.startcase'; import { OK_STATES, WARNING_STATES, ERROR_STATES } from '../../const/ReindexStates'; import { OnlineIcon, OfflineIcon, WarningIcon } from '../ui/StatusIcon'; -const ReindexStatus = ({ reindexRequestDocument }) => { - if (reindexRequestDocument === undefined) { return null; } +function ReindexStatus({ reindexRequestDocument }) { + if (reindexRequestDocument === undefined) { + return null; + } let statusChip = } label="Unknown" />; const { status } = reindexRequestDocument; if (OK_STATES.includes(status)) { @@ -17,6 +18,6 @@ const ReindexStatus = ({ reindexRequestDocument }) => { statusChip = } label={startCase(status)} />; } return statusChip; -}; +} export default ReindexStatus; diff --git a/src/components/reindex/ReindexTable.jsx b/src/components/reindex/ReindexTable.jsx index 8168fd48..385ff816 100644 --- a/src/components/reindex/ReindexTable.jsx +++ b/src/components/reindex/ReindexTable.jsx @@ -1,19 +1,15 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@material-ui/core/TableRow'; import Typography from '@material-ui/core/Typography'; -import moment from 'moment'; import startCase from 'lodash.startcase'; +import moment from 'moment'; import Menu, { MenuItem } from '../ui/Menu'; -function ReindexTable({ - reindexList = [], - onUpdateReindex, -}) { +function ReindexTable({ reindexList = [], onUpdateReindex }) { return ( @@ -34,9 +30,7 @@ function ReindexTable({ {startCase(reindex.index)} {reindex.priority} {reindex.status} - - {reindex.start ? moment(reindex.start).fromNow().toString() : ''} - + {reindex.start ? moment(reindex.start).fromNow().toString() : ''} {reindex.finish ? moment(reindex.finish).fromNow().toString() : ''} @@ -44,16 +38,41 @@ function ReindexTable({ {reindex.indexesTotal} - onUpdateReindex({ indexName: reindex.index, queryParams: { status: 'IN_QUEUE' } })}> + + onUpdateReindex({ + indexName: reindex.index, + queryParams: { status: 'IN_QUEUE' }, + }) + } + > Queue Reindex - onUpdateReindex({ indexName: reindex.index, queryParams: { status: 'PAUSED' } })}> + + onUpdateReindex({ indexName: reindex.index, queryParams: { status: 'PAUSED' } }) + } + > Pause Reindex - onUpdateReindex({ indexName: reindex.index, queryParams: { status: 'IN_PROGRESS' } })}> + + onUpdateReindex({ + indexName: reindex.index, + queryParams: { status: 'IN_PROGRESS' }, + }) + } + > Resume Reindex - onUpdateReindex({ indexName: reindex.index, queryParams: { status: 'ABORTED' } })}> + + onUpdateReindex({ + indexName: reindex.index, + queryParams: { status: 'ABORTED' }, + }) + } + > Cancel Reindex diff --git a/src/components/resource/ResourceCard.jsx b/src/components/resource/ResourceCard.jsx index 32b04507..c6eab5a0 100644 --- a/src/components/resource/ResourceCard.jsx +++ b/src/components/resource/ResourceCard.jsx @@ -1,7 +1,7 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import ResourceEditor from './ResourceEditor'; export default function ImportSettingsCard({ diff --git a/src/components/resource/ResourceDialog.jsx b/src/components/resource/ResourceDialog.jsx index c7279d45..a8c8d2f1 100644 --- a/src/components/resource/ResourceDialog.jsx +++ b/src/components/resource/ResourceDialog.jsx @@ -1,22 +1,16 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import startCase from 'lodash.startcase'; import Dialog from '@material-ui/core/Dialog'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import startCase from 'lodash.startcase'; +import { connect } from 'react-redux'; -import ResourceForm from './ResourceForm'; -import * as formActions from '../../formactions/resource'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/resource'; import WizardForm from '../ui/WizardForm'; -function ResourceDialog({ - closeModal, - isOpen, - history, - openSnackBar, - resourceType, -}) { +import ResourceForm from './ResourceForm'; + +function ResourceDialog({ closeModal, isOpen, history, openSnackBar, resourceType }) { const onSubmitSuccess = (response) => { const { resourceDocument } = response; const { id: resourceId } = resourceDocument; diff --git a/src/components/resource/ResourceDisplay.jsx b/src/components/resource/ResourceDisplay.jsx index 6c08f9aa..a65be76b 100644 --- a/src/components/resource/ResourceDisplay.jsx +++ b/src/components/resource/ResourceDisplay.jsx @@ -1,241 +1,255 @@ -import React from 'react'; +import { Fragment } from 'react'; import TextGrid from '../ui/TextGrid'; -const SimpleMetadataType = ({ metadata }) => ( - <> - - {metadata.field - && metadata.field.map((field) => ( - - ))} - -); - -const ThumbnailServiceType = ({ thumbnail }) => ( - <> - - - -); - -const NetworkType = ({ network }) => ( - <> - - - -); - -const FinalCutServerType = ({ finalcutserver }) => ( - <> - - - - - - -); - -const CerifyType = ({ cerify }) => ( - <> - - - {cerify.mediaLocation - && cerify.mediaLocation.map((mediaLocation, index) => ( - - - - - ))} - -); - -const TranscoderDirectAccess = ({ directAccess }) => ( - <> - - {/* +function SimpleMetadataType({ metadata }) { + return ( + <> + + {metadata.field && + metadata.field.map((field) => ( + + ))} + + ); +} + +function ThumbnailServiceType({ thumbnail }) { + return ( + <> + + + + ); +} + +function NetworkType({ network }) { + return ( + <> + + + + ); +} + +function FinalCutServerType({ finalcutserver }) { + return ( + <> + + + + + + + ); +} + +function CerifyType({ cerify }) { + return ( + <> + + + {cerify.mediaLocation && + cerify.mediaLocation.map((mediaLocation, index) => ( + + + + + ))} + + ); +} + +function TranscoderDirectAccess({ directAccess }) { + return ( + <> + + {/* */} - -); - -const ExternalTranscoderType = ({ externalTranscoder }) => ( - <> - - - - - - - - -); - -const TranscoderType = ({ transcoder }) => ( - <> - - - - - - - { transcoder.directAccess - && transcoder.directAccess.map((directAccess, index) => ( - - ))} - - {/* */} - {/* */} - {/* */} - - - -); - -const MXFServerResourceType = ({ mxfserver }) => ( - <> - - - - - - - - - - - - - - - - -); - -const SigniantType = ({ signiant }) => ( - <> - - - - - - -); - -const LDAPResourceType = ({ ldap }) => ( - <> - - - - - - - - - - - - - - { ldap.sync - && ( - <> - - - + + ); +} + +function ExternalTranscoderType({ externalTranscoder }) { + return ( + <> + + + + + + + + + ); +} + +function TranscoderType({ transcoder }) { + return ( + <> + + + + + + + {transcoder.directAccess && + transcoder.directAccess.map((directAccess, index) => ( + + ))} + + {/* */} + {/* */} + {/* */} + + + + ); +} + +function MXFServerResourceType({ mxfserver }) { + return ( + <> + + + + + + + + + + + + + + + + + ); +} + +function SigniantType({ signiant }) { + return ( + <> + + + + + + + ); +} + +function LDAPResourceType({ ldap }) { + return ( + <> + + + + + + + + + + + + + + {ldap.sync && ( + <> + + + )} - -); - -const CloudConvertType = ({ cloudconvert }) => ( - <> - - - - - - -); - -const VidinetServiceType = ({ vidinet }) => ( - <> - - - - - - -); - -const EidrType = ({ eidr }) => ( - <> - - - - - - -); - -const ResourceType = ({ resourceType, resourceDocument }) => { + + ); +} + +function CloudConvertType({ cloudconvert }) { + return ( + <> + + + + + + + ); +} + +function VidinetServiceType({ vidinet }) { + return ( + <> + + + + + + + + ); +} + +function EidrType({ eidr }) { + return ( + <> + + + + + + + ); +} + +function CallbackLocationResourceType({ callback }) { + return ; +} + +function ResourceType({ resourceType, resourceDocument }) { switch (resourceType) { case 'network': - return ( - - ); + return ; case 'transcoder': - return ( - - ); + return ; case 'externalTranscoder': - return ( - - ); + return ; case 'cerify': - return ( - - ); + return ; case 'thumbnail': - return ( - - ); + return ; case 'finalcutserver': - return ( - - ); + return ; case 'mxfserver': - return ( - - ); + return ; case 'signiant': - return ( - - ); + return ; case 'ldap': - return ( - - ); + return ; case 'cloudconvert': - return ( - - ); + return ; case 'vidinet': - return ( - - ); + return ; case 'eidr': - return ( - - ); + return ; + case 'callback': + return ; default: return null; } -}; +} export default function ResourceDisplay({ resourceType, resourceDocument }) { return ( diff --git a/src/components/resource/ResourceEditor.jsx b/src/components/resource/ResourceEditor.jsx index ab048376..52cf244a 100644 --- a/src/components/resource/ResourceEditor.jsx +++ b/src/components/resource/ResourceEditor.jsx @@ -1,23 +1,25 @@ -import React from 'react'; -import Grid from '@material-ui/core/Grid'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import Switch from '@material-ui/core/Switch'; +import { PureComponent } from 'react'; + +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Divider from '@material-ui/core/Divider'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Grid from '@material-ui/core/Grid'; +import Switch from '@material-ui/core/Switch'; import { connect } from 'react-redux'; import { submit } from 'redux-form'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Divider from '@material-ui/core/Divider'; -import ResourceForm from './ResourceForm'; -import ResourceDisplay from './ResourceDisplay'; -import * as formActions from '../../formactions/resource'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/resource'; + +import ResourceDisplay from './ResourceDisplay'; +import ResourceForm from './ResourceForm'; const EDIT_RESOURCE_FORM = 'EDIT_RESOURCE_FORM'; -class ResourceEditor extends React.PureComponent { +class ResourceEditor extends PureComponent { constructor(props) { super(props); this.toggleEdit = this.toggleEdit.bind(this); @@ -32,17 +34,9 @@ class ResourceEditor extends React.PureComponent { } render() { - const { - resourceType, - resourceId, - resourceDocument, - submitForm, - onRefresh, - openSnackBar, - } = this.props; - const { - isEditing, - } = this.state; + const { resourceType, resourceId, resourceDocument, submitForm, onRefresh, openSnackBar } = + this.props; + const { isEditing } = this.state; const initialValues = { resourceDocument, }; @@ -50,7 +44,9 @@ class ResourceEditor extends React.PureComponent { this.toggleEdit(); const messageContent = 'Resource Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Resource'; @@ -59,7 +55,7 @@ class ResourceEditor extends React.PureComponent { return ( <> - )} + } /> - {isEditing - ? ( - - ) - : ( - - )} + {isEditing ? ( + + ) : ( + + )} - {isEditing - && ( + {isEditing && ( <> - - - )} + )} ); } diff --git a/src/components/resource/ResourceForm.jsx b/src/components/resource/ResourceForm.jsx index dd26081e..0dae1b42 100644 --- a/src/components/resource/ResourceForm.jsx +++ b/src/components/resource/ResourceForm.jsx @@ -1,605 +1,276 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; -import Typography from '@material-ui/core/Typography'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import UrlField from '../ui/UrlField'; +import { TextField, Select } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; import ChipInput from '../ui/ChipInput'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; import FieldArray from '../ui/FieldArray'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { SimpleMetadataType } from '../ui/FormType'; +import UrlField from '../ui/UrlField'; -const TranscoderConfigurationType = () => ( - <> - - - - - - - - - - )} - label="Bilinear Effects" - /> - -); - -const MediaLocation = () => ( - <> - - - -); +function TranscoderConfigurationType() { + return ( + <> + + + + + + + + + } + label="Bilinear Effects" + /> + + ); +} -const TranscoderDirectAccessRewrite = () => ( - <> - - +function MediaLocation() { + return ( + <> + + + + ); +} - -); +function TranscoderDirectAccessRewrite() { + return ( + <> + + + + ); +} -const TranscoderDirectAccess = () => ( - <> - - - -); +function TranscoderDirectAccess() { + return ( + <> + + + + ); +} -export const NetworkTypeForm = () => ( - <> - - - -); +export function NetworkTypeForm() { + return ( + <> + + + + ); +} -export const ExternalTranscoderTypeForm = () => ( - <> - - - - - - - - -); +export function ExternalTranscoderTypeForm() { + return ( + <> + + + + + + + + + ); +} -export const CerifyTypeForm = () => ( - <> - - - - -); +export function CerifyTypeForm() { + return ( + <> + + + + + ); +} -export const FinalCutServerTypeForm = () => ( - <> - - - - - - -); +export function FinalCutServerTypeForm() { + return ( + <> + + + + + + + ); +} -export const MXFServerResourceTypeForm = () => ( - <> - - - - - - - - - - - - - - - -); +export function MXFServerResourceTypeForm() { + return ( + <> + + + + + + + + + + + + + + + + ); +} -export const SigniantTypeForm = () => ( - <> - - - - - - -); +export function SigniantTypeForm() { + return ( + <> + + + + + + + ); +} -export const LDAPResourceTypeForm = () => ( - <> - - - - - - - - - - - - - - - )} - label="Create Users" - /> - - )} - label="Create Groups" - /> - -); +export function LDAPResourceTypeForm() { + return ( + <> + + + + + + + + + + + + + + } + label="Create Users" + /> + } + label="Create Groups" + /> + + ); +} -export const CloudConvertTypeForm = () => ( - <> - - - - - - -); +export function CloudConvertTypeForm() { + return ( + <> + + + + + + + ); +} -export const VidinetServiceTypeForm = () => ( - <> - - - - - -); +export function VidinetServiceTypeForm() { + return ( + <> + + + + + + + ); +} -export const EidrTypeForm = () => ( - <> - - - - - - -); +export function EidrTypeForm() { + return ( + <> + + + + + + + ); +} +export function CallbackLocationResourceTypeForm() { + return ; +} -export const TranscoderTypeForm = () => ( - <> - - - Resource Name - - TRANSCODER - DIRECTORY - - - - - - - -); +export function TranscoderTypeForm() { + return ( + <> + + + Resource Name + + TRANSCODER + DIRECTORY + + + + + + + + ); +} -export const ThumbnailServiceTypeForm = () => ( - <> - - {/* // This is an array from v23.2 +export function ThumbnailServiceTypeForm() { + return ( + <> + + {/* // This is an array from v23.2 ( fullWidth defaultValue="file://" /> */} - - Mode - - READ_WRITE - READ - NONE - - - -); + + Mode + + READ_WRITE + READ + NONE + + + + ); +} -const ResourceTypeForm = ({ resourceType }) => { +function ResourceTypeForm({ resourceType }) { switch (resourceType) { case 'network': - return ( - - ); + return ; case 'transcoder': - return ( - - ); + return ; case 'externalTranscoder': - return ( - - ); + return ; case 'cerify': - return ( - - ); + return ; case 'thumbnail': - return ( - - ); + return ; case 'finalcutserver': - return ( - - ); + return ; case 'mxfserver': - return ( - - ); + return ; case 'signiant': - return ( - - ); + return ; case 'ldap': - return ( - - ); + return ; case 'cloudconvert': - return ( - - ); + return ; case 'vidinet': - return ( - - ); + return ; case 'eidr': - return ( - - ); + return ; + case 'callback': + return ; default: return null; } -}; +} -function ResourceForm({ - error, - handleSubmit, - resourceType, -}) { +function ResourceForm({ error, handleSubmit, resourceType }) { return (
{error && {error}} diff --git a/src/components/resource/ResourceListCard.jsx b/src/components/resource/ResourceListCard.jsx index aa841f3a..b505ab5a 100644 --- a/src/components/resource/ResourceListCard.jsx +++ b/src/components/resource/ResourceListCard.jsx @@ -1,13 +1,10 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import ResourceListTable from './ResourceListTable'; -export default function ResourceListCard({ - resourceListDocument, - resourceType, -}) { +export default function ResourceListCard({ resourceListDocument, resourceType }) { return ( diff --git a/src/components/resource/ResourceListRow.jsx b/src/components/resource/ResourceListRow.jsx index a58b3102..fb897518 100644 --- a/src/components/resource/ResourceListRow.jsx +++ b/src/components/resource/ResourceListRow.jsx @@ -1,163 +1,154 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; -import TableRowLink from '../ui/TableRowLink'; + import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; +import TableRowLink from '../ui/TableRowLink'; -const NetworkRow = ({ resource }) => ( - <> - {resource.netmask} - {resource.bandwidth} - -); +function NetworkRow({ resource }) { + return ( + <> + {resource.netmask} + {resource.bandwidth} + + ); +} -const ExternalTranscoderRow = ({ resource }) => ( - <> - {resource.source} - {resource.destination} - {resource.shapeTag} - -); +function ExternalTranscoderRow({ resource }) { + return ( + <> + {resource.source} + {resource.destination} + {resource.shapeTag} + + ); +} -const TranscoderRow = ({ resource }) => ( - <> - {resource.url} - {resource.version} - - {resource.state === 'ONLINE' ? : } - - -); +function TranscoderRow({ resource }) { + return ( + <> + {resource.url} + {resource.version} + {resource.state === 'ONLINE' ? : } + + ); +} -const ThumbnailServiceRow = ({ resource }) => ( - <> - {resource.path} - - {resource.state === 'ONLINE' ? : } - - -); +function ThumbnailServiceRow({ resource }) { + return ( + <> + {resource.path} + {resource.state === 'ONLINE' ? : } + + ); +} -const CerifyRow = ({ resource }) => ( - <> - {resource.address} - -); +function CerifyRow({ resource }) { + return {resource.address}; +} -const FinalCutServerRow = ({ resource }) => ( - <> - {resource.url} - {resource.tag} - {resource.state} - -); +function FinalCutServerRow({ resource }) { + return ( + <> + {resource.url} + {resource.tag} + {resource.state} + + ); +} -const MXFServerRow = ({ resource }) => ( - <> - {resource.url} - {resource.workspaceUrl} - {resource.userWorkspaceUrl} - -); +function MXFServerRow({ resource }) { + return ( + <> + {resource.url} + {resource.workspaceUrl} + {resource.userWorkspaceUrl} + + ); +} -const SigniantRow = ({ resource }) => ( - <> - {resource.url} - {resource.tag} - -); +function SigniantRow({ resource }) { + return ( + <> + {resource.url} + {resource.tag} + + ); +} -const LDAPRow = ({ resource }) => ( - <> - {resource.url} - -); +function LDAPRow({ resource }) { + return {resource.url}; +} -const CloudConvertRow = ({ resource }) => ( - <> - {resource.publicAddress} - {resource.apiHost} - -); +function CloudConvertRow({ resource }) { + return ( + <> + {resource.publicAddress} + {resource.apiHost} + + ); +} -const VidinetServiceRow = ({ resource }) => ( - <> - {resource.url} - {resource.name} - {resource.endpoint} - {resource.state} - -); +function VidinetServiceRow({ resource }) { + return ( + <> + {resource.name} + {resource.type} + {resource.url} + {resource.endpoint} + {resource.state} + + ); +} -const EidrRow = ({ resource }) => ( - <> - {resource.url} - {resource.partyId} - {resource.userId} - -); +function EidrRow({ resource }) { + return ( + <> + {resource.url} + {resource.partyId} + {resource.userId} + + ); +} +function CallbackRow({ resource }) { + return {resource.uri}; +} -const ResourceRow = ({ resource, resourceType }) => { +function ResourceRow({ resource, resourceType }) { if (resource[resourceType] === undefined) return null; switch (resourceType) { case 'network': - return ( - - ); + return ; case 'transcoder': - return ( - - ); + return ; case 'externalTranscoder': return ( ); case 'cerify': - return ( - - ); + return ; case 'thumbnail': - return ( - - ); + return ; case 'finalcutserver': - return ( - - ); + return ; case 'mxfserver': - return ( - - ); + return ; case 'signiant': - return ( - - ); + return ; case 'ldap': - return ( - - ); + return ; case 'cloudconvert': - return ( - - ); + return ; case 'vidinet': - return ( - - ); + return ; case 'eidr': - return ( - - ); + return ; + case 'callback': + return ; default: - return ( - - ); + return ; } -}; +} -export default function ResourceListRow({ - resource, - resourceType, -}) { +export default function ResourceListRow({ resource, resourceType }) { const { id: resourceId } = resource; return ( diff --git a/src/components/resource/ResourceListTable.jsx b/src/components/resource/ResourceListTable.jsx index 5281c9ba..4b8a071c 100644 --- a/src/components/resource/ResourceListTable.jsx +++ b/src/components/resource/ResourceListTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; @@ -7,156 +6,150 @@ import TableRow from '@material-ui/core/TableRow'; import ResourceListRow from './ResourceListRow'; -const NetworkHeader = () => ( - <> - Netmask - Bandswidth - -); - -const ExternalTranscoderHeader = () => ( - <> - Source - Destination - Shape Tag - -); - -const TranscoderHeader = () => ( - <> - URL - Version - Status - -); - -const CerifyHeader = () => ( - <> - Address - -); - -const FinalCutServerHeader = () => ( - <> - URL - Tag - State - -); - -const MXFServerHeader = () => ( - <> - URL - Workspace Url - User Workspace Url - -); - -const SigniantHeader = () => ( - <> - URL - Tag - -); - -const LDAPHeader = () => ( - <> - URL - -); - -const CloudConvertHeader = () => ( - <> - Public Address - API Host - -); - -const VidinetServiceRow = () => ( - <> - Url - Name - Endpoint - State - -); - -const EidrHeader = () => ( - <> - URL - Party ID - User ID - -); - -const ThumbnailServiceHeader = () => ( - <> - Path - Status - -); - -const ResourceHeader = ({ resourceType }) => { +function NetworkHeader() { + return ( + <> + Netmask + Bandswidth + + ); +} + +function ExternalTranscoderHeader() { + return ( + <> + Source + Destination + Shape Tag + + ); +} + +function TranscoderHeader() { + return ( + <> + URL + Version + Status + + ); +} + +function CerifyHeader() { + return Address; +} + +function FinalCutServerHeader() { + return ( + <> + URL + Tag + State + + ); +} + +function MXFServerHeader() { + return ( + <> + URL + Workspace Url + User Workspace Url + + ); +} + +function SigniantHeader() { + return ( + <> + URL + Tag + + ); +} + +function LDAPHeader() { + return URL; +} + +function CloudConvertHeader() { + return ( + <> + Public Address + API Host + + ); +} + +function VidinetServiceRow() { + return ( + <> + Name + Type + Url + Endpoint + State + + ); +} + +function EidrHeader() { + return ( + <> + URL + Party ID + User ID + + ); +} + +function ThumbnailServiceHeader() { + return ( + <> + Path + Status + + ); +} + +function CallbackHeader() { + return URL; +} + +function ResourceHeader({ resourceType }) { switch (resourceType) { case 'network': - return ( - - ); + return ; case 'transcoder': - return ( - - ); + return ; case 'externalTranscoder': - return ( - - ); + return ; case 'cerify': - return ( - - ); + return ; case 'thumbnail': - return ( - - ); + return ; case 'finalcutserver': - return ( - - ); + return ; case 'mxfserver': - return ( - - ); + return ; case 'signiant': - return ( - - ); + return ; case 'ldap': - return ( - - ); + return ; case 'cloudconvert': - return ( - - ); + return ; case 'vidinet': - return ( - - ); + return ; case 'eidr': - return ( - - ); + return ; + case 'callback': + return ; default: - return ( - - ); + return ; } -}; +} -export default function NotificationListTable({ - resourceListDocument = {}, - resourceType, -}) { +export default function NotificationListTable({ resourceListDocument = {}, resourceType }) { const { resource: resourceList = [] } = resourceListDocument; return (
@@ -168,11 +161,7 @@ export default function NotificationListTable({ {resourceList.map((resource) => ( - + ))}
diff --git a/src/components/resource/ResourceListTitle.jsx b/src/components/resource/ResourceListTitle.jsx index f2c962a4..2abfb3c6 100644 --- a/src/components/resource/ResourceListTitle.jsx +++ b/src/components/resource/ResourceListTitle.jsx @@ -1,14 +1,8 @@ -import React from 'react'; import startCase from 'lodash.startcase'; import TitleHeader from '../ui/TitleHeader'; -export default function ResourceListTitle({ - resourceType, - openCode, - openCreate, - onRefresh, -}) { +export default function ResourceListTitle({ resourceType, openCode, openCreate, onRefresh }) { return ( { - api.removeResource({ resourceId, resourceType }) + api + .removeResource({ resourceId, resourceType }) .then(() => { const messageContent = `${resourceType} ${resourceId} Removed`; openSnackBar({ messageContent }); @@ -30,19 +30,12 @@ export default function ResourceRemove({ }; return ( - - {`Remove ${startCase(resourceType)} "${resourceId}"?`} - + {`Remove ${startCase(resourceType)} "${resourceId}"?`} - diff --git a/src/components/resource/ResourceTitle.jsx b/src/components/resource/ResourceTitle.jsx index bb7f6f0f..eb9f3b8a 100644 --- a/src/components/resource/ResourceTitle.jsx +++ b/src/components/resource/ResourceTitle.jsx @@ -1,7 +1,6 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; -import DeleteForever from '@material-ui/icons/DeleteForever'; import IconButton from '@material-ui/core/IconButton'; +import DeleteForever from '@material-ui/icons/DeleteForever'; +import startCase from 'lodash.startcase'; import TitleHeader from '../ui/TitleHeader'; @@ -21,11 +20,11 @@ export default function ResourceTitle({ title={resourceId} onRefresh={onRefresh} openCode={openCode} - actionComponent={( + actionComponent={ - )} + } /> ); } diff --git a/src/components/resource/ResourceTypeListCard.jsx b/src/components/resource/ResourceTypeListCard.jsx index 317eb71e..5b1cf390 100644 --- a/src/components/resource/ResourceTypeListCard.jsx +++ b/src/components/resource/ResourceTypeListCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import ResourceTypeListTable from './ResourceTypeListTable'; -export default function ResourceTypeListCard({ - resourceTypeListDocument, -}) { +export default function ResourceTypeListCard({ resourceTypeListDocument }) { return ( - + ); diff --git a/src/components/resource/ResourceTypeListRow.jsx b/src/components/resource/ResourceTypeListRow.jsx index 359613b3..7e973516 100644 --- a/src/components/resource/ResourceTypeListRow.jsx +++ b/src/components/resource/ResourceTypeListRow.jsx @@ -1,12 +1,9 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; import startCase from 'lodash.startcase'; import TableRowLink from '../ui/TableRowLink'; -export default function ResourceTypeListRow({ - resourceType, -}) { +export default function ResourceTypeListRow({ resourceType }) { return ( {startCase(resourceType)} diff --git a/src/components/resource/ResourceTypeListTable.jsx b/src/components/resource/ResourceTypeListTable.jsx index d4457770..cff0766d 100644 --- a/src/components/resource/ResourceTypeListTable.jsx +++ b/src/components/resource/ResourceTypeListTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; @@ -7,9 +6,7 @@ import TableRow from '@material-ui/core/TableRow'; import ResourceTypeListRow from './ResourceTypeListRow'; -export default function ResourceTypeListTable({ - resourceTypeListDocument = {}, -}) { +export default function ResourceTypeListTable({ resourceTypeListDocument = {} }) { const { resourcetype: resourceTypeList = [] } = resourceTypeListDocument; return ( @@ -20,10 +17,7 @@ export default function ResourceTypeListTable({ {resourceTypeList.map((resourceType) => ( - + ))}
diff --git a/src/components/resource/ResourceTypeListTitle.jsx b/src/components/resource/ResourceTypeListTitle.jsx index ae877097..21e92355 100644 --- a/src/components/resource/ResourceTypeListTitle.jsx +++ b/src/components/resource/ResourceTypeListTitle.jsx @@ -1,16 +1,5 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; -export default function ResourceTypeListTitle({ - onRefresh, - openCode, -}) { - return ( - - ); +export default function ResourceTypeListTitle({ onRefresh, openCode }) { + return ; } diff --git a/src/components/scheduledrequest/ScheduledRequestCard.jsx b/src/components/scheduledrequest/ScheduledRequestCard.jsx index 44a82ef7..b611b560 100644 --- a/src/components/scheduledrequest/ScheduledRequestCard.jsx +++ b/src/components/scheduledrequest/ScheduledRequestCard.jsx @@ -1,17 +1,13 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import ScheduledRequestTable from './ScheduledRequestTable'; -export default ({ - ...props -}) => ( +export default ({ ...props }) => ( - + ); diff --git a/src/components/scheduledrequest/ScheduledRequestDetail.jsx b/src/components/scheduledrequest/ScheduledRequestDetail.jsx index ba72e3b7..dc96598b 100644 --- a/src/components/scheduledrequest/ScheduledRequestDetail.jsx +++ b/src/components/scheduledrequest/ScheduledRequestDetail.jsx @@ -1,54 +1,45 @@ -import React from 'react'; +import { useState, useEffect } from 'react'; import { scheduledrequest as api } from '@vidispine/vdt-api'; + import TextGrid from '../ui/TextGrid'; -export default function ScheduledRequestDetail({ - scheduledRequestType, - openSnackBar, -}) { - const { - id: requestId, - request = {}, - response = {}, - } = scheduledRequestType; +export default function ScheduledRequestDetail({ scheduledRequestType, openSnackBar }) { + const { id: requestId, request = {}, response = {} } = scheduledRequestType; const { contentType } = response; - const [responseBody, setResponseBody] = React.useState(); + const [responseBody, setResponseBody] = useState(); const onGetScheduledRequestResponse = () => { if (!response.hasBody) return; - api.getScheduledRequestResponse({ requestId }) + api + .getScheduledRequestResponse({ requestId }) .then(({ data }) => setResponseBody(data)) .catch(() => { const messageContent = 'Error Loading Request Response'; openSnackBar({ messageContent, messageColor: 'secondary' }); }); }; - React.useEffect(onGetScheduledRequestResponse, []); + useEffect(onGetScheduledRequestResponse, [openSnackBar, requestId, response.hasBody]); return ( <> - + {response.statusCode && ( - <> - - - {responseBody && ( - - )} - + <> + + + {responseBody && ( + + )} + )} ); diff --git a/src/components/scheduledrequest/ScheduledRequestDialog.jsx b/src/components/scheduledrequest/ScheduledRequestDialog.jsx index ef08a1b5..f662a041 100644 --- a/src/components/scheduledrequest/ScheduledRequestDialog.jsx +++ b/src/components/scheduledrequest/ScheduledRequestDialog.jsx @@ -1,26 +1,19 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; -import DialogTitle from '@material-ui/core/DialogTitle'; import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; import withUI from '../../hoc/withUI'; + import ScheduledRequestDetail from './ScheduledRequestDetail'; -function ScheduledRequestDialog({ - open, - onClose, - scheduledRequestType, - openSnackBar, -}) { +function ScheduledRequestDialog({ open, onClose, scheduledRequestType, openSnackBar }) { if (!scheduledRequestType) return null; const { id: requestId } = scheduledRequestType; return ( - - {`Scheduled Request ${requestId}`} - + {`Scheduled Request ${requestId}`} { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Listing Scheduled Requests'; @@ -38,17 +33,10 @@ function ScheduledRequestFilter({
- - diff --git a/src/components/scheduledrequest/ScheduledRequestFilterCard.jsx b/src/components/scheduledrequest/ScheduledRequestFilterCard.jsx index 282604c7..dff3c965 100644 --- a/src/components/scheduledrequest/ScheduledRequestFilterCard.jsx +++ b/src/components/scheduledrequest/ScheduledRequestFilterCard.jsx @@ -1,17 +1,13 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import ScheduledRequestFilter from './ScheduledRequestFilter'; -export default ({ - ...props -}) => ( +export default ({ ...props }) => ( - + ); diff --git a/src/components/scheduledrequest/ScheduledRequestFilterForm.jsx b/src/components/scheduledrequest/ScheduledRequestFilterForm.jsx index 72598b0a..f2cacf71 100644 --- a/src/components/scheduledrequest/ScheduledRequestFilterForm.jsx +++ b/src/components/scheduledrequest/ScheduledRequestFilterForm.jsx @@ -1,14 +1,12 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; - +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import { Select } from '../form'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( @@ -22,17 +20,11 @@ const queryParams = () => ( ); -function ScheduledRequestFilterForm({ - error, - handleSubmit, -}) { +function ScheduledRequestFilterForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/scheduledrequest/ScheduledRequestRemoveAll.jsx b/src/components/scheduledrequest/ScheduledRequestRemoveAll.jsx index ee72afed..2a265881 100644 --- a/src/components/scheduledrequest/ScheduledRequestRemoveAll.jsx +++ b/src/components/scheduledrequest/ScheduledRequestRemoveAll.jsx @@ -1,25 +1,23 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { scheduledrequest as api } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; -function ScheduledRequestRemoveAll({ - open, - onClose, - openSnackBar, - onSuccess, -}) { +function ScheduledRequestRemoveAll({ open, onClose, openSnackBar, onSuccess }) { const onRemove = () => { - api.removeAllScheduledRequest() + api + .removeAllScheduledRequest() .then(() => { const messageContent = 'All Scheduled Requests Removed'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Removing All Scheduled Requests'; @@ -28,19 +26,12 @@ function ScheduledRequestRemoveAll({ }; return ( - - Remove All Scheduled Requests - + Remove All Scheduled Requests - diff --git a/src/components/scheduledrequest/ScheduledRequestRow.jsx b/src/components/scheduledrequest/ScheduledRequestRow.jsx index 9cd4c706..b9e5a151 100644 --- a/src/components/scheduledrequest/ScheduledRequestRow.jsx +++ b/src/components/scheduledrequest/ScheduledRequestRow.jsx @@ -1,35 +1,34 @@ -import React from 'react'; -import moment from 'moment'; import IconButton from '@material-ui/core/IconButton'; import DeleteIcon from '@material-ui/icons/Delete'; import RemoveRedEyeIcon from '@material-ui/icons/RemoveRedEye'; +import moment from 'moment'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRow'; -export default function ScheduledRequestRow({ - scheduledRequestType = {}, - onOpen, - onRemove, -}) { +export default function ScheduledRequestRow({ scheduledRequestType = {}, onOpen, onRemove }) { return ( - <> - - {scheduledRequestType.id} - {scheduledRequestType.user} - {scheduledRequestType.state} - {scheduledRequestType.created ? moment(scheduledRequestType.created).toString() : ''} - {scheduledRequestType.date ? moment(scheduledRequestType.date).toString() : ''} - {scheduledRequestType.executed ? moment(scheduledRequestType.executed).toString() : ''} - - onOpen({ scheduledRequestType })}> - - - onRemove({ scheduledRequestType })}> - - - - - + + {scheduledRequestType.id} + {scheduledRequestType.user} + {scheduledRequestType.state} + + {scheduledRequestType.created ? moment(scheduledRequestType.created).toString() : ''} + + + {scheduledRequestType.date ? moment(scheduledRequestType.date).toString() : ''} + + + {scheduledRequestType.executed ? moment(scheduledRequestType.executed).toString() : ''} + + + onOpen({ scheduledRequestType })}> + + + onRemove({ scheduledRequestType })}> + + + + ); } diff --git a/src/components/scheduledrequest/ScheduledRequestTable.jsx b/src/components/scheduledrequest/ScheduledRequestTable.jsx index 98e85a89..f60142a1 100644 --- a/src/components/scheduledrequest/ScheduledRequestTable.jsx +++ b/src/components/scheduledrequest/ScheduledRequestTable.jsx @@ -1,25 +1,18 @@ -import React from 'react'; - +import withDialogProps from '../../hoc/withDialogProps'; import Table from '../ui/Table'; import TableBody from '../ui/TableBody'; import TableCell from '../ui/TableCell'; import TableHead from '../ui/TableHead'; import TableRow from '../ui/TableRow'; -import withDialogProps from '../../hoc/withDialogProps'; -import ScheduledRequestRow from './ScheduledRequestRow'; import ScheduledRequestDialog from './ScheduledRequestDialog'; import ScheduledRequestRemove from './ScheduledRequestRemove'; +import ScheduledRequestRow from './ScheduledRequestRow'; const SCHEDULEDREQUEST_REMOVE_DIALOG = 'SCHEDULEDREQUEST_REMOVE_DIALOG'; const SCHEDULEDREQUEST_DETAIL_DIALOG = 'SCHEDULEDREQUEST_DETAIL_DIALOG'; -function ScheduledRequestTable({ - scheduledRequestListDocument, - onSuccess, - dialogProps, - onOpen, -}) { +function ScheduledRequestTable({ scheduledRequestListDocument, onSuccess, dialogProps, onOpen }) { const { scheduledRequest: scheduledRequestListType = [] } = scheduledRequestListDocument; return ( <> @@ -46,10 +39,7 @@ function ScheduledRequestTable({ ))} - + ( - + ); diff --git a/src/components/search/SearchDocument.jsx b/src/components/search/SearchDocument.jsx index 1d8d2dd3..1a207bd7 100644 --- a/src/components/search/SearchDocument.jsx +++ b/src/components/search/SearchDocument.jsx @@ -1,19 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import CardContent from '@material-ui/core/CardContent'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ItemSearchForm from '../item/ItemSearchForm'; +import * as formActions from '../../formactions/search'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/search'; +import ItemSearchForm from '../item/ItemSearchForm'; export const SEARCH_FORM = 'SEARCH_FORM'; @@ -30,19 +28,22 @@ function SearchDocument({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Search Document @@ -59,17 +60,10 @@ function SearchDocument({
- - diff --git a/src/components/search/SearchListTable.jsx b/src/components/search/SearchListTable.jsx index 89fcfc15..404196bb 100644 --- a/src/components/search/SearchListTable.jsx +++ b/src/components/search/SearchListTable.jsx @@ -1,28 +1,22 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; import Table from '@material-ui/core/Table'; -import TableRow from '@material-ui/core/TableRow'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; -import TableHead from '@material-ui/core/TableHead'; import TableFooter from '@material-ui/core/TableFooter'; +import TableHead from '@material-ui/core/TableHead'; import TablePagination from '@material-ui/core/TablePagination'; +import TableRow from '@material-ui/core/TableRow'; import TableSortLabel from '@material-ui/core/TableSortLabel'; +import startCase from 'lodash.startcase'; -import TableActions from '../ui/TableActions'; -import { ItemTypeRow } from '../item/ItemListTable'; import { CollectionTypeRow } from '../collection/CollectionListTable'; +import { ItemTypeRow } from '../item/ItemListTable'; +import TableActions from '../ui/TableActions'; -const TableHeadCell = ({ - orderBy, - orderDirection, - onChangeOrder, - name, -}) => ( - onChangeOrder ? ( +function TableHeadCell({ orderBy, orderDirection, onChangeOrder, name }) { + return onChangeOrder ? ( @@ -30,27 +24,17 @@ const TableHeadCell = ({ ) : ( - - {startCase(name)} - - ) -); + {startCase(name)} + ); +} -export const SearchResultEntryTypeRow = ({ - searchResultEntryType, - terse, - fieldList, -}) => { +export function SearchResultEntryTypeRow({ searchResultEntryType, terse, fieldList }) { const typeCell = {searchResultEntryType.type}; const entryKeys = Object.keys(searchResultEntryType); if (entryKeys.includes('item')) { const { item: itemType = {} } = searchResultEntryType; return ( - + {typeCell} ); @@ -68,12 +52,8 @@ export const SearchResultEntryTypeRow = ({ ); } - return ( - - {typeCell} - - ); -}; + return {typeCell}; +} function ItemListTable({ searchResultDocument, @@ -87,58 +67,59 @@ function ItemListTable({ page, rowsPerPage, }) { - if (searchResultDocument === undefined) { return null; } + if (searchResultDocument === undefined) { + return null; + } const { entry: entryList = [], hits: count = 0 } = searchResultDocument; const { terse, field = [] } = queryParams; let fieldList = field; - if (!Array.isArray(field)) { fieldList = field.split(','); } + if (!Array.isArray(field)) { + fieldList = field.split(','); + } return ( - <> - - +
+ + + + + {terse && + fieldList.map((fieldName) => ( + + ))} + + + + {entryList.map((searchResultEntryType) => ( + + ))} + + {onChangePage && onChangeRowsPerPage && ( + - - - {terse && ( - fieldList.map((fieldName) => ( - - )) - )} - - - - {entryList.map((searchResultEntryType) => ( - - ))} - - {(onChangePage && onChangeRowsPerPage) && ( - - - - - - )} -
- + + + )} + ); } diff --git a/src/components/search/SearchParams.jsx b/src/components/search/SearchParams.jsx index 1299eaab..3b989f67 100644 --- a/src/components/search/SearchParams.jsx +++ b/src/components/search/SearchParams.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import SearchParamsForm from './SearchParamsForm'; +import * as formActions from '../../formactions/search'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/search'; + +import SearchParamsForm from './SearchParamsForm'; export const SEARCH_PARAMS_FORM = 'SEARCH_PARAMS_FORM'; @@ -30,19 +29,22 @@ function SearchParams({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Search Params @@ -59,17 +61,10 @@ function SearchParams({ - - diff --git a/src/components/search/SearchParamsForm.jsx b/src/components/search/SearchParamsForm.jsx index 9cebe4c2..afa4aefc 100644 --- a/src/components/search/SearchParamsForm.jsx +++ b/src/components/search/SearchParamsForm.jsx @@ -1,33 +1,20 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { - queryParams as contentQueryParams, -} from '../item/ItemContentParamsForm'; -import { StatefulAsyncSelect } from '../ui/Select'; +import { TextField } from '../form'; +import { queryParams as contentQueryParams } from '../item/ItemContentParamsForm'; import { loadStorageOptions } from '../storage/StorageSelect'; import { loadStorageGroupOptions } from '../storagegroup/StorageGroupSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - - + + ( fullWidth isMulti /> - - )} - label="Count" - /> - - )} - label="Save" - /> + } label="Count" /> + } label="Save" /> ); -function SearchParamsForm({ - error, - handleSubmit, -}) { +function SearchParamsForm({ error, handleSubmit }) { return (
{error && {error}} - - + + - diff --git a/src/components/secret/SecretForm.jsx b/src/components/secret/SecretForm.jsx index 7d308fce..bbfed695 100644 --- a/src/components/secret/SecretForm.jsx +++ b/src/components/secret/SecretForm.jsx @@ -1,15 +1,17 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; + import { TextField } from '../form'; import Field from '../ui/Field'; -const SecretForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - diff --git a/src/components/selftest/SelfTestCard.jsx b/src/components/selftest/SelfTestCard.jsx index 101b301b..9bb1a6ef 100644 --- a/src/components/selftest/SelfTestCard.jsx +++ b/src/components/selftest/SelfTestCard.jsx @@ -1,30 +1,26 @@ -import React from 'react'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; import Typography from '@material-ui/core/Typography'; import startCase from 'lodash.startcase'; import SquareCard from '../ui/SquareCard'; + import SelfTestDisplay from './SelfTestDisplay'; import SelfTestStatus from './SelfTestStatus'; export default function SelfTestCard(props) { return ( - <> - - {startCase(props.selfTestDocument.name)}
} - action={ - - } - /> - - - -
- + + {startCase(props?.selfTestDocument.name)}
+ } + action={} + /> + + + + ); } diff --git a/src/components/selftest/SelfTestDisplay.jsx b/src/components/selftest/SelfTestDisplay.jsx index 55febd25..0f1b42a4 100644 --- a/src/components/selftest/SelfTestDisplay.jsx +++ b/src/components/selftest/SelfTestDisplay.jsx @@ -1,61 +1,27 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -import TypeSection from '../ui/TypeSection'; -import TypeArray from '../ui/TypeArray'; import TextGridArray from '../ui/TextGridArray'; +import TypeArray from '../ui/TypeArray'; +import TypeSection from '../ui/TypeSection'; -export const SelfTestType = ({ value = {} }) => ( - <> - - - - - - - -); - -export default function SelfTestDisplay({ - selfTestDocument, -}) { +export function SelfTestType({ value = {} }) { return ( <> - + + + + + ); } + +export default function SelfTestDisplay({ selfTestDocument }) { + return ; +} diff --git a/src/components/selftest/SelfTestListCard.jsx b/src/components/selftest/SelfTestListCard.jsx index b5e93589..4875adb4 100644 --- a/src/components/selftest/SelfTestListCard.jsx +++ b/src/components/selftest/SelfTestListCard.jsx @@ -1,17 +1,8 @@ -import React from 'react'; - import SelfTestCard from './SelfTestCard'; -export default function SelfTestListCard({ - selfTestDocument: selfTestListDocument, -}) { +export default function SelfTestListCard({ selfTestDocument: selfTestListDocument }) { const { test: selfTestList = [] } = selfTestListDocument; - return ( - selfTestList.map((selfTestDocument) => ( - - )) - ); + return selfTestList.map((selfTestDocument) => ( + + )); } diff --git a/src/components/selftest/SelfTestStatus.jsx b/src/components/selftest/SelfTestStatus.jsx index b0792614..ae9a4172 100644 --- a/src/components/selftest/SelfTestStatus.jsx +++ b/src/components/selftest/SelfTestStatus.jsx @@ -1,57 +1,25 @@ -import React from 'react'; import Chip from '@material-ui/core/Chip'; -import { - OnlineIcon, - OfflineIcon, - WarningIcon, - LoadingIcon, -} from '../ui/StatusIcon'; +import { OnlineIcon, OfflineIcon, WarningIcon, LoadingIcon } from '../ui/StatusIcon'; -const SelfTestStatus = ({ selfTestDocument = {}, loading = false, ...chipProps }) => { +function SelfTestStatus({ selfTestDocument = {}, loading = false, ...chipProps }) { if (loading === true) { - return ( - - } - label="Loading" - {...chipProps} - /> - ); + return } label="Loading" {...chipProps} />; } const { status, took } = selfTestDocument; if (status === 'ok') { return ( - - } - label={`Online${took ? ` (${took})` : ''}`} - {...chipProps} - /> + } label={`Online${took ? ` (${took})` : ''}`} {...chipProps} /> ); } if (status === 'warning') { return ( - - } - label={`Warning${took ? ` (${took})` : ''}`} - {...chipProps} - /> + } label={`Warning${took ? ` (${took})` : ''}`} {...chipProps} /> ); } return ( - - } - label={`Failed${took ? ` (${took})` : ''}`} - {...chipProps} - /> + } label={`Failed${took ? ` (${took})` : ''}`} {...chipProps} /> ); -}; +} export default SelfTestStatus; diff --git a/src/components/selftest/SelfTestTitle.jsx b/src/components/selftest/SelfTestTitle.jsx index c3ceeb70..4f818a68 100644 --- a/src/components/selftest/SelfTestTitle.jsx +++ b/src/components/selftest/SelfTestTitle.jsx @@ -1,6 +1,5 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; + import SelfTestStatus from './SelfTestStatus'; export default function SelfTestTitle(props) { @@ -8,9 +7,7 @@ export default function SelfTestTitle(props) { - } + iconList={} {...props} /> ); diff --git a/src/components/service/ServiceDisable.jsx b/src/components/service/ServiceDisable.jsx index b3b0893c..6406579b 100644 --- a/src/components/service/ServiceDisable.jsx +++ b/src/components/service/ServiceDisable.jsx @@ -1,26 +1,23 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { service as api } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; -function ServiceDisable({ - open, - onClose, - openSnackBar, - serviceName, - onSuccess, -}) { +function ServiceDisable({ open, onClose, openSnackBar, serviceName, onSuccess }) { const onRemove = () => { - api.disableService({ serviceName }) + api + .disableService({ serviceName }) .then(() => { const messageContent = `Service ${serviceName} Disabled`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Disabling Service'; @@ -29,19 +26,12 @@ function ServiceDisable({ }; return ( - - {`Disable Service "${serviceName}"?`} - + {`Disable Service "${serviceName}"?`} - diff --git a/src/components/service/ServiceDisplay.jsx b/src/components/service/ServiceDisplay.jsx index c43370aa..99472f03 100644 --- a/src/components/service/ServiceDisplay.jsx +++ b/src/components/service/ServiceDisplay.jsx @@ -1,97 +1,31 @@ -import React from 'react'; import TextGrid from '../ui/TextGrid'; import TypeSection from '../ui/TypeSection'; -const VidispineServiceType = ({ value = {} }) => ( - <> - - - - - - - - - - - - - -); - -export default function ServiceDisplay({ - vidispineServiceDocument, -}) { +function VidispineServiceType({ value = {} }) { return ( <> - + + + + + + + + + + + ); } + +export default function ServiceDisplay({ vidispineServiceDocument }) { + return ; +} diff --git a/src/components/service/ServiceEnable.jsx b/src/components/service/ServiceEnable.jsx index 38d7ce32..f0c6553b 100644 --- a/src/components/service/ServiceEnable.jsx +++ b/src/components/service/ServiceEnable.jsx @@ -1,26 +1,23 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { service as api } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; -function ServiceEnable({ - open, - onClose, - openSnackBar, - serviceName, - onSuccess, -}) { +function ServiceEnable({ open, onClose, openSnackBar, serviceName, onSuccess }) { const onRemove = () => { - api.enableService({ serviceName }) + api + .enableService({ serviceName }) .then(() => { const messageContent = `Service ${serviceName} Enabled`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Enabling Service'; @@ -29,19 +26,12 @@ function ServiceEnable({ }; return ( - - {`Enable Service "${serviceName}"?`} - + {`Enable Service "${serviceName}"?`} - diff --git a/src/components/service/ServiceListCard.jsx b/src/components/service/ServiceListCard.jsx index 402b7daf..3d07e4c5 100644 --- a/src/components/service/ServiceListCard.jsx +++ b/src/components/service/ServiceListCard.jsx @@ -1,42 +1,26 @@ -import React from 'react'; +import withDialogProps from '../../hoc/withDialogProps'; -import ServiceListServiceCard from './ServiceListServiceCard'; import ServiceDisable from './ServiceDisable'; import ServiceEnable from './ServiceEnable'; -import withDialogProps from '../../hoc/withDialogProps'; +import ServiceListServiceCard from './ServiceListServiceCard'; const ENABLE_SERVICE_DIALOG = 'ENABLE_SERVICE_DIALOG'; const DISABLE_SERVICE_DIALOG = 'DISABLE_SERVICE_DIALOG'; -function ServiceListCard({ - vidispineServiceListDocument, - onRefresh, - dialogProps, - onOpen, -}) { +function ServiceListCard({ vidispineServiceListDocument, onRefresh, dialogProps, onOpen }) { const { service: serviceList = [] } = vidispineServiceListDocument; return ( <> - { - serviceList.map((vidispineServiceDocument) => ( + {serviceList.map((vidispineServiceDocument) => ( - )) - } - - + ))} + + ); } diff --git a/src/components/service/ServiceListServiceCard.jsx b/src/components/service/ServiceListServiceCard.jsx index 04104f05..e9f3827b 100644 --- a/src/components/service/ServiceListServiceCard.jsx +++ b/src/components/service/ServiceListServiceCard.jsx @@ -1,64 +1,49 @@ -import React from 'react'; -import { withStyles } from '@material-ui/core/styles'; -import Typography from '@material-ui/core/Typography'; -import CardHeader from '@material-ui/core/CardHeader'; -import CardContent from '@material-ui/core/CardContent'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; import Grid from '@material-ui/core/Grid'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import startCase from 'lodash.startcase'; import SquareCard from '../ui/SquareCard'; + import ServiceDisplay from './ServiceDisplay'; -function ServiceListServiceCard({ - vidispineServiceDocument, - classes, - onDisable, - onEnable, -}) { +function ServiceListServiceCard({ vidispineServiceDocument, classes, onDisable, onEnable }) { return ( - <> - - - {startCase(vidispineServiceDocument.name)} -
- )} - action={( - - - {vidispineServiceDocument.isEnabled - ? ( - - ) - : ( - - )} - + + {startCase(vidispineServiceDocument.name)} + } + action={ + + + {vidispineServiceDocument.isEnabled ? ( + + ) : ( + + )} - )} - /> - - - - - + + } + /> + + + + ); } const hoverStyle = (theme) => ({ diff --git a/src/components/service/ServiceTitle.jsx b/src/components/service/ServiceTitle.jsx index 1052f4c2..68f23c7d 100644 --- a/src/components/service/ServiceTitle.jsx +++ b/src/components/service/ServiceTitle.jsx @@ -1,35 +1,27 @@ -import React from 'react'; import Chip from '@material-ui/core/Chip'; -import TitleHeader from '../ui/TitleHeader'; import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; +import TitleHeader from '../ui/TitleHeader'; const getServiceListStatus = ({ vidispineServiceListDocument }) => { - if (vidispineServiceListDocument === undefined) { return null; } + if (vidispineServiceListDocument === undefined) { + return null; + } const { service: serviceList = [] } = vidispineServiceListDocument; const notRunning = serviceList.filter((thisService) => thisService.isRunning !== true); if (notRunning.length === 0) { - return ( - - } - label="All Services Running" - /> - ); + return } label="All Services Running" />; } return ( - } + avatar={} label={`${notRunning.length} ${notRunning.length === 1 ? 'Service' : 'Services'} Not Running`} /> ); }; export default function ServiceTitle(props) { - const StatusIcon = getServiceListStatus({ vidispineServiceListDocument: props.code }); + const StatusIcon = getServiceListStatus({ vidispineServiceListDocument: props?.code }); return ( - {stacktrace - ? ( - - ) - : ( - - - - )} + {stacktrace ? ( + + ) : ( + + + + )} ); diff --git a/src/components/service/StackTraceTitle.jsx b/src/components/service/StackTraceTitle.jsx index 817dfa8b..d527162d 100644 --- a/src/components/service/StackTraceTitle.jsx +++ b/src/components/service/StackTraceTitle.jsx @@ -1,13 +1,5 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; export default function StackTraceTitle(props) { - return ( - - ); + return ; } diff --git a/src/components/shape/ShapeAddComponent.jsx b/src/components/shape/ShapeAddComponent.jsx index 5e6e85c0..4efffce8 100644 --- a/src/components/shape/ShapeAddComponent.jsx +++ b/src/components/shape/ShapeAddComponent.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogContent from '@material-ui/core/DialogContent'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import ShapeAddComponentForm from './ShapeAddComponentForm'; import * as formActions from '../../formactions/component'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import ShapeAddComponentForm from './ShapeAddComponentForm'; const SHAPE_ADD_COMPONENT_FORM = 'SHAPE_ADD_COMPONENT_FORM'; @@ -28,13 +27,17 @@ function ShapeAddComponent({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Add Component Job Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Add Component Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -51,18 +54,10 @@ function ShapeAddComponent({ - - diff --git a/src/components/shape/ShapeAddComponentForm.jsx b/src/components/shape/ShapeAddComponentForm.jsx index bff39aa5..c6c2c578 100644 --- a/src/components/shape/ShapeAddComponentForm.jsx +++ b/src/components/shape/ShapeAddComponentForm.jsx @@ -1,42 +1,26 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; const queryParams = () => ( <> - + - + - )} + control={} label="Allow Reimport" /> ( ); -function ShapeAddComponentForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeAddComponentForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + - diff --git a/src/components/shape/ShapeAddMimeTypeForm.jsx b/src/components/shape/ShapeAddMimeTypeForm.jsx index 03f3c78f..e4c7f33d 100644 --- a/src/components/shape/ShapeAddMimeTypeForm.jsx +++ b/src/components/shape/ShapeAddMimeTypeForm.jsx @@ -1,42 +1,17 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; import Field from '../ui/Field'; -import { required } from '../../utils/FieldValidation'; -function ShapeAddMimeTypeForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeAddMimeTypeForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + - diff --git a/src/components/shape/ShapeAddTagForm.jsx b/src/components/shape/ShapeAddTagForm.jsx index 38781b8f..6549fd05 100644 --- a/src/components/shape/ShapeAddTagForm.jsx +++ b/src/components/shape/ShapeAddTagForm.jsx @@ -1,38 +1,18 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import Field from '../ui/Field'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; -import { required } from '../../utils/FieldValidation'; -function ShapeTagAddForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeTagAddForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } { const messageContent = 'Analyze Job Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Analyze Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -53,18 +56,10 @@ function ShapeAnalyze({ - - diff --git a/src/components/shape/ShapeAnalyzeForm.jsx b/src/components/shape/ShapeAnalyzeForm.jsx index 94042a07..f8019388 100644 --- a/src/components/shape/ShapeAnalyzeForm.jsx +++ b/src/components/shape/ShapeAnalyzeForm.jsx @@ -1,29 +1,23 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import { StatefulAsyncSelect } from '../ui/Select'; -import FieldTypeArray from '../ui/FieldTypeArray'; import JobPriority from '../../const/JobPriority'; -import { KeyValuePairType } from '../ui/FormType'; import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; import { loadStorageOptions } from '../storage/StorageSelect'; import AnalyzeJobType from '../ui/AnalyzeJobType'; +import Field from '../ui/Field'; +import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; +import { KeyValuePairType } from '../ui/FormType'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( isClearable fullWidth /> - - - + + + ( ); -function ShapeAnalyzeForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeAnalyzeForm({ error, handleSubmit, itemId, shapeId }) { return ( {error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + {`Audio Component - ${componentId}`} : 'Audio Component'} - action={componentId ? ( - - ) : undefined} + title={ + componentId ? ( + {`Audio Component - ${componentId}`} + ) : ( + 'Audio Component' + ) + } + action={ + componentId ? ( + + ) : undefined + } /> - + ( - - )) - ); + if (audioComponentList === undefined || !Array.isArray(audioComponentList)) { + return null; + } + return audioComponentList.map((audioComponent) => ( + + )); } diff --git a/src/components/shape/ShapeBinaryComponentCard.jsx b/src/components/shape/ShapeBinaryComponentCard.jsx index a901c050..b58f9d27 100644 --- a/src/components/shape/ShapeBinaryComponentCard.jsx +++ b/src/components/shape/ShapeBinaryComponentCard.jsx @@ -1,36 +1,48 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Typography from '@material-ui/core/Typography'; -import { BinaryComponentType } from './ShapeDisplay'; import SquareCard from '../ui/SquareCard'; -import ShapeComponentMetadataEditor from './ShapeComponentMetadataEditor'; + import ShapeComponentMenu from './ShapeComponentMenu'; +import ShapeComponentMetadataEditor from './ShapeComponentMetadataEditor'; +import { BinaryComponentType } from './ShapeDisplay'; export default function ShapeBinaryComponentCard({ - binaryComponent = {}, itemId, shapeId, onRefresh, ShapeComponentMenuProps = {}, + binaryComponent = {}, + itemId, + shapeId, + onRefresh, + ShapeComponentMenuProps = {}, }) { - if (binaryComponent === undefined) { return null; } + if (binaryComponent === undefined) { + return null; + } const { id: componentId, metadata } = binaryComponent; return ( {`Binary Component - ${componentId}`} : 'Binary Component'} - action={componentId ? ( - - ) : undefined} + title={ + componentId ? ( + {`Binary Component - ${componentId}`} + ) : ( + 'Binary Component' + ) + } + action={ + componentId ? ( + + ) : undefined + } /> - + ( - - )) - ); + if (binaryComponentList === undefined || !Array.isArray(binaryComponentList)) { + return null; + } + return binaryComponentList.map((binaryComponent) => ( + + )); } diff --git a/src/components/shape/ShapeCard.jsx b/src/components/shape/ShapeCard.jsx index 80706cf7..0f73679d 100644 --- a/src/components/shape/ShapeCard.jsx +++ b/src/components/shape/ShapeCard.jsx @@ -1,16 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Typography from '@material-ui/core/Typography'; -import { ShapeSection } from './ShapeDisplay'; -import SquareCard from '../ui/SquareCard'; import SimpleMetadataEditor from '../ui/SimpleMetadataEditor'; +import SquareCard from '../ui/SquareCard'; -export default function ShapeCard({ - shapeDocument = {}, itemId, shapeId, onRefresh, -}) { - if (shapeDocument === undefined) { return null; } +import { ShapeSection } from './ShapeDisplay'; + +export default function ShapeCard({ shapeDocument = {}, itemId, shapeId, onRefresh }) { + if (shapeDocument === undefined) { + return null; + } const { metadata } = shapeDocument; return ( @@ -19,9 +19,7 @@ export default function ShapeCard({ title={{`Shape - ${shapeId}`}} /> - + { const messageContent = 'Analyze Job Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Creating Analyze Job'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -54,18 +57,10 @@ function ShapeComponentAnalyze({ - - diff --git a/src/components/shape/ShapeComponentAnalyzeForm.jsx b/src/components/shape/ShapeComponentAnalyzeForm.jsx index 8f471bb2..eef47b33 100644 --- a/src/components/shape/ShapeComponentAnalyzeForm.jsx +++ b/src/components/shape/ShapeComponentAnalyzeForm.jsx @@ -1,29 +1,23 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; import { TextField, Select } from '../form'; +import { loadStorageOptions } from '../storage/StorageSelect'; import AnalyzeJobType from '../ui/AnalyzeJobType'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; -import { StatefulAsyncSelect } from '../ui/Select'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; -import { loadStorageOptions } from '../storage/StorageSelect'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( isClearable fullWidth /> - - + + ( ); -function ShapeComponentAnalyzeForm({ - error, - handleSubmit, - itemId, - shapeId, - componentId, -}) { +function ShapeComponentAnalyzeForm({ error, handleSubmit, itemId, shapeId, componentId }) { return ( {error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - + )} - + { const messageContent = 'File Added'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Adding Filet'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -56,18 +59,10 @@ function ShapeComponentAssociateFile({ - - diff --git a/src/components/shape/ShapeComponentAssociateFileForm.jsx b/src/components/shape/ShapeComponentAssociateFileForm.jsx index 3d4d7869..03661fd2 100644 --- a/src/components/shape/ShapeComponentAssociateFileForm.jsx +++ b/src/components/shape/ShapeComponentAssociateFileForm.jsx @@ -1,26 +1,18 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( - <> - - )} - label="Allow Reimport" - /> - + } + label="Allow Reimport" + /> ); function ShapeComponentAssociateFileForm({ @@ -34,43 +26,13 @@ function ShapeComponentAssociateFileForm({ return ( {error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - - )} - {!fileId && ( - + )} - + {!fileId && } + - diff --git a/src/components/shape/ShapeComponentCopyForm.jsx b/src/components/shape/ShapeComponentCopyForm.jsx index 905d8fa4..3d13712a 100644 --- a/src/components/shape/ShapeComponentCopyForm.jsx +++ b/src/components/shape/ShapeComponentCopyForm.jsx @@ -1,93 +1,36 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - + - )} + control={} label="updateMetadata" /> - ); -function ShapeComponentCopyForm({ - error, - handleSubmit, - itemId, - shapeId, - componentId, -}) { +function ShapeComponentCopyForm({ error, handleSubmit, itemId, shapeId, componentId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - + )} - - - - + + + + - diff --git a/src/components/shape/ShapeComponentCopyShapeForm.jsx b/src/components/shape/ShapeComponentCopyShapeForm.jsx index a254d6f6..0d936b9b 100644 --- a/src/components/shape/ShapeComponentCopyShapeForm.jsx +++ b/src/components/shape/ShapeComponentCopyShapeForm.jsx @@ -1,87 +1,35 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - + - )} + control={} label="updateMetadata" /> - ); -function ShapeComponentCopyShapeForm({ - error, - handleSubmit, - itemId, - shapeId, - componentId, -}) { +function ShapeComponentCopyShapeForm({ error, handleSubmit, itemId, shapeId, componentId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - + )} - - - + + + - diff --git a/src/components/shape/ShapeComponentDeleteForm.jsx b/src/components/shape/ShapeComponentDeleteForm.jsx index 7fa32a20..560fa62a 100644 --- a/src/components/shape/ShapeComponentDeleteForm.jsx +++ b/src/components/shape/ShapeComponentDeleteForm.jsx @@ -1,67 +1,31 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { TextField } from '../form'; import { required } from '../../utils/FieldValidation'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( - <> - - )} - label="keepFiles" - /> - + } + label="keepFiles" + /> ); -function ShapeComponentDeleteForm({ - error, - handleSubmit, - itemId, - shapeId, - componentId, -}) { +function ShapeComponentDeleteForm({ error, handleSubmit, itemId, shapeId, componentId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - + )} - + - diff --git a/src/components/shape/ShapeComponentMoveForm.jsx b/src/components/shape/ShapeComponentMoveForm.jsx index 028845cb..cb734222 100644 --- a/src/components/shape/ShapeComponentMoveForm.jsx +++ b/src/components/shape/ShapeComponentMoveForm.jsx @@ -1,93 +1,36 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - + - )} + control={} label="updateMetadata" /> - ); -function ShapeComponentMoveForm({ - error, - handleSubmit, - itemId, - shapeId, - componentId, -}) { +function ShapeComponentMoveForm({ error, handleSubmit, itemId, shapeId, componentId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - + )} - - - - + + + + - diff --git a/src/components/shape/ShapeComponentMoveShapeForm.jsx b/src/components/shape/ShapeComponentMoveShapeForm.jsx index f7f3bd6e..c0a55bfd 100644 --- a/src/components/shape/ShapeComponentMoveShapeForm.jsx +++ b/src/components/shape/ShapeComponentMoveShapeForm.jsx @@ -1,87 +1,35 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - + - )} + control={} label="updateMetadata" /> - ); -function ShapeComponentMoveShapeForm({ - error, - handleSubmit, - itemId, - shapeId, - componentId, -}) { +function ShapeComponentMoveShapeForm({ error, handleSubmit, itemId, shapeId, componentId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - + )} - - - + + + - diff --git a/src/components/shape/ShapeComponentRemoveFileForm.jsx b/src/components/shape/ShapeComponentRemoveFileForm.jsx index 5e905d1a..439325de 100644 --- a/src/components/shape/ShapeComponentRemoveFileForm.jsx +++ b/src/components/shape/ShapeComponentRemoveFileForm.jsx @@ -1,10 +1,9 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; import Field from '../ui/Field'; -import { required } from '../../utils/FieldValidation'; function ShapeComponentRemoveFileForm({ error, @@ -17,38 +16,12 @@ function ShapeComponentRemoveFileForm({ return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} + {!itemId && } + {!shapeId && } {!componentId && ( - - )} - {!fileId && ( - + )} + {!fileId && } - diff --git a/src/components/shape/ShapeCreateComponentPlaceholderForm.jsx b/src/components/shape/ShapeCreateComponentPlaceholderForm.jsx index 8604e689..33cdb436 100644 --- a/src/components/shape/ShapeCreateComponentPlaceholderForm.jsx +++ b/src/components/shape/ShapeCreateComponentPlaceholderForm.jsx @@ -1,12 +1,11 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm, Field } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm, Field } from 'redux-form'; -import { TextField, Select } from '../form'; import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; import FormSection from '../ui/FormSection'; const COMPONENT_TYPES = ['container', 'audio', 'video', 'binary']; @@ -23,22 +22,11 @@ const queryParams = () => ( ))} - + ); -function ShapeCreateComponentPlaceholderForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeCreateComponentPlaceholderForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} @@ -62,10 +50,7 @@ function ShapeCreateComponentPlaceholderForm({ fullWidth /> ) : null} - + - diff --git a/src/components/shape/ShapeDeductionForm.jsx b/src/components/shape/ShapeDeductionForm.jsx index 8a9f3e25..3a4db5aa 100644 --- a/src/components/shape/ShapeDeductionForm.jsx +++ b/src/components/shape/ShapeDeductionForm.jsx @@ -1,19 +1,18 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import MenuItem from '@material-ui/core/MenuItem'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { required } from '../../utils/FieldValidation'; +import { TextField, Select } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import JobPriority from '../../const/JobPriority'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; const queryParams = () => ( <> @@ -23,15 +22,9 @@ const queryParams = () => ( true mcc
- - {' '} + {' '} - )} + control={} label="Extract closed captions from video tracks as well as data tracks" /> @@ -52,11 +45,7 @@ const queryParams = () => ( arrayHeader dense /> - + ( ); -function ShapeDeductionForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeDeductionForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + - diff --git a/src/components/shape/ShapeDeleteAll.jsx b/src/components/shape/ShapeDeleteAll.jsx index 4a011e5d..7e5dc787 100644 --- a/src/components/shape/ShapeDeleteAll.jsx +++ b/src/components/shape/ShapeDeleteAll.jsx @@ -1,47 +1,37 @@ -import React from 'react'; -import { compose } from 'redux'; - -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/shape'; -import ShapeDeleteAllForm from './ShapeDeleteAllForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import ShapeDeleteAllForm from './ShapeDeleteAllForm'; + const SHAPE_DELETE_ALL_FORM = 'SHAPE_DELETE_ALL_FORM'; -function ShapeDeleteAll({ - open, - onClose, - onSuccess, - onFail, - openSnackBar, - submitForm, - itemId, -}) { +function ShapeDeleteAll({ open, onClose, onSuccess, onFail, openSnackBar, submitForm, itemId }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'All Shapes Deleted'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Deleting All Shapes'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + Delete All Shapes - - diff --git a/src/components/shape/ShapeDeleteAllForm.jsx b/src/components/shape/ShapeDeleteAllForm.jsx index bc4c6b9a..39d7f813 100644 --- a/src/components/shape/ShapeDeleteAllForm.jsx +++ b/src/components/shape/ShapeDeleteAllForm.jsx @@ -1,25 +1,19 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import BoolCheckbox from '../ui/BoolCheckbox'; -import { required } from '../../utils/FieldValidation'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - )} + control={} label="keepFiles" /> ( ); -function ShapeDeleteAllForm({ - itemId, - error, - handleSubmit, -}) { +function ShapeDeleteAllForm({ itemId, error, handleSubmit }) { return (
{error && {error}} - {!itemId && ( - - )} - + {!itemId && } + - diff --git a/src/components/shape/ShapeExportForm.jsx b/src/components/shape/ShapeExportForm.jsx index 502edfdb..0d7ddfda 100644 --- a/src/components/shape/ShapeExportForm.jsx +++ b/src/components/shape/ShapeExportForm.jsx @@ -1,30 +1,25 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; +import { required } from '../../utils/FieldValidation'; import { loadExportLocationOptions } from '../exportlocation/ExportLocationSelect'; +import { TextField, Select } from '../form'; import { loadProjectionOptions } from '../projection/ProjectionSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + control={} label="Metadata Sidecar" /> ( isClearable fullWidth /> - + ( dense /> - )} + control={} label="Use Original Filename" /> - )} + control={} label="Use Original Component Filename" /> - - + + - )} + control={} label="Allow Missing" /> - + ); -function ShapeExportForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeExportForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + - diff --git a/src/components/shape/ShapeFileParamsForm.jsx b/src/components/shape/ShapeFileParamsForm.jsx index 519c31f1..dde5d87a 100644 --- a/src/components/shape/ShapeFileParamsForm.jsx +++ b/src/components/shape/ShapeFileParamsForm.jsx @@ -1,69 +1,36 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; -import BoolCheckbox from '../ui/BoolCheckbox'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; const queryParams = () => ( <> - - - - + + + + - )} + control={} label="Include Item" /> - )} + control={} label="Closed Files" /> ); -function ShapeFileParamsForm({ - error, - handleSubmit, -}) { +function ShapeFileParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/shape/ShapeImpExportForm.jsx b/src/components/shape/ShapeImpExportForm.jsx index 5e05b7de..11779ef5 100644 --- a/src/components/shape/ShapeImpExportForm.jsx +++ b/src/components/shape/ShapeImpExportForm.jsx @@ -1,30 +1,25 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; import FormControl from '@material-ui/core/FormControl'; -import InputLabel from '@material-ui/core/InputLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; +import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import JobPriority from '../../const/JobPriority'; -import { StatefulAsyncSelect } from '../ui/Select'; +import { required } from '../../utils/FieldValidation'; import { loadExportLocationOptions } from '../exportlocation/ExportLocationSelect'; +import { TextField, Select } from '../form'; import { loadProjectionOptions } from '../projection/ProjectionSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; import { KeyValuePairType } from '../ui/FormType'; -import { required } from '../../utils/FieldValidation'; +import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( <> - + ( fullWidth /> - )} + control={} label="Metadata Sidecar" /> ( isClearable fullWidth /> - + ( dense /> - )} + control={} label="Use Original Filename" /> - )} + control={} label="Use Original Component Filename" /> - - + + - )} + control={} label="Allow Missing" /> - - + + ); -function ShapeImpExportForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeImpExportForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + - diff --git a/src/components/shape/ShapeListParamsForm.jsx b/src/components/shape/ShapeListParamsForm.jsx index 323a5c93..e9b36455 100644 --- a/src/components/shape/ShapeListParamsForm.jsx +++ b/src/components/shape/ShapeListParamsForm.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; -import { TextField, Select } from '../form'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField, Select } from '../form'; +import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadShapeTagOptions } from '../shapetag/ShapeTagSelect'; const queryParams = () => ( <> @@ -33,34 +32,16 @@ const queryParams = () => ( False
- - - )} - label="Show URL" - /> + + } label="Show URL" /> ); -function ShapeListParamsForm({ - error, - handleSubmit, -}) { +function ShapeListParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/shape/ShapeListTable.jsx b/src/components/shape/ShapeListTable.jsx index 42bf4b3c..bef85b82 100644 --- a/src/components/shape/ShapeListTable.jsx +++ b/src/components/shape/ShapeListTable.jsx @@ -1,28 +1,22 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; import Table from '@material-ui/core/Table'; -import TableRow from '@material-ui/core/TableRow'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; -import TableHead from '@material-ui/core/TableHead'; import TableFooter from '@material-ui/core/TableFooter'; +import TableHead from '@material-ui/core/TableHead'; import TablePagination from '@material-ui/core/TablePagination'; +import TableRow from '@material-ui/core/TableRow'; import TableSortLabel from '@material-ui/core/TableSortLabel'; +import startCase from 'lodash.startcase'; +import ChipArray from '../ui/ChipArray'; import TableActions from '../ui/TableActions'; import TableRowLink from '../ui/TableRowLink'; -import ChipArray from '../ui/ChipArray'; -const TableHeadCell = ({ - orderBy, - orderDirection, - onChangeOrder, - name, -}) => ( - onChangeOrder ? ( +function TableHeadCell({ orderBy, orderDirection, onChangeOrder, name }) { + return onChangeOrder ? ( @@ -30,28 +24,17 @@ const TableHeadCell = ({ ) : ( - - {startCase(name)} - - ) -); + {startCase(name)} + ); +} -export const ShapeTypeRow = ({ shapeType }) => { - const { - id: shapeId, - item: itemList = [], - mimeType = [], - essenceVersion, - tag = [], - } = shapeType; +export function ShapeTypeRow({ shapeType }) { + const { id: shapeId, item: itemList = [], mimeType = [], essenceVersion, tag = [] } = shapeType; const itemIds = itemList.map((thisItem) => thisItem.id); const [itemId] = itemIds; const linkTo = itemId ? `/item/${itemId}/shape/${shapeId}/` : undefined; return ( - + {shapeId} @@ -65,7 +48,7 @@ export const ShapeTypeRow = ({ shapeType }) => { ); -}; +} function ShapeListTable({ shapeListDocument, @@ -78,60 +61,57 @@ function ShapeListTable({ orderBy, orderDirection, }) { - if (shapeListDocument === undefined) { return null; } + if (shapeListDocument === undefined) { + return null; + } const { shape: shapeList = [], hits: count = 0 } = shapeListDocument; return ( - <> - - +
+ + + + + + + + + + + {shapeList.map((shapeType) => ( + + ))} + + {onChangePage && onChangeRowsPerPage && ( + - - - - - - - - {shapeList.map((shapeType) => ( - - ))} - - {(onChangePage && onChangeRowsPerPage) && ( - - - - - - )} -
- + + )} + ); } diff --git a/src/components/shape/ShapeOverview.jsx b/src/components/shape/ShapeOverview.jsx index f21e4882..65c62b24 100644 --- a/src/components/shape/ShapeOverview.jsx +++ b/src/components/shape/ShapeOverview.jsx @@ -1,17 +1,18 @@ -import React from 'react'; - import CardList from '../ui/CardList'; + +import ShapeAudioComponentList from './ShapeAudioComponentList'; +import ShapeBinaryComponentList from './ShapeBinaryComponentList'; import ShapeCard from './ShapeCard'; import ShapeContainerComponentCard from './ShapeContainerComponentCard'; -import ShapeVideoComponentList from './ShapeVideoComponentList'; import ShapeDescriptorComponentList from './ShapeDescriptorComponentList'; -import ShapeAudioComponentList from './ShapeAudioComponentList'; -import ShapeBinaryComponentList from './ShapeBinaryComponentList'; import ShapeSubtitleComponentList from './ShapeSubtitleComponentList'; +import ShapeVideoComponentList from './ShapeVideoComponentList'; export default function ShapeOverview(props) { const { shapeDocument } = props; - if (shapeDocument === undefined) { return null; } + if (shapeDocument === undefined) { + return null; + } return ( diff --git a/src/components/shape/ShapeOverviewList.jsx b/src/components/shape/ShapeOverviewList.jsx index 8892bff6..d54227eb 100644 --- a/src/components/shape/ShapeOverviewList.jsx +++ b/src/components/shape/ShapeOverviewList.jsx @@ -1,29 +1,20 @@ -import React from 'react'; +import { Fragment } from 'react'; -import ShapeTitle, { ShapeHeading } from './ShapeTitle'; import ShapeOverview from './ShapeOverview'; +import ShapeTitle, { ShapeHeading } from './ShapeTitle'; export default function ShapeOverviewList({ shapeList = [], itemId }) { - if (shapeList === undefined || !Array.isArray(shapeList)) { return null; } - return ( - shapeList.map((shapeDocument) => ( - - {itemId ? ( - - ) : ( - - )} - - - )) - ); + if (shapeList === undefined || !Array.isArray(shapeList)) { + return null; + } + return shapeList.map((shapeDocument) => ( + + {itemId ? ( + + ) : ( + + )} + + + )); } diff --git a/src/components/shape/ShapeParams.jsx b/src/components/shape/ShapeParams.jsx index a97526e1..249764eb 100644 --- a/src/components/shape/ShapeParams.jsx +++ b/src/components/shape/ShapeParams.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ShapeParamsForm from './ShapeParamsForm'; +import * as formActions from '../../formactions/shape'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import * as formActions from '../../formactions/shape'; + +import ShapeParamsForm from './ShapeParamsForm'; export const SHAPE_PARAMS_FORM = 'SHAPE_PARAMS_FORM'; @@ -30,12 +29,16 @@ function ShapeParams({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Shape Display Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Shape Display'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -57,17 +60,10 @@ function ShapeParams({ - - diff --git a/src/components/shape/ShapeParamsForm.jsx b/src/components/shape/ShapeParamsForm.jsx index a20465a1..6fcc3d01 100644 --- a/src/components/shape/ShapeParamsForm.jsx +++ b/src/components/shape/ShapeParamsForm.jsx @@ -1,24 +1,19 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; -import { TextField, Select } from '../form'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import StorageTypes from '../../const/StorageTypes'; +import { TextField, Select } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - + StorageType @@ -29,48 +24,24 @@ const queryParams = () => ( ))} - - + + - )} + control={} label="Include Placeholder" /> - )} + control={} label="Transient" /> ); -function ShapeParamsForm({ - error, - handleSubmit, -}) { +function ShapeParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + ); } diff --git a/src/components/shape/ShapePlaceholderUpdate.jsx b/src/components/shape/ShapePlaceholderUpdate.jsx index ec54e4b4..4c0c387c 100644 --- a/src/components/shape/ShapePlaceholderUpdate.jsx +++ b/src/components/shape/ShapePlaceholderUpdate.jsx @@ -1,17 +1,16 @@ -import React from 'react'; -import { compose } from 'redux'; - import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogContent from '@material-ui/core/DialogContent'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import ShapePlaceholderUpdateForm from './ShapePlaceholderUpdateForm'; import * as formActions from '../../formactions/shape'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import ShapePlaceholderUpdateForm from './ShapePlaceholderUpdateForm'; const SHAPE_PLACEHOLDERUPDATE_FORM = 'SHAPE_PLACEHOLDERUPDATE_FORM'; @@ -28,13 +27,17 @@ function ShapePlaceholderUpdate({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Placeholder Shape Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Placeholder Shape'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -51,11 +54,7 @@ function ShapePlaceholderUpdate({ - - diff --git a/src/components/shape/ShapeRemoveMimeTypeForm.jsx b/src/components/shape/ShapeRemoveMimeTypeForm.jsx index 000e7f29..fb9460f4 100644 --- a/src/components/shape/ShapeRemoveMimeTypeForm.jsx +++ b/src/components/shape/ShapeRemoveMimeTypeForm.jsx @@ -1,42 +1,17 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; +import { required } from '../../utils/FieldValidation'; import { TextField } from '../form'; import Field from '../ui/Field'; -import { required } from '../../utils/FieldValidation'; -function ShapeRemoveMimeTypeForm({ - error, - handleSubmit, - itemId, - shapeId, -}) { +function ShapeRemoveMimeTypeForm({ error, handleSubmit, itemId, shapeId }) { return (
{error && {error}} - {!itemId && ( - - )} - {!shapeId && ( - - )} - + {!itemId && } + {!shapeId && } + - diff --git a/src/components/shape/ShapeSearch.jsx b/src/components/shape/ShapeSearch.jsx index 83096253..c2309b13 100644 --- a/src/components/shape/ShapeSearch.jsx +++ b/src/components/shape/ShapeSearch.jsx @@ -1,20 +1,19 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import CardContent from '@material-ui/core/CardContent'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import ShapeSearchForm from './ShapeSearchForm'; +import * as formActions from '../../formactions/search'; +import withExpansion from '../../hoc/withExpansion'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; -import withExpansion from '../../hoc/withExpansion'; -import * as formActions from '../../formactions/search'; + +import ShapeSearchForm from './ShapeSearchForm'; export const SHAPE_SEARCH_FORM = 'SHAPE_SEARCH_FORM'; @@ -31,19 +30,22 @@ function ShapeSearch({ ...formProps }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onChangeExpansion) { onChangeExpansion(null, false); } - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onChangeExpansion) { + onChangeExpansion(null, false); + } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Searching Shapes'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( - + }> Shape Search Document @@ -60,17 +62,10 @@ function ShapeSearch({
- - diff --git a/src/components/shape/ShapeSearchForm.jsx b/src/components/shape/ShapeSearchForm.jsx index 45d9ad46..1c1016fa 100644 --- a/src/components/shape/ShapeSearchForm.jsx +++ b/src/components/shape/ShapeSearchForm.jsx @@ -1,21 +1,14 @@ -import React from 'react'; -import { reduxForm } from 'redux-form'; import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; import { ItemSearchType } from '../item/ItemSearchForm'; +import FormSection from '../ui/FormSection'; -function ShapeSearchForm({ - error, - handleSubmit, -}) { +function ShapeSearchForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/shape/ShapeSearchParamsForm.jsx b/src/components/shape/ShapeSearchParamsForm.jsx index 05f8c0cc..89e81a3d 100644 --- a/src/components/shape/ShapeSearchParamsForm.jsx +++ b/src/components/shape/ShapeSearchParamsForm.jsx @@ -1,12 +1,11 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; import { StatefulAsyncSelect } from '../ui/Select'; const queryParams = () => ( @@ -25,61 +24,21 @@ const queryParams = () => ( ]} fullWidth /> - - - - - - )} - label="Count" - /> - - + + + + + } label="Count" /> + + ); -function ShapeSearchParamsForm({ - error, - handleSubmit, -}) { +function ShapeSearchParamsForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/shape/ShapeVideoComponentCard.jsx b/src/components/shape/ShapeVideoComponentCard.jsx index a6601f0f..99c60ad8 100644 --- a/src/components/shape/ShapeVideoComponentCard.jsx +++ b/src/components/shape/ShapeVideoComponentCard.jsx @@ -1,36 +1,48 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Typography from '@material-ui/core/Typography'; -import { VideoComponentType } from './ShapeDisplay'; import SquareCard from '../ui/SquareCard'; -import ShapeComponentMetadataEditor from './ShapeComponentMetadataEditor'; + import ShapeComponentMenu from './ShapeComponentMenu'; +import ShapeComponentMetadataEditor from './ShapeComponentMetadataEditor'; +import { VideoComponentType } from './ShapeDisplay'; export default function ShapeVideoComponentCard({ - videoComponent = {}, itemId, shapeId, onRefresh, ShapeComponentMenuProps = {}, + videoComponent = {}, + itemId, + shapeId, + onRefresh, + ShapeComponentMenuProps = {}, }) { - if (videoComponent === undefined) { return null; } + if (videoComponent === undefined) { + return null; + } const { id: componentId, metadata } = videoComponent; return ( {`Video Component - ${componentId}`} : 'Video Component'} - action={componentId ? ( - - ) : undefined} + title={ + componentId ? ( + {`Video Component - ${componentId}`} + ) : ( + 'Video Component' + ) + } + action={ + componentId ? ( + + ) : undefined + } /> - + ( - - )) - ); + if (videoComponentList === undefined || !Array.isArray(videoComponentList)) { + return null; + } + return videoComponentList.map((videoComponent) => ( + + )); } diff --git a/src/components/shapetag/ShapeTagCard.jsx b/src/components/shapetag/ShapeTagCard.jsx index e03c56e8..96e4a6c1 100644 --- a/src/components/shapetag/ShapeTagCard.jsx +++ b/src/components/shapetag/ShapeTagCard.jsx @@ -1,6 +1,14 @@ -import React from 'react'; - import SquareCard from '../ui/SquareCard'; + +import { + ShapeTagContainerDisplay, + ShapeTagAudioDisplay, + ShapeTagVideoDisplay, + ShapeTagThumbnailDisplay, + ShapeTagAdvancedDisplay, + ShapeTagOverlayDisplay, + ShapeTagScriptDisplay, +} from './ShapeTagDisplay'; import ShapeTagEditor from './ShapeTagEditor'; import { ShapeTagContainerForm, @@ -11,15 +19,6 @@ import { ShapeTagOverlayForm, ShapeTagScriptForm, } from './ShapeTagForm'; -import { - ShapeTagContainerDisplay, - ShapeTagAudioDisplay, - ShapeTagVideoDisplay, - ShapeTagThumbnailDisplay, - ShapeTagAdvancedDisplay, - ShapeTagOverlayDisplay, - ShapeTagScriptDisplay, -} from './ShapeTagDisplay'; export default function ShapeTagCard(props) { return ( diff --git a/src/components/shapetag/ShapeTagDialog.jsx b/src/components/shapetag/ShapeTagDialog.jsx index 9b89ad70..e21d9deb 100644 --- a/src/components/shapetag/ShapeTagDialog.jsx +++ b/src/components/shapetag/ShapeTagDialog.jsx @@ -1,20 +1,15 @@ -import React from 'react'; -import { connect } from 'react-redux'; import Dialog from '@material-ui/core/Dialog'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import { connect } from 'react-redux'; -import ShapeTagForm from './ShapeTagForm'; -import * as formActions from '../../formactions/shapetag'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/shapetag'; import WizardForm from '../ui/WizardForm'; -function ShapeTagDialog({ - closeModal, - isOpen, - history, - openSnackBar, -}) { +import ShapeTagForm from './ShapeTagForm'; + +function ShapeTagDialog({ closeModal, isOpen, history, openSnackBar }) { const onSubmitSuccess = (response) => { const { transcodePresetDocument } = response; const { name: tagName } = transcodePresetDocument; diff --git a/src/components/shapetag/ShapeTagDisplay.jsx b/src/components/shapetag/ShapeTagDisplay.jsx index a569f16d..93dd057e 100644 --- a/src/components/shapetag/ShapeTagDisplay.jsx +++ b/src/components/shapetag/ShapeTagDisplay.jsx @@ -1,1218 +1,543 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -import TypeSection from '../ui/TypeSection'; import TypeArray from '../ui/TypeArray'; +import TypeSection from '../ui/TypeSection'; -const FastStartSettingType = ({ value = {} }) => ( - <> - - - -); +function FastStartSettingType({ value = {} }) { + return ( + <> + + + + ); +} -const ResolutionType = ({ value = {} }) => ( - <> - - - -); +function ResolutionType({ value = {} }) { + return ( + <> + + + + ); +} -const AspectRatioType = ({ value = {} }) => ( - <> - - - -); +function AspectRatioType({ value = {} }) { + return ( + <> + + + + ); +} -const ScalingType = ({ value = {} }) => ( - <> - - - - - - - - - - - -); +function ScalingType({ value = {} }) { + return ( + <> + + + + + + + + + + + + ); +} -const KeyValuePairType = ({ value = {} }) => ( - <> - - - -); +function KeyValuePairType({ value = {} }) { + return ( + <> + + + + ); +} -const RationalType = ({ value = {} }) => ( - <> - - - -); +function RationalType({ value = {} }) { + return ( + <> + + + + ); +} const TimeBaseType = RationalType; -const TimeCodeType = ({ value = {} }) => ( - <> - - - -); - -const AudioTranscodePresetChannelMixType = ({ value = {} }) => ( - <> - - - - - -); - -const AudioTranscodePresetMixType = ({ value = {} }) => ( - <> - - - -); - -const NameURIPairType = ({ value = {} }) => ( - <> - - - -); - -const OtifPresetType = ({ value = {} }) => ( - <> - - - - - - - -); - -const AudioOutputType = ({ value = {} }) => ( - <> - - - - - - - -); - -const AudioTranscodePresetType = ({ value = {} }) => ( - <> - - - - - - - - - - - - - - - -); - -const AudioTrackTranscodePresetType = ({ value = {} }) => ( - <> - - - - - - - - -); - -export const VideoTranscodePresetType = ({ value = {} }) => ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - -); - -const SequenceRangeType = ({ value = {} }) => ( - <> - - - - - -); - -const TimeIntervalType = ({ value = {} }) => ( - <> - - - -); - -const OverlayType = ({ value = {} }) => ( - <> - - - - - - - - -); +function TimeCodeType({ value = {} }) { + return ( + <> + + + + ); +} -const TextRenditionType = ({ value = {} }) => ( - <> - - - - - - - - - - - - - - - - - - - - - - - -); +function AudioTranscodePresetChannelMixType({ value = {} }) { + return ( + <> + + + + + + ); +} -const TextOverlayType = ({ value = {} }) => ( - <> - - - - -); +function AudioTranscodePresetMixType({ value = {} }) { + return ( + <> + + + + ); +} -const SequenceOutputType = ({ value = {} }) => ( - <> - - - -); +function NameURIPairType({ value = {} }) { + return ( + <> + + + + ); +} -export const ContainerSection = ({ value = {} }) => ( - <> - - - - -); +function OtifPresetType({ value = {} }) { + return ( + <> + + + + + + + + ); +} -export const AudioSection = ({ value = {} }) => ( - <> - - - -); +function AudioOutputType({ value = {} }) { + return ( + <> + + + + + + + + ); +} -export const VideoSection = ({ value = {} }) => ( - <> - - -); +function AudioTranscodePresetType({ value = {} }) { + return ( + <> + + + + + + + + + + + + + + + + ); +} -export const OverlaySection = ({ value = {} }) => ( - <> - - - -); +function AudioTrackTranscodePresetType({ value = {} }) { + return ( + <> + + + + + + + + + ); +} -export const AdvancedSection = ({ value = {} }) => ( - <> - - - - - - - - - - - - -); +export function VideoTranscodePresetType({ value = {} }) { + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} -export const ThumbnailSection = ({ value = {} }) => ( - <> - - - - - - - -); +function SequenceRangeType({ value = {} }) { + return ( + <> + + + + + + ); +} -export const ScriptSection = ({ value = {} }) => ( - <> - - -); +function TimeIntervalType({ value = {} }) { + return ( + <> + + + + ); +} -export function ShapeTagContainerDisplay({ - transcodePresetDocument, -}) { +function OverlayType({ value = {} }) { return ( <> + + + + + + ); } -export function ShapeTagAudioDisplay({ - transcodePresetDocument, -}) { +function TextRenditionType({ value = {} }) { return ( <> - + + + + + + + + + + + + + + + + + + + + + + ); } -export function ShapeTagVideoDisplay({ - transcodePresetDocument, -}) { +function TextOverlayType({ value = {} }) { return ( <> + + ); } -export function ShapeTagThumbnailDisplay({ - transcodePresetDocument, -}) { +function SequenceOutputType({ value = {} }) { return ( <> - + + ); } -export function ShapeTagOverlayDisplay({ - transcodePresetDocument, -}) { +export function ContainerSection({ value = {} }) { return ( <> - + + + ); } -export function ShapeTagAdvancedDisplay({ - transcodePresetDocument, -}) { +export function AudioSection({ value = {} }) { return ( <> + ); } -export function ShapeTagScriptDisplay({ - transcodePresetDocument, -}) { +export function VideoSection({ value = {} }) { + return ; +} + +export function OverlaySection({ value = {} }) { return ( <> - + ); } -export default function ShapeTagDisplay({ - transcodePresetDocument, -}) { +export function AdvancedSection({ value = {} }) { return ( <> + - + + + + + + + + ); +} + +export function ThumbnailSection({ value = {} }) { + return ( + <> + + + + + ); +} + +export function ScriptSection({ value = {} }) { + return ; +} + +export function ShapeTagContainerDisplay({ transcodePresetDocument }) { + return ; +} + +export function ShapeTagAudioDisplay({ transcodePresetDocument }) { + return ; +} + +export function ShapeTagVideoDisplay({ transcodePresetDocument }) { + return ; +} + +export function ShapeTagThumbnailDisplay({ transcodePresetDocument }) { + return ; +} + +export function ShapeTagOverlayDisplay({ transcodePresetDocument }) { + return ; +} + +export function ShapeTagAdvancedDisplay({ transcodePresetDocument }) { + return ; +} + +export function ShapeTagScriptDisplay({ transcodePresetDocument }) { + return ; +} + +export default function ShapeTagDisplay({ transcodePresetDocument }) { + return ( + <> + + + + + + + ); } diff --git a/src/components/shapetag/ShapeTagEditor.jsx b/src/components/shapetag/ShapeTagEditor.jsx index b5072072..6b3395f8 100644 --- a/src/components/shapetag/ShapeTagEditor.jsx +++ b/src/components/shapetag/ShapeTagEditor.jsx @@ -1,7 +1,7 @@ -import React from 'react'; import { connect } from 'react-redux'; -import * as formActions from '../../formactions/shapetag'; + import * as actions from '../../actions'; +import * as formActions from '../../formactions/shapetag'; import Editor from '../ui/Editor'; function ShapeTagEditor({ @@ -16,7 +16,9 @@ function ShapeTagEditor({ const onSubmitSuccess = () => { const messageContent = 'Shape Tag Rule Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Shape Tag'; diff --git a/src/components/shapetag/ShapeTagForm.jsx b/src/components/shapetag/ShapeTagForm.jsx index 09c8f8f8..f1c8c564 100644 --- a/src/components/shapetag/ShapeTagForm.jsx +++ b/src/components/shapetag/ShapeTagForm.jsx @@ -1,1213 +1,519 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; -import Field from '../ui/Field'; -import ChipInput from '../ui/ChipInput'; -import InitialDisabledTextField from '../ui/InitialDisabledTextField'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import ChipInput from '../ui/ChipInput'; +import CodeField from '../ui/CodeField'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import CodeField from '../ui/CodeField'; +import InitialDisabledTextField from '../ui/InitialDisabledTextField'; // Figure out fastStartDuration field -const FastStartSettingType = () => ( - <> - - )} - label="requireFastStart" - /> - - )} - label="analyzeDuration" - /> - -); +function FastStartSettingType() { + return ( + <> + } + label="requireFastStart" + /> + } + label="analyzeDuration" + /> + + ); +} -const ResolutionType = () => ( - <> - - - -); +function ResolutionType() { + return ( + <> + + + + ); +} -const AspectRatioType = () => ( - <> - - - -); +function AspectRatioType() { + return ( + <> + + + + ); +} -const ScalingType = () => ( - <> - - - - - - - - - - - -); +function ScalingType() { + return ( + <> + + + + + + + + + + + + ); +} -const KeyValuePairType = () => ( - <> - - - -); +function KeyValuePairType() { + return ( + <> + + + + ); +} -const RationalType = () => ( - <> - - - -); +function RationalType() { + return ( + <> + + + + ); +} const TimeBaseType = RationalType; -const TimeCodeType = () => ( - <> - - - -); - -const AudioTranscodePresetChannelMixType = () => ( - <> - - - - - -); - -const AudioTranscodePresetMixType = () => ( - <> - - - )} - label="silence" - /> - -); +function TimeCodeType() { + return ( + <> + + + + ); +} -const NameURIPairType = () => ( - <> - - - -); +function AudioTranscodePresetChannelMixType() { + return ( + <> + + + + + + ); +} -export const OtifPresetType = () => ( - <> - - - - - - - -); +function AudioTranscodePresetMixType() { + return ( + <> + + } + label="silence" + /> + + ); +} -const AudioOutputType = () => ( - <> - - - - - - - -); +function NameURIPairType() { + return ( + <> + + + + ); +} -const AudioTranscodePresetType = () => ( - <> - - - - - - - - )} - label="noAudio" - /> - - - - - )} - label="monoFile" - /> - - )} - label="allChannel" - /> - - -); +export function OtifPresetType() { + return ( + <> + + + + + + + + ); +} -const AudioTrackTranscodePresetType = () => ( - <> - - - - - - - - -); +function AudioOutputType() { + return ( + <> + + + + + + + + ); +} -const VideoTranscodePresetType = () => ( - <> - - - - - - - - - - - - )} - label="forceCFR" - /> - - - - - - - )} - label="noVideo" - /> - - )} - label="stripParameterSets" - /> - - )} - label="addParameterSets" - /> - - - - )} - label="burnTimecode" - /> - - )} - label="burnSubtitles" - /> - - - -); +function AudioTranscodePresetType() { + return ( + <> + + + + + + + } + label="noAudio" + /> + + + + } + label="monoFile" + /> + } + label="allChannel" + /> + + + ); +} -const SequenceRangeType = () => ( - <> - - - - - -); +function AudioTrackTranscodePresetType() { + return ( + <> + + + + + + + + + ); +} -const TimeIntervalType = () => ( - <> - - - -); +function VideoTranscodePresetType() { + return ( + <> + + + + + + + + + + + } + label="forceCFR" + /> + + + + + + } + label="noVideo" + /> + } + label="stripParameterSets" + /> + } + label="addParameterSets" + /> + + + } + label="burnTimecode" + /> + } + label="burnSubtitles" + /> + + + + ); +} -const OverlayType = () => ( - <> - - - - - - - - -); +function SequenceRangeType() { + return ( + <> + + + + + + ); +} -const TextRenditionType = () => ( - <> - - - - - - - - - - - - - - - - - - - - - - - +function TimeIntervalType() { + return ( + <> + + + + ); +} -); +function OverlayType() { + return ( + <> + + + + + + + + + ); +} -const TextOverlayType = () => ( - <> - - - - -); +function TextRenditionType() { + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + ); +} -const SequenceOutputType = () => ( - <> - - + + + + + ); +} - /> - -); +function SequenceOutputType() { + return ( + <> + + + + ); +} -const ContainerSection = () => ( - <> - - - - -); +function ContainerSection() { + return ( + <> + + + + + ); +} -const ContainerForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - diff --git a/src/components/shapetag/ShapeTagSelect.jsx b/src/components/shapetag/ShapeTagSelect.jsx index 9af2636c..23dc96e6 100644 --- a/src/components/shapetag/ShapeTagSelect.jsx +++ b/src/components/shapetag/ShapeTagSelect.jsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Field } from 'redux-form'; import debounce from 'lodash.debounce'; +import { Field } from 'redux-form'; import { shapetag as ShapeTagApi } from '@vidispine/vdt-api'; + import Select from '../ui/Select'; const debouncedListShapeTag = debounce(ShapeTagApi.listShapeTag, 500, { diff --git a/src/components/shapetag/ShapeTagTitle.jsx b/src/components/shapetag/ShapeTagTitle.jsx index 88acba94..299ae19d 100644 --- a/src/components/shapetag/ShapeTagTitle.jsx +++ b/src/components/shapetag/ShapeTagTitle.jsx @@ -1,15 +1,9 @@ -import React from 'react'; -import DeleteForever from '@material-ui/icons/DeleteForever'; import IconButton from '@material-ui/core/IconButton'; +import DeleteForever from '@material-ui/icons/DeleteForever'; import TitleHeader from '../ui/TitleHeader'; -export default function ShapeTagTitle({ - openCode, - onRefresh, - tagName, - openRemove, -}) { +export default function ShapeTagTitle({ openCode, onRefresh, tagName, openRemove }) { return ( - )} + } /> ); } diff --git a/src/components/stitch/StitchCard.jsx b/src/components/stitch/StitchCard.jsx index de0c2482..e2aa61e6 100644 --- a/src/components/stitch/StitchCard.jsx +++ b/src/components/stitch/StitchCard.jsx @@ -1,36 +1,32 @@ -import React from 'react'; -import { compose } from 'redux'; +import Button from '@material-ui/core/Button'; import CardContent from '@material-ui/core/CardContent'; import AccordionActions from '@material-ui/core/DialogActions'; -import Button from '@material-ui/core/Button'; import Grid from '@material-ui/core/Grid'; +import { compose } from 'redux'; -import withSnackbar from '../../hoc/withSnackbar'; +import * as formActions from '../../formactions/stitch'; import withFormActions from '../../hoc/withFormActions'; +import withSnackbar from '../../hoc/withSnackbar'; import SquareCard from '../ui/SquareCard'; -import * as formActions from '../../formactions/stitch'; import StitchForm from './StitchForm'; export const STITCH_FORM = 'STITCH_FORM'; -function StitchCard({ - submitForm, - resetForm, - openSnackBar, - onSuccess, - onFail, - url, -}) { +function StitchCard({ submitForm, resetForm, openSnackBar, onSuccess, onFail, url }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Image Stitched'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (errors, dispatch, submitError, props) => { const messageContent = 'Error Stitching Image'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(errors, dispatch, submitError, props); } + if (onFail) { + onFail(errors, dispatch, submitError, props); + } }; return ( <> @@ -44,17 +40,10 @@ function StitchCard({ />
- - @@ -62,9 +51,7 @@ function StitchCard({ - {url && ( - {url} - )} + {url && {url}} diff --git a/src/components/stitch/StitchForm.jsx b/src/components/stitch/StitchForm.jsx index e9ec69d7..8bf7806f 100644 --- a/src/components/stitch/StitchForm.jsx +++ b/src/components/stitch/StitchForm.jsx @@ -1,34 +1,19 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; import { TextField, Select } from '../form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import ChipInput from '../ui/ChipInput'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - - - + + + Format @@ -36,25 +21,15 @@ const queryParams = () => ( JPG - + ); -function StitchForm({ - error, - handleSubmit, -}) { +function StitchForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/storage/StorageEvacuateCancel.jsx b/src/components/storage/StorageEvacuateCancel.jsx index a17c0e5d..3ddfd86c 100644 --- a/src/components/storage/StorageEvacuateCancel.jsx +++ b/src/components/storage/StorageEvacuateCancel.jsx @@ -1,28 +1,27 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; import { storage as api } from '@vidispine/vdt-api'; + import withUI from '../../hoc/withUI'; -function StorageEvacuate({ - open, - onClose, - openSnackBar, - storageDocument, - onSuccess, -}) { - if (storageDocument === undefined) { return null; } +function StorageEvacuate({ open, onClose, openSnackBar, storageDocument, onSuccess }) { + if (storageDocument === undefined) { + return null; + } const { id: storageId } = storageDocument; const onAbandon = () => { - api.cancelEvacuateStorage({ storageId }) + api + .cancelEvacuateStorage({ storageId }) .then(() => { const messageContent = 'Storage Evacuation Stopping'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }) .catch(() => { const messageContent = 'Error Stopping Storage Evacuation'; @@ -36,12 +35,7 @@ function StorageEvacuate({ - diff --git a/src/components/storage/StorageForm.jsx b/src/components/storage/StorageForm.jsx index 47e21fdd..3b9ff344 100644 --- a/src/components/storage/StorageForm.jsx +++ b/src/components/storage/StorageForm.jsx @@ -1,340 +1,211 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import Field from '../ui/Field'; +import StorageTypes from '../../const/StorageTypes'; +import { TextField, Select } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; +import CodeField from '../ui/CodeField'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import CodeField from '../ui/CodeField'; -import UrlField from '../ui/UrlField'; -import StorageTypes from '../../const/StorageTypes'; import { SimpleMetadataType } from '../ui/FormType'; +import UrlField from '../ui/UrlField'; -const StorageFileSequenceType = () => ( - <> - - - -); - -const StorageMethodType = () => ( - <> - - )} - label="Read" - /> - - )} - label="Write" - /> - - )} - label="Browse" - /> - - - - - - - - - -); - -const StorageSection = () => ( - <> - - Type - - {StorageTypes.map((storageType) => ( - - {storageType} - - ))} - - - - - )} - label="Auto Detect" - /> - - )} - label="Show Importables" - /> - - - -); - -const BasicForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - diff --git a/src/components/storage/StorageMethodRow.jsx b/src/components/storage/StorageMethodRow.jsx index 354d5618..526cb042 100644 --- a/src/components/storage/StorageMethodRow.jsx +++ b/src/components/storage/StorageMethodRow.jsx @@ -1,18 +1,14 @@ -import React from 'react'; -import moment from 'moment'; -import TableCell from '@material-ui/core/TableCell'; -import Typography from '@material-ui/core/Typography'; +import Checkbox from '@material-ui/core/Checkbox'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormGroup from '@material-ui/core/FormGroup'; -import Checkbox from '@material-ui/core/Checkbox'; -import TableRowLink from '../ui/TableRowLink'; +import TableCell from '@material-ui/core/TableCell'; +import Typography from '@material-ui/core/Typography'; +import moment from 'moment'; import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; +import TableRowLink from '../ui/TableRowLink'; -export default function StorageMethodRow({ - storageMethod, - storageId, -}) { +export default function StorageMethodRow({ storageMethod, storageId }) { let isOnline = false; if (!storageMethod.lastFailure) { isOnline = true; @@ -26,37 +22,20 @@ export default function StorageMethodRow({ - )} + control={} label={Read} /> - )} + control={} label={Write} /> - )} + control={} label={Browse} /> - - {isOnline ? : } - + {isOnline ? : } ); } diff --git a/src/components/storage/StorageMethodTitle.jsx b/src/components/storage/StorageMethodTitle.jsx index f2a20750..7fff1bf6 100644 --- a/src/components/storage/StorageMethodTitle.jsx +++ b/src/components/storage/StorageMethodTitle.jsx @@ -1,6 +1,5 @@ -import React from 'react'; -import DeleteForever from '@material-ui/icons/DeleteForever'; import IconButton from '@material-ui/core/IconButton'; +import DeleteForever from '@material-ui/icons/DeleteForever'; import TitleHeader from '../ui/TitleHeader'; @@ -21,11 +20,11 @@ export default function StorageTitle({ openCode={openCode} onRefresh={onRefresh} helpTo="/ref/storage/storage.html#storage-methods" - actionComponent={( + actionComponent={ - )} + } /> ); } diff --git a/src/components/storage/StorageRemove.jsx b/src/components/storage/StorageRemove.jsx index 3a0b0334..bd909870 100644 --- a/src/components/storage/StorageRemove.jsx +++ b/src/components/storage/StorageRemove.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; @@ -6,15 +5,10 @@ import DialogTitle from '@material-ui/core/DialogTitle'; import { storage as api } from '@vidispine/vdt-api'; -export default function StorageRemove({ - closeModal, - isOpen, - storageId, - history, - openSnackBar, -}) { +export default function StorageRemove({ closeModal, isOpen, storageId, history, openSnackBar }) { const onRemove = () => { - api.removeStorage({ storageId }) + api + .removeStorage({ storageId }) .then(() => { const messageContent = `Storage ${storageId} Removed`; openSnackBar({ messageContent }); @@ -28,19 +22,12 @@ export default function StorageRemove({ }; return ( - - {`Remove Storage "${storageId}"?`} - + {`Remove Storage "${storageId}"?`} - diff --git a/src/components/storage/StorageRow.jsx b/src/components/storage/StorageRow.jsx index 4e4fa991..a0c3fbeb 100644 --- a/src/components/storage/StorageRow.jsx +++ b/src/components/storage/StorageRow.jsx @@ -1,11 +1,8 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; import TableRowLink from '../ui/TableRowLink'; -export default function StorageRow({ - storageDocument, -}) { +export default function StorageRow({ storageDocument }) { const { id: storageId } = storageDocument; return ( diff --git a/src/components/storage/StorageSelect.jsx b/src/components/storage/StorageSelect.jsx index 1f4ec4a5..f688af57 100644 --- a/src/components/storage/StorageSelect.jsx +++ b/src/components/storage/StorageSelect.jsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Field } from 'redux-form'; import debounce from 'lodash.debounce'; +import { Field } from 'redux-form'; import { storage as StorageApi } from '@vidispine/vdt-api'; + import Select from '../ui/Select'; const debounceListStorage = debounce(StorageApi.listStorage, 500, { diff --git a/src/components/storage/StorageStatus.jsx b/src/components/storage/StorageStatus.jsx index 21576e2e..e12e0e8f 100644 --- a/src/components/storage/StorageStatus.jsx +++ b/src/components/storage/StorageStatus.jsx @@ -1,42 +1,24 @@ -import React from 'react'; import Chip from '@material-ui/core/Chip'; import startCase from 'lodash.startcase'; -import { OnlineIcon, OfflineIcon, WarningIcon } from '../ui/StatusIcon'; import { OK_STATES, WARNING_STATES } from '../../const/StorageStates'; +import { OnlineIcon, OfflineIcon, WarningIcon } from '../ui/StatusIcon'; -const StorageStatus = ({ storageDocument }) => { - if (storageDocument === undefined) { return null; } +function StorageStatus({ storageDocument }) { + if (storageDocument === undefined) { + return null; + } const { state } = storageDocument; if (OK_STATES.includes(state)) { const label = state === 'NONE' ? 'Online' : state.toLowerCase(); - return ( - - } - label={label} - /> - ); + return } label={label} />; } if (WARNING_STATES.includes(state)) { - return ( - - } - label={startCase(state.toLowerCase())} - /> - ); + return } label={startCase(state.toLowerCase())} />; } return ( - - } - label={state ? startCase(state.toLowerCase()) : 'Unknown'} - /> + } label={state ? startCase(state.toLowerCase()) : 'Unknown'} /> ); -}; +} export default StorageStatus; diff --git a/src/components/storage/StorageTitle.jsx b/src/components/storage/StorageTitle.jsx index 7fa09d97..a73ddd8a 100644 --- a/src/components/storage/StorageTitle.jsx +++ b/src/components/storage/StorageTitle.jsx @@ -1,19 +1,16 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; -import TitleHeader from '../ui/TitleHeader'; -import Menu, { MenuItem } from '../ui/Menu'; -import { withModalNoRouter } from '../../hoc/withModal'; import { OK_STATES } from '../../const/StorageStates'; +import { withModalNoRouter } from '../../hoc/withModal'; +import Menu, { MenuItem } from '../ui/Menu'; +import TitleHeader from '../ui/TitleHeader'; + import StorageStatus from './StorageStatus'; -const EvacuateMenuItem = ({ - storageDocument, - evacuateModal, - evacuateCancelModal, - onOpen, -}) => { - if (storageDocument === undefined) { return null; } +function EvacuateMenuItem({ storageDocument, evacuateModal, evacuateCancelModal, onOpen }) { + if (storageDocument === undefined) { + return null; + } const { state } = storageDocument; if (OK_STATES.includes(state)) { return ( @@ -30,7 +27,7 @@ const EvacuateMenuItem = ({ ); } return null; -}; +} function StorageTitle({ onOpen, @@ -52,7 +49,7 @@ function StorageTitle({ entityId={storageId} entityType="storage" code={code} - iconList={( + iconList={ <> @@ -73,8 +70,7 @@ function StorageTitle({ - - )} + } {...props} /> ); diff --git a/src/components/storage/StorageType.jsx b/src/components/storage/StorageType.jsx index 55f5a4d8..bce89ebe 100644 --- a/src/components/storage/StorageType.jsx +++ b/src/components/storage/StorageType.jsx @@ -1,33 +1,30 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/storage'; -import StorageTypeForm from './StorageTypeForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import StorageTypeForm from './StorageTypeForm'; + const STORAGE_TYPE_FORM = 'STORAGE_TYPE_FORM'; -function StorageType({ - open, - onClose, - onSuccess, - openSnackBar, - submitForm, - storageDocument, -}) { - if (storageDocument === undefined) { return null; } +function StorageType({ open, onClose, onSuccess, openSnackBar, submitForm, storageDocument }) { + if (storageDocument === undefined) { + return null; + } const { id: storageId, type } = storageDocument; const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Storage Type Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -35,12 +32,7 @@ function StorageType({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + Change Storage Type - - diff --git a/src/components/storage/StorageTypeForm.jsx b/src/components/storage/StorageTypeForm.jsx index 07d5a927..56002d09 100644 --- a/src/components/storage/StorageTypeForm.jsx +++ b/src/components/storage/StorageTypeForm.jsx @@ -1,17 +1,13 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm, Field } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm, Field } from 'redux-form'; import StorageTypes from '../../const/StorageTypes'; +import { Select } from '../form'; -function StorageTypeForm({ - error, - handleSubmit, -}) { +function StorageTypeForm({ error, handleSubmit }) { return (
{error && {error}} diff --git a/src/components/storage/UrlForm.jsx b/src/components/storage/UrlForm.jsx index 8551d664..21143a31 100644 --- a/src/components/storage/UrlForm.jsx +++ b/src/components/storage/UrlForm.jsx @@ -1,9 +1,10 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import FormHelperText from '@material-ui/core/FormHelperText'; import MenuItem from '@material-ui/core/MenuItem'; import TextField from '@material-ui/core/TextField'; -import update from 'immutability-helper'; import Typography from '@material-ui/core/Typography'; +import update from 'immutability-helper'; import decodeUrl from '../../utils/decodeUrl'; import encodeUrl from '../../utils/encodeUrl'; @@ -21,25 +22,11 @@ const GS_SCHEME = 'gs'; const VSA_SCHEME = 'vxa'; const UNIVERSAL_SCHEME = 'universal'; -function S3Form({ - values = {}, - onChange, - onQueryParamsChange, -}) { +function S3Form({ values = {}, onChange, onQueryParamsChange }) { return ( <> - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + ); } -function FileForm({ - values = {}, - onChange, -}) { - return ( - <> - - - ); +function FileForm({ values = {}, onChange }) { + return ; } -export default class UrlForm extends React.PureComponent { +export default class UrlForm extends PureComponent { static renderUrl(props) { const { path, protocol } = props; if (protocol === UNIVERSAL_SCHEME) { @@ -497,7 +378,7 @@ export default class UrlForm extends React.PureComponent { this.handleChange = this.handleChange.bind(this); this.handleQueryParamsChange = this.handleQueryParamsChange.bind(this); const values = decodeUrl(props.url); - this.hasInitialProtocal = (values.protocol !== undefined); + this.hasInitialProtocal = values.protocol !== undefined; this.state = { ...values, }; @@ -521,7 +402,7 @@ export default class UrlForm extends React.PureComponent { handleQueryParamsChange(name) { return (event) => { let queryParams = { [name]: event.target.value }; - const prevState = this.state.queryParams; + const { queryParams: prevState } = this.state; if (prevState) { queryParams = update(prevState, { [name]: { @@ -534,7 +415,7 @@ export default class UrlForm extends React.PureComponent { } render() { - const { protocol } = this.state; + const { protocol = '' } = this.state; let SchemeForm; switch (protocol) { case FILE_SCHEME: @@ -577,17 +458,13 @@ export default class UrlForm extends React.PureComponent { const displayUrl = UrlForm.renderUrl(this.state); return ( <> - - URI: - {' '} - {displayUrl} - + URI: {displayUrl} Protocol File diff --git a/src/components/storagegroup/StorageGroupCard.jsx b/src/components/storagegroup/StorageGroupCard.jsx index 06771e8e..11e85915 100644 --- a/src/components/storagegroup/StorageGroupCard.jsx +++ b/src/components/storagegroup/StorageGroupCard.jsx @@ -1,28 +1,21 @@ -import React from 'react'; - +import SimpleMetadataGrid from '../ui/SimpleMetadataGrid'; import SquareCard from '../ui/SquareCard'; + import StorageGroupStorageCard from './StorageGroupStorageCard'; -import SimpleMetadataGrid from '../ui/SimpleMetadataGrid'; -export default function StorageGroupCard({ - groupName, - storageGroupDocument, - onRefresh, -}) { +export default function StorageGroupCard({ groupName, storageGroupDocument, onRefresh }) { const { data: simpleMetadataList, storage: storageList = [] } = storageGroupDocument; return ( <> - { - storageList.map((storageDocument) => ( - - )) - } + {storageList.map((storageDocument) => ( + + ))} { const { storageGroupDocument } = response; const { name: groupName } = storageGroupDocument; @@ -46,18 +40,10 @@ function StorageGroupDialog({ - - diff --git a/src/components/storagegroup/StorageGroupForm.jsx b/src/components/storagegroup/StorageGroupForm.jsx index 64af06a4..93a49c15 100644 --- a/src/components/storagegroup/StorageGroupForm.jsx +++ b/src/components/storagegroup/StorageGroupForm.jsx @@ -1,30 +1,17 @@ -import React from 'react'; -import { reduxForm, Field, FormSection } from 'redux-form'; import Typography from '@material-ui/core/Typography'; +import { reduxForm, Field, FormSection } from 'redux-form'; + import { TextField } from '../form'; -export const StorageGroupDocumentForm = () => ( - <> - - -); +export function StorageGroupDocumentForm() { + return ; +} -function StorageGroupForm({ - error, - handleSubmit, -}) { +function StorageGroupForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/storagegroup/StorageGroupRow.jsx b/src/components/storagegroup/StorageGroupRow.jsx index 0949d247..34a75344 100644 --- a/src/components/storagegroup/StorageGroupRow.jsx +++ b/src/components/storagegroup/StorageGroupRow.jsx @@ -1,17 +1,12 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; import TableRowLink from '../ui/TableRowLink'; -export default function StorageGroupRow({ - storageGroup, -}) { +export default function StorageGroupRow({ storageGroup }) { const { name: groupName } = storageGroup; return ( - - {groupName} - + {groupName} ); } diff --git a/src/components/storagegroup/StorageGroupSelect.jsx b/src/components/storagegroup/StorageGroupSelect.jsx index 3ebdf0a9..acda442a 100644 --- a/src/components/storagegroup/StorageGroupSelect.jsx +++ b/src/components/storagegroup/StorageGroupSelect.jsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Field } from 'redux-form'; import debounce from 'lodash.debounce'; +import { Field } from 'redux-form'; import { storage as StorageApi } from '@vidispine/vdt-api'; + import Select from '../ui/Select'; const debouncedListStorage = debounce(StorageApi.listStorage, 500, { @@ -15,8 +15,9 @@ export const loadStorageGroupOptions = async (inputValue) => { const { group: groupList = [] } = storageGroupListType; let filterStorageGroup = groupList.map((s) => s.name); if (inputValue && inputValue !== '*') { - filterStorageGroup = filterStorageGroup - .filter((f) => f.toLowerCase().includes(inputValue.toLowerCase())); + filterStorageGroup = filterStorageGroup.filter((f) => + f.toLowerCase().includes(inputValue.toLowerCase()), + ); } const options = filterStorageGroup.map((f) => ({ label: f, value: f })); return options; diff --git a/src/components/storagegroup/StorageGroupStorageCard.jsx b/src/components/storagegroup/StorageGroupStorageCard.jsx index acd5ce6d..ab54b579 100644 --- a/src/components/storagegroup/StorageGroupStorageCard.jsx +++ b/src/components/storagegroup/StorageGroupStorageCard.jsx @@ -1,6 +1,5 @@ -import React from 'react'; - import SquareCard from '../ui/SquareCard'; + import StorageGroupStorageEditor from './StorageGroupStorageEditor'; export default function StorageGroupStorageCard({ diff --git a/src/components/storagegroup/StorageGroupStorageDialog.jsx b/src/components/storagegroup/StorageGroupStorageDialog.jsx index 4a5caeb6..6670658f 100644 --- a/src/components/storagegroup/StorageGroupStorageDialog.jsx +++ b/src/components/storagegroup/StorageGroupStorageDialog.jsx @@ -1,16 +1,16 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { submit } from 'redux-form'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { connect } from 'react-redux'; +import { submit } from 'redux-form'; -import StorageGroupStorageForm from './StorageGroupStorageForm'; -import * as formActions from '../../formactions/storagegroup'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/storagegroup'; + +import StorageGroupStorageForm from './StorageGroupStorageForm'; const EDIT_STORAGEGROUP_STORAGE_FORM = 'EDIT_STORAGEGROUP_STORAGE_FORM'; @@ -47,11 +47,7 @@ function StorageGroupStorageDialog({
- - diff --git a/src/components/storagegroup/StorageGroupTitle.jsx b/src/components/storagegroup/StorageGroupTitle.jsx index df86308d..9728e2e9 100644 --- a/src/components/storagegroup/StorageGroupTitle.jsx +++ b/src/components/storagegroup/StorageGroupTitle.jsx @@ -1,8 +1,7 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; -import TitleHeader from '../ui/TitleHeader'; import Menu, { MenuItem } from '../ui/Menu'; +import TitleHeader from '../ui/TitleHeader'; export default function StorageGroupTitle({ groupName, @@ -18,7 +17,7 @@ export default function StorageGroupTitle({ title={groupName} onRefresh={onRefresh} openCode={openCode} - actionComponent={( + actionComponent={ Add Storage @@ -27,7 +26,7 @@ export default function StorageGroupTitle({ Remove Storage Group - )} + } /> ); } diff --git a/src/components/storagerule/StorageRuleDialog.jsx b/src/components/storagerule/StorageRuleDialog.jsx index 488e6ff3..19f914ca 100644 --- a/src/components/storagerule/StorageRuleDialog.jsx +++ b/src/components/storagerule/StorageRuleDialog.jsx @@ -1,36 +1,28 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Dialog from '@material-ui/core/Dialog'; import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; -import Dialog from '@material-ui/core/Dialog'; -import StorageRuleForm from './StorageRuleForm'; import * as formActions from '../../formactions/storagerule'; -import WizardForm from '../ui/WizardForm'; import withUI from '../../hoc/withUI'; +import WizardForm from '../ui/WizardForm'; + +import StorageRuleForm from './StorageRuleForm'; -function StorageRuleDialog({ - open, - onClose, - openSnackBar, - onSuccess, -}) { +function StorageRuleDialog({ open, onClose, openSnackBar, onSuccess }) { const onSubmitSuccess = (response) => { const messageContent = 'Storage Rule Created'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(response); } + if (onSuccess) { + onSuccess(response); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating Storage Rule'; openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + New Storage Rule ( - <> - - ( - <> - - - - )} - hideNoValue - /> - - - - ( - <> - - - - )} - hideNoValue - /> - ( - <> - - - - )} - hideNoValue - /> - ( - <> - - - - )} - hideNoValue - /> - - -); +function StorageRulePriorityType({ value }) { + return ( + <> + + + + ); +} +function StorageRuleNotType({ value }) { + return ( + <> + + + + ); +} +function StorageRulePoolType({ value }) { + return ( + <> + + + + ); +} +function StorageRuleAppliesToType({ value }) { + return ( + <> + + + + ); +} -export default function StorageRuleDisplay({ - storageRuleDocument, -}) { +function StorageRuleType({ value = {} }) { return ( <> + + + + + + + + ); } + +export default function StorageRuleDisplay({ storageRuleDocument }) { + return ; +} diff --git a/src/components/storagerule/StorageRuleEntityDialog.jsx b/src/components/storagerule/StorageRuleEntityDialog.jsx index cbf77a18..e90d4b16 100644 --- a/src/components/storagerule/StorageRuleEntityDialog.jsx +++ b/src/components/storagerule/StorageRuleEntityDialog.jsx @@ -1,38 +1,28 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Dialog from '@material-ui/core/Dialog'; import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; -import Dialog from '@material-ui/core/Dialog'; -import { StorageRuleEntityForm } from './StorageRuleForm'; import * as formActions from '../../formactions/storagerule'; -import WizardForm from '../ui/WizardForm'; import withUI from '../../hoc/withUI'; +import WizardForm from '../ui/WizardForm'; + +import { StorageRuleEntityForm } from './StorageRuleForm'; -function StorageRuleEntityDialog({ - open, - onClose, - openSnackBar, - onSuccess, - entityType, - entityId, -}) { +function StorageRuleEntityDialog({ open, onClose, openSnackBar, onSuccess, entityType, entityId }) { const onSubmitSuccess = (response) => { const messageContent = 'Storage Rule Created'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(response); } + if (onSuccess) { + onSuccess(response); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating Storage Rule'; openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + New Storage Rule ( - - Criteria - - bandwidth - capacity - - -); +function StorageCriteriaType() { + return ( + + Criteria + + bandwidth + capacity + + + ); +} -const StorageRuleStorageType = () => ( - <> - - - -); +function StorageRuleStorageType() { + return ( + <> + + + + ); +} -const StorageRuleNotType = () => ( - <> - - - -); +function StorageRuleNotType() { + return ( + <> + + + + ); +} -const StorageRulePriorityType = () => ( - <> - - - -); +function StorageRulePriorityType() { + return ( + <> + + + + ); +} -const StorageRuleAppliesType = () => ( - <> - - - -); +function StorageRuleAppliesType() { + return ( + <> + + + + ); +} -const StorageRuleType = () => ( - <> - - - - )} - label="Inherited" - /> - - - - - - - Precedence - - HIGHEST - HIGH - MEDIUM - LOW - LOWEST - - - -); +function StorageRuleType() { + return ( + <> + + + } + label="Inherited" + /> + + + + + + + Precedence + + HIGHEST + HIGH + MEDIUM + LOW + LOWEST + + + + ); +} -const EntityForm = ({ error, handleSubmit }) => ( -
- {error && {error}} - - - - diff --git a/src/components/storagerule/StorageRuleRow.jsx b/src/components/storagerule/StorageRuleRow.jsx index 0eb7373a..a2e043df 100644 --- a/src/components/storagerule/StorageRuleRow.jsx +++ b/src/components/storagerule/StorageRuleRow.jsx @@ -1,23 +1,21 @@ -import React from 'react'; +import IconButton from '@material-ui/core/IconButton'; import Check from '@material-ui/icons/Check'; import DeleteForever from '@material-ui/icons/DeleteForever'; -import IconButton from '@material-ui/core/IconButton'; +import ChipArray from '../ui/ChipArray'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRow'; -import ChipArray from '../ui/ChipArray'; -export default function StorageRuleRow({ - storageRuleDocument, - onRemove, -}) { +export default function StorageRuleRow({ storageRuleDocument, onRemove }) { return ( {storageRuleDocument.appliesTo.id} {storageRuleDocument.appliesTo.type} {storageRuleDocument.id} {storageRuleDocument.storageCount} - + + + {storageRuleDocument.precedence} {storageRuleDocument.inherited === true && } diff --git a/src/components/storagerule/StorageRuleTagCard.jsx b/src/components/storagerule/StorageRuleTagCard.jsx index 9dfee08b..7f82afdf 100644 --- a/src/components/storagerule/StorageRuleTagCard.jsx +++ b/src/components/storagerule/StorageRuleTagCard.jsx @@ -1,16 +1,11 @@ -import React from 'react'; - import SquareCard from '../ui/SquareCard'; + import StorageRuleTagEditor from './StorageRuleTagEditor'; export default function StorageRuleTagCard(props) { return ( - <> - - - - + + + ); } diff --git a/src/components/storagerule/StorageRuleTagDialog.jsx b/src/components/storagerule/StorageRuleTagDialog.jsx index 146ef2db..da9d9925 100644 --- a/src/components/storagerule/StorageRuleTagDialog.jsx +++ b/src/components/storagerule/StorageRuleTagDialog.jsx @@ -1,37 +1,28 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Dialog from '@material-ui/core/Dialog'; import DialogContent from '@material-ui/core/DialogContent'; +import DialogTitle from '@material-ui/core/DialogTitle'; -import Dialog from '@material-ui/core/Dialog'; -import { StorageRuleEntityForm } from './StorageRuleForm'; import * as formActions from '../../formactions/storagerule'; -import WizardForm from '../ui/WizardForm'; import withUI from '../../hoc/withUI'; +import WizardForm from '../ui/WizardForm'; + +import { StorageRuleEntityForm } from './StorageRuleForm'; -function StorageRuleTagDialog({ - open, - onClose, - openSnackBar, - onSuccess, - tagName, -}) { +function StorageRuleTagDialog({ open, onClose, openSnackBar, onSuccess, tagName }) { const onSubmitSuccess = (response) => { const messageContent = 'Storage Rule Created'; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(response); } + if (onSuccess) { + onSuccess(response); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating Storage Rule'; openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + New Storage Rule { const messageContent = 'Storage Rule Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Storage Rule'; @@ -45,11 +40,10 @@ function StorageRuleTagEditor({ formComponent={StorageRuleTagForm} title="Storage Rule" iconList={ - storageRuleDocument - && ( - onOpen({ modalName: REMOVE_STORAGERULE_DIALOG })}> - - + storageRuleDocument && ( + onOpen({ modalName: REMOVE_STORAGERULE_DIALOG })}> + + ) } /> @@ -59,7 +53,6 @@ function StorageRuleTagEditor({ storageRuleDocument={storageRuleDocument} /> - ); } diff --git a/src/components/taskdefinition/TaskDefinitionCard.jsx b/src/components/taskdefinition/TaskDefinitionCard.jsx index 08076360..960cacd8 100644 --- a/src/components/taskdefinition/TaskDefinitionCard.jsx +++ b/src/components/taskdefinition/TaskDefinitionCard.jsx @@ -1,14 +1,11 @@ -import React from 'react'; - import Card from '@material-ui/core/Card'; + import TaskDefinitionEditor from './TaskDefinitionEditor'; export default function TaskDefinitionCard(props) { return ( - + ); } diff --git a/src/components/taskdefinition/TaskDefinitionDialog.jsx b/src/components/taskdefinition/TaskDefinitionDialog.jsx index 658a67af..6e5fbad6 100644 --- a/src/components/taskdefinition/TaskDefinitionDialog.jsx +++ b/src/components/taskdefinition/TaskDefinitionDialog.jsx @@ -1,27 +1,20 @@ -import React from 'react'; -import { compose } from 'redux'; -import Divider from '@material-ui/core/Divider'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import TaskDefinitionForm from './TaskDefinitionForm'; import * as formActions from '../../formactions/taskdefinition'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import TaskDefinitionForm from './TaskDefinitionForm'; const EDIT_TASKDEFINITION_FORM = 'EDIT_TASKDEFINITION_FORM'; -function TaskDefinitionDialog({ - jobType, - submitForm, - openSnackBar, - onClose, - onSuccess, - open, -}) { +function TaskDefinitionDialog({ jobType, submitForm, openSnackBar, onClose, onSuccess, open }) { const initialValues = { taskDefinitionDocument: { jobType, script: '//' } }; const onSubmitSuccess = (response) => { const { uriListDocument } = response; @@ -30,7 +23,9 @@ function TaskDefinitionDialog({ const messageContent = `Step ID ${newTaskDefinitionId} Saved`; openSnackBar({ messageContent }); onClose(); - if (onSuccess) { onSuccess(); } + if (onSuccess) { + onSuccess(); + } }; const onSubmitFail = () => { const messageContent = 'Error Saving Step'; @@ -38,9 +33,7 @@ function TaskDefinitionDialog({ }; return ( - - New Step - + New Step - - diff --git a/src/components/taskdefinition/TaskDefinitionDisplay.jsx b/src/components/taskdefinition/TaskDefinitionDisplay.jsx index 46dd274f..8a1d682a 100644 --- a/src/components/taskdefinition/TaskDefinitionDisplay.jsx +++ b/src/components/taskdefinition/TaskDefinitionDisplay.jsx @@ -1,27 +1,36 @@ -import React from 'react'; import Grid from '@material-ui/core/Grid'; import TextGrid from '../ui/TextGrid'; import TypeSection from '../ui/TypeSection'; -const TaskDefinitionDependency = ({ value = {} }) => ( - <> - - - - -); +function TaskDefinitionDependency({ value = {} }) { + return ( + <> + + + + + ); +} -export default function TaskDefinitionDisplay({ - taskDefinitionDocument, -}) { +export default function TaskDefinitionDisplay({ taskDefinitionDocument }) { return ( <> - - + + diff --git a/src/components/taskdefinition/TaskDefinitionEditor.jsx b/src/components/taskdefinition/TaskDefinitionEditor.jsx index 543a301b..a5d6ffc7 100644 --- a/src/components/taskdefinition/TaskDefinitionEditor.jsx +++ b/src/components/taskdefinition/TaskDefinitionEditor.jsx @@ -1,28 +1,24 @@ -import React from 'react'; import IconButton from '@material-ui/core/IconButton'; import DeleteForever from '@material-ui/icons/DeleteForever'; import * as formActions from '../../formactions/taskdefinition'; +import withUI from '../../hoc/withUI'; +import Editor from '../ui/Editor'; + import TaskDefinitionDisplay from './TaskDefinitionDisplay'; import TaskDefinitionForm from './TaskDefinitionForm'; import TaskDefinitionRemove from './TaskDefinitionRemove'; -import Editor from '../ui/Editor'; -import withUI from '../../hoc/withUI'; - -function TaskDefinitionEditor({ - taskDefinitionDocument, - openSnackBar, - onRefresh, - onOpen, -}) { +function TaskDefinitionEditor({ taskDefinitionDocument, openSnackBar, onRefresh, onOpen }) { const { id: taskId, step, description } = taskDefinitionDocument; const EDIT_TASKDEFINTION_FORM = `EDIT_TASKDEFINTION_FORM_${taskId}`; const TASKDEFINITION_REMOVE = `TASKDEFINITION_REMOVE_${taskId}`; const onSubmitSuccess = () => { const messageContent = 'Task Definition Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Task Definition'; @@ -42,11 +38,11 @@ function TaskDefinitionEditor({ initialValues={initialValues} displayComponent={TaskDefinitionDisplay} formComponent={TaskDefinitionForm} - iconList={( + iconList={ onOpen({ modalName: TASKDEFINITION_REMOVE })}> - )} + } /> ( - <> - - - )} - label="Previous" - /> - - )} - label="All Previous" - /> - -); +function TaskDefinitionDependency() { + return ( + <> + + } + label="Previous" + /> + } + label="All Previous" + /> + + ); +} -const TaskDefinitionType = () => ( - <> - - - - - - )} - label="Critical" - /> - - )} - label="Cleanup" - /> - - - - - -); +function TaskDefinitionType() { + return ( + <> + + + + + } + label="Critical" + /> + } + label="Cleanup" + /> + + + + + + ); +} -function TaskDefintionForm({ - error, - handleSubmit, -}) { +function TaskDefintionForm({ error, handleSubmit }) { return (
{error && {error}} - + - + diff --git a/src/components/taskdefinition/TaskDefinitionTitle.jsx b/src/components/taskdefinition/TaskDefinitionTitle.jsx index 9fe30ce8..fb11e0b3 100644 --- a/src/components/taskdefinition/TaskDefinitionTitle.jsx +++ b/src/components/taskdefinition/TaskDefinitionTitle.jsx @@ -1,5 +1,3 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; export default function TaskDefinitionTitle(props) { @@ -7,7 +5,7 @@ export default function TaskDefinitionTitle(props) { diff --git a/src/components/taskgroup/TaskGroupCard.jsx b/src/components/taskgroup/TaskGroupCard.jsx index 502ed052..42da8bde 100644 --- a/src/components/taskgroup/TaskGroupCard.jsx +++ b/src/components/taskgroup/TaskGroupCard.jsx @@ -1,14 +1,9 @@ -import React from 'react'; - +import SimpleMetadataGrid from '../ui/SimpleMetadataGrid'; import SquareCard from '../ui/SquareCard'; + import TaskGroupEditor from './TaskGroupEditor'; -import SimpleMetadataGrid from '../ui/SimpleMetadataGrid'; -export default function TaskGroupCard({ - groupName, - taskGroupDocument, - onRefresh, -}) { +export default function TaskGroupCard({ groupName, taskGroupDocument, onRefresh }) { const { metadata: simpleMetadataList = {} } = taskGroupDocument; return ( <> @@ -19,17 +14,16 @@ export default function TaskGroupCard({ onRefresh={onRefresh} />
- {simpleMetadataList - && ( - - - + {simpleMetadataList && ( + + + )} ); diff --git a/src/components/taskgroup/TaskGroupDialog.jsx b/src/components/taskgroup/TaskGroupDialog.jsx index 86e9f24c..9f2c8bc8 100644 --- a/src/components/taskgroup/TaskGroupDialog.jsx +++ b/src/components/taskgroup/TaskGroupDialog.jsx @@ -1,26 +1,20 @@ -import React from 'react'; -import { connect } from 'react-redux'; -import { submit } from 'redux-form'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { connect } from 'react-redux'; +import { submit } from 'redux-form'; -import TaskGroupForm from './TaskGroupForm'; -import * as formActions from '../../formactions/taskgroup'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/taskgroup'; + +import TaskGroupForm from './TaskGroupForm'; const EDIT_TASKGROUP_FORM = 'EDIT_TASKGROUP_FORM'; -function TaskGroupDialog({ - submitForm, - closeModal, - isOpen, - history, - openSnackBar, -}) { +function TaskGroupDialog({ submitForm, closeModal, isOpen, history, openSnackBar }) { const onSubmitSuccess = (response) => { const { taskGroupDocument } = response; const { name: groupName } = taskGroupDocument; @@ -46,18 +40,10 @@ function TaskGroupDialog({ - - diff --git a/src/components/taskgroup/TaskGroupDisplay.jsx b/src/components/taskgroup/TaskGroupDisplay.jsx index 6efa2ca0..ced545ba 100644 --- a/src/components/taskgroup/TaskGroupDisplay.jsx +++ b/src/components/taskgroup/TaskGroupDisplay.jsx @@ -1,52 +1,43 @@ -import React from 'react'; +import { Fragment } from 'react'; + import Divider from '@material-ui/core/Divider'; import TextGrid from '../ui/TextGrid'; -export const TaskGroupType = ({ group }) => ( - <> - { group.priority - && } - { group.maxConcurrency - && } - { group.job - && ( - <> - {group.job.map((job) => ( - - - - - - - - ))} - - +export function TaskGroupType({ group }) { + return ( + <> + {group.priority && } + {group.maxConcurrency && } + {group.job && ( + <> + {group.job.map((job) => ( + + + + + + + + ))} + + )} - { group.transcoder - && ( - <> - {group.transcoder.map((transcoder) => ( - - - - - ))} - - + {group.transcoder && ( + <> + {group.transcoder.map((transcoder) => ( + + + + + ))} + + )} - -); - -export default function TaskGroupDisplay({ - taskGroupDocument, -}) { - return ( - + ); } + +export default function TaskGroupDisplay({ taskGroupDocument }) { + return ; +} diff --git a/src/components/taskgroup/TaskGroupEditor.jsx b/src/components/taskgroup/TaskGroupEditor.jsx index 8225bb21..f73b5e5b 100644 --- a/src/components/taskgroup/TaskGroupEditor.jsx +++ b/src/components/taskgroup/TaskGroupEditor.jsx @@ -1,23 +1,25 @@ -import React from 'react'; -import Grid from '@material-ui/core/Grid'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import Switch from '@material-ui/core/Switch'; +import { PureComponent } from 'react'; + +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import Divider from '@material-ui/core/Divider'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Grid from '@material-ui/core/Grid'; +import Switch from '@material-ui/core/Switch'; import { connect } from 'react-redux'; import { submit } from 'redux-form'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Divider from '@material-ui/core/Divider'; -import TaskGroupForm from './TaskGroupForm'; -import TaskGroupDisplay from './TaskGroupDisplay'; -import * as formActions from '../../formactions/taskgroup'; import * as actions from '../../actions'; +import * as formActions from '../../formactions/taskgroup'; + +import TaskGroupDisplay from './TaskGroupDisplay'; +import TaskGroupForm from './TaskGroupForm'; const EDIT_TASKGROUP_FORM = 'EDIT_TASKGROUP_FORM'; -class ImportSettingsEditor extends React.PureComponent { +class ImportSettingsEditor extends PureComponent { constructor(props) { super(props); this.toggleEdit = this.toggleEdit.bind(this); @@ -32,16 +34,8 @@ class ImportSettingsEditor extends React.PureComponent { } render() { - const { - taskGroupDocument, - submitForm, - groupName, - onRefresh, - openSnackBar, - } = this.props; - const { - isEditing, - } = this.state; + const { taskGroupDocument, submitForm, groupName, onRefresh, openSnackBar } = this.props; + const { isEditing } = this.state; const initialValues = { taskGroupDocument, }; @@ -49,7 +43,9 @@ class ImportSettingsEditor extends React.PureComponent { this.toggleEdit(); const messageContent = 'Task Group Saved'; openSnackBar({ messageContent }); - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } }; const onSubmitFail = () => { const messageContent = 'Error Updating Task Group'; @@ -58,7 +54,7 @@ class ImportSettingsEditor extends React.PureComponent { return ( <> - )} + } /> - {isEditing - ? ( - - ) - : ( - - )} + {isEditing ? ( + + ) : ( + + )} - {isEditing - && ( + {isEditing && ( <> - - - )} + )} ); } diff --git a/src/components/taskgroup/TaskGroupForm.jsx b/src/components/taskgroup/TaskGroupForm.jsx index 7dfeec97..f08f7f14 100644 --- a/src/components/taskgroup/TaskGroupForm.jsx +++ b/src/components/taskgroup/TaskGroupForm.jsx @@ -1,145 +1,64 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { - reduxForm, Field, FormSection, FieldArray, -} from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; +import { Fragment } from 'react'; + import FormControl from '@material-ui/core/FormControl'; -import Delete from '@material-ui/icons/Delete'; import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; -import { Select, TextField } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import Delete from '@material-ui/icons/Delete'; +import { reduxForm, Field, FormSection, FieldArray } from 'redux-form'; -import TextButton from '../ui/TextButton'; +import { Select, TextField } from '../form'; +import { loadJobTypeOptions } from '../jobtype/JobTypeSelect'; import ChipInput from '../ui/ChipInput'; import { SimpleMetadataType } from '../ui/FormType'; import { StatefulAsyncSelect } from '../ui/Select'; -import { loadJobTypeOptions } from '../jobtype/JobTypeSelect'; - -const InitialDisabledTextField = (props) => ( - -); - -const TranscoderArray = ({ fields }) => ( - <> - {fields.map((thisField, index) => ( - - - - - - fields.remove(index)}> - - - - - ))} - fields.push()} color="primary" style={{ marginTop: 10 }}> - Add Transcoder - - -); +import TextButton from '../ui/TextButton'; -const DataArray = ({ fields }) => ( - <> - {fields.map((thisField, index) => ( - - - - - - - - - fields.remove(index)}> - - - - - ))} - fields.push()} color="primary" style={{ marginTop: 10 }}> - Add Data - - -); +function InitialDisabledTextField(props) { + return ( + + ); +} -const JobArray = ({ fields }) => ( - <> - {fields.map((thisField, index) => ( - - +function TranscoderArray({ fields }) { + return ( + <> + {fields.map((thisField, index) => ( + + + + + fields.remove(index)}> + + + + + ))} + fields.push()} color="primary" style={{ marginTop: 10 }}> + Add Transcoder + + + ); +} - - - - +function DataArray({ fields }) { + return ( + <> + {fields.map((thisField, index) => ( + + + + + + fields.remove(index)}> @@ -147,73 +66,100 @@ const JobArray = ({ fields }) => ( - - - ))} - fields.push()} color="primary" style={{ marginTop: 10 }}> - Add Job - - -); + ))} + fields.push()} color="primary" style={{ marginTop: 10 }}> + Add Data + + + ); +} -const TaskGroupType = () => ( - <> - - - Priority - - HIGHEST - HIGH - MEDIUM - LOW - LOWEST - - - - - - - - - - - -); +function JobArray({ fields }) { + return ( + <> + {fields.map((thisField, index) => ( + + + + + + + + + + fields.remove(index)}> + + + + + + + ))} + fields.push()} color="primary" style={{ marginTop: 10 }}> + Add Job + + + ); +} + +function TaskGroupType() { + return ( + <> + + + Priority + + HIGHEST + HIGH + MEDIUM + LOW + LOWEST + + + + + + + + + + + + ); +} -function TaskGroupForm({ - error, - handleSubmit, -}) { +function TaskGroupForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/taskgroup/TaskGroupRow.jsx b/src/components/taskgroup/TaskGroupRow.jsx index 4ace2446..62471984 100644 --- a/src/components/taskgroup/TaskGroupRow.jsx +++ b/src/components/taskgroup/TaskGroupRow.jsx @@ -1,15 +1,11 @@ -import React from 'react'; import TableCell from '@material-ui/core/TableCell'; + import TableRowLink from '../ui/TableRowLink'; -export default function TaskGroupRow({ - group, -}) { +export default function TaskGroupRow({ group }) { return ( - - {group.name} - + {group.name} ); diff --git a/src/components/taskgroup/TaskGroupTable.jsx b/src/components/taskgroup/TaskGroupTable.jsx index c63d0973..d08ac69e 100644 --- a/src/components/taskgroup/TaskGroupTable.jsx +++ b/src/components/taskgroup/TaskGroupTable.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; @@ -7,9 +6,7 @@ import TableRow from '@material-ui/core/TableRow'; import TaskGroupRow from './TaskGroupRow'; -export default function TaskGroupTable({ - taskGroupListDocument = {}, -}) { +export default function TaskGroupTable({ taskGroupListDocument = {} }) { const { group: groupList = [] } = taskGroupListDocument; return ( @@ -21,10 +18,7 @@ export default function TaskGroupTable({ {groupList.map((group) => ( - + ))}
diff --git a/src/components/taskgroup/TaskGroupTitle.jsx b/src/components/taskgroup/TaskGroupTitle.jsx index 48c3f898..577fc829 100644 --- a/src/components/taskgroup/TaskGroupTitle.jsx +++ b/src/components/taskgroup/TaskGroupTitle.jsx @@ -1,15 +1,9 @@ -import React from 'react'; -import DeleteForever from '@material-ui/icons/DeleteForever'; import IconButton from '@material-ui/core/IconButton'; +import DeleteForever from '@material-ui/icons/DeleteForever'; import TitleHeader from '../ui/TitleHeader'; -export default function TaskGroupTitle({ - openCode, - onRefresh, - groupName, - openRemove, -}) { +export default function TaskGroupTitle({ openCode, onRefresh, groupName, openRemove }) { return ( - )} + } /> ); } diff --git a/src/components/transfer/TransferCard.jsx b/src/components/transfer/TransferCard.jsx index 876c0b3e..1b482afc 100644 --- a/src/components/transfer/TransferCard.jsx +++ b/src/components/transfer/TransferCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import TransferTable from './TransferTable'; -export default function TransferCard({ - ...props -}) { +export default function TransferCard({ ...props }) { return ( - + ); diff --git a/src/components/transfer/TransferFilter.jsx b/src/components/transfer/TransferFilter.jsx index f6c6fc3e..c5ccbe2c 100644 --- a/src/components/transfer/TransferFilter.jsx +++ b/src/components/transfer/TransferFilter.jsx @@ -1,15 +1,15 @@ -import React from 'react'; -import CardContent from '@material-ui/core/CardContent'; -import Divider from '@material-ui/core/Divider'; import Button from '@material-ui/core/Button'; +import CardContent from '@material-ui/core/CardContent'; import DialogActions from '@material-ui/core/DialogActions'; +import Divider from '@material-ui/core/Divider'; import { compose } from 'redux'; import * as formActions from '../../formactions/transfer'; -import TransferFilterForm from './TransferFilterForm'; import withFormActions from '../../hoc/withFormActions'; import withUI from '../../hoc/withUI'; +import TransferFilterForm from './TransferFilterForm'; + function TransferFilter({ onClose, onSuccess, @@ -19,7 +19,9 @@ function TransferFilter({ form = 'TRANSFER_FILTER_FORM', }) { const onSubmitSuccess = (response, dispatch, props) => { - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Listing Transfers'; @@ -39,17 +41,10 @@ function TransferFilter({
- - diff --git a/src/components/transfer/TransferFilterCard.jsx b/src/components/transfer/TransferFilterCard.jsx index e28f97b2..22d203c7 100644 --- a/src/components/transfer/TransferFilterCard.jsx +++ b/src/components/transfer/TransferFilterCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import TransferFilter from './TransferFilter'; -export default function TransferFilterCard({ - ...props -}) { +export default function TransferFilterCard({ ...props }) { return ( - + ); diff --git a/src/components/transfer/TransferFilterForm.jsx b/src/components/transfer/TransferFilterForm.jsx index e0d2f2ca..d7903cf4 100644 --- a/src/components/transfer/TransferFilterForm.jsx +++ b/src/components/transfer/TransferFilterForm.jsx @@ -1,13 +1,12 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import { Select } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( @@ -23,17 +22,11 @@ const queryParams = () => ( ); -function TransferFilterForm({ - error, - handleSubmit, -}) { +function TransferFilterForm({ error, handleSubmit }) { return (
{error && {error}} - + - diff --git a/src/components/transfer/TransferPriorityForm.jsx b/src/components/transfer/TransferPriorityForm.jsx index 8d0c6ae9..eb7d73ee 100644 --- a/src/components/transfer/TransferPriorityForm.jsx +++ b/src/components/transfer/TransferPriorityForm.jsx @@ -1,31 +1,19 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( - + ); -function TransferPriorityForm({ - error, - handleSubmit, -}) { +function TransferPriorityForm({ error, handleSubmit }) { return (
{error && {error}} - + + - - ) : null -); + ) : null; +} -const EditorCard = ({ +function EditorCard({ initialState = false, editComponent: EditComponent, editProps = {}, @@ -145,8 +143,8 @@ const EditorCard = ({ onRemove, onSave, ...props -}) => { - const [isEditing, setIsEditing] = React.useState(initialState); +}) { + const [isEditing, setIsEditing] = useState(initialState); const toggleEdit = () => setIsEditing(!isEditing); return ( @@ -176,6 +174,6 @@ const EditorCard = ({ /> ); -}; +} export default EditorCard; diff --git a/src/components/ui/ErrorButton.jsx b/src/components/ui/ErrorButton.jsx index d61f7f9b..7adff115 100644 --- a/src/components/ui/ErrorButton.jsx +++ b/src/components/ui/ErrorButton.jsx @@ -1,5 +1,5 @@ -import { styled } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; +import { styled } from '@material-ui/core/styles'; const ErrorButton = styled(Button)(({ theme }) => ({ background: theme.palette.error.main, diff --git a/src/components/ui/Field.jsx b/src/components/ui/Field.jsx index 1a259449..e21df1f2 100644 --- a/src/components/ui/Field.jsx +++ b/src/components/ui/Field.jsx @@ -1,20 +1,17 @@ -import React from 'react'; -import { Field } from 'redux-form'; import startCase from 'lodash.startcase'; +import { Field } from 'redux-form'; -const withStartCase = (WrappedComponent) => ({ - nameAsTitle = true, - useStartCase = true, - ...props -}) => { - let { label } = props; - if (!label && nameAsTitle) { - label = (props.name && useStartCase) ? startCase(props.name) : props.name; - } else { - label = (props.label && useStartCase) ? startCase(props.label) : props.label; - } - const title = (props.title && useStartCase) ? startCase(props.title) : props.title; - return ; -}; +const withStartCase = + (WrappedComponent) => + ({ nameAsTitle = true, useStartCase = true, ...props }) => { + let { label } = props; + if (!label && nameAsTitle) { + label = props.name && useStartCase ? startCase(props.name) : props.name; + } else { + label = props.label && useStartCase ? startCase(props.label) : props.label; + } + const title = props.title && useStartCase ? startCase(props.title) : props.title; + return ; + }; export default withStartCase(Field); diff --git a/src/components/ui/FieldArray.jsx b/src/components/ui/FieldArray.jsx index bbc210c9..9743bef3 100644 --- a/src/components/ui/FieldArray.jsx +++ b/src/components/ui/FieldArray.jsx @@ -1,13 +1,13 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { FieldArray as RXFieldArray, Field } from 'redux-form'; -import Delete from '@material-ui/icons/Delete'; import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import Delete from '@material-ui/icons/Delete'; import startCase from 'lodash.startcase'; +import { FieldArray as RXFieldArray, Field } from 'redux-form'; import withErrorBoundary from '../../hoc/withErrorBoundary'; + import TextButton from './TextButton'; const hoverStyle = (theme) => ({ @@ -27,7 +27,7 @@ const hoverStyle = (theme) => ({ }, }); -const FieldArrayComponent = ({ +function FieldArrayComponent({ fields, label, classes, @@ -35,57 +35,45 @@ const FieldArrayComponent = ({ labelStartCase = true, fieldComponent, ...props -}) => ( -
- {fields.map((thisField, index) => ( -
- - - fields.remove(index)}> - - - - { label - && ( - - {labelStartCase - ? startCase(`${label} ${index + 1}`) - : `${label} ${index + 1}`} - +}) { + return ( +
+ {fields.map((thisField, index) => ( +
+ + + fields.remove(index)}> + + + + {label && ( + + {labelStartCase ? startCase(`${label} ${index + 1}`) : `${label} ${index + 1}`} + )} - -
- + +
+ +
-
- ))} - fields.push()} color="primary" style={{ marginTop: 10 }}> - {label ? `Add ${label}` : 'Add'} - -
-); + ))} + fields.push()} color="primary" style={{ marginTop: 10 }}> + {label ? `Add ${label}` : 'Add'} + +
+ ); +} -const FieldArray = ({ component, ...props }) => { +function FieldArray({ component, ...props }) { const StyledFieldArrayComponent = withStyles(hoverStyle)(FieldArrayComponent); return ( - + ); -}; +} export default withErrorBoundary(FieldArray); diff --git a/src/components/ui/FieldTypeArray.jsx b/src/components/ui/FieldTypeArray.jsx index 8fe98f5a..2e62d2c9 100644 --- a/src/components/ui/FieldTypeArray.jsx +++ b/src/components/ui/FieldTypeArray.jsx @@ -1,15 +1,15 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { FormSection, FieldArray } from 'redux-form'; -import Delete from '@material-ui/icons/Delete'; -import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline'; +import Button from '@material-ui/core/Button'; import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; import { withStyles } from '@material-ui/core/styles'; -import Button from '@material-ui/core/Button'; +import Typography from '@material-ui/core/Typography'; +import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline'; +import Delete from '@material-ui/icons/Delete'; import startCase from 'lodash.startcase'; +import { FormSection, FieldArray } from 'redux-form'; import withErrorBoundary from '../../hoc/withErrorBoundary'; + import TextButton from './TextButton'; const hoverStyle = (theme) => ({ @@ -18,8 +18,7 @@ const hoverStyle = (theme) => ({ backgroundColor: theme.palette.action.hover, }, }, - noHover: { - }, + noHover: {}, marginLeft: { marginLeft: '10px', }, @@ -30,26 +29,17 @@ const hoverStyle = (theme) => ({ }, }); -const RemoveAction = ({ - removeLabel, - fields, - index, - label, -}) => ( - removeLabel ? ( - ) : ( fields.remove(index)}> - ) -); + ); +} function TypeArray({ fields, @@ -68,20 +58,17 @@ function TypeArray({ const thisLabel = labelStartCase ? startCase(label) : label; return (
- { arrayHeader && ( -
- {thisLabel} - fields.push()} size="small" color="primary"> - - -
+ {arrayHeader && ( +
+ {thisLabel} + fields.push()} size="small" color="primary"> + + +
)} {fields.map((thisField, index) => ( -
+
- { direction !== 'row' && ( + {direction !== 'row' && ( )} - { withHeader && ( - - {`${thisLabel} ${index + 1}`} - + {withHeader && ( + {`${thisLabel} ${index + 1}`} )} - { direction === 'row' ? ( + {direction === 'row' ? ( - + ) : ( -
- +
+
)}
))} {/* TODO check when there is no header label */} - {(( - fields.length > 0 && fields.length !== maxOccurs) - || (arrayHeader === false && fields.length === 0 && fields.length !== maxOccurs) - ) && ( + {((fields.length > 0 && fields.length !== maxOccurs) || + (arrayHeader === false && fields.length === 0 && fields.length !== maxOccurs)) && ( fields.push()} color="primary" style={{ marginTop: 10 }}> {thisLabel ? `Add ${thisLabel}` : 'Add'} @@ -146,12 +121,8 @@ function TypeArray({ ); } -const FieldTypeArray = ({ component, ...props }) => ( - -); +function FieldTypeArray({ component, ...props }) { + return ; +} export default withErrorBoundary(withStyles(hoverStyle)(FieldTypeArray)); diff --git a/src/components/ui/FixedTable.jsx b/src/components/ui/FixedTable.jsx index fcd6e903..902c350d 100644 --- a/src/components/ui/FixedTable.jsx +++ b/src/components/ui/FixedTable.jsx @@ -1,7 +1,8 @@ -import React from 'react'; -import MUITable from '@material-ui/core/Table'; import { withStyles } from '@material-ui/core/styles'; +import MUITable from '@material-ui/core/Table'; -const Table = (props) => ; +function Table(props) { + return ; +} export default withStyles({ root: { tableLayout: 'fixed' } })(Table); diff --git a/src/components/ui/FormSection.jsx b/src/components/ui/FormSection.jsx index d8b022ef..de74e9fe 100644 --- a/src/components/ui/FormSection.jsx +++ b/src/components/ui/FormSection.jsx @@ -1,8 +1,9 @@ -import React from 'react'; -import { FormSection } from 'redux-form'; +import { useState } from 'react'; + import { withStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import startCase from 'lodash.startcase'; +import { FormSection } from 'redux-form'; import TextButton from './TextButton'; @@ -30,7 +31,7 @@ const hoverStyle = (theme) => ({ }, }); -const WrappedFormSection = ({ +function WrappedFormSection({ label, hover = false, classes, @@ -38,33 +39,30 @@ const WrappedFormSection = ({ button = false, initialDisplay = true, ...props -}) => { - const [isDisplayed, setIsDisplayed] = React.useState(initialDisplay); +}) { + const [isDisplayed, setIsDisplayed] = useState(initialDisplay); const toggleText = isDisplayed === true ? 'Hide' : 'Show'; return (
-
+
- { label && ( + {label && ( {labelStartCase ? startCase(label) : label} )} - { button === true && ( + {button === true && ( setIsDisplayed((prevValue) => !prevValue)} color="primary"> {toggleText} )}
{isDisplayed === true && ( -
- -
+
+ +
)}
-
); -}; +} export default withStyles(hoverStyle)(WrappedFormSection); diff --git a/src/components/ui/FormType.jsx b/src/components/ui/FormType.jsx index 082a527d..e16519b3 100644 --- a/src/components/ui/FormType.jsx +++ b/src/components/ui/FormType.jsx @@ -1,50 +1,30 @@ -import React from 'react'; import Grid from '@material-ui/core/Grid'; + import { TextField } from '../form'; -import FieldTypeArray from './FieldTypeArray'; import Field from './Field'; +import FieldTypeArray from './FieldTypeArray'; -export const KeyValuePairType = ({ dense = true }) => ( - dense ? ( +export function KeyValuePairType({ dense = true }) { + return dense ? ( - + - + ) : ( <> - - + + - ) -); + ); +} -export const SimpleMetadataType = ({ dense = true }) => ( - <> +export function SimpleMetadataType({ dense = true }) { + return ( ( component={KeyValuePairType} dense={dense} /> - -); + ); +} diff --git a/src/components/ui/FormWrapper.jsx b/src/components/ui/FormWrapper.jsx index 77e62131..706c3f0f 100644 --- a/src/components/ui/FormWrapper.jsx +++ b/src/components/ui/FormWrapper.jsx @@ -1,14 +1,12 @@ -import React from 'react'; -import { compose } from 'redux'; - -import Grid from '@material-ui/core/Grid'; +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; +import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; -import Accordion from '@material-ui/core/Accordion'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import { compose } from 'redux'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; @@ -38,9 +36,7 @@ function FormWrapper({ onFail(error, dispatch, props); } }; - const FormComponentList = Array.isArray(formComponent) - ? formComponent - : [formComponent]; + const FormComponentList = Array.isArray(formComponent) ? formComponent : [formComponent]; return ( diff --git a/src/components/ui/GitHubButton.jsx b/src/components/ui/GitHubButton.jsx index ab2d248e..66b0064a 100644 --- a/src/components/ui/GitHubButton.jsx +++ b/src/components/ui/GitHubButton.jsx @@ -1,8 +1,10 @@ -import React from 'react'; +import { forwardRef } from 'react'; + import IconButton from '@material-ui/core/IconButton'; + import GitHubIcon from './GitHubIcon'; -const GitHubButton = React.forwardRef((props, ref) => ( +const GitHubButton = forwardRef((props, ref) => ( ({ root: { @@ -36,9 +36,7 @@ let counter = 0; // eslint-disable-next-line no-plusplus const getId = () => `graphviz${counter++}`; -function Graphviz({ - classes, className, dot, ...props -}) { +function Graphviz({ classes, className, dot, ...props }) { const id = useMemo(getId, []); useEffect(() => { graphviz(`#${id}`, { @@ -47,7 +45,7 @@ function Graphviz({ useWorker: false, ...props, }).renderDot(dot); - }, [dot, props]); + }, [dot, id, props]); return
; } diff --git a/src/components/ui/HashLink.jsx b/src/components/ui/HashLink.jsx index ddce9e59..b1ad5aca 100644 --- a/src/components/ui/HashLink.jsx +++ b/src/components/ui/HashLink.jsx @@ -23,7 +23,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import React from 'react'; +import { forwardRef } from 'react'; + import { Link, NavLink } from 'react-router-dom'; let hashFragment = ''; @@ -44,8 +45,8 @@ function isInteractiveElement(element) { const formTags = ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA']; const linkTags = ['A', 'AREA']; return ( - (formTags.includes(element.tagName) && !element.hasAttribute('disabled')) - || (linkTags.includes(element.tagName) && element.hasAttribute('href')) + (formTags.includes(element.tagName) && !element.hasAttribute('disabled')) || + (linkTags.includes(element.tagName) && element.hasAttribute('href')) ); } @@ -113,46 +114,42 @@ function hashLinkScroll(timeout) { } export function genericHashLink(As) { - return React.forwardRef((props, ref) => { + return forwardRef((props, ref) => { let linkHash = ''; if (typeof props.to === 'string' && props.to.includes('#')) { linkHash = `#${props.to.split('#').slice(1).join('#')}`; - } else if ( - typeof props.to === 'object' - && typeof props.to.hash === 'string' - ) { + } else if (typeof props.to === 'object' && typeof props.to.hash === 'string') { linkHash = props.to.hash; } const passDownProps = {}; if (As === NavLink) { - passDownProps.isActive = (match, location) => match && match.isExact && location.hash === linkHash; + passDownProps.isActive = (match, location) => + match && match.isExact && location.hash === linkHash; } - function handleClick(e) { + const handleClick = (e) => { reset(); hashFragment = props.elementId ? `#${props.elementId}` : linkHash; if (props.onClick) props.onClick(e); if ( - hashFragment !== '' + hashFragment !== '' && // ignore non-vanilla click events, same as react-router // below logic adapted from react-router: https://github.com/ReactTraining/react-router/blob/fc91700e08df8147bd2bb1be19a299cbb14dbcaa/packages/react-router-dom/modules/Link.js#L43-L48 - && !e.defaultPrevented // onClick prevented default - && e.button === 0 // ignore everything but left clicks - && (!props.target || props.target === '_self') // let browser handle "target=_blank" etc - && !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) // ignore clicks with modifier keys + !e.defaultPrevented && // onClick prevented default + e.button === 0 && // ignore everything but left clicks + (!props.target || props.target === '_self') && // let browser handle "target=_blank" etc + !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) // ignore clicks with modifier keys ) { - scrollFunction = props.scroll + scrollFunction = + props.scroll || // eslint-disable-next-line no-confusing-arrow - || ((el) => props.smooth - ? el.scrollIntoView({ behavior: 'smooth' }) - : el.scrollIntoView()); + ((el) => + props.smooth ? el.scrollIntoView({ behavior: 'smooth' }) : el.scrollIntoView()); hashLinkScroll(props.timeout); } - } - const { - scroll, smooth, timeout, elementId, ...filteredProps - } = props; + }; + const { scroll, smooth, timeout, elementId, ...filteredProps } = props; return ( {props.children} diff --git a/src/components/ui/ImgExpandButton.jsx b/src/components/ui/ImgExpandButton.jsx index 716cc738..d71b443a 100644 --- a/src/components/ui/ImgExpandButton.jsx +++ b/src/components/ui/ImgExpandButton.jsx @@ -1,17 +1,13 @@ /* eslint-disable jsx-a11y/alt-text */ -import React from 'react'; +import { useState } from 'react'; + import ButtonBase from '@material-ui/core/ButtonBase'; function ImgExpandButton({ initialAuto = false, ButtonBaseProps = {}, ...imgProps }) { - const [width, setWidth] = React.useState(initialAuto ? 'auto' : '100%'); + const [width, setWidth] = useState(initialAuto ? 'auto' : '100%'); const onClick = () => setWidth((prevWidth) => (prevWidth === '100%' ? 'auto' : '100%')); return ( - + ); diff --git a/src/components/ui/InitialDisabledTextField.jsx b/src/components/ui/InitialDisabledTextField.jsx index 3e226533..290506fa 100644 --- a/src/components/ui/InitialDisabledTextField.jsx +++ b/src/components/ui/InitialDisabledTextField.jsx @@ -1,13 +1,14 @@ -import React from 'react'; import { TextField } from '../form'; -const InitialDisabledTextField = (props) => ( - -); +function InitialDisabledTextField(props) { + return ( + + ); +} export default InitialDisabledTextField; diff --git a/src/components/ui/ItemIdField.jsx b/src/components/ui/ItemIdField.jsx index 6c4e2fd4..e99840a3 100644 --- a/src/components/ui/ItemIdField.jsx +++ b/src/components/ui/ItemIdField.jsx @@ -1,8 +1,8 @@ -import React from 'react'; -import { Field } from 'redux-form'; +import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; import Delete from '@material-ui/icons/Delete'; -import Grid from '@material-ui/core/Grid'; +import { Field } from 'redux-form'; + import { TextField } from '../form'; import TextButton from './TextButton'; @@ -10,26 +10,11 @@ import TextButton from './TextButton'; export default function ItemIdField({ fields, buttonLabel }) { const addField = () => fields.push(); return ( - + {fields.map((thisField, index) => ( - + - + fields.remove(index)}> diff --git a/src/components/ui/LeftSnackbar.jsx b/src/components/ui/LeftSnackbar.jsx index 1865beaf..c51a8393 100644 --- a/src/components/ui/LeftSnackbar.jsx +++ b/src/components/ui/LeftSnackbar.jsx @@ -1,10 +1,8 @@ -import React from 'react'; -import { connect } from 'react-redux'; - -import Snackbar from '@material-ui/core/Snackbar'; import IconButton from '@material-ui/core/IconButton'; -import CloseIcon from '@material-ui/icons/Close'; +import Snackbar from '@material-ui/core/Snackbar'; import Typography from '@material-ui/core/Typography'; +import CloseIcon from '@material-ui/icons/Close'; +import { connect } from 'react-redux'; import * as actions from '../../actions'; @@ -17,16 +15,15 @@ function LeftSnackbar({ }) { const action = [ actionButton, - + , ]; - const message = {messageContent}; + const message = ( + + {messageContent} + + ); return ( React.forwardRef((itemProps, ref) => ( - - )), + const renderLink = useMemo( + () => + // TODO Fix this nesting issue + // eslint-disable-next-line react/no-unstable-nested-components + forwardRef((itemProps, ref) => ), [to, exact], ); return (
  • - + {icon && avatarText !== undefined ? ( {avatarText} diff --git a/src/components/ui/LoadingProgress.jsx b/src/components/ui/LoadingProgress.jsx index 911aa2ff..03722ecb 100644 --- a/src/components/ui/LoadingProgress.jsx +++ b/src/components/ui/LoadingProgress.jsx @@ -1,7 +1,8 @@ -import React from 'react'; -import LinearProgress from '@material-ui/core/LinearProgress'; +import { PureComponent } from 'react'; +import LinearProgress from '@material-ui/core/LinearProgress'; import { withStyles } from '@material-ui/core/styles'; + import { utils as api } from '@vidispine/vdt-api'; const styles = ({ palette }) => ({ @@ -13,7 +14,7 @@ const styles = ({ palette }) => ({ }, }); -class LoadingProgress extends React.PureComponent { +class LoadingProgress extends PureComponent { constructor(props) { super(props); this.onShow = this.onShow.bind(this); diff --git a/src/components/ui/MatrixFieldArray.jsx b/src/components/ui/MatrixFieldArray.jsx index e40bd375..f20bb176 100644 --- a/src/components/ui/MatrixFieldArray.jsx +++ b/src/components/ui/MatrixFieldArray.jsx @@ -1,26 +1,19 @@ -import React from 'react'; import { FormSection, FieldArray } from 'redux-form'; import withErrorBoundary from '../../hoc/withErrorBoundary'; -const MatrixFieldComponent = ({ - fieldList, - fields, -}) => fieldList.map((thisField, index) => ( - -)); +const MatrixFieldComponent = ({ fieldList, fields }) => + fieldList.map((thisField, index) => ( + + )); -const MatrixFieldArray = ({ component, ...props }) => ( - -); +function MatrixFieldArray({ component, ...props }) { + return ; +} export default withErrorBoundary(MatrixFieldArray); diff --git a/src/components/ui/Menu.jsx b/src/components/ui/Menu.jsx index ea550316..ed258f80 100644 --- a/src/components/ui/Menu.jsx +++ b/src/components/ui/Menu.jsx @@ -1,11 +1,12 @@ -import React from 'react'; +import { Children, isValidElement, cloneElement, PureComponent } from 'react'; + import IconButton from '@material-ui/core/IconButton'; -import MoreVertIcon from '@material-ui/icons/MoreVert'; import MUIMenu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; +import MoreVertIcon from '@material-ui/icons/MoreVert'; export { MenuItem }; -export default class Menu extends React.PureComponent { +export default class Menu extends PureComponent { constructor(props) { super(props); this.openMenu = this.openMenu.bind(this); @@ -25,15 +26,19 @@ export default class Menu extends React.PureComponent { } renderChildren() { - return React.Children.map(this.props.children, (child) => { - if (React.isValidElement(child)) { - return React.cloneElement(child, { + const { children } = this.props; + return Children.map(children, (child) => { + if (isValidElement(child)) { + return cloneElement(child, { onClick: (...args) => { - if (child.props.onClick) { child.props.onClick(...args); } + if (child.props.onClick) { + child.props.onClick(...args); + } this.closeMenu(); }, }); - } return child; + } + return child; }); } @@ -41,25 +46,21 @@ export default class Menu extends React.PureComponent { const { menuAnchor } = this.state; const { icon, children = [], iconProps = {} } = this.props; const wrappedChildren = this.renderChildren(children); - return ( + return wrappedChildren.length === 0 ? ( +
    + ) : ( <> - { wrappedChildren.length === 0 - ?
    - : ( - <> - - {icon || } - - - { wrappedChildren } - - - )} + + {icon || } + + + {wrappedChildren} + ); } diff --git a/src/components/ui/NavSelect.jsx b/src/components/ui/NavSelect.jsx index e8af2d9b..0155028c 100644 --- a/src/components/ui/NavSelect.jsx +++ b/src/components/ui/NavSelect.jsx @@ -1,41 +1,70 @@ -import React from 'react'; -import { Link, useHistory } from 'react-router-dom'; -import { components as SelectComponents } from 'react-select'; +import { useRef, useCallback } from 'react'; + import { makeStyles } from '@material-ui/core/styles'; -import OpenInNewIcon from '@material-ui/icons/OpenInNew'; import Tooltip from '@material-ui/core/Tooltip'; +import OpenInNewIcon from '@material-ui/icons/OpenInNew'; +import { Link, useHistory } from 'react-router-dom'; +import { components as SelectComponents } from 'react-select'; import routes from '../../const/routes'; -import { WrappedSelectCreatable } from './Select'; import { optionListToScore } from '../../utils/similar'; +import { WrappedSelectCreatable } from './Select'; + const goToOptions = [ { - value: (entityId) => `/item/${entityId}`, label: 'Item', synonyms: ['item'], siteId: true, + value: (entityId) => `/item/${entityId}`, + label: 'Item', + synonyms: ['item'], + siteId: true, }, { - value: (entityId) => `/collection/${entityId}`, label: 'Collection', synonyms: ['collection'], siteId: true, + value: (entityId) => `/collection/${entityId}`, + label: 'Collection', + synonyms: ['collection'], + siteId: true, }, { - value: (entityId) => `/storage/${entityId}`, label: 'Storage', synonyms: ['storage'], siteId: true, + value: (entityId) => `/storage/${entityId}`, + label: 'Storage', + synonyms: ['storage'], + siteId: true, }, { - value: (entityId) => `/file/${entityId}`, label: 'File', synonyms: ['file'], siteId: true, + value: (entityId) => `/file/${entityId}`, + label: 'File', + synonyms: ['file'], + siteId: true, }, { - value: (entityId) => `/user/${entityId}`, label: 'User', synonyms: ['user'], siteId: false, + value: (entityId) => `/user/${entityId}`, + label: 'User', + synonyms: ['user'], + siteId: false, }, { - value: (entityId) => `/group/${entityId}`, label: 'Group', synonyms: ['group'], siteId: false, + value: (entityId) => `/group/${entityId}`, + label: 'Group', + synonyms: ['group'], + siteId: false, }, { - value: (entityId) => `/metadata-field/${entityId}`, label: 'Metadata Field', synonyms: ['metadata', 'field', 'md'], siteId: false, + value: (entityId) => `/metadata-field/${entityId}`, + label: 'Metadata Field', + synonyms: ['metadata', 'field', 'md'], + siteId: false, }, { - value: (entityId) => `/field-group/${entityId}`, label: 'Field Group', synonyms: ['fieldgroup', 'fg'], siteId: false, + value: (entityId) => `/field-group/${entityId}`, + label: 'Field Group', + synonyms: ['fieldgroup', 'fg'], + siteId: false, }, { - value: (entityId) => `/job/${entityId}`, label: 'Job', synonyms: ['job'], siteId: true, + value: (entityId) => `/job/${entityId}`, + label: 'Job', + synonyms: ['job'], + siteId: true, }, ]; @@ -152,10 +181,11 @@ const useOptionStyles = makeStyles({ }, }); -const Option = (props) => { +function Option(props) { const classes = useOptionStyles(); - const { value, __isNew__: isNew, label } = props.data || {}; - const { fuzzyRef } = props.selectProps; + const { data, selectProps } = props; + const { value, __isNew__: isNew, label } = data || {}; + const { fuzzyRef } = selectProps; let to = value; if (isNew === true && fuzzyRef?.current?.value) { const { entityId, value: fuzzyValue } = fuzzyRef.current; @@ -166,19 +196,11 @@ const Option = (props) => { return (
    - + {label} - + @@ -187,12 +209,12 @@ const Option = (props) => { ); } return SelectComponents.Option(props); -}; +} export default function NavSelect({ onChange: propsOnChange, ...props }) { const history = useHistory(); - const fuzzyRef = React.useRef(); - const isValidNewOption = React.useCallback((inputValue) => { + const fuzzyRef = useRef(); + const isValidNewOption = useCallback((inputValue) => { try { const scoreList = optionListToScore(inputValue, goToOptions, 0.5); const closestOption = scoreList?.[0]?.option; @@ -206,7 +228,7 @@ export default function NavSelect({ onChange: propsOnChange, ...props }) { return false; } }, []); - const formatCreateLabel = React.useCallback(((inputValue) => { + const formatCreateLabel = useCallback((inputValue) => { const label = fuzzyRef?.current?.label; if (label) { let [, ...entityId] = inputValue.split(' '); @@ -221,20 +243,23 @@ export default function NavSelect({ onChange: propsOnChange, ...props }) { } } return 'Keep typing....'; - }), []); + }, []); - const onCreateOption = React.useCallback(() => { + const onCreateOption = useCallback(() => { if (fuzzyRef?.current?.entityId && fuzzyRef?.current?.value) { const { entityId, value } = fuzzyRef.current; if (typeof value === 'function') history.push(value(entityId)); else history.push(value); } fuzzyRef.current = undefined; - }, []); - const onChange = React.useCallback((e) => { - if (propsOnChange) propsOnChange(e); - history.push(e.value); - }, [history, propsOnChange]); + }, [history]); + const onChange = useCallback( + (e) => { + if (propsOnChange) propsOnChange(e); + history.push(e.value); + }, + [history, propsOnChange], + ); return ( ( - - - +function PlaceholderThumbnail() { + return ( + + + + - -); + ); +} export default PlaceholderThumbnail; diff --git a/src/components/ui/RequestToCurl.jsx b/src/components/ui/RequestToCurl.jsx index 7e95de5c..5dd68eed 100644 --- a/src/components/ui/RequestToCurl.jsx +++ b/src/components/ui/RequestToCurl.jsx @@ -1,20 +1,20 @@ -import React from 'react'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import Button from '@material-ui/core/Button'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import TextGrid from './TextGrid'; -const escapeBash = (str) => String(str).replaceAll('\'', '\'\\\'\''); +const escapeBash = (str) => String(str).replaceAll("'", "'\\''"); -const requestToCurl = ({ - method, fullUrl, requestHeaders, requestData, requestContentType, -}) => { +const requestToCurl = ({ method, fullUrl, requestHeaders, requestData, requestContentType }) => { const output = []; output.push(`curl '${escapeBash(fullUrl)}'`); output.push(`--request ${method}`); - Object.entries(requestHeaders).forEach(([key, value]) => output.push(`--header '${escapeBash(`${key}: ${value}`)}'`)); + Object.entries(requestHeaders).forEach(([key, value]) => + output.push(`--header '${escapeBash(`${key}: ${value}`)}'`), + ); if (requestData) { - if (requestContentType === 'application/json') output.push(`--data-raw '${escapeBash(JSON.stringify(requestData))}'`); + if (requestContentType === 'application/json') + output.push(`--data-raw '${escapeBash(JSON.stringify(requestData))}'`); else output.push(`--data-raw '${escapeBash(requestData)}'`); } return output.join(' \\\n'); @@ -25,17 +25,9 @@ function RequestToCurl({ request, onClick: propsOnClick, label }) { const onClick = propsOnClick ? () => propsOnClick(value) : undefined; return ( <> - + {onClick && label ? ( - ) : null} diff --git a/src/components/ui/RequestToJavascript.jsx b/src/components/ui/RequestToJavascript.jsx index f1f1f1b5..86c95630 100644 --- a/src/components/ui/RequestToJavascript.jsx +++ b/src/components/ui/RequestToJavascript.jsx @@ -1,6 +1,5 @@ -import React from 'react'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import Button from '@material-ui/core/Button'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import stringifyObject from 'stringify-object'; import TextGrid from './TextGrid'; @@ -8,7 +7,11 @@ import TextGrid from './TextGrid'; const STANDARD_HEADERS = ['accept', 'content-type', 'authorization']; const requestToJavascriptApi = ({ - method, fullUrl, requestHeaders, requestData, requestContentType, + method, + fullUrl, + requestHeaders, + requestData, + requestContentType, }) => { const output = []; let requestBody; @@ -28,7 +31,9 @@ const requestToJavascriptApi = ({ queryParams.forEach(([key, value]) => output.push(`queryParam('${key}', '${value}')`)); const isJson = requestContentType && requestContentType.toLowerCase() === 'application/json'; if (requestData !== undefined) { - const requestString = isJson ? stringifyObject(requestData, { indent: ' ' }) : `\`${requestData}\``; + const requestString = isJson + ? stringifyObject(requestData, { indent: ' ' }) + : `\`${requestData}\``; requestBody = `const requestBody = ${requestString};`; output.push('input(requestBody)'); if (!isJson) output.push(`dataType('${requestContentType}')`); @@ -55,11 +60,7 @@ function RequestToJavascript({ request, onClick: propsOnClick, label = 'Go To Ja codeProps={{ lineNumbers: false, mode: 'javascript' }} /> {onClick && label ? ( - ) : null} diff --git a/src/components/ui/Select.jsx b/src/components/ui/Select.jsx index a9c26fc9..60c8f657 100644 --- a/src/components/ui/Select.jsx +++ b/src/components/ui/Select.jsx @@ -1,22 +1,21 @@ -import React from 'react'; -import AsyncCreatableSelect from 'react-select/async-creatable'; -import CreatableSelect from 'react-select/creatable'; -import Async from 'react-select/async'; -import Select, { components as SelectComponents } from 'react-select'; -import { change } from 'redux-form'; -import { useTheme, withTheme, alpha } from '@material-ui/core/styles'; +import { useMemo, useCallback, Component } from 'react'; + import InputLabel from '@material-ui/core/InputLabel'; +import { useTheme, withTheme, alpha } from '@material-ui/core/styles'; +import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'; import CancelIcon from '@material-ui/icons/Cancel'; import ClearIcon from '@material-ui/icons/Clear'; -import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'; +import Select, { components as SelectComponents } from 'react-select'; +import Async from 'react-select/async'; +import AsyncCreatableSelect from 'react-select/async-creatable'; +import CreatableSelect from 'react-select/creatable'; +import { change } from 'redux-form'; const stylesOverride = { container: (base, state) => ({ ...base, fontSize: state?.selectProps?.typography?.htmlFontSize, - color: state.isDisabled - ? state.selectProps.palette.text.disabled - : 'inherit', + color: state.isDisabled ? state.selectProps.palette.text.disabled : 'inherit', }), valueContainer: (base) => ({ ...base, @@ -26,18 +25,13 @@ const stylesOverride = { ...base, backgroundColor: state.selectProps.palette.selected, borderRadius: '0', - borderWidth: - state.selectProps.variant === 'outlined' - ? '1px 1px 1px 1px' - : '0 0 1px 0', + borderWidth: state.selectProps.variant === 'outlined' ? '1px 1px 1px 1px' : '0 0 1px 0', boxShadow: 'none', borderColor: state.selectProps.palette.type === 'light' ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)', - color: state.isDisabled - ? state.selectProps.palette.text.disabled - : 'inherit', + color: state.isDisabled ? state.selectProps.palette.text.disabled : 'inherit', }), dropdownIndicator: (base) => ({ ...base, @@ -54,9 +48,7 @@ const stylesOverride = { }), input: (base, state) => ({ ...base, - color: state.isDisabled - ? state.selectProps.palette.text.disabled - : 'inherit', + color: state.isDisabled ? state.selectProps.palette.text.disabled : 'inherit', visibility: state.isDisabled ? 'visible' : undefined, }), menu: (base, state) => ({ @@ -135,44 +127,41 @@ const stylesOverride = { }, }; -const MultiValueRemove = (props) => ( - - - -); +function MultiValueRemove(props) { + return ( + + + + ); +} -const ClearIndicator = (props) => ( - - - -); -const DropdownIndicator = (props) => ( - - - -); +function ClearIndicator(props) { + return ( + + + + ); +} +function DropdownIndicator(props) { + return ( + + + + ); +} -export default function WrappedAsyncSelect({ - input, - meta, - components = {}, - ...props -}) { +export default function WrappedAsyncSelect({ input, meta, components = {}, ...props }) { const { palette, typography } = useTheme(); const { value } = input; - const { - optionLabelKey = 'label', - optionValueKey = 'value', - creatable = true, - } = props; - const AsyncSelect = React.useMemo(() => (creatable ? AsyncCreatableSelect : Async), [creatable]); - const parse = React.useCallback((v) => { + const { optionLabelKey = 'label', optionValueKey = 'value', creatable = true } = props; + const AsyncSelect = useMemo(() => (creatable ? AsyncCreatableSelect : Async), [creatable]); + const parse = useCallback((v) => { if (v) { return v.value; } return undefined; }, []); - const theme = React.useCallback( + const theme = useCallback( (selectTheme) => ({ ...selectTheme, borderRadius: 0, @@ -211,19 +200,17 @@ export default function WrappedAsyncSelect({ ); } -class UnThemedStatefulAsyncSelect extends React.Component { +class UnThemedStatefulAsyncSelect extends Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.handleInputChange = this.handleInputChange.bind(this); this.handleUpdate = this.handleUpdate.bind(this); this.theme = this.theme.bind(this); - const { input: { value } } = this.props; const { - optionLabelKey = 'label', - optionValueKey = 'value', - isMulti, - } = props; + input: { value }, + } = this.props; + const { optionLabelKey = 'label', optionValueKey = 'value', isMulti } = props; let valueOption; let inputValue; if (isMulti && value) { @@ -270,7 +257,8 @@ class UnThemedStatefulAsyncSelect extends React.Component { } this.setState({ valueOption }); onChange(value); - if (dispatch) { // Prefer dispatch as more reliable + if (dispatch) { + // Prefer dispatch as more reliable dispatch(change(form, name, value)); } else { onChange(value); @@ -278,7 +266,8 @@ class UnThemedStatefulAsyncSelect extends React.Component { } handleInputChange(inputValue) { - if (this.props.isMulti) { + const { isMulti } = this.props; + if (isMulti) { if (inputValue.length === 0) { this.setState({ inputValue: undefined }); // errors if set to empty array return; @@ -307,13 +296,7 @@ class UnThemedStatefulAsyncSelect extends React.Component { } render() { - const { - input, - meta, - theme, - components = {}, - ...props - } = this.props; + const { input, meta, theme, components = {}, ...props } = this.props; const { palette, typography } = theme; const { optionLabelKey = 'label', @@ -330,7 +313,7 @@ class UnThemedStatefulAsyncSelect extends React.Component { const { valueOption, inputValue } = this.state; let isDisabled = isDisabledProp; if (disableInitial) { - isDisabled = (meta.initial !== undefined && meta.initial !== ''); + isDisabled = meta.initial !== undefined && meta.initial !== ''; } let ThisSelect = Select; if (loadOptions) { @@ -375,14 +358,9 @@ class UnThemedStatefulAsyncSelect extends React.Component { export const StatefulAsyncSelect = withTheme(UnThemedStatefulAsyncSelect); -export function WrappedSelect({ - input, - meta, - components = {}, - ...props -}) { +export function WrappedSelect({ input, meta, components = {}, ...props }) { const { palette, typography } = useTheme(); - const theme = React.useCallback( + const theme = useCallback( (selectTheme) => ({ ...selectTheme, borderRadius: 0, @@ -417,14 +395,9 @@ export function WrappedSelect({ ); } -export function WrappedSelectCreatable({ - input, - meta, - components = {}, - ...props -}) { +export function WrappedSelectCreatable({ input, meta, components = {}, ...props }) { const { palette, typography } = useTheme(); - const theme = React.useCallback( + const theme = useCallback( (selectTheme) => ({ ...selectTheme, borderRadius: 0, diff --git a/src/components/ui/SimpleMetadataCard.jsx b/src/components/ui/SimpleMetadataCard.jsx index 1158b7d9..f759a349 100644 --- a/src/components/ui/SimpleMetadataCard.jsx +++ b/src/components/ui/SimpleMetadataCard.jsx @@ -1,8 +1,7 @@ -import React from 'react'; import { withStyles } from '@material-ui/core/styles'; -import SquareCard from './SquareCard'; import SimpleMetadataEditor from './SimpleMetadataEditor'; +import SquareCard from './SquareCard'; const styles = (theme) => ({ root: { @@ -16,9 +15,7 @@ const styles = (theme) => ({ function SimpleMetadataCard({ classes, ...props }) { return ( - + ); } diff --git a/src/components/ui/SimpleMetadataDisplay.jsx b/src/components/ui/SimpleMetadataDisplay.jsx index f6b252bc..c19b43e1 100644 --- a/src/components/ui/SimpleMetadataDisplay.jsx +++ b/src/components/ui/SimpleMetadataDisplay.jsx @@ -1,35 +1,31 @@ -import React from 'react'; -import TextGrid from './TextGrid'; import getSimpleMetadataVariant from '../../utils/getSimpleMetadataVariant'; +import TextGrid from './TextGrid'; + export default function SimpleMetadataDisplay({ simpleMetadataList = [] }) { - return ( - simpleMetadataList.map((simpleMetadata) => ( - - )) - ); + return simpleMetadataList.map((simpleMetadata) => ( + + )); } export const SimpleMetadataType = ({ simpleMetadata }) => { const { field: fieldList = [] } = simpleMetadata; - return ( - fieldList.map((field) => ( - - )) - ); + return fieldList.map((field) => ( + + )); }; diff --git a/src/components/ui/SimpleMetadataEditor.jsx b/src/components/ui/SimpleMetadataEditor.jsx index 4ef5d15c..7f57546a 100644 --- a/src/components/ui/SimpleMetadataEditor.jsx +++ b/src/components/ui/SimpleMetadataEditor.jsx @@ -1,21 +1,23 @@ -import React from 'react'; -import Grid from '@material-ui/core/Grid'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import Switch from '@material-ui/core/Switch'; +import { PureComponent } from 'react'; + +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import CardHeader from '@material-ui/core/CardHeader'; import CardContent from '@material-ui/core/CardContent'; -import { connect } from 'react-redux'; -import { submit } from 'redux-form'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import CardHeader from '@material-ui/core/CardHeader'; import Divider from '@material-ui/core/Divider'; -import Typography from '@material-ui/core/Typography'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Grid from '@material-ui/core/Grid'; import { withStyles } from '@material-ui/core/styles'; +import Switch from '@material-ui/core/Switch'; +import Typography from '@material-ui/core/Typography'; +import { connect } from 'react-redux'; +import { submit } from 'redux-form'; -import SimpleMetadataForm from './SimpleMetadataForm'; -import SimpleMetadataDisplay from './SimpleMetadataDisplay'; import * as formActions from '../../formactions/metadata'; +import SimpleMetadataDisplay from './SimpleMetadataDisplay'; +import SimpleMetadataForm from './SimpleMetadataForm'; + const EDIT_SIMPLE_METADATA_FORM = 'EDIT_SIMPLE_METADATA_FORM'; const styles = () => ({ @@ -28,7 +30,7 @@ const styles = () => ({ CardHeaderTypography: {}, }); -class SimpleMetadataEditor extends React.PureComponent { +class SimpleMetadataEditor extends PureComponent { constructor(props) { super(props); this.toggleEdit = this.toggleEdit.bind(this); @@ -54,9 +56,7 @@ class SimpleMetadataEditor extends React.PureComponent { CardHeaderProps = {}, classes, } = this.props; - const { - isEditing, - } = this.state; + const { isEditing } = this.state; let { simpleMetadataList } = this.props; let initialValues = { simpleMetadataDocument: { @@ -70,13 +70,15 @@ class SimpleMetadataEditor extends React.PureComponent { const onSubmitSuccess = (response, dispatch, props) => { formActions.onUpdateSimpleMetadataSubmitSuccess(response, dispatch, props); this.toggleEdit(); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; return ( <> {title} - )} + } disableTypography action={ entityId !== undefined ? ( diff --git a/src/components/ui/SimpleMetadataField.jsx b/src/components/ui/SimpleMetadataField.jsx index 8e39e156..9941ae47 100644 --- a/src/components/ui/SimpleMetadataField.jsx +++ b/src/components/ui/SimpleMetadataField.jsx @@ -1,43 +1,29 @@ -import React from 'react'; -import { Field, FieldArray } from 'redux-form'; -import IconButton from '@material-ui/core/IconButton'; -import Delete from '@material-ui/icons/Delete'; import Grid from '@material-ui/core/Grid'; +import IconButton from '@material-ui/core/IconButton'; import InputLabel from '@material-ui/core/InputLabel'; import ArrowBack from '@material-ui/icons/ArrowBack'; +import Delete from '@material-ui/icons/Delete'; +import { Field, FieldArray } from 'redux-form'; + import { TextField } from '../form'; import TextButton from './TextButton'; -export function SimpleMetadataFieldRemove({ - fields, - onRestore, -}) { +export function SimpleMetadataFieldRemove({ fields, onRestore }) { const removeField = (index) => { const thisField = fields.get(index); - if (onRestore) { onRestore(thisField, index); } + if (onRestore) { + onRestore(thisField, index); + } fields.remove(index); }; return ( <> - {fields.length > 0 - && Removed} + {fields.length > 0 && Removed} {fields.map((thisField, index) => ( - + - + @@ -61,36 +47,33 @@ export function SimpleMetadataFieldRemove({ ); } -const InitialTextField = (p) => ( - -); +function InitialTextField(p) { + return ( + + ); +} -export function SimpleMetadataFieldArray({ - fields, - buttonLabel, - label, - onAdd, - onRemove, -}) { +export function SimpleMetadataFieldArray({ fields, buttonLabel, label, onAdd, onRemove }) { const addField = () => { fields.push(); - if (onAdd) { onAdd(); } + if (onAdd) { + onAdd(); + } }; const removeField = (index) => { const thisField = fields.get(index); - if (onRemove) { onRemove(thisField, index); } + if (onRemove) { + onRemove(thisField, index); + } fields.remove(index); }; return ( - + {label} {fields.map((thisField, index) => ( - + - + @@ -135,11 +108,8 @@ export function SimpleMetadataFieldArray({ ); } -export const SimpleMetadataTypeForm = () => ( - -); +export function SimpleMetadataTypeForm() { + return ; +} export default SimpleMetadataFieldArray; diff --git a/src/components/ui/SimpleMetadataForm.jsx b/src/components/ui/SimpleMetadataForm.jsx index 68a25477..0707de0c 100644 --- a/src/components/ui/SimpleMetadataForm.jsx +++ b/src/components/ui/SimpleMetadataForm.jsx @@ -1,24 +1,13 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm, FieldArray, FormSection } from 'redux-form'; import { SimpleMetadataFieldArray, SimpleMetadataFieldRemove } from './SimpleMetadataField'; -export const SimpleMetadataType = (props) => ( - -); +export function SimpleMetadataType(props) { + return ; +} -function SimpleMetadataForm({ - error, - handleSubmit, - onAdd, - array, - initialValues, -}) { +function SimpleMetadataForm({ error, handleSubmit, onAdd, array, initialValues }) { const onRemove = (value) => { if (value) { const { simpleMetadataDocument = {} } = initialValues; @@ -30,7 +19,9 @@ function SimpleMetadataForm({ } }; const onRestore = (value) => { - if (value) { array.push('simpleMetadataDocument.field', value); } + if (value) { + array.push('simpleMetadataDocument.field', value); + } }; return (
    @@ -41,11 +32,7 @@ function SimpleMetadataForm({ onAdd={onAdd} onRemove={onRemove} /> - + -); +function TextButton({ classes, children, ...props }) { + return ( + + ); +} export default withStyles(styles)(TextButton); diff --git a/src/components/ui/TextGrid.jsx b/src/components/ui/TextGrid.jsx index 5bc6ba57..27917c72 100644 --- a/src/components/ui/TextGrid.jsx +++ b/src/components/ui/TextGrid.jsx @@ -1,19 +1,21 @@ -import React from 'react'; +import { useRef, useState, useCallback, useEffect } from 'react'; + import Grid from '@material-ui/core/Grid'; -import Typography from '@material-ui/core/Typography'; -import { withStyles } from '@material-ui/core/styles'; -import startCase from 'lodash.startcase'; -import clsx from 'clsx'; -import EditIcon from '@material-ui/icons/Edit'; -import CheckIcon from '@material-ui/icons/Check'; -import CancelIcon from '@material-ui/icons/CancelOutlined'; import IconButton from '@material-ui/core/IconButton'; +import { withStyles } from '@material-ui/core/styles'; import Tooltip from '@material-ui/core/Tooltip'; +import Typography from '@material-ui/core/Typography'; +import CancelIcon from '@material-ui/icons/CancelOutlined'; +import CheckIcon from '@material-ui/icons/Check'; +import EditIcon from '@material-ui/icons/Edit'; +import clsx from 'clsx'; +import startCase from 'lodash.startcase'; import withErrorBoundary from '../../hoc/withErrorBoundary'; -import TextGridValue from './TextGridValue'; -import TextGridCode from './TextGridCode'; + import TextGridBoolean from './TextGridBoolean'; +import TextGridCode from './TextGridCode'; +import TextGridValue from './TextGridValue'; const styles = (theme) => ({ onHover: { @@ -77,29 +79,27 @@ function TextGrid({ to, onEdit, }) { - const inputRef = React.useRef(); - const [isEdit, setIsEdit] = React.useState(false); - const [hasError, setHasError] = React.useState(false); - const onEditCallback = React.useCallback( - async () => { - if (!onEdit || !inputRef) return; - const newValue = inputRef.current.value; - try { - await onEdit(newValue, value); - setHasError(false); - setIsEdit(false); - } catch (error) { - setHasError(true); - } - }, - [onEdit, value], - ); + const inputRef = useRef(); + const [isEdit, setIsEdit] = useState(false); + const [hasError, setHasError] = useState(false); + const onEditCallback = useCallback(async () => { + if (!onEdit || !inputRef) return; + const newValue = inputRef.current.value; + try { + await onEdit(newValue, value); + setHasError(false); + setIsEdit(false); + } catch (error) { + setHasError(true); + } + }, [onEdit, value]); const onToggleEdit = () => setIsEdit((prevValue) => !prevValue); const onCloseEdit = () => { setIsEdit(false); setHasError(false); }; - React.useEffect(() => { // set input focus when toggling edit + useEffect(() => { + // set input focus when toggling edit if (isEdit && inputRef) { inputRef.current.focus(); } @@ -112,7 +112,7 @@ function TextGrid({ const onTextClick = disableOnClick ? (event) => event.stopPropagation() : onClick; - const [isValueHidden, setIsValueHidden] = React.useState(initialHideValue); + const [isValueHidden, setIsValueHidden] = useState(initialHideValue); const toggleHideValue = () => setIsValueHidden((prevState) => !prevState); if (hideNoValue) { @@ -158,21 +158,8 @@ function TextGrid({ ); default: return ( - - + + - + { +function TextGridArray({ value, title, arrayKey, ...props }) { if (props.hideNoValue && value === undefined) { return null; } @@ -22,6 +20,6 @@ const TextGridArray = ({ {...props} /> )); -}; +} export default withErrorBoundary(TextGridArray); diff --git a/src/components/ui/TextGridBoolean.jsx b/src/components/ui/TextGridBoolean.jsx index 7d3a8f27..c5919a05 100644 --- a/src/components/ui/TextGridBoolean.jsx +++ b/src/components/ui/TextGridBoolean.jsx @@ -1,9 +1,8 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import startCase from 'lodash.startcase'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; const styles = (theme) => ({ FormControlLabel: { @@ -11,29 +10,23 @@ const styles = (theme) => ({ }, }); -function TextGridBoolean({ - className, - title, - value, - classes, - titleStartCase = true, -}) { +function TextGridBoolean({ className, title, value, classes, titleStartCase = true }) { return (
    - )} - label={( + } + label={ {titleStartCase ? startCase(title) : title} - )} + } />
    ); diff --git a/src/components/ui/TextGridCode.jsx b/src/components/ui/TextGridCode.jsx index cc44ad86..a326e6e1 100644 --- a/src/components/ui/TextGridCode.jsx +++ b/src/components/ui/TextGridCode.jsx @@ -1,13 +1,13 @@ -import React from 'react'; +import Button from '@material-ui/core/Button'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; -import Button from '@material-ui/core/Button'; import startCase from 'lodash.startcase'; -import CodeMirror from './CodeMirror'; -import formatXML from '../../utils/formatXML'; -import formatJSON from '../../utils/formatJSON'; import withErrorBoundary from '../../hoc/withErrorBoundary'; +import formatJSON from '../../utils/formatJSON'; +import formatXML from '../../utils/formatXML'; + +import CodeMirror from './CodeMirror'; function TextGridCode({ title, @@ -60,9 +60,7 @@ function TextGridCode({
    {hideCode === true && ( )}
    diff --git a/src/components/ui/TextGridValue.jsx b/src/components/ui/TextGridValue.jsx index 37d86741..cde556f9 100644 --- a/src/components/ui/TextGridValue.jsx +++ b/src/components/ui/TextGridValue.jsx @@ -1,16 +1,16 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import Chip from '@material-ui/core/Chip'; import Checkbox from '@material-ui/core/Checkbox'; -import moment from 'moment'; -import { withStyles } from '@material-ui/core/styles'; +import Chip from '@material-ui/core/Chip'; import Input from '@material-ui/core/Input'; +import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import clsx from 'clsx'; +import moment from 'moment'; -import { bitRateToSize, freqToSize } from '../../utils/bitsToSize'; import { capitalizeString, bytesToSize, fromNow } from '../../utils'; -import UnstyledLink from './UnstyledLink'; +import { bitRateToSize, freqToSize } from '../../utils/bitsToSize'; + import UnstyledHashLink from './UnstyledHashLink'; +import UnstyledLink from './UnstyledLink'; const styles = (theme) => ({ overflowWrapAnywhere: { overflowWrap: 'anywhere' }, @@ -21,17 +21,9 @@ const styles = (theme) => ({ }, }); -const StyledTypography = ({ - color = 'textPrimary', - variant = 'subtitle2', - ...props -}) => ( - -); +function StyledTypography({ color = 'textPrimary', variant = 'subtitle2', ...props }) { + return ; +} function TextGridValue({ value, @@ -77,21 +69,13 @@ function TextGridValue({ if (typeof value === 'object' && value.started !== undefined) { const startMoment = moment(value.started); const finishedMoment = moment(value.finished); - const durationMoment = moment.duration( - finishedMoment.diff(startMoment), - ); + const durationMoment = moment.duration(finishedMoment.diff(startMoment)); const durationHuman = durationMoment.humanize(); - valueComponent = ( - - {durationHuman} - - ); + valueComponent = {durationHuman}; } break; case 'metadataFieldValue': - valueComponent = ( - {value.value} - ); + valueComponent = {value.value}; editComponent = (
    e.currentTarget.setSelectionRange( - e.currentTarget.value.length, - e.currentTarget.value.length, - )} + onFocus={(e) => + e.currentTarget.setSelectionRange( + e.currentTarget.value.length, + e.currentTarget.value.length, + ) + } />
    ); break; case 'fromnow': - valueComponent = ( - - {fromNow(value)} - - ); + valueComponent = {fromNow(value)}; break; case 'timestring': valueComponent = ( @@ -125,9 +107,7 @@ function TextGridValue({ ); break; case 'timestamp': - valueComponent = ( - {value} - ); + valueComponent = {value}; break; case 'seconds': valueComponent = ( @@ -174,60 +154,38 @@ function TextGridValue({ break; case 'fps': if (typeof value === 'object' && value.denominator !== undefined) { - const videoSamplerate = +(value.denominator / value.numerator).toFixed( - 2, - ); + const videoSamplerate = +(value.denominator / value.numerator).toFixed(2); valueComponent = ( - - {`${videoSamplerate} fps`} - + {`${videoSamplerate} fps`} ); } break; case 'fps-reverse': if (typeof value === 'object' && value.denominator !== undefined) { - const videoSamplerate = +(value.numerator / value.denominator).toFixed( - 2, - ); + const videoSamplerate = +(value.numerator / value.denominator).toFixed(2); valueComponent = ( - - {`${videoSamplerate} fps`} - + {`${videoSamplerate} fps`} ); } break; case 'bitrate': valueComponent = ( - - {bitRateToSize(value)} - + {bitRateToSize(value)} ); break; case 'percent': valueComponent = ( - - {`${ - parseInt(value, 10) || 0 - }%`} - + {`${parseInt(value, 10) || 0}%`} ); break; case 'frequency': valueComponent = ( - - {freqToSize(value)} - + {freqToSize(value)} ); break; case 'bytes': valueComponent = ( - - {bytesToSize(value)} - + {bytesToSize(value)} ); break; case 'link': @@ -278,9 +236,7 @@ function TextGridValue({ if (variantProps?.itemId) { valueComponent = ( - - {value} - + {value} ); } @@ -338,7 +294,7 @@ function TextGridValue({ break; case 'fileIdList': valueComponent = value.split(',').map((label) => ( - + {label} )); @@ -353,9 +309,7 @@ function TextGridValue({ case 'jobtype': valueComponent = ( - - {value} - + {value} ); break; @@ -381,10 +335,7 @@ function TextGridValue({ break; case 'commaseparatedlist': valueComponent = value.split(',').map((label) => ( - + {capitalize ? capitalizeString(label) : label.toString()} )); diff --git a/src/components/ui/Theme.jsx b/src/components/ui/Theme.jsx index 2b51301e..27a5be59 100644 --- a/src/components/ui/Theme.jsx +++ b/src/components/ui/Theme.jsx @@ -1,8 +1,10 @@ -import React from 'react'; +import { createContext, useReducer, useEffect, useMemo, useContext, useCallback } from 'react'; + import CssBaseline from '@material-ui/core/CssBaseline'; import { MuiThemeProvider, createTheme } from '@material-ui/core/styles'; import useMediaQuery from '@material-ui/core/useMediaQuery'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; + import getCookie from '../../utils/getCookie'; import '@fontsource/open-sans'; @@ -11,7 +13,7 @@ import '@fontsource/open-sans/600.css'; import '@fontsource/open-sans/700.css'; import '@fontsource/open-sans/800.css'; -export const DispatchContext = React.createContext(() => { +export const DispatchContext = createContext(() => { throw new Error('Forgot to wrap component in `ThemeProvider`'); }); @@ -34,7 +36,7 @@ export const fontFamily = [ export default function ThemeProvider({ children }) { const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); const preferredMode = prefersDarkMode ? 'dark' : 'light'; - const [themeOptions, dispatch] = React.useReducer((state, action) => { + const [themeOptions, dispatch] = useReducer((state, action) => { switch (action.type) { case 'CHANGE': return { @@ -46,136 +48,129 @@ export default function ThemeProvider({ children }) { } }, {}); const { paletteType = preferredMode } = themeOptions; - React.useEffect(() => { + useEffect(() => { const nextPaletteType = getCookie('paletteType') || preferredMode; dispatch({ type: 'CHANGE', payload: { paletteType: nextPaletteType }, }); }, [preferredMode]); - const theme = React.useMemo( - () => createTheme({ - overrides: { - MuiAccordion: { - root: { - marginTop: 4, - marginBottom: 4, + const theme = useMemo( + () => + createTheme({ + overrides: { + MuiAccordion: { + root: { + marginTop: 4, + marginBottom: 4, + }, }, - }, - MuiTablePagination: { - root: { overflow: 'visible' }, - }, - MuiButton: { - textSecondary: { - color: red, + MuiTablePagination: { + root: { overflow: 'visible' }, }, - }, - WAMuiChipInput: { - root: { - marginBottom: (props) => (props.helperText ? 20 : undefined), + MuiButton: { + textSecondary: { + color: red, + }, }, - }, - MuiFormHelperText: { - root: { - fontStyle: 'italic', - marginBottom: 8, + WAMuiChipInput: { + root: { + marginBottom: (props) => (props.helperText ? 20 : undefined), + }, + }, + MuiFormHelperText: { + root: { + fontStyle: 'italic', + marginBottom: 8, + }, }, }, - }, - props: { - MuiTextField: { - InputLabelProps: { shrink: true }, - }, - MuiInputLabel: { - shrink: true, - }, - MuiPaper: { - square: true, - elevation: 0, - }, - MuiCard: { - square: true, - elevation: 0, - variant: 'outlined', - }, - MuiTable: { - component: 'div', - }, - MuiTableBody: { - component: 'div', - }, - MuiTableCell: { - component: 'div', - }, - MuiTableFooter: { - component: 'div', - }, - MuiTableHead: { - component: 'div', - }, - MuiTablePagination: { - component: 'div', - }, - MuiTableRow: { - component: 'div', - }, - MuiAccordion: { - square: true, - elevation: 0, - }, - MuiAccordionSummary: { - expandIcon: , - }, - WAMuiChipInput: { - InputLabelProps: { + props: { + MuiTextField: { + InputLabelProps: { shrink: true }, + }, + MuiInputLabel: { shrink: true, }, + MuiPaper: { + square: true, + elevation: 0, + }, + MuiCard: { + square: true, + elevation: 0, + variant: 'outlined', + }, + MuiTable: { + component: 'div', + }, + MuiTableBody: { + component: 'div', + }, + MuiTableCell: { + component: 'div', + }, + MuiTableFooter: { + component: 'div', + }, + MuiTableHead: { + component: 'div', + }, + MuiTablePagination: { + component: 'div', + }, + MuiTableRow: { + component: 'div', + }, + MuiAccordion: { + square: true, + elevation: 0, + }, + MuiAccordionSummary: { + expandIcon: , + }, + WAMuiChipInput: { + InputLabelProps: { + shrink: true, + }, + }, }, - }, - palette: { - type: paletteType, - primary: { - main: vsBlue, - }, - secondary: { - main: vsPurple, - }, - success: { - light: vsTealLight, - main: vsTeal, - }, - error: { - main: red, - }, - background: { - default: { light: 'rgb(246, 248, 250)', dark: 'rgb(9, 12, 16)' }[ - paletteType - ], - paper: { light: 'rgb(255, 255, 255)', dark: 'rgb(13, 17, 23)' }[ - paletteType - ], - }, - text: { + palette: { + type: paletteType, primary: { - light: 'rgba(0, 0, 0, 0.87)', - dark: 'rgb(201, 209, 217)', - }[paletteType], + main: vsBlue, + }, secondary: { - light: 'rgba(0, 0, 0, 0.54)', - dark: 'rgb(139, 148, 158)', - }[paletteType], + main: vsPurple, + }, + success: { + light: vsTealLight, + main: vsTeal, + }, + error: { + main: red, + }, + background: { + default: { light: 'rgb(246, 248, 250)', dark: 'rgb(9, 12, 16)' }[paletteType], + paper: { light: 'rgb(255, 255, 255)', dark: 'rgb(13, 17, 23)' }[paletteType], + }, + text: { + primary: { + light: 'rgba(0, 0, 0, 0.87)', + dark: 'rgb(201, 209, 217)', + }[paletteType], + secondary: { + light: 'rgba(0, 0, 0, 0.54)', + dark: 'rgb(139, 148, 158)', + }[paletteType], + }, + }, + action: { + active: { light: 'rgba(0, 0, 0, 0.54)', dark: 'rgb(201, 209, 217)' }[paletteType], }, - }, - action: { - active: { light: 'rgba(0, 0, 0, 0.54)', dark: 'rgb(201, 209, 217)' }[ - paletteType - ], - }, - divider: { light: 'rgba(0, 0, 0, 0.12)', dark: 'rgb(48, 54, 61)' }[ - paletteType - ], - typography: { fontFamily }, - }), + divider: { light: 'rgba(0, 0, 0, 0.12)', dark: 'rgb(48, 54, 61)' }[paletteType], + typography: { fontFamily }, + }), [paletteType], ); return ( @@ -187,6 +182,6 @@ export default function ThemeProvider({ children }) { } export function useChangeTheme() { - const dispatch = React.useContext(DispatchContext); - return React.useCallback((options) => dispatch({ type: 'CHANGE', payload: options }), [dispatch]); + const dispatch = useContext(DispatchContext); + return useCallback((options) => dispatch({ type: 'CHANGE', payload: options }), [dispatch]); } diff --git a/src/components/ui/TimeRepresentation.jsx b/src/components/ui/TimeRepresentation.jsx index e802047c..2a3df50c 100644 --- a/src/components/ui/TimeRepresentation.jsx +++ b/src/components/ui/TimeRepresentation.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; - +import Accordion from '@material-ui/core/Accordion'; +import AccordionActions from '@material-ui/core/AccordionActions'; +import AccordionDetails from '@material-ui/core/AccordionDetails'; +import AccordionSummary from '@material-ui/core/AccordionSummary'; import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Typography from '@material-ui/core/Typography'; -import AccordionSummary from '@material-ui/core/AccordionSummary'; -import AccordionDetails from '@material-ui/core/AccordionDetails'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Accordion from '@material-ui/core/Accordion'; +import { compose } from 'redux'; -import TimeRepresentationForm from './TimeRepresentationForm'; import withFormActions from '../../hoc/withFormActions'; import withSnackbar from '../../hoc/withSnackbar'; +import TimeRepresentationForm from './TimeRepresentationForm'; + export const TIME_REPRESENTATION_FORM = 'TIME_REPRESENTATION_FORM'; function TimeRepresentationParams({ @@ -28,12 +27,16 @@ function TimeRepresentationParams({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Time Representation Updated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = (error, dispatch, props) => { const messageContent = 'Error Updating Time Representation'; openSnackBar({ messageContent, messageColor: 'secondary' }); - if (onFail) { onFail(error, dispatch, props); } + if (onFail) { + onFail(error, dispatch, props); + } }; return ( @@ -52,17 +55,10 @@ function TimeRepresentationParams({ - - diff --git a/src/components/ui/TimeRepresentationForm.jsx b/src/components/ui/TimeRepresentationForm.jsx index e7bc6476..11090ad2 100644 --- a/src/components/ui/TimeRepresentationForm.jsx +++ b/src/components/ui/TimeRepresentationForm.jsx @@ -1,14 +1,10 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormLabel from '@material-ui/core/FormLabel'; -import FormControl from '@material-ui/core/FormControl'; import Radio from '@material-ui/core/Radio'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import { RadioGroup, TextField } from '../form'; -import { formatNumber } from '../form/utils'; -import Field from './Field'; import { TEXT_TIME, SMPTE_TIME, @@ -19,67 +15,32 @@ import { F2398_TIMEBASE, F24_TIMEBASE, } from '../../const/Time'; +import { RadioGroup, TextField } from '../form'; +import { formatNumber } from '../form/utils'; + +import Field from './Field'; -function TimeRepresentationForm({ - error, - handleSubmit, -}) { +function TimeRepresentationForm({ error, handleSubmit }) { return (
    {error && {error}} Display - } - label="Text" - /> - } - label="SMPTE" - /> - } - label="Seconds" - /> + } label="Text" /> + } label="SMPTE" /> + } label="Seconds" /> Conform - } - label="As Original" - /> - } - label="PAL" - /> - } - label="NTSC" - /> - } - label="NTSC30" - /> - } - label="23.98" - /> - } - label="24" - /> + } label="As Original" /> + } label="PAL" /> + } label="NTSC" /> + } label="NTSC30" /> + } label="23.98" /> + } label="24" /> diff --git a/src/components/ui/TitleHeader.jsx b/src/components/ui/TitleHeader.jsx index 0ddefd01..159919e8 100644 --- a/src/components/ui/TitleHeader.jsx +++ b/src/components/ui/TitleHeader.jsx @@ -1,23 +1,25 @@ -import React from 'react'; +import { Fragment } from 'react'; + import Chip from '@material-ui/core/Chip'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; -import CodeIcon from '@material-ui/icons/Code'; -import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; +import Switch from '@material-ui/core/Switch'; +import Tooltip from '@material-ui/core/Tooltip'; +import Typography from '@material-ui/core/Typography'; +import AccessibilityIcon from '@material-ui/icons/Accessibility'; import ArrowForwardIos from '@material-ui/icons/ArrowForwardIos'; +import CloudDownloadIcon from '@material-ui/icons/CloudDownload'; +import CodeIcon from '@material-ui/icons/Code'; +import DeleteForever from '@material-ui/icons/DeleteForever'; import Help from '@material-ui/icons/Help'; +import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; import Refresh from '@material-ui/icons/Refresh'; import { Link } from 'react-router-dom'; -import Typography from '@material-ui/core/Typography'; -import Grid from '@material-ui/core/Grid'; -import Tooltip from '@material-ui/core/Tooltip'; -import DeleteForever from '@material-ui/icons/DeleteForever'; -import AccessibilityIcon from '@material-ui/icons/Accessibility'; -import CloudDownloadIcon from '@material-ui/icons/CloudDownload'; -import Switch from '@material-ui/core/Switch'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import ExternalIdLink from '../externalid/ExternalIdLink'; import withUI from '../../hoc/withUI'; +import ExternalIdLink from '../externalid/ExternalIdLink'; + import CodeModal from './CodeModal'; function TitleHeader({ @@ -53,63 +55,60 @@ function TitleHeader({ style = {}, }) { const breadcrumb = ( - - {Array.isArray(breadcrumbList) ? breadcrumbList.map((thisBreadcrumb, idx) => { - const isLastBreadCrumb = idx + 1 === breadcrumbList.length; - const breadcrumbColor = isLastBreadCrumb ? 'inherit' : 'textSecondary'; - let textComponent = null; - let spacerComponent = null; - if (thisBreadcrumb.to) { - const { to: breadCrumbTo, title: breadcrumbTitle = '' } = thisBreadcrumb; - textComponent = ( - - {breadcrumbTitle} - - ); - } else if (thisBreadcrumb.title) { - textComponent = ( - - {thisBreadcrumb.title} - - ); - } else { - textComponent = ( - - {thisBreadcrumb} - - ); - } - if (isLastBreadCrumb === false) { - spacerComponent = ( - - - - - + + {Array.isArray(breadcrumbList) ? ( + breadcrumbList.map((thisBreadcrumb, idx) => { + const isLastBreadCrumb = idx + 1 === breadcrumbList.length; + const breadcrumbColor = isLastBreadCrumb ? 'inherit' : 'textSecondary'; + let textComponent = null; + let spacerComponent = null; + if (thisBreadcrumb.to) { + const { to: breadCrumbTo, title: breadcrumbTitle = '' } = thisBreadcrumb; + textComponent = ( + + {breadcrumbTitle} + + ); + } else if (thisBreadcrumb.title) { + textComponent = ( + + {thisBreadcrumb.title} + + ); + } else { + textComponent = ( + + {thisBreadcrumb} + + ); + } + if (isLastBreadCrumb === false) { + spacerComponent = ( + + + + + + ); + } + return ( + + {textComponent} + {spacerComponent} + ); - } - return ( - - {textComponent} - {spacerComponent} - - ); - }) : ( + }) + ) : ( <> - {grandParentTitle - && ( - - {grandParentTo - ? ( + {grandParentTitle && ( + + {grandParentTo ? ( {grandParentTitle} - ) - : ( + ) : ( {grandParentTitle} )} - + )} - {grandParentTitle - && ( - - - - - + {grandParentTitle && ( + + + + + )} - {parentTitle - && ( - - {parentTo - ? ( + {parentTitle && ( + + {parentTo ? ( {parentTitle} - ) - : ( + ) : ( {parentTitle} )} - + )} - {parentTitle - && ( - - - - - + {parentTitle && ( + + + + + )} - - {title} - + {title} - )} - {titleChip && ( - - )} + {titleChip && } ); let openCodeComponent; @@ -261,9 +249,7 @@ function TitleHeader({ ); - const openExternalId = entityId && ( - - ); + const openExternalId = entityId && ; const openAddAccess = addAccessControl && ( openModal({ modalName: addAccessControl })}> @@ -274,20 +260,10 @@ function TitleHeader({ const action = actionComponent || defaultAction; return (
    - + {breadcrumb} - + {autoRefreshSwitch} {openDownload} {openRemove} @@ -303,12 +279,7 @@ function TitleHeader({ {code && ( - + )}
    ); diff --git a/src/components/ui/TitleMenu.jsx b/src/components/ui/TitleMenu.jsx index 7c220a1f..6782e015 100644 --- a/src/components/ui/TitleMenu.jsx +++ b/src/components/ui/TitleMenu.jsx @@ -1,41 +1,37 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; +import { withModalNoRouter } from '../../hoc/withModal'; + import Menu, { MenuItem } from './Menu'; import UnstyledLink from './UnstyledLink'; -import { withModalNoRouter } from '../../hoc/withModal'; function TitleMenu({ menuItems = [], onOpen }) { return ( - {menuItems.map( - ({ - label, to, modalName, color, Typography: TypographyProps = {}, - }) => { - const Label = ( - - {label} - - ); + {menuItems.map(({ label, to, modalName, color, Typography: TypographyProps = {} }) => { + const Label = ( + + {label} + + ); - if (to) { - return ( - - {Label} - - ); - } + if (to) { + return ( + + {Label} + + ); + } - if (modalName) { - return ( - onOpen({ modalName })}> - {Label} - - ); - } - return {Label}; - }, - )} + if (modalName) { + return ( + onOpen({ modalName })}> + {Label} + + ); + } + return {Label}; + })} ); } diff --git a/src/components/ui/TypeArray.jsx b/src/components/ui/TypeArray.jsx index 5eef396c..eced0d7a 100644 --- a/src/components/ui/TypeArray.jsx +++ b/src/components/ui/TypeArray.jsx @@ -1,8 +1,7 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; -import startCase from 'lodash.startcase'; +import Typography from '@material-ui/core/Typography'; import clsx from 'clsx'; +import startCase from 'lodash.startcase'; import withErrorBoundary from '../../hoc/withErrorBoundary'; @@ -21,7 +20,7 @@ const hoverStyle = (theme) => ({ }, }); -const TypeArray = ({ +function TypeArray({ title, titleKey, value, @@ -35,10 +34,16 @@ const TypeArray = ({ titleStartCase = true, arrayKey, ...props -}) => { - if (hideNoValue && value === undefined) { return null; } - if (hideNoValue && value.length === 0) { return null; } - if (!Array.isArray(value)) { return null; } +}) { + if (hideNoValue && value === undefined) { + return null; + } + if (hideNoValue && value.length === 0) { + return null; + } + if (!Array.isArray(value)) { + return null; + } return ( <> {arrayTitle && ( @@ -56,9 +61,7 @@ const TypeArray = ({ > {title && !titleKey && ( - {titleStartCase - ? startCase(`${title} ${index + 1}`) - : `${title} ${index + 1}`} + {titleStartCase ? startCase(`${title} ${index + 1}`) : `${title} ${index + 1}`} )} {titleKey && title && ( @@ -70,9 +73,7 @@ const TypeArray = ({ )} {titleKey && !title && ( - {titleStartCase - ? startCase(thisValue[titleKey]) - : thisValue[titleKey]} + {titleStartCase ? startCase(thisValue[titleKey]) : thisValue[titleKey]} )}
    @@ -82,6 +83,6 @@ const TypeArray = ({ ))} ); -}; +} export default withErrorBoundary(withStyles(hoverStyle)(TypeArray)); diff --git a/src/components/ui/TypeSection.jsx b/src/components/ui/TypeSection.jsx index be569ca6..8bd3ddb0 100644 --- a/src/components/ui/TypeSection.jsx +++ b/src/components/ui/TypeSection.jsx @@ -1,6 +1,5 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; import startCase from 'lodash.startcase'; import withErrorBoundary from '../../hoc/withErrorBoundary'; @@ -24,7 +23,7 @@ const hoverStyle = (theme) => ({ }, }); -const TypeSection = ({ +function TypeSection({ title, value, classes, @@ -34,22 +33,22 @@ const TypeSection = ({ titleStartCase = true, dense = false, ...props -}) => { - if (hideNoValue && value === undefined) { return null; } +}) { + if (hideNoValue && value === undefined) { + return null; + } return ( -
    - {title - && {titleStartCase ? startCase(title) : title}} - { typeof value === 'object' - && ( -
    - -
    +
    + {title && ( + {titleStartCase ? startCase(title) : title} + )} + {typeof value === 'object' && ( +
    + +
    )}
    ); -}; +} export default withErrorBoundary(withStyles(hoverStyle)(TypeSection)); diff --git a/src/components/ui/UnstyledHashLink.jsx b/src/components/ui/UnstyledHashLink.jsx index 2a8b3a20..10e9d171 100644 --- a/src/components/ui/UnstyledHashLink.jsx +++ b/src/components/ui/UnstyledHashLink.jsx @@ -1,4 +1,5 @@ -import React from 'react'; +import { forwardRef } from 'react'; + import { HashLink } from './HashLink'; const style = { @@ -6,7 +7,7 @@ const style = { color: 'inherit', }; -const UnstyledHashLink = React.forwardRef((props, ref) => ( +const UnstyledHashLink = forwardRef((props, ref) => ( e.stopPropagation()} /> )); diff --git a/src/components/ui/UnstyledLink.jsx b/src/components/ui/UnstyledLink.jsx index 75baf6e6..8cdc9734 100644 --- a/src/components/ui/UnstyledLink.jsx +++ b/src/components/ui/UnstyledLink.jsx @@ -1,4 +1,5 @@ -import React from 'react'; +import { forwardRef } from 'react'; + import { Link } from 'react-router-dom'; const style = { @@ -6,7 +7,7 @@ const style = { color: 'inherit', }; -const UnstyledLink = React.forwardRef((props, ref) => ( +const UnstyledLink = forwardRef((props, ref) => ( e.stopPropagation()} /> )); diff --git a/src/components/ui/UploadButton.jsx b/src/components/ui/UploadButton.jsx index acb9a5ca..e4c01d51 100644 --- a/src/components/ui/UploadButton.jsx +++ b/src/components/ui/UploadButton.jsx @@ -1,22 +1,12 @@ -import React from 'react'; import Button from '@material-ui/core/Button'; import FormHelperText from '@material-ui/core/FormHelperText'; -export default function UploadButton({ - input, - meta, - loading, - fullWidth = false, -}) { +export default function UploadButton({ input, meta, loading, fullWidth = false }) { const { value } = input; const fileName = value && value[0].name; return ( <> - {Boolean(meta.touched && meta.error) && ( - - {meta.error} - - )} + {Boolean(meta.touched && meta.error) && {meta.error}} ); diff --git a/src/components/ui/UriListCard.jsx b/src/components/ui/UriListCard.jsx index d0e79c7a..672c6e8e 100644 --- a/src/components/ui/UriListCard.jsx +++ b/src/components/ui/UriListCard.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import CardHeader from '@material-ui/core/CardHeader'; import Typography from '@material-ui/core/Typography'; @@ -7,22 +6,19 @@ import SquareCard from './SquareCard'; import UriListTable from './UriListTable'; export default function UriListCard({ title, uriListDocument, ...props }) { - if (uriListDocument === undefined) { return null; } + if (uriListDocument === undefined) { + return null; + } return ( {title && ( {title} - )} + title={{title}} /> )} - + ); diff --git a/src/components/ui/UriListRow.jsx b/src/components/ui/UriListRow.jsx index 97c58215..eac24a70 100644 --- a/src/components/ui/UriListRow.jsx +++ b/src/components/ui/UriListRow.jsx @@ -1,27 +1,24 @@ -import React from 'react'; -import startCase from 'lodash.startcase'; import TableCell from '@material-ui/core/TableCell'; +import startCase from 'lodash.startcase'; import TableRowLink from './TableRowLink'; -export default function UriListRow({ - uri, - linkTo, - textTo, - onClick, - titleCase = false, -}) { - const linkProps = { }; +export default function UriListRow({ uri, linkTo, textTo, onClick, titleCase = false }) { + const linkProps = {}; let uriText = uri; - if (textTo) { uriText = textTo(uri); } - if (linkTo) { linkProps.to = linkTo(uri); } - if (onClick) { linkProps.onClick = () => onClick(uri); } + if (textTo) { + uriText = textTo(uri); + } + if (linkTo) { + linkProps.to = linkTo(uri); + } + if (onClick) { + linkProps.onClick = () => onClick(uri); + } const cellText = titleCase ? startCase(uriText) : uriText; return ( - - {cellText} - + {cellText} ); diff --git a/src/components/ui/UriListTable.jsx b/src/components/ui/UriListTable.jsx index d37291af..ccda361a 100644 --- a/src/components/ui/UriListTable.jsx +++ b/src/components/ui/UriListTable.jsx @@ -1,11 +1,12 @@ -import React from 'react'; +import { useMemo } from 'react'; + import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; -import TableHead from '@material-ui/core/TableHead'; -import TableRow from '@material-ui/core/TableRow'; import TableFooter from '@material-ui/core/TableFooter'; +import TableHead from '@material-ui/core/TableHead'; import TablePagination from '@material-ui/core/TablePagination'; +import TableRow from '@material-ui/core/TableRow'; import TableActions from './TableActions'; import UriListRow from './UriListRow'; @@ -21,14 +22,16 @@ export default function UriListTable({ ...props }) { const { hits: count = 0 } = uriListDocument; - const uriList = React.useMemo(() => { + const uriList = useMemo(() => { if (!Array.isArray(uriListDocument?.uri)) return []; if (sort === true) return uriListDocument.uri.sort(); if (typeof sort === 'function') return uriListDocument.uri.sort(sort); return uriListDocument.uri; }, [sort, uriListDocument]); const rowsPerPageOptions = [10, 100, 250]; - if (!rowsPerPageOptions.includes(rowsPerPage)) { rowsPerPageOptions.push(rowsPerPage); } + if (!rowsPerPageOptions.includes(rowsPerPage)) { + rowsPerPageOptions.push(rowsPerPage); + } return ( {header === true && ( @@ -41,11 +44,7 @@ export default function UriListTable({ )} {uriList.map((uri) => ( - + ))} {onChangePage && onChangeRowsPerPage && ( diff --git a/src/components/ui/UrlField.jsx b/src/components/ui/UrlField.jsx index 67f9759a..a65d22e3 100644 --- a/src/components/ui/UrlField.jsx +++ b/src/components/ui/UrlField.jsx @@ -1,27 +1,32 @@ -import React from 'react'; +import { PureComponent } from 'react'; + +import Checkbox from '@material-ui/core/Checkbox'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import FormHelperText from '@material-ui/core/FormHelperText'; import MenuItem from '@material-ui/core/MenuItem'; import TextField from '@material-ui/core/TextField'; -import FormHelperText from '@material-ui/core/FormHelperText'; import update from 'immutability-helper'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import Checkbox from '@material-ui/core/Checkbox'; -import encodeUrl from '../../utils/encodeUrl'; -import decodeUrl from '../../utils/decodeUrl'; import * as scheme from '../../const/UrlScheme'; +import decodeUrl from '../../utils/decodeUrl'; +import encodeUrl from '../../utils/encodeUrl'; -const URIComponentTextField = ({ onChange, value, ...props }) => ( - onChange({ - ...event, - target: { ...target, value: encodeURIComponent(newValue) }, - })} - {...props} - /> -); +function URIComponentTextField({ onChange, value, ...props }) { + return ( + + onChange({ + ...event, + target: { ...target, value: encodeURIComponent(newValue) }, + }) + } + {...props} + /> + ); +} -class DynamicSelect extends React.PureComponent { +class DynamicSelect extends PureComponent { constructor(props) { super(props); this.onChange = this.onChange.bind(this); @@ -29,7 +34,7 @@ class DynamicSelect extends React.PureComponent { onChange(key) { return (event, checked) => { - const { name, value: prevValue } = this.props; + const { name, value: prevValue, onChange } = this.props; let newValue; if (key === name) { newValue = { [name]: event.target.value }; // Resets form @@ -43,18 +48,12 @@ class DynamicSelect extends React.PureComponent { const updateCommand = subKeys.reduce(subKeyReducer, initialUpdateCommand); newValue = update(prevValue, updateCommand); } - this.props.onChange(newValue); + onChange(newValue); }; } render() { - const { - children, - choices = {}, - name = '', - value = {}, - ...choiceProps - } = this.props; + const { children, choices = {}, name = '', value = {}, ...choiceProps } = this.props; const choiceValue = value[name]; const ChoiceComponent = choiceValue ? choices[choiceValue] : null; return ( @@ -66,10 +65,11 @@ class DynamicSelect extends React.PureComponent { onChange={this.onChange(name)} fullWidth > - { children } + {children} - {ChoiceComponent - && } + {ChoiceComponent && ( + + )} ); } @@ -85,79 +85,75 @@ const onPathBlur = (blurKey, onKeyChange) => (event) => { } }; -const S3Form = ({ +function S3Form({ value = { queryParams: {}, }, onChange, -}) => ( - <> - - )} - label="Direct" - /> - - - - - - - - - - {/* + + } + label="Direct" + /> + + + + + + + + + + {/* S3 Signer AWS S3 v4 Signer */} - - - Standard - Infrequent - Reduced - Onezone Infrequent - - - - - - - - Expedited - Standard - Bulk - - {/* + + Standard + Infrequent + Reduced + Onezone Infrequent + + + + + + + + Expedited + Standard + Bulk + + {/* */} - -); + + ); +} -const Ds3Form = ({ - value = {}, - onChange, -}) => ( - <> - - - - - - - - - md5 - crc32 - crc32c - - -); +function Ds3Form({ value = {}, onChange }) { + return ( + <> + + + + + + + + + md5 + crc32 + crc32c + + + ); +} -const AzureForm = ({ - value = {}, - onChange, -}) => ( - <> - - - - -); +function AzureForm({ value = {}, onChange }) { + return ( + <> + + + + + ); +} -const GsForm = ({ - value = {}, - onChange, -}) => ( - <> - - - - - -); +function GsForm({ value = {}, onChange }) { + return ( + <> + + + + + + ); +} -const VidinetForm = ({ - value = {}, - onChange, -}) => ( - <> - - - - -); +function VidinetForm({ value = {}, onChange }) { + return ( + <> + + + + + ); +} -const FtpForm = ({ - value = {}, - onChange, -}) => ( - <> - - - - - -); +function FtpForm({ value = {}, onChange }) { + return ( + <> + + + + + + ); +} -const SftpForm = ({ - value = {}, - onChange, -}) => ( - <> - - - - - -); +function SftpForm({ value = {}, onChange }) { + return ( + <> + + + + + + ); +} -const HttpForm = ({ - value = {}, - onChange, - showHttpCreds = false, -}) => ( - <> - - - - { showHttpCreds - && ( - <> - - - +function HttpForm({ value = {}, onChange, showHttpCreds = false }) { + return ( + <> + + + + {showHttpCreds && ( + <> + + + )} - -); + + ); +} -const HttpsForm = ({ - value = {}, - onChange, - showHttpCreds = false, -}) => ( - <> - - - - { showHttpCreds - && ( - <> - - - +function HttpsForm({ value = {}, onChange, showHttpCreds = false }) { + return ( + <> + + + + {showHttpCreds && ( + <> + + + )} - -); + + ); +} -const OmmsForm = ({ - value = {}, - onChange, -}) => ( - <> - - - - - -); +function OmmsForm({ value = {}, onChange }) { + return ( + <> + + + + + + ); +} -const FileForm = ({ - value = {}, - onChange, -}) => ( - <> +function FileForm({ value = {}, onChange }) { + return ( - -); + ); +} -const VsaForm = ({ - value = {}, - onChange, -}) => ( - <> - - - -); +function VsaForm({ value = {}, onChange }) { + return ( + <> + + + + ); +} export default function UrlField(props) { - const { defaultValue, input: { value } } = props; + const { + defaultValue, + input: { value }, + } = props; const decodedUrl = decodeUrl(value || defaultValue); const onChange = (newValue) => { const newUrl = encodeUrl(newValue); - props.input.onChange(newUrl); + props?.input?.onChange(newUrl); }; const { path } = decodedUrl; return ( <> - {`${props.label || 'URL'}: ${value || (defaultValue || '')}`} + {`${props?.label || 'URL'}: ${value || defaultValue || ''}`} - + - + + + + + + + - Vidispine-stacked-RGB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + ); } diff --git a/src/components/ui/VidispineButton.jsx b/src/components/ui/VidispineButton.jsx index d5aa7673..2ae70850 100644 --- a/src/components/ui/VidispineButton.jsx +++ b/src/components/ui/VidispineButton.jsx @@ -1,8 +1,10 @@ -import React from 'react'; +import { forwardRef } from 'react'; + import IconButton from '@material-ui/core/IconButton'; + import VidispineIcon from './VidispineIcon'; -const VidispineButton = React.forwardRef(({ IconButtonProps = {}, IconProps = {} }, ref) => ( +const VidispineButton = forwardRef(({ IconButtonProps = {}, IconProps = {} }, ref) => ( - + + + + + + + - Vidispine-icon-RGB - - - - - - - - - - - + ); } diff --git a/src/components/ui/ViewSelect.jsx b/src/components/ui/ViewSelect.jsx index 3457de3b..4488fdf4 100644 --- a/src/components/ui/ViewSelect.jsx +++ b/src/components/ui/ViewSelect.jsx @@ -1,10 +1,9 @@ -import React from 'react'; +import Grid from '@material-ui/core/Grid'; import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; import ViewHeadline from '@material-ui/icons/ViewHeadline'; import ViewModule from '@material-ui/icons/ViewModule'; import ViewStream from '@material-ui/icons/ViewStream'; -import Grid from '@material-ui/core/Grid'; -import Tooltip from '@material-ui/core/Tooltip'; export const CARD_VIEW = 'CARD_VIEW'; export const GRID_VIEW = 'GRID_VIEW'; @@ -17,27 +16,21 @@ export default function ViewSelect({ isActive = ROW_VIEW, onChange }) { - + - + - + diff --git a/src/components/ui/WizardForm.jsx b/src/components/ui/WizardForm.jsx index fe016a71..b91bc7de 100644 --- a/src/components/ui/WizardForm.jsx +++ b/src/components/ui/WizardForm.jsx @@ -1,28 +1,24 @@ -import React from 'react'; -import { connect } from 'react-redux'; +import { PureComponent } from 'react'; + +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import Stepper from '@material-ui/core/Stepper'; +import Divider from '@material-ui/core/Divider'; import Step from '@material-ui/core/Step'; import StepLabel from '@material-ui/core/StepLabel'; -import AccordionActions from '@material-ui/core/AccordionActions'; -import Typography from '@material-ui/core/Typography'; -import { - reduxForm, Field, submit, destroy, getFormValues, stopSubmit, isDirty, -} from 'redux-form'; -import Tabs from '@material-ui/core/Tabs'; +import Stepper from '@material-ui/core/Stepper'; import Tab from '@material-ui/core/Tab'; -import Divider from '@material-ui/core/Divider'; - -import CodeField from './CodeField'; +import Tabs from '@material-ui/core/Tabs'; +import Typography from '@material-ui/core/Typography'; +import { connect } from 'react-redux'; +import { reduxForm, Field, submit, destroy, getFormValues, stopSubmit, isDirty } from 'redux-form'; import * as actions from '../../actions'; import * as formActions from '../../formactions/wizard'; + +import CodeField from './CodeField'; import StepContent from './StepContent'; -function JsonDocumentForm({ - error, - handleSubmit, -}) { +function JsonDocumentForm({ error, handleSubmit }) { return ( {error && {error}} @@ -41,10 +37,7 @@ function JsonDocumentForm({ ); } -function XMLDocumentForm({ - error, - handleSubmit, -}) { +function XMLDocumentForm({ error, handleSubmit }) { return ( {error && {error}} @@ -72,7 +65,7 @@ const JSON_TAB = 'JSON_TAB'; const XML_TAB = 'XML_TAB'; const EDIT_WIZARD_FORM = 'EDIT_WIZARD_FORM'; -class WizardForm extends React.PureComponent { +class WizardForm extends PureComponent { constructor(props) { super(props); this.onBack = this.onBack.bind(this); @@ -89,13 +82,15 @@ class WizardForm extends React.PureComponent { } componentWillUnmount() { - this.props.destroyForm(EDIT_XML_FORM); + const { destroyForm } = this.props; + destroyForm(EDIT_XML_FORM); } onBack(response) { - if (this.state.activeStep !== 0) { - this.setState(({ activeStep }) => ({ - activeStep: activeStep - 1, + const { activeStep } = this.state; + if (activeStep !== 0) { + this.setState(({ activeStep: newActiveStep }) => ({ + activeStep: newActiveStep - 1, jsonDocument: response, tabValue: JSON_TAB, })); @@ -145,147 +140,96 @@ class WizardForm extends React.PureComponent { initialStep, ...formProps } = this.props; - const { - activeStep, - jsonDocument, - xmlDocument, - tabValue, - } = this.state; + const { activeStep, jsonDocument, xmlDocument, tabValue } = this.state; const initialValues = { [documentName]: jsonDocument }; return ( {documentName} - + - { tabValue === JSON_TAB - && ( - <> - - - {onCancel - && ( - - )} - {jsonDocument === undefined - && ( - - )} - {isJSONFormDirty - && ( - - )} - {!isJSONFormDirty && jsonDocument !== undefined - && ( - - )} - - + {tabValue === JSON_TAB && ( + <> + + + {onCancel && ( + + )} + {jsonDocument === undefined && } + {isJSONFormDirty && ( + + )} + {!isJSONFormDirty && jsonDocument !== undefined && ( + + )} + + )} - { tabValue === XML_TAB - && ( - <> - - - {onCancel - && ( - - )} - - {isXMLFormDirty - && ( - - )} - - + {tabValue === XML_TAB && ( + <> + + + {onCancel && ( + + )} + + {isXMLFormDirty && ( + + )} + + )} Form - + - {onCancel - && ( - + {onCancel && ( + )} - - + diff --git a/src/components/user/UserAliasAddDialog.jsx b/src/components/user/UserAliasAddDialog.jsx index 65316856..d07d8325 100644 --- a/src/components/user/UserAliasAddDialog.jsx +++ b/src/components/user/UserAliasAddDialog.jsx @@ -1,17 +1,17 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/user'; -import UserAliasAddForm from './UserAliasAddForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import UserAliasAddForm from './UserAliasAddForm'; + const USER_ALIAS_ADD_FORM = 'USER_ALIAS_ADD_FORM'; function UserAliasAddDialog({ @@ -26,7 +26,9 @@ function UserAliasAddDialog({ const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Alias Added'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -34,12 +36,7 @@ function UserAliasAddDialog({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + Add Alias - - diff --git a/src/components/user/UserAliasAddForm.jsx b/src/components/user/UserAliasAddForm.jsx index d63a491b..0bcdff70 100644 --- a/src/components/user/UserAliasAddForm.jsx +++ b/src/components/user/UserAliasAddForm.jsx @@ -1,22 +1,14 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; +import { TextField } from '../form'; import Field from '../ui/Field'; -function UserAliasAddForm({ - error, - handleSubmit, -}) { +function UserAliasAddForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/user/UserCard.jsx b/src/components/user/UserCard.jsx index faade0b4..120035cb 100644 --- a/src/components/user/UserCard.jsx +++ b/src/components/user/UserCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import { UserBasicDisplay } from './UserDisplay'; -export default function UserCard({ - ...props -}) { +export default function UserCard({ ...props }) { return ( - + ); diff --git a/src/components/user/UserDisableDialog.jsx b/src/components/user/UserDisableDialog.jsx index 91e0d77a..3a17e5ac 100644 --- a/src/components/user/UserDisableDialog.jsx +++ b/src/components/user/UserDisableDialog.jsx @@ -1,17 +1,17 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/user'; -import UserDisableForm from './UserDisableForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import UserDisableForm from './UserDisableForm'; + const USER_DISABLE_FORM = 'USER_DISABLE_FORM'; function UserDisableDialog({ @@ -27,7 +27,9 @@ function UserDisableDialog({ const hard = props?.values?.queryParms?.hard; const messageContent = `User ${hard === true || hard === 'true' ? 'Removed' : 'Disabled'}`; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -35,12 +37,7 @@ function UserDisableDialog({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + Disable User - - diff --git a/src/components/user/UserDisableForm.jsx b/src/components/user/UserDisableForm.jsx index 38af7982..c54ce1a9 100644 --- a/src/components/user/UserDisableForm.jsx +++ b/src/components/user/UserDisableForm.jsx @@ -1,39 +1,29 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; -import InputLabel from '@material-ui/core/InputLabel'; -import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField, Select } from '../form'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; +import JobPriority from '../../const/JobPriority'; +import { TextField, Select } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import JobPriority from '../../const/JobPriority'; import { KeyValuePairType } from '../ui/FormType'; import { StatefulAsyncSelect } from '../ui/Select'; + import { loadUserOptions } from './UserSelect'; const queryParams = () => ( <> - )} + control={} label="Hard Delete" /> - )} + control={} label="Preserve Access" /> ( isClearable fullWidth /> - + ( ); -function UserForm({ - error, - handleSubmit, -}) { +function UserForm({ error, handleSubmit }) { return (
    {error && {error}} - + - diff --git a/src/components/user/UserGroupEditor.jsx b/src/components/user/UserGroupEditor.jsx index 1fafffab..f36ed174 100644 --- a/src/components/user/UserGroupEditor.jsx +++ b/src/components/user/UserGroupEditor.jsx @@ -1,29 +1,24 @@ -import React from 'react'; -import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; -import Tooltip from '@material-ui/core/Tooltip'; -import IconButton from '@material-ui/core/IconButton'; +import CardHeader from '@material-ui/core/CardHeader'; import Grid from '@material-ui/core/Grid'; +import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; import Typography from '@material-ui/core/Typography'; -import CardHeader from '@material-ui/core/CardHeader'; +import PlaylistAdd from '@material-ui/icons/PlaylistAdd'; +import withModal from '../../hoc/withModal'; import GroupTable from '../group/GroupTable'; + import UserGroupDialog from './UserGroupDialog'; -import withModal from '../../hoc/withModal'; const ADD_USER_GROUP = 'ADD_USER_GROUP'; -function UserGroupEditor({ - userName, - onSuccess, - groupListDocument, - onOpen, -}) { +function UserGroupEditor({ userName, onSuccess, groupListDocument, onOpen }) { return ( <> Groups} - action={( + action={ @@ -33,7 +28,7 @@ function UserGroupEditor({ - )} + } /> - + ); } diff --git a/src/components/user/UserGroupForm.jsx b/src/components/user/UserGroupForm.jsx index 64ee833c..2525bcfd 100644 --- a/src/components/user/UserGroupForm.jsx +++ b/src/components/user/UserGroupForm.jsx @@ -1,17 +1,16 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; +import { loadGroupOptions } from '../group/GroupSelect'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; -import { loadGroupOptions } from '../group/GroupSelect'; import { StatefulAsyncSelect } from '../ui/Select'; -const GroupType = () => ( - <> +function GroupType() { + return ( ( cacheOptions isClearable /> - -); + ); +} -const GroupListType = () => ( - -); +function GroupListType() { + return ; +} const queryParams = () => ( - )} + control={} label="Move All Groups" /> ); -function UserGroupForm({ - error, - handleSubmit, -}) { +function UserGroupForm({ error, handleSubmit }) { return (
    {error && {error}} - - + + - diff --git a/src/components/user/UserKeyCard.jsx b/src/components/user/UserKeyCard.jsx index ccd015b2..93db9174 100644 --- a/src/components/user/UserKeyCard.jsx +++ b/src/components/user/UserKeyCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import UserKeyTable from './UserKeyTable'; -export default function UserKeyCard({ - ...props -}) { +export default function UserKeyCard({ ...props }) { return ( - + ); diff --git a/src/components/user/UserKeyDialog.jsx b/src/components/user/UserKeyDialog.jsx index 3cfaae16..366589a8 100644 --- a/src/components/user/UserKeyDialog.jsx +++ b/src/components/user/UserKeyDialog.jsx @@ -1,17 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; import Button from '@material-ui/core/Button'; -import Divider from '@material-ui/core/Divider'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; +import Divider from '@material-ui/core/Divider'; +import { compose } from 'redux'; -import UserKeyForm from './UserKeyForm'; -import TextGrid from '../ui/TextGrid'; import * as formActions from '../../formactions/user'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; +import TextGrid from '../ui/TextGrid'; + +import UserKeyForm from './UserKeyForm'; export const EDIT_USERKEY_FORM = 'EDIT_USERKEY_FORM'; @@ -30,7 +30,9 @@ function UserKeyDialog({ onSetAccessKey(newAccessKeyDocument); const messageContent = 'User Key Created'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Creating User Key'; @@ -47,27 +49,13 @@ function UserKeyDialog({ Success! <> - - + + - @@ -86,18 +74,10 @@ function UserKeyDialog({
    - - diff --git a/src/components/user/UserKeyForm.jsx b/src/components/user/UserKeyForm.jsx index 096c90bc..22315f62 100644 --- a/src/components/user/UserKeyForm.jsx +++ b/src/components/user/UserKeyForm.jsx @@ -1,30 +1,17 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; -import FormSection from '../ui/FormSection'; +import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; -const queryParams = () => ( - -); +const queryParams = () => ; -function UserKeyForm({ - error, - handleSubmit, -}) { +function UserKeyForm({ error, handleSubmit }) { return (
    {error && {error}} - + - diff --git a/src/components/user/UserKeyRow.jsx b/src/components/user/UserKeyRow.jsx index 1c99681d..ce6f6bd5 100644 --- a/src/components/user/UserKeyRow.jsx +++ b/src/components/user/UserKeyRow.jsx @@ -1,19 +1,10 @@ -import React from 'react'; +import IconButton from '@material-ui/core/IconButton'; import TableCell from '@material-ui/core/TableCell'; import TableRow from '@material-ui/core/TableRow'; -import IconButton from '@material-ui/core/IconButton'; import DeleteForever from '@material-ui/icons/DeleteForever'; -export default function UserKeyRow({ - accessKeyDocument = {}, - onOpenRemove, -}) { - const { - id: keyId, - name, - status, - created, - } = accessKeyDocument; +export default function UserKeyRow({ accessKeyDocument = {}, onOpenRemove }) { + const { id: keyId, name, status, created } = accessKeyDocument; return ( {keyId} @@ -22,9 +13,9 @@ export default function UserKeyRow({ {status} {onOpenRemove && ( - onOpenRemove({ keyId })}> - - + onOpenRemove({ keyId })}> + + )} diff --git a/src/components/user/UserKeyTable.jsx b/src/components/user/UserKeyTable.jsx index d68da53e..e58bd426 100644 --- a/src/components/user/UserKeyTable.jsx +++ b/src/components/user/UserKeyTable.jsx @@ -1,24 +1,20 @@ -import React from 'react'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableHead from '@material-ui/core/TableHead'; import TableRow from '@material-ui/core/TableRow'; -import UserKeyRow from './UserKeyRow'; -import UserKeyRemove from './UserKeyRemove'; import withDialogProps from '../../hoc/withDialogProps'; +import UserKeyRemove from './UserKeyRemove'; +import UserKeyRow from './UserKeyRow'; + const REMOVE_USERKEY_DIALOG = 'REMOVE_USERKEY_DIALOG'; -function UserKeyTable({ - accessKeyListDocument, - onRemoveSuccess, - userName, - dialogProps, - onOpen, -}) { - if (!accessKeyListDocument) { return null; } +function UserKeyTable({ accessKeyListDocument, onRemoveSuccess, userName, dialogProps, onOpen }) { + if (!accessKeyListDocument) { + return null; + } const { key: accessKeyList = [] } = accessKeyListDocument; return ( <> diff --git a/src/components/user/UserListCard.jsx b/src/components/user/UserListCard.jsx index 70c52558..1c7a6dce 100644 --- a/src/components/user/UserListCard.jsx +++ b/src/components/user/UserListCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import UserTable from './UserTable'; -export default function UserListCard({ - ...props -}) { +export default function UserListCard({ ...props }) { return ( - + ); diff --git a/src/components/user/UserListParams.jsx b/src/components/user/UserListParams.jsx index c679173a..9ed05fab 100644 --- a/src/components/user/UserListParams.jsx +++ b/src/components/user/UserListParams.jsx @@ -1,7 +1,6 @@ -import React from 'react'; - import * as formActions from '../../formactions/user'; import FormWrapper from '../ui/FormWrapper'; + import UserListParamsForm from './UserListParamsForm'; import UserListSearchForm from './UserListSearchForm'; diff --git a/src/components/user/UserListParamsForm.jsx b/src/components/user/UserListParamsForm.jsx index 6c5e5eec..10e9781e 100644 --- a/src/components/user/UserListParamsForm.jsx +++ b/src/components/user/UserListParamsForm.jsx @@ -1,15 +1,14 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; -import BoolCheckbox from '../ui/BoolCheckbox'; import { TextField, Select } from '../form'; +import BoolCheckbox from '../ui/BoolCheckbox'; +import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; export const queryParams = () => ( <> @@ -25,20 +24,8 @@ export const queryParams = () => ( control={} label="Ignore Case" /> - - + + ); @@ -46,12 +33,7 @@ function UserListParamForm({ error, handleSubmit }) { return (
    {error && {error}} - + ); } diff --git a/src/components/user/UserListSearchForm.jsx b/src/components/user/UserListSearchForm.jsx index ef297232..de4674aa 100644 --- a/src/components/user/UserListSearchForm.jsx +++ b/src/components/user/UserListSearchForm.jsx @@ -1,78 +1,79 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; -import Field from '../ui/Field'; import { TextField, Select } from '../form'; +import Field from '../ui/Field'; import FieldTypeArray from '../ui/FieldTypeArray'; +import FormSection from '../ui/FormSection'; -export const SimpleSearchFieldType = () => ( - <> - - - -); -export const Sort = () => ( - <> - - - order - - Ascending - Descending - - - -); +export function SimpleSearchFieldType() { + return ( + <> + + + + ); +} +export function Sort() { + return ( + <> + + + order + + Ascending + Descending + + + + ); +} -export const SimpleSearchOperatorType = () => ( - <> - - - Operation - - AND - OR - NOT - - - -); +export function SimpleSearchOperatorType() { + return ( + <> + + + Operation + + AND + OR + NOT + + + + ); +} -export const SimpleSearchType = () => ( - <> - - - - -); +export function SimpleSearchType() { + return ( + <> + + + + + ); +} function UserListSearchForm({ error, handleSubmit }) { return ( diff --git a/src/components/user/UserListTitle.jsx b/src/components/user/UserListTitle.jsx index a0ddcd6a..da1087ef 100644 --- a/src/components/user/UserListTitle.jsx +++ b/src/components/user/UserListTitle.jsx @@ -1,13 +1,5 @@ -import React from 'react'; - import TitleHeader from '../ui/TitleHeader'; export default function UserListTitle(props) { - return ( - - ); + return ; } diff --git a/src/components/user/UserPassword.jsx b/src/components/user/UserPassword.jsx index cfa30a62..1ab5e157 100644 --- a/src/components/user/UserPassword.jsx +++ b/src/components/user/UserPassword.jsx @@ -1,31 +1,26 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/user'; -import UserPasswordForm from './UserPasswordForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import UserPasswordForm from './UserPasswordForm'; + const USER_PASSWORD_FORM = 'USER_PASSWORD_FORM'; -function UserPassword({ - open, - onClose, - onSuccess, - openSnackBar, - submitForm, - userName, -}) { +function UserPassword({ open, onClose, onSuccess, openSnackBar, submitForm, userName }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'Password Changed'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } onClose(); }; const onSubmitFail = () => { @@ -33,12 +28,7 @@ function UserPassword({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - + Change Password - - diff --git a/src/components/user/UserPasswordForm.jsx b/src/components/user/UserPasswordForm.jsx index 7b6a577d..df29180b 100644 --- a/src/components/user/UserPasswordForm.jsx +++ b/src/components/user/UserPasswordForm.jsx @@ -1,13 +1,12 @@ -import React from 'react'; -import Typography from '@material-ui/core/Typography'; -import { reduxForm } from 'redux-form'; +import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; -import FormControl from '@material-ui/core/FormControl'; -import { TextField, Select } from '../form'; +import Typography from '@material-ui/core/Typography'; +import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; +import { TextField, Select } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( @@ -19,23 +18,12 @@ const queryParams = () => ( ); -function UserPasswordForm({ - error, - handleSubmit, -}) { +function UserPasswordForm({ error, handleSubmit }) { return (
    {error && {error}} - - + + - diff --git a/src/components/user/UserRealNameForm.jsx b/src/components/user/UserRealNameForm.jsx index de1c387a..074536a4 100644 --- a/src/components/user/UserRealNameForm.jsx +++ b/src/components/user/UserRealNameForm.jsx @@ -1,22 +1,14 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; +import { TextField } from '../form'; import Field from '../ui/Field'; -function UserRealNameForm({ - error, - handleSubmit, -}) { +function UserRealNameForm({ error, handleSubmit }) { return (
    {error && {error}} - +
    @@ -50,32 +51,30 @@ function UserTable({ /> ))} - {count - && ( - - - - - + {count && ( + + + + + )}
    - {groupName - && ( + {groupName && ( - )} + )} ); } diff --git a/src/components/user/UserTitle.jsx b/src/components/user/UserTitle.jsx index af663f2e..bead28a4 100644 --- a/src/components/user/UserTitle.jsx +++ b/src/components/user/UserTitle.jsx @@ -1,30 +1,24 @@ -import React from 'react'; import Chip from '@material-ui/core/Chip'; -import Typography from '@material-ui/core/Typography'; -import Tooltip from '@material-ui/core/Tooltip'; import IconButton from '@material-ui/core/IconButton'; +import Tooltip from '@material-ui/core/Tooltip'; +import Typography from '@material-ui/core/Typography'; import VpnKeyIcon from '@material-ui/icons/VpnKey'; -import TitleHeader from '../ui/TitleHeader'; -import { OfflineIcon } from '../ui/StatusIcon'; import withModal from '../../hoc/withModal'; import Menu, { MenuItem } from '../ui/Menu'; +import { OfflineIcon } from '../ui/StatusIcon'; +import TitleHeader from '../ui/TitleHeader'; -const UserStatus = ({ userDocument }) => { - if (userDocument === undefined) { return null; } +function UserStatus({ userDocument }) { + if (userDocument === undefined) { + return null; + } const { disabled } = userDocument; if (disabled === true) { - return ( - - } - label="Disabled" - /> - ); + return } label="Disabled" />; } return null; -}; +} function UserTitle({ userName, @@ -46,7 +40,7 @@ function UserTitle({ title={userName} parentTitle="User" parentTo="/user/" - iconList={( + iconList={ <> history.push(`/user/${userName}/key`)}> @@ -56,9 +50,9 @@ function UserTitle({ {userName !== 'admin' && ( - onOpen({ modalName: userNameModal })}> - Change Username - + onOpen({ modalName: userNameModal })}> + Change Username + )} onOpen({ modalName: passwordModal })}> Change Password @@ -84,7 +78,7 @@ function UserTitle({ )} - )} + } {...props} /> ); diff --git a/src/components/user/UserToken.jsx b/src/components/user/UserToken.jsx index 439c212c..fd383a73 100644 --- a/src/components/user/UserToken.jsx +++ b/src/components/user/UserToken.jsx @@ -1,101 +1,70 @@ -import React from 'react'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; +import DialogTitle from '@material-ui/core/DialogTitle'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; import { compose } from 'redux'; -import Dialog from '@material-ui/core/Dialog'; import * as formActions from '../../formactions/user'; -import UserTokenForm from './UserTokenForm'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; import DialogContent from '../ui/DialogContent'; +import UserTokenForm from './UserTokenForm'; + const USER_TOKEN_FORM = 'USER_TOKEN_FORM'; -function UserToken({ - open, - onClose, - onSuccess, - openSnackBar, - submitForm, - userName, - userToken, -}) { +function UserToken({ open, onClose, onSuccess, openSnackBar, submitForm, userName, userToken }) { const onSubmitSuccess = (response, dispatch, props) => { const messageContent = 'New Token Generated'; openSnackBar({ messageContent }); - if (onSuccess) { onSuccess(response, dispatch, props); } + if (onSuccess) { + onSuccess(response, dispatch, props); + } }; const onSubmitFail = () => { const messageContent = 'Error Generating Token'; openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - - {userToken - ? ( - <> - Current Token - - {userToken} - - - - - - - ) - : ( - <> - Generate Token - - - - - - - - - - )} + + {userToken ? ( + <> + Current Token + {userToken} + + + + + + ) : ( + <> + Generate Token + + + + + + + + + + )} ); } diff --git a/src/components/user/UserTokenForm.jsx b/src/components/user/UserTokenForm.jsx index 6921f2cd..ef5ab1b6 100644 --- a/src/components/user/UserTokenForm.jsx +++ b/src/components/user/UserTokenForm.jsx @@ -1,12 +1,11 @@ -import React from 'react'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormControlLabel from '@material-ui/core/FormControlLabel'; -import { TextField } from '../form'; +import { TextField } from '../form'; import BoolCheckbox from '../ui/BoolCheckbox'; -import FormSection from '../ui/FormSection'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; const queryParams = () => ( <> @@ -18,28 +17,17 @@ const queryParams = () => ( fullWidth /> - )} + control={} label="Auto Refresh" /> ); -function UserTokenForm({ - error, - handleSubmit, -}) { +function UserTokenForm({ error, handleSubmit }) { return (
    {error && {error}} - + - diff --git a/src/components/user/UserUserNameForm.jsx b/src/components/user/UserUserNameForm.jsx index 4aecedb3..bf1bf9f1 100644 --- a/src/components/user/UserUserNameForm.jsx +++ b/src/components/user/UserUserNameForm.jsx @@ -1,29 +1,19 @@ -import React from 'react'; import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import FormSection from '../ui/FormSection'; + import { TextField } from '../form'; import Field from '../ui/Field'; +import FormSection from '../ui/FormSection'; -const UserType = () => ( - -); +function UserType() { + return ; +} -function UserUserNameForm({ - error, - handleSubmit, -}) { +function UserUserNameForm({ error, handleSubmit }) { return (
    {error && {error}} - + - diff --git a/src/components/version/VersionDisplay.jsx b/src/components/version/VersionDisplay.jsx index 49c83f86..844979f1 100644 --- a/src/components/version/VersionDisplay.jsx +++ b/src/components/version/VersionDisplay.jsx @@ -1,295 +1,171 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -import TypeSection from '../ui/TypeSection'; import TypeArray from '../ui/TypeArray'; +import TypeSection from '../ui/TypeSection'; -const LicenseErrorType = ({ value = {} }) => ( - <> - - -); - -const LicenseNumberType = ({ value = {}, dense = true }) => ( - dense - ? ( - - ) - : ( - <> - - - - ) -); - -const CodecType = ({ value = {}, dense = true }) => ( - dense - ? ( - - ) - : ( - <> - - - - - ) -); +function LicenseErrorType({ value = {} }) { + return ; +} -const CodecStatusType = ({ value = {} }) => ( - <> - +function LicenseNumberType({ value = {}, dense = true }) { + return dense ? ( - -); + ) : ( + <> + + + + ); +} -const SystemInfoType = ({ value = {} }) => ( - <> - +function CodecType({ value = {}, dense = true }) { + return dense ? ( - -); + ) : ( + <> + + + + + ); +} -const CompType = ({ value = {}, dense = true }) => ( - dense - ? ( - - ) - : ( - <> - - - - - ) -); +function CodecStatusType({ value = {} }) { + return ( + <> + + + + ); +} -const LicenseType = ({ value = {} }) => ( - <> - - - - - - - - - - - - - +function SystemInfoType({ value = {} }) { + return ( + <> + + + + ); +} + +function CompType({ value = {}, dense = true }) { + return dense ? ( - - -); + ) : ( + <> + + + + + ); +} -export function VersionSystemInfoDisplay({ - versionDocument, -}) { +function LicenseType({ value = {} }) { return ( <> + + + + + + + + + + + + + + ); } -export function VersionLicenseInfoDisplay({ - versionDocument, -}) { +export function VersionSystemInfoDisplay({ versionDocument }) { return ( - <> - - + ); } -export function VersionComponentDisplay({ - versionDocument, -}) { +export function VersionLicenseInfoDisplay({ versionDocument }) { return ( - <> - - + ); } -export default function VersionDisplay({ - versionDocument, -}) { +export function VersionComponentDisplay({ versionDocument }) { + return ; +} + +export default function VersionDisplay({ versionDocument }) { return ( <> - + ); } diff --git a/src/components/version/VersionTitle.jsx b/src/components/version/VersionTitle.jsx index 10c73094..142c41cd 100644 --- a/src/components/version/VersionTitle.jsx +++ b/src/components/version/VersionTitle.jsx @@ -1,59 +1,42 @@ -import React from 'react'; +import Chip from '@material-ui/core/Chip'; +import IconButton from '@material-ui/core/IconButton'; import Tooltip from '@material-ui/core/Tooltip'; import CloudUpload from '@material-ui/icons/CloudUpload'; -import IconButton from '@material-ui/core/IconButton'; -import Chip from '@material-ui/core/Chip'; +import { withModalNoRouter } from '../../hoc/withModal'; import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; import TitleHeader from '../ui/TitleHeader'; -import { withModalNoRouter } from '../../hoc/withModal'; const getLicenseStatus = ({ versionDocument }) => { - if (versionDocument === undefined) { return null; } + if (versionDocument === undefined) { + return null; + } const { licenseInfo = {} } = versionDocument; const { licenseStatus } = licenseInfo; if (licenseStatus === 'valid') { - return ( - - } - label="Valid License" - /> - ); + return } label="Valid License" />; } - return ( - - } - label="Invalid License" - /> - ); + return } label="Invalid License" />; }; -function VersionTitle({ - uploadModal, - onOpen, - ...props -}) { +function VersionTitle({ uploadModal, onOpen, ...props }) { const { code: versionDocument } = props; const StatusIcon = getLicenseStatus({ versionDocument }); return ( - { uploadModal && ( - - onOpen({ modalName: uploadModal })}> - - - + {uploadModal && ( + + onOpen({ modalName: uploadModal })}> + + + )} {StatusIcon} - )} + } {...props} /> ); diff --git a/src/components/vxa/VxaCard.jsx b/src/components/vxa/VxaCard.jsx index 9c910cec..6eb10b7a 100644 --- a/src/components/vxa/VxaCard.jsx +++ b/src/components/vxa/VxaCard.jsx @@ -1,18 +1,14 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../ui/SquareCard'; + import VxaDisplay from './VxaDisplay'; -export default function VxaCard({ - ...props -}) { +export default function VxaCard({ ...props }) { return ( - + ); diff --git a/src/components/vxa/VxaConfigurationDialog.jsx b/src/components/vxa/VxaConfigurationDialog.jsx index 3f7ef3c3..5758e8ce 100644 --- a/src/components/vxa/VxaConfigurationDialog.jsx +++ b/src/components/vxa/VxaConfigurationDialog.jsx @@ -1,41 +1,23 @@ -import React from 'react'; -import { compose } from 'redux'; +import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogActions from '@material-ui/core/DialogActions'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; -import TextGrid from '../ui/TextGrid'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; +import TextGrid from '../ui/TextGrid'; -function VxaDialog({ - open, - onClose, - vxaConfiguration, -}) { +function VxaDialog({ open, onClose, vxaConfiguration }) { return ( - - - New Agent Configuration - + + New Agent Configuration - + - diff --git a/src/components/vxa/VxaDialog.jsx b/src/components/vxa/VxaDialog.jsx index f52b4eed..fe493667 100644 --- a/src/components/vxa/VxaDialog.jsx +++ b/src/components/vxa/VxaDialog.jsx @@ -1,26 +1,20 @@ -import React from 'react'; -import { compose } from 'redux'; +import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogActions from '@material-ui/core/DialogActions'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; +import { compose } from 'redux'; -import VxaForm from './VxaForm'; import * as formActions from '../../formactions/vxa'; -import withUI from '../../hoc/withUI'; import withFormActions from '../../hoc/withFormActions'; +import withUI from '../../hoc/withUI'; + +import VxaForm from './VxaForm'; const EDIT_AGENT_FORM = 'EDIT_AGENT_FORM'; -function VxaDialog({ - open, - onClose, - openSnackBar, - onSuccess, - submitForm, -}) { +function VxaDialog({ open, onClose, openSnackBar, onSuccess, submitForm }) { const onSubmitSuccess = (response) => { const messageContent = 'Agent Created'; openSnackBar({ messageContent }); @@ -32,15 +26,8 @@ function VxaDialog({ openSnackBar({ messageContent, messageColor: 'secondary' }); }; return ( - - - New Agent - + + New Agent - - diff --git a/src/components/vxa/VxaDisplay.jsx b/src/components/vxa/VxaDisplay.jsx index 0ec03430..bb2ce468 100644 --- a/src/components/vxa/VxaDisplay.jsx +++ b/src/components/vxa/VxaDisplay.jsx @@ -1,8 +1,6 @@ -import React from 'react'; - import TextGrid from '../ui/TextGrid'; -import TypeSection from '../ui/TypeSection'; import TypeArray from '../ui/TypeArray'; +import TypeSection from '../ui/TypeSection'; // const TranscoderConfigurationType = ({ value = {} }) => ( // @@ -180,51 +178,22 @@ import TypeArray from '../ui/TypeArray'; // // ); -const TranscoderType = ({ value = {} }) => ( - <> - - - - - - - - {/* + + + + + + + + {/* ( component={TranscoderConfigurationType} hideNoValue /> */} - - - - -); + + + + + ); +} const s3CredentialType = ({ value = {} }) => ( - <> - - + ); -const VXAVSInstanceType = ({ value = {} }) => ( - <> - - - - - -); - -const VXAStorageType = ({ value = {} }) => ( - <> - - - - - - -); +function VXAVSInstanceType({ value = {} }) { + return ( + <> + + + + + + ); +} -const VXAType = ({ value = {} }) => ( - <> - - - - - - - - - - - - - - - - - - - - -); +function VXAStorageType({ value = {} }) { + return ( + <> + + + + + + + ); +} -export default function VxaDisplay({ - vxaDocument, -}) { +function VXAType({ value = {} }) { return ( <> - + + + + + + + + + + + + + + + + + + ); } + +export default function VxaDisplay({ vxaDocument }) { + return ; +} diff --git a/src/components/vxa/VxaForm.jsx b/src/components/vxa/VxaForm.jsx index 3e0cdd36..783825ed 100644 --- a/src/components/vxa/VxaForm.jsx +++ b/src/components/vxa/VxaForm.jsx @@ -1,57 +1,25 @@ -import React from 'react'; - import Typography from '@material-ui/core/Typography'; import { reduxForm } from 'redux-form'; -import { TextField } from '../form'; +import { TextField } from '../form'; import Field from '../ui/Field'; import FormSection from '../ui/FormSection'; const queryParams = () => ( <> - - - - - + + + + + ); -function VxaForm({ - error, - handleSubmit, -}) { +function VxaForm({ error, handleSubmit }) { return ( {error && {error}} - + - diff --git a/src/components/vxa/VxaRow.jsx b/src/components/vxa/VxaRow.jsx index e68c32fd..fd6216c5 100644 --- a/src/components/vxa/VxaRow.jsx +++ b/src/components/vxa/VxaRow.jsx @@ -1,25 +1,17 @@ -import React from 'react'; - -import UnstyledLink from '../ui/UnstyledLink'; +import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; import TableCell from '../ui/TableCell'; import TableRow from '../ui/TableRow'; -import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; +import UnstyledLink from '../ui/UnstyledLink'; -export default function VxaRow({ - vxaDocument = {}, -}) { +export default function VxaRow({ vxaDocument = {} }) { return ( - - {vxaDocument.uuid} - + {vxaDocument.uuid} {vxaDocument.name} {vxaDocument.vxaVersion} - - {vxaDocument.status === 'ONLINE' ? : } - + {vxaDocument.status === 'ONLINE' ? : } ); } diff --git a/src/components/vxa/VxaTitle.jsx b/src/components/vxa/VxaTitle.jsx index 19fab422..df5eeb5c 100644 --- a/src/components/vxa/VxaTitle.jsx +++ b/src/components/vxa/VxaTitle.jsx @@ -1,31 +1,18 @@ -import React from 'react'; import Chip from '@material-ui/core/Chip'; -import TitleHeader from '../ui/TitleHeader'; import { OnlineIcon, OfflineIcon } from '../ui/StatusIcon'; +import TitleHeader from '../ui/TitleHeader'; -const VxaStatus = ({ vxaDocument }) => { - if (vxaDocument === undefined) { return null; } +function VxaStatus({ vxaDocument }) { + if (vxaDocument === undefined) { + return null; + } const { status } = vxaDocument; if (status === 'ONLINE') { - return ( - - } - label="Online" - /> - ); + return } label="Online" />; } - return ( - - } - label="Offline" - /> - ); -}; + return } label="Offline" />; +} export default function VxaTitle({ vxaUuid, ...props }) { return ( @@ -34,9 +21,7 @@ export default function VxaTitle({ vxaUuid, ...props }) { title={vxaUuid} parentTitle="Agent" parentTo="/vxa/" - iconList={ - - } + iconList={} {...props} /> ); diff --git a/src/configureStore.js b/src/configureStore.js index e7ce1a7a..dca7ed4b 100644 --- a/src/configureStore.js +++ b/src/configureStore.js @@ -3,8 +3,5 @@ import { createStore } from 'redux'; import rootReducer from './reducers'; export default function configureStore({ preloadedState }) { - return createStore( - rootReducer, - preloadedState, - ); + return createStore(rootReducer, preloadedState); } diff --git a/src/const/Auth.js b/src/const/Auth.js index 814e8e99..fdbd3e65 100644 --- a/src/const/Auth.js +++ b/src/const/Auth.js @@ -3,3 +3,4 @@ export const AUTH_USERNAME = 'VIDISPINE-USERNAME'; export const AUTH_RUNAS = 'VIDISPINE-RUNAS'; export const AUTH_IS_AUTHENTICATED = 'VIDISPINE-IS-AUTHENTICATED'; export const AUTH_VIDISPINE_SERVER_URL = 'VIDISPINE-SERVER-URL'; +export const PROXY_HEADER = 'X-Proxy-URL'; diff --git a/src/const/FileStates.js b/src/const/FileStates.js index 0318c101..933f1b14 100644 --- a/src/const/FileStates.js +++ b/src/const/FileStates.js @@ -10,22 +10,10 @@ const FileStates = [ 'AWAITING_SYNC', ]; -export const ONLINE_STATES = [ - 'CLOSED', - 'ARCHIVED', -]; +export const ONLINE_STATES = ['CLOSED', 'ARCHIVED']; -export const WARNING_STATES = [ - 'NONE', - 'OPEN', - 'BEING_READ', - 'AWAITING_SYNC', -]; +export const WARNING_STATES = ['NONE', 'OPEN', 'BEING_READ', 'AWAITING_SYNC']; -export const DOWNLOAD_STATES = [ - 'CLOSED', - 'OPEN', - 'BEING_READ', -]; +export const DOWNLOAD_STATES = ['CLOSED', 'OPEN', 'BEING_READ']; export default FileStates; diff --git a/src/const/JobPriority.js b/src/const/JobPriority.js index 8f779b22..5d3018bb 100644 --- a/src/const/JobPriority.js +++ b/src/const/JobPriority.js @@ -1,9 +1,2 @@ -const JobPriority = [ - 'HIGHEST', - 'HIGH', - 'MEDIUM', - 'LOW', - 'LOWEST', - 'IMMEDIATE', -]; +const JobPriority = ['HIGHEST', 'HIGH', 'MEDIUM', 'LOW', 'LOWEST', 'IMMEDIATE']; export default JobPriority; diff --git a/src/const/JobStates.js b/src/const/JobStates.js index b427fc8d..fa1278f3 100644 --- a/src/const/JobStates.js +++ b/src/const/JobStates.js @@ -10,41 +10,16 @@ const JobStates = [ 'ABORTED', ]; -export const OK_STATES = [ - 'READY', - 'STARTED', - 'VIDINET_JOB', - 'FINISHED', -]; +export const OK_STATES = ['READY', 'STARTED', 'VIDINET_JOB', 'FINISHED']; -export const WARNING_STATES = [ - 'WAITING', - 'FINISHED_WARNING', - 'ABORT_PENDING', -]; +export const WARNING_STATES = ['WAITING', 'FINISHED_WARNING', 'ABORT_PENDING']; -export const WAITING_STATES = [ - 'WAITING', -]; +export const WAITING_STATES = ['WAITING']; -export const ERROR_STATES = [ - 'FAILED_TOTAL', - 'ABORTED', -]; +export const ERROR_STATES = ['FAILED_TOTAL', 'ABORTED']; -export const RUNNING_STATES = [ - 'READY', - 'STARTED', - 'VIDINET_JOB', - 'WAITING', - 'ABORT_PENDING', -]; +export const RUNNING_STATES = ['READY', 'STARTED', 'VIDINET_JOB', 'WAITING', 'ABORT_PENDING']; -export const INACTIVE_STATES = [ - 'FINISHED', - 'FINISHED_WARNING', - 'FAILED_TOTAL', - 'ABORTED', -]; +export const INACTIVE_STATES = ['FINISHED', 'FINISHED_WARNING', 'FAILED_TOTAL', 'ABORTED']; export default JobStates; diff --git a/src/const/ReindexStates.js b/src/const/ReindexStates.js index 116a5bc5..694bc24a 100644 --- a/src/const/ReindexStates.js +++ b/src/const/ReindexStates.js @@ -1,26 +1,9 @@ -export const OK_STATES = [ - 'FINISHED', -]; +export const OK_STATES = ['FINISHED']; -export const WARNING_STATES = [ - 'PAUSED', - 'IN_QUEUE', - 'IN_PROGRESS', - 'IN PROGRESS', -]; +export const WARNING_STATES = ['PAUSED', 'IN_QUEUE', 'IN_PROGRESS', 'IN PROGRESS']; -export const ERROR_STATES = [ - 'ABORTED', -]; +export const ERROR_STATES = ['ABORTED']; -export const RUNNING_STATES = [ - 'PAUSED', - 'IN_QUEUE', - 'IN_PROGRESS', - 'IN PROGRESS', -]; +export const RUNNING_STATES = ['PAUSED', 'IN_QUEUE', 'IN_PROGRESS', 'IN PROGRESS']; -export const INACTIVE_STATES = [ - 'FINISHED', - 'ABORTED', -]; +export const INACTIVE_STATES = ['FINISHED', 'ABORTED']; diff --git a/src/const/StorageStates.js b/src/const/StorageStates.js index 02da35a4..b129d6b6 100644 --- a/src/const/StorageStates.js +++ b/src/const/StorageStates.js @@ -1,27 +1,9 @@ -const StorageStates = [ - 'NONE', - 'READY', - 'OFFLINE', - 'FAILED', - 'DISABLED', - 'EVACUATING', - 'EVACUATED', -]; +const StorageStates = ['NONE', 'READY', 'OFFLINE', 'FAILED', 'DISABLED', 'EVACUATING', 'EVACUATED']; -export const OK_STATES = [ - 'NONE', - 'READY', -]; +export const OK_STATES = ['NONE', 'READY']; -export const WARNING_STATES = [ - 'EVACUATING', - 'EVACUATED', - 'DISABLED', -]; +export const WARNING_STATES = ['EVACUATING', 'EVACUATED', 'DISABLED']; -export const ERROR_STATES = [ - 'OFFLINE', - 'FAILED', -]; +export const ERROR_STATES = ['OFFLINE', 'FAILED']; export default StorageStates; diff --git a/src/const/StorageTypes.js b/src/const/StorageTypes.js index d21915af..f42b00ea 100644 --- a/src/const/StorageTypes.js +++ b/src/const/StorageTypes.js @@ -1,10 +1,3 @@ -const StorageTypes = [ - 'LOCAL', - 'SHARED', - 'REMOTE', - 'EXTERNAL', - 'ARCHIVE', - 'EXPORT', -]; +const StorageTypes = ['LOCAL', 'SHARED', 'REMOTE', 'EXTERNAL', 'ARCHIVE', 'EXPORT']; export default StorageTypes; diff --git a/src/const/index.js b/src/const/index.js index 525eabeb..6c6f0845 100644 --- a/src/const/index.js +++ b/src/const/index.js @@ -13,27 +13,40 @@ if (publicUrl && publicUrl.startsWith('http')) { } export const APP_BASENAME = publicUrl; -export const getBasename = (baseUrl) => { - if (baseUrl === undefined) return APP_BASENAME; - return [APP_BASENAME.replace(/\/+$/, ''), encodeURIComponent(baseUrl)].join('/'); +export const getBasename = (baseURL) => { + if (baseURL === undefined) return APP_BASENAME; + return [APP_BASENAME.replace(/\/+$/, ''), encodeURIComponent(baseURL)].join('/'); }; export const getVidispineUrlFromCookie = (cookieKey = 'VIDISPINE-SERVER-URL') => { const cookies = {}; - document.cookie - .split('; ') - .forEach((keyValue) => { - const [key, value] = keyValue.split('='); - cookies[key] = value; - }); + document.cookie.split('; ').forEach((keyValue) => { + const [key, value] = keyValue.split('='); + cookies[key] = value; + }); if (cookies[cookieKey]) return decodeURIComponent(cookies[cookieKey]); return undefined; }; -export const getVidispineUrlFromEnv = (envKey = 'VITE_VIDISPINE_URL') => (import.meta.env[envKey] !== '' ? import.meta.env[envKey] : undefined); -export const getVidispineUrlFromWindow = (windowKey = 'VIDISPINE_URL') => (window[windowKey] !== `$${windowKey}` ? window[windowKey] : undefined); -export const getContainerProxyFromWindow = (windowKey = 'CONTAINER_PROXY') => (window[windowKey] !== `$${windowKey}` ? window[windowKey] : undefined); +export const getVidispineUrlFromEnv = (envKey = 'VITE_VIDISPINE_URL') => { + try { + return import.meta.env[envKey] !== '' ? import.meta.env[envKey] : undefined; + } catch (error) { + return undefined; + } +}; +export const getVidispineUrlFromWindow = (windowKey = 'VIDISPINE_URL') => + window[windowKey] !== `$${windowKey}` && window[windowKey] !== '' ? window[windowKey] : undefined; +export const getContainerProxyFromWindow = (windowKey = 'CONTAINER_PROXY') => + window[windowKey] !== `$${windowKey}` && + window[windowKey] !== '' && + window[windowKey] !== 'false' && + window[windowKey] !== 'False' + ? true + : undefined; export const getVidispineUrlFromPath = () => { - const pathnameWithoutBasename = window.location.pathname.replace(APP_BASENAME, '').replace(/^\/+/, ''); + const pathnameWithoutBasename = window.location.pathname + .replace(APP_BASENAME, '') + .replace(/^\/+/, ''); if (pathnameWithoutBasename === undefined) return undefined; const [encodedPath] = pathnameWithoutBasename.split('/'); try { @@ -55,11 +68,10 @@ export const getVidispineUrlFromSessionStorage = (storageKey = 'VIDISPINE_URL') export const setCookiePath = (vidispineUrl) => { const baseName = APP_BASENAME.replace(/^\/+/, ''); const encodedVidispineUrl = encodeURIComponent(vidispineUrl); - return `${ + const cookiePath = `${ baseName !== '' && !baseName.startsWith('/') ? '/' : '' - }${baseName}/${encodedVidispineUrl}${ - encodedVidispineUrl.endsWith('/') ? '' : '/' - }`; + }${baseName}/${encodedVidispineUrl}${encodedVidispineUrl.endsWith('/') ? '' : '/'}`; + return cookiePath; }; export const NOTIFICATION_ENTITY = [ diff --git a/src/const/logos.js b/src/const/logos.js deleted file mode 100644 index 08b57423..00000000 --- a/src/const/logos.js +++ /dev/null @@ -1,5 +0,0 @@ -import logo from '../components/ui/VidispineAltIcon'; -import headerLogo from '../components/ui/VidispineIcon'; - -export const APP_LOGO = logo; -export const HEADER_LOGO = headerLogo; diff --git a/src/const/routes.js b/src/const/routes.js index 5df8de7f..f3f4d7be 100644 --- a/src/const/routes.js +++ b/src/const/routes.js @@ -12,10 +12,8 @@ export default { shapeList: (params) => generatePath('/item/:itemId/shape/', params), shape: (params) => generatePath('/item/:itemId/shape/:shapeId', params), componentList: (params) => generatePath('/item/:itemId/shape/:shapeId/component/', params), - component: (params) => generatePath( - '/item/:itemId/shape/:shapeId/component/:componentId/', - params, - ), + component: (params) => + generatePath('/item/:itemId/shape/:shapeId/component/:componentId/', params), itemVersionList: (params) => generatePath('/item/:itemId/version/', params), itemBulkyMetadataList: (params) => generatePath('/item/:itemId/bulky-metadata/', params), itemSequenceList: (params) => generatePath('/item/:itemId/sequence/', params), diff --git a/src/containers/AccessControl.jsx b/src/containers/AccessControl.jsx index 6b523acb..df7c44cd 100644 --- a/src/containers/AccessControl.jsx +++ b/src/containers/AccessControl.jsx @@ -1,16 +1,16 @@ -import React from 'react'; -import { access as api } from '@vidispine/vdt-api'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; import AccessControlList from '../components/access/AccessControlList'; -import AccessControlRemove from '../components/access/AccessControlRemove'; import AccessControlParams, { ACCESS_PARAMS_FORM } from '../components/access/AccessControlParams'; +import AccessControlRemove from '../components/access/AccessControlRemove'; import withFormActions from '../hoc/withFormActions'; import withUI from '../hoc/withUI'; const ACCESSCONTROL_REMOVE_MODAL = 'ACCESSCONTROL_REMOVE_MODAL'; -class AccessControl extends React.PureComponent { +class AccessControl extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); diff --git a/src/containers/AccessControlMerged.jsx b/src/containers/AccessControlMerged.jsx index c9dc016b..6aa60aa4 100644 --- a/src/containers/AccessControlMerged.jsx +++ b/src/containers/AccessControlMerged.jsx @@ -1,10 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import AccessControlMergedList from '../components/access/AccessControlMergedList'; -import AccessControlMergedParams, { ACCESS_MERGED_PARAMS_FORM } from '../components/access/AccessControlMergedParams'; +import AccessControlMergedParams, { + ACCESS_MERGED_PARAMS_FORM, +} from '../components/access/AccessControlMergedParams'; import withFormActions from '../hoc/withFormActions'; -class AccessControlMerged extends React.PureComponent { +class AccessControlMerged extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,9 +25,7 @@ class AccessControlMerged extends React.PureComponent { } render() { - const { - accessControlMergedDocument, - } = this.state; + const { accessControlMergedDocument } = this.state; const { titleComponent: TitleComponent, tabComponent: TabComponent, @@ -43,17 +43,13 @@ class AccessControlMerged extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ accessControlMergedDocument: response.data })} /> - + ); } diff --git a/src/containers/AccessGraph.jsx b/src/containers/AccessGraph.jsx index 53a50b85..48d231bd 100644 --- a/src/containers/AccessGraph.jsx +++ b/src/containers/AccessGraph.jsx @@ -1,13 +1,14 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { access as AccessApi } from '@vidispine/vdt-api'; -import withFormActions from '../hoc/withFormActions'; -import AccessGraphParams from '../components/access/AccessGraphParams'; import AccessGraphDisplay from '../components/access/AccessGraphDisplay'; +import AccessGraphParams from '../components/access/AccessGraphParams'; +import withFormActions from '../hoc/withFormActions'; const ACCESS_GRAPH_FORM = 'ACCESS_GRAPH_FORM'; -class AccessGraph extends React.PureComponent { +class AccessGraph extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -100,11 +101,7 @@ class AccessGraph extends React.PureComponent { initialValues={{}} onSuccess={this.onSuccess} /> - + ); } diff --git a/src/containers/AnalyzePreset.jsx b/src/containers/AnalyzePreset.jsx index 60b43971..3ab095d9 100644 --- a/src/containers/AnalyzePreset.jsx +++ b/src/containers/AnalyzePreset.jsx @@ -1,16 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { analyzepreset as AnalyzePresetApi } from '@vidispine/vdt-api'; -import TitleHeader from '../components/ui/TitleHeader'; import AnalyzePresetCard from '../components/analyzepreset/AnalyzePresetCard'; import AnalyzePresetRemove from '../components/analyzepreset/AnalyzePresetRemove'; - +import TitleHeader from '../components/ui/TitleHeader'; import withSnackbar from '../hoc/withSnackbar'; const ANALYZEPRESET_REMOVE_MODAL = 'ANALYZEPRESET_REMOVE_MODAL'; -class AnalyzePreset extends React.PureComponent { +class AnalyzePreset extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -28,10 +27,11 @@ class AnalyzePreset extends React.PureComponent { onRefresh() { const { openSnackBar, preset } = this.props; try { - AnalyzePresetApi.getAnalyzePreset({ preset }) - .then((response) => this.setState({ + AnalyzePresetApi.getAnalyzePreset({ preset }).then((response) => + this.setState({ analyzePresetDocument: response.data, - })); + }), + ); } catch (error) { const messageContent = 'Error Getting Analyze Preset'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -54,13 +54,12 @@ class AnalyzePreset extends React.PureComponent { removeModal={ANALYZEPRESET_REMOVE_MODAL} /> - {analyzePresetDocument - && ( - + {analyzePresetDocument && ( + )} - - { analyzePresetListDocument - && ( - + + {analyzePresetListDocument && ( + )}
    diff --git a/src/containers/AuditLog.jsx b/src/containers/AuditLog.jsx index fc398603..6fc28b35 100644 --- a/src/containers/AuditLog.jsx +++ b/src/containers/AuditLog.jsx @@ -1,15 +1,16 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; -import AuditLogTitle from '../components/auditlog/AuditLogTitle'; -import AuditLogFilterCard from '../components/auditlog/AuditLogFilterCard'; import AuditLogCard from '../components/auditlog/AuditLogCard'; +import AuditLogFilterCard from '../components/auditlog/AuditLogFilterCard'; +import AuditLogTitle from '../components/auditlog/AuditLogTitle'; import withFormActions from '../hoc/withFormActions'; import withFormSelectors from '../hoc/withFormSelectors'; const AUDITLOG_FILTER_FORM = 'AUDITLOG_FILTER_FORM'; -class AuditLog extends React.PureComponent { +class AuditLog extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -84,13 +85,7 @@ class AuditLog extends React.PureComponent { } render() { - const { - auditLogDocument, - count, - page, - rowsPerPage, - orderDirection, - } = this.state; + const { auditLogDocument, count, page, rowsPerPage, orderDirection } = this.state; return ( <> - - {auditLogDocument - && ( - + + {auditLogDocument && ( + )} ); diff --git a/src/containers/Auth.jsx b/src/containers/Auth.jsx index 4d7599cc..644b77ec 100644 --- a/src/containers/Auth.jsx +++ b/src/containers/Auth.jsx @@ -1,17 +1,10 @@ -import React from 'react'; +import { Component } from 'react'; + import { withCookies } from 'react-cookie'; -import { noauth as NoAuthApi, utils as api } from '@vidispine/vdt-api'; import { compose } from 'redux'; -import { withSnackbarNoRouter } from '../hoc/withSnackbar'; -import setWelcomeConsoleMessage from '../utils/setWelcomeConsoleMessage'; -import { - AUTH_TOKEN, - AUTH_USERNAME, - AUTH_RUNAS, - AUTH_VIDISPINE_SERVER_URL, - AUTH_IS_AUTHENTICATED, -} from '../const/Auth'; +import { noauth as NoAuthApi, utils as api } from '@vidispine/vdt-api'; + import { getBasename, getVidispineUrlFromCookie, @@ -22,8 +15,18 @@ import { setCookiePath, APP_BASENAME, } from '../const'; +import { + AUTH_TOKEN, + AUTH_USERNAME, + AUTH_RUNAS, + AUTH_VIDISPINE_SERVER_URL, + AUTH_IS_AUTHENTICATED, + PROXY_HEADER, +} from '../const/Auth'; +import { withSnackbarNoRouter } from '../hoc/withSnackbar'; +import setWelcomeConsoleMessage from '../utils/setWelcomeConsoleMessage'; -class Auth extends React.Component { +class Auth extends Component { constructor(props) { super(props); this.setUserName = this.setUserName.bind(this); @@ -42,14 +45,16 @@ class Auth extends React.Component { this.envVidispineUrl = getVidispineUrlFromEnv(); this.pathVidispineUrl = getVidispineUrlFromPath(); this.useContainerProxy = getContainerProxyFromWindow(); - const baseUrl = this.pathVidispineUrl - || this.windowVidispineUrl - || this.envVidispineUrl - || this.cookieVidispineUrl; - this.useDevProxy = this.useContainerProxy === undefined - && baseUrl !== undefined - && (baseUrl === this.windowVidispineUrl || baseUrl === this.envVidispineUrl); - this.basename = getBasename(baseUrl); + const baseURL = + this.pathVidispineUrl || + this.windowVidispineUrl || + this.envVidispineUrl || + this.cookieVidispineUrl; + this.useDevProxy = + this.useContainerProxy === undefined && + baseURL !== undefined && + (baseURL === this.windowVidispineUrl || baseURL === this.envVidispineUrl); + this.basename = getBasename(baseURL); const atBasename = window.location.pathname.startsWith(APP_BASENAME); if (atBasename === false) { window.history.pushState({}, '', APP_BASENAME); @@ -61,22 +66,30 @@ class Auth extends React.Component { const runAs = cookies.get(AUTH_RUNAS, { path: this.basename }); // see if the app is logged in even if it cannot read the token cookie const isAuthenticated = cookies.get(AUTH_IS_AUTHENTICATED, { path: APP_BASENAME }); - if (isAuthenticated === 'true' && this.cookieVidispineUrl && this.pathVidispineUrl === undefined) { - // Set baseUrl in path then reload page to read token cookie - const pathname = window.location.pathname.replace(/(.+?)\/+$/, '$1'); - const encodedBaseUrl = encodeURIComponent(this.cookieVidispineUrl); - const newPath = pathname === '/' ? [encodedBaseUrl, '/'].join('') : [pathname, encodedBaseUrl, ''].join('/'); - window.history.pushState({}, '', newPath); - window.location.reload(); + if ( + isAuthenticated === 'true' && + this.cookieVidispineUrl && + this.pathVidispineUrl === undefined + ) { + // Set baseURL in path then reload page to read token cookie + const appBaseName = APP_BASENAME; + const { cookieVidispineUrl } = this; + const encodedBaseUrl = encodeURIComponent(cookieVidispineUrl); + const currentPathName = window.location.pathname; + const newRootPath = `${appBaseName}/${encodedBaseUrl}/`.replaceAll('//', '/'); + if (!currentPathName.startsWith(newRootPath) && !newRootPath.includes('undefined')) { + window.history.pushState({}, '', newRootPath); + window.location.reload(); + } } if (this.useContainerProxy) { - api.defaultClient.defaults.headers['X-Proxy-URL'] = baseUrl; + api.defaultClient.defaults.headers[PROXY_HEADER] = baseURL; + api.defaultClient.defaults.baseURL = window.location.origin; + } else if (this.useDevProxy) { api.defaultClient.defaults.baseURL = window.location.origin; - } else if (baseUrl && baseUrl !== 'undefined') { - api.defaultClient.defaults.baseURL = this.useDevProxy - ? window.location.origin - : baseUrl; + } else if (baseURL && baseURL !== 'undefined') { + api.defaultClient.defaults.baseURL = this.useDevProxy ? window.location.origin : baseURL; } if (token && token !== 'undefined') { @@ -91,19 +104,21 @@ class Auth extends React.Component { token: token !== 'undefined' ? token : undefined, userName: userName !== 'undefined' ? userName : undefined, runAs: runAs !== 'undefined' ? runAs : undefined, - baseUrl: baseUrl !== 'undefined' ? baseUrl : undefined, + baseURL: baseURL !== 'undefined' ? baseURL : undefined, }; } - setUserName(userName, baseUrl) { + setUserName(userName, baseURL) { const { cookies } = this.props; - cookies.set(AUTH_USERNAME, userName, { path: setCookiePath(baseUrl) }); + const path = setCookiePath(baseURL); + cookies.set(AUTH_USERNAME, userName, { path }); this.setState({ userName }); } - setToken(token, baseUrl) { + setToken(token, baseURL) { const { cookies } = this.props; - cookies.set(AUTH_TOKEN, token, { path: setCookiePath(baseUrl) }); + const path = setCookiePath(baseURL); + cookies.set(AUTH_TOKEN, token, { path: setCookiePath(baseURL) }); cookies.set(AUTH_IS_AUTHENTICATED, true, { path: APP_BASENAME }); api.defaultClient.defaults.headers.Authorization = `token ${token}`; this.setState({ token }); @@ -129,7 +144,7 @@ class Auth extends React.Component { .then(() => { const messageContent = 'Logged Out'; openSnackBar({ messageContent, messageColor: 'secondary' }); - setTimeout(() => this.unsetToken(), 1000); + // setTimeout(() => this.unsetToken(), 1000); this.checkOnline = false; }) .catch(() => { @@ -144,29 +159,27 @@ class Auth extends React.Component { ); } - setRunAs(runAs, baseUrl) { + setRunAs(runAs, baseURL) { const { cookies } = this.props; - cookies.set(AUTH_RUNAS, runAs, { path: setCookiePath(baseUrl) }); + cookies.set(AUTH_RUNAS, runAs, { path: setCookiePath(baseURL) }); api.defaultClient.defaults.headers.RunAs = runAs; this.setState({ runAs }); } - setBaseUrl(baseUrl) { + setBaseUrl(baseURL) { const { cookies } = this.props; - cookies.set(AUTH_VIDISPINE_SERVER_URL, baseUrl, { path: APP_BASENAME }); - if (this.windowVidispineUrl !== baseUrl) { - this.useDevProxy = false; - } + cookies.set(AUTH_VIDISPINE_SERVER_URL, baseURL, { path: APP_BASENAME }); + if (this.windowVidispineUrl !== baseURL) this.useDevProxy = false; if (this.useContainerProxy) { - api.defaultClient.defaults.headers['X-Proxy-URL'] = baseUrl; + api.defaultClient.defaults.headers[PROXY_HEADER] = baseURL; + api.defaultClient.defaults.baseURL = window.location.origin; + } else if (this.useDevProxy) { api.defaultClient.defaults.baseURL = window.location.origin; } else { - api.defaultClient.defaults.baseURL = this.useDevProxy - ? window.location.origin - : baseUrl; + api.defaultClient.defaults.baseURL = baseURL; } - this.setState({ baseUrl }); + this.setState({ baseURL }); } unsetResponseInterceptor() { @@ -177,16 +190,16 @@ class Auth extends React.Component { unsetUserName() { const { cookies } = this.props; - const { baseUrl } = this.state; - cookies.remove(AUTH_USERNAME, { path: setCookiePath(baseUrl) }); + const { baseURL } = this.state; + cookies.remove(AUTH_USERNAME, { path: setCookiePath(baseURL) }); this.setState({ userName: undefined }); this.unsetToken(); } unsetToken() { const { cookies } = this.props; - const { baseUrl } = this.state; - cookies.remove(AUTH_TOKEN, { path: setCookiePath(baseUrl) }); + const { baseURL } = this.state; + cookies.remove(AUTH_TOKEN, { path: setCookiePath(baseURL) }); cookies.remove(AUTH_IS_AUTHENTICATED, { path: APP_BASENAME }); delete api.defaultClient.defaults.headers.Authorization; this.setState({ token: undefined }); @@ -194,8 +207,8 @@ class Auth extends React.Component { unsetRunAs() { const { cookies } = this.props; - const { baseUrl } = this.state; - cookies.remove(AUTH_RUNAS, { path: setCookiePath(baseUrl) }); + const { baseURL } = this.state; + cookies.remove(AUTH_RUNAS, { path: setCookiePath(baseURL) }); delete api.defaultClient.defaults.headers.RunAs; this.setState({ runAs: undefined }); } @@ -204,21 +217,16 @@ class Auth extends React.Component { const { cookies } = this.props; cookies.remove(AUTH_VIDISPINE_SERVER_URL, { path: APP_BASENAME }); delete api.defaultClient.defaults.baseURL; - this.setState({ baseUrl: undefined }); + this.setState({ baseURL: undefined }); } render() { - const { - token, - userName, - runAs, - baseUrl, - } = this.state; + const { token, userName, runAs, baseURL } = this.state; const { loginComponent: Login, appComponent: App, ...props } = this.props; return token ? ( this.setState({ autoImportRuleDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Auto Import Rule'; @@ -35,12 +37,8 @@ class AutoImportRule extends React.PureComponent { } render() { - const { - storageId, - } = this.props; - const { - autoImportRuleDocument, - } = this.state; + const { storageId } = this.props; + const { autoImportRuleDocument } = this.state; return ( <> - {autoImportRuleDocument - && ( - + {autoImportRuleDocument && ( + )} - + ); } diff --git a/src/containers/AutoImportRuleList.jsx b/src/containers/AutoImportRuleList.jsx index 5d2a3f10..bd3db13c 100644 --- a/src/containers/AutoImportRuleList.jsx +++ b/src/containers/AutoImportRuleList.jsx @@ -1,14 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { autoimport as api } from '@vidispine/vdt-api'; -import AutoImportRuleListTitle from '../components/autoimport/AutoImportRuleListTitle'; -import AutoImportRuleListCard from '../components/autoimport/AutoImportRuleListCard'; + import AutoImportRuleDialog from '../components/autoimport/AutoImportRuleDialog'; +import AutoImportRuleListCard from '../components/autoimport/AutoImportRuleListCard'; +import AutoImportRuleListTitle from '../components/autoimport/AutoImportRuleListTitle'; import withSnackbar from '../hoc/withSnackbar'; const AUTOIMPORT_CREATE_MODAL = 'AUTOIMPORT_CREATE_MODAL'; -class AutoImportRuleList extends React.PureComponent { +class AutoImportRuleList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -25,7 +26,8 @@ class AutoImportRuleList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listAutoImport() + api + .listAutoImport() .then((response) => this.setState({ autoImportRuleListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Auto Import Rules'; @@ -34,9 +36,7 @@ class AutoImportRuleList extends React.PureComponent { } render() { - const { - autoImportRuleListDocument, - } = this.state; + const { autoImportRuleListDocument } = this.state; return ( <> - { autoImportRuleListDocument - && ( - + {autoImportRuleListDocument && ( + )} - + ); } diff --git a/src/containers/Collection.jsx b/src/containers/Collection.jsx index 18a2d8c4..390296cb 100644 --- a/src/containers/Collection.jsx +++ b/src/containers/Collection.jsx @@ -1,36 +1,35 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import Typography from '@material-ui/core/Typography'; import { Route, Switch, generatePath } from 'react-router-dom'; +import { compose } from 'redux'; +import AccessControlDialog from '../components/access/AccessControlDialog'; +import CollectionEntityAdd from '../components/collection/CollectionEntityAdd'; +import CollectionExport from '../components/collection/CollectionExport'; +import CollectionFolderMap from '../components/collection/CollectionFolderMap'; +import CollectionRemove from '../components/collection/CollectionRemove'; +import CollectionRename from '../components/collection/CollectionRename'; +import DrawerContainer from '../components/ui/DrawerContainer'; +import ListItemLink from '../components/ui/ListItemLink'; +import Menu, { MenuItem } from '../components/ui/Menu'; +import TitleHeader from '../components/ui/TitleHeader'; import withTabs from '../hoc/withTabs'; import withUI from '../hoc/withUI'; -import CollectionMetadata from './collection/CollectionMetadata'; -import CollectionContent from './collection/CollectionContent'; -import CollectionCollection from './collection/CollectionCollection'; -import CollectionMetadataChangeSetList from './collection/CollectionMetadataChangeSetList'; import AccessControl from './AccessControl'; import AccessControlMerged from './AccessControlMerged'; -import StorageRule from './StorageRule'; -import DeletionLockList from './DeletionLockList'; -import NotificationEntityList from './NotificationEntityList'; -import NotificationEntity from './NotificationEntity'; import AccessGraph from './AccessGraph'; +import CollectionCollection from './collection/CollectionCollection'; +import CollectionContent from './collection/CollectionContent'; +import CollectionMetadata from './collection/CollectionMetadata'; +import CollectionMetadataChangeSetList from './collection/CollectionMetadataChangeSetList'; +import DeletionLockList from './DeletionLockList'; import MetadataGraph from './MetadataGraph'; - -import TitleHeader from '../components/ui/TitleHeader'; -import CollectionRemove from '../components/collection/CollectionRemove'; -import CollectionExport from '../components/collection/CollectionExport'; -import AccessControlDialog from '../components/access/AccessControlDialog'; -import DrawerContainer from '../components/ui/DrawerContainer'; -import ListItemLink from '../components/ui/ListItemLink'; - -import CollectionRename from '../components/collection/CollectionRename'; -import CollectionEntityAdd from '../components/collection/CollectionEntityAdd'; -import CollectionFolderMap from '../components/collection/CollectionFolderMap'; -import Menu, { MenuItem } from '../components/ui/Menu'; +import NotificationEntity from './NotificationEntity'; +import NotificationEntityList from './NotificationEntityList'; +import StorageRule from './StorageRule'; const COLLECTION_METADATA_TAB = 'COLLECTION_METADATA_TAB'; const COLLECTION_COLLECTION_TAB = 'COLLECTION_COLLECTION_TAB'; @@ -148,9 +147,7 @@ const mainComponentRoute = (props) => ( render={() => } {...props} /> - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, ...renderProps - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact, ...renderProps }) => ( ( render={() => } /> ))} - } - /> + } /> ); -class Collection extends React.PureComponent { +class Collection extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -184,7 +178,9 @@ class Collection extends React.PureComponent { onRefresh(...args) { const { onRefresh } = this.state; - if (onRefresh) { onRefresh(...args); } + if (onRefresh) { + onRefresh(...args); + } } setOnRefresh(onRefresh) { @@ -196,13 +192,7 @@ class Collection extends React.PureComponent { } render() { - const { - onChangeTab, - tabValue, - collectionId, - history, - onOpen, - } = this.props; + const { onChangeTab, tabValue, collectionId, history, onOpen } = this.props; const { collectionName } = this.state; const titleComponent = (props) => ( - onOpen({ modalName: COLLECTION_ENTITY_ADD_DIALOG })} - > + onOpen({ modalName: COLLECTION_ENTITY_ADD_DIALOG })}> Add Entity - onOpen({ modalName: COLLECTION_RENAME_DIALOG })} - > + onOpen({ modalName: COLLECTION_RENAME_DIALOG })}> Rename - onOpen({ modalName: COLLECTION_FOLDERMAP_DIALOG })} - > + onOpen({ modalName: COLLECTION_FOLDERMAP_DIALOG })}> Map To Folder - onOpen({ modalName: COLLECTION_REMOVE_DIALOG })} - > + onOpen({ modalName: COLLECTION_REMOVE_DIALOG })}> Delete Collection - )} + } {...props} /> ); diff --git a/src/containers/CollectionSearch.jsx b/src/containers/CollectionSearch.jsx index 217853f1..42985a72 100644 --- a/src/containers/CollectionSearch.jsx +++ b/src/containers/CollectionSearch.jsx @@ -1,25 +1,22 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import Grid from '@material-ui/core/Grid'; +import { compose } from 'redux'; -import TitleHeader from '../components/ui/TitleHeader'; -import CollectionSearchParams from '../components/collection/CollectionSearchParams'; -import CollectionSearchDocument from '../components/collection/CollectionSearch'; -import CollectionListTable from '../components/collection/CollectionListTable'; import CollectionCreate from '../components/collection/CollectionCreate'; - -import withFormActions from '../hoc/withFormActions'; +import CollectionListTable from '../components/collection/CollectionListTable'; +import CollectionSearchDocument from '../components/collection/CollectionSearch'; +import CollectionSearchParams from '../components/collection/CollectionSearchParams'; +import TitleHeader from '../components/ui/TitleHeader'; import withCard from '../hoc/withCard'; +import withFormActions from '../hoc/withFormActions'; import withPaginationForm from '../hoc/withPaginationForm'; const COLLECTION_CREATE_DIALOG = 'COLLECTION_CREATE_DIALOG'; const COLLECTION_SEARCH_FORM = 'COLLECTION_SEARCH_FORM'; -const CollectionListTableCard = compose( - withCard, - withPaginationForm, -)(CollectionListTable); +const CollectionListTableCard = compose(withCard, withPaginationForm)(CollectionListTable); -class CollectionSearch extends React.PureComponent { +class CollectionSearch extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -27,13 +24,7 @@ class CollectionSearch extends React.PureComponent { this.onSetUrlParams = this.onSetUrlParams.bind(this); this.onGetUrlParams = this.onGetUrlParams.bind(this); const params = this.onGetUrlParams(); - const { - first = 1, - number = 10, - orderBy, - orderDirection = 'desc', - ...queryParams - } = params; + const { first = 1, number = 10, orderBy, orderDirection = 'desc', ...queryParams } = params; const sort = orderBy ? [{ field: orderBy, order: `${orderDirection}ending` }] : []; this.initialValues = { queryParams: { @@ -70,10 +61,7 @@ class CollectionSearch extends React.PureComponent { } onSetUrlParams(params) { - const { - location, - history, - } = this.props; + const { location, history } = this.props; const urlParams = new URLSearchParams(location.search); Object.entries(params).forEach(([k, v]) => urlParams.set(k, v)); history.push({ search: urlParams.toString() }); @@ -83,15 +71,14 @@ class CollectionSearch extends React.PureComponent { const { location } = this.props; const urlParams = new URLSearchParams(location.search); const params = {}; - Array.from(urlParams).forEach(([k, v]) => { params[k] = v; }); + Array.from(urlParams).forEach(([k, v]) => { + params[k] = v; + }); return params; } render() { - const { - collectionListDocument, - queryParams, - } = this.state; + const { collectionListDocument, queryParams } = this.state; const { history } = this.props; return ( <> diff --git a/src/containers/Component.jsx b/src/containers/Component.jsx index 41823c2c..45b0a8e4 100644 --- a/src/containers/Component.jsx +++ b/src/containers/Component.jsx @@ -1,17 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import { Route, Switch, generatePath } from 'react-router-dom'; +import { compose } from 'redux'; +import ComponentTitle from '../components/component/ComponentTitle'; +import DrawerContainer from '../components/ui/DrawerContainer'; +import ListItemLink from '../components/ui/ListItemLink'; import { withRouterProps } from '../hoc/withRouterProps'; -import ComponentOverview from './component/ComponentOverview'; import ComponentBulkyMetadata from './component/ComponentBulkyMetadata'; import ComponentBulkyMetadataList from './component/ComponentBulkyMetadataList'; - -import ComponentTitle from '../components/component/ComponentTitle'; -import DrawerContainer from '../components/ui/DrawerContainer'; -import ListItemLink from '../components/ui/ListItemLink'; +import ComponentOverview from './component/ComponentOverview'; const TAB_TITLE = [ { @@ -51,9 +51,7 @@ const mainComponentRoute = (props) => ( render={() => } {...props} /> - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact }) => ( ( ); -class Component extends React.PureComponent { +class Component extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -81,7 +79,9 @@ class Component extends React.PureComponent { onRefresh() { const { onRefresh } = this.state; - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } } setOnRefresh(onRefresh) { @@ -89,11 +89,7 @@ class Component extends React.PureComponent { } render() { - const { - itemId, - shapeId, - componentId, - } = this.props; + const { itemId, shapeId, componentId } = this.props; const titleComponent = (props) => ( ); return ( - <> - - + ); } } diff --git a/src/containers/Configuration.jsx b/src/containers/Configuration.jsx index 6bbf485b..24700986 100644 --- a/src/containers/Configuration.jsx +++ b/src/containers/Configuration.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; + import TitleHeader from '../components/ui/TitleHeader'; import UriListCard from '../components/ui/UriListCard'; - import withUI from '../hoc/withUI'; -class Configuration extends React.PureComponent { +class Configuration extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -22,7 +22,8 @@ class Configuration extends React.PureComponent { onRefresh() { try { - api.getConfiguration() + api + .getConfiguration() .then((response) => this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -47,13 +48,12 @@ class Configuration extends React.PureComponent { code={uriListDocument} codeModal="URIListDocument" /> - { uriListDocument - && ( - `/configuration/${uri}/`} - titleCase - /> + {uriListDocument && ( + `/configuration/${uri}/`} + titleCase + /> )} ); diff --git a/src/containers/Conform.jsx b/src/containers/Conform.jsx index 1d685350..dfcd702e 100644 --- a/src/containers/Conform.jsx +++ b/src/containers/Conform.jsx @@ -1,23 +1,18 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import { getFormValues } from 'redux-form'; +import * as actions from '../actions'; +import ConformCreate, { EDIT_CONFORM_FORM } from '../components/conform/ConformCreate'; import CodeModal from '../components/ui/CodeModal'; import TitleHeader from '../components/ui/TitleHeader'; -import ConformCreate, { EDIT_CONFORM_FORM } from '../components/conform/ConformCreate'; -import * as actions from '../actions'; const CONFORM_CODE_MODAL = 'CONFORM_CODE_MODAL'; -class Conform extends React.PureComponent { +class Conform extends PureComponent { render() { - const { - modalName, - closeModal, - openModal, - conformRequestDocument = {}, - history, - } = this.props; + const { modalName, closeModal, openModal, conformRequestDocument = {}, history } = this.props; return ( <> this.setState({ deletionLockDocument: data })) .catch((error) => this.onFetchError(error)); } catch (error) { @@ -50,12 +51,7 @@ class DeletionLock extends React.PureComponent { render() { const { deletionLockDocument } = this.state; - const { - lockId, - history, - entityId, - entityType, - } = this.props; + const { lockId, history, entityId, entityType } = this.props; return ( <> - {deletionLockListDocument - && ( - - )} + {deletionLockListDocument && ( + + )} history.push(`/deletion-lock/${data.id}`)} + onSuccess={ + entityId ? this.onRefresh : ({ data }) => history.push(`/deletion-lock/${data.id}`) + } entityId={entityId} entityType={entityType} /> diff --git a/src/containers/DocumentMetadata.jsx b/src/containers/DocumentMetadata.jsx index 925e2477..382f7765 100644 --- a/src/containers/DocumentMetadata.jsx +++ b/src/containers/DocumentMetadata.jsx @@ -1,15 +1,16 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { documentmetadata as api } from '@vidispine/vdt-api'; -import TitleHeader from '../components/ui/TitleHeader'; + import DocumentMetadataCard from '../components/documentmetadata/DocumentMetadataCard'; -import DocumentMetadataRemove from '../components/documentmetadata/DocumentMetadataRemove'; import DocumentMetadataDisplayParams from '../components/documentmetadata/DocumentMetadataDisplayParams'; - +import DocumentMetadataRemove from '../components/documentmetadata/DocumentMetadataRemove'; +import TitleHeader from '../components/ui/TitleHeader'; import withSnackbar from '../hoc/withSnackbar'; const DOCUMENT_REMOVE_DIALOG = 'DOCUMENT_REMOVE_DIALOG'; -class DocumentMetadata extends React.PureComponent { +class DocumentMetadata extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -28,7 +29,8 @@ class DocumentMetadata extends React.PureComponent { onRefresh() { const { documentMetadataName } = this.props; try { - api.getDocumentMetadata({ documentMetadataName }) + api + .getDocumentMetadata({ documentMetadataName }) .then((response) => this.setState({ metadataDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { diff --git a/src/containers/DocumentMetadataList.jsx b/src/containers/DocumentMetadataList.jsx index cc61c1b5..024e3520 100644 --- a/src/containers/DocumentMetadataList.jsx +++ b/src/containers/DocumentMetadataList.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { documentmetadata as api } from '@vidispine/vdt-api'; -import TitleHeader from '../components/ui/TitleHeader'; -import DocumentMetadataListCard from '../components/documentmetadata/DocumentMetadataListCard'; -import DocumentMetadataCreate from '../components/documentmetadata/DocumentMetadataCreate'; +import DocumentMetadataCreate from '../components/documentmetadata/DocumentMetadataCreate'; +import DocumentMetadataListCard from '../components/documentmetadata/DocumentMetadataListCard'; +import TitleHeader from '../components/ui/TitleHeader'; import withSnackbar from '../hoc/withSnackbar'; const DOCUMENT_CREATE_DIALOG = 'DOCUMENT_CREATE_DIALOG'; -class DocumentMetadataList extends React.PureComponent { +class DocumentMetadataList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -31,17 +31,15 @@ class DocumentMetadataList extends React.PureComponent { } onRefresh() { - const { - first, - rowsPerPage: number, - } = this.state; + const { first, rowsPerPage: number } = this.state; this.onFetch(first, number); } onFetch(first, number) { const queryParams = { first, number }; try { - api.listDocumentMetadata({ queryParams }) + api + .listDocumentMetadata({ queryParams }) .then((response) => this.setState({ documentListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -63,17 +61,13 @@ class DocumentMetadataList extends React.PureComponent { onChangePage({ page }) { const { rowsPerPage } = this.state; - const first = (page * rowsPerPage) + 1; + const first = page * rowsPerPage + 1; this.setState({ page, first }); this.onFetch(first, rowsPerPage); } render() { - const { - page, - rowsPerPage, - documentListDocument, - } = this.state; + const { page, rowsPerPage, documentListDocument } = this.state; const { history } = this.props; return ( <> diff --git a/src/containers/Echo.jsx b/src/containers/Echo.jsx index e80d9c48..2a684c69 100644 --- a/src/containers/Echo.jsx +++ b/src/containers/Echo.jsx @@ -1,23 +1,21 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import EchoCard from '../components/debug/EchoCard'; -class Echo extends React.PureComponent { +class Echo extends PureComponent { constructor(props) { super(props); this.onSuccess = this.onSuccess.bind(this); this.onFail = this.onFail.bind(this); + document.title = 'VidiCore Admin | XML Echo'; this.state = { result: undefined, error: undefined, }; } - componentDidMount() { - document.title = 'VidiCore Admin | XML Echo'; - } - onSuccess(response) { this.setState({ result: JSON.stringify(response.data, null, 2), @@ -26,21 +24,14 @@ class Echo extends React.PureComponent { } onFail(errors) { - const error = errors?.['_error']; + const error = errors?._error; this.setState({ result: undefined, error }); } render() { const { result, error } = this.state; return ( - <> - - + ); } } diff --git a/src/containers/ErrorLog.jsx b/src/containers/ErrorLog.jsx index 10dbedd4..510fb7ad 100644 --- a/src/containers/ErrorLog.jsx +++ b/src/containers/ErrorLog.jsx @@ -1,11 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { errorlog as api } from '@vidispine/vdt-api'; -import ErrorLogTitle from '../components/errorlog/ErrorLogTitle'; + import ErrorLogCard from '../components/errorlog/ErrorLogCard'; +import ErrorLogTitle from '../components/errorlog/ErrorLogTitle'; import withSnackbar from '../hoc/withSnackbar'; -class ErrorLog extends React.PureComponent { +class ErrorLog extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -22,7 +23,8 @@ class ErrorLog extends React.PureComponent { onRefresh() { try { - api.listErrorLogs() + api + .listErrorLogs() .then((response) => this.setState({ errorLogListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -37,9 +39,7 @@ class ErrorLog extends React.PureComponent { } render() { - const { - errorLogListDocument, - } = this.state; + const { errorLogListDocument } = this.state; return ( <> - {errorLogListDocument - && ( - - )} + {errorLogListDocument && } ); } diff --git a/src/containers/ExportLocation.jsx b/src/containers/ExportLocation.jsx index f5d97091..1144615c 100644 --- a/src/containers/ExportLocation.jsx +++ b/src/containers/ExportLocation.jsx @@ -1,17 +1,17 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import update from 'immutability-helper'; import { exportlocation as api } from '@vidispine/vdt-api'; -import ExportLocationTitle from '../components/exportlocation/ExportLocationTitle'; import ExportLocationCard from '../components/exportlocation/ExportLocationCard'; import ExportLocationRemove from '../components/exportlocation/ExportLocationRemove'; - +import ExportLocationTitle from '../components/exportlocation/ExportLocationTitle'; import withSnackbar from '../hoc/withSnackbar'; const EXPORTLOCATION_REMOVE_MODAL = 'EXPORTLOCATION_REMOVE_MODAL'; -class ExportLocation extends React.PureComponent { +class ExportLocation extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -29,10 +29,11 @@ class ExportLocation extends React.PureComponent { onRefresh() { const { openSnackBar, locationName } = this.props; try { - api.getExportLocation({ locationName }) - .then((response) => this.setState({ + api.getExportLocation({ locationName }).then((response) => + this.setState({ exportLocationDocument: update(response.data, { $unset: ['uri'] }), - })); + }), + ); } catch (error) { const messageContent = 'Error Getting Export Location'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -40,9 +41,7 @@ class ExportLocation extends React.PureComponent { } render() { - const { - locationName, - } = this.props; + const { locationName } = this.props; const { exportLocationDocument } = this.state; return ( <> @@ -53,12 +52,11 @@ class ExportLocation extends React.PureComponent { code={exportLocationDocument} codeModal="ExportLocationDocument" /> - {exportLocationDocument - && ( - + {exportLocationDocument && ( + )} this.setState({ exportLocationListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Export Location List'; @@ -44,16 +45,13 @@ class ExportLocationList extends React.PureComponent { code={exportLocationListDocument} codeModal="ExportLocationListDocument" /> - {exportLocationListDocument - && ( - + {exportLocationListDocument && ( + )} - + ); } diff --git a/src/containers/ExternalId.jsx b/src/containers/ExternalId.jsx index 34114d01..a5ecc9b5 100644 --- a/src/containers/ExternalId.jsx +++ b/src/containers/ExternalId.jsx @@ -1,17 +1,17 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { externalid as api } from '@vidispine/vdt-api'; -import ExternalIdTitle from '../components/externalid/ExternalIdTitle'; + import ExternalIdCard from '../components/externalid/ExternalIdCard'; import ExternalIdDialog from '../components/externalid/ExternalIdDialog'; import ExternalIdRemoveAll from '../components/externalid/ExternalIdRemoveAll'; - +import ExternalIdTitle from '../components/externalid/ExternalIdTitle'; import withSnackbar from '../hoc/withSnackbar'; const EXTERNALID_CREATE_MODAL = 'EXTERNALID_CREATE_MODAL'; const EXTERNALID_REMOVEALL_MODAL = 'EXTERNALID_REMOVEALL_MODAL'; -class ExternalId extends React.PureComponent { +class ExternalId extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -29,10 +29,11 @@ class ExternalId extends React.PureComponent { onRefresh() { const { entityType, entityId, entitySubType } = this.props; try { - api.listExternalId({ - entityType: entitySubType ? `${entityType}/${entitySubType}` : entityType, - entityId, - }) + api + .listExternalId({ + entityType: entitySubType ? `${entityType}/${entitySubType}` : entityType, + entityId, + }) .then((response) => this.setState({ externalIdentifierListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -60,14 +61,13 @@ class ExternalId extends React.PureComponent { entityType={entitySubType ? `${entityType}/${entitySubType}` : entityType} entityId={entityId} /> - {externalIdentifierListDocument - && ( - + {externalIdentifierListDocument && ( + )} this.setState({ - externalIdentifierNamespaceListDocument: response.data, - })) + api + .listExternalIdNamespace() + .then((response) => + this.setState({ + externalIdentifierNamespaceListDocument: response.data, + }), + ) .catch((error) => this.onRefreshError(error)); } catch (error) { this.onRefreshError(error); @@ -52,12 +55,11 @@ class ExternalIdNamespace extends React.PureComponent { code={externalIdentifierNamespaceListDocument} codeModal="ExternalIdentifierNamespaceListDocument" /> - {externalIdentifierNamespaceListDocument - && ( - + {externalIdentifierNamespaceListDocument && ( + )} this.setState({ metadataFieldGroupDocument: response.data })); - api.getSimpleMetadata({ groupName }) + api + .getSimpleMetadata({ groupName }) .then((response) => this.setState({ simpleMetadataDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Metadata Field'; @@ -54,9 +56,7 @@ class FieldGroup extends React.PureComponent { } render() { - const { - groupName, - } = this.props; + const { groupName } = this.props; const { simpleMetadataDocument, metadataFieldGroupDocument } = this.state; return ( <> @@ -67,27 +67,22 @@ class FieldGroup extends React.PureComponent { code={metadataFieldGroupDocument} codeModal="MetadataFieldGroupDocument" /> - {metadataFieldGroupDocument - && ( - + {metadataFieldGroupDocument && ( + )} - {simpleMetadataDocument - && ( - + {simpleMetadataDocument && ( + )} - + ); } diff --git a/src/containers/FieldGroupList.jsx b/src/containers/FieldGroupList.jsx index b4a01f44..444f07f6 100644 --- a/src/containers/FieldGroupList.jsx +++ b/src/containers/FieldGroupList.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { fieldgroup as api } from '@vidispine/vdt-api'; -import FieldGroupListCard from '../components/fieldgroup/FieldGroupListCard'; + import FieldGroupDialog from '../components/fieldgroup/FieldGroupDialog'; +import FieldGroupListCard from '../components/fieldgroup/FieldGroupListCard'; import FieldGroupListTitle from '../components/fieldgroup/FieldGroupListTitle'; - import withSnackbar from '../hoc/withSnackbar'; const FIELDGROUPLIST_CREATE_MODAL = 'FIELDGROUPLIST_CREATE_MODAL'; -class FieldGroupList extends React.PureComponent { +class FieldGroupList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class FieldGroupList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listFieldGroup() + api + .listFieldGroup() .then((response) => this.setState({ metadataFieldGroupListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Field Group List'; @@ -44,16 +45,13 @@ class FieldGroupList extends React.PureComponent { code={metadataFieldGroupListDocument} codeModal="FieldGroupListDocument" /> - {metadataFieldGroupListDocument - && ( - + {metadataFieldGroupListDocument && ( + )} - + ); } diff --git a/src/containers/FieldGroupSearch.jsx b/src/containers/FieldGroupSearch.jsx index 2a092608..2b006860 100644 --- a/src/containers/FieldGroupSearch.jsx +++ b/src/containers/FieldGroupSearch.jsx @@ -1,13 +1,13 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; -import TitleHeader from '../components/ui/TitleHeader'; -import FieldGroupSearchParams from '../components/fieldgroup/FieldGroupSearchParams'; import FieldGroupSearchDocument from '../components/fieldgroup/FieldGroupSearch'; import FieldGroupSearchListTable from '../components/fieldgroup/FieldGroupSearchListTable'; - -import withFormActions from '../hoc/withFormActions'; +import FieldGroupSearchParams from '../components/fieldgroup/FieldGroupSearchParams'; +import TitleHeader from '../components/ui/TitleHeader'; import withCard from '../hoc/withCard'; +import withFormActions from '../hoc/withFormActions'; import withPaginationForm from '../hoc/withPaginationForm'; const FIELDGROUP_SEARCH_FORM = 'FIELDGROUP_SEARCH_FORM'; @@ -16,7 +16,7 @@ const FieldGroupSearchListTableCard = compose( withPaginationForm, )(FieldGroupSearchListTable); -class FieldGroupSearch extends React.PureComponent { +class FieldGroupSearch extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -24,13 +24,7 @@ class FieldGroupSearch extends React.PureComponent { this.onSetUrlParams = this.onSetUrlParams.bind(this); this.onGetUrlParams = this.onGetUrlParams.bind(this); const params = this.onGetUrlParams(); - const { - first = 1, - number = 10, - orderBy, - orderDirection = 'desc', - ...queryParams - } = params; + const { first = 1, number = 10, orderBy, orderDirection = 'desc', ...queryParams } = params; const sort = orderBy ? [{ field: orderBy, order: `${orderDirection}ending` }] : []; this.initialValues = { queryParams: { @@ -68,10 +62,7 @@ class FieldGroupSearch extends React.PureComponent { } onSetUrlParams(params) { - const { - location, - history, - } = this.props; + const { location, history } = this.props; const urlParams = new URLSearchParams(location.search); Object.entries(params).forEach(([k, v]) => urlParams.set(k, v)); history.push({ search: urlParams.toString() }); @@ -81,15 +72,14 @@ class FieldGroupSearch extends React.PureComponent { const { location } = this.props; const urlParams = new URLSearchParams(location.search); const params = {}; - Array.from(urlParams).forEach(([k, v]) => { params[k] = v; }); + Array.from(urlParams).forEach(([k, v]) => { + params[k] = v; + }); return params; } render() { - const { - metadataFieldResultDocument, - queryParams, - } = this.state; + const { metadataFieldResultDocument, queryParams } = this.state; return ( <> ( const mainComponentRoute = (props) => ( - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact }) => ( ( ); -class File extends React.PureComponent { +class File extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -78,7 +88,9 @@ class File extends React.PureComponent { onRefresh() { const { onRefresh } = this.state; - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } } setOnRefresh(onRefresh) { @@ -86,17 +98,8 @@ class File extends React.PureComponent { } render() { - const { - fileId, - onChangeTab, - tabValue, - } = this.props; - const titleComponent = (props) => ( - - ); + const { fileId, onChangeTab, tabValue } = this.props; + const titleComponent = (props) => ; return ( - + {fileListDocument && ( <> {fileListDocument.prefixes && ( diff --git a/src/containers/FileSearch.jsx b/src/containers/FileSearch.jsx index b350bd8c..fdb1f84c 100644 --- a/src/containers/FileSearch.jsx +++ b/src/containers/FileSearch.jsx @@ -1,19 +1,19 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; -import TitleHeader from '../components/ui/TitleHeader'; -import FileSearchParams from '../components/file/FileSearchParams'; -import FileSearchDocument from '../components/file/FileSearch'; import FileListTable from '../components/file/FileListTable'; - -import withFormActions from '../hoc/withFormActions'; +import FileSearchDocument from '../components/file/FileSearch'; +import FileSearchParams from '../components/file/FileSearchParams'; +import TitleHeader from '../components/ui/TitleHeader'; import withCard from '../hoc/withCard'; +import withFormActions from '../hoc/withFormActions'; import withPaginationForm from '../hoc/withPaginationForm'; const FILE_SEARCH_FORM = 'FILE_SEARCH_FORM'; const FileListTableCard = compose(withCard, withPaginationForm)(FileListTable); -class FileSearch extends React.PureComponent { +class FileSearch extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -21,16 +21,8 @@ class FileSearch extends React.PureComponent { this.onSetUrlParams = this.onSetUrlParams.bind(this); this.onGetUrlParams = this.onGetUrlParams.bind(this); const params = this.onGetUrlParams(); - const { - first = 1, - number = 10, - orderBy, - orderDirection = 'desc', - ...queryParams - } = params; - const sort = orderBy - ? [{ field: orderBy, order: `${orderDirection}ending` }] - : []; + const { first = 1, number = 10, orderBy, orderDirection = 'desc', ...queryParams } = params; + const sort = orderBy ? [{ field: orderBy, order: `${orderDirection}ending` }] : []; this.initialValues = { queryParams: { first, diff --git a/src/containers/FullScreenDialog.jsx b/src/containers/FullScreenDialog.jsx index ad7db5ae..75832e7a 100644 --- a/src/containers/FullScreenDialog.jsx +++ b/src/containers/FullScreenDialog.jsx @@ -1,26 +1,26 @@ -import React from 'react'; -import { compose } from 'redux'; +import { forwardRef } from 'react'; -import { withStyles } from '@material-ui/core/styles'; +import AppBar from '@material-ui/core/AppBar'; import Dialog from '@material-ui/core/Dialog'; -import ListItemText from '@material-ui/core/ListItemText'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import Grid from '@material-ui/core/Grid'; +import IconButton from '@material-ui/core/IconButton'; +import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; +import ListItemText from '@material-ui/core/ListItemText'; import ListSubheader from '@material-ui/core/ListSubheader'; -import List from '@material-ui/core/List'; -import AppBar from '@material-ui/core/AppBar'; +import Slide from '@material-ui/core/Slide'; +import { withStyles } from '@material-ui/core/styles'; import Toolbar from '@material-ui/core/Toolbar'; -import IconButton from '@material-ui/core/IconButton'; +import Typography from '@material-ui/core/Typography'; import CloseIcon from '@material-ui/icons/Close'; -import Slide from '@material-ui/core/Slide'; import { Link } from 'react-router-dom'; -import Grid from '@material-ui/core/Grid'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogActions from '@material-ui/core/DialogActions'; -import Typography from '@material-ui/core/Typography'; +import { compose } from 'redux'; -import { withModalNoRouter } from '../hoc/withModal'; import NavSelect from '../components/ui/NavSelect'; import routes from '../const/routes'; +import { withModalNoRouter } from '../hoc/withModal'; const styles = (theme) => ({ appBar: { @@ -36,30 +36,25 @@ const styles = (theme) => ({ }, }); -const Transition = React.forwardRef((props, ref) => ); +const Transition = forwardRef((props, ref) => ); -function FullScreenDialog({ - classes, - open, - onClose, -}) { - const ListLink = ({ to, primary }) => ( +function ListLink({ to, primary, onClose }) { + return ( ); - const ListGroup = ({ subheader, children }) => ( - - { subheader } - - )} - > - { children } +} + +function ListGroup({ subheader, children }) { + return ( + {subheader}}> + {children} ); +} + +function FullScreenDialog({ classes, open, onClose }) { const breakPoints = { lg: 2, md: 3, @@ -92,54 +87,55 @@ function FullScreenDialog({ - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - + + + + + + + @@ -147,101 +143,103 @@ function FullScreenDialog({ - - - - - + + + + + - - + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - - - - + + + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - + + + + - {`Last Commit: ${import.meta.env.VITE_GIT_COMMIT}` - || 'Last Commit: UNKNOWN'} + {`Last Commit: ${import.meta.env.VITE_GIT_COMMIT}` || 'Last Commit: UNKNOWN'}
    diff --git a/src/containers/Group.jsx b/src/containers/Group.jsx index 53844e6a..a8a49d56 100644 --- a/src/containers/Group.jsx +++ b/src/containers/Group.jsx @@ -1,19 +1,19 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { group as api } from '@vidispine/vdt-api'; -import GroupTitle from '../components/group/GroupTitle'; + import GroupCard from '../components/group/GroupCard'; import GroupChildCard from '../components/group/GroupChildCard'; import GroupParentCard from '../components/group/GroupParentCard'; -import GroupUserCard from '../components/group/GroupUserCard'; import GroupRemove from '../components/group/GroupRemove'; +import GroupTitle from '../components/group/GroupTitle'; +import GroupUserCard from '../components/group/GroupUserCard'; import SimpleMetadataCard from '../components/ui/SimpleMetadataCard'; - import withUI from '../hoc/withUI'; const GROUP_REMOVE_DIALOG = 'GROUP_REMOVE_DIALOG'; -class Group extends React.PureComponent { +class Group extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -45,7 +45,8 @@ class Group extends React.PureComponent { onFetch(groupName) { try { - api.getGroup({ groupName }) + api + .getGroup({ groupName }) .then((response) => this.setState({ groupDocument: response.data })) .catch((error) => this.onFetchError(error)); } catch (error) { @@ -73,9 +74,7 @@ class Group extends React.PureComponent { /> {groupDocument && ( <> - + ({ }, }); -class HistoryDialog extends React.PureComponent { +function RequestParam({ value: [paramKey, paramValue] }) { + return ; +} + +function RequestHeader({ value: v }) { + const [headerKey] = v; + let [, headerValue] = v; + if (headerKey && ['authorization'].includes(headerKey.toLowerCase())) + headerValue = headerValue.replace(/[^*]/g, '•'); + return ; +} + +function ResponseHeader({ value: v }) { + return ; +} + +class HistoryDialog extends PureComponent { constructor(props) { super(props); this.onRequest = this.onRequest.bind(this); @@ -62,13 +79,11 @@ class HistoryDialog extends React.PureComponent { this.onClose = this.onClose.bind(this); this.onTransform = this.onTransform.bind(this); this.maxReponsesLength = 20; - this.requestInterceptor = api.defaultClient.interceptors.request.use( - (request) => { - request.requestId = Math.random().toString(36).substr(2, 12); - this.onRequest(request); - return request; - }, - ); + this.requestInterceptor = api.defaultClient.interceptors.request.use((request) => { + request.requestId = Math.random().toString(36).substr(2, 12); + this.onRequest(request); + return request; + }); this.responseInterceptor = api.defaultClient.interceptors.response.use( (response) => { this.onResponse(response); @@ -92,25 +107,21 @@ class HistoryDialog extends React.PureComponent { } onRequest(request) { + const { baseURL } = this.props; if (!request) { return; } const { recentResponses: prevResponses } = this.state; - const { - requestId, - headers = {}, - data: requestData, - method, - url, - baseURL, - } = request; + const { requestId, headers = {}, data: requestData, method, url } = request; let { url: fullUrl } = request; if (baseURL) fullUrl = [baseURL, url].join(''); const requestUrl = new URL(fullUrl); const requestParams = Array.from(requestUrl.searchParams); const requestHeaders = {}; Object.entries(headers).forEach(([key, value]) => { - if (typeof value === 'string') { requestHeaders[key] = value; } + if (typeof value === 'string' && key !== PROXY_HEADER) { + requestHeaders[key] = value; + } }); let requestDataString; let requestContentType; @@ -159,15 +170,8 @@ class HistoryDialog extends React.PureComponent { return; } const { recentResponses: prevResponses } = this.state; - const { - config = {}, - status, - headers: responseHeaders = {}, - data: responseData, - } = response; - const { - requestId, - } = config; + const { config = {}, status, headers: responseHeaders = {}, data: responseData } = response; + const { requestId } = config; let responseDataString; let responseContentType; const findContentTypeKey = (headerKey) => headerKey.toLowerCase() === 'content-type'; @@ -223,16 +227,8 @@ class HistoryDialog extends React.PureComponent { } render() { - const { - classes, - open, - history, - } = this.props; - const { - recentResponses, - displayResponse, - transformResponse, - } = this.state; + const { classes, open, history } = this.props; + const { recentResponses, displayResponse, transformResponse } = this.state; if (open === false) return null; return ( - { displayResponse ? ( + {displayResponse ? (
    this.setState({ - displayResponse: undefined, - transformResponse: undefined, - })} + onClick={() => + this.setState({ + displayResponse: undefined, + transformResponse: undefined, + }) + } style={{ padding: 4 }} > @@ -263,7 +261,9 @@ class HistoryDialog extends React.PureComponent { size="small" onClick={() => this.onTransform(TRANSFORM_JAVASCRIPTAPI)} > - {transformResponse === TRANSFORM_JAVASCRIPTAPI ? 'Hide Javascript API' : 'Show Javascript API'} + {transformResponse === TRANSFORM_JAVASCRIPTAPI + ? 'Hide Javascript API' + : 'Show Javascript API'} - )} + } /> this.setState({ jobProblemListDocument: response.data })); + JobApi.listJob({ path: `/API/job/${jobId}/problem` }).then((response) => + this.setState({ jobProblemListDocument: response.data }), + ); } catch (error) { this.onRefreshError(error); } @@ -136,10 +137,7 @@ class Job extends React.PureComponent { abortDialog={JOB_ABORT_DIALOG} removeDialog={JOB_REMOVE_DIALOG} /> - + @@ -132,10 +125,7 @@ class JobList extends React.PureComponent { autoRefresh={autoRefresh} onChangeAutoRefresh={this.onChangeAutoRefresh} /> - + this.setState({ jobProblemListDocument: response.data })); + JobApi.listJob({ path: '/API/job/problem' }).then((response) => + this.setState({ jobProblemListDocument: response.data }), + ); } catch (error) { const messageContent = 'Error Loading Job Problems'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -42,11 +43,8 @@ class JobProblemList extends React.PureComponent { code={jobProblemListDocument} codeModal="JobProblemListDocument" /> - {jobProblemListDocument - && ( - + {jobProblemListDocument && ( + )} ); diff --git a/src/containers/JobTypeList.jsx b/src/containers/JobTypeList.jsx index 9aa04f5d..ed52c7a6 100644 --- a/src/containers/JobTypeList.jsx +++ b/src/containers/JobTypeList.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { taskdefinition as api } from '@vidispine/vdt-api'; + import JobTypeDialog from '../components/jobtype/JobTypeDialog'; import JobTypeListCard from '../components/jobtype/JobTypeListCard'; import JobTypeListTitle from '../components/jobtype/JobTypeListTitle'; - import withSnackbar from '../hoc/withSnackbar'; const JOBTYPE_CREATE_MODAL = 'JOBTYPE_CREATE_MODAL'; -class JobTypeList extends React.PureComponent { +class JobTypeList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,8 +26,7 @@ class JobTypeList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listJobType() - .then((response) => this.setState({ uriListDocument: response.data })); + api.listJobType().then((response) => this.setState({ uriListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Job Type List'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -45,12 +44,7 @@ class JobTypeList extends React.PureComponent { code={uriListDocument} codeModal="URIListDocument" /> - { uriListDocument - && ( - - )} + {uriListDocument && } history.push(`/task-definition/jobtype/${jobType}/`)} diff --git a/src/containers/Library.jsx b/src/containers/Library.jsx index b7276a37..4a72a058 100644 --- a/src/containers/Library.jsx +++ b/src/containers/Library.jsx @@ -1,26 +1,26 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import { Route, Switch, generatePath } from 'react-router-dom'; +import { compose } from 'redux'; -import withTabs from '../hoc/withTabs'; -import { withRouterProps } from '../hoc/withRouterProps'; - -import LibrarySettings from './library/LibrarySettings'; -import LibraryContent from './library/LibraryContent'; -import AccessControl from './AccessControl'; -import AccessControlMerged from './AccessControlMerged'; -import StorageRule from './StorageRule'; - -import LibraryTitle from '../components/library/LibraryTitle'; +import AccessControlDialog from '../components/access/AccessControlDialog'; +import LibraryExport from '../components/library/LibraryExport'; +import LibraryItemMetadata from '../components/library/LibraryItemMetadata'; import LibraryRemove from '../components/library/LibraryRemove'; +import LibraryTitle from '../components/library/LibraryTitle'; import LibraryUpdate from '../components/library/LibraryUpdate'; -import LibraryItemMetadata from '../components/library/LibraryItemMetadata'; -import LibraryExport from '../components/library/LibraryExport'; -import AccessControlDialog from '../components/access/AccessControlDialog'; import DrawerContainer from '../components/ui/DrawerContainer'; import ListItemLink from '../components/ui/ListItemLink'; +import { withRouterProps } from '../hoc/withRouterProps'; +import withTabs from '../hoc/withTabs'; + +import AccessControl from './AccessControl'; +import AccessControlMerged from './AccessControlMerged'; import DeletionLockList from './DeletionLockList'; +import LibraryContent from './library/LibraryContent'; +import LibrarySettings from './library/LibrarySettings'; +import StorageRule from './StorageRule'; const LIBRARY_SETTINGS_TAB = 'LIBRARY_SETTINGS_TAB'; const LIBRARY_CONTENT_TAB = 'LIBRARY_CONTENT_TAB'; @@ -37,22 +37,41 @@ const LIBRARY_EXPORT_DIALOG = 'LIBRARY_EXPORT_DIALOG'; const TAB_TITLE = [ { - tab: LIBRARY_SETTINGS_TAB, listText: 'Settings', component: LibrarySettings, path: '/library/:libraryId/settings/', + tab: LIBRARY_SETTINGS_TAB, + listText: 'Settings', + component: LibrarySettings, + path: '/library/:libraryId/settings/', }, { - tab: LIBRARY_CONTENT_TAB, listText: 'Content', component: LibraryContent, path: '/library/:libraryId/', exact: true, + tab: LIBRARY_CONTENT_TAB, + listText: 'Content', + component: LibraryContent, + path: '/library/:libraryId/', + exact: true, }, { - tab: ACCESS_TAB, listText: 'Direct Access', component: AccessControl, path: '/library/:libraryId/direct-access/', + tab: ACCESS_TAB, + listText: 'Direct Access', + component: AccessControl, + path: '/library/:libraryId/direct-access/', }, { - tab: ACCESSMERGED_TAB, listText: 'Merged Access', component: AccessControlMerged, path: '/library/:libraryId/merged-access/', + tab: ACCESSMERGED_TAB, + listText: 'Merged Access', + component: AccessControlMerged, + path: '/library/:libraryId/merged-access/', }, { - tab: STORAGERULE_TAB, listText: 'Storage Rules', component: StorageRule, path: '/library/:libraryId/storage-rules/', + tab: STORAGERULE_TAB, + listText: 'Storage Rules', + component: StorageRule, + path: '/library/:libraryId/storage-rules/', }, { - tab: DELETIONLOCK_TAB, listText: 'Deletion Locks', component: DeletionLockList, path: '/library/:libraryId/deletion-locks/', + tab: DELETIONLOCK_TAB, + listText: 'Deletion Locks', + component: DeletionLockList, + path: '/library/:libraryId/deletion-locks/', }, ]; @@ -74,9 +93,7 @@ const listComponentRoute = (props) => ( const mainComponentRoute = (props) => ( - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact }) => ( ( ); -class Library extends React.PureComponent { +class Library extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -114,9 +131,7 @@ class Library extends React.PureComponent { } render() { - const { - onChangeTab, tabValue, libraryId, history, - } = this.props; + const { onChangeTab, tabValue, libraryId, history } = this.props; const titleComponent = (props) => ( - + history.push('/library/')} libraryId={libraryId} /> - + createTheme({ ...outerTheme, palette: { type: 'light' } }); -class Login extends React.PureComponent { +class Login extends PureComponent { constructor(props) { super(props); + document.title = 'VidiCore Admin'; this.onRefresh = this.onRefresh.bind(this); this.onRefreshError = this.onRefreshError.bind(this); this.onSuccess = this.onSuccess.bind(this); @@ -44,27 +46,24 @@ class Login extends React.PureComponent { } componentDidMount() { - document.title = 'VidiCore Admin'; - const { baseUrl } = this.props; - if (baseUrl) { + const { baseURL } = this.props; + if (baseURL) { this.onRefresh(); } } async onRefresh() { - const { onOpen, useDevProxy, useContainerProxy } = this.props; + const { onOpen, useDevProxy, useContainerProxy, baseURL } = this.props; this.setState({ selfTestDocument: undefined }); await this.setState({ loading: true }); - let baseURL = useDevProxy ? window.location.origin : this.props.baseUrl; - if (useContainerProxy) baseURL = window.location.origin; + let proxyBaseURL = useDevProxy ? window.location.origin : baseURL; + if (useContainerProxy) proxyBaseURL = window.location.origin; try { api .listSelfTest({ noAuth: true, - baseURL, - headers: useContainerProxy - ? { 'X-Proxy-URL': this.props.baseUrl } - : {}, + baseURL: proxyBaseURL, + headers: useContainerProxy ? { [PROXY_HEADER]: baseURL } : {}, }) .then(({ data: selfTestDocument }) => { this.setState({ selfTestDocument, loading: false }); @@ -99,57 +98,49 @@ class Login extends React.PureComponent { openSnackBar({ messageContent, messageColor: 'secondary' }); } - onSuccess({ - data: token, userName: newUserName, runAs, baseUrl, - }) { - if (baseUrl) { - const encodedBaseUrl = encodeURIComponent(baseUrl); + onSuccess({ data: token, userName: newUserName, runAs, baseURL }) { + if (baseURL) { + const encodedBaseUrl = encodeURIComponent(baseURL); const encodedPathBaseUrl = getVidispineUrlFromPath() - ? encodeURIComponent(getVidispineUrlFromPath()) : undefined; + ? encodeURIComponent(getVidispineUrlFromPath()) + : undefined; const pathname = window.location.pathname.replace(/(.+?)\/+$/, '$1'); if (!pathname.includes(encodedBaseUrl)) { let newPath; if (encodedPathBaseUrl && pathname.includes(encodedPathBaseUrl)) { newPath = pathname.replace(encodedPathBaseUrl, encodedBaseUrl); } else { - newPath = pathname === '/' ? [encodedBaseUrl, '/'].join('') : [pathname, encodedBaseUrl, ''].join('/'); + newPath = + pathname === '/' + ? [encodedBaseUrl, '/'].join('') + : [pathname, encodedBaseUrl, ''].join('/'); } window.history.pushState({}, '', newPath); } } - const { - setUserName, - setToken, - setRunAs, - setResponseInterceptor, - setBaseUrl, - } = this.props; + const { setUserName, setToken, setRunAs, setResponseInterceptor, setBaseUrl } = this.props; if (runAs) { - setRunAs(runAs, baseUrl); + setRunAs(runAs, baseURL); } setResponseInterceptor(); - setUserName(newUserName, baseUrl); - setToken(token, baseUrl); - setBaseUrl(baseUrl); + setUserName(newUserName, baseURL); + setToken(token, baseURL); + setBaseUrl(baseURL); } - onTestUrl(baseUrl) { + onTestUrl(baseURL) { const { setBaseUrl } = this.props; - setBaseUrl(baseUrl); + setBaseUrl(baseURL); this.onRefresh(); } render() { - const { - selfTestDocument, loading, loadingInit, - } = this.state; - const { - userName, baseUrl, onOpen, useDevProxy, - } = this.props; + const { selfTestDocument, loading, loadingInit } = this.state; + const { userName, baseURL, onOpen, useDevProxy, useContainerProxy } = this.props; const initialValues = { headers: { username: userName, accept: 'text/plain' }, queryParams: { autoRefresh: true, seconds: 604800 }, - baseUrl, + baseURL, }; const { status } = selfTestDocument || {}; return ( @@ -187,6 +178,7 @@ class Login extends React.PureComponent { onTestUrl={this.onTestUrl} status={status} useDevProxy={useDevProxy} + useContainerProxy={useContainerProxy} /> @@ -233,21 +225,19 @@ class Login extends React.PureComponent { item sm={8} style={{ - background: - 'linear-gradient(-45deg,#b0c800,#0068a9 0,#0068a9 33%,#002749 100%,#b0c800 0)', + background: 'linear-gradient(rgba(22, 9, 31, 1), rgba(22, 9, 31, 1))', }} container direction="column" alignItems="center" justifyContent="center" > - @@ -258,7 +248,7 @@ class Login extends React.PureComponent { loadingInit={loadingInit} setLoadingInit={(newState) => this.setState({ loadingInit: newState })} /> - + ); } diff --git a/src/containers/Main.jsx b/src/containers/Main.jsx index 7d12ed6d..b734ca70 100644 --- a/src/containers/Main.jsx +++ b/src/containers/Main.jsx @@ -1,129 +1,121 @@ -import React from 'react'; import { Route, Switch, Redirect } from 'react-router-dom'; import { compose } from 'redux'; -import { withModalNoRouter } from '../hoc/withModal'; + +import LeftSnackbar from '../components/ui/LeftSnackbar'; import { NOTIFICATION_ENTITY } from '../const'; +import withErrorBoundary from '../hoc/withErrorBoundary'; +import { withModalNoRouter } from '../hoc/withModal'; +import AnalyzePreset from './AnalyzePreset'; +import AnalyzePresetList from './AnalyzePresetList'; +import AuditLog from './AuditLog'; +import AutoImportRule from './AutoImportRule'; +import AutoImportRuleList from './AutoImportRuleList'; +import Collection from './Collection'; +import CollectionSearch from './CollectionSearch'; +import Component from './Component'; import Configuration from './Configuration'; -import Indexing from './configuration/Indexing'; +import BulkyMetadata from './configuration/BulkyMetadata'; +import Cors from './configuration/Cors'; +import DatabasePurging from './configuration/DatabasePurging'; import FtpPool from './configuration/FtpPool'; +import Indexing from './configuration/Indexing'; import JobPool from './configuration/JobPool'; -import Properties from './configuration/Properties'; -import Metrics from './configuration/Metrics'; +import JobPriority from './configuration/JobPriority'; import LogReport from './configuration/LogReport'; -import PathAlias from './configuration/PathAlias'; -import Cors from './configuration/Cors'; +import Metrics from './configuration/Metrics'; import OAuth2 from './configuration/OAuth2'; -import BulkyMetadata from './configuration/BulkyMetadata'; -import DatabasePurging from './configuration/DatabasePurging'; -import JobPriority from './configuration/JobPriority'; -import StorageList from './StorageList'; -import Storage from './Storage'; -import StorageMethod from './StorageMethod'; -import ShapeTagList from './ShapeTagList'; -import ShapeTag from './ShapeTag'; -import Version from './Version'; -import Service from './Service'; -import JobTypeList from './JobTypeList'; -import TaskDefinition from './TaskDefinition'; +import PathAlias from './configuration/PathAlias'; +import Properties from './configuration/Properties'; +import Conform from './Conform'; +import DeletionLock from './DeletionLock'; +import DeletionLockList from './DeletionLockList'; +import DocumentMetadata from './DocumentMetadata'; +import DocumentMetadataList from './DocumentMetadataList'; import Echo from './Echo'; -import Javascript from './Javascript'; -import AuditLog from './AuditLog'; -import JobList from './JobList'; -import Job from './Job'; -import JobCreate from './job/JobCreate'; -import ExportLocationList from './ExportLocationList'; +import ErrorLog from './ErrorLog'; import ExportLocation from './ExportLocation'; -import SelfTest from './SelfTest'; -import GroupList from './GroupList'; -import Group from './Group'; -import UserList from './UserList'; -import User from './User'; -import ExternalIdNamespace from './ExternalIdNamespace'; +import ExportLocationList from './ExportLocationList'; import ExternalId from './ExternalId'; -import Search from './Search'; -import Item from './Item'; -import Collection from './Collection'; -import ReindexList from './ReindexList'; -import Wizard from './Wizard'; -import MetadataFieldList from './MetadataFieldList'; -import FieldGroupList from './FieldGroupList'; +import ExternalIdNamespace from './ExternalIdNamespace'; import FieldGroup from './FieldGroup'; -import Import from './Import'; -import FileList from './FileList'; +import FieldGroupList from './FieldGroupList'; +import FieldGroupSearch from './FieldGroupSearch'; import File from './File'; +import FileList from './FileList'; import FileSearch from './FileSearch'; -import StorageRuleList from './StorageRuleList'; -import ErrorLog from './ErrorLog'; -import VxaList from './VxaList'; -import Vxa from './Vxa'; -import LibraryList from './LibraryList'; +import FullScreenDialog from './FullScreenDialog'; +import Group from './Group'; +import GroupList from './GroupList'; +import HistoryDialog from './HistoryDialog'; +import Import from './Import'; +import ImportAccess from './ImportAccess'; +import ImportImp from './ImportImp'; +import ImportSettings from './ImportSettings'; +import ImportSettingsList from './ImportSettingsList'; +import Item from './Item'; +import ItemMetadataGroupSearch from './ItemMetadataGroupSearch'; +import ItemSearch from './ItemSearch'; +import Javascript from './Javascript'; +import Job from './Job'; +import JobCreate from './job/JobCreate'; +import JobList from './JobList'; +import JobProblemList from './JobProblemList'; +import JobTypeList from './JobTypeList'; import Library from './Library'; -import DocumentMetadataList from './DocumentMetadataList'; -import DocumentMetadata from './DocumentMetadata'; -import Conform from './Conform'; +import LibraryList from './LibraryList'; import Metadata from './Metadata'; -import ProjectionList from './ProjectionList'; -import Projection from './Projection'; +import MetadataDataset from './MetadataDataset'; +import MetadataDatasetList from './MetadataDatasetList'; import MetadataField from './MetadataField'; -import NotificationList from './NotificationList'; +import MetadataFieldList from './MetadataFieldList'; +import NotFound from './NotFound'; import Notification from './Notification'; +import NotificationList from './NotificationList'; import NotificationPlaceholder from './NotificationPlaceholder'; import NotificationResourceList from './NotificationResourceList'; -import ImportSettingsList from './ImportSettingsList'; -import ImportSettings from './ImportSettings'; -import ImportAccess from './ImportAccess'; -import TaskGroupList from './TaskGroupList'; -import TaskGroup from './TaskGroup'; +import Projection from './Projection'; +import ProjectionList from './ProjectionList'; import Quota from './Quota'; -import ResourceTypeList from './ResourceTypeList'; -import ResourceList from './ResourceList'; +import ReindexList from './ReindexList'; import Resource from './Resource'; -import StorageGroupList from './StorageGroupList'; -import StorageGroup from './StorageGroup'; -import AutoImportRuleList from './AutoImportRuleList'; -import AutoImportRule from './AutoImportRule'; -import withErrorBoundary from '../hoc/withErrorBoundary'; -import StackTrace from './StackTrace'; -import Transfer from './Transfer'; +import ResourceList from './ResourceList'; +import ResourceTypeList from './ResourceTypeList'; +import ScheduledRequestList from './ScheduledRequestList'; +import Search from './Search'; +import Secret from './Secret'; +import SecretList from './SecretList'; +import SelfTest from './SelfTest'; +import Service from './Service'; import Shape from './Shape'; -import CollectionSearch from './CollectionSearch'; -import ItemSearch from './ItemSearch'; -import ItemMetadataGroupSearch from './ItemMetadataGroupSearch'; import ShapeSearch from './ShapeSearch'; -import FieldGroupSearch from './FieldGroupSearch'; -import ImportImp from './ImportImp'; -import ScheduledRequestList from './ScheduledRequestList'; +import ShapeTag from './ShapeTag'; +import ShapeTagList from './ShapeTagList'; +import StackTrace from './StackTrace'; import Stitch from './Stitch'; -import DeletionLockList from './DeletionLockList'; -import DeletionLock from './DeletionLock'; -import MetadataDatasetList from './MetadataDatasetList'; -import MetadataDataset from './MetadataDataset'; -import NotFound from './NotFound'; -import JobProblemList from './JobProblemList'; -import Component from './Component'; -import AnalyzePresetList from './AnalyzePresetList'; -import AnalyzePreset from './AnalyzePreset'; +import Storage from './Storage'; +import StorageGroup from './StorageGroup'; +import StorageGroupList from './StorageGroupList'; +import StorageList from './StorageList'; +import StorageMethod from './StorageMethod'; +import StorageRuleList from './StorageRuleList'; import Swagger from './Swagger'; -import SecretList from './SecretList'; -import Secret from './Secret'; - +import TaskDefinition from './TaskDefinition'; +import TaskGroup from './TaskGroup'; +import TaskGroupList from './TaskGroupList'; import TopAppBar from './TopAppBar'; -import FullScreenDialog from './FullScreenDialog'; -import HistoryDialog from './HistoryDialog'; -import LeftSnackbar from '../components/ui/LeftSnackbar'; +import Transfer from './Transfer'; +import User from './User'; +import UserList from './UserList'; +import Version from './Version'; +import Vxa from './Vxa'; +import VxaList from './VxaList'; +import Wizard from './Wizard'; const HISTORY_DIALOG = 'HISTORY_DIALOG'; const MAINMENU_DIALOG = 'MAINMENU_DIALOG'; -function Main({ - onOpen, - unsetToken, - unsetRunAs, - unsetResponseInterceptor, - userName, - baseUrl, -}) { +function Main({ onOpen, unsetToken, unsetRunAs, unsetResponseInterceptor, userName, baseURL }) { const toggleHistory = () => onOpen({ modalName: HISTORY_DIALOG }); const toggleMainMenu = () => onOpen({ modalName: MAINMENU_DIALOG }); const onLogout = () => { @@ -134,13 +126,13 @@ function Main({ return (
    - +
    - + - + - - - + + + - - + + - + @@ -220,11 +181,7 @@ function Main({ - + @@ -233,17 +190,9 @@ function Main({ - + - + - + + - - - - - + + + + - + - + - + - - + + - - + + - + diff --git a/src/containers/Metadata.jsx b/src/containers/Metadata.jsx index 1d9d0e9e..c250105a 100644 --- a/src/containers/Metadata.jsx +++ b/src/containers/Metadata.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { metadata as api } from '@vidispine/vdt-api'; -import withSnackbar from '../hoc/withSnackbar'; -import withCard from '../hoc/withCard'; import MetadataEntryDisplay from '../components/metadata/MetadataEntryDisplay'; import TitleHeader from '../components/ui/TitleHeader'; +import withCard from '../hoc/withCard'; +import withSnackbar from '../hoc/withSnackbar'; const MetadataEntryDisplayCard = withCard(MetadataEntryDisplay); -class Metadata extends React.PureComponent { +class Metadata extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -47,7 +47,8 @@ class Metadata extends React.PureComponent { onFetch(metadataUuid) { try { - api.getMetadata({ metadataUuid }) + api + .getMetadata({ metadataUuid }) .then((response) => this.setState({ metadataEntryDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -68,9 +69,7 @@ class Metadata extends React.PureComponent { parentTo="/search/field-group/" onRefresh={this.onRefresh} /> - + ); } diff --git a/src/containers/MetadataDataset.jsx b/src/containers/MetadataDataset.jsx index 988de641..591e667e 100644 --- a/src/containers/MetadataDataset.jsx +++ b/src/containers/MetadataDataset.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { metadatadataset as api } from '@vidispine/vdt-api'; -import MetadataDatasetTitle from '../components/metadatadataset/MetadataDatasetTitle'; import MetadataDatasetCard from '../components/metadatadataset/MetadataDatasetCard'; import MetadataDatasetRemove from '../components/metadatadataset/MetadataDatasetRemove'; +import MetadataDatasetTitle from '../components/metadatadataset/MetadataDatasetTitle'; import withSnackbar from '../hoc/withSnackbar'; const METADATADATASET_REMOVE_MODAL = 'METADATADATASET_REMOVE_MODAL'; -class MetadataDataset extends React.PureComponent { +class MetadataDataset extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -27,7 +27,8 @@ class MetadataDataset extends React.PureComponent { onRefresh() { const { openSnackBar, datasetId } = this.props; try { - api.getMetadataDataset({ datasetId, headers: { accept: 'application/ld+json' } }) + api + .getMetadataDataset({ datasetId, headers: { accept: 'application/ld+json' } }) .then((response) => this.setState({ body: response.request.responseText })); } catch (error) { const messageContent = 'Error Getting Metadata Dataset'; @@ -47,18 +48,10 @@ class MetadataDataset extends React.PureComponent { code={body ? JSON.parse(body) : undefined} codeModal="body" /> - {body - && ( - + {body && ( + )} - + ); } diff --git a/src/containers/MetadataDatasetList.jsx b/src/containers/MetadataDatasetList.jsx index 8ab1d876..d090aa77 100644 --- a/src/containers/MetadataDatasetList.jsx +++ b/src/containers/MetadataDatasetList.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { metadatadataset as api } from '@vidispine/vdt-api'; -import MetadataDatasetListCard from '../components/metadatadataset/MetadataDatasetListCard'; + import MetadataDatasetDialog from '../components/metadatadataset/MetadataDatasetDialog'; +import MetadataDatasetListCard from '../components/metadatadataset/MetadataDatasetListCard'; import MetadataDatasetListTitle from '../components/metadatadataset/MetadataDatasetListTitle'; - import withSnackbar from '../hoc/withSnackbar'; const METADATADATASETLIST_CREATE_MODAL = 'METADATADATASETLIST_CREATE_MODAL'; -class MetadataDatasetList extends React.PureComponent { +class MetadataDatasetList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class MetadataDatasetList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listMetadataDataset() + api + .listMetadataDataset() .then((response) => this.setState({ metadataDatasetListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Metadata Dataset List'; @@ -44,16 +45,13 @@ class MetadataDatasetList extends React.PureComponent { code={metadataDatasetListDocument} codeModal="MetadataDatasetListDocument" /> - {metadataDatasetListDocument - && ( + {metadataDatasetListDocument && ( )} - + ); } diff --git a/src/containers/MetadataField.jsx b/src/containers/MetadataField.jsx index 2686c827..61a183ad 100644 --- a/src/containers/MetadataField.jsx +++ b/src/containers/MetadataField.jsx @@ -1,22 +1,28 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import { compose } from 'redux'; -import withTabs from '../hoc/withTabs'; -import MetadataFieldTitle from '../components/metadatafield/MetadataFieldTitle'; import MetadataFieldRemove from '../components/metadatafield/MetadataFieldRemove'; -import withSnackbar from '../hoc/withSnackbar'; +import MetadataFieldTitle from '../components/metadatafield/MetadataFieldTitle'; import DrawerContainer from '../components/ui/DrawerContainer'; import DrawerListItem from '../components/ui/DrawerListItem'; -import MetadataFieldOverview from './metadatafield/MetadataFieldOverview'; +import withSnackbar from '../hoc/withSnackbar'; +import withTabs from '../hoc/withTabs'; + import MetadataFieldAllowedValues from './metadatafield/MetadataFieldAllowedValues'; +import MetadataFieldOverview from './metadatafield/MetadataFieldOverview'; const METADATAFIELD_OVERVIEW_TAB = 'METADATAFIELD_OVERVIEW_TAB'; const METADATAFIELD_ALLOWEDVALUES_TAB = 'METADATAFIELD_ALLOWEDVALUES_TAB'; const TAB_TITLE = [ { tab: METADATAFIELD_OVERVIEW_TAB, listText: 'Overview', component: MetadataFieldOverview }, - { tab: METADATAFIELD_ALLOWEDVALUES_TAB, listText: 'Allowed Values', component: MetadataFieldAllowedValues }, + { + tab: METADATAFIELD_ALLOWEDVALUES_TAB, + listText: 'Allowed Values', + component: MetadataFieldAllowedValues, + }, ]; const listComponent = ({ onChangeTab, tabValue }) => ( @@ -36,7 +42,7 @@ const listComponent = ({ onChangeTab, tabValue }) => ( const METADATAFIELD_REMOVE_MODAL = 'METADATAFIELD_REMOVE_MODAL'; -class MetadataField extends React.PureComponent { +class MetadataField extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -54,7 +60,9 @@ class MetadataField extends React.PureComponent { onRefresh() { const { onRefresh } = this.state; - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } } setOnRefresh(onRefresh) { @@ -62,11 +70,7 @@ class MetadataField extends React.PureComponent { } render() { - const { - fieldName, - onChangeTab, - tabValue, - } = this.props; + const { fieldName, onChangeTab, tabValue } = this.props; const tabInfo = TAB_TITLE.find((thisTab) => thisTab.tab === tabValue) || TAB_TITLE[0]; const { listText, component: mainComponent } = tabInfo; const titleComponent = (props) => ( @@ -76,7 +80,8 @@ class MetadataField extends React.PureComponent { title={listText} {...props} /> - ); return ( + ); + return ( <> - + ); } diff --git a/src/containers/MetadataFieldList.jsx b/src/containers/MetadataFieldList.jsx index 4b723bc4..06080b12 100644 --- a/src/containers/MetadataFieldList.jsx +++ b/src/containers/MetadataFieldList.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { metadatafield as api } from '@vidispine/vdt-api'; -import MetadataFieldListCard from '../components/metadatafield/MetadataFieldListCard'; + import MetadataFieldDialog from '../components/metadatafield/MetadataFieldDialog'; +import MetadataFieldListCard from '../components/metadatafield/MetadataFieldListCard'; import MetadataFieldListTitle from '../components/metadatafield/MetadataFieldListTitle'; - import withSnackbar from '../hoc/withSnackbar'; const METADATAFIELDLIST_CREATE_MODAL = 'METADATAFIELDLIST_CREATE_MODAL'; -class MetadataFieldList extends React.PureComponent { +class MetadataFieldList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class MetadataFieldList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listMetadataField() + api + .listMetadataField() .then((response) => this.setState({ metadataFieldListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Metadata Field List'; @@ -44,16 +45,13 @@ class MetadataFieldList extends React.PureComponent { code={metadataFieldListDocument} codeModal="MetadataFieldListDocument" /> - {metadataFieldListDocument - && ( - + {metadataFieldListDocument && ( + )} - + ); } diff --git a/src/containers/MetadataGraph.jsx b/src/containers/MetadataGraph.jsx index abb8ef6b..caeb149b 100644 --- a/src/containers/MetadataGraph.jsx +++ b/src/containers/MetadataGraph.jsx @@ -1,15 +1,17 @@ -import React from 'react'; -import { metadata as MetadataApi } from '@vidispine/vdt-api'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; +import { metadata as MetadataApi } from '@vidispine/vdt-api'; + +import MetadataGraphDisplay from '../components/metadata/MetadataGraphDisplay'; +import MetadataGraphParams from '../components/metadata/MetadataGraphParams'; import withFormActions from '../hoc/withFormActions'; import withUI from '../hoc/withUI'; -import MetadataGraphParams from '../components/metadata/MetadataGraphParams'; -import MetadataGraphDisplay from '../components/metadata/MetadataGraphDisplay'; const METADATA_GRAPH_FORM = 'METADATA_GRAPH_FORM'; -class MetadataGraph extends React.PureComponent { +class MetadataGraph extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); diff --git a/src/containers/NotFound.jsx b/src/containers/NotFound.jsx index eb173d80..b4cde5ee 100644 --- a/src/containers/NotFound.jsx +++ b/src/containers/NotFound.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import { withStyles, Typography } from '@material-ui/core'; const styles = () => ({ diff --git a/src/containers/Notification.jsx b/src/containers/Notification.jsx index e4e28c07..c301cfa8 100644 --- a/src/containers/Notification.jsx +++ b/src/containers/Notification.jsx @@ -1,15 +1,16 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { notification as api } from '@vidispine/vdt-api'; + import NotificationCard from '../components/notification/NotificationCard'; import NotificationRemove from '../components/notification/NotificationRemove'; -import capitalizeString from '../utils/capitalizeString'; -import withSnackbar from '../hoc/withSnackbar'; import TitleHeader from '../components/ui/TitleHeader'; +import withSnackbar from '../hoc/withSnackbar'; +import capitalizeString from '../utils/capitalizeString'; const NOTIFICATION_REMOVE_DIALOG = 'NOTIFICATION_REMOVE_DIALOG'; -class Notification extends React.PureComponent { +class Notification extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -28,12 +29,10 @@ class Notification extends React.PureComponent { } onRefresh() { - const { - entityType, - notificationId, - } = this.props; + const { entityType, notificationId } = this.props; try { - api.getNotification({ notificationId, entityType }) + api + .getNotification({ notificationId, entityType }) .then((response) => this.setState({ notificationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -53,15 +52,8 @@ class Notification extends React.PureComponent { } render() { - const { - notificationId, - entityType, - history, - } = this.props; - const { - notificationDocument, - isEditing, - } = this.state; + const { notificationId, entityType, history } = this.props; + const { notificationDocument, isEditing } = this.state; return ( <> this.setState({ notificationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -61,16 +60,8 @@ class NotificationEntity extends React.PureComponent { } render() { - const { - notificationId, - entityType, - entityId, - history, - } = this.props; - const { - notificationDocument, - isEditing, - } = this.state; + const { notificationId, entityType, entityId, history } = this.props; + const { notificationDocument, isEditing } = this.state; return ( <> this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -62,11 +63,7 @@ class NotificationEntityList extends React.PureComponent { } render() { - const { - entityType, - entityId, - history, - } = this.props; + const { entityType, entityId, history } = this.props; const { uriListDocument } = this.state; return ( <> diff --git a/src/containers/NotificationList.jsx b/src/containers/NotificationList.jsx index 5a788e79..3311896d 100644 --- a/src/containers/NotificationList.jsx +++ b/src/containers/NotificationList.jsx @@ -1,16 +1,16 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { notification as api } from '@vidispine/vdt-api'; -import TitleHeader from '../components/ui/TitleHeader'; -import NotificationListCard from '../components/notification/NotificationListCard'; -import NotificationCreate from '../components/notification/NotificationCreate'; +import NotificationCreate from '../components/notification/NotificationCreate'; +import NotificationListCard from '../components/notification/NotificationListCard'; +import TitleHeader from '../components/ui/TitleHeader'; import withUI from '../hoc/withUI'; import capitalizeString from '../utils/capitalizeString'; const NOTIFICATION_CREATE_DIALOG = 'NOTIFICATION_CREATE_DIALOG'; -class NotificationList extends React.PureComponent { +class NotificationList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -48,7 +48,8 @@ class NotificationList extends React.PureComponent { onFetch(entityType) { try { - api.listNotification({ entityType }) + api + .listNotification({ entityType }) .then((response) => this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -57,10 +58,7 @@ class NotificationList extends React.PureComponent { } render() { - const { - entityType, - history, - } = this.props; + const { entityType, history } = this.props; const { uriListDocument } = this.state; return ( <> @@ -75,10 +73,7 @@ class NotificationList extends React.PureComponent { createModal={NOTIFICATION_CREATE_DIALOG} entityType={entityType} /> - + this.setState({ notificationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -51,14 +55,8 @@ class Notification extends React.PureComponent { } render() { - const { - notificationId, - history, - } = this.props; - const { - notificationDocument, - isEditing, - } = this.state; + const { notificationId, history } = this.props; + const { notificationDocument, isEditing } = this.state; return ( <> this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -50,9 +51,7 @@ class NotificationResourceList extends React.PureComponent { } render() { - const { - history, - } = this.props; + const { history } = this.props; const { uriListDocument } = this.state; return ( <> @@ -71,9 +70,7 @@ class NotificationResourceList extends React.PureComponent { header={false} titleCase /> - + - { !isRefreshing && ( + {!isRefreshing && ( this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { diff --git a/src/containers/Quota.jsx b/src/containers/Quota.jsx index 5eef0be8..f4bd11da 100644 --- a/src/containers/Quota.jsx +++ b/src/containers/Quota.jsx @@ -1,21 +1,22 @@ -import React from 'react'; +import { Component } from 'react'; + import { connect } from 'react-redux'; import { quota as QuotaApi } from '@vidispine/vdt-api'; -import QuotaTitle from '../components/quota/QuotaTitle'; -import QuotaRemove from '../components/quota/QuotaRemove'; + +import * as actions from '../actions'; import QuotaDialog from '../components/quota/QuotaDialog'; -import QuotaList from '../components/quota/QuotaList'; import QuotaFilter from '../components/quota/QuotaFilter'; - +import QuotaList from '../components/quota/QuotaList'; +import QuotaRemove from '../components/quota/QuotaRemove'; +import QuotaTitle from '../components/quota/QuotaTitle'; import CodeModal from '../components/ui/CodeModal'; -import * as actions from '../actions'; const QUOTA_CODE_MODAL = 'QUOTA_CODE_MODAL'; const QUOTA_REMOVE_MODAL = 'QUOTA_REMOVE_MODAL'; const QUOTA_CREATE_MODAL = 'QUOTA_CREATE_MODAL'; -class AccessControl extends React.Component { +class AccessControl extends Component { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -50,10 +51,7 @@ class AccessControl extends React.Component { } onRemove(ruleId) { - const { - openSnackBar, - closeModal, - } = this.props; + const { openSnackBar, closeModal } = this.props; return () => { QuotaApi.removeQuota({ ruleId }) .then(() => { @@ -78,15 +76,8 @@ class AccessControl extends React.Component { } render() { - const { - quotaRuleListDocument, - currentRuleId, - } = this.state; - const { - closeModal, - modalName, - openModal, - } = this.props; + const { quotaRuleListDocument, currentRuleId } = this.state; + const { closeModal, modalName, openModal } = this.props; return ( <> openModal({ modalName: QUOTA_CREATE_MODAL })} onRefresh={this.onRefresh} /> - + - { currentRuleId - && ( + {currentRuleId && ( - )} + )} { const { [indexName]: reindexRequestDocument = {} } = this.state; const { status } = reindexRequestDocument; - return (RUNNING_STATES.includes(status)); + return RUNNING_STATES.includes(status); }); if (isRunning === undefined) { clearInterval(this.timer); @@ -68,7 +62,8 @@ class ReindexList extends React.PureComponent { onFetch(indexName) { try { - api.getReindex({ indexName }) + api + .getReindex({ indexName }) .then((response) => this.setState({ [indexName]: response.data })) .catch((error) => { if (!error.response) { @@ -96,8 +91,7 @@ class ReindexList extends React.PureComponent { code={this.state} codeModal="All reindexRequestDocument" /> - { - INDEX_NAMES.map((indexName) => ( + {INDEX_NAMES.map((indexName) => ( - )) - } + ))} ); } diff --git a/src/containers/Resource.jsx b/src/containers/Resource.jsx index 88204b80..29163d20 100644 --- a/src/containers/Resource.jsx +++ b/src/containers/Resource.jsx @@ -1,19 +1,20 @@ -import React from 'react'; -import { connect } from 'react-redux'; +import { PureComponent } from 'react'; + import startCase from 'lodash.startcase'; +import { connect } from 'react-redux'; import { resource as api } from '@vidispine/vdt-api'; -import ResourceTitle from '../components/resource/ResourceTitle'; + +import * as actions from '../actions'; import ResourceCard from '../components/resource/ResourceCard'; import ResourceRemove from '../components/resource/ResourceRemove'; +import ResourceTitle from '../components/resource/ResourceTitle'; import CodeModal from '../components/ui/CodeModal'; -import * as actions from '../actions'; - const RESOURCE_CODE_MODAL = 'RESOURCELIST_CODE_MODAL'; const RESOURCE_REMOVE_MODAL = 'RESOURCE_REMOVE_MODAL'; -class Resource extends React.PureComponent { +class Resource extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -31,7 +32,8 @@ class Resource extends React.PureComponent { onRefresh() { const { openSnackBar, resourceType, resourceId } = this.props; try { - api.getResource({ resourceType, resourceId }) + api + .getResource({ resourceType, resourceId }) .then((response) => this.setState({ resourceDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Resource'; @@ -40,18 +42,9 @@ class Resource extends React.PureComponent { } render() { - const { - resourceType, - resourceId, - modalName, - closeModal, - openModal, - openSnackBar, - history, - } = this.props; - const { - resourceDocument, - } = this.state; + const { resourceType, resourceId, modalName, closeModal, openModal, openSnackBar, history } = + this.props; + const { resourceDocument } = this.state; return ( <> - {resourceDocument - && ( - + {resourceDocument && ( + )} this.setState({ resourceListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Resource List'; @@ -55,16 +57,8 @@ class ResourceList extends React.PureComponent { } render() { - const { - modalName, - closeModal, - openModal, - resourceType, - history, - } = this.props; - const { - resourceListDocument, - } = this.state; + const { modalName, closeModal, openModal, resourceType, history } = this.props; + const { resourceListDocument } = this.state; return ( <> - { resourceListDocument - && ( - + {resourceListDocument && ( + )} @@ -99,7 +92,9 @@ class ResourceList extends React.PureComponent { function mapStateToProps(state, ownProps) { const { resourceType } = ownProps.match.params; - const { ui: { modalName } } = state; + const { + ui: { modalName }, + } = state; return { modalName, resourceType, diff --git a/src/containers/ResourceTypeList.jsx b/src/containers/ResourceTypeList.jsx index 489e5d0f..8a18fcde 100644 --- a/src/containers/ResourceTypeList.jsx +++ b/src/containers/ResourceTypeList.jsx @@ -1,16 +1,17 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import { resource as api } from '@vidispine/vdt-api'; -import ResourceTypeListTitle from '../components/resource/ResourceTypeListTitle'; -import ResourceTypeListCard from '../components/resource/ResourceTypeListCard'; -import CodeModal from '../components/ui/CodeModal'; import * as actions from '../actions'; +import ResourceTypeListCard from '../components/resource/ResourceTypeListCard'; +import ResourceTypeListTitle from '../components/resource/ResourceTypeListTitle'; +import CodeModal from '../components/ui/CodeModal'; const RESOURCETYPELIST_CODE_MODAL = 'RESOURCETYPELIST_CODE_MODAL'; -class ResourceTypeList extends React.PureComponent { +class ResourceTypeList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -27,7 +28,8 @@ class ResourceTypeList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listResource() + api + .listResource() .then((response) => this.setState({ resourceTypeListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Resource Types'; @@ -36,28 +38,19 @@ class ResourceTypeList extends React.PureComponent { } render() { - const { - modalName, - closeModal, - openModal, - } = this.props; - const { - resourceTypeListDocument, - } = this.state; + const { modalName, closeModal, openModal } = this.props; + const { resourceTypeListDocument } = this.state; return ( <> openModal({ modalName: RESOURCETYPELIST_CODE_MODAL })} onRefresh={this.onRefresh} /> - { resourceTypeListDocument - && ( - + {resourceTypeListDocument && ( + )} { document.title = 'VidiCore Admin | Scheduled Requests'; - const onRefresh = () => { submitForm(SCHEDULED_FILTER_FORM); }; - const [scheduledRequestListDocument, setScheduledRequestListDocument] = React.useState(); + const onRefresh = () => { + submitForm(SCHEDULED_FILTER_FORM); + }; + const [scheduledRequestListDocument, setScheduledRequestListDocument] = useState(); const onSuccess = ({ data }) => setScheduledRequestListDocument(data); - React.useEffect(onRefresh, []); + useEffect(onRefresh, [submitForm]); return ( <> { onRefresh={onRefresh} removeModal={SCHEDULED_REMOVEALL} /> - + {scheduledRequestListDocument && ( - + )} - + ); }); diff --git a/src/containers/Search.jsx b/src/containers/Search.jsx index babd2f6a..1a4488ac 100644 --- a/src/containers/Search.jsx +++ b/src/containers/Search.jsx @@ -1,23 +1,20 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import Grid from '@material-ui/core/Grid'; +import { compose } from 'redux'; -import TitleHeader from '../components/ui/TitleHeader'; -import SearchParams from '../components/search/SearchParams'; import SearchDocument from '../components/search/SearchDocument'; import SearchListTable from '../components/search/SearchListTable'; - -import withFormActions from '../hoc/withFormActions'; +import SearchParams from '../components/search/SearchParams'; +import TitleHeader from '../components/ui/TitleHeader'; import withCard from '../hoc/withCard'; +import withFormActions from '../hoc/withFormActions'; import withPaginationForm from '../hoc/withPaginationForm'; const SEARCH_FORM = 'SEARCH_FORM'; -const SearchListTableCard = compose( - withCard, - withPaginationForm, -)(SearchListTable); +const SearchListTableCard = compose(withCard, withPaginationForm)(SearchListTable); -class Search extends React.PureComponent { +class Search extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -25,13 +22,7 @@ class Search extends React.PureComponent { this.onSetUrlParams = this.onSetUrlParams.bind(this); this.onGetUrlParams = this.onGetUrlParams.bind(this); const params = this.onGetUrlParams(); - const { - first = 1, - number = 10, - orderBy, - orderDirection = 'desc', - ...queryParams - } = params; + const { first = 1, number = 10, orderBy, orderDirection = 'desc', ...queryParams } = params; const sort = orderBy ? [{ field: orderBy, order: `${orderDirection}ending` }] : []; this.initialValues = { queryParams: { @@ -68,10 +59,7 @@ class Search extends React.PureComponent { } onSetUrlParams(params) { - const { - location, - history, - } = this.props; + const { location, history } = this.props; const urlParams = new URLSearchParams(location.search); Object.entries(params).forEach(([k, v]) => urlParams.set(k, v)); history.push({ search: urlParams.toString() }); @@ -81,15 +69,14 @@ class Search extends React.PureComponent { const { location } = this.props; const urlParams = new URLSearchParams(location.search); const params = {}; - Array.from(urlParams).forEach(([k, v]) => { params[k] = v; }); + Array.from(urlParams).forEach(([k, v]) => { + params[k] = v; + }); return params; } render() { - const { - searchResultDocument, - queryParams, - } = this.state; + const { searchResultDocument, queryParams } = this.state; return ( <> - )} + } addAccessControl={null} entityId={null} /> diff --git a/src/containers/SecretList.jsx b/src/containers/SecretList.jsx index c87e83ef..4c136103 100644 --- a/src/containers/SecretList.jsx +++ b/src/containers/SecretList.jsx @@ -1,18 +1,19 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; import { secret as SecretApi } from '@vidispine/vdt-api'; -import TitleHeader from '../components/ui/TitleHeader'; -import routes from '../const/routes'; import SecretCreate from '../components/secret/SecretCreate'; import SecretListCard from '../components/secret/SecretListCard'; -import withSnackbar from '../hoc/withSnackbar'; +import TitleHeader from '../components/ui/TitleHeader'; +import routes from '../const/routes'; import withFormActions from '../hoc/withFormActions'; +import withSnackbar from '../hoc/withSnackbar'; const SECRET_CREATE_MODAL = 'SECRET_CREATE_MODAL'; -class SecretList extends React.PureComponent { +class SecretList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -50,9 +51,7 @@ class SecretList extends React.PureComponent { codeModal="SecretListDocument" createModal={SECRET_CREATE_MODAL} /> - {secretListDocument && ( - - )} + {secretListDocument && } history.push(routes.secret({ alias }))} diff --git a/src/containers/SelfTest.jsx b/src/containers/SelfTest.jsx index 1e5a9f35..1eb61c3c 100644 --- a/src/containers/SelfTest.jsx +++ b/src/containers/SelfTest.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { selftest as api } from '@vidispine/vdt-api'; -import SelfTestTitle from '../components/selftest/SelfTestTitle'; -import SelfTestListCard from '../components/selftest/SelfTestListCard'; +import SelfTestListCard from '../components/selftest/SelfTestListCard'; +import SelfTestTitle from '../components/selftest/SelfTestTitle'; import withSnackbar from '../hoc/withSnackbar'; -class SelfTest extends React.PureComponent { +class SelfTest extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,7 +23,8 @@ class SelfTest extends React.PureComponent { onRefresh() { try { - api.listSelfTest() + api + .listSelfTest() .then((response) => this.setState({ selfTestDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -46,12 +47,7 @@ class SelfTest extends React.PureComponent { code={selfTestDocument} codeModal="SelfTestDocument" /> - {selfTestDocument - && ( - - )} + {selfTestDocument && } ); } diff --git a/src/containers/Service.jsx b/src/containers/Service.jsx index 2621d514..94174899 100644 --- a/src/containers/Service.jsx +++ b/src/containers/Service.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { service as api } from '@vidispine/vdt-api'; -import ServiceTitle from '../components/service/ServiceTitle'; -import ServiceListCard from '../components/service/ServiceListCard'; +import ServiceListCard from '../components/service/ServiceListCard'; +import ServiceTitle from '../components/service/ServiceTitle'; import withSnackbar from '../hoc/withSnackbar'; -class Service extends React.PureComponent { +class Service extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,7 +23,8 @@ class Service extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.getServiceList() + api + .getServiceList() .then((response) => this.setState({ vidispineServiceListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Service List'; @@ -40,12 +41,11 @@ class Service extends React.PureComponent { code={vidispineServiceListDocument} codeModal="VidispineServiceListDocument" /> - {vidispineServiceListDocument - && ( - + {vidispineServiceListDocument && ( + )} ); diff --git a/src/containers/Shape.jsx b/src/containers/Shape.jsx index f6cdf9e0..62a490d1 100644 --- a/src/containers/Shape.jsx +++ b/src/containers/Shape.jsx @@ -1,33 +1,33 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import { Route, Switch, generatePath } from 'react-router-dom'; +import { compose } from 'redux'; -import { withRouterProps } from '../hoc/withRouterProps'; - -import ShapeOverview from './shape/ShapeOverview'; -import ShapeBulkyMetadata from './shape/ShapeBulkyMetadata'; -import ShapeBulkyMetadataList from './shape/ShapeBulkyMetadataList'; -import ShapeGraph from './shape/ShapeGraph'; -import ShapeCpl from './shape/ShapeCpl'; -import ShapeFileList from './shape/ShapeFileList'; - -import ShapeTitle from '../components/shape/ShapeTitle'; -import ShapeDelete from '../components/shape/ShapeDelete'; -import ShapeTranscode from '../components/shape/ShapeTranscode'; -import ShapeDeduction from '../components/shape/ShapeDeduction'; -import ShapeAnalyze from '../components/shape/ShapeAnalyze'; import ShapeAddComponent from '../components/shape/ShapeAddComponent'; -import ShapeCreateComponentPlaceholder from '../components/shape/ShapeCreateComponentPlaceholder'; -import ShapeAddTag from '../components/shape/ShapeAddTag'; -import ShapeRemoveTag from '../components/shape/ShapeRemoveTag'; import ShapeAddMimeType from '../components/shape/ShapeAddMimeType'; -import ShapeRemoveMimeType from '../components/shape/ShapeRemoveMimeType'; +import ShapeAddTag from '../components/shape/ShapeAddTag'; +import ShapeAnalyze from '../components/shape/ShapeAnalyze'; +import ShapeCreateComponentPlaceholder from '../components/shape/ShapeCreateComponentPlaceholder'; +import ShapeDeduction from '../components/shape/ShapeDeduction'; +import ShapeDelete from '../components/shape/ShapeDelete'; import ShapeExport from '../components/shape/ShapeExport'; import ShapeImpExport from '../components/shape/ShapeImpExport'; import ShapePlaceholderUpdate from '../components/shape/ShapePlaceholderUpdate'; +import ShapeRemoveMimeType from '../components/shape/ShapeRemoveMimeType'; +import ShapeRemoveTag from '../components/shape/ShapeRemoveTag'; +import ShapeTitle from '../components/shape/ShapeTitle'; +import ShapeTranscode from '../components/shape/ShapeTranscode'; import DrawerContainer from '../components/ui/DrawerContainer'; import ListItemLink from '../components/ui/ListItemLink'; +import { withRouterProps } from '../hoc/withRouterProps'; + +import ShapeBulkyMetadata from './shape/ShapeBulkyMetadata'; +import ShapeBulkyMetadataList from './shape/ShapeBulkyMetadataList'; +import ShapeCpl from './shape/ShapeCpl'; +import ShapeFileList from './shape/ShapeFileList'; +import ShapeGraph from './shape/ShapeGraph'; +import ShapeOverview from './shape/ShapeOverview'; const SHAPE_REMOVE_DIALOG = 'SHAPE_REMOVE_DIALOG'; const SHAPE_TRANSCODE_DIALOG = 'SHAPE_TRANSCODE_DIALOG'; @@ -96,9 +96,7 @@ const mainComponentRoute = (props) => ( render={() => } {...props} /> - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact }) => ( ( ); -class Shape extends React.PureComponent { +class Shape extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -126,7 +124,9 @@ class Shape extends React.PureComponent { onRefresh() { const { onRefresh } = this.state; - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } } setOnRefresh(onRefresh) { @@ -134,11 +134,7 @@ class Shape extends React.PureComponent { } render() { - const { - itemId, - shapeId, - history, - } = this.props; + const { itemId, shapeId, history } = this.props; const titleComponent = (props) => ( urlParams.set(k, v)); history.push({ search: urlParams.toString() }); @@ -80,15 +68,14 @@ class ShapeSearch extends React.PureComponent { const { location } = this.props; const urlParams = new URLSearchParams(location.search); const params = {}; - Array.from(urlParams).forEach(([k, v]) => { params[k] = v; }); + Array.from(urlParams).forEach(([k, v]) => { + params[k] = v; + }); return params; } render() { - const { - shapeListDocument, - queryParams, - } = this.state; + const { shapeListDocument, queryParams } = this.state; return ( <> this.setState({ transcodePresetDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Shape Tag'; @@ -40,17 +43,8 @@ class ShapeTagRule extends React.PureComponent { } render() { - const { - tagName, - modalName, - closeModal, - openModal, - openSnackBar, - history, - } = this.props; - const { - transcodePresetDocument, - } = this.state; + const { tagName, modalName, closeModal, openModal, openSnackBar, history } = this.props; + const { transcodePresetDocument } = this.state; return ( <> - {transcodePresetDocument - && ( - + {transcodePresetDocument && ( + )} this.setState({ uriListDocument: response.data })); + api.listShapeTag().then((response) => this.setState({ uriListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Shape Tag List'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -38,15 +38,8 @@ class ShapeTagList extends React.PureComponent { } render() { - const { - modalName, - closeModal, - openModal, - history, - } = this.props; - const { - uriListDocument, - } = this.state; + const { modalName, closeModal, openModal, history } = this.props; + const { uriListDocument } = this.state; return ( <> openModal({ modalName: SHAPETAG_CREATE_MODAL })} onRefresh={this.onRefresh} /> - { uriListDocument - && ( - - )} + {uriListDocument && } @@ -77,7 +65,9 @@ class ShapeTagList extends React.PureComponent { } function mapStateToProps(state) { - const { ui: { modalName } } = state; + const { + ui: { modalName }, + } = state; return { modalName, }; diff --git a/src/containers/StackTrace.jsx b/src/containers/StackTrace.jsx index f64978ee..06c6540e 100644 --- a/src/containers/StackTrace.jsx +++ b/src/containers/StackTrace.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { service as api } from '@vidispine/vdt-api'; -import StackTraceTitle from '../components/service/StackTraceTitle'; -import StackTraceCard from '../components/service/StackTraceCard'; +import StackTraceCard from '../components/service/StackTraceCard'; +import StackTraceTitle from '../components/service/StackTraceTitle'; import withSnackbar from '../hoc/withSnackbar'; -class Service extends React.PureComponent { +class Service extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -24,8 +24,7 @@ class Service extends React.PureComponent { const { openSnackBar } = this.props; this.setState({ stacktrace: undefined }); try { - api.getStackTrace() - .then((response) => this.setState({ stacktrace: response.data })); + api.getStackTrace().then((response) => this.setState({ stacktrace: response.data })); } catch (error) { const messageContent = 'Error Loading Stack Trace'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -36,13 +35,8 @@ class Service extends React.PureComponent { const { stacktrace } = this.state; return ( <> - - + + ); } diff --git a/src/containers/Stitch.jsx b/src/containers/Stitch.jsx index 9862d21e..e1c3a905 100644 --- a/src/containers/Stitch.jsx +++ b/src/containers/Stitch.jsx @@ -1,28 +1,22 @@ -import React from 'react'; +import { PureComponent } from 'react'; -import TitleHeader from '../components/ui/TitleHeader'; import StitchCard from '../components/stitch/StitchCard'; +import TitleHeader from '../components/ui/TitleHeader'; -export default class Stitch extends React.PureComponent { +export default class Stitch extends PureComponent { constructor(props) { super(props); + document.title = 'VidiCore Admin | Stitch'; this.state = { url: undefined, }; } - componentDidMount() { - document.title = 'VidiCore Admin | Stitch'; - } - render() { const { url } = this.state; return ( <> - + this.setState({ url: newUrl })} diff --git a/src/containers/Storage.jsx b/src/containers/Storage.jsx index 7313df7b..11ada6df 100644 --- a/src/containers/Storage.jsx +++ b/src/containers/Storage.jsx @@ -1,16 +1,17 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import { storage as api } from '@vidispine/vdt-api'; -import StorageTitle from '../components/storage/StorageTitle'; + +import * as actions from '../actions'; import StorageCard from '../components/storage/StorageCard'; -import StorageRemove from '../components/storage/StorageRemove'; -import StorageMethodDialog from '../components/storage/StorageMethodDialog'; -import StorageType from '../components/storage/StorageType'; import StorageEvacuate from '../components/storage/StorageEvacuate'; import StorageEvacuateCancel from '../components/storage/StorageEvacuateCancel'; - -import * as actions from '../actions'; +import StorageMethodDialog from '../components/storage/StorageMethodDialog'; +import StorageRemove from '../components/storage/StorageRemove'; +import StorageTitle from '../components/storage/StorageTitle'; +import StorageType from '../components/storage/StorageType'; const STORAGE_REMOVE_MODAL = 'STORAGE_REMOVE_MODAL'; const STORAGEMETHOD_CREATE_MODAL = 'STORAGEMETHOD_CREATE_MODAL'; @@ -18,7 +19,7 @@ const STORAGE_TYPE_DIALOG = 'STORAGE_TYPE_DIALOG'; const STORAGE_EVACUATE_DIALOG = 'STORAGE_EVACUATE_DIALOG'; const STORAGE_EVACUATE_CANCEL_DIALOG = 'STORAGE_EVACUATE_CANCEL_DIALOG'; -class Storage extends React.PureComponent { +class Storage extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -50,7 +51,8 @@ class Storage extends React.PureComponent { onFetch(storageId) { try { - api.getStorage({ storageId }) + api + .getStorage({ storageId }) .then((response) => this.setState({ storageDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -61,7 +63,8 @@ class Storage extends React.PureComponent { onRescan() { const { storageId, openSnackBar } = this.props; try { - api.rescanStorage({ storageId }) + api + .rescanStorage({ storageId }) .then(() => { const messageContent = 'Rescan Started'; openSnackBar({ messageContent }); @@ -80,17 +83,8 @@ class Storage extends React.PureComponent { } render() { - const { - storageId, - modalName, - closeModal, - openModal, - openSnackBar, - history, - } = this.props; - const { - storageDocument, - } = this.state; + const { storageId, modalName, closeModal, openModal, openSnackBar, history } = this.props; + const { storageDocument } = this.state; return ( <> {storageDocument && ( - openModal({ modalName: STORAGEMETHOD_CREATE_MODAL })} - /> + openModal({ modalName: STORAGEMETHOD_CREATE_MODAL })} + /> )} this.setState({ storageGroupDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Storage Group'; @@ -41,17 +43,8 @@ class StorageGroup extends React.PureComponent { } render() { - const { - groupName, - modalName, - closeModal, - openModal, - openSnackBar, - history, - } = this.props; - const { - storageGroupDocument, - } = this.state; + const { groupName, modalName, closeModal, openModal, openSnackBar, history } = this.props; + const { storageGroupDocument } = this.state; return ( <> - {storageGroupDocument - && ( - + {storageGroupDocument && ( + )} this.setState({ storageGroupListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Storage Group List'; @@ -38,15 +40,8 @@ class StorageGroupList extends React.PureComponent { } render() { - const { - modalName, - closeModal, - openModal, - history, - } = this.props; - const { - storageGroupListDocument, - } = this.state; + const { modalName, closeModal, openModal, history } = this.props; + const { storageGroupListDocument } = this.state; return ( <> openModal({ modalName: STORAGEGROUP_CREATE_MODAL })} onRefresh={this.onRefresh} /> - { storageGroupListDocument - && ( - + {storageGroupListDocument && ( + )} @@ -77,7 +69,9 @@ class StorageGroupList extends React.PureComponent { } function mapStateToProps(state) { - const { ui: { modalName } } = state; + const { + ui: { modalName }, + } = state; return { modalName, }; diff --git a/src/containers/StorageList.jsx b/src/containers/StorageList.jsx index 5cf2d5ce..01415518 100644 --- a/src/containers/StorageList.jsx +++ b/src/containers/StorageList.jsx @@ -1,18 +1,19 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import { storage as api } from '@vidispine/vdt-api'; -import StorageListTitle from '../components/storage/StorageListTitle'; -import StorageListCard from '../components/storage/StorageListCard'; -import StorageDialog from '../components/storage/StorageDialog'; -import CodeModal from '../components/ui/CodeModal'; import * as actions from '../actions'; +import StorageDialog from '../components/storage/StorageDialog'; +import StorageListCard from '../components/storage/StorageListCard'; +import StorageListTitle from '../components/storage/StorageListTitle'; +import CodeModal from '../components/ui/CodeModal'; const STORAGE_LIST_CODE_MODAL = 'STORAGE_LIST_CODE_MODAL'; const STORAGE_CREATE_MODAL = 'STORAGE_CREATE_MODAL'; -class StorageList extends React.PureComponent { +class StorageList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -29,8 +30,7 @@ class StorageList extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.listStorage() - .then((response) => this.setState({ storageListDocument: response.data })); + api.listStorage().then((response) => this.setState({ storageListDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Storage List'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -38,15 +38,8 @@ class StorageList extends React.PureComponent { } render() { - const { - modalName, - closeModal, - openModal, - history, - } = this.props; - const { - storageListDocument, - } = this.state; + const { modalName, closeModal, openModal, history } = this.props; + const { storageListDocument } = this.state; return ( <> openModal({ modalName: STORAGE_CREATE_MODAL })} onRefresh={this.onRefresh} /> - { storageListDocument - && ( - - )} + {storageListDocument && } @@ -77,7 +65,9 @@ class StorageList extends React.PureComponent { } function mapStateToProps(state) { - const { ui: { modalName } } = state; + const { + ui: { modalName }, + } = state; return { modalName, }; diff --git a/src/containers/StorageMethod.jsx b/src/containers/StorageMethod.jsx index ff4de777..590b2646 100644 --- a/src/containers/StorageMethod.jsx +++ b/src/containers/StorageMethod.jsx @@ -1,18 +1,19 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import { storage as api } from '@vidispine/vdt-api'; -import StorageMethodTitle from '../components/storage/StorageMethodTitle'; + +import * as actions from '../actions'; import StorageMethodCard from '../components/storage/StorageMethodCard'; import StorageMethodRemove from '../components/storage/StorageMethodRemove'; +import StorageMethodTitle from '../components/storage/StorageMethodTitle'; import CodeModal from '../components/ui/CodeModal'; -import * as actions from '../actions'; - const STORAGEMETHOD_CODE_MODAL = 'STORAGEMETHOD_CODE_MODAL'; const STORAGEMETHOD_REMOVE_MODAL = 'STORAGEMETHOD_REMOVE_MODAL'; -class StorageMethod extends React.PureComponent { +class StorageMethod extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -30,7 +31,8 @@ class StorageMethod extends React.PureComponent { onRefresh() { const { openSnackBar, storageId, storageMethodId } = this.props; try { - api.getStorageMethod({ storageId, storageMethodId }) + api + .getStorageMethod({ storageId, storageMethodId }) .then((response) => this.setState({ storageMethodDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Storage Method'; @@ -39,18 +41,9 @@ class StorageMethod extends React.PureComponent { } render() { - const { - storageId, - storageMethodId, - modalName, - closeModal, - openModal, - openSnackBar, - history, - } = this.props; - const { - storageMethodDocument, - } = this.state; + const { storageId, storageMethodId, modalName, closeModal, openModal, openSnackBar, history } = + this.props; + const { storageMethodDocument } = this.state; return ( <> - {storageMethodDocument - && ( - + {storageMethodDocument && ( + )} this.setState({ storageRulesDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Storage Rule List'; @@ -52,10 +53,8 @@ class StorageRule extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} - { storageRulesDocument && ( + {TabComponent && } + {storageRulesDocument && ( this.setState({ storageRulesDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Storage Rule List'; @@ -44,17 +45,13 @@ class StorageRuleList extends React.PureComponent { codeModal="StorageRulesDocument" createModal={STORAGERULE_DIALOG} /> - { storageRulesDocument - && ( + {storageRulesDocument && ( - )} - + )} + ); } diff --git a/src/containers/StorageRuleTag.jsx b/src/containers/StorageRuleTag.jsx index bc5a084b..7c622eda 100644 --- a/src/containers/StorageRuleTag.jsx +++ b/src/containers/StorageRuleTag.jsx @@ -1,13 +1,13 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { storagerule as api } from '@vidispine/vdt-api'; -import StorageRuleTagCard from '../components/storagerule/StorageRuleTagCard'; +import StorageRuleTagCard from '../components/storagerule/StorageRuleTagCard'; import withSnackbar from '../hoc/withSnackbar'; const STORAGERULE_DIALOG = 'STORAGERULE_DIALOG'; -class StorageRuleTag extends React.PureComponent { +class StorageRuleTag extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -24,7 +24,8 @@ class StorageRuleTag extends React.PureComponent { onRefresh() { const { tagName } = this.props; try { - api.getStorageRuleShapeTag({ tagName }) + api + .getStorageRuleShapeTag({ tagName }) .then((response) => this.setState({ storageRuleDocument: response.data })) .catch((error) => { if (error.response && error.response.status === 404) { @@ -48,14 +49,12 @@ class StorageRuleTag extends React.PureComponent { const { tagName } = this.props; const { storageRuleDocument } = this.state; return ( - <> - - + ); } } diff --git a/src/containers/Swagger.jsx b/src/containers/Swagger.jsx index 0bf7153e..99c774a7 100644 --- a/src/containers/Swagger.jsx +++ b/src/containers/Swagger.jsx @@ -1,11 +1,12 @@ -import React from 'react'; -import SwaggerUI from 'swagger-ui-react'; -import 'swagger-ui-react/swagger-ui.css'; import Card from '@material-ui/core/Card'; import CardContent from '@material-ui/core/CardContent'; -import { utils as VidiCoreApi } from '@vidispine/vdt-api'; import { makeStyles } from '@material-ui/core/styles'; import clsx from 'clsx'; +import SwaggerUI from 'swagger-ui-react'; +import 'swagger-ui-react/swagger-ui.css'; + +import { utils as VidiCoreApi } from '@vidispine/vdt-api'; + import TitleHeader from '../components/ui/TitleHeader'; const VIDICORE_OPENAPI_URLS = [ @@ -71,7 +72,7 @@ const useStyles = makeStyles((theme) => ({ Operations: {}, })); -const SwaggerLayout = ({ getComponent }) => { +function SwaggerLayout({ getComponent }) { const Operations = getComponent('operations', true); const Filter = getComponent('FilterContainer', true); const classes = useStyles(); @@ -86,7 +87,7 @@ const SwaggerLayout = ({ getComponent }) => {
    ); -}; +} const LayoutPlugin = () => ({ components: { SwaggerLayout }, @@ -107,27 +108,26 @@ const requestInterceptor = (req) => { return req; }; -const Swagger = () => ( - <> - - - - - - - -); +function Swagger() { + return ( + <> + + + + + + + + ); +} export default Swagger; diff --git a/src/containers/TaskDefinition.jsx b/src/containers/TaskDefinition.jsx index 5fb3ee11..9461a21c 100644 --- a/src/containers/TaskDefinition.jsx +++ b/src/containers/TaskDefinition.jsx @@ -1,18 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import { Route, Switch, generatePath } from 'react-router-dom'; +import { compose } from 'redux'; -import { withRouterProps } from '../hoc/withRouterProps'; - -import TaskDefinitionOverview from './taskdefinition/TaskDefinitionOverview'; -import TaskDefinitionGraph from './taskdefinition/TaskDefinitionGraph'; - -import TaskDefinitionTitle from '../components/taskdefinition/TaskDefinitionTitle'; import JobTypeRemove from '../components/jobtype/JobTypeRemove'; - +import TaskDefinitionTitle from '../components/taskdefinition/TaskDefinitionTitle'; import DrawerContainer from '../components/ui/DrawerContainer'; import ListItemLink from '../components/ui/ListItemLink'; +import { withRouterProps } from '../hoc/withRouterProps'; + +import TaskDefinitionGraph from './taskdefinition/TaskDefinitionGraph'; +import TaskDefinitionOverview from './taskdefinition/TaskDefinitionOverview'; const TASKDEFINITION_REMOVE_DIALOG = 'TASKDEFINITION_REMOVE_DIALOG'; @@ -28,7 +27,6 @@ const TAB_TITLE = [ component: TaskDefinitionGraph, path: '/task-definition/jobtype/:taskDefinitionType/graph/', }, - ]; const listComponentRoute = ({ taskDefinitionType }) => ( @@ -49,9 +47,7 @@ const listComponentRoute = ({ taskDefinitionType }) => ( const mainComponentRoute = (props) => ( - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact }) => ( ( ); -class TaskDefinition extends React.PureComponent { +class TaskDefinition extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -79,7 +75,9 @@ class TaskDefinition extends React.PureComponent { onRefresh() { const { onRefresh } = this.state; - if (onRefresh) { onRefresh(); } + if (onRefresh) { + onRefresh(); + } } setOnRefresh(onRefresh) { @@ -87,10 +85,7 @@ class TaskDefinition extends React.PureComponent { } render() { - const { - taskDefinitionType, - history, - } = this.props; + const { taskDefinitionType, history } = this.props; const titleComponent = (props) => ( { const messageContent = `Task Group ${groupName} Removed`; @@ -59,15 +56,8 @@ class TaskGroup extends React.PureComponent { } render() { - const { - modalName, - closeModal, - openModal, - groupName, - } = this.props; - const { - taskGroupDocument, - } = this.state; + const { modalName, closeModal, openModal, groupName } = this.props; + const { taskGroupDocument } = this.state; return ( <> openModal({ modalName: TASKGROUP_REMOVE_MODAL })} onRefresh={this.onRefresh} /> - {taskGroupDocument - && ( + {taskGroupDocument && ( - )} + )} openModal({ modalName: TASKGROUPLIST_CREATE_MODAL })} onRefresh={this.onRefresh} /> - {taskGroupListDocument - && ( - - )} + {taskGroupListDocument && ( + + )} @@ -77,7 +68,9 @@ class TaskGroupList extends React.PureComponent { } function mapStateToProps(state) { - const { ui: { modalName } } = state; + const { + ui: { modalName }, + } = state; return { modalName, }; diff --git a/src/containers/TopAppBar.jsx b/src/containers/TopAppBar.jsx index 63a0774b..f9a6fa4c 100644 --- a/src/containers/TopAppBar.jsx +++ b/src/containers/TopAppBar.jsx @@ -1,26 +1,26 @@ -import React from 'react'; +import { useState } from 'react'; + import AppBar from '@material-ui/core/AppBar'; +import Hidden from '@material-ui/core/Hidden'; +import IconButton from '@material-ui/core/IconButton'; +import { withStyles } from '@material-ui/core/styles'; import Toolbar from '@material-ui/core/Toolbar'; +import Tooltip from '@material-ui/core/Tooltip'; import Typography from '@material-ui/core/Typography'; -import { withStyles } from '@material-ui/core/styles'; import useMediaQuery from '@material-ui/core/useMediaQuery'; -import Tooltip from '@material-ui/core/Tooltip'; -import Hidden from '@material-ui/core/Hidden'; - -import IconButton from '@material-ui/core/IconButton'; -import MenuIcon from '@material-ui/icons/Menu'; -import HistoryIcon from '@material-ui/icons/History'; import AccountCircle from '@material-ui/icons/AccountCircle'; -import Brightness7Icon from '@material-ui/icons/Brightness7'; import Brightness4Icon from '@material-ui/icons/Brightness4'; import Brightness6Icon from '@material-ui/icons/Brightness6'; +import Brightness7Icon from '@material-ui/icons/Brightness7'; +import HistoryIcon from '@material-ui/icons/History'; +import MenuIcon from '@material-ui/icons/Menu'; -import Menu, { MenuItem } from '../components/ui/Menu'; -import UnstyledLink from '../components/ui/UnstyledLink'; +import GitHubButton from '../components/ui/GitHubButton'; import LoadingProgress from '../components/ui/LoadingProgress'; -import { useChangeTheme } from '../components/ui/Theme'; +import Menu, { MenuItem } from '../components/ui/Menu'; import NavSelect from '../components/ui/NavSelect'; -import GitHubButton from '../components/ui/GitHubButton'; +import { useChangeTheme } from '../components/ui/Theme'; +import UnstyledLink from '../components/ui/UnstyledLink'; import VidispineButton from '../components/ui/VidispineButton'; import getCookie from '../utils/getCookie'; @@ -37,22 +37,17 @@ const styles = (theme) => ({ VidispineButton: { width: 24, height: 24, - backgroundColor: { light: 'rgb(255, 255, 255)', dark: 'rgb(240, 246, 252)' }[theme.palette.type], + backgroundColor: { light: 'rgb(255, 255, 255)', dark: 'rgb(240, 246, 252)' }[ + theme.palette.type + ], padding: 2, borderRadius: 20, }, }); -function TopAppBar({ - toggleMainMenu, - toggleHistory, - classes, - onLogout, - userName, - baseUrl, -}) { +function TopAppBar({ toggleMainMenu, toggleHistory, classes, onLogout, userName, baseURL }) { const changeTheme = useChangeTheme(); - const [paletteType, setPaletteType] = React.useState(getCookie('paletteType') || 'system'); + const [paletteType, setPaletteType] = useState(getCookie('paletteType') || 'system'); const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); const preferredMode = prefersDarkMode ? 'dark' : 'light'; @@ -82,7 +77,7 @@ function TopAppBar({
    - {baseUrl} + {baseURL}
    - handleChangeThemeMode('dark')} - color="inherit" - > + handleChangeThemeMode('dark')} color="inherit"> ), dark: ( - handleChangeThemeMode('system')} - color="inherit" - > + handleChangeThemeMode('system')} color="inherit"> ), system: ( - handleChangeThemeMode('light')} - color="inherit" - > + handleChangeThemeMode('light')} color="inherit"> diff --git a/src/containers/Transfer.jsx b/src/containers/Transfer.jsx index 9202ddce..e827b69c 100644 --- a/src/containers/Transfer.jsx +++ b/src/containers/Transfer.jsx @@ -1,13 +1,13 @@ -import React from 'react'; +import { PureComponent } from 'react'; -import TransferTitle from '../components/transfer/TransferTitle'; -import TransferFilterCard from '../components/transfer/TransferFilterCard'; import TransferCard from '../components/transfer/TransferCard'; +import TransferFilterCard from '../components/transfer/TransferFilterCard'; +import TransferTitle from '../components/transfer/TransferTitle'; import withFormActions from '../hoc/withFormActions'; const TRANSFER_FILTER_FORM = 'TRANSFER_FILTER_FORM'; -class Transfer extends React.PureComponent { +class Transfer extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -40,16 +40,9 @@ class Transfer extends React.PureComponent { codeModal="TransferListDocument" onRefresh={this.onRefresh} /> - - {transferListDocument - && ( - + + {transferListDocument && ( + )} ); diff --git a/src/containers/User.jsx b/src/containers/User.jsx index f4028fec..fc37c5c3 100644 --- a/src/containers/User.jsx +++ b/src/containers/User.jsx @@ -1,21 +1,21 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import List from '@material-ui/core/List'; import { Route, Switch, generatePath } from 'react-router-dom'; +import { compose } from 'redux'; import { user as api } from '@vidispine/vdt-api'; -import withTabs from '../hoc/withTabs'; -import withUI from '../hoc/withUI'; -import { withRouterProps } from '../hoc/withRouterProps'; import DrawerContainer from '../components/ui/DrawerContainer'; import ListItemLink from '../components/ui/ListItemLink'; - -import UserTitle from '../components/user/UserTitle'; +import UserDisableDialog from '../components/user/UserDisableDialog'; import UserPassword from '../components/user/UserPassword'; +import UserTitle from '../components/user/UserTitle'; import UserToken from '../components/user/UserToken'; -import UserDisableDialog from '../components/user/UserDisableDialog'; import UserUserNameDialog from '../components/user/UserUserNameDialog'; +import { withRouterProps } from '../hoc/withRouterProps'; +import withTabs from '../hoc/withTabs'; +import withUI from '../hoc/withUI'; import UserDefault from './user/User'; import UserKey from './user/UserKey'; @@ -63,9 +63,7 @@ const listComponentRoute = (props) => ( const mainComponentRoute = (props) => ( - {TAB_TITLE.map(({ - path, component: RenderComponent, listText, exact, - }) => ( + {TAB_TITLE.map(({ path, component: RenderComponent, listText, exact }) => ( ( ); -class User extends React.PureComponent { +class User extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -186,8 +184,4 @@ class User extends React.PureComponent { } } -export default compose( - withTabs(USER_DEFAULT_TAB), - withRouterProps, - withUI, -)(User); +export default compose(withTabs(USER_DEFAULT_TAB), withRouterProps, withUI)(User); diff --git a/src/containers/UserList.jsx b/src/containers/UserList.jsx index 4f06c11b..56bae9d4 100644 --- a/src/containers/UserList.jsx +++ b/src/containers/UserList.jsx @@ -1,19 +1,17 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; -import withFormActions from '../hoc/withFormActions'; -import withUI from '../hoc/withUI'; +import { compose } from 'redux'; -import UserListTitle from '../components/user/UserListTitle'; import UserListCard from '../components/user/UserListCard'; +import UserListParams, { USER_LIST_PARAMS_FORM } from '../components/user/UserListParams'; +import UserListTitle from '../components/user/UserListTitle'; import UserWizard from '../components/user/UserWizard'; -import UserListParams, { - USER_LIST_PARAMS_FORM, -} from '../components/user/UserListParams'; +import withFormActions from '../hoc/withFormActions'; +import withUI from '../hoc/withUI'; const USER_CREATE_MODAL = 'USER_CREATE_MODAL'; -class UserList extends React.PureComponent { +class UserList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); diff --git a/src/containers/Version.jsx b/src/containers/Version.jsx index 5f399af5..3292e0f9 100644 --- a/src/containers/Version.jsx +++ b/src/containers/Version.jsx @@ -1,6 +1,7 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { version as api } from '@vidispine/vdt-api'; + import VersionCard from '../components/version/VersionCard'; import VersionDialog from '../components/version/VersionDialog'; import VersionTitle from '../components/version/VersionTitle'; @@ -8,7 +9,7 @@ import withSnackbar from '../hoc/withSnackbar'; const VERSION_UPDATE_MODAL = 'VERSION_UPDATE_MODAL'; -class Version extends React.PureComponent { +class Version extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -25,8 +26,7 @@ class Version extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.getVersion() - .then((response) => this.setState({ versionDocument: response.data })); + api.getVersion().then((response) => this.setState({ versionDocument: response.data })); } catch (error) { const messageContent = 'Error Loading Version Information'; openSnackBar({ messageContent, messageColor: 'secondary' }); @@ -34,9 +34,7 @@ class Version extends React.PureComponent { } render() { - const { - versionDocument, - } = this.state; + const { versionDocument } = this.state; return ( <> - { versionDocument && ( - - )} - + {versionDocument && } + ); } diff --git a/src/containers/Vxa.jsx b/src/containers/Vxa.jsx index a13c8186..4f0fbbb1 100644 --- a/src/containers/Vxa.jsx +++ b/src/containers/Vxa.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { vxa as api } from '@vidispine/vdt-api'; -import VxaTitle from '../components/vxa/VxaTitle'; + import VxaCard from '../components/vxa/VxaCard'; import VxaRemove from '../components/vxa/VxaRemove'; - +import VxaTitle from '../components/vxa/VxaTitle'; import withUI from '../hoc/withUI'; const REMOVE_AGENT_DIALOG = 'REMOVE_AGENT_DIALOG'; -class Vxa extends React.PureComponent { +class Vxa extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -28,7 +28,8 @@ class Vxa extends React.PureComponent { onRefresh() { const { vxaUuid } = this.props; try { - api.getVxa({ vxaUuid }) + api + .getVxa({ vxaUuid }) .then((response) => this.setState({ vxaDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -54,12 +55,7 @@ class Vxa extends React.PureComponent { removeModal={REMOVE_AGENT_DIALOG} vxaUuid={vxaUuid} /> - {vxaDocument - && ( - - )} + {vxaDocument && } history.push('/vxa/')} diff --git a/src/containers/VxaList.jsx b/src/containers/VxaList.jsx index df83fd37..960bbba4 100644 --- a/src/containers/VxaList.jsx +++ b/src/containers/VxaList.jsx @@ -1,17 +1,17 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { vxa as api } from '@vidispine/vdt-api'; -import VxaListCard from '../components/vxa/VxaListCard'; -import VxaDialog from '../components/vxa/VxaDialog'; + import VxaConfigurationDialog from '../components/vxa/VxaConfigurationDialog'; +import VxaDialog from '../components/vxa/VxaDialog'; +import VxaListCard from '../components/vxa/VxaListCard'; import VxaListTitle from '../components/vxa/VxaListTitle'; - import withUI from '../hoc/withUI'; const VXA_CREATE_MODAL = 'VXA_CREATE_MODAL'; const VXA_CONFIG_MODAL = 'VXA_CONFIG_MODAL'; -class VxaList extends React.PureComponent { +class VxaList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -29,7 +29,8 @@ class VxaList extends React.PureComponent { onRefresh() { try { - api.listVxa() + api + .listVxa() .then((response) => this.setState({ vxaListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -54,12 +55,8 @@ class VxaList extends React.PureComponent { code={vxaListDocument} codeModal="VXAListDocument" /> - {vxaListDocument - && ( - + {vxaListDocument && ( + )} - { vxaConfiguration - && ( + {vxaConfiguration && ( - )} + )} ); } diff --git a/src/containers/Watchfolder.jsx b/src/containers/Watchfolder.jsx index ece604cf..ec3faa31 100644 --- a/src/containers/Watchfolder.jsx +++ b/src/containers/Watchfolder.jsx @@ -1,54 +1,38 @@ -import React from 'react'; -import { compose } from 'redux'; - -import CardContent from '@material-ui/core/CardContent'; +import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; -import Stepper from '@material-ui/core/Stepper'; +import CardContent from '@material-ui/core/CardContent'; import Step from '@material-ui/core/Step'; -import StepLabel from '@material-ui/core/StepLabel'; import StepContent from '@material-ui/core/StepContent'; -import AccordionActions from '@material-ui/core/AccordionActions'; +import StepLabel from '@material-ui/core/StepLabel'; +import Stepper from '@material-ui/core/Stepper'; +import { compose } from 'redux'; +import AutoImportRuleForm from '../components/autoimport/AutoImportRuleForm'; +import PropertiesForm from '../components/configuration/properties/PropertiesForm'; +import { StorageBasicForm, StorageMethodForm } from '../components/storage/StorageForm'; import SquareCard from '../components/ui/SquareCard'; import TitleHeader from '../components/ui/TitleHeader'; import withStepper from '../hoc/withStepper'; -import { StorageBasicForm, StorageMethodForm } from '../components/storage/StorageForm'; -import AutoImportRuleForm from '../components/autoimport/AutoImportRuleForm'; -import PropertiesForm from '../components/configuration/properties/PropertiesForm'; const EDIT_STORAGE_FORM = 'EDIT_STORAGE_FORM'; const EDIT_STORAGEMETHOD_FORM = 'EDIT_STORAGEMETHOD_FORM'; const EDIT_AUTOIMPORT_FORM = 'EDIT_AUTOIMPORT_FORM'; const EDIT_CONFIGURATIONPROPERTIES_FORM = 'EDIT_CONFIGURATIONPROPERTIES_FORM'; -function Watchfolder({ - onNext, - onBack, - activeStep, -}) { +function Watchfolder({ onNext, onBack, activeStep }) { return ( <> - + Storage - + - @@ -60,20 +44,11 @@ function Watchfolder({ - + - - + @@ -85,20 +60,11 @@ function Watchfolder({ - + - - + @@ -110,15 +76,10 @@ function Watchfolder({ - + - + diff --git a/src/containers/Wizard.jsx b/src/containers/Wizard.jsx index 3dd81bb5..e8da4f71 100644 --- a/src/containers/Wizard.jsx +++ b/src/containers/Wizard.jsx @@ -1,33 +1,35 @@ -import React from 'react'; -import { compose } from 'redux'; -import Stepper from '@material-ui/core/Stepper'; -import Step from '@material-ui/core/Step'; -import StepLabel from '@material-ui/core/StepLabel'; -import StepContent from '@material-ui/core/StepContent'; +import { useState, useEffect } from 'react'; + import AccordionActions from '@material-ui/core/AccordionActions'; import Button from '@material-ui/core/Button'; +import Step from '@material-ui/core/Step'; +import StepContent from '@material-ui/core/StepContent'; +import StepLabel from '@material-ui/core/StepLabel'; +import Stepper from '@material-ui/core/Stepper'; import Typography from '@material-ui/core/Typography'; -import { Link } from 'react-router-dom'; import update from 'immutability-helper'; +import { Link } from 'react-router-dom'; +import { compose } from 'redux'; + import { version as versionApi } from '@vidispine/vdt-api'; -import LicenseForm from '../components/version/LicenseForm'; -import { VersionLicenseInfoDisplay } from '../components/version/VersionDisplay'; -import { StorageBasicForm, StorageMethodListForm } from '../components/storage/StorageForm'; +import PropertiesForm from '../components/configuration/properties/PropertiesForm'; import ResourceForm from '../components/resource/ResourceForm'; +import ShapeTagPresetForm, { + EDIT_SHAPETAG_PRESET_FORM, +} from '../components/shapetag/ShapeTagPresetForm'; +import { StorageBasicForm, StorageMethodListForm } from '../components/storage/StorageForm'; import UserPasswordForm from '../components/user/UserPasswordForm'; - -import PropertiesForm from '../components/configuration/properties/PropertiesForm'; -import ShapeTagPresetForm, { EDIT_SHAPETAG_PRESET_FORM } from '../components/shapetag/ShapeTagPresetForm'; -import withUI from '../hoc/withUI'; -import withFormActions from '../hoc/withFormActions'; - -import * as userFormActions from '../formactions/user'; +import LicenseForm from '../components/version/LicenseForm'; +import { VersionLicenseInfoDisplay } from '../components/version/VersionDisplay'; +import * as configurationFormActions from '../formactions/configuration'; +import * as licenseFormActions from '../formactions/license'; import * as resourceFormActions from '../formactions/resource'; import * as shapetagFormActions from '../formactions/shapetag'; -import * as licenseFormActions from '../formactions/license'; import * as storageFormActions from '../formactions/storage'; -import * as configurationFormActions from '../formactions/configuration'; +import * as userFormActions from '../formactions/user'; +import withFormActions from '../hoc/withFormActions'; +import withUI from '../hoc/withUI'; const EDIT_USER_PASSWORD_FORM = 'EDIT_USER_PASSWORD_FORM'; const EDIT_STORAGE_DETAILS_FORM = 'EDIT_STORAGE_DETAILS_FORM'; @@ -42,12 +44,14 @@ const storageInitialValues = { type: 'LOCAL', autoDetect: true, showImportables: true, - method: [{ - uri: 'file:///media/', - read: true, - write: true, - browse: true, - }], + method: [ + { + uri: 'file:///media/', + read: true, + write: true, + browse: true, + }, + ], }, }; const transcoderInitialValues = { @@ -65,28 +69,30 @@ const thumbnailInitialValues = { }, }; -const apiUrlInitialValues = { configurationPropertyDocument: { key: 'apiUri', value: 'http://vidicore:8080/API' } }; +const apiUrlInitialValues = { + configurationPropertyDocument: { key: 'apiUri', value: 'http://vidicore:8080/API' }, +}; -const solrPathInitialValues = { configurationPropertyDocument: { key: 'solrPath', value: 'http://solr:8983/solr' } }; +const solrPathInitialValues = { + configurationPropertyDocument: { key: 'solrPath', value: 'http://solr:8983/solr' }, +}; -function Wizard({ - openSnackBar, - submitForm, -}) { - const [versionDocument, setVersionDocument] = React.useState(); - const [activeStep, setActiveStep] = React.useState(0); - const [stepsCompleted, setStepsCompleted] = React.useState([]); +function Wizard({ openSnackBar, submitForm }) { + const [versionDocument, setVersionDocument] = useState(); + const [activeStep, setActiveStep] = useState(0); + const [stepsCompleted, setStepsCompleted] = useState([]); const onRefreshVersion = () => { try { - versionApi.getVersion() - .then(({ data }) => setVersionDocument(data)); + versionApi.getVersion().then(({ data }) => setVersionDocument(data)); } catch (error) { const messageContent = 'Error Loading Version Information'; openSnackBar({ messageContent, messageColor: 'secondary' }); } }; - React.useEffect(onRefreshVersion, []); - React.useEffect(() => { document.title = 'VidiCore Admin | Wizard'; }, []); + useEffect(onRefreshVersion, [openSnackBar]); + useEffect(() => { + document.title = 'VidiCore Admin | Wizard'; + }, []); const onBack = () => { if (activeStep !== 0) setActiveStep(activeStep - 1); @@ -95,12 +101,7 @@ function Wizard({ const onNext = () => setActiveStep(activeStep + 1); const onComplete = (stepName) => setStepsCompleted([stepName, ...stepsCompleted]); - const onSubmitSuccess = ({ - stepName, - messageContent, - action, - canRetry = false, - }) => { + const onSubmitSuccess = ({ stepName, messageContent, action, canRetry = false }) => { openSnackBar({ messageContent }); if (canRetry === false) { onNext(); @@ -109,12 +110,7 @@ function Wizard({ if (action) action(); }; - const onSubmitFail = ({ - stepName, - messageContent, - action, - canRetry = false, - }) => { + const onSubmitFail = ({ stepName, messageContent, action, canRetry = false }) => { openSnackBar({ messageContent, messageColor: 'secondary' }); if (canRetry === false) { onNext(); @@ -132,21 +128,26 @@ function Wizard({ userName="admin" onSubmit={userFormActions.onUpdatePassword} initialValues={{ passwordType: 'raw' }} - onSubmitFail={() => onSubmitFail({ stepName: EDIT_USER_PASSWORD_FORM, messageContent: 'Error Changing Password', canRetry: true })} - onSubmitSuccess={() => onSubmitSuccess({ stepName: EDIT_USER_PASSWORD_FORM, messageContent: 'Password Changed' })} + onSubmitFail={() => + onSubmitFail({ + stepName: EDIT_USER_PASSWORD_FORM, + messageContent: 'Error Changing Password', + canRetry: true, + }) + } + onSubmitSuccess={() => + onSubmitSuccess({ + stepName: EDIT_USER_PASSWORD_FORM, + messageContent: 'Password Changed', + }) + } form={EDIT_USER_PASSWORD_FORM} /> - - { stepsCompleted.includes(EDIT_USER_PASSWORD_FORM) ? ( - - Step completed - + + {stepsCompleted.includes(EDIT_USER_PASSWORD_FORM) ? ( + Step completed ) : ( - - { stepsCompleted.includes(EDIT_LICENSE_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_LICENSE_FORM) ? ( + Step completed ) : ( - )} @@ -208,30 +205,42 @@ function Wizard({ onSubmit={storageFormActions.onCreate} initialValues={storageInitialValues} showMethod - onSubmitSuccess={() => onSubmitSuccess({ stepName: EDIT_STORAGE_DETAILS_FORM, messageContent: 'Storage Added' })} - onSubmitFail={() => onSubmitFail({ stepName: EDIT_STORAGE_DETAILS_FORM, messageContent: 'Error Adding Storage' })} + onSubmitSuccess={() => + onSubmitSuccess({ + stepName: EDIT_STORAGE_DETAILS_FORM, + messageContent: 'Storage Added', + }) + } + onSubmitFail={() => + onSubmitFail({ + stepName: EDIT_STORAGE_DETAILS_FORM, + messageContent: 'Error Adding Storage', + }) + } /> onSubmitSuccess({ stepName: EDIT_STORAGE_DETAILS_FORM, messageContent: 'Storage Added' })} - onSubmitFail={() => onSubmitFail({ stepName: EDIT_STORAGE_DETAILS_FORM, messageContent: 'Error Adding Storage' })} + onSubmitSuccess={() => + onSubmitSuccess({ + stepName: EDIT_STORAGE_DETAILS_FORM, + messageContent: 'Storage Added', + }) + } + onSubmitFail={() => + onSubmitFail({ + stepName: EDIT_STORAGE_DETAILS_FORM, + messageContent: 'Error Adding Storage', + }) + } /> - - - { stepsCompleted.includes(EDIT_STORAGE_DETAILS_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_STORAGE_DETAILS_FORM) ? ( + Step completed ) : ( - - { stepsCompleted.includes(EDIT_TRANSCODER_RESOURCE_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_TRANSCODER_RESOURCE_FORM) ? ( + Step completed ) : ( - - { stepsCompleted.includes(EDIT_THUMBNAIL_RESOURCE_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_THUMBNAIL_RESOURCE_FORM) ? ( + Step completed ) : ( - - { stepsCompleted.includes(EDIT_CONFIGURATIONPROPERTIES_APIURI_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_CONFIGURATIONPROPERTIES_APIURI_FORM) ? ( + Step completed ) : ( - - { stepsCompleted.includes(EDIT_CONFIGURATIONPROPERTIES_SOLRPATH_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_CONFIGURATIONPROPERTIES_SOLRPATH_FORM) ? ( + Step completed ) : ( - - { stepsCompleted.includes(EDIT_SHAPETAG_PRESET_FORM) ? ( - - Step completed - + + + {stepsCompleted.includes(EDIT_SHAPETAG_PRESET_FORM) ? ( + Step completed ) : ( - + diff --git a/src/containers/collection/CollectionCollection.jsx b/src/containers/collection/CollectionCollection.jsx index c795ae8f..11f409ad 100644 --- a/src/containers/collection/CollectionCollection.jsx +++ b/src/containers/collection/CollectionCollection.jsx @@ -1,13 +1,14 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { collection as api } from '@vidispine/vdt-api'; -import MetadataCollectionTable from '../../components/collection/MetadataCollectionTable'; -import withSnackbar from '../../hoc/withSnackbar'; +import MetadataCollectionTable from '../../components/collection/MetadataCollectionTable'; import withCard from '../../hoc/withCard'; +import withSnackbar from '../../hoc/withSnackbar'; const MetadataCollectionCard = withCard(MetadataCollectionTable); -class CollectionCollection extends React.PureComponent { +class CollectionCollection extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -38,10 +39,11 @@ class CollectionCollection extends React.PureComponent { onFetch(collectionId) { const queryParams = { field: '__collection,__ancestor_collection,__parent_collection' }; try { - api.getCollectionMetadata({ - collectionId, - queryParams: Object.entries(queryParams), - }) + api + .getCollectionMetadata({ + collectionId, + queryParams: Object.entries(queryParams), + }) .then((response) => this.setState({ metadataDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -73,9 +75,7 @@ class CollectionCollection extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } {metadataDocument && ( { this.setState({ collectionDocument: response.data }); if (setName) setName(response?.data?.name); @@ -81,9 +83,7 @@ class CollectionContent extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ collectionDocument: response.data })} @@ -104,7 +104,6 @@ class CollectionContent extends React.PureComponent { )} )} - ); } diff --git a/src/containers/collection/CollectionMetadata.jsx b/src/containers/collection/CollectionMetadata.jsx index b2b9781f..0bf95b6c 100644 --- a/src/containers/collection/CollectionMetadata.jsx +++ b/src/containers/collection/CollectionMetadata.jsx @@ -1,16 +1,16 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { collection as CollectionApi } from '@vidispine/vdt-api'; -import CollectionMetadataEditor from '../../components/collection/CollectionMetadataEditor'; + import CollectionMetadataDisplayParams from '../../components/collection/CollectionMetadataDisplayParams'; +import CollectionMetadataEditor from '../../components/collection/CollectionMetadataEditor'; import TimeRepresentation from '../../components/ui/TimeRepresentation'; - -import withSnackbar from '../../hoc/withSnackbar'; import withCard from '../../hoc/withCard'; +import withSnackbar from '../../hoc/withSnackbar'; const CollectionMetadataCard = withCard(CollectionMetadataEditor); -class CollectionMetadata extends React.PureComponent { +class CollectionMetadata extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); diff --git a/src/containers/collection/CollectionMetadataChangeSetList.jsx b/src/containers/collection/CollectionMetadataChangeSetList.jsx index c291de31..ab952690 100644 --- a/src/containers/collection/CollectionMetadataChangeSetList.jsx +++ b/src/containers/collection/CollectionMetadataChangeSetList.jsx @@ -1,16 +1,17 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { metadata as MetadataApi } from '@vidispine/vdt-api'; + import CollectionMetadataChangeSetListCard from '../../components/collection/CollectionMetadataChangeSetListCard'; import CollectionMetadataChangeSetListParams from '../../components/collection/CollectionMetadataChangeSetListParams'; import MetadataChangeSetDelete from '../../components/metadata/MetadataChangeSetDelete'; import MetadataChangeSetTrim from '../../components/metadata/MetadataChangeSetTrim'; - import withSnackbar from '../../hoc/withSnackbar'; const COLLECTION_METADATACHANGESET_DELETE_DIALOG = 'COLLECTION_METADATACHANGESET_DELETE_DIALOG'; const COLLECTION_METADATACHANGESET_TRIM_DIALOG = 'COLLECTION_METADATACHANGESET_TRIM_DIALOG'; -class CollectionMetadataChangeSetList extends React.PureComponent { +class CollectionMetadataChangeSetList extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); diff --git a/src/containers/component/ComponentBulkyMetadata.jsx b/src/containers/component/ComponentBulkyMetadata.jsx index e879f9fd..695bf0bf 100644 --- a/src/containers/component/ComponentBulkyMetadata.jsx +++ b/src/containers/component/ComponentBulkyMetadata.jsx @@ -1,17 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import { generatePath } from 'react-router-dom'; +import { compose } from 'redux'; import { bulkymetadata as BulkyMetadataApi } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; -import { withRouterProps } from '../../hoc/withRouterProps'; import BulkyMetadataDisplay from '../../components/bulkymetadata/BulkyMetadataDisplay'; import BulkyMetadataDownloadDialog from '../../components/bulkymetadata/BulkyMetadataDownloadDialog'; +import { withRouterProps } from '../../hoc/withRouterProps'; +import withSnackbar from '../../hoc/withSnackbar'; const BULKYMETADATA_COMPONENT_DOWNLOAD_DIALOG = 'BULKYMETADATA_COMPONENT_DOWNLOAD_DIALOG'; -class ComponentBulkyMetadata extends React.PureComponent { +class ComponentBulkyMetadata extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -26,9 +27,7 @@ class ComponentBulkyMetadata extends React.PureComponent { this.onRefresh(); } - UNSAFE_componentWillReceiveProps({ - shapeId, itemId, componentId, bulkyMetadataKey, - }) { + UNSAFE_componentWillReceiveProps({ shapeId, itemId, componentId, bulkyMetadataKey }) { const { componentId: prevComponentId, bulkyMetadataKey: prevKey } = this.props; if (prevComponentId !== componentId || prevKey !== bulkyMetadataKey) { this.onFetch(itemId, shapeId, componentId, bulkyMetadataKey); @@ -37,16 +36,17 @@ class ComponentBulkyMetadata extends React.PureComponent { } onRefresh() { - const { - itemId, shapeId, componentId, bulkyMetadataKey, - } = this.props; + const { itemId, shapeId, componentId, bulkyMetadataKey } = this.props; this.onFetch(itemId, shapeId, componentId, bulkyMetadataKey); } onFetch(itemId, shapeId, componentId, bulkyMetadataKey) { try { BulkyMetadataApi.getComponentBulkyMetadata({ - itemId, shapeId, componentId, key: bulkyMetadataKey, + itemId, + shapeId, + componentId, + key: bulkyMetadataKey, }) .then((response) => this.setState({ bulkyMetadataDocument: response.data })) .catch((error) => this.onRefreshError(error)); @@ -78,14 +78,21 @@ class ComponentBulkyMetadata extends React.PureComponent { code={bulkyMetadataDocument} codeModal="BulkyMetadataDocument" onRefresh={this.onRefresh} - breadcrumbList={[{ title: 'Bulky Metadata', to: generatePath('/item/:itemId/shape/:shapeId/component/:componentId/bulky-metadata/', { itemId, shapeId, componentId }) }, bulkyMetadataKey]} + breadcrumbList={[ + { + title: 'Bulky Metadata', + to: generatePath( + '/item/:itemId/shape/:shapeId/component/:componentId/bulky-metadata/', + { itemId, shapeId, componentId }, + ), + }, + bulkyMetadataKey, + ]} downloadModal={BULKYMETADATA_COMPONENT_DOWNLOAD_DIALOG} /> )} - {TabComponent && ( - - )} - { bulkyMetadataDocument && ( + {TabComponent && } + {bulkyMetadataDocument && ( )} )} - {TabComponent && ( - - )} + {TabComponent && } {uriListDocument && ( `/item/${itemId}/shape/${shapeId}/component/${componentId}/bulky-metadata/${uri}/`} + linkTo={(uri) => + `/item/${itemId}/shape/${shapeId}/component/${componentId}/bulky-metadata/${uri}/` + } /> )} diff --git a/src/containers/component/ComponentOverview.jsx b/src/containers/component/ComponentOverview.jsx index f92229c1..cdd1f59c 100644 --- a/src/containers/component/ComponentOverview.jsx +++ b/src/containers/component/ComponentOverview.jsx @@ -1,10 +1,11 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { component as ComponentApi } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; import ComponentOverviewComponent from '../../components/component/ComponentOverview'; +import withSnackbar from '../../hoc/withSnackbar'; -class ComponentOverview extends React.PureComponent { +class ComponentOverview extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -80,19 +81,15 @@ class ComponentOverview extends React.PureComponent { breadcrumbList={['Overview']} /> )} - {TabComponent && ( - - )} + {TabComponent && } {componentDocument && ( - <> - - + )} ); diff --git a/src/containers/configuration/BulkyMetadata.jsx b/src/containers/configuration/BulkyMetadata.jsx index 146b6798..2267440a 100644 --- a/src/containers/configuration/BulkyMetadata.jsx +++ b/src/containers/configuration/BulkyMetadata.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; + import BulkyMetadataCard from '../../components/configuration/bulkymetadata/BulkyMetadataCard'; import BulkyMetadataRemove from '../../components/configuration/bulkymetadata/BulkyMetadataRemove'; - import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; const BULKYMETADATACONFIGURATION_REMOVE_MODAL = 'BULKYMETADATACONFIGURATION_REMOVE_MODAL'; -class BulkyMetadata extends React.PureComponent { +class BulkyMetadata extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class BulkyMetadata extends React.PureComponent { onRefresh() { try { - api.getBulkyMetadataConfiguration() + api + .getBulkyMetadataConfiguration() .then((response) => this.setState({ bulkyMetadataConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -53,9 +54,8 @@ class BulkyMetadata extends React.PureComponent { code={bulkyMetadataConfigurationDocument} codeModal="BulkyMetadataConfigurationDocument" removeModal={BULKYMETADATACONFIGURATION_REMOVE_MODAL} - /> - { bulkyMetadataConfigurationDocument && ( + {bulkyMetadataConfigurationDocument && ( - ); } diff --git a/src/containers/configuration/Cors.jsx b/src/containers/configuration/Cors.jsx index fa304463..4b9d17de 100644 --- a/src/containers/configuration/Cors.jsx +++ b/src/containers/configuration/Cors.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; -import CorsCard from '../../components/configuration/cors/CorsCard'; +import CorsCard from '../../components/configuration/cors/CorsCard'; import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; -class Cors extends React.PureComponent { +class Cors extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,7 +23,8 @@ class Cors extends React.PureComponent { onRefresh() { try { - api.getCorsConfiguration() + api + .getCorsConfiguration() .then((response) => this.setState({ corsConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -50,7 +51,7 @@ class Cors extends React.PureComponent { code={corsConfigurationDocument} codeModal="CORSConfigurationDocument" /> - { corsConfigurationDocument && ( + {corsConfigurationDocument && ( - { databasePurgingConfigurationDocument - && ( - + {databasePurgingConfigurationDocument && ( + )} this.setState({ ftpPoolConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -54,17 +55,13 @@ class FtpPool extends React.PureComponent { codeModal="FtpPoolConfigurationDocument" removeModal={FTPPOOL_REMOVE_DIALOG} /> - { ftpPoolConfigurationDocument - && ( - + {ftpPoolConfigurationDocument && ( + )} - + ); } diff --git a/src/containers/configuration/Indexing.jsx b/src/containers/configuration/Indexing.jsx index ff01c2da..9540cea9 100644 --- a/src/containers/configuration/Indexing.jsx +++ b/src/containers/configuration/Indexing.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; -import IndexingCard from '../../components/configuration/indexing/IndexingCard'; +import IndexingCard from '../../components/configuration/indexing/IndexingCard'; import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; -class Indexing extends React.PureComponent { +class Indexing extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,7 +23,8 @@ class Indexing extends React.PureComponent { onRefresh() { try { - api.getIndexingConfiguration() + api + .getIndexingConfiguration() .then((response) => this.setState({ indexingConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -50,12 +51,11 @@ class Indexing extends React.PureComponent { code={indexingConfigurationDocument} codeModal="IndexingConfigurationDocument" /> - { indexingConfigurationDocument - && ( - + {indexingConfigurationDocument && ( + )} ); diff --git a/src/containers/configuration/JobPool.jsx b/src/containers/configuration/JobPool.jsx index 56da484e..6c073941 100644 --- a/src/containers/configuration/JobPool.jsx +++ b/src/containers/configuration/JobPool.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; + import JobPoolCard from '../../components/configuration/jobpool/JobPoolCard'; import JobPoolRemove from '../../components/configuration/jobpool/JobPoolRemove'; - import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; const JOBPOOL_REMOVE_DIALOG = 'JOBPOOL_REMOVE_DIALOG'; -class JobPool extends React.PureComponent { +class JobPool extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class JobPool extends React.PureComponent { onRefresh() { try { - api.getJobPoolConfiguration() + api + .getJobPoolConfiguration() .then((response) => this.setState({ jobPoolListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -54,17 +55,10 @@ class JobPool extends React.PureComponent { codeModal="JobPoolListDocument" removeModal={JOBPOOL_REMOVE_DIALOG} /> - { jobPoolListDocument - && ( - + {jobPoolListDocument && ( + )} - + ); } diff --git a/src/containers/configuration/JobPriority.jsx b/src/containers/configuration/JobPriority.jsx index e385059a..d1c4f716 100644 --- a/src/containers/configuration/JobPriority.jsx +++ b/src/containers/configuration/JobPriority.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as ConfigurationApi } from '@vidispine/vdt-api'; + import JobPriorityCard from '../../components/configuration/jobpriority/JobPriorityCard'; import JobPriorityRemove from '../../components/configuration/jobpriority/JobPriorityRemove'; - import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; const JOBPRIORITY_REMOVE_DIALOG = 'JOBPRIORITY_REMOVE_DIALOG'; -class JobPriority extends React.PureComponent { +class JobPriority extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -54,17 +54,13 @@ class JobPriority extends React.PureComponent { codeModal="JobPriorityConfigurationDocument" removeModal={JOBPRIORITY_REMOVE_DIALOG} /> - { jobPriorityConfigurationDocument - && ( - + {jobPriorityConfigurationDocument && ( + )} - + ); } diff --git a/src/containers/configuration/LogReport.jsx b/src/containers/configuration/LogReport.jsx index b23e1d3e..7d0fa8b4 100644 --- a/src/containers/configuration/LogReport.jsx +++ b/src/containers/configuration/LogReport.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; -import LogReportCard from '../../components/configuration/logreport/LogReportCard'; +import LogReportCard from '../../components/configuration/logreport/LogReportCard'; import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; -class LogReport extends React.PureComponent { +class LogReport extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,7 +23,8 @@ class LogReport extends React.PureComponent { onRefresh() { try { - api.getLogReportConfiguration() + api + .getLogReportConfiguration() .then((response) => this.setState({ logReportConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -50,12 +51,11 @@ class LogReport extends React.PureComponent { code={logReportConfigurationDocument} codeModal="LogReportConfigurationDocument" /> - { logReportConfigurationDocument - && ( - + {logReportConfigurationDocument && ( + )} ); diff --git a/src/containers/configuration/Metrics.jsx b/src/containers/configuration/Metrics.jsx index b3fed147..11166bb3 100644 --- a/src/containers/configuration/Metrics.jsx +++ b/src/containers/configuration/Metrics.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; -import MetricsCard from '../../components/configuration/metrics/MetricsCard'; +import MetricsCard from '../../components/configuration/metrics/MetricsCard'; import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; -class Metrics extends React.PureComponent { +class Metrics extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -23,7 +23,8 @@ class Metrics extends React.PureComponent { onRefresh() { try { - api.getMetricsConfiguration() + api + .getMetricsConfiguration() .then((response) => this.setState({ metricsConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -50,12 +51,11 @@ class Metrics extends React.PureComponent { code={metricsConfigurationDocument} codeModal="MetricsConfigurationDocument" /> - { metricsConfigurationDocument - && ( - + {metricsConfigurationDocument && ( + )} ); diff --git a/src/containers/configuration/OAuth2.jsx b/src/containers/configuration/OAuth2.jsx index 8d7aab27..f3acef53 100644 --- a/src/containers/configuration/OAuth2.jsx +++ b/src/containers/configuration/OAuth2.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { configuration as api } from '@vidispine/vdt-api'; import AuthCard from '../../components/configuration/auth/AuthCard'; import AuthRemove from '../../components/configuration/auth/AuthRemove'; - import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; const AUTH_REMOVE_DIALOG = 'AUTH_REMOVE_DIALOG'; -class OAuth2 extends React.PureComponent { +class OAuth2 extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class OAuth2 extends React.PureComponent { onRefresh() { try { - api.getAuthConfiguration() + api + .getAuthConfiguration() .then((response) => this.setState({ oAuth2ConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -54,16 +55,13 @@ class OAuth2 extends React.PureComponent { codeModal="OAuth2ConfigurationDocument" removeModal={AUTH_REMOVE_DIALOG} /> - { oAuth2ConfigurationDocument && ( + {oAuth2ConfigurationDocument && ( )} - + ); } diff --git a/src/containers/configuration/PathAlias.jsx b/src/containers/configuration/PathAlias.jsx index 6ff1125c..0e9fa9b0 100644 --- a/src/containers/configuration/PathAlias.jsx +++ b/src/containers/configuration/PathAlias.jsx @@ -1,11 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; -import TitleHeader from '../../components/ui/TitleHeader'; + import PathAliasCard from '../../components/configuration/pathalias/PathAliasCard'; +import TitleHeader from '../../components/ui/TitleHeader'; +import withSnackbar from '../../hoc/withSnackbar'; -class PathAlias extends React.PureComponent { +class PathAlias extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -21,7 +22,8 @@ class PathAlias extends React.PureComponent { onRefresh() { try { - api.getPathAliasConfiguration() + api + .getPathAliasConfiguration() .then((response) => this.setState({ pathAliasConfigurationDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -48,12 +50,11 @@ class PathAlias extends React.PureComponent { code={pathAliasConfigurationDocument} codeModal="PathAliasConfigurationDocument" /> - {pathAliasConfigurationDocument - && ( - + {pathAliasConfigurationDocument && ( + )} ); diff --git a/src/containers/configuration/Properties.jsx b/src/containers/configuration/Properties.jsx index df0ee207..4529a9be 100644 --- a/src/containers/configuration/Properties.jsx +++ b/src/containers/configuration/Properties.jsx @@ -1,15 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { configuration as api } from '@vidispine/vdt-api'; + import PropertiesCard from '../../components/configuration/properties/PropertiesCard'; import PropertiesDialog from '../../components/configuration/properties/PropertiesDialog'; - import TitleHeader from '../../components/ui/TitleHeader'; import withSnackbar from '../../hoc/withSnackbar'; const CONFIGURATIONPROPERTIES_CREATE_MODAL = 'CONFIGURATIONPROPERTIES_CREATE_MODAL'; -class Properties extends React.PureComponent { +class Properties extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class Properties extends React.PureComponent { onRefresh() { const { openSnackBar } = this.props; try { - api.getPropertiesConfiguration() + api + .getPropertiesConfiguration() .then((response) => this.setState({ configurationPropertyListDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Configuration Properties'; @@ -48,12 +49,11 @@ class Properties extends React.PureComponent { code={configurationPropertyListDocument} codeModal="ConfigurationPropertyListDocument" /> - {configurationPropertyListDocument - && ( - + {configurationPropertyListDocument && ( + )} this.setState({ fileDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -87,10 +89,7 @@ class FileOverview extends React.PureComponent { render() { const { fileDocument } = this.state; - const { - fileId, titleComponent: TitleComponent, - history, - } = this.props; + const { fileId, titleComponent: TitleComponent, history } = this.props; return ( <> {TitleComponent && ( @@ -112,81 +111,73 @@ class FileOverview extends React.PureComponent { hashModal={FILE_HASH_DIALOG} /> )} - {fileDocument - && ( - <> - - - - history.push(`/job/${response.data.jobId}`)} - fileDocument={fileDocument} - /> - - - history.push(`/job/${response.data.jobId}`)} - fileDocument={fileDocument} - /> - history.push(`/file/${response.data.id}`)} - fileDocument={fileDocument} - /> - history.push('/file/')} - fileDocument={fileDocument} - /> - - history.push(`/job/${response.data.jobId}`)} - fileDocument={fileDocument} - /> - history.push(`/job/${response.data.jobId}`)} - fileDocument={fileDocument} - /> - - - - )} - + {fileDocument && ( + <> + + + + history.push(`/job/${response.data.jobId}`)} + fileDocument={fileDocument} + /> + + + history.push(`/job/${response.data.jobId}`)} + fileDocument={fileDocument} + /> + history.push(`/file/${response.data.id}`)} + fileDocument={fileDocument} + /> + history.push('/file/')} + fileDocument={fileDocument} + /> + + history.push(`/job/${response.data.jobId}`)} + fileDocument={fileDocument} + /> + history.push(`/job/${response.data.jobId}`)} + fileDocument={fileDocument} + /> + + + + )} ); } diff --git a/src/containers/file/FileShape.jsx b/src/containers/file/FileShape.jsx index 1725304b..0cbed09f 100644 --- a/src/containers/file/FileShape.jsx +++ b/src/containers/file/FileShape.jsx @@ -1,10 +1,11 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { file as api } from '@vidispine/vdt-api'; -import withUI from '../../hoc/withUI'; import FileShapeOverview from '../../components/file/FileShapeOverview'; +import withUI from '../../hoc/withUI'; -class FileOverview extends React.PureComponent { +class FileOverview extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -36,7 +37,8 @@ class FileOverview extends React.PureComponent { onFetch(fileId) { try { - api.listFileShapes({ fileId }) + api + .listFileShapes({ fileId }) .then((response) => this.setState({ shapeListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -52,10 +54,7 @@ class FileOverview extends React.PureComponent { render() { const { shapeListDocument } = this.state; - const { - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; return ( <> {TitleComponent && ( @@ -64,19 +63,14 @@ class FileOverview extends React.PureComponent { codeModal="ShapeListDocument" onRefresh={this.onRefresh} breadcrumbList={['Shape']} - /> )} - {TabComponent && ( - - )} - {shapeListDocument && shapeListDocument.shape && ( + {TabComponent && } + {shapeListDocument && + shapeListDocument.shape && shapeListDocument.shape.map((shapeDocument) => ( - - )) - )} + + ))} ); } diff --git a/src/containers/imf/ImportImpFile.jsx b/src/containers/imf/ImportImpFile.jsx index 768675cb..3fb129c7 100644 --- a/src/containers/imf/ImportImpFile.jsx +++ b/src/containers/imf/ImportImpFile.jsx @@ -1,29 +1,28 @@ -import React from 'react'; +import { useEffect } from 'react'; -import ImportImpFileWizard, { EDIT_IMPORTIMPFILE_FORM } from '../../components/imf/ImportImpFileWizard'; +import ImportImpFileWizard, { + EDIT_IMPORTIMPFILE_FORM, +} from '../../components/imf/ImportImpFileWizard'; import withFormActions from '../../hoc/withFormActions'; -class ImportImpFile extends React.PureComponent { - componentDidMount() { +function ImportImpFile({ history, location, destroyForm }) { + useEffect(() => { document.title = 'VidiCore Admin | IMF | Import File'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTIMPFILE_FORM); - } + return () => { + destroyForm(EDIT_IMPORTIMPFILE_FORM); + }; + }, [destroyForm]); - render() { - const { history, location } = this.props; - const query = new URLSearchParams(location.search); - const fileId = query.get('fileId'); - return ( - history.push(`/job/${response.data.jobId}`)} - /> - ); - } + const query = new URLSearchParams(location.search); + const fileId = query.get('fileId'); + + return ( + history.push(`/job/${response.data.jobId}`)} + /> + ); } export default withFormActions(ImportImpFile); diff --git a/src/containers/imf/ImportImpPath.jsx b/src/containers/imf/ImportImpPath.jsx index 038ed458..c1e2db2c 100644 --- a/src/containers/imf/ImportImpPath.jsx +++ b/src/containers/imf/ImportImpPath.jsx @@ -1,27 +1,25 @@ -import React from 'react'; +import { useEffect } from 'react'; -import ImportImpPathWizard, { EDIT_IMPORTIMPPATH_FORM } from '../../components/imf/ImportImpPathWizard'; +import ImportImpPathWizard, { + EDIT_IMPORTIMPPATH_FORM, +} from '../../components/imf/ImportImpPathWizard'; import withFormActions from '../../hoc/withFormActions'; -class ImportImpPath extends React.PureComponent { - componentDidMount() { +function ImportImpPath({ history, destroyForm }) { + useEffect(() => { document.title = 'VidiCore Admin | IMF | Import Path'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTIMPPATH_FORM); - } + return () => { + destroyForm(EDIT_IMPORTIMPPATH_FORM); + }; + }, [destroyForm]); - render() { - const { history } = this.props; - return ( - history.push(`/job/${response.data.jobId}`)} - /> - ); - } + return ( + history.push(`/job/${response.data.jobId}`)} + /> + ); } export default withFormActions(ImportImpPath); diff --git a/src/containers/imf/ImportImpUrl.jsx b/src/containers/imf/ImportImpUrl.jsx index bda44ae5..b1fca4d2 100644 --- a/src/containers/imf/ImportImpUrl.jsx +++ b/src/containers/imf/ImportImpUrl.jsx @@ -1,27 +1,29 @@ -import React from 'react'; +import { useEffect } from 'react'; -import ImportImpUrlWizard, { EDIT_IMPORTIMPURL_FORM } from '../../components/imf/ImportImpUrlWizard'; +import { compose } from 'redux'; + +import ImportImpUrlWizard, { + EDIT_IMPORTIMPURL_FORM, +} from '../../components/imf/ImportImpUrlWizard'; import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportImpUrl extends React.PureComponent { - componentDidMount() { +function ImportImpUrl({ destroyForm, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | IMF | Import URL'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTIMPURL_FORM); - } + return () => { + destroyForm(EDIT_IMPORTIMPURL_FORM); + }; + }, [destroyForm]); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; - render() { - const { history } = this.props; - return ( - history.push(`/job/${response.data.jobId}`)} - /> - ); - } + return ( + + ); } -export default withFormActions(ImportImpUrl); +export default compose(withRouterProps, withFormActions)(ImportImpUrl); diff --git a/src/containers/import/ImportCollection.jsx b/src/containers/import/ImportCollection.jsx index 53885e1d..4eec4de2 100644 --- a/src/containers/import/ImportCollection.jsx +++ b/src/containers/import/ImportCollection.jsx @@ -1,30 +1,27 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; + import ImportCollectionWizard, { EDIT_COLLECTION_FORM, } from '../../components/import/ImportCollectionWizard'; import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportCollection extends React.PureComponent { - componentDidMount() { +function ImportCollection({ destroyForm, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Collection'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_COLLECTION_FORM); - } + return () => { + destroyForm(EDIT_COLLECTION_FORM); + }; + }, [destroyForm]); + + const onSuccess = (response) => { + history.push(`/collection/${response.data.id}`); + }; - render() { - const { history, ...props } = this.props; - return ( - history.push(`/collection/${response.data.id}`)} - {...props} - /> - ); - } + return ; } export default compose(withRouterProps, withFormActions)(ImportCollection); diff --git a/src/containers/import/ImportComponent.jsx b/src/containers/import/ImportComponent.jsx index 9a2158bb..7ac2cb6f 100644 --- a/src/containers/import/ImportComponent.jsx +++ b/src/containers/import/ImportComponent.jsx @@ -1,32 +1,37 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import ImportComponentWizard, { EDIT_IMPORTCOMPONENT_FORM } from '../../components/import/ImportComponentWizard'; + +import ImportComponentWizard, { + EDIT_IMPORTCOMPONENT_FORM, +} from '../../components/import/ImportComponentWizard'; import withFormActions from '../../hoc/withFormActions'; import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportComponent extends React.PureComponent { - componentDidMount() { +function ImportComponent({ destroyForm, history, location, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Component'; - } - - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTCOMPONENT_FORM); - } - - render() { - const { history, location, ...props } = this.props; - const query = new URLSearchParams(location.search); - const fileId = query.get('fileId'); - const itemId = query.get('itemId'); - return ( - history.push(`/job/${response.data.jobId}`)} - initialValues={{ itemId, queryParams: { fileId } }} - {...props} - /> - ); - } + + return () => { + destroyForm(EDIT_IMPORTCOMPONENT_FORM); + }; + }, [destroyForm]); + + const query = new URLSearchParams(location.search); + const fileId = query.get('fileId'); + const itemId = query.get('itemId'); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; + + return ( + + ); } export default compose(withRouterProps, withFormActions)(ImportComponent); diff --git a/src/containers/import/ImportFile.jsx b/src/containers/import/ImportFile.jsx index dc37a352..af205ec7 100644 --- a/src/containers/import/ImportFile.jsx +++ b/src/containers/import/ImportFile.jsx @@ -1,33 +1,34 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; + +import ImportFileWizard, { EDIT_IMPORTFILE_FORM } from '../../components/import/ImportFileWizard'; import withFormActions from '../../hoc/withFormActions'; -import ImportFileWizard, { - EDIT_IMPORTFILE_FORM, -} from '../../components/import/ImportFileWizard'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportFile extends React.PureComponent { - componentDidMount() { +function ImportFile({ destroyForm, history, location, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | File'; - } - - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTFILE_FORM); - } - - render() { - const { history, location, ...props } = this.props; - const query = new URLSearchParams(location.search); - const fileId = query.get('fileId'); - return ( - history.push(`/job/${response.data.jobId}`)} - initialValues={{ fileId, metadataDocument: {} }} - {...props} - /> - ); - } + + return () => { + destroyForm(EDIT_IMPORTFILE_FORM); + }; + }, [destroyForm]); + + const query = new URLSearchParams(location.search); + const fileId = query.get('fileId'); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; + + return ( + + ); } export default compose(withRouterProps, withFormActions)(ImportFile); diff --git a/src/containers/import/ImportPlaceholder.jsx b/src/containers/import/ImportPlaceholder.jsx index e8bd2a4d..54efc5aa 100644 --- a/src/containers/import/ImportPlaceholder.jsx +++ b/src/containers/import/ImportPlaceholder.jsx @@ -1,30 +1,27 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; -import withFormActions from '../../hoc/withFormActions'; + import ImportPlaceholderWizard, { EDIT_IMPORTPLACEHOLDER_FORM, } from '../../components/import/ImportPlaceholderWizard'; +import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportPlaceholder extends React.PureComponent { - componentDidMount() { +function ImportPlaceholder({ destroyForm, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Placeholder'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTPLACEHOLDER_FORM); - } + return () => { + destroyForm(EDIT_IMPORTPLACEHOLDER_FORM); + }; + }, [destroyForm]); + + const onSuccess = (response) => { + history.push(`/item/${response.data.id}`); + }; - render() { - const { history, ...props } = this.props; - return ( - history.push(`/item/${response.data.id}`)} - {...props} - /> - ); - } + return ; } export default compose(withRouterProps, withFormActions)(ImportPlaceholder); diff --git a/src/containers/import/ImportRaw.jsx b/src/containers/import/ImportRaw.jsx index fc2742cf..4d921fcf 100644 --- a/src/containers/import/ImportRaw.jsx +++ b/src/containers/import/ImportRaw.jsx @@ -1,30 +1,25 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; + +import ImportRawWizard, { EDIT_IMPORTRAW_FORM } from '../../components/import/ImportRawWizard'; import withFormActions from '../../hoc/withFormActions'; -import ImportRawWizard, { - EDIT_IMPORTRAW_FORM, -} from '../../components/import/ImportRawWizard'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportRaw extends React.PureComponent { - componentDidMount() { +function ImportRaw({ destroyForm, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Upload'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTRAW_FORM); - } + return () => { + destroyForm(EDIT_IMPORTRAW_FORM); + }; + }, [destroyForm]); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; - render() { - const { history, ...props } = this.props; - return ( - history.push(`/job/${response.data.jobId}`)} - {...props} - /> - ); - } + return ; } export default compose(withRouterProps, withFormActions)(ImportRaw); diff --git a/src/containers/import/ImportShape.jsx b/src/containers/import/ImportShape.jsx index 7403cffb..207de862 100644 --- a/src/containers/import/ImportShape.jsx +++ b/src/containers/import/ImportShape.jsx @@ -1,34 +1,37 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; -import withFormActions from '../../hoc/withFormActions'; + import ImportShapeWizard, { EDIT_IMPORTSHAPE_FORM, } from '../../components/import/ImportShapeWizard'; +import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportShape extends React.PureComponent { - componentDidMount() { +function ImportShape({ destroyForm, history, location, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Shape'; - } - - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTSHAPE_FORM); - } - - render() { - const { history, location, ...props } = this.props; - const query = new URLSearchParams(location.search); - const fileId = query.get('fileId'); - const itemId = query.get('itemId'); - return ( - history.push(`/job/${response.data.jobId}`)} - initialValues={{ itemId, queryParams: { fileId } }} - {...props} - /> - ); - } + + return () => { + destroyForm(EDIT_IMPORTSHAPE_FORM); + }; + }, [destroyForm]); + + const query = new URLSearchParams(location.search); + const fileId = query.get('fileId'); + const itemId = query.get('itemId'); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; + + return ( + + ); } export default compose(withRouterProps, withFormActions)(ImportShape); diff --git a/src/containers/import/ImportShapeEssence.jsx b/src/containers/import/ImportShapeEssence.jsx index 6c3d2a85..aca203d9 100644 --- a/src/containers/import/ImportShapeEssence.jsx +++ b/src/containers/import/ImportShapeEssence.jsx @@ -1,30 +1,27 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; + import ImportShapeEssenceWizard, { EDIT_IMPORTSHAPEESSENCE_FORM, } from '../../components/import/ImportShapeEssenceWizard'; import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportShapeEssence extends React.PureComponent { - componentDidMount() { +function ImportShapeEssence({ destroyForm, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Essence'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTSHAPEESSENCE_FORM); - } + return () => { + destroyForm(EDIT_IMPORTSHAPEESSENCE_FORM); + }; + }, [destroyForm]); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; - render() { - const { history, ...props } = this.props; - return ( - history.push(`/job/${response.data.jobId}`)} - {...props} - /> - ); - } + return ; } export default compose(withRouterProps, withFormActions)(ImportShapeEssence); diff --git a/src/containers/import/ImportShapePlaceholder.jsx b/src/containers/import/ImportShapePlaceholder.jsx index d3c034bf..d631696d 100644 --- a/src/containers/import/ImportShapePlaceholder.jsx +++ b/src/containers/import/ImportShapePlaceholder.jsx @@ -1,41 +1,34 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; -import withFormActions from '../../hoc/withFormActions'; + import ImportShapePlaceholderWizard, { EDIT_IMPORTSHAPEPLACEHOLDER_FORM, } from '../../components/import/ImportShapePlaceholderWizard'; +import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportShapePlaceholder extends React.PureComponent { - componentDidMount() { +function ImportShapePlaceholder({ destroyForm, location, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Shape Placeholder'; - } - - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTSHAPEPLACEHOLDER_FORM); - } - - render() { - const { location, history } = this.props; - const query = new URLSearchParams(location.search); - const itemId = query.get('itemId'); - const onSuccess = (response, dispatch, props) => { - const shapeId = response?.data; - const valueItemId = props?.values?.itemId; - history.push(`/item/${valueItemId}/shape/${shapeId}/`); + + return () => { + destroyForm(EDIT_IMPORTSHAPEPLACEHOLDER_FORM); }; - return ( - - ); - } + }, [destroyForm]); + + const query = new URLSearchParams(location.search); + const itemId = query.get('itemId'); + + const onSuccess = (response, dispatch, { values }) => { + const shapeId = response?.data; + const valueItemId = values?.itemId; + history.push(`/item/${valueItemId}/shape/${shapeId}/`); + }; + + return ( + + ); } -export default compose( - withRouterProps, - withFormActions, -)(ImportShapePlaceholder); +export default compose(withRouterProps, withFormActions)(ImportShapePlaceholder); diff --git a/src/containers/import/ImportSidecar.jsx b/src/containers/import/ImportSidecar.jsx index 0f39560b..efff5cd6 100644 --- a/src/containers/import/ImportSidecar.jsx +++ b/src/containers/import/ImportSidecar.jsx @@ -1,34 +1,37 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; + import ImportSidecarWizard, { EDIT_IMPORTSIDECAR_FORM, } from '../../components/import/ImportSidecarWizard'; import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportSidecar extends React.PureComponent { - componentDidMount() { +function ImportSidecar({ destroyForm, history, location, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Sidecar'; - } - - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTSIDECAR_FORM); - } - - render() { - const { history, location, ...props } = this.props; - const query = new URLSearchParams(location.search); - const fileId = query.get('fileId'); - const itemId = query.get('itemId'); - return ( - history.push(`/job/${response.data.jobId}`)} - initialValues={{ itemId, queryParams: { sidecar: fileId } }} - {...props} - /> - ); - } + + return () => { + destroyForm(EDIT_IMPORTSIDECAR_FORM); + }; + }, [destroyForm]); + + const query = new URLSearchParams(location.search); + const fileId = query.get('fileId'); + const itemId = query.get('itemId'); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; + + return ( + + ); } export default compose(withRouterProps, withFormActions)(ImportSidecar); diff --git a/src/containers/import/ImportSidecarRaw.jsx b/src/containers/import/ImportSidecarRaw.jsx index 547cd697..eeea1fd9 100644 --- a/src/containers/import/ImportSidecarRaw.jsx +++ b/src/containers/import/ImportSidecarRaw.jsx @@ -1,33 +1,36 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; + import ImportSidecarRawWizard, { EDIT_IMPORTSIDECARRAW_FORM, } from '../../components/import/ImportSidecarRawWizard'; import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportSidecarRaw extends React.PureComponent { - componentDidMount() { +function ImportSidecarRaw({ destroyForm, history, location, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | Sidecar Upload'; - } - - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTSIDECARRAW_FORM); - } - - render() { - const { history, location, ...props } = this.props; - const query = new URLSearchParams(location.search); - const itemId = query.get('itemId'); - return ( - history.push(`/job/${response.data.jobId}`)} - initialValues={{ itemId, queryParams: { } }} - {...props} - /> - ); - } + + return () => { + destroyForm(EDIT_IMPORTSIDECARRAW_FORM); + }; + }, [destroyForm]); + + const query = new URLSearchParams(location.search); + const itemId = query.get('itemId'); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; + + return ( + + ); } export default compose(withRouterProps, withFormActions)(ImportSidecarRaw); diff --git a/src/containers/import/ImportUri.jsx b/src/containers/import/ImportUri.jsx index ba6f05c5..d8667ac2 100644 --- a/src/containers/import/ImportUri.jsx +++ b/src/containers/import/ImportUri.jsx @@ -1,28 +1,25 @@ -import React from 'react'; +import { useEffect } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from '../../hoc/withRouterProps'; -import withFormActions from '../../hoc/withFormActions'; + import ImportUriWizard, { EDIT_IMPORTURI_FORM } from '../../components/import/ImportUriWizard'; +import withFormActions from '../../hoc/withFormActions'; +import { withRouterProps } from '../../hoc/withRouterProps'; -class ImportUri extends React.PureComponent { - componentDidMount() { +function ImportUri({ destroyForm, history, ...props }) { + useEffect(() => { document.title = 'VidiCore Admin | Import | URI'; - } - componentWillUnmount() { - const { destroyForm } = this.props; - destroyForm(EDIT_IMPORTURI_FORM); - } + return () => { + destroyForm(EDIT_IMPORTURI_FORM); + }; + }, [destroyForm]); + + const onSuccess = (response) => { + history.push(`/job/${response.data.jobId}`); + }; - render() { - const { history, ...props } = this.props; - return ( - history.push(`/job/${response.data.jobId}`)} - {...props} - /> - ); - } + return ; } export default compose(withRouterProps, withFormActions)(ImportUri); diff --git a/src/containers/index.js b/src/containers/index.js index 5ff8b3d6..26f9272b 100644 --- a/src/containers/index.js +++ b/src/containers/index.js @@ -1,7 +1,4 @@ import App from './App'; import Login from './Login'; -export { - App, - Login, -}; +export { App, Login }; diff --git a/src/containers/item/EssenceVersion.jsx b/src/containers/item/EssenceVersion.jsx index dac7012b..e9b4de91 100644 --- a/src/containers/item/EssenceVersion.jsx +++ b/src/containers/item/EssenceVersion.jsx @@ -1,13 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; + import { shape as api } from '@vidispine/vdt-api'; import EssenceVersionCard from '../../components/item/EssenceVersionCard'; -import withSnackbar from '../../hoc/withSnackbar'; -import { withRouterProps } from '../../hoc/withRouterProps'; import routes from '../../const/routes'; +import { withRouterProps } from '../../hoc/withRouterProps'; +import withSnackbar from '../../hoc/withSnackbar'; -class EssenceVersion extends React.PureComponent { +class EssenceVersion extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -37,7 +39,8 @@ class EssenceVersion extends React.PureComponent { onFetch({ itemId, versionId }) { try { - api.getShapeEssence({ itemId, versionId }) + api + .getShapeEssence({ itemId, versionId }) .then((response) => this.setState({ essenceVersionDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -67,12 +70,13 @@ class EssenceVersion extends React.PureComponent { codeModal="EssenceVersionDocument" onRefresh={this.onRefresh} versionId={versionId} - breadcrumbList={[{ title: 'Version', to: routes.itemVersionList({ itemId }) }, { title: versionId }]} + breadcrumbList={[ + { title: 'Version', to: routes.itemVersionList({ itemId }) }, + { title: versionId }, + ]} /> )} - {TabComponent && ( - - )} + {TabComponent && } {essenceVersionDocument && ( this.setState({ essenceVersionListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -51,11 +54,7 @@ class EssenceVersionList extends React.PureComponent { } render() { - const { - itemId, - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { itemId, titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; const { essenceVersionListDocument } = this.state; return ( <> @@ -67,9 +66,7 @@ class EssenceVersionList extends React.PureComponent { title="Version" /> )} - {TabComponent && ( - - )} + {TabComponent && } {essenceVersionListDocument && ( )} - {TabComponent && ( - - )} - { bulkyMetadataDocument && ( + {TabComponent && } + {bulkyMetadataDocument && ( )} )} - {TabComponent && ( - - )} + {TabComponent && } {uriListDocument && ( this.setState({ metadataListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -70,9 +72,7 @@ class ItemCollection extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } {metadataListDocument && ( )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ itemDocument: response.data })} /> - {itemDocument && ( - - )} + {itemDocument && } ); } diff --git a/src/containers/item/ItemJob.jsx b/src/containers/item/ItemJob.jsx index 5cca8818..8dff18c7 100644 --- a/src/containers/item/ItemJob.jsx +++ b/src/containers/item/ItemJob.jsx @@ -1,10 +1,11 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { job as api } from '@vidispine/vdt-api'; + import JobListCard from '../../components/job/JobListCard'; import withSnackbar from '../../hoc/withSnackbar'; -class ItemJob extends React.PureComponent { +class ItemJob extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -64,9 +65,10 @@ class ItemJob extends React.PureComponent { ], }; try { - api.listJob({ - queryParams, - }) + api + .listJob({ + queryParams, + }) .then((response) => this.onSuccess(response)) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -121,19 +123,8 @@ class ItemJob extends React.PureComponent { } render() { - const { - jobListDocument, - count, - page, - rowsPerPage, - orderBy, - orderDirection, - } = this.state; - const { - titleComponent: TitleComponent, - tabComponent: TabComponent, - title, - } = this.props; + const { jobListDocument, count, page, rowsPerPage, orderBy, orderDirection } = this.state; + const { titleComponent: TitleComponent, tabComponent: TabComponent, title } = this.props; return ( <> {TitleComponent && ( @@ -144,9 +135,7 @@ class ItemJob extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } @@ -75,12 +72,8 @@ class ItemPoster extends React.PureComponent { /> )} {TabComponent && } - {itemDocument && ( - <> - {itemDocument.posters && ( - - )} - + {itemDocument && itemDocument.posters && ( + )} this.setState({ outgoingProjectionDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -72,9 +74,7 @@ class ItemProjection extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } {outgoingProjectionDocument && ( { - itemApi.removeRelation({ relationId }) + itemApi + .removeRelation({ relationId }) .then(() => { const messageContent = `Relation "${relationId}" Removed`; openSnackBar({ messageContent }); @@ -65,10 +66,7 @@ class ItemRelation extends React.PureComponent { openRemove(currentRelationId) { const { onOpen } = this.props; return () => { - this.setState( - { currentRelationId }, - () => onOpen({ modalName: ITEM_RELATION_REMOVE_MODAL }), - ); + this.setState({ currentRelationId }, () => onOpen({ modalName: ITEM_RELATION_REMOVE_MODAL })); }; } @@ -81,10 +79,7 @@ class ItemRelation extends React.PureComponent { modalName, title, } = this.props; - const { - itemRelationListDocument, - currentRelationId, - } = this.state; + const { itemRelationListDocument, currentRelationId } = this.state; return ( <> {TitleComponent && ( @@ -95,9 +90,7 @@ class ItemRelation extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ itemRelationListDocument: response.data })} @@ -111,7 +104,7 @@ class ItemRelation extends React.PureComponent { /> )} this.setState({ sequenceDocument: response.data, contentType: response.headers['content-type'] })) + .then((response) => + this.setState({ + sequenceDocument: response.data, + contentType: response.headers['content-type'], + }), + ) .catch((error) => this.onRefreshError(error)); } catch (error) { this.onRefreshError(error); @@ -84,7 +91,7 @@ class ItemSequence extends React.PureComponent { }, { title: format }, ]} - actionComponent={( + actionComponent={ - )} + } addAccessControl={null} entityId={null} /> diff --git a/src/containers/item/ItemSequenceList.jsx b/src/containers/item/ItemSequenceList.jsx index ed292d4b..8ef8e222 100644 --- a/src/containers/item/ItemSequenceList.jsx +++ b/src/containers/item/ItemSequenceList.jsx @@ -1,12 +1,13 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { sequence as SequenceApi } from '@vidispine/vdt-api'; -import ItemSequenceListCard from '../../components/item/ItemSequenceListCard'; +import ItemSequenceListCard from '../../components/item/ItemSequenceListCard'; import withSnackbar from '../../hoc/withSnackbar'; const ITEM_SEQUENCE_CREATE_DIALOG = 'ITEM_SEQUENCE_CREATE_DIALOG'; -class ItemSequenceList extends React.PureComponent { +class ItemSequenceList extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -76,10 +77,7 @@ class ItemSequenceList extends React.PureComponent { )} {TabComponent && } {sequenceListDocument && ( - + )} ); diff --git a/src/containers/item/ItemShape.jsx b/src/containers/item/ItemShape.jsx index 9575bbb4..5adfdb87 100644 --- a/src/containers/item/ItemShape.jsx +++ b/src/containers/item/ItemShape.jsx @@ -1,11 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { shape as api } from '@vidispine/vdt-api'; -import UriListCard from '../../components/ui/UriListCard'; -import ShapeListParams from '../../components/shape/ShapeListParams'; +import ShapeListParams from '../../components/shape/ShapeListParams'; +import UriListCard from '../../components/ui/UriListCard'; import withSnackbar from '../../hoc/withSnackbar'; -class ItemShape extends React.PureComponent { +class ItemShape extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -38,10 +39,11 @@ class ItemShape extends React.PureComponent { onFetch(itemId) { const queryParams = { placeholder: 'all' }; try { - api.listShape({ - itemId, - queryParams, - }) + api + .listShape({ + itemId, + queryParams, + }) .then((response) => this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -73,9 +75,7 @@ class ItemShape extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ uriListDocument: response.data })} diff --git a/src/containers/item/ItemSpritesheet.jsx b/src/containers/item/ItemSpritesheet.jsx index c89e0228..de6347e4 100644 --- a/src/containers/item/ItemSpritesheet.jsx +++ b/src/containers/item/ItemSpritesheet.jsx @@ -1,16 +1,16 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { item as ItemApi, debug as DebugApi, utils as VidiCoreApi } from '@vidispine/vdt-api'; -import ItemThumbnailSpritesheetParams from '../../components/item/ItemThumbnailSpritesheetParams'; -import ItemThumbnailSpritesheetImage from '../../components/item/ItemThumbnailSpritesheetImage'; import ItemThumbnailSpritesheetDisplay from '../../components/item/ItemThumbnailSpritesheetDisplay'; +import ItemThumbnailSpritesheetImage from '../../components/item/ItemThumbnailSpritesheetImage'; +import ItemThumbnailSpritesheetParams from '../../components/item/ItemThumbnailSpritesheetParams'; import CodeDisplay from '../../components/ui/CodeDisplay'; - import withFormActions from '../../hoc/withFormActions'; const ITEM_THUMBNAILSPRITESHEET_FORM = 'ITEM_THUMBNAILSPRITESHEET_FORM'; -class ItemSpritesheet extends React.PureComponent { +class ItemSpritesheet extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -38,9 +38,11 @@ class ItemSpritesheet extends React.PureComponent { if (isJson) return DebugApi.echo({ xmlDocument: response.data }); return Promise.resolve(response); }) - .then((response) => this.setState({ - thumbnailSpriteSheetDocument: response.data, - })); + .then((response) => + this.setState({ + thumbnailSpriteSheetDocument: response.data, + }), + ); } UNSAFE_componentWillReceiveProps({ itemId }) { @@ -64,7 +66,8 @@ class ItemSpritesheet extends React.PureComponent { title, } = this.props; const { thumbnailSpriteSheetDocument, codeVariant } = this.state; - const isJson = typeof codeVariant === 'string' && codeVariant.toLowerCase() === 'application/json'; + const isJson = + typeof codeVariant === 'string' && codeVariant.toLowerCase() === 'application/json'; return ( <> {TitleComponent && ( @@ -84,27 +87,26 @@ class ItemSpritesheet extends React.PureComponent { headers: { accept: codeVariant }, queryParams: { 'noauth-url': true }, }} - onSuccess={(response) => this.setState({ - thumbnailSpriteSheetDocument: response.data, - codeVariant: response.headers['content-type'], - })} + onSuccess={(response) => + this.setState({ + thumbnailSpriteSheetDocument: response.data, + codeVariant: response.headers['content-type'], + }) + } /> - {thumbnailSpriteSheetDocument - && (isJson ? ( + {thumbnailSpriteSheetDocument && + (isJson ? ( <> ) : ( - + ))} ); diff --git a/src/containers/item/ItemThumbnail.jsx b/src/containers/item/ItemThumbnail.jsx index 9571a257..3e6dab74 100644 --- a/src/containers/item/ItemThumbnail.jsx +++ b/src/containers/item/ItemThumbnail.jsx @@ -1,12 +1,14 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { utils as api, item as ItemApi } from '@vidispine/vdt-api'; +import ItemThumbnailDeleteDialog, { + DIALOG_NAME as ITEMTHUMBNAILDELETE_DIALOG, +} from '../../components/item/ItemThumbnailDeleteDialog'; import ItemThumbnailGrid from '../../components/item/ItemThumbnailGrid'; -import ItemThumbnailDeleteDialog, { DIALOG_NAME as ITEMTHUMBNAILDELETE_DIALOG } from '../../components/item/ItemThumbnailDeleteDialog'; - import withSnackbar from '../../hoc/withSnackbar'; -class ItemThumbnail extends React.PureComponent { +class ItemThumbnail extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -35,11 +37,11 @@ class ItemThumbnail extends React.PureComponent { } onFetch(itemId) { - const baseUrl = api.defaultClient.defaults.baseURL || ''; + const baseURL = api.defaultClient.defaults.baseURL || ''; const queryParams = { content: 'thumbnail', 'noauth-url': true, - baseURI: `${baseUrl}/APInoauth/`, + baseURI: `${baseURL}/APInoauth/`, }; try { ItemApi.getItem({ itemId, queryParams }) @@ -57,11 +59,7 @@ class ItemThumbnail extends React.PureComponent { } render() { - const { - titleComponent: TitleComponent, - tabComponent: TabComponent, - title, - } = this.props; + const { titleComponent: TitleComponent, tabComponent: TabComponent, title } = this.props; const { itemDocument } = this.state; return ( <> @@ -74,12 +72,8 @@ class ItemThumbnail extends React.PureComponent { /> )} {TabComponent && } - {itemDocument && ( - <> - {itemDocument.thumbnails && ( - - )} - + {itemDocument && itemDocument.thumbnails && ( + )} this.setState({ uriListDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -67,18 +69,12 @@ class ItemUri extends React.PureComponent { title={title} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ uriListDocument: response.data })} /> - {uriListDocument && ( - - )} + {uriListDocument && } ); } diff --git a/src/containers/item/ItemVersion.jsx b/src/containers/item/ItemVersion.jsx index 85bffa95..8ec50c85 100644 --- a/src/containers/item/ItemVersion.jsx +++ b/src/containers/item/ItemVersion.jsx @@ -1,7 +1,7 @@ -import React from 'react'; import { Route, Switch } from 'react-router-dom'; -import EssenceVersionList from './EssenceVersionList'; + import EssenceVersion from './EssenceVersion'; +import EssenceVersionList from './EssenceVersionList'; function ItemVersion({ titleComponent }) { return ( diff --git a/src/containers/job/JobCreate.jsx b/src/containers/job/JobCreate.jsx index 379884bb..24edf5b2 100644 --- a/src/containers/job/JobCreate.jsx +++ b/src/containers/job/JobCreate.jsx @@ -1,26 +1,19 @@ -import React from 'react'; +import Button from '@material-ui/core/Button'; import CardContent from '@material-ui/core/CardContent'; import DialogActions from '@material-ui/core/DialogActions'; import Divider from '@material-ui/core/Divider'; -import Button from '@material-ui/core/Button'; import { compose } from 'redux'; import JobCreateForm from '../../components/job/JobCreateForm'; import SquareCard from '../../components/ui/SquareCard'; import TitleHeader from '../../components/ui/TitleHeader'; import * as formActions from '../../formactions/job'; - -import withSnackbar from '../../hoc/withSnackbar'; import withFormActions from '../../hoc/withFormActions'; +import withSnackbar from '../../hoc/withSnackbar'; const JOB_CREATE_FORM = 'JOB_CREATE_FORM'; -function JobCreate({ - openSnackBar, - submitForm, - initialValues, - history, -}) { +function JobCreate({ openSnackBar, submitForm, initialValues, history }) { const onSubmitSuccess = (response) => { const messageContent = 'Job Started'; openSnackBar({ messageContent }); @@ -32,10 +25,7 @@ function JobCreate({ }; return ( <> - + - diff --git a/src/containers/library/LibraryContent.jsx b/src/containers/library/LibraryContent.jsx index dbd57da9..8c1d0012 100644 --- a/src/containers/library/LibraryContent.jsx +++ b/src/containers/library/LibraryContent.jsx @@ -1,11 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; -import LibraryContentParams, { LIBRARY_CONTENT_PARAMS_FORM } from '../../components/library/LibraryContentParams'; + import ItemListContent from '../../components/item/ItemListContent'; +import LibraryContentParams, { + LIBRARY_CONTENT_PARAMS_FORM, +} from '../../components/library/LibraryContentParams'; import withFormActions from '../../hoc/withFormActions'; import withFormSelectors from '../../hoc/withFormSelectors'; -class LibraryList extends React.PureComponent { +class LibraryList extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -54,11 +58,7 @@ class LibraryList extends React.PureComponent { } render() { - const { - libraryId, - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { libraryId, titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; const { itemListDocument, expanded } = this.state; return ( <> @@ -69,9 +69,7 @@ class LibraryList extends React.PureComponent { onRefresh={this.onRefresh} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ itemListDocument: response.data })} @@ -84,20 +82,13 @@ class LibraryList extends React.PureComponent { }, }} /> - {itemListDocument && ( - - )} + {itemListDocument && } ); } } -export default compose( - withFormActions, - withFormSelectors, -)( +export default compose(withFormActions, withFormSelectors)( LibraryList, LIBRARY_CONTENT_PARAMS_FORM, ); diff --git a/src/containers/library/LibrarySettings.jsx b/src/containers/library/LibrarySettings.jsx index eb383e7f..59f8a5b9 100644 --- a/src/containers/library/LibrarySettings.jsx +++ b/src/containers/library/LibrarySettings.jsx @@ -1,10 +1,11 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { library as api } from '@vidispine/vdt-api'; -import LibrarySettingsCard from '../../components/library/LibrarySettingsCard'; +import LibrarySettingsCard from '../../components/library/LibrarySettingsCard'; import withSnackbar from '../../hoc/withSnackbar'; -class LibrarySettings extends React.PureComponent { +class LibrarySettings extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -34,7 +35,8 @@ class LibrarySettings extends React.PureComponent { onFetch(libraryId) { try { - api.getLibrarySettings({ libraryId }) + api + .getLibrarySettings({ libraryId }) .then((response) => this.setState({ librarySettingsDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -49,11 +51,7 @@ class LibrarySettings extends React.PureComponent { } render() { - const { - libraryId, - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { libraryId, titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; const { librarySettingsDocument } = this.state; return ( <> @@ -64,9 +62,7 @@ class LibrarySettings extends React.PureComponent { onRefresh={this.onRefresh} /> )} - {TabComponent && ( - - )} + {TabComponent && } {librarySettingsDocument && ( this.setState({ constraintValueListDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Metadata Field'; @@ -33,11 +34,7 @@ class MetadataFieldAllowedValues extends React.PureComponent { } render() { - const { - fieldName, - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { fieldName, titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; const { constraintValueListDocument } = this.state; return ( <> @@ -48,21 +45,20 @@ class MetadataFieldAllowedValues extends React.PureComponent { onRefresh={this.onRefresh} /> )} - {TabComponent && ( - - )} + {TabComponent && } this.setState({ - constraintValueListDocument: response.constraintValueListDocument, - })} - /> - {constraintValueListDocument - && ( - + this.setState({ + constraintValueListDocument: response.constraintValueListDocument, + }) + } /> + {constraintValueListDocument && ( + )} ); diff --git a/src/containers/metadatafield/MetadataFieldOverview.jsx b/src/containers/metadatafield/MetadataFieldOverview.jsx index 3337ee15..76936804 100644 --- a/src/containers/metadatafield/MetadataFieldOverview.jsx +++ b/src/containers/metadatafield/MetadataFieldOverview.jsx @@ -1,12 +1,12 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { metadatafield as api } from '@vidispine/vdt-api'; import MetadataFieldCard from '../../components/metadatafield/MetadataFieldCard'; -import withSnackbar from '../../hoc/withSnackbar'; import SimpleMetadataCard from '../../components/ui/SimpleMetadataCard'; +import withSnackbar from '../../hoc/withSnackbar'; -class MetadataFieldOverview extends React.PureComponent { +class MetadataFieldOverview extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -25,9 +25,11 @@ class MetadataFieldOverview extends React.PureComponent { onRefresh() { const { openSnackBar, fieldName } = this.props; try { - api.getMetadataField({ fieldName, queryParams: { includeValues: true } }) + api + .getMetadataField({ fieldName, queryParams: { includeValues: true } }) .then((response) => this.setState({ metadataFieldDocument: response.data })); - api.getSimpleMetadata({ fieldName }) + api + .getSimpleMetadata({ fieldName }) .then((response) => this.setState({ simpleMetadataDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Metadata Field'; @@ -36,11 +38,7 @@ class MetadataFieldOverview extends React.PureComponent { } render() { - const { - fieldName, - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { fieldName, titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; const { simpleMetadataDocument = {}, metadataFieldDocument } = this.state; const { field: simpleMetadataList = [] } = simpleMetadataDocument; return ( @@ -52,24 +50,20 @@ class MetadataFieldOverview extends React.PureComponent { onRefresh={this.onRefresh} /> )} - {TabComponent && ( - - )} - {metadataFieldDocument - && ( - + {TabComponent && } + {metadataFieldDocument && ( + )} - {simpleMetadataList - && ( - + {simpleMetadataList && ( + )} ); diff --git a/src/containers/shape/ShapeBulkyMetadata.jsx b/src/containers/shape/ShapeBulkyMetadata.jsx index 8494b03d..0c2fb4a4 100644 --- a/src/containers/shape/ShapeBulkyMetadata.jsx +++ b/src/containers/shape/ShapeBulkyMetadata.jsx @@ -1,17 +1,18 @@ -import React from 'react'; -import { compose } from 'redux'; +import { PureComponent } from 'react'; + import { generatePath } from 'react-router-dom'; +import { compose } from 'redux'; import { bulkymetadata as BulkyMetadataApi } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; -import { withRouterProps } from '../../hoc/withRouterProps'; import BulkyMetadataDisplay from '../../components/bulkymetadata/BulkyMetadataDisplay'; import BulkyMetadataDownloadDialog from '../../components/bulkymetadata/BulkyMetadataDownloadDialog'; +import { withRouterProps } from '../../hoc/withRouterProps'; +import withSnackbar from '../../hoc/withSnackbar'; const BULKYMETADATA_SHAPE_DOWNLOAD_DIALOG = 'BULKYMETADATA_SHAPE_DOWNLOAD_DIALOG'; -class ShapeBulkyMetadata extends React.PureComponent { +class ShapeBulkyMetadata extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -71,14 +72,21 @@ class ShapeBulkyMetadata extends React.PureComponent { code={bulkyMetadataDocument} codeModal="BulkyMetadataDocument" onRefresh={this.onRefresh} - breadcrumbList={[{ title: 'Bulky Metadata', to: generatePath('/item/:itemId/shape/:shapeId/bulky-metadata/', { itemId, shapeId }) }, bulkyMetadataKey]} + breadcrumbList={[ + { + title: 'Bulky Metadata', + to: generatePath('/item/:itemId/shape/:shapeId/bulky-metadata/', { + itemId, + shapeId, + }), + }, + bulkyMetadataKey, + ]} downloadModal={BULKYMETADATA_SHAPE_DOWNLOAD_DIALOG} /> )} - {TabComponent && ( - - )} - { bulkyMetadataDocument && ( + {TabComponent && } + {bulkyMetadataDocument && ( )} )} - {TabComponent && ( - - )} + {TabComponent && } {uriListDocument && ( { this.setState({ cpl: response.data }); }) @@ -55,33 +57,25 @@ class ShapeCpl extends React.PureComponent { } render() { - const { - titleComponent: TitleComponent, - } = this.props; + const { titleComponent: TitleComponent } = this.props; const { cpl } = this.state; return ( <> - {TitleComponent && ( - - )} + {TitleComponent && } {cpl && ( - + )} - ); } diff --git a/src/containers/shape/ShapeFileList.jsx b/src/containers/shape/ShapeFileList.jsx index d49a605e..ffe7508f 100644 --- a/src/containers/shape/ShapeFileList.jsx +++ b/src/containers/shape/ShapeFileList.jsx @@ -1,14 +1,15 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { shape as api } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; -import ShapeFileParams from '../../components/shape/ShapeFileParams'; import FileListTable from '../../components/file/FileListTable'; +import ShapeFileParams from '../../components/shape/ShapeFileParams'; import withCard from '../../hoc/withCard'; +import withSnackbar from '../../hoc/withSnackbar'; const FileListCard = withCard(FileListTable); -class ShapeFileList extends React.PureComponent { +class ShapeFileList extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -39,11 +40,12 @@ class ShapeFileList extends React.PureComponent { onFetch(itemId, shapeId) { try { - api.getShape({ - itemId, - shapeId, - path: `/API/item/${itemId}/shape/${shapeId}/file`, - }) + api + .getShape({ + itemId, + shapeId, + path: `/API/item/${itemId}/shape/${shapeId}/file`, + }) .then((response) => { const fileListDocument = response.data; this.setState({ fileListDocument }); @@ -66,11 +68,7 @@ class ShapeFileList extends React.PureComponent { } render() { - const { - titleComponent: TitleComponent, - itemId, - shapeId, - } = this.props; + const { titleComponent: TitleComponent, itemId, shapeId } = this.props; const { fileListDocument } = this.state; return ( <> @@ -82,12 +80,8 @@ class ShapeFileList extends React.PureComponent { codeModal="FileListDocument" /> )} - - {fileListDocument && ()} + + {fileListDocument && } ); } diff --git a/src/containers/shape/ShapeGraph.jsx b/src/containers/shape/ShapeGraph.jsx index 47016ac4..4e174297 100644 --- a/src/containers/shape/ShapeGraph.jsx +++ b/src/containers/shape/ShapeGraph.jsx @@ -1,10 +1,11 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { shape as api } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; import GraphViz from '../../components/ui/GraphViz'; +import withSnackbar from '../../hoc/withSnackbar'; -class ShapeGraph extends React.PureComponent { +class ShapeGraph extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -37,20 +38,22 @@ class ShapeGraph extends React.PureComponent { const { useGraphViz = true } = this.props; try { if (useGraphViz) { - api.getShapeGraphDot({ - itemId, - shapeId, - }) + api + .getShapeGraphDot({ + itemId, + shapeId, + }) .then((response) => { this.setState({ graphDot: response.data }); }) .catch((error) => this.onRefreshError(error)); } else { - api.getShapeGraph({ - itemId, - shapeId, - responseType: 'blob', - }) + api + .getShapeGraph({ + itemId, + shapeId, + responseType: 'blob', + }) .then((response) => { this.setState({ graphImage: response.data }); }) @@ -68,10 +71,7 @@ class ShapeGraph extends React.PureComponent { } render() { - const { - titleComponent: TitleComponent, - useGraphViz = true, - } = this.props; + const { titleComponent: TitleComponent, useGraphViz = true } = this.props; const { graphImage, graphDot } = this.state; return ( <> @@ -85,20 +85,11 @@ class ShapeGraph extends React.PureComponent { /> )} {useGraphViz === false && graphImage ? ( - graph + graph ) : null} {useGraphViz === true && graphDot ? ( - + ) : null} - ); } diff --git a/src/containers/shape/ShapeOverview.jsx b/src/containers/shape/ShapeOverview.jsx index d57c9973..cb8edb46 100644 --- a/src/containers/shape/ShapeOverview.jsx +++ b/src/containers/shape/ShapeOverview.jsx @@ -1,18 +1,19 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { shape as api } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; -import ShapeParams from '../../components/shape/ShapeParams'; -import ShapeOverviewComponent from '../../components/shape/ShapeOverview'; -import ShapeComponentDelete from '../../components/shape/ShapeComponentDelete'; +import ItemShapeCreate from '../../components/item/ItemShapeCreate'; import ShapeComponentAnalyze from '../../components/shape/ShapeComponentAnalyze'; +import ShapeComponentAssociateFile from '../../components/shape/ShapeComponentAssociateFile'; import ShapeComponentCopy from '../../components/shape/ShapeComponentCopy'; import ShapeComponentCopyShape from '../../components/shape/ShapeComponentCopyShape'; +import ShapeComponentDelete from '../../components/shape/ShapeComponentDelete'; import ShapeComponentMove from '../../components/shape/ShapeComponentMove'; import ShapeComponentMoveShape from '../../components/shape/ShapeComponentMoveShape'; -import ShapeComponentAssociateFile from '../../components/shape/ShapeComponentAssociateFile'; import ShapeComponentRemoveFile from '../../components/shape/ShapeComponentRemoveFile'; -import ItemShapeCreate from '../../components/item/ItemShapeCreate'; +import ShapeOverviewComponent from '../../components/shape/ShapeOverview'; +import ShapeParams from '../../components/shape/ShapeParams'; +import withSnackbar from '../../hoc/withSnackbar'; const ITEM_SHAPE_CREATE_DIALOG = 'ITEM_SHAPE_CREATE_DIALOG'; const SHAPE_COMPONENT_DELETE_DIALOG = 'SHAPE_COMPONENT_DELETE_DIALOG'; @@ -24,7 +25,7 @@ const SHAPE_COMPONENT_MOVE_SHAPE_DIALOG = 'SHAPE_COMPONENT_MOVE_SHAPE_DIALOG'; const SHAPE_COMPONENT_ASSOCIATE_FILE_DIALOG = 'SHAPE_COMPONENT_ASSOCIATE_FILE_DIALOG'; const SHAPE_COMPONENT_UNASSOCIATE_FILE_DIALOG = 'SHAPE_COMPONENT_UNASSOCIATE_FILE_DIALOG'; -class ShapeOverview extends React.PureComponent { +class ShapeOverview extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -57,11 +58,12 @@ class ShapeOverview extends React.PureComponent { onFetch(itemId, shapeId) { try { - api.getShape({ - itemId, - shapeId, - queryParams: { includePlaceholder: true }, - }) + api + .getShape({ + itemId, + shapeId, + queryParams: { includePlaceholder: true }, + }) .then((response) => this.setState({ shapeDocument: response.data })) .catch((error) => this.onRefreshError(error)); } catch (error) { @@ -98,12 +100,9 @@ class ShapeOverview extends React.PureComponent { onRefresh={this.onRefresh} breadcrumbList={['Overview']} createShapeModal={ITEM_SHAPE_CREATE_DIALOG} - /> )} - {TabComponent && ( - - )} + {TabComponent && } history.push(`/item/${props.values.targetItemId}/shape/${response.data.id}/`)} + onSuccess={(response, dispatch, props) => + history.push(`/item/${props.values.targetItemId}/shape/${response.data.id}/`) + } itemId={itemId} shapeId={shapeId} /> history.push(`/item/${props.values.targetItemId}/shape/${response.data.id}/`)} + onSuccess={(response, dispatch, props) => + history.push(`/item/${props.values.targetItemId}/shape/${response.data.id}/`) + } itemId={itemId} shapeId={shapeId} /> diff --git a/src/containers/taskdefinition/TaskDefinitionGraph.jsx b/src/containers/taskdefinition/TaskDefinitionGraph.jsx index d657339a..3460522f 100644 --- a/src/containers/taskdefinition/TaskDefinitionGraph.jsx +++ b/src/containers/taskdefinition/TaskDefinitionGraph.jsx @@ -1,10 +1,11 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { taskdefinition as api } from '@vidispine/vdt-api'; -import withSnackbar from '../../hoc/withSnackbar'; import GraphViz from '../../components/ui/GraphViz'; +import withSnackbar from '../../hoc/withSnackbar'; -class TaskDefinitionGraph extends React.PureComponent { +class TaskDefinitionGraph extends PureComponent { constructor(props) { super(props); this.onFetch = this.onFetch.bind(this); @@ -37,22 +38,24 @@ class TaskDefinitionGraph extends React.PureComponent { const { useGraphViz = true } = this.props; try { if (useGraphViz === true) { - api.getTaskDefinitionType({ - taskDefinitionType, - path: `/API/task-definition/jobtype/${taskDefinitionType}/graph/dot`, - headers: { accept: 'text/plain' }, - }) + api + .getTaskDefinitionType({ + taskDefinitionType, + path: `/API/task-definition/jobtype/${taskDefinitionType}/graph/dot`, + headers: { accept: 'text/plain' }, + }) .then((response) => { this.setState({ graphDot: response.data }); }) .catch((error) => this.onRefreshError(error)); } else { - api.getTaskDefinitionType({ - taskDefinitionType, - path: `/API/task-definition/jobtype/${taskDefinitionType}/graph`, - headers: { accept: 'image/png' }, - responseType: 'blob', - }) + api + .getTaskDefinitionType({ + taskDefinitionType, + path: `/API/task-definition/jobtype/${taskDefinitionType}/graph`, + headers: { accept: 'image/png' }, + responseType: 'blob', + }) .then((response) => { this.setState({ graphImage: response.data }); }) @@ -70,10 +73,7 @@ class TaskDefinitionGraph extends React.PureComponent { } render() { - const { - titleComponent: TitleComponent, - useGraphViz = true, - } = this.props; + const { titleComponent: TitleComponent, useGraphViz = true } = this.props; const { graphImage, graphDot } = this.state; return ( <> @@ -87,18 +87,10 @@ class TaskDefinitionGraph extends React.PureComponent { /> )} {useGraphViz === false && graphImage ? ( - graph + graph ) : null} {useGraphViz === true && graphDot ? ( - + ) : null} ); diff --git a/src/containers/taskdefinition/TaskDefinitionOverview.jsx b/src/containers/taskdefinition/TaskDefinitionOverview.jsx index 7dc06515..b8ad3b0f 100644 --- a/src/containers/taskdefinition/TaskDefinitionOverview.jsx +++ b/src/containers/taskdefinition/TaskDefinitionOverview.jsx @@ -1,14 +1,14 @@ -import React from 'react'; +import { PureComponent } from 'react'; import { taskdefinition as api } from '@vidispine/vdt-api'; -import TaskDefinitionListCard from '../../components/taskdefinition/TaskDefinitionListCard'; -import TaskDefinitionDialog from '../../components/taskdefinition/TaskDefinitionDialog'; +import TaskDefinitionDialog from '../../components/taskdefinition/TaskDefinitionDialog'; +import TaskDefinitionListCard from '../../components/taskdefinition/TaskDefinitionListCard'; import withSnackbar from '../../hoc/withSnackbar'; const TASKDEFINITION_DIALOG = 'TASKDEFINITION_DIALOG'; -class TaskDefinition extends React.PureComponent { +class TaskDefinition extends PureComponent { constructor(props) { super(props); this.onRefresh = this.onRefresh.bind(this); @@ -26,7 +26,8 @@ class TaskDefinition extends React.PureComponent { onRefresh() { const { openSnackBar, taskDefinitionType } = this.props; try { - api.getTaskDefinitionType({ taskDefinitionType }) + api + .getTaskDefinitionType({ taskDefinitionType }) .then((response) => this.setState({ taskDefinitionListDocument: response.data })); } catch (error) { const messageContent = 'Error Getting Job Type'; @@ -48,13 +49,12 @@ class TaskDefinition extends React.PureComponent { createModal={TASKDEFINITION_DIALOG} /> )} - { taskDefinitionListDocument - && ( + {taskDefinitionListDocument && ( - )} + )} @@ -94,10 +91,7 @@ class User extends React.PureComponent { {TabComponent && } {userDocument && ( <> - + this.setState({ accessKeyListDocument: response.data })) .catch((error) => this.onFetchError(error)); } catch (error) { @@ -61,11 +62,7 @@ class UserKey extends React.PureComponent { render() { const { accessKeyListDocument, accessKeyDocument } = this.state; - const { - userName, - titleComponent: TitleComponent, - tabComponent: TabComponent, - } = this.props; + const { userName, titleComponent: TitleComponent, tabComponent: TabComponent } = this.props; return ( <> {TitleComponent && ( diff --git a/src/formactions/access.js b/src/formactions/access.js index 6a735249..ff80eec1 100644 --- a/src/formactions/access.js +++ b/src/formactions/access.js @@ -1,4 +1,5 @@ import { access as AccessApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export const onUpdateImportAccessGroup = withSubmissionError((form, dispatch, props) => { diff --git a/src/formactions/analyzepreset.js b/src/formactions/analyzepreset.js index 4c0bf211..f8671226 100644 --- a/src/formactions/analyzepreset.js +++ b/src/formactions/analyzepreset.js @@ -1,4 +1,5 @@ import { analyzepreset as AnalyzePresetApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export const onListAnalyzePreset = withSubmissionError((form) => { diff --git a/src/formactions/audit.js b/src/formactions/audit.js index cde2fb25..ae82f915 100644 --- a/src/formactions/audit.js +++ b/src/formactions/audit.js @@ -1,14 +1,11 @@ import { SubmissionError } from 'redux-form'; + import { auditlog as api } from '@vidispine/vdt-api'; import * as actions from '../actions'; export function onSubmit(form, dispatch, props) { - const { - first, - rows, - orderDirection, - } = props; + const { first, rows, orderDirection } = props; const queryParams = { first, rows, @@ -16,7 +13,8 @@ export function onSubmit(form, dispatch, props) { sort: orderDirection, ...form, }; - return api.listAuditLog({ path: '/API/log/', queryParams }) // path broken in vdt-api@0.13.0 + return api + .listAuditLog({ path: '/API/log/', queryParams }) // path broken in vdt-api@0.13.0 .then((response) => response.data) .then((auditLogDocument) => ({ auditLogDocument })) .catch((error) => { diff --git a/src/formactions/auditlog.js b/src/formactions/auditlog.js index a3ef84d8..92e6214a 100644 --- a/src/formactions/auditlog.js +++ b/src/formactions/auditlog.js @@ -4,10 +4,11 @@ import { auditlog as api } from '@vidispine/vdt-api'; export function onAuditList(form) { const { queryParams } = form; - return api.listAuditLog({ - path: '/API/log/', // path broken in vdt-api@0.13.0 - queryParams, - }) + return api + .listAuditLog({ + path: '/API/log/', // path broken in vdt-api@0.13.0 + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/autoimport.js b/src/formactions/autoimport.js index f6665f34..17fb0680 100644 --- a/src/formactions/autoimport.js +++ b/src/formactions/autoimport.js @@ -5,10 +5,11 @@ import { autoimport as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { autoImportRuleDocument } = form; const storageId = props.storageId || autoImportRuleDocument.storage; - return api.updateAutoImport({ - storageId, - autoImportRuleDocument, - }) + return api + .updateAutoImport({ + storageId, + autoImportRuleDocument, + }) .then(() => ({ autoImportRuleDocument })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/bulkymetadata.js b/src/formactions/bulkymetadata.js index 24ddc1ae..9dd4f7ce 100644 --- a/src/formactions/bulkymetadata.js +++ b/src/formactions/bulkymetadata.js @@ -1,19 +1,20 @@ import { SubmissionError } from 'redux-form'; + import { bulkymetadata as BulkyMetadataApi } from '@vidispine/vdt-api'; const onError = (error) => { let errorMessage = error.message; if (error.response) { - errorMessage = JSON.stringify( - error.response.data, (k, v) => (v === null ? undefined : v - ), - ); + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); } throw new SubmissionError({ _error: errorMessage }); }; -const queryParamSerializer = (queryParams = {}) => Object.entries(queryParams) - .reduce((a, [key, value]) => ({ ...a, [key]: encodeURIComponent(value) }), {}); +const queryParamSerializer = (queryParams = {}) => + Object.entries(queryParams).reduce( + (a, [key, value]) => ({ ...a, [key]: encodeURIComponent(value) }), + {}, + ); export function onGetItemBulkyMetadataAsFile(form, dispatch, props) { try { @@ -30,8 +31,7 @@ export function onGetItemBulkyMetadataAsFile(form, dispatch, props) { silentJSONParsing: false, forcedJSONParsing: false, }, - }) - .catch(onError); + }).catch(onError); } catch (error) { return onError(error); } @@ -54,8 +54,7 @@ export function onGetShapeBulkyMetadataAsFile(form, dispatch, props) { silentJSONParsing: false, forcedJSONParsing: false, }, - }) - .catch(onError); + }).catch(onError); } catch (error) { return onError(error); } @@ -80,8 +79,7 @@ export function onGetComponentBulkyMetadataAsFile(form, dispatch, props) { silentJSONParsing: false, forcedJSONParsing: false, }, - }) - .catch(onError); + }).catch(onError); } catch (error) { return onError(error); } diff --git a/src/formactions/collection.js b/src/formactions/collection.js index c75f1458..1e9ba561 100644 --- a/src/formactions/collection.js +++ b/src/formactions/collection.js @@ -5,11 +5,12 @@ import { collection as api, metadata as MetadataApi } from '@vidispine/vdt-api'; export function onUpdateMetadata(form, dispatch, props) { const { metadataDocument = {}, queryParams } = form; const collectionId = props.collectionId || form.collectionId; - return api.updateCollectionMetadata({ - collectionId, - metadataDocument, - queryParams, - }) + return api + .updateCollectionMetadata({ + collectionId, + metadataDocument, + queryParams, + }) .then((response) => ({ collectionId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -23,10 +24,11 @@ export function onUpdateMetadata(form, dispatch, props) { export function onGetMetadata(form, dispatch, props) { const { queryParams = {} } = form; const collectionId = props.collectionId || form.collectionId; - return api.getCollectionMetadata({ - collectionId, - queryParams, - }) + return api + .getCollectionMetadata({ + collectionId, + queryParams, + }) .then((response) => ({ collectionId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -58,10 +60,11 @@ export function onListEntityMetadataChange(form, dispatch, props) { export function onGet(form, dispatch, props) { const { queryParams = {} } = form; const collectionId = props.collectionId || form.collectionId; - return api.getCollection({ - collectionId, - queryParams, - }) + return api + .getCollection({ + collectionId, + queryParams, + }) .then((response) => ({ collectionId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -73,14 +76,12 @@ export function onGet(form, dispatch, props) { } export function onSearch(form) { - const { - queryParams = {}, - itemSearchDocument = {}, - } = form; - return api.searchCollection({ - itemSearchDocument, - queryParams, - }) + const { queryParams = {}, itemSearchDocument = {} } = form; + return api + .searchCollection({ + itemSearchDocument, + queryParams, + }) .then((response) => ({ queryParams, itemSearchDocument, @@ -97,10 +98,11 @@ export function onSearch(form) { export function onCreate(form) { const { queryParams = {}, collectionDocument = {} } = form; - return api.createCollection({ - collectionDocument, - queryParams, - }) + return api + .createCollection({ + collectionDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -113,10 +115,11 @@ export function onCreate(form) { export function onRename(form, dispatch, props) { const { queryParams } = form; const collectionId = props.collectionId || form.collectionId; - return api.renameCollection({ - collectionId, - queryParams, - }) + return api + .renameCollection({ + collectionId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -130,11 +133,12 @@ export function onAddEntity(form, dispatch, props) { const { queryParams } = form; const collectionId = props.collectionId || form.collectionId; const entityId = props.entityId || form.entityId; - return api.addCollectionEntity({ - collectionId, - entityId, - queryParams, - }) + return api + .addCollectionEntity({ + collectionId, + entityId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -148,11 +152,12 @@ export function onRemoveEntity(form, dispatch, props) { const { queryParams } = form; const collectionId = props.collectionId || form.collectionId; const entityId = props.entityId || form.entityId; - return api.removeCollectionEntity({ - collectionId, - entityId, - queryParams, - }) + return api + .removeCollectionEntity({ + collectionId, + entityId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -165,12 +170,13 @@ export function onRemoveEntity(form, dispatch, props) { export function onCreateExport(form, dispatch, props) { const { queryParams } = form; const collectionId = props.collectionId || form.collectionId; - return api.getCollection({ - collectionId, - queryParams, - path: `/API/collection/${collectionId}/export`, - method: 'POST', - }) + return api + .getCollection({ + collectionId, + queryParams, + path: `/API/collection/${collectionId}/export`, + method: 'POST', + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -183,10 +189,11 @@ export function onCreateExport(form, dispatch, props) { export function onUpdateFolderCollection(form, dispatch, props) { const { queryParams } = form; const collectionId = props.collectionId || form.collectionId; - return api.updateFolderCollection({ - collectionId, - queryParams, - }) + return api + .updateFolderCollection({ + collectionId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/component.js b/src/formactions/component.js index 9e135918..c870828c 100644 --- a/src/formactions/component.js +++ b/src/formactions/component.js @@ -1,13 +1,11 @@ import { SubmissionError } from 'redux-form'; + import { component as api } from '@vidispine/vdt-api'; const onError = (error) => { let errorMessage = error.message; if (error.response) { - errorMessage = JSON.stringify( - error.response.data, (k, v) => (v === null ? undefined : v - ), - ); + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); } throw new SubmissionError({ _error: errorMessage }); }; @@ -17,11 +15,12 @@ export function onCreateComponent(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createComponent({ - itemId, - shapeId, - queryParams, - }) + return api + .createComponent({ + itemId, + shapeId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -33,11 +32,12 @@ export function onCreateComponentPlaceholder(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createComponentPlaceholder({ - itemId, - shapeId, - queryParams, - }) + return api + .createComponentPlaceholder({ + itemId, + shapeId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -50,12 +50,13 @@ export function onRemoveComponent(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const componentId = props.componentId || form.componentId; - return api.removeComponent({ - itemId, - shapeId, - componentId, - queryParams, - }) + return api + .removeComponent({ + itemId, + shapeId, + componentId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -71,15 +72,16 @@ export function onCopyComponent(form, dispatch, props) { const targetItemId = props.targetItemId || form.targetItemId; const targetShapeId = props.targetShapeId || form.targetShapeId; const targetComponentId = props.targetComponentId || form.targetComponentId; - return api.copyComponent({ - itemId, - shapeId, - componentId, - targetItemId, - targetShapeId, - targetComponentId, - queryParams, - }) + return api + .copyComponent({ + itemId, + shapeId, + componentId, + targetItemId, + targetShapeId, + targetComponentId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -95,15 +97,16 @@ export function onMoveComponent(form, dispatch, props) { const targetItemId = props.targetItemId || form.targetItemId; const targetShapeId = props.targetShapeId || form.targetShapeId; const targetComponentId = props.targetComponentId || form.targetComponentId; - return api.moveComponent({ - itemId, - shapeId, - componentId, - targetItemId, - targetShapeId, - targetComponentId, - queryParams, - }) + return api + .moveComponent({ + itemId, + shapeId, + componentId, + targetItemId, + targetShapeId, + targetComponentId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -118,14 +121,15 @@ export function onMoveComponentToShape(form, dispatch, props) { const componentId = props.componentId || form.componentId; const targetItemId = props.targetItemId || form.targetItemId; const targetShapeId = props.targetShapeId || form.targetShapeId; - return api.moveComponentToShape({ - itemId, - shapeId, - componentId, - targetItemId, - targetShapeId, - queryParams, - }) + return api + .moveComponentToShape({ + itemId, + shapeId, + componentId, + targetItemId, + targetShapeId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -140,14 +144,15 @@ export function onCopyComponentToShape(form, dispatch, props) { const componentId = props.componentId || form.componentId; const targetItemId = props.targetItemId || form.targetItemId; const targetShapeId = props.targetShapeId || form.targetShapeId; - return api.copyComponentToShape({ - itemId, - shapeId, - componentId, - targetItemId, - targetShapeId, - queryParams, - }) + return api + .copyComponentToShape({ + itemId, + shapeId, + componentId, + targetItemId, + targetShapeId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -161,13 +166,14 @@ export function onAddComponentFile(form, dispatch, props) { const shapeId = props.shapeId || form.shapeId; const componentId = props.componentId || form.componentId; const fileId = props.fileId || form.fileId; - return api.addComponentFile({ - itemId, - shapeId, - componentId, - fileId, - queryParams, - }) + return api + .addComponentFile({ + itemId, + shapeId, + componentId, + fileId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -181,13 +187,14 @@ export function onRemoveComponentFile(form, dispatch, props) { const shapeId = props.shapeId || form.shapeId; const componentId = props.componentId || form.componentId; const fileId = props.fileId || form.fileId; - return api.removeComponentFile({ - itemId, - shapeId, - componentId, - fileId, - queryParams, - }) + return api + .removeComponentFile({ + itemId, + shapeId, + componentId, + fileId, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); @@ -200,13 +207,14 @@ export function onCreateComponentAnalyze(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const componentId = props.componentId || form.componentId; - return api.createComponentAnalyze({ - itemId, - shapeId, - componentId, - analyzeJobDocument, - queryParams, - }) + return api + .createComponentAnalyze({ + itemId, + shapeId, + componentId, + analyzeJobDocument, + queryParams, + }) .catch(onError); } catch (error) { return onError(error); diff --git a/src/formactions/configuration.js b/src/formactions/configuration.js index 372c1bdd..bd7c7d7e 100644 --- a/src/formactions/configuration.js +++ b/src/formactions/configuration.js @@ -4,9 +4,10 @@ import { configuration as api } from '@vidispine/vdt-api'; export function onUpdatePropertiesConfiguration(form) { const { configurationPropertyDocument } = form; - return api.updatePropertiesConfiguration({ - configurationPropertyDocument, - }) + return api + .updatePropertiesConfiguration({ + configurationPropertyDocument, + }) .then(() => ({ configurationPropertyDocument })) .catch((error) => { let errorMessage = error.message; @@ -19,78 +20,73 @@ export function onUpdatePropertiesConfiguration(form) { export function onUpdateIndexingConfiguration(form) { const { indexingConfigurationDocument } = form; - return api.updateIndexingConfiguration({ indexingConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateIndexingConfiguration({ indexingConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateJobPoolConfiguration(form) { const { jobPoolListDocument } = form; - return api.updateJobPoolConfiguration({ jobPoolListDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateJobPoolConfiguration({ jobPoolListDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateFtpPoolConfiguration(form) { const { ftpPoolConfigurationDocument } = form; - return api.updateFtpPoolConfiguration({ ftpPoolConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateFtpPoolConfiguration({ ftpPoolConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateMetricsConfiguration(form) { const { metricsConfigurationDocument } = form; - return api.updateMetricsConfiguration({ metricsConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateMetricsConfiguration({ metricsConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdatePathAliasConfiguration(form) { const { pathAliasConfigurationDocument } = form; - return api.updatePathAliasConfiguration({ pathAliasConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updatePathAliasConfiguration({ pathAliasConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateLogReportConfiguration(form) { const { logReportConfigurationDocument } = form; - return api.updateLogReportConfiguration({ logReportConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateLogReportConfiguration({ logReportConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateDatabasePurgingConfiguration(form) { const { databasePurgingConfigurationDocument } = form; - return api.updateDatabasePurgingConfiguration({ databasePurgingConfigurationDocument }) + return api + .updateDatabasePurgingConfiguration({ databasePurgingConfigurationDocument }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -102,31 +98,30 @@ export function onUpdateDatabasePurgingConfiguration(form) { export function onUpdateCorsConfiguration(form) { const { corsConfigurationDocument } = form; - return api.updateCorsConfiguration({ corsConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateCorsConfiguration({ corsConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateAuthConfiguration(form) { const { oAuth2ConfigurationDocument } = form; - return api.updateAuthConfiguration({ oAuth2ConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateAuthConfiguration({ oAuth2ConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateBulkyMetadataConfiguration(form) { const { bulkyMetadataConfigurationDocument } = form; - return api.updateBulkyMetadataConfiguration({ bulkyMetadataConfigurationDocument }) + return api + .updateBulkyMetadataConfiguration({ bulkyMetadataConfigurationDocument }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -138,12 +133,11 @@ export function onUpdateBulkyMetadataConfiguration(form) { export function onUpdateJobPriorityConfiguration(form) { const { jobPriorityConfigurationDocument } = form; - return api.updateJobPriorityConfiguration({ jobPriorityConfigurationDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.updateJobPriorityConfiguration({ jobPriorityConfigurationDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } diff --git a/src/formactions/conform.js b/src/formactions/conform.js index de5a5098..4d8546b9 100644 --- a/src/formactions/conform.js +++ b/src/formactions/conform.js @@ -1,6 +1,7 @@ import { SubmissionError } from 'redux-form'; import { conform as ConformApi } from '@vidispine/vdt-api'; + import * as actions from '../actions'; export const onCreateSubmit = async (form) => { diff --git a/src/formactions/debug.js b/src/formactions/debug.js index 00c900d0..639bdbff 100644 --- a/src/formactions/debug.js +++ b/src/formactions/debug.js @@ -4,14 +4,13 @@ import { debug as api } from '@vidispine/vdt-api'; export function onEcho(form) { const { xmlDocument } = form; - return api.echo({ xmlDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.echo({ xmlDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export default onEcho; diff --git a/src/formactions/deletionlock.js b/src/formactions/deletionlock.js index 52d13974..cf102993 100644 --- a/src/formactions/deletionlock.js +++ b/src/formactions/deletionlock.js @@ -4,36 +4,35 @@ import { deletionlock as api } from '@vidispine/vdt-api'; export function onListDeletionLock(form) { const { queryParams } = form; - return api.listDeletionLock({ queryParams }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.listDeletionLock({ queryParams }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onListEntityDeletionLock(form, dispatch, props) { const { queryParams } = form; const { entityType: entity, entityId } = props; - return api.listEntityDeletionLock({ entity, entityId, queryParams }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.listEntityDeletionLock({ entity, entityId, queryParams }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateDeletionLock(form, dispatch, props) { const { deletionLockDocument } = form; const lockId = props.lockId || deletionLockDocument.id; - return api.updateDeletionLock({ - lockId, - deletionLockDocument, - }) + return api + .updateDeletionLock({ + lockId, + deletionLockDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -47,11 +46,12 @@ export function onCreateEntityDeletionLock(form, dispatch, props) { const { deletionLockDocument } = form; const entity = props.entityType || deletionLockDocument.entityType; const entityId = props.entityId || deletionLockDocument.entityId; - return api.createEntityDeletionLock({ - entity, - entityId, - deletionLockDocument, - }) + return api + .createEntityDeletionLock({ + entity, + entityId, + deletionLockDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/documentmetadata.js b/src/formactions/documentmetadata.js index 396ba467..592c07f3 100644 --- a/src/formactions/documentmetadata.js +++ b/src/formactions/documentmetadata.js @@ -5,11 +5,12 @@ import { documentmetadata as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { metadataDocument = {}, queryParams } = form; const documentMetadataName = props.documentMetadataName || form.documentMetadataName; - return api.updateDocumentMetadata({ - documentMetadataName, - metadataDocument, - queryParams, - }) + return api + .updateDocumentMetadata({ + documentMetadataName, + metadataDocument, + queryParams, + }) .then((response) => ({ documentMetadataName, ...response })) .catch((error) => { let errorMessage = error.message; @@ -23,10 +24,11 @@ export function onUpdate(form, dispatch, props) { export function onGet(form, dispatch, props) { const { queryParams } = form; const documentMetadataName = props.documentMetadataName || form.documentMetadataName; - return api.getDocumentMetadata({ - documentMetadataName, - queryParams, - }) + return api + .getDocumentMetadata({ + documentMetadataName, + queryParams, + }) .then((response) => ({ documentMetadataName, ...response })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/exportlocation.js b/src/formactions/exportlocation.js index 6189faa9..35da3b3e 100644 --- a/src/formactions/exportlocation.js +++ b/src/formactions/exportlocation.js @@ -5,10 +5,11 @@ import { exportlocation as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { exportLocationDocument } = form; const locationName = props.locationName || exportLocationDocument.name; - return api.updateExportLocation({ - locationName, - exportLocationDocument, - }) + return api + .updateExportLocation({ + locationName, + exportLocationDocument, + }) .then((response) => ({ exportLocationDocument: response.data, locationName })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/externalid.js b/src/formactions/externalid.js index 4a21ae95..8f03148c 100644 --- a/src/formactions/externalid.js +++ b/src/formactions/externalid.js @@ -5,10 +5,11 @@ import { externalid as api } from '@vidispine/vdt-api'; export function onUpdateNamespace(form, dispatch, props) { const { externalIdentifierNamespaceDocument } = form; const idName = props.idName || externalIdentifierNamespaceDocument.name; - return api.updateExternalIdNamespace({ - idName, - externalIdentifierNamespaceDocument, - }) + return api + .updateExternalIdNamespace({ + idName, + externalIdentifierNamespaceDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -22,11 +23,12 @@ export function onCreate(form, dispatch, props) { const { externalId } = form; const entityType = props.entityType || form.entityType; const entityId = props.entityId || form.entityId; - return api.createExternalId({ - externalId, - entityId, - entityType, - }) + return api + .createExternalId({ + externalId, + entityId, + entityType, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/fieldgroup.js b/src/formactions/fieldgroup.js index d5521f10..4eef9630 100644 --- a/src/formactions/fieldgroup.js +++ b/src/formactions/fieldgroup.js @@ -5,10 +5,11 @@ import { fieldgroup as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { metadataFieldGroupDocument } = form; const groupName = props.groupName || metadataFieldGroupDocument.name; - return api.updateFieldGroup({ - groupName, - metadataFieldGroupDocument, - }) + return api + .updateFieldGroup({ + groupName, + metadataFieldGroupDocument, + }) .then((response) => ({ metadataFieldGroupDocument: response.data, groupName })) .catch((error) => { let errorMessage = error.message; @@ -22,7 +23,8 @@ export function onUpdate(form, dispatch, props) { export function onUpdateFieldGroupChild(form, dispatch, props) { const { childGroupName } = form; const { groupName } = props; - return api.updateFieldGroupChild({ groupName, childGroupName }) + return api + .updateFieldGroupChild({ groupName, childGroupName }) .then(() => ({ childGroupName, groupName })) .catch((error) => { let errorMessage = error.message; @@ -36,10 +38,11 @@ export function onUpdateFieldGroupChild(form, dispatch, props) { export function onUpdateFieldGroupField(form, dispatch, props) { const groupName = props.groupName || form.groupName; const fieldName = props.fieldName || form.fieldName; - return api.updateFieldGroupField({ - groupName, - fieldName, - }) + return api + .updateFieldGroupField({ + groupName, + fieldName, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -50,14 +53,12 @@ export function onUpdateFieldGroupField(form, dispatch, props) { } export function onSearch(form) { - const { - queryParams = {}, - metadataFieldGroupSearchDocument = {}, - } = form; - return api.searchFieldGroup({ - metadataFieldGroupSearchDocument, - queryParams, - }) + const { queryParams = {}, metadataFieldGroupSearchDocument = {} } = form; + return api + .searchFieldGroup({ + metadataFieldGroupSearchDocument, + queryParams, + }) .then((response) => ({ queryParams, metadataFieldGroupSearchDocument, diff --git a/src/formactions/file.js b/src/formactions/file.js index ad05c89c..3260daa2 100644 --- a/src/formactions/file.js +++ b/src/formactions/file.js @@ -5,10 +5,11 @@ import { file as api } from '@vidispine/vdt-api'; export function onUpdateFileState(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { state } = form; - return api.updateFileState({ - fileId, - state, - }) + return api + .updateFileState({ + fileId, + state, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -21,11 +22,12 @@ export function onUpdateFileState(form, dispatch, props) { export function onUpdateFileHash(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { hash, queryParams } = form; - return api.updateFileHash({ - fileId, - hash, - queryParams, - }) + return api + .updateFileHash({ + fileId, + hash, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -38,11 +40,12 @@ export function onUpdateFileHash(form, dispatch, props) { export function onFileMove(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { targetStorageId, queryParams } = form; - return api.createFileMove({ - fileId, - targetStorageId, - queryParams, - }) + return api + .createFileMove({ + fileId, + targetStorageId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -55,10 +58,11 @@ export function onFileMove(form, dispatch, props) { export function onFileDelete(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { queryParams } = form; - return api.removeFile({ - fileId, - queryParams, - }) + return api + .removeFile({ + fileId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -71,10 +75,11 @@ export function onFileDelete(form, dispatch, props) { export function onFilePath(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { queryParams } = form; - return api.createFilePath({ - fileId, - queryParams, - }) + return api + .createFilePath({ + fileId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -87,11 +92,12 @@ export function onFilePath(form, dispatch, props) { export function onFileOverwrite(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { queryParams, file } = form; - return api.updateFileRaw({ - fileId, - file: file[0], - queryParams, - }) + return api + .updateFileRaw({ + fileId, + file: file[0], + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -104,10 +110,11 @@ export function onFileOverwrite(form, dispatch, props) { export function onGetFile(form, dispatch, props) { const fileId = props.fileId || form.fileId; const { queryParams } = form; - return api.getFile({ - fileId, - queryParams, - }) + return api + .getFile({ + fileId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -120,10 +127,11 @@ export function onGetFile(form, dispatch, props) { export function onFileList(form, dispatch, props) { const { storageId } = props; const { queryParams } = form; - return api.listFile({ - storageId, - queryParams, - }) + return api + .listFile({ + storageId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -135,11 +143,12 @@ export function onFileList(form, dispatch, props) { export function onFileCreateEntity(form) { const { fileDocument, queryParams, storageId } = form; - return api.createFileEntity({ - storageId, - fileDocument, - queryParams, - }) + return api + .createFileEntity({ + storageId, + fileDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -152,11 +161,12 @@ export function onFileCreateEntity(form) { export function onFileImport(form, dispatch, props) { const { metadataDocument, queryParams } = form; const fileId = props.fileId || form.fileId; - return api.createFileImport({ - fileId, - metadataDocument, - queryParams, - }) + return api + .createFileImport({ + fileId, + metadataDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -169,11 +179,12 @@ export function onFileImport(form, dispatch, props) { export function onFileImportAssetMap(form, dispatch, props) { const { metadataDocument, queryParams } = form; const fileId = props.fileId || form.fileId; - return api.createFileImportAssetMap({ - fileId, - metadataDocument, - queryParams, - }) + return api + .createFileImportAssetMap({ + fileId, + metadataDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -186,10 +197,11 @@ export function onFileImportAssetMap(form, dispatch, props) { export function onFileAnalyze(form, dispatch, props) { const { queryParams } = form; const fileId = props.fileId || form.fileId; - return api.analyzeFile({ - fileId, - queryParams, - }) + return api + .analyzeFile({ + fileId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -202,10 +214,11 @@ export function onFileAnalyze(form, dispatch, props) { export function onFileImpAnalyze(form, dispatch, props) { const { queryParams } = form; const fileId = props.fileId || form.fileId; - return api.analyzeFileImp({ - fileId, - queryParams, - }) + return api + .analyzeFileImp({ + fileId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -217,10 +230,11 @@ export function onFileImpAnalyze(form, dispatch, props) { export function onCreateFileTemporaryCredentials(form, dispatch, props) { const { queryParams } = form; const fileId = props.fileId || form.fileId; - return api.createFileTemporaryCredentials({ - fileId, - queryParams, - }) + return api + .createFileTemporaryCredentials({ + fileId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/group.js b/src/formactions/group.js index 428df35c..2f8ef70f 100644 --- a/src/formactions/group.js +++ b/src/formactions/group.js @@ -1,4 +1,5 @@ import { group as GroupApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export const onUpdateGroup = withSubmissionError((form, dispatch, props) => { @@ -8,7 +9,8 @@ export const onUpdateGroup = withSubmissionError((form, dispatch, props) => { groupName, groupDocument, queryParams, - }).then((response) => ({ // create user does not return a response body + }).then((response) => ({ + // create user does not return a response body ...response, data: { groupName, ...groupDocument }, })); diff --git a/src/formactions/imf.js b/src/formactions/imf.js index b39f963d..24027c2e 100644 --- a/src/formactions/imf.js +++ b/src/formactions/imf.js @@ -1,16 +1,14 @@ import { SubmissionError } from 'redux-form'; -import { - vsimport as importApi, - file as fileApi, -} from '@vidispine/vdt-api'; +import { vsimport as importApi, file as fileApi } from '@vidispine/vdt-api'; export function onImportImpUrl(form) { const { queryParams, metadataDocument } = form; - return importApi.createImportImp({ - queryParams, - metadataDocument, - }) + return importApi + .createImportImp({ + queryParams, + metadataDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -23,11 +21,12 @@ export function onImportImpUrl(form) { export function onImportImpFile(form, dispatch, props) { const { queryParams, metadataDocument } = form; const fileId = props.fileId || form.fileId; - return fileApi.createFileImportAssetMap({ - fileId, - queryParams, - metadataDocument, - }) + return fileApi + .createFileImportAssetMap({ + fileId, + queryParams, + metadataDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -40,11 +39,12 @@ export function onImportImpFile(form, dispatch, props) { export function onImportImpPath(form, dispatch, props) { const { queryParams, metadataDocument } = form; const storageId = props.storageId || form.storageId; - return fileApi.createFilePathImportAssetMap({ - storageId, - queryParams, - metadataDocument, - }) + return fileApi + .createFilePathImportAssetMap({ + storageId, + queryParams, + metadataDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/import.js b/src/formactions/import.js index 07e1c8aa..5ef7e1f4 100644 --- a/src/formactions/import.js +++ b/src/formactions/import.js @@ -4,10 +4,11 @@ import { vsimport as api } from '@vidispine/vdt-api'; export function onImportUri(form) { const { queryParams, metadataDocument } = form; - return api.createImportUri({ - queryParams, - metadataDocument, - }) + return api + .createImportUri({ + queryParams, + metadataDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -22,13 +23,16 @@ export function onImportRawNoAuth(form) { const { transferId } = queryParams; const file = upload[0]; const { name: filename } = file; - return api.createImportRawPasskey({ - filename, - queryParams, - metadataDocument, - }) + return api + .createImportRawPasskey({ + filename, + queryParams, + metadataDocument, + }) .then((response) => { - const { data: { data: jobData = [] } } = response; + const { + data: { data: jobData = [] }, + } = response; const passkey = jobData.find((j) => j.key === 'passkey').value; return api.createImportRawNoAuth({ file, @@ -49,10 +53,11 @@ export function onImportRawNoAuth(form) { export function onImportPlaceholder(form) { const { queryParams, metadataDocument } = form; - return api.createImportPlaceholder({ - queryParams, - metadataDocument, - }) + return api + .createImportPlaceholder({ + queryParams, + metadataDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -66,11 +71,12 @@ export function onImportComponent(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; const component = props.component || form.component; - return api.createImportComponent({ - itemId, - component, - queryParams, - }) + return api + .createImportComponent({ + itemId, + component, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -83,10 +89,11 @@ export function onImportComponent(form, dispatch, props) { export function onImportSidecar(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; - return api.createImportItemSidecar({ - itemId, - queryParams, - }) + return api + .createImportItemSidecar({ + itemId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -100,11 +107,12 @@ export function onImportSidecarRaw(form, dispatch, props) { const { queryParams, upload } = form; const itemId = props.itemId || form.itemId; const file = upload[0]; - return api.createImportItemSidecarRaw({ - itemId, - file, - queryParams, - }) + return api + .createImportItemSidecarRaw({ + itemId, + file, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/importsettings.js b/src/formactions/importsettings.js index fd260e6f..8a64a171 100644 --- a/src/formactions/importsettings.js +++ b/src/formactions/importsettings.js @@ -5,10 +5,11 @@ import { importsettings as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { settingsId } = props; const { importSettingsDocument } = form; - return api.updateImportSettings({ - settingsId, - importSettingsDocument, - }) + return api + .updateImportSettings({ + settingsId, + importSettingsDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -20,9 +21,10 @@ export function onUpdate(form, dispatch, props) { export function onCreate(form) { const { importSettingsDocument } = form; - return api.createImportSettings({ - importSettingsDocument, - }) + return api + .createImportSettings({ + importSettingsDocument, + }) .then((response) => ({ importSettingsDocument: response.data })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/item.js b/src/formactions/item.js index 8aabfb4f..9f442cac 100644 --- a/src/formactions/item.js +++ b/src/formactions/item.js @@ -1,6 +1,7 @@ import { SubmissionError } from 'redux-form'; import { item as ItemApi, metadata as MetadataApi, debug as DebugApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export function onCreateExport(form, dispatch, props) { @@ -9,14 +10,13 @@ export function onCreateExport(form, dispatch, props) { return ItemApi.createExport({ itemId, queryParams, - }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onCreateExportImp(form, dispatch, props) { @@ -25,14 +25,13 @@ export function onCreateExportImp(form, dispatch, props) { return ItemApi.createExportImp({ itemId, queryParams, - }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onRemoveItem(form, dispatch, props) { @@ -41,14 +40,13 @@ export function onRemoveItem(form, dispatch, props) { return ItemApi.removeItem({ itemId, queryParams, - }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateMetadata(form, dispatch, props) { @@ -124,10 +122,7 @@ export function onGet(form, dispatch, props) { } export function onSearch(form) { - const { - queryParams = {}, - itemSearchDocument = {}, - } = form; + const { queryParams = {}, itemSearchDocument = {} } = form; return ItemApi.searchItem({ itemSearchDocument, queryParams, @@ -229,7 +224,9 @@ export function onListItemRelation(form, dispatch, props) { const itemId = props.itemId || form.itemId; const { queryParams: formQueryParams = {} } = form; const { relationMetadata = [], ...queryParams } = formQueryParams; - relationMetadata.forEach((metadata) => { queryParams[metadata.key] = metadata.value; }); + relationMetadata.forEach((metadata) => { + queryParams[metadata.key] = metadata.value; + }); return ItemApi.listItemRelation({ itemId, queryParams, @@ -249,7 +246,9 @@ export function onCreateItemRelation(form, dispatch, props) { const relationItemId = props.relationItemId || form.relationItemId; const { queryParams: formQueryParams = {} } = form; const { relationMetadata = [], ...queryParams } = formQueryParams; - relationMetadata.forEach((metadata) => { queryParams[metadata.key] = metadata.value; }); + relationMetadata.forEach((metadata) => { + queryParams[metadata.key] = metadata.value; + }); return ItemApi.createItemRelation({ itemId, relationItemId, @@ -269,18 +268,19 @@ export function onUpdateItemRelation(form, dispatch, props) { const relationId = props.relationId || form.relationId; const { queryParams: formQueryParams = {} } = form; const { relationMetadata = [], ...queryParams } = formQueryParams; - relationMetadata.forEach((metadata) => { queryParams[metadata.key] = metadata.value; }); + relationMetadata.forEach((metadata) => { + queryParams[metadata.key] = metadata.value; + }); return ItemApi.updateRelation({ relationId, queryParams, - }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onCreateItemAnalyze(form, dispatch, props) { diff --git a/src/formactions/javascript.js b/src/formactions/javascript.js index ca9e63f6..ceeb89d8 100644 --- a/src/formactions/javascript.js +++ b/src/formactions/javascript.js @@ -4,14 +4,13 @@ import { javascript as api } from '@vidispine/vdt-api'; export function onTest(form) { const { javascriptDocument } = form; - return api.test({ javascriptDocument }) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.test({ javascriptDocument }).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export default onTest; diff --git a/src/formactions/job.js b/src/formactions/job.js index a026a255..7ec05980 100644 --- a/src/formactions/job.js +++ b/src/formactions/job.js @@ -4,9 +4,10 @@ import { job as api } from '@vidispine/vdt-api'; export function onJobList(form) { const { queryParams } = form; - return api.listJob({ - queryParams, - }) + return api + .listJob({ + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -19,10 +20,11 @@ export function onJobList(form) { export function onModifyJob(form, dispatch, props) { const jobId = props.jobId || form.jobId; const { queryParams } = form; - return api.modifyJob({ - jobId, - queryParams, - }) + return api + .modifyJob({ + jobId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -35,10 +37,11 @@ export function onModifyJob(form, dispatch, props) { export function onDuplicateJob(form, dispatch, props) { const jobId = props.jobId || form.jobId; const { queryParams } = form; - return api.duplicateJob({ - jobId, - queryParams, - }) + return api + .duplicateJob({ + jobId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -51,10 +54,11 @@ export function onDuplicateJob(form, dispatch, props) { export function onAbortJob(form, dispatch, props) { const jobId = props.jobId || form.jobId; const { queryParams } = form; - return api.abortJob({ - jobId, - queryParams, - }) + return api + .abortJob({ + jobId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -66,9 +70,10 @@ export function onAbortJob(form, dispatch, props) { export function onCreateJob(form) { const { queryParams } = form; - return api.createJob({ - queryParams, - }) + return api + .createJob({ + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/library.js b/src/formactions/library.js index e67393c4..84e90692 100644 --- a/src/formactions/library.js +++ b/src/formactions/library.js @@ -4,10 +4,11 @@ import { library as api } from '@vidispine/vdt-api'; export function onCreate(form) { const { queryParams, itemListDocument } = form; - return api.createLibrary({ - itemListDocument, - queryParams, - }) + return api + .createLibrary({ + itemListDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -19,9 +20,10 @@ export function onCreate(form) { export function onList(form) { const { queryParams } = form; - return api.listLibrary({ - queryParams, - }) + return api + .listLibrary({ + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -34,10 +36,11 @@ export function onList(form) { export function onGet(form, dispatch, props) { const { queryParams } = form; const libraryId = props.libraryId || form.libraryId; - return api.getLibrary({ - libraryId, - queryParams, - }) + return api + .getLibrary({ + libraryId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -50,10 +53,11 @@ export function onGet(form, dispatch, props) { export function onUpdate(form, dispatch, props) { const { itemListDocument } = form; const libraryId = props.libraryId || form.libraryId; - return api.updateLibrary({ - libraryId, - itemListDocument, - }) + return api + .updateLibrary({ + libraryId, + itemListDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -66,10 +70,11 @@ export function onUpdate(form, dispatch, props) { export function onUpdateSettings(form, dispatch, props) { const { librarySettingsDocument } = form; const libraryId = props.libraryId || form.libraryId; - return api.updateLibrarySettings({ - libraryId, - librarySettingsDocument, - }) + return api + .updateLibrarySettings({ + libraryId, + librarySettingsDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -82,11 +87,12 @@ export function onUpdateSettings(form, dispatch, props) { export function onUpdateItemMetadata(form, dispatch, props) { const { metadataDocument, queryParams } = form; const libraryId = props.libraryId || form.libraryId; - return api.updateLibraryItemMetadata({ - libraryId, - metadataDocument, - queryParams, - }) + return api + .updateLibraryItemMetadata({ + libraryId, + metadataDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -99,10 +105,11 @@ export function onUpdateItemMetadata(form, dispatch, props) { export function onRemove(form, dispatch, props) { const { queryParams } = form; const libraryId = props.libraryId || form.libraryId; - return api.removeLibrary({ - libraryId, - queryParams, - }) + return api + .removeLibrary({ + libraryId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -115,12 +122,13 @@ export function onRemove(form, dispatch, props) { export function onCreateExport(form, dispatch, props) { const { queryParams } = form; const libraryId = props.libraryId || form.libraryId; - return api.getLibrary({ - libraryId, - queryParams, - path: `/API/library/${libraryId}/export`, - method: 'POST', - }) + return api + .getLibrary({ + libraryId, + queryParams, + path: `/API/library/${libraryId}/export`, + method: 'POST', + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/license.js b/src/formactions/license.js index f9b92ba4..1b58a1f7 100644 --- a/src/formactions/license.js +++ b/src/formactions/license.js @@ -5,9 +5,10 @@ import { license as api } from '@vidispine/vdt-api'; export function onUpdate(form) { const { license } = form; const file = license[0]; - return api.createLicense({ - file, - }) + return api + .createLicense({ + file, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/metadata.js b/src/formactions/metadata.js index 9d6d8777..d7da8a01 100644 --- a/src/formactions/metadata.js +++ b/src/formactions/metadata.js @@ -1,39 +1,44 @@ import { SubmissionError } from 'redux-form'; + import { metadata as MetadataApi } from '@vidispine/vdt-api'; -import withSubmissionError from './withSubmissionError'; import * as actions from '../actions'; +import withSubmissionError from './withSubmissionError'; + export function onUpdateSimpleMetadataSubmit(form, dispatch, props) { const { entityType, entityId } = props; const { simpleMetadataDocument, removedKeys = [] } = form; - const updateMetadata = new Promise((resolve, reject) => MetadataApi.updateSimpleMetadata({ - entityType, - entityId, - simpleMetadataDocument, - }) - .then(() => resolve()) - .catch(() => reject())); - const promises = [updateMetadata]; - removedKeys.forEach((thisRemove) => { - const { key } = thisRemove; - const removeThisKey = new Promise((resolve, reject) => MetadataApi.removeSimpleMetadataKey({ + const updateMetadata = new Promise((resolve, reject) => { + MetadataApi.updateSimpleMetadata({ entityType, entityId, - key, + simpleMetadataDocument, }) .then(() => resolve()) - .catch(() => reject())); - promises.push(removeThisKey); + .catch(() => reject()); }); - return Promise.all(promises) - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); + const promises = [updateMetadata]; + removedKeys.forEach((thisRemove) => { + const { key } = thisRemove; + const removeThisKey = new Promise((resolve, reject) => { + MetadataApi.removeSimpleMetadataKey({ + entityType, + entityId, + key, + }) + .then(() => resolve()) + .catch(() => reject()); }); + promises.push(removeThisKey); + }); + return Promise.all(promises).catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } export function onUpdateSimpleMetadataSubmitFail(errors, dispatch) { diff --git a/src/formactions/metadatadataset.js b/src/formactions/metadatadataset.js index a9a09683..722e841f 100644 --- a/src/formactions/metadatadataset.js +++ b/src/formactions/metadatadataset.js @@ -5,11 +5,12 @@ import { metadatadataset as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { body, headers } = form; const datasetId = props.datasetId || form.datasetId; - return api.updateMetadataMigration({ - datasetId, - body, - headers: { accept: headers.contentType, contentType: headers.contentType }, - }) + return api + .updateMetadataMigration({ + datasetId, + body, + headers: { accept: headers.contentType, contentType: headers.contentType }, + }) .then((response) => ({ body: response.data, datasetId })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/metadatafield.js b/src/formactions/metadatafield.js index 27e98d4b..167535b2 100644 --- a/src/formactions/metadatafield.js +++ b/src/formactions/metadatafield.js @@ -1,13 +1,15 @@ import { SubmissionError } from 'redux-form'; + import { metadatafield as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { metadataFieldDocument } = form; const fieldName = props.fieldName || metadataFieldDocument.name; - return api.updateMetadataField({ - fieldName, - metadataFieldDocument, - }) + return api + .updateMetadataField({ + fieldName, + metadataFieldDocument, + }) .then((response) => ({ metadataFieldDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -20,10 +22,11 @@ export function onUpdate(form, dispatch, props) { export function onGetAllowedValues(form, dispatch, props) { const { metadataFieldValueConstraintListDocument } = form; const fieldName = props.fieldName || form.fieldName; - return api.getMetadataFieldAllowedValues({ - fieldName, - metadataFieldValueConstraintListDocument, - }) + return api + .getMetadataFieldAllowedValues({ + fieldName, + metadataFieldValueConstraintListDocument, + }) .then((response) => ({ constraintValueListDocument: response.data })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/notification.js b/src/formactions/notification.js index fe723646..4312b78b 100644 --- a/src/formactions/notification.js +++ b/src/formactions/notification.js @@ -12,12 +12,13 @@ export function onUpdatePlaceholder(form, dispatch, props) { const notificationId = props.notificationId || form.notificationId; const { notificationDocument } = form; const path = `/API/notification/${notificationId}`; - return api.updateNotification({ - notificationId, - entityType: 'placeholder', - notificationDocument, - path, - }) + return api + .updateNotification({ + notificationId, + entityType: 'placeholder', + notificationDocument, + path, + }) .catch((error) => { let errorMessage = error.message; if (error.response) errorMessage = parseErrorResponse(error); @@ -35,23 +36,25 @@ export function onUpdate(form, dispatch, props) { const entityId = props.entityId || form.entityId; const { notificationDocument } = form; if (entityId !== undefined) { - return api.updateNotificationEntity({ - notificationId, - entityType, - entityId, - notificationDocument, - }) + return api + .updateNotificationEntity({ + notificationId, + entityType, + entityId, + notificationDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) errorMessage = parseErrorResponse(error); throw new SubmissionError({ _error: errorMessage }); }); } - return api.updateNotification({ - notificationId, - entityType, - notificationDocument, - }) + return api + .updateNotification({ + notificationId, + entityType, + notificationDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) errorMessage = parseErrorResponse(error); @@ -66,11 +69,12 @@ export function onCreatePlaceholder(form) { try { const { notificationDocument } = form; const path = '/API/notification'; - return api.createNotification({ - entityType: 'placeholder', - notificationDocument, - path, - }) + return api + .createNotification({ + entityType: 'placeholder', + notificationDocument, + path, + }) .then((response) => ({ ...response })) .catch((error) => { let errorMessage = error.message; @@ -88,11 +92,12 @@ export function onCreate(form, dispatch, props) { const entityType = props.entityType || Object.keys(notificationDocument.trigger)[0]; const entityId = props.entityId || form.entityId; if (entityId !== undefined) { - return api.createNotificationEntity({ - entityId, - entityType, - notificationDocument, - }) + return api + .createNotificationEntity({ + entityId, + entityType, + notificationDocument, + }) .then((response) => ({ ...response, entityType, entityId })) .catch((error) => { let errorMessage = error.message; @@ -100,10 +105,11 @@ export function onCreate(form, dispatch, props) { throw new SubmissionError({ _error: errorMessage }); }); } - return api.createNotification({ - entityType, - notificationDocument, - }) + return api + .createNotification({ + entityType, + notificationDocument, + }) .then((response) => ({ ...response, entityType })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/pathalias.js b/src/formactions/pathalias.js index eb7685fa..d21dd0e4 100644 --- a/src/formactions/pathalias.js +++ b/src/formactions/pathalias.js @@ -1,10 +1,12 @@ import { SubmissionError } from 'redux-form'; + import { configuration as api } from '@vidispine/vdt-api'; import * as actions from '../actions'; export function onSubmit(form) { - return api.updatePathAliasConfiguration({ pathAliasConfigurationDocument: form }) + return api + .updatePathAliasConfiguration({ pathAliasConfigurationDocument: form }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -23,7 +25,8 @@ export function onSubmitFail(errors, dispatch) { export function onSubmitSuccess(response, dispatch) { const { receivePathAlias } = actions.pathalias; const { openSnackBar } = actions.ui; - api.getPathAliasConfiguration() + api + .getPathAliasConfiguration() .then((r) => r.json()) .then((pathAliasConfigurationDocument) => { dispatch(receivePathAlias({ pathAliasConfigurationDocument })); diff --git a/src/formactions/projection.js b/src/formactions/projection.js index 1c881a93..7da1e3ec 100644 --- a/src/formactions/projection.js +++ b/src/formactions/projection.js @@ -5,10 +5,11 @@ import { projection as api } from '@vidispine/vdt-api'; export function onUpdateOutgoing(form, dispatch, props) { const { projectionId } = props; const { projectionDocument } = form; - return api.updateProjectionOutgoing({ - projectionId, - projectionDocument, - }) + return api + .updateProjectionOutgoing({ + projectionId, + projectionDocument, + }) .then(() => ({ projectionDocument })) .catch((error) => { let errorMessage = error.message; @@ -22,10 +23,11 @@ export function onUpdateOutgoing(form, dispatch, props) { export function onUpdateIncoming(form, dispatch, props) { const { projectionId } = props; const { projectionDocument } = form; - return api.updateProjectionIncoming({ - projectionId, - projectionDocument, - }) + return api + .updateProjectionIncoming({ + projectionId, + projectionDocument, + }) .then(() => ({ projectionDocument })) .catch((error) => { let errorMessage = error.message; @@ -38,10 +40,11 @@ export function onUpdateIncoming(form, dispatch, props) { export function onCreateOutgoing(form) { const { projectionDocument, projectionId } = form; - return api.updateProjectionOutgoing({ - projectionId, - projectionDocument, - }) + return api + .updateProjectionOutgoing({ + projectionId, + projectionDocument, + }) .then(() => ({ projectionId, projectionDocument })) .catch((error) => { let errorMessage = error.message; @@ -54,10 +57,11 @@ export function onCreateOutgoing(form) { export function onCreateIncoming(form) { const { projectionDocument, projectionId } = form; - return api.updateProjectionIncoming({ - projectionId, - projectionDocument, - }) + return api + .updateProjectionIncoming({ + projectionId, + projectionDocument, + }) .then(() => ({ projectionDocument, projectionId })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/quota.js b/src/formactions/quota.js index e807b355..b2adc33a 100644 --- a/src/formactions/quota.js +++ b/src/formactions/quota.js @@ -1,10 +1,10 @@ -import { SubmissionError } from 'redux-form'; import update from 'immutability-helper'; +import { SubmissionError } from 'redux-form'; import { quota as api } from '@vidispine/vdt-api'; function filterQueryParams(queryParams) { - if (!('filter' in queryParams) && (typeof queryParams.filter !== 'object')) { + if (!('filter' in queryParams) && typeof queryParams.filter !== 'object') { return queryParams; } const { filter } = queryParams; @@ -29,9 +29,10 @@ function filterQueryParams(queryParams) { export function onCreate(form) { const { quotaRuleDocument } = form; - return api.createQuota({ - quotaRuleDocument, - }) + return api + .createQuota({ + quotaRuleDocument, + }) .then((response) => ({ quotaRuleDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -45,9 +46,10 @@ export function onCreate(form) { export function onList(form) { const { queryParams: formQueryParams } = form; const queryParams = filterQueryParams(formQueryParams); - return api.listQuota({ - queryParams, - }) + return api + .listQuota({ + queryParams, + }) .then((response) => ({ quotaRuleListDocument: response.data, queryParams })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/resource.js b/src/formactions/resource.js index b9a51bf9..223c22f8 100644 --- a/src/formactions/resource.js +++ b/src/formactions/resource.js @@ -5,11 +5,12 @@ import { resource as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { resourceId, resourceType } = props; const { resourceDocument } = form; - return api.modifyResource({ - resourceType, - resourceId, - resourceDocument, - }) + return api + .modifyResource({ + resourceType, + resourceId, + resourceDocument, + }) .then((response) => ({ resourceDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -23,10 +24,11 @@ export function onUpdate(form, dispatch, props) { export function onCreate(form, dispatch, props) { const { resourceType } = props; const { resourceDocument } = form; - return api.createResource({ - resourceType, - resourceDocument, - }) + return api + .createResource({ + resourceType, + resourceDocument, + }) .then((response) => ({ resourceDocument: response.data })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/scheduledrequest.js b/src/formactions/scheduledrequest.js index 36c28366..014838ae 100644 --- a/src/formactions/scheduledrequest.js +++ b/src/formactions/scheduledrequest.js @@ -2,11 +2,13 @@ import { SubmissionError } from 'redux-form'; import { scheduledrequest as api } from '@vidispine/vdt-api'; -export function onListScheduledRequest(form) { // eslint-disable-line import/prefer-default-export +export function onListScheduledRequest(form) { + // eslint-disable-line import/prefer-default-export const { queryParams } = form; - return api.listScheduledRequest({ - queryParams, - }) + return api + .listScheduledRequest({ + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/search.js b/src/formactions/search.js index 934600dd..22470dfe 100644 --- a/src/formactions/search.js +++ b/src/formactions/search.js @@ -3,14 +3,12 @@ import { SubmissionError } from 'redux-form'; import { search as api } from '@vidispine/vdt-api'; export function onSearchShape(form) { - const { - queryParams = {}, - shapeSearchDocument = {}, - } = form; - return api.searchShape({ - shapeSearchDocument, - queryParams, - }) + const { queryParams = {}, shapeSearchDocument = {} } = form; + return api + .searchShape({ + shapeSearchDocument, + queryParams, + }) .then((response) => ({ queryParams, shapeSearchDocument, @@ -26,14 +24,12 @@ export function onSearchShape(form) { } export function onSearchFile(form) { - const { - queryParams = {}, - fileSearchDocument = {}, - } = form; - return api.searchFile({ - fileSearchDocument, - queryParams, - }) + const { queryParams = {}, fileSearchDocument = {} } = form; + return api + .searchFile({ + fileSearchDocument, + queryParams, + }) .then((response) => ({ queryParams, fileSearchDocument, @@ -49,14 +45,12 @@ export function onSearchFile(form) { } export function onSearch(form) { - const { - queryParams = {}, - itemSearchDocument = {}, - } = form; - return api.searchItemCollection({ - itemSearchDocument, - queryParams, - }) + const { queryParams = {}, itemSearchDocument = {} } = form; + return api + .searchItemCollection({ + itemSearchDocument, + queryParams, + }) .then((response) => ({ queryParams, itemSearchDocument, @@ -72,12 +66,11 @@ export function onSearch(form) { } export function onAutocomplete(form) { - const { - autocompleteRequestDocument = {}, - } = form; - return api.searchAutoComplete({ - autocompleteRequestDocument, - }) + const { autocompleteRequestDocument = {} } = form; + return api + .searchAutoComplete({ + autocompleteRequestDocument, + }) .then((response) => ({ autocompleteRequestDocument, ...response, diff --git a/src/formactions/secret.js b/src/formactions/secret.js index 97bc0751..1b0d0f35 100644 --- a/src/formactions/secret.js +++ b/src/formactions/secret.js @@ -1,10 +1,9 @@ import { secret as SecretApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export const onCreateSecret = withSubmissionError((form, dispatch, props) => { - const { - alias: formAlias, secretDocument, - } = form; + const { alias: formAlias, secretDocument } = form; const { alias = formAlias } = props; return SecretApi.createSecret({ alias, @@ -13,9 +12,7 @@ export const onCreateSecret = withSubmissionError((form, dispatch, props) => { }); export const onUpdateSecret = withSubmissionError((form, dispatch, props) => { - const { - alias: formAlias, key: formKey, value, - } = form; + const { alias: formAlias, key: formKey, value } = form; const { alias = formAlias, key = formKey } = props; return SecretApi.updateSecretValue({ alias, diff --git a/src/formactions/sequence.js b/src/formactions/sequence.js index 504155f9..8d9e531e 100644 --- a/src/formactions/sequence.js +++ b/src/formactions/sequence.js @@ -1,10 +1,9 @@ import { sequence as SequenceApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export const onUpdateItemSequence = withSubmissionError((form, dispatch, props) => { - const { - body, queryParams, headers, itemId: formItemId, format: formFormat, - } = form; + const { body, queryParams, headers, itemId: formItemId, format: formFormat } = form; const { itemId = formItemId, format = formFormat } = props; return SequenceApi.updateItemSequence({ itemId, diff --git a/src/formactions/shape.js b/src/formactions/shape.js index 0cd00588..edd7b735 100644 --- a/src/formactions/shape.js +++ b/src/formactions/shape.js @@ -5,10 +5,11 @@ import { shape as api } from '@vidispine/vdt-api'; export function onCreateShapeEssenceImport(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; - return api.createShapeEssenceImport({ - itemId, - queryParams, - }) + return api + .createShapeEssenceImport({ + itemId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -21,11 +22,12 @@ export function onCreateShapeEssenceImport(form, dispatch, props) { export function onCreateShape(form, dispatch, props) { const { queryParams, shapeDocument = {} } = form; const itemId = props.itemId || form.itemId; - return api.createShape({ - itemId, - queryParams, - shapeDocument, - }) + return api + .createShape({ + itemId, + queryParams, + shapeDocument, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -37,10 +39,11 @@ export function onCreateShape(form, dispatch, props) { export function onCreateShapeImport(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; - return api.createShapeImport({ - itemId, - queryParams, - }) + return api + .createShapeImport({ + itemId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -53,11 +56,12 @@ export function onCreateShapeImport(form, dispatch, props) { export function onCreateShapePlaceholder(form, dispatch, props) { const { queryParams, simpleMetadataDocument = {} } = form; const itemId = props.itemId || form.itemId; - return api.createShapePlaceholder({ - itemId, - metadataDocument: simpleMetadataDocument, - queryParams, - }) + return api + .createShapePlaceholder({ + itemId, + metadataDocument: simpleMetadataDocument, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -69,10 +73,11 @@ export function onCreateShapePlaceholder(form, dispatch, props) { export function onCreateShapeImportImp(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; - return api.createShapeImportImp({ - itemId, - queryParams, - }) + return api + .createShapeImportImp({ + itemId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -85,10 +90,11 @@ export function onCreateShapeImportImp(form, dispatch, props) { export function onList(form, dispatch, props) { const { queryParams = {} } = form; const itemId = props.itemId || form.itemId; - return api.listShape({ - itemId, - queryParams, - }) + return api + .listShape({ + itemId, + queryParams, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -103,11 +109,12 @@ export function onGet(form, dispatch, props) { const { queryParams = {} } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.getShape({ - itemId, - shapeId, - queryParams, - }) + return api + .getShape({ + itemId, + shapeId, + queryParams, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -122,12 +129,13 @@ export function onGetShapeFileList(form, dispatch, props) { const { queryParams = {} } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.getShape({ - itemId, - shapeId, - queryParams, - path: `/API/item/${itemId}/shape/${shapeId}/file`, - }) + return api + .getShape({ + itemId, + shapeId, + queryParams, + path: `/API/item/${itemId}/shape/${shapeId}/file`, + }) .then((response) => ({ itemId, shapeId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -142,11 +150,12 @@ export function onRemoveShape(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.removeShape({ - itemId, - shapeId, - queryParams, - }) + return api + .removeShape({ + itemId, + shapeId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -159,10 +168,11 @@ export function onRemoveShape(form, dispatch, props) { export function onRemoveShapeAll(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; - return api.removeShapeAll({ - itemId, - queryParams, - }) + return api + .removeShapeAll({ + itemId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -176,11 +186,12 @@ export function onCreateTranscode(form, dispatch, props) { const { queryParams = {} } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createTranscode({ - itemId, - shapeId, - queryParams, - }) + return api + .createTranscode({ + itemId, + shapeId, + queryParams, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -195,11 +206,12 @@ export function onCreateDeduction(form, dispatch, props) { const { queryParams = {} } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createDeduction({ - itemId, - shapeId, - queryParams, - }) + return api + .createDeduction({ + itemId, + shapeId, + queryParams, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -214,11 +226,12 @@ export function onUpdateShapeTag(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const tagName = props.tagName || form.tagName; - return api.updateShapeTag({ - itemId, - shapeId, - tagName, - }) + return api + .updateShapeTag({ + itemId, + shapeId, + tagName, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -233,11 +246,12 @@ export function onUpdateShapeMime(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const mimeType = props.mimeType || form.mimeType; - return api.updateShapeMime({ - itemId, - shapeId, - mimeType: encodeURIComponent(mimeType), - }) + return api + .updateShapeMime({ + itemId, + shapeId, + mimeType: encodeURIComponent(mimeType), + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -252,12 +266,13 @@ export function onUpdateShapePlaceholder(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const { queryParams, simpleMetadataDocument } = form; - return api.updateShapePlaceholder({ - itemId, - shapeId, - queryParams, - simpleMetadataDocument, - }) + return api + .updateShapePlaceholder({ + itemId, + shapeId, + queryParams, + simpleMetadataDocument, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -272,11 +287,12 @@ export function onRemoveShapeTag(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const tagName = props.tagName || form.tagName; - return api.removeShapeTag({ - itemId, - shapeId, - tagName, - }) + return api + .removeShapeTag({ + itemId, + shapeId, + tagName, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -290,11 +306,12 @@ export function onRemoveShapeMime(form, dispatch, props) { const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; const mimeType = props.mimeType || form.mimeType; - return api.removeShapeMime({ - itemId, - shapeId, - mimeType: encodeURIComponent(mimeType), - }) + return api + .removeShapeMime({ + itemId, + shapeId, + mimeType: encodeURIComponent(mimeType), + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -309,12 +326,13 @@ export function onCreateShapeAnalyze(form, dispatch, props) { const { analyzeJobDocument = {}, queryParams } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createShapeAnalyze({ - itemId, - shapeId, - queryParams, - analyzeJobDocument, - }) + return api + .createShapeAnalyze({ + itemId, + shapeId, + queryParams, + analyzeJobDocument, + }) .then((response) => ({ itemId, ...response })) .catch((error) => { let errorMessage = error.message; @@ -329,13 +347,14 @@ export function onCreateExport(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createTranscode({ - itemId, - shapeId, - queryParams, - path: `/API/item/${itemId}/shape/${shapeId}/export`, - method: 'POST', - }) + return api + .createTranscode({ + itemId, + shapeId, + queryParams, + path: `/API/item/${itemId}/shape/${shapeId}/export`, + method: 'POST', + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -349,13 +368,14 @@ export function onCreateExportImp(form, dispatch, props) { const { queryParams } = form; const itemId = props.itemId || form.itemId; const shapeId = props.shapeId || form.shapeId; - return api.createTranscode({ - itemId, - shapeId, - queryParams, - path: `/API/item/${itemId}/shape/${shapeId}/export/imp`, - method: 'POST', - }) + return api + .createTranscode({ + itemId, + shapeId, + queryParams, + path: `/API/item/${itemId}/shape/${shapeId}/export/imp`, + method: 'POST', + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/shapetag.js b/src/formactions/shapetag.js index a2ebda61..06ea6892 100644 --- a/src/formactions/shapetag.js +++ b/src/formactions/shapetag.js @@ -5,10 +5,11 @@ import { shapetag as api } from '@vidispine/vdt-api'; export function onUpdate(form, dispatch, props) { const { transcodePresetDocument } = form; const tagName = props.tagName || transcodePresetDocument.name; - return api.updateShapeTag({ - tagName, - transcodePresetDocument, - }) + return api + .updateShapeTag({ + tagName, + transcodePresetDocument, + }) .then(() => ({ transcodePresetDocument, tagName })) .catch((error) => { let errorMessage = error.message; @@ -20,12 +21,11 @@ export function onUpdate(form, dispatch, props) { } export function onCreatePreset() { - return api.createShapeTagPreset() - .catch((error) => { - let errorMessage = error.message; - if (error.response) { - errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); - } - throw new SubmissionError({ _error: errorMessage }); - }); + return api.createShapeTagPreset().catch((error) => { + let errorMessage = error.message; + if (error.response) { + errorMessage = JSON.stringify(error.response.data, (k, v) => (v === null ? undefined : v)); + } + throw new SubmissionError({ _error: errorMessage }); + }); } diff --git a/src/formactions/stitch.js b/src/formactions/stitch.js index 46108285..bd71c7b6 100644 --- a/src/formactions/stitch.js +++ b/src/formactions/stitch.js @@ -17,13 +17,10 @@ export const onGetStitch = (form) => { const urlBase = '/APInoauth/stitch/'; const { queryParams: allQueryParams } = form; const { uri, ...queryParams } = allQueryParams; - const uriString = uri.reduce( - (a, c, i) => { - const separator = i > 0 ? '&' : ''; - return `${a}${separator}uri=${encodeURIComponent(c)}`; - }, - '', - ); + const uriString = uri.reduce((a, c, i) => { + const separator = i > 0 ? '&' : ''; + return `${a}${separator}uri=${encodeURIComponent(c)}`; + }, ''); const qpString = setQueryParams(queryParams); const url = `${urlBase}${qpString || '?'}&${uriString}`; return url; diff --git a/src/formactions/storage.js b/src/formactions/storage.js index f4cb8229..49ec4c96 100644 --- a/src/formactions/storage.js +++ b/src/formactions/storage.js @@ -4,9 +4,10 @@ import { storage as api } from '@vidispine/vdt-api'; export function onCreate(form) { const { storageDocument } = form; - return api.createStorage({ - storageDocument, - }) + return api + .createStorage({ + storageDocument, + }) .then((response) => ({ storageDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -20,10 +21,11 @@ export function onCreate(form) { export function onUpdate(form, dispatch, props) { const { storageDocument } = form; const storageId = props.storageId || storageDocument.storageId; - return api.modifyStorage({ - storageId, - storageDocument, - }) + return api + .modifyStorage({ + storageId, + storageDocument, + }) .then((response) => ({ storageDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -46,11 +48,12 @@ export function onMethodUpdate(form, dispatch, props) { bandwidth: method.bandwidth, type: method.type, }; - return api.modifyStorageMethod({ - storageId, - storageMethodId, - queryParams, - }) + return api + .modifyStorageMethod({ + storageId, + storageMethodId, + queryParams, + }) .then((response) => ({ storageMethodDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -72,10 +75,11 @@ export function onMethodCreate(form, dispatch, props) { bandwidth: method.bandwidth, type: method.type, }; - return api.createStorageMethod({ - storageId, - queryParams, - }) + return api + .createStorageMethod({ + storageId, + queryParams, + }) .then((response) => ({ storageMethodDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -89,10 +93,11 @@ export function onMethodCreate(form, dispatch, props) { export function onUpdateStorageType(form, dispatch, props) { const { type: storageType } = form; const storageId = props.storageId || form.storageId; - return api.updateStorageType({ - storageId, - storageType, - }) + return api + .updateStorageType({ + storageId, + storageType, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/storagegroup.js b/src/formactions/storagegroup.js index d862a232..28ed17ab 100644 --- a/src/formactions/storagegroup.js +++ b/src/formactions/storagegroup.js @@ -5,9 +5,10 @@ import { storagegroup as api } from '@vidispine/vdt-api'; export function onCreate(form) { const { storageGroupDocument } = form; const { name: groupName } = storageGroupDocument; - return api.createStorageGroup({ - groupName, - }) + return api + .createStorageGroup({ + groupName, + }) .then(() => ({ storageGroupDocument })) .catch((error) => { let errorMessage = error.message; @@ -21,10 +22,11 @@ export function onCreate(form) { export function onAddStorageGroupStorage(form, dispatch, props) { const { groupName } = props; const { storageId } = form; - return api.addStorageGroupStorage({ - storageId, - groupName, - }) + return api + .addStorageGroupStorage({ + storageId, + groupName, + }) .then(() => ({ storageId })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/storagerule.js b/src/formactions/storagerule.js index f143137d..17f79409 100644 --- a/src/formactions/storagerule.js +++ b/src/formactions/storagerule.js @@ -7,12 +7,13 @@ export function onUpdateEntityTag(form, dispatch, props) { const entityType = props.entityType || form.entityType; const entityId = props.entityId || form.entityId; const tagName = props.tagName || form.tagName; - return api.updateEntityStorageRuleTag({ - entityType, - entityId, - tagName, - storageRuleDocument, - }) + return api + .updateEntityStorageRuleTag({ + entityType, + entityId, + tagName, + storageRuleDocument, + }) .then(() => ({ storageRuleDocument })) .catch((error) => { let errorMessage = error.message; @@ -29,11 +30,12 @@ export function onUpdateEntity(form, dispatch, props) { const entityId = props.entityId || form.entityId; const tagName = props.tagName || form.tagName; if (tagName !== undefined) return onUpdateEntityTag(form, dispatch, props); - return api.updateEntityStorageRule({ - entityType, - entityId, - storageRuleDocument, - }) + return api + .updateEntityStorageRule({ + entityType, + entityId, + storageRuleDocument, + }) .then(() => ({ storageRuleDocument })) .catch((error) => { let errorMessage = error.message; @@ -47,10 +49,11 @@ export function onUpdateEntity(form, dispatch, props) { export function onUpdateShapeTag(form, dispatch, props) { const { storageRuleDocument } = form; const tagName = props.tagName || storageRuleDocument.tag; - return api.updateStorageRuleShapeTag({ - tagName, - storageRuleDocument, - }) + return api + .updateStorageRuleShapeTag({ + tagName, + storageRuleDocument, + }) .then(() => ({ storageRuleDocument })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/taskdefinition.js b/src/formactions/taskdefinition.js index c8b517f1..a55f3baf 100644 --- a/src/formactions/taskdefinition.js +++ b/src/formactions/taskdefinition.js @@ -5,9 +5,10 @@ import { taskdefinition as api } from '@vidispine/vdt-api'; export function onCreate(form) { const { taskDefinitionDocument } = form; const taskDefinitionListDocument = { task: [taskDefinitionDocument] }; - return api.createTaskDefinition({ - taskDefinitionListDocument, - }) + return api + .createTaskDefinition({ + taskDefinitionListDocument, + }) .then((response) => ({ uriListDocument: response.data })) .catch((error) => { let errorMessage = error.message; @@ -21,10 +22,11 @@ export function onCreate(form) { export function onUpdate(form, dispatch, props) { const { taskDefinitionDocument } = form; const taskDefinitionId = props.taskDefinitionId || taskDefinitionDocument.id; - return api.modifyTaskDefinition({ - taskDefinitionId, - taskDefinitionDocument, - }) + return api + .modifyTaskDefinition({ + taskDefinitionId, + taskDefinitionDocument, + }) .then((response) => ({ taskDefinitionDocument: response.data, taskDefinitionId })) .catch((error) => { let errorMessage = error.message; @@ -37,20 +39,21 @@ export function onUpdate(form, dispatch, props) { export function onCreateJobType(form) { const { jobType, queryParams } = form; - return api.createJobType({ - jobType, - queryParams, - }) + return api + .createJobType({ + jobType, + queryParams, + }) .then(() => ({ jobType })) .catch((error) => { let errorMessage = error.message; if (error.response) { if (error.response.status === 404) { - errorMessage = '{"invalidInput":{"context":"job-type","explanation":"id must be between 20000 and 30000"}}'; + errorMessage = + '{"invalidInput":{"context":"job-type","explanation":"id must be between 20000 and 30000"}}'; } else { - errorMessage = JSON.stringify( - error.response.data, - (k, v) => (v === null ? undefined : v), + errorMessage = JSON.stringify(error.response.data, (k, v) => + v === null ? undefined : v, ); } } diff --git a/src/formactions/taskgroup.js b/src/formactions/taskgroup.js index 04f6a9ad..2fb21e8d 100644 --- a/src/formactions/taskgroup.js +++ b/src/formactions/taskgroup.js @@ -5,10 +5,11 @@ import { taskgroup as api } from '@vidispine/vdt-api'; export function onUpdate(form) { const { taskGroupDocument } = form; const { name: groupName } = taskGroupDocument; - return api.updateTaskGroup({ - groupName, - taskGroupDocument, - }) + return api + .updateTaskGroup({ + groupName, + taskGroupDocument, + }) .then((response) => ({ taskGroupDocument: response.data })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/transfer.js b/src/formactions/transfer.js index 58e50f1d..d1af2e46 100644 --- a/src/formactions/transfer.js +++ b/src/formactions/transfer.js @@ -5,10 +5,11 @@ import { transfer as api } from '@vidispine/vdt-api'; export function onUpdateTransferPriority(form, dispatch, props) { const transferId = props.transferId || form.transferId; const { queryParams } = form; - return api.updateTransferPriority({ - transferId, - queryParams, - }) + return api + .updateTransferPriority({ + transferId, + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { @@ -20,9 +21,10 @@ export function onUpdateTransferPriority(form, dispatch, props) { export function onTransferList(form) { const { queryParams } = form; - return api.listTransfer({ - queryParams, - }) + return api + .listTransfer({ + queryParams, + }) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/formactions/user.js b/src/formactions/user.js index d541c7db..d72f1f71 100644 --- a/src/formactions/user.js +++ b/src/formactions/user.js @@ -1,5 +1,7 @@ import { SubmissionError } from 'redux-form'; + import { user as UserApi } from '@vidispine/vdt-api'; + import withSubmissionError from './withSubmissionError'; export const onCreate = withSubmissionError((form) => { @@ -7,8 +9,7 @@ export const onCreate = withSubmissionError((form) => { return UserApi.createUser({ userDocument, queryParams, - }) - .then(() => ({ data: userDocument })); + }).then(() => ({ data: userDocument })); }); export const onDisable = withSubmissionError((form, dispatch, props) => { @@ -78,38 +79,34 @@ function onWhoAmI(form, dispatch, props) { errorMessage = statusText; } } - if (status === 'ok' && errorMessage === 'Network Error') throw new SubmissionError({ _error: 'Incorrect Token' }); + if (status === 'ok' && errorMessage === 'Network Error') + throw new SubmissionError({ _error: 'Incorrect Token' }); throw new SubmissionError({ _error: errorMessage }); }); } export function onGetUserToken(form, dispatch, props) { - const { - headers = {}, queryParams, baseUrl, accessKey, secretKey, - } = form; - const { status } = props; - const { - runAs, token, bearer, ...headerProps - } = headers; + const { headers = {}, queryParams, baseURL: formBaseURL, accessKey, secretKey } = form; + const { status, useContainerProxy, useDevProxy } = props; + const { runAs, token, bearer, ...headerProps } = headers; if (accessKey && secretKey) { headerProps.username = accessKey; headerProps.password = secretKey; } if (bearer) { - headerProps.authorization = bearer.startsWith('Bearer ') - ? bearer - : `'Bearer ${bearer}`; + headerProps.authorization = bearer.startsWith('Bearer ') ? bearer : `'Bearer ${bearer}`; } if (token) { return onWhoAmI(form, dispatch, props); } - const baseURL = baseUrl.replace(/\/+$/, ''); + const baseURL = formBaseURL.replace(/\/+$/, ''); + const proxyURL = useContainerProxy || useDevProxy ? undefined : baseURL; const userName = props.userName || form.userName || headers.username; return UserApi.getUserToken({ username: userName, queryParams, headers: headerProps, - baseURL, + baseURL: proxyURL, }) .then((response) => ({ ...response, @@ -127,7 +124,8 @@ export function onGetUserToken(form, dispatch, props) { errorMessage = errorMessage || statusText; } } - if (status === 'ok' && errorMessage === 'Network Error') throw new SubmissionError({ _error: 'Incorrect Credentials' }); + if (status === 'ok' && errorMessage === 'Network Error') + throw new SubmissionError({ _error: 'Incorrect Credentials' }); throw new SubmissionError({ _error: errorMessage }); }); } diff --git a/src/formactions/vxa.js b/src/formactions/vxa.js index c7a26ffc..e1acdb24 100644 --- a/src/formactions/vxa.js +++ b/src/formactions/vxa.js @@ -4,9 +4,10 @@ import { vxa as api } from '@vidispine/vdt-api'; export function onCreate(form) { const { queryParams } = form; - return api.createVxa({ - queryParams, - }) + return api + .createVxa({ + queryParams, + }) .then((response) => ({ vxaConfiguration: response.data, queryParams })) .catch((error) => { let errorMessage = error.message; diff --git a/src/formactions/withSubmissionError.js b/src/formactions/withSubmissionError.js index bf368772..f791b435 100644 --- a/src/formactions/withSubmissionError.js +++ b/src/formactions/withSubmissionError.js @@ -10,13 +10,14 @@ const throwSubmissionError = (error) => { throw new SubmissionError({ _error: errorMessage }); }; -const withSubmissionError = (submit) => (form, dispatch, props, ...args) => { - try { - return submit(form, dispatch, props, ...args) - .catch(throwSubmissionError); - } catch (error) { - throw throwSubmissionError(error); - } -}; +const withSubmissionError = + (submit) => + (form, dispatch, props, ...args) => { + try { + return submit(form, dispatch, props, ...args).catch(throwSubmissionError); + } catch (error) { + throw throwSubmissionError(error); + } + }; export default withSubmissionError; diff --git a/src/formactions/wizard.js b/src/formactions/wizard.js index 6a5db6eb..dde9ebc6 100644 --- a/src/formactions/wizard.js +++ b/src/formactions/wizard.js @@ -4,10 +4,11 @@ import { debug as api } from '@vidispine/vdt-api'; export function onParseXML(form) { const { xmlDocument } = form; - return api.echo({ - xmlDocument, - }) - .then((response) => (response.data)) + return api + .echo({ + xmlDocument, + }) + .then((response) => response.data) .catch((error) => { let errorMessage = error.message; if (error.response) { diff --git a/src/hoc/withCard.jsx b/src/hoc/withCard.jsx index 64057994..19c2b656 100644 --- a/src/hoc/withCard.jsx +++ b/src/hoc/withCard.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import CardContent from '@material-ui/core/CardContent'; import SquareCard from '../components/ui/SquareCard'; diff --git a/src/hoc/withDialogProps.jsx b/src/hoc/withDialogProps.jsx index a4cc9b0e..40079a37 100644 --- a/src/hoc/withDialogProps.jsx +++ b/src/hoc/withDialogProps.jsx @@ -1,4 +1,5 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { connect } from 'react-redux'; import * as actions from '../actions'; @@ -8,34 +9,32 @@ const mapDispatchToProps = { onOpen: actions.ui.openModal, }; -const withDialogProps = (WrappedComponent) => connect( - null, - mapDispatchToProps, -)(class extends React.PureComponent { - constructor(props) { - super(props); - this.onOpen = this.onOpen.bind(this); - this.state = { - dialogProps: undefined, - }; - } +const withDialogProps = (WrappedComponent) => + connect( + null, + mapDispatchToProps, + )( + class extends PureComponent { + constructor(props) { + super(props); + this.onOpen = this.onOpen.bind(this); + this.state = { + dialogProps: undefined, + }; + } - onOpen(modalName) { - const { onOpen } = this.props; - return (dialogProps) => { - this.setState({ dialogProps }, () => onOpen({ modalName })); - }; - } + onOpen(modalName) { + const { onOpen } = this.props; + return (dialogProps) => { + this.setState({ dialogProps }, () => onOpen({ modalName })); + }; + } - render() { - return ( - - ); - } -}); + render() { + const { dialogProps } = this.state; + return ; + } + }, + ); export default withDialogProps; diff --git a/src/hoc/withErrorBoundary.jsx b/src/hoc/withErrorBoundary.jsx index 38f31e45..ec38c344 100644 --- a/src/hoc/withErrorBoundary.jsx +++ b/src/hoc/withErrorBoundary.jsx @@ -1,8 +1,9 @@ -import React from 'react'; +import { Component } from 'react'; + import Typography from '@material-ui/core/Typography'; -const withErrorBoundary = (WrappedComponent) => ( - class extends React.Component { +const withErrorBoundary = (WrappedComponent) => + class extends Component { constructor(props) { super(props); this.state = { hasError: null }; @@ -14,12 +15,12 @@ const withErrorBoundary = (WrappedComponent) => ( } render() { - if (this.state.hasError) { + const { hasError } = this.state; + if (hasError) { return Unable to render component (see console); } return ; } - } -); + }; export default withErrorBoundary; diff --git a/src/hoc/withExpansion.jsx b/src/hoc/withExpansion.jsx index 8bba996e..7a910265 100644 --- a/src/hoc/withExpansion.jsx +++ b/src/hoc/withExpansion.jsx @@ -1,29 +1,30 @@ -import React from 'react'; +import { PureComponent } from 'react'; -const withExpansion = (WrappedComponent) => class extends React.PureComponent { - constructor(props) { - super(props); - this.onChangeExpansion = this.onChangeExpansion.bind(this); - const { defaultExpanded = false } = props; - this.state = { - expanded: defaultExpanded, - }; - } +const withExpansion = (WrappedComponent) => + class extends PureComponent { + constructor(props) { + super(props); + this.onChangeExpansion = this.onChangeExpansion.bind(this); + const { defaultExpanded = false } = props; + this.state = { + expanded: defaultExpanded, + }; + } - onChangeExpansion(event, expanded) { - this.setState({ expanded }); - } + onChangeExpansion(event, expanded) { + this.setState({ expanded }); + } - render() { - const { expanded } = this.state; - return ( - - ); - } -}; + render() { + const { expanded } = this.state; + return ( + + ); + } + }; export default withExpansion; diff --git a/src/hoc/withFormActions.js b/src/hoc/withFormActions.js index ac39195f..4159a30c 100644 --- a/src/hoc/withFormActions.js +++ b/src/hoc/withFormActions.js @@ -1,11 +1,5 @@ import { connect } from 'react-redux'; -import { - submit, - reset, - change, - destroy, - initialize, -} from 'redux-form'; +import { submit, reset, change, destroy, initialize } from 'redux-form'; const mapDispatchToProps = { submitForm: submit, @@ -15,9 +9,6 @@ const mapDispatchToProps = { initializeForm: initialize, }; -const withFormActions = (WrappedComponent) => connect( - null, - mapDispatchToProps, -)(WrappedComponent); +const withFormActions = (WrappedComponent) => connect(null, mapDispatchToProps)(WrappedComponent); export default withFormActions; diff --git a/src/hoc/withFormSelectors.js b/src/hoc/withFormSelectors.js index 9a21df28..96629e5b 100644 --- a/src/hoc/withFormSelectors.js +++ b/src/hoc/withFormSelectors.js @@ -1,10 +1,5 @@ import { connect } from 'react-redux'; -import { - isDirty, - isSubmitting, - getFormValues, - formValueSelector, -} from 'redux-form'; +import { isDirty, isSubmitting, getFormValues, formValueSelector } from 'redux-form'; const mapStateToProps = (form) => (state) => ({ formValues: getFormValues(form)(state), @@ -13,9 +8,7 @@ const mapStateToProps = (form) => (state) => ({ valueSelector: (field) => formValueSelector(form)(state, field), }); -const withFormSelectors = ( - WrappedComponent, - form, -) => connect(mapStateToProps(form))(WrappedComponent); +const withFormSelectors = (WrappedComponent, form) => + connect(mapStateToProps(form))(WrappedComponent); export default withFormSelectors; diff --git a/src/hoc/withHover.jsx b/src/hoc/withHover.jsx index 02580a04..d2c21989 100644 --- a/src/hoc/withHover.jsx +++ b/src/hoc/withHover.jsx @@ -1,35 +1,37 @@ -import React from 'react'; +import { PureComponent } from 'react'; -const withHover = (WrappedComponent) => class extends React.PureComponent { - constructor(props) { - super(props); - this.handleMouseOver = this.handleMouseOver.bind(this); - this.handleMouseOut = this.handleMouseOut.bind(this); - this.state = { - isHovering: false, - }; - } +const withHover = (WrappedComponent) => + class extends PureComponent { + constructor(props) { + super(props); + this.handleMouseOver = this.handleMouseOver.bind(this); + this.handleMouseOut = this.handleMouseOut.bind(this); + this.state = { + isHovering: false, + }; + } - handleMouseOver() { - this.setState({ isHovering: true }); - } + handleMouseOver() { + this.setState({ isHovering: true }); + } - handleMouseOut() { - this.setState({ isHovering: false }); - } + handleMouseOut() { + this.setState({ isHovering: false }); + } - render() { - return ( - - ); - } -}; + render() { + const { isHovering } = this.state; + return ( + + ); + } + }; export default withHover; diff --git a/src/hoc/withModal.js b/src/hoc/withModal.js index 13f7eed3..77316793 100644 --- a/src/hoc/withModal.js +++ b/src/hoc/withModal.js @@ -1,24 +1,32 @@ -import { compose } from 'redux'; import { connect } from 'react-redux'; +import { compose } from 'redux'; -import { withRouterProps } from './withRouterProps'; import * as actions from '../actions'; +import { withRouterProps } from './withRouterProps'; + function mapStateToProps(state, ownProps) { const { dialogName, isOpen } = ownProps; - const { ui: { modalName: currentDialog, ...props } } = state; - let open = (dialogName !== undefined) && (currentDialog === dialogName); - if (isOpen !== undefined) { open = isOpen; } // To be deprecated - return open ? { // only map state props to open dialog - open, - currentDialog, - modalName: currentDialog, - ...props, - } : { - open, - currentDialog, - modalName: currentDialog, - }; + const { + ui: { modalName: currentDialog, ...props }, + } = state; + let open = dialogName !== undefined && currentDialog === dialogName; + if (isOpen !== undefined) { + open = isOpen; + } // To be deprecated + return open + ? { + // only map state props to open dialog + open, + currentDialog, + modalName: currentDialog, + ...props, + } + : { + open, + currentDialog, + modalName: currentDialog, + }; } const mapDispatchToProps = { @@ -26,9 +34,7 @@ const mapDispatchToProps = { onOpen: actions.ui.openModal, }; -export const withModalNoRouter = (WrappedComponent) => connect( - mapStateToProps, - mapDispatchToProps, -)(WrappedComponent); +export const withModalNoRouter = (WrappedComponent) => + connect(mapStateToProps, mapDispatchToProps)(WrappedComponent); export default compose(withModalNoRouter, withRouterProps); diff --git a/src/hoc/withPagination.jsx b/src/hoc/withPagination.jsx index 321f775e..759ef09b 100644 --- a/src/hoc/withPagination.jsx +++ b/src/hoc/withPagination.jsx @@ -1,84 +1,80 @@ -import React from 'react'; +import { PureComponent } from 'react'; -const withPagination = (WrappedComponent) => class extends React.PureComponent { - constructor(props) { - super(props); - this.onChangeRowsPerPage = this.onChangeRowsPerPage.bind(this); - this.onChangePage = this.onChangePage.bind(this); - this.onChangeOrder = this.onChangeOrder.bind(this); - const { - page = 0, - rowsPerPage = 10, - orderBy, - orderDirection, - } = props; - this.state = { - page, - rowsPerPage, - orderBy, - orderDirection, - }; - } +const withPagination = (WrappedComponent) => + class extends PureComponent { + constructor(props) { + super(props); + this.onChangeRowsPerPage = this.onChangeRowsPerPage.bind(this); + this.onChangePage = this.onChangePage.bind(this); + this.onChangeOrder = this.onChangeOrder.bind(this); + const { page = 0, rowsPerPage = 10, orderBy, orderDirection } = props; + this.state = { + page, + rowsPerPage, + orderBy, + orderDirection, + }; + } - onChangeRowsPerPage({ target: { value: rowsPerPage } } = {}) { - const { onChangeRowsPerPage } = this.props; - const page = 0; - this.setState({ page, rowsPerPage }); - if (onChangeRowsPerPage) { onChangeRowsPerPage({ page, rowsPerPage }); } - } - - onChangePage({ page }) { - const { onChangePage } = this.props; - const { rowsPerPage } = this.state; - this.setState({ page }); - if (onChangePage) { onChangePage({ page, rowsPerPage }); } - } + onChangeRowsPerPage({ target: { value: rowsPerPage } } = {}) { + const { onChangeRowsPerPage } = this.props; + const page = 0; + this.setState({ page, rowsPerPage }); + if (onChangeRowsPerPage) { + onChangeRowsPerPage({ page, rowsPerPage }); + } + } - onChangeOrder(newOrderBy) { - return () => { - const { onChangeOrder } = this.props; - const { - orderDirection: prevOrderDirection, - orderBy: prevOrderBy, - } = this.state; - let orderDirection = ''; - let orderBy = ''; - if (newOrderBy !== prevOrderBy) { - orderBy = newOrderBy; - orderDirection = 'desc'; - } else if (prevOrderDirection === 'desc') { - orderBy = newOrderBy; - orderDirection = 'asc'; + onChangePage({ page }) { + const { onChangePage } = this.props; + const { rowsPerPage } = this.state; + this.setState({ page }); + if (onChangePage) { + onChangePage({ page, rowsPerPage }); } - const page = 0; - this.setState({ orderBy, orderDirection, page }); - if (onChangeOrder) { onChangeOrder({ orderBy, orderDirection, page }); } - }; - } + } + + onChangeOrder(newOrderBy) { + return () => { + const { onChangeOrder } = this.props; + const { orderDirection: prevOrderDirection, orderBy: prevOrderBy } = this.state; + let orderDirection = ''; + let orderBy = ''; + if (newOrderBy !== prevOrderBy) { + orderBy = newOrderBy; + orderDirection = 'desc'; + } else if (prevOrderDirection === 'desc') { + orderBy = newOrderBy; + orderDirection = 'asc'; + } + const page = 0; + this.setState({ orderBy, orderDirection, page }); + if (onChangeOrder) { + onChangeOrder({ orderBy, orderDirection, page }); + } + }; + } - render() { - const { - page, - rowsPerPage, - orderBy, - orderDirection, - } = this.state; - const rowsPerPageOptions = [10, 100, 250]; - if (!rowsPerPageOptions.includes(rowsPerPage)) { rowsPerPageOptions.push(rowsPerPage); } - return ( - - ); - } -}; + render() { + const { page, rowsPerPage, orderBy, orderDirection } = this.state; + const rowsPerPageOptions = [10, 100, 250]; + if (!rowsPerPageOptions.includes(rowsPerPage)) { + rowsPerPageOptions.push(rowsPerPage); + } + return ( + + ); + } + }; export default withPagination; diff --git a/src/hoc/withPaginationForm.jsx b/src/hoc/withPaginationForm.jsx index 9ac41a09..33d80b03 100644 --- a/src/hoc/withPaginationForm.jsx +++ b/src/hoc/withPaginationForm.jsx @@ -1,136 +1,134 @@ -import React from 'react'; +import { PureComponent } from 'react'; + import { compose } from 'redux'; -import { withRouterProps } from './withRouterProps'; import withFormActions from './withFormActions'; import withPagination from './withPagination'; +import { withRouterProps } from './withRouterProps'; -const withPaginationForm = (WrappedComponent) => class extends React.PureComponent { - constructor(props) { - super(props); - this.onChangeRowsPerPage = this.onChangeRowsPerPage.bind(this); - this.onChangePage = this.onChangePage.bind(this); - this.onChangeOrder = this.onChangeOrder.bind(this); - this.onSetUrlParams = this.onSetUrlParams.bind(this); - this.onGetUrlParams = this.onGetUrlParams.bind(this); - const urlParams = this.onGetUrlParams(); - const { - orderBy = '', - orderDirection = '', - } = urlParams; - let { - first = 1, - number = 10, - } = urlParams; - if (!Number.isInteger(first)) { first = parseInt(first, 10); } - if (Number.isNaN(first) || first <= 0) { first = 1; } - if (!Number.isInteger(number)) { number = parseInt(number, 10); } - if (Number.isNaN(number) || number <= 0) { number = 10; } - const page = Math.floor((first - 1) / number); - this.state = { - page, - rowsPerPage: number, - orderBy, - orderDirection, - }; - } +const withPaginationForm = (WrappedComponent) => + class extends PureComponent { + constructor(props) { + super(props); + this.onChangeRowsPerPage = this.onChangeRowsPerPage.bind(this); + this.onChangePage = this.onChangePage.bind(this); + this.onChangeOrder = this.onChangeOrder.bind(this); + this.onSetUrlParams = this.onSetUrlParams.bind(this); + this.onGetUrlParams = this.onGetUrlParams.bind(this); + const urlParams = this.onGetUrlParams(); + const { orderBy = '', orderDirection = '' } = urlParams; + let { first = 1, number = 10 } = urlParams; + if (!Number.isInteger(first)) { + first = parseInt(first, 10); + } + if (Number.isNaN(first) || first <= 0) { + first = 1; + } + if (!Number.isInteger(number)) { + number = parseInt(number, 10); + } + if (Number.isNaN(number) || number <= 0) { + number = 10; + } + const page = Math.floor((first - 1) / number); + this.state = { + page, + rowsPerPage: number, + orderBy, + orderDirection, + }; + } - onSetUrlParams(params) { - const { - location, - history, - } = this.props; - const urlParams = new URLSearchParams(location.search); - Object.entries(params).forEach(([k, v]) => urlParams.set(k, v)); - history.push({ search: urlParams.toString() }); - } + onSetUrlParams(params) { + const { location, history } = this.props; + const urlParams = new URLSearchParams(location.search); + Object.entries(params).forEach(([k, v]) => urlParams.set(k, v)); + history.push({ search: urlParams.toString() }); + } - onGetUrlParams() { - const { location } = this.props; - const urlParams = new URLSearchParams(location.search); - const params = {}; - Array.from(urlParams).forEach(([k, v]) => { params[k] = v; }); - return params; - } + onGetUrlParams() { + const { location } = this.props; + const urlParams = new URLSearchParams(location.search); + const params = {}; + Array.from(urlParams).forEach(([k, v]) => { + params[k] = v; + }); + return params; + } - async onChangeRowsPerPage({ rowsPerPage: number }) { - const { - changeForm, - firstField = 'queryParams.first', - numberField = 'queryParams.number', - submitForm, - form, - } = this.props; - const first = 1; - changeForm(form, firstField, first); - await changeForm(form, numberField, number); - this.onSetUrlParams({ first, number }); - submitForm(form); - } + async onChangeRowsPerPage({ rowsPerPage: number }) { + const { + changeForm, + firstField = 'queryParams.first', + numberField = 'queryParams.number', + submitForm, + form, + } = this.props; + const first = 1; + changeForm(form, firstField, first); + await changeForm(form, numberField, number); + this.onSetUrlParams({ first, number }); + submitForm(form); + } - async onChangePage({ page, rowsPerPage }) { - const { - formValues = {}, - changeForm, - firstField = 'queryParams.first', - numberField = 'queryParams.number', - submitForm, - form, - } = this.props; - const { queryParams = {} } = formValues; - const { number = rowsPerPage } = queryParams; - const first = page * number + 1; - changeForm(form, firstField, first); - await changeForm(form, numberField, number); - this.onSetUrlParams({ first, number }); - submitForm(form); - } + async onChangePage({ page, rowsPerPage }) { + const { + formValues = {}, + changeForm, + firstField = 'queryParams.first', + numberField = 'queryParams.number', + submitForm, + form, + } = this.props; + const { queryParams = {} } = formValues; + const { number = rowsPerPage } = queryParams; + const first = page * number + 1; + changeForm(form, firstField, first); + await changeForm(form, numberField, number); + this.onSetUrlParams({ first, number }); + submitForm(form); + } - async onChangeOrder({ orderBy, orderDirection }) { - const { - changeForm, - submitForm, - sortField = 'itemSearchDocument.sort', - firstField = 'queryParams.first', - form, - } = this.props; - const sortString = sortField.startsWith('queryParams'); - let sortValue = sortString ? undefined : []; - if (orderBy) { - if (sortString === false) { - const order = `${orderDirection}ending`; - sortValue = [{ field: orderBy, order }]; - } else { - sortValue = `${orderBy} ${orderDirection}`; + async onChangeOrder({ orderBy, orderDirection }) { + const { + changeForm, + submitForm, + sortField = 'itemSearchDocument.sort', + firstField = 'queryParams.first', + form, + } = this.props; + const sortString = sortField.startsWith('queryParams'); + let sortValue = sortString ? undefined : []; + if (orderBy) { + if (sortString === false) { + const order = `${orderDirection}ending`; + sortValue = [{ field: orderBy, order }]; + } else { + sortValue = `${orderBy} ${orderDirection}`; + } } + const first = 1; + changeForm(form, sortField, sortValue); + await changeForm(form, firstField, first); + this.onSetUrlParams({ orderDirection, orderBy, first }); + submitForm(form); } - const first = 1; - changeForm(form, sortField, sortValue); - await changeForm(form, firstField, first); - this.onSetUrlParams({ orderDirection, orderBy, first }); - submitForm(form); - } - render() { - const { - page, - rowsPerPage, - orderBy, - orderDirection, - } = this.state; - return ( - - ); - } -}; + render() { + const { page, rowsPerPage, orderBy, orderDirection } = this.state; + return ( + + ); + } + }; export default compose(withRouterProps, withFormActions, withPaginationForm, withPagination); diff --git a/src/hoc/withRouterProps.js b/src/hoc/withRouterProps.js index 5e8d2a4e..a295f4bf 100644 --- a/src/hoc/withRouterProps.js +++ b/src/hoc/withRouterProps.js @@ -9,9 +9,7 @@ function mapStateToProps(state, ownProps) { }; } -export const withRouterProps = (WrappedComponent) => connect( - mapStateToProps, - null, -)(withRouter(WrappedComponent)); +export const withRouterProps = (WrappedComponent) => + connect(mapStateToProps, null)(withRouter(WrappedComponent)); export default withRouterProps; diff --git a/src/hoc/withSnackbar.js b/src/hoc/withSnackbar.js index d0225736..17bbb9a9 100644 --- a/src/hoc/withSnackbar.js +++ b/src/hoc/withSnackbar.js @@ -1,16 +1,15 @@ -import { compose } from 'redux'; import { connect } from 'react-redux'; +import { compose } from 'redux'; -import { withRouterProps } from './withRouterProps'; import * as actions from '../actions'; +import { withRouterProps } from './withRouterProps'; + const mapDispatchToProps = { openSnackBar: actions.ui.openSnackBar, }; -export const withSnackbarNoRouter = (WrappedComponent) => connect( - null, - mapDispatchToProps, -)(WrappedComponent); +export const withSnackbarNoRouter = (WrappedComponent) => + connect(null, mapDispatchToProps)(WrappedComponent); export default compose(withSnackbarNoRouter, withRouterProps); diff --git a/src/hoc/withStepper.jsx b/src/hoc/withStepper.jsx index 3a5ea587..08ddbf00 100644 --- a/src/hoc/withStepper.jsx +++ b/src/hoc/withStepper.jsx @@ -1,42 +1,43 @@ -import React from 'react'; +import { PureComponent } from 'react'; -const withStepper = (WrappedComponent) => class extends React.PureComponent { - constructor(props) { - super(props); - this.onBack = this.onBack.bind(this); - this.onNext = this.onNext.bind(this); - this.state = { - activeStep: 0, - }; - } +const withStepper = (WrappedComponent) => + class extends PureComponent { + constructor(props) { + super(props); + this.onBack = this.onBack.bind(this); + this.onNext = this.onNext.bind(this); + this.state = { + activeStep: 0, + }; + } + + onBack() { + const { activeStep: currentActiveStep } = this.state; + if (currentActiveStep !== 0) { + this.setState({ + activeStep: currentActiveStep - 1, + }); + } + } - onBack() { - const { activeStep: currentActiveStep } = this.state; - if (currentActiveStep !== 0) { + onNext() { + const { activeStep } = this.state; this.setState({ - activeStep: currentActiveStep - 1, + activeStep: activeStep + 1, }); } - } - onNext() { - const { activeStep } = this.state; - this.setState({ - activeStep: activeStep + 1, - }); - } - - render() { - const { activeStep } = this.state; - return ( - - ); - } -}; + render() { + const { activeStep } = this.state; + return ( + + ); + } + }; export default withStepper; diff --git a/src/hoc/withTabs.jsx b/src/hoc/withTabs.jsx index 2a88bca5..31d7bef1 100644 --- a/src/hoc/withTabs.jsx +++ b/src/hoc/withTabs.jsx @@ -1,32 +1,29 @@ -import React from 'react'; +import { PureComponent } from 'react'; -const withTabs = (initialTab) => (WrappedComponent) => class extends React.PureComponent { - constructor(props) { - super(props); - this.onChangeTab = this.onChangeTab.bind(this); - const query = new URLSearchParams(props.location.search); - const tabValue = query.get('tab'); - this.state = { - tabValue: tabValue || initialTab, - }; - } +const withTabs = (initialTab) => (WrappedComponent) => + class extends PureComponent { + constructor(props) { + super(props); + this.onChangeTab = this.onChangeTab.bind(this); + const query = new URLSearchParams(props.location.search); + const tabValue = query.get('tab'); + this.state = { + tabValue: tabValue || initialTab, + }; + } - onChangeTab(event, value) { - const { history } = this.props; - history.push({ search: `?tab=${value}` }); - this.setState({ tabValue: value }); - } + onChangeTab(event, value) { + const { history } = this.props; + history.push({ search: `?tab=${value}` }); + this.setState({ tabValue: value }); + } - render() { - const { tabValue } = this.state; - return ( - - ); - } -}; + render() { + const { tabValue } = this.state; + return ( + + ); + } + }; export default withTabs; diff --git a/src/hoc/withUI.js b/src/hoc/withUI.js index 3229f398..b5efef30 100644 --- a/src/hoc/withUI.js +++ b/src/hoc/withUI.js @@ -1,6 +1,7 @@ import { compose } from 'redux'; + import { withModalNoRouter } from './withModal'; -import { withSnackbarNoRouter } from './withSnackbar'; import { withRouterProps } from './withRouterProps'; +import { withSnackbarNoRouter } from './withSnackbar'; export default compose(withModalNoRouter, withSnackbarNoRouter, withRouterProps); diff --git a/src/index.jsx b/src/index.jsx index 0e44f040..323dbfaa 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,12 +1,11 @@ -import React from 'react'; +import { createMemoryHistory as createHistory } from 'history'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; -import { createMemoryHistory as createHistory } from 'history'; +import ThemeProvider from './components/ui/Theme'; +import configureStore from './configureStore'; import { App, Login } from './containers'; import Auth from './containers/Auth'; -import configureStore from './configureStore'; -import ThemeProvider from './components/ui/Theme'; const history = createHistory(); const store = configureStore({ history }); @@ -14,10 +13,7 @@ const store = configureStore({ history }); ReactDOM.render( - + , document.getElementById('root'), diff --git a/src/reducers/index.js b/src/reducers/index.js index 831f69fc..b8b1ecde 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -1,5 +1,6 @@ import { combineReducers } from 'redux'; import { reducer as formReducer } from 'redux-form'; + import ui from './ui'; const rootReducer = combineReducers({ diff --git a/src/reducers/ui.js b/src/reducers/ui.js index 044378fd..050ff2b3 100644 --- a/src/reducers/ui.js +++ b/src/reducers/ui.js @@ -30,7 +30,7 @@ function setSnackBar(state, action) { return { ...state, snackBar }; } -export default function uiReducer(state = initialState, action) { +export default function uiReducer(state = initialState, action = {}) { switch (action.type) { case LOADING_RECEIVE: return { ...state, isLoading: action.isLoading }; diff --git a/src/utils/FieldValidation.js b/src/utils/FieldValidation.js index b84f02a2..11c2b580 100644 --- a/src/utils/FieldValidation.js +++ b/src/utils/FieldValidation.js @@ -1,31 +1,21 @@ export const required = (value) => (value ? undefined : 'Required'); -export const maxLength = (max) => (value) => ( - value && value.length > max ? `Must be ${max} characters or less` : undefined -); -export const minLength = (min) => (value) => ( - value && value.length < min ? `Must be ${min} characters or more` : undefined -); -export const number = (value) => ( - value && Number.isNaN(value) ? 'Must be a number' : undefined -); -export const minValue = (min) => (value) => ( - value && value < min ? `Must be at least ${min}` : undefined -); -export const email = (value) => ( +export const maxLength = (max) => (value) => + value && value.length > max ? `Must be ${max} characters or less` : undefined; +export const minLength = (min) => (value) => + value && value.length < min ? `Must be ${min} characters or more` : undefined; +export const number = (value) => (value && Number.isNaN(value) ? 'Must be a number' : undefined); +export const minValue = (min) => (value) => + value && value < min ? `Must be at least ${min}` : undefined; +export const email = (value) => value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value) ? 'Invalid email address' - : undefined -); -export const alphaNumeric = (value) => ( - value && /[^a-zA-Z0-9 ]/i.test(value) - ? 'Only alphanumeric characters' - : undefined -); -export const phoneNumber = (value) => ( + : undefined; +export const alphaNumeric = (value) => + value && /[^a-zA-Z0-9 ]/i.test(value) ? 'Only alphanumeric characters' : undefined; +export const phoneNumber = (value) => value && !/^(0|[1-9][0-9]{9})$/i.test(value) ? 'Invalid phone number, must be 10 digits' - : undefined -); + : undefined; export const isUrl = (value = '') => { const expression = /https?:\/\/[-a-zA-Z0-9@:%._+~#=]{2,256}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/gi; diff --git a/src/utils/bitsToSize.js b/src/utils/bitsToSize.js index 07868808..8698af13 100644 --- a/src/utils/bitsToSize.js +++ b/src/utils/bitsToSize.js @@ -4,7 +4,7 @@ function unitToSize(unit, sizes) { if (unit === 0) return '0'; const i = parseInt(Math.floor(Math.log(unit) / Math.log(1000)), 10); if (i === 0) return `${unit} ${sizes[i]})`; - return `${(unit / (1000 ** i)).toFixed(1)} ${sizes[i]}`; + return `${(unit / 1000 ** i).toFixed(1)} ${sizes[i]}`; } export default function bitsToSize(bitRate) { diff --git a/src/utils/bytesToSize.js b/src/utils/bytesToSize.js index 0da99c62..6758a1ac 100644 --- a/src/utils/bytesToSize.js +++ b/src/utils/bytesToSize.js @@ -10,7 +10,7 @@ function unitToSize(unit, sizes) { } const i = parseInt(Math.floor(Math.log(positiveUnit) / Math.log(1024)), 10); if (i === 0) return `${unit} ${sizes[i]}`; - return `${isNegative ? '-' : ''}${(unit / (1024 ** i)).toFixed(1)} ${sizes[i]}`; + return `${isNegative ? '-' : ''}${(unit / 1024 ** i).toFixed(1)} ${sizes[i]}`; } export default function bytesToSize(bytes) { diff --git a/src/utils/decodeUrl.js b/src/utils/decodeUrl.js index f5f2d5ed..2cc4aeca 100644 --- a/src/utils/decodeUrl.js +++ b/src/utils/decodeUrl.js @@ -11,7 +11,8 @@ const decodeUrl = (urlString = '') => { direct = true; url = url.replace('direct+', ''); } - const re = /(?:([^:]*):\/\/)?(?:([^:@]*)(?::([^@]*))?@)?(?:([^/:]*)\.(?=[^./:]*\.[^./:]*))?([^./:]*)(?:\.([^/.:]*))?(?::([0-9]*))?(\/[^?#]*(?=.*?\/)\/)?([^?#]*)?(?:\?([^#]*))?(?:#(.*))?/; + const re = + /(?:([^:]*):\/\/)?(?:([^:@]*)(?::([^@]*))?@)?(?:([^/:]*)\.(?=[^./:]*\.[^./:]*))?([^./:]*)(?:\.([^/.:]*))?(?::([0-9]*))?(\/[^?#]*(?=.*?\/)\/)?([^?#]*)?(?:\?([^#]*))?(?:#(.*))?/; const [ href, protocol, @@ -30,17 +31,26 @@ const decodeUrl = (urlString = '') => { let host; if (subdomain === '') { host = `${host}.`; - } else if (subdomain !== undefined) { host = `${subdomain}.`; } - if (domain) { host = `${host || ''}${domain}`; } + } else if (subdomain !== undefined) { + host = `${subdomain}.`; + } + if (domain) { + host = `${host || ''}${domain}`; + } if (tld === '') { host = `${host}.`; - } else if (tld !== undefined) { host = `${host}.${tld}`; } + } else if (tld !== undefined) { + host = `${host}.${tld}`; + } let queryParams = {}; if (queryString) { - queryParams = queryString.split('&').map((p) => p.split('=')).reduce((i, e) => ({ ...i, [e[0]]: e[1] }), {}); + queryParams = queryString + .split('&') + .map((p) => p.split('=')) + .reduce((i, e) => ({ ...i, [e[0]]: e[1] }), {}); } - const fullPath = `${path || ''}${(file && file !== '/') ? file : ''}`; + const fullPath = `${path || ''}${file && file !== '/' ? file : ''}`; return { href, protocol, diff --git a/src/utils/downloadThumbnail.js b/src/utils/downloadThumbnail.js index 2a07836a..364088bb 100644 --- a/src/utils/downloadThumbnail.js +++ b/src/utils/downloadThumbnail.js @@ -1,15 +1,16 @@ import { thumbnail as ThumbnailApi } from '@vidispine/vdt-api'; + import downloadFile from './downloadFile'; -export default function downloadThumbnail({ - resourceId, itemId, time, isPoster, -}) { +export default function downloadThumbnail({ resourceId, itemId, time, isPoster }) { const fileName = `${isPoster ? 'poster' : 'thumbnail'}_${itemId}_${time}.jpg`; const apiRequest = isPoster ? ThumbnailApi.getPoster : ThumbnailApi.getThumbnail; apiRequest({ - resourceId, itemId, time, responseType: 'blob', - }) - .then(({ data }) => { - downloadFile({ data, fileName }); - }); + resourceId, + itemId, + time, + responseType: 'blob', + }).then(({ data }) => { + downloadFile({ data, fileName }); + }); } diff --git a/src/utils/encodeUrl.js b/src/utils/encodeUrl.js index 262284fa..ead512d3 100644 --- a/src/utils/encodeUrl.js +++ b/src/utils/encodeUrl.js @@ -1,31 +1,38 @@ -import decodeUrl from './decodeUrl'; import { UNIVERSAL_SCHEME } from '../const/UrlScheme'; -const encodeUrl = (props = {}, url) => { +import decodeUrl from './decodeUrl'; + +const encodeUrl = (props = {}, url = undefined) => { let urlProps = {}; - if (url) { urlProps = decodeUrl(url); } - const { - direct, - protocol, - username, - password, - host, - port, - path, - queryParams, - } = { ...urlProps, ...props }; + if (url) { + urlProps = decodeUrl(url); + } + const { direct, protocol, username, password, host, port, path, queryParams } = { + ...urlProps, + ...props, + }; if (protocol === UNIVERSAL_SCHEME) { return 'universal:/'; } let urlString = ''; - if (direct) { urlString = 'direct+'; } - if (protocol) { urlString = `${urlString}${protocol}://`; } - if (username) { urlString = `${urlString}${username}@`; } + if (direct) { + urlString = 'direct+'; + } + if (protocol) { + urlString = `${urlString}${protocol}://`; + } + if (username) { + urlString = `${urlString}${username}@`; + } if (password && urlString.endsWith('@')) { urlString = `${urlString.split('@')[0]}:${password}@`; } - if (host) { urlString = `${urlString}${host}`; } - if (port) { urlString = `${urlString}:${port}`; } + if (host) { + urlString = `${urlString}${host}`; + } + if (port) { + urlString = `${urlString}:${port}`; + } if (path) { if (path.startsWith('/') || urlString.endsWith('/')) { urlString = `${urlString}${path}`; diff --git a/src/utils/formatTimeRepresentation.js b/src/utils/formatTimeRepresentation.js index 6530218b..74cab4e5 100644 --- a/src/utils/formatTimeRepresentation.js +++ b/src/utils/formatTimeRepresentation.js @@ -1,17 +1,8 @@ import { formatTimeCodeText, formatTimeCodeSeconds, formatTimeCodeSmpte } from '@vidispine/vdt-js'; -import { - TEXT_TIME, SMPTE_TIME, SECONDS_TIME, -} from '../const/Time'; +import { TEXT_TIME, SMPTE_TIME, SECONDS_TIME } from '../const/Time'; -function formatTimeRepresentation({ - to, - from, - value, - toOptions, - fromOptions, - conform, -}) { +function formatTimeRepresentation({ to, from, value, toOptions, fromOptions, conform }) { if (to === from) return value; let timeCode; diff --git a/src/utils/formatXML.js b/src/utils/formatXML.js index e09a888f..0a2932b4 100644 --- a/src/utils/formatXML.js +++ b/src/utils/formatXML.js @@ -4,20 +4,24 @@ export default function formatXML(xml) { const reg = /(>)(<)(\/*)/g; let pad = 0; - return xml.replace(reg, '$1\r\n$2$3').split('\r\n').map((node) => { - let indent = 0; - if (node.match(/.+<\/\w[^>]*>$/)) { - indent = 0; - } else if (node.match(/^<\/\w/) && pad > 0) { - pad -= 1; - } else if (node.match(/^<\w[^>]*[^/]>.*$/)) { - indent = 1; - } else { - indent = 0; - } + return xml + .replace(reg, '$1\r\n$2$3') + .split('\r\n') + .map((node) => { + let indent = 0; + if (node.match(/.+<\/\w[^>]*>$/)) { + indent = 0; + } else if (node.match(/^<\/\w/) && pad > 0) { + pad -= 1; + } else if (node.match(/^<\w[^>]*[^/]>.*$/)) { + indent = 1; + } else { + indent = 0; + } - pad += indent; + pad += indent; - return PADDING.repeat(pad - indent) + node; - }).join('\r\n'); + return PADDING.repeat(pad - indent) + node; + }) + .join('\r\n'); } diff --git a/src/utils/index.js b/src/utils/index.js index 450cfab9..cc25f1c4 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,13 +1,7 @@ -import capitalizeString from './capitalizeString'; import bytesToSize from './bytesToSize'; -import formatXML from './formatXML'; +import capitalizeString from './capitalizeString'; import downloadFile from './downloadFile'; +import formatXML from './formatXML'; import fromNow from './fromNow'; -export { - capitalizeString, - bytesToSize, - formatXML, - downloadFile, - fromNow, -}; +export { capitalizeString, bytesToSize, formatXML, downloadFile, fromNow }; diff --git a/src/utils/metadataDocumentToForm.js b/src/utils/metadataDocumentToForm.js index 157f8ebf..84d13fb4 100644 --- a/src/utils/metadataDocumentToForm.js +++ b/src/utils/metadataDocumentToForm.js @@ -1,7 +1,4 @@ -const EXCLUDE_FIELDS = [ - 'user', - 'itemId', -]; +const EXCLUDE_FIELDS = ['user', 'itemId']; function valueMap(thisValue) { const { value } = thisValue; @@ -12,8 +9,12 @@ function valueMap(thisValue) { function fieldReduce(fieldList, thisField) { const { name, value: valueList = [] } = thisField; - if (name.startsWith('__')) { return fieldList; } - if (EXCLUDE_FIELDS.includes(name)) { return fieldList; } + if (name.startsWith('__')) { + return fieldList; + } + if (EXCLUDE_FIELDS.includes(name)) { + return fieldList; + } const value = valueList.map(valueMap); fieldList.push({ name, @@ -34,12 +35,7 @@ function groupMap(thisGroup) { } function timespanMap(thisTimespan) { - const { - start, - end, - field: fieldList = [], - group: groupList = [], - } = thisTimespan; + const { start, end, field: fieldList = [], group: groupList = [] } = thisTimespan; const field = fieldList.reduce(fieldReduce, []); const group = groupList.map(groupMap); return { @@ -51,7 +47,9 @@ function timespanMap(thisTimespan) { } function metadataDocumentToForm(metadataDocument) { - if (metadataDocument === undefined) { return {}; } + if (metadataDocument === undefined) { + return {}; + } const { timespan: timespanList = [] } = metadataDocument; const timespan = timespanList.map(timespanMap); return { diff --git a/src/utils/metadataDocumentToKv.js b/src/utils/metadataDocumentToKv.js index 5fd5167b..c92781a4 100644 --- a/src/utils/metadataDocumentToKv.js +++ b/src/utils/metadataDocumentToKv.js @@ -1,18 +1,24 @@ function fieldValueToList(valueList) { const output = []; output.getFirstValue = () => { - if (this.length === 0) { return undefined; } + if (this.length === 0) { + return undefined; + } return this[0]; }; - if (valueList === undefined) { return output; } + if (valueList === undefined) { + return output; + } valueList.forEach((thisValue) => output.push(thisValue.value)); return output; } function fieldToKv(fieldList) { const output = {}; - if (fieldList === undefined) { return output; } + if (fieldList === undefined) { + return output; + } fieldList.forEach((thisField) => { const { name } = thisField; const { value: valueList } = thisField; @@ -29,7 +35,9 @@ function fieldToKv(fieldList) { function groupToKv(groupList) { const output = {}; - if (groupList === undefined) { return output; } + if (groupList === undefined) { + return output; + } groupList.forEach((thisGroup) => { const { name } = thisGroup; const field = fieldToKv(thisGroup.field); @@ -55,7 +63,9 @@ function groupToKv(groupList) { function timespanToKv(timespanList) { const output = {}; - if (timespanList === undefined) { return output; } + if (timespanList === undefined) { + return output; + } timespanList.forEach((thisTimespan) => { const { start, end } = thisTimespan; const key = `${start}_${end}`; @@ -73,7 +83,9 @@ function timespanToKv(timespanList) { export function metadataDocumentToKv(metadataDocument) { const output = {}; - if (metadataDocument === undefined) { return output; } + if (metadataDocument === undefined) { + return output; + } const timespan = timespanToKv(metadataDocument.timespan); return { timespan, diff --git a/src/utils/setWelcomeConsoleMessage.js b/src/utils/setWelcomeConsoleMessage.js index ee0e3712..2bf2a97f 100644 --- a/src/utils/setWelcomeConsoleMessage.js +++ b/src/utils/setWelcomeConsoleMessage.js @@ -19,11 +19,12 @@ const setWelcomeConsoleMessage = () => { window.VidiCore = Object.keys(VidiCoreApi).reduce((acc, cur) => { const val = Object.keys(VidiCoreApi[cur]).reduce((thisAcc, thisCur) => { const thisVal = VidiCoreApi[cur][thisCur]; - const thisFunc = (args) => thisVal(args).then((resp) => { - // eslint-disable-next-line no-console - console.log(resp.data); - return resp; - }); + const thisFunc = (args) => + thisVal(args).then((resp) => { + // eslint-disable-next-line no-console + console.log(resp.data); + return resp; + }); return { ...thisAcc, [thisCur]: thisFunc }; }, {}); return { ...acc, [cur]: val }; diff --git a/src/utils/similar.js b/src/utils/similar.js index 9a928cf6..5d37496c 100644 --- a/src/utils/similar.js +++ b/src/utils/similar.js @@ -54,11 +54,10 @@ export function jaroDistance(s1, s2) { } return numMatches > 0 - ? ( - numMatches / shorter.length - + numMatches / longer.length - + (numMatches - Math.floor(transpositions / 2)) / numMatches - ) / 3.0 + ? (numMatches / shorter.length + + numMatches / longer.length + + (numMatches - Math.floor(transpositions / 2)) / numMatches) / + 3.0 : 0; } @@ -68,13 +67,16 @@ export function jaroToSimilarity(s1, s2, prefixScalingFactor = 0.2) { let commonPrefixLength = 0; // eslint-disable-next-line no-plusplus for (let i = 0; i < s1.length; i++) { - if (s1[i] === s2[i]) { commonPrefixLength += 1; } else { break; } + if (s1[i] === s2[i]) { + commonPrefixLength += 1; + } else { + break; + } } - return jaroSimilarity - + Math.min(commonPrefixLength, 4) - * prefixScalingFactor - * (1 - jaroSimilarity); + return ( + jaroSimilarity + Math.min(commonPrefixLength, 4) * prefixScalingFactor * (1 - jaroSimilarity) + ); } export function optionToScore(inputValue, option) { @@ -87,7 +89,9 @@ export function optionToScore(inputValue, option) { ); if (closestSynonym === null || similarity > closestSynonym.similarity) { closestSynonym = { similarity, value: synonym }; - if (similarity === 1) { return false; } + if (similarity === 1) { + return false; + } } return true; }); diff --git a/src/utils/sortKeyCaseInsensitive.js b/src/utils/sortKeyCaseInsensitive.js index a336bba2..a9dcc44b 100644 --- a/src/utils/sortKeyCaseInsensitive.js +++ b/src/utils/sortKeyCaseInsensitive.js @@ -1,3 +1,6 @@ -const sortKeyCaseInsensitive = (key) => (a = {}, b = {}) => a[key].localeCompare(b[key], undefined, { sensitivity: 'base' }); +const sortKeyCaseInsensitive = + (key) => + (a = {}, b = {}) => + a[key].localeCompare(b[key], undefined, { sensitivity: 'base' }); export default sortKeyCaseInsensitive; diff --git a/vite.config.js b/vite.config.js index 36546de2..b7ea2ff5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,8 +1,9 @@ /* eslint-disable import/no-extraneous-dependencies */ -import { defineConfig, splitVendorChunkPlugin, loadEnv } from 'vite'; -import react from '@vitejs/plugin-react'; import dns from 'dns'; +import react from '@vitejs/plugin-react'; +import { defineConfig, splitVendorChunkPlugin, loadEnv } from 'vite'; + dns.setDefaultResultOrder('verbatim'); const setProxy = ({ mode }) => { @@ -16,7 +17,7 @@ const setProxy = ({ mode }) => { selfHandleResponse: false, configure: (proxy) => { proxy.on('proxyRes', (proxyRes) => { - // eslint-disable-next-line no-param-reassign + // eslint-disable-next-line no-param-reassign delete proxyRes.headers['www-authenticate']; }); }, @@ -28,25 +29,28 @@ const setProxy = ({ mode }) => { return proxy; }; -const base = process.env.PUBLIC_URL === '' ? '/' : process.env.PUBLIC_URL; - -export default ({ mode }) => defineConfig({ - base, - server: { - port: 3000, - host: 'localhost', - open: true, - proxy: setProxy({ mode }), +const setBase = ({ mode }) => { + const env = loadEnv(mode, process.cwd(), ''); + const base = env.BASE_URL === '' ? '/' : env.BASE_URL; + return base; +}; - }, - plugins: [splitVendorChunkPlugin(), react()], - define: { - 'process.env.NODE_ENV': `"${mode}"`, - }, - build: { - outDir: 'build', - commonjsOptions: { - transformMixedEsModules: true, +export default ({ mode }) => + defineConfig({ + base: setBase({ mode }), + server: { + port: 3000, + host: 'localhost', + proxy: setProxy({ mode }), + }, + plugins: [splitVendorChunkPlugin(), react()], + define: { + 'process.env.NODE_ENV': `"${mode}"`, + }, + build: { + outDir: 'build', + commonjsOptions: { + transformMixedEsModules: true, + }, }, - }, -}); + });