@payloadcms/plugin-stripe 4.0.0-canary.37 → 4.0.0-canary.38
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UIFieldClientProps } from 'payload';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import './index.css';
|
|
3
|
-
export declare const LinkToDoc:
|
|
4
|
+
export declare const LinkToDoc: React.FC<UIFieldClientProps>;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/LinkToDoc/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/LinkToDoc/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGjD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,aAAa,CAAA;AAIpB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6BlD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/ui/LinkToDoc/index.tsx"],"sourcesContent":["'use client'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../src/ui/LinkToDoc/index.tsx"],"sourcesContent":["'use client'\nimport type { UIFieldClientProps } from 'payload'\n\nimport { CopyToClipboard, FieldLabel, useFormFields } from '@payloadcms/ui'\nimport React from 'react'\n\nimport './index.css'\n\nconst baseClass = 'link-to-doc'\n\nexport const LinkToDoc: React.FC<UIFieldClientProps> = (props) => {\n const {\n field: { admin: { custom = {} } = {} },\n } = props\n const { isTestKey, nameOfIDField, stripeResourceType } = custom\n\n const field = useFormFields(([fields]) => (fields && fields?.[nameOfIDField]) || null)\n const { value: stripeID } = field || {}\n\n if (!stripeID) {\n return null\n }\n\n const stripeEnv = isTestKey ? 'test/' : ''\n const href = `https://dashboard.stripe.com/${stripeEnv}${stripeResourceType}/${stripeID}`\n\n return (\n <div className={baseClass}>\n <div className={`${baseClass}__header`}>\n <FieldLabel htmlFor={baseClass} label=\"View in Stripe\" />\n <CopyToClipboard value={href} />\n </div>\n <div className={`${baseClass}__url`}>\n <a href={href} rel=\"noopener noreferrer\" target=\"_blank\">\n {href}\n </a>\n </div>\n </div>\n )\n}\n"],"names":["CopyToClipboard","FieldLabel","useFormFields","React","baseClass","LinkToDoc","props","field","admin","custom","isTestKey","nameOfIDField","stripeResourceType","fields","value","stripeID","stripeEnv","href","div","className","htmlFor","label","a","rel","target"],"mappings":"AAAA;;AAGA,SAASA,eAAe,EAAEC,UAAU,EAAEC,aAAa,QAAQ,iBAAgB;AAC3E,OAAOC,WAAW,QAAO;AAEzB,OAAO,cAAa;AAEpB,MAAMC,YAAY;AAElB,OAAO,MAAMC,YAA0C,CAACC;IACtD,MAAM,EACJC,OAAO,EAAEC,OAAO,EAAEC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EACvC,GAAGH;IACJ,MAAM,EAAEI,SAAS,EAAEC,aAAa,EAAEC,kBAAkB,EAAE,GAAGH;IAEzD,MAAMF,QAAQL,cAAc,CAAC,CAACW,OAAO,GAAK,AAACA,UAAUA,QAAQ,CAACF,cAAc,IAAK;IACjF,MAAM,EAAEG,OAAOC,QAAQ,EAAE,GAAGR,SAAS,CAAC;IAEtC,IAAI,CAACQ,UAAU;QACb,OAAO;IACT;IAEA,MAAMC,YAAYN,YAAY,UAAU;IACxC,MAAMO,OAAO,CAAC,6BAA6B,EAAED,YAAYJ,mBAAmB,CAAC,EAAEG,UAAU;IAEzF,qBACE,MAACG;QAAIC,WAAWf;;0BACd,MAACc;gBAAIC,WAAW,GAAGf,UAAU,QAAQ,CAAC;;kCACpC,KAACH;wBAAWmB,SAAShB;wBAAWiB,OAAM;;kCACtC,KAACrB;wBAAgBc,OAAOG;;;;0BAE1B,KAACC;gBAAIC,WAAW,GAAGf,UAAU,KAAK,CAAC;0BACjC,cAAA,KAACkB;oBAAEL,MAAMA;oBAAMM,KAAI;oBAAsBC,QAAO;8BAC7CP;;;;;AAKX,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/plugin-stripe",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.38",
|
|
4
4
|
"description": "Stripe plugin for Payload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"payload",
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
"lodash.get": "^4.4.2",
|
|
56
56
|
"stripe": "^10.2.0",
|
|
57
57
|
"uuid": "14.0.0",
|
|
58
|
-
"@payloadcms/translations": "4.0.0-canary.
|
|
59
|
-
"@payloadcms/ui": "4.0.0-canary.
|
|
58
|
+
"@payloadcms/translations": "4.0.0-canary.38",
|
|
59
|
+
"@payloadcms/ui": "4.0.0-canary.38"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/lodash.get": "^4.4.7",
|
|
63
|
-
"@types/react": "19.
|
|
64
|
-
"@types/react-dom": "19.
|
|
63
|
+
"@types/react": "19.3.0",
|
|
64
|
+
"@types/react-dom": "19.3.0",
|
|
65
65
|
"@payloadcms/eslint-config": "3.28.0",
|
|
66
|
-
"@payloadcms/next": "4.0.0-canary.
|
|
67
|
-
"payload": "4.0.0-canary.
|
|
66
|
+
"@payloadcms/next": "4.0.0-canary.38",
|
|
67
|
+
"payload": "4.0.0-canary.38"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"payload": "4.0.0-canary.
|
|
70
|
+
"payload": "4.0.0-canary.38"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"registry": "https://registry.npmjs.org/"
|