@payloadcms/plugin-stripe 4.0.0-canary.5 → 4.0.0-canary.7

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/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018-2025 Payload CMS, Inc. <info@payloadcms.com>
3
+ Copyright (c) 2018-2026 Payload CMS, LLC <info@payloadcms.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -1,2 +1,2 @@
1
- export { LinkToDoc } from '../ui/LinkToDoc.js';
1
+ export { LinkToDoc } from '../ui/LinkToDoc/index.js';
2
2
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/exports/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/exports/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA"}
@@ -1,4 +1,4 @@
1
1
  'use client';
2
- export { LinkToDoc } from '../ui/LinkToDoc.js';
2
+ export { LinkToDoc } from '../ui/LinkToDoc/index.js';
3
3
 
4
4
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\n\nexport { LinkToDoc } from '../ui/LinkToDoc.js'\n"],"names":["LinkToDoc"],"mappings":"AAAA;AAEA,SAASA,SAAS,QAAQ,qBAAoB"}
1
+ {"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\n\nexport { LinkToDoc } from '../ui/LinkToDoc/index.js'\n"],"names":["LinkToDoc"],"mappings":"AAAA;AAEA,SAASA,SAAS,QAAQ,2BAA0B"}
@@ -0,0 +1,26 @@
1
+ @layer payload-default {
2
+ .link-to-doc {
3
+ margin-bottom: var(--spacing-field);
4
+ }
5
+
6
+ .link-to-doc__header {
7
+ display: flex;
8
+ align-items: center;
9
+ width: fit-content;
10
+ gap: var(--spacer-1);
11
+ }
12
+
13
+ .link-to-doc__url {
14
+ overflow: hidden;
15
+ font-weight: 600;
16
+ text-overflow: ellipsis;
17
+ }
18
+
19
+ .link-to-doc__url a {
20
+ color: var(--color-text-secondary);
21
+
22
+ &:hover {
23
+ color: var(--color-text);
24
+ }
25
+ }
26
+ }
@@ -1,3 +1,4 @@
1
1
  import type { UIFieldClientComponent } from 'payload';
2
+ import './index.css';
2
3
  export declare const LinkToDoc: UIFieldClientComponent;
3
- //# sourceMappingURL=LinkToDoc.d.ts.map
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/LinkToDoc/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAKrD,OAAO,aAAa,CAAA;AAIpB,eAAO,MAAM,SAAS,EAAE,sBA6BvB,CAAA"}
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CopyToClipboard, FieldLabel, useFormFields } from '@payloadcms/ui';
4
+ import React from 'react';
5
+ import './index.css';
6
+ const baseClass = 'link-to-doc';
7
+ export const LinkToDoc = (props)=>{
8
+ const { field: { admin: { custom = {} } = {} } } = props;
9
+ const { isTestKey, nameOfIDField, stripeResourceType } = custom;
10
+ const field = useFormFields(([fields])=>fields && fields?.[nameOfIDField] || null);
11
+ const { value: stripeID } = field || {};
12
+ if (!stripeID) {
13
+ return null;
14
+ }
15
+ const stripeEnv = isTestKey ? 'test/' : '';
16
+ const href = `https://dashboard.stripe.com/${stripeEnv}${stripeResourceType}/${stripeID}`;
17
+ return /*#__PURE__*/ _jsxs("div", {
18
+ className: baseClass,
19
+ children: [
20
+ /*#__PURE__*/ _jsxs("div", {
21
+ className: `${baseClass}__header`,
22
+ children: [
23
+ /*#__PURE__*/ _jsx(FieldLabel, {
24
+ htmlFor: baseClass,
25
+ label: "View in Stripe"
26
+ }),
27
+ /*#__PURE__*/ _jsx(CopyToClipboard, {
28
+ value: href
29
+ })
30
+ ]
31
+ }),
32
+ /*#__PURE__*/ _jsx("div", {
33
+ className: `${baseClass}__url`,
34
+ children: /*#__PURE__*/ _jsx("a", {
35
+ href: href,
36
+ rel: "noopener noreferrer",
37
+ target: "_blank",
38
+ children: href
39
+ })
40
+ })
41
+ ]
42
+ });
43
+ };
44
+
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/ui/LinkToDoc/index.tsx"],"sourcesContent":["'use client'\nimport type { UIFieldClientComponent } 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: UIFieldClientComponent = (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,YAAoC,CAACC;IAChD,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.5",
3
+ "version": "4.0.0-canary.7",
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.5",
59
- "@payloadcms/ui": "4.0.0-canary.5"
58
+ "@payloadcms/translations": "4.0.0-canary.7",
59
+ "@payloadcms/ui": "4.0.0-canary.7"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/lodash.get": "^4.4.7",
63
63
  "@types/react": "19.2.14",
64
64
  "@types/react-dom": "19.2.3",
65
65
  "@payloadcms/eslint-config": "3.28.0",
66
- "@payloadcms/next": "4.0.0-canary.5",
67
- "payload": "4.0.0-canary.5"
66
+ "@payloadcms/next": "4.0.0-canary.7",
67
+ "payload": "4.0.0-canary.7"
68
68
  },
