goobs-frontend 0.8.25 → 0.8.27

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.
Files changed (25) hide show
  1. package/package.json +23 -25
  2. package/src/components/Card/index.tsx +4 -1
  3. package/src/components/Card/variants/task/index.tsx +5 -5
  4. package/src/components/ComplexTextEditor/utils/useMarkdownEditor.tsx +0 -2
  5. package/src/components/Content/Structure/projectboard/useProjectBoard.tsx +2 -1
  6. package/src/components/DataGrid/index.tsx +14 -15
  7. package/src/components/Form/ProjectBoard/index.tsx +1 -1
  8. package/src/components/ProjectBoard/AddTask/client.tsx +1 -1
  9. package/src/components/ProjectBoard/Column/index.tsx +472 -176
  10. package/src/components/ProjectBoard/ManageTask/client.tsx +286 -263
  11. package/src/components/ProjectBoard/ShowTask/client.tsx +213 -192
  12. package/src/components/ProjectBoard/index.tsx +282 -277
  13. package/src/components/ProjectBoard/projectboard.stories.tsx +153 -107
  14. package/src/components/ProjectBoard/types/index.tsx +247 -0
  15. package/src/components/ProjectBoard/utils/useComputeBoard.tsx +127 -0
  16. package/src/components/ProjectBoard/utils/useDragandDrop/columns.tsx +67 -0
  17. package/src/components/ProjectBoard/utils/{useDragandDropColumns.tsx → useDragandDrop/tasks.tsx} +30 -70
  18. package/src/components/Searchbar/index.tsx +1 -1
  19. package/src/components/Toolbar/index.tsx +134 -26
  20. package/src/components/Toolbar/left/index.tsx +34 -165
  21. package/src/components/Toolbar/leftCenter/index.tsx +47 -0
  22. package/src/components/Toolbar/right/index.tsx +21 -62
  23. package/src/components/Toolbar/rightCenter/index.tsx +55 -0
  24. package/src/components/Toolbar/toolbar.stories.tsx +34 -76
  25. package/src/index.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goobs-frontend",
3
- "version": "0.8.25",
3
+ "version": "0.8.27",
4
4
  "type": "module",
5
5
  "description": "A comprehensive React-based UI library built on Material-UI, offering a wide range of customizable components including grids, typography, buttons, cards, forms, navigation, pricing tables, steppers, tooltips, accordions, and more. Designed for building responsive and consistent user interfaces with advanced features like form validation, theming, and code syntax highlighting.",
6
6
  "license": "MIT",
@@ -25,46 +25,44 @@
25
25
  "@emotion/cache": "^11.14.0",
26
26
  "@emotion/react": "^11.14.0",
27
27
  "@emotion/styled": "^11.14.0",
28
- "@mui/icons-material": "^6.3.1",
29
- "@mui/material": "^6.3.1",
28
+ "@mui/icons-material": "^6.4.1",
29
+ "@mui/material": "^6.4.1",
30
30
  "@types/lodash": "^4.17.14",
31
31
  "formik": "^2.4.6",
32
32
  "highlight.js": "^11.11.1",
33
- "jotai": "^2.11.0",
33
+ "jotai": "^2.11.1",
34
34
  "lodash": "^4.17.21",
35
- "next": "15.1.4",
35
+ "next": "15.1.6",
36
36
  "otplib": "^12.0.1",
37
37
  "react-datepicker": "^7.6.0",
38
38
  "react-qr-code": "^2.0.15",
39
39
  "slate": "^0.112.0",
40
40
  "slate-dom": "^0.111.0",
41
41
  "slate-history": "^0.110.3",
42
- "slate-react": "^0.112.0",
43
- "storybook": "^8.4.7",
42
+ "slate-react": "^0.112.1",
43
+ "storybook": "^8.5.1",
44
44
  "zod": "^3.24.1",
45
45
  "zod-formik-adapter": "^1.3.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@chromatic-com/storybook": "^3.2.3",
