ptechcore_ui 1.0.14 → 1.0.16

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/index.cjs CHANGED
@@ -35,19 +35,31 @@ __export(index_exports, {
35
35
  ApprovalAnswerPage: () => ApprovalAnswerPage,
36
36
  ApprovalPreviewAnswer: () => ApprovalPreviewAnswer_default,
37
37
  ApprovalWorkflow: () => ApprovalWorkflow_default,
38
+ CHOICES: () => Choices_default,
39
+ CountrySelector: () => CountrySelector,
38
40
  DateInput: () => DateInput,
39
41
  FDrawer: () => FDrawer,
40
42
  FetchApi: () => FetchApi,
41
43
  FileInput: () => FileInput,
44
+ ForeignCurrencySelector: () => ForeignCurrencySelector,
42
45
  InputField: () => InputField,
46
+ InvoiceTypeSelector: () => InvoiceTypeSelector,
47
+ LegalFormSelector: () => LegalFormSelector,
43
48
  Modal: () => Modals_default,
44
49
  NumberInput: () => NumberInput,
45
50
  Pages: () => Pages_default,
51
+ PaymentMethodSelector: () => PaymentMethodSelector,
46
52
  PrimaryButton: () => Buttons_default,
47
53
  RewiseLayout: () => ModernDoubleSidebarLayout_default,
48
54
  SecondaryButton: () => SecondaryButton,
55
+ SelectCostCenter: () => SelectCostCenter,
56
+ SelectDepartment: () => SelectDepartment,
49
57
  SelectInput: () => SelectInput,
58
+ SelectUser: () => SelectUser,
59
+ SelectVendor: () => SelectVendor,
50
60
  SessionProvider: () => SessionProvider,
61
+ TaxSelector: () => TaxSelector,
62
+ TemplateFNESelector: () => TemplateFNESelector,
51
63
  TextInput: () => TextInput,
52
64
  ThemeProvider: () => ThemeContext_default,
53
65
  ToastContainer: () => Toast_default,
@@ -65,13 +77,14 @@ var PrimaryButton = ({
65
77
  loading = false,
66
78
  children,
67
79
  classname = "",
80
+ variant = "full",
68
81
  ...props
69
82
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
83
  "button",
71
84
  {
72
85
  type: "submit",
73
86
  disabled: loading || props.disabled,
74
- className: `px-4 py-2 text-sm bg-[#6A8A82] text-white rounded-lg hover:bg-[#5A7A72] transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname}`,
87
+ className: `px-4 py-2 text-sm rounded-lg hover:bg-opacity-80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname} ${variant === "full" ? "bg-[#6A8A82] text-white" : variant === "outline" ? "border border-[#6A8A82] text-[#6A8A82] bg-transparent" : "bg-transparent text-[#6A8A82]"}`,
75
88
  ...props,
76
89
  children: loading ? "Connexion en cours..." : children
77
90
  }
@@ -79,13 +92,14 @@ var PrimaryButton = ({
79
92
  var SecondaryButton = ({
80
93
  loading = false,
81
94
  children,
95
+ variant = "full",
82
96
  ...props
83
97
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
84
98
  "button",
85
99
  {
86
100
  type: "button",
87
101
  disabled: loading || props.disabled,
88
- className: "px-4 py-2 bg-[#B87333] text-white rounded-lg hover:bg-[#A66B2A] transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center",
102
+ className: `px-4 py-2 rounded-lg hover:bg-opacity-80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center ${variant === "full" ? "bg-[#B87333] text-white" : variant === "outline" ? "border border-[#B87333] text-[#B87333] bg-transparent" : "bg-transparent text-[#B87333]"}`,
89
103
  ...props,
90
104
  children: loading ? "Connexion en cours..." : children
91
105
  }
@@ -96,7 +110,7 @@ var Buttons_default = PrimaryButton;
96
110
  var import_jsx_runtime2 = require("react/jsx-runtime");
97
111
  var Modal = ({ title, description, width, open, onClose, children }) => {
98
112
  if (!open) return null;
99
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: `bg-white rounded-lg py-4 px-6 mx-4 w-[${width ? width : "60%"}]`, children: [
113
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: `bg-white rounded-lg pt-4 px-6 mx-4 `, children: [
100
114
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [
101
115
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
102
116
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "text-xl font-semibold text-tuatara flex items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: title }) }),
@@ -112,7 +126,7 @@ var Modal = ({ title, description, width, open, onClose, children }) => {
112
126
  }
113
127
  )
114
128
  ] }),
115
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-4", children })
129
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-1", children })
116
130
  ] }) });
117
131
  };
118
132
  var Modals_default = Modal;
@@ -2603,7 +2617,9 @@ var SearchableSelect = ({
2603
2617
  onRemove,
2604
2618
  disabled = false,
2605
2619
  allowClear = false,
2606
- filterFunction
2620
+ filterFunction,
2621
+ addElement,
2622
+ refresh
2607
2623
  }) => {
2608
2624
  const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
2609
2625
  const [searchTerm, setSearchTerm] = (0, import_react9.useState)("");
@@ -2690,20 +2706,43 @@ var SearchableSelect = ({
2690
2706
  }
2691
2707
  ),
2692
2708
  isOpen && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-lg", children: [
2693
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "p-3 border-b border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative", children: [
2694
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" }),
2709
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "p-3 border-b border-gray-200 flex", children: [
2710
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative w-full", children: [
2711
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" }),
2712
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2713
+ "input",
2714
+ {
2715
+ ref: inputRef,
2716
+ type: "text",
2717
+ placeholder: searchPlaceholder,
2718
+ value: searchTerm,
2719
+ onChange: (e) => setSearchTerm(e.target.value),
2720
+ className: "w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg focus:ring-2 focus:ring-[#6B7C92] focus:border-transparent"
2721
+ }
2722
+ )
2723
+ ] }),
2695
2724
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2696
- "input",
2725
+ "button",
2697
2726
  {
2698
- ref: inputRef,
2699
- type: "text",
2700
- placeholder: searchPlaceholder,
2701
- value: searchTerm,
2702
- onChange: (e) => setSearchTerm(e.target.value),
2703
- className: "w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg focus:ring-2 focus:ring-[#6B7C92] focus:border-transparent"
2727
+ type: "button",
2728
+ onClick: refresh,
2729
+ disabled,
2730
+ className: "px-3 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
2731
+ title: "Rafra\xEEchir la liste",
2732
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.RefreshCw, { className: `w-4 h-4 ${disabled ? "animate-spin" : ""}` })
2733
+ }
2734
+ ),
2735
+ addElement && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2736
+ "button",
2737
+ {
2738
+ type: "button",
2739
+ onClick: addElement,
2740
+ className: "px-3 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
2741
+ title: "Rafra\xEEchir la liste",
2742
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Plus, { className: "w-4 h-4" })
2704
2743
  }
2705
2744
  )
2706
- ] }) }),
2745
+ ] }),
2707
2746
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2708
2747
  "div",
