ptechcore_ui 1.0.30 → 1.0.32

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 (3) hide show
  1. package/dist/index.cjs +126 -97
  2. package/dist/index.js +127 -98
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -804,10 +804,11 @@ var FetchApi = class {
804
804
  if (local_token) {
805
805
  headers["Authorization"] = `Token ${local_token}`;
806
806
  }
807
+ const business_entity_id = localStorage.getItem("active_center_id");
807
808
  const res = await fetch(url, {
808
809
  method: "POST",
809
810
  headers,
810
- body: payload ? JSON.stringify({ ...payload, business_entity: localStorage.getItem("active_center_id") }) : void 0
811
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
811
812
  });
812
813
  if (!res.ok) throw new Error(await res.text());
813
814
  return res.json();
@@ -818,7 +819,10 @@ var FetchApi = class {
818
819
  if (local_token) {
819
820
  headers["Authorization"] = `Token ${local_token}`;
820
821
  }
821
- const res = await fetch(url, {
822
+ const business_entity_id = localStorage.getItem("active_center_id");
823
+ const separator = url.includes("?") ? "&" : "?";
824
+ const urlWithEntity = business_entity_id ? `${url}${separator}business_entity_id=${business_entity_id}&business_entity=${business_entity_id}` : url;
825
+ const res = await fetch(urlWithEntity, {
822
826
  method: "GET",
823
827
  headers
824
828
  });
@@ -833,10 +837,11 @@ var FetchApi = class {
833
837
  if (local_token) {
834
838
  headers["Authorization"] = `Token ${local_token}`;
835
839
  }
840
+ const business_entity_id = localStorage.getItem("active_center_id");
836
841
  const res = await fetch(url, {
837
842
  method: "PUT",
838
843
  headers,
839
- body: payload ? JSON.stringify(payload) : void 0
844
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
840
845
  });
841
846
  if (!res.ok) throw new Error(await res.text());
842
847
  return res.json();
@@ -876,10 +881,11 @@ var FetchApi = class {
876
881
  if (local_token) {
877
882
  headers["Authorization"] = `Token ${local_token}`;
878
883
  }
884
+ const business_entity_id = localStorage.getItem("active_center_id");
879
885
  const res = await fetch(url, {
880
886
  method: "PATCH",
881
887
  headers,
882
- body: payload ? JSON.stringify(payload) : void 0
888
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
883
889
  });
884
890
  if (!res.ok) throw new Error(await res.text());
885
891
  return res.json();
@@ -5424,7 +5430,7 @@ var ApprovalWorkflow = ({
5424
5430
  if (CustomBtn) {
5425
5431
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
5426
5432
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CustomBtn, { onClick: open_modal }),
5427
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Modals_default, { open: isOpen, onClose: close_modal, title, width: "max-w-lg", children: formulaire() })
5433
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Modals_default, { open: isOpen, onClose: close_modal, title, width: "w-[60%]", children: formulaire() })
5428
5434
  ] });
5429
5435
  }
5430
5436
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
@@ -5946,30 +5952,57 @@ var MinimalVendorForm = ({
5946
5952
  open: isOpen,
5947
5953
  onClose,
5948
5954
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("form", { onSubmit: handleSubmit, className: "p-", children: [
5949
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5950
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5951
- TextInput,
5952
- {
5953
- label: "Raison sociale",
5954
- name: "legal_name",
5955
- value: formData.legal_name || "",
5956
- placeholder: "Nom l\xE9gal de l'entit\xE9",
5957
- required: true,
5958
- error: errors.legal_name,
5959
- onChange: handleInputChange
5960
- }
5961
- ),
5962
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5963
- TextInput,
5964
- {
5965
- label: "Nom commercial",
5966
- name: "trading_name",
5967
- value: formData.trading_name || "",
5968
- placeholder: "Nom commercial (optionnel)",
5969
- onChange: handleInputChange
5970
- }
5971
- )
5972
- ] }) }),
5955
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-4", children: [
5956
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5957
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5958
+ TextInput,
5959
+ {
5960
+ label: "Raison sociale",
5961
+ name: "legal_name",
5962
+ value: formData.legal_name || "",
5963
+ placeholder: "Nom l\xE9gal de l'entit\xE9",
5964
+ required: true,
5965
+ error: errors.legal_name,
5966
+ onChange: handleInputChange
5967
+ }
5968
+ ),
5969
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5970
+ TextInput,
5971
+ {
5972
+ label: "Nom commercial",
5973
+ name: "trading_name",
5974
+ value: formData.trading_name || "",
5975
+ placeholder: "Nom commercial (optionnel)",
5976
+ onChange: handleInputChange
5977
+ }
5978
+ )
5979
+ ] }),
5980
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5981
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5982
+ InputField,
5983
+ {
5984
+ label: "T\xE9l\xE9phone",
5985
+ name: "phone",
5986
+ type: "tel",
5987
+ value: formData.phone || "",
5988
+ placeholder: "+33 1 23 45 67 89",
5989
+ onChange: handleInputChange
5990
+ }
5991
+ ),
5992
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5993
+ InputField,
5994
+ {
5995
+ label: "Email",
5996
+ name: "email",
5997
+ type: "email",
5998
+ value: formData.email || "",
5999
+ placeholder: "contact@entite.com",
6000
+ error: errors.email,
6001
+ onChange: handleInputChange
6002
+ }
6003
+ )
6004
+ ] })
6005
+ ] }),
5973
6006
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
5974
6007
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5975
6008
  "button",
