@sps-woodland/column-manager 8.56.2 → 8.56.3
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/index.js +41 -48
- package/lib/index.umd.cjs +5 -5
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ColumnManager as
|
|
1
|
+
import { ColumnManager as e } from "@sps-woodland/core/column-manager";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { code as n } from "@spscommerce/utils";
|
|
2
4
|
export * from "@sps-woodland/core/column-manager";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
basic: {
|
|
12
|
-
react: l`
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/manifest.ts
|
|
7
|
+
var r = { "Column Manager": {
|
|
8
|
+
components: [e],
|
|
9
|
+
examples: {
|
|
10
|
+
basic: {
|
|
11
|
+
label: "Basic Usage",
|
|
12
|
+
examples: { basic: { react: n`
|
|
13
13
|
import { ColumnManager } from "@sps-woodland/column-manager";
|
|
14
14
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
15
15
|
|
|
@@ -61,20 +61,18 @@ const o = {
|
|
|
61
61
|
</div>
|
|
62
62
|
)
|
|
63
63
|
}
|
|
64
|
-
`
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
description: "Minimal API Reference",
|
|
77
|
-
react: l`
|
|
64
|
+
` } }
|
|
65
|
+
},
|
|
66
|
+
hooks: {
|
|
67
|
+
label: "useColumnManager hook",
|
|
68
|
+
description: () => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("h5", null, "Arguments"), /* @__PURE__ */ t.createElement("p", null, "The column manager comes with a ", /* @__PURE__ */ t.createElement("code", null, "useColumnManager"), " hook that implements the default behavior. Arguments for this hook include:"), /* @__PURE__ */ t.createElement("dl", null, /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "visibleColumns"), ": ItemProps[] (required)"), /* @__PURE__ */ t.createElement("dd", null, "The initial visible columns state"), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "hiddenColumns"), ": ItemProps[] (required)"), /* @__PURE__ */ t.createElement("dd", null, "The initial hidden columns state"), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "isOpen"), ": boolean (optional)"), /* @__PURE__ */ t.createElement("dd", null, "Whether the column manager is open by default"), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "onOpen"), ": function (optional)"), /* @__PURE__ */ t.createElement("dd", null, "Handler that is called when the column manager opens", /* @__PURE__ */ t.createElement("code", null, "() => void")), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "onClose"), ": function (optional)"), /* @__PURE__ */ t.createElement("dd", null, "Handler that is called when the column manager closes", /* @__PURE__ */ t.createElement("code", null, "() => void")), /* @__PURE__ */ t.createElement("dt", null, /* @__PURE__ */ t.createElement("code", null, "onSave"), ": function (optional)"), /* @__PURE__ */ t.createElement("dd", null, "Handler that is called when the column manager saves", /* @__PURE__ */ t.createElement("code", null, "(visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void"))), /* @__PURE__ */ t.createElement("h5", null, "Return value"), /* @__PURE__ */ t.createElement("p", null, "The ", /* @__PURE__ */ t.createElement("code", null, "useColumnManager"), " hook returns an object with", " ", /* @__PURE__ */ t.createElement("code", null, "visibleColumns"), ", ", /* @__PURE__ */ t.createElement("code", null, "hiddenColumns"), ", ", /* @__PURE__ */ t.createElement("code", null, "columnManagerProps"), ", ", /* @__PURE__ */ t.createElement("code", null, "triggerProps"), " ,", /* @__PURE__ */ t.createElement("code", null, "setColumns"), " and ", /* @__PURE__ */ t.createElement("code", null, "setOpen")), /* @__PURE__ */ t.createElement("p", null, /* @__PURE__ */ t.createElement("code", null, "triggerProps"), ": needs to be spread on the element that triggers the modal."), /* @__PURE__ */ t.createElement("p", null, /* @__PURE__ */ t.createElement("code", null, "columnManagerProps"), ": needs to be spread on the ", /* @__PURE__ */ t.createElement("code", null, "ColumnManager"), " ", "component"), /* @__PURE__ */ t.createElement("p", null, /* @__PURE__ */ t.createElement("code", null, "visibleColumns"), ": the current state of the visible columns"), /* @__PURE__ */ t.createElement("p", null, /* @__PURE__ */ t.createElement("code", null, "hiddenColumns"), ": the current state of the hidden columns"), /* @__PURE__ */ t.createElement("p", null, /* @__PURE__ */ t.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."), /* @__PURE__ */ t.createElement("p", null, /* @__PURE__ */ t.createElement("code", null, "setOpen"), ": function that allows programmatically setting the current isOpen state. This function is safe to use in effects."), /* @__PURE__ */ t.createElement("p", null, "Please refer to the examples to see its implementation"))
|
|
69
|
+
},
|
|
70
|
+
hooksExamples: {
|
|
71
|
+
label: "Hook Usage",
|
|
72
|
+
examples: {
|
|
73
|
+
basic: {
|
|
74
|
+
description: "Minimal API Reference",
|
|
75
|
+
react: n`
|
|
78
76
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
79
77
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
80
78
|
|
|
@@ -110,10 +108,10 @@ const o = {
|
|
|
110
108
|
)
|
|
111
109
|
}
|
|
112
110
|
`
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
},
|
|
112
|
+
complete: {
|
|
113
|
+
description: "Complete API Reference",
|
|
114
|
+
react: n`
|
|
117
115
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
118
116
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
119
117
|
|
|
@@ -165,15 +163,14 @@ const o = {
|
|
|
165
163
|
)
|
|
166
164
|
}
|
|
167
165
|
`
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
react: l`
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
minimalInterface: {
|
|
170
|
+
label: "Minimal Interface",
|
|
171
|
+
examples: { basic: {
|
|
172
|
+
description: "This is the minimal visual interface for the ColumnManager component",
|
|
173
|
+
react: n`
|
|
177
174
|
import { ColumnManager, useColumnManager } from "@sps-woodland/column-manager";
|
|
178
175
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
179
176
|
|
|
@@ -214,13 +211,9 @@ const o = {
|
|
|
214
211
|
)
|
|
215
212
|
}
|
|
216
213
|
`
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
};
|
|
224
|
-
export {
|
|
225
|
-
i as MANIFEST
|
|
226
|
-
};
|
|
214
|
+
} }
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
} };
|
|
218
|
+
//#endregion
|
|
219
|
+
export { r as MANIFEST };
|
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@sps-woodland/core/column-manager"),require("react"),require("@spscommerce/utils")):typeof define==`function`&&define.amd?define([`exports`,`@sps-woodland/core/column-manager`,`react`,`@spscommerce/utils`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ColumnManager={},e.spsWoodlandCoreColumnManager,e.react,e.spscommerceUtils))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:i(c(e)),u(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1),e.MANIFEST={"Column Manager":{components:[t.ColumnManager],examples:{basic:{label:`Basic Usage`,examples:{basic:{react:r.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
|
|
53
|
+
`}}},hooks:{label:`useColumnManager hook`,description:()=>n.createElement(n.Fragment,null,n.createElement(`h5`,null,`Arguments`),n.createElement(`p`,null,`The column manager comes with a `,n.createElement(`code`,null,`useColumnManager`),` hook that implements the default behavior. Arguments for this hook include:`),n.createElement(`dl`,null,n.createElement(`dt`,null,n.createElement(`code`,null,`visibleColumns`),`: ItemProps[] (required)`),n.createElement(`dd`,null,`The initial visible columns state`),n.createElement(`dt`,null,n.createElement(`code`,null,`hiddenColumns`),`: ItemProps[] (required)`),n.createElement(`dd`,null,`The initial hidden columns state`),n.createElement(`dt`,null,n.createElement(`code`,null,`isOpen`),`: boolean (optional)`),n.createElement(`dd`,null,`Whether the column manager is open by default`),n.createElement(`dt`,null,n.createElement(`code`,null,`onOpen`),`: function (optional)`),n.createElement(`dd`,null,`Handler that is called when the column manager opens`,n.createElement(`code`,null,`() => void`)),n.createElement(`dt`,null,n.createElement(`code`,null,`onClose`),`: function (optional)`),n.createElement(`dd`,null,`Handler that is called when the column manager closes`,n.createElement(`code`,null,`() => void`)),n.createElement(`dt`,null,n.createElement(`code`,null,`onSave`),`: function (optional)`),n.createElement(`dd`,null,`Handler that is called when the column manager saves`,n.createElement(`code`,null,`(visibleColumns: ItemProps[], hiddenColumns: ItemProps[]) => void`))),n.createElement(`h5`,null,`Return value`),n.createElement(`p`,null,`The `,n.createElement(`code`,null,`useColumnManager`),` hook returns an object with`,` `,n.createElement(`code`,null,`visibleColumns`),`, `,n.createElement(`code`,null,`hiddenColumns`),`, `,n.createElement(`code`,null,`columnManagerProps`),`, `,n.createElement(`code`,null,`triggerProps`),` ,`,n.createElement(`code`,null,`setColumns`),` and `,n.createElement(`code`,null,`setOpen`)),n.createElement(`p`,null,n.createElement(`code`,null,`triggerProps`),`: needs to be spread on the element that triggers the modal.`),n.createElement(`p`,null,n.createElement(`code`,null,`columnManagerProps`),`: needs to be spread on the `,n.createElement(`code`,null,`ColumnManager`),` `,`component`),n.createElement(`p`,null,n.createElement(`code`,null,`visibleColumns`),`: the current state of the visible columns`),n.createElement(`p`,null,n.createElement(`code`,null,`hiddenColumns`),`: the current state of the hidden columns`),n.createElement(`p`,null,n.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.`),n.createElement(`p`,null,n.createElement(`code`,null,`setOpen`),`: function that allows programmatically setting the current isOpen state. This function is safe to use in effects.`),n.createElement(`p`,null,`Please refer to the examples to see its implementation`))},hooksExamples:{label:`Hook Usage`,examples:{basic:{description:`Minimal API Reference`,react:r.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
|
|
88
|
+
`},complete:{description:`Complete API Reference`,react:r.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
|
|
139
|
+
`}}},minimalInterface:{label:`Minimal Interface`,examples:{basic:{description:`This is the minimal visual interface for the ColumnManager component`,react:r.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
|
+
`}}}}}},Object.keys(t).forEach(function(n){n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})});
|
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.56.
|
|
4
|
+
"version": "8.56.3",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/column-manager",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
26
26
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
27
27
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
28
|
-
"@sps-woodland/core": "8.56.
|
|
29
|
-
"@spscommerce/ds-react": "8.56.
|
|
28
|
+
"@sps-woodland/core": "8.56.3",
|
|
29
|
+
"@spscommerce/ds-react": "8.56.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@spscommerce/utils": "9.
|
|
32
|
+
"@spscommerce/utils": "9.3.3",
|
|
33
33
|
"react": "16.14.0",
|
|
34
34
|
"react-dom": "16.14.0",
|
|
35
|
-
"@sps-woodland/core": "8.56.
|
|
36
|
-
"@spscommerce/ds-react": "8.56.
|
|
35
|
+
"@sps-woodland/core": "8.56.3",
|
|
36
|
+
"@spscommerce/ds-react": "8.56.3"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "pnpm run build:js && pnpm run build:types",
|