diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b5a9c74621806502c6210ac1babea7c88af3163..4e51607704ebc6a8e0299856620db6366892d1f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ image: docker:stable -# Pour l'utilisation de testcontainers +# For using Testcontainers : # https://www.testcontainers.org/supported_docker_environment/continuous_integration/gitlab_ci/ services: &dind_definition - name: docker:dind @@ -125,40 +125,43 @@ production: deployment: stage: trigger + variables: + TRIGGERED_BY_PARENT: 'true' + TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" + TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" + TRIGGERED_PROJECT_COMMIT: "$CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA" + TRIGGERED_PROJECT_COMMIT_TITLE: "$CI_COMMIT_TITLE" + TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env variables: - TRIGGERED_BY_PARENT: 'true' ENV: 'development' OA_FRONTEND_VERSION: '$CI_COMMIT_REF_SLUG' # develop branch INIT_DB_USER: true - REMOVE_VOLUMES: true + REMOVE_DB_AND_VOLUMES: true when: on_success - if: '$CI_COMMIT_REF_SLUG == "main"' # Preprod Env variables: - TRIGGERED_BY_PARENT: 'true' ENV: 'preprod' OA_FRONTEND_VERSION: '$CI_COMMIT_REF_SLUG' # main branch INIT_DB_USER: true - REMOVE_VOLUMES: true + REMOVE_DB_AND_VOLUMES: true when: on_success - if: '$CI_COMMIT_TAG' # Production Env variables: - TRIGGERED_BY_PARENT: 'true' ENV: "production" OA_FRONTEND_VERSION: '$CI_COMMIT_TAG' INIT_DB_USER: false - REMOVE_VOLUMES: false + REMOVE_DB_AND_VOLUMES: false when: on_success - if: '$CI_MERGE_REQUEST_IID != null' # Do nothing with merge request when: never - when: manual # Trigger manually if needed ( Feature Dev branch ) variables: - TRIGGERED_BY_PARENT: 'true' ENV: "development" OA_FRONTEND_VERSION: '$CI_COMMIT_REF_SLUG' INIT_DB_USER: true - REMOVE_VOLUMES: true + REMOVE_DB_AND_VOLUMES: true trigger: project: '$TRIGGER_PROJECT_NAME' branch: main diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3fb3b77ee44204e0a79f7ea283a854a3e197a471..0000000000000000000000000000000000000000 --- a/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM node:19-alpine -WORKDIR /app -COPY package*.json ./ -RUN npm install --save-dev @vue/cli-service --legacy-peer-deps &npm ci --legacy-peer-deps && export NODE_OPTIONS=--openssl-legacy-provider -CMD ["npm", "run", "serve"] \ No newline at end of file diff --git a/README.md b/README.md index 198495c1b0543a763618d045fd7f02e0b816775d..5c55db03080e42c14ee33050c19b8d8813154562 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ +# local deployment + ``` sh +docker compose -f docker/local/compose.yml up + ``` + # ui ## Project setup diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index e5bf94113dfa439e3f63b7304ed8c788a654d9e5..0000000000000000000000000000000000000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,10 +0,0 @@ -services: - web: - build: - context: . - dockerfile: Dockerfile - ports: - - "8080:8080" - volumes: - - .:/app - command: npm run serve \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 97df31138f9db1a890acc2a4b271354a77b36400..e6422ec905061d430556c94e6e80f7a3bd5b46d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -76,6 +76,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" @@ -101,6 +102,7 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", + "dev": true, "engines": { "node": ">=6.9.0" } @@ -109,6 +111,7 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.0", @@ -195,6 +198,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "dev": true, "dependencies": { "@babel/compat-data": "^7.25.9", "@babel/helper-validator-option": "^7.25.9", @@ -275,6 +279,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, "dependencies": { "@babel/traverse": "^7.25.9", "@babel/types": "^7.25.9" @@ -287,6 +292,7 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9", @@ -396,6 +402,7 @@ "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, "engines": { "node": ">=6.9.0" } @@ -418,6 +425,7 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "dev": true, "dependencies": { "@babel/template": "^7.25.9", "@babel/types": "^7.26.0" @@ -1719,6 +1727,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, "optional": true, "engines": { "node": ">=0.1.90" @@ -1728,6 +1737,7 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.6.tgz", "integrity": "sha512-fi0eVdCOtKu5Ed6+E8mYxUF6ZTFJDZvHogCBelM0xVXmrDEkyM22gRArQzq1YcHPm1V47Vf/iAD+WgVdUlJCGg==", + "dev": true, "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -1784,6 +1794,7 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, "dependencies": { "debug": "^3.1.0", "lodash.once": "^4.1.1" @@ -1793,6 +1804,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "dependencies": { "ms": "^2.1.1" } @@ -2578,6 +2590,7 @@ "version": "8.56.12", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", + "dev": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -2587,6 +2600,7 @@ "version": "3.7.7", "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -2595,7 +2609,8 @@ "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true }, "node_modules/@types/express": { "version": "4.17.21", @@ -2737,12 +2752,14 @@ "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==" + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true }, "node_modules/@types/sizzle": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.9.tgz", - "integrity": "sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w==" + "integrity": "sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w==", + "dev": true }, "node_modules/@types/sockjs": { "version": "0.3.36", @@ -2813,6 +2830,7 @@ "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "dev": true, "optional": true, "dependencies": { "@types/node": "*" @@ -3486,6 +3504,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.13.2", "@webassemblyjs/helper-wasm-bytecode": "1.13.2" @@ -3494,22 +3513,26 @@ "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", - "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==" + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", - "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==" + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", - "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==" + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.13.2", "@webassemblyjs/helper-api-error": "1.13.2", @@ -3519,12 +3542,14 @@ "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", - "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==" + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", @@ -3536,6 +3561,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } @@ -3544,6 +3570,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } @@ -3551,12 +3578,14 @@ "node_modules/@webassemblyjs/utf8": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", - "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==" + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", @@ -3572,6 +3601,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-wasm-bytecode": "1.13.2", @@ -3584,6 +3614,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", @@ -3595,6 +3626,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-api-error": "1.13.2", @@ -3608,6 +3640,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, "dependencies": { "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" @@ -3616,12 +3649,14 @@ "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, "node_modules/accepts": { "version": "1.3.8", @@ -3688,6 +3723,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -3700,6 +3736,7 @@ "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", @@ -3751,6 +3788,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "peerDependencies": { "ajv": "^6.9.1" } @@ -3769,6 +3807,7 @@ "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, "engines": { "node": ">=6" } @@ -3777,6 +3816,7 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -3842,6 +3882,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, "funding": [ { "type": "github", @@ -3937,6 +3978,7 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, "dependencies": { "safer-buffer": "~2.1.0" } @@ -3945,6 +3987,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, "engines": { "node": ">=0.8" } @@ -3953,6 +3996,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, "engines": { "node": ">=8" } @@ -3960,12 +4004,14 @@ "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "node_modules/at-least-node": { "version": "1.0.0", @@ -4030,6 +4076,7 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true, "engines": { "node": "*" } @@ -4037,7 +4084,8 @@ "node_modules/aws4": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", - "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==" + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", + "dev": true }, "node_modules/babel-loader": { "version": "8.4.1", @@ -4129,6 +4177,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, "funding": [ { "type": "github", @@ -4153,6 +4202,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, "dependencies": { "tweetnacl": "^0.14.3" } @@ -4190,12 +4240,14 @@ "node_modules/blob-util": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==" + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true }, "node_modules/body-parser": { "version": "1.20.3", @@ -4271,6 +4323,7 @@ "version": "4.24.2", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "dev": true, "funding": [ { "type": "opencollective", @@ -4317,6 +4370,7 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, "funding": [ { "type": "github", @@ -4340,6 +4394,7 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, "engines": { "node": "*" } @@ -4375,6 +4430,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.4.0.tgz", "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", + "dev": true, "engines": { "node": ">=6" } @@ -4440,6 +4496,7 @@ "version": "1.0.30001680", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "dev": true, "funding": [ { "type": "opencollective", @@ -4467,7 +4524,8 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true }, "node_modules/chalk": { "version": "3.0.0", @@ -4525,6 +4583,7 @@ "version": "2.24.0", "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true, "engines": { "node": ">= 0.8.0" } @@ -4547,6 +4606,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, "engines": { "node": ">=6.0" } @@ -4555,6 +4615,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", + "dev": true, "funding": [ { "type": "github", @@ -4580,6 +4641,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, "engines": { "node": ">=6" } @@ -4588,6 +4650,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, "dependencies": { "restore-cursor": "^3.1.0" }, @@ -4654,6 +4717,7 @@ "version": "0.6.5", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0" }, @@ -4668,6 +4732,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -4757,6 +4822,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -4768,6 +4834,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, "engines": { "node": ">= 6" } @@ -4776,6 +4843,7 @@ "version": "1.8.2", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, "engines": { "node": ">=4.0.0" } @@ -4875,7 +4943,8 @@ "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "node_modules/cookie": { "version": "0.7.1", @@ -5293,6 +5362,7 @@ "version": "13.16.0", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.16.0.tgz", "integrity": "sha512-g6XcwqnvzXrqiBQR/5gN+QsyRmKRhls1y5E42fyOvsmU7JuY+wM6uHJWj4ZPttjabzbnRvxcik2WemR8+xT6FA==", + "dev": true, "hasInstallScript": true, "dependencies": { "@cypress/request": "^3.0.6", @@ -5370,6 +5440,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5385,6 +5456,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5396,6 +5468,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, "dependencies": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -5418,6 +5491,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, "dependencies": { "pump": "^3.0.0" }, @@ -5432,6 +5506,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, "engines": { "node": ">=8" }, @@ -5443,6 +5518,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, "dependencies": { "path-key": "^3.0.0" }, @@ -5454,6 +5530,7 @@ "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, "bin": { "semver": "bin/semver.js" }, @@ -5465,6 +5542,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -5479,6 +5557,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, "dependencies": { "assert-plus": "^1.0.0" }, @@ -5537,7 +5616,8 @@ "node_modules/dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", - "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", + "dev": true }, "node_modules/de-indent": { "version": "1.0.2", @@ -5712,6 +5792,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -5908,6 +5989,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -5921,12 +6003,14 @@ "node_modules/electron-to-chromium": { "version": "1.5.63", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", - "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==" + "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==", + "dev": true }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/emojis-list": { "version": "3.0.0", @@ -5948,6 +6032,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, "dependencies": { "once": "^1.4.0" } @@ -5956,6 +6041,7 @@ "version": "5.17.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -5968,6 +6054,7 @@ "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" @@ -6092,7 +6179,8 @@ "node_modules/es-module-lexer": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==" + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true }, "node_modules/es-object-atoms": { "version": "1.0.0", @@ -6138,6 +6226,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, "engines": { "node": ">=6" } @@ -6272,6 +6361,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -6599,6 +6689,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -6610,6 +6701,7 @@ "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" } @@ -6618,6 +6710,7 @@ "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" } @@ -6657,7 +6750,8 @@ "node_modules/eventemitter2": { "version": "6.4.7", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", - "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==" + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true }, "node_modules/eventemitter3": { "version": "4.0.7", @@ -6668,6 +6762,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "engines": { "node": ">=0.8.x" } @@ -6761,6 +6856,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, "dependencies": { "pify": "^2.2.0" }, @@ -6825,12 +6921,14 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -6850,6 +6948,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, "dependencies": { "pump": "^3.0.0" }, @@ -6864,6 +6963,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, "engines": [ "node >=0.6.0" ] @@ -6910,7 +7010,8 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -6947,6 +7048,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, "dependencies": { "pend": "~1.2.0" } @@ -6955,6 +7057,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -6969,6 +7072,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, "engines": { "node": ">=0.8.0" } @@ -7117,6 +7221,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, "engines": { "node": "*" } @@ -7125,6 +7230,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dev": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -7243,6 +7349,7 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, "engines": { "node": ">=6.9.0" } @@ -7306,6 +7413,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, "dependencies": { "async": "^3.2.0" } @@ -7314,6 +7422,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, "dependencies": { "assert-plus": "^1.0.0" } @@ -7353,12 +7462,14 @@ "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, "dependencies": { "ini": "2.0.0" }, @@ -7946,6 +8057,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", + "dev": true, "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", @@ -7959,6 +8071,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, "engines": { "node": ">=8.12.0" } @@ -8001,6 +8114,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -8059,6 +8173,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, "engines": { "node": ">=8" } @@ -8082,6 +8197,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, "engines": { "node": ">=10" } @@ -8272,6 +8388,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -8291,6 +8408,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, "dependencies": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -8348,6 +8466,7 @@ "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" } @@ -8457,12 +8576,14 @@ "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, "engines": { "node": ">=10" }, @@ -8522,7 +8643,8 @@ "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true }, "node_modules/javascript-stringify": { "version": "2.1.0", @@ -8534,6 +8656,7 @@ "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -8547,6 +8670,7 @@ "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -8599,7 +8723,8 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true }, "node_modules/jsesc": { "version": "3.0.2", @@ -8627,17 +8752,20 @@ "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", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -8648,12 +8776,14 @@ "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, "bin": { "json5": "lib/cli.js" }, @@ -8727,6 +8857,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, "engines": [ "node >=0.6.0" ], @@ -8785,6 +8916,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", + "dev": true, "engines": { "node": "> 0.8" } @@ -8821,6 +8953,7 @@ "version": "3.14.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -8847,6 +8980,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, "engines": { "node": ">=6.11.5" } @@ -8944,7 +9078,8 @@ "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true }, "node_modules/lodash.truncate": { "version": "4.4.2", @@ -8962,6 +9097,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -8977,6 +9113,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8992,6 +9129,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, "dependencies": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", @@ -9009,6 +9147,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -9025,6 +9164,7 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -9046,6 +9186,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, "dependencies": { "yallist": "^3.0.2" } @@ -9454,7 +9595,8 @@ "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==" + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -9733,7 +9875,8 @@ "node_modules/ospath": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", - "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==" + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true }, "node_modules/p-finally": { "version": "1.0.0", @@ -9776,6 +9919,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, "dependencies": { "aggregate-error": "^3.0.0" }, @@ -9925,12 +10069,14 @@ "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true }, "node_modules/picocolors": { "version": "1.1.1", @@ -9952,6 +10098,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -10685,6 +10832,7 @@ "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, "engines": { "node": ">=6" }, @@ -10705,6 +10853,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, "engines": { "node": ">= 0.6.0" } @@ -10971,7 +11120,8 @@ "node_modules/proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==" + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true }, "node_modules/pseudomap": { "version": "1.0.2", @@ -10983,6 +11133,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "dev": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -10992,6 +11143,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "engines": { "node": ">=6" } @@ -11034,6 +11186,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -11317,6 +11470,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, "dependencies": { "throttleit": "^1.0.0" } @@ -11373,6 +11527,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -11402,7 +11557,8 @@ "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true }, "node_modules/rimraf": { "version": "3.0.2", @@ -11446,6 +11602,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, "dependencies": { "tslib": "^2.1.0" } @@ -11656,6 +11813,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -11866,6 +12024,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -12014,6 +12173,7 @@ "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dev": true, "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -12079,6 +12239,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -12342,6 +12503,7 @@ "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", @@ -12375,6 +12537,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -12479,6 +12642,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.1.tgz", "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", + "dev": true, "funding": { "url": "https://github.com/sponsors/sindresorhus" } @@ -12486,7 +12650,8 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true }, "node_modules/thunky": { "version": "1.1.0", @@ -12497,6 +12662,7 @@ "version": "6.1.61", "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.61.tgz", "integrity": "sha512-rv8LUyez4Ygkopqn+M6OLItAOT9FF3REpPQDkdMx5ix8w4qkuE7Vo2o/vw1nxKQYmJDV8JpAMJQr1b+lTKf0FA==", + "dev": true, "dependencies": { "tldts-core": "^6.1.61" }, @@ -12507,12 +12673,14 @@ "node_modules/tldts-core": { "version": "6.1.61", "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.61.tgz", - "integrity": "sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==" + "integrity": "sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==", + "dev": true }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, "engines": { "node": ">=14.14" } @@ -12549,6 +12717,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "dev": true, "dependencies": { "tldts": "^6.1.32" }, @@ -12566,6 +12735,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, "bin": { "tree-kill": "cli.js" } @@ -12579,6 +12749,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -12589,7 +12760,8 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", @@ -12607,6 +12779,7 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, "engines": { "node": ">=10" }, @@ -12774,6 +12947,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, "engines": { "node": ">=8" } @@ -12782,6 +12956,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "dev": true, "funding": [ { "type": "opencollective", @@ -12811,6 +12986,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -12886,6 +13062,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, "engines": [ "node >=0.6.0" ], @@ -13241,6 +13418,7 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -13276,6 +13454,7 @@ "version": "5.96.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", @@ -13635,6 +13814,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, "engines": { "node": ">=10.13.0" } @@ -13649,6 +13829,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -13764,6 +13945,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -13814,7 +13996,8 @@ "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true }, "node_modules/yaml": { "version": "1.10.2", @@ -13876,6 +14059,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" diff --git a/public/Logos_OA.svg b/public/Logos_OA.svg new file mode 100644 index 0000000000000000000000000000000000000000..7d9591663ea387fda2ec0461d4f11f019f71e9c7 --- /dev/null +++ b/public/Logos_OA.svg @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="_x31_4" + viewBox="0 0 833.61 598.36" + version="1.1" + sodipodi:docname="2024_11_20_Logos_OpernADOM_SDE_3.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15)"> + <metadata + id="metadata13"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1867" + inkscape:window-height="1043" + id="namedview11" + showgrid="false" + inkscape:zoom="0.42115116" + inkscape:cx="769.64922" + inkscape:cy="491.52489" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="_x31_4" + inkscape:document-rotation="0" /> + <defs + id="defs4"> + <style + id="style2"> + .cls-1 { + fill: #00a3a6; + } + + .cls-2 { + fill: #275663; + } + </style> + </defs> + <path + class="cls-2" + d="m 267.0022,52.127747 c -143.15531,0 -259.2012909,119.663923 -259.2012909,267.282303 0,147.61841 116.0459809,267.28233 259.2012909,267.28233 143.15528,0 259.20126,-119.66392 259.20126,-267.28233 0,-147.61838 -116.04598,-267.282303 -259.20126,-267.282303 z m 0,433.881553 c -89.21009,0 -161.56229,-74.56091 -161.56229,-166.59925 0,-92.03831 72.30663,-166.59925 161.56229,-166.59925 89.25562,0 161.56226,74.56094 161.56226,166.59925 0,92.03834 -72.30664,166.59925 -161.56226,166.59925 z" + id="path6" + style="stroke-width:4.62666" /> + <path + class="cls-1" + d="M 531.44308,59.879822 H 640.74592 L 832.0145,581.75923 H 707.94962 L 667.35403,464.91425 H 504.10598 L 464.23936,581.75923 H 340.12892 L 531.39751,59.879822 Z m 115.95486,321.969728 -61.32622,-184.4995 -62.78421,184.4995 h 124.06487 z" + id="path8" + style="stroke-width:4.62666" /> +</svg> diff --git a/public/Logos_OpernADOM.svg b/public/Logos_OpernADOM.svg new file mode 100644 index 0000000000000000000000000000000000000000..cf4ef6cd279c6266ab0855612a9d09db2b709e6f --- /dev/null +++ b/public/Logos_OpernADOM.svg @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="_x30_1" + viewBox="0 0 833.61 598.36" + version="1.1" + sodipodi:docname="2024_11_20_Logos_OpernADOM_SDE_1_interligne_petit.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15)"> + <metadata + id="metadata25"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="2507" + inkscape:window-height="1403" + id="namedview23" + showgrid="false" + inkscape:zoom="0.59559768" + inkscape:cx="681.94681" + inkscape:cy="469.55204" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="_x30_1" /> + <defs + id="defs4"> + <style + id="style2"> + .cls-1 { + fill: #00a3a6; + } + + .cls-2 { + fill: #275663; + } + </style> + </defs> + <path + class="cls-2" + d="m 128.21142,277.73013 c -17.38039,0 -33.131366,-3.58826 -47.408117,-10.76479 C 66.52657,259.78883 54.344772,250.41044 44.257941,238.74859 34.171108,227.08673 26.334423,213.79388 20.747872,198.78842 c -5.586551,-15.00543 -8.379834,-30.41863 -8.379834,-46.40269 0,-15.98408 2.870874,-31.72349 8.690198,-46.72893 C 26.877558,90.651336 35.024621,77.440036 45.421816,66.02284 55.81901,54.605656 68.155977,45.471909 82.432726,38.703146 96.709472,31.934386 112.30527,28.50922 129.2201,28.50922 c 16.91484,0 33.13135,3.588259 47.4081,10.764777 14.27674,7.176518 26.45855,16.63647 36.54538,28.379871 10.08681,11.743401 17.92353,25.117818 23.35489,40.123262 5.50895,15.00545 8.22463,30.25556 8.22463,45.66876 0,15.41319 -2.94844,31.72346 -8.69017,46.72892 -5.81932,15.00545 -13.8888,28.21676 -24.20842,39.63396 -10.31959,11.41717 -22.57896,20.55093 -36.85571,27.4828 -14.27674,6.93185 -29.87255,10.35701 -46.70979,10.35701 z M 67.302477,153.20124 c 0,9.45996 1.319044,18.59369 3.957146,27.4828 2.638087,8.88908 6.517641,16.79957 11.716238,23.73143 5.121004,6.93187 11.561056,12.47735 19.242579,16.63649 7.68149,4.15911 16.44929,6.19789 26.30335,6.19789 9.85404,0 19.32017,-2.20188 27.00167,-6.60566 7.68151,-4.40377 14.04396,-10.11237 19.08738,-17.12579 5.04343,-7.0134 8.84539,-15.00543 11.40588,-23.89453 2.48291,-8.8891 3.80197,-17.9413 3.80197,-27.15662 0,-9.21529 -1.31906,-18.59369 -3.95714,-27.4828 -2.63811,-8.88907 -6.59524,-16.71801 -11.87142,-23.48677 -5.27621,-6.768774 -11.71627,-12.232704 -19.24259,-16.228724 -7.60391,-3.996013 -16.2941,-6.034797 -26.14817,-6.034797 -9.85405,0 -19.24257,2.120339 -26.84648,6.442557 -7.603925,4.24066 -13.966386,9.86771 -19.087392,16.799584 -5.198597,6.93185 -9.000562,14.84235 -11.561057,23.73144 -2.560512,8.88909 -3.801964,17.9413 -3.801964,27.15659 z" + id="path6" + style="stroke-width:7.95465" /> + <path + class="cls-2" + d="M 229.77806,277.73013 V 28.590775 h 101.17866 c 11.32831,0 21.7255,2.446543 31.19159,7.339627 9.46611,4.893069 17.61317,11.335628 24.36358,19.327659 6.75043,7.992033 12.10422,16.962689 16.06134,26.99349 3.87956,10.030815 5.81933,20.224749 5.81933,30.500219 0,11.00942 -1.86219,21.52955 -5.50895,31.56036 -3.64678,10.03082 -8.7678,19.08302 -15.36305,26.99349 -6.59522,7.99203 -14.5095,14.27149 -23.89801,18.91991 -9.38852,4.64845 -19.70812,7.01342 -31.0364,7.01342 h -48.10644 v 80.32808 H 229.70047 Z M 284.5573,147.24799 h 44.77002 c 6.44004,0 12.0266,-2.93586 16.68204,-8.80755 4.65549,-5.8717 6.98323,-14.35303 6.98323,-25.60712 0,-5.87169 -0.69834,-10.84633 -2.17256,-15.086994 -1.47423,-4.24068 -3.41401,-7.74739 -5.81932,-10.52013 -2.48292,-2.772751 -5.27619,-4.811535 -8.37984,-6.11636 -3.10364,-1.304812 -6.20728,-1.957232 -9.3885,-1.957232 h -42.75266 v 68.095386 z" + id="path8" + style="stroke-width:7.95465" /> + <path + class="cls-1" + d="m 557.28971,268.25896 c -17.92352,6.90347 -35.14873,10.0341 -51.59804,9.47219 -16.44928,-0.5619 -31.50194,-4.17419 -45.15793,-10.75656 -13.65604,-6.58236 -25.52747,-15.73347 -35.5367,-27.37303 -10.00923,-11.63957 -17.76834,-24.96486 -23.12213,-39.8956 -5.74174,-16.05456 -8.61259,-32.10914 -8.53499,-48.32426 0.0776,-16.21509 3.10361,-31.46695 9.07814,-45.91605 5.9745,-14.449114 14.97505,-27.533591 27.00168,-39.173147 12.02659,-11.639556 27.15684,-21.031492 45.39072,-28.015225 18.2339,-6.983734 35.45909,-10.114374 51.8308,-9.311645 16.3717,0.802729 31.34678,4.575547 44.84761,11.318467 13.57843,6.823196 25.29465,16.134842 35.3039,27.934949 10.00925,11.880385 17.69076,25.366207 23.12212,40.537791 1.39665,3.93337 2.63809,7.86674 3.72437,11.71983 1.08628,3.85309 1.8622,7.3851 2.32772,10.35521 l -158.20806,60.68625 c 6.44005,14.44911 15.75098,23.76077 27.85516,27.93494 12.1818,4.17419 24.2084,3.93337 36.15743,-0.72244 9.54369,-3.61228 17.84593,-9.55248 24.98428,-17.7403 7.1384,-8.18783 10.70758,-16.93757 10.78519,-26.24921 l 61.21928,-5.21774 c -2.17254,20.71037 -10.16441,39.89559 -23.89802,57.63588 -13.73362,17.74029 -32.97618,31.38668 -57.7277,40.85888 z m -3.41402,-153.24084 c -6.44004,-13.56612 -15.28542,-22.797494 -26.6137,-27.694144 -11.3283,-4.896631 -23.27732,-4.976908 -35.76945,-0.16053 -12.49217,4.81635 -21.8031,13.084464 -27.15687,24.563484 -5.35379,11.47902 -6.20728,24.40294 -2.63808,38.6915 l 92.1781,-35.32003 z" + id="path10" + style="stroke-width:7.89205" /> + <path + class="cls-2" + d="M 678.71963,135.25994 V 277.73013 H 623.94038 V 28.590775 h 42.75266 L 777.18264,174.89388 V 28.590775 h 54.77925 V 277.73013 h -44.0717 z" + id="path12" + style="stroke-width:7.95465" /> + <path + class="cls-2" + d="m 88.114312,313.18482 h 49.425478 l 86.43637,249.13937 H 164.15352 L 147.00588,500.01896 H 78.260255 L 61.423011,562.32419 H 1.6003364 L 88.036726,313.18482 Z m 50.511758,145.32451 -25.83782,-82.04064 -26.458523,82.04064 z" + id="path14" + style="stroke-width:7.95465" /> + <path + class="cls-2" + d="M 201.08683,562.32419 V 313.18482 h 88.45375 c 19.55293,0 36.70054,3.26206 51.44283,9.86774 14.6647,6.52408 27.00169,15.41319 36.93333,26.66728 9.93165,11.25406 17.38039,24.38386 22.34622,39.47085 5.04341,15.087 7.52632,31.1526 7.52632,48.2784 0,18.91989 -2.79328,36.12724 -8.37981,51.37734 -5.58658,15.33166 -13.50085,28.46143 -23.89804,39.30774 -10.31961,10.84633 -22.81176,19.32768 -37.39888,25.28093 -14.58712,5.95322 -30.80363,8.97065 -48.57197,8.97065 H 201.08683 Z M 355.80329,437.38753 c 0,-11.74341 -1.47422,-22.50816 -4.50027,-32.13123 -2.94845,-9.62305 -7.29355,-17.9413 -13.03529,-24.95472 -5.74173,-7.01339 -12.72493,-12.39579 -21.10475,-16.14715 -8.37984,-3.75137 -17.76834,-5.62704 -28.24314,-5.62704 h -36.07982 v 158.5358 h 36.07982 c 10.70757,0 20.25127,-2.03877 28.63111,-6.0348 8.30221,-3.99602 15.28542,-9.54151 20.87197,-16.71802 5.58655,-7.17652 9.85405,-15.49477 12.8801,-25.19938 3.02605,-9.70459 4.50027,-20.22472 4.50027,-31.72346 z" + id="path16" + style="stroke-width:7.95465" /> + <path + class="cls-2" + d="m 500.66573,562.32419 c -17.38039,0 -33.13137,-3.58825 -47.40814,-10.76477 -14.27672,-7.17652 -26.45851,-16.55494 -36.54534,-28.21678 -10.08683,-11.66183 -17.92353,-24.9547 -23.51008,-39.96015 -5.58656,-15.00545 -8.37983,-30.41865 -8.37983,-46.40272 0,-15.98407 2.87086,-31.72347 8.69019,-46.72892 5.81933,-15.00545 13.96638,-28.21677 24.36358,-39.63394 10.3972,-11.4172 22.73417,-20.55095 37.01092,-27.31972 14.27674,-6.76875 29.87253,-10.19391 46.78737,-10.19391 16.91484,0 33.13136,3.58825 47.40811,10.76477 14.27675,7.17652 26.45853,16.63648 36.54536,28.37987 10.08684,11.7434 17.92353,25.11781 23.35491,40.12327 5.50896,15.00545 8.22465,30.25554 8.22465,45.66875 0,15.41321 -2.94848,31.72347 -8.6902,46.72892 -5.81935,15.00546 -13.88879,28.21677 -24.2084,39.63395 -10.3196,11.41718 -22.57899,20.55095 -36.85573,27.48281 -14.27675,6.93187 -29.87253,10.35702 -46.70978,10.35702 z m -60.90894,-124.5289 c 0,9.45995 1.31903,18.59369 3.95711,27.4828 2.63811,8.88909 6.51767,16.79957 11.71627,23.73145 5.121,6.93185 11.56105,12.47734 19.24255,16.63648 7.68152,4.15909 16.44931,6.19788 26.30337,6.19788 9.85406,0 19.32015,-2.20189 27.00166,-6.60566 7.68151,-4.40377 14.04399,-10.11236 19.08742,-17.12576 5.04338,-7.01343 8.84535,-15.00546 11.40584,-23.89456 2.48292,-8.8891 3.80198,-17.94128 3.80198,-27.15659 0,-9.2153 -1.31906,-18.59372 -3.95716,-27.4828 -2.63808,-8.88909 -6.59522,-16.71804 -11.87142,-23.48678 -5.2762,-6.76878 -11.71624,-12.23272 -19.24256,-16.22874 -7.60395,-3.99601 -16.29412,-6.0348 -26.14817,-6.0348 -9.85406,0 -19.24258,2.12034 -26.84652,6.44256 -7.60389,4.24069 -13.96635,9.86771 -19.08737,16.79957 -5.19858,6.93188 -9.00054,14.84236 -11.56107,23.73146 -2.56049,8.88908 -3.80193,17.94129 -3.80193,27.1566 z" + id="path18" + style="stroke-width:7.95465" /> + <path + class="cls-2" + d="M 766.64769,562.32419 V 396.36722 L 716.36873,517.06319 H 687.66004 L 637.38107,396.36722 v 165.95697 h -43.063 V 313.18482 h 58.27083 l 60.28824,130.15596 60.59857,-130.15596 h 57.96048 v 249.13937 h -64.6333 z" + id="path20" + style="stroke-width:7.95465" /> +</svg> diff --git a/src/App.vue b/src/App.vue index 6f5f29edbd21d7b749390806bdbeebfd8950308d..6046831c923b924d4796cb777e87419eee0cdf3a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,6 +13,10 @@ export default { setup() { provide("application:progress", loadApplications().progress); provide("application:applications", loadApplications().applications); + provide("application:ownApplications", loadApplications().ownApplications); + provide("application:hasOwnApplications", loadApplications().hasOwnApplications); + provide("application:showOwnApplications", loadApplications().showOwnApplications); + provide("application:otherApplications", loadApplications().otherApplications); provide("application:loadApplications", loadApplications().loadApplications); }, }; diff --git a/src/components/application/ApplicationCard.vue b/src/components/application/ApplicationCard.vue index 1550b13d6c5b9f5d7621b6846c96573a79cb8c80..8ecaf3f32f8535424e91523287c2e5da7ff61cf7 100644 --- a/src/components/application/ApplicationCard.vue +++ b/src/components/application/ApplicationCard.vue @@ -2,7 +2,7 @@ import useText from "@/composable/components/text"; import useBoolean from "@/composable/components/boolean"; import { useRedirections } from "@/composable/applications/useFunction"; -import { formatedDateArray } from "@/composable/application/DatePattern"; +import { formatedDateArray } from "@/composable/application/datePattern"; import { onMounted, ref } from "vue"; import app from "@/main"; import DetailApplicationModalCard from "@/components/application/DetailApplicationModalCard.vue"; @@ -16,6 +16,10 @@ export default { type: Object, required: true, }, + applicationRoles: { + type: Array, + default: () => [], + }, index: { required: true, type: Number, @@ -90,6 +94,7 @@ export default { :url="url" :redirection="redirection" :close-cb="redirection" + :application-roles="applicationRoles" > </DetailApplicationModalCard> </b-modal> @@ -122,7 +127,7 @@ export default { <div class="card-footer-item"> <b-button v-if="application.references.length !== 0" - :disabled="!application.isApplicationUser()" + :disabled="!(application.canReadReference || application.canWriteReference)" icon-left="drafting-compass" @click="showCharte(displayReferencesManagement(application))" > @@ -132,7 +137,7 @@ export default { <div class="card-footer-item"> <b-button v-if="application.dataTypes.length !== 0" - :disabled="!application.isApplicationUser()" + :disabled="!(application.canReadDatatype || application.canWriteDatatype)" icon-left="poll" @click="showCharte(displayDataSetManagement(application))" > diff --git a/src/components/application/DetailApplicationModalCard.vue b/src/components/application/DetailApplicationModalCard.vue index feb50e86ee8b41d9c1864f5ef73f71676fcdb8bb..192ed3bfd64ce65d63e7ff86f4a670ece8542eec 100644 --- a/src/components/application/DetailApplicationModalCard.vue +++ b/src/components/application/DetailApplicationModalCard.vue @@ -36,6 +36,10 @@ import { User } from "@/model/User"; export default { name: "DetailApplicationModalCard", + applicationRoles: { + type: Object, + default: () => {}, + }, components: { CharteValidator, ModalCard }, emits: ["setValidatedCharte"], props: { @@ -73,11 +77,9 @@ export default { }); const validated = computed({ get() { - let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[props.application.id] + let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[props.application.id]; if (charteTimeStamp) { - return ( - new Date().getTime() > charteTimeStamp - ); + return new Date().getTime() > charteTimeStamp; } return false; }, diff --git a/src/components/common/CollapseMenuOneSelect.vue b/src/components/common/CollapseMenuOneSelect.vue index 162129f084aed55e9986cd206b09f9eb0dbeb57a..c78dc3a4df23f73e43595baac8300d804af7caf1 100644 --- a/src/components/common/CollapseMenuOneSelect.vue +++ b/src/components/common/CollapseMenuOneSelect.vue @@ -2,8 +2,8 @@ <div v-if="!option.children.length" :id="option.id" - @click="select(option, option.i18n[locale] || option.naturalKey)" style="padding: 5px 16px" + @click="select(option, option.i18n[locale] || option.naturalKey, option.id)" > <a>{{ option.i18n[locale] || option.naturalKey }}</a> </div> @@ -24,6 +24,7 @@ v-for="child in option.children" :key="child.id" :option="child" + :id-reference-scope="idReferenceScope" @select-menu-item="select" > </CollapseMenuOneSelect> @@ -43,17 +44,37 @@ export default { type: Object, required: true, }, + listSelect: Array, + idReferenceScope: String, }, - emits: ["select-menu-item"], + emits: ["select-menu-item", "change-style-if-selected"], setup(props, { emit }) { const isOpen = ref(false); const locale = services.internationalisationService.getLocale(); const displayText = computed(() => props.option.i18n[locale] || props.option.naturalKey); - function select(option, localName) { + function changeStyleIfSelected(localID) { + const localElement = document.getElementById(localID); + if (localElement) { + console.log("selected", localID, props.idReferenceScope); + Array.from(document.querySelectorAll("div.colorSelected")) + .filter( + (el) => + el.id && el.id.includes(props.idReferenceScope + "K") && !el.id.includes(localID) + ) + .forEach((element) => { + element.classList.remove("colorSelected"); + }); + localElement.classList.add("colorSelected"); + } + } + + function select(option, localName, localID) { + changeStyleIfSelected(localID); option.localName = option.localName || localName; emit("select-menu-item", option || { ...this.option, localName }); } + return { select, isOpen, @@ -69,6 +90,10 @@ a { color: black; } +.colorSelected { + background-color: rgba(0, 100, 100, 0.4); +} + .card { box-shadow: none; diff --git a/src/components/common/CollapsibleTree.vue b/src/components/common/CollapsibleTree.vue index 9885105383e4acf37ef18c6381287ca3bdcb0f30..07463959d8f4cca19af16a8302e1607368267495 100644 --- a/src/components/common/CollapsibleTree.vue +++ b/src/components/common/CollapsibleTree.vue @@ -20,7 +20,7 @@ @click="(event) => onClickLabelCb && onClickLabelCb(event, option.label)" @keyup.enter="(event) => onClickLabelCb && onClickLabelCb(event, option.label)" > - <!-- TODO Lucile : btn ouvertur sidePanel à redéfinir ce qu'on met dedant puis refaire--> + <!-- TODO Lucile : btn ouverture sidePanel à redéfinir ce qu'on met dedant puis refaire--> <b-tooltip v-if="false" :label="$t('dataTypesManagement.tooltip_show_secondary_menu')" @@ -79,7 +79,7 @@ > <slot name="synthesisDetail" - v-bind:lineCount="updateCountLineFile" + v-bind:lineCount="lineCount" v-bind:onClickLabelSynthesisDetailCb="onClickLabelSynthesisDetailCb" v-bind:option="option" v-bind:refFile="refFile" @@ -115,14 +115,14 @@ /> </span> </div> - <div v-if="refFile"> - <span class="file-name"> - {{ refFile.name }} + <div v-else-if="lineCount"> + <span :class="lineCount ? 'file-name' : 'file-name has-text-danger'"> + {{ $tc("validation.count-line", lineCount, { count: lineCount }) }} </span> </div> - <div v-else> - <span :class="updateCountLineFile ? 'file-name' : 'file-name has-text-danger'"> - {{ $tc("validation.count-line", updateCountLineFile) }} + <div v-else-if="refFile"> + <span class="file-name"> + {{ refFile.name }} </span> </div> </slot> @@ -196,7 +196,8 @@ v-for="child in option.children" :key="child.id" :application-title="applicationTitle" - :buttons="buttons" + :buttons="buildButton ? buildButton(child) : buttons" + :build-button="buildButton" :class="displayChildren ? '' : 'hide'" :level="level + 1" :line-count="lineCountSynthesis(referenceSynthesis, child)" @@ -217,7 +218,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import AvailiblityChart from "../charts/AvailiblityChart.vue"; import LoadingAnimate from "@/components/common/LoadingAnimate.vue"; import { lineCountSynthesis } from "@/composable/application/synthesis"; -import { computed, watch } from "vue"; +import { watch } from "vue"; import useBoolean from "@/composable/components/boolean"; import TagsInfos from "@/components/common/TagsInfos.vue"; import { length } from "vee-validate/dist/rules"; @@ -227,28 +228,29 @@ export default { computed: { length() { return length; - } + }, }, components: { TagsInfos, LoadingAnimate, FontAwesomeIcon, AvailiblityChart }, props: { + buildButton: Function, applicationName: String, canUpload: { type: Boolean, - default: true + default: true, }, option: Object, level: { type: Number, - default: 0 + default: 0, }, showEmpty: { value: { type: Boolean, - default: false - } + default: false, + }, }, tags: { - type: Object + type: Object, }, referenceSynthesis: Array, onClickLabelCb: Function, @@ -257,25 +259,24 @@ export default { buttons: Array, withRadios: { type: Boolean, - default: false + default: false, }, radioName: Object, repository: Object, repositoryRedirect: Function, lineCount: { type: Number, - default: 0 + default: 0, }, isLoading: Boolean, isUploading: Boolean, applicationTitle: { - type: String - } + type: String, + }, }, - setup(props) { + setup() { let innerOptionChecked = null; let refFile = null; - let updateCountLineFile = computed(() => props.lineCount); const { refBoolean: displayChildren, doChangeBoolean: changeDisplayChildren } = useBoolean(); watch( () => innerOptionChecked, @@ -299,9 +300,8 @@ export default { displayChildren, refFile, innerOptionChecked, - updateCountLineFile }; - } + }, }; </script> diff --git a/src/components/common/SubMenu.vue b/src/components/common/SubMenu.vue index 91c7e98320f211d1318062d47f74069161d29229..b76d5cf9b42577f383f92ab3bdddd3bf5e8b5291 100644 --- a/src/components/common/SubMenu.vue +++ b/src/components/common/SubMenu.vue @@ -1,6 +1,7 @@ <template> <div class="SubMenu"> <FontAwesomeIcon + v-if="!isAccueil" class="clickable mr-4 SubMenu-back-button" icon="arrow-left" @click="goBack()" @@ -47,6 +48,10 @@ export default { paths: { type: Array, }, + isAccueil: { + type: Boolean, + default: false, + }, }, methods: { goBack() { diff --git a/src/components/common/TitleAndDescription.vue b/src/components/common/TitleAndDescription.vue new file mode 100644 index 0000000000000000000000000000000000000000..6c5fb0d5a0adb6809d902052f599e48a11fffb5c --- /dev/null +++ b/src/components/common/TitleAndDescription.vue @@ -0,0 +1,80 @@ +<script> +import app from "@/main"; + +export default { + name: "TitleAndDescription", + props: { + application: Object, + localName: String, + localDescription: String, + localTitle: String, + applicationName: { + type: String, + required: false, + }, + withAuth: { + type: Boolean, + required: false, + }, + canCreateApplication: { + type: Boolean, + required: false, + }, + canManagerApplication: { + type: Boolean, + required: false, + }, + canManagerUser: { + type: Boolean, + required: false, + }, + }, + setup(props) { + function consultAuthorization() { + app.$router.push(`/applications/${props.applicationName}/authorizations`); + } + + return { + consultAuthorization, + }; + }, +}; +</script> + +<template> + <h1 class="title main-title"> + <slot name="label" v-bind:option="application"> + {{ localTitle || localName }} + </slot> + <slot v-if="localDescription" name="description" v-bind:option="application"> + <sup style="font-size: 1.5em"> + <b-tooltip + :label="$t('applications.description', { localDescription: localDescription })" + position="is-top" + > + <b-icon icon="info-circle" type="is-dark"></b-icon> + </b-tooltip> + </sup> + </slot> + <slot + v-if="canCreateApplication || canManagerApplication || canManagerUser" + class="btn_auth_tooltip" + > + <b-tooltip :label="$t('dataTypesManagement.consult-authorization')" position="is-top"> + <b-button + icon-left="key" + outlined + rounded + type="is-warning" + @click="consultAuthorization" + /> + </b-tooltip> + </slot> + </h1> +</template> + +<style lang="scss" scoped> +.icon { + vertical-align: text-top; +} +</style> diff --git a/src/components/common/authorization/AuthorizationForScope.vue b/src/components/common/authorization/AuthorizationForScope.vue index c59d01069a2ec686b55ff616640597746c0d5c81..6b27ca67b1d276ec9006e7a8756b948caf462e20 100644 --- a/src/components/common/authorization/AuthorizationForScope.vue +++ b/src/components/common/authorization/AuthorizationForScope.vue @@ -33,7 +33,7 @@ :authorization="getAuthorization(data.id)" :data="data" :data-name="data.id" - :has-dependency="hasDependencies.includes(data.id)" + :has-dependencies="hasDependencies" :list-column-name="columnsName" :reference-scope="referencesScopes[data.id]" :type-time-scope="typeTimeScope(data.id)" diff --git a/src/components/common/authorization/AuthorizationTableForOneDataType.vue b/src/components/common/authorization/AuthorizationTableForOneDataType.vue index 31a88aa18a1e0411e5e3d934eea31912e206f57f..2c660c2c8b77773f281d5f2ce8893a73fb0a0e42 100644 --- a/src/components/common/authorization/AuthorizationTableForOneDataType.vue +++ b/src/components/common/authorization/AuthorizationTableForOneDataType.vue @@ -29,23 +29,31 @@ export default { withTimeScope: Boolean, typeTimeScope: String, referenceScope: Array, - hasDependency: Boolean, + hasDependencies: { + type: Array, + default: () => [], + }, }, setup(props, context) { - const checkboxValues = ref({}); + let localOperationtypes = new Set([]); + const operationtypes = computed( + () => props.authorization?.operationTypes || Array.from(localOperationtypes) + ); const selectedValuesReference = computed(() => props.authorization?.requiredAuthorizations ? props.authorization?.requiredAuthorizations : {} ); const locale = services.internationalisationService.getLocale(); - // Fonction pour initialiser checkboxValues - const initializeCheckboxValues = () => { - if (props.authorization && props.authorization.operationTypes) { - props.authorization.operationTypes.forEach((operationType) => { - checkboxValues.value[`${props.dataName}___${operationType}`] = true; - }); - } - }; + const isCheckboxChecked = (datatypeId, key) => + key === "extraction" && props.hasDependencies.includes(datatypeId) + ? true + : operationtypes.value + ? operationtypes.value.includes(key) || Array.from(localOperationtypes).includes(key) + : false; + + const isCheckboxDisabled = (datatypeId, key) => + key === "extraction" && props.hasDependencies.includes(datatypeId); + const dateFromArray = (arrayDate) => { if (arrayDate && (arrayDate[0] === -999999999 || arrayDate[0] === 999999999)) { return null; @@ -59,37 +67,54 @@ export default { const getToDate = computed(() => dateFromArray(props.authorization?.toDay)); const hasExtraction = computed( () => - props.authorization.operationTypes && - ((props.authorization.operationTypes.has && - props.authorization.operationTypes.has("extraction")) || - (props.authorization.operationTypes.includes && - props.authorization.operationTypes.includes("extraction"))) + props.authorization?.operationTypes && + ((props.authorization?.operationTypes.has && + props.authorization?.operationTypes.has("extraction")) || + (props.authorization?.operationTypes.includes && + props.authorization?.operationTypes.includes("extraction"))) ); const localHasExtraction = ref(false); const modifyOperationType = (event, name) => { - let operationtypes = new Set(); - for (const operationtype of props.authorization?.operationTypes || new Set()) { - operationtypes.add(operationtype); - } - if (!event) { - operationtypes.delete(name); + localOperationtypes = new Set(operationtypes.value || []); + if (event) { + if (name === "delete") { + localOperationtypes.add("depot"); + localOperationtypes.add("publication"); + localOperationtypes.add("extraction"); + } else if (name === "publication") { + localOperationtypes.add("depot"); + localOperationtypes.add("delete"); + localOperationtypes.add("extraction"); + } + localOperationtypes.add(name); } else { - operationtypes.add(name); + if (name === "delete") { + localOperationtypes.delete("depot"); + localOperationtypes.delete("publication"); + localOperationtypes.delete("extraction"); + } else if (name === "publication") { + localOperationtypes.delete("depot"); + localOperationtypes.delete("delete"); + localOperationtypes.delete("extraction"); + } + localOperationtypes.delete(name); } - context.emit("update:operation-type", operationtypes); + context.emit("update:operation-type", Array.from(localOperationtypes)); }; + onUpdated(() => { - localHasExtraction.value = - (Array.isArray(props.authorization.operationTypes) - ? props.authorization.operationTypes.includes("extraction") - : props.authorization.operationTypes.has("extraction")) && - Object.keys(props.authorization).includes("timeScope"); - context.emit("update:has-extraction", localHasExtraction.value); + if (props.authorization && props.authorization.operationTypes) { + localHasExtraction.value = + (Array.isArray(props.authorization.operationTypes) + ? props.authorization.operationTypes.includes("extraction") + : props.authorization.operationTypes.has("extraction")) && + Object.keys(props.authorization).includes("timeScope"); + context.emit("update:has-extraction", localHasExtraction.value); + localOperationtypes = props.authorization.operationTypes || Array.from(localOperationtypes); + } }); - const displayNodeTagHierarchical = ref({}); - // Appeler la fonction d'initialisation - initializeCheckboxValues(); + const displayNodeTagHierarchical = ref({}); function displayNodeTag(referenceScopeNode, hierarchicalTagName) { if (referenceScopeNode.id === hierarchicalTagName) { @@ -133,7 +158,6 @@ export default { return { selectedValuesReference, - checkboxValues, locale, getFromDate, getToDate, @@ -142,6 +166,8 @@ export default { localHasExtraction, rootReferenceScopeSelected, displayNodeTagHierarchical, + isCheckboxChecked, + isCheckboxDisabled, }; }, }; @@ -166,7 +192,8 @@ export default { <tr> <td v-for="(column, key) in listColumnName" :key="dataName + '___' + key"> <b-checkbox - v-model="checkboxValues[data.id + '___' + key]" + :disabled="isCheckboxDisabled(data.id, key)" + :value="isCheckboxChecked(data.id, key)" @input="modifyOperationType($event, key)" > </b-checkbox> diff --git a/src/components/common/authorization/AuthorizationsForNoAuthorization.vue b/src/components/common/authorization/AuthorizationsForNoAuthorization.vue index 8eff67267b7bdbb80bc0b5d3fb51e737b27e65b1..c9f31b8874843545655628edca18c6ccecfef9f0 100644 --- a/src/components/common/authorization/AuthorizationsForNoAuthorization.vue +++ b/src/components/common/authorization/AuthorizationsForNoAuthorization.vue @@ -14,9 +14,9 @@ <td>{{ dataType.name }}</td> <td v-for="(column, key) in listColumnName" :key="`${dataType.id}-${key}`"> <b-checkbox - :value="isCheckboxChecked(dataType.id, key)" :disabled="isCheckboxDisabled(dataType.id, key)" :title="getCheckboxTitle(dataType.id, key)" + :value="isCheckboxChecked(dataType.id, key)" @input="modifyOperationType($event, dataType.id, key)" /> </td> @@ -66,15 +66,21 @@ export default { const modifyOperationType = (event, datatype, name) => { const authorization = { ...props.authorization }; - const operationtypes = new Set(authorization[datatype]?.operationTypes || []); - + const localOperationtypes = new Set(authorization[datatype]?.operationTypes || []); if (event) { - operationtypes.add(name); + if (name === "delete") { + localOperationtypes.add("depot"); + localOperationtypes.add("extraction"); + } + localOperationtypes.add(name); } else { - operationtypes.delete(name); + if (name === "delete") { + localOperationtypes.delete("depot"); + localOperationtypes.delete("extraction"); + } + localOperationtypes.delete(name); } - - authorization[datatype] = { operationTypes: Array.from(operationtypes) }; + authorization[datatype] = { operationTypes: Array.from(localOperationtypes) }; emit("update:authorization", authorization); }; diff --git a/src/components/common/provider/FieldsForm.vue b/src/components/common/provider/FieldsForm.vue index 88cacaf1f95048b5d685c2876a58b4b9ea464560..45a904c04a03d19b3515553b473f95b8734c5ea9 100644 --- a/src/components/common/provider/FieldsForm.vue +++ b/src/components/common/provider/FieldsForm.vue @@ -146,7 +146,6 @@ export default { } } referencesScopes.value = newReferencesScopes; - console.log(props.fields); }); function onSubmit(event) { diff --git a/src/components/common/provider/FilterNumberOrDate.vue b/src/components/common/provider/FilterNumberOrDate.vue index f17ca8fef89711bec05d844d747f4e2db07479a0..6a1cdbfb59a6d21682ad97a5ff14bc0006a28bd2 100644 --- a/src/components/common/provider/FilterNumberOrDate.vue +++ b/src/components/common/provider/FilterNumberOrDate.vue @@ -1,13 +1,24 @@ <template> <div class="inputStyle"> <b-tooltip :label="$t('dataTypeAuthorizations.interval')" position="is-right"> - <b-switch - v-model="isInterval" - size="is-small" - @click.native="changeValueSizeHeight(isInterval, isInterval ? -6 : 6)" - > - {{ isInterval ? $t("rules.for-interval") : $t("rules.for-value") }} - </b-switch> + <b-field style="margin-bottom: 1rem"> + <b-radio-button + v-model="isInterval" + :native-value="false" + size="is-small" + type="is-primary is-outlined" + > + <span>{{ $t("rules.for-value") }}</span> + </b-radio-button> + <b-radio-button + v-model="isInterval" + :native-value="true" + size="is-small" + type="is-primary is-outlined" + > + <span>{{ $t("rules.for-interval") }}</span> + </b-radio-button> + </b-field> </b-tooltip> <div v-if="isInterval" class="rows"> <InputDateInterval diff --git a/src/components/common/provider/FiltersDataCollapse.vue b/src/components/common/provider/FiltersDataCollapse.vue index 69353aaf902f257eb5e24ef130b82645a44aa789..cb0f1c6258c52616968878210bfbe9e639415310 100644 --- a/src/components/common/provider/FiltersDataCollapse.vue +++ b/src/components/common/provider/FiltersDataCollapse.vue @@ -3,7 +3,8 @@ <template #trigger="props"> <div class="card-header" role="button"> <p class="card-header-title" style="text-transform: capitalize"> - {{ $t("applications.advancedFilter") }} + <b-icon icon="sliders-h"></b-icon> + <span>{{ $t("applications.advancedFilter") }}</span> </p> <a class="card-header-icon"> <b-icon :icon="props.open ? 'chevron-up' : 'chevron-down'"></b-icon> @@ -45,7 +46,17 @@ type="search" @select=" (option) => - updateValue(columns.id, { componentKey: columns.id, filters: [] }, option) + updateValue( + columns.id, + { + componentKey: columns.parentComponentKey + ? columns.parentComponentKey + '::' + columns.id + : columns.id, + filters: [], + columns: columns, + }, + option + ) " @typing="getNewListReferenceValuesWhenFiltered" > @@ -108,14 +119,22 @@ @blur=" updateValue( columns.id, - { componentKey: columns.id, filters: filters[columns.componentKey] }, + { + componentKey: columns.id, + filters: filters[columns.componentKey], + columns: columns, + }, null ) " @keyup.native.enter=" updateValue( columns.id, - { componentKey: columns.id, filters: filters[columns.componentKey] }, + { + componentKey: columns.id, + filters: filters[columns.componentKey], + columns: columns, + }, null ) " @@ -141,11 +160,18 @@ </div> <div class="card-footer"> <div class="card-footer-item"> - <b-button expanded icon-left="redo" outlined type="is-danger" @click="clear()" + <b-button + expanded + icon-left="redo" + outlined + type="is-danger" + @click="clear()" + disabled="!filters.length" >{{ $t("dataTypesManagement.réinitialiser") }} {{ $t("dataTypesManagement.filtre") }} </b-button> </div> + <!-- <div class="card-footer-item"> <b-button expanded @@ -156,7 +182,7 @@ > {{ $t("dataTable.consult-result-filter") }} </b-button> - </div> + </div>--> <div class="card-footer-item"> <b-button expanded @@ -164,7 +190,11 @@ type="is-primary" @click="$emit('download-search', { filters })" > - {{ $t("dataTable.donwload-result-filter") }} + {{ + filters.length + ? $t("dataTable.donwload-result-filter") + : $t("dataTable.donwload-result") + }} </b-button> </div> </div> @@ -194,7 +224,7 @@ export default { type: String, }, isRefLinkTo: { - type: Array, + type: Object, defaults: [], }, columnsToBeShown: { @@ -454,11 +484,11 @@ export default { ]; } else if ( listReferenceValueForAllReferences.value[columnsId].rows[i].values[ - "__display___display_" + services.internationalisationService.getLocale() + "__display_" + services.internationalisationService.getLocale() ] ) { return listReferenceValueForAllReferences.value[columnsId].rows[i].values[ - "__display___display_" + services.internationalisationService.getLocale() + "__display_" + services.internationalisationService.getLocale() ]; } else { return listReferenceValueForAllReferences.value[columnsId].rows[i].naturalKey; @@ -480,7 +510,7 @@ export default { "__display_default" ] === value || listReferenceValueForAllReferences.value[columnsId].rows[i].values[ - "__display___display_" + services.internationalisationService.getLocale() + "__display_" + services.internationalisationService.getLocale() ] === value ) { return listReferenceValueForAllReferences.value[columnsId].rows[i].naturalKey; diff --git a/src/components/common/provider/OreInputDate.vue b/src/components/common/provider/OreInputDate.vue index 13887b961759e673d89606c018f25a39d9982270..581c9bee20340631dcf95dfbe2c1b374d87a0725 100644 --- a/src/components/common/provider/OreInputDate.vue +++ b/src/components/common/provider/OreInputDate.vue @@ -45,7 +45,7 @@ import moment from "moment"; import { extend, ValidationProvider } from "vee-validate"; import { watch, ref, reactive } from "vue"; import InputDate from "@/components/common/provider/InputDate.vue"; -import { datePatternLang, parseDate } from "@/composable/application/DatePattern"; +import { datePatternLang, parseDate } from "@/composable/application/datePattern"; export default { name: "OreInputDate", diff --git a/src/components/datas/DatasLink.vue b/src/components/datas/DatasLink.vue index f8a9beb89f301bb91928750413bbb7c08ed431e4..5394eb14284f02b3b590419b97e07ac398470ee6 100644 --- a/src/components/datas/DatasLink.vue +++ b/src/components/datas/DatasLink.vue @@ -24,7 +24,7 @@ reference ? reference.localName !== value ? getValueDisplay(reference.rows[0], application) - : reference.localName + : displayValue : value }} </p> @@ -39,11 +39,16 @@ :label="column.label" > <span> + <div v-if="typeof props.row[column.field] == 'boolean'"> + {{ props.row[column.field] ? $t("boolean.true") : $t("boolean.false") }} + </div> <DatasDynamicLink - v-if="!props.row[column.field].length && props.row[column.field].length !== 0" + v-else-if=" + !props.row[column.field]?.length && props.row[column.field].length !== 0 + " :application="application" :column-id="column.id" - :info="!props.row[column.field].length && props.row[column.field].length !== 0" + :info="!props.row[column.field]?.length && props.row[column.field].length !== 0" :info-values="props.row[column.field]" :loaded-references-by-key="{}" :reference-type="dynamicColumnReferences(props.row.colonne)" @@ -77,7 +82,9 @@ :value="props.row.valeur" ></DatasLink> <p v-else-if="column.field === 'colonne'"> - {{ getColumnNameView(props.row[column.field], application, referenceType) }} + {{ + getColumnNameView(props.row[column.field], application, referenceType, column) + }} </p> <p v-else>{{ props.row[column.field] }}</p> </span> @@ -97,7 +104,7 @@ import LoadingAnimate from "@/components/common/LoadingAnimate.vue"; import { inject, ref, watch } from "vue"; import useBoolean from "@/composable/components/boolean"; import useObject from "@/composable/components/object"; -import { datePatternLang } from "../../composable/application/DatePattern"; +import { datePatternLang } from "../../composable/application/datePattern"; export default { name: "DatasLink", @@ -137,11 +144,11 @@ export default { watch(() => props.value, getOrLoadReference); async function getOrLoadReference() { - if (props.referenceType && props.value) { + if (props.referenceType && (props.value || props.columnId)) { const result = await getOrLoadDataByNaturalKey( props.application, props.referenceType, - props.value + props.value?.toLowerCase() ); let referenceTypeForReferencingColumns = result.referenceTypeForReferencingColumns; if (result.rows.length !== 0) { @@ -161,7 +168,7 @@ export default { await getOrLoadReference(); let refValues = reference.value.refValues; const data = Object.entries(refValues.refValue) - .filter((entry) => !entry[0].includes("display")) + .filter((entry) => !entry[0].startsWith("__display_")) .map((entry) => ({ colonne: entry[0], valeur: entry[1] })) .reduce((acc, entry) => { acc.push(entry); diff --git a/src/components/datas/DatasManyLink.vue b/src/components/datas/DatasManyLink.vue index c095c63f43d10ac52f743db8ab3ff901c53aea00..c8a6ebe420eacc47582428c6029a0db8c0cda5fa 100644 --- a/src/components/datas/DatasManyLink.vue +++ b/src/components/datas/DatasManyLink.vue @@ -8,8 +8,8 @@ :application="application" :column-id="val.columnName" :display-value=" - displaysForRow?.[referenceType]?.[val] && typeof val !== 'number' - ? displaysForRow?.[referenceType]?.[val] + displayValuesByReferenceAndValue[referenceType + '_' + val] && typeof val !== 'number' + ? displayValuesByReferenceAndValue[referenceType + '_' + val] : val.toString() " :loaded-references-by-key="{}" @@ -62,8 +62,8 @@ import services from "@/composable/services"; import DatasLink from "@/components/datas/DatasLink.vue"; import DatasDynamicLink from "@/components/datas/DatasDynamicLink.vue"; -import { datePatternLang } from "../../composable/application/DatePattern"; -import { computed } from "vue"; +import { datePatternLang } from "@/composable/application/datePattern"; +import { computed, inject, onMounted, ref } from "vue"; export default { name: "DatasManyLink", @@ -99,7 +99,28 @@ export default { let refValues = { active: false }; let isCardModalActive = false; let modalArrayObj = {}; + const displayValuesByReferenceAndValue = ref({}); const dataService = services.dataService; + const { getValueDisplay, getOrLoadDataByNaturalKey } = inject("reference:dataLoader"); + + onMounted(async () => { + const newValues = {}; + for (let value of props.infoValues) { + if ( + !Object.keys(displayValuesByReferenceAndValue).includes(props.referenceType + "_" + value) + ) { + let ref = await getOrLoadDataByNaturalKey(props.application, props.referenceType, value); + newValues[props.referenceType + "_" + value] = getValueDisplay( + ref.values, + props.application + ); + } + } + displayValuesByReferenceAndValue.value = { + ...displayValuesByReferenceAndValue.value, + ...newValues, + }; + }); const applicationName = computed(() => { return props.application.name; @@ -150,7 +171,7 @@ export default { } } const data = Object.entries(refValues.refValue) - .filter((entry) => !entry[0].includes("display")) + .filter((entry) => !entry[0].startsWith("__display_")) .map((entry) => ({ colonne: entry[0], valeur: entry[1] })) .reduce((acc, entry) => { acc.push(entry); @@ -180,17 +201,6 @@ export default { return localRefValues; } - function showBtnTablDynamicColumn(tablDynamicColumn) { - let showModal = Object.entries(tablDynamicColumn) - .filter((a) => a[1]) - .map(function (a) { - let obj = {}; - obj[a[0]] = a[1]; - return obj; - }); - return showModal.length !== 0; - } - function showModal() { isCardModalActive = true; modalArrayObj = Object.entries(this.infoValues) @@ -217,7 +227,7 @@ export default { datePatternLang, dynamicColumnReferences, openReferenceDetail, - showBtnTablDynamicColumn, + displayValuesByReferenceAndValue, showModal, refValues, dataService, @@ -225,6 +235,7 @@ export default { modalArrayObj, applicationName, columnTitle, + getValueDisplay, }; }, }; diff --git a/src/components/datas/DatasPatternLink.vue b/src/components/datas/DatasPatternLink.vue index 6e45423ff2dccee9bdc132701b268d7386a52ee7..82576851fb231f493bd3c4534c3335e8e3b8147e 100644 --- a/src/components/datas/DatasPatternLink.vue +++ b/src/components/datas/DatasPatternLink.vue @@ -1,5 +1,5 @@ <template> - <div> + <div v-if="withQualifier"> <span v-if="info && showBtnTablePatternColumn(infoValues)"> <b-button size="is-small" @@ -23,7 +23,7 @@ <div class="card-header"> <div class="title card-header-title"> <p field="name" style="font-size: 1.5rem"> - {{ columnTitle.match(".*::(.*)")[1] }} + {{ columnTitle.match(".*::(.*)") ? columnTitle.match(".*::(.*)")[1] : columnTitle }} </p> </div> </div> @@ -68,9 +68,13 @@ </div> </b-modal> </div> + <div v-else> + {{ patternLinkHeader }} + </div> </template> <script> +import services from "@/composable/services"; import useBoolean from "@/composable/components/boolean"; import DatasLink from "@/components/datas/DatasLink.vue"; import { computed } from "vue"; @@ -79,6 +83,7 @@ export default { name: "DatasPatternLink", components: { /*LoadingAnimate, DatasManyLink, */ DatasLink }, props: { + withQualifier: Boolean, application: Object, columnTitle: String, value: Array, @@ -99,8 +104,8 @@ export default { const isCardModalActive = useBoolean().refBoolean; const isLoading = useBoolean().refBoolean; - function showBtnTablePatternColumn(tableDynamicColumn) { - let showModal = Object.entries(tableDynamicColumn) + function showBtnTablePatternColumn(tablePatternColumn) { + let showModal = Object.entries(tablePatternColumn) .filter((a) => a[1]) .map(function (a) { let obj = {}; @@ -109,7 +114,27 @@ export default { }); return showModal.length !== 0; } - const columnName = computed(() => props.columnTitle.match(".*::(.*)")[1]); + const patternLinkHeader = computed(() => { + console.log( + "dataid", + props.dataId, + "columntitle", + props.columnTitle, + "application", + props.application + ); + //application.configuration.i18n.data.t_swc_swc.components.swc_variable.exportHeader.title.fr + return services.internationalisationService.localeReferenceColumnsNames( + props.dataId, + props.columnTitle, + props.application + ); + }); + + const columnName = computed(() => { + let pattern = props.columnTitle.match(".*::(.*)"); + return pattern ? pattern[1] : props.columnTitle; + }); async function showModal() { isLoading.value = true; @@ -119,6 +144,7 @@ export default { } return { + patternLinkHeader, columnName, isLoading, isCardModalActive, diff --git a/src/composable/application/data.js b/src/composable/application/data.js new file mode 100644 index 0000000000000000000000000000000000000000..9b4f9250ff067cc4cc521904f490e3c5a17cfb61 --- /dev/null +++ b/src/composable/application/data.js @@ -0,0 +1,38 @@ +import services from "@/composable/services"; + +export function allDataName(node, nodeNames) { + if (node.nodeName) { + nodeNames.push(node.nodeName); + } + if (node.children && Array.isArray(node.children) && Array.isArray(node.children).length !== 0) { + for (let localChild of node.children) { + allDataName(localChild, nodeNames); + } + } + return nodeNames; +} + +export function createListData(listDataNodeNames, application) { + return { + withScope: listDataNodeNames + .filter((name) => application.configuration.dataDescription[name].authorization) + .reduce((acc, data) => { + acc[data] = { + id: data, + name: + services.internationalisationService.localeReferenceNames(data, application) || data, + }; + return acc; + }, {}), + withoutScope: listDataNodeNames + .filter((name) => application.configuration.dataDescription[name].authorization === null) + .reduce((acc, data) => { + acc[data] = { + id: data, + name: + services.internationalisationService.localeReferenceNames(data, application) || data, + }; + return acc; + }, {}), + }; +} diff --git a/src/composable/application/DatePattern.js b/src/composable/application/datePattern.js similarity index 100% rename from src/composable/application/DatePattern.js rename to src/composable/application/datePattern.js diff --git a/src/composable/applications/applications.js b/src/composable/applications/applications.js index d6fa4ab7eef04bc573815737a4b5dbd346641cce..cf364dc7e1741ac2adb7d9251b62bd2573916a09 100644 --- a/src/composable/applications/applications.js +++ b/src/composable/applications/applications.js @@ -2,8 +2,13 @@ import services from "@/composable/services"; import useArray from "@/composable/components/array"; import { Application } from "@/model/application/Application"; import useNumber from "@/composable/components/number"; +import useBoolean from "@/composable/components/boolean"; const { shallowRefArray: applications } = useArray(); +const { shallowRefArray: ownApplications } = useArray(); +const { refBoolean: hasOwnApplications } = useBoolean(); +const { refNumber: showOwnApplications } = useNumber(); +const { shallowRefArray: otherApplications } = useArray(); const { refNumber: progress } = useNumber(0); function addApplication(result) { @@ -18,25 +23,32 @@ function addApplication(result) { .map((a, i) => (a.name === application.name ? i : -1)) .find((i) => i >= 0); let localApplication = applications.value; - console.log("localApplication", localApplication); if (id >= 0) { localApplication[id] = application; } else { localApplication.push(application); } - application.value = localApplication; + ownApplications.value = localApplication.filter((app) => app.isApplicationUser()); + otherApplications.value = localApplication.filter((app) => !app.isApplicationUser()); + hasOwnApplications.value = ownApplications.value.length > 0; + showOwnApplications.value = hasOwnApplications.value ? 0 : 1; + applications.value = localApplication; } } -function loadApplications(filter) { - services.applicationService.getApplications(addApplication, filter); +async function loadApplications(filter) { + await services.applicationService.getApplications(addApplication, filter); } function useApplication() { return { progress, applications, + ownApplications, + otherApplications, loadApplications, + hasOwnApplications, + showOwnApplications, }; } diff --git a/src/composable/applications/useFunction.js b/src/composable/applications/useFunction.js index 1324417bb053ef6f0c01553c217654e5b017efc3..abbc38d5b2b6cd0469a94bf95b87048c902de9ef 100644 --- a/src/composable/applications/useFunction.js +++ b/src/composable/applications/useFunction.js @@ -11,8 +11,14 @@ export function useRedirections(application = { authorizations: [] }) { /* limited to applicationCreator */ - function createApplication() { - return canCreateApplication() && app.$router.push("/applicationCreation"); + function createApplication(applicationNames) { + return ( + canCreateApplication() && + app.$router.push({ + path: "/applicationCreation", + query: { applicationNames: applicationNames }, + }) + ); } /* diff --git a/src/composable/components/object.js b/src/composable/components/object.js index 5b96af4c46b5d937720486e4691413fefae07a02..8fb9179624ce00cb88f9c8c362d19099046b5de5 100644 --- a/src/composable/components/object.js +++ b/src/composable/components/object.js @@ -6,7 +6,7 @@ function useObject(obj = {}) { } let _keys = Object.keys(obj); const reactiveObject = reactive(obj); - const doChangeObject = function (newObject) { + const doChangeObject = function (newObject = {}) { _keys.forEach((key) => delete reactiveObject[key]); Object.assign(reactiveObject, newObject); _keys = Object.keys(newObject); diff --git a/src/composable/data/dataLoader.js b/src/composable/data/dataLoader.js index 1ac66ebdc861dfdfe817d6bb57798a3ccabc8e1c..ef8b3464240110451c3d59697e59dfe0f6fd3890 100644 --- a/src/composable/data/dataLoader.js +++ b/src/composable/data/dataLoader.js @@ -8,9 +8,10 @@ export function dataLoader(services) { if (reference) { return reference; } - if (typeof key === "string") - reference = await dataService.getDataByNaturalKey(applicationName, referenceName, key); - if (!reference) { + try { + if (typeof key === "string") + reference = await dataService.getDataByNaturalKey(applicationName, referenceName, key); + } catch (e) { return null; } reference = { @@ -48,15 +49,6 @@ export function dataLoader(services) { if (referenceLocal.values["__display_" + services.internationalisationService.getLocale()]) { return referenceLocal.values["__display_" + services.internationalisationService.getLocale()]; } - if ( - referenceLocal.values[ - "__display___display_" + services.internationalisationService.getLocale() - ] - ) { - return referenceLocal.values[ - "__display___display_" + services.internationalisationService.getLocale() - ]; - } if ( application && referenceLocal.values[ @@ -66,16 +58,6 @@ export function dataLoader(services) { return referenceLocal.values[ "__display_" + application.configuration.applicationDescription.defaultLanguage ]; - } - if ( - application && - referenceLocal.values[ - "__display___display_" + application.configuration.applicationDescription.defaultLanguage - ] - ) { - return referenceLocal.values[ - "__display___display_" + application.configuration.applicationDescription.defaultLanguage - ]; } else { return referenceLocal.values["__display_default"]; } @@ -89,9 +71,15 @@ export function dataLoader(services) { columnName = column.originalName || "not found"; } else if (application.data[dataId].componentDescriptions[columnId]) { let importHeader = application.data[dataId].componentDescriptions[columnId].importHeader; - let exportHeader = column + let exportHeader = column?.exportHeader ? column.exportHeader : application.data[dataId].componentDescriptions[columnId].exportHeaderName; + exportHeader = + services.internationalisationService.localeReferenceColumnsNames( + dataId, + exportHeader, + application + ) || exportHeader; if (exportHeader !== columnId) { columnName = exportHeader || columnId; } else if (importHeader !== undefined && importHeader !== columnId) { diff --git a/src/locales/en.json b/src/locales/en.json index bcab112cea496633c7b0d4f6dc9072aa9a4e7283..80008636ca4074939b0c7ad46b9edb6d30cbfd65 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,4 +1,8 @@ { + "boolean":{ + "true": "TRUE", + "false": "FALSE" + }, "additionalFiles": { "additionalFile": "Additional file", "alert": { @@ -104,6 +108,7 @@ "revoke-authorization": "Authorization revoked", "server-error": "A server error occured", "server-error-appli-exist": "This application's {name} exist for the version : {version}", + "server-error-appli-exist-on-creation": "The application name {applicationName} you're using already exists. Depending on your situation and your privileges, please choose another application name or update the existing one.", "server-error-appli-no-exist": "You do not have rights for this application's <code>{name}</code> or does not exist.", "user-email-updated": "Your email has been updated successfully. ", "user-pwd-updated": "Your password has been updated successfully. ", @@ -115,10 +120,12 @@ "applications": { "actions": "Actions", "additionalFile": "Additional files", - "advancedFilter": "Advanced search", + "advancedFilter": "Filter", "app_version": "Current version of {name} is: {version}", "app_update_version": "Version of {name} proposed is: {version}", "change": "Update", + "register-rows": "No records | Only one record | About {totalRows} records available", + "no-right-for-application": "Your rights are insufficient to view this data", "charte_message": "I have read and accept the conditions of use of the data.", "charte_header": "To access the {localName} application, you must accept the conditions of use.", "chose-config": "Chose a configuration", @@ -154,6 +161,7 @@ "trier": "Sort by", "trierA_z": "Name A - z", "trierRecent": "Recent date", + "trierAncien": "Old date", "trierZ_a": "Name Z - a", "version": "The current version of the application <b class=\"has-text-primary\">{applicationName}</b> is <b class=\"has-text-primary\">{version}.</b>" }, @@ -218,7 +226,7 @@ "localization": "Localisation", "modify": "Modify authorization", "modifyRequests": "Modify authorizations requests", - "name-authorization": "Authorizations name", + "name": "Authorizations name", "name-authorization-placeholder": "Type the authorization name", "comment-authorization-placeholder": "Type the authorization comment", "no-data": "No authorisation is defined", @@ -265,6 +273,8 @@ "filter-auth-by-name": "Filter by authorization name" }, "dataTypesManagement": { + "horizontalized": "Horizontalized data", + "verticalized": "Verticalized data", "ASC": "ASC", "DESC": "DESC", "accepted": "Accepted", @@ -294,7 +304,7 @@ "dataTable": { "consult-result-filter": "View filter result", "donwload-result-filter": "Download filter result", - "donwload-view-result": "Download the visible result" + "donwload-result": "Download all data" }, "dataTypesRepository": { "card-title-upload-file": "Drop a version on this dataset", @@ -514,6 +524,9 @@ "invalidReferenceWithComponent": { "message": "For column: <code> {target} </code> the value <code> {value} </code> does not exist in the reference <code> {refType} </code>. Values expected <code> {referenceValues} </code>. " }, + "missingMandatoryColumns": { + "message": "The following mandatory columns are missing: <code>{missingMandatoryColumns}</code>." + }, "timeRangeOutOfInterval": { "message": "The date value: <code>{value}</code> must be between <code>{from}</code> and <code>{to}</code>." }, @@ -966,6 +979,7 @@ "application-creation": "Application creation", "application-update": "Application update {name}", "applications-page": "My applications", + "applications-page-nothing": "No application", "applications-page-other": "Other applications", "authorization-application-creator-management": "Management of application creation rights", "authorization-application-management": "Managing management rights for the application: {name}", @@ -973,7 +987,7 @@ "data-type-new-authorization": "New authorization", "data-type-request-authorization": "Request authorizations", "data-types-page": "{applicationName} data types", - "data-types-repository": "Management of data sets {applicationName}", + "data-types-repository": "Management of data sets {dataName}", "login-page": "Welcome to", "profile": "Profile", "references-authorizations": "References authorizations", diff --git a/src/locales/fr.json b/src/locales/fr.json index 572e46eb4fb1c1e0e15dc22281e78911d72451cd..8b54fd9baf331eabd6d83f6b7ef0f6e3ce52c71a 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -1,4 +1,8 @@ { + "boolean": { + "true": "Vrai", + "false": "Faux" + }, "additionalFiles": { "additionalFile": "FichierAdditionel", "alert": { @@ -104,6 +108,7 @@ "revoke-authorization": "Autorisation révoquée", "server-error": "Une erreur serveur est survenue", "server-error-appli-exist": "L'application {name} existe déjà en version : {version}", + "server-error-appli-exist-on-creation": "Le nom {applicationName} de l'application que vous utilisez existe déjà . Selon votre situation et vos droits, veuillez choisir un autre nom d'application ou bien mettre à jour l'application existante", "server-error-appli-no-exist": "Vous n'avez pas les droits pour l'application <code>{name}</code> ou n'existe pas.", "user-email-updated": "Votre email vient d'être mis à jour avec succès. ", "user-pwd-updated": "Votre mot de passe vient d'être mis à jour avec succès. ", @@ -115,10 +120,12 @@ "applications": { "actions": "Actions", "additionalFile": "Fichiers additionnels", - "advancedFilter": "Recherche avancée", + "advancedFilter": "Filtrer", "app_version": "Version actuelle de {name} est : {version}", "app_update_version": "Version de {name} proposée est : {version}", "change": "Mise à jour", + "register-rows": "Aucun enregistrement | Un seul enregistrement | Environ {totalRows} enregistrements disponibles", + "no-right-for-application": "Vos droits sont insuffisants pour consulter ces données", "charte_message": "J'ai lu et j'accepte les conditions d'utilisation des données.", "charte_header": "Pour accéder à l'application {localName}, vous devez accepter les conditions d'utilisation.", "chose-config": "Choisir une configuration", @@ -153,6 +160,7 @@ "trier": "Trier", "trierA_z": "Nom A - z", "trierRecent": "Date récente", + "trierAncien": "Date ancienne", "trierZ_a": "Nom Z - a", "version": "La version actuelle de l'application <b class=\"has-text-primary\">{applicationName}</b> est la version <b class=\"has-text-primary\">{version}.</b>" }, @@ -250,7 +258,7 @@ "users-placeholder": "Sélectionner les utilisateurs à autoriser", "validate": "confirmer", "warnning-chil-not-null": "Des limitations sont en cours sur des enfants, elles seront remplacées.", - "name-data" : "Nom", + "name-data": "Nom", "notification-missing-info": "Il manque soit le nom soit le commentaire de l'autorisation. Merci de renseigner ces informations afin de pouvoir enregistrer l'autorisation.", "list-users": "Liste des utilisateurs : ({numberUsers})", "list-auths": "Liste des autorisations : ({numberAuths})", @@ -266,6 +274,8 @@ "filter-auth-by-name": "Filtre par nom d'autorisation" }, "dataTypesManagement": { + "horizontalized": "Données horizontalisées", + "verticalized": "Données verticalisées", "ASC": "ASC", "DESC": "DESC", "accepted": "Accepté", @@ -295,7 +305,7 @@ "dataTable": { "consult-result-filter": "Visualiser le résultat du filtre", "donwload-result-filter": "Télécharger le résultat du filtre", - "donwload-view-result": "Télécharger le résultat visible" + "donwload-result": "Télécharger toutes les données" }, "dataTypesRepository": { "card-title-upload-file": "Déposer une version pour ce jeu de données", @@ -323,7 +333,7 @@ "table-file-data-version": "N° version", "tooltip-jeux de données": "Sélectionnez un jeu de données pour connaître la liste des fichiers versionnés correspondants (révisions).", "version-number": "Nombre de versions", - "scope-depot" : "Portée du dépôt", + "scope-depot": "Portée du dépôt", "placeholder-select-scope-depot": "Choisissez la portée de : {scope}" }, "errors-OA-v1": { @@ -514,6 +524,9 @@ "invalidReferenceWithComponent": { "message": "Pour la colonne : <code>{target}</code> la valeur <code>{value}</code> n'existe pas dans la référence <code>{refType}</code>. Valeurs attendues <code>{referenceValues}</code>." }, + "missingMandatoryColumns": { + "message": "Il manque les colonnes obligatoires suivantes : <code>{missingMandatoryColumns}</code>." + }, "timeRangeOutOfInterval": { "message": "La valeur de la date : <code>{value}</code> doit être comprise entre <code>{from}</code> et <code>{to}</code>." }, @@ -528,11 +541,11 @@ } }, "errors-yaml": { - "badNameWithRight" : { + "badNameWithRight": { "title": "Erreur d'autorisation", "message": "Vous n'avez pas le droit de créer une application avec le nom <code>{name}</code>.<br/> Contacter l'administrateur pour demander les droits." }, - "invalidLengthName" : { + "invalidLengthName": { "title": "Erreur dans le fichier de configuration", "message": "La longueur maximum de caractère pour le nom de l'application est de 47 caractères" }, @@ -820,7 +833,7 @@ "sqlConvertException": "Une erreur dans une requête sql est survenue ligne {locationLineNumber} colonne {locationColumnNumber}<br/>{message}", "sqlConvertExceptionForClass": "Une erreur sql d'évaluation de valeur est survenue. {message}", "missingPrimaryKeyComponent": "Aucune colonne désignée comme clé naturelle pour le référentiel <code>{param0}</code>", - "separatorUsingInValue": "Vous ne devez pas utiliser le séparateur csv <code>{param1}</code> dans la valeur <code>{param0}</code>" , + "separatorUsingInValue": "Vous ne devez pas utiliser le séparateur csv <code>{param1}</code> dans la valeur <code>{param0}</code>", "tooLonglabel": "Les identificateurs pas être plus long que 256 caractères", "nullLabel": "Les identifiants ne peuvent pas être laissés vides", "inappropriateLabel": "L'identificateur <code>{param0}</code> doit commencer par une minuscule et ne doit contenir que des minuscules, des chiffres ou l'espace souligné", @@ -958,7 +971,7 @@ "integer": "Le champ doit correspondre à une valeur entière", "regexp": "Le champ doit correspondre à l'expression régulière {pattern}", "not-null": "Le champ ne doit pas être vide", - "for-interval": "par interval", + "for-interval": "par intervalle", "for-value": "par valeur" }, "tags": { @@ -975,6 +988,7 @@ "application-creation": "Créer une application", "application-update": "Mise à jour de l'application {name}", "applications-page": "Mes applications", + "applications-page-nothing": "Aucune application", "applications-page-other": "Autres applications", "authorization-application-creator-management": "Gestion des droits de création des applications", "authorization-application-management": "Gestion des droits de gestion pour l'application : {name}", @@ -982,7 +996,7 @@ "data-type-new-authorization": "Nouvelle autorisation", "data-type-request-authorization": "Demande d'autorisations", "data-types-page": "Type de données de {applicationName}", - "data-types-repository": "Gestion des jeux de données de {applicationName}", + "data-types-repository": "Gestion des jeux de données de {dataName}", "login-page": "Bienvenue sur", "profile": "Profil", "references-authorizations": "Autorisations des référentiels", diff --git a/src/main.js b/src/main.js index db8801a46c8c4344adada51b7c1871df21546249..42d968d304e5f5e9dabbad7717f5a3a3a36e1e38 100644 --- a/src/main.js +++ b/src/main.js @@ -83,6 +83,10 @@ import { faExchangeAlt, faUserShield, faCity, + faArrowsAltV, + faArrowsAltH, + faSlidersH, + faUsers, } from "@fortawesome/free-solid-svg-icons"; import { faCalendar as farCalendar, @@ -117,6 +121,10 @@ library.add( farTimesCircle ); library.add( + faArrowsAltV, + faArrowsAltH, + faUsers, + faSlidersH, faUsersCog, faUserShield, faLink, diff --git a/src/model/ApplicationResult.js b/src/model/ApplicationResult.js index 73777bae566e59290d6ea8fb6ea764187f1bec36..9575401ce6ae103b87bb1f48be89e204b570ffd5 100644 --- a/src/model/ApplicationResult.js +++ b/src/model/ApplicationResult.js @@ -6,6 +6,7 @@ export class ApplicationResult { localDescription; creationDate; updateDate; + configFile; name; title; comment; @@ -39,15 +40,29 @@ export class ApplicationResult { data = {}; additionalFile = {}; configuration = {}; - configFile; currentApplicationUserRolesResult = {}; hasSignedCharte = false; hasSignedLastCharte = false; - authorizations = {}; - dependantNodesByDataName = {}; internationalization = {}; + dependantNodesByDataName = {}; orderedReferences = {}; referenceSynthesis = {}; + canReadReference; + canWriteReference; + canReadDatatype; + canWriteDatatype; + authorizations = { + idRef: { + ACTIVE_APPLICATION_USER: false, + ANY: false, + APPLICATION_USER: false, + DELETE: false, + DOWNLOAD: false, + PUBLICATION: false, + READ: false, + UPLOAD: false, + }, + }; isApplicationUser() { return ( @@ -89,9 +104,14 @@ export class ApplicationResult { this.dependantNodesByDataName = application.dependantNodesByDataName; this.orderedReferences = application.orderedReferences; this.referenceSynthesis = application.referenceSynthesis; - let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[application.id] - this.hasSignedLastCharte = - new Date().getTime() > charteTimeStamp; + let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[application.id]; + this.hasSignedLastCharte = new Date().getTime() > charteTimeStamp; this.hasSignedCharte = charteTimeStamp; + this.authorizations = application.authorizations; + + this.canReadReference = application.canReadReference; + this.canWriteReference = application.canWriteReference; + this.canReadDatatype = application.canReadDatatype; + this.canWriteDatatype = application.canWriteDatatype; } } diff --git a/src/model/User.js b/src/model/User.js index 7bf13dcf3d8537c5d95e9867face8fce6a53a7cb..f4d9e545b571fdb79001acd7792f4d4ff85a9ffc 100644 --- a/src/model/User.js +++ b/src/model/User.js @@ -1,10 +1,10 @@ export class User { static states = { idle: false, active: true, pending: false, closed: false }; static INSTANCE = new User(); - static STORED_AUTHENTICATED_USER = function() { - let authenticatedUser = localStorage.getItem('authenticatedUser'); - return authenticatedUser?JSON.parse(authenticatedUser):{}; - } + static STORED_AUTHENTICATED_USER = function () { + let authenticatedUser = localStorage.getItem("authenticatedUser"); + return authenticatedUser ? JSON.parse(authenticatedUser) : {}; + }; id = ""; login = ""; @@ -26,9 +26,9 @@ export class User { lang = navigator.language.slice(0, 2) || "fr"; constructor(userData) { - if (!userData ) { - let user = localStorage.getItem('authenticatedUser'); - user = user?JSON.parse(user):{}; + if (!userData) { + let user = localStorage.getItem("authenticatedUser"); + user = user ? JSON.parse(user) : {}; if (!user) { return; } diff --git a/src/model/application/Application.js b/src/model/application/Application.js index a76c75d083f4850127ae0baad1c6eb8879639b63..0962ebb9b9aa38fd73ea3b4f892fbee664c6e40c 100644 --- a/src/model/application/Application.js +++ b/src/model/application/Application.js @@ -1,6 +1,6 @@ export class Application { id; - localName = "toto"; + localName; creationDate; updateDate; name; @@ -15,15 +15,63 @@ export class Application { currentApplicationUserRolesResult = {}; hasSignedCharte = false; hasSignedLastCharte = false; + dataSyntheses = {}; + canWriteReference = false; + canReadReference = false; + canWriteDatatype = false; + canReadDatatype = false; static of(result) { const application = new Application(result.application); application.currentApplicationUserRolesResult = result.currentApplicationUserRolesResult; application.hasSignedCharte = result.hasSignedCharte; application.hasSignedLastCharte = result.hasSignedLastCharte; + application.dataSyntheses = (result.dataSyntheses || []).reduce((acc, synthesis) => { + acc[synthesis.referenceType] = synthesis.lineCount; + return acc; + }, {}); + + application.canWriteReference = application.hasReferenceToWrite(); + application.canReadReference = application.hasReferenceToRead(); + application.canWriteDatatype = application.hasDatatypeToWrite(); + application.canReadDatatype = application.hasDatatypeToRead(); return application; } + hasReferenceToRead() { + let applicationRoles = this.currentApplicationUserRolesResult.applicationRoles; + let datasyntheses = this.dataSyntheses; + return this.references + .map((reference) => { + let reader = applicationRoles?.includes("reader") && datasyntheses[reference] > 0; + let writer = applicationRoles?.includes("writer"); + return reader || writer; + }) + .reduce((acc, reader) => acc || reader, false); + } + + hasReferenceToWrite() { + let applicationRoles = this.currentApplicationUserRolesResult.applicationRoles; + return applicationRoles?.includes("writer"); + } + + hasDatatypeToRead() { + let applicationRoles = this.currentApplicationUserRolesResult.applicationRoles; + let datasyntheses = this.dataSyntheses; + return this.dataTypes + .map((reference) => { + let reader = applicationRoles?.includes("reader") && datasyntheses[reference] > 0; + let writer = applicationRoles?.includes("writer"); + return reader || writer; + }) + .reduce((acc, reader) => acc || reader, false); + } + + hasDatatypeToWrite() { + let applicationRoles = this.currentApplicationUserRolesResult.applicationRoles; + return applicationRoles?.includes("writer"); + } + isApplicationUser() { return ( this.currentApplicationUserRolesResult?.applicationRoles?.includes("applicationManager") || @@ -56,6 +104,15 @@ export class Application { this.additionalFile = application.additionalFiles; this.configuration = application.configuration; this.configFile = application.configFile; + this.canReadReference = application.canReadReference; + this.canWriteReference = application.canWriteReference; + this.canReadDatatype = application.canReadDatatype; + this.canWriteDatatype = application.canWriteDatatype; + this.localName = application.localName; + this.currentApplicationUserRolesResult = application.currentApplicationUserRolesResult || {}; + this.hasSignedCharte = application.hasSignedCharte || false; + this.hasSignedLastCharte = application.hasSignedLastCharte || false; + this.dataSyntheses = application.dataSyntheses || {}; const configuration = application.configuration; for (const dataName in configuration?.dataDescription || {}) { diff --git a/src/model/application/Component.js b/src/model/application/Component.js index 22838f5773972a51db8a09f85caf45ca678a81ec..d0adea5313000a54c3a80591966c472fab75aea5 100644 --- a/src/model/application/Component.js +++ b/src/model/application/Component.js @@ -13,7 +13,6 @@ export class Component { id; title = "#id"; key = false; - linkedTo = null; tags = [Tag.NO_TAG_INSTANCE()]; componentKey; exportHeader; @@ -54,7 +53,7 @@ export class Component { return row.values[this.id]; } - getDisplayValue = function (row) { + getDisplayValue = function(row) { let columnValue = this.getColumnValue(row); let displaysForRow = row.displaysForRow?.[this.refLinkedTo]?.[row.values[this.id]]; if (displaysForRow && typeof columnValue !== "number") { @@ -107,8 +106,8 @@ export class Component { getInternationalizedColumn( referenceName, component.patternColumnComponents[patternColumnComponent].exportHeader || - component.patternColumnComponents[patternColumnComponent].exportHeaderName || - component.patternColumnComponents[patternColumnComponent].componentKey, + component.patternColumnComponents[patternColumnComponent].exportHeaderName || + component.patternColumnComponents[patternColumnComponent].componentKey, application ); } @@ -214,6 +213,7 @@ class PatternComponent extends Component { patternQualifierComponents; originalName; rowId; + horizontalDisplay = true; constructor( type, @@ -255,13 +255,28 @@ class PatternComponent extends Component { } getHeader() { - return this.originalName; + return this.originalName || this.exportHeader; } + getDisplayValue = function(row) { + let columnValue = this.getColumnValue(row); + let displaysForRow = row.displaysForRow?.[this.refLinkedTo]?.[row.values[this.id]]; + if (displaysForRow && typeof columnValue !== "number") { + return displaysForRow; + } else { + return "" + columnValue; + } + }; + getColumnValue(row) { - let pattern = this.id.match("(.*?)::(.*)"); - return row.values[pattern[1]]?.find((column) => column.__ORIGINAL_COLUMN_NAME__ == pattern[2]) - ?.__VALUE__; + if (this.horizontalDisplay) + if (this.horizontalDisplay) { + let pattern = this.id.match("(.*?)::(.*)"); + return row.values[pattern[1]]?.find( + (column) => column.__ORIGINAL_COLUMN_NAME__ == pattern[2] + ).__VALUE__; + } + return row.values[this.componentKey]?.[0]?.__VALUE__; } componentsForValue(value, row) { @@ -290,22 +305,73 @@ class PatternComponent extends Component { } getColumnQualifiersMap(application, dataId, row) { - let pattern = this.id.match("(.*)::(.*)"); - let value = row.values[pattern[1]].find( - (component) => pattern[2] == component.__ORIGINAL_COLUMN_NAME__ - ); - let qualifiers = this.patternQualifierComponents.map((col) => { - let columnName = col.getHeader(application, dataId, col.id); - let returnValue = { - component: col, - column: col.id, - columnName, - value: value[col.id], - id: col.id, - }; - returnValue[col.id] = value[col.id]; - return returnValue; - }, []); + let qualifiers; + if (dataId) { + let pattern = this.id.match("(.*)::(.*)"); + let value; + if (pattern) { + value = row.values[pattern[1]].find( + (component) => pattern[2] == component.__ORIGINAL_COLUMN_NAME__ + ); + } else { + value = row?.values?.[dataId]?.[0]; + } + qualifiers = this.patternQualifierComponents.map((col) => { + let columnName; + if (this.horizontalDisplay) { + columnName = col.getHeader(application, dataId, col.id); + } else { + columnName = dataId; + } + let returnValue = { + component: col, + column: col.id, + columnName, + value: value[col.id], + id: col.id + }; + returnValue[col.id] = value[col.id]; + return returnValue; + }, []); + let adjacents = this.patternAdjacentComponents.map((col) => { + let columnName; + if (this.horizontalDisplay) { + columnName = col.getHeader(application, dataId, col.id); + } else { + columnName = dataId; + } + let pattern = col.id.match("(.*)::(.*)"); + let returnValue; + if (pattern) { + returnValue = { + component: col, + column: col.id, + columnName, + value: value[pattern[2]], + id: col.id + }; + + } else { + returnValue = { + component: col, + column: col.id, + columnName, + value: value[col.id], + id: col.id + }; + } + returnValue[col.id] = value[col.id]; + return returnValue; + }, []); + adjacents.forEach((adjacent) => { + qualifiers.push(adjacent); + }); + } else { + qualifiers = [...this.patternQualifierComponents]; + this.patternAdjacentComponents.forEach((adjacent) => { + qualifiers.push(adjacent); + }); + } return qualifiers; } @@ -337,7 +403,24 @@ class PatternQualifierComponent extends Component { } else if (this.id.match(".*::.*")) { return this._getInternationalizedColumn(dataId, this.id, application); } - return "PatternQualifierComponent non trouvé"; + return this._getInternationalizedColumn(dataId, this.id, application); + } + + getColumnValue(row) { + let pattern = this.id.match("(.*)::(.*)::(.*)"); + if (pattern) { + return row.values[pattern[1]]?.find( + (column) => column.__ORIGINAL_COLUMN_NAME__ == pattern[3] + )?.[pattern[2]]; + } + pattern = this.id.match("(.*)::(.*)"); + if (pattern) { + return row.values[pattern[1]]?.find( + (column) => column.__ORIGINAL_COLUMN_NAME__ == pattern[2] + )?.[pattern[2]]; + } + let value = row.values?.[this.parentComponentKey]?.[0]?.[this.id]; + return row.displaysForRow?.[this.refLinkedTo]?.[value] || value; } } @@ -378,6 +461,10 @@ class PatternAdjacentComponent extends Component { (column) => column.__ORIGINAL_COLUMN_NAME__ == pattern[3] )?.[pattern[2]]; } + pattern = this.id.match("(.*)::(.*)"); + if (pattern) { + return row.values[pattern[1]]?.[0]?.[pattern[2]]; + } return "PatternAdjacentComponent not found " + this.id; } } diff --git a/src/router/index.js b/src/router/index.js index f24d808d5baaf0c33d085877f5d89e0db788bc07..1777d574ed5dbe97a830f82a0a2804b8686f2713 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -87,7 +87,7 @@ const routes = [ path: "/applicationCreation", name: "Application creation", component: ApplicationCreationView, - props: true, + props: (route) => ({ applicationNames: route.query.applicationNames }), }, { path: "/authorizationsManagementForApplicationCreator", diff --git a/src/services/AlertService.js b/src/services/AlertService.js index 42f0a3a96c6ff6b2f08f7a662e50eecc63cb2b0e..56126959455eba801353213f0d0726c9f027c986 100644 --- a/src/services/AlertService.js +++ b/src/services/AlertService.js @@ -31,16 +31,29 @@ export class AlertService { }); } - toastError(message, error) { + toastError(message, error, state) { if (error && error.content) { error.content.then((t) => { if (typeof t === "string") { - ToastProgrammatic.open({ - message: i18n.t("exceptionMessage." + t), - type: BuefyTypes.DANGER, - duration: TOAST_ERROR_DURATION, - position: TOAST_POSITION, - }); + let regExpMatchArray = t.match("application inconnue (.*)"); + if (regExpMatchArray) { + ToastProgrammatic.open({ + message: i18n.t("applications.no-right-for-application"), + type: BuefyTypes.DANGER, + duration: TOAST_ERROR_DURATION, + position: TOAST_POSITION, + }); + t = "NO-RIGHTS"; + } else { + ToastProgrammatic.open({ + message: i18n.t("exceptionMessage." + t), + type: BuefyTypes.DANGER, + duration: TOAST_ERROR_DURATION, + position: TOAST_POSITION, + }); + } + } else if ("NO_RIGHT_FOR_APPLICATION_MANAGEMENT" === t.message) { + t = "NO-RIGHTS"; } else { const parseMessage = /(^[^[]*) \[(.*)\]$/.exec(t.message); const message = parseMessage?.[1] || t.message; @@ -55,6 +68,7 @@ export class AlertService { position: TOAST_POSITION, }); } + if (state) state.value = t; }); } else { ToastProgrammatic.open({ @@ -66,11 +80,11 @@ export class AlertService { } } - toastServerError(error) { + toastServerError(error, state) { if (error && error.content != null) { - error.content.then((value) => this.toastError(value.message, error)); + error.content.then((value) => this.toastError(value.message, error, state)); } else { - this.toastError(i18n.t("alert.server-error"), error); + this.toastError(i18n.t("alert.server-error"), error, state); } } diff --git a/src/services/ErrorsService.js b/src/services/ErrorsService.js index 807b3dd5bcacae7f23dcac33971178dbd37607db..72de869899fba6363b9033beb90ae6f153717467 100644 --- a/src/services/ErrorsService.js +++ b/src/services/ErrorsService.js @@ -66,6 +66,7 @@ const ERRORS = { headerColumnPatternNotMatching: (params) => i18n.t("errors-csv.headerColumnPatternNotMatching.message", params), invalidHeaders: (params) => i18n.t("errors-csv.invalidHeaders.message", params), invalidReferenceWithComponent: (params) => i18n.t("errors-csv.invalidReferenceWithComponent.message", params), + missingMandatoryColumns: (params) => i18n.t("errors-csv.missingMandatoryColumns.message", params), timeRangeOutOfInterval: (params) => i18n.t("errors-csv.timeRangeOutOfInterval.message", params), unexpectedHeaderColumn: (params) => i18n.t("errors-csv.unexpectedHeaderColumn.message", params), unexpectedHeaderColumnsInList: (params) => i18n.t("errors-csv.unexpectedHeaderColumnsInList.message", params), diff --git a/src/services/InternationalisationService.js b/src/services/InternationalisationService.js index fb8312401d73c8f60a0938f948085fcb11ffd95c..8ced452bf7f1b2bbb04ce18053075fd7ed471b50 100644 --- a/src/services/InternationalisationService.js +++ b/src/services/InternationalisationService.js @@ -181,7 +181,7 @@ export class InternationalisationService extends Fetcher { for (let applicationReference in applicationReferences) { if (applicationReference === referenceColumnName) { let defaultValue = forDescription ? null : referenceColumnName; - referenceColumnName++; + //referenceColumnName++; return ( applicationReferences[applicationReference].i18n?.[ forDescription ? "description" : "title" @@ -202,7 +202,7 @@ export class InternationalisationService extends Fetcher { ?.exportHeader; if (exportHeader) { let defaultValue = forDescription ? null : columnName; - columnName++; + //columnName++; localColumnName = exportHeader?.[forDescription ? "description" : "title"]?.[ localStorage.getItem(LOCAL_STORAGE_LANG) diff --git a/src/services/TagService.js b/src/services/TagService.js index deaaa608b0bbf52982c9e171ff16fee4d6b9c39b..e3294b3ebda2aa388b5473a8cc975a777df52f8a 100644 --- a/src/services/TagService.js +++ b/src/services/TagService.js @@ -45,10 +45,7 @@ export class TagService extends Fetcher { ) { return true; } else { - return selectedTags.some( - (selectedTag) => - selectedTag.tagName === tag.tagName - ); + return selectedTags.some((selectedTag) => selectedTag.tagName === tag.tagName); } } }); diff --git a/src/services/rest/DataService.js b/src/services/rest/DataService.js index ccee857f2ba7267ae3d932e0869bcd7ffb964d14..c1dc23c342333f302730daf5215a001854b7cbc7 100644 --- a/src/services/rest/DataService.js +++ b/src/services/rest/DataService.js @@ -11,7 +11,7 @@ export class DataService extends Fetcher { return this.getChunck(method, url); } - async getData(applicationName, dataName, params, onlyMetadata) { + async getData(applicationName, dataName, params, loadExample) { const locale = services.internationalisationService.getLocale(); params = params || {}; params.outPut = params.outPut || {}; @@ -19,7 +19,7 @@ export class DataService extends Fetcher { if (params) { return this.get(`applications/${applicationName}/data/${dataName}/json`, { downloadDatasetQuery: JSON.stringify(params), - onlyMetadata: !!onlyMetadata, + loadExample: !!loadExample, }); } else { return this.get(`applications/${applicationName}/data/${dataName}/json`); diff --git a/src/style/_common.scss b/src/style/_common.scss index c6fa395d03387ab68fc5611485976b9504924053..440ab3494e86a2e4d3e8e3a1a4d7178a7d6da4f7 100644 --- a/src/style/_common.scss +++ b/src/style/_common.scss @@ -59,10 +59,16 @@ a { .icon.is-medium { font-size: $size-icon-medium; } -.control.has-icons-right .icon.is-right { - top: -2px; +.control.has-icons-right { + .icon { + z-index: 0; + } + .icon.is-right { + top: -2px; + } } .control.has-icons-left .icon { + z-index: 0; .is-small { top: -5px; } diff --git a/src/views/additionalfiles/AdditionalFileInfosView.vue b/src/views/additionalfiles/AdditionalFileInfosView.vue index ecb4ee0507d1b8d19b85d2761f2580826e42bf53..84b18562000969da1e32ad43ef5248f5e5ecae14 100644 --- a/src/views/additionalfiles/AdditionalFileInfosView.vue +++ b/src/views/additionalfiles/AdditionalFileInfosView.vue @@ -477,8 +477,7 @@ export default class AdditionalFileInfosView extends Vue { this.validFile = true; this.forApplication = additionalFile.forApplication; this.currentUser = additionalFiles.users.find( - (user) => - user.id == (additionalFile.user || User.STORED_AUTHENTICATED_USER()?.id) + (user) => user.id == (additionalFile.user || User.STORED_AUTHENTICATED_USER()?.id) ); this.comment = additionalFile.comment; this.fields = Object.keys(this.format || {} || []).reduce((acc, field) => { @@ -507,8 +506,7 @@ export default class AdditionalFileInfosView extends Vue { this.canManage = this.isApplicationAdmin || (authorizations.users && - authorizations.users[0].login === - User.STORED_AUTHENTICATED_USER()?.login); + authorizations.users[0].login === User.STORED_AUTHENTICATED_USER()?.login); } else { this.fileNames = additionalFiles.fileNames; let initialValue = new Authorizations( diff --git a/src/views/application/ApplicationCreationView.vue b/src/views/application/ApplicationCreationView.vue index a873691c25289345b856d9f5ca1b6335a4e58c15..17c862d740ec1d1244b4ab154d6f0c4c8353ef86 100644 --- a/src/views/application/ApplicationCreationView.vue +++ b/src/views/application/ApplicationCreationView.vue @@ -108,6 +108,7 @@ {{ $t("validation.obligatoire") }} </span> </template> + <b-input v-model="applicationConfig.name" :placeholder="$t('applications.name-placeholder')" @@ -181,6 +182,9 @@ import { computed, watch } from "vue"; export default { name: "ApplicationCreationView", props: { + applicationNames: { + type: Array, + }, applicationName: { type: String, default: "", @@ -207,7 +211,6 @@ export default { let disabled = useBoolean().refBoolean; let counter = useNumber(1).refNumber; let isLoading = computed(() => counter.value === 0); - let regExp = /^[a-zA-Z]+$/; async function saveApplication(status) { counter.value = 0; @@ -218,7 +221,6 @@ export default { switch (status) { case "create": method = (chunk) => { - console.log(chunk); return parseChunck(chunk, "create", canBeShowAndReturnErrorsMessage); }; await services.applicationService.createApplication( @@ -258,10 +260,6 @@ export default { await saveApplication("validate"); } - function validNameApplication(name) { - return regExp.test(name); - } - function showHelp() { let routeData = app.$router.resolve("/help"); window.open(routeData.href, "_blank"); @@ -279,12 +277,6 @@ export default { function parseResultChunck(chunk, caller) { const response = chunk.result; if ("validate" === caller && response.name) { - console.log( - testStringWithRegexArray( - response.configuration.applicationDescription.name.toLowerCase(), - currentUser.authorizations - ) - ); if ( response.configuration.applicationDescription.name.length < 44 && (currentUser.authorizations.includes( @@ -315,6 +307,13 @@ export default { version: props.applicationVersion, }) ); + } else if (props.applicationNames?.includes(applicationConfig.name)) { + disabled.value = true; + services.alertService.toastError( + i18n.t("alert.server-error-appli-exist-on-creation", { + applicationName: applicationConfig.name, + }) + ); } else { services.alertService.toastSuccess(i18n.t("alert.application-validate-success")); } @@ -402,7 +401,6 @@ export default { return { createApplication, - validNameApplication, changeConfiguration, showHelp, testApplication, diff --git a/src/views/application/ApplicationInfoView.vue b/src/views/application/ApplicationInfoView.vue index 1e194a7a0131f119d159c06388533f0c84d96c89..7e5dae0f927c3d03beaf456ae486d7f061eeb6ff 100644 --- a/src/views/application/ApplicationInfoView.vue +++ b/src/views/application/ApplicationInfoView.vue @@ -10,7 +10,7 @@ import app, { i18n } from "@/main"; import useObject from "@/composable/components/object"; import useBoolean from "@/composable/components/boolean"; import DetailApplicationModalCard from "@/components/application/DetailApplicationModalCard.vue"; -import { formatedDateArray } from "../../composable/application/DatePattern"; +import { formatedDateArray } from "../../composable/application/datePattern"; import { ApplicationResult } from "@/model/ApplicationResult"; import { User } from "@/model/User"; @@ -21,8 +21,8 @@ export default { emits: ["setValidatedCharte"], props: { applicationName: { - type: String - } + type: String, + }, }, setup(props, ctx) { const isCardModalActive = useBoolean().refBoolean; @@ -30,7 +30,7 @@ export default { const redirection = ref(() => { app.$router.push(`/applications/${props.applicationName}`); }); - const showCharte = function(objectShowCharte) { + const showCharte = function (objectShowCharte) { if (!objectShowCharte) { return; } else { @@ -43,25 +43,23 @@ export default { get() { let chartestimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[props.application.id]; if (chartestimeStamp) { - return ( - new Date().getTime() > chartestimeStamp - ); + return new Date().getTime() > chartestimeStamp; } return false; }, set(bool) { bool && - services.loginService.modifAcount({ - login: User.STORED_AUTHENTICATED_USER()?.login, - email: User.STORED_AUTHENTICATED_USER()?.email, - charte: props.application.id - }); + services.loginService.modifAcount({ + login: User.STORED_AUTHENTICATED_USER()?.login, + email: User.STORED_AUTHENTICATED_USER()?.email, + charte: props.application.id, + }); bool && - ctx.emit("setValidatedCharte", { - applicationId: application.id, - validated: bool - }); - } + ctx.emit("setValidatedCharte", { + applicationId: application.id, + validated: bool, + }); + }, }); const { reactiveObject: application, doChangeObject: changeApplication } = useObject( new ApplicationResult() @@ -89,8 +87,18 @@ export default { showAdditionalFilesManagementRights, requestRights, authorizationsManagementForApplicationUsers, - showRequestRights + showRequestRights, } = useRedirections(application); + const canReadReferences = computed(() => + Object.keys(application.references).filter( + (reference) => application?.authorizations?.[reference]?.READ + ) + ); + const canReadDataTypes = computed(() => + Object.keys(application.dataTypes).filter( + (dataType) => application?.authorizations?.[dataType]?.READ + ) + ); onMounted(async () => { await init(); @@ -98,8 +106,8 @@ export default { new SubMenuPath( "Accueil", () => app.$router.push(`/applications/${props.applicationName}`), - () => app.$router.push(`/applications`) - ) + () => {} + ), ]); }); @@ -111,7 +119,7 @@ export default { "DATATYPE", "CONFIGURATION", "REFERENCETYPE", - "ADDITIONALFILE" + "ADDITIONALFILE", ]) ) ); @@ -120,12 +128,12 @@ export default { localRefName: services.internationalisationService.localeReferenceNames( props.applicationName, application - ) + ), }); } catch (e) { services.alertService.toastError( i18n.t("alert.server-error-appli-no-exist", { - name: props.applicationName + name: props.applicationName, }) ); } @@ -136,12 +144,12 @@ export default { : application?.currentApplicationUserRolesResult?.isOpenAdomAdmin ); changeCanManagerApplication( - application?.currentApplicationUserRolesResult?.applicationRoles.includes( + application?.currentApplicationUserRolesResult?.applicationRoles?.includes( "applicationManager" ) ); changeCanManagerUser( - application?.currentApplicationUserRolesResult?.applicationRoles.includes("userManager") + application?.currentApplicationUserRolesResult?.applicationRoles?.includes("userManager") ); } catch (error) { console.log("missing admin application rights", error); @@ -149,6 +157,8 @@ export default { } return { + canReadReferences, + canReadDataTypes, createApplication, updateApplication, downloadApplicationUploadBundle, @@ -175,9 +185,9 @@ export default { canManagerUser, canManagerApplication, url, - redirection + redirection, }; - } + }, }; </script> @@ -186,6 +196,7 @@ export default { <SubMenu :aria-label="$t('menu.aria-sub-menu')" :paths="subMenuPaths" + :is-accueil="true" :root="application.localName || applicationName" role="navigation" /> @@ -267,7 +278,7 @@ export default { icon-left="drafting-compass" type="is-primary" @click="showCharte(displayReferencesManagement(application))" - >{{ $t("applications.references") }} + >{{ $t("applications.references") }} </b-button> </div> <div @@ -279,7 +290,7 @@ export default { icon-left="poll" type="is-primary" @click="showCharte(displayDataSetManagement(application))" - >{{ $t("applications.dataset") }} + >{{ $t("applications.dataset") }} </b-button> </div> </div> @@ -289,7 +300,7 @@ export default { outlined type="is-warning" @click="showDataRights(application)" - >{{ $t("applications.functions.datas-rights") }} + >{{ $t("applications.functions.datas-rights") }} </b-button> </div> </b-tab-item> @@ -302,8 +313,8 @@ export default { > <template #header> <span class="rubriqueTitle">{{ - $t("applications.functions.additional-files-manage") - }}</span> + $t("applications.functions.additional-files-manage") + }}</span> </template> <div class="buttonWarper"> <b-button @@ -329,8 +340,8 @@ export default { > <template #header> <span class="rubriqueTitle">{{ - $t("applications.functions.application-manage") - }}</span> + $t("applications.functions.application-manage") + }}</span> </template> <div class="buttonWarper columns"> <b-button @@ -401,8 +412,8 @@ export default { <b-tab-item aria-description="authorization"> <template #header> <span class="rubriqueTitle">{{ - $t("applications.functions.right-requests-manage") - }}</span> + $t("applications.functions.right-requests-manage") + }}</span> </template> <div class="buttonWarper"> <b-button @@ -432,11 +443,12 @@ export default { class="buttonWarper" > <b-button + :disabled="!canReadReferences.length" class="column" icon-left="drafting-compass" type="is-primary" @click="showCharte(displayReferencesManagement(application))" - >{{ $t("applications.references") }} + >{{ $t("applications.references") }} </b-button> </div> <div @@ -444,11 +456,12 @@ export default { class="buttonWarper" > <b-button + :disabled="!canReadDataTypes.length" class="column" icon-left="poll" type="is-primary" @click="showCharte(displayDataSetManagement(application))" - >{{ $t("applications.dataset") }} + >{{ $t("applications.dataset") }} </b-button> </div> <div diff --git a/src/views/application/ApplicationsView.vue b/src/views/application/ApplicationsView.vue index c89943fa9e056ff7fc92412278d7f52f0d60a8a3..72ecabb952c09afa34c589f75e18c9359399b0f1 100644 --- a/src/views/application/ApplicationsView.vue +++ b/src/views/application/ApplicationsView.vue @@ -1,8 +1,23 @@ <template> <PageView> + <b-tabs + v-if="ownApplications.length + otherApplications.length" + v-model="showOwnApplications" + position="is-centered" + > + <b-tab-item + :disabled="ownApplications.length === 0" + :label="$t('titles.applications-page')" + /> + <b-tab-item + :disabled="otherApplications.length === 0" + :label="$t('titles.applications-page-other')" + /> + </b-tabs> + <h1 class="title main-title"> {{ - showOwnApplications ? $t("titles.applications-page") : $t("titles.applications-page-other") + showOwnApplications ? $t("titles.applications-page-other") : $t("titles.applications-page") }} </h1> @@ -15,7 +30,7 @@ role="button" style="margin-bottom: 50px" tabindex="0" - @click="createApplication" + @click="createApplication((applications || []).map((a) => a.name))" > <a class="card-header-icon createApplication"> <b-icon icon="plus"></b-icon> @@ -34,32 +49,39 @@ <div class="card-content"> <div class="content"> <b-field class="columns"> - <b-checkbox - v-model="checkboxDate" - class="column" - false-value="false" - field="name" - true-value="true" - @input="alphabeticalSort = ''" - >{{ $t("applications.trierRecent") }} - </b-checkbox> + <b-radio + v-model="alphabeticalOrDateSort" + name="DateSort" + native-value="0_9" + @input="sortedApplicationsListForDate(applications, $event)" + > + {{ $t("applications.trierRecent") }} + </b-radio> + <b-radio + v-model="alphabeticalOrDateSort" + name="DateSort" + native-value="9_0" + @input="sortedApplicationsListForDate(applications, $event)" + > + {{ $t("applications.trierAncien") }} + </b-radio> </b-field> </div> <div class="content"> <b-field class="columns"> <b-radio - v-model="alphabeticalSort" - name="alphabeticalSort" + v-model="alphabeticalOrDateSort" + name="alphabeticalOrDateSort" native-value="Az" - @input="checkboxDate = false" + @input="sortedApplicationsListForName(applications, $event)" > {{ $t("applications.trierA_z") }} </b-radio> <b-radio - v-model="alphabeticalSort" - name="alphabeticalSort" + v-model="alphabeticalOrDateSort" + name="alphabeticalOrDateSort" native-value="Za" - @input="checkboxDate = false" + @input="sortedApplicationsListForName(applications, $event)" > {{ $t("applications.trierZ_a") }} </b-radio> @@ -104,6 +126,9 @@ <div class="columns"> <ApplicationCard v-for="(application, index) in selectedApplications" + :application-roles=" + application?.currentApplicationUserRolesResult?.applicationRoles || [] + " :key="application.name" :application="application" :current="current" @@ -139,18 +164,28 @@ import LoadingAnimate from "@/components/common/LoadingAnimate.vue"; import services from "@/composable/services"; import useBoolean from "@/composable/components/boolean"; import useText from "@/composable/components/text"; -import { computed, onMounted, inject, ref } from "vue"; +import { computed, onMounted, inject } from "vue"; import { useRedirections } from "@/composable/applications/useFunction"; import ApplicationCard from "@/components/application/ApplicationCard.vue"; import useNumber from "@/composable/components/number"; +import { Application } from "@/model/application/Application"; export default { name: "ApplicationsView", + computed: { + Application() { + return Application; + }, + }, components: { ApplicationCard, LoadingAnimate, PageView }, setup() { const { createApplication, updateApplication, displayAdditionalFilesManagement } = useRedirections(); const applications = inject("application:applications"); + const ownApplications = inject("application:ownApplications"); + const showOwnApplications = inject("application:showOwnApplications"); + const hasOwnApplications = inject("application:hasOwnApplications"); + const otherApplications = inject("application:otherApplications"); const progress = inject("application:progress"); const loadApplications = inject("application:loadApplications"); const checkboxDate = useBoolean().refBoolean; @@ -169,48 +204,69 @@ export default { // filtre variable const filterName = useText().refText; const selected = useBoolean().refBoolean; - const alphabeticalSort = useText().refText; + const alphabeticalOrDateSort = useText().refText; const selectedApplications = computed(() => { - let sa = applications && applications.value; + let applicationsListOrderOrFilter = + showOwnApplications.value === 0 ? ownApplications?.value : otherApplications?.value; if (filterName.value.length > 2) - sa = sa.filter( + applicationsListOrderOrFilter = applicationsListOrderOrFilter.filter( (a) => a.localName.toString().toLowerCase().indexOf(filterName.value.toLowerCase()) >= 0 ); - if (checkboxDate.value === "true") sa = sa.sort((a, b) => b.creationDate - a.creationDate); - else sa = sa.sort((a, b) => b.creationDate - a.creationDate).reverse(); - if (alphabeticalSort.value === "Az") { - sa = sa.sort((a, b) => a.localName.localeCompare(b.localName)); - } else if (alphabeticalSort.value === "Za") { - sa = sa.sort((a, b) => a.localName.localeCompare(b.localName)).reverse(); - } - return sa; + return applicationsListOrderOrFilter; }); onMounted(async () => { loadApplications(["DATATYPE", "REFERENCETYPE", "CONFIGURATION", "ADDITIONALFILE"]); }); - const ownApplications = computed(() => { - return applications.value.filter((application) => application.isApplicationUser()); - }); - - const otherApplications = computed(() => { - return applications.value.filter((application) => !application.isApplicationUser()); - }); - const hasOwnApplications = computed(() => { - return ownApplications?.value.length; - }); - - const hasOtherApplications = computed(() => { - return otherApplications?.value.length; - }); + function sortedApplicationsListForDate(localApplications, event) { + localApplications = + showOwnApplications.value === 0 ? ownApplications?.value : otherApplications?.value; + localApplications.sort((a, b) => { + const localA = new Date( + a.updateDate[0], + a.updateDate[1] - 1, + a.updateDate[2], + a.updateDate[3], + a.updateDate[4], + a.updateDate[5], + a.updateDate[6] / 1000000 + ); + const localB = new Date( + b.updateDate[0], + b.updateDate[1] - 1, + b.updateDate[2], + b.updateDate[3], + b.updateDate[4], + b.updateDate[5], + b.updateDate[6] / 1000000 + ); + return event === "0_9" + ? localB.getTime() - localA.getTime() + : localA.getTime() - localB.getTime(); + }); + return localApplications; + } - const showOwnApplications = ref(hasOwnApplications); + function sortedApplicationsListForName(localApplications, event) { + localApplications = + showOwnApplications.value === 0 ? ownApplications?.value : otherApplications?.value; + localApplications; + if (event === "Az") { + localApplications = localApplications.sort((a, b) => + a.localName.localeCompare(b.localName) + ); + } else if (event === "Za") { + localApplications = localApplications + .sort((a, b) => a.localName.localeCompare(b.localName)) + .reverse(); + } + return localApplications; + } return { - hasOwnApplications, - hasOtherApplications, ownApplications, + hasOwnApplications, otherApplications, showOwnApplications, applications, @@ -229,9 +285,11 @@ export default { loading, selectedName, checkboxDate, - alphabeticalSort, + alphabeticalOrDateSort, isCardModalActive, canCreateApplication, + sortedApplicationsListForDate, + sortedApplicationsListForName, }; }, }; diff --git a/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue b/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue index 3a814140185c972aaca84f0eee3ad47766d827f5..bda8904e1f55f034faf2ca30d466a29c1c0976d8 100644 --- a/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue +++ b/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue @@ -6,14 +6,16 @@ :root="application?.localName || application?.title" role="navigation" /> - - <h1 class="title main-title"> - <span>{{ - $t("dataTypeAuthorizations.title", { - label: currentUser[0] ? currentUser[0].label : currentUser.label, + <TitleAndDescription + :application="application" + :localDescription="currentAuthorization.description" + :localName="application.localName || application.title" + :local-title=" + $t('dataTypeAuthorizations.title', { + label: currentUser[0] ? currentUser[0].label : currentUser.login, }) - }}</span> - </h1> + " + /> <LoadingAnimate v-if="isLoading" :size="'is-medium'"></LoadingAnimate> <ValidationObserver v-else ref="observer" v-slot="{ handleSubmit }"> <FieldsForm @@ -120,10 +122,12 @@ import app, { i18n } from "@/main"; import useArray from "@/composable/components/array"; import { getListColumnName } from "@/composable/authorization/grantableInfos"; import { User } from "@/model/User"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; export default { name: "AuthorizationsRightsRequestInfoView", components: { + TitleAndDescription, LoadingAnimate, AuthorizationTableForDatatype, PageView, @@ -147,8 +151,6 @@ export default { ); const { shallowRefArray: subMenuPaths, doChangeArray: changeSubMenuPaths } = useArray(); const isLoading = ref(false); - const authenticatedUser = services.loginService.getAuthenticatedUser(); - console.log(authenticatedUser); const canCreateApplication = false; const datatypes = ref({ withScope: {}, withoutScope: {} }); const references = ref({ withScope: {}, withoutScope: {} }); @@ -315,7 +317,6 @@ export default { changeApplication( services.internationalisationService.mergeInternationalization(getApplication) ); - console.log("application in get application", application); changeConfiguration(application.configuration); datas.value = Object.keys(application.data).reduce((acc, data) => { acc[data] = { @@ -344,7 +345,7 @@ export default { ); initApplication(getApplication); dependencies.value = buildDependencies(configuration.hierarchicalNodes); - changeFormat(configuration.rightsRequest.format || {}); + changeFormat(configuration.rightsRequest.formFields || {}); changeFields( (Object.keys(format) || []).reduce((acc, field) => { acc[field] = ""; @@ -379,7 +380,7 @@ export default { currentUser.value = [ request.users.find( (user) => - user.id === + user?.id === ((request && request.rightsRequests && request.rightsRequests[0] && @@ -532,18 +533,16 @@ export default { } } let usersId; - let authenticatedUserId = User.STORED_AUTHENTICATED_USER().id; + let authenticatedUserId = User.STORED_AUTHENTICATED_USER()?.id; if ( - (currentUser.value.id && - currentUser.value.id !== authenticatedUserId) || - (currentUser.value[0] && - currentUser.value[0].id !== authenticatedUserId) + (currentUser.value?.id && currentUser.value?.id !== authenticatedUserId) || + (currentUser.value[0] && currentUser.value[0]?.id !== authenticatedUserId) ) { - usersId = currentUser.value.id - ? [currentUser.value.id, authenticatedUserId] - : [currentUser.value[0].id, authenticatedUserId]; + usersId = currentUser.value?.id + ? [currentUser.value?.id, authenticatedUserId] + : [currentUser.value[0]?.id, authenticatedUserId]; } else { - usersId = [currentUser.value.id ? currentUser.value.id : currentUser.value[0].id]; + usersId = [currentUser.value?.id ? currentUser.value?.id : currentUser.value[0]?.id]; } return { uuid: props.authorizationId === "new" ? null : props.authorizationId, @@ -558,7 +557,6 @@ export default { }; async function createRequest(isSetted) { - console.log("createRequest isSetted", isSetted); if (!valid) { return; } @@ -637,7 +635,7 @@ export default { currentUser.value.label ? currentUser.value.label : currentUser.value[0].label }`, description: description.value, - usersId: [currentUser.value[0].id, User.STORED_AUTHENTICATED_USER()?.id], + usersId: [currentUser.value[0]?.id, User.STORED_AUTHENTICATED_USER()?.id], authorizationForAll, authorizationsWithRestriction, }; diff --git a/src/views/authorizations/DataTypeAuthorizationInfoView.vue b/src/views/authorizations/DataTypeAuthorizationInfoView.vue index 056313fe06c274135ecc06e62513a8f11311c882..d706264b2086dfd6753ab8be276e2698cfd46e09 100644 --- a/src/views/authorizations/DataTypeAuthorizationInfoView.vue +++ b/src/views/authorizations/DataTypeAuthorizationInfoView.vue @@ -6,10 +6,16 @@ :root="application.localName || application.title" role="navigation" /> - - <h1 class="title main-title"> - <span v-if="authorizationId === 'new'">{{ $t("titles.data-type-new-authorization") }}</span> - </h1> + <TitleAndDescription + :application="application" + :localDescription="currentAuthorization.description" + :localName="application.localName || application.title" + :local-title=" + authorizationId === 'new' + ? $t('titles.data-type-new-authorization') + : currentAuthorization.name + " + /> <ValidationObserver ref="observer"> <div class="columns"> <ValidationProvider @@ -20,7 +26,7 @@ vid="name" > <b-field - :label="$t('dataTypeAuthorizations.name-authorization')" + :label="$t('dataTypeAuthorizations.name')" :message="errors[0]" :type="{ 'is-danger': errors && errors.length > 0, @@ -108,11 +114,14 @@ import app, { i18n } from "@/main"; import services from "@/composable/services"; import { dataLoader } from "@/composable/data/dataLoader"; import AuthorizationTableForDatatype from "@/components/common/AuthorizationTableForDatatype.vue"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; +import { allDataName, createListData } from "@/composable/application/data"; export default { name: "DataTypeAuthorizationInfoView", emits: ["update:infoAuth"], components: { + TitleAndDescription, AuthorizationTableForDatatype, PageView, SubMenu, @@ -242,66 +251,22 @@ export default { }; return acc; }, {}); - datatypes.value = { - withScope: Object.keys(application.value.dataTypes) - .filter((name) => application.value.configuration.dataDescription[name].authorization) - .reduce((acc, dataType) => { - acc[dataType] = { - id: dataType, - name: - services.internationalisationService.localeReferenceNames( - dataType, - application.value - ) || dataType, - }; - return acc; - }, {}), - withoutScope: Object.keys(application.value.dataTypes) - .filter( - (name) => application.value.configuration.dataDescription[name].authorization === null - ) - .reduce((acc, dataType) => { - acc[dataType] = { - id: dataType, - name: - services.internationalisationService.localeReferenceNames( - dataType, - application.value - ) || dataType, - }; - return acc; - }, {}), - }; - references.value = { - withScope: Object.keys(application.value.references) - .filter((name) => application.value.configuration.dataDescription[name].authorization) - .reduce((acc, reference) => { - acc[reference] = { - id: reference, - name: - services.internationalisationService.localeReferenceNames( - reference, - application.value - ) || reference, - }; - return acc; - }, {}), - withoutScope: Object.keys(application.value.references) - .filter( - (name) => application.value.configuration.dataDescription[name].authorization === null - ) - .reduce((acc, reference) => { - acc[reference] = { - id: reference, - name: - services.internationalisationService.localeReferenceNames( - reference, - application.value - ) || reference, - }; - return acc; - }, {}), - }; + let listDataNodeNames = []; + for (let localDataName in application.value.dataTypes) { + listDataNodeNames = allDataName( + application.value.dataTypes[localDataName], + listDataNodeNames + ); + } + datatypes.value = createListData(listDataNodeNames, application.value); + let listReferenceNodeNames = []; + for (let localDataName in application.value.references) { + listReferenceNodeNames = allDataName( + application.value.references[localDataName], + listReferenceNodeNames + ); + } + references.value = createListData(listReferenceNodeNames, application.value); configuration.value = application.value.configuration; dependencies.value = buildDependencies(configuration.value.hierarchicalNodes); if ( @@ -450,7 +415,6 @@ export default { function createOrUpdateAuthorization() { try { const authorizations = buildAuthorization(); - console.log("createOrUpdateAuthorization authorizations:", authorizations); services.authorizationService.createAuthorization(props.applicationName, authorizations); app.$router.push(`/applications/${props.applicationName}/authorizations`); } catch (e) { diff --git a/src/views/authorizations/DataTypeAuthorizationsView.vue b/src/views/authorizations/DataTypeAuthorizationsView.vue index 11da1e277630abc5c85fb9730d81a6dfa3b12379..6a625b4d3be81c8479becc1a4742c1835d739a2f 100644 --- a/src/views/authorizations/DataTypeAuthorizationsView.vue +++ b/src/views/authorizations/DataTypeAuthorizationsView.vue @@ -6,32 +6,44 @@ :root="application.localName || application.name" role="navigation" /> - <h1 class="title main-title"> - {{ - $t("titles.data-type-authorizations", { + <TitleAndDescription + :application="application" + :local-title=" + $t('titles.data-type-authorizations', { dataType: application.localName || application.name, - type: "autorisation", + type: 'autorisation', }) - }} - </h1> + " + :localDescription="application.localRefDescription" + :localName="application.localName || application.name" + /> <div class="rows"> <div class="row"> <div class="columns" style="margin: 0"> - <div class="column is-2"> - <b-switch - v-model="hasAuthorizationsByUsers" - :disabled="hasPublicAuthorizations" - passive-type="is-dark" - type="is-primary" - @input="updateTableAuthorizations" - > - {{ - hasAuthorizationsByUsers - ? $t("dataTypeAuthorizations.table-auth-users") - : $t("dataTypeAuthorizations.table-auth-name") - }} - </b-switch> + <div class="column is-4"> + <b-field> + <b-radio-button + v-model="hasAuthorizationsByUsers" + :disabled="hasPublicAuthorizations" + :native-value="true" + type="is-primary is-outlined" + @input="updateTableAuthorizations" + > + <b-icon icon="users"></b-icon> + <span>{{ $t("dataTypeAuthorizations.table-auth-users") }}</span> + </b-radio-button> + <b-radio-button + v-model="hasAuthorizationsByUsers" + :disabled="hasPublicAuthorizations" + :native-value="false" + type="is-primary is-outlined" + @input="updateTableAuthorizations" + > + <b-icon icon="key"></b-icon> + <span>{{ $t("dataTypeAuthorizations.table-auth-name") }}</span> + </b-radio-button> + </b-field> </div> <div class="column is-2"> <b-checkbox @@ -43,7 +55,7 @@ {{ $t("dataTypeAuthorizations.table-auth-public") }} </b-checkbox> </div> - <div class="column is-offset-6 is-2" v-if="isApplicationManager"> + <div v-if="isApplicationManager" class="column is-offset-4 is-2"> <b-button icon-left="plus" type="is-primary is-right" @click="addAuthorization"> {{ $t("dataTypeAuthorizations.add-auhtorization") }} </b-button> @@ -86,8 +98,7 @@ {{ $t("dataTypeAuthorizations.table-auth-users-all-user") }} </b-radio> </div> - <div class="column is-offset-4 is-2" - v-if="isApplicationManager"> + <div v-if="isApplicationManager" class="column is-offset-4 is-2"> <b-button icon-left="plus" outlined @@ -104,12 +115,12 @@ <div class="columns"> <!-- table des autorisations pas nom d'utilisateur --> <b-table - class="column" v-if="hasAuthorizationsByUsers" :data="listAuthorizationsByUsersBasedOnAuth" :paginated="true" :per-page="perPage" :striped="true" + class="column" default-sort="row.name" default-sort-direction="asc" height="100%" @@ -229,7 +240,7 @@ > <b-checkbox v-model="checkbox[auth.name + '_' + props.row.name]" - :disabled="(isApplicationManager || isUserManager)" + :disabled="!isApplicationManager || !isUserManager" @input="updateListUsersInAuthorization(auth, props.row.name, $event)" > {{ auth.name }} @@ -257,12 +268,12 @@ > <DetailAuthorizationModalCard v-model="isCardModalActive" + :application="application" :authorization="currentAuthorizationInModal" :is-loading="isLoadingModal" - :open="isCardModalActive" - :application="application" :lang="lang" :list-column-name="listColumnName" + :open="isCardModalActive" > </DetailAuthorizationModalCard> </b-modal> @@ -276,12 +287,12 @@ </b-table> <!-- table des autorisations pas nom d'autorisation --> <b-table - class="column" v-else :data="authorizations" :paginated="true" :per-page="perPage" :striped="true" + class="column" default-sort="row.name" default-sort-direction="asc" height="100%" @@ -338,8 +349,8 @@ > <a class="card-header-icon" style="padding-left: 0; padding-right: 0"> <b-button + :disabled="!isApplicationManager" class="show-check-details" - disabled icon-left="times-circle" size="is-small" style=" @@ -353,6 +364,7 @@ > </b-button> <b-button + :disabled="!isUserManager" class="show-check-details" icon-left="pen-square" onmouseout="style.color='';" @@ -454,8 +466,9 @@ <b-checkbox v-model="checkbox[props.row.name + '_' + user.label]" :disabled=" - ((props?.row?.users || []).map((use) => use.login).length === 1 && - checkbox[props.row.name + '_' + user.label] === true) && (isApplicationManager || isUserManager) + (props?.row?.users || []).map((use) => use.login).length === 1 && + checkbox[props.row.name + '_' + user.label] === true && + (isApplicationManager || isUserManager) " @input="updateListUsersInAuthorization(props.row, user.label, $event)" > @@ -543,6 +556,7 @@ import useBoolean from "@/composable/components/boolean"; import { LOCAL_STORAGE_LANG } from "@/services/Fetcher"; import DetailAuthorizationModalCard from "@/components/common/authorization/DetailAuthorizationModalCard.vue"; import SummaryTableOfAuthorizationByData from "@/components/common/authorization/SummaryTableOfAuthorizationByData.vue"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; export default { name: "DataTypeAuthorizationsView", @@ -552,6 +566,7 @@ export default { }, }, components: { + TitleAndDescription, SummaryTableOfAuthorizationByData, LoadingAnimate, PageView, @@ -591,8 +606,7 @@ export default { const { shallowRefArray: authorizations, doChangeArray: changeAuthorizations } = useArray(); const { refBoolean: isApplicationManager, doChangeBoolean: changeIsApplicationManager } = useBoolean(false); - const { refBoolean: isUserManager, doChangeBoolean: changeIsUserManager } = - useBoolean(false); + const { refBoolean: isUserManager, doChangeBoolean: changeIsUserManager } = useBoolean(false); const { refBoolean: isDragging } = useBoolean(false); const { refBoolean: isCardModalActive } = useBoolean(false); const { refBoolean: hasAuthorizationsByUsers } = useBoolean(false); @@ -732,11 +746,22 @@ export default { Object.values(authorizationForUser.authorizationResults || []).some((a) => a.admin) ); }*/ + let user = services.loginService.getAuthenticatedUser(); changeIsApplicationManager( - services.loginService.getAuthenticatedUser().isApplicationManager(application.id) + application?.currentApplicationUserRolesResult?.applicationRoles.includes( + "applicationManager" + ) || + user.currentUserRoles.memberOf.filter((role) => + role.includes(application.id + "_applicationManager") + ).length === 1 ); changeIsUserManager( - services.loginService.getAuthenticatedUser().isUserManager(application.id) + application?.currentApplicationUserRolesResult?.applicationRoles.includes( + "userManager" + ) || + user.currentUserRoles.memberOf.filter((role) => + role.includes(application.id + "_userManager") + ).length === 1 ); let localeListAllUsers = await services.authorizationService.getAuthorizationGrantableInfos( props.applicationName diff --git a/src/views/authorizations/RequestAuthorizationManagementView.vue b/src/views/authorizations/RequestAuthorizationManagementView.vue index 2f31c6a078ed157a35ec0e757c44a76876be6832..1c4d895052f5aeb4e2af64428ecb6f65d93e4c66 100644 --- a/src/views/authorizations/RequestAuthorizationManagementView.vue +++ b/src/views/authorizations/RequestAuthorizationManagementView.vue @@ -6,13 +6,15 @@ :root="application.localName || application.title" role="navigation" /> - <h1 class="title main-title"> - {{ - $t("titles.requestAuthorization", { + <TitleAndDescription + :application="application" + :localName="application.localName || application.title" + :local-title=" + $t('titles.requestAuthorization', { applicationName: application.localName || application.title, }) - }} - </h1> + " + /> <div> <b-table :data="listRightsRequests" @@ -52,6 +54,46 @@ </p> </template> </b-table-column> + <b-table-column :searchable="true" field="comment" label="Commentaire" sortable> + <template #searchable="props"> + <b-input + v-model="props.filters[props.column.field]" + :placeholder="$t('dataTypeAuthorizations.search')" + icon="search" + /> + </template> + <template v-slot="props"> + <a @click="manageRequest(props.row.id)" class="is-flex is-align-content-center"> + <b-icon icon="pen-square" size="is-small"></b-icon> + <span class="with-padding">{{ props.row.comment }}</span> + </a> + </template> + </b-table-column> + <b-table-column :searchable="true" field="createDate" label="Date de création" sortable> + <template #searchable="props"> + <b-input + v-model="props.filters[props.column.field]" + :placeholder="$t('dataTypeAuthorizations.search')" + icon="search" + /> + </template> + <template v-slot="props"> + {{ formatDate(props.row.createDate) }} + </template> + </b-table-column> + <b-table-column :searchable="true" field="updateDate" label="Date de création" sortable> + <template #searchable="props"> + <b-input + v-model="props.filters[props.column.field]" + :placeholder="$t('dataTypeAuthorizations.search')" + icon="search" + /> + </template> + <template v-slot="props"> + {{ formatDate(props.row.updateDate) }} + </template> + </b-table-column> + <!-- <b-table-column :searchable="true" field="number request" label="N° de la demande" sortable> <template #searchable="props"> <b-input @@ -66,6 +108,7 @@ </a> </template> </b-table-column> +--> <b-table-column :searchable="true" field="setted" label="Statut" sortable> <template #searchable> <b-select @@ -98,10 +141,12 @@ import app, { i18n } from "@/main"; import useObject from "@/composable/components/object"; import { onMounted, ref, watch } from "vue"; import useArray from "@/composable/components/array"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; export default { name: "RequestAuthorizationManagementView", components: { + TitleAndDescription, PageView, SubMenu, }, @@ -221,9 +266,8 @@ export default { changeListAllUsers(localeListAllUsers.users.filter((user) => user.label !== "_public_")); if (localRightsRequests.rightsRequests) { changeListRightsRequests(localRightsRequests.rightsRequests); - } else { - changeRightsRequests(localRightsRequests); } + changeRightsRequests(localRightsRequests); } catch (error) { services.alertService.toastServerError(error); } @@ -247,8 +291,13 @@ export default { function manageRequest(id) { app.$router.push(`/applications/${props.applicationName}/authorizationsRequest/${id}`); } + function formatDate(date) { + if (!date) return ""; + return moment(date).format("DD/MM/YYYY"); + } return { + formatDate, manageRequest, isVisibleRequest, getUserEmail, @@ -289,4 +338,7 @@ td { .listAuthorization:nth-child(odd) { background-color: #f5f5f5; } +.with-padding { + padding-left: 1em; +} </style> diff --git a/src/views/data/DataTableView.vue b/src/views/data/DataTableView.vue index cfe0c62420c5116f1f19a7e0fda1778c0425f974..c026cf64bfef7e34f551466498d79ee32064f291 100644 --- a/src/views/data/DataTableView.vue +++ b/src/views/data/DataTableView.vue @@ -6,10 +6,13 @@ :root="application.localName" role="navigation" /> - <h1 class="title main-title"> - {{ $t("titles.references-data", { refName: application.localRefName }) }} - </h1> - <div id="tagsCollapse" class="column"> + <TitleAndDescription + :application="application" + :local-title="$t('titles.references-data', { refName: application.localRefName })" + :localDescription="application.localRefDescription" + :localName="application.localRefName" + /> + <div id="tagsCollapsereal" class="column"> <TagsCollapse v-if="hasTags" :tags="tags" @@ -17,161 +20,201 @@ @change:allTags="changeAllValueTags($event)" /> </div> - <FiltersDataCollapse - :application="application" - :application-name="applicationName" - :columns-to-be-shown="dataColumnsToBeShown" - :data-id="dataId" - :is-ref-link-to="referenceTypeForReferencingColumns" - @view-search="recalculate($event)" - @download-search="recalculate($event, true)" - @clear-search="clear($event)" - /> - <LoadingAnimate v-if="isLoading" :size="'is-large'"></LoadingAnimate> - <div v-if="!onlyMetadata && data && dataColumnsToBeShown && !isLoading"> - <b-table - id="filtreTable" - :current-page="currentPage" - :data="rows" - :is-focusable="true" - :is-hoverable="true" - :per-page="params.limit" - :sticky-header="true" - pagination-position="both" - :height="tableHeight" - paginated - striped - style="padding-bottom: 20px; position: relative; z-index: 2" - > - <template #pagination> - <b-pagination - v-model="currentPage" - :aria-current-label="$t('menu.aria-curent-page')" - :aria-label="$t('menu.aria-pagination')" - :aria-next-label="$t('menu.aria-next-page')" - :aria-previous-label="$t('menu.aria-previous-page')" - :current-page.sync="currentPage" - :per-page="params.limit" - :rounded="true" - :total=" - totalRows ? totalRows : lineCountSynthesis(application.referenceSynthesis, dataId) - " - order="is-centered" - range-after="3" - range-before="3" - role="navigation" - @change="changePage" - style="margin: 0; padding-top: 20px; padding-bottom: 20px" - /> - </template> - <b-table-column - v-for="column in dataColumnsToBeShown" - :key="column.id" - :field="column.id" + <div v-if="state !== 'NO-RIGHTS'"> + <FiltersDataCollapse + :application="application" + :application-name="applicationName" + :columns-to-be-shown="dataColumnsForFilters" + :data-id="dataId" + :is-ref-link-to="referenceTypeForReferencingColumns" + @view-search="recalculate($event)" + @download-search="recalculate($event, true)" + @clear-search="clear($event)" + /> + <LoadingAnimate v-if="isLoading" :size="'is-large'"></LoadingAnimate> + <div v-if="data && dataColumnsToBeShown && !isLoading && totalRows > 0"> + <b-field v-if="canHorizontalize"> + <b-radio-button + v-model="horizontalDisplay" + :native-value="true" + type="is-dark" + @input="changeDisplay" + > + <b-icon icon="arrows-alt-h"></b-icon> + <span>{{ $t("dataTypesManagement.horizontalized") }}</span> + </b-radio-button> + <b-radio-button + v-model="horizontalDisplay" + :native-value="false" + type="is-dark" + @input="changeDisplay" + > + <b-icon icon="arrows-alt-v"></b-icon> + <span>{{ $t("dataTypesManagement.verticalized") }}</span> + </b-radio-button> + </b-field> + <b-table + id="filtreTable" + :current-page="currentPage" + :data="rows" + :height="tableHeight" + :is-focusable="true" + :is-hoverable="true" + :per-page="params.limit" + :sticky-header="true" + striped style="padding-bottom: 20px; position: relative; z-index: 2" - sortable > - <template v-slot:header> - <div v-if="column.tags" class="column" style="padding: 0"> - <TagsInfos - :info-parent="column" - :tags-column="Object.keys(tags).length !== 0 ? tags : {}" - > - </TagsInfos> - <DatasPatternLink - v-if="'PatternComponent' === column.type" - :info="column.type === 'PatternComponent'" - :application="application" - :value="column.getColumnQualifiersMap(application, dataId, rows[0])" - :column-id="column.id" - :column-title="column.id" - :info-values="column.getColumnQualifiersMap(application, dataId, rows[0])" - :loaded-references-by-key="{}" - :pattern-checker-date-ref="patternCheckerDateRef" - :data-id="dataId" - ></DatasPatternLink> - <div v-else> + <b-table-column + v-for="column in dataColumnsToBeShown" + :key="column.id" + :field="column.id" + sortable + style="padding-bottom: 20px; position: relative; z-index: 2" + > + <template v-slot:header> + <div v-if="column.tags" class="column" style="padding: 0"> + <TagsInfos + :info-parent="column" + :tags-column="Object.keys(tags).length !== 0 ? tags : {}" + > + </TagsInfos> + <DatasPatternLink + v-if="'PatternComponent' === column.type" + :application="application" + :column-id="column.id" + :column-title="column.id" + :data-id="dataId" + :info="column.type === 'PatternComponent'" + :info-values=" + column.getColumnQualifiersMap( + application, + column.horizontalDisplay ? dataId : column.componentKey, + rows[0] + ) + " + :loaded-references-by-key="{}" + :pattern-checker-date-ref="patternCheckerDateRef" + :value=" + column.getColumnQualifiersMap( + application, + column.horizontalDisplay ? dataId : column.componentKey, + rows[0] + ) + " + :with-qualifier="horizontalDisplay" + ></DatasPatternLink> + <div v-else-if="'patternQualifierComponent' === column.type"> + {{ column.getHeader(application, dataId) }} + </div> + <div v-else> + {{ column.getHeader(application, dataId) }} + </div> + </div> + <div v-else class="column"> {{ column.getHeader(application, dataId) }} + <DatasDynamicLink + v-if="'PatternComponent' === column.type" + :application="application" + :column-id="column.id" + :info="column.type === 'PatternComponent'" + :info-values="column.getColumnQualifiersMap(props)" + :loaded-references-by-key="{}" + :reference-type="column.referenceType" + ></DatasDynamicLink> </div> - </div> - <div v-else class="column"> - {{ column.getHeader(application, dataId) }} + </template> + <template v-slot="props"> <DatasDynamicLink - v-if="'PatternComponent' === column.type" + v-if="column.type === 'DynamicComponent'" :application="application" :column-id="column.id" - :info="column.type === 'PatternComponent'" - :info-values="column.getColumnQualifiersMap(props)" + :info="column.type === 'DynamicComponent'" + :info-values="props.row.values[column.id]" :loaded-references-by-key="{}" :reference-type="column.referenceType" ></DatasDynamicLink> - </div> - </template> - <template v-slot="props"> - <DatasDynamicLink - v-if="column.type === 'DynamicComponent'" - :application="application" - :column-id="column.id" - :info="column.type === 'DynamicComponent'" - :info-values="props.row.values[column.id]" - :loaded-references-by-key="{}" - :reference-type="column.referenceType" - ></DatasDynamicLink> - <DatasManyLink - v-else-if="column.multiplicity === MANY" - :application="application" - :column="column" - :column-id="column.id" - :component="props.row" - :info-values="props.row.values[column.id]" - :displays-for-row="props.row.displaysForRow" - :loaded-references-by-key="{}" - :multiplicity="multiplicity(column.id, props.row.values[column.id])" - :reference-type="addRefLinkedTo(column.id, column.linkedTo)" - ></DatasManyLink> - <DatasLink - v-else-if="column.id !== '#'" - :application="application" - :column-id="getRefColumnId(props.row, column)" - :column-title="getColumnNameView(column.id, application, dataId)" - :component="props.row" - :display-value="'' + column.getDisplayValue(props.row, column)" - :loaded-references-by-key="{}" - :pattern-checker-date="patternCheckerDateRef(application, column.title, dataId)" - :reference-type="column.refLinkedTo" - :value="'' + column.getColumnValue(props.row)" - ></DatasLink> - <div v-else class="columns"> - <a @click="askDeletionConfirmation(rows[tableValues.indexOf(props.row)]?.naturalKey)"> - <b-icon class="clickable" icon="times-circle" size="is-small" type="is-danger"> - </b-icon> - </a> - <b-collapse :open="false" class="column"> - <template #trigger> - <b-button - :label="'' + (tableValues.indexOf(props.row) + 1 + params.offset)" - aria-controls="contentIdForA11y1" - type="is-small" - /> - </template> - {{ rows[tableValues.indexOf(props.row)]?.naturalKey }} - </b-collapse> - </div> - </template> - </b-table-column> - </b-table> + <DatasManyLink + v-else-if="column.multiplicity === MANY" + :application="application" + :column="column" + :column-id="column.id" + :component="props.row" + :displays-for-row="props.row.displaysForRow" + :info-values="props.row.values[column.id]" + :loaded-references-by-key="{}" + :multiplicity="multiplicity(column.id, props.row.values[column.id])" + :reference-type="addRefLinkedTo(column.id, column.refLinkedTo)" + ></DatasManyLink> + <DatasLink + v-else-if="column.id !== '#'" + :application="application" + :column-id="getRefColumnId(props.row, column)" + :column-title="getColumnNameView(column.id, application, dataId, column)" + :component="props.row" + :display-value="'' + column.getDisplayValue(props.row, column)" + :loaded-references-by-key="{}" + :pattern-checker-date="patternCheckerDateRef(application, column.title, dataId)" + :reference-type="column.refLinkedTo" + :value="'' + column.getColumnValue(props.row)" + ></DatasLink> + <div v-else class="columns"> + <a + @click="askDeletionConfirmation(rows[tableValues.indexOf(props.row)]?.naturalKey)" + > + <b-icon class="clickable" icon="times-circle" size="is-small" type="is-danger"> + </b-icon> + </a> + <b-collapse :open="false" class="column"> + <template #trigger> + <b-button + :label="'' + (tableValues.indexOf(props.row) + 1 + params.offset)" + aria-controls="contentIdForA11y1" + type="is-small" + /> + </template> + {{ rows[tableValues.indexOf(props.row)]?.naturalKey }} + </b-collapse> + </div> + </template> + </b-table-column> + </b-table> + </div> + <div v-else> + <b-message :closable="false" has-icon size="is-medium" type="is-primary"> + {{ $tc("applications.register-rows", totalRows, { totalRows: totalRows }) }} + </b-message> + </div> + + <div class="buttons" style="margin-top: 16px"> + <!-- <b-button @click="loadExampleData">Afficher un exemple</b-button>--> + <b-button + icon-left="download" + style="margin-bottom: 15px; float: right" + type="is-primary" + @click.prevent="downloadResultSearch" + >{{ $t("dataTable.donwload-result") }} + </b-button> + </div> </div> - <div class="buttons" style="margin-top: 16px"> - <!-- <b-button @click="loadExampleData">Afficher un exemple</b-button>--> + <div v-else-if="state === 'NO-RIGHTS'"> + <b-message :closable="false" has-icon size="is-medium" type="is-danger"> + {{ $t("applications.no-right-for-application") }} + </b-message> <b-button - style="margin-bottom: 15px; float: right" + class="mt-3" type="is-primary" - icon-left="download" - @click.prevent="downloadResultSearch" - >{{ $t("dataTable.donwload-view-result") }} + @click="$router.push('../authorizationsRequest/new')" + > + {{ $t("dataTypeAuthorizations.request") }} </b-button> </div> + <div v-else> + <b-message :closable="false" has-icon size="is-medium" type="is-primary"> + {{ $tc("applications.register-rows", totalRows, { totalRows: totalRows }) }} + </b-message> + </div> </PageView> </template> @@ -200,9 +243,10 @@ import TagsInfos from "@/components/common/TagsInfos.vue"; import { Component } from "@/model/application/Component"; import { lineCountSynthesis } from "@/composable/application/synthesis"; import { dataLoader } from "@/composable/data/dataLoader"; -import { patternCheckerDateRef } from "@/composable/application/DatePattern"; +import { patternCheckerDateRef } from "@/composable/application/datePattern"; import DatasPatternLink from "@/components/datas/DatasPatternLink.vue"; import { Tag } from "@/model/application/Tag"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; export default { name: "DataTableView", @@ -211,6 +255,7 @@ export default { dataId: String, }, components: { + TitleAndDescription, DatasPatternLink, TagsInfos, FiltersDataCollapse, @@ -223,8 +268,10 @@ export default { DatasDynamicLink, }, setup(props) { - const onlyMetadata = ref(true); + const loadExample = ref(true); + const state = ref(""); // can or not load data const { reactiveObject: params } = useObject(new DownloadDatasetQuery(0, 10)); + const locale = services.internationalisationService.getLocale(); const loader = dataLoader(services); provide("reference:dataLoader", loader); const { getColumnNameView } = loader; @@ -232,6 +279,9 @@ export default { const { shallowRefArray: errorsMessages } = useArray(); const { refNumber: currentPage, doChangeNumber: changeCurrentPage } = useNumber(1); const { refBoolean: isLoading, doChangeBoolean: changeIsLoading } = useBoolean(); + const { refBoolean: horizontalDisplay, doChangeBoolean: changeHorizontalDisplay } = + useBoolean(); + const canHorizontalize = ref(false); const { reactiveObject: application, doChangeObject: changeApplication } = useObject( new ApplicationResult() ); @@ -242,7 +292,7 @@ export default { const { shallowRefArray: tableValues, doChangeArray: changeTableValues } = useArray(); const { shallowRefArray: tags, doChangeArray: _changeTags } = useArray(); const { shallowRefArray: filters, doAddToArray: pushFilters } = useArray(); - const { shallowRefArray: referenceTypeForReferencingColumns } = useArray(); + const { reactiveObject: referenceTypeForReferencingColumns } = useObject(); const { reactiveObject: referencesDynamic, doChangeObject: changeReferencesDynamic } = useObject(); const tableHeight = computed(() => { @@ -268,6 +318,33 @@ export default { return services.tagService.toBeShown(tags.value, realVariables.value); } }); + const dataColumnsForFilters = computed(() => { + let colomnsForFilters = columns.value.reduce((acc, column) => { + if (column.type === "PatternComponent") { + column.horizontalDisplay = false; + acc.push(column); + column + .getColumnQualifiersMap(application, null, rows.value[0]) + .forEach((qualifier) => acc.push(qualifier)); + } else if (column.type !== "PatternAdjacentComponent") { + acc.push(column); + } + return acc; + }, []); + let navigateurName = navigator.userAgent; + if (navigateurName.indexOf("Firefox") >= 1) { + return services.tagService.toBeShownDataColumns(tags.value, colomnsForFilters); + } else if (navigateurName.indexOf("Safari") >= 1 && navigateurName.indexOf("Chrome") >= 1) { + return services.tagService.toBeShown(tags.value, colomnsForFilters); + } else { + console.log( + "Votre navigateur n'est pas testé l'ordonnance des filtres est par défault", + navigateurName + ); + + return services.tagService.toBeShown(tags.value, colomnsForFilters); + } + }); const hasTags = useBoolean(false).refBoolean; const changeTags = function (tagsToChange) { @@ -299,18 +376,24 @@ export default { if (column.referenceType === "ReferenceChecker") { let refLinkedTo = column.refLinkedTo; let refLinkedToColumn = column.refLinkedToColumn; - let refsLinkedToElementElementElement = - row?.refsLinkedTo?.[refLinkedTo]?.[refLinkedToColumn]?.[0]; - /*if (!refsLinkedToElementElementElement) { - console.log("refsLinkedToElementElementElement", column); - }*/ + let refsLinkedToElementElementElement = row?.refsLinkedTo?.[refLinkedTo]; + if (refsLinkedToElementElementElement?.[refLinkedToColumn]) { + refsLinkedToElementElementElement = + refsLinkedToElementElementElement?.[refLinkedToColumn]?.[0]; + } else { + refLinkedToColumn = Object.keys(refsLinkedToElementElementElement || {}).find((key) => + key.match(".*::(.*)::.*") + ); + refsLinkedToElementElementElement = + refsLinkedToElementElementElement?.[refLinkedToColumn].hierarchicalKey.sql; + } return refsLinkedToElementElementElement; } } onMounted(async () => { await init(); - await setInitialVariables([]); + //await setInitialVariables([]); let dataIsType = application.dataTypes[props.dataId] ? "dataTypes" : "references"; changeSubMenuPaths([ new SubMenuPath( @@ -344,33 +427,41 @@ export default { ); changeApplication({ ...services.internationalisationService.mergeInternationalization(application), - localRefName: services.internationalisationService.localeReferenceNames( - props.dataId, - application - ), + localRefName: application?.configuration?.i18n?.data[props.dataId]?.i18n?.title[locale] || props.dataId, + localRefDescription: + application.configuration?.i18n?.data[props.dataId]?.i18n?.description[locale] || props.dataId, }); + totalRows.value = + application.referenceSynthesis.find( + (synthesis) => synthesis.referenceType === props.dataId + )?.lineCount || 0; const data = await services.dataService.getData( props.applicationName, props.dataId, { + horizontalDisplay: horizontalDisplay.value, offset: params.offset, limit: params.limit, }, - onlyMetadata.value + loadExample.value ); + + canHorizontalize.value = data.patternDefinitionCount >= 1; + changeHorizontalDisplay(data.patternDefinitionCount > 1); if (data) { - let dataValues = data.rows; - totalRows.value = data.totalRows; - changeRows(dataValues); + //let dataValues = data.rows; + //totalRows.value = data.totalRows; + //changeRows(dataValues); if (Object.keys(data?.referenceTypeForReferencingColumns).length > 0) { for (let key in data.referenceTypeForReferencingColumns) { - referenceTypeForReferencingColumns.value[key] = + referenceTypeForReferencingColumns[key] = data.referenceTypeForReferencingColumns[key]; } } } + await updateData({ filters: [] }, data, false, totalRows); } catch (error) { - services.alertService.toastServerError(); + services.alertService.toastServerError(error, state); } changeIsLoading(false); } @@ -378,12 +469,20 @@ export default { const realVariables = computed(() => { return columns.value.reduce((acc, column) => { if (column.type === "PatternComponent") { - let row = rows.value[0]; - row.values[column.id] - .map((value) => column.componentsForValue(value, row)) - .forEach((col) => { - col.forEach((col2) => acc.push(col2)); - }); + if (horizontalDisplay.value) { + let row = rows.value[0]; + row.values[column.id] + .map((value) => column.componentsForValue(value, row)) + .forEach((col) => { + col.forEach((col2) => acc.push(col2)); + }); + } else { + column.horizontalDisplay = false; + acc.push(column); + column + .getColumnQualifiersMap(application, null, rows.value[0]) + .forEach((qualifier) => acc.push(qualifier)); + } } else if (column.type !== "PatternAdjacentComponent") { acc.push(column); } @@ -474,38 +573,44 @@ export default { } async function recalculate(event, shouldDownload) { - onlyMetadata.value = false; + loadExample.value = false; changeIsLoading(true); changeCurrentPage(1); let limit = params.limit; params.limit = null; - params.componentFilters = event.filters.filter((v) => v !== undefined); + params.componentFilters = event?.filters + ? event.filters.filter((v) => v !== undefined) + : params.componentFilters; let tableValue = await services.dataService.getData( props.applicationName, props.dataId, params.valueOf() ); + await updateData(event, tableValue, shouldDownload, limit); + } + + async function updateData(event, tableValue, shouldDownload, limit) { changeRows(tableValue.rows); let variables = tableValue.variables; - totalRows.value = tableValue.totalRows; - pushFilters(event.filters.filter((v) => v !== undefined)); + //totalRows.value = tableValue.totalRows; + pushFilters(event ? event.filters.filter((v) => v !== undefined) : {}); await setInitialVariables(variables); changeIsLoading(false); - this.$forceUpdate(); + this?.$forceUpdate && this.$forceUpdate(); params.limit = limit; if (shouldDownload) { downloadResultSearch(); } } - function addRefLinkedTo(idColumn, linkedTo) { - if (linkedTo === null) { + function addRefLinkedTo(idColumn, refLinkedTo) { + if (refLinkedTo === null) { for (let key in referenceTypeForReferencingColumns.value) { if (key === idColumn && referenceTypeForReferencingColumns.value[key]) { return referenceTypeForReferencingColumns.value[key]; } } - } else return linkedTo; + } else return refLinkedTo; } function askDeletionConfirmation(rowId) { @@ -538,7 +643,7 @@ export default { if (filters.value.length === 0) { params.offset = (value - 1) * params.limit; datas = await services.dataService.getData(props.applicationName, props.dataId, params); - totalRows.value = data.totalRows; + //totalRows.value = data.totalRows; if (datas) { changeRows(datas.rows); } @@ -573,7 +678,7 @@ export default { } async function downloadResultSearch() { - onlyMetadata.value = false; + loadExample.value = false; let limit = params.limit; params.limit = null; let zipFileUrl = await services.dataService.getDataZip( @@ -593,13 +698,21 @@ export default { const ONE = Component.MULTIPLICITY_ONE; async function showModal() { - console.log()("coucu"); + console.log("coucou"); + } + + async function changeDisplay(event) { + params.horizontalDisplay = horizontalDisplay.value; + recalculate(); + console.log("changeDisplay", event, horizontalDisplay.value); } return { + changeDisplay, + state, showModal, realVariables, - onlyMetadata, + loadExample, addRefLinkedTo, recalculate, askDeletionConfirmation, @@ -624,6 +737,7 @@ export default { application, data, dataColumnsToBeShown, + dataColumnsForFilters, filters, MANY, ONE, @@ -634,6 +748,9 @@ export default { patternCheckerDateRef, totalRows, tableHeight, + loader, + canHorizontalize, + horizontalDisplay, }; }, }; diff --git a/src/views/data/DataVersioningView.vue b/src/views/data/DataVersioningView.vue index 3d0fc6c49cb16c7243524ec5778a9c334a16c197..228101dcb1db765175706ff501be9c2cc5a5c883 100644 --- a/src/views/data/DataVersioningView.vue +++ b/src/views/data/DataVersioningView.vue @@ -1,19 +1,22 @@ <template> <div> - <PageView class="with-submenu" :application="application"> + <PageView :application="application" class="with-submenu"> <SubMenu :aria-label="$t('menu.aria-sub-menu')" :paths="subMenuPaths" :root="application.localName || application.title" role="navigation" /> - <h1 class="title main-title"> - {{ - $t("titles.data-types-repository", { - applicationName: application.localName || dataId, + <TitleAndDescription + :application="application" + :localDescription="application.localDatatypeDescription" + :localName="application.localDatatypeName" + :local-title=" + $t('titles.data-types-repository', { + dataName: application.localDatatypeName || dataId, }) - }} - </h1> + " + /> <div class="columns"> <b-field v-for="(referenceScopesByData, index) in referenceScopes[dataId]" @@ -23,6 +26,7 @@ > <b-dropdown :ref="referenceScopesByData.id" + :id="referenceScopesByData.id" expanded max-height="500" scrollable @@ -31,21 +35,21 @@ <template #trigger="{ active }"> <b-taginput v-model="requiredAuthorizationsLabels[referenceScopesByData.id]" - :icon-right="active ? 'angle-up' : 'angle-down'" - open-on-focus - rounded - type="is-dark" - :closable="false" :aria-placeholder=" $t('dataTypesRepository.placeholder-select-scope-depot', { scope: referenceScopesByData.i18n[locale] || referenceScopesByData.id, }) " + :closable="false" + :icon-right="active ? 'angle-up' : 'angle-down'" :placeholder=" $t('dataTypesRepository.placeholder-select-scope-depot', { scope: referenceScopesByData.i18n[locale] || referenceScopesByData.id, }) " + open-on-focus + rounded + type="is-dark" > </b-taginput> </template> @@ -54,6 +58,8 @@ :id="option.id" :key="optionKey" :option="option" + :list-select="requiredAuthorizationsLabels[referenceScopesByData.id]" + :id-reference-scope="referenceScopesByData.id" @select-menu-item="selectAuthorization($event.type, $event)" ></CollapseMenuOneSelect> </b-dropdown> @@ -84,11 +90,11 @@ label-position="on-border" > <InputDate - :input-type="determinateInputType()" :format="patternDateTimeScope" - name="startDate" - :is-simple-value="true" :from="startDate" + :input-type="determinateInputType()" + :is-simple-value="true" + name="startDate" @update:dateValue="updateDate($event)" > </InputDate> @@ -102,11 +108,11 @@ label-position="on-border" > <InputDate - :input-type="determinateInputType()" :format="patternDateTimeScope" - name="endDate" - :is-simple-value="true" :from="endDate" + :input-type="determinateInputType()" + :is-simple-value="true" + name="endDate" @update:dateValue="updateDate($event)" > </InputDate> @@ -325,7 +331,7 @@ import useBoolean from "@/composable/components/boolean"; import services from "@/composable/services"; import { onMounted, provide, ref } from "vue"; import app, { i18n } from "@/main"; -import { datePatternLang } from "@/composable/application/DatePattern"; +import { datePatternLang } from "@/composable/application/datePattern"; import { BinaryFile } from "@/model/file/BinaryFile"; import { Dataset } from "@/model/file/Dataset"; import InputDate from "@/components/common/provider/InputDate.vue"; @@ -333,6 +339,7 @@ import ShowErrors from "@/components/application/ShowErrors.vue"; import { dataLoader } from "@/composable/data/dataLoader"; import { ReferenceScope } from "@/model/authorization/ReferenceScope"; import CollapseMenuOneSelect from "@/components/common/CollapseMenuOneSelect.vue"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; export default { name: "DataVersioningView", @@ -346,6 +353,7 @@ export default { }, }, components: { + TitleAndDescription, CollapseMenuOneSelect, ShowErrors, InputDate, @@ -420,7 +428,7 @@ export default { await init(); changeSubMenuPaths([ new SubMenuPath( - props.dataId.toLowerCase(), + application.localDatatypeName.toLowerCase() || props.dataId.toLowerCase(), () => {}, () => app.$router.push(`/applications/${props.applicationName}/dataTypes`) ), @@ -527,10 +535,9 @@ export default { componentNameTimeScope = versioning?.submissionScope?.timescope?.component; changeApplication({ ...services.internationalisationService.mergeInternationalization(application), - localDatatypeName: services.internationalisationService.localeDataTypeIdName( - application, - application.dataTypes[props.dataId] - ), + localDatatypeName: application.configuration.i18n.data[props.dataId].i18n.title[locale], + localDatatypeDescription: + application.configuration.i18n.data[props.dataId].i18n.description[locale], }); changeConfiguration(application.configuration.dataDescription[props.dataId]); changeAuthorizations(configuration.submission.submissionScope); @@ -565,12 +572,12 @@ export default { } } if (reference !== "") { - refForAuth[reference] = await services.dataService.getData( - props.applicationName, - reference - ); + let ref = await services.dataService.getData(props.applicationName, reference); + loadedReferences[reference] = ref; + refForAuth[reference] = ref; changeReferenceScopes(refForAuth[reference].referenceScopes); } + sortedReferenceScope(referenceScopes); } } } @@ -598,6 +605,18 @@ export default { } } + function sortedReferenceScope(referenceScope) { + for (let i = 0; i < referenceScope[props.dataId].length; i++) { + if (Object.keys(referenceScope[props.dataId][i].nodes).length !== 0) { + referenceScope[props.dataId][i].nodes = Object.fromEntries( + Object.entries(referenceScope[props.dataId][i].nodes) + .sort(([, a], [, b]) => a.naturalKey.localeCompare(b.naturalKey)) + .map(([key, value], index) => [index, value, key]) + ); + } + } + } + function nameSelectedTagList(nameTagList) { return i18n.t("dataTypesManagement.selected_filter", { key: nameTagList }); } @@ -920,6 +939,7 @@ export default { } return returnValues; } + function internationalizeRequiredAuthorization(data, datasets) { const value = datasets?.datasets?.[0]?.params?.binaryFiledataset?.requiredAuthorizations?.[data]?.sql; @@ -992,6 +1012,7 @@ table.datasetsPanel td { border-collapse: collapse; text-align: center; } + .subtitle { font-style: italic; } diff --git a/src/views/data/DatasManagementView.vue b/src/views/data/DatasManagementView.vue index e71611387a62575ecb80194ec03cad36f65f0fcf..bc73506140da17eae32378ecc3892f49b586f3ba 100644 --- a/src/views/data/DatasManagementView.vue +++ b/src/views/data/DatasManagementView.vue @@ -1,33 +1,30 @@ <template> - <PageView class="with-submenu" :application="application"> + <PageView :application="application" class="with-submenu"> <SubMenu :aria-label="$t('menu.aria-sub-menu')" :paths="subMenuPaths" :root="application.localName || application.title" role="navigation" /> - <h1 class="title main-title"> - <b-tooltip :label="application.localDescription"> - {{ - type[type.length - 1] === "dataTypes" - ? $t("titles.data-types-page", { - applicationName: application.localName || application.title, - }) - : $t("titles.references-page", { - applicationName: application.localName || application.title, - }) - }} - </b-tooltip> - <b-tooltip :label="$t('dataTypesManagement.consult-authorization')" position="is-bottom"> - <b-button - icon-left="key" - type="is-warning" - @click="consultAuthorization" - outlined - rounded - /> - </b-tooltip> - </h1> + <TitleAndDescription + :application="application" + :local-title=" + type[type.length - 1] === 'dataTypes' + ? $t('titles.data-types-page', { + applicationName: application.localName || application.title, + }) + : $t('titles.references-page', { + applicationName: application.localName || application.title, + }) + " + :localDescription="application.localDescription" + :localName="application.localName" + :with-auth="true" + :can-create-application="canCreateApplication" + :can-manager-application="canManagerApplication" + :can-manager-user="canManagerUser" + :application-name="applicationName" + /> <div v-if="errorsMessages.length !== 0" style="margin: 10px"> <ShowErrors :errors-messages="errorsMessages" @@ -52,6 +49,7 @@ :application-name="applicationName" :application-title="$t('titles.references-page', { applicationName: applicationName })" :buttons="buttons(data)" + :build-button="buttons" :is-loading="isLineCountLoading" :is-uploading="isUploading" :level="0" @@ -60,10 +58,10 @@ :on-upload-cb=" withVersioning(data.id) ? null : (label, file) => uploadReferenceCsv(label, file) " - :repository="data.submission" - :repository-redirect="(label) => showVersioning(label)" :option="data" :reference-synthesis="application.referenceSynthesis" + :repository="data.submission" + :repository-redirect="(label) => showVersioning(label)" :show-empty="showInfoEmpty[data.id]" :tags="tags" class="liste" @@ -97,17 +95,19 @@ import useArray from "@/composable/components/array"; import useBoolean from "@/composable/components/boolean"; import useNumber from "@/composable/components/number"; import useObject from "@/composable/components/object"; -import { onMounted } from "vue"; +import { onMounted, nextTick } from "vue"; import services from "@/composable/services"; import { buildTags } from "@/composable/application/tags"; import { lineCountSynthesis } from "@/composable/application/synthesis"; import LoadingAnimate from "@/components/common/LoadingAnimate.vue"; import ShowErrors from "@/components/application/ShowErrors.vue"; import { Tag } from "@/model/application/Tag"; +import TitleAndDescription from "@/components/common/TitleAndDescription.vue"; export default { name: "DatasManagementView", components: { + TitleAndDescription, ShowErrors, LoadingAnimate, CollapsibleTree, @@ -140,6 +140,11 @@ export default { const { reactiveObject: application, doChangeObject: changeApplication } = useObject( new ApplicationResult() ); + const { refBoolean: canCreateApplication, doChangeBoolean: changeCanCreateApplication } = + useBoolean(false); + const { refBoolean: canManagerApplication, doChangeBoolean: changeCanManagerApplication } = + useBoolean(false); + const { refBoolean: canManagerUser, doChangeBoolean: changeCanManagerUser } = useBoolean(false); const type = window.location.href.split("/"); const hasTags = useBoolean(false).refBoolean; const changeTags = function (tagsToChange) { @@ -148,7 +153,16 @@ export default { tags && Object.keys(tags || {}).length !== 0 && !(Object.keys(tags || {}).length === 1 && Object.keys(tags).includes(Tag.NO_TAG_NAME)); - changeDatasToBeShown(services.tagService.toBeShown(tags, datas.value)); + let sortedData = application.configuration.hierarchicalNodes + .map((node) => node.nodeName) + .map((nodeName) => datas.value.find((data) => data.id === nodeName)) + .filter((node) => node) + .sort( + (a, b) => + application.orderedReferences.indexOf(a.id) - + application.orderedReferences.indexOf(b.id) + ); + changeDatasToBeShown(services.tagService.toBeShown(tags, sortedData)); }; function changeAllValueTags(allTags) { @@ -178,6 +192,23 @@ export default { ]); changeTags(buildTags(application, datas.value)); changeDatas(services.tagService.toBeShown(tags, datas.value)); + try { + changeCanCreateApplication( + application?.currentApplicationUserRolesResult?.isApplicationCreator + ? application?.currentApplicationUserRolesResult?.isApplicationCreator + : application?.currentApplicationUserRolesResult?.isOpenAdomAdmin + ); + changeCanManagerApplication( + application?.currentApplicationUserRolesResult?.applicationRoles.includes( + "applicationManager" + ) + ); + changeCanManagerUser( + application?.currentApplicationUserRolesResult?.applicationRoles.includes("userManager") + ); + } catch (error) { + console.log("missing admin application rights", error); + } }); function addAuthorizationToData(reference) { @@ -256,16 +287,21 @@ export default { (label) => consultReference(label), "is-dark", null, - !reference.canRead - ), + !( + reference.canRead && + (application.referenceSynthesis.find( + (synthesis) => synthesis.referenceType === reference.id + )?.lineCount || 0) > 0 + ) + ) /*, new Button( i18n.t("referencesManagement.download"), "download", (label) => downloadReference(label), null, null, - !reference.canDownload - ), + !reference.canDownload || !lineCount.value + )*/, ]; } @@ -282,7 +318,7 @@ export default { `/applications/${props.applicationName}/${type[type.length - 1]}/${ref.id}` ); } - } + } /* async function downloadReference(label) { const reference = findReferenceByLabel(label); @@ -296,7 +332,7 @@ export default { hiddenElement.click(); return false; } - } + }*/ async function uploadReferenceCsv(label, refFile) { changeIsLineCountLoading(true); @@ -311,12 +347,15 @@ export default { refFile ); let referenceSynthesis = result.referenceSynthesis; - changeApplication({ + let updatedApplication = { ...application, referenceSynthesis, - }); + }; + updatedApplication = new ApplicationResult(updatedApplication); + changeApplication(updatedApplication); services.alertService.toastSuccess(i18n.t("alert.reference-updated")); showInfoEmpty.value[referenceType] = { value: true }; + await nextTick(); } catch (errors) { await checkMessageErrors(errors); } @@ -356,6 +395,7 @@ export default { ) .find((t) => t); } + function withVersioning(dataId) { return !!( application.configuration.dataDescription[dataId]?.submission && @@ -373,6 +413,9 @@ export default { } return { + canCreateApplication, + canManagerApplication, + canManagerUser, openRefDetails, uploadReferenceCsv, changeTagSelected, @@ -405,4 +448,10 @@ export default { margin-bottom: 10px; border: 1px solid white; } + +.btn_auth_tooltip { + display: flex; + justify-content: center; + align-items: center; +} </style>