2709
2748
  {
@@ -2799,7 +2838,7 @@ var ApprovalWorkflow = ({
2799
2838
  const caseInfo = response.data;
2800
2839
  setCaseData(caseInfo);
2801
2840
  setFormData({
2802
- title: caseInfo.title || "",
2841
+ title: caseInfo.title || title,
2803
2842
  file: null,
2804
2843
  description: caseInfo.description || "",
2805
2844
  status: caseInfo.status
@@ -3707,6 +3746,1095 @@ var useAlert = () => {
3707
3746
  }
3708
3747
  return context;
3709
3748
  };
3749
+
3750
+ // src/components/common/CommonSelect.tsx
3751
+ var import_react37 = require("react");
3752
+
3753
+ // src/services/VendorServices.ts
3754
+ var VENDORS_API_URL = `${API_URL}/accounting/vendors/`;
3755
+ var VendorServices = {
3756
+ createVendor: (data, token) => {
3757
+ const payload = { ...data };
3758
+ if (!payload.logo) {
3759
+ delete payload.logo;
3760
+ }
3761
+ return FetchApi.post(`${VENDORS_API_URL}`, payload, token);
3762
+ },
3763
+ getVendor: (id, token) => FetchApi.get(`${VENDORS_API_URL}${id}/`, token),
3764
+ getVendors: (token, params) => FetchApi.get(`${VENDORS_API_URL}?${new URLSearchParams(params).toString()}`, token),
3765
+ updateVendor: (id, data, token) => {
3766
+ const payload = { ...data };
3767
+ if (!payload.logo) {
3768
+ delete payload.logo;
3769
+ }
3770
+ return FetchApi.put(`${VENDORS_API_URL}${id}/`, payload, token);
3771
+ },
3772
+ deleteVendor: (id, token) => FetchApi.delete(`${VENDORS_API_URL}${id}/`, token)
3773
+ };
3774
+
3775
+ // dist/index.js
3776
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3777
+ var import_jsx_runtime18 = require("react/jsx-runtime");
3778
+ var import_react_router_dom5 = require("react-router-dom");
3779
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3780
+ var import_react12 = __toESM(require("react"), 1);
3781
+ var import_react_router_dom6 = require("react-router-dom");
3782
+ var import_lucide_react8 = require("lucide-react");
3783
+ var import_clsx2 = require("clsx");
3784
+ var import_tailwind_merge2 = require("tailwind-merge");
3785
+ var import_react13 = require("react");
3786
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3787
+ var import_react14 = require("react");
3788
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3789
+ var import_react15 = require("react");
3790
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3791
+ var import_react16 = require("react");
3792
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3793
+ var import_lucide_react9 = require("lucide-react");
3794
+ var import_react_router_dom7 = require("react-router-dom");
3795
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3796
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3797
+ var import_react17 = require("react");
3798
+ var import_lucide_react10 = require("lucide-react");
3799
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3800
+ var import_lucide_react11 = require("lucide-react");
3801
+ var import_react18 = require("react");
3802
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3803
+ var import_react19 = require("react");
3804
+ var import_react_router_dom8 = require("react-router-dom");
3805
+ var import_lucide_react12 = require("lucide-react");
3806
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3807
+ var import_react20 = require("react");
3808
+ var import_react21 = require("react");
3809
+ var import_lucide_react13 = require("lucide-react");
3810
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3811
+ var import_lucide_react14 = require("lucide-react");
3812
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3813
+ var import_react22 = require("react");
3814
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3815
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3816
+ var import_react23 = require("react");
3817
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3818
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3819
+ var import_react_router_dom9 = require("react-router-dom");
3820
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3821
+ var import_react24 = __toESM(require("react"), 1);
3822
+ var import_react_router_dom10 = require("react-router-dom");
3823
+ var import_lucide_react15 = require("lucide-react");
3824
+ var import_clsx3 = require("clsx");
3825
+ var import_tailwind_merge3 = require("tailwind-merge");
3826
+ var import_react25 = require("react");
3827
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3828
+ var import_react26 = require("react");
3829
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3830
+ var import_react27 = require("react");
3831
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3832
+ var import_react28 = require("react");
3833
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3834
+ var import_lucide_react16 = require("lucide-react");
3835
+ var import_react_router_dom11 = require("react-router-dom");
3836
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3837
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3838
+ var import_react29 = require("react");
3839
+ var import_lucide_react17 = require("lucide-react");
3840
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3841
+ var import_lucide_react18 = require("lucide-react");
3842
+ var import_react30 = require("react");
3843
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3844
+ var import_react31 = require("react");
3845
+ var import_react_router_dom12 = require("react-router-dom");
3846
+ var import_lucide_react19 = require("lucide-react");
3847
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3848
+ var import_react32 = require("react");
3849
+ var import_react33 = require("react");
3850
+ var import_lucide_react20 = require("lucide-react");
3851
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3852
+ var import_lucide_react21 = require("lucide-react");
3853
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3854
+ var import_react34 = require("react");
3855
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3856
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3857
+ var import_react35 = require("react");
3858
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3859
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3860
+ var PrimaryButton2 = ({
3861
+ loading = false,
3862
+ children,
3863
+ classname = "",
3864
+ variant = "full",
3865
+ ...props
3866
+ }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3867
+ "button",
3868
+ {
3869
+ type: "submit",
3870
+ disabled: loading || props.disabled,
3871
+ className: `px-4 py-2 text-sm rounded-lg hover:bg-opacity-80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex justify-center items-center ${classname} ${variant === "full" ? "bg-[#6A8A82] text-white" : variant === "outline" ? "border border-[#6A8A82] text-[#6A8A82] bg-transparent" : "bg-transparent text-[#6A8A82]"}`,
3872
+ ...props,
3873
+ children: loading ? "Connexion en cours..." : children
3874
+ }
3875
+ );
3876
+ var Buttons_default2 = PrimaryButton2;
3877
+ var Modal2 = ({ title, description, width, open, onClose, children }) => {
3878
+ if (!open) return null;
3879
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `bg-white rounded-lg pt-4 px-6 mx-4 `, children: [
3880
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [
3881
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
3882
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-xl font-semibold text-tuatara flex items-center space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: title }) }),
3883
+ description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-sm text-gray-600 mt-1", children: description })
3884
+ ] }),
3885
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3886
+ "button",
3887
+ {
3888
+ onClick: onClose,
3889
+ className: "text-gray-400 hover:text-gray-600 text-xl",
3890
+ "aria-label": "Close modal",
3891
+ children: "\u2715"
3892
+ }
3893
+ )
3894
+ ] }),
3895
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-1", children })
3896
+ ] }) });
3897
+ };
3898
+ var Modals_default2 = Modal2;
3899
+ var InputField2 = ({
3900
+ label,
3901
+ name,
3902
+ type = "text",
3903
+ value,
3904
+ placeholder,
3905
+ required = false,
3906
+ disabled = false,
3907
+ error,
3908
+ onChange,
3909
+ onBlur
3910
+ }) => {
3911
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-1 w-full", children: [
3912
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { htmlFor: name, className: "block text-gray-700 text-sm font-medium mb-2", children: [
3913
+ label,
3914
+ " ",
3915
+ required && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-red-500", children: "*" })
3916
+ ] }),
3917
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3918
+ "input",
3919
+ {
3920
+ id: name,
3921
+ name,
3922
+ type,
3923
+ value,
3924
+ placeholder,
3925
+ required,
3926
+ disabled,
3927
+ onChange,
3928
+ onBlur,
3929
+ className: `w-full px-3 py-2 border border-[#D9D9D9] focus:ring-2 focus:ring-[#6A8A82]/20
3930
+ ${error ? "border-red-500" : "border-gray-300"}
3931
+ ${disabled ? "bg-gray-100 cursor-not-allowed" : ""}
3932
+ `
3933
+ }
3934
+ ),
3935
+ error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-red-500", children: error })
3936
+ ] });
3937
+ };
3938
+ var TextInput2 = (props) => {
3939
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InputField2, { ...props, type: "text" });
3940
+ };
3941
+ var ThemeContext2 = (0, import_react13.createContext)(void 0);
3942
+ var ADDRESS_IP2 = "localhost:8000";
3943
+ var ADDRESS_IP_URL2 = `http://${ADDRESS_IP2}/`;
3944
+ var API_URL2 = `${ADDRESS_IP_URL2}api`;
3945
+ var API_BASE_URL3 = `${API_URL2}/core/auth/`;
3946
+ var SessionContext2 = (0, import_react14.createContext)(void 0);
3947
+ var API_BASE_URL22 = `${API_URL2}/core/auth/`;
3948
+ var USERS_API_URL2 = `${API_URL2}/core/users/`;
3949
+ var ToastContext2 = (0, import_react15.createContext)(void 0);
3950
+ var APPROVAL_API_URL2 = `${API_URL2}/approvals/cases/`;
3951
+ var AlertContext2 = (0, import_react22.createContext)(void 0);
3952
+ var VENDORS_API_URL2 = `${API_URL2}/accounting/vendors/`;
3953
+ var ThemeContext22 = (0, import_react25.createContext)(void 0);
3954
+ var ADDRESS_IP22 = "localhost:8000";
3955
+ var ADDRESS_IP_URL22 = `http://${ADDRESS_IP22}/`;
3956
+ var API_URL22 = `${ADDRESS_IP_URL22}api`;
3957
+ var API_BASE_URL32 = `${API_URL22}/core/auth/`;
3958
+ var SessionContext22 = (0, import_react26.createContext)(void 0);
3959
+ var API_BASE_URL222 = `${API_URL22}/core/auth/`;
3960
+ var USERS_API_URL22 = `${API_URL22}/core/users/`;
3961
+ var ToastContext22 = (0, import_react27.createContext)(void 0);
3962
+ var APPROVAL_API_URL22 = `${API_URL22}/approvals/cases/`;
3963
+ var AlertContext22 = (0, import_react34.createContext)(void 0);
3964
+ var URI = `${API_URL2}/core/departments/`;
3965
+ var URI2 = `${API_URL2}/accounting/profit-or-cost-center/`;
3966
+ var COST_URI = `${API_URL2}/accounting/cost-center/`;
3967
+ var PROFIT_URI = `${API_URL2}/accounting/profit-center/`;
3968
+
3969
+ // src/components/common/FormVendor.tsx
3970
+ var import_react36 = require("react");
3971
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3972
+ var MinimalVendorForm = ({
3973
+ isOpen,
3974
+ onClose,
3975
+ object,
3976
+ from = "procurement",
3977
+ refresh = () => {
3978
+ }
3979
+ }) => {
3980
+ const [formData, setFormData] = (0, import_react36.useState)(object || {
3981
+ from_module: from ?? null,
3982
+ legal_name: "",
3983
+ trading_name: ""
3984
+ });
3985
+ const [errors, setErrors] = (0, import_react36.useState)({});
3986
+ const [loading, setLoading] = (0, import_react36.useState)(false);
3987
+ const { token } = useSession();
3988
+ const { success, error: showError } = useToast();
3989
+ const handleInputChange = (e) => {
3990
+ const { name, value } = e.target;
3991
+ setFormData((prev) => ({ ...prev, [name]: value }));
3992
+ if (errors[name]) {
3993
+ setErrors((prev) => ({ ...prev, [name]: void 0 }));
3994
+ }
3995
+ };
3996
+ const handleSelectChange = (e) => {
3997
+ const { name, value } = e.target;
3998
+ setFormData((prev) => ({ ...prev, [name]: value }));
3999
+ };
4000
+ const handleTextareaChange = (e) => {
4001
+ const { name, value } = e.target;
4002
+ setFormData((prev) => ({ ...prev, [name]: value }));
4003
+ };
4004
+ const validateForm = () => {
4005
+ const newErrors = {};
4006
+ if (!formData.legal_name?.trim()) {
4007
+ newErrors.legal_name = "La raison sociale est obligatoire";
4008
+ }
4009
+ if (formData.email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) {
4010
+ newErrors.email = "Format d'email invalide";
4011
+ }
4012
+ if (formData.iban && formData.iban.length > 0 && formData.iban.length < 15) {
4013
+ newErrors.iban = "Format IBAN invalide";
4014
+ }
4015
+ setErrors(newErrors);
4016
+ return Object.keys(newErrors).length === 0;
4017
+ };
4018
+ const handleSaveVendor = async (entityData) => {
4019
+ try {
4020
+ if (object && object.id) {
4021
+ await VendorServices.updateVendor(object.id, entityData, token);
4022
+ success("Entit\xE9 modifi\xE9e avec succ\xE8s !");
4023
+ } else {
4024
+ await VendorServices.createVendor(entityData, token);
4025
+ success("Entit\xE9 cr\xE9\xE9e avec succ\xE8s !");
4026
+ }
4027
+ refresh();
4028
+ onClose();
4029
+ } catch (error) {
4030
+ console.error(error);
4031
+ showError("Erreur lors de l'enregistrement de l'entit\xE9");
4032
+ }
4033
+ };
4034
+ const handleSubmit = async (e) => {
4035
+ e.preventDefault();
4036
+ if (!validateForm()) return;
4037
+ setLoading(true);
4038
+ try {
4039
+ await handleSaveVendor(formData);
4040
+ } finally {
4041
+ setLoading(false);
4042
+ }
4043
+ };
4044
+ if (!isOpen) return null;
4045
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4046
+ Modals_default2,
4047
+ {
4048
+ title: "Ajouter un fournisseur",
4049
+ width: "w-[100%]",
4050
+ description: ``,
4051
+ open: isOpen,
4052
+ onClose,
4053
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("form", { onSubmit: handleSubmit, className: "p-", children: [
4054
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4055
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4056
+ TextInput2,
4057
+ {
4058
+ label: "Raison sociale",
4059
+ name: "legal_name",
4060
+ value: formData.legal_name || "",
4061
+ placeholder: "Nom l\xE9gal de l'entit\xE9",
4062
+ required: true,
4063
+ error: errors.legal_name,
4064
+ onChange: handleInputChange
4065
+ }
4066
+ ),
4067
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4068
+ TextInput2,
4069
+ {
4070
+ label: "Nom commercial",
4071
+ name: "trading_name",
4072
+ value: formData.trading_name || "",
4073
+ placeholder: "Nom commercial (optionnel)",
4074
+ onChange: handleInputChange
4075
+ }
4076
+ )
4077
+ ] }) }),
4078
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
4079
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4080
+ "button",
4081
+ {
4082
+ type: "button",
4083
+ onClick: onClose,
4084
+ className: "px-6 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors",
4085
+ children: "Annuler"
4086
+ }
4087
+ ),
4088
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4089
+ Buttons_default2,
4090
+ {
4091
+ type: "button",
4092
+ onClick: handleSubmit,
4093
+ disabled: loading,
4094
+ children: loading ? "chargement..." : "Enregistrer l'entit\xE9"
4095
+ }
4096
+ )
4097
+ ] })
4098
+ ] })
4099
+ }
4100
+ );
4101
+ };
4102
+
4103
+ // src/services/DepartmentServices.ts
4104
+ var URI3 = `${API_URL}/core/departments/`;
4105
+ var DepartmentServices = {
4106
+ create: (data) => FetchApi.post(`${URI3}`, data),
4107
+ get: (id) => FetchApi.get(`${URI3}${id}/`),
4108
+ list: (params) => FetchApi.get(`${URI3}?${new URLSearchParams(params).toString()}`),
4109
+ update: (id, data) => FetchApi.put(`${URI3}${id}/`, data),
4110
+ delete: (id) => FetchApi.delete(`${URI3}${id}/`)
4111
+ };
4112
+
4113
+ // src/services/ProfitCostsServices.ts
4114
+ var URI4 = `${API_URL}/accounting/profit-or-cost-center/`;
4115
+ var COST_URI2 = `${API_URL}/accounting/cost-center/`;
4116
+ var CostServices = {
4117
+ create: (data) => FetchApi.post(`${COST_URI2}`, data),
4118
+ get: (id) => FetchApi.get(`${COST_URI2}${id}/`),
4119
+ list: (params) => FetchApi.get(`${COST_URI2}?${new URLSearchParams(params).toString()}`),
4120
+ update: (id, data) => FetchApi.put(`${COST_URI2}${id}/`, data),
4121
+ delete: (id) => FetchApi.delete(`${COST_URI2}${id}/`)
4122
+ };
4123
+ var PROFIT_URI2 = `${API_URL}/accounting/profit-center/`;
4124
+
4125
+ // src/components/common/CommonSelect.tsx
4126
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4127
+ var SelectVendor = ({
4128
+ value,
4129
+ onSelect
4130
+ }) => {
4131
+ const [showModal, setShowModal] = (0, import_react37.useState)(false);
4132
+ const [selectedVendor, setSelectedVendor] = (0, import_react37.useState)(null);
4133
+ const { token, activeBusinessEntity } = useSession();
4134
+ const [vendors, setVendors] = (0, import_react37.useState)(() => {
4135
+ const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4136
+ const cached = sessionStorage.getItem(cacheKey);
4137
+ return cached ? JSON.parse(cached) : [];
4138
+ });
4139
+ const [loadingVendors, setLoadingVendors] = (0, import_react37.useState)(false);
4140
+ (0, import_react37.useEffect)(() => {
4141
+ const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4142
+ const cached = sessionStorage.getItem(cacheKey);
4143
+ if (!cached) {
4144
+ loadVendors();
4145
+ } else {
4146
+ setVendors(JSON.parse(cached));
4147
+ }
4148
+ }, [activeBusinessEntity?.id]);
4149
+ const getVendorOptions = () => {
4150
+ return vendors.filter((vendor) => vendor.id !== void 0).map((vendor) => ({
4151
+ value: vendor.id,
4152
+ label: `${vendor.legal_name} [${vendor.trading_name}]`,
4153
+ object: vendor
4154
+ }));
4155
+ };
4156
+ const loadVendors = async () => {
4157
+ if (!token) {
4158
+ console.error("Vous devez etre connect\xE9 pour voir les organisations");
4159
+ return;
4160
+ }
4161
+ try {
4162
+ setLoadingVendors(true);
4163
+ const result = await VendorServices.getVendors(token, { business_entity_id: activeBusinessEntity?.id });
4164
+ setVendors(result.data);
4165
+ const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4166
+ sessionStorage.setItem(cacheKey, JSON.stringify(result.data));
4167
+ } catch (error) {
4168
+ console.error(error);
4169
+ } finally {
4170
+ setLoadingVendors(false);
4171
+ }
4172
+ };
4173
+ const handleRefresh = () => {
4174
+ const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4175
+ sessionStorage.removeItem(cacheKey);
4176
+ loadVendors();
4177
+ };
4178
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
4179
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
4180
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4181
+ SearchableSelect,
4182
+ {
4183
+ value,
4184
+ options: getVendorOptions(),
4185
+ placeholder: "S\xE9lectionner un fournisseur...",
4186
+ searchPlaceholder: "Rechercher...",
4187
+ onSelect,
4188
+ disabled: loadingVendors,
4189
+ refresh: handleRefresh,
4190
+ addElement: () => {
4191
+ setShowModal(true);
4192
+ }
4193
+ },
4194
+ "fourni" + value
4195
+ ),
4196
+ loadingVendors && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
4197
+ showModal && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4198
+ MinimalVendorForm,
4199
+ {
4200
+ object: selectedVendor,
4201
+ isOpen: showModal,
4202
+ onClose: () => setShowModal(false),
4203
+ refresh: handleRefresh
4204
+ },
4205
+ `entity-modal-${selectedVendor?.id}`
4206
+ )
4207
+ ] });
4208
+ };
4209
+ var SelectUser = ({
4210
+ value,
4211
+ onSelect
4212
+ }) => {
4213
+ const { token, activeBusinessEntity } = useSession();
4214
+ const [users, setUsers] = (0, import_react37.useState)(() => {
4215
+ const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4216
+ const cached = sessionStorage.getItem(cacheKey);
4217
+ return cached ? JSON.parse(cached) : [];
4218
+ });
4219
+ const [loading, setLoading] = (0, import_react37.useState)(false);
4220
+ (0, import_react37.useEffect)(() => {
4221
+ const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4222
+ const cached = sessionStorage.getItem(cacheKey);
4223
+ if (!cached) {
4224
+ loadUsers();
4225
+ } else {
4226
+ setUsers(JSON.parse(cached));
4227
+ }
4228
+ }, [activeBusinessEntity?.id]);
4229
+ const loadUsers = async () => {
4230
+ if (!token) return;
4231
+ try {
4232
+ setLoading(true);
4233
+ const result = await UserServices.getUsers(token);
4234
+ setUsers(result.data);
4235
+ } catch (error) {
4236
+ console.error(error);
4237
+ } finally {
4238
+ setLoading(false);
4239
+ }
4240
+ };
4241
+ const handleRefresh = () => {
4242
+ const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4243
+ sessionStorage.removeItem(cacheKey);
4244
+ loadUsers();
4245
+ };
4246
+ const userFilterFunction = (option, searchTerm) => {
4247
+ const user = users.find((u) => u.id === option.value);
4248
+ if (!user) return false;
4249
+ const searchLower = searchTerm.toLowerCase();
4250
+ return user.first_name?.toLowerCase().includes(searchLower) || user.last_name?.toLowerCase().includes(searchLower) || user.email?.toLowerCase().includes(searchLower);
4251
+ };
4252
+ const getUserOptions = () => {
4253
+ return users.map((user) => ({
4254
+ value: user.id,
4255
+ label: `${user.first_name} ${user.last_name}`,
4256
+ content: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1", children: [
4257
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "font-medium text-gray-900", children: [
4258
+ user.first_name,
4259
+ " ",
4260
+ user.last_name
4261
+ ] }),
4262
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
4263
+ ] }) })
4264
+ }));
4265
+ };
4266
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
4267
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
4268
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4269
+ SearchableSelect,
4270
+ {
4271
+ value,
4272
+ options: getUserOptions(),
4273
+ placeholder: "S\xE9lectionner un utilisateur ...",
4274
+ searchPlaceholder: "Rechercher...",
4275
+ onSelect,
4276
+ disabled: loading,
4277
+ refresh: handleRefresh
4278
+ },
4279
+ "user" + value
4280
+ ),
4281
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4282
+ ] });
4283
+ };
4284
+ var SelectDepartment = ({
4285
+ value,
4286
+ onSelect
4287
+ }) => {
4288
+ const { token, activeBusinessEntity } = useSession();
4289
+ const [departments, setDepartments] = (0, import_react37.useState)(() => {
4290
+ const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4291
+ const cached = sessionStorage.getItem(cacheKey);
4292
+ return cached ? JSON.parse(cached) : [];
4293
+ });
4294
+ const [loading, setLoading] = (0, import_react37.useState)(false);
4295
+ (0, import_react37.useEffect)(() => {
4296
+ const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4297
+ const cached = sessionStorage.getItem(cacheKey);
4298
+ if (!cached) {
4299
+ loadDepartments();
4300
+ } else {
4301
+ setDepartments(JSON.parse(cached));
4302
+ }
4303
+ }, [activeBusinessEntity?.id]);
4304
+ const loadDepartments = async () => {
4305
+ if (!token) return;
4306
+ try {
4307
+ setLoading(true);
4308
+ const result = await DepartmentServices.list({ business_entity_id: activeBusinessEntity?.id });
4309
+ if (result.success) {
4310
+ setDepartments(result.data);
4311
+ const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4312
+ sessionStorage.setItem(cacheKey, JSON.stringify(result.data));
4313
+ }
4314
+ } catch (error) {
4315
+ console.error(error);
4316
+ } finally {
4317
+ setLoading(false);
4318
+ }
4319
+ };
4320
+ const handleRefresh = () => {
4321
+ const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4322
+ sessionStorage.removeItem(cacheKey);
4323
+ loadDepartments();
4324
+ };
4325
+ const getDepartmentOptions = () => {
4326
+ return departments.map((dept) => ({
4327
+ value: dept.id,
4328
+ label: dept.name
4329
+ }));
4330
+ };
4331
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
4332
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
4333
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4334
+ SearchableSelect,
4335
+ {
4336
+ value,
4337
+ options: getDepartmentOptions(),
4338
+ placeholder: "S\xE9lectionner un d\xE9partement ...",
4339
+ searchPlaceholder: "Rechercher...",
4340
+ onSelect,
4341
+ disabled: loading,
4342
+ refresh: handleRefresh
4343
+ },
4344
+ "dept" + value
4345
+ ),
4346
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4347
+ ] });
4348
+ };
4349
+ var SelectCostCenter = ({
4350
+ value,
4351
+ onSelect
4352
+ }) => {
4353
+ const { token, activeBusinessEntity } = useSession();
4354
+ const [costCenters, setCostCenters] = (0, import_react37.useState)(() => {
4355
+ const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4356
+ const cached = sessionStorage.getItem(cacheKey);
4357
+ return cached ? JSON.parse(cached) : [];
4358
+ });
4359
+ const [loading, setLoading] = (0, import_react37.useState)(false);
4360
+ (0, import_react37.useEffect)(() => {
4361
+ const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4362
+ const cached = sessionStorage.getItem(cacheKey);
4363
+ if (!cached) {
4364
+ loadCostCenters();
4365
+ } else {
4366
+ setCostCenters(JSON.parse(cached));
4367
+ }
4368
+ }, [activeBusinessEntity?.id]);
4369
+ const loadCostCenters = async () => {
4370
+ if (!token) return;
4371
+ try {
4372
+ setLoading(true);
4373
+ const result = await CostServices.list({ business_entity_id: activeBusinessEntity?.id });
4374
+ if (result.success) {
4375
+ setCostCenters(result.data);
4376
+ const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4377
+ sessionStorage.setItem(cacheKey, JSON.stringify(result.data));
4378
+ }
4379
+ } catch (error) {
4380
+ console.error(error);
4381
+ } finally {
4382
+ setLoading(false);
4383
+ }
4384
+ };
4385
+ const handleRefresh = () => {
4386
+ const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4387
+ sessionStorage.removeItem(cacheKey);
4388
+ loadCostCenters();
4389
+ };
4390
+ const getCostCenterOptions = () => {
4391
+ return costCenters.map((center) => ({
4392
+ value: center.id,
4393
+ label: `${center.code ? `[${center.code}] ` : ""}${center.name}`,
4394
+ content: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1", children: [
4395
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "font-medium text-gray-900", children: center.name }),
4396
+ center.code && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-sm text-gray-500", children: [
4397
+ "Code: ",
4398
+ center.code
4399
+ ] })
4400
+ ] }) })
4401
+ }));
4402
+ };
4403
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
4404
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
4405
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4406
+ SearchableSelect,
4407
+ {
4408
+ value,
4409
+ options: getCostCenterOptions(),
4410
+ placeholder: "S\xE9lectionner un centre de co\xFBt ...",
4411
+ searchPlaceholder: "Rechercher...",
4412
+ onSelect,
4413
+ disabled: loading,
4414
+ refresh: handleRefresh
4415
+ },
4416
+ "cost" + value
4417
+ ),
4418
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4419
+ ] });
4420
+ };
4421
+
4422
+ // src/components/common/Choices.tsx
4423
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4424
+ var CHOICES = {
4425
+ INVOICE_TYPES: [
4426
+ { value: "sale", label: { fr: "Vente", en: "Sale", default: "Sale" } },
4427
+ { value: "purchase", label: { fr: "Bordereau d'achat", en: "Purchase slip", default: "Purchase" } }
4428
+ ],
4429
+ PAYMENT_METHODS: [
4430
+ { value: "cash", label: { fr: "Esp\xE8ce", en: "Cash", default: "Cash" } },
4431
+ { value: "card", label: { fr: "Carte bancaire", en: "Card", default: "Card" } },
4432
+ { value: "check", label: { fr: "Ch\xE8que", en: "Check", default: "Check" } },
4433
+ { value: "mobile-money", label: { fr: "Mobile money", en: "Mobile money", default: "Mobile money" } },
4434
+ { value: "transfer", label: { fr: "Virement bancaire", en: "Bank transfer", default: "Transfer" } },
4435
+ { value: "deferred", label: { fr: "\xC0 terme", en: "Deferred", default: "Deferred" } }
4436
+ ],
4437
+ TEMPLATES: [
4438
+ { value: "B2B", label: { fr: "Client entreprise (B2B)", en: "Business client (B2B)", default: "B2B" } },
4439
+ { value: "B2F", label: { fr: "Client international (B2F)", en: "International client (B2F)", default: "B2F" } },
4440
+ { value: "B2G", label: { fr: "Institution gouvernementale (B2G)", en: "Government institution (B2G)", default: "B2G" } },
4441
+ { value: "B2C", label: { fr: "Particulier (B2C)", en: "Individual (B2C)", default: "B2C" } }
4442
+ ],
4443
+ FOREIGN_CURRENCIES: [
4444
+ { value: "XOF", label: { fr: "Franc CFA", en: "CFA Franc", default: "XOF" } },
4445
+ { value: "USD", label: { fr: "Dollar am\xE9ricain", en: "US Dollar", default: "USD" } },
4446
+ { value: "EUR", label: { fr: "Euro", en: "Euro", default: "EUR" } },
4447
+ { value: "JPY", label: { fr: "Yen japonais", en: "Japanese Yen", default: "JPY" } },
4448
+ { value: "CAD", label: { fr: "Dollar canadien", en: "Canadian Dollar", default: "CAD" } },
4449
+ { value: "GBP", label: { fr: "Livre sterling", en: "British Pound", default: "GBP" } },
4450
+ { value: "AUD", label: { fr: "Dollar australien", en: "Australian Dollar", default: "AUD" } },
4451
+ { value: "CNH", label: { fr: "Yuan chinois", en: "Chinese Yuan", default: "CNH" } },
4452
+ { value: "CHF", label: { fr: "Franc suisse", en: "Swiss Franc", default: "CHF" } },
4453
+ { value: "HKD", label: { fr: "Dollar de Hong Kong", en: "Hong Kong Dollar", default: "HKD" } },
4454
+ { value: "NZD", label: { fr: "Dollar n\xE9o-z\xE9landais", en: "New Zealand Dollar", default: "NZD" } }
4455
+ ],
4456
+ TAXES: [
4457
+ { value: "TVA", label: { fr: "TVA 18 %", en: "VAT 18%", default: "VAT 18%" } },
4458
+ { value: "TVAB", label: { fr: "TVA r\xE9duite 9 %", en: "Reduced VAT 9%", default: "VAT 9%" } },
4459
+ { value: "TVAC", label: { fr: "TVA exon\xE9r\xE9e 0 %", en: "Exempt VAT 0%", default: "VAT 0%" } },
4460
+ { value: "TVAD", label: { fr: "TVA exon\xE9r\xE9e TEE/RME 0 %", en: "Exempt VAT TEE/RME 0%", default: "VAT 0%" } }
4461
+ ],
4462
+ LEGAL_FORMS: [
4463
+ { value: "EI", label: { fr: "Entreprise Individuelle (EI)", en: "Sole Proprietorship (EI)", default: "Sole Proprietorship (EI)" } },
4464
+ { value: "SARL", label: { fr: "Soci\xE9t\xE9 \xE0 Responsabilit\xE9 Limit\xE9e (SARL)", en: "Limited Liability Company (LLC)", default: "LLC (SARL)" } },
4465
+ { value: "SUARL", label: { fr: "Soci\xE9t\xE9 Unipersonnelle \xE0 Responsabilit\xE9 Limit\xE9e (SUARL)", en: "Single-Member LLC (SUARL)", default: "Single-Member LLC (SUARL)" } },
4466
+ { value: "SA", label: { fr: "Soci\xE9t\xE9 Anonyme (SA)", en: "Corporation (SA)", default: "Corporation (SA)" } },
4467
+ { value: "SNC", label: { fr: "Soci\xE9t\xE9 en Nom Collectif (SNC)", en: "General Partnership (SNC)", default: "General Partnership (SNC)" } },
4468
+ { value: "SCS", label: { fr: "Soci\xE9t\xE9 en Commandite Simple (SCS)", en: "Limited Partnership (SCS)", default: "Limited Partnership (SCS)" } },
4469
+ { value: "GIE", label: { fr: "Groupement d'Int\xE9r\xEAt \xC9conomique (GIE)", en: "Economic Interest Grouping (GIE)", default: "Economic Interest Grouping (GIE)" } },
4470
+ { value: "COOP", label: { fr: "Soci\xE9t\xE9 Coop\xE9rative", en: "Cooperative Society", default: "Cooperative Society" } },
4471
+ { value: "SC", label: { fr: "Soci\xE9t\xE9 Civile (SC)", en: "Civil Company (SC)", default: "Civil Company (SC)" } }
4472
+ ],
4473
+ COUNTRIES: [
4474
+ { value: "AFG", label: { fr: "Afghanistan", en: "Afghanistan", default: "Afghanistan" } },
4475
+ { value: "ALB", label: { fr: "Albanie", en: "Albania", default: "Albania" } },
4476
+ { value: "DZA", label: { fr: "Alg\xE9rie", en: "Algeria", default: "Algeria" } },
4477
+ { value: "AND", label: { fr: "Andorre", en: "Andorra", default: "Andorra" } },
4478
+ { value: "AGO", label: { fr: "Angola", en: "Angola", default: "Angola" } },
4479
+ { value: "ATG", label: { fr: "Antigua-et-Barbuda", en: "Antigua and Barbuda", default: "Antigua and Barbuda" } },
4480
+ { value: "ARG", label: { fr: "Argentine", en: "Argentina", default: "Argentina" } },
4481
+ { value: "ARM", label: { fr: "Arm\xE9nie", en: "Armenia", default: "Armenia" } },
4482
+ { value: "AUS", label: { fr: "Australie", en: "Australia", default: "Australia" } },
4483
+ { value: "AUT", label: { fr: "Autriche", en: "Austria", default: "Austria" } },
4484
+ { value: "AZE", label: { fr: "Azerba\xEFdjan", en: "Azerbaijan", default: "Azerbaijan" } },
4485
+ { value: "BHS", label: { fr: "Bahamas", en: "Bahamas", default: "Bahamas" } },
4486
+ { value: "BHR", label: { fr: "Bahre\xEFn", en: "Bahrain", default: "Bahrain" } },
4487
+ { value: "BGD", label: { fr: "Bangladesh", en: "Bangladesh", default: "Bangladesh" } },
4488
+ { value: "BRB", label: { fr: "Barbade", en: "Barbados", default: "Barbados" } },
4489
+ { value: "BLR", label: { fr: "Bi\xE9lorussie", en: "Belarus", default: "Belarus" } },
4490
+ { value: "BEL", label: { fr: "Belgique", en: "Belgium", default: "Belgium" } },
4491
+ { value: "BLZ", label: { fr: "Belize", en: "Belize", default: "Belize" } },
4492
+ { value: "BEN", label: { fr: "B\xE9nin", en: "Benin", default: "Benin" } },
4493
+ { value: "BTN", label: { fr: "Bhoutan", en: "Bhutan", default: "Bhutan" } },
4494
+ { value: "BOL", label: { fr: "Bolivie", en: "Bolivia", default: "Bolivia" } },
4495
+ { value: "BIH", label: { fr: "Bosnie-Herz\xE9govine", en: "Bosnia and Herzegovina", default: "Bosnia and Herzegovina" } },
4496
+ { value: "BWA", label: { fr: "Botswana", en: "Botswana", default: "Botswana" } },
4497
+ { value: "BRA", label: { fr: "Br\xE9sil", en: "Brazil", default: "Brazil" } },
4498
+ { value: "BRN", label: { fr: "Brunei", en: "Brunei", default: "Brunei" } },
4499
+ { value: "BGR", label: { fr: "Bulgarie", en: "Bulgaria", default: "Bulgaria" } },
4500
+ { value: "BFA", label: { fr: "Burkina Faso", en: "Burkina Faso", default: "Burkina Faso" } },
4501
+ { value: "BDI", label: { fr: "Burundi", en: "Burundi", default: "Burundi" } },
4502
+ { value: "CPV", label: { fr: "Cap-Vert", en: "Cabo Verde", default: "Cabo Verde" } },
4503
+ { value: "KHM", label: { fr: "Cambodge", en: "Cambodia", default: "Cambodia" } },
4504
+ { value: "CMR", label: { fr: "Cameroun", en: "Cameroon", default: "Cameroon" } },
4505
+ { value: "CAN", label: { fr: "Canada", en: "Canada", default: "Canada" } },
4506
+ { value: "CAF", label: { fr: "R\xE9publique centrafricaine", en: "Central African Republic", default: "Central African Republic" } },
4507
+ { value: "TCD", label: { fr: "Tchad", en: "Chad", default: "Chad" } },
4508
+ { value: "CHL", label: { fr: "Chili", en: "Chile", default: "Chile" } },
4509
+ { value: "CHN", label: { fr: "Chine", en: "China", default: "China" } },
4510
+ { value: "COL", label: { fr: "Colombie", en: "Colombia", default: "Colombia" } },
4511
+ { value: "COM", label: { fr: "Comores", en: "Comoros", default: "Comoros" } },
4512
+ { value: "COG", label: { fr: "Congo", en: "Congo", default: "Congo" } },
4513
+ { value: "CRI", label: { fr: "Costa Rica", en: "Costa Rica", default: "Costa Rica" } },
4514
+ { value: "CIV", label: { fr: "C\xF4te d'Ivoire", en: "Ivory Coast", default: "Ivory Coast" } },
4515
+ { value: "HRV", label: { fr: "Croatie", en: "Croatia", default: "Croatia" } },
4516
+ { value: "CUB", label: { fr: "Cuba", en: "Cuba", default: "Cuba" } },
4517
+ { value: "CYP", label: { fr: "Chypre", en: "Cyprus", default: "Cyprus" } },
4518
+ { value: "CZE", label: { fr: "Tch\xE9quie", en: "Czechia", default: "Czechia" } },
4519
+ { value: "DNK", label: { fr: "Danemark", en: "Denmark", default: "Denmark" } },
4520
+ { value: "DJI", label: { fr: "Djibouti", en: "Djibouti", default: "Djibouti" } },
4521
+ { value: "DMA", label: { fr: "Dominique", en: "Dominica", default: "Dominica" } },
4522
+ { value: "DOM", label: { fr: "R\xE9publique dominicaine", en: "Dominican Republic", default: "Dominican Republic" } },
4523
+ { value: "ECU", label: { fr: "\xC9quateur", en: "Ecuador", default: "Ecuador" } },
4524
+ { value: "EGY", label: { fr: "\xC9gypte", en: "Egypt", default: "Egypt" } },
4525
+ { value: "SLV", label: { fr: "Salvador", en: "El Salvador", default: "El Salvador" } },
4526
+ { value: "GNQ", label: { fr: "Guin\xE9e \xE9quatoriale", en: "Equatorial Guinea", default: "Equatorial Guinea" } },
4527
+ { value: "ERI", label: { fr: "\xC9rythr\xE9e", en: "Eritrea", default: "Eritrea" } },
4528
+ { value: "EST", label: { fr: "Estonie", en: "Estonia", default: "Estonia" } },
4529
+ { value: "SWZ", label: { fr: "Eswatini", en: "Eswatini", default: "Eswatini" } },
4530
+ { value: "ETH", label: { fr: "\xC9thiopie", en: "Ethiopia", default: "Ethiopia" } },
4531
+ { value: "FJI", label: { fr: "Fidji", en: "Fiji", default: "Fiji" } },
4532
+ { value: "FIN", label: { fr: "Finlande", en: "Finland", default: "Finland" } },
4533
+ { value: "FRA", label: { fr: "France", en: "France", default: "France" } },
4534
+ { value: "GAB", label: { fr: "Gabon", en: "Gabon", default: "Gabon" } },
4535
+ { value: "GMB", label: { fr: "Gambie", en: "Gambia", default: "Gambia" } },
4536
+ { value: "GEO", label: { fr: "G\xE9orgie", en: "Georgia", default: "Georgia" } },
4537
+ { value: "DEU", label: { fr: "Allemagne", en: "Germany", default: "Germany" } },
4538
+ { value: "GHA", label: { fr: "Ghana", en: "Ghana", default: "Ghana" } },
4539
+ { value: "GRC", label: { fr: "Gr\xE8ce", en: "Greece", default: "Greece" } },
4540
+ { value: "GRD", label: { fr: "Grenade", en: "Grenada", default: "Grenada" } },
4541
+ { value: "GTM", label: { fr: "Guatemala", en: "Guatemala", default: "Guatemala" } },
4542
+ { value: "GIN", label: { fr: "Guin\xE9e", en: "Guinea", default: "Guinea" } },
4543
+ { value: "GNB", label: { fr: "Guin\xE9e-Bissau", en: "Guinea-Bissau", default: "Guinea-Bissau" } },
4544
+ { value: "GUY", label: { fr: "Guyana", en: "Guyana", default: "Guyana" } },
4545
+ { value: "HTI", label: { fr: "Ha\xEFti", en: "Haiti", default: "Haiti" } },
4546
+ { value: "HND", label: { fr: "Honduras", en: "Honduras", default: "Honduras" } },
4547
+ { value: "HUN", label: { fr: "Hongrie", en: "Hungary", default: "Hungary" } },
4548
+ { value: "ISL", label: { fr: "Islande", en: "Iceland", default: "Iceland" } },
4549
+ { value: "IND", label: { fr: "Inde", en: "India", default: "India" } },
4550
+ { value: "IDN", label: { fr: "Indon\xE9sie", en: "Indonesia", default: "Indonesia" } },
4551
+ { value: "IRN", label: { fr: "Iran", en: "Iran", default: "Iran" } },
4552
+ { value: "IRQ", label: { fr: "Irak", en: "Iraq", default: "Iraq" } },
4553
+ { value: "IRL", label: { fr: "Irlande", en: "Ireland", default: "Ireland" } },
4554
+ { value: "ISR", label: { fr: "Isra\xEBl", en: "Israel", default: "Israel" } },
4555
+ { value: "ITA", label: { fr: "Italie", en: "Italy", default: "Italy" } },
4556
+ { value: "JAM", label: { fr: "Jama\xEFque", en: "Jamaica", default: "Jamaica" } },
4557
+ { value: "JPN", label: { fr: "Japon", en: "Japan", default: "Japan" } },
4558
+ { value: "JOR", label: { fr: "Jordanie", en: "Jordan", default: "Jordan" } },
4559
+ { value: "KAZ", label: { fr: "Kazakhstan", en: "Kazakhstan", default: "Kazakhstan" } },
4560
+ { value: "KEN", label: { fr: "Kenya", en: "Kenya", default: "Kenya" } },
4561
+ { value: "KIR", label: { fr: "Kiribati", en: "Kiribati", default: "Kiribati" } },
4562
+ { value: "PRK", label: { fr: "Cor\xE9e du Nord", en: "North Korea", default: "North Korea" } },
4563
+ { value: "KOR", label: { fr: "Cor\xE9e du Sud", en: "South Korea", default: "South Korea" } },
4564
+ { value: "KWT", label: { fr: "Kowe\xEFt", en: "Kuwait", default: "Kuwait" } },
4565
+ { value: "KGZ", label: { fr: "Kirghizistan", en: "Kyrgyzstan", default: "Kyrgyzstan" } },
4566
+ { value: "LAO", label: { fr: "Laos", en: "Laos", default: "Laos" } },
4567
+ { value: "LVA", label: { fr: "Lettonie", en: "Latvia", default: "Latvia" } },
4568
+ { value: "LBN", label: { fr: "Liban", en: "Lebanon", default: "Lebanon" } },
4569
+ { value: "LSO", label: { fr: "Lesotho", en: "Lesotho", default: "Lesotho" } },
4570
+ { value: "LBR", label: { fr: "Lib\xE9ria", en: "Liberia", default: "Liberia" } },
4571
+ { value: "LBY", label: { fr: "Libye", en: "Libya", default: "Libya" } },
4572
+ { value: "LIE", label: { fr: "Liechtenstein", en: "Liechtenstein", default: "Liechtenstein" } },
4573
+ { value: "LTU", label: { fr: "Lituanie", en: "Lithuania", default: "Lithuania" } },
4574
+ { value: "LUX", label: { fr: "Luxembourg", en: "Luxembourg", default: "Luxembourg" } },
4575
+ { value: "MDG", label: { fr: "Madagascar", en: "Madagascar", default: "Madagascar" } },
4576
+ { value: "MWI", label: { fr: "Malawi", en: "Malawi", default: "Malawi" } },
4577
+ { value: "MYS", label: { fr: "Malaisie", en: "Malaysia", default: "Malaysia" } },
4578
+ { value: "MDV", label: { fr: "Maldives", en: "Maldives", default: "Maldives" } },
4579
+ { value: "MLI", label: { fr: "Mali", en: "Mali", default: "Mali" } },
4580
+ { value: "MLT", label: { fr: "Malte", en: "Malta", default: "Malta" } },
4581
+ { value: "MHL", label: { fr: "\xCEles Marshall", en: "Marshall Islands", default: "Marshall Islands" } },
4582
+ { value: "MRT", label: { fr: "Mauritanie", en: "Mauritania", default: "Mauritania" } },
4583
+ { value: "MUS", label: { fr: "Maurice", en: "Mauritius", default: "Mauritius" } },
4584
+ { value: "MEX", label: { fr: "Mexique", en: "Mexico", default: "Mexico" } },
4585
+ { value: "FSM", label: { fr: "\xC9tats f\xE9d\xE9r\xE9s de Micron\xE9sie", en: "Micronesia", default: "Micronesia" } },
4586
+ { value: "MDA", label: { fr: "Moldavie", en: "Moldova", default: "Moldova" } },
4587
+ { value: "MCO", label: { fr: "Monaco", en: "Monaco", default: "Monaco" } },
4588
+ { value: "MNG", label: { fr: "Mongolie", en: "Mongolia", default: "Mongolia" } },
4589
+ { value: "MNE", label: { fr: "Mont\xE9n\xE9gro", en: "Montenegro", default: "Montenegro" } },
4590
+ { value: "MAR", label: { fr: "Maroc", en: "Morocco", default: "Morocco" } },
4591
+ { value: "MOZ", label: { fr: "Mozambique", en: "Mozambique", default: "Mozambique" } },
4592
+ { value: "MMR", label: { fr: "Myanmar", en: "Myanmar", default: "Myanmar" } },
4593
+ { value: "NAM", label: { fr: "Namibie", en: "Namibia", default: "Namibia" } },
4594
+ { value: "NRU", label: { fr: "Nauru", en: "Nauru", default: "Nauru" } },
4595
+ { value: "NPL", label: { fr: "N\xE9pal", en: "Nepal", default: "Nepal" } },
4596
+ { value: "NLD", label: { fr: "Pays-Bas", en: "Netherlands", default: "Netherlands" } },
4597
+ { value: "NZL", label: { fr: "Nouvelle-Z\xE9lande", en: "New Zealand", default: "New Zealand" } },
4598
+ { value: "NIC", label: { fr: "Nicaragua", en: "Nicaragua", default: "Nicaragua" } },
4599
+ { value: "NER", label: { fr: "Niger", en: "Niger", default: "Niger" } },
4600
+ { value: "NGA", label: { fr: "Nig\xE9ria", en: "Nigeria", default: "Nigeria" } },
4601
+ { value: "MKD", label: { fr: "Mac\xE9doine du Nord", en: "North Macedonia", default: "North Macedonia" } },
4602
+ { value: "NOR", label: { fr: "Norv\xE8ge", en: "Norway", default: "Norway" } },
4603
+ { value: "OMN", label: { fr: "Oman", en: "Oman", default: "Oman" } },
4604
+ { value: "PAK", label: { fr: "Pakistan", en: "Pakistan", default: "Pakistan" } },
4605
+ { value: "PLW", label: { fr: "Palaos", en: "Palau", default: "Palau" } },
4606
+ { value: "PAN", label: { fr: "Panama", en: "Panama", default: "Panama" } },
4607
+ { value: "PNG", label: { fr: "Papouasie-Nouvelle-Guin\xE9e", en: "Papua New Guinea", default: "Papua New Guinea" } },
4608
+ { value: "PRY", label: { fr: "Paraguay", en: "Paraguay", default: "Paraguay" } },
4609
+ { value: "PER", label: { fr: "P\xE9rou", en: "Peru", default: "Peru" } },
4610
+ { value: "PHL", label: { fr: "Philippines", en: "Philippines", default: "Philippines" } },
4611
+ { value: "POL", label: { fr: "Pologne", en: "Poland", default: "Poland" } },
4612
+ { value: "PRT", label: { fr: "Portugal", en: "Portugal", default: "Portugal" } },
4613
+ { value: "QAT", label: { fr: "Qatar", en: "Qatar", default: "Qatar" } },
4614
+ { value: "ROU", label: { fr: "Roumanie", en: "Romania", default: "Romania" } },
4615
+ { value: "RUS", label: { fr: "Russie", en: "Russia", default: "Russia" } },
4616
+ { value: "RWA", label: { fr: "Rwanda", en: "Rwanda", default: "Rwanda" } },
4617
+ { value: "KNA", label: { fr: "Saint-Christophe-et-Ni\xE9v\xE8s", en: "Saint Kitts and Nevis", default: "Saint Kitts and Nevis" } },
4618
+ { value: "LCA", label: { fr: "Sainte-Lucie", en: "Saint Lucia", default: "Saint Lucia" } },
4619
+ { value: "VCT", label: { fr: "Saint-Vincent-et-les-Grenadines", en: "Saint Vincent and the Grenadines", default: "Saint Vincent and the Grenadines" } },
4620
+ { value: "WSM", label: { fr: "Samoa", en: "Samoa", default: "Samoa" } },
4621
+ { value: "SMR", label: { fr: "Saint-Marin", en: "San Marino", default: "San Marino" } },
4622
+ { value: "STP", label: { fr: "Sao Tom\xE9-et-Principe", en: "Sao Tome and Principe", default: "Sao Tome and Principe" } },
4623
+ { value: "SAU", label: { fr: "Arabie saoudite", en: "Saudi Arabia", default: "Saudi Arabia" } },
4624
+ { value: "SEN", label: { fr: "S\xE9n\xE9gal", en: "Senegal", default: "Senegal" } },
4625
+ { value: "SRB", label: { fr: "Serbie", en: "Serbia", default: "Serbia" } },
4626
+ { value: "SYC", label: { fr: "Seychelles", en: "Seychelles", default: "Seychelles" } },
4627
+ { value: "SLE", label: { fr: "Sierra Leone", en: "Sierra Leone", default: "Sierra Leone" } },
4628
+ { value: "SGP", label: { fr: "Singapour", en: "Singapore", default: "Singapore" } },
4629
+ { value: "SVK", label: { fr: "Slovaquie", en: "Slovakia", default: "Slovakia" } },
4630
+ { value: "SVN", label: { fr: "Slov\xE9nie", en: "Slovenia", default: "Slovenia" } },
4631
+ { value: "SLB", label: { fr: "\xCEles Salomon", en: "Solomon Islands", default: "Solomon Islands" } },
4632
+ { value: "SOM", label: { fr: "Somalie", en: "Somalia", default: "Somalia" } },
4633
+ { value: "ZAF", label: { fr: "Afrique du Sud", en: "South Africa", default: "South Africa" } },
4634
+ { value: "SSD", label: { fr: "Soudan du Sud", en: "South Sudan", default: "South Sudan" } },
4635
+ { value: "ESP", label: { fr: "Espagne", en: "Spain", default: "Spain" } },
4636
+ { value: "LKA", label: { fr: "Sri Lanka", en: "Sri Lanka", default: "Sri Lanka" } },
4637
+ { value: "SDN", label: { fr: "Soudan", en: "Sudan", default: "Sudan" } },
4638
+ { value: "SUR", label: { fr: "Suriname", en: "Suriname", default: "Suriname" } },
4639
+ { value: "SWE", label: { fr: "Su\xE8de", en: "Sweden", default: "Sweden" } },
4640
+ { value: "CHE", label: { fr: "Suisse", en: "Switzerland", default: "Switzerland" } },
4641
+ { value: "SYR", label: { fr: "Syrie", en: "Syria", default: "Syria" } },
4642
+ { value: "TWN", label: { fr: "Ta\xEFwan", en: "Taiwan", default: "Taiwan" } },
4643
+ { value: "TJK", label: { fr: "Tadjikistan", en: "Tajikistan", default: "Tajikistan" } },
4644
+ { value: "TZA", label: { fr: "Tanzanie", en: "Tanzania", default: "Tanzania" } },
4645
+ { value: "THA", label: { fr: "Tha\xEFlande", en: "Thailand", default: "Thailand" } },
4646
+ { value: "TLS", label: { fr: "Timor oriental", en: "Timor-Leste", default: "Timor-Leste" } },
4647
+ { value: "TGO", label: { fr: "Togo", en: "Togo", default: "Togo" } },
4648
+ { value: "TON", label: { fr: "Tonga", en: "Tonga", default: "Tonga" } },
4649
+ { value: "TTO", label: { fr: "Trinit\xE9-et-Tobago", en: "Trinidad and Tobago", default: "Trinidad and Tobago" } },
4650
+ { value: "TUN", label: { fr: "Tunisie", en: "Tunisia", default: "Tunisia" } },
4651
+ { value: "TUR", label: { fr: "Turquie", en: "Turkey", default: "Turkey" } },
4652
+ { value: "TKM", label: { fr: "Turkm\xE9nistan", en: "Turkmenistan", default: "Turkmenistan" } },
4653
+ { value: "TUV", label: { fr: "Tuvalu", en: "Tuvalu", default: "Tuvalu" } },
4654
+ { value: "UGA", label: { fr: "Ouganda", en: "Uganda", default: "Uganda" } },
4655
+ { value: "UKR", label: { fr: "Ukraine", en: "Ukraine", default: "Ukraine" } },
4656
+ { value: "ARE", label: { fr: "\xC9mirats arabes unis", en: "United Arab Emirates", default: "United Arab Emirates" } },
4657
+ { value: "GBR", label: { fr: "Royaume-Uni", en: "United Kingdom", default: "United Kingdom" } },
4658
+ { value: "USA", label: { fr: "\xC9tats-Unis", en: "United States", default: "United States" } },
4659
+ { value: "URY", label: { fr: "Uruguay", en: "Uruguay", default: "Uruguay" } },
4660
+ { value: "UZB", label: { fr: "Ouzb\xE9kistan", en: "Uzbekistan", default: "Uzbekistan" } },
4661
+ { value: "VUT", label: { fr: "Vanuatu", en: "Vanuatu", default: "Vanuatu" } },
4662
+ { value: "VAT", label: { fr: "Vatican", en: "Vatican City", default: "Vatican City" } },
4663
+ { value: "VEN", label: { fr: "Venezuela", en: "Venezuela", default: "Venezuela" } },
4664
+ { value: "VNM", label: { fr: "Vietnam", en: "Vietnam", default: "Vietnam" } },
4665
+ { value: "YEM", label: { fr: "Y\xE9men", en: "Yemen", default: "Yemen" } },
4666
+ { value: "ZMB", label: { fr: "Zambie", en: "Zambia", default: "Zambia" } },
4667
+ { value: "ZWE", label: { fr: "Zimbabwe", en: "Zimbabwe", default: "Zimbabwe" } }
4668
+ ]
4669
+ };
4670
+ var Choices_default = CHOICES;
4671
+ var InvoiceTypeSelector = ({
4672
+ value,
4673
+ onSelect,
4674
+ disabled = false,
4675
+ language = "default"
4676
+ }) => {
4677
+ const options = CHOICES.INVOICE_TYPES.map((item) => ({
4678
+ value: item.value,
4679
+ label: item.label[language]
4680
+ }));
4681
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4682
+ SearchableSelect,
4683
+ {
4684
+ value,
4685
+ options,
4686
+ placeholder: "S\xE9lectionner un type...",
4687
+ searchPlaceholder: "Rechercher...",
4688
+ onSelect,
4689
+ disabled
4690
+ },
4691
+ `invoice-type-${value}`
4692
+ );
4693
+ };
4694
+ var PaymentMethodSelector = ({
4695
+ value,
4696
+ onSelect,
4697
+ disabled = false,
4698
+ language = "default"
4699
+ }) => {
4700
+ const options = CHOICES.PAYMENT_METHODS.map((item) => ({
4701
+ value: item.value,
4702
+ label: item.label[language]
4703
+ }));
4704
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4705
+ SearchableSelect,
4706
+ {
4707
+ value,
4708
+ options,
4709
+ placeholder: "S\xE9lectionner un mode de paiement...",
4710
+ searchPlaceholder: "Rechercher...",
4711
+ onSelect,
4712
+ disabled
4713
+ },
4714
+ `payment-method-${value}`
4715
+ );
4716
+ };
4717
+ var TemplateFNESelector = ({
4718
+ value,
4719
+ onSelect,
4720
+ disabled = false,
4721
+ language = "default"
4722
+ }) => {
4723
+ const options = CHOICES.TEMPLATES.map((item) => ({
4724
+ value: item.value,
4725
+ label: item.label[language]
4726
+ }));
4727
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4728
+ SearchableSelect,
4729
+ {
4730
+ value,
4731
+ options,
4732
+ placeholder: "S\xE9lectionner un template...",
4733
+ searchPlaceholder: "Rechercher...",
4734
+ onSelect,
4735
+ disabled
4736
+ },
4737
+ `template-${value}`
4738
+ );
4739
+ };
4740
+ var ForeignCurrencySelector = ({
4741
+ value,
4742
+ onSelect,
4743
+ disabled = false,
4744
+ language = "default"
4745
+ }) => {
4746
+ const options = CHOICES.FOREIGN_CURRENCIES.map((item) => ({
4747
+ value: item.value,
4748
+ label: item.label[language]
4749
+ }));
4750
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4751
+ SearchableSelect,
4752
+ {
4753
+ value,
4754
+ options,
4755
+ placeholder: "S\xE9lectionner une devise...",
4756
+ searchPlaceholder: "Rechercher...",
4757
+ onSelect,
4758
+ disabled
4759
+ },
4760
+ `currency-${value}`
4761
+ );
4762
+ };
4763
+ var TaxSelector = ({
4764
+ value,
4765
+ onSelect,
4766
+ disabled = false,
4767
+ language = "default",
4768
+ handleChange
4769
+ }) => {
4770
+ const options = CHOICES.TAXES.map((item) => ({
4771
+ value: item.value,
4772
+ label: item.label[language]
4773
+ }));
4774
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4775
+ SearchableSelect,
4776
+ {
4777
+ value,
4778
+ options,
4779
+ placeholder: "S\xE9lectionner une taxe...",
4780
+ searchPlaceholder: "Rechercher...",
4781
+ onSelect: (option) => {
4782
+ if (handleChange) {
4783
+ handleChange(option.value);
4784
+ }
4785
+ onSelect(option);
4786
+ },
4787
+ disabled
4788
+ },
4789
+ `tax-${value}`
4790
+ );
4791
+ };
4792
+ var LegalFormSelector = ({
4793
+ value,
4794
+ onSelect,
4795
+ disabled = false,
4796
+ language = "default"
4797
+ }) => {
4798
+ const options = CHOICES.LEGAL_FORMS.map((item) => ({
4799
+ value: item.value,
4800
+ label: item.label[language] ?? item.label.default
4801
+ }));
4802
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4803
+ SearchableSelect,
4804
+ {
4805
+ value,
4806
+ options,
4807
+ placeholder: "S\xE9lectionner une forme juridique...",
4808
+ searchPlaceholder: "Rechercher...",
4809
+ onSelect,
4810
+ disabled
4811
+ },
4812
+ `legal-form-${value}`
4813
+ );
4814
+ };
4815
+ var CountrySelector = ({
4816
+ value,
4817
+ onSelect,
4818
+ disabled = false,
4819
+ language = "default"
4820
+ }) => {
4821
+ const options = CHOICES.COUNTRIES.map((item) => ({
4822
+ value: item.value,
4823
+ label: item.label[language]
4824
+ }));
4825
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4826
+ SearchableSelect,
4827
+ {
4828
+ value,
4829
+ options,
4830
+ placeholder: "S\xE9lectionner un pays...",
4831
+ searchPlaceholder: "Rechercher...",
4832
+ onSelect,
4833
+ disabled
4834
+ },
4835
+ `country-${value}`
4836
+ );
4837
+ };
3710
4838
  // Annotate the CommonJS export names for ESM import in node:
