@tuturuuu/ui 0.18.0 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/package.json +76 -71
- package/src/components/ui/calendar-app/calendar-client-page.tsx +19 -1
- package/src/components/ui/calendar-app/calendar-page-shell.tsx +37 -16
- package/src/components/ui/calendar-app/components/calendar-connections-manager-helpers.ts +70 -0
- package/src/components/ui/calendar-app/components/calendar-connections-settings-content.tsx +516 -578
- package/src/components/ui/calendar-app/components/calendar-connections-unified.tsx +1 -0
- package/src/components/ui/calendar-app/components/calendar-sync-settings-panel.tsx +155 -0
- package/src/components/ui/calendar-app/components/merge-provider-calendars.test.ts +46 -0
- package/src/components/ui/calendar-app/components/merge-provider-calendars.ts +81 -0
- package/src/components/ui/calendar-app/components/use-calendar-connections-manager.ts +22 -129
- package/src/components/ui/chat/chat-agent-details-operations-panel.test.tsx +17 -3
- package/src/components/ui/chat/chat-agent-details-utils.tsx +2 -0
- package/src/components/ui/chat/chat-agent-details-zalo-personal-panel.tsx +17 -6
- package/src/components/ui/custom/__tests__/settings-dialog-shell.test.tsx +35 -0
- package/src/components/ui/custom/__tests__/workspace-select-helpers.test.ts +17 -0
- package/src/components/ui/custom/nav-link.test.tsx +1 -0
- package/src/components/ui/custom/nav-link.tsx +4 -1
- package/src/components/ui/custom/settings-dialog-shell.tsx +23 -14
- package/src/components/ui/custom/statistic-card.tsx +3 -5
- package/src/components/ui/custom/structure.test.tsx +4 -0
- package/src/components/ui/custom/user-filters.tsx +4 -7
- package/src/components/ui/custom/workspace-access/workspace-access-page-header.tsx +1 -1
- package/src/components/ui/custom/workspace-access/workspace-access-tabs-toolbar.tsx +1 -1
- package/src/components/ui/custom/workspace-select.tsx +38 -53
- package/src/components/ui/finance/analytics/category-spending-chart.test.tsx +3 -3
- package/src/components/ui/finance/budgets/budget-card.test.tsx +3 -3
- package/src/components/ui/finance/debts/debt-loan-card.test.tsx +3 -3
- package/src/components/ui/finance/debts/debt-loan-detail-cards.test.tsx +3 -3
- package/src/components/ui/finance/invoices/charts/invoice-totals-chart.test.tsx +3 -3
- package/src/components/ui/finance/invoices/columns.test.tsx +3 -3
- package/src/components/ui/finance/invoices/components/invoice-customer-select-card.tsx +1 -1
- package/src/components/ui/finance/shared/numbers-visibility-toggle.test.tsx +1 -1
- package/src/components/ui/finance/tags/tag-manager.test.tsx +2 -2
- package/src/components/ui/finance/transactions/categories/columns.test.tsx +5 -5
- package/src/components/ui/finance/transactions/columns.test.tsx +2 -2
- package/src/components/ui/finance/transactions/confidential-field.test.tsx +2 -2
- package/src/components/ui/finance/transactions/transaction-edit-dialog.test.tsx +2 -2
- package/src/components/ui/finance/transactions/transaction-statistics.test.tsx +3 -3
- package/src/components/ui/finance/wallets/form.test.tsx +3 -3
- package/src/components/ui/finance/wallets/wallets-data-table.test.tsx +10 -0
- package/src/components/ui/legacy/calendar/calendar-cell.tsx +1 -1
- package/src/components/ui/storefront/accent-button.tsx +4 -1
- package/src/components/ui/storefront/browse-panel.tsx +6 -1
- package/src/components/ui/storefront/cart-summary-parts.tsx +18 -4
- package/src/components/ui/storefront/cart-summary.tsx +22 -6
- package/src/components/ui/storefront/hero-panel.tsx +13 -17
- package/src/components/ui/storefront/index.ts +2 -0
- package/src/components/ui/storefront/listing-card.tsx +6 -4
- package/src/components/ui/storefront/product-detail.tsx +51 -21
- package/src/components/ui/storefront/product-dialog.tsx +8 -1
- package/src/components/ui/storefront/storefront-surface.test.tsx +79 -3
- package/src/components/ui/storefront/storefront-surface.tsx +151 -100
- package/src/components/ui/storefront/types.ts +3 -0
- package/src/components/ui/storefront/utils.ts +5 -1
- package/src/components/ui/text-editor/__tests__/task-mention-checkbox.test.ts +23 -6
- package/src/components/ui/text-editor/__tests__/upload-placeholder.test.ts +1 -10
- package/src/components/ui/text-editor/color-controls.tsx +1 -1
- package/src/globals.css +20 -0
- package/src/globals.test.ts +75 -0
- package/src/hooks/__tests__/use-calendar-sync.test.tsx +103 -1
- package/src/hooks/use-calendar-sync.tsx +51 -14
- package/src/lib/task-personal-external.ts +1 -1
- package/vendor/xlsx/LICENSE +201 -0
- package/vendor/xlsx/types/index.d.ts +1065 -0
- package/vendor/xlsx/xlsx.js +28103 -0
- package/vendor/xlsx/xlsx.mjs +28228 -0
- package/vendor/xlsx-0.20.3.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.19.1](https://github.com/tutur3u/platform/compare/ui-v0.19.0...ui-v0.19.1) (2026-07-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **ui:** publish portable vendored dependencies ([99ad359](https://github.com/tutur3u/platform/commit/99ad35903a27b8f9df26f22fc5f1003aed363d6f))
|
|
9
|
+
|
|
10
|
+
## [0.19.0](https://github.com/tutur3u/platform/compare/ui-v0.18.0...ui-v0.19.0) (2026-07-21)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **calendar:** redesign workspace sidebar ([194e126](https://github.com/tutur3u/platform/commit/194e1267e573e50416f3866826e2a182b3ff8729))
|
|
16
|
+
* **satellite:** unify app switcher headers ([411a00c](https://github.com/tutur3u/platform/commit/411a00c9cbb584579e0d8f8e7fa4c2721c414ba3))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **calendar:** restore provider calendar management ([68753a8](https://github.com/tutur3u/platform/commit/68753a865dcc25a35cd53e5fc7ced1913b9a10bb))
|
|
22
|
+
* **chat:** stop Zalo phone sync spam ([b45e778](https://github.com/tutur3u/platform/commit/b45e778693f175b7bafcd00d6b3ec46f079a946c))
|
|
23
|
+
* **ci:** keep task helper collection source-only ([7355a05](https://github.com/tutur3u/platform/commit/7355a05385ccd8d1e2d1bcf6ac15ae5297e057ad))
|
|
24
|
+
* **ci:** resolve shared task helper during e2e collection ([0319a3b](https://github.com/tutur3u/platform/commit/0319a3bd0df12592b823b7cebdff38cea3e50836))
|
|
25
|
+
* **inventory:** correct storefront bundle checkout ([cb9c247](https://github.com/tutur3u/platform/commit/cb9c24740ceb77f9426ba640383a68bd9ed95d2c))
|
|
26
|
+
* **inventory:** polish mobile sales and settings ([59ef49c](https://github.com/tutur3u/platform/commit/59ef49cde2095361e2b13ce36848e1e39f772c18))
|
|
27
|
+
* resolve code quality findings ([63f10b5](https://github.com/tutur3u/platform/commit/63f10b5ec22a4194f48f448ee2b1b088b5da8f08))
|
|
28
|
+
* **satellite:** harden workspace settings translations ([7315a2d](https://github.com/tutur3u/platform/commit/7315a2da7b75fd1d66c1c89885aaebc857a44a19))
|
|
29
|
+
* **satellite:** restore mobile workspace settings ([e276f40](https://github.com/tutur3u/platform/commit/e276f4006175cfb501410b3875e661d3975c27f2))
|
|
30
|
+
* **satellite:** restore workspace settings access ([6b4c4f9](https://github.com/tutur3u/platform/commit/6b4c4f92b06b5a68d3116b744a1b8fa6dd9668d2))
|
|
31
|
+
* **security:** remediate code scanning findings ([023db2e](https://github.com/tutur3u/platform/commit/023db2edf4b0557be108a9d772cbc7e2223af947))
|
|
32
|
+
* **tasks:** repair onboarding and external metadata ([e0b62eb](https://github.com/tutur3u/platform/commit/e0b62eb7119155f6e4cad3dc4fb4d0f9820c98e8))
|
|
33
|
+
* **ui:** prevent iOS form focus zoom ([a0e3f3c](https://github.com/tutur3u/platform/commit/a0e3f3cc10e0ef0676714857088ff8d2b826dcd2))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Performance Improvements
|
|
37
|
+
|
|
38
|
+
* **inventory:** add event-driven storefront caching ([2f571f4](https://github.com/tutur3u/platform/commit/2f571f4fc534bf5dee0ca36c4310d87b44e6e613))
|
|
39
|
+
* **storefront:** share customer navigation shell ([21cb78d](https://github.com/tutur3u/platform/commit/21cb78db484d1e1fdb9f2469fcac4e3a948bd176))
|
|
40
|
+
* **storefront:** stabilize navigation and cart rendering ([471c6b7](https://github.com/tutur3u/platform/commit/471c6b75abc6a4d69692e868cc1b220785e03262))
|
|
41
|
+
|
|
3
42
|
## [0.18.0](https://github.com/tutur3u/platform/compare/ui-v0.17.0...ui-v0.18.0) (2026-07-18)
|
|
4
43
|
|
|
5
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuturuuu/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,33 +24,33 @@
|
|
|
24
24
|
"@hookform/resolvers": "^5.4.0",
|
|
25
25
|
"@json-render/core": "^0.19.0",
|
|
26
26
|
"@json-render/react": "^0.19.0",
|
|
27
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
28
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
29
|
-
"@radix-ui/react-aspect-ratio": "^1.1.
|
|
30
|
-
"@radix-ui/react-avatar": "^1.2.
|
|
31
|
-
"@radix-ui/react-checkbox": "^1.3.
|
|
32
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
33
|
-
"@radix-ui/react-context-menu": "^2.3.
|
|
34
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
35
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
36
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
37
|
-
"@radix-ui/react-label": "^2.1.
|
|
38
|
-
"@radix-ui/react-menubar": "^1.1.
|
|
39
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
40
|
-
"@radix-ui/react-popover": "^1.1.
|
|
41
|
-
"@radix-ui/react-progress": "^1.1.
|
|
42
|
-
"@radix-ui/react-radio-group": "^1.4.
|
|
43
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
44
|
-
"@radix-ui/react-select": "^2.3.
|
|
45
|
-
"@radix-ui/react-separator": "^1.1.
|
|
46
|
-
"@radix-ui/react-slider": "^1.4.
|
|
27
|
+
"@radix-ui/react-accordion": "^1.2.17",
|
|
28
|
+
"@radix-ui/react-alert-dialog": "^1.1.20",
|
|
29
|
+
"@radix-ui/react-aspect-ratio": "^1.1.12",
|
|
30
|
+
"@radix-ui/react-avatar": "^1.2.3",
|
|
31
|
+
"@radix-ui/react-checkbox": "^1.3.8",
|
|
32
|
+
"@radix-ui/react-collapsible": "^1.1.17",
|
|
33
|
+
"@radix-ui/react-context-menu": "^2.3.4",
|
|
34
|
+
"@radix-ui/react-dialog": "^1.1.20",
|
|
35
|
+
"@radix-ui/react-dropdown-menu": "^2.1.21",
|
|
36
|
+
"@radix-ui/react-hover-card": "^1.1.20",
|
|
37
|
+
"@radix-ui/react-label": "^2.1.12",
|
|
38
|
+
"@radix-ui/react-menubar": "^1.1.21",
|
|
39
|
+
"@radix-ui/react-navigation-menu": "^1.2.19",
|
|
40
|
+
"@radix-ui/react-popover": "^1.1.20",
|
|
41
|
+
"@radix-ui/react-progress": "^1.1.13",
|
|
42
|
+
"@radix-ui/react-radio-group": "^1.4.4",
|
|
43
|
+
"@radix-ui/react-scroll-area": "^1.2.15",
|
|
44
|
+
"@radix-ui/react-select": "^2.3.4",
|
|
45
|
+
"@radix-ui/react-separator": "^1.1.12",
|
|
46
|
+
"@radix-ui/react-slider": "^1.4.4",
|
|
47
47
|
"@radix-ui/react-slot": "^1.3.0",
|
|
48
|
-
"@radix-ui/react-switch": "^1.3.
|
|
49
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
50
|
-
"@radix-ui/react-toast": "^1.2.
|
|
51
|
-
"@radix-ui/react-toggle": "^1.1.
|
|
52
|
-
"@radix-ui/react-toggle-group": "^1.1.
|
|
53
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
48
|
+
"@radix-ui/react-switch": "^1.3.4",
|
|
49
|
+
"@radix-ui/react-tabs": "^1.1.18",
|
|
50
|
+
"@radix-ui/react-toast": "^1.2.20",
|
|
51
|
+
"@radix-ui/react-toggle": "^1.1.15",
|
|
52
|
+
"@radix-ui/react-toggle-group": "^1.1.16",
|
|
53
|
+
"@radix-ui/react-tooltip": "^1.2.13",
|
|
54
54
|
"@streamdown/cjk": "^1.0.3",
|
|
55
55
|
"@streamdown/code": "^1.1.1",
|
|
56
56
|
"@streamdown/math": "^1.0.2",
|
|
@@ -60,39 +60,39 @@
|
|
|
60
60
|
"@tanstack/react-query": "^5.101.2",
|
|
61
61
|
"@tanstack/react-table": "^8.21.3",
|
|
62
62
|
"@tanstack/react-virtual": "^3.14.6",
|
|
63
|
-
"@tiptap/core": "3.
|
|
64
|
-
"@tiptap/extension-collaboration": "3.
|
|
65
|
-
"@tiptap/extension-collaboration-caret": "3.
|
|
66
|
-
"@tiptap/extension-color": "3.
|
|
67
|
-
"@tiptap/extension-drag-handle": "3.
|
|
68
|
-
"@tiptap/extension-drag-handle-react": "3.
|
|
69
|
-
"@tiptap/extension-highlight": "3.
|
|
70
|
-
"@tiptap/extension-horizontal-rule": "3.
|
|
71
|
-
"@tiptap/extension-image": "3.
|
|
72
|
-
"@tiptap/extension-link": "3.
|
|
73
|
-
"@tiptap/extension-list": "3.
|
|
74
|
-
"@tiptap/extension-node-range": "3.
|
|
75
|
-
"@tiptap/extension-placeholder": "3.
|
|
76
|
-
"@tiptap/extension-strike": "3.
|
|
77
|
-
"@tiptap/extension-subscript": "3.
|
|
78
|
-
"@tiptap/extension-superscript": "3.
|
|
79
|
-
"@tiptap/extension-table": "3.
|
|
80
|
-
"@tiptap/extension-table-cell": "3.
|
|
81
|
-
"@tiptap/extension-table-header": "3.
|
|
82
|
-
"@tiptap/extension-table-row": "3.
|
|
83
|
-
"@tiptap/extension-text-align": "3.
|
|
84
|
-
"@tiptap/extension-text-style": "3.
|
|
85
|
-
"@tiptap/extension-youtube": "3.
|
|
86
|
-
"@tiptap/pm": "3.
|
|
87
|
-
"@tiptap/react": "3.
|
|
88
|
-
"@tiptap/starter-kit": "3.
|
|
89
|
-
"@tuturuuu/ai": "0.
|
|
90
|
-
"@tuturuuu/apis": "0.9.
|
|
63
|
+
"@tiptap/core": "3.28.0",
|
|
64
|
+
"@tiptap/extension-collaboration": "3.28.0",
|
|
65
|
+
"@tiptap/extension-collaboration-caret": "3.28.0",
|
|
66
|
+
"@tiptap/extension-color": "3.28.0",
|
|
67
|
+
"@tiptap/extension-drag-handle": "3.28.0",
|
|
68
|
+
"@tiptap/extension-drag-handle-react": "3.28.0",
|
|
69
|
+
"@tiptap/extension-highlight": "3.28.0",
|
|
70
|
+
"@tiptap/extension-horizontal-rule": "3.28.0",
|
|
71
|
+
"@tiptap/extension-image": "3.28.0",
|
|
72
|
+
"@tiptap/extension-link": "3.28.0",
|
|
73
|
+
"@tiptap/extension-list": "3.28.0",
|
|
74
|
+
"@tiptap/extension-node-range": "3.28.0",
|
|
75
|
+
"@tiptap/extension-placeholder": "3.28.0",
|
|
76
|
+
"@tiptap/extension-strike": "3.28.0",
|
|
77
|
+
"@tiptap/extension-subscript": "3.28.0",
|
|
78
|
+
"@tiptap/extension-superscript": "3.28.0",
|
|
79
|
+
"@tiptap/extension-table": "3.28.0",
|
|
80
|
+
"@tiptap/extension-table-cell": "3.28.0",
|
|
81
|
+
"@tiptap/extension-table-header": "3.28.0",
|
|
82
|
+
"@tiptap/extension-table-row": "3.28.0",
|
|
83
|
+
"@tiptap/extension-text-align": "3.28.0",
|
|
84
|
+
"@tiptap/extension-text-style": "3.28.0",
|
|
85
|
+
"@tiptap/extension-youtube": "3.28.0",
|
|
86
|
+
"@tiptap/pm": "3.28.0",
|
|
87
|
+
"@tiptap/react": "3.28.0",
|
|
88
|
+
"@tiptap/starter-kit": "3.28.0",
|
|
89
|
+
"@tuturuuu/ai": "0.3.0",
|
|
90
|
+
"@tuturuuu/apis": "0.9.2",
|
|
91
91
|
"@tuturuuu/hooks": "0.0.2",
|
|
92
92
|
"@tuturuuu/icons": "0.0.6",
|
|
93
|
-
"@tuturuuu/internal-api": "0.
|
|
94
|
-
"@tuturuuu/supabase": "0.4.
|
|
95
|
-
"@tuturuuu/utils": "0.
|
|
93
|
+
"@tuturuuu/internal-api": "0.20.0",
|
|
94
|
+
"@tuturuuu/supabase": "0.4.1",
|
|
95
|
+
"@tuturuuu/utils": "0.17.0",
|
|
96
96
|
"@types/debug": "^4.1.13",
|
|
97
97
|
"browser-image-compression": "^2.0.2",
|
|
98
98
|
"class-variance-authority": "^0.7.1",
|
|
@@ -108,23 +108,23 @@
|
|
|
108
108
|
"gsap": "^3.15.0",
|
|
109
109
|
"html2canvas-pro": "^2.2.4",
|
|
110
110
|
"input-otp": "^1.4.2",
|
|
111
|
-
"katex": "^0.
|
|
111
|
+
"katex": "^0.18.1",
|
|
112
112
|
"lodash": "4.18.1",
|
|
113
113
|
"moment": "^2.30.1",
|
|
114
114
|
"motion": "^12.42.2",
|
|
115
115
|
"next": "^16.3.0-preview.6",
|
|
116
116
|
"next-intl": "^4.13.2",
|
|
117
117
|
"next-themes": "^0.4.6",
|
|
118
|
-
"nuqs": "^2.9.
|
|
118
|
+
"nuqs": "^2.9.1",
|
|
119
119
|
"prosemirror-state": "^1.4.4",
|
|
120
|
-
"prosemirror-view": "1.
|
|
120
|
+
"prosemirror-view": "1.42.1",
|
|
121
121
|
"qrcode.react": "^4.2.0",
|
|
122
122
|
"react": "^19.2.7",
|
|
123
123
|
"react-colorful": "^5.8.0",
|
|
124
124
|
"react-day-picker": "^10.0.1",
|
|
125
125
|
"react-dom": "^19.2.7",
|
|
126
|
-
"react-dropzone": "^
|
|
127
|
-
"react-hook-form": "^7.
|
|
126
|
+
"react-dropzone": "^19.1.1",
|
|
127
|
+
"react-hook-form": "^7.82.0",
|
|
128
128
|
"react-markdown": "^10.1.0",
|
|
129
129
|
"react-papaparse": "^4.4.0",
|
|
130
130
|
"react-pdf": "^10.4.1",
|
|
@@ -141,19 +141,18 @@
|
|
|
141
141
|
"tiptap-extension-resize-image": "^1.4.4",
|
|
142
142
|
"use-debounce": "^10.1.1",
|
|
143
143
|
"vaul": "^1.1.2",
|
|
144
|
-
"xlsx": "file:vendor/xlsx-0.20.3.tgz",
|
|
145
144
|
"y-protocols": "^1.0.7",
|
|
146
145
|
"yjs": "^13.6.31",
|
|
147
146
|
"zod": "^4.4.3"
|
|
148
147
|
},
|
|
149
148
|
"devDependencies": {
|
|
150
|
-
"@tailwindcss/postcss": "^4.3.
|
|
149
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
151
150
|
"@tailwindcss/typography": "^0.5.20",
|
|
152
151
|
"@tanstack/react-query": "^5.101.2",
|
|
153
152
|
"@tanstack/react-table": "^8.21.3",
|
|
154
153
|
"@testing-library/jest-dom": "^6.9.1",
|
|
155
154
|
"@testing-library/react": "^16.3.2",
|
|
156
|
-
"@tuturuuu/types": "0.
|
|
155
|
+
"@tuturuuu/types": "0.19.0",
|
|
157
156
|
"@tuturuuu/typescript-config": "0.1.1",
|
|
158
157
|
"@types/html2canvas": "^1.0.0",
|
|
159
158
|
"@types/lodash": "^4.17.24",
|
|
@@ -164,11 +163,11 @@
|
|
|
164
163
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
165
164
|
"@types/uuid": "^11.0.0",
|
|
166
165
|
"@vitejs/plugin-react": "^6.0.3",
|
|
167
|
-
"autoprefixer": "^10.5.
|
|
166
|
+
"autoprefixer": "^10.5.4",
|
|
168
167
|
"jsdom": "^29.1.1",
|
|
169
|
-
"postcss": "^8.5.
|
|
168
|
+
"postcss": "^8.5.20",
|
|
170
169
|
"postcss-load-config": "^6.0.1",
|
|
171
|
-
"tailwindcss": "^4.3.
|
|
170
|
+
"tailwindcss": "^4.3.3",
|
|
172
171
|
"typescript": "7.0.2",
|
|
173
172
|
"uuid": "^14.0.1",
|
|
174
173
|
"vitest": "^4.1.10"
|
|
@@ -232,7 +231,12 @@
|
|
|
232
231
|
"./hooks/useSearchParams": "./src/hooks/useSearchParams.tsx",
|
|
233
232
|
"./resolvers": "./src/resolvers.ts",
|
|
234
233
|
"./gsap": "./src/gsap.ts",
|
|
235
|
-
"./xlsx":
|
|
234
|
+
"./xlsx": {
|
|
235
|
+
"types": "./vendor/xlsx/types/index.d.ts",
|
|
236
|
+
"import": "./vendor/xlsx/xlsx.mjs",
|
|
237
|
+
"require": "./vendor/xlsx/xlsx.js",
|
|
238
|
+
"default": "./vendor/xlsx/xlsx.js"
|
|
239
|
+
},
|
|
236
240
|
"./tiptap": {
|
|
237
241
|
"types": "./src/components/ui/text-editor/types.ts",
|
|
238
242
|
"import": "./src/components/ui/text-editor/types.ts"
|
|
@@ -392,7 +396,8 @@
|
|
|
392
396
|
"./*": "./src/components/ui/*.tsx",
|
|
393
397
|
"./lib/task-personal-external": {
|
|
394
398
|
"types": "./src/lib/task-personal-external.ts",
|
|
395
|
-
"import": "./src/lib/task-personal-external.ts"
|
|
399
|
+
"import": "./src/lib/task-personal-external.ts",
|
|
400
|
+
"default": "./src/lib/task-personal-external.ts"
|
|
396
401
|
},
|
|
397
402
|
"./lib/tasks-app-url": {
|
|
398
403
|
"types": "./src/lib/tasks-app-url.ts",
|
|
@@ -5,9 +5,15 @@ import type {
|
|
|
5
5
|
Workspace,
|
|
6
6
|
WorkspaceCalendarGoogleTokenClient,
|
|
7
7
|
} from '@tuturuuu/types';
|
|
8
|
+
import type { CalendarView } from '@tuturuuu/ui/hooks/use-view-transition';
|
|
8
9
|
import { SmartCalendar } from '@tuturuuu/ui/legacy/calendar/smart-calendar';
|
|
9
10
|
import { useLocale, useTranslations } from 'next-intl';
|
|
10
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
type ComponentType,
|
|
13
|
+
type Dispatch,
|
|
14
|
+
type SetStateAction,
|
|
15
|
+
useState,
|
|
16
|
+
} from 'react';
|
|
11
17
|
import { RequireWorkspaceTimezoneDialog } from './components/require-workspace-timezone-dialog';
|
|
12
18
|
import { useCalendarSettings } from './hooks';
|
|
13
19
|
|
|
@@ -24,13 +30,23 @@ interface CalendarClientPageProps {
|
|
|
24
30
|
experimentalGoogleToken?: WorkspaceCalendarGoogleTokenClient | null;
|
|
25
31
|
workspace: Workspace;
|
|
26
32
|
enableSmartScheduling: boolean;
|
|
33
|
+
externalState?: {
|
|
34
|
+
availableViews: { value: string; label: string; disabled?: boolean }[];
|
|
35
|
+
date: Date;
|
|
36
|
+
setDate: Dispatch<SetStateAction<Date>>;
|
|
37
|
+
setView: Dispatch<SetStateAction<CalendarView>>;
|
|
38
|
+
view: CalendarView;
|
|
39
|
+
};
|
|
40
|
+
showConnectionsManager?: boolean;
|
|
27
41
|
}
|
|
28
42
|
|
|
29
43
|
export function CalendarClientPage({
|
|
30
44
|
experimentalGoogleToken,
|
|
31
45
|
workspace,
|
|
32
46
|
enableSmartScheduling,
|
|
47
|
+
externalState,
|
|
33
48
|
HeaderActions,
|
|
49
|
+
showConnectionsManager,
|
|
34
50
|
}: CalendarClientPageProps) {
|
|
35
51
|
const t = useTranslations('calendar');
|
|
36
52
|
const locale = useLocale();
|
|
@@ -69,7 +85,9 @@ export function CalendarClientPage({
|
|
|
69
85
|
: null
|
|
70
86
|
}
|
|
71
87
|
extras={extras}
|
|
88
|
+
externalState={externalState}
|
|
72
89
|
initialSettings={initialSettings}
|
|
90
|
+
showConnectionsManager={showConnectionsManager}
|
|
73
91
|
/>
|
|
74
92
|
</div>
|
|
75
93
|
);
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
} from '@tuturuuu/types';
|
|
6
6
|
import { CalendarSyncProvider } from '@tuturuuu/ui/hooks/use-calendar-sync';
|
|
7
7
|
import type { ComponentType } from 'react';
|
|
8
|
+
import type { CalendarView } from '../../../hooks/use-view-transition';
|
|
8
9
|
import type { ExtendedWorkspaceTask } from '../time-tracker/types';
|
|
9
10
|
import {
|
|
10
11
|
CalendarClientPage,
|
|
@@ -31,6 +32,15 @@ interface CalendarPageShellProps {
|
|
|
31
32
|
userId: string;
|
|
32
33
|
workspace: Workspace;
|
|
33
34
|
TasksSidebar: CalendarTasksSidebarComponent;
|
|
35
|
+
externalState?: {
|
|
36
|
+
availableViews: { value: string; label: string; disabled?: boolean }[];
|
|
37
|
+
date: Date;
|
|
38
|
+
setDate: React.Dispatch<React.SetStateAction<Date>>;
|
|
39
|
+
setView: React.Dispatch<React.SetStateAction<CalendarView>>;
|
|
40
|
+
view: CalendarView;
|
|
41
|
+
};
|
|
42
|
+
manageCalendarSyncProvider?: boolean;
|
|
43
|
+
showConnectionsManager?: boolean;
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
export function CalendarPageShell({
|
|
@@ -43,29 +53,40 @@ export function CalendarPageShell({
|
|
|
43
53
|
userId,
|
|
44
54
|
workspace,
|
|
45
55
|
TasksSidebar,
|
|
56
|
+
externalState,
|
|
57
|
+
manageCalendarSyncProvider = true,
|
|
58
|
+
showConnectionsManager = true,
|
|
46
59
|
}: CalendarPageShellProps) {
|
|
60
|
+
const content = (
|
|
61
|
+
<div className="flex h-[calc(100vh-2rem)]">
|
|
62
|
+
<CalendarClientPage
|
|
63
|
+
experimentalGoogleToken={experimentalGoogleToken}
|
|
64
|
+
workspace={workspace}
|
|
65
|
+
enableSmartScheduling={enableSmartScheduling}
|
|
66
|
+
externalState={externalState}
|
|
67
|
+
HeaderActions={HeaderActions}
|
|
68
|
+
showConnectionsManager={showConnectionsManager}
|
|
69
|
+
/>
|
|
70
|
+
{enableSmartScheduling && (
|
|
71
|
+
<TasksSidebar
|
|
72
|
+
resolvedWsId={workspace.id}
|
|
73
|
+
locale={locale}
|
|
74
|
+
userId={userId}
|
|
75
|
+
tasks={smartSchedulingTasks}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (!manageCalendarSyncProvider) return content;
|
|
82
|
+
|
|
47
83
|
return (
|
|
48
84
|
<CalendarSyncProvider
|
|
49
85
|
wsId={workspace.id}
|
|
50
86
|
experimentalGoogleToken={experimentalGoogleToken}
|
|
51
87
|
initialCalendarConnections={calendarConnections || []}
|
|
52
88
|
>
|
|
53
|
-
|
|
54
|
-
<CalendarClientPage
|
|
55
|
-
experimentalGoogleToken={experimentalGoogleToken}
|
|
56
|
-
workspace={workspace}
|
|
57
|
-
enableSmartScheduling={enableSmartScheduling}
|
|
58
|
-
HeaderActions={HeaderActions}
|
|
59
|
-
/>
|
|
60
|
-
{enableSmartScheduling && (
|
|
61
|
-
<TasksSidebar
|
|
62
|
-
resolvedWsId={workspace.id}
|
|
63
|
-
locale={locale}
|
|
64
|
-
userId={userId}
|
|
65
|
-
tasks={smartSchedulingTasks}
|
|
66
|
-
/>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
89
|
+
{content}
|
|
69
90
|
</CalendarSyncProvider>
|
|
70
91
|
);
|
|
71
92
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { CalendarSourceOption } from '@tuturuuu/internal-api/calendar';
|
|
2
|
+
import type { ConnectedAccount } from './calendar-types';
|
|
3
|
+
|
|
4
|
+
export interface AccountsResponse {
|
|
5
|
+
accounts: ConnectedAccount[];
|
|
6
|
+
grouped: {
|
|
7
|
+
google: ConnectedAccount[];
|
|
8
|
+
microsoft: ConnectedAccount[];
|
|
9
|
+
};
|
|
10
|
+
total: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface WorkspaceCalendar {
|
|
14
|
+
id: string;
|
|
15
|
+
ws_id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
color: string | null;
|
|
19
|
+
calendar_type: 'primary' | 'tasks' | 'habits' | 'custom';
|
|
20
|
+
is_system: boolean;
|
|
21
|
+
is_enabled: boolean;
|
|
22
|
+
position: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface WorkspaceCalendarsResponse {
|
|
26
|
+
calendars: WorkspaceCalendar[];
|
|
27
|
+
grouped: {
|
|
28
|
+
system: WorkspaceCalendar[];
|
|
29
|
+
custom: WorkspaceCalendar[];
|
|
30
|
+
};
|
|
31
|
+
total: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ManualSyncResponse {
|
|
35
|
+
ok: boolean;
|
|
36
|
+
alreadyRunning?: boolean;
|
|
37
|
+
code?: string;
|
|
38
|
+
error?: string;
|
|
39
|
+
retryAfterSeconds?: number | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function sourceInputFromOption(option: CalendarSourceOption) {
|
|
43
|
+
if (option.provider === 'tuturuuu') {
|
|
44
|
+
return {
|
|
45
|
+
provider: 'tuturuuu' as const,
|
|
46
|
+
workspaceCalendarId: option.workspaceCalendarId,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
provider: option.provider,
|
|
52
|
+
connectionId: option.connectionId,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function getCalendarColor(color: string) {
|
|
57
|
+
const colors: Record<string, string> = {
|
|
58
|
+
BLUE: '#3b82f6',
|
|
59
|
+
RED: '#ef4444',
|
|
60
|
+
GREEN: '#22c55e',
|
|
61
|
+
YELLOW: '#eab308',
|
|
62
|
+
ORANGE: '#f97316',
|
|
63
|
+
PURPLE: '#a855f7',
|
|
64
|
+
PINK: '#ec4899',
|
|
65
|
+
CYAN: '#06b6d4',
|
|
66
|
+
GRAY: '#6b7280',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return colors[color.toUpperCase()] || color;
|
|
70
|
+
}
|