@@ -5986,7 +6019,7 @@ var MinimalVendorForm = ({
5986
6019
  type: "button",
5987
6020
  onClick: handleSubmit,
5988
6021
  disabled: loading,
5989
- children: loading ? "chargement..." : "Enregistrer l'entit\xE9"
6022
+ children: loading ? "chargement..." : "Enregistrer le fournisseur"
5990
6023
  }
5991
6024
  )
5992
6025
  ] })
@@ -8458,85 +8491,81 @@ var PrintPreview = ({
8458
8491
  transformOrigin: "top center",
8459
8492
  transition: "transform 0.2s ease"
8460
8493
  };
8461
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "fixed inset-0 z-50 overflow-hidden print:hidden", children: [
8494
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "fixed top-0 inset-0 z-50 overflow-hidden print:hidden", children: [
8462
8495
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8463
8496
  "div",
8464
8497
  {
8465
- className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
8498
+ className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
8466
8499
  onClick: onClose
8467
8500
  }
8468
8501
  ),
8469
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative h-full flex flex-col", children: [
8470
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "bg-white border-b shadow-sm px-6 py-3 flex items-center justify-between z-10", children: [
8471
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-lg font-semibold text-gray-900", children: title }),
8472
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-3", children: [
8473
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-1 bg-gray-100 rounded-lg px-2 py-1", children: [
8474
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8475
- "button",
8476
- {
8477
- onClick: handleZoomOut,
8478
- className: "p-1 hover:bg-gray-200 rounded transition-colors",
8479
- title: "Zoom arri\xE8re",
8480
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.ZoomOut, { className: "w-4 h-4 text-gray-600" })
8481
- }
8482
- ),
8483
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-sm text-gray-600 min-w-[3rem] text-center", children: [
8484
- zoom,
8485
- "%"
8486
- ] }),
8487
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8488
- "button",
8489
- {
8490
- onClick: handleZoomIn,
8491
- className: "p-1 hover:bg-gray-200 rounded transition-colors",
8492
- title: "Zoom avant",
8493
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.ZoomIn, { className: "w-4 h-4 text-gray-600" })
8494
- }
8495
- )
8496
- ] }),
8497
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8498
- "button",
8499
- {
8500
- onClick: () => handlePrint(),
8501
- className: "px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 transition-colors flex items-center gap-2",
8502
- children: [
8503
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.Printer, { className: "w-4 h-4" }),
8504
- "Imprimer"
8505
- ]
8506
- }
8507
- ),
8508
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8509
- "button",
8510
- {
8511
- onClick: () => handlePrint(),
8512
- className: "px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors flex items-center gap-2",
8513
- children: [
8514
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.Download, { className: "w-4 h-4" }),
8515
- "PDF"
8516
- ]
8517
- }
8518
- ),
8519
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8520
- "button",
8521
- {
8522
- onClick: onClose,
8523
- className: "p-2 hover:bg-gray-100 rounded-full transition-colors",
8524
- title: "Fermer",
8525
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.X, { className: "w-5 h-5 text-gray-500" })
8526
- }
8527
- )
8528
- ] })
8529
- ] }),
8530
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-1 overflow-auto bg-gray-200 p-6", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8502
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8503
+ "button",
8504
+ {
8505
+ onClick: onClose,
8506
+ className: "absolute top-4 right-4 z-20 p-2 bg-white/90 hover:bg-white rounded-full shadow-lg transition-colors",
8507
+ title: "Fermer",
8508
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.X, { className: "w-5 h-5 text-gray-600" })
8509
+ }
8510
+ ),
8511
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative h-full flex items-center justify-center p-8", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start gap-4 max-h-full", children: [
8512
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "overflow-auto max-h-[90vh] bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8531
8513
  "div",
8532
8514
  {
8533
8515
  ref: printRef,
8534
- className: "bg-white shadow-xl",
8516
+ className: "bg-white",
8535
8517
  style: pageStyles,
8536
8518
  children
8537
8519
  }
8538
- ) }) })
8539
- ] })
8520
+ ) }),
8521
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-2 bg-white rounded-lg shadow-lg p-2", children: [
8522
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8523
+ "button",
8524
+ {
8525
+ onClick: () => handlePrint(),
8526
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors flex flex-col items-center gap-1 group",
8527
+ title: "Imprimer / PDF",
8528
+ children: [
8529
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.FileText, { className: "w-6 h-6 text-gray-600 group-hover:text-blue-600" }),
8530
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-[10px] text-gray-500 group-hover:text-blue-600", children: "PDF" })
8531
+ ]
8532
+ }
8533
+ ),
8534
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-t border-gray-200 my-1" }),
8535
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8536
+ "button",
8537
+ {
8538
+ onClick: () => handlePrint(),
8539
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors flex flex-col items-center gap-1 group",
8540
+ title: "T\xE9l\xE9charger",
8541
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.Download, { className: "w-6 h-6 text-gray-600 group-hover:text-blue-600" })
8542
+ }
8543
+ ),
8544
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "border-t border-gray-200 my-1" }),
8545
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8546
+ "button",
8547
+ {
8548
+ onClick: handleZoomIn,
8549
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors",
8550
+ title: "Zoom avant",
8551
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.ZoomIn, { className: "w-5 h-5 text-gray-600" })
8552
+ }
8553
+ ),
8554
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-xs text-gray-500 text-center py-1", children: [
8555
+ zoom,
8556
+ "%"
8557
+ ] }),
8558
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
8559
+ "button",
8560
+ {
8561
+ onClick: handleZoomOut,
8562
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors",
8563
+ title: "Zoom arri\xE8re",
8564
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react18.ZoomOut, { className: "w-5 h-5 text-gray-600" })
8565
+ }
8566
+ )
8567
+ ] })
8568
+ ] }) })
8540
8569
  ] });