3711
4839
  0 && (module.exports = {
3712
4840
  Alert,
@@ -3715,19 +4843,31 @@ var useAlert = () => {
3715
4843
  ApprovalAnswerPage,
3716
4844
  ApprovalPreviewAnswer,
3717
4845
  ApprovalWorkflow,
4846
+ CHOICES,
4847
+ CountrySelector,
3718
4848
  DateInput,
3719
4849
  FDrawer,
3720
4850
  FetchApi,
3721
4851
  FileInput,
4852
+ ForeignCurrencySelector,
3722
4853
  InputField,
4854
+ InvoiceTypeSelector,
4855
+ LegalFormSelector,
3723
4856
  Modal,
3724
4857
  NumberInput,
3725
4858
  Pages,
4859
+ PaymentMethodSelector,
3726
4860
  PrimaryButton,
3727
4861
  RewiseLayout,
3728
4862
  SecondaryButton,
4863
+ SelectCostCenter,
4864
+ SelectDepartment,
3729
4865
  SelectInput,
4866
+ SelectUser,
4867
+ SelectVendor,
3730
4868
  SessionProvider,
4869
+ TaxSelector,
4870
+ TemplateFNESelector,
3731
4871
  TextInput,
3732
4872
  ThemeProvider,
3733
4873
  ToastContainer,