@object-ui/plugin-kanban 3.1.5 → 3.3.0

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 (50) hide show
  1. package/.turbo/turbo-build.log +13 -13
  2. package/CHANGELOG.md +18 -0
  3. package/dist/{KanbanEnhanced-CvxO2soF.js → KanbanEnhanced-TdUe0kQH.js} +4 -4
  4. package/dist/{KanbanImpl-ii52_k8g.js → KanbanImpl-BtlPa7GE.js} +2 -2
  5. package/dist/{chevron-down-DpXJN6OX.js → chevron-down-B6UH8BbF.js} +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +35 -26
  8. package/dist/index.umd.cjs +4 -4
  9. package/dist/packages/plugin-kanban/src/CardTemplates.d.ts.map +1 -0
  10. package/dist/packages/plugin-kanban/src/InlineQuickAdd.d.ts.map +1 -0
  11. package/dist/packages/plugin-kanban/src/KanbanEnhanced.d.ts.map +1 -0
  12. package/dist/packages/plugin-kanban/src/KanbanImpl.d.ts.map +1 -0
  13. package/dist/packages/plugin-kanban/src/ObjectKanban.EdgeCases.stories.d.ts.map +1 -0
  14. package/dist/packages/plugin-kanban/src/ObjectKanban.d.ts.map +1 -0
  15. package/dist/packages/plugin-kanban/src/ObjectKanban.stories.d.ts.map +1 -0
  16. package/dist/packages/plugin-kanban/src/index.d.ts.map +1 -0
  17. package/dist/packages/plugin-kanban/src/types.d.ts.map +1 -0
  18. package/dist/packages/plugin-kanban/src/useColumnWidths.d.ts.map +1 -0
  19. package/dist/packages/plugin-kanban/src/useCrossSwimlaneMove.d.ts.map +1 -0
  20. package/dist/packages/plugin-kanban/src/useQuickAddReorder.d.ts.map +1 -0
  21. package/dist/{plus-CAtTu4zt.js → plus-BTqoaaEC.js} +39 -36
  22. package/dist/{sortable.esm-DzUCoMzQ.js → sortable.esm-LJG1TjKd.js} +4 -4
  23. package/package.json +9 -9
  24. package/src/ObjectKanban.msw.test.tsx +5 -1
  25. package/src/ObjectKanban.tsx +15 -1
  26. package/vite.config.ts +1 -0
  27. package/dist/src/CardTemplates.d.ts.map +0 -1
  28. package/dist/src/InlineQuickAdd.d.ts.map +0 -1
  29. package/dist/src/KanbanEnhanced.d.ts.map +0 -1
  30. package/dist/src/KanbanImpl.d.ts.map +0 -1
  31. package/dist/src/ObjectKanban.EdgeCases.stories.d.ts.map +0 -1
  32. package/dist/src/ObjectKanban.d.ts.map +0 -1
  33. package/dist/src/ObjectKanban.stories.d.ts.map +0 -1
  34. package/dist/src/index.d.ts.map +0 -1
  35. package/dist/src/types.d.ts.map +0 -1
  36. package/dist/src/useColumnWidths.d.ts.map +0 -1
  37. package/dist/src/useCrossSwimlaneMove.d.ts.map +0 -1
  38. package/dist/src/useQuickAddReorder.d.ts.map +0 -1
  39. /package/dist/{src → packages/plugin-kanban/src}/CardTemplates.d.ts +0 -0
  40. /package/dist/{src → packages/plugin-kanban/src}/InlineQuickAdd.d.ts +0 -0
  41. /package/dist/{src → packages/plugin-kanban/src}/KanbanEnhanced.d.ts +0 -0
  42. /package/dist/{src → packages/plugin-kanban/src}/KanbanImpl.d.ts +0 -0
  43. /package/dist/{src → packages/plugin-kanban/src}/ObjectKanban.EdgeCases.stories.d.ts +0 -0
  44. /package/dist/{src → packages/plugin-kanban/src}/ObjectKanban.d.ts +0 -0
  45. /package/dist/{src → packages/plugin-kanban/src}/ObjectKanban.stories.d.ts +0 -0
  46. /package/dist/{src → packages/plugin-kanban/src}/index.d.ts +0 -0
  47. /package/dist/{src → packages/plugin-kanban/src}/types.d.ts +0 -0
  48. /package/dist/{src → packages/plugin-kanban/src}/useColumnWidths.d.ts +0 -0
  49. /package/dist/{src → packages/plugin-kanban/src}/useCrossSwimlaneMove.d.ts +0 -0
  50. /package/dist/{src → packages/plugin-kanban/src}/useQuickAddReorder.d.ts +0 -0
