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.cjs CHANGED
@@ -35,14 +35,20 @@ __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,
@@ -52,6 +58,8 @@ __export(index_exports, {
52
58
  SelectUser: () => SelectUser,
53
59
  SelectVendor: () => SelectVendor,
54
60
  SessionProvider: () => SessionProvider,
61
+ TaxSelector: () => TaxSelector,
62
+ TemplateFNESelector: () => TemplateFNESelector,
55
63
  TextInput: () => TextInput,
56
64
  ThemeProvider: () => ThemeContext_default,
57
65
  ToastContainer: () => Toast_default,
@@ -3740,7 +3748,7 @@ var useAlert = () => {
3740
3748
  };
3741
3749
 
3742
3750
  // src/components/common/CommonSelect.tsx
3743
- var import_react24 = require("react");
3751
+ var import_react37 = require("react");
3744
3752
 
3745
3753
  // src/services/VendorServices.ts
3746
3754
  var VENDORS_API_URL = `${API_URL}/accounting/vendors/`;
@@ -3805,17 +3813,62 @@ var import_jsx_runtime30 = require("react/jsx-runtime");
3805
3813
  var import_react22 = require("react");
3806
3814
  var import_jsx_runtime31 = require("react/jsx-runtime");
3807
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");
3808
3860
  var PrimaryButton2 = ({
3809
3861
  loading = false,
3810
3862
  children,
3811
3863
  classname = "",
3864
+ variant = "full",
3812
3865
  ...props
3813
3866
  }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3814
3867
  "button",
3815
3868
  {
3816
3869
  type: "submit",
3817
3870
  disabled: loading || props.disabled,
3818
- 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}`,
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]"}`,
3819
3872
  ...props,
3820
3873
  children: loading ? "Connexion en cours..." : children
3821
3874
  }
@@ -3823,7 +3876,7 @@ var PrimaryButton2 = ({
3823
3876
  var Buttons_default2 = PrimaryButton2;
3824
3877
  var Modal2 = ({ title, description, width, open, onClose, children }) => {
3825
3878
  if (!open) return null;
3826
- 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 py-4 px-6 mx-4 w-[${width ? width : "60%"}]`, children: [
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: [
3827
3880
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [
3828
3881
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
3829
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 }) }),
@@ -3839,7 +3892,7 @@ var Modal2 = ({ title, description, width, open, onClose, children }) => {
3839
3892
  }
3840
3893
  )
3841
3894
  ] }),
3842
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-4", children })
3895
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "w-full max-h-[80vh] overflow-y-auto mb-1", children })
3843
3896
  ] }) });
3844
3897
  };
3845
3898
  var Modals_default2 = Modal2;
@@ -3896,10 +3949,26 @@ var USERS_API_URL2 = `${API_URL2}/core/users/`;
3896
3949
  var ToastContext2 = (0, import_react15.createContext)(void 0);
3897
3950
  var APPROVAL_API_URL2 = `${API_URL2}/approvals/cases/`;
3898
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/`;
3899
3968
 
3900
3969
  // src/components/common/FormVendor.tsx
3901
- var import_react23 = require("react");
3902
- var import_jsx_runtime33 = require("react/jsx-runtime");
3970
+ var import_react36 = require("react");
3971
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3903
3972
  var MinimalVendorForm = ({
3904
3973
  isOpen,
3905
3974
  onClose,
@@ -3908,13 +3977,13 @@ var MinimalVendorForm = ({
3908
3977
  refresh = () => {
3909
3978
  }
3910
3979
  }) => {
3911
- const [formData, setFormData] = (0, import_react23.useState)(object || {
3980
+ const [formData, setFormData] = (0, import_react36.useState)(object || {
3912
3981
  from_module: from ?? null,
3913
3982
  legal_name: "",
3914
3983
  trading_name: ""
3915
3984
  });
3916
- const [errors, setErrors] = (0, import_react23.useState)({});
3917
- const [loading, setLoading] = (0, import_react23.useState)(false);
3985
+ const [errors, setErrors] = (0, import_react36.useState)({});
3986
+ const [loading, setLoading] = (0, import_react36.useState)(false);
3918
3987
  const { token } = useSession();
3919
3988
  const { success, error: showError } = useToast();
3920
3989
  const handleInputChange = (e) => {
@@ -3973,7 +4042,7 @@ var MinimalVendorForm = ({
3973
4042
  }
3974
4043
  };
3975
4044
  if (!isOpen) return null;
3976
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4045
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3977
4046
  Modals_default2,
3978
4047
  {
3979
4048
  title: "Ajouter un fournisseur",
@@ -3981,9 +4050,9 @@ var MinimalVendorForm = ({
3981
4050
  description: ``,
3982
4051
  open: isOpen,
3983
4052
  onClose,
3984
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("form", { onSubmit: handleSubmit, className: "p-", children: [
3985
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
3986
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
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)(
3987
4056
  TextInput2,
3988
4057
  {
3989
4058
  label: "Raison sociale",
@@ -3995,7 +4064,7 @@ var MinimalVendorForm = ({
3995
4064
  onChange: handleInputChange
3996
4065
  }
3997
4066
  ),
3998
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4067
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3999
4068
  TextInput2,
4000
4069
  {
4001
4070
  label: "Nom commercial",
@@ -4006,8 +4075,8 @@ var MinimalVendorForm = ({
4006
4075
  }
4007
4076
  )
4008
4077
  ] }) }),
4009
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
4010
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4078
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex justify-between pt-6 mt-8", children: [
4079
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4011
4080
  "button",
4012
4081
  {
4013
4082
  type: "button",
@@ -4016,7 +4085,7 @@ var MinimalVendorForm = ({
4016
4085
  children: "Annuler"
4017
4086
  }
4018
4087
  ),
4019
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4088
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4020
4089
  Buttons_default2,
4021
4090
  {
4022
4091
  type: "button",
@@ -4032,43 +4101,43 @@ var MinimalVendorForm = ({
4032
4101
  };
4033
4102
 
4034
4103
  // src/services/DepartmentServices.ts
4035
- var URI = `${API_URL}/core/departments/`;
4104
+ var URI3 = `${API_URL}/core/departments/`;
4036
4105
  var DepartmentServices = {
4037
- create: (data) => FetchApi.post(`${URI}`, data),
4038
- get: (id) => FetchApi.get(`${URI}${id}/`),
4039
- list: (params) => FetchApi.get(`${URI}?${new URLSearchParams(params).toString()}`),
4040
- update: (id, data) => FetchApi.put(`${URI}${id}/`, data),
4041
- delete: (id) => FetchApi.delete(`${URI}${id}/`)
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}/`)
4042
4111
  };
4043
4112
 
4044
4113
  // src/services/ProfitCostsServices.ts
4045
- var URI2 = `${API_URL}/accounting/profit-or-cost-center/`;
4046
- var COST_URI = `${API_URL}/accounting/cost-center/`;
4114
+ var URI4 = `${API_URL}/accounting/profit-or-cost-center/`;
4115
+ var COST_URI2 = `${API_URL}/accounting/cost-center/`;
4047
4116
  var CostServices = {
4048
- create: (data) => FetchApi.post(`${COST_URI}`, data),
4049
- get: (id) => FetchApi.get(`${COST_URI}${id}/`),
4050
- list: (params) => FetchApi.get(`${COST_URI}?${new URLSearchParams(params).toString()}`),
4051
- update: (id, data) => FetchApi.put(`${COST_URI}${id}/`, data),
4052
- delete: (id) => FetchApi.delete(`${COST_URI}${id}/`)
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}/`)
4053
4122
  };
4054
- var PROFIT_URI = `${API_URL}/accounting/profit-center/`;
4123
+ var PROFIT_URI2 = `${API_URL}/accounting/profit-center/`;
4055
4124
 
4056
4125
  // src/components/common/CommonSelect.tsx
4057
- var import_jsx_runtime34 = require("react/jsx-runtime");
4126
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4058
4127
  var SelectVendor = ({
4059
4128
  value,
4060
4129
  onSelect
4061
4130
  }) => {
4062
- const [showModal, setShowModal] = (0, import_react24.useState)(false);
4063
- const [selectedVendor, setSelectedVendor] = (0, import_react24.useState)(null);
4131
+ const [showModal, setShowModal] = (0, import_react37.useState)(false);
4132
+ const [selectedVendor, setSelectedVendor] = (0, import_react37.useState)(null);
4064
4133
  const { token, activeBusinessEntity } = useSession();
4065
- const [vendors, setVendors] = (0, import_react24.useState)(() => {
4134
+ const [vendors, setVendors] = (0, import_react37.useState)(() => {
4066
4135
  const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4067
4136
  const cached = sessionStorage.getItem(cacheKey);
4068
4137
  return cached ? JSON.parse(cached) : [];
4069
4138
  });
4070
- const [loadingVendors, setLoadingVendors] = (0, import_react24.useState)(false);
4071
- (0, import_react24.useEffect)(() => {
4139
+ const [loadingVendors, setLoadingVendors] = (0, import_react37.useState)(false);
4140
+ (0, import_react37.useEffect)(() => {
4072
4141
  const cacheKey = `vendors_cache_${activeBusinessEntity?.id || "default"}`;
4073
4142
  const cached = sessionStorage.getItem(cacheKey);
4074
4143
  if (!cached) {
@@ -4080,7 +4149,8 @@ var SelectVendor = ({
4080
4149
  const getVendorOptions = () => {
4081
4150
  return vendors.filter((vendor) => vendor.id !== void 0).map((vendor) => ({
4082
4151
  value: vendor.id,
4083
- label: `${vendor.legal_name} [${vendor.trading_name}]`
4152
+ label: `${vendor.legal_name} [${vendor.trading_name}]`,
4153
+ object: vendor
4084
4154
  }));
4085
4155
  };
4086
4156
  const loadVendors = async () => {
@@ -4105,9 +4175,9 @@ var SelectVendor = ({
4105
4175
  sessionStorage.removeItem(cacheKey);
4106
4176
  loadVendors();
4107
4177
  };
4108
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
4109
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Ajouter un fournisseur" }) }),
4110
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
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)(
4111
4181
  SearchableSelect,
4112
4182
  {
4113
4183
  value,
@@ -4123,8 +4193,8 @@ var SelectVendor = ({
4123
4193
  },
4124
4194
  "fourni" + value
4125
4195
  ),
4126
- loadingVendors && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des fournisseurs..." }),
4127
- showModal && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
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)(
4128
4198
  MinimalVendorForm,
4129
4199
  {
4130
4200
  object: selectedVendor,
@@ -4141,13 +4211,13 @@ var SelectUser = ({
4141
4211
  onSelect
4142
4212
  }) => {
4143
4213
  const { token, activeBusinessEntity } = useSession();
4144
- const [users, setUsers] = (0, import_react24.useState)(() => {
4214
+ const [users, setUsers] = (0, import_react37.useState)(() => {
4145
4215
  const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4146
4216
  const cached = sessionStorage.getItem(cacheKey);
4147
4217
  return cached ? JSON.parse(cached) : [];
4148
4218
  });
4149
- const [loading, setLoading] = (0, import_react24.useState)(false);
4150
- (0, import_react24.useEffect)(() => {
4219
+ const [loading, setLoading] = (0, import_react37.useState)(false);
4220
+ (0, import_react37.useEffect)(() => {
4151
4221
  const cacheKey = `users_cache_${activeBusinessEntity?.id || "default"}`;
4152
4222
  const cached = sessionStorage.getItem(cacheKey);
4153
4223
  if (!cached) {
@@ -4183,19 +4253,19 @@ var SelectUser = ({
4183
4253
  return users.map((user) => ({
4184
4254
  value: user.id,
4185
4255
  label: `${user.first_name} ${user.last_name}`,
4186
- content: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-1", children: [
4187
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "font-medium text-gray-900", children: [
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: [
4188
4258
  user.first_name,
4189
4259
  " ",
4190
4260
  user.last_name
4191
4261
  ] }),
4192
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
4262
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-sm text-gray-500", children: user.email })
4193
4263
  ] }) })
4194
4264
  }));
4195
4265
  };
4196
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
4197
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un utilisateur" }) }),
4198
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
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)(
4199
4269
  SearchableSelect,
4200
4270
  {
4201
4271
  value,
@@ -4208,7 +4278,7 @@ var SelectUser = ({
4208
4278
  },
4209
4279
  "user" + value
4210
4280
  ),
4211
- loading && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4281
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des utilisateurs..." })
4212
4282
  ] });
4213
4283
  };
4214
4284
  var SelectDepartment = ({
@@ -4216,13 +4286,13 @@ var SelectDepartment = ({
4216
4286
  onSelect
4217
4287
  }) => {
4218
4288
  const { token, activeBusinessEntity } = useSession();
4219
- const [departments, setDepartments] = (0, import_react24.useState)(() => {
4289
+ const [departments, setDepartments] = (0, import_react37.useState)(() => {
4220
4290
  const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4221
4291
  const cached = sessionStorage.getItem(cacheKey);
4222
4292
  return cached ? JSON.parse(cached) : [];
4223
4293
  });
4224
- const [loading, setLoading] = (0, import_react24.useState)(false);
4225
- (0, import_react24.useEffect)(() => {
4294
+ const [loading, setLoading] = (0, import_react37.useState)(false);
4295
+ (0, import_react37.useEffect)(() => {
4226
4296
  const cacheKey = `departments_cache_${activeBusinessEntity?.id || "default"}`;
4227
4297
  const cached = sessionStorage.getItem(cacheKey);
4228
4298
  if (!cached) {
@@ -4258,9 +4328,9 @@ var SelectDepartment = ({
4258
4328
  label: dept.name
4259
4329
  }));
4260
4330
  };
4261
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
4262
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un d\xE9partement" }) }),
4263
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
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)(
4264
4334
  SearchableSelect,
4265
4335
  {
4266
4336
  value,
@@ -4273,7 +4343,7 @@ var SelectDepartment = ({
4273
4343
  },
4274
4344
  "dept" + value
4275
4345
  ),
4276
- loading && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4346
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des d\xE9partements..." })
4277
4347
  ] });
4278
4348
  };
4279
4349
  var SelectCostCenter = ({
@@ -4281,13 +4351,13 @@ var SelectCostCenter = ({
4281
4351
  onSelect
4282
4352
  }) => {
4283
4353
  const { token, activeBusinessEntity } = useSession();
4284
- const [costCenters, setCostCenters] = (0, import_react24.useState)(() => {
4354
+ const [costCenters, setCostCenters] = (0, import_react37.useState)(() => {
4285
4355
  const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4286
4356
  const cached = sessionStorage.getItem(cacheKey);
4287
4357
  return cached ? JSON.parse(cached) : [];
4288
4358
  });
4289
- const [loading, setLoading] = (0, import_react24.useState)(false);
4290
- (0, import_react24.useEffect)(() => {
4359
+ const [loading, setLoading] = (0, import_react37.useState)(false);
4360
+ (0, import_react37.useEffect)(() => {
4291
4361
  const cacheKey = `cost_centers_cache_${activeBusinessEntity?.id || "default"}`;
4292
4362
  const cached = sessionStorage.getItem(cacheKey);
4293
4363
  if (!cached) {
@@ -4321,18 +4391,18 @@ var SelectCostCenter = ({
4321
4391
  return costCenters.map((center) => ({
4322
4392
  value: center.id,
4323
4393
  label: `${center.code ? `[${center.code}] ` : ""}${center.name}`,
4324
- content: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center space-x-3", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-1", children: [
4325
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "font-medium text-gray-900", children: center.name }),
4326
- center.code && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "text-sm text-gray-500", children: [
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: [
4327
4397
  "Code: ",
4328
4398
  center.code
4329
4399
  ] })
4330
4400
  ] }) })
4331
4401
  }));
4332
4402
  };
4333
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
4334
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-between ", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "S\xE9lectionner un centre de co\xFBt" }) }),
4335
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
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)(
4336
4406
  SearchableSelect,
4337
4407
  {
4338
4408
  value,
@@ -4345,9 +4415,426 @@ var SelectCostCenter = ({
4345
4415
  },
4346
4416
  "cost" + value
4347
4417
  ),
4348
- loading && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4418
+ loading && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-sm text-gray-500 mt-2", children: "Chargement des centres de co\xFBt..." })
4349
4419
  ] });
4350
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
+ };
4351
4838
  // Annotate the CommonJS export names for ESM import in node:
4352
4839
  0 && (module.exports = {
4353
4840
  Alert,
@@ -4356,14 +4843,20 @@ var SelectCostCenter = ({
4356
4843
  ApprovalAnswerPage,
4357
4844
  ApprovalPreviewAnswer,
4358
4845
  ApprovalWorkflow,
4846
+ CHOICES,
4847
+ CountrySelector,
4359
4848
  DateInput,
4360
4849
  FDrawer,
4361
4850
  FetchApi,
4362
4851
  FileInput,
4852
+ ForeignCurrencySelector,
4363
4853
  InputField,
4854
+ InvoiceTypeSelector,
4855
+ LegalFormSelector,
4364
4856
  Modal,
4365
4857
  NumberInput,
4366
4858
  Pages,
4859
+ PaymentMethodSelector,
4367
4860
  PrimaryButton,
4368
4861
  RewiseLayout,
4369
4862
  SecondaryButton,
@@ -4373,6 +4866,8 @@ var SelectCostCenter = ({
4373
4866
  SelectUser,
4374
4867
  SelectVendor,
4375
4868
  SessionProvider,
4869
+ TaxSelector,
4870
+ TemplateFNESelector,
4376
4871
  TextInput,
4377
4872
  ThemeProvider,
4378
4873
  ToastContainer,