49
- "@next/eslint-plugin-next": "^15.1.4",
50
- "@storybook/addon-essentials": "^8.4.7",
51
- "@storybook/addon-interactions": "^8.4.7",
52
- "@storybook/addon-onboarding": "8.4.7",
53
- "@storybook/blocks": "8.4.7",
54
- "@storybook/nextjs": "^8.4.7",
55
- "@storybook/react": "^8.4.7",
56
- "@storybook/test": "^8.4.7",
57
- "@storybook/testing-library": "^0.2.2",
58
- "@types/node": "^22.10.5",
59
- "@types/react": "19.0.5",
48
+ "@chromatic-com/storybook": "^3.2.4",
49
+ "@next/eslint-plugin-next": "^15.1.6",
50
+ "@storybook/addon-essentials": "^8.5.1",
51
+ "@storybook/addon-interactions": "^8.5.1",
52
+ "@storybook/addon-onboarding": "8.5.1",
53
+ "@storybook/blocks": "8.5.1",
54
+ "@storybook/nextjs": "^8.5.1",
55
+ "@storybook/react": "^8.5.1",
56
+ "@storybook/test": "^8.5.1",
57
+ "@types/react": "19.0.8",
60
58
  "@types/react-dom": "^19.0.3",
61
- "@typescript-eslint/eslint-plugin": "^8.19.1",
62
- "@typescript-eslint/parser": "^8.19.1",
63
- "chromatic": "^11.24.0",
59
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
60
+ "@typescript-eslint/parser": "^8.21.0",
61
+ "chromatic": "^11.25.1",
64
62
  "eslint": "^9.18.0",
65
- "eslint-config-next": "^15.1.4",
66
- "eslint-config-prettier": "^9.1.0",
67
- "eslint-plugin-prettier": "^5.2.1",
63
+ "eslint-config-next": "^15.1.6",
64
+ "eslint-config-prettier": "^10.0.1",
65
+ "eslint-plugin-prettier": "^5.2.3",
68
66
  "eslint-plugin-storybook": "^0.11.2",
69
67
  "prettier": "^3.4.2",
70
68
  "react": "^19.0.0",
@@ -1,4 +1,3 @@
1
- // src\components\Card\index.tsx
2
1
  'use client'
3
2
 
4
3
  import React from 'react'
@@ -156,6 +155,9 @@ type CardProps = Omit<
156
155
  /** Callback when the checkbox changes */
157
156
  onCheck?: (event: React.ChangeEvent<HTMLInputElement>) => void
158
157
 
158
+ /** Whether the task card is disabled */
159
+ disabled?: boolean // NEW
160
+
159
161
  /**
160
162
  * Optional drag & drop props if you want the card itself
161
163
  * to handle drag events.
@@ -316,6 +318,7 @@ function Card({
316
318
  description={taskProps?.description}
317
319
  checked={taskProps?.checked}
318
320
  onCheck={taskProps?.onCheck}
321
+ disabled={taskProps?.disabled} // NEW
319
322
  />
320
323
  </Box>
321
324
  )
@@ -5,18 +5,16 @@ import React from 'react'
5
5
  import { Paper, Box, Checkbox, PaperProps } from '@mui/material'
6
6
  import Typography from '../../../../components/Typography'
7
7
 
8
- /**
9
- * A simpler definition: we extend PaperProps directly
10
- * but REMOVE all drag-related props.
11
- */
12
8
  interface TaskCardProps extends PaperProps {
13
9
  title?: string
14
10
  description?: string
15
11
  /** Whether the card is currently checked/selected. */
16
12
  checked?: boolean
13
+ /** Disables the checkbox (prevents selection). */
14
+ disabled?: boolean
17
15
  /** Called when the user toggles the checkbox. */
18
16
  onCheck?: (event: React.ChangeEvent<HTMLInputElement>) => void
19
-
17
+ /** Height of the card. */
20
18
  height?: string | number
21
19
  }