@@ -1,9 +1,9 @@
1
1
 
2
- > @object-ui/plugin-kanban@3.1.5 build /home/runner/work/objectui/objectui/packages/plugin-kanban
2
+ > @object-ui/plugin-kanban@3.3.0 build /home/runner/work/objectui/objectui/packages/plugin-kanban
3
3
  > vite build
4
4
 
5
- vite v8.0.1 building client environment for production...
6
- 
5
+ vite v8.0.8 building client environment for production...
6
+ 
7
7
  rendering chunks...
8
8
  
9
9
  [vite:dts] Start generate declaration files...
@@ -12,21 +12,21 @@ rendering chunks...
12
12
  37 ...props
13
13
     ~~~~~
14
14
 
15
- [vite:dts] Declaration files built in 29215ms.
15
+ [vite:dts] Declaration files built in 29653ms.
16
16
  
17
17
  computing gzip size...
18
- dist/chevron-down-DpXJN6OX.js 0.15 kB │ gzip: 0.15 kB
19
- dist/plus-CAtTu4zt.js 9.27 kB │ gzip: 3.54 kB
20
- dist/KanbanImpl-ii52_k8g.js 13.64 kB │ gzip: 4.14 kB
21
- dist/index.js 18.79 kB │ gzip: 5.91 kB
22
- dist/KanbanEnhanced-CvxO2soF.js 30.93 kB │ gzip: 9.18 kB
23
- dist/sortable.esm-DzUCoMzQ.js 60.78 kB │ gzip: 17.98 kB
18
+ dist/chevron-down-B6UH8BbF.js 0.15 kB │ gzip: 0.15 kB
19
+ dist/plus-BTqoaaEC.js 9.53 kB │ gzip: 3.63 kB
20
+ dist/KanbanImpl-BtlPa7GE.js 13.64 kB │ gzip: 4.14 kB
21
+ dist/index.js 18.99 kB │ gzip: 5.97 kB
22
+ dist/KanbanEnhanced-TdUe0kQH.js 30.93 kB │ gzip: 9.18 kB
23
+ dist/sortable.esm-LJG1TjKd.js 60.78 kB │ gzip: 17.98 kB
24
24
 
25
25
  [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `vite:dts`. See https://rolldown.rs/options/checks#plugintimings for more details.
26
26
  
27
- 
27
+ 
28
28
  rendering chunks...
29
29
  computing gzip size...
30
- dist/index.umd.cjs 102.70 kB │ gzip: 32.38 kB
30
+ dist/index.umd.cjs 103.13 kB │ gzip: 32.58 kB
31
31
 
32
- ✓ built in 34.84s
32
+ ✓ built in 35.69s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @object-ui/plugin-kanban
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @object-ui/types@3.3.0
8
+ - @object-ui/core@3.3.0
9
+ - @object-ui/react@3.3.0
10
+ - @object-ui/components@3.3.0
11
+
12
+ ## 3.2.0
13
+
14
+ ### Patch Changes
15
+
16
+ - @object-ui/types@3.2.0
17
+ - @object-ui/core@3.2.0
18
+ - @object-ui/react@3.2.0
19
+ - @object-ui/components@3.2.0
20
+
3
21
  ## 3.1.5
4
22
 
5
23
  ### Patch Changes
@@ -1,6 +1,6 @@
1
- import { n as e, r as t, t as n } from "./plus-CAtTu4zt.js";
2
- import { t as r } from "./chevron-down-DpXJN6OX.js";
3
- import { a as i, d as a, f as o, i as s, l as c, n as l, o as u, r as d, s as f, t as p, u as m } from "./sortable.esm-DzUCoMzQ.js";
1
+ import { n as e, r as t, t as n } from "./plus-BTqoaaEC.js";
2
+ import { t as r } from "./chevron-down-B6UH8BbF.js";
3
+ import { a as i, d as a, f as o, i as s, l as c, n as l, o as u, r as d, s as f, t as p, u as m } from "./sortable.esm-LJG1TjKd.js";
4
4
  import * as h from "react";
5
5
  import { Badge as g, Button as _, Card as v, CardContent as y, CardDescription as b, CardHeader as x, CardTitle as S, Input as C } from "@object-ui/components";
6
6
  import { flushSync as w } from "react-dom";
@@ -512,7 +512,7 @@ function H({ measurements: e, outerSize: t, scrollOffset: n, lanes: r }) {
512
512
  };
513
513
  }