8541
8570
  };
8542
8571
  var PRINT_GREEN = "#2d7d46";
package/dist/index.js CHANGED
@@ -734,10 +734,11 @@ var FetchApi = class {
734
734
  if (local_token) {
735
735
  headers["Authorization"] = `Token ${local_token}`;
736
736
  }
737
+ const business_entity_id = localStorage.getItem("active_center_id");
737
738
  const res = await fetch(url, {
738
739
  method: "POST",
739
740
  headers,
740
- body: payload ? JSON.stringify({ ...payload, business_entity: localStorage.getItem("active_center_id") }) : void 0
741
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
741
742
  });
742
743
  if (!res.ok) throw new Error(await res.text());
743
744
  return res.json();
@@ -748,7 +749,10 @@ var FetchApi = class {
748
749
  if (local_token) {
749
750
  headers["Authorization"] = `Token ${local_token}`;
750
751
  }
751
- const res = await fetch(url, {
752
+ const business_entity_id = localStorage.getItem("active_center_id");
753
+ const separator = url.includes("?") ? "&" : "?";
754
+ const urlWithEntity = business_entity_id ? `${url}${separator}business_entity_id=${business_entity_id}&business_entity=${business_entity_id}` : url;
755
+ const res = await fetch(urlWithEntity, {
752
756
  method: "GET",
753
757
  headers
754
758
  });
@@ -763,10 +767,11 @@ var FetchApi = class {
763
767
  if (local_token) {
764
768
  headers["Authorization"] = `Token ${local_token}`;
765
769
  }
770
+ const business_entity_id = localStorage.getItem("active_center_id");
766
771
  const res = await fetch(url, {
767
772
  method: "PUT",
768
773
  headers,
769
- body: payload ? JSON.stringify(payload) : void 0
774
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
770
775
  });
771
776
  if (!res.ok) throw new Error(await res.text());
772
777
  return res.json();
@@ -806,10 +811,11 @@ var FetchApi = class {
806
811
  if (local_token) {
807
812
  headers["Authorization"] = `Token ${local_token}`;
808
813
  }
814
+ const business_entity_id = localStorage.getItem("active_center_id");
809
815
  const res = await fetch(url, {
810
816
  method: "PATCH",
811
817
  headers,
812
- body: payload ? JSON.stringify(payload) : void 0
818
+ body: payload ? JSON.stringify({ ...payload, business_entity_id, business_entity: business_entity_id }) : JSON.stringify({ business_entity_id, business_entity: business_entity_id })
813
819
  });
814
820
  if (!res.ok) throw new Error(await res.text());
815
821
  return res.json();
@@ -5354,7 +5360,7 @@ var ApprovalWorkflow = ({
5354
5360
  if (CustomBtn) {
5355
5361
  return /* @__PURE__ */ jsxs11(Fragment6, { children: [
5356
5362
  /* @__PURE__ */ jsx14(CustomBtn, { onClick: open_modal }),
5357
- /* @__PURE__ */ jsx14(Modals_default, { open: isOpen, onClose: close_modal, title, width: "max-w-lg", children: formulaire() })
5363
+ /* @__PURE__ */ jsx14(Modals_default, { open: isOpen, onClose: close_modal, title, width: "w-[60%]", children: formulaire() })
5358
5364
  ] });
5359
5365
  }
5360
5366
  return /* @__PURE__ */ jsx14(Fragment6, { children: /* @__PURE__ */ jsx14(
@@ -5876,30 +5882,57 @@ var MinimalVendorForm = ({
5876
5882
  open: isOpen,
5877
5883
  onClose,
5878
5884
  children: /* @__PURE__ */ jsxs14("form", { onSubmit: handleSubmit, className: "p-", children: [
5879
- /* @__PURE__ */ jsx17("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5880
- /* @__PURE__ */ jsx17(
5881
- TextInput,
5882
- {
5883
- label: "Raison sociale",
5884
- name: "legal_name",
5885
- value: formData.legal_name || "",
5886
- placeholder: "Nom l\xE9gal de l'entit\xE9",
5887
- required: true,
5888
- error: errors.legal_name,
5889
- onChange: handleInputChange
5890
- }
5891
- ),
5892
- /* @__PURE__ */ jsx17(
5893
- TextInput,
5894
- {
5895
- label: "Nom commercial",
5896
- name: "trading_name",
5897
- value: formData.trading_name || "",
5898
- placeholder: "Nom commercial (optionnel)",
5899
- onChange: handleInputChange
5900
- }
5901
- )
5902
- ] }) }),
5885
+ /* @__PURE__ */ jsxs14("div", { className: "space-y-4", children: [
5886
+ /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5887
+ /* @__PURE__ */ jsx17(
5888
+ TextInput,
5889
+ {
5890
+ label: "Raison sociale",
5891
+ name: "legal_name",
5892
+ value: formData.legal_name || "",
5893
+ placeholder: "Nom l\xE9gal de l'entit\xE9",
5894
+ required: true,
5895
+ error: errors.legal_name,
5896
+ onChange: handleInputChange
5897
+ }
5898
+ ),
5899
+ /* @__PURE__ */ jsx17(
5900
+ TextInput,
5901
+ {
5902
+ label: "Nom commercial",
5903
+ name: "trading_name",
5904
+ value: formData.trading_name || "",
5905
+ placeholder: "Nom commercial (optionnel)",
5906
+ onChange: handleInputChange
5907
+ }
5908
+ )
5909
+ ] }),
5910
+ /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
5911
+ /* @__PURE__ */ jsx17(
5912
+ InputField,
5913
+ {
5914
+ label: "T\xE9l\xE9phone",
5915
+ name: "phone",
5916
+ type: "tel",
5917
+ value: formData.phone || "",
5918
+ placeholder: "+33 1 23 45 67 89",
5919
+ onChange: handleInputChange
5920
+ }
5921
+ ),
5922
+ /* @__PURE__ */ jsx17(
5923
+ InputField,
5924
+ {
5925
+ label: "Email",
5926
+ name: "email",
5927
+ type: "email",
5928
+ value: formData.email || "",
5929
+ placeholder: "contact@entite.com",
5930
+ error: errors.email,
5931
+ onChange: handleInputChange
5932
+ }
5933
+ )
5934
+ ] })
5935
+ ] }),
5903
5936
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between pt-6 mt-8", children: [
5904
5937
  /* @__PURE__ */ jsx17(
5905
5938
  "button",
@@ -5916,7 +5949,7 @@ var MinimalVendorForm = ({
5916
5949
  type: "button",
5917
5950
  onClick: handleSubmit,
5918
5951
  disabled: loading,
5919
- children: loading ? "chargement..." : "Enregistrer l'entit\xE9"
5952
+ children: loading ? "chargement..." : "Enregistrer le fournisseur"
5920
5953
  }
5921
5954
  )
5922
5955
  ] })
@@ -8344,7 +8377,7 @@ var EntityFileManager = ({
8344
8377
  // src/components/common/PrintPreview.tsx
8345
8378
  import React20, { useRef as useRef6 } from "react";
8346
8379
  import { useReactToPrint } from "react-to-print";
8347
- import { X as X10, Printer as Printer2, Download as Download4, ZoomIn, ZoomOut } from "lucide-react";
8380
+ import { X as X10, Download as Download4, ZoomIn, ZoomOut, FileText as FileText4 } from "lucide-react";
8348
8381
  import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
8349
8382
  var PrintableDocument = ({
8350
8383
  children,
@@ -8400,85 +8433,81 @@ var PrintPreview = ({
8400
8433
  transformOrigin: "top center",
8401
8434
  transition: "transform 0.2s ease"
8402
8435
  };
8403
- return /* @__PURE__ */ jsxs25("div", { className: "fixed inset-0 z-50 overflow-hidden print:hidden", children: [
8436
+ return /* @__PURE__ */ jsxs25("div", { className: "fixed top-0 inset-0 z-50 overflow-hidden print:hidden", children: [
8404
8437
  /* @__PURE__ */ jsx30(
8405
8438
  "div",
8406
8439
  {
8407
- className: "absolute inset-0 bg-black/50 backdrop-blur-sm",
8440
+ className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
8408
8441
  onClick: onClose
8409
8442
  }
8410
8443
  ),
8411
- /* @__PURE__ */ jsxs25("div", { className: "relative h-full flex flex-col", children: [
8412
- /* @__PURE__ */ jsxs25("div", { className: "bg-white border-b shadow-sm px-6 py-3 flex items-center justify-between z-10", children: [
8413
- /* @__PURE__ */ jsx30("h3", { className: "text-lg font-semibold text-gray-900", children: title }),
8414
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
8415
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1 bg-gray-100 rounded-lg px-2 py-1", children: [
8416
- /* @__PURE__ */ jsx30(
8417
- "button",
8418
- {
8419
- onClick: handleZoomOut,
8420
- className: "p-1 hover:bg-gray-200 rounded transition-colors",
8421
- title: "Zoom arri\xE8re",
8422
- children: /* @__PURE__ */ jsx30(ZoomOut, { className: "w-4 h-4 text-gray-600" })
8423
- }
8424
- ),
8425
- /* @__PURE__ */ jsxs25("span", { className: "text-sm text-gray-600 min-w-[3rem] text-center", children: [
8426
- zoom,
8427
- "%"
8428
- ] }),
8429
- /* @__PURE__ */ jsx30(
8430
- "button",
8431
- {
8432
- onClick: handleZoomIn,
8433
- className: "p-1 hover:bg-gray-200 rounded transition-colors",
8434
- title: "Zoom avant",
8435
- children: /* @__PURE__ */ jsx30(ZoomIn, { className: "w-4 h-4 text-gray-600" })
8436
- }
8437
- )
8438
- ] }),
8439
- /* @__PURE__ */ jsxs25(
8440
- "button",
8441
- {
8442
- onClick: () => handlePrint(),
8443
- className: "px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 transition-colors flex items-center gap-2",
8444
- children: [
8445
- /* @__PURE__ */ jsx30(Printer2, { className: "w-4 h-4" }),
8446
- "Imprimer"
8447
- ]
8448
- }
8449
- ),
8450
- /* @__PURE__ */ jsxs25(
8451
- "button",
8452
- {
8453
- onClick: () => handlePrint(),
8454
- className: "px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors flex items-center gap-2",
8455
- children: [
8456
- /* @__PURE__ */ jsx30(Download4, { className: "w-4 h-4" }),
8457
- "PDF"
8458
- ]
8459
- }
8460
- ),
8461
- /* @__PURE__ */ jsx30(
8462
- "button",
8463
- {
8464
- onClick: onClose,
8465
- className: "p-2 hover:bg-gray-100 rounded-full transition-colors",
8466
- title: "Fermer",
8467
- children: /* @__PURE__ */ jsx30(X10, { className: "w-5 h-5 text-gray-500" })
8468
- }
8469
- )
8470
- ] })
8471
- ] }),
8472
- /* @__PURE__ */ jsx30("div", { className: "flex-1 overflow-auto bg-gray-200 p-6", children: /* @__PURE__ */ jsx30("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx30(
8444
+ /* @__PURE__ */ jsx30(
8445
+ "button",
8446
+ {
8447
+ onClick: onClose,
8448
+ className: "absolute top-4 right-4 z-20 p-2 bg-white/90 hover:bg-white rounded-full shadow-lg transition-colors",
8449
+ title: "Fermer",
8450
+ children: /* @__PURE__ */ jsx30(X10, { className: "w-5 h-5 text-gray-600" })
8451
+ }
8452
+ ),
8453
+ /* @__PURE__ */ jsx30("div", { className: "relative h-full flex items-center justify-center p-8", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-4 max-h-full", children: [
8454
+ /* @__PURE__ */ jsx30("div", { className: "overflow-auto max-h-[90vh] bg-transparent", children: /* @__PURE__ */ jsx30(
8473
8455
  "div",
8474
8456
  {
8475
8457
  ref: printRef,
8476
- className: "bg-white shadow-xl",
8458
+ className: "bg-white",
8477
8459
  style: pageStyles,
8478
8460
  children
8479
8461
  }
8480
- ) }) })
8481
- ] })
8462
+ ) }),
8463
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-2 bg-white rounded-lg shadow-lg p-2", children: [
8464
+ /* @__PURE__ */ jsxs25(
8465
+ "button",
8466
+ {
8467
+ onClick: () => handlePrint(),
8468
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors flex flex-col items-center gap-1 group",
8469
+ title: "Imprimer / PDF",
8470
+ children: [
8471
+ /* @__PURE__ */ jsx30(FileText4, { className: "w-6 h-6 text-gray-600 group-hover:text-blue-600" }),
8472
+ /* @__PURE__ */ jsx30("span", { className: "text-[10px] text-gray-500 group-hover:text-blue-600", children: "PDF" })
8473
+ ]
8474
+ }
8475
+ ),
8476
+ /* @__PURE__ */ jsx30("div", { className: "border-t border-gray-200 my-1" }),
8477
+ /* @__PURE__ */ jsx30(
8478
+ "button",
8479
+ {
8480
+ onClick: () => handlePrint(),
8481
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors flex flex-col items-center gap-1 group",
8482
+ title: "T\xE9l\xE9charger",
8483
+ children: /* @__PURE__ */ jsx30(Download4, { className: "w-6 h-6 text-gray-600 group-hover:text-blue-600" })
8484
+ }
8485
+ ),
8486
+ /* @__PURE__ */ jsx30("div", { className: "border-t border-gray-200 my-1" }),
8487
+ /* @__PURE__ */ jsx30(
8488
+ "button",
8489
+ {
8490
+ onClick: handleZoomIn,
8491
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors",
8492
+ title: "Zoom avant",
8493
+ children: /* @__PURE__ */ jsx30(ZoomIn, { className: "w-5 h-5 text-gray-600" })
8494
+ }
8495
+ ),
8496
+ /* @__PURE__ */ jsxs25("span", { className: "text-xs text-gray-500 text-center py-1", children: [
8497
+ zoom,
8498
+ "%"
8499
+ ] }),
8500
+ /* @__PURE__ */ jsx30(
8501
+ "button",
8502
+ {
8503
+ onClick: handleZoomOut,
8504
+ className: "p-3 hover:bg-gray-100 rounded-lg transition-colors",
8505
+ title: "Zoom arri\xE8re",
8506
+ children: /* @__PURE__ */ jsx30(ZoomOut, { className: "w-5 h-5 text-gray-600" })
8507
+ }
8508
+ )
8509
+ ] })
8510
+ ] }) })
8482
8511
  ] });
8483
8512
  };
8484
8513
  var PRINT_GREEN = "#2d7d46";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptechcore_ui",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",