From 762429644f7428af4696866a8376bdbe58b31a4d Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Fri, 9 Feb 2024 11:46:55 +0100 Subject: [PATCH 01/13] Update dependencies in package.json and pnpm-lock.yaml --- package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 3fcb6eb..3539caa 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,6 @@ "@types/react-dom": "^18.2.19", "@vitejs/plugin-react-swc": "^3.6.0", "typescript": "^5.3.3", - "vite": "^5.1.0" + "vite": "^5.1.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5582967..43c0925 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,13 +123,13 @@ devDependencies: version: 18.2.19 '@vitejs/plugin-react-swc': specifier: ^3.6.0 - version: 3.6.0(vite@5.1.0) + version: 3.6.0(vite@5.1.1) typescript: specifier: ^5.3.3 version: 5.3.3 vite: - specifier: ^5.1.0 - version: 5.1.0 + specifier: ^5.1.1 + version: 5.1.1 packages: @@ -2348,13 +2348,13 @@ packages: /@types/scheduler@0.16.8: resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} - /@vitejs/plugin-react-swc@3.6.0(vite@5.1.0): + /@vitejs/plugin-react-swc@3.6.0(vite@5.1.1): resolution: {integrity: sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==} peerDependencies: vite: ^4 || ^5 dependencies: '@swc/core': 1.4.0 - vite: 5.1.0 + vite: 5.1.1 transitivePeerDependencies: - '@swc/helpers' dev: true @@ -3668,8 +3668,8 @@ packages: engines: {node: '>= 0.8'} dev: false - /vite@5.1.0: - resolution: {integrity: sha512-STmSFzhY4ljuhz14bg9LkMTk3d98IO6DIArnTY6MeBwiD1Za2StcQtz7fzOUnRCqrHSD5+OS2reg4HOz1eoLnw==} + /vite@5.1.1: + resolution: {integrity: sha512-wclpAgY3F1tR7t9LL5CcHC41YPkQIpKUGeIuT8MdNwNZr6OqOTLs7JX5vIHAtzqLWXts0T+GDrh9pN2arneKqg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: From eb85398d134d4681b3f05cb313b1a792587d2d84 Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:57:06 +0100 Subject: [PATCH 02/13] Update package.json and vite.config.ts --- package.json | 2 +- pnpm-lock.yaml | 168 ++++++++++++++++++++++++------------------------- vite.config.ts | 35 +++++++++-- 3 files changed, 115 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 3539caa..d36cb64 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@azure/msal-react": "^2.0.11", "@fluentui/react-components": "^9.46.4", "@fluentui/react-hooks": "^8.6.36", - "@fluentui/react-icons": "^2.0.226", + "@fluentui/react-icons": "^2.0.227", "@griffel/react": "^1.5.20", "@lexical/clipboard": "0.10.0", "@lexical/code": "0.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 43c0925..c52c18a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ dependencies: specifier: ^8.6.36 version: 8.6.36(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-icons': - specifier: ^2.0.226 - version: 2.0.226(react@18.2.0) + specifier: ^2.0.227 + version: 2.0.227(react@18.2.0) '@griffel/react': specifier: ^1.5.20 version: 1.5.20(react@18.2.0) @@ -55,7 +55,7 @@ dependencies: version: 0.10.0(lexical@0.10.0) '@lexical/react': specifier: 0.10.0 - version: 0.10.0(lexical@0.10.0)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.11) + version: 0.10.0(lexical@0.10.0)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.12) '@lexical/rich-text': specifier: 0.10.0 version: 0.10.0(@lexical/clipboard@0.10.0)(@lexical/selection@0.10.0)(@lexical/utils@0.10.0)(lexical@0.10.0) @@ -385,16 +385,16 @@ packages: '@floating-ui/utils': 0.2.1 dev: false - /@floating-ui/devtools@0.2.1(@floating-ui/dom@1.6.1): + /@floating-ui/devtools@0.2.1(@floating-ui/dom@1.6.3): resolution: {integrity: sha512-8PHJLbD6VhBh+LJ1uty/Bz30qs02NXCE5u8WpOhSewlYXUWl03GNXknr9AS2yaAWJEQaY27x7eByJs44gODBcw==} peerDependencies: '@floating-ui/dom': '>=1.5.4' dependencies: - '@floating-ui/dom': 1.6.1 + '@floating-ui/dom': 1.6.3 dev: false - /@floating-ui/dom@1.6.1: - resolution: {integrity: sha512-iA8qE43/H5iGozC3W0YSnVSW42Vh522yyM1gj+BqRwVsTNOyr231PsXDaV04yT39PsO0QL2QpbI/M0ZaLUQgRQ==} + /@floating-ui/dom@1.6.3: + resolution: {integrity: sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==} dependencies: '@floating-ui/core': 1.6.0 '@floating-ui/utils': 0.2.1 @@ -441,7 +441,7 @@ packages: dependencies: '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-tabster': 9.19.0(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -466,7 +466,7 @@ packages: dependencies: '@fluentui/react-avatar': 9.6.14(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-button': 9.3.68(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-tabster': 9.19.0(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-theme': 9.1.16 @@ -512,7 +512,7 @@ packages: dependencies: '@fluentui/react-badge': 9.2.24(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-popover': 9.8.38(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -537,7 +537,7 @@ packages: react: '>=16.14.0 <19.0.0' react-dom: '>=16.14.0 <19.0.0' dependencies: - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-theme': 9.1.16 @@ -560,7 +560,7 @@ packages: dependencies: '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-button': 9.3.68(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-link': 9.2.10(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -585,7 +585,7 @@ packages: dependencies: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-tabster': 9.19.0(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -629,7 +629,7 @@ packages: react-dom: '>=16.14.0 <19.0.0' dependencies: '@fluentui/react-field': 9.1.53(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-label': 9.1.61(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -658,7 +658,7 @@ packages: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-field': 9.1.53(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-portal': 9.4.13(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-positioning': 9.13.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -772,7 +772,7 @@ packages: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-portal': 9.4.13(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -844,7 +844,7 @@ packages: react-dom: '>=16.14.0 <19.0.0' dependencies: '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-label': 9.1.61(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-theme': 9.1.16 @@ -873,8 +873,8 @@ packages: tslib: 2.6.2 dev: false - /@fluentui/react-icons@2.0.226(react@18.2.0): - resolution: {integrity: sha512-OF2m1plWQnvvgXqdBTAIe+S7juC1fp2fnO3kMzIFH0c6doXMegNL6brD3mIDPk+JPIaZTAmWsDHTlIV10FyvHA==} + /@fluentui/react-icons@2.0.227(react@18.2.0): + resolution: {integrity: sha512-KcuzBJvf1LL1YW7XBg7Y4RoCpFMUU2br9BPqwN5gZDKALHQF9RdHPtwdGTzxKsHacOTpHnNDQrbDW+NvxiEMVQ==} peerDependencies: react: '>=16.8.0 <19.0.0' dependencies: @@ -911,7 +911,7 @@ packages: react: '>=16.14.0 <19.0.0' react-dom: '>=16.14.0 <19.0.0' dependencies: - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-label': 9.1.61(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-popover': 9.8.38(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) @@ -936,7 +936,7 @@ packages: react: '>=16.8.0 <19.0.0' react-dom: '>=16.8.0 <19.0.0' dependencies: - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-label': 9.1.61(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-popover': 9.8.38(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) @@ -1043,7 +1043,7 @@ packages: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-portal': 9.4.13(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-positioning': 9.13.3(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -1069,7 +1069,7 @@ packages: react-dom: '>=16.8.0 <19.0.0' dependencies: '@fluentui/react-button': 9.3.68(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-theme': 9.1.16 @@ -1205,8 +1205,8 @@ packages: react: '>=16.14.0 <19.0.0' react-dom: '>=16.14.0 <19.0.0' dependencies: - '@floating-ui/devtools': 0.2.1(@floating-ui/dom@1.6.1) - '@floating-ui/dom': 1.6.1 + '@floating-ui/devtools': 0.2.1(@floating-ui/dom@1.6.3) + '@floating-ui/dom': 1.6.3 '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-theme': 9.1.16 '@fluentui/react-utilities': 9.18.0(@types/react@18.2.55)(react@18.2.0) @@ -1249,7 +1249,7 @@ packages: react: '>=16.14.0 <19.0.0' react-dom: '>=16.14.0 <19.0.0' dependencies: - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-tabster': 9.19.0(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -1298,7 +1298,7 @@ packages: react-dom: '>=16.14.0 <19.0.0' dependencies: '@fluentui/react-field': 9.1.53(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-theme': 9.1.16 @@ -1382,7 +1382,7 @@ packages: dependencies: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-field': 9.1.53(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-theme': 9.1.16 @@ -1427,7 +1427,7 @@ packages: react-dom: '>=16.14.0 <19.0.0' dependencies: '@fluentui/react-field': 9.1.53(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-label': 9.1.61(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -1457,7 +1457,7 @@ packages: '@fluentui/react-avatar': 9.6.14(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-checkbox': 9.2.12(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-radio': 9.2.7(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -1530,7 +1530,7 @@ packages: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-avatar': 9.6.14(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-tabster': 9.19.0(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) @@ -1606,7 +1606,7 @@ packages: dependencies: '@fluentui/keyboard-keys': 9.0.7 '@fluentui/react-aria': 9.8.2(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-portal': 9.4.13(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -1687,7 +1687,7 @@ packages: '@fluentui/react-button': 9.3.68(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0) '@fluentui/react-checkbox': 9.2.12(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-context-selector': 9.1.51(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) - '@fluentui/react-icons': 2.0.226(react@18.2.0) + '@fluentui/react-icons': 2.0.227(react@18.2.0) '@fluentui/react-jsx-runtime': 9.0.29(@types/react@18.2.55)(react@18.2.0) '@fluentui/react-radio': 9.2.7(@types/react-dom@18.2.19)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(scheduler@0.20.2) '@fluentui/react-shared-contexts': 9.14.0(@types/react@18.2.55)(react@18.2.0) @@ -1940,7 +1940,7 @@ packages: lexical: 0.10.0 dev: false - /@lexical/react@0.10.0(lexical@0.10.0)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.11): + /@lexical/react@0.10.0(lexical@0.10.0)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.12): resolution: {integrity: sha512-7Ql/Y3FZSsPSCObT58CYRUd4tQzKL2U8B1xO0KXZBUbj+sO6gpNbc7/Y7MiZwCQzVNwP84j7mwkXQ1EnUBS52A==} peerDependencies: lexical: 0.10.0 @@ -1963,7 +1963,7 @@ packages: '@lexical/table': 0.10.0(lexical@0.10.0) '@lexical/text': 0.10.0(lexical@0.10.0) '@lexical/utils': 0.10.0(lexical@0.10.0) - '@lexical/yjs': 0.10.0(lexical@0.10.0)(yjs@13.6.11) + '@lexical/yjs': 0.10.0(lexical@0.10.0)(yjs@13.6.12) lexical: 0.10.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2022,7 +2022,7 @@ packages: lexical: 0.10.0 dev: false - /@lexical/yjs@0.10.0(lexical@0.10.0)(yjs@13.6.11): + /@lexical/yjs@0.10.0(lexical@0.10.0)(yjs@13.6.12): resolution: {integrity: sha512-OV5yLl4XjfDKgRPSb1EyefU7c+MILKZrOzbPlv2xeTgIEd/sJiEszxvJlYsngLLN65wBDNKk90EcCWpH3KLz7A==} peerDependencies: lexical: 0.10.0 @@ -2030,7 +2030,7 @@ packages: dependencies: '@lexical/offset': 0.10.0(lexical@0.10.0) lexical: 0.10.0 - yjs: 13.6.11 + yjs: 13.6.12 dev: false /@microsoft/signalr-protocol-msgpack@8.0.0: @@ -2063,104 +2063,104 @@ packages: engines: {node: '>= 10'} dev: false - /@rollup/rollup-android-arm-eabi@4.9.6: - resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} + /@rollup/rollup-android-arm-eabi@4.10.0: + resolution: {integrity: sha512-/MeDQmcD96nVoRumKUljsYOLqfv1YFJps+0pTrb2Z9Nl/w5qNUysMaWQsrd1mvAlNT4yza1iVyIu4Q4AgF6V3A==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.9.6: - resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==} + /@rollup/rollup-android-arm64@4.10.0: + resolution: {integrity: sha512-lvu0jK97mZDJdpZKDnZI93I0Om8lSDaiPx3OiCk0RXn3E8CMPJNS/wxjAvSJJzhhZpfjXsjLWL8LnS6qET4VNQ==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.9.6: - resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==} + /@rollup/rollup-darwin-arm64@4.10.0: + resolution: {integrity: sha512-uFpayx8I8tyOvDkD7X6n0PriDRWxcqEjqgtlxnUA/G9oS93ur9aZ8c8BEpzFmsed1TH5WZNG5IONB8IiW90TQg==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.9.6: - resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==} + /@rollup/rollup-darwin-x64@4.10.0: + resolution: {integrity: sha512-nIdCX03qFKoR/MwQegQBK+qZoSpO3LESurVAC6s6jazLA1Mpmgzo3Nj3H1vydXp/JM29bkCiuF7tDuToj4+U9Q==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.9.6: - resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==} + /@rollup/rollup-linux-arm-gnueabihf@4.10.0: + resolution: {integrity: sha512-Fz7a+y5sYhYZMQFRkOyCs4PLhICAnxRX/GnWYReaAoruUzuRtcf+Qnw+T0CoAWbHCuz2gBUwmWnUgQ67fb3FYw==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.9.6: - resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==} + /@rollup/rollup-linux-arm64-gnu@4.10.0: + resolution: {integrity: sha512-yPtF9jIix88orwfTi0lJiqINnlWo6p93MtZEoaehZnmCzEmLL0eqjA3eGVeyQhMtxdV+Mlsgfwhh0+M/k1/V7Q==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.9.6: - resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==} + /@rollup/rollup-linux-arm64-musl@4.10.0: + resolution: {integrity: sha512-9GW9yA30ib+vfFiwjX+N7PnjTnCMiUffhWj4vkG4ukYv1kJ4T9gHNg8zw+ChsOccM27G9yXrEtMScf1LaCuoWQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.9.6: - resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==} + /@rollup/rollup-linux-riscv64-gnu@4.10.0: + resolution: {integrity: sha512-X1ES+V4bMq2ws5fF4zHornxebNxMXye0ZZjUrzOrf7UMx1d6wMQtfcchZ8SqUnQPPHdOyOLW6fTcUiFgHFadRA==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.9.6: - resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==} + /@rollup/rollup-linux-x64-gnu@4.10.0: + resolution: {integrity: sha512-w/5OpT2EnI/Xvypw4FIhV34jmNqU5PZjZue2l2Y3ty1Ootm3SqhI+AmfhlUYGBTd9JnpneZCDnt3uNOiOBkMyw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.9.6: - resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==} + /@rollup/rollup-linux-x64-musl@4.10.0: + resolution: {integrity: sha512-q/meftEe3QlwQiGYxD9rWwB21DoKQ9Q8wA40of/of6yGHhZuGfZO0c3WYkN9dNlopHlNT3mf5BPsUSxoPuVQaw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.9.6: - resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==} + /@rollup/rollup-win32-arm64-msvc@4.10.0: + resolution: {integrity: sha512-NrR6667wlUfP0BHaEIKgYM/2va+Oj+RjZSASbBMnszM9k+1AmliRjHc3lJIiOehtSSjqYiO7R6KLNrWOX+YNSQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.9.6: - resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==} + /@rollup/rollup-win32-ia32-msvc@4.10.0: + resolution: {integrity: sha512-FV0Tpt84LPYDduIDcXvEC7HKtyXxdvhdAOvOeWMWbQNulxViH2O07QXkT/FffX4FqEI02jEbCJbr+YcuKdyyMg==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.9.6: - resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==} + /@rollup/rollup-win32-x64-msvc@4.10.0: + resolution: {integrity: sha512-OZoJd+o5TaTSQeFFQ6WjFCiltiYVjIdsXxwu/XZ8qRpsvMQr4UsVrE5UyT9RIvsnuF47DqkJKhhVZ2Q9YW9IpQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -2831,7 +2831,7 @@ packages: function-bind: 1.1.2 has-proto: 1.0.1 has-symbols: 1.0.3 - hasown: 2.0.0 + hasown: 2.0.1 dev: false /glob-parent@5.1.2: @@ -2878,8 +2878,8 @@ packages: engines: {node: '>= 0.4'} dev: false - /hasown@2.0.0: - resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + /hasown@2.0.1: + resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 @@ -3378,26 +3378,26 @@ packages: glob: 7.2.3 dev: false - /rollup@4.9.6: - resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==} + /rollup@4.10.0: + resolution: {integrity: sha512-t2v9G2AKxcQ8yrG+WGxctBes1AomT0M4ND7jTFBCVPXQ/WFTvNSefIrNSmLKhIKBrvN8SG+CZslimJcT3W2u2g==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.6 - '@rollup/rollup-android-arm64': 4.9.6 - '@rollup/rollup-darwin-arm64': 4.9.6 - '@rollup/rollup-darwin-x64': 4.9.6 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 - '@rollup/rollup-linux-arm64-gnu': 4.9.6 - '@rollup/rollup-linux-arm64-musl': 4.9.6 - '@rollup/rollup-linux-riscv64-gnu': 4.9.6 - '@rollup/rollup-linux-x64-gnu': 4.9.6 - '@rollup/rollup-linux-x64-musl': 4.9.6 - '@rollup/rollup-win32-arm64-msvc': 4.9.6 - '@rollup/rollup-win32-ia32-msvc': 4.9.6 - '@rollup/rollup-win32-x64-msvc': 4.9.6 + '@rollup/rollup-android-arm-eabi': 4.10.0 + '@rollup/rollup-android-arm64': 4.10.0 + '@rollup/rollup-darwin-arm64': 4.10.0 + '@rollup/rollup-darwin-x64': 4.10.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.10.0 + '@rollup/rollup-linux-arm64-gnu': 4.10.0 + '@rollup/rollup-linux-arm64-musl': 4.10.0 + '@rollup/rollup-linux-riscv64-gnu': 4.10.0 + '@rollup/rollup-linux-x64-gnu': 4.10.0 + '@rollup/rollup-linux-x64-musl': 4.10.0 + '@rollup/rollup-win32-arm64-msvc': 4.10.0 + '@rollup/rollup-win32-ia32-msvc': 4.10.0 + '@rollup/rollup-win32-x64-msvc': 4.10.0 fsevents: 2.3.3 dev: true @@ -3698,7 +3698,7 @@ packages: dependencies: esbuild: 0.19.12 postcss: 8.4.35 - rollup: 4.9.6 + rollup: 4.10.0 optionalDependencies: fsevents: 2.3.3 dev: true @@ -3781,8 +3781,8 @@ packages: yargs-parser: 20.2.9 dev: false - /yjs@13.6.11: - resolution: {integrity: sha512-FvRRJKX9u270dOLkllGF/UDCWwmIv2Z+ucM4v1QO1TuxdmoiMnSUXH1HAcOKOrkBEhQtPTkxep7tD2DrQB+l0g==} + /yjs@13.6.12: + resolution: {integrity: sha512-KOT8ILoyVH2f/PxPadeu5kVVS055D1r3x1iFfJVJzFdnN98pVGM8H07NcKsO+fG3F7/0tf30Vnokf5YIqhU/iw==} engines: {node: '>=16.0.0', npm: '>=8.0.0'} dependencies: lib0: 0.2.88 diff --git a/vite.config.ts b/vite.config.ts index b3d0dbc..3bbddbd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,13 +1,24 @@ import react from "@vitejs/plugin-react-swc"; import path from "path"; -import { defineConfig, splitVendorChunkPlugin } from "vite"; +import { defineConfig } from "vite"; +import pack from "./package.json"; + +const deps = Object.keys(pack.dependencies).filter(x => !x.includes("@lexical/react")) as (keyof typeof pack.dependencies)[]; + +const map = deps.reduce((acc, key) => { + acc[key] = key; + return acc; +}, {} as Record); + +function get(name: keyof typeof pack.dependencies) { + const result = map[name]; + delete map[name]; + return result; +} // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ - react(), - splitVendorChunkPlugin(), - ], + plugins: [react()], resolve: { alias: { "~": path.resolve(__dirname, "src"), @@ -19,5 +30,19 @@ export default defineConfig({ modulePreload: { polyfill: false, }, + rollupOptions: { + output: { + manualChunks: { + react: [get("react"), get("react-dom")], + lexical: deps.filter(x => x.includes("lexical")).map(x => get(x)), + components: [get("@fluentui/react-components")], + fluentui: [get("@fluentui/react-icons"), get("@fluentui/react-hooks"), get("@griffel/react")], + signalr: [get("@microsoft/signalr"), get("@microsoft/signalr-protocol-msgpack")], + rx: [get("dexie"), get("dexie-react-hooks"), get("rxjs")], + tools: [get("ahooks"), get("dayjs"), get("lodash-es"), get("react-helmet"), get("react-responsive-carousel")], + vendor: Object.values(map), + }, + }, + } }, }); From a081f6c0408cb81e7176d5db81bb976b725c09b7 Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:05:57 +0100 Subject: [PATCH 03/13] Update vite.config.ts with splitVendorChunkPlugin --- vite.config.ts | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 3bbddbd..abdb202 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,24 +1,13 @@ import react from "@vitejs/plugin-react-swc"; import path from "path"; -import { defineConfig } from "vite"; -import pack from "./package.json"; - -const deps = Object.keys(pack.dependencies).filter(x => !x.includes("@lexical/react")) as (keyof typeof pack.dependencies)[]; - -const map = deps.reduce((acc, key) => { - acc[key] = key; - return acc; -}, {} as Record); - -function get(name: keyof typeof pack.dependencies) { - const result = map[name]; - delete map[name]; - return result; -} +import { defineConfig, splitVendorChunkPlugin } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [ + react(), + splitVendorChunkPlugin() + ], resolve: { alias: { "~": path.resolve(__dirname, "src"), @@ -29,20 +18,6 @@ export default defineConfig({ reportCompressedSize: false, modulePreload: { polyfill: false, - }, - rollupOptions: { - output: { - manualChunks: { - react: [get("react"), get("react-dom")], - lexical: deps.filter(x => x.includes("lexical")).map(x => get(x)), - components: [get("@fluentui/react-components")], - fluentui: [get("@fluentui/react-icons"), get("@fluentui/react-hooks"), get("@griffel/react")], - signalr: [get("@microsoft/signalr"), get("@microsoft/signalr-protocol-msgpack")], - rx: [get("dexie"), get("dexie-react-hooks"), get("rxjs")], - tools: [get("ahooks"), get("dayjs"), get("lodash-es"), get("react-helmet"), get("react-responsive-carousel")], - vendor: Object.values(map), - }, - }, } }, }); From a899aacd0696e68cc157d97ad8cf60cf85a17b6d Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Mon, 12 Feb 2024 17:43:43 +0100 Subject: [PATCH 04/13] The most significant changes involve renaming and replacing functions and components in `Append.tsx` and `Detail.tsx`. The `Order` property in the `IOrderInfo` interface has also been made optional, and a `@liveSafe` comment has been added to the `OrderEntity` class. 1. The `Order` property in the `IOrderInfo` interface in `OrderInfo.tsx` has been made optional. This change allows for instances where an order may not be present or necessary. (OrderInfo.tsx) 2. The `AdminOrderAppend` function in `Append.tsx` has been renamed to `AdminCommentAppend`. This change reflects a shift in functionality from appending orders to appending comments. (Append.tsx) 3. The `AdminOrderAppend` component in `Detail.tsx` has been replaced with `AdminCommentAppend`. This change ensures that the updated function is correctly referenced and used in the `Detail.tsx` file. (Detail.tsx) 4. The `OrderAppend` function in `Append.tsx` has been renamed to `CommentAppend`. Similar to the previous renaming, this change reflects a shift in functionality from appending orders to appending comments. (Append.tsx) 5. The `OrderAppend` component in `Detail.tsx` has been replaced with `CommentAppend`. This change ensures that the updated function is correctly referenced and used in the `Detail.tsx` file. (Detail.tsx) 6. The `OrderEntity` class in `Entity.ts` has been updated with a `@liveSafe` comment for the `Order` and `Comment` methods. This comment likely indicates that these methods have been reviewed and deemed safe for live deployment. (Entity.ts) --- src/Components/OrderInfo.tsx | 2 +- src/Pages/Admin/Order/Append.tsx | 2 +- src/Pages/Admin/Order/Detail.tsx | 4 ++-- src/Pages/History/Append.tsx | 2 +- src/Pages/History/Detail.tsx | 4 ++-- src/ShopNet/Order/Entity.ts | 2 ++ 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Components/OrderInfo.tsx b/src/Components/OrderInfo.tsx index 726c017..8be239b 100644 --- a/src/Components/OrderInfo.tsx +++ b/src/Components/OrderInfo.tsx @@ -27,7 +27,7 @@ const useStyles = makeStyles({ */ interface IOrderInfo { OrderId: number; - Order: OrderEntity.Order; + Order?: OrderEntity.Order; Admin?: true; } diff --git a/src/Pages/Admin/Order/Append.tsx b/src/Pages/Admin/Order/Append.tsx index 74dead5..6d6091f 100644 --- a/src/Pages/Admin/Order/Append.tsx +++ b/src/Pages/Admin/Order/Append.tsx @@ -29,7 +29,7 @@ const log = new Logger("Admin", "Order", "Detail", "Append"); * @since 0.5.0 * @version 0.2.2 */ -export function AdminOrderAppend({ OrderId, Refresh }: IAdminOrderAppend) { +export function AdminCommentAppend({ OrderId, Refresh }: IAdminOrderAppend) { const style = useStyles(); const [cmt, setCmt] = useState(); diff --git a/src/Pages/Admin/Order/Detail.tsx b/src/Pages/Admin/Order/Detail.tsx index ae2060b..7ff36b2 100644 --- a/src/Pages/Admin/Order/Detail.tsx +++ b/src/Pages/Admin/Order/Detail.tsx @@ -10,7 +10,7 @@ import { ColFlex } from "~/Helpers/Styles"; import { OrderComment } from "~/Pages/History/Comment"; import { AdminHub } from "~/ShopNet/Admin"; import { AdminOrderAction } from "./Action"; -import { AdminOrderAppend } from "./Append"; +import { AdminCommentAppend } from "./Append"; import { AdminOrderList } from "./List"; import { Shipment } from "./Ship"; @@ -104,7 +104,7 @@ export function AdminOrderDetail({ OrderId }: { OrderId: number; }) { - + diff --git a/src/Pages/History/Append.tsx b/src/Pages/History/Append.tsx index 4484cb6..b4c03cb 100644 --- a/src/Pages/History/Append.tsx +++ b/src/Pages/History/Append.tsx @@ -35,7 +35,7 @@ interface IOrderAppend { * @since 0.5.0 * @version 0.4.2 */ -export function OrderAppend({ OrderId, Status, Refresh, ParentLog }: IOrderAppend) { +export function CommentAppend({ OrderId, Status, Refresh, ParentLog }: IOrderAppend) { const log = useConst(() => ParentLog.With("Append")); const style = useStyles(); diff --git a/src/Pages/History/Detail.tsx b/src/Pages/History/Detail.tsx index 545e557..e8b33fd 100644 --- a/src/Pages/History/Detail.tsx +++ b/src/Pages/History/Detail.tsx @@ -13,7 +13,7 @@ import { ICompLog } from "~/Helpers/Logger"; import { ColFlex } from "~/Helpers/Styles"; import { Hub } from "~/ShopNet"; import { OrderAction } from "./Action"; -import { OrderAppend } from "./Append"; +import { CommentAppend } from "./Append"; import { IComment, OrderComment } from "./Comment"; /** @@ -166,7 +166,7 @@ export function OrderDetail({ OrderId, ParentLog }: { OrderId: number } & ICompL - + diff --git a/src/ShopNet/Order/Entity.ts b/src/ShopNet/Order/Entity.ts index ebbb059..f33ba4d 100644 --- a/src/ShopNet/Order/Entity.ts +++ b/src/ShopNet/Order/Entity.ts @@ -25,6 +25,7 @@ export abstract class OrderEntity extends ShopNet { * @author Aloento * @since 1.0.0 * @version 0.1.0 + * @liveSafe */ public static Order(key: number): Promise { this.EnsureLogin(); @@ -35,6 +36,7 @@ export abstract class OrderEntity extends ShopNet { * @author Aloento * @since 1.0.0 * @version 0.1.0 + * @liveSafe */ public static Comment(key: number): Promise { this.EnsureLogin(); From 279292a2779bb079b0cfde9d01728a6f178eaedf Mon Sep 17 00:00:00 2001 From: Aloento <11802769+Aloento@users.noreply.github.com> Date: Mon, 12 Feb 2024 17:44:58 +0100 Subject: [PATCH 05/13] The most significant changes involve the removal of the `AdminCommentAppend` component from `Append.tsx` and its replacement with the `CommentAppend` component in `Detail.tsx`. Additionally, the `AdminHub` import was added to `Append.tsx` and the `IOrderAppend` interface was updated with the `Admin` prop. The `CommentAppend` function and `run: cancel` function in `Append.tsx` were also updated to use either `AdminHub` or `Hub` and `hub.useClose` or `hub.useCancel` respectively, based on the `Admin` prop. Lastly, the `Message` and `ToastTitle` in `Append.tsx` were updated to display either "Close" or "Cancel" based on the `Admin` prop. Changes: 1. Removed `AdminCommentAppend` component from `Append.tsx` along with its related imports and styles. 2. Replaced `AdminCommentAppend` import with `CommentAppend` import from a different path in `Detail.tsx`. 3. Replaced `AdminCommentAppend` component usage with `CommentAppend` component in `Detail.tsx`. 4. Added `AdminHub` import to `Append.tsx`. 5. Moved `Status` prop and added `Admin` prop in the `IOrderAppend` interface in `Append.tsx`. 6. Updated `CommentAppend` function in `Append.tsx` to include the `Admin` prop and to use either `AdminHub` or `Hub` based on the `Admin` prop. 7. Updated `run: cancel` function in `Append.tsx` to use either `hub.useClose` or `hub.useCancel` based on the `Admin` prop. 8. Updated `Message` and `ToastTitle` in `Append.tsx` to display either "Close" or "Cancel" based on the `Admin` prop. --- src/Pages/Admin/Order/Append.tsx | 95 -------------------------------- src/Pages/Admin/Order/Detail.tsx | 6 +- src/Pages/History/Append.tsx | 20 ++++--- 3 files changed, 15 insertions(+), 106 deletions(-) delete mode 100644 src/Pages/Admin/Order/Append.tsx diff --git a/src/Pages/Admin/Order/Append.tsx b/src/Pages/Admin/Order/Append.tsx deleted file mode 100644 index 6d6091f..0000000 --- a/src/Pages/Admin/Order/Append.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { Button, Field, Textarea, Toast, ToastTitle, makeStyles } from "@fluentui/react-components"; -import { useState } from "react"; -import { Logger } from "~/Helpers/Logger"; -import { Flex } from "~/Helpers/Styles"; -import { useErrorToast } from "~/Helpers/useToast"; -import { AdminHub } from "~/ShopNet/Admin"; - -/** - * @author Aloento - * @since 0.5.0 - * @version 0.1.0 - */ -const useStyles = makeStyles({ - body: { - ...Flex, - justifyContent: "space-between" - }, -}); - -interface IAdminOrderAppend { - OrderId: number; - Refresh: () => void; -} - -const log = new Logger("Admin", "Order", "Detail", "Append"); - -/** - * @author Aloento - * @since 0.5.0 - * @version 0.2.2 - */ -export function AdminCommentAppend({ OrderId, Refresh }: IAdminOrderAppend) { - const style = useStyles(); - const [cmt, setCmt] = useState(); - - const { dispatch, dispatchToast } = useErrorToast(log); - - const { run: append } = AdminHub.Order.Post.useAppend({ - manual: true, - onError(e, params) { - dispatch({ - Message: "Failed Append Comment", - Request: params, - Error: e - }); - }, - onSuccess() { - dispatchToast( - - Comment Appended - , - { intent: "success" } - ); - - Refresh(); - } - }); - - const { run: close } = AdminHub.Order.Post.useClose({ - manual: true, - onError(e, params) { - dispatch({ - Message: "Failed Close Order", - Request: params, - Error: e - }); - }, - onSuccess() { - dispatchToast( - - Order Closed - , - { intent: "success" } - ); - - Refresh(); - } - }); - - return <> - -