@sps-woodland/column-manager 8.4.9 → 8.5.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.
- package/lib/column-manager/ColumnManager.d.ts +3 -1
- package/lib/index.cjs.js +5 -5
- package/lib/index.es.js +82 -78
- package/package.json +11 -11
|
@@ -14,8 +14,10 @@ export declare type ColumnmanagerProps = ComponentProps<{
|
|
|
14
14
|
showCount?: boolean;
|
|
15
15
|
showFilter?: boolean;
|
|
16
16
|
showMoveAllLinks?: boolean;
|
|
17
|
+
cancelButtonText?: string;
|
|
18
|
+
saveButtonText?: string;
|
|
17
19
|
onSave?: (visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void;
|
|
18
20
|
onClose?: () => void;
|
|
19
21
|
onOpen?: () => void;
|
|
20
22
|
}>;
|
|
21
|
-
export declare function ColumnManager({ isOpen: isOpenProp, title, visibleColumnsHeader, hiddenColumnsHeader, visibleColumns, hiddenColumns, maxDisplayedItems, manualSort, showIcons, showCount, showFilter, showMoveAllLinks, onSave, onOpen, onClose, "data-testid": dataTestId, }: ColumnmanagerProps): React.JSX.Element | null;
|
|
23
|
+
export declare function ColumnManager({ isOpen: isOpenProp, title, visibleColumnsHeader, hiddenColumnsHeader, visibleColumns, hiddenColumns, maxDisplayedItems, manualSort, showIcons, showCount, showFilter, showMoveAllLinks, cancelButtonText, saveButtonText, onSave, onOpen, onClose, "data-testid": dataTestId, }: ColumnmanagerProps): React.JSX.Element | null;
|
package/lib/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("react"),P=require("@sps-woodland/core"),A=require("@sps-woodland/add-to-list"),L=require("@sps-woodland/tokens"),h=require("@spscommerce/ds-react"),C=require("@spscommerce/ds-shared"),b=require("@spscommerce/utils");function q(n){if(n&&n.__esModule)return n;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(r,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}return r.default=n,Object.freeze(r)}const e=q(I);function O({isOpen:n,title:r,visibleColumnsHeader:o,hiddenColumnsHeader:s,visibleColumns:u,hiddenColumns:d,maxDisplayedItems:a,manualSort:i=!0,showIcons:g=!0,showCount:f=!0,showFilter:v=!0,showMoveAllLinks:E=!0,cancelButtonText:M,saveButtonText:l,onSave:t,onOpen:m,onClose:k,"data-testid":H}){const[S,B]=e.useState(!!n),{t:c}=e.useContext(P.I18nContext),w=P.useChildTestIdAttrBuilder({"data-testid":H}),[p,T]=e.useState({visibleColumns:u,hiddenColumns:d}),y=()=>{B(!1),k==null||k()};return e.useEffect(()=>{S&&(T({visibleColumns:u,hiddenColumns:d}),m==null||m())},[S]),e.useEffect(()=>{B(!!n)},[n]),S?e.createElement(h.SpsModal,{title:r||c("design-system:columnManager.title"),kind:C.ModalKind.GENERAL,size:C.ModalSize.LARGE,"data-testid":H,onClose:y},e.createElement(A.AddToList,{onHeader:o||c("design-system:columnManager.onListHeader"),offHeader:s||c("design-system:columnManager.offListHeader"),onList:p.visibleColumns,offList:p.hiddenColumns,onChange:R=>{T({visibleColumns:R.onList,hiddenColumns:R.offList})},manualSort:i,maxDisplayedItems:a,showIcons:g,showCount:f,showFilter:v,showMoveAllLinks:E,...w("add-to-list")}),e.createElement(h.SpsModalFooter,null,e.createElement(h.SpsButton,{kind:C.ButtonKind.DEFAULT,onClick:()=>{T({visibleColumns:u,hiddenColumns:d}),y()},className:L.sprinkles({mr:"sm"}),...w("cancel-button")},M||c("design-system:columnManager.cancelButton")),e.createElement(h.SpsButton,{kind:C.ButtonKind.KEY,onClick:()=>{t==null||t(p.visibleColumns,p.hiddenColumns),y()},...w("save-button")},l||c("design-system:columnManager.saveButton")))):null}P.Metadata.set(O,{name:"Column Manager",props:{isOpen:{type:"boolean",required:!0},title:{type:"string"},visibleColumnsHeader:{type:"string"},hiddenColumnsHeader:{type:"string"},visibleColumns:{type:"ItemProps[]",required:!0},hiddenColumns:{type:"ItemProps[]",required:!0},manualSort:{type:"boolean"},maxDisplayedItems:{type:"number"},showIcons:{type:"boolean"},showCount:{type:"boolean"},showFilter:{type:"boolean"},showMoveAllLinks:{type:"boolean"},cancelButtonText:{type:"string"},saveButtonText:{type:"string"},onSave:{type:"(visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void"},onClose:{type:"() => void"},onOpen:{type:"() => void"}}});const j=({isOpen:n,visibleColumns:r,hiddenColumns:o,onClose:s,onOpen:u,onSave:d})=>{const[a,i]=e.useState({isOpen:!!n,visibleColumns:r,hiddenColumns:o});e.useEffect(()=>{i(l=>({...l,isOpen:!!n}))},[n]);const g=()=>{i(l=>({...l,isOpen:!0})),u==null||u()},f=()=>{i(l=>({...l,isOpen:!1})),s==null||s()},v=(l,t)=>{i({isOpen:!1,visibleColumns:l,hiddenColumns:t}),d==null||d(l,t)},E=e.useCallback((l,t)=>{i(m=>({...m,visibleColumns:l,hiddenColumns:t}))},[]),M=e.useCallback(l=>{i(t=>({...t,isOpen:l}))},[]);return{visibleColumns:a.visibleColumns,hiddenColumns:a.hiddenColumns,isOpen:a.isOpen,columnManagerProps:{visibleColumns:a.visibleColumns,hiddenColumns:a.hiddenColumns,isOpen:a.isOpen,onClose:f,onSave:v},triggerProps:{onClick:g},setColumns:E,setOpen:M}},x={components:[O],examples:{basic:{label:"Basic Usage",examples:{basic:{react:b.code`
|
|
2
2
|
import { ColumnManager } from "@sps-woodland/column-manager";
|
|
3
3
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
4
4
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
)
|
|
52
52
|
}
|
|
53
|
-
`}}},hooks:{label:"useColumnManager hook",description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Arguments"),e.createElement("p",null,"The column manager comes with a ",e.createElement("code",null,"useColumnManager")," hook that implements the default behavior. Arguments for this hook include:"),e.createElement("dl",null,e.createElement("dt",null,e.createElement("code",null,"visibleColumns"),": ItemProps[] (required)"),e.createElement("dd",null,"The initial visible columns state"),e.createElement("dt",null,e.createElement("code",null,"hiddenColumns"),": ItemProps[] (required)"),e.createElement("dd",null,"The initial hidden columns state"),e.createElement("dt",null,e.createElement("code",null,"isOpen"),": boolean (optional)"),e.createElement("dd",null,"Whether the column manager is open by default"),e.createElement("dt",null,e.createElement("code",null,"onOpen"),": function (optional)"),e.createElement("dd",null,"Handler that is called when the column manager opens",e.createElement("code",null,"() => void")),e.createElement("dt",null,e.createElement("code",null,"onClose"),": function (optional)"),e.createElement("dd",null,"Handler that is called when the column manager closes",e.createElement("code",null,"() => void")),e.createElement("dt",null,e.createElement("code",null,"onSave"),": function (optional)"),e.createElement("dd",null,"Handler that is called when the column manager saves",e.createElement("code",null,"(visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void"))),e.createElement("h5",null,"Return value"),e.createElement("p",null,"The ",e.createElement("code",null,"useColumnManager")," hook returns an object with"," ",e.createElement("code",null,"visibleColumns"),", ",e.createElement("code",null,"hiddenColumns"),", ",e.createElement("code",null,"columnManagerProps"),", ",e.createElement("code",null,"triggerProps")," ,",e.createElement("code",null,"setColumns")," and ",e.createElement("code",null,"setOpen")),e.createElement("p",null,e.createElement("code",null,"triggerProps"),": needs to be spread on the element that triggers the modal."),e.createElement("p",null,e.createElement("code",null,"columnManagerProps"),": needs to be spread on the ",e.createElement("code",null,"ColumnManager")," ","component"),e.createElement("p",null,e.createElement("code",null,"visibleColumns"),": the current state of the visible columns"),e.createElement("p",null,e.createElement("code",null,"hiddenColumns"),": the current state of the hidden columns"),e.createElement("p",null,e.createElement("code",null,"setColumns"),": function that allows programmatically setting the current state of the visible and hidden columns. This function is safe to use in effects."),e.createElement("p",null,e.createElement("code",null,"setOpen"),": function that allows programmatically setting the current isOpen state. This function is safe to use in effects."),e.createElement("p",null,"Please refer to the examples to see its implementation"))},hooksExamples:{label:"Hook Usage",examples:{basic:{description:"Minimal API Reference",react:
|
|
53
|
+
`}}},hooks:{label:"useColumnManager hook",description:()=>e.createElement(e.Fragment,null,e.createElement("h5",null,"Arguments"),e.createElement("p",null,"The column manager comes with a ",e.createElement("code",null,"useColumnManager")," hook that implements the default behavior. Arguments for this hook include:"),e.createElement("dl",null,e.createElement("dt",null,e.createElement("code",null,"visibleColumns"),": ItemProps[] (required)"),e.createElement("dd",null,"The initial visible columns state"),e.createElement("dt",null,e.createElement("code",null,"hiddenColumns"),": ItemProps[] (required)"),e.createElement("dd",null,"The initial hidden columns state"),e.createElement("dt",null,e.createElement("code",null,"isOpen"),": boolean (optional)"),e.createElement("dd",null,"Whether the column manager is open by default"),e.createElement("dt",null,e.createElement("code",null,"onOpen"),": function (optional)"),e.createElement("dd",null,"Handler that is called when the column manager opens",e.createElement("code",null,"() => void")),e.createElement("dt",null,e.createElement("code",null,"onClose"),": function (optional)"),e.createElement("dd",null,"Handler that is called when the column manager closes",e.createElement("code",null,"() => void")),e.createElement("dt",null,e.createElement("code",null,"onSave"),": function (optional)"),e.createElement("dd",null,"Handler that is called when the column manager saves",e.createElement("code",null,"(visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void"))),e.createElement("h5",null,"Return value"),e.createElement("p",null,"The ",e.createElement("code",null,"useColumnManager")," hook returns an object with"," ",e.createElement("code",null,"visibleColumns"),", ",e.createElement("code",null,"hiddenColumns"),", ",e.createElement("code",null,"columnManagerProps"),", ",e.createElement("code",null,"triggerProps")," ,",e.createElement("code",null,"setColumns")," and ",e.createElement("code",null,"setOpen")),e.createElement("p",null,e.createElement("code",null,"triggerProps"),": needs to be spread on the element that triggers the modal."),e.createElement("p",null,e.createElement("code",null,"columnManagerProps"),": needs to be spread on the ",e.createElement("code",null,"ColumnManager")," ","component"),e.createElement("p",null,e.createElement("code",null,"visibleColumns"),": the current state of the visible columns"),e.createElement("p",null,e.createElement("code",null,"hiddenColumns"),": the current state of the hidden columns"),e.createElement("p",null,e.createElement("code",null,"setColumns"),": function that allows programmatically setting the current state of the visible and hidden columns. This function is safe to use in effects."),e.createElement("p",null,e.createElement("code",null,"setOpen"),": function that allows programmatically setting the current isOpen state. This function is safe to use in effects."),e.createElement("p",null,"Please refer to the examples to see its implementation"))},hooksExamples:{label:"Hook Usage",examples:{basic:{description:"Minimal API Reference",react:b.code`
|
|
54
54
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
55
55
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
56
56
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</div>
|
|
86
86
|
)
|
|
87
87
|
}
|
|
88
|
-
`},complete:{description:"Complete API Reference",react:
|
|
88
|
+
`},complete:{description:"Complete API Reference",react:b.code`
|
|
89
89
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
90
90
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
91
91
|
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
</div>
|
|
137
137
|
)
|
|
138
138
|
}
|
|
139
|
-
`}}},minimalInterface:{label:"Minimal Interface",examples:{basic:{description:"This is the minimal visual interface for the ColumnManager component",react:
|
|
139
|
+
`}}},minimalInterface:{label:"Minimal Interface",examples:{basic:{description:"This is the minimal visual interface for the ColumnManager component",react:b.code`
|
|
140
140
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
141
141
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
142
142
|
|
|
@@ -176,4 +176,4 @@
|
|
|
176
176
|
</div>
|
|
177
177
|
)
|
|
178
178
|
}
|
|
179
|
-
`}}}}},
|
|
179
|
+
`}}}}},F={"Column Manager":x};exports.ColumnManager=O;exports.MANIFEST=F;exports.useColumnManager=j;
|
package/lib/index.es.js
CHANGED
|
@@ -1,91 +1,93 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import { AddToList as
|
|
4
|
-
import { sprinkles as
|
|
5
|
-
import { SpsModal as
|
|
6
|
-
import { ModalKind as
|
|
7
|
-
import { code as
|
|
8
|
-
function
|
|
2
|
+
import { Metadata as R, I18nContext as I, useChildTestIdAttrBuilder as A } from "@sps-woodland/core";
|
|
3
|
+
import { AddToList as L } from "@sps-woodland/add-to-list";
|
|
4
|
+
import { sprinkles as x } from "@sps-woodland/tokens";
|
|
5
|
+
import { SpsModal as F, SpsModalFooter as j, SpsButton as P } from "@spscommerce/ds-react";
|
|
6
|
+
import { ModalKind as q, ModalSize as V, ButtonKind as O } from "@spscommerce/ds-shared";
|
|
7
|
+
import { code as c } from "@spscommerce/utils";
|
|
8
|
+
function B({
|
|
9
9
|
isOpen: s,
|
|
10
|
-
title:
|
|
11
|
-
visibleColumnsHeader:
|
|
10
|
+
title: p,
|
|
11
|
+
visibleColumnsHeader: h,
|
|
12
12
|
hiddenColumnsHeader: r,
|
|
13
13
|
visibleColumns: a,
|
|
14
14
|
hiddenColumns: i,
|
|
15
15
|
maxDisplayedItems: t,
|
|
16
16
|
manualSort: o = !0,
|
|
17
|
-
showIcons:
|
|
18
|
-
showCount:
|
|
19
|
-
showFilter:
|
|
20
|
-
showMoveAllLinks:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
showIcons: C = !0,
|
|
18
|
+
showCount: b = !0,
|
|
19
|
+
showFilter: f = !0,
|
|
20
|
+
showMoveAllLinks: g = !0,
|
|
21
|
+
cancelButtonText: v,
|
|
22
|
+
saveButtonText: n,
|
|
23
|
+
onSave: l,
|
|
24
|
+
onOpen: m,
|
|
25
|
+
onClose: E,
|
|
26
|
+
"data-testid": T
|
|
25
27
|
}) {
|
|
26
|
-
const [
|
|
28
|
+
const [M, y] = e.useState(!!s), { t: u } = e.useContext(I), k = A({ "data-testid": T }), [d, S] = e.useState({
|
|
27
29
|
visibleColumns: a,
|
|
28
30
|
hiddenColumns: i
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
+
}), w = () => {
|
|
32
|
+
y(!1), E == null || E();
|
|
31
33
|
};
|
|
32
34
|
return e.useEffect(() => {
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
|
|
36
|
-
}, [s]),
|
|
37
|
-
|
|
35
|
+
M && (S({ visibleColumns: a, hiddenColumns: i }), m == null || m());
|
|
36
|
+
}, [M]), e.useEffect(() => {
|
|
37
|
+
y(!!s);
|
|
38
|
+
}, [s]), M ? /* @__PURE__ */ e.createElement(
|
|
39
|
+
F,
|
|
38
40
|
{
|
|
39
|
-
title:
|
|
40
|
-
kind:
|
|
41
|
-
size:
|
|
42
|
-
"data-testid":
|
|
43
|
-
onClose:
|
|
41
|
+
title: p || u("design-system:columnManager.title"),
|
|
42
|
+
kind: q.GENERAL,
|
|
43
|
+
size: V.LARGE,
|
|
44
|
+
"data-testid": T,
|
|
45
|
+
onClose: w
|
|
44
46
|
},
|
|
45
47
|
/* @__PURE__ */ e.createElement(
|
|
46
|
-
|
|
48
|
+
L,
|
|
47
49
|
{
|
|
48
|
-
onHeader:
|
|
50
|
+
onHeader: h || u("design-system:columnManager.onListHeader"),
|
|
49
51
|
offHeader: r || u("design-system:columnManager.offListHeader"),
|
|
50
|
-
onList:
|
|
51
|
-
offList:
|
|
52
|
+
onList: d.visibleColumns,
|
|
53
|
+
offList: d.hiddenColumns,
|
|
52
54
|
onChange: (H) => {
|
|
53
|
-
|
|
55
|
+
S({ visibleColumns: H.onList, hiddenColumns: H.offList });
|
|
54
56
|
},
|
|
55
57
|
manualSort: o,
|
|
56
58
|
maxDisplayedItems: t,
|
|
57
|
-
showIcons:
|
|
58
|
-
showCount:
|
|
59
|
-
showFilter:
|
|
60
|
-
showMoveAllLinks:
|
|
61
|
-
...
|
|
59
|
+
showIcons: C,
|
|
60
|
+
showCount: b,
|
|
61
|
+
showFilter: f,
|
|
62
|
+
showMoveAllLinks: g,
|
|
63
|
+
...k("add-to-list")
|
|
62
64
|
}
|
|
63
65
|
),
|
|
64
|
-
/* @__PURE__ */ e.createElement(
|
|
66
|
+
/* @__PURE__ */ e.createElement(j, null, /* @__PURE__ */ e.createElement(
|
|
65
67
|
P,
|
|
66
68
|
{
|
|
67
|
-
kind:
|
|
69
|
+
kind: O.DEFAULT,
|
|
68
70
|
onClick: () => {
|
|
69
|
-
|
|
71
|
+
S({ visibleColumns: a, hiddenColumns: i }), w();
|
|
70
72
|
},
|
|
71
|
-
className:
|
|
72
|
-
...
|
|
73
|
+
className: x({ mr: "sm" }),
|
|
74
|
+
...k("cancel-button")
|
|
73
75
|
},
|
|
74
|
-
u("design-system:columnManager.cancelButton")
|
|
76
|
+
v || u("design-system:columnManager.cancelButton")
|
|
75
77
|
), /* @__PURE__ */ e.createElement(
|
|
76
78
|
P,
|
|
77
79
|
{
|
|
78
|
-
kind:
|
|
80
|
+
kind: O.KEY,
|
|
79
81
|
onClick: () => {
|
|
80
|
-
|
|
82
|
+
l == null || l(d.visibleColumns, d.hiddenColumns), w();
|
|
81
83
|
},
|
|
82
|
-
...
|
|
84
|
+
...k("save-button")
|
|
83
85
|
},
|
|
84
|
-
u("design-system:columnManager.saveButton")
|
|
86
|
+
n || u("design-system:columnManager.saveButton")
|
|
85
87
|
))
|
|
86
88
|
) : null;
|
|
87
89
|
}
|
|
88
|
-
|
|
90
|
+
R.set(B, {
|
|
89
91
|
name: "Column Manager",
|
|
90
92
|
props: {
|
|
91
93
|
isOpen: { type: "boolean", required: !0 },
|
|
@@ -100,36 +102,38 @@ O.set(y, {
|
|
|
100
102
|
showCount: { type: "boolean" },
|
|
101
103
|
showFilter: { type: "boolean" },
|
|
102
104
|
showMoveAllLinks: { type: "boolean" },
|
|
105
|
+
cancelButtonText: { type: "string" },
|
|
106
|
+
saveButtonText: { type: "string" },
|
|
103
107
|
onSave: { type: "(visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void" },
|
|
104
108
|
onClose: { type: "() => void" },
|
|
105
109
|
onOpen: { type: "() => void" }
|
|
106
110
|
}
|
|
107
111
|
});
|
|
108
|
-
const
|
|
112
|
+
const W = ({
|
|
109
113
|
isOpen: s,
|
|
110
|
-
visibleColumns:
|
|
111
|
-
hiddenColumns:
|
|
114
|
+
visibleColumns: p,
|
|
115
|
+
hiddenColumns: h,
|
|
112
116
|
onClose: r,
|
|
113
117
|
onOpen: a,
|
|
114
118
|
onSave: i
|
|
115
119
|
}) => {
|
|
116
120
|
const [t, o] = e.useState({
|
|
117
121
|
isOpen: !!s,
|
|
118
|
-
visibleColumns:
|
|
119
|
-
hiddenColumns:
|
|
122
|
+
visibleColumns: p,
|
|
123
|
+
hiddenColumns: h
|
|
120
124
|
});
|
|
121
125
|
e.useEffect(() => {
|
|
122
126
|
o((n) => ({ ...n, isOpen: !!s }));
|
|
123
127
|
}, [s]);
|
|
124
|
-
const
|
|
128
|
+
const C = () => {
|
|
125
129
|
o((n) => ({ ...n, isOpen: !0 })), a == null || a();
|
|
126
|
-
},
|
|
130
|
+
}, b = () => {
|
|
127
131
|
o((n) => ({ ...n, isOpen: !1 })), r == null || r();
|
|
128
|
-
},
|
|
132
|
+
}, f = (n, l) => {
|
|
129
133
|
o({ isOpen: !1, visibleColumns: n, hiddenColumns: l }), i == null || i(n, l);
|
|
130
|
-
},
|
|
131
|
-
o((
|
|
132
|
-
}, []),
|
|
134
|
+
}, g = e.useCallback((n, l) => {
|
|
135
|
+
o((m) => ({ ...m, visibleColumns: n, hiddenColumns: l }));
|
|
136
|
+
}, []), v = e.useCallback((n) => {
|
|
133
137
|
o((l) => ({ ...l, isOpen: n }));
|
|
134
138
|
}, []);
|
|
135
139
|
return {
|
|
@@ -140,23 +144,23 @@ const D = ({
|
|
|
140
144
|
visibleColumns: t.visibleColumns,
|
|
141
145
|
hiddenColumns: t.hiddenColumns,
|
|
142
146
|
isOpen: t.isOpen,
|
|
143
|
-
onClose:
|
|
144
|
-
onSave:
|
|
147
|
+
onClose: b,
|
|
148
|
+
onSave: f
|
|
145
149
|
},
|
|
146
150
|
triggerProps: {
|
|
147
|
-
onClick:
|
|
151
|
+
onClick: C
|
|
148
152
|
},
|
|
149
|
-
setColumns:
|
|
150
|
-
setOpen:
|
|
153
|
+
setColumns: g,
|
|
154
|
+
setOpen: v
|
|
151
155
|
};
|
|
152
|
-
},
|
|
153
|
-
components: [
|
|
156
|
+
}, J = {
|
|
157
|
+
components: [B],
|
|
154
158
|
examples: {
|
|
155
159
|
basic: {
|
|
156
160
|
label: "Basic Usage",
|
|
157
161
|
examples: {
|
|
158
162
|
basic: {
|
|
159
|
-
react:
|
|
163
|
+
react: c`
|
|
160
164
|
import { ColumnManager } from "@sps-woodland/column-manager";
|
|
161
165
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
162
166
|
|
|
@@ -221,7 +225,7 @@ const D = ({
|
|
|
221
225
|
examples: {
|
|
222
226
|
basic: {
|
|
223
227
|
description: "Minimal API Reference",
|
|
224
|
-
react:
|
|
228
|
+
react: c`
|
|
225
229
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
226
230
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
227
231
|
|
|
@@ -260,7 +264,7 @@ const D = ({
|
|
|
260
264
|
},
|
|
261
265
|
complete: {
|
|
262
266
|
description: "Complete API Reference",
|
|
263
|
-
react:
|
|
267
|
+
react: c`
|
|
264
268
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
265
269
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
266
270
|
|
|
@@ -320,7 +324,7 @@ const D = ({
|
|
|
320
324
|
examples: {
|
|
321
325
|
basic: {
|
|
322
326
|
description: "This is the minimal visual interface for the ColumnManager component",
|
|
323
|
-
react:
|
|
327
|
+
react: c`
|
|
324
328
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
325
329
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
326
330
|
|
|
@@ -365,11 +369,11 @@ const D = ({
|
|
|
365
369
|
}
|
|
366
370
|
}
|
|
367
371
|
}
|
|
368
|
-
},
|
|
369
|
-
"Column Manager":
|
|
372
|
+
}, Y = {
|
|
373
|
+
"Column Manager": J
|
|
370
374
|
};
|
|
371
375
|
export {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
376
|
+
B as ColumnManager,
|
|
377
|
+
Y as MANIFEST,
|
|
378
|
+
W as useColumnManager
|
|
375
379
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/column-manager",
|
|
3
3
|
"description": "SPS Woodland Design System column manager component",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.5.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/column-manager",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"@vanilla-extract/css-utils": "^0.1.3",
|
|
27
27
|
"react": "^16.9.0",
|
|
28
28
|
"react-dom": "^16.9.0",
|
|
29
|
-
"@sps-woodland/core": "8.
|
|
30
|
-
"@sps-woodland/add-to-list": "8.
|
|
31
|
-
"@sps-woodland/tokens": "8.
|
|
32
|
-
"@spscommerce/ds-react": "8.
|
|
33
|
-
"@spscommerce/ds-shared": "8.
|
|
29
|
+
"@sps-woodland/core": "8.5.0",
|
|
30
|
+
"@sps-woodland/add-to-list": "8.5.0",
|
|
31
|
+
"@sps-woodland/tokens": "8.5.0",
|
|
32
|
+
"@spscommerce/ds-react": "8.5.0",
|
|
33
|
+
"@spscommerce/ds-shared": "8.5.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "^6.12.1",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@vanilla-extract/css-utils": "^0.1.3",
|
|
40
40
|
"react": "^16.9.0",
|
|
41
41
|
"react-dom": "^16.9.0",
|
|
42
|
-
"@sps-woodland/core": "8.
|
|
43
|
-
"@sps-woodland/add-to-list": "8.
|
|
44
|
-
"@sps-woodland/tokens": "8.
|
|
45
|
-
"@spscommerce/ds-react": "8.
|
|
46
|
-
"@spscommerce/ds-shared": "8.
|
|
42
|
+
"@sps-woodland/core": "8.5.0",
|
|
43
|
+
"@sps-woodland/add-to-list": "8.5.0",
|
|
44
|
+
"@sps-woodland/tokens": "8.5.0",
|
|
45
|
+
"@spscommerce/ds-react": "8.5.0",
|
|
46
|
+
"@spscommerce/ds-shared": "8.5.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"nanoid": "^3.3.4"
|