payload-zitadel-plugin 0.1.3 → 0.1.5
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/README.md +1 -1
- package/dist/components/Avatar/index.d.ts +3 -3
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Avatar/index.js +23 -9
- package/dist/components/Avatar/index.js.map +1 -1
- package/dist/components/LoginButton/button.d.ts +4 -1
- package/dist/components/LoginButton/button.d.ts.map +1 -1
- package/dist/components/LoginButton/button.js +5 -7
- package/dist/components/LoginButton/button.js.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AAGvC,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAgCvD,CAAA"}
|
@@ -1,19 +1,33 @@
|
|
1
1
|
'use client';
|
2
2
|
import * as React from 'react';
|
3
|
-
|
4
|
-
import
|
3
|
+
// https://github.com/vercel/next.js/issues/46078
|
4
|
+
// import Image from 'next/image.js'
|
5
5
|
import { useSession } from 'next-auth/react';
|
6
|
-
|
6
|
+
import { DefaultAccountIcon } from '@payloadcms/ui/graphics/Account/Default';
|
7
|
+
export const Avatar = ({ active })=>{
|
7
8
|
const session = useSession();
|
8
9
|
const imageUrl = session?.data?.user?.image;
|
9
|
-
return imageUrl ? /*#__PURE__*/ React.createElement("
|
10
|
+
return imageUrl ? /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("style", null, `
|
11
|
+
.avatar {
|
12
|
+
height: 2rem;
|
13
|
+
width: 2rem;
|
14
|
+
}
|
15
|
+
|
16
|
+
.avatar:hover {
|
17
|
+
filter: brightness(.8);
|
18
|
+
}
|
19
|
+
|
20
|
+
.avatar img {
|
21
|
+
object-fit: fill;
|
22
|
+
border-radius: 100%;
|
23
|
+
}
|
24
|
+
`), /*#__PURE__*/ React.createElement("div", {
|
10
25
|
className: "avatar"
|
11
|
-
}, /*#__PURE__*/ React.createElement(
|
26
|
+
}, /*#__PURE__*/ React.createElement("img", {
|
12
27
|
src: imageUrl,
|
13
|
-
alt: "Profile Picture"
|
14
|
-
|
15
|
-
|
16
|
-
active: props.active
|
28
|
+
alt: "Profile Picture"
|
29
|
+
}))) : /*#__PURE__*/ React.createElement(DefaultAccountIcon, {
|
30
|
+
active: active
|
17
31
|
});
|
18
32
|
};
|
19
33
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Avatar/index.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\
|
1
|
+
{"version":3,"sources":["../../../src/components/Avatar/index.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n// https://github.com/vercel/next.js/issues/46078\n// import Image from 'next/image.js'\nimport {useSession} from 'next-auth/react'\nimport {DefaultAccountIcon} from '@payloadcms/ui/graphics/Account/Default'\nimport {CustomComponent} from 'payload'\n\n\nexport const Avatar: CustomComponent<{ active: boolean }> = ({active}) => {\n\n const session = useSession()\n\n const imageUrl = session?.data?.user?.image\n\n return (imageUrl ?\n <>\n <style>\n {`\n .avatar {\n height: 2rem;\n width: 2rem;\n }\n \n .avatar:hover {\n filter: brightness(.8);\n }\n \n .avatar img {\n object-fit: fill;\n border-radius: 100%;\n }\n `}\n </style>\n <div className=\"avatar\">\n {/*<Image src={imageUrl} alt=\"Profile Picture\" fill/>*/}\n {<img src={imageUrl} alt=\"Profile Picture\"/>}\n </div>\n </> :\n <DefaultAccountIcon active={active}/>\n )\n}"],"names":["React","useSession","DefaultAccountIcon","Avatar","active","session","imageUrl","data","user","image","style","div","className","img","src","alt"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,YAAYA,WAAW,QAAO;AAC9B,iDAAiD;AACjD,oCAAoC;AACpC,SAAQC,UAAU,QAAO,kBAAiB;AAC1C,SAAQC,kBAAkB,QAAO,0CAAyC;AAI1E,OAAO,MAAMC,SAA+C,CAAC,EAACC,MAAM,EAAC;IAEjE,MAAMC,UAAUJ;IAEhB,MAAMK,WAAWD,SAASE,MAAMC,MAAMC;IAEtC,OAAQH,yBACA,wDACI,oBAACI,eACI,CAAC;;;;;;;;;;;;;;wBAcE,CAAC,iBAET,oBAACC;QAAIC,WAAU;qBAEV,oBAACC;QAAIC,KAAKR;QAAUS,KAAI;yBAGjC,oBAACb;QAAmBE,QAAQA;;AAExC,EAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/LoginButton/button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/LoginButton/button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAA;AAKvC,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC;IACvC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAA;CAC/B,CAUA,CAAA"}
|
@@ -1,13 +1,9 @@
|
|
1
1
|
'use client';
|
2
2
|
import React from 'react';
|
3
3
|
import { signIn } from 'next-auth/react';
|
4
|
-
|
5
|
-
import { Button } from '@payloadcms/ui/client';
|
6
|
-
//import {useTranslation} from '@payloadcms/ui/providers/Translation'
|
7
|
-
//import {translations} from '../../translations.js'
|
4
|
+
import { Button, useTranslation } from '@payloadcms/ui';
|
8
5
|
export const _LoginButton = ({ internalProviderName, externalProviderName })=>{
|
9
|
-
|
10
|
-
//const {t} = useTranslation<typeof translations.en, NestedKeysStripped<typeof translations.en>>()
|
6
|
+
const { t } = useTranslation();
|
11
7
|
return /*#__PURE__*/ React.createElement("div", {
|
12
8
|
style: {
|
13
9
|
display: 'flex',
|
@@ -15,7 +11,9 @@ export const _LoginButton = ({ internalProviderName, externalProviderName })=>{
|
|
15
11
|
}
|
16
12
|
}, /*#__PURE__*/ React.createElement(Button, {
|
17
13
|
onClick: ()=>signIn(internalProviderName)
|
18
|
-
},
|
14
|
+
}, t('zitadelPlugin:signIn', {
|
15
|
+
externalProviderName
|
16
|
+
})));
|
19
17
|
};
|
20
18
|
|
21
19
|
//# sourceMappingURL=button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/LoginButton/button.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport {signIn} from 'next-auth/react'\nimport {CustomComponent} from 'payload'\
|
1
|
+
{"version":3,"sources":["../../../src/components/LoginButton/button.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport {signIn} from 'next-auth/react'\nimport {CustomComponent} from 'payload'\nimport {NestedKeysStripped} from '@payloadcms/translations'\nimport {Button, useTranslation} from '@payloadcms/ui'\nimport {translations} from '../../translations.js'\n\nexport const _LoginButton: CustomComponent<{\n internalProviderName: string,\n externalProviderName: string\n}> = ({internalProviderName, externalProviderName}) => {\n const {t} = useTranslation<typeof translations.en, NestedKeysStripped<typeof translations.en>>()\n\n return (\n <div style={{display: 'flex', justifyContent: 'center'}}>\n <Button onClick={() => signIn(internalProviderName)}>\n {t('zitadelPlugin:signIn', {externalProviderName})}\n </Button>\n </div>\n )\n}"],"names":["React","signIn","Button","useTranslation","_LoginButton","internalProviderName","externalProviderName","t","div","style","display","justifyContent","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,OAAOA,WAAW,QAAO;AACzB,SAAQC,MAAM,QAAO,kBAAiB;AAGtC,SAAQC,MAAM,EAAEC,cAAc,QAAO,iBAAgB;AAGrD,OAAO,MAAMC,eAGR,CAAC,EAACC,oBAAoB,EAAEC,oBAAoB,EAAC;IAC9C,MAAM,EAACC,CAAC,EAAC,GAAGJ;IAEZ,qBACI,oBAACK;QAAIC,OAAO;YAACC,SAAS;YAAQC,gBAAgB;QAAQ;qBAClD,oBAACT;QAAOU,SAAS,IAAMX,OAAOI;OACzBE,EAAE,wBAAwB;QAACD;IAAoB;AAIhE,EAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "payload-zitadel-plugin",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.5",
|
4
4
|
"description": "plugin for Payload CMS, which enables authentication via Zitadel IdP",
|
5
5
|
"type": "module",
|
6
6
|
"license": "MIT",
|
@@ -36,24 +36,24 @@
|
|
36
36
|
"dist"
|
37
37
|
],
|
38
38
|
"dependencies": {
|
39
|
-
"@payloadcms/translations": "3.0.0-beta.
|
40
|
-
"@payloadcms/ui": "3.0.0-beta.
|
39
|
+
"@payloadcms/translations": "3.0.0-beta.53",
|
40
|
+
"@payloadcms/ui": "3.0.0-beta.53",
|
41
41
|
"jsonwebtoken": "^9.0.2",
|
42
42
|
"next": "^15.0.0-rc.0",
|
43
43
|
"next-auth": "^4.24.7",
|
44
|
-
"payload": "3.0.0-beta.
|
45
|
-
"react": "
|
46
|
-
"react-dom": "
|
44
|
+
"payload": "3.0.0-beta.53",
|
45
|
+
"react": "rc",
|
46
|
+
"react-dom": "rc"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
49
|
"@swc/cli": "^0.3.12",
|
50
|
-
"@swc/core": "^1.6.
|
50
|
+
"@swc/core": "^1.6.3",
|
51
51
|
"@types/jsonwebtoken": "^9.0.6",
|
52
|
-
"@types/node": "^20.14.
|
52
|
+
"@types/node": "^20.14.6",
|
53
53
|
"@types/react": "^18.3.3",
|
54
54
|
"@types/react-dom": "^18.3.0",
|
55
55
|
"rimraf": "^5.0.7",
|
56
|
-
"typescript": "^5.
|
56
|
+
"typescript": "^5.5.1-rc"
|
57
57
|
},
|
58
58
|
"engines": {
|
59
59
|
"node": "^22.3.0"
|