ptechcore_ui 1.0.15 → 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.js CHANGED
@@ -3689,7 +3689,7 @@ var useAlert = () => {
3689
3689
  };
3690
3690
 
3691
3691
  // src/components/common/CommonSelect.tsx
3692
- import { useEffect as useEffect11, useState as useState14 } from "react";
3692
+ import { useEffect as useEffect12, useState as useState16 } from "react";
3693
3693
 
3694
3694
  // src/services/VendorServices.ts
3695
3695
  var VENDORS_API_URL = `${API_URL}/accounting/vendors/`;
@@ -3761,24 +3761,83 @@ import { ArrowDownAZ as ArrowDownAZ2, ArrowDownUp as ArrowDownUp2, ArrowUpAZ as
3761
3761
  import { Fragment as Fragment42, jsx as jsx122, jsxs as jsxs82 } from "react/jsx-runtime";
3762
3762
  import { useState as useState102, useEffect as useEffect82 } from "react";
3763
3763
  import { useState as useState92, useRef as useRef2, useEffect as useEffect72 } from "react";
3764
- import { Search as Search32, ChevronDown as ChevronDown2, X as X42 } from "lucide-react";
3764
+ import { Search as Search32, ChevronDown as ChevronDown2, X as X42, RefreshCw as RefreshCw2, Plus as Plus3 } from "lucide-react";
3765
3765
  import { Fragment as Fragment52, jsx as jsx132, jsxs as jsxs92 } from "react/jsx-runtime";
3766
- import { X as X52, Plus as Plus3, Trash2 as Trash22, Users as Users2, Loader as Loader22, RotateCcw as RotateCcw2, Ban as Ban2, Eye as Eye22, FileText as FileText22, History as History2 } from "lucide-react";
3766
+ import { X as X52, Plus as Plus22, Trash2 as Trash22, Users as Users2, Loader as Loader22, RotateCcw as RotateCcw2, Ban as Ban2, Eye as Eye22, FileText as FileText22, History as History2 } from "lucide-react";
3767
3767
  import { Fragment as Fragment62, jsx as jsx142, jsxs as jsxs102 } from "react/jsx-runtime";
3768
3768
  import { createContext as createContext42, useContext as useContext42, useState as useState112, useCallback as useCallback22 } from "react";
3769
3769
  import { jsx as jsx152, jsxs as jsxs112 } from "react/jsx-runtime";
3770
3770
  import { jsx as jsx162, jsxs as jsxs122 } from "react/jsx-runtime";
3771
+ import { useEffect as useEffect11, useState as useState14 } from "react";
3772
+ import { jsx as jsx172 } from "react/jsx-runtime";
3773
+ import { jsx as jsx222, jsxs as jsxs132 } from "react/jsx-runtime";
3774
+ import { Link as Link32 } from "react-router-dom";
3775
+ import { jsx as jsx322, jsxs as jsxs222 } from "react/jsx-runtime";
3776
+ import React422, { useState as useState522, useEffect as useEffect422 } from "react";
3777
+ import { useLocation as useLocation32, useNavigate as useNavigate32 } from "react-router-dom";
3778
+ import {
3779
+ Settings as Settings32,
3780
+ ChevronLeft as ChevronLeft32,
3781
+ ChevronRight as ChevronRight22,
3782
+ Search as Search42,
3783
+ Bell as Bell22,
3784
+ User as User22,
3785
+ LogOut as LogOut22,
3786
+ Menu as Menu32,
3787
+ X as X222,
3788
+ Palette as Palette22,
3789
+ DollarSign as DollarSign22,
3790
+ HelpCircle as HelpCircle22,
3791
+ Building2 as Building222
3792
+ } from "lucide-react";
3793
+ import { clsx as clsx22 } from "clsx";
3794
+ import { twMerge as twMerge22 } from "tailwind-merge";
3795
+ import { createContext as createContext52, useContext as useContext52, useState as useState122, useEffect as useEffect92 } from "react";
3796
+ import { jsx as jsx422 } from "react/jsx-runtime";
3797
+ import { createContext as createContext222, useContext as useContext222, useEffect as useEffect222, useState as useState222 } from "react";
3798
+ import { jsx as jsx522 } from "react/jsx-runtime";
3799
+ import { createContext as createContext322, useContext as useContext322, useState as useState322, useCallback as useCallback32 } from "react";
3800
+ import { jsx as jsx622 } from "react/jsx-runtime";
3801
+ import { useState as useState422, useEffect as useEffect322 } from "react";
3802
+ import { jsx as jsx722, jsxs as jsxs322 } from "react/jsx-runtime";
3803
+ import { X as X62, Loader as Loader32, Eye as Eye32, FileText as FileText32, Check as Check22, XCircle as XCircle32, Edit as Edit22, CheckCircle as CheckCircle32, Clock as Clock22, AlertCircle as AlertCircle22, User as UserIcon22, Send as Send22 } from "lucide-react";
3804
+ import { useParams as useParams22, useSearchParams as useSearchParams32 } from "react-router-dom";
3805
+ import { Fragment as Fragment72, jsx as jsx822, jsxs as jsxs422 } from "react/jsx-runtime";
3806
+ import { Fragment as Fragment222, jsx as jsx922, jsxs as jsxs522 } from "react/jsx-runtime";
3807
+ import { useEffect as useEffect522, useState as useState622 } from "react";
3808
+ import { CheckCircle as CheckCircle222, XCircle as XCircle222, AlertTriangle as AlertTriangle22, Info as Info22, X as X322 } from "lucide-react";
3809
+ import { jsx as jsx1022, jsxs as jsxs622 } from "react/jsx-runtime";
3810
+ import { ChevronLeft as ChevronLeft222, Download as Download32, Menu as Menu222, Settings as Settings222 } from "lucide-react";
3811
+ import { useState as useState722 } from "react";
3812
+ import { Fragment as Fragment322, jsx as jsx1122, jsxs as jsxs722 } from "react/jsx-runtime";
3813
+ import { useEffect as useEffect622, useState as useState822 } from "react";
3814
+ import { useLocation as useLocation222, useNavigate as useNavigate222, useSearchParams as useSearchParams222, Link as Link222 } from "react-router-dom";
3815
+ import { ArrowDownAZ as ArrowDownAZ22, ArrowDownUp as ArrowDownUp22, ArrowUpAZ as ArrowUpAZ22, Download as Download222, Filter as Filter22, MoreVertical as MoreVertical22, Printer as Printer22, Search as Search222 } from "lucide-react";
3816
+ import { Fragment as Fragment422, jsx as jsx1222, jsxs as jsxs822 } from "react/jsx-runtime";
3817
+ import { useState as useState1022, useEffect as useEffect822 } from "react";
3818
+ import { useState as useState922, useRef as useRef22, useEffect as useEffect722 } from "react";
3819
+ import { Search as Search322, ChevronDown as ChevronDown22, X as X422 } from "lucide-react";
3820
+ import { Fragment as Fragment522, jsx as jsx1322, jsxs as jsxs922 } from "react/jsx-runtime";
3821
+ import { X as X522, Plus as Plus32, Trash2 as Trash222, Users as Users22, Loader as Loader222, RotateCcw as RotateCcw22, Ban as Ban22, Eye as Eye222, FileText as FileText222, History as History22 } from "lucide-react";
3822
+ import { Fragment as Fragment622, jsx as jsx1422, jsxs as jsxs1022 } from "react/jsx-runtime";
3823
+ import { createContext as createContext422, useContext as useContext422, useState as useState1122, useCallback as useCallback222 } from "react";
3824
+ import { jsx as jsx1522, jsxs as jsxs1122 } from "react/jsx-runtime";
3825
+ import { jsx as jsx1622, jsxs as jsxs1222 } from "react/jsx-runtime";
3826
+ import { useState as useState13 } from "react";
3827
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
3828
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
3771
3829
  var PrimaryButton2 = ({
3772
3830
  loading = false,
3773
3831
  children,
3774
3832
  classname = "",
3833
+ variant = "full",
3775
3834
  ...props
3776
3835
  }) => /* @__PURE__ */ jsx17(
3777
3836
  "button",
3778
3837
  {
3779
3838
  type: "submit",
3780
3839
  disabled: loading || props.disabled,
3781
- 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}`,
3840
+ 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]"}`,
3782
3841
  ...props,
3783
3842
  children: loading ? "Connexion en cours..." : children
3784
3843
  }
@@ -3786,7 +3845,7 @@ var PrimaryButton2 = ({
3786
3845
  var Buttons_default2 = PrimaryButton2;
3787
3846
  var Modal2 = ({ title, description, width, open, onClose, children }) => {
3788
3847
  if (!open) return null;
3789
- return /* @__PURE__ */ jsx22("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ jsxs13("div", { className: `bg-white rounded-lg py-4 px-6 mx-4 w-[${width ? width : "60%"}]`, children: [
3848
+ return /* @__PURE__ */ jsx22("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: /* @__PURE__ */ jsxs13("div", { className: `bg-white rounded-lg pt-4 px-6 mx-4 `, children: [
3790
3849
  /* @__PURE__ */ jsxs13("div", { className: "flex justify-between items-start mb-6", children: [
3791
3850
  /* @__PURE__ */ jsxs13("div", { children: [
3792
3851
  /* @__PURE__ */ jsx22("h3", { className: "text-xl font-semibold text-tuatara flex items-center space-x-2", children: /* @__PURE__ */ jsx22("span", { children: title }) }),
@@ -3802,7 +3861,7 @@ var Modal2 = ({ title, description, width, open, onClose, children }) => {
3802
3861
  }
3803
3862
  )
3804
3863
  ] }),
3805
- /* @__PURE__ */ jsx22("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-4", children })
3864
+ /* @__PURE__ */ jsx22("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-1", children })
3806
3865
  ] }) });
3807
3866
  };