514
514
  //#endregion
515
- //#region ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.23_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-virtual/dist/esm/index.js
515
+ //#region ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.23_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@tanstack/react-virtual/dist/esm/index.js
516
516
  var U = typeof document < "u" ? h.useLayoutEffect : h.useEffect;
517
517
  function W({ useFlushSync: e = !0, ...t }) {
518
518
  let n = h.useReducer(() => ({}), {})[1], r = {
@@ -1,5 +1,5 @@
1
- import { r as e, t } from "./plus-CAtTu4zt.js";
2
- import { a as n, c as r, d as i, f as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./sortable.esm-DzUCoMzQ.js";
1
+ import { r as e, t } from "./plus-BTqoaaEC.js";
2
+ import { a as n, c as r, d as i, f as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./sortable.esm-LJG1TjKd.js";
3
3
  import * as m from "react";
4
4
  import { useDnd as h, useHasDndProvider as g } from "@object-ui/react";
5
5
  import { Badge as _, Button as v, Card as y, CardContent as b, CardDescription as x, CardHeader as S, CardTitle as C, Input as w, ScrollArea as T } from "@object-ui/components";
@@ -1,4 +1,4 @@
1
- import { n as e } from "./plus-CAtTu4zt.js";
1
+ import { n as e } from "./plus-BTqoaaEC.js";
2
2
  var t = e("chevron-down", [["path", {
3
3
  d: "m6 9 6 6 6-6",
4
4
  key: "qrunsl"
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './src/index'
1
+ export * from './packages/plugin-kanban/src/index'
2
2
  export {}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as e, r as t, t as n } from "./plus-CAtTu4zt.js";
2
- import { t as r } from "./chevron-down-DpXJN6OX.js";
1
+ import { n as e, r as t, t as n } from "./plus-BTqoaaEC.js";
2
+ import { t as r } from "./chevron-down-B6UH8BbF.js";
3
3
  import * as i from "react";
4
4
  import a, { Suspense as o, useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
5
5
  import { ComponentRegistry as d, buildExpandFields as f, extractRecords as p } from "@object-ui/core";
@@ -7,8 +7,16 @@ import { useDataScope as m, useNavigationOverlay as h, useSchemaContext as g } f
7
7
  import { Button as _, Input as v, NavigationOverlay as y, Skeleton as b } from "@object-ui/components";
8
8
  //#region src/ObjectKanban.tsx
9
9
  var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i, onRowClick: a, onCardClick: o, ...s }) => {
10
- let d = Array.isArray(r), [g, _] = u([]), [v, b] = u(null), [S, C] = u(d ? i ?? !1 : !1), [w, T] = u(null), E = m(e.bind);
10
+ let d = Array.isArray(r), [g, _] = u([]), [v, b] = u(null), [S, C] = u(d ? i ?? !1 : !1), [w, T] = u(null), [E, D] = u(0), O = m(e.bind);
11
11
  c(() => {
12
+ if (!d && !(!t?.onMutation || !e.objectName)) return t.onMutation((t) => {
13
+ t.resource === e.objectName && D((e) => e + 1);
14
+ });
15
+ }, [
16
+ t,
17
+ e.objectName,
18
+ d
19
+ ]), c(() => {
12
20
  d && i !== void 0 && C(i);
13
21
  }, [i, d]), c(() => {
14
22
  let n = !0;
@@ -25,7 +33,7 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
25
33
  }, [e.objectName, t]), c(() => {
26
34
  if (d) return;
27
35
  let n = !0;
28
- return e.objectName && !E && !e.data && (async () => {
36
+ return e.objectName && !O && !e.data && (async () => {
29
37
  if (!(!t || typeof t.find != "function" || !e.objectName)) {
30
38
  n && C(!0);
31
39
  try {
@@ -47,14 +55,15 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
47
55
  }, [
48
56
  e.objectName,
49
57
  t,
50
- E,
58
+ O,
51
59
  e.data,
52
60
  e.filter,
53
61
  d,
54
- v
62
+ v,
63
+ E
55
64
  ]);
56
- let D = (d ? r : void 0) || E || e.data || g, O = l(() => {
57
- if (!Array.isArray(D)) return [];
65
+ let k = (d ? r : void 0) || O || e.data || g, A = l(() => {
66
+ if (!Array.isArray(k)) return [];
58
67
  let t = e.cardTitle || e.titleField;
59
68
  if (!t && v) {
60
69
  if (v.titleFormat) {
@@ -70,7 +79,7 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
70
79
  "label",
71
80
  "display_name"
72
81
  ];
73
- return D.map((e) => {
82
+ return k.map((e) => {
74
83
  let r = t ? e[t] : void 0;
75
84
  if (!r) {
76
85
  for (let t of n) if (e[t]) {
@@ -85,10 +94,10 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
85
94
  };
86
95
  });
87
96
  }, [
88
- D,
97
+ k,
89
98
  e,
90
99
  v
91
- ]), k = l(() => {
100
+ ]), j = l(() => {
92
101
  if (e.columns && e.columns.length > 0) if (typeof e.columns[0] == "string") {
93
102
  if (!e.groupBy) return e.columns.map((e) => ({
94
103
  id: e,
@@ -99,8 +108,8 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
99
108
  id: e.value,
100
109
  title: e.label
101
110
  }));
102
- if (e.groupBy && O.length > 0) {
103
- let t = new Set(O.map((t) => t[e.groupBy]));
111
+ if (e.groupBy && A.length > 0) {
112
+ let t = new Set(A.map((t) => t[e.groupBy]));
104
113
  return Array.from(t).map((e) => ({
105
114
  id: String(e),
106
115
  title: String(e)
@@ -110,15 +119,15 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
110
119
  }, [
111
120
  e.columns,
112
121
  e.groupBy,
113
- O,
122
+ A,
114
123
  v
115
- ]), A = e.swimlaneField || e.grouping?.fields?.[0]?.field, j = {
124
+ ]), M = e.swimlaneField || e.grouping?.fields?.[0]?.field, N = {
116
125
  ...e,
117
- data: O,
118
- columns: k,
126
+ data: A,
127
+ columns: j,
119
128
  className: n || e.className,
120
- ...A ? { swimlaneField: A } : {}
121
- }, M = h({
129
+ ...M ? { swimlaneField: M } : {}
130
+ }, P = h({
122
131
  navigation: e.navigation,
123
132
  objectName: e.objectName,
124
133
  onRowClick: a ?? o
@@ -127,15 +136,15 @@ var x = t(), S = ({ schema: e, dataSource: t, className: n, data: r, loading: i,
127
136
  className: "p-4 border border-destructive/50 rounded bg-destructive/10 text-destructive",
128
137
  children: ["Error loading kanban data: ", w.message]
129
138
  });
130
- let N = e.objectName ? `${e.objectName.charAt(0).toUpperCase() + e.objectName.slice(1).replace(/_/g, " ")} Detail` : "Card Details";
139
+ let F = e.objectName ? `${e.objectName.charAt(0).toUpperCase() + e.objectName.slice(1).replace(/_/g, " ")} Detail` : "Card Details";
131
140
  return /* @__PURE__ */ (0, x.jsxs)(x.Fragment, { children: [/* @__PURE__ */ (0, x.jsx)(B, { schema: {
132
- ...j,
141
+ ...N,
133
142
  onCardClick: (e) => {
134
- M.handleClick(e), o?.(e);
143
+ P.handleClick(e), o?.(e);
135
144
  }
136
- } }), M.isOverlay && /* @__PURE__ */ (0, x.jsx)(y, {
137
- ...M,
138
- title: N,
145
+ } }), P.isOverlay && /* @__PURE__ */ (0, x.jsx)(y, {
146
+ ...P,
147
+ title: F,
139
148
  children: (e) => /* @__PURE__ */ (0, x.jsx)("div", {
140
149
  className: "space-y-3",
141
150
  children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ (0, x.jsxs)("div", {
@@ -458,7 +467,7 @@ function L(e, t) {
458
467
  }
459
468
  //#endregion
460
469
  //#region src/index.tsx
461
- var R = a.lazy(() => import("./KanbanImpl-ii52_k8g.js")), z = a.lazy(() => import("./KanbanEnhanced-CvxO2soF.js")), B = ({ schema: e }) => {
470
+ var R = a.lazy(() => import("./KanbanImpl-BtlPa7GE.js")), z = a.lazy(() => import("./KanbanEnhanced-TdUe0kQH.js")), B = ({ schema: e }) => {
462
471
  let t = a.useMemo(() => {
463
472
  let { columns: t = [], data: n, groupBy: r, coverImageField: i } = e, a = (e) => {
464
473
  if (!i) return e;