@payloadcms/plugin-ecommerce 4.0.0-internal.5f0cd13 → 4.0.0-internal.688c4d0

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.
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=assets.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/@types/assets.d.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAItE,KAAK,KAAK,GAAG;IACX,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,sBAAsB,CAAA;AAE1B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA8BtC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/PriceInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAItE,KAAK,KAAK,GAAG;IACX,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,sBAAsB,CAAA;AAE1B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6BtC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/ui/PriceInput/index.tsx"],"sourcesContent":["import type { NumberFieldServerProps } from 'payload'\n\nimport './index.css'\n\nimport type { CurrenciesConfig, Currency } from '../../types/index.js'\n\nimport { FormattedInput } from './FormattedInput.js'\n\ntype Props = {\n currenciesConfig: CurrenciesConfig\n currency?: Currency\n path: string\n} & NumberFieldServerProps\n\nexport const PriceInput: React.FC<Props> = (args) => {\n const {\n clientField: { label },\n currenciesConfig,\n currency: currencyFromProps,\n field,\n i18n: { t },\n i18n,\n path,\n readOnly,\n } = args\n\n const description = field.admin?.description\n ? typeof field.admin.description === 'function'\n ? // @ts-expect-error - weird type issue on 't' here\n field.admin.description({ i18n, t })\n : field.admin.description\n : undefined\n\n return (\n <FormattedInput\n currency={currencyFromProps}\n description={description}\n label={label}\n path={path}\n readOnly={readOnly}\n required={field.required}\n supportedCurrencies={currenciesConfig?.supportedCurrencies}\n />\n )\n}\n"],"names":["FormattedInput","PriceInput","args","clientField","label","currenciesConfig","currency","currencyFromProps","field","i18n","t","path","readOnly","description","admin","undefined","required","supportedCurrencies"],"mappings":";AAEA,OAAO,cAAa;AAIpB,SAASA,cAAc,QAAQ,sBAAqB;AAQpD,OAAO,MAAMC,aAA8B,CAACC;IAC1C,MAAM,EACJC,aAAa,EAAEC,KAAK,EAAE,EACtBC,gBAAgB,EAChBC,UAAUC,iBAAiB,EAC3BC,KAAK,EACLC,MAAM,EAAEC,CAAC,EAAE,EACXD,IAAI,EACJE,IAAI,EACJC,QAAQ,EACT,GAAGV;IAEJ,MAAMW,cAAcL,MAAMM,KAAK,EAAED,cAC7B,OAAOL,MAAMM,KAAK,CAACD,WAAW,KAAK,aAEjCL,MAAMM,KAAK,CAACD,WAAW,CAAC;QAAEJ;QAAMC;IAAE,KAClCF,MAAMM,KAAK,CAACD,WAAW,GACzBE;IAEJ,qBACE,KAACf;QACCM,UAAUC;QACVM,aAAaA;QACbT,OAAOA;QACPO,MAAMA;QACNC,UAAUA;QACVI,UAAUR,MAAMQ,QAAQ;QACxBC,qBAAqBZ,kBAAkBY;;AAG7C,EAAC"}
1
+ {"version":3,"sources":["../../../src/ui/PriceInput/index.tsx"],"sourcesContent":["import type { NumberFieldServerProps } from 'payload'\n\nimport './index.css'\n\nimport type { CurrenciesConfig, Currency } from '../../types/index.js'\n\nimport { FormattedInput } from './FormattedInput.js'\n\ntype Props = {\n currenciesConfig: CurrenciesConfig\n currency?: Currency\n path: string\n} & NumberFieldServerProps\n\nexport const PriceInput: React.FC<Props> = (args) => {\n const {\n clientField: { label },\n currenciesConfig,\n currency: currencyFromProps,\n field,\n i18n: { t },\n i18n,\n path,\n readOnly,\n } = args\n\n const description = field.admin?.description\n ? typeof field.admin.description === 'function'\n ? field.admin.description({ i18n, t })\n : field.admin.description\n : undefined\n\n return (\n <FormattedInput\n currency={currencyFromProps}\n description={description}\n label={label}\n path={path}\n readOnly={readOnly}\n required={field.required}\n supportedCurrencies={currenciesConfig?.supportedCurrencies}\n />\n )\n}\n"],"names":["FormattedInput","PriceInput","args","clientField","label","currenciesConfig","currency","currencyFromProps","field","i18n","t","path","readOnly","description","admin","undefined","required","supportedCurrencies"],"mappings":";AAEA,OAAO,cAAa;AAIpB,SAASA,cAAc,QAAQ,sBAAqB;AAQpD,OAAO,MAAMC,aAA8B,CAACC;IAC1C,MAAM,EACJC,aAAa,EAAEC,KAAK,EAAE,EACtBC,gBAAgB,EAChBC,UAAUC,iBAAiB,EAC3BC,KAAK,EACLC,MAAM,EAAEC,CAAC,EAAE,EACXD,IAAI,EACJE,IAAI,EACJC,QAAQ,EACT,GAAGV;IAEJ,MAAMW,cAAcL,MAAMM,KAAK,EAAED,cAC7B,OAAOL,MAAMM,KAAK,CAACD,WAAW,KAAK,aACjCL,MAAMM,KAAK,CAACD,WAAW,CAAC;QAAEJ;QAAMC;IAAE,KAClCF,MAAMM,KAAK,CAACD,WAAW,GACzBE;IAEJ,qBACE,KAACf;QACCM,UAAUC;QACVM,aAAaA;QACbT,OAAOA;QACPO,MAAMA;QACNC,UAAUA;QACVI,UAAUR,MAAMQ,QAAQ;QACxBC,qBAAqBZ,kBAAkBY;;AAG7C,EAAC"}
@@ -9,7 +9,7 @@ export const pushTypeScriptProperties = ({ collectionSlugMap, jsonSchema })=>{
9
9
  const propertiesMap = new Map();
10
10
  Object.entries(collectionSlugMap).forEach(([key, slug])=>{
11
11
  propertiesMap.set(key, {
12
- $ref: `#/definitions/${slug}`
12
+ $ref: `#/$defs/${slug}`
13
13
  });
14
14
  requiredCollectionProperties.push(slug);
15
15
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/pushTypeScriptProperties.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { SanitizedConfig } from 'payload'\n\nimport type { CollectionSlugMap, SanitizedEcommercePluginConfig } from '../types/index.js'\n\nexport const pushTypeScriptProperties = ({\n collectionSlugMap,\n jsonSchema,\n}: {\n collectionSlugMap: CollectionSlugMap\n config: SanitizedConfig\n jsonSchema: JSONSchema4\n sanitizedPluginConfig: SanitizedEcommercePluginConfig\n}): JSONSchema4 => {\n if (!jsonSchema.properties) {\n jsonSchema.properties = {}\n }\n\n if (Array.isArray(jsonSchema.required)) {\n jsonSchema.required.push('ecommerce')\n }\n\n const requiredCollectionProperties: string[] = []\n const propertiesMap = new Map<string, { $ref: string }>()\n\n Object.entries(collectionSlugMap).forEach(([key, slug]) => {\n propertiesMap.set(key, { $ref: `#/definitions/${slug}` })\n\n requiredCollectionProperties.push(slug)\n })\n\n jsonSchema.properties.ecommerce = {\n type: 'object',\n additionalProperties: false,\n description: 'Generated by the Payload Ecommerce plugin',\n properties: {\n collections: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...Object.fromEntries(propertiesMap),\n },\n required: requiredCollectionProperties,\n },\n },\n required: ['collections'],\n }\n\n return jsonSchema\n}\n"],"names":["pushTypeScriptProperties","collectionSlugMap","jsonSchema","properties","Array","isArray","required","push","requiredCollectionProperties","propertiesMap","Map","Object","entries","forEach","key","slug","set","$ref","ecommerce","type","additionalProperties","description","collections","fromEntries"],"mappings":"AAMA,OAAO,MAAMA,2BAA2B,CAAC,EACvCC,iBAAiB,EACjBC,UAAU,EAMX;IACC,IAAI,CAACA,WAAWC,UAAU,EAAE;QAC1BD,WAAWC,UAAU,GAAG,CAAC;IAC3B;IAEA,IAAIC,MAAMC,OAAO,CAACH,WAAWI,QAAQ,GAAG;QACtCJ,WAAWI,QAAQ,CAACC,IAAI,CAAC;IAC3B;IAEA,MAAMC,+BAAyC,EAAE;IACjD,MAAMC,gBAAgB,IAAIC;IAE1BC,OAAOC,OAAO,CAACX,mBAAmBY,OAAO,CAAC,CAAC,CAACC,KAAKC,KAAK;QACpDN,cAAcO,GAAG,CAACF,KAAK;YAAEG,MAAM,CAAC,cAAc,EAAEF,MAAM;QAAC;QAEvDP,6BAA6BD,IAAI,CAACQ;IACpC;IAEAb,WAAWC,UAAU,CAACe,SAAS,GAAG;QAChCC,MAAM;QACNC,sBAAsB;QACtBC,aAAa;QACblB,YAAY;YACVmB,aAAa;gBACXH,MAAM;gBACNC,sBAAsB;gBACtBjB,YAAY;oBACV,GAAGQ,OAAOY,WAAW,CAACd,cAAc;gBACtC;gBACAH,UAAUE;YACZ;QACF;QACAF,UAAU;YAAC;SAAc;IAC3B;IAEA,OAAOJ;AACT,EAAC"}
1
+ {"version":3,"sources":["../../src/utilities/pushTypeScriptProperties.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { SanitizedConfig } from 'payload'\n\nimport type { CollectionSlugMap, SanitizedEcommercePluginConfig } from '../types/index.js'\n\nexport const pushTypeScriptProperties = ({\n collectionSlugMap,\n jsonSchema,\n}: {\n collectionSlugMap: CollectionSlugMap\n config: SanitizedConfig\n jsonSchema: JSONSchema4\n sanitizedPluginConfig: SanitizedEcommercePluginConfig\n}): JSONSchema4 => {\n if (!jsonSchema.properties) {\n jsonSchema.properties = {}\n }\n\n if (Array.isArray(jsonSchema.required)) {\n jsonSchema.required.push('ecommerce')\n }\n\n const requiredCollectionProperties: string[] = []\n const propertiesMap = new Map<string, { $ref: string }>()\n\n Object.entries(collectionSlugMap).forEach(([key, slug]) => {\n propertiesMap.set(key, { $ref: `#/$defs/${slug}` })\n\n requiredCollectionProperties.push(slug)\n })\n\n jsonSchema.properties.ecommerce = {\n type: 'object',\n additionalProperties: false,\n description: 'Generated by the Payload Ecommerce plugin',\n properties: {\n collections: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...Object.fromEntries(propertiesMap),\n },\n required: requiredCollectionProperties,\n },\n },\n required: ['collections'],\n }\n\n return jsonSchema\n}\n"],"names":["pushTypeScriptProperties","collectionSlugMap","jsonSchema","properties","Array","isArray","required","push","requiredCollectionProperties","propertiesMap","Map","Object","entries","forEach","key","slug","set","$ref","ecommerce","type","additionalProperties","description","collections","fromEntries"],"mappings":"AAMA,OAAO,MAAMA,2BAA2B,CAAC,EACvCC,iBAAiB,EACjBC,UAAU,EAMX;IACC,IAAI,CAACA,WAAWC,UAAU,EAAE;QAC1BD,WAAWC,UAAU,GAAG,CAAC;IAC3B;IAEA,IAAIC,MAAMC,OAAO,CAACH,WAAWI,QAAQ,GAAG;QACtCJ,WAAWI,QAAQ,CAACC,IAAI,CAAC;IAC3B;IAEA,MAAMC,+BAAyC,EAAE;IACjD,MAAMC,gBAAgB,IAAIC;IAE1BC,OAAOC,OAAO,CAACX,mBAAmBY,OAAO,CAAC,CAAC,CAACC,KAAKC,KAAK;QACpDN,cAAcO,GAAG,CAACF,KAAK;YAAEG,MAAM,CAAC,QAAQ,EAAEF,MAAM;QAAC;QAEjDP,6BAA6BD,IAAI,CAACQ;IACpC;IAEAb,WAAWC,UAAU,CAACe,SAAS,GAAG;QAChCC,MAAM;QACNC,sBAAsB;QACtBC,aAAa;QACblB,YAAY;YACVmB,aAAa;gBACXH,MAAM;gBACNC,sBAAsB;gBACtBjB,YAAY;oBACV,GAAGQ,OAAOY,WAAW,CAACd,cAAc;gBACtC;gBACAH,UAAUE;YACZ;QACF;QACAF,UAAU;YAAC;SAAc;IAC3B;IAEA,OAAOJ;AACT,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-ecommerce",
3
- "version": "4.0.0-internal.5f0cd13",
3
+ "version": "4.0.0-internal.688c4d0",
4
4
  "description": "Ecommerce plugin for Payload",
5
5
  "keywords": [
6
6
  "payload",
@@ -74,8 +74,8 @@
74
74
  ],
75
75
  "dependencies": {
76
76
  "qs-esm": "8.0.1",
77
- "@payloadcms/ui": "4.0.0-internal.5f0cd13",
78
- "@payloadcms/translations": "4.0.0-internal.5f0cd13"
77
+ "@payloadcms/translations": "4.0.0-internal.688c4d0",
78
+ "@payloadcms/ui": "4.0.0-internal.688c4d0"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/json-schema": "7.0.15",
@@ -83,14 +83,14 @@
83
83
  "@types/react-dom": "19.2.3",
84
84
  "stripe": "18.3.0",
85
85
  "@payloadcms/eslint-config": "3.28.0",
86
- "@payloadcms/translations": "4.0.0-internal.5f0cd13",
87
- "payload": "4.0.0-internal.5f0cd13",
88
- "@payloadcms/next": "4.0.0-internal.5f0cd13"
86
+ "@payloadcms/next": "4.0.0-internal.688c4d0",
87
+ "@payloadcms/translations": "4.0.0-internal.688c4d0",
88
+ "payload": "4.0.0-internal.688c4d0"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
92
92
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
93
- "payload": "4.0.0-internal.5f0cd13"
93
+ "payload": "4.0.0-internal.688c4d0"
94
94
  },
95
95
  "publishConfig": {
96
96
  "registry": "https://registry.npmjs.org/"