3808
3867
  var Modals_default2 = Modal2;
@@ -3859,10 +3918,26 @@ var USERS_API_URL2 = `${API_URL2}/core/users/`;
3859
3918
  var ToastContext2 = createContext32(void 0);
3860
3919
  var APPROVAL_API_URL2 = `${API_URL2}/approvals/cases/`;
3861
3920
  var AlertContext2 = createContext42(void 0);
3921
+ var VENDORS_API_URL2 = `${API_URL2}/accounting/vendors/`;
3922
+ var ThemeContext22 = createContext52(void 0);
3923
+ var ADDRESS_IP22 = "localhost:8000";
3924
+ var ADDRESS_IP_URL22 = `http://${ADDRESS_IP22}/`;
3925
+ var API_URL22 = `${ADDRESS_IP_URL22}api`;
3926
+ var API_BASE_URL32 = `${API_URL22}/core/auth/`;
3927
+ var SessionContext22 = createContext222(void 0);
3928
+ var API_BASE_URL222 = `${API_URL22}/core/auth/`;
3929
+ var USERS_API_URL22 = `${API_URL22}/core/users/`;
3930
+ var ToastContext22 = createContext322(void 0);
3931
+ var APPROVAL_API_URL22 = `${API_URL22}/approvals/cases/`;
3932
+ var AlertContext22 = createContext422(void 0);
3933
+ var URI = `${API_URL2}/core/departments/`;
3934
+ var URI2 = `${API_URL2}/accounting/profit-or-cost-center/`;
3935
+ var COST_URI = `${API_URL2}/accounting/cost-center/`;
3936
+ var PROFIT_URI = `${API_URL2}/accounting/profit-center/`;
3862
3937
 
3863
3938
  // src/components/common/FormVendor.tsx
