@loczer/storefront-sdk 0.192.0 → 0.193.0

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.
Files changed (29) hide show
  1. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts +10 -0
  2. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts.map +1 -0
  3. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +104 -0
  4. package/dist/components/ContractSaleDocument/Invoice.d.ts +2 -2
  5. package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
  6. package/dist/components/ContractSaleDocument/Invoice.js +182 -135
  7. package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
  8. package/dist/components/ContractSaleDocument/InvoiceDetails.js +106 -138
  9. package/dist/components/ContractSaleDocument/TermsAndConditionsContent.d.ts +0 -2
  10. package/dist/components/ContractSaleDocument/TermsAndConditionsContent.d.ts.map +1 -1
  11. package/dist/components/ContractSaleDocument/TermsAndConditionsContent.js +32 -37
  12. package/dist/i18n/en.d.ts +4 -0
  13. package/dist/i18n/en.d.ts.map +1 -1
  14. package/dist/i18n/en.js +4 -0
  15. package/dist/i18n/fr.d.ts +4 -0
  16. package/dist/i18n/fr.d.ts.map +1 -1
  17. package/dist/i18n/fr.js +4 -0
  18. package/dist/index.d.ts +121 -9
  19. package/dist/index.js +5 -5
  20. package/dist/lib/contractSaleDocument.d.ts +44 -3
  21. package/dist/lib/contractSaleDocument.d.ts.map +1 -1
  22. package/dist/lib/contractSaleDocument.js +33 -17
  23. package/dist/lib/contractSaleDocumentApi.d.ts +54 -6
  24. package/dist/lib/contractSaleDocumentApi.d.ts.map +1 -1
  25. package/dist/lib/contractSaleDocumentApi.js +41 -37
  26. package/dist/pages/ContractSaleDocumentPage.d.ts +21 -9
  27. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  28. package/dist/storefront.css +1 -1
  29. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import { ContractSaleDocument, ContractSaleDocumentLanguage } from '../../lib/contractSaleDocument';
