From 0e05ce6368e6de4d818404082a809232506e04c7 Mon Sep 17 00:00:00 2001 From: rodleyorosa Date: Thu, 28 Nov 2024 14:18:28 +0100 Subject: [PATCH] refactor: use upsertApp function of shell Refs: CO-1682 --- package-lock.json | 131 +++++++++++++++++++++++++++++++++++----- package.json | 2 +- src/app.tsx | 8 ++- src/carbonio-ui-commons | 2 +- 4 files changed, 126 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ac04a25..deb215bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@types/webpack": "^5.28.2", "@types/webpack-env": "^1.18.1", "@zextras/carbonio-design-system": "^8.1.0", - "@zextras/carbonio-shell-ui": "9.0.0", + "@zextras/carbonio-shell-ui": "devel", "@zextras/carbonio-ui-preview": "^3.1.0", "core-js": "^3.36.1", "date-arithmetic": "^4.1.0", @@ -4808,6 +4808,11 @@ "csstype": "^3.0.2" } }, + "node_modules/@types/stylis": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", + "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==" + }, "node_modules/@types/tough-cookie": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", @@ -5289,15 +5294,15 @@ } }, "node_modules/@zextras/carbonio-shell-ui": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@zextras/carbonio-shell-ui/-/carbonio-shell-ui-9.0.0.tgz", - "integrity": "sha512-GL3t4n0H19zMmN5idDRyfwbBJPjSYf13TxR16PLx6gi+lli0ME98HoZ/xsZX1v8U1HZ0z2wDs6Q/ZDEkgpoK3g==", + "version": "9.0.0-devel.1732702780906", + "resolved": "https://registry.npmjs.org/@zextras/carbonio-shell-ui/-/carbonio-shell-ui-9.0.0-devel.1732702780906.tgz", + "integrity": "sha512-JuX0KGiXsLGMixE9XqkG1I4Z47D2EKBihXOwD3x5cX2tsJmYegvlq1516ueNkLJ6vJX2WuN+xdL5PoAPD8B+uQ==", "dependencies": { "@fontsource/roboto": "^5.0.8", "@sentry/browser": "^7.103.0", "@tinymce/tinymce-react": "^4.3.2", - "@zextras/carbonio-design-system": "^8.1.0", - "@zextras/carbonio-ui-preview": "^3.1.0", + "@zextras/carbonio-design-system": "9.0.0-devel.2", + "@zextras/carbonio-ui-preview": "^3.1.0-devel.1", "darkreader": "^4.9.79", "history": "^5.3.0", "i18next": "^22.5.1", @@ -5310,7 +5315,7 @@ "react-i18next": "^12.3.1", "react-router-dom": "^5.3.4", "react-router-dom-v5-compat": "^6.28.0", - "styled-components": "^5.3.11", + "styled-components": "^6.1.13", "tinymce": "^6.8.4", "ua-parser-js": "^1.0.37", "zustand": "^4.5.1" @@ -5320,7 +5325,7 @@ "npm": "v10" }, "peerDependencies": { - "@zextras/carbonio-design-system": "^8.1.0", + "@zextras/carbonio-design-system": "9.1.0-devel.2", "@zextras/carbonio-ui-preview": "^3.1.0", "core-js": "^3.31.1", "lodash": "^4.17.21", @@ -5328,7 +5333,7 @@ "react-dom": "^18.3.1", "react-i18next": "^12.3.1", "react-router-dom": "^5.3.4", - "styled-components": "^5.3.11" + "styled-components": "^6.1.13" }, "peerDependenciesMeta": { "@zextras/carbonio-design-system": { @@ -5357,6 +5362,42 @@ } } }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/@emotion/is-prop-valid": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/@emotion/memoize": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/@zextras/carbonio-design-system": { + "version": "9.0.0-devel.2", + "resolved": "https://registry.npmjs.org/@zextras/carbonio-design-system/-/carbonio-design-system-9.0.0-devel.2.tgz", + "integrity": "sha512-WxQ4lPP7MO5Nyba7Ck+8N6XH52ZnsVzeY+Kf2JP1jKuw9xOgIkSy9PRyrNJLxuZdPMdZLlbbFycKzNcjH13QnQ==", + "dependencies": { + "@floating-ui/dom": "^1.6.11", + "core-js": "^3.38.1", + "darkreader": "^4.9.92", + "polished": "^4.3.1", + "react-datepicker": "^4.25.0" + }, + "peerDependencies": { + "lodash": "^4.17.21", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "styled-components": "^6.1.13" + } + }, "node_modules/@zextras/carbonio-shell-ui/node_modules/immer": { "version": "10.1.1", "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", @@ -5366,6 +5407,70 @@ "url": "https://opencollective.com/immer" } }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/styled-components": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.13.tgz", + "integrity": "sha512-M0+N2xSnAtwcVAQeFEsGWFFxXDftHUD7XrKla06QbpUMmbmtFBMMTcKWvFXtWxuD5qQkB8iU5gk6QASlx2ZRMw==", + "dependencies": { + "@emotion/is-prop-valid": "1.2.2", + "@emotion/unitless": "0.8.1", + "@types/stylis": "4.2.5", + "css-to-react-native": "3.2.0", + "csstype": "3.1.3", + "postcss": "8.4.38", + "shallowequal": "1.1.0", + "stylis": "4.3.2", + "tslib": "2.6.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/styled-components" + }, + "peerDependencies": { + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0" + } + }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/stylis": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", + "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==" + }, + "node_modules/@zextras/carbonio-shell-ui/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@zextras/carbonio-ui-configs": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@zextras/carbonio-ui-configs/-/carbonio-ui-configs-1.0.2.tgz", @@ -7927,9 +8032,9 @@ } }, "node_modules/darkreader": { - "version": "4.9.89", - "resolved": "https://registry.npmjs.org/darkreader/-/darkreader-4.9.89.tgz", - "integrity": "sha512-mO/HFu69+U1szlAfkhW+1P4IcSeNV9Su6JD3zTKFyg61b5GMWY70lkBimD4NEDpY6DJ4Ks9kFFpENeG/UcsKYw==", + "version": "4.9.96", + "resolved": "https://registry.npmjs.org/darkreader/-/darkreader-4.9.96.tgz", + "integrity": "sha512-zda3BfSF9KRNee59pWZBMeblay0THGFPob9gf2UeUes8mIMM+bHKg0EyPTcSgHholyBwRAmpRMosmPl34YAoaA==", "dependencies": { "malevic": "0.20.2" }, @@ -15004,7 +15109,6 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, "funding": [ { "type": "github", @@ -17695,7 +17799,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, "engines": { "node": ">=0.10.0" } diff --git a/package.json b/package.json index 1b037b66..1afb105a 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@types/webpack": "^5.28.2", "@types/webpack-env": "^1.18.1", "@zextras/carbonio-design-system": "^8.1.0", - "@zextras/carbonio-shell-ui": "9.0.0", + "@zextras/carbonio-shell-ui": "devel", "@zextras/carbonio-ui-preview": "^3.1.0", "core-js": "^3.36.1", "date-arithmetic": "^4.1.0", diff --git a/src/app.tsx b/src/app.tsx index dc67888a..48d6b8ca 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -18,7 +18,8 @@ import { registerFunctions, SearchViewProps, SecondaryBarComponentProps, - NewAction + NewAction, + upsertApp } from '@zextras/carbonio-shell-ui'; import { AnyFunction } from '@zextras/carbonio-shell-ui/lib/utils/typeUtils'; import { map } from 'lodash'; @@ -143,6 +144,11 @@ const AppRegistrations = (): null => { id: CALENDAR_BOARD_ID, component: EditorView }); + + upsertApp({ + name: CALENDAR_APP_ID, + display: appLabel + }); }, [t]); const newAction = useMemo( diff --git a/src/carbonio-ui-commons b/src/carbonio-ui-commons index 72c74b0f..f5a9b7f5 160000 --- a/src/carbonio-ui-commons +++ b/src/carbonio-ui-commons @@ -1 +1 @@ -Subproject commit 72c74b0fb9f8ae52ee7459331989f60cf397d77a +Subproject commit f5a9b7f56d162e160b5cc74469a2924490f507fb