@donotdev/templates 0.0.9 → 0.0.11
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/dist/AdminLandingTemplate.d.ts +0 -1
- package/dist/AdminLandingTemplate.d.ts.map +1 -1
- package/dist/AdminLandingTemplate.js +1 -1
- package/dist/DashboardTemplate.d.ts.map +1 -1
- package/dist/DashboardTemplate.js +1 -1
- package/dist/HomeTemplate.d.ts.map +1 -1
- package/dist/HomeTemplate.js +1 -1
- package/dist/LoginTemplate.d.ts.map +1 -1
- package/dist/LoginTemplate.js +1 -1
- package/dist/ProfileTemplate.d.ts.map +1 -1
- package/dist/ProfileTemplate.js +1 -1
- package/dist/WhatsNewTemplate.d.ts.map +1 -1
- package/dist/WhatsNewTemplate.js +1 -1
- package/dist/billing/BillingSuccessTemplate.d.ts +1 -3
- package/dist/billing/BillingSuccessTemplate.d.ts.map +1 -1
- package/dist/billing/BillingSuccessTemplate.js +1 -1
- package/dist/billing/CheckoutTemplate.d.ts +2 -8
- package/dist/billing/CheckoutTemplate.d.ts.map +1 -1
- package/dist/billing/CheckoutTemplate.js +1 -1
- package/dist/billing/PaymentTemplate.d.ts +2 -3
- package/dist/billing/PaymentTemplate.d.ts.map +1 -1
- package/dist/billing/PaymentTemplate.js +1 -1
- package/dist/billing/SubscriptionTemplate.d.ts +2 -3
- package/dist/billing/SubscriptionTemplate.d.ts.map +1 -1
- package/dist/billing/SubscriptionTemplate.js +1 -1
- package/dist/billing/UserSubscriptionTemplate.d.ts +1 -1
- package/dist/billing/UserSubscriptionTemplate.d.ts.map +1 -1
- package/dist/billing/UserSubscriptionTemplate.js +1 -1
- package/dist/blog/BlogList.d.ts +1 -1
- package/dist/blog/BlogList.d.ts.map +1 -1
- package/dist/blog/BlogList.js +1 -1
- package/dist/blog/BlogPost.d.ts +1 -1
- package/dist/blog/BlogPost.d.ts.map +1 -1
- package/dist/blog/BlogPost.js +1 -1
- package/dist/blog/blog-loader.js +2 -2
- package/dist/components/MarkdownViewer.d.ts +0 -1
- package/dist/components/MarkdownViewer.d.ts.map +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/crud/CarCardListTemplate.d.ts +0 -1
- package/dist/crud/CarCardListTemplate.d.ts.map +1 -1
- package/dist/crud/CarCardListTemplate.js +1 -1
- package/dist/crud/CarDetailTemplate.d.ts +0 -1
- package/dist/crud/CarDetailTemplate.d.ts.map +1 -1
- package/dist/crud/CarDetailTemplate.js +1 -1
- package/dist/crud/InquiryAdminTemplate.d.ts +1 -2
- package/dist/crud/InquiryAdminTemplate.d.ts.map +1 -1
- package/dist/crud/InquiryAdminTemplate.js +1 -1
- package/dist/crud/InquiryFormTemplate.d.ts +0 -1
- package/dist/crud/InquiryFormTemplate.d.ts.map +1 -1
- package/dist/crud/InquiryFormTemplate.js +1 -1
- package/dist/crud/ProductCardListTemplate.d.ts +0 -1
- package/dist/crud/ProductCardListTemplate.d.ts.map +1 -1
- package/dist/crud/ProductCardListTemplate.js +1 -40
- package/dist/legal/LegalNoticeTemplate.d.ts +10 -1
- package/dist/legal/LegalNoticeTemplate.d.ts.map +1 -1
- package/dist/legal/LegalNoticeTemplate.js +1 -1
- package/dist/legal/PrivacyPolicyTemplate.d.ts +10 -2
- package/dist/legal/PrivacyPolicyTemplate.d.ts.map +1 -1
- package/dist/legal/PrivacyPolicyTemplate.js +1 -1
- package/dist/legal/TermsOfServiceTemplate.d.ts +10 -2
- package/dist/legal/TermsOfServiceTemplate.d.ts.map +1 -1
- package/dist/legal/TermsOfServiceTemplate.js +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useState as X,useEffect as me,useMemo as F,useCallback as ge}from"react";import{Share2 as pe,Heart as fe}from"lucide-react";import{Grid as D,Card as T,Stack as h,Text as c,Section as $,Button as x,ImageGallery as ye,Spinner as ve}from"@donotdev/components";import{PageContainer as P,Link as be,useRouteParam as Se,useNavigate as Fe}from"@donotdev/ui";import{useTranslation as W}from"@donotdev/core";import{useCrud as ke,useCrudCardList as Ce,formatValue as I,useRelatedItems as we,useEntityFavorites as Ue}from"@donotdev/crud";import{InquiryFormTemplate as xe}from"./InquiryFormTemplate";function Ie({entity:n,id:Y,customerEntity:E,inquiryEntity:q,relatedFields:Z=["make","price"],locale:ee,makeField:p="make",modelField:f="model",variantField:A="variant",yearField:m="year",mileageField:y="mileage",fuelTypeField:k="fuelType",transmissionField:C="transmission",priceField:d="price",imagesField:N="images",descriptionField:V,contextField:te="carId",pageNamespace:re}){const ie=Se("id"),v=Y||ie||"",ne=Fe(),le=n.namespace||`entity-${n.name.toLowerCase()}`,{t:a,i18n:ae}=W([le,"crud"]),oe=re||n.collection,{t:l}=W(oe),{t:ze}=W("crud"),z=ee||ae?.language?.replace("_","-")||"en-US",{get:G}=ke(n),[r,se]=X(null),[H,w]=X("pending"),{data:ce}=Ce(n,{staleTime:1e3*60*30}),{isFavorite:de,toggleFavorite:ue}=Ue({collection:n.collection}),R=de(v),U=F(()=>n.fields[d],[n.fields,d]),j=ge(e=>e==null?"\u2014":new Intl.NumberFormat(z).format(e)+" km",[z]),_=F(()=>{if(V)return V;const e=`description_${z}`;return n.fields[e]?e:n.fields.description?"description":null},[V,z,n.fields]),L=F(()=>{const e=r?.[N];return e?Array.isArray(e)?e.map(i=>typeof i=="object"&&i&&"fullUrl"in i?{fullUrl:i.fullUrl,thumbUrl:i.thumbUrl}:{fullUrl:i,thumbUrl:i}):[{fullUrl:e,thumbUrl:e}]:[]},[r,N]),g=F(()=>{if(!r)return"";const e=r[p]||"",i=r[f]||"",o=r[A]||"";return[e,i,o].filter(Boolean).join(" ")},[r,p,f,A]),M=F(()=>{if(!r)return[];const e=[],i=r[m];i!=null&&e.push({label:a(m),value:String(i)});const o=r[y];o!=null&&e.push({label:a(y),value:j(o)});const b=r[k];if(b&&n.fields[k]){const u=I(b,n.fields[k],a,{compact:!0});e.push({label:a(k),value:typeof u=="string"?u:String(b)})}const S=r[C];if(S&&n.fields[C]){const u=I(S,n.fields[C],a,{compact:!0});e.push({label:a(C),value:typeof u=="string"?u:String(S)})}return e},[r,m,y,k,C,n.fields,a,j]),{items:J}=we(n,r,ce?.items||[],Z,{limit:3,tolerance:.3}),K=F(()=>{if(!r)return g;const e=[];if(r[p]&&e.push(String(r[p])),r[f]&&e.push(String(r[f])),r[m]&&e.push(String(r[m])),r[y]&&e.push(j(r[y])),r[d]&&U){const i=r[d],o=I(i,U,a,{asString:!0});e.push(typeof o=="string"?o:String(r[d]))}return e.length>0?e.join(" \u2022 "):g},[r,p,f,m,y,d,U,j,a,g]);me(()=>{if(!v){w("error");return}w("pending"),G(v).then(e=>{e?(se(e),w("success")):w("error")}).catch(()=>{w("error")})},[v,G]);const he=async()=>{try{navigator.share?await navigator.share({title:g,url:window.location.href}):await navigator.clipboard.writeText(window.location.href)}catch(e){if(e instanceof Error&&e.name==="AbortError")return}},O=_&&r?r[_]:null;return H==="pending"?t(P,{children:t(ve,{overlay:!0})}):H==="error"||!r?t(P,{children:s(h,{direction:"column",gap:"large",style:{padding:"var(--gap-xl) 0",textAlign:"center"},children:[t(c,{level:"h2",children:l("notFound","Vehicle not found")}),t(be,{path:"/",children:t(x,{variant:"primary",children:l("backToHome","Back to home")})})]})}):s(P,{children:[t($,{children:s(D,{cols:[1,1,2,2],gap:"large",children:[t("div",{children:L.length>0?t(ye,{images:L,altPrefix:g}):t("div",{style:{width:"100%",aspectRatio:"16/9",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--muted)",borderRadius:"var(--radius-lg)"},children:t(c,{variant:"muted",children:l("noImages","No images")})})}),s(h,{direction:"column",gap:"large",children:[s(h,{direction:"column",gap:"tight",children:[t(h,{direction:"row",gap:"tight",align:"center",children:t(c,{level:"h1",style:{margin:0},children:g})}),t("div",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,color:"var(--accent)"},children:(()=>{const e=r[d];if(e==null||!U)return null;const i=I(e,U,a,{});return typeof i=="string"?t(c,{variant:"accent",weight:"bold",style:{fontSize:"var(--font-size-3xl)"},children:i}):i})()})]}),M.length>0&&t(T,{variant:"glass",children:t(D,{cols:2,children:M.map(({label:e,value:i})=>s(h,{direction:"column",gap:"tight",children:[t(c,{variant:"muted",style:{fontSize:"var(--font-size-sm)"},children:e}),t(c,{style:{fontWeight:500},children:i})]},e))})}),s(h,{direction:"row",children:[E&&q?t(x,{variant:"primary",style:{flex:1},onClick:()=>{const e=document.getElementById("inquiry-form");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},children:l("contactUs","Contact us")}):t(x,{variant:"primary",style:{flex:1},disabled:!0,children:l("contactUs","Contact us")}),t(x,{variant:"outline",icon:t(pe,{size:18}),onClick:he,children:l("share","Share")}),t(x,{variant:R?"primary":"outline",icon:t(fe,{size:18}),onClick:()=>ue(v),children:R?l("saved","Saved"):l("save","Save")})]})]})]})}),O&&t($,{title:l("description","Description"),children:t(T,{variant:"glass",children:t(c,{style:{whiteSpace:"pre-wrap",lineHeight:1.7},children:O})})}),E&&q&&t($,{id:"inquiry-form",title:l("interested","Interested?"),children:t(T,{variant:"glass",title:l("getInTouch","Get in touch"),children:t(xe,{customerEntity:E,inquiryEntity:q,contextId:v,contextName:g,contextDetails:K,messagePlaceholder:K,contextField:te})})}),J.length>0&&t($,{title:l("similarVehicles","Similar Vehicles"),children:t(D,{cols:[1,2,3,3],children:J.map(e=>{const i=e[N],o=i?typeof i=="string"?i:Array.isArray(i)?i[0]?.thumbUrl||i[0]?.fullUrl||i[0]:null:null,b=e[p]||"",S=e[f]||"";return t(T,{clickable:!0,onClick:()=>ne(`/${n.collection}/${e.id}`),elevated:!0,children:s(h,{direction:"column",children:[o&&t("div",{style:{width:"100%",aspectRatio:"16/9",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--muted)"},children:t("img",{src:o,alt:`${b} ${S}`,style:{width:"100%",height:"100%",objectFit:"cover"}})}),s(h,{direction:"column",gap:"tight",children:[s(c,{level:"h4",style:{margin:0},children:[b," ",S]}),t(c,{variant:"muted",children:e[m]}),(()=>{const u=e[d],Q=n.fields[d];if(u==null||!Q)return null;const B=I(u,Q,a,{compact:!0});return typeof B=="string"?t(c,{style:{fontWeight:700,color:"var(--accent)"},children:B}):t("div",{style:{fontWeight:700,color:"var(--accent)"},children:B})})()]})]})},e.id)})})})]})}export{Ie as CarDetailTemplate};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { Entity } from '@donotdev/core';
|
|
3
|
-
interface InquiryAdminTemplateProps {
|
|
3
|
+
export interface InquiryAdminTemplateProps {
|
|
4
4
|
/** Customer entity definition (linked via customerId) */
|
|
5
5
|
customerEntity: Entity;
|
|
6
6
|
/** Inquiry entity definition */
|
|
@@ -19,5 +19,4 @@ interface InquiryAdminTemplateProps {
|
|
|
19
19
|
title?: string;
|
|
20
20
|
}
|
|
21
21
|
export declare function InquiryAdminTemplate({ customerEntity, inquiryEntity, customerBasePath, collapsible, defaultOpen, open, onOpenChange, title, }: InquiryAdminTemplateProps): ReactElement;
|
|
22
|
-
export {};
|
|
23
22
|
//# sourceMappingURL=InquiryAdminTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InquiryAdminTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/InquiryAdminTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InquiryAdminTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/InquiryAdminTemplate.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAe1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAS7C,MAAM,WAAW,yBAAyB;IACxC,yDAAyD;IACzD,cAAc,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,aAAa,EACb,gBAA+B,EAC/B,WAAmB,EACnB,WAAmB,EACnB,IAAI,EACJ,YAAY,EACZ,KAAK,GACN,EAAE,yBAAyB,GAAG,YAAY,CAmS1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as s,Fragment as Y}from"react/jsx-runtime";import{useMemo as j,useCallback as H}from"react";import{Mail as J,Phone as K,User as Q,CheckCircle2 as x,Clock as X}from"lucide-react";import{Button as y,Card as P,Section as q,Stack as o,Text as d,Badge as Z,Grid as _,Spinner as ee}from"@donotdev/components";import{useTranslation as E,formatDate as te}from"@donotdev/core";import{Link as C}from"@donotdev/ui";import{useCrud as ae,useCrudList as L,translateLabel as ie}from"@donotdev/crud";function ne({customerEntity:M,inquiryEntity:m,customerBasePath:O="/customers",collapsible:S=!1,defaultOpen:B=!1,open:D,onOpenChange:z,title:R}){const{t:p}=E(`entity-${m.name.toLowerCase()}`),{t:r}=E("crud"),T=R||p("name"),{items:h,loading:U}=L(m),{items:k}=L(M),W=j(()=>{const e=new Map;return k?.forEach(i=>{i.id&&e.set(i.id,i)}),e},[k]),{update:N}=ae(m),F=H(async e=>{await N(e,{status:"responded"})},[N]),b=j(()=>h?[...h].filter(e=>(typeof e.status=="string"?e.status:"draft")==="draft").sort((e,i)=>{const a=(typeof e.createdAt=="string"?e.createdAt:typeof e.date=="string"?e.date:"")||"";return((typeof i.createdAt=="string"?i.createdAt:typeof i.date=="string"?i.date:"")||"").localeCompare(a)}):[],[h]);if(U)return t(q,{title:p("name"),children:t(ee,{})});const w=t(Y,{children:b.length===0?t(d,{variant:"muted",children:r("noInquiries",{defaultValue:"No inquiries found."})}):t(_,{cols:[1,1,2,2],children:b.map(e=>{const i=typeof e.customerId=="string"?e.customerId:void 0,a=i?W.get(i):void 0,$=typeof e.status=="string"?e.status:"draft",f=$==="available",c=typeof a?.email=="string"?a.email:void 0,u=typeof a?.phone=="string"?a.phone:void 0,G=a&&(a.firstName||a.lastName)?[a.firstName,a.lastName].filter(Boolean).join(" "):void 0,A=typeof e.message=="string"&&e.message?e.message.length>150?`${e.message.substring(0,150)}...`:e.message:"",I=typeof e.date=="string"?e.date:typeof e.createdAt=="string"?e.createdAt:void 0,V=s(o,{children:[s(o,{direction:"row",gap:"tight",align:"center",justify:"between",children:[t(Z,{variant:f?"secondary":"outline",children:s(o,{direction:"row",gap:"tight",align:"center",children:[f?t(x,{size:12}):t(X,{size:12}),ie(`status.${$}`,p)]})}),I&&t(d,{variant:"muted",level:"small",children:te(I)})]}),a?s(o,{gap:"tight",children:[s(o,{direction:"row",gap:"tight",align:"center",children:[t(Q,{size:14}),t(d,{weight:"medium",level:"small",children:G||r("customer",{defaultValue:"Customer"})})]}),c&&t(d,{level:"small",variant:"muted",children:c}),u&&t(d,{level:"small",variant:"muted",children:u})]}):t(d,{variant:"muted",level:"small",children:r("noCustomer",{defaultValue:"No customer linked"})}),A&&t(d,{level:"small",children:A}),s(o,{gap:"tight",children:[(c||u)&&s(o,{direction:"row",gap:"tight",children:[c&&t(y,{variant:"outline",icon:J,fullWidth:!0,className:"dndev-flex-1",render:({children:n,className:l,...g})=>t(C,{path:`mailto:${c}${typeof e.carId=="string"&&e.carId?`?subject=${encodeURIComponent(r("actions.replySubject",{defaultValue:"Re: Your inquiry"}))}`:""}`,className:l,onClick:v=>v.stopPropagation(),...g,children:n}),children:r("actions.email",{defaultValue:"Email"})}),u&&t(y,{variant:"outline",icon:K,fullWidth:!0,className:"dndev-flex-1",render:({children:n,className:l,...g})=>t(C,{path:`tel:${u}`,className:l,onClick:v=>v.stopPropagation(),...g,children:n}),children:r("actions.call",{defaultValue:"Call"})})]}),!f&&t(y,{variant:"outline",icon:x,fullWidth:!0,onClick:n=>{n.preventDefault(),n.stopPropagation(),F(e.id)},children:r("actions.markResponded",{defaultValue:"Mark responded"})})]})]});return a?.id?t(C,{path:`${O}/${a.id}`,className:"dndev-block dndev-h-full",onClick:n=>{const l=n.target;(l.closest("button")||l.closest('a[href^="mailto:"]')||l.closest('a[href^="tel:"]'))&&(n.preventDefault(),n.stopPropagation())},children:t(P,{clickable:!0,children:V})},e.id):t(P,{children:V},e.id)})})});return S?t(q,{title:T,collapsible:!0,defaultOpen:B,open:D,onOpenChange:z,children:w}):w}export{ne as InquiryAdminTemplate};
|
|
@@ -43,5 +43,4 @@ export interface InquiryFormTemplateProps {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
export declare function InquiryFormTemplate({ customerEntity, inquiryEntity, contextId, contextName, contextDetails, messagePlaceholder, contextField, customerFields, messageField, consentField, onSuccess, onError, }: InquiryFormTemplateProps): ReactElement;
|
|
46
|
-
export default InquiryFormTemplate;
|
|
47
46
|
//# sourceMappingURL=InquiryFormTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InquiryFormTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/InquiryFormTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InquiryFormTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/InquiryFormTemplate.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACvC,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,YAAsB,EACtB,cAA4D,EAC5D,YAAwB,EACxB,YAA4B,EAC5B,SAAS,EACT,OAAO,GACR,EAAE,wBAAwB,GAAG,YAAY,CAiPzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as t,jsxs as y,Fragment as B}from"react/jsx-runtime";import{useState as D}from"react";import{Stack as N,Button as G,Card as R,Alert as W,Text as T}from"@donotdev/components";import{useCrud as $,useEntityForm as k,FormFieldRenderer as l}from"@donotdev/crud";import{useTranslation as C}from"@donotdev/core";function H({customerEntity:s,inquiryEntity:m,contextId:w,contextName:S,contextDetails:v,messagePlaceholder:V,contextField:I="carId",customerFields:u=["firstName","lastName","email","phone"],messageField:c="message",consentField:f="gdprConsent",onSuccess:j,onError:L}){const{add:O}=$(s),{add:P}=$(m),{t:d}=C(`entity-${s.name.toLowerCase()}`),{t:o}=C(`entity-${m.name.toLowerCase()}`),b=v?o("message.placeholder.withDetails",`Inquiry about: ${v}`,{details:v}):S?o("message.placeholder.context",`Inquiry about: ${S}`,{name:S}):"",g=k(m,{operation:"create",defaultValues:{[I]:w||void 0,date:new Date().toISOString(),status:"draft",[c]:b}}),p=m.fields[c],F=V||p?.options?.placeholder,r=k(s,{operation:"create",defaultValues:{type:"Prospect",status:"draft",[f]:!1}}),[h,x]=D("idle"),[q,E]=D(""),z=async a=>{x("loading"),E("");try{const n=await O(a),e=g.getValues(c),i=(typeof e=="string"?e.trim():"")||b||o("message.default","General inquiry"),A={customerId:n,[I]:w||void 0,[c]:i,date:new Date().toISOString(),status:"draft"};await P(A),x("success"),r.reset(),g.reset(),j?.()}catch(n){x("error");const e=n instanceof Error?n:new Error(String(n));E(e.message),L?.(e)}};return h==="success"?t(R,{variant:"glass",children:y(N,{direction:"column",style:{textAlign:"center",padding:"var(--gap-lg)"},children:[t("div",{style:{fontSize:"2rem",color:"var(--success)"},children:"\u2713"}),t(T,{level:"h3",children:o("success.title","Thank you for your inquiry!")}),t(T,{variant:"muted",children:o("success.message","We'll get back to you as soon as possible.")})]})}):t("form",{onSubmit:a=>{a.preventDefault(),r.handleSubmit(z)(a)},children:y(N,{direction:"column",children:[h==="error"&&q&&t(W,{variant:"error",description:q}),(()=>{const a=s.fields.firstName,n=s.fields.lastName;return u.includes("firstName")&&u.includes("lastName")&&a&&n?y(B,{children:[y(N,{direction:"row",children:[t("div",{style:{flex:1},children:t(l,{name:"firstName",config:a,control:r.control,errors:r.formState.errors,t:d})}),t("div",{style:{flex:1},children:t(l,{name:"lastName",config:n,control:r.control,errors:r.formState.errors,t:d})})]}),u.filter(e=>e!=="firstName"&&e!=="lastName").map(e=>{const i=s.fields[e];return i?t(l,{name:e,config:i,control:r.control,errors:r.formState.errors,t:d},e):null})]}):u.map(e=>{const i=s.fields[e];return i?t(l,{name:e,config:i,control:r.control,errors:r.formState.errors,t:d},e):null})})(),p&&t(l,{name:c,config:{...p,options:{...p.options,...F&&{placeholder:F}}},control:g.control,errors:g.formState.errors,t:o}),s.fields[f]&&t(l,{name:f,config:s.fields[f],control:r.control,errors:r.formState.errors,t:d}),t(G,{type:"submit",variant:"primary",disabled:h==="loading"||r.formState.isSubmitting,style:{width:"100%"},children:h==="loading"?o("submit.sending","Sending..."):o("submit","Send Inquiry")})]})})}export{H as InquiryFormTemplate};
|
|
@@ -38,5 +38,4 @@ export interface ProductCardListTemplateProps extends Omit<EntityCardListProps,
|
|
|
38
38
|
* @returns React component
|
|
39
39
|
*/
|
|
40
40
|
export declare function ProductCardListTemplate({ entity, title, description, basePath, onClick, cols, staleTime, filter, hideFilters, titleFields, subtitleField, priceField, specsFields, badgeField, locale, imageAspectRatio, hideSection, }: ProductCardListTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
export default ProductCardListTemplate;
|
|
42
41
|
//# sourceMappingURL=ProductCardListTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCardListTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/ProductCardListTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductCardListTemplate.d.ts","sourceRoot":"","sources":["../../src/crud/ProductCardListTemplate.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAa1D,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,mBAAmB,EACnB,MAAM,CACP;IACC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sFAAsF;IACtF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sGAAsG;IACtG,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAiCD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAO,EACP,IAAmB,EACnB,SAA0B,EAC1B,MAAM,EACN,WAAmB,EACnB,WAAW,EACX,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,MAAM,EACN,gBAAwB,EACxB,WAAmB,GACpB,EAAE,4BAA4B,2CAqd9B"}
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
"use client";import{jsx as l,jsxs as
|
|
2
|
-
.product-card {
|
|
3
|
-
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
4
|
-
}
|
|
5
|
-
.product-card:hover {
|
|
6
|
-
transform: translateY(-4px);
|
|
7
|
-
box-shadow: var(--shadow-lg);
|
|
8
|
-
}
|
|
9
|
-
.product-card-image {
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
border-radius: var(--radius-md);
|
|
12
|
-
background: var(--muted);
|
|
13
|
-
}
|
|
14
|
-
.product-card-image img {
|
|
15
|
-
transition: transform 0.3s ease;
|
|
16
|
-
}
|
|
17
|
-
.product-card:hover .product-card-image img {
|
|
18
|
-
transform: scale(1.05);
|
|
19
|
-
}
|
|
20
|
-
.product-price {
|
|
21
|
-
font-size: var(--font-size-2xl);
|
|
22
|
-
font-weight: 700;
|
|
23
|
-
color: var(--primary);
|
|
24
|
-
}
|
|
25
|
-
.product-specs {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-wrap: wrap;
|
|
28
|
-
gap: var(--gap-xs);
|
|
29
|
-
}
|
|
30
|
-
.product-spec-pill {
|
|
31
|
-
display: inline-flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
gap: var(--gap-xs);
|
|
34
|
-
padding: var(--gap-xs) var(--gap-sm);
|
|
35
|
-
background: var(--muted);
|
|
36
|
-
border-radius: var(--radius-full);
|
|
37
|
-
font-size: var(--font-size-sm);
|
|
38
|
-
color: var(--muted-foreground);
|
|
39
|
-
}
|
|
40
|
-
`}),(T||v)&&i("header",{style:{marginBottom:"var(--gap-lg)"},children:[T&&l("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,margin:0,marginBottom:v?"var(--gap-sm)":0},children:T}),v&&l("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:v})]}),!Z&&l(H,{title:a("crud:filters.title",{entity:E,defaultValue:`Browse ${E} - Filters`}),collapsible:!0,defaultOpen:!0,children:i(x,{direction:"column",children:[l(be,{variant:f?"primary":"outline",icon:l(U,{size:18}),onClick:()=>ce(!f),children:f?a("crud:favorites.showAll",{defaultValue:"Show All"}):a("crud:favorites.showFavorites",{defaultValue:"Show Favorites"})}),l(Ce,{entity:e,data:j,fieldsToFilter:e.listCardFields})]})}),(()=>{const r=p.length===0?i(x,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[l(w,{level:"h3",style:{color:"var(--muted-foreground)"},children:a("crud:emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),l(w,{style:{color:"var(--muted-foreground)"},children:a("crud:emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):l(me,{cols:Q,children:p.map(t=>{const n=D?t[D]:null,o=typeof n=="string"&&n.length>0?n:null,h=ae.map(s=>t[s]).filter(Boolean).join(" ")||t.id,P=_?t[_]:null,R=c?t[c]:null,M=c?e.fields[c]:null,z=u?t[u]:null,O=ie(t.id);return i(ve,{clickable:!0,onClick:()=>de(t.id),elevated:!0,className:"product-card",children:[l("div",{onClick:s=>{s.stopPropagation(),ne(t.id)},style:{position:"absolute",top:"var(--gap-sm)",left:"var(--gap-sm)",zIndex:10,cursor:"pointer",padding:"var(--gap-xs)",borderRadius:"var(--radius-full)",backgroundColor:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s"},onMouseEnter:s=>{s.currentTarget.style.backgroundColor="rgba(255, 255, 255, 1)"},onMouseLeave:s=>{s.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.9)"},"aria-label":O?a("crud:favorites.remove",{defaultValue:"Remove from favorites"}):a("crud:favorites.add",{defaultValue:"Add to favorites"}),children:l(U,{size:20,fill:O?"#ef4444":"#ffffff",stroke:O?"#ef4444":"#ffffff",style:{transition:"fill 0.2s, stroke 0.2s"}})}),i(x,{direction:"column",children:[o&&i("div",{className:"product-card-image",style:{position:"relative",width:"100%",aspectRatio:re},children:[l("img",{src:o,alt:h,style:{width:"100%",height:"100%",objectFit:"cover"}}),z&&l("div",{style:{position:"absolute",top:"var(--gap-sm)",insetInlineEnd:"var(--gap-sm)"},children:l(he,{variant:je(z),children:W(String(z),e.fields[u],a)})})]}),i(x,{direction:"column",gap:"tight",children:[i("div",{children:[l(w,{level:"h4",style:{margin:0},children:h}),P&&l(w,{level:"small",variant:"muted",style:{marginTop:"var(--gap-xs)"},children:P})]}),R!=null&&M&&l("div",{className:"product-price",children:(()=>{const s=Y(R,M,a,{compact:!0});return s})()}),N.length>0&&l("div",{className:"product-specs",children:N.map(s=>{const b=t[s];if(b==null)return null;const L=e.fields[s],fe=W(s,L,a),pe=L?Y(b,L,a,{compact:!0}):b;return i("span",{className:"product-spec-pill",children:[fe,": ",pe]},s)})})]})]})]},t.id)})});return te?r:l(H,{title:oe?a("crud:results.title.fetching",{defaultValue:"Fetching..."}):a("crud:results.title.count",{count:p.length,defaultValue:p.length===1?"Found 1 item":`Found ${p.length} items`}),collapsible:!0,defaultOpen:!0,children:r})})()]})}var $e=Se;export{Se as ProductCardListTemplate,$e as default};
|
|
1
|
+
"use client";import{jsx as l,jsxs as n,Fragment as ge}from"react/jsx-runtime";import{useMemo as d,useCallback as G}from"react";import{Heart as H}from"lucide-react";import{Grid as me,Card as pe,Stack as y,Text as b,Section as U,Badge as ve,Button as he}from"@donotdev/components";import{useTranslation as ye,getListCardFieldNames as q}from"@donotdev/core";import{useNavigate as be}from"@donotdev/ui";import{translateFieldLabel as D,useCrudCardList as Fe,EntityFilters as ke,matchesFilter as xe,useEntityFavorites as we,formatValue as J,useCrudFilters as Se}from"@donotdev/crud";const Ce={available:"success",active:"success",in_stock:"success",new:"success",pending:"warning",reserved:"warning",low_stock:"warning",sold:"destructive",unavailable:"destructive",out_of_stock:"destructive",inactive:"secondary",draft:"outline"};function je(e){const F=String(e).toLowerCase().replace(/[\s-]/g,"_");return Ce[F]||"secondary"}function ze({entity:e,title:F,description:K,basePath:Q,onClick:k,cols:X=[1,2,3,4],staleTime:Y=1e3*60*30,filter:x,hideFilters:Z=!1,titleFields:g,subtitleField:L,priceField:$,specsFields:m,badgeField:w,locale:ee,imageAspectRatio:te="4/3",hideSection:ie=!1}){const B=be(),R=Q??`/${e.collection}`,{t:r,i18n:le}=ye([e.namespace,"crud"]),Oe=ee||le?.language?.replace("_","-")||"en-US",o=d(()=>$||(Object.keys(e.fields).find(t=>e.fields[t]?.type==="price")??void 0),[$,e.fields]),c=d(()=>{if(w)return w;const t=["status","state","condition","availability"];return Object.keys(e.fields).find(i=>t.includes(i.toLowerCase())&&(e.fields[i]?.type==="select"||e.fields[i]?.type==="text"))},[w,e.fields]),re=d(()=>{if(g&&g.length>0)return g;const t=Object.keys(e.fields).find(i=>e.fields[i]?.type==="text");return t?[t]:[]},[g,e.fields]),A=d(()=>m&&m.length>0?m:Object.keys(e.fields).filter(t=>{if(t===o||t===c)return!1;const i=e.fields[t]?.type;return i==="number"||i==="select"}).slice(0,3),[m,e.fields,o,c]),{data:ae,loading:se}=Fe(e,{staleTime:Y}),S=ae?.items||[],{isFavorite:ne,toggleFavorite:oe,favoritesFilter:I}=we({collection:e.collection}),{showFavoritesOnly:u,setShowFavoritesOnly:de,filters:C}=Se({collection:e.collection}),E=G(t=>Object.keys(C).length===0?!0:Object.entries(C).every(([i,s])=>{const v=t[i],h=e.fields[i]?.type||"text";return xe(v,s,h)}),[C,e.fields]),f=d(()=>{let t=S;return t=t.filter(E),u&&(t=t.filter(I)),x&&(t=t.filter(x)),t},[S,E,u,I,x]),N=d(()=>q(e).find(i=>{const s=e.fields[i];return s?.type==="image"||s?.type==="images"})||Object.keys(e.fields).find(i=>{const s=e.fields[i];return s?.type==="image"||s?.type==="images"}),[e.listCardFields,e.listFields,e.fields]),ce=G(t=>{k?k(t):B(`${R}/${t}`)},[R,B,k]),j=F||r("name",{defaultValue:e.name}),p=K||r("description",{defaultValue:""}),_=r("name",{defaultValue:e.name});return n(ge,{children:[(j||p)&&n("header",{style:{marginBottom:"var(--gap-lg)"},children:[j&&l("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,margin:0,marginBottom:p?"var(--gap-sm)":0},children:j}),p&&l("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:p})]}),!Z&&l(U,{title:r("crud:filters.title",{entity:_,defaultValue:`Browse ${_} - Filters`}),collapsible:!0,defaultOpen:!0,children:n(y,{direction:"column",children:[l(he,{variant:u?"primary":"outline",icon:l(H,{size:18}),onClick:()=>de(!u),children:u?r("crud:favorites.showAll",{defaultValue:"Show All"}):r("crud:favorites.showFavorites",{defaultValue:"Show Favorites"})}),l(ke,{entity:e,data:S,fieldsToFilter:q(e)})]})}),(()=>{const t=f.length===0?n(y,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[l(b,{level:"h3",style:{color:"var(--muted-foreground)"},children:r("crud:emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),l(b,{style:{color:"var(--muted-foreground)"},children:r("crud:emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):l(me,{cols:X,children:f.map(i=>{const s=N?i[N]:null,v=typeof s=="string"&&s.length>0?s:null,h=re.map(a=>i[a]).filter(Boolean).join(" ")||String(i.id??""),M=L?i[L]:null,P=o?i[o]:null,W=o?e.fields[o]:null,z=c?i[c]:null,O=ne(i.id);return n(pe,{clickable:!0,onClick:()=>ce(i.id),elevated:!0,style:{transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[l("button",{type:"button",onClick:a=>{a.stopPropagation(),oe(i.id)},style:{position:"absolute",top:"var(--gap-sm)",insetInlineStart:"var(--gap-sm)",zIndex:10,cursor:"pointer",padding:"var(--gap-xs)",borderRadius:"var(--radius-full)",backgroundColor:"rgba(255, 255, 255, 0.9)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s",border:"none"},onMouseEnter:a=>{a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 1)"},onMouseLeave:a=>{a.currentTarget.style.backgroundColor="rgba(255, 255, 255, 0.9)"},"aria-label":O?r("crud:favorites.remove",{defaultValue:"Remove from favorites"}):r("crud:favorites.add",{defaultValue:"Add to favorites"}),children:l(H,{size:20,fill:O?"#ef4444":"#ffffff",stroke:O?"#ef4444":"#ffffff",style:{transition:"fill 0.2s, stroke 0.2s"}})}),n(y,{direction:"column",children:[v&&n("div",{style:{position:"relative",width:"100%",aspectRatio:te,overflow:"hidden",borderRadius:"var(--radius-md)",background:"var(--muted)"},children:[l("img",{src:v,alt:h,style:{width:"100%",height:"100%",objectFit:"cover"}}),z&&l("div",{style:{position:"absolute",top:"var(--gap-sm)",insetInlineEnd:"var(--gap-sm)"},children:l(ve,{variant:je(z),children:D(String(z),e.fields[c],r)})})]}),n(y,{direction:"column",gap:"tight",children:[n("div",{children:[l(b,{level:"h4",style:{margin:0},children:h}),M&&l(b,{level:"small",variant:"muted",style:{marginTop:"var(--gap-xs)"},children:M})]}),P!=null&&W&&l("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700,color:"var(--primary)"},children:J(P,W,r,{compact:!0})}),A.length>0&&l("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--gap-xs)"},children:A.map(a=>{const V=i[a];if(V==null)return null;const T=e.fields[a],ue=D(a,T,r),fe=T?J(V,T,r,{compact:!0}):String(V);return n("span",{style:{display:"inline-flex",alignItems:"center",gap:"var(--gap-xs)",padding:"var(--gap-xs) var(--gap-sm)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:[ue,": ",fe]},a)})})]})]})]},i.id)})});return ie?t:l(U,{title:se?r("crud:results.title.fetching",{defaultValue:"Fetching..."}):r("crud:results.title.count",{count:f.length,defaultValue:f.length===1?"Found 1 item":`Found ${f.length} items`}),collapsible:!0,defaultOpen:!0,children:t})})()]})}export{ze as ProductCardListTemplate};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Legal Notice Template Component
|
|
3
|
+
* @description Reusable legal notice (Mentions Légales) template with configurable company details and i18n support
|
|
4
|
+
*
|
|
5
|
+
* @version 0.0.1
|
|
6
|
+
* @since 0.0.1
|
|
7
|
+
* @author AMBROISE PARK Consulting
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentType } from 'react';
|
|
1
10
|
/**
|
|
2
11
|
* Legal Notice Template Configuration
|
|
3
12
|
*/
|
|
@@ -55,5 +64,5 @@ export interface LegalNoticeConfig {
|
|
|
55
64
|
* @since 0.0.1
|
|
56
65
|
* @author AMBROISE PARK Consulting
|
|
57
66
|
*/
|
|
58
|
-
export declare const LegalNoticeTemplate:
|
|
67
|
+
export declare const LegalNoticeTemplate: ComponentType<LegalNoticeConfig>;
|
|
59
68
|
//# sourceMappingURL=LegalNoticeTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegalNoticeTemplate.d.ts","sourceRoot":"","sources":["../../src/legal/LegalNoticeTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LegalNoticeTemplate.d.ts","sourceRoot":"","sources":["../../src/legal/LegalNoticeTemplate.tsx"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,aAAa,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE;QACT,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,iBAAiB,CAiVhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
"use client";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{Text as x,Stack as r}from"@donotdev/components";import{useTranslation as S,formatDate as T}from"@donotdev/core";const D=({publisherName:c,publisherType:o,legalStatus:d,registrationNumber:n,vatNumber:l,shareCapital:h,registeredOffice:y,email:p,phone:a,directorName:v,directorRole:m="Publication Director",hostingProvider:b,hostingAddress:g,hostingContact:f,lastUpdated:z,sections:s={intellectualProperty:!0,personalData:!0,cookies:!0}})=>{const{t,i18n:P}=S("legalNotice"),u=T(z,P?.language||"en");return i("div",{children:e("div",{style:{maxWidth:"none"},children:[e("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[e("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u2696\uFE0F ",t("title","Legal Notice")]}),e("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[t("lastUpdated","Last updated"),": ",u]})]}),e(r,{gap:"large",children:[e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("publisher.title","1. Publisher Information")}),e(r,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("publisher.name","Publisher name"),":"]})," ",c]}),e("p",{children:[e("strong",{children:[t("publisher.type","Type"),":"]})," ",t(`publisher.types.${o}`,o==="company"?"Company":"Individual")]}),d&&e("p",{children:[e("strong",{children:[t("publisher.legalStatus","Legal status"),":"]})," ",d]}),h&&o==="company"&&e("p",{children:[e("strong",{children:[t("publisher.shareCapital","Share capital"),":"]})," ",h]})]})]}),(n||l)&&e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("registration.title","2. Registration Details")}),e(r,{gap:"tight",children:[n&&e("p",{children:[e("strong",{children:[t("registration.number","Registration number / SIRET"),":"]})," ",n]}),l&&e("p",{children:[e("strong",{children:[t("registration.vat","VAT number"),":"]})," ",l]})]})]}),e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("office.title","3. Registered Office")}),e("p",{children:[e("strong",{children:[t("office.address","Address"),":"]}),i("br",{}),y]})]}),e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("contact.title","4. Contact Information")}),e(r,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("contact.email","Email"),":"]})," ",e("a",{href:`mailto:${p}`,style:{color:"var(--primary)"},children:[" ",p]})]}),a&&e("p",{children:[e("strong",{children:[t("contact.phone","Phone"),":"]})," ",i("a",{href:`tel:${a}`,style:{color:"var(--primary)"},children:a})]})]})]}),e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("director.title","5. Publication Director")}),e(r,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("director.name","Name"),":"]})," ",v]}),m&&e("p",{children:[e("strong",{children:[t("director.role","Role"),":"]})," ",m]})]})]}),e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("hosting.title","6. Hosting Provider")}),e(r,{gap:"tight",children:[e("p",{children:[e("strong",{children:[t("hosting.provider","Provider"),":"]})," ",b]})," ",g&&e("p",{children:[e("strong",{children:[t("hosting.address","Address"),":"]}),i("br",{}),g]}),f&&e("p",{children:[e("strong",{children:[t("hosting.contact","Contact"),":"]})," ",f]})]})]}),s.intellectualProperty&&e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("intellectualProperty.title","7. Intellectual Property")}),i("p",{children:t("intellectualProperty.content","All content on this website, including but not limited to text, graphics, logos, images, audio clips, digital downloads, data compilations, and software, is the property of {publisherName} or its content suppliers and is protected by international copyright laws.",{publisherName:c})}),i("p",{style:{marginTop:"1rem"},children:t("intellectualProperty.unauthorized","The unauthorized use of any content from this website may violate copyright, trademark, and other laws.")})]}),s.personalData&&e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("personalData.title","8. Personal Data")}),e("p",{children:[t("personalData.content","For information about how we collect, use, and protect your personal data, please refer to our "),i("a",{href:"/privacy",style:{color:"var(--primary)",textDecoration:"underline"},children:t("personalData.privacyPolicy","Privacy Policy")}),"."]})]}),s.cookies&&e("section",{children:[i("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:t("cookies.title","9. Cookies")}),e("p",{children:[t("cookies.content","This website uses cookies. For detailed information about cookies and how we use them, please refer to our "),i("a",{href:"/privacy",style:{color:"var(--primary)",textDecoration:"underline"},children:t("cookies.privacyPolicy","Privacy Policy")}),"."]})]})]}),i("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)"},children:e(x,{variant:"muted",level:"small",children:[t("footer.accurate","The information in this Legal Notice is accurate as of")," ",u," ",t("footer.updated","and may be updated to reflect changes in our company information.")]})})]})})};export{D as LegalNoticeTemplate};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Privacy Policy Template Component
|
|
3
|
+
* @description Reusable privacy policy template with configurable company details and i18n support
|
|
4
|
+
*
|
|
5
|
+
* @version 0.0.1
|
|
6
|
+
* @since 0.0.1
|
|
7
|
+
* @author AMBROISE PARK Consulting
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentType } from 'react';
|
|
1
10
|
/**
|
|
2
11
|
* Privacy Policy Template Configuration
|
|
3
12
|
*/
|
|
@@ -43,6 +52,5 @@ export interface PrivacyPolicyConfig {
|
|
|
43
52
|
* @since 0.0.1
|
|
44
53
|
* @author AMBROISE PARK Consulting
|
|
45
54
|
*/
|
|
46
|
-
export declare const PrivacyPolicyTemplate:
|
|
47
|
-
export default PrivacyPolicyTemplate;
|
|
55
|
+
export declare const PrivacyPolicyTemplate: ComponentType<PrivacyPolicyConfig>;
|
|
48
56
|
//# sourceMappingURL=PrivacyPolicyTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacyPolicyTemplate.d.ts","sourceRoot":"","sources":["../../src/legal/PrivacyPolicyTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrivacyPolicyTemplate.d.ts","sourceRoot":"","sources":["../../src/legal/PrivacyPolicyTemplate.tsx"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,EAAE,CAAC,EAAE,OAAO,CAAC;KACd,CAAC;IACF,iCAAiC;IACjC,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,mBAAmB,CAy5BpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as o,Fragment as i}from"react/jsx-runtime";import{List as n,Stack as g}from"@donotdev/components";import{useTranslation as p,formatDate as f}from"@donotdev/core";const y=({companyName:a,websiteUrl:v,privacyEmail:d,companyAddress:m,dpoEmail:c,lastUpdated:h,sections:r={children:!0,international:!0,california:!0,eu:!0},contactInfo:s={}})=>{const{t:e,i18n:u}=p("privacy"),l=f(h,u?.language||"en");return o("div",{children:t("div",{style:{maxWidth:"none"},children:[t("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[t("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u{1F512} ",e("title","Privacy Policy")]}),t("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[e("lastUpdated","Last updated"),": ",l]})]}),t(g,{gap:"large",children:[t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.introduction.title","1. Introduction")}),t("p",{style:{marginBottom:"1rem"},children:[e("sections.introduction.welcome","Welcome to")," ",a," ",'("',e("common.we","we"),'," "',e("common.our","our"),',"'," ",e("common.or","or"),' "',e("common.us","us"),'").'," ",e("sections.introduction.commitment","We are committed to protecting your privacy and ensuring you have a positive experience on our platform. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our development framework, tools, and services.")]}),t("p",{children:[e("sections.introduction.agreement","By using")," ",a,","," ",e("sections.introduction.agree","you agree to the collection and use of information in accordance with this policy. If you do not agree with our policies and practices, please do not use our services.")]})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.collection.title","2. Information We Collect")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.provided.title","2.1 Information You Provide")}),o(n,{items:[o("strong",{children:e("sections.collection.provided.accountDesc","Name, email address, password, and profile information when you create an account")},"account"),t(i,{children:[t("strong",{children:[e("sections.collection.provided.usage","Usage Data"),":"]})," ",e("sections.collection.provided.usageDesc","Information about how you use our services, including features accessed and time spent")]}),t(i,{children:[t("strong",{children:[e("sections.collection.provided.communication","Communication"),":"]})," ",e("sections.collection.provided.communicationDesc","Messages, feedback, and support requests you send to us")]}),t(i,{children:[t("strong",{children:[e("sections.collection.provided.payment","Payment Information"),":"]})," ",e("sections.collection.provided.paymentDesc","Billing details and payment method information for premium features")]}),t(i,{children:[t("strong",{children:[e("sections.collection.provided.project","Project Data"),":"]})," ",e("sections.collection.provided.projectDesc","Code, configurations, and project files you create using our framework")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.automatic.title","2.2 Automatically Collected Information")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.collection.automatic.device","Device Information"),":"]})," ",e("sections.collection.automatic.deviceDesc","IP address, browser type, operating system, and device identifiers")]}),t(i,{children:[t("strong",{children:[e("sections.collection.automatic.analytics","Usage Analytics"),":"]})," ",e("sections.collection.automatic.analyticsDesc","Pages visited, features used, and interaction patterns")]}),t(i,{children:[t("strong",{children:[e("sections.collection.automatic.performance","Performance Data"),":"]})," ",e("sections.collection.automatic.performanceDesc","Error logs, performance metrics, and system diagnostics")]}),t(i,{children:[t("strong",{children:[e("sections.collection.automatic.cookies","Cookies and Tracking"),":"]})," ",e("sections.collection.automatic.cookiesDesc","Small data files stored on your device to improve your experience")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.usage.title","3. How We Use Your Information")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.usage.intro","We use the information we collect to:")}),o(n,{items:[e("sections.usage.provide","Provide, maintain, and improve our services"),e("sections.usage.process","Process transactions and manage your account"),e("sections.usage.send","Send you important updates, security alerts, and support messages"),e("sections.usage.respond","Respond to your comments, questions, and support requests"),e("sections.usage.analyze","Analyze usage patterns to enhance user experience"),e("sections.usage.detect","Detect and prevent fraud, abuse, and security threats"),e("sections.usage.comply","Comply with legal obligations and enforce our terms"),e("sections.usage.develop","Develop new features and services based on user feedback")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.sharing.title","4. Information Sharing and Disclosure")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.intro","We do not sell, trade, or rent your personal information to third parties. We may share your information in the following circumstances:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.providers.title","4.1 Service Providers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.providers.intro","We may share information with trusted third-party service providers who assist us in operating our platform, such as:")}),o(n,{items:[e("sections.sharing.providers.hosting","Cloud hosting and infrastructure providers"),e("sections.sharing.providers.payment","Payment processors for billing and transactions"),e("sections.sharing.providers.analytics","Analytics and monitoring services"),e("sections.sharing.providers.support","Customer support and communication tools")],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.legal.title","4.2 Legal Requirements")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.legal.desc","We may disclose your information if required by law, court order, or government request, or to protect our rights, property, or safety.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.business.title","4.3 Business Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.business.desc","In the event of a merger, acquisition, or sale of assets, your information may be transferred as part of the business transaction.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.security.title","5. Data Security")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.security.intro","We implement appropriate technical and organizational measures to protect your information against unauthorized access, alteration, disclosure, or destruction. These measures include:")}),o(n,{items:[e("sections.security.encryption","Encryption of data in transit and at rest"),e("sections.security.assessments","Regular security assessments and updates"),e("sections.security.access","Access controls and authentication mechanisms"),e("sections.security.training","Employee training on data protection practices"),e("sections.security.incident","Incident response and breach notification procedures")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.retention.title","6. Data Retention")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.retention.intro","We retain your information for as long as necessary to provide our services, comply with legal obligations, resolve disputes, and enforce our agreements. The retention period varies based on the type of information:")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.retention.account","Account Information"),":"]})," ",e("sections.retention.accountDesc","Retained while your account is active and for a reasonable period after deletion")]}),t(i,{children:[t("strong",{children:[e("sections.retention.usage","Usage Data"),":"]})," ",e("sections.retention.usageDesc","Retained for analytics and service improvement purposes")]}),t(i,{children:[t("strong",{children:[e("sections.retention.payment","Payment Information"),":"]})," ",e("sections.retention.paymentDesc","Retained as required by financial regulations")]}),t(i,{children:[t("strong",{children:[e("sections.retention.communication","Communication Records"),":"]})," ",e("sections.retention.communicationDesc","Retained for customer support and legal compliance")]})],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.rights.title","7. Your Rights and Choices")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.intro","Depending on your location, you may have the following rights regarding your personal information:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.access.title","7.1 Access and Portability")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.access.desc","You can request access to your personal information and receive a copy in a portable format.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.correction.title","7.2 Correction and Update")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.correction.desc","You can request correction of inaccurate or incomplete information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.deletion.title","7.3 Deletion")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.deletion.desc","You can request deletion of your personal information, subject to legal requirements.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.restriction.title","7.4 Restriction and Objection")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.restriction.desc","You can request restriction of processing or object to certain uses of your information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.marketing.title","7.5 Marketing Communications")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.marketing.desc","You can opt out of marketing communications at any time using the unsubscribe link or contacting us directly.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.cookies.title","8. Cookies and Tracking Technologies")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.cookies.intro","We use cookies and similar tracking technologies to enhance your experience, analyze usage, and provide personalized content. You can control cookie settings through your browser preferences.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.cookies.types.title","8.1 Types of Cookies We Use")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.cookies.types.essential","Essential Cookies"),":"]})," ",e("sections.cookies.types.essentialDesc","Required for basic functionality and security")]}),t(i,{children:[t("strong",{children:[e("sections.cookies.types.analytics","Analytics Cookies"),":"]})," ",e("sections.cookies.types.analyticsDesc","Help us understand how visitors use our platform")]}),t(i,{children:[t("strong",{children:[e("sections.cookies.types.functional","Functional Cookies"),":"]})," ",e("sections.cookies.types.functionalDesc","Remember your preferences and settings")]}),t(i,{children:[t("strong",{children:[e("sections.cookies.types.marketing","Marketing Cookies"),":"]})," ",e("sections.cookies.types.marketingDesc","Used for targeted advertising and content")]})],style:{paddingInlineStart:"1.5rem"}})]}),r.international&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.international.title","9. International Data Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.international.desc","Your information may be transferred to and processed in countries other than your own. We ensure appropriate safeguards are in place to protect your information in accordance with applicable data protection laws.")})]}),r.children&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.children.title","10. Children's Privacy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.children.desc","Our services are not intended for children under the age of 13. We do not knowingly collect personal information from children under 13. If you believe we have collected information from a child under 13, please contact us immediately.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.changes.title","11. Changes to This Privacy Policy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.changes.desc",'We may update this Privacy Policy from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by posting the updated policy on our website and updating the "Last updated" date.')})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.contact.title","12. Contact Us")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.contact.intro","If you have any questions about this Privacy Policy or our data practices, please contact us:")}),t("div",{className:"dndev-grid dndev-gap-sm",style:{backgroundColor:"color-mix(in oklab, var(--muted) 50%, transparent)",padding:"1rem",borderRadius:"var(--radius-lg)"},children:[t("p",{children:[t("strong",{children:[e("sections.contact.email","Email"),":"]})," ",d]}),t("p",{children:[t("strong",{children:[e("sections.contact.address","Address"),":"]})," ",m]}),c&&t("p",{children:[t("strong",{children:[e("sections.contact.dpo","Data Protection Officer"),":"]})," ",c]}),s.phone&&t("p",{children:[t("strong",{children:[e("sections.contact.phone","Phone"),":"]})," ",s.phone]}),s.supportEmail&&t("p",{children:[t("strong",{children:[e("sections.contact.support","Support Email"),":"]})," ",s.supportEmail]})]})]}),r.eu&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.eu.title","13. Legal Basis for Processing (EU Users)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.eu.intro","For users in the European Union, our legal basis for processing your personal information includes:")}),o(n,{items:[t(i,{children:[t("strong",{children:[e("sections.eu.consent","Consent"),":"]})," ",e("sections.eu.consentDesc","When you explicitly agree to our processing")]}),t(i,{children:[t("strong",{children:[e("sections.eu.contract","Contract Performance"),":"]})," ",e("sections.eu.contractDesc","To provide our services under our terms")]}),t(i,{children:[t("strong",{children:[e("sections.eu.legitimate","Legitimate Interest"),":"]})," ",e("sections.eu.legitimateDesc","To improve our services and prevent fraud")]}),t(i,{children:[t("strong",{children:[e("sections.eu.legal","Legal Obligation"),":"]})," ",e("sections.eu.legalDesc","To comply with applicable laws and regulations")]})],style:{paddingInlineStart:"1.5rem"}})]}),r.california&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.california.title","14. California Privacy Rights (CCPA)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.california.desc","California residents have additional rights under the California Consumer Privacy Act (CCPA), including the right to know what personal information we collect and how we use it, the right to delete personal information, and the right to opt out of the sale of personal information.")})]})]}),o("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:t("p",{children:[e("footer.effective","This Privacy Policy is effective as of")," ",l," ",e("footer.remain","and will remain in effect except with respect to any changes in its provisions in the future.")]})})]})})};var W=y;export{y as PrivacyPolicyTemplate,W as default};
|
|
1
|
+
"use client";import{jsxs as t,jsx as o,Fragment as n}from"react/jsx-runtime";import{List as i,Stack as u}from"@donotdev/components";import{useTranslation as p,formatDate as f}from"@donotdev/core";const y=({companyName:a,websiteUrl:v,privacyEmail:d,companyAddress:m,dpoEmail:c,lastUpdated:h,sections:s={children:!0,international:!0,california:!0,eu:!0},contactInfo:r={}})=>{const{t:e,i18n:g}=p("privacy"),l=f(h,g?.language||"en");return o("div",{children:t("div",{style:{maxWidth:"none"},children:[t("div",{className:"dndev-text-center",style:{marginBottom:"3rem"},children:[t("h1",{style:{fontSize:"var(--font-size-3xl)",fontWeight:700,marginBottom:"1rem"},children:["\u{1F512} ",e("title","Privacy Policy")]}),t("p",{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)"},children:[e("lastUpdated","Last updated"),": ",l]})]}),t(u,{gap:"large",children:[t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.introduction.title","1. Introduction")}),t("p",{style:{marginBottom:"1rem"},children:[e("sections.introduction.welcome","Welcome to")," ",a," ",'("',e("common.we","we"),'," "',e("common.our","our"),',"'," ",e("common.or","or"),' "',e("common.us","us"),'").'," ",e("sections.introduction.commitment","We are committed to protecting your privacy and ensuring you have a positive experience on our platform. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our development framework, tools, and services.")]}),t("p",{children:[e("sections.introduction.agreement","By using")," ",a,","," ",e("sections.introduction.agree","you agree to the collection and use of information in accordance with this policy. If you do not agree with our policies and practices, please do not use our services.")]})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.collection.title","2. Information We Collect")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.provided.title","2.1 Information You Provide")}),o(i,{items:[o("strong",{children:e("sections.collection.provided.accountDesc","Name, email address, password, and profile information when you create an account")},"account"),t(n,{children:[t("strong",{children:[e("sections.collection.provided.usage","Usage Data"),":"]})," ",e("sections.collection.provided.usageDesc","Information about how you use our services, including features accessed and time spent")]}),t(n,{children:[t("strong",{children:[e("sections.collection.provided.communication","Communication"),":"]})," ",e("sections.collection.provided.communicationDesc","Messages, feedback, and support requests you send to us")]}),t(n,{children:[t("strong",{children:[e("sections.collection.provided.payment","Payment Information"),":"]})," ",e("sections.collection.provided.paymentDesc","Billing details and payment method information for premium features")]}),t(n,{children:[t("strong",{children:[e("sections.collection.provided.project","Project Data"),":"]})," ",e("sections.collection.provided.projectDesc","Code, configurations, and project files you create using our framework")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.collection.automatic.title","2.2 Automatically Collected Information")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.collection.automatic.device","Device Information"),":"]})," ",e("sections.collection.automatic.deviceDesc","IP address, browser type, operating system, and device identifiers")]}),t(n,{children:[t("strong",{children:[e("sections.collection.automatic.analytics","Usage Analytics"),":"]})," ",e("sections.collection.automatic.analyticsDesc","Pages visited, features used, and interaction patterns")]}),t(n,{children:[t("strong",{children:[e("sections.collection.automatic.performance","Performance Data"),":"]})," ",e("sections.collection.automatic.performanceDesc","Error logs, performance metrics, and system diagnostics")]}),t(n,{children:[t("strong",{children:[e("sections.collection.automatic.cookies","Cookies and Tracking"),":"]})," ",e("sections.collection.automatic.cookiesDesc","Small data files stored on your device to improve your experience")]})],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.usage.title","3. How We Use Your Information")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.usage.intro","We use the information we collect to:")}),o(i,{items:[e("sections.usage.provide","Provide, maintain, and improve our services"),e("sections.usage.process","Process transactions and manage your account"),e("sections.usage.send","Send you important updates, security alerts, and support messages"),e("sections.usage.respond","Respond to your comments, questions, and support requests"),e("sections.usage.analyze","Analyze usage patterns to enhance user experience"),e("sections.usage.detect","Detect and prevent fraud, abuse, and security threats"),e("sections.usage.comply","Comply with legal obligations and enforce our terms"),e("sections.usage.develop","Develop new features and services based on user feedback")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.sharing.title","4. Information Sharing and Disclosure")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.intro","We do not sell, trade, or rent your personal information to third parties. We may share your information in the following circumstances:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.providers.title","4.1 Service Providers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.providers.intro","We may share information with trusted third-party service providers who assist us in operating our platform, such as:")}),o(i,{items:[e("sections.sharing.providers.hosting","Cloud hosting and infrastructure providers"),e("sections.sharing.providers.payment","Payment processors for billing and transactions"),e("sections.sharing.providers.analytics","Analytics and monitoring services"),e("sections.sharing.providers.support","Customer support and communication tools")],style:{paddingInlineStart:"1.5rem",marginBottom:"1rem"}}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.legal.title","4.2 Legal Requirements")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.legal.desc","We may disclose your information if required by law, court order, or government request, or to protect our rights, property, or safety.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.sharing.business.title","4.3 Business Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.sharing.business.desc","In the event of a merger, acquisition, or sale of assets, your information may be transferred as part of the business transaction.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.security.title","5. Data Security")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.security.intro","We implement appropriate technical and organizational measures to protect your information against unauthorized access, alteration, disclosure, or destruction. These measures include:")}),o(i,{items:[e("sections.security.encryption","Encryption of data in transit and at rest"),e("sections.security.assessments","Regular security assessments and updates"),e("sections.security.access","Access controls and authentication mechanisms"),e("sections.security.training","Employee training on data protection practices"),e("sections.security.incident","Incident response and breach notification procedures")],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.retention.title","6. Data Retention")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.retention.intro","We retain your information for as long as necessary to provide our services, comply with legal obligations, resolve disputes, and enforce our agreements. The retention period varies based on the type of information:")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.retention.account","Account Information"),":"]})," ",e("sections.retention.accountDesc","Retained while your account is active and for a reasonable period after deletion")]}),t(n,{children:[t("strong",{children:[e("sections.retention.usage","Usage Data"),":"]})," ",e("sections.retention.usageDesc","Retained for analytics and service improvement purposes")]}),t(n,{children:[t("strong",{children:[e("sections.retention.payment","Payment Information"),":"]})," ",e("sections.retention.paymentDesc","Retained as required by financial regulations")]}),t(n,{children:[t("strong",{children:[e("sections.retention.communication","Communication Records"),":"]})," ",e("sections.retention.communicationDesc","Retained for customer support and legal compliance")]})],style:{paddingInlineStart:"1.5rem"}})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.rights.title","7. Your Rights and Choices")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.intro","Depending on your location, you may have the following rights regarding your personal information:")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.access.title","7.1 Access and Portability")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.access.desc","You can request access to your personal information and receive a copy in a portable format.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.correction.title","7.2 Correction and Update")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.correction.desc","You can request correction of inaccurate or incomplete information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.deletion.title","7.3 Deletion")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.deletion.desc","You can request deletion of your personal information, subject to legal requirements.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.restriction.title","7.4 Restriction and Objection")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.restriction.desc","You can request restriction of processing or object to certain uses of your information.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.rights.marketing.title","7.5 Marketing Communications")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.rights.marketing.desc","You can opt out of marketing communications at any time using the unsubscribe link or contacting us directly.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.cookies.title","8. Cookies and Tracking Technologies")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.cookies.intro","We use cookies and similar tracking technologies to enhance your experience, analyze usage, and provide personalized content. You can control cookie settings through your browser preferences.")}),o("h3",{style:{fontSize:"var(--font-size-lg)",fontWeight:500,marginBottom:"0.75rem"},children:e("sections.cookies.types.title","8.1 Types of Cookies We Use")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.cookies.types.essential","Essential Cookies"),":"]})," ",e("sections.cookies.types.essentialDesc","Required for basic functionality and security")]}),t(n,{children:[t("strong",{children:[e("sections.cookies.types.analytics","Analytics Cookies"),":"]})," ",e("sections.cookies.types.analyticsDesc","Help us understand how visitors use our platform")]}),t(n,{children:[t("strong",{children:[e("sections.cookies.types.functional","Functional Cookies"),":"]})," ",e("sections.cookies.types.functionalDesc","Remember your preferences and settings")]}),t(n,{children:[t("strong",{children:[e("sections.cookies.types.marketing","Marketing Cookies"),":"]})," ",e("sections.cookies.types.marketingDesc","Used for targeted advertising and content")]})],style:{paddingInlineStart:"1.5rem"}})]}),s.international&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.international.title","9. International Data Transfers")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.international.desc","Your information may be transferred to and processed in countries other than your own. We ensure appropriate safeguards are in place to protect your information in accordance with applicable data protection laws.")})]}),s.children&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.children.title","10. Children's Privacy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.children.desc","Our services are not intended for children under the age of 13. We do not knowingly collect personal information from children under 13. If you believe we have collected information from a child under 13, please contact us immediately.")})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.changes.title","11. Changes to This Privacy Policy")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.changes.desc",'We may update this Privacy Policy from time to time to reflect changes in our practices or applicable laws. We will notify you of any material changes by posting the updated policy on our website and updating the "Last updated" date.')})]}),t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.contact.title","12. Contact Us")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.contact.intro","If you have any questions about this Privacy Policy or our data practices, please contact us:")}),t("div",{className:"dndev-grid dndev-gap-sm",style:{backgroundColor:"color-mix(in oklab, var(--muted) 50%, transparent)",padding:"1rem",borderRadius:"var(--radius-lg)"},children:[t("p",{children:[t("strong",{children:[e("sections.contact.email","Email"),":"]})," ",d]}),t("p",{children:[t("strong",{children:[e("sections.contact.address","Address"),":"]})," ",m]}),c&&t("p",{children:[t("strong",{children:[e("sections.contact.dpo","Data Protection Officer"),":"]})," ",c]}),r.phone&&t("p",{children:[t("strong",{children:[e("sections.contact.phone","Phone"),":"]})," ",r.phone]}),r.supportEmail&&t("p",{children:[t("strong",{children:[e("sections.contact.support","Support Email"),":"]})," ",r.supportEmail]})]})]}),s.eu&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.eu.title","13. Legal Basis for Processing (EU Users)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.eu.intro","For users in the European Union, our legal basis for processing your personal information includes:")}),o(i,{items:[t(n,{children:[t("strong",{children:[e("sections.eu.consent","Consent"),":"]})," ",e("sections.eu.consentDesc","When you explicitly agree to our processing")]}),t(n,{children:[t("strong",{children:[e("sections.eu.contract","Contract Performance"),":"]})," ",e("sections.eu.contractDesc","To provide our services under our terms")]}),t(n,{children:[t("strong",{children:[e("sections.eu.legitimate","Legitimate Interest"),":"]})," ",e("sections.eu.legitimateDesc","To improve our services and prevent fraud")]}),t(n,{children:[t("strong",{children:[e("sections.eu.legal","Legal Obligation"),":"]})," ",e("sections.eu.legalDesc","To comply with applicable laws and regulations")]})],style:{paddingInlineStart:"1.5rem"}})]}),s.california&&t("section",{children:[o("h2",{style:{fontSize:"var(--font-size-xl)",fontWeight:600,marginBottom:"1rem"},children:e("sections.california.title","14. California Privacy Rights (CCPA)")}),o("p",{style:{marginBottom:"1rem"},children:e("sections.california.desc","California residents have additional rights under the California Consumer Privacy Act (CCPA), including the right to know what personal information we collect and how we use it, the right to delete personal information, and the right to opt out of the sale of personal information.")})]})]}),o("div",{className:"dndev-text-center",style:{marginTop:"3rem",paddingTop:"2rem",borderTop:"1px solid var(--border)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:t("p",{children:[e("footer.effective","This Privacy Policy is effective as of")," ",l," ",e("footer.remain","and will remain in effect except with respect to any changes in its provisions in the future.")]})})]})})};export{y as PrivacyPolicyTemplate};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Terms of Service Template Component
|
|
3
|
+
* @description Reusable terms of service template with configurable company details and i18n support
|
|
4
|
+
*
|
|
5
|
+
* @version 0.0.1
|
|
6
|
+
* @since 0.0.1
|
|
7
|
+
* @author AMBROISE PARK Consulting
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentType } from 'react';
|
|
1
10
|
/**
|
|
2
11
|
* Terms of Service Template Configuration
|
|
3
12
|
*/
|
|
@@ -47,6 +56,5 @@ export interface TermsOfServiceConfig {
|
|
|
47
56
|
* @since 0.0.1
|
|
48
57
|
* @author AMBROISE PARK Consulting
|
|
49
58
|
*/
|
|
50
|
-
export declare const TermsOfServiceTemplate:
|
|
51
|
-
export default TermsOfServiceTemplate;
|
|
59
|
+
export declare const TermsOfServiceTemplate: ComponentType<TermsOfServiceConfig>;
|
|
52
60
|
//# sourceMappingURL=TermsOfServiceTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsOfServiceTemplate.d.ts","sourceRoot":"","sources":["../../src/legal/TermsOfServiceTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TermsOfServiceTemplate.d.ts","sourceRoot":"","sources":["../../src/legal/TermsOfServiceTemplate.tsx"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,EAAE,CAAC,EAAE,OAAO,CAAC;KACd,CAAC;IACF,iCAAiC;IACjC,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAChD,oBAAoB,CAi7BrB,CAAC"}
|