2
+ type DocumentAcceptanceSectionProps = {
3
+ saleDocument: ContractSaleDocument;
4
+ documentLanguage: ContractSaleDocumentLanguage;
5
+ formatDate: (date: Date | string | number) => string;
6
+ className?: string;
7
+ };
8
+ export declare function DocumentAcceptanceSection({ saleDocument, documentLanguage, formatDate, className, }: DocumentAcceptanceSectionProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
10
+ //# sourceMappingURL=DocumentAcceptanceSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentAcceptanceSection.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/DocumentAcceptanceSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAIvC,KAAK,8BAA8B,GAAG;IACpC,YAAY,EAAE,oBAAoB,CAAA;IAClC,gBAAgB,EAAE,4BAA4B,CAAA;IAC9C,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,SAAS,GACV,EAAE,8BAA8B,kDAuGhC"}
@@ -0,0 +1,104 @@
1
+ import { formatContractSaleDocumentLabel as e } from "./language.js";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { cn as i } from "@rpcbase/ui";
4
+ import { useTranslation as a } from "react-i18next";
5
+ //#region src/components/ContractSaleDocument/DocumentAcceptanceSection.tsx
6
+ function o({ saleDocument: o, documentLanguage: s, formatDate: c, className: l }) {
7
+ let { t: u } = a(), d = (t, n = {}) => e(u, s, t, n), f = o.acceptance?.mode === "signature" ? o.acceptance : null, p = o.acceptance?.mode === "acceptance" ? o.acceptance : null, m = o.acceptanceLevel === "signature" || f !== null;
8
+ return o.acceptanceLevel === "none" && !o.acceptance ? null : /* @__PURE__ */ n("section", {
9
+ className: i("mt-auto border-t border-border pt-8", l),
10
+ "data-testid": "contract-sale-document-acceptance-section",
11
+ children: m ? /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("p", {
12
+ className: "mb-12 text-center text-sm text-muted-foreground",
13
+ children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_acknowledgement") })
14
+ }), f ? /* @__PURE__ */ r("div", {
15
+ className: "flex flex-col justify-between md:flex-row",
16
+ children: [/* @__PURE__ */ r("div", {
17
+ className: "mb-8 w-full md:mb-0 md:w-2/5",
18
+ children: [
19
+ /* @__PURE__ */ n("p", {
20
+ className: "font-semibold text-foreground",
21
+ children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_issuer_label") })
22
+ }),
23
+ /* @__PURE__ */ n("p", {
24
+ className: "mb-2 mt-2 text-sm text-muted-foreground",
25
+ children: /* @__PURE__ */ r("span", { children: [d("docs_contract_sale_signature_date_label"), ": ___________________"] })
26
+ }),
27
+ /* @__PURE__ */ n("div", { className: "h-24 rounded-lg bg-muted/40" })
28
+ ]
29
+ }), /* @__PURE__ */ r("div", {
30
+ className: "w-full text-left md:w-2/5",
31
+ children: [
32
+ /* @__PURE__ */ n("p", {
33
+ className: "font-semibold text-foreground",
34
+ children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_customer_label") })
35
+ }),
36
+ /* @__PURE__ */ n("p", {
37
+ className: "mb-2 mt-2 text-sm text-muted-foreground",
38
+ children: /* @__PURE__ */ r("span", { children: [
39
+ d("docs_contract_sale_signature_date_label"),
40
+ ": ",
41
+ c(f.date)
42
+ ] })
43
+ }),
44
+ /* @__PURE__ */ n("div", {
45
+ className: "flex h-24 items-center justify-center rounded-lg bg-muted/40 p-2",
46
+ children: /* @__PURE__ */ n("img", {
47
+ src: f.signature,
48
+ alt: d("docs_contract_sale_signature_image_alt"),
49
+ className: "max-h-full max-w-full"
50
+ })
51
+ }),
52
+ /* @__PURE__ */ n("p", {
53
+ className: "mt-2 text-sm text-foreground",
54
+ children: /* @__PURE__ */ n("span", { children: f.name })
55
+ }),
56
+ /* @__PURE__ */ n("p", {
57
+ className: "text-sm text-muted-foreground",
58
+ children: /* @__PURE__ */ n("span", { children: f.phone })
59
+ })
60
+ ]
61
+ })]
62
+ }) : /* @__PURE__ */ r("div", {
63
+ className: "flex flex-col justify-between md:flex-row",
64
+ children: [/* @__PURE__ */ r("div", {
65
+ className: "mb-8 w-full md:mb-0 md:w-2/5",
66
+ children: [
67
+ /* @__PURE__ */ n("p", {
68
+ className: "font-semibold text-foreground",
69
+ children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_issuer_label") })
70
+ }),
71
+ /* @__PURE__ */ n("p", {
72
+ className: "mb-2 mt-2 text-sm text-muted-foreground",
73
+ children: /* @__PURE__ */ r("span", { children: [d("docs_contract_sale_signature_date_label"), ": ___________________"] })
74
+ }),
75
+ /* @__PURE__ */ n("div", { className: "h-24 rounded-lg bg-muted/40" })
76
+ ]
77
+ }), /* @__PURE__ */ r("div", {
78
+ className: "w-full md:w-2/5",
79
+ children: [
80
+ /* @__PURE__ */ n("p", {
81
+ className: "font-semibold text-foreground",
82
+ children: /* @__PURE__ */ n("span", { children: d("docs_contract_sale_signature_customer_label") })
83
+ }),
84
+ /* @__PURE__ */ n("p", {
85
+ className: "mb-2 mt-2 text-sm text-muted-foreground",
86
+ children: /* @__PURE__ */ r("span", { children: [d("docs_contract_sale_signature_date_label"), ": ___________________"] })
87
+ }),
88
+ /* @__PURE__ */ n("div", { className: "h-24 rounded-lg bg-muted/40" })
89
+ ]
90
+ })]
91
+ })] }) : /* @__PURE__ */ r("div", {
92
+ className: "rounded-lg border border-border bg-muted/30 p-4",
93
+ children: [/* @__PURE__ */ n("p", {
94
+ className: "text-sm font-medium text-foreground",
95
+ children: /* @__PURE__ */ n("span", { children: d(p ? "docs_contract_sale_acceptance_section_accepted_title" : "docs_contract_sale_acceptance_section_required_title") })
96
+ }), /* @__PURE__ */ n("p", {
97
+ className: "mt-1 text-sm text-muted-foreground",
98
+ children: /* @__PURE__ */ n("span", { children: p ? d("docs_contract_sale_acceptance_section_accepted_date", { date: c(p.date) }) : d("docs_contract_sale_acceptance_section_required_description") })
99
+ })]
100
+ })
101
+ });
102
+ }
103
+ //#endregion
104
+ export { o as DocumentAcceptanceSection };
@@ -1,13 +1,13 @@
1
1
  import { ContractSaleDocument as ContractSaleDocumentData, ContractSaleDocumentAcceptanceRecord } from '../../lib/contractSaleDocument';
2
2
  type ContractSaleDocumentProps = {
3
3
  data: ContractSaleDocumentData;
4
- showTermsPage?: boolean;
4
+ showAppendices?: boolean;
5
5
  withEnglishTranslation?: boolean;
6
6
  heightMode?: "parent" | "viewport";
7
7
  renderMode?: "interactive" | "pdf";
8
8
  publicDocumentUrl?: string;
9
9
  onAccept?: (acceptance: ContractSaleDocumentAcceptanceRecord) => Promise<ContractSaleDocumentData | void> | ContractSaleDocumentData | void;
10
10
  };
11
- export declare function ContractSaleDocument({ data: initialData, showTermsPage, withEnglishTranslation, heightMode, renderMode, publicDocumentUrl, onAccept, }: ContractSaleDocumentProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ContractSaleDocument({ data: initialData, showAppendices, withEnglishTranslation, heightMode, renderMode, publicDocumentUrl, onAccept, }: ContractSaleDocumentProps): import("react/jsx-runtime").JSX.Element;
12
12
  export type { ContractSaleDocumentProps };
13
13
  //# sourceMappingURL=Invoice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/Invoice.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,oBAAoB,IAAI,wBAAwB,EAChD,oCAAoC,EAIrC,MAAM,gCAAgC,CAAA;AAWvC,OAAO,eAAe,CAAA;AAGtB,KAAK,yBAAyB,GAAG;IAC/B,IA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