69
69
  "peerDependencies": {
70
- "payload": "4.0.0-canary.5"
70
+ "payload": "4.0.0-canary.7"
71
71
  },
72
72
  "publishConfig": {
73
73
  "registry": "https://registry.npmjs.org/"
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinkToDoc.d.ts","sourceRoot":"","sources":["../../src/ui/LinkToDoc.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAKrD,eAAO,MAAM,SAAS,EAAE,sBA0CvB,CAAA"}
@@ -1,48 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { CopyToClipboard, useFormFields } from '@payloadcms/ui';
4
- import React from 'react';
5
- export const LinkToDoc = (props)=>{
6
- const { field: { admin: { custom = {} } = {} } } = props;
7
- const { isTestKey, nameOfIDField, stripeResourceType } = custom;
8
- const field = useFormFields(([fields])=>fields && fields?.[nameOfIDField] || null);
9
- const { value: stripeID } = field || {};
10
- const stripeEnv = isTestKey ? 'test/' : '';
11
- const href = `https://dashboard.stripe.com/${stripeEnv}${stripeResourceType}/${stripeID}`;
12
- if (stripeID) {
13
- return /*#__PURE__*/ _jsxs("div", {
14
- children: [
15
- /*#__PURE__*/ _jsxs("div", {
16
- children: [
17
- /*#__PURE__*/ _jsx("span", {
18
- className: "label",
19
- style: {
20
- color: '#9A9A9A'
21
- },
22
- children: "View in Stripe"
23
- }),
24
- /*#__PURE__*/ _jsx(CopyToClipboard, {
25
- value: href
26
- })
27
- ]
28
- }),
29
- /*#__PURE__*/ _jsx("div", {
30
- style: {
31
- fontWeight: '600',
32
- overflow: 'hidden',
33
- textOverflow: 'ellipsis'
34
- },
35
- children: /*#__PURE__*/ _jsx("a", {
36
- href: href,
37
- rel: "noreferrer noopener",
38
- target: "_blank",
39
- children: href
40
- })
41
- })
42
- ]
43
- });
44
- }
45
- return null;
46
- };
47
-
48
- //# sourceMappingURL=LinkToDoc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ui/LinkToDoc.tsx"],"sourcesContent":["'use client'\nimport type { UIFieldClientComponent } from 'payload'\n\nimport { CopyToClipboard, useFormFields } from '@payloadcms/ui'\nimport React from 'react'\n\nexport const LinkToDoc: UIFieldClientComponent = (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 const stripeEnv = isTestKey ? 'test/' : ''\n const href = `https://dashboard.stripe.com/${stripeEnv}${stripeResourceType}/${stripeID}`\n\n if (stripeID) {\n return (\n <div>\n <div>\n <span\n className=\"label\"\n style={{\n color: '#9A9A9A',\n }}\n >\n View in Stripe\n </span>\n <CopyToClipboard value={href} />\n </div>\n <div\n style={{\n fontWeight: '600',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n <a href={href} rel=\"noreferrer noopener\" target=\"_blank\">\n {href}\n </a>\n </div>\n </div>\n )\n }\n\n return null\n}\n"],"names":["CopyToClipboard","useFormFields","React","LinkToDoc","props","field","admin","custom","isTestKey","nameOfIDField","stripeResourceType","fields","value","stripeID","stripeEnv","href","div","span","className","style","color","fontWeight","overflow","textOverflow","a","rel","target"],"mappings":"AAAA;;AAGA,SAASA,eAAe,EAAEC,aAAa,QAAQ,iBAAgB;AAC/D,OAAOC,WAAW,QAAO;AAEzB,OAAO,MAAMC,YAAoC,CAACC;IAChD,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,QAAQJ,cAAc,CAAC,CAACU,OAAO,GAAK,AAACA,UAAUA,QAAQ,CAACF,cAAc,IAAK;IACjF,MAAM,EAAEG,OAAOC,QAAQ,EAAE,GAAGR,SAAS,CAAC;IAEtC,MAAMS,YAAYN,YAAY,UAAU;IACxC,MAAMO,OAAO,CAAC,6BAA6B,EAAED,YAAYJ,mBAAmB,CAAC,EAAEG,UAAU;IAEzF,IAAIA,UAAU;QACZ,qBACE,MAACG;;8BACC,MAACA;;sCACC,KAACC;4BACCC,WAAU;4BACVC,OAAO;gCACLC,OAAO;4BACT;sCACD;;sCAGD,KAACpB;4BAAgBY,OAAOG;;;;8BAE1B,KAACC;oBACCG,OAAO;wBACLE,YAAY;wBACZC,UAAU;wBACVC,cAAc;oBAChB;8BAEA,cAAA,KAACC;wBAAET,MAAMA;wBAAMU,KAAI;wBAAsBC,QAAO;kCAC7CX;;;;;IAKX;IAEA,OAAO;AACT,EAAC"}