22
20
 
@@ -24,6 +22,7 @@ const TaskCard: React.FC<TaskCardProps> = ({
24
22
  title = 'Task Title',
25
23
  description = 'Description',
26
24
  checked = false,
25
+ disabled = false, // <--- NEW
27
26
  onCheck,
28
27
  height = 'auto',
29
28
  sx,
@@ -51,6 +50,7 @@ const TaskCard: React.FC<TaskCardProps> = ({
51
50
  {/* A checkbox in the upper-right corner */}
52
51
  <Checkbox
53
52
  checked={checked}
53
+ disabled={disabled} // <--- NEW
54
54
  onChange={onCheck}
55
55
  color="primary"
56
56
  sx={{
@@ -1,5 +1,3 @@
1
- 'use server'
2
-
3
1
  import { RichTextEditorTypes } from '../types'
4
2
  import React from 'react'
5
3
 
@@ -1,6 +1,7 @@
1
1
  'use client'
2
2
  import React from 'react'
3
- import ProjectBoard, { ProjectBoardProps } from '../../../ProjectBoard'
3
+ import ProjectBoard from '../../../ProjectBoard'
4
+ import { ProjectBoardProps } from '../../../ProjectBoard/types'
4
5
  import { columnconfig, cellconfig } from '../../../Grid'
5
6
 
6
7
  /**
@@ -5,7 +5,6 @@ import { Box, Alert } from '@mui/material'
5
5
  import CustomToolbar from '../Toolbar'
6
6
  import Table from './Table'
7
7
  import CustomFooter from './Footer'
8
- import ManageRow from './ManageRow'
9
8
  import { woad } from '../../styles/palette'
10
9
  import { useSearchbar } from './utils/useToolbarSearchbar'
11
10
  import { useManageRow } from './utils/useManageRow'
@@ -107,22 +106,22 @@ function DataGrid({
107
106
 
108
107
  <CustomToolbar
109
108
  buttons={buttons}
110
- dropdowns={dropdowns}
109
+ dropdown={dropdowns?.[0]}
111
110
  searchbarProps={updatedSearchbarProps}
112
- customComponent={
113
- selectedRows.length > 0 ? (
114
- <ManageRow
115
- selectedRows={selectedRows}
116
- rows={rows}
117
- onDuplicate={
118
- onDuplicate ? () => onDuplicate(selectedRows) : undefined
111
+ rightCenterProps={
112
+ selectedRows.length > 0
113
+ ? {
114
+ selectedRows,
115
+ rows,
116
+ onDuplicate: onDuplicate
117
+ ? () => onDuplicate(selectedRows)
118
+ : undefined,
119
+ onDelete: onDelete ? () => onDelete(selectedRows) : undefined,
120
+ onManage: handleManage,
121
+ onShow: onShow,
122
+ handleClose: handleManageRowClose,
119
123
  }
120
- onDelete={onDelete ? () => onDelete(selectedRows) : undefined}
121
- onManage={handleManage}
122
- onShow={onShow}
123
- handleClose={handleManageRowClose}
124
- />
125
- ) : null
124
+ : undefined
126
125
  }
127
126
  />
128
127
 
@@ -4,7 +4,7 @@
4
4
  import React from 'react'
5
5
  import { Box } from '@mui/material'
6
6
  import ContentSection from '../../Content'
7
- import type { ProjectBoardProps } from '../../ProjectBoard'
7
+ import { ProjectBoardProps } from '../../ProjectBoard/types'
8
8
 
9
9
  /**
10
10
  * Props for FormProjectBoard.
@@ -17,7 +17,7 @@ import type {
17
17
  RawCustomer,
18
18
  RawEmployee,
19
19
  RawSeverityLevel,
20
- } from '../index'
20
+ } from '../types'
21
21
 
22
22
  export type AddTaskVariant = 'customer' | 'company' | 'administrator'
23
23