3864
- import { useState as useState13 } from "react";
3865
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
3939
+ import { useState as useState15 } from "react";
3940
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
3866
3941
  var MinimalVendorForm = ({
3867
3942
  isOpen,
3868
3943
  onClose,
@@ -3871,13 +3946,13 @@ var MinimalVendorForm = ({
3871
3946
  refresh = () => {
3872
3947
  }
3873
3948
  }) => {
3874
- const [formData, setFormData] = useState13(object || {
3949
+ const [formData, setFormData] = useState15(object || {
3875
3950
  from_module: from ?? null,
3876
3951
  legal_name: "",
3877
3952
  trading_name: ""
3878
3953
  });
3879
- const [errors, setErrors] = useState13({});
3880
- const [loading, setLoading] = useState13(false);
3954
+ const [errors, setErrors] = useState15({});
3955
+ const [loading, setLoading] = useState15(false);
3881
3956
  const { token } = useSession();
3882
3957
  const { success, error: showError } = useToast();
3883
3958
  const handleInputChange = (e) => {
@@ -3936,7 +4011,7 @@ var MinimalVendorForm = ({
3936
4011
  }
3937
4012
  };
3938
4013
  if (!isOpen) return null;
3939
- return /* @__PURE__ */ jsx18(
4014
+ return /* @__PURE__ */ jsx20(
3940
4015
  Modals_default2,
3941
4016
  {
3942
4017
  title: "Ajouter un fournisseur",
@@ -3944,9 +4019,9 @@ var MinimalVendorForm = ({
3944
4019
  description: ``,
3945
4020
  open: isOpen,
3946
4021
  onClose,
3947
- children: /* @__PURE__ */ jsxs14("form", { onSubmit: handleSubmit, className: "p-", children: [
3948
- /* @__PURE__ */ jsx18("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
3949
- /* @__PURE__ */ jsx18(
4022
+ children: /* @__PURE__ */ jsxs16("form", { onSubmit: handleSubmit, className: "p-", children: [
4023
+ /* @__PURE__ */ jsx20("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
4024
+ /* @__PURE__ */ jsx20(
3950
4025
  TextInput2,
3951
4026
  {
3952
4027
  label: "Raison sociale",
@@ -3958,7 +4033,7 @@ var MinimalVendorForm = ({
3958
4033
  onChange: handleInputChange
3959
4034
  }
3960
4035
  ),
3961
- /* @__PURE__ */ jsx18(
4036
+ /* @__PURE__ */ jsx20(
3962
4037
  TextInput2,
3963
4038
  {
3964
4039
  label: "Nom commercial",
@@ -3969,8 +4044,8 @@ var MinimalVendorForm = ({
3969
4044
  }
3970
4045
  )
3971
4046
  ] }) }),
3972
- /* @__PURE__ */ jsxs14("div", { className: "flex justify-between pt-6 mt-8", children: [
3973
- /* @__PURE__ */ jsx18(
4047
+ /* @__PURE__ */ jsxs16("div", { className: "flex justify-between pt-6 mt-8", children: [
4048
+ /* @__PURE__ */ jsx20(
3974
4049
  "button",
3975
4050
  {
3976
4051
  type: "button",
@@ -3979,7 +4054,7 @@ var MinimalVendorForm = ({
3979
4054
  children: "Annuler"
3980
4055
  }
3981
4056
  ),
3982
- /* @__PURE__ */ jsx18(
4057
+ /* @__PURE__ */ jsx20(
3983
4058
  Buttons_default2,
3984
4059
  {
3985
4060
  type: "button",
@@ -3995,43 +4070,43 @@ var MinimalVendorForm = ({
3995
4070
  };
3996
4071
 
3997
4072
  // src/services/DepartmentServices.ts
3998
- var URI = `${API_URL}/core/departments/`;
4073
+ var URI3 = `${API_URL}/core/departments/`;
3999
4074
  var DepartmentServices = {
4000
- create: (data) => FetchApi.post(`${URI}`, data),
4001
- get: (id) => FetchApi.get(`${URI}${id}/`),
4002
- list: (params) => FetchApi.get(`${URI}?${new URLSearchParams(params).toString()}`),
4003
- update: (id, data) => FetchApi.put(`${URI}${id}/`, data),
4004
- delete: (id) => FetchApi.delete(`${URI}${id}/`)
4075
+ create: (data) => FetchApi.post(`${URI3}`, data),
4076
+ get: (id) => FetchApi.get(`${URI3}${id}/`),
4077
+ list: (params) => FetchApi.get(`${URI3}?${new URLSearchParams(params).toString()}`),
4078
+ update: (id, data) => FetchApi.put(`${URI3}${id}/`, data),
4079
+ delete: (id) => FetchApi.delete(`${URI3}${id}/`)
4005
4080
  };
4006
4081
 
4007
4082
  // src/services/ProfitCostsServices.ts
4008
- var URI2 = `${API_URL}/accounting/profit-or-cost-center/`;
4009
- var COST_URI = `${API_URL}/accounting/cost-center/`;
4083
+ var URI4 = `${API_URL}/accounting/profit-or-cost-center/`;
4084
+ var COST_URI2 = `${API_URL}/accounting/cost-center/`;
4010
4085
  var CostServices = {
4011
- create: (data) => FetchApi.post(`${COST_URI}`, data),
4012
- get: (id) => FetchApi.get(`${COST_URI}${id}/`),
4013
- list: (params) => FetchApi.get(`${COST_URI}?${new URLSearchParams(params).toString()}`),
4014
- update: (id, data) => FetchApi.put(`${COST_URI}${id}/`, data),
4015
- delete: (id) => FetchApi.delete(`${COST_URI}${id}/`)
4086
+ create: (data) => FetchApi.post(`${COST_URI2}`, data),
4087
+ get: (id) => FetchApi.get(`${COST_URI2}${id}/`),
4088
+ list: (params) => FetchApi.get(`${COST_URI2}?${new URLSearchParams(params).toString()}`),
4089
+ update: (id, data) => FetchApi.put(`${COST_URI2}${id}/`, data),
4090
+ delete: (id) => FetchApi.delete(`${COST_URI2}${id}/`)
4016
4091
  };
4017
- var PROFIT_URI = `${API_URL}/accounting/profit-center/`;
4092
+ var PROFIT_URI2 = `${API_URL}/accounting/profit-center/`;
4018
4093
 
4019
4094
  // src/components/common/CommonSelect.tsx
4020
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
4095
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
4021
4096
  var SelectVendor = ({
4022
4097
  value,
4023
4098
  onSelect
4024
4099
  }) => {
4025
- const [showModal, setShowModal] = useState14(false);
4026
- const [selectedVendor, setSelectedVendor] = useState14(null);
4100
+ const [showModal, setShowModal] = useState16(false);
4101
+ const [selectedVendor, setSelectedVendor] = useState16(null);
4027
4102
  const { token, activeBusinessEntity } = useSession();
4028
- const [vendors, setVendors] = useState14(() => {
4103
+ const [vendors, setVendors] = useState16(() => {
4029
4104
  const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4030
4105
  const cached = sessionStorage.getItem(cacheKey);
4031
4106
  return cached ? JSON.parse(cached) : [];
4032
4107
  });
4033
- const [loadingVendors, setLoadingVendors] = useState14(false);
4034
- useEffect11(() => {
4108
+ const [loadingVendors, setLoadingVendors] = useState16(false);
4109
+ useEffect12(() => {
4035
4110
  const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4036
4111
  const cached = sessionStorage.getItem(cacheKey);
4037
4112
  if (!cached) {
@@ -4043,7 +4118,8 @@ var SelectVendor = ({
4043
4118
  const getVendorOptions = () => {
4044
4119
  return vendors.filter((vendor) => vendor.id !== void 0).map((vendor) => ({
4045
4120
  value: vendor.id,
4046
- label: `${vendor.legal_name} [${vendor.trading_name}]`
4121
+ label: `${vendor.legal_name} [${vendor.trading_name}]`,
4122
+ object: vendor
4047
4123
  }));
4048
4124
  };
4049
4125
  const loadVendors = async () => {
@@ -4068,9 +4144,9 @@ var SelectVendor = ({
4068
4144
  sessionStorage.removeItem(cacheKey);
4069
4145
  loadVendors();
4070
4146
  };
4071
- return /* @__PURE__ */ jsxs15("div", { children: [
4072
- /* @__PURE__ */ jsx19("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
4073
- /* @__PURE__ */ jsx19(
4147
+ return /* @__PURE__ */ jsxs17("div", { children: [
4148
+ /* @__PURE__ */ jsx21("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx21("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
4149
+ /* @__PURE__ */ jsx21(
4074
4150
  SearchableSelect,
4075
4151
  {
4076
4152
  value,
@@ -4086,8 +4162,8 @@ var SelectVendor = ({
4086
4162
  },
4087
4163
  "fourni" + value
4088
4164
  ),
4089
- loadingVendors && /* @__PURE__ */ jsx19("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
4090
- showModal && /* @__PURE__ */ jsx19(
4165
+ loadingVendors && /* @__PURE__ */ jsx21("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
4166
+ showModal && /* @__PURE__ */ jsx21(
4091
4167
  MinimalVendorForm,
4092
4168
  {
4093
4169
  object: selectedVendor,
@@ -4104,13 +4180,13 @@ var SelectUser = ({
4104
4180
  onSelect
4105
4181
  }) => {
4106
4182
  const { token, activeBusinessEntity } = useSession();
4107
- const [users, setUsers] = useState14(() => {
4183
+ const [users, setUsers] = useState16(() => {
4108
4184
  const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4109
4185
  const cached = sessionStorage.getItem(cacheKey);
4110
4186
  return cached ? JSON.parse(cached) : [];
4111
4187
  });
4112
- const [loading, setLoading] = useState14(false);
4113
- useEffect11(() => {
4188
+ const [loading, setLoading] = useState16(false);
4189
+ useEffect12(() => {
4114
4190
  const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4115
4191
  const cached = sessionStorage.getItem(cacheKey);
4116
4192
  if (!cached) {
@@ -4146,19 +4222,19 @@ var SelectUser = ({
4146
4222
  return users.map((user) => ({
4147
4223
  value: user.id,
4148
4224
  label: `${user.first_name} ${user.last_name}`,
4149
- content: /* @__PURE__ */ jsx19("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ jsxs15("div", { className: "flex-1", children: [
4150
- /* @__PURE__ */ jsxs15("div", { className: "font-medium text-gray-900", children: [
4225
+ content: /* @__PURE__ */ jsx21("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ jsxs17("div", { className: "flex-1", children: [
4226
+ /* @__PURE__ */ jsxs17("div", { className: "font-medium text-gray-900", children: [
4151
4227
  user.first_name,
4152
4228
  " ",
4153
4229
  user.last_name
4154
4230
  ] }),
4155
- /* @__PURE__ */ jsx19("div", { className: "text-sm text-gray-500", children: user.email })
4231
+ /* @__PURE__ */ jsx21("div", { className: "text-sm text-gray-500", children: user.email })
4156
4232
  ] }) })
4157
4233
  }));
4158
4234
  };
4159
- return /* @__PURE__ */ jsxs15("div", { children: [
4160
- /* @__PURE__ */ jsx19("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
4161
- /* @__PURE__ */ jsx19(
4235
+ return /* @__PURE__ */ jsxs17("div", { children: [
4236
+ /* @__PURE__ */ jsx21("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx21("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
4237
+ /* @__PURE__ */ jsx21(
4162
4238
  SearchableSelect,
4163
4239
  {
4164
4240
  value,
@@ -4171,7 +4247,7 @@ var SelectUser = ({
4171
4247
  },
4172
4248
  "user" + value
4173
4249
  ),
4174
- loading && /* @__PURE__ */ jsx19("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4250
+ loading && /* @__PURE__ */ jsx21("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4175
4251
  ] });
4176
4252
  };
4177
4253
  var SelectDepartment = ({
@@ -4179,13 +4255,13 @@ var SelectDepartment = ({
4179
4255
  onSelect
4180
4256
  }) => {
4181
4257
  const { token, activeBusinessEntity } = useSession();
4182
- const [departments, setDepartments] = useState14(() => {
4258
+ const [departments, setDepartments] = useState16(() => {
4183
4259
  const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4184
4260
  const cached = sessionStorage.getItem(cacheKey);
4185
4261
  return cached ? JSON.parse(cached) : [];
4186
4262
  });
4187
- const [loading, setLoading] = useState14(false);
4188
- useEffect11(() => {
4263
+ const [loading, setLoading] = useState16(false);
4264
+ useEffect12(() => {
4189
4265
  const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4190
4266
  const cached = sessionStorage.getItem(cacheKey);
4191
4267
  if (!cached) {
@@ -4221,9 +4297,9 @@ var SelectDepartment = ({
4221
4297
  label: dept.name
4222
4298
  }));
4223
4299
  };
4224
- return /* @__PURE__ */ jsxs15("div", { children: [
4225
- /* @__PURE__ */ jsx19("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
4226
- /* @__PURE__ */ jsx19(
4300
+ return /* @__PURE__ */ jsxs17("div", { children: [
4301
+ /* @__PURE__ */ jsx21("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx21("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
4302
+ /* @__PURE__ */ jsx21(
4227
4303
  SearchableSelect,
4228
4304
  {
4229
4305
  value,
@@ -4236,7 +4312,7 @@ var SelectDepartment = ({
4236
4312
  },
4237
4313
  "dept" + value
4238
4314
  ),
4239
- loading && /* @__PURE__ */ jsx19("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4315
+ loading && /* @__PURE__ */ jsx21("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4240
4316
  ] });
4241
4317
  };
4242
4318
  var SelectCostCenter = ({
@@ -4244,13 +4320,13 @@ var SelectCostCenter = ({
4244
4320
  onSelect
4245
4321
  }) => {
4246
4322
  const { token, activeBusinessEntity } = useSession();
4247
- const [costCenters, setCostCenters] = useState14(() => {
4323
+ const [costCenters, setCostCenters] = useState16(() => {
4248
4324
  const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4249
4325
  const cached = sessionStorage.getItem(cacheKey);
4250
4326
  return cached ? JSON.parse(cached) : [];
4251
4327
  });
4252
- const [loading, setLoading] = useState14(false);
4253
- useEffect11(() => {
4328
+ const [loading, setLoading] = useState16(false);
4329
+ useEffect12(() => {
4254
4330
  const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4255
4331
  const cached = sessionStorage.getItem(cacheKey);
4256
4332
  if (!cached) {
@@ -4284,18 +4360,18 @@ var SelectCostCenter = ({
4284
4360
  return costCenters.map((center) => ({
4285
4361
  value: center.id,
4286
4362
  label: `${center.code ? `[${center.code}] ` : ""}${center.name}`,
4287
- content: /* @__PURE__ */ jsx19("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ jsxs15("div", { className: "flex-1", children: [
4288
- /* @__PURE__ */ jsx19("div", { className: "font-medium text-gray-900", children: center.name }),
4289
- center.code && /* @__PURE__ */ jsxs15("div", { className: "text-sm text-gray-500", children: [
4363
+ content: /* @__PURE__ */ jsx21("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ jsxs17("div", { className: "flex-1", children: [
4364
+ /* @__PURE__ */ jsx21("div", { className: "font-medium text-gray-900", children: center.name }),
4365
+ center.code && /* @__PURE__ */ jsxs17("div", { className: "text-sm text-gray-500", children: [
4290
4366
  "Code: ",
4291
4367
  center.code
4292
4368
  ] })
4293
4369
  ] }) })
4294
4370
  }));
4295
4371
  };
4296
- return /* @__PURE__ */ jsxs15("div", { children: [
4297
- /* @__PURE__ */ jsx19("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx19("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
4298
- /* @__PURE__ */ jsx19(
4372
+ return /* @__PURE__ */ jsxs17("div", { children: [
4373
+ /* @__PURE__ */ jsx21("div", { className: "flex justify-between ", children: /* @__PURE__ */ jsx21("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
4374
+ /* @__PURE__ */ jsx21(
4299
4375
  SearchableSelect,
4300
4376
  {
4301
4377
  value,
@@ -4308,9 +4384,426 @@ var SelectCostCenter = ({
4308
4384
  },
4309
4385
  "cost" + value
4310
4386
  ),
4311
- loading && /* @__PURE__ */ jsx19("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4387
+ loading && /* @__PURE__ */ jsx21("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4312
4388
  ] });
4313
4389
  };
4390
+
4391
+ // src/components/common/Choices.tsx
4392
+ import { jsx as jsx23 } from "react/jsx-runtime";
4393
+ var CHOICES = {
4394
+ INVOICE_TYPES: [
4395
+ { value: "sale", label: { fr: "Vente", en: "Sale", default: "Sale" } },
4396
+ { value: "purchase", label: { fr: "Bordereau d'achat", en: "Purchase slip", default: "Purchase" } }
4397
+ ],
4398
+ PAYMENT_METHODS: [
4399
+ { value: "cash", label: { fr: "Esp\xE8ce", en: "Cash", default: "Cash" } },
4400
+ { value: "card", label: { fr: "Carte bancaire", en: "Card", default: "Card" } },
4401
+ { value: "check", label: { fr: "Ch\xE8que", en: "Check", default: "Check" } },
4402
+ { value: "mobile-money", label: { fr: "Mobile money", en: "Mobile money", default: "Mobile money" } },
4403
+ { value: "transfer", label: { fr: "Virement bancaire", en: "Bank transfer", default: "Transfer" } },
4404
+ { value: "deferred", label: { fr: "\xC0 terme", en: "Deferred", default: "Deferred" } }
4405
+ ],
4406
+ TEMPLATES: [
4407
+ { value: "B2B", label: { fr: "Client entreprise (B2B)", en: "Business client (B2B)", default: "B2B" } },
4408
+ { value: "B2F", label: { fr: "Client international (B2F)", en: "International client (B2F)", default: "B2F" } },
4409
+ { value: "B2G", label: { fr: "Institution gouvernementale (B2G)", en: "Government institution (B2G)", default: "B2G" } },
4410
+ { value: "B2C", label: { fr: "Particulier (B2C)", en: "Individual (B2C)", default: "B2C" } }
4411
+ ],
4412
+ FOREIGN_CURRENCIES: [
4413
+ { value: "XOF", label: { fr: "Franc CFA", en: "CFA Franc", default: "XOF" } },
4414
+ { value: "USD", label: { fr: "Dollar am\xE9ricain", en: "US Dollar", default: "USD" } },
4415
+ { value: "EUR", label: { fr: "Euro", en: "Euro", default: "EUR" } },
4416
+ { value: "JPY", label: { fr: "Yen japonais", en: "Japanese Yen", default: "JPY" } },
4417
+ { value: "CAD", label: { fr: "Dollar canadien", en: "Canadian Dollar", default: "CAD" } },
4418
+ { value: "GBP", label: { fr: "Livre sterling", en: "British Pound", default: "GBP" } },
4419
+ { value: "AUD", label: { fr: "Dollar australien", en: "Australian Dollar", default: "AUD" } },
4420
+ { value: "CNH", label: { fr: "Yuan chinois", en: "Chinese Yuan", default: "CNH" } },
4421
+ { value: "CHF", label: { fr: "Franc suisse", en: "Swiss Franc", default: "CHF" } },
4422
+ { value: "HKD", label: { fr: "Dollar de Hong Kong", en: "Hong Kong Dollar", default: "HKD" } },
4423
+ { value: "NZD", label: { fr: "Dollar n\xE9o-z\xE9landais", en: "New Zealand Dollar", default: "NZD" } }
4424
+ ],
4425
+ TAXES: [
4426
+ { value: "TVA", label: { fr: "TVA 18 %", en: "VAT 18%", default: "VAT 18%" } },
4427
+ { value: "TVAB", label: { fr: "TVA r\xE9duite 9 %", en: "Reduced VAT 9%", default: "VAT 9%" } },
4428
+ { value: "TVAC", label: { fr: "TVA exon\xE9r\xE9e 0 %", en: "Exempt VAT 0%", default: "VAT 0%" } },
4429
+ { value: "TVAD", label: { fr: "TVA exon\xE9r\xE9e TEE/RME 0 %", en: "Exempt VAT TEE/RME 0%", default: "VAT 0%" } }
4430
+ ],
4431
+ LEGAL_FORMS: [
4432
+ { value: "EI", label: { fr: "Entreprise Individuelle (EI)", en: "Sole Proprietorship (EI)", default: "Sole Proprietorship (EI)" } },
4433
+ { value: "SARL", label: { fr: "Soci\xE9t\xE9 \xE0 Responsabilit\xE9 Limit\xE9e (SARL)", en: "Limited Liability Company (LLC)", default: "LLC (SARL)" } },
4434
+ { value: "SUARL", label: { fr: "Soci\xE9t\xE9 Unipersonnelle \xE0 Responsabilit\xE9 Limit\xE9e (SUARL)", en: "Single-Member LLC (SUARL)", default: "Single-Member LLC (SUARL)" } },
4435
+ { value: "SA", label: { fr: "Soci\xE9t\xE9 Anonyme (SA)", en: "Corporation (SA)", default: "Corporation (SA)" } },
4436
+ { value: "SNC", label: { fr: "Soci\xE9t\xE9 en Nom Collectif (SNC)", en: "General Partnership (SNC)", default: "General Partnership (SNC)" } },
4437
+ { value: "SCS", label: { fr: "Soci\xE9t\xE9 en Commandite Simple (SCS)", en: "Limited Partnership (SCS)", default: "Limited Partnership (SCS)" } },
4438
+ { value: "GIE", label: { fr: "Groupement d'Int\xE9r\xEAt \xC9conomique (GIE)", en: "Economic Interest Grouping (GIE)", default: "Economic Interest Grouping (GIE)" } },
4439
+ { value: "COOP", label: { fr: "Soci\xE9t\xE9 Coop\xE9rative", en: "Cooperative Society", default: "Cooperative Society" } },
4440
+ { value: "SC", label: { fr: "Soci\xE9t\xE9 Civile (SC)", en: "Civil Company (SC)", default: "Civil Company (SC)" } }
4441
+ ],
4442
+ COUNTRIES: [
4443
+ { value: "AFG", label: { fr: "Afghanistan", en: "Afghanistan", default: "Afghanistan" } },
4444
+ { value: "ALB", label: { fr: "Albanie", en: "Albania", default: "Albania" } },
4445
+ { value: "DZA", label: { fr: "Alg\xE9rie", en: "Algeria", default: "Algeria" } },
4446
+ { value: "AND", label: { fr: "Andorre", en: "Andorra", default: "Andorra" } },
4447
+ { value: "AGO", label: { fr: "Angola", en: "Angola", default: "Angola" } },
4448
+ { value: "ATG", label: { fr: "Antigua-et-Barbuda", en: "Antigua and Barbuda", default: "Antigua and Barbuda" } },
4449
+ { value: "ARG", label: { fr: "Argentine", en: "Argentina", default: "Argentina" } },
4450
+ { value: "ARM", label: { fr: "Arm\xE9nie", en: "Armenia", default: "Armenia" } },
4451
+ { value: "AUS", label: { fr: "Australie", en: "Australia", default: "Australia" } },
4452
+ { value: "AUT", label: { fr: "Autriche", en: "Austria", default: "Austria" } },
4453
+ { value: "AZE", label: { fr: "Azerba\xEFdjan", en: "Azerbaijan", default: "Azerbaijan" } },
4454
+ { value: "BHS", label: { fr: "Bahamas", en: "Bahamas", default: "Bahamas" } },
4455
+ { value: "BHR", label: { fr: "Bahre\xEFn", en: "Bahrain", default: "Bahrain" } },
4456
+ { value: "BGD", label: { fr: "Bangladesh", en: "Bangladesh", default: "Bangladesh" } },
4457
+ { value: "BRB", label: { fr: "Barbade", en: "Barbados", default: "Barbados" } },
4458
+ { value: "BLR", label: { fr: "Bi\xE9lorussie", en: "Belarus", default: "Belarus" } },
4459
+ { value: "BEL", label: { fr: "Belgique", en: "Belgium", default: "Belgium" } },
4460
+ { value: "BLZ", label: { fr: "Belize", en: "Belize", default: "Belize" } },
4461
+ { value: "BEN", label: { fr: "B\xE9nin", en: "Benin", default: "Benin" } },
4462
+ { value: "BTN", label: { fr: "Bhoutan", en: "Bhutan", default: "Bhutan" } },
4463
+ { value: "BOL", label: { fr: "Bolivie", en: "Bolivia", default: "Bolivia" } },
4464
+ { value: "BIH", label: { fr: "Bosnie-Herz\xE9govine", en: "Bosnia and Herzegovina", default: "Bosnia and Herzegovina" } },
4465
+ { value: "BWA", label: { fr: "Botswana", en: "Botswana", default: "Botswana" } },
4466
+ { value: "BRA", label: { fr: "Br\xE9sil", en: "Brazil", default: "Brazil" } },
4467
+ { value: "BRN", label: { fr: "Brunei", en: "Brunei", default: "Brunei" } },
4468
+ { value: "BGR", label: { fr: "Bulgarie", en: "Bulgaria", default: "Bulgaria" } },
4469
+ { value: "BFA", label: { fr: "Burkina Faso", en: "Burkina Faso", default: "Burkina Faso" } },
4470
+ { value: "BDI", label: { fr: "Burundi", en: "Burundi", default: "Burundi" } },
4471
+ { value: "CPV", label: { fr: "Cap-Vert", en: "Cabo Verde", default: "Cabo Verde" } },
4472
+ { value: "KHM", label: { fr: "Cambodge", en: "Cambodia", default: "Cambodia" } },
4473
+ { value: "CMR", label: { fr: "Cameroun", en: "Cameroon", default: "Cameroon" } },
4474
+ { value: "CAN", label: { fr: "Canada", en: "Canada", default: "Canada" } },
4475
+ { value: "CAF", label: { fr: "R\xE9publique centrafricaine", en: "Central African Republic", default: "Central African Republic" } },
4476
+ { value: "TCD", label: { fr: "Tchad", en: "Chad", default: "Chad" } },
4477
+ { value: "CHL", label: { fr: "Chili", en: "Chile", default: "Chile" } },
4478
+ { value: "CHN", label: { fr: "Chine", en: "China", default: "China" } },
4479
+ { value: "COL", label: { fr: "Colombie", en: "Colombia", default: "Colombia" } },
4480
+ { value: "COM", label: { fr: "Comores", en: "Comoros", default: "Comoros" } },
4481
+ { value: "COG", label: { fr: "Congo", en: "Congo", default: "Congo" } },
4482
+ { value: "CRI", label: { fr: "Costa Rica", en: "Costa Rica", default: "Costa Rica" } },
4483
+ { value: "CIV", label: { fr: "C\xF4te d'Ivoire", en: "Ivory Coast", default: "Ivory Coast" } },
4484
+ { value: "HRV", label: { fr: "Croatie", en: "Croatia", default: "Croatia" } },
4485
+ { value: "CUB", label: { fr: "Cuba", en: "Cuba", default: "Cuba" } },
4486
+ { value: "CYP", label: { fr: "Chypre", en: "Cyprus", default: "Cyprus" } },
4487
+ { value: "CZE", label: { fr: "Tch\xE9quie", en: "Czechia", default: "Czechia" } },
4488
+ { value: "DNK", label: { fr: "Danemark", en: "Denmark", default: "Denmark" } },
4489
+ { value: "DJI", label: { fr: "Djibouti", en: "Djibouti", default: "Djibouti" } },
4490
+ { value: "DMA", label: { fr: "Dominique", en: "Dominica", default: "Dominica" } },
4491
+ { value: "DOM", label: { fr: "R\xE9publique dominicaine", en: "Dominican Republic", default: "Dominican Republic" } },
4492
+ { value: "ECU", label: { fr: "\xC9quateur", en: "Ecuador", default: "Ecuador" } },
4493
+ { value: "EGY", label: { fr: "\xC9gypte", en: "Egypt", default: "Egypt" } },
4494
+ { value: "SLV", label: { fr: "Salvador", en: "El Salvador", default: "El Salvador" } },
4495
+ { value: "GNQ", label: { fr: "Guin\xE9e \xE9quatoriale", en: "Equatorial Guinea", default: "Equatorial Guinea" } },
4496
+ { value: "ERI", label: { fr: "\xC9rythr\xE9e", en: "Eritrea", default: "Eritrea" } },
4497
+ { value: "EST", label: { fr: "Estonie", en: "Estonia", default: "Estonia" } },
4498
+ { value: "SWZ", label: { fr: "Eswatini", en: "Eswatini", default: "Eswatini" } },
4499
+ { value: "ETH", label: { fr: "\xC9thiopie", en: "Ethiopia", default: "Ethiopia" } },
4500
+ { value: "FJI", label: { fr: "Fidji", en: "Fiji", default: "Fiji" } },
4501
+ { value: "FIN", label: { fr: "Finlande", en: "Finland", default: "Finland" } },
4502
+ { value: "FRA", label: { fr: "France", en: "France", default: "France" } },
4503
+ { value: "GAB", label: { fr: "Gabon", en: "Gabon", default: "Gabon" } },
4504
+ { value: "GMB", label: { fr: "Gambie", en: "Gambia", default: "Gambia" } },
4505
+ { value: "GEO", label: { fr: "G\xE9orgie", en: "Georgia", default: "Georgia" } },
4506
+ { value: "DEU", label: { fr: "Allemagne", en: "Germany", default: "Germany" } },
4507
+ { value: "GHA", label: { fr: "Ghana", en: "Ghana", default: "Ghana" } },
4508
+ { value: "GRC", label: { fr: "Gr\xE8ce", en: "Greece", default: "Greece" } },
4509
+ { value: "GRD", label: { fr: "Grenade", en: "Grenada", default: "Grenada" } },
4510
+ { value: "GTM", label: { fr: "Guatemala", en: "Guatemala", default: "Guatemala" } },
4511
+ { value: "GIN", label: { fr: "Guin\xE9e", en: "Guinea", default: "Guinea" } },
4512
+ { value: "GNB", label: { fr: "Guin\xE9e-Bissau", en: "Guinea-Bissau", default: "Guinea-Bissau" } },
4513
+ { value: "GUY", label: { fr: "Guyana", en: "Guyana", default: "Guyana" } },
4514
+ { value: "HTI", label: { fr: "Ha\xEFti", en: "Haiti", default: "Haiti" } },
4515
+ { value: "HND", label: { fr: "Honduras", en: "Honduras", default: "Honduras" } },
4516
+ { value: "HUN", label: { fr: "Hongrie", en: "Hungary", default: "Hungary" } },
4517
+ { value: "ISL", label: { fr: "Islande", en: "Iceland", default: "Iceland" } },
4518
+ { value: "IND", label: { fr: "Inde", en: "India", default: "India" } },
4519
+ { value: "IDN", label: { fr: "Indon\xE9sie", en: "Indonesia", default: "Indonesia" } },
4520
+ { value: "IRN", label: { fr: "Iran", en: "Iran", default: "Iran" } },
4521
+ { value: "IRQ", label: { fr: "Irak", en: "Iraq", default: "Iraq" } },
4522
+ { value: "IRL", label: { fr: "Irlande", en: "Ireland", default: "Ireland" } },
4523
+ { value: "ISR", label: { fr: "Isra\xEBl", en: "Israel", default: "Israel" } },
4524
+ { value: "ITA", label: { fr: "Italie", en: "Italy", default: "Italy" } },
4525
+ { value: "JAM", label: { fr: "Jama\xEFque", en: "Jamaica", default: "Jamaica" } },
4526
+ { value: "JPN", label: { fr: "Japon", en: "Japan", default: "Japan" } },
4527
+ { value: "JOR", label: { fr: "Jordanie", en: "Jordan", default: "Jordan" } },
4528
+ { value: "KAZ", label: { fr: "Kazakhstan", en: "Kazakhstan", default: "Kazakhstan" } },
4529
+ { value: "KEN", label: { fr: "Kenya", en: "Kenya", default: "Kenya" } },
4530
+ { value: "KIR", label: { fr: "Kiribati", en: "Kiribati", default: "Kiribati" } },
4531
+ { value: "PRK", label: { fr: "Cor\xE9e du Nord", en: "North Korea", default: "North Korea" } },
4532
+ { value: "KOR", label: { fr: "Cor\xE9e du Sud", en: "South Korea", default: "South Korea" } },
4533
+ { value: "KWT", label: { fr: "Kowe\xEFt", en: "Kuwait", default: "Kuwait" } },
4534
+ { value: "KGZ", label: { fr: "Kirghizistan", en: "Kyrgyzstan", default: "Kyrgyzstan" } },
4535
+ { value: "LAO", label: { fr: "Laos", en: "Laos", default: "Laos" } },
4536
+ { value: "LVA", label: { fr: "Lettonie", en: "Latvia", default: "Latvia" } },
4537
+ { value: "LBN", label: { fr: "Liban", en: "Lebanon", default: "Lebanon" } },
4538
+ { value: "LSO", label: { fr: "Lesotho", en: "Lesotho", default: "Lesotho" } },
4539
+ { value: "LBR", label: { fr: "Lib\xE9ria", en: "Liberia", default: "Liberia" } },
4540
+ { value: "LBY", label: { fr: "Libye", en: "Libya", default: "Libya" } },
4541
+ { value: "LIE", label: { fr: "Liechtenstein", en: "Liechtenstein", default: "Liechtenstein" } },
4542
+ { value: "LTU", label: { fr: "Lituanie", en: "Lithuania", default: "Lithuania" } },
4543
+ { value: "LUX", label: { fr: "Luxembourg", en: "Luxembourg", default: "Luxembourg" } },
4544
+ { value: "MDG", label: { fr: "Madagascar", en: "Madagascar", default: "Madagascar" } },
4545
+ { value: "MWI", label: { fr: "Malawi", en: "Malawi", default: "Malawi" } },
4546
+ { value: "MYS", label: { fr: "Malaisie", en: "Malaysia", default: "Malaysia" } },
4547
+ { value: "MDV", label: { fr: "Maldives", en: "Maldives", default: "Maldives" } },
4548
+ { value: "MLI", label: { fr: "Mali", en: "Mali", default: "Mali" } },
4549
+ { value: "MLT", label: { fr: "Malte", en: "Malta", default: "Malta" } },
4550
+ { value: "MHL", label: { fr: "\xCEles Marshall", en: "Marshall Islands", default: "Marshall Islands" } },
4551
+ { value: "MRT", label: { fr: "Mauritanie", en: "Mauritania", default: "Mauritania" } },
4552
+ { value: "MUS", label: { fr: "Maurice", en: "Mauritius", default: "Mauritius" } },
4553
+ { value: "MEX", label: { fr: "Mexique", en: "Mexico", default: "Mexico" } },
4554
+ { value: "FSM", label: { fr: "\xC9tats f\xE9d\xE9r\xE9s de Micron\xE9sie", en: "Micronesia", default: "Micronesia" } },
4555
+ { value: "MDA", label: { fr: "Moldavie", en: "Moldova", default: "Moldova" } },
4556
+ { value: "MCO", label: { fr: "Monaco", en: "Monaco", default: "Monaco" } },
4557
+ { value: "MNG", label: { fr: "Mongolie", en: "Mongolia", default: "Mongolia" } },
4558
+ { value: "MNE", label: { fr: "Mont\xE9n\xE9gro", en: "Montenegro", default: "Montenegro" } },
4559
+ { value: "MAR", label: { fr: "Maroc", en: "Morocco", default: "Morocco" } },
4560
+ { value: "MOZ", label: { fr: "Mozambique", en: "Mozambique", default: "Mozambique" } },
4561
+ { value: "MMR", label: { fr: "Myanmar", en: "Myanmar", default: "Myanmar" } },
4562
+ { value: "NAM", label: { fr: "Namibie", en: "Namibia", default: "Namibia" } },
4563
+ { value: "NRU", label: { fr: "Nauru", en: "Nauru", default: "Nauru" } },
4564
+ { value: "NPL", label: { fr: "N\xE9pal", en: "Nepal", default: "Nepal" } },
4565
+ { value: "NLD", label: { fr: "Pays-Bas", en: "Netherlands", default: "Netherlands" } },
4566
+ { value: "NZL", label: { fr: "Nouvelle-Z\xE9lande", en: "New Zealand", default: "New Zealand" } },
4567
+ { value: "NIC", label: { fr: "Nicaragua", en: "Nicaragua", default: "Nicaragua" } },
4568
+ { value: "NER", label: { fr: "Niger", en: "Niger", default: "Niger" } },
4569
+ { value: "NGA", label: { fr: "Nig\xE9ria", en: "Nigeria", default: "Nigeria" } },
4570
+ { value: "MKD", label: { fr: "Mac\xE9doine du Nord", en: "North Macedonia", default: "North Macedonia" } },
4571
+ { value: "NOR", label: { fr: "Norv\xE8ge", en: "Norway", default: "Norway" } },
4572
+ { value: "OMN", label: { fr: "Oman", en: "Oman", default: "Oman" } },
4573
+ { value: "PAK", label: { fr: "Pakistan", en: "Pakistan", default: "Pakistan" } },
4574
+ { value: "PLW", label: { fr: "Palaos", en: "Palau", default: "Palau" } },
4575
+ { value: "PAN", label: { fr: "Panama", en: "Panama", default: "Panama" } },
4576
+ { value: "PNG", label: { fr: "Papouasie-Nouvelle-Guin\xE9e", en: "Papua New Guinea", default: "Papua New Guinea" } },
4577
+ { value: "PRY", label: { fr: "Paraguay", en: "Paraguay", default: "Paraguay" } },
4578
+ { value: "PER", label: { fr: "P\xE9rou", en: "Peru", default: "Peru" } },
4579
+ { value: "PHL", label: { fr: "Philippines", en: "Philippines", default: "Philippines" } },
4580
+ { value: "POL", label: { fr: "Pologne", en: "Poland", default: "Poland" } },
4581
+ { value: "PRT", label: { fr: "Portugal", en: "Portugal", default: "Portugal" } },
4582
+ { value: "QAT", label: { fr: "Qatar", en: "Qatar", default: "Qatar" } },
4583
+ { value: "ROU", label: { fr: "Roumanie", en: "Romania", default: "Romania" } },
4584
+ { value: "RUS", label: { fr: "Russie", en: "Russia", default: "Russia" } },
4585
+ { value: "RWA", label: { fr: "Rwanda", en: "Rwanda", default: "Rwanda" } },
4586
+ { value: "KNA", label: { fr: "Saint-Christophe-et-Ni\xE9v\xE8s", en: "Saint Kitts and Nevis", default: "Saint Kitts and Nevis" } },
4587
+ { value: "LCA", label: { fr: "Sainte-Lucie", en: "Saint Lucia", default: "Saint Lucia" } },
4588
+ { value: "VCT", label: { fr: "Saint-Vincent-et-les-Grenadines", en: "Saint Vincent and the Grenadines", default: "Saint Vincent and the Grenadines" } },
4589
+ { value: "WSM", label: { fr: "Samoa", en: "Samoa", default: "Samoa" } },
4590
+ { value: "SMR", label: { fr: "Saint-Marin", en: "San Marino", default: "San Marino" } },
4591
+ { value: "STP", label: { fr: "Sao Tom\xE9-et-Principe", en: "Sao Tome and Principe", default: "Sao Tome and Principe" } },
4592
+ { value: "SAU", label: { fr: "Arabie saoudite", en: "Saudi Arabia", default: "Saudi Arabia" } },
4593
+ { value: "SEN", label: { fr: "S\xE9n\xE9gal", en: "Senegal", default: "Senegal" } },
4594
+ { value: "SRB", label: { fr: "Serbie", en: "Serbia", default: "Serbia" } },
4595
+ { value: "SYC", label: { fr: "Seychelles", en: "Seychelles", default: "Seychelles" } },
4596
+ { value: "SLE", label: { fr: "Sierra Leone", en: "Sierra Leone", default: "Sierra Leone" } },
4597
+ { value: "SGP", label: { fr: "Singapour", en: "Singapore", default: "Singapore" } },
4598
+ { value: "SVK", label: { fr: "Slovaquie", en: "Slovakia", default: "Slovakia" } },
4599
+ { value: "SVN", label: { fr: "Slov\xE9nie", en: "Slovenia", default: "Slovenia" } },
4600
+ { value: "SLB", label: { fr: "\xCEles Salomon", en: "Solomon Islands", default: "Solomon Islands" } },
4601
+ { value: "SOM", label: { fr: "Somalie", en: "Somalia", default: "Somalia" } },
4602
+ { value: "ZAF", label: { fr: "Afrique du Sud", en: "South Africa", default: "South Africa" } },
4603
+ { value: "SSD", label: { fr: "Soudan du Sud", en: "South Sudan", default: "South Sudan" } },
4604
+ { value: "ESP", label: { fr: "Espagne", en: "Spain", default: "Spain" } },
4605
+ { value: "LKA", label: { fr: "Sri Lanka", en: "Sri Lanka", default: "Sri Lanka" } },
4606
+ { value: "SDN", label: { fr: "Soudan", en: "Sudan", default: "Sudan" } },
4607
+ { value: "SUR", label: { fr: "Suriname", en: "Suriname", default: "Suriname" } },
4608
+ { value: "SWE", label: { fr: "Su\xE8de", en: "Sweden", default: "Sweden" } },
4609
+ { value: "CHE", label: { fr: "Suisse", en: "Switzerland", default: "Switzerland" } },
4610
+ { value: "SYR", label: { fr: "Syrie", en: "Syria", default: "Syria" } },
4611
+ { value: "TWN", label: { fr: "Ta\xEFwan", en: "Taiwan", default: "Taiwan" } },
4612
+ { value: "TJK", label: { fr: "Tadjikistan", en: "Tajikistan", default: "Tajikistan" } },
4613
+ { value: "TZA", label: { fr: "Tanzanie", en: "Tanzania", default: "Tanzania" } },
4614
+ { value: "THA", label: { fr: "Tha\xEFlande", en: "Thailand", default: "Thailand" } },
4615
+ { value: "TLS", label: { fr: "Timor oriental", en: "Timor-Leste", default: "Timor-Leste" } },
4616
+ { value: "TGO", label: { fr: "Togo", en: "Togo", default: "Togo" } },
4617
+ { value: "TON", label: { fr: "Tonga", en: "Tonga", default: "Tonga" } },
4618
+ { value: "TTO", label: { fr: "Trinit\xE9-et-Tobago", en: "Trinidad and Tobago", default: "Trinidad and Tobago" } },
4619
+ { value: "TUN", label: { fr: "Tunisie", en: "Tunisia", default: "Tunisia" } },
4620
+ { value: "TUR", label: { fr: "Turquie", en: "Turkey", default: "Turkey" } },
4621
+ { value: "TKM", label: { fr: "Turkm\xE9nistan", en: "Turkmenistan", default: "Turkmenistan" } },
4622
+ { value: "TUV", label: { fr: "Tuvalu", en: "Tuvalu", default: "Tuvalu" } },
4623
+ { value: "UGA", label: { fr: "Ouganda", en: "Uganda", default: "Uganda" } },
4624
+ { value: "UKR", label: { fr: "Ukraine", en: "Ukraine", default: "Ukraine" } },
4625
+ { value: "ARE", label: { fr: "\xC9mirats arabes unis", en: "United Arab Emirates", default: "United Arab Emirates" } },
4626
+ { value: "GBR", label: { fr: "Royaume-Uni", en: "United Kingdom", default: "United Kingdom" } },
4627
+ { value: "USA", label: { fr: "\xC9tats-Unis", en: "United States", default: "United States" } },
4628
+ { value: "URY", label: { fr: "Uruguay", en: "Uruguay", default: "Uruguay" } },
4629
+ { value: "UZB", label: { fr: "Ouzb\xE9kistan", en: "Uzbekistan", default: "Uzbekistan" } },
4630
+ { value: "VUT", label: { fr: "Vanuatu", en: "Vanuatu", default: "Vanuatu" } },
4631
+ { value: "VAT", label: { fr: "Vatican", en: "Vatican City", default: "Vatican City" } },
4632
+ { value: "VEN", label: { fr: "Venezuela", en: "Venezuela", default: "Venezuela" } },
4633
+ { value: "VNM", label: { fr: "Vietnam", en: "Vietnam", default: "Vietnam" } },
4634
+ { value: "YEM", label: { fr: "Y\xE9men", en: "Yemen", default: "Yemen" } },
4635
+ { value: "ZMB", label: { fr: "Zambie", en: "Zambia", default: "Zambia" } },
4636
+ { value: "ZWE", label: { fr: "Zimbabwe", en: "Zimbabwe", default: "Zimbabwe" } }
4637
+ ]
4638
+ };
4639
+ var Choices_default = CHOICES;
4640
+ var InvoiceTypeSelector = ({
4641
+ value,
4642
+ onSelect,
4643
+ disabled = false,
4644
+ language = "default"
4645
+ }) => {
4646
+ const options = CHOICES.INVOICE_TYPES.map((item) => ({
4647
+ value: item.value,
4648
+ label: item.label[language]
4649
+ }));
4650
+ return /* @__PURE__ */ jsx23(
4651
+ SearchableSelect,
4652
+ {
4653
+ value,
4654
+ options,
4655
+ placeholder: "S\xE9lectionner un type...",
4656
+ searchPlaceholder: "Rechercher...",
4657
+ onSelect,
4658
+ disabled
4659
+ },
4660
+ `invoice-type-${value}`
4661
+ );
4662
+ };
4663
+ var PaymentMethodSelector = ({
4664
+ value,
4665
+ onSelect,
4666
+ disabled = false,
4667
+ language = "default"
4668
+ }) => {
4669
+ const options = CHOICES.PAYMENT_METHODS.map((item) => ({
4670
+ value: item.value,
4671
+ label: item.label[language]
4672
+ }));
4673
+ return /* @__PURE__ */ jsx23(
4674
+ SearchableSelect,
4675
+ {
4676
+ value,
4677
+ options,
4678
+ placeholder: "S\xE9lectionner un mode de paiement...",
4679
+ searchPlaceholder: "Rechercher...",
4680
+ onSelect,
4681
+ disabled
4682
+ },
4683
+ `payment-method-${value}`
4684
+ );
4685
+ };
4686
+ var TemplateFNESelector = ({
4687
+ value,
4688
+ onSelect,
4689
+ disabled = false,
4690
+ language = "default"
4691
+ }) => {
4692
+ const options = CHOICES.TEMPLATES.map((item) => ({
4693
+ value: item.value,
4694
+ label: item.label[language]
4695
+ }));
4696
+ return /* @__PURE__ */ jsx23(
4697
+ SearchableSelect,
4698
+ {
4699
+ value,
4700
+ options,
4701
+ placeholder: "S\xE9lectionner un template...",
4702
+ searchPlaceholder: "Rechercher...",
4703
+ onSelect,
4704
+ disabled
4705
+ },
4706
+ `template-${value}`
4707
+ );
4708
+ };
4709
+ var ForeignCurrencySelector = ({
4710
+ value,
4711
+ onSelect,
4712
+ disabled = false,
4713
+ language = "default"
4714
+ }) => {
4715
+ const options = CHOICES.FOREIGN_CURRENCIES.map((item) => ({
4716
+ value: item.value,
4717
+ label: item.label[language]
4718
+ }));
4719
+ return /* @__PURE__ */ jsx23(
4720
+ SearchableSelect,
4721
+ {
4722
+ value,
4723
+ options,
4724
+ placeholder: "S\xE9lectionner une devise...",
4725
+ searchPlaceholder: "Rechercher...",
4726
+ onSelect,
4727
+ disabled
4728
+ },
4729
+ `currency-${value}`
4730
+ );
4731
+ };
4732
+ var TaxSelector = ({
4733
+ value,
4734
+ onSelect,
4735
+ disabled = false,
4736
+ language = "default",
4737
+ handleChange
4738
+ }) => {
4739
+ const options = CHOICES.TAXES.map((item) => ({
4740
+ value: item.value,
4741
+ label: item.label[language]
4742
+ }));
4743
+ return /* @__PURE__ */ jsx23(
4744
+ SearchableSelect,
4745
+ {
4746
+ value,
4747
+ options,
4748
+ placeholder: "S\xE9lectionner une taxe...",
4749
+ searchPlaceholder: "Rechercher...",
4750
+ onSelect: (option) => {
4751
+ if (handleChange) {
4752
+ handleChange(option.value);
4753
+ }
4754
+ onSelect(option);
4755
+ },
4756
+ disabled
4757
+ },
4758
+ `tax-${value}`
4759
+ );
4760
+ };
4761
+ var LegalFormSelector = ({
4762
+ value,
4763
+ onSelect,
4764
+ disabled = false,
4765
+ language = "default"
4766
+ }) => {
4767
+ const options = CHOICES.LEGAL_FORMS.map((item) => ({
4768
+ value: item.value,
4769
+ label: item.label[language] ?? item.label.default
4770
+ }));
4771
+ return /* @__PURE__ */ jsx23(
4772
+ SearchableSelect,
4773
+ {
4774
+ value,
4775
+ options,
4776
+ placeholder: "S\xE9lectionner une forme juridique...",
4777
+ searchPlaceholder: "Rechercher...",
4778
+ onSelect,
4779
+ disabled
4780
+ },
4781
+ `legal-form-${value}`
4782
+ );
4783
+ };
4784
+ var CountrySelector = ({
4785
+ value,
4786
+ onSelect,
4787
+ disabled = false,
4788
+ language = "default"
4789
+ }) => {
4790
+ const options = CHOICES.COUNTRIES.map((item) => ({
4791
+ value: item.value,
4792
+ label: item.label[language]
4793
+ }));
4794
+ return /* @__PURE__ */ jsx23(
4795
+ SearchableSelect,
4796
+ {
4797
+ value,
4798
+ options,
4799
+ placeholder: "S\xE9lectionner un pays...",
4800
+ searchPlaceholder: "Rechercher...",
4801
+ onSelect,
4802
+ disabled
4803
+ },
4804
+ `country-${value}`
4805
+ );
4806
+ };
4314
4807
  export {
4315
4808
  Alert_default as Alert,
4316
4809
  AlertProvider,
@@ -4318,14 +4811,20 @@ export {
4318
4811
  ApprovalAnswerPage,
4319
4812
  ApprovalPreviewAnswer_default as ApprovalPreviewAnswer,
4320
4813
  ApprovalWorkflow_default as ApprovalWorkflow,
4814
+ Choices_default as CHOICES,
4815
+ CountrySelector,
4321
4816
  DateInput,
4322
4817
  FDrawer,
4323
4818
  FetchApi,
4324
4819
  FileInput,
4820
+ ForeignCurrencySelector,
4325
4821
  InputField,
4822
+ InvoiceTypeSelector,
4823
+ LegalFormSelector,
4326
4824
  Modals_default as Modal,
4327
4825
  NumberInput,
4328
4826
  Pages_default as Pages,
4827
+ PaymentMethodSelector,
4329
4828
  Buttons_default as PrimaryButton,
4330
4829
  ModernDoubleSidebarLayout_default as RewiseLayout,
4331
4830
  SecondaryButton,
@@ -4335,6 +4834,8 @@ export {
4335
4834
  SelectUser,
4336
4835
  SelectVendor,
4337
4836
  SessionProvider,
4837
+ TaxSelector,
4838
+ TemplateFNESelector,
4338
4839
  TextInput,
4339
4840
  ThemeContext_default as ThemeProvider,
4340
4841
  Toast_default as ToastContainer,