payload-advanced-sidebar 1.1.1 → 1.1.2
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +32 -60
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export const advancedSidebarPlugin = (pluginConfig = {})=>{
|
|
|
13
13
|
groupsConfig: pluginConfig.groups,
|
|
14
14
|
itemsConfig: pluginConfig.items
|
|
15
15
|
},
|
|
16
|
-
path:
|
|
16
|
+
path: 'payload-advanced-sidebar/rsc#NavWithGroups'
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { Config } from 'payload'\n\nexport type SidebarPluginConfig = {\n animations?: boolean\n enabled?: boolean\n groups?: Record<string, { icon?: string }>\n items?: Record<string, { icon?: string }>\n}\n\nexport const advancedSidebarPlugin = (pluginConfig: SidebarPluginConfig = {}) => {\n return (config: Config): Config => {\n if (pluginConfig.enabled === false) {\n return config\n }\n\n config.admin = {\n ...(config.admin ?? {}),\n components: {\n ...(config.admin?.components ?? {}),\n Nav: {\n clientProps: {\n animations: pluginConfig.animations ?? true,\n groupsConfig: pluginConfig.groups,\n itemsConfig: pluginConfig.items,\n },\n path: 'payload-advanced-sidebar/rsc#NavWithGroups',\n },\n },\n }\n\n return config\n }\n}\n\nexport default advancedSidebarPlugin\n"],"names":["advancedSidebarPlugin","pluginConfig","config","enabled","admin","components","Nav","clientProps","animations","groupsConfig","groups","itemsConfig","items","path"],"mappings":"AASA,OAAO,MAAMA,wBAAwB,CAACC,eAAoC,CAAC,CAAC;IAC1E,OAAO,CAACC;QACN,IAAID,aAAaE,OAAO,KAAK,OAAO;YAClC,OAAOD;QACT;QAEAA,OAAOE,KAAK,GAAG;YACb,GAAIF,OAAOE,KAAK,IAAI,CAAC,CAAC;YACtBC,YAAY;gBACV,GAAIH,OAAOE,KAAK,EAAEC,cAAc,CAAC,CAAC;gBAClCC,KAAK;oBACHC,aAAa;wBACXC,YAAYP,aAAaO,UAAU,IAAI;wBACvCC,cAAcR,aAAaS,MAAM;wBACjCC,aAAaV,aAAaW,KAAK;oBACjC;oBACAC,MAAM;gBACR;YACF;QACF;QAEA,OAAOX;IACT;AACF,EAAC;AAED,eAAeF,sBAAqB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-advanced-sidebar",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "A Payload CMS 3.0 plugin to customize the admin sidebar with grouping, custom icons, and hide functionality.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -24,44 +24,26 @@
|
|
|
24
24
|
"type": "module",
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"import": "./
|
|
28
|
-
"types": "./
|
|
29
|
-
"default": "./
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
30
|
},
|
|
31
31
|
"./client": {
|
|
32
|
-
"import": "./
|
|
33
|
-
"types": "./
|
|
34
|
-
"default": "./
|
|
32
|
+
"import": "./dist/exports/client.js",
|
|
33
|
+
"types": "./dist/exports/client.d.ts",
|
|
34
|
+
"default": "./dist/exports/client.js"
|
|
35
35
|
},
|
|
36
36
|
"./rsc": {
|
|
37
|
-
"import": "./
|
|
38
|
-
"types": "./
|
|
39
|
-
"default": "./
|
|
37
|
+
"import": "./dist/exports/rsc.js",
|
|
38
|
+
"types": "./dist/exports/rsc.d.ts",
|
|
39
|
+
"default": "./dist/exports/rsc.js"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
"main": "./
|
|
43
|
-
"types": "./
|
|
42
|
+
"main": "./dist/index.js",
|
|
43
|
+
"types": "./dist/index.d.ts",
|
|
44
44
|
"files": [
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
|
-
"scripts": {
|
|
48
|
-
"build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
49
|
-
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
50
|
-
"build:types": "tsc --outDir dist --rootDir ./src",
|
|
51
|
-
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
52
|
-
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
53
|
-
"dev": "next dev dev --turbo",
|
|
54
|
-
"dev:generate-importmap": "pnpm dev:payload generate:importmap",
|
|
55
|
-
"dev:generate-types": "pnpm dev:payload generate:types",
|
|
56
|
-
"dev:payload": "cross-env PAYLOAD_CONFIG_PATH=./dev/payload.config.ts payload",
|
|
57
|
-
"generate:importmap": "pnpm dev:generate-importmap",
|
|
58
|
-
"generate:types": "pnpm dev:generate-types",
|
|
59
|
-
"lint": "eslint",
|
|
60
|
-
"lint:fix": "eslint ./src --fix",
|
|
61
|
-
"test": "pnpm test:int && pnpm test:e2e",
|
|
62
|
-
"test:e2e": "playwright test",
|
|
63
|
-
"test:int": "vitest"
|
|
64
|
-
},
|
|
65
47
|
"dependencies": {
|
|
66
48
|
"lucide-react": "^1.17.0"
|
|
67
49
|
},
|
|
@@ -108,33 +90,23 @@
|
|
|
108
90
|
"node": "^18.20.2 || >=20.9.0",
|
|
109
91
|
"pnpm": "^9 || ^10"
|
|
110
92
|
},
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
"pnpm": {
|
|
133
|
-
"onlyBuiltDependencies": [
|
|
134
|
-
"sharp",
|
|
135
|
-
"esbuild",
|
|
136
|
-
"unrs-resolver"
|
|
137
|
-
]
|
|
138
|
-
},
|
|
139
|
-
"registry": "https://registry.npmjs.org/"
|
|
140
|
-
}
|
|
93
|
+
"registry": "https://registry.npmjs.org/",
|
|
94
|
+
"scripts": {
|
|
95
|
+
"build": "pnpm copyfiles && pnpm build:types && pnpm build:swc",
|
|
96
|
+
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
|
97
|
+
"build:types": "tsc --outDir dist --rootDir ./src",
|
|
98
|
+
"clean": "rimraf {dist,*.tsbuildinfo}",
|
|
99
|
+
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/",
|
|
100
|
+
"dev": "next dev dev --turbo",
|
|
101
|
+
"dev:generate-importmap": "pnpm dev:payload generate:importmap",
|
|
102
|
+
"dev:generate-types": "pnpm dev:payload generate:types",
|
|
103
|
+
"dev:payload": "cross-env PAYLOAD_CONFIG_PATH=./dev/payload.config.ts payload",
|
|
104
|
+
"generate:importmap": "pnpm dev:generate-importmap",
|
|
105
|
+
"generate:types": "pnpm dev:generate-types",
|
|
106
|
+
"lint": "eslint",
|
|
107
|
+
"lint:fix": "eslint ./src --fix",
|
|
108
|
+
"test": "pnpm test:int && pnpm test:e2e",
|
|
109
|
+
"test:e2e": "playwright test",
|
|
110
|
+
"test:int": "vitest"
|
|
111
|
+
}
|
|
112
|
+
}
|