erp-pos-ecommerce-shared 0.2.11 → 0.2.13
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/components.d.ts +5 -3
- package/dist/components.js +45 -13
- package/dist/components.js.map +1 -1
- package/dist/{filters.interface-C9rkI_yn.d.ts → filters.interface-BwMi9FRP.d.ts} +2 -0
- package/dist/{form.interface-D72rc8aa.d.ts → form.interface-91Dz2oFr.d.ts} +1 -1
- package/dist/hooks.d.ts +4 -4
- package/dist/index.d.ts +5 -5
- package/dist/index.js +45 -13
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +3 -3
- package/dist/queries.d.ts +5 -5
- package/dist/services.d.ts +3 -3
- package/dist/{shift.queries-Cr07eORy.d.ts → shift.queries-Cy85o6l8.d.ts} +3 -3
- package/dist/{warehouse.interface-LD-zwPDu.d.ts → warehouse.interface-S5seQY-_.d.ts} +1 -1
- package/dist/{warehouse.service-9PzeVfzH.d.ts → warehouse.service-C51KYjQB.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as TblProductsImage } from './filters.interface-
|
|
1
|
+
import { v as TblProductsImage } from './filters.interface-BwMi9FRP.js';
|
|
2
2
|
|
|
3
3
|
type IField = ITextField | IPasswordField | INumberField | ISelectField | IMultiSelectField | IDateField | IEmailField | IHiddenField | ISwitchField | IFileField | ITagField;
|
|
4
4
|
interface IHiddenField extends IBaseField {
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
-
import { d as LoginResponse, U as UpdateBatchData, I as IExchange, b as IExchangeResponse, P as PaymentType, L as LocationResponse, M as MaterialResponse, a as ChangeProductResponse, C as ChangeProductRequest, c as IUpdatePermission, e as PrintQRResponse, G as GetReturnsByOrderIdResponse, R as Response, S as StateResponse, W as WarehouseResponse } from './warehouse.service-
|
|
4
|
-
import { b as IAttributeQueryParams, I as IAttribute, d as IAttributeValue, c as IAttributeResponse, f as IBatchResponse, e as IBatch, g as ICategory, i as ICategoryResponse, k as IFilterType, l as IProduct, m as IProductDetails, n as IProductDetailsResponse, o as IProductResponse } from './filters.interface-
|
|
3
|
+
import { d as LoginResponse, U as UpdateBatchData, I as IExchange, b as IExchangeResponse, P as PaymentType, L as LocationResponse, M as MaterialResponse, a as ChangeProductResponse, C as ChangeProductRequest, c as IUpdatePermission, e as PrintQRResponse, G as GetReturnsByOrderIdResponse, R as Response, S as StateResponse, W as WarehouseResponse } from './warehouse.service-C51KYjQB.js';
|
|
4
|
+
import { b as IAttributeQueryParams, I as IAttribute, d as IAttributeValue, c as IAttributeResponse, f as IBatchResponse, e as IBatch, g as ICategory, i as ICategoryResponse, k as IFilterType, l as IProduct, m as IProductDetails, n as IProductDetailsResponse, o as IProductResponse } from './filters.interface-BwMi9FRP.js';
|
|
5
5
|
import { T as TableQueryParams } from './types-CiX8AkJA.js';
|
|
6
6
|
import { ColumnDef, useReactTable, ColumnFiltersState } from '@tanstack/react-table';
|
|
7
7
|
import { D as DataTableConfig, S as ServerTableState } from './datatable.interface-DbB5oxj-.js';
|
|
8
|
-
import { a as BankTerminalResponse, d as IBankTerminal, g as IBankTerminalResponse, e as IBankTerminalForm, l as IClientResponseById, k as IClientResponse, h as IClient, j as IClientRequest, n as ILocation, o as ILocationResponse, p as IMaterial, r as IModule, u as IOrder, v as IOrderResponse, am as TblOrderStatus, x as IPaymentMethod, y as IPaymentMethodAmountExpected, w as IPayment, a8 as PermissionRole, z as IPermissionRole, a9 as PriceCalculationResponse, C as CalculatePriceRequest, ab as PricePerGramResponse, E as IPricePerGramHistory, ag as SchedulePriceRequest, az as UpdatePriceRequest, F as IPriceType, G as IPriceTypeResponse, Y as ITag, H as IPromotion, J as IPromotionResponse, K as IPromotionType, O as IProviderResponse, N as IProviderRequest, L as IProvider, M as IProviderForSelect, c as ComparisonBy, Q as IReportInventory, P as IReportComparisonByTimeFrame, R as IReportX, S as IReportZ, V as IStockByWarehouseReport, ak as TblOrderDetail, U as IRole, W as IStockMovement, X as IStockMovementResponse, Z as ITax, A as AgentResponse, a0 as IUserForm, $ as IUser, aA as UserResponse, a1 as IWareHouse, a2 as IWareHouseResponse } from './warehouse.interface-
|
|
9
|
-
import { F as FolioResponse, G as GenderResponse, H as HealthCheckResponse, U as UseOrdersParams$1, P as ProductQueryParams$1, C as CloseShiftData } from './shift.queries-
|
|
8
|
+
import { a as BankTerminalResponse, d as IBankTerminal, g as IBankTerminalResponse, e as IBankTerminalForm, l as IClientResponseById, k as IClientResponse, h as IClient, j as IClientRequest, n as ILocation, o as ILocationResponse, p as IMaterial, r as IModule, u as IOrder, v as IOrderResponse, am as TblOrderStatus, x as IPaymentMethod, y as IPaymentMethodAmountExpected, w as IPayment, a8 as PermissionRole, z as IPermissionRole, a9 as PriceCalculationResponse, C as CalculatePriceRequest, ab as PricePerGramResponse, E as IPricePerGramHistory, ag as SchedulePriceRequest, az as UpdatePriceRequest, F as IPriceType, G as IPriceTypeResponse, Y as ITag, H as IPromotion, J as IPromotionResponse, K as IPromotionType, O as IProviderResponse, N as IProviderRequest, L as IProvider, M as IProviderForSelect, c as ComparisonBy, Q as IReportInventory, P as IReportComparisonByTimeFrame, R as IReportX, S as IReportZ, V as IStockByWarehouseReport, ak as TblOrderDetail, U as IRole, W as IStockMovement, X as IStockMovementResponse, Z as ITax, A as AgentResponse, a0 as IUserForm, $ as IUser, aA as UserResponse, a1 as IWareHouse, a2 as IWareHouseResponse } from './warehouse.interface-S5seQY-_.js';
|
|
9
|
+
import { F as FolioResponse, G as GenderResponse, H as HealthCheckResponse, U as UseOrdersParams$1, P as ProductQueryParams$1, C as CloseShiftData } from './shift.queries-Cy85o6l8.js';
|
|
10
10
|
import '@tanstack/query-core';
|
|
11
11
|
|
|
12
12
|
declare const useLogin: (options?: UseMutationOptions<LoginResponse, Error, {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { configureEnv, getIsDevEnv } from './config.js';
|
|
2
|
-
export { B as BatchData, I as IAttribute, a as IAttributeFilter, b as IAttributeQueryParams, c as IAttributeResponse, d as IAttributeValue, e as IBatch, f as IBatchResponse, g as ICategory, h as ICategoryRequest, i as ICategoryResponse, j as IFilterSelectOption, k as IFilterType, l as IProduct, m as IProductDetails, n as IProductDetailsResponse, o as IProductResponse, p as IProductVariantRequest, q as IStock, r as ITableFilterConfig, P as ProdStats, s as ProdStock, t as ProductOptions, T as TblCategories, u as TblMaterials, v as TblProductsImage, w as TblProductsTag, x as TblTags } from './filters.interface-
|
|
3
|
-
export { A as AgentResponse, B as BankTerminalQuery, a as BankTerminalResponse, C as CalculatePriceRequest, b as ChartType, c as ComparisonBy, D as DateRange, I as IAgent, d as IBankTerminal, e as IBankTerminalForm, f as IBankTerminalOption, g as IBankTerminalResponse, h as IClient, i as IClientDataForTable, j as IClientRequest, k as IClientResponse, l as IClientResponseById, m as IGender, n as ILocation, o as ILocationResponse, p as IMaterial, q as IMeta, r as IModule, s as IMovement, t as IMovementResponse, u as IOrder, v as IOrderResponse, w as IPayment, x as IPaymentMethod, y as IPaymentMethodAmountExpected, z as IPermissionRole, E as IPricePerGramHistory, F as IPriceType, G as IPriceTypeResponse, H as IPromotion, J as IPromotionResponse, K as IPromotionType, L as IProvider, M as IProviderForSelect, N as IProviderRequest, O as IProviderResponse, P as IReportComparisonByTimeFrame, Q as IReportInventory, R as IReportX, S as IReportZ, T as IReview, U as IRole, V as IStockByWarehouseReport, W as IStockMovement, X as IStockMovementResponse, Y as ITag, Z as ITax, _ as ITaxResponse, $ as IUser, a0 as IUserForm, a1 as IWareHouse, a2 as IWareHouseResponse, a3 as IWareHouseSelect, a4 as MaterialSummary, a5 as PaymentOptions, a6 as Period, a7 as Permission, a8 as PermissionRole, a9 as PriceCalculationResponse, aa as PricePerGramForm, ab as PricePerGramResponse, ac as ProductInfo, ad as PromotionTypeEnum, ae as ReportData, af as ReportDataProduct, ag as SchedulePriceRequest, ah as TblModules, ai as TblMoneyTransactionTypes, aj as TblMoneyTransactions, ak as TblOrderDetail, al as TblOrderDetailsMoneyTransactions, am as TblOrderStatus, an as TblPermissions, ao as TblPriceTypes, ap as TblProducts, aq as TblPromotionTypes, ar as TblPromotionsTargetProductIDTotblProduct, as as TblProvidersTblProvidersUserIDTotblUser, at as TblReturn, au as TblReturnDetail, av as TblRoles, aw as TblRolesTblUsersRoleIDTotblRoles, ax as TblUsersTblProvidersUserIDTotblUsers, ay as TblUsersTblTotblUsers, az as UpdatePriceRequest, aA as UserResponse, aB as WeightBasedSale } from './warehouse.interface-
|
|
2
|
+
export { B as BatchData, I as IAttribute, a as IAttributeFilter, b as IAttributeQueryParams, c as IAttributeResponse, d as IAttributeValue, e as IBatch, f as IBatchResponse, g as ICategory, h as ICategoryRequest, i as ICategoryResponse, j as IFilterSelectOption, k as IFilterType, l as IProduct, m as IProductDetails, n as IProductDetailsResponse, o as IProductResponse, p as IProductVariantRequest, q as IStock, r as ITableFilterConfig, P as ProdStats, s as ProdStock, t as ProductOptions, T as TblCategories, u as TblMaterials, v as TblProductsImage, w as TblProductsTag, x as TblTags } from './filters.interface-BwMi9FRP.js';
|
|
3
|
+
export { A as AgentResponse, B as BankTerminalQuery, a as BankTerminalResponse, C as CalculatePriceRequest, b as ChartType, c as ComparisonBy, D as DateRange, I as IAgent, d as IBankTerminal, e as IBankTerminalForm, f as IBankTerminalOption, g as IBankTerminalResponse, h as IClient, i as IClientDataForTable, j as IClientRequest, k as IClientResponse, l as IClientResponseById, m as IGender, n as ILocation, o as ILocationResponse, p as IMaterial, q as IMeta, r as IModule, s as IMovement, t as IMovementResponse, u as IOrder, v as IOrderResponse, w as IPayment, x as IPaymentMethod, y as IPaymentMethodAmountExpected, z as IPermissionRole, E as IPricePerGramHistory, F as IPriceType, G as IPriceTypeResponse, H as IPromotion, J as IPromotionResponse, K as IPromotionType, L as IProvider, M as IProviderForSelect, N as IProviderRequest, O as IProviderResponse, P as IReportComparisonByTimeFrame, Q as IReportInventory, R as IReportX, S as IReportZ, T as IReview, U as IRole, V as IStockByWarehouseReport, W as IStockMovement, X as IStockMovementResponse, Y as ITag, Z as ITax, _ as ITaxResponse, $ as IUser, a0 as IUserForm, a1 as IWareHouse, a2 as IWareHouseResponse, a3 as IWareHouseSelect, a4 as MaterialSummary, a5 as PaymentOptions, a6 as Period, a7 as Permission, a8 as PermissionRole, a9 as PriceCalculationResponse, aa as PricePerGramForm, ab as PricePerGramResponse, ac as ProductInfo, ad as PromotionTypeEnum, ae as ReportData, af as ReportDataProduct, ag as SchedulePriceRequest, ah as TblModules, ai as TblMoneyTransactionTypes, aj as TblMoneyTransactions, ak as TblOrderDetail, al as TblOrderDetailsMoneyTransactions, am as TblOrderStatus, an as TblPermissions, ao as TblPriceTypes, ap as TblProducts, aq as TblPromotionTypes, ar as TblPromotionsTargetProductIDTotblProduct, as as TblProvidersTblProvidersUserIDTotblUser, at as TblReturn, au as TblReturnDetail, av as TblRoles, aw as TblRolesTblUsersRoleIDTotblRoles, ax as TblUsersTblProvidersUserIDTotblUsers, ay as TblUsersTblTotblUsers, az as UpdatePriceRequest, aA as UserResponse, aB as WeightBasedSale } from './warehouse.interface-S5seQY-_.js';
|
|
4
4
|
export { D as DataTableConfig, S as ServerTableState, T as TableHeaderStyle, d as defaultDataTableConfig } from './datatable.interface-DbB5oxj-.js';
|
|
5
|
-
export { B as ButtonTypes, F as FieldTypes, a as FileType, I as IBaseField, b as IButton, c as IDateField, d as IEmailField, e as IField, f as IFileField, g as IHiddenField, h as IMultiSelectField, i as INumberField, j as IOptions, k as IPasswordField, l as ISelect, m as ISelectField, n as ISwitchField, o as ITagField, p as ITextField, T as TagData } from './form.interface-
|
|
5
|
+
export { B as ButtonTypes, F as FieldTypes, a as FileType, I as IBaseField, b as IButton, c as IDateField, d as IEmailField, e as IField, f as IFileField, g as IHiddenField, h as IMultiSelectField, i as INumberField, j as IOptions, k as IPasswordField, l as ISelect, m as ISelectField, n as ISwitchField, o as ITagField, p as ITextField, T as TagData } from './form.interface-91Dz2oFr.js';
|
|
6
6
|
export { ISidebarGroup, ISidebarLink, ISidebarSubLink, NavLinks, TourActions, TourConfig, TourState, TourStep, TourStepSide } from './interfaces.js';
|
|
7
7
|
export { I as IRequest } from './util.interface-AOzOjHR0.js';
|
|
8
8
|
export { ErpApiConfig, MovementResponse, PrintProductTagResponse, api, checkPendingReportZ, configureApi, createAttribute, createAttributeValue, createAttributesForCategory, createAttributesValuesBatch, createBankTerminal, createCategory, createClient, createMovement, createPriceType, createProduct, createProductVariant, createProductVariants, createPromotion, createProvider, createRole, createUser, deleteAttribute, deleteBankTerminal, deleteCategory, deleteClient, deleteImageFromProduct, deletePriceType, deleteProduct, deleteProductVariant, deleteProvider, deleteRole, deleteUser, getAllAgents, getAllBankTerminals, getAllCategories, getAllClients, getAllGenders, getAllModules, getAllPriceTypes, getAllProviders, getAllTags, getAttributeById, getAttributeValues, getAttributes, getAttributesByCategoryID, getAttributesByProductID, getAttributesForSelect, getAttributesTable, getBankTerminalById, getBankTerminals, getBankTerminalsForSelect, getCategories, getCategoriesForSelect, getCategoryById, getClientById, getClientsForSelect, getMovements, getPaymentMethods, getPaymentMethodsWithAmountExpected, getPriceTypeById, getPriceTypesForSelect, getProductById, getProductVariantById, getProductVariants, getProductVariantsForSelect, getProducts, getProductsByCategory, getProductsForSelect, getProductsTable, getPromotionById, getPromotions, getPromotionsTypeForSelect, getProviderById, getProvidersForSelect, getReportByInventory, getReportComparisonByTimeFrame, getReportX, getReportZ, getRoleByID, getRoles, getSellersOfDayForSelect, getSellersWithShift, getStockByWarehouseReport, getTaxesForSelect, getUserById, getUsers, healthService, isAValidDiscountCode, pricePerGramService, printProductTag, printReportX, printReportZ, restoreBankTerminal, restoreCategory, restoreClient, restoreProduct, restoreProductVariant, restoreProvider, restoreUser, sendCreditPaymentData, sendPaymentData, undeleteAttribute, undeletePriceType, updateAttribute, updateAttributesForCategory, updateBankTerminal, updateCategory, updateClient, updatePriceType, updateProduct, updateProductVariant, updatePromotion, updateProvider, updateRole, updateUser } from './services.js';
|
|
9
|
-
export { C as ChangeProductRequest, a as ChangeProductResponse, G as GetReturnsByOrderIdResponse, I as IExchange, b as IExchangeResponse, c as IUpdatePermission, L as LocationResponse, d as LoginResponse, M as MaterialResponse, P as PaymentType, e as PrintQRResponse, Q as QRBaseUrlResponse, R as Response, S as StateResponse, U as UpdateBatchData, W as WarehouseResponse, f as changeOrderProduct, g as closeShift, h as createBatch, i as createBatchAndUpdateOtherBatches, j as createExchangeRate, k as createLocation, l as createMaterial, m as createReturn, n as createWareHouse, o as deleteLocation, p as deleteMaterial, q as deleteWarehouse, r as getAllLocations, s as getAllMaterials, t as getAllPermissions, u as getAllStates, v as getBatches, w as getBatchesForSelect, x as getExchangeRate, y as getExchangeRates, z as getLocationById, A as getLocations, B as getLocationsForSelect, D as getMatchedBatches, E as getMaterialById, F as getMaterials, H as getMaterialsForSelect, J as getOrderById, K as getOrders, N as getOrdersStatusForSelect, O as getPaymentTypes, T as getPermissionRoleByRoleID, V as getQRBaseUrl, X as getReturnsByOrderId, Y as getWarehouseById, Z as getWarehouses, _ as getWarehousesForSelect, $ as login, a0 as makeNewCashMovement, a1 as printQR, a2 as restoreLocation, a3 as restoreWarehouse, a4 as setNewShift, a5 as undeleteMaterial, a6 as updateBatch, a7 as updateLocation, a8 as updateMaterial, a9 as updatePermission, aa as updateWarehouse } from './warehouse.service-
|
|
9
|
+
export { C as ChangeProductRequest, a as ChangeProductResponse, G as GetReturnsByOrderIdResponse, I as IExchange, b as IExchangeResponse, c as IUpdatePermission, L as LocationResponse, d as LoginResponse, M as MaterialResponse, P as PaymentType, e as PrintQRResponse, Q as QRBaseUrlResponse, R as Response, S as StateResponse, U as UpdateBatchData, W as WarehouseResponse, f as changeOrderProduct, g as closeShift, h as createBatch, i as createBatchAndUpdateOtherBatches, j as createExchangeRate, k as createLocation, l as createMaterial, m as createReturn, n as createWareHouse, o as deleteLocation, p as deleteMaterial, q as deleteWarehouse, r as getAllLocations, s as getAllMaterials, t as getAllPermissions, u as getAllStates, v as getBatches, w as getBatchesForSelect, x as getExchangeRate, y as getExchangeRates, z as getLocationById, A as getLocations, B as getLocationsForSelect, D as getMatchedBatches, E as getMaterialById, F as getMaterials, H as getMaterialsForSelect, J as getOrderById, K as getOrders, N as getOrdersStatusForSelect, O as getPaymentTypes, T as getPermissionRoleByRoleID, V as getQRBaseUrl, X as getReturnsByOrderId, Y as getWarehouseById, Z as getWarehouses, _ as getWarehousesForSelect, $ as login, a0 as makeNewCashMovement, a1 as printQR, a2 as restoreLocation, a3 as restoreWarehouse, a4 as setNewShift, a5 as undeleteMaterial, a6 as updateBatch, a7 as updateLocation, a8 as updateMaterial, a9 as updatePermission, aa as updateWarehouse } from './warehouse.service-C51KYjQB.js';
|
|
10
10
|
export { T as TableQueryParams } from './types-CiX8AkJA.js';
|
|
11
11
|
export { attributeQueryKeys, attributes, auth, bankTerminalQueryKeys, bankTerminals, batchQueryKeys, batches, categories, categoryQueryKeys, clientQueryKeys, clients, exchange, exchangeQueryKeys, folioQueryKeys, folios, locationQueryKeys, locations, materialQueryKeys, materials, moduleQueryKeys, modules, paymentQueryKeys, payments, permissionQueryKeys, permissions, pricePerGram, pricePerGramQueryKeys, priceTypeQueryKeys, priceTypes, productTagQueryKeys, productTags, promotionQueryKeys, promotions, providerQueryKeys, providers, qr, qrQueryKeys, reportQueryKeys, reports, returnQueryKeys, returns, roleQueryKeys, roles, stateQueryKeys, states, stockMovementQueryKeys, stockMovements, taxQueryKeys, taxes, userQueryKeys, users, warehouseQueryKeys, warehouses } from './queries.js';
|
|
12
|
-
export { C as CloseShiftData, G as GenderResponse, H as HealthCheckResponse, P as ProductQueryParams, U as UseOrdersParams, g as genderQueryKeys, a as genders, h as health, b as healthQueryKeys, o as orderQueryKeys, c as orders, p as productQueryKeys, d as products, s as shifts } from './shift.queries-
|
|
12
|
+
export { C as CloseShiftData, G as GenderResponse, H as HealthCheckResponse, P as ProductQueryParams, U as UseOrdersParams, g as genderQueryKeys, a as genders, h as health, b as healthQueryKeys, o as orderQueryKeys, c as orders, p as productQueryKeys, d as products, s as shifts } from './shift.queries-Cy85o6l8.js';
|
|
13
13
|
export { AttributeFilterColumnMap, ProductFilterColumnMap, UseDataTableOptions, UseDataTableReturn, attributeKeys, bankTerminalKeys, batchKeys, categoryKeys, clientKeys, exchangeKeys, folioKeys, genderKeys, healthKeys, locationKeys, mapTableParamsToAttributeParams, mapTableParamsToProductParams, materialKeys, moduleKeys, orderKeys, paymentKeys, permissionKeys, pricePerGramKeys, priceTypeKeys, productKeys, productTagKeys, promotionKeys, providerKeys, qrKeys, reportKeys, returnKeys, roleKeys, stateKeys, stockMovementKeys, taxKeys, useAllAgents, useAllBankTerminals, useAllCategories, useAllGenders, useAllLocations, useAllMaterials, useAllModules, useAllProductTags, useAllStates, useAttribute, useAttributeValues, useAttributes, useAttributesByCategoryID, useAttributesByProductID, useAttributesForSelect, useAttributesTable, useBankTerminal, useBankTerminals, useBankTerminalsForSelect, useBankTerminalsTable, useBatches, useBatchesForSelect, useBatchesTable, useCalculatePricePerGram, useCategories, useCategoriesForSelect, useCategoriesTable, useCategory, useChangeOrderProduct, useClient, useClients, useClientsForSelect, useClientsTable, useCloseShift, useCreateAttribute, useCreateAttributeValue, useCreateAttributesForCategory, useCreateAttributesValuesBatch, useCreateBankTerminal, useCreateBatch, useCreateBatchAndUpdateOtherBatches, useCreateCategory, useCreateClient, useCreateExchangeRate, useCreateLocation, useCreateMaterial, useCreateMovement, useCreatePriceType, useCreateProduct, useCreateProductVariant, useCreateProductVariants, useCreatePromotion, useCreateProvider, useCreateReturn, useCreateRole, useCreateUser, useCreateWarehouse, useDataTable, useDeleteAttribute, useDeleteBankTerminal, useDeleteCategory, useDeleteClient, useDeleteFuturePricePerGram, useDeleteImageFromProduct, useDeleteLocation, useDeleteMaterial, useDeletePriceType, useDeleteProduct, useDeleteProductVariant, useDeleteProvider, useDeleteRole, useDeleteUser, useDeleteWarehouse, useExchangeRate, useExchangeRates, useExchangeRatesTable, useHealthCheck, useInventoryTable, useIsWeightBased, useLocation, useLocations, useLocationsForSelect, useLocationsTable, useLogin, useMakeNewCashMovement, useMatchedBatches, useMaterial, useMaterials, useMaterialsForSelect, useMaterialsTable, useMovements, useMovementsTable, useNextFolioToUseInBatches, useOrder, useOrders, useOrdersStatusForSelect, useOrdersTable, usePaymentMethods, usePaymentMethodsWithAmount, usePaymentMethodsWithAmountExpected, usePaymentTypes, usePendingReportZ, usePermissionRoleByRoleID, usePermissions, usePrefetchAttribute, usePrefetchBankTerminal, usePrefetchCategory, usePrefetchClient, usePrefetchLocation, usePrefetchMaterial, usePrefetchOrder, usePrefetchPriceType, usePrefetchProduct, usePrefetchPromotion, usePrefetchProvider, usePrefetchRole, usePrefetchUser, usePrefetchWarehouse, usePricePerGram, usePricePerGramHistory, usePriceType, usePriceTypes, usePriceTypesForSelect, usePriceTypesTable, usePrintQR, usePrintReportX, usePrintReportZ, useProduct, useProductVariant, useProductVariants, useProductVariantsForSelect, useProducts, useProductsByCategory, useProductsForSelect, useProductsTable, usePromotion, usePromotions, usePromotionsTable, usePromotionsTypeForSelect, useProvider, useProviders, useProvidersForSelect, useProvidersTable, useQRBaseUrl, useReportByInventory, useReportComparisonByTimeFrame, useReportX, useReportZ, useRestoreBankTerminal, useRestoreCategory, useRestoreClient, useRestoreLocation, useRestoreProduct, useRestoreProductVariant, useRestoreProvider, useRestoreUser, useRestoreWarehouse, useReturnsByOrderId, useRole, useRoles, useRolesTable, useSchedulePricePerGram, useSellersOfDayForSelect, useSellersWithShift, useSendCreditPayment, useSendPayment, useSetNewShift, useStockByWarehouseReport, useTaxesForSelect, useUndeleteAttribute, useUndeleteMaterial, useUndeletePriceType, useUpdateAttribute, useUpdateAttributesForCategory, useUpdateBankTerminal, useUpdateBatch, useUpdateCategory, useUpdateClient, useUpdateFuturePricePerGram, useUpdateLocation, useUpdateMaterial, useUpdatePermission, useUpdatePricePerGram, useUpdatePriceType, useUpdateProduct, useUpdateProductVariant, useUpdatePromotion, useUpdateProvider, useUpdateRole, useUpdateUser, useUpdateWarehouse, useUser, useUsers, useUsersTable, useValidateDiscountCode, useWarehouse, useWarehouses, useWarehousesForSelect, useWarehousesTable, userKeys, warehouseKeys } from './hooks.js';
|
|
14
14
|
export { BottomPagination, CreateEditForm, DataTable, EmptyState, FilterDate, FilterDateProps, FilterSelect, FilterSelectProps, FormGenerator, FormInstance, FormPage, FormValues, ImageForm, PaginatedResponse, SearchInput, SimpleDataTable, TablePage, TableSkeleton, configureImageFormIcons, dateGteFilterFn, fieldGenerator, generateFormSchema } from './components.js';
|
|
15
15
|
import '@tanstack/react-table';
|
package/dist/index.js
CHANGED
|
@@ -6496,10 +6496,19 @@ var FilterSelect = ({
|
|
|
6496
6496
|
options,
|
|
6497
6497
|
onChange,
|
|
6498
6498
|
placeholder = "Todos",
|
|
6499
|
-
Icon = ListFilter
|
|
6499
|
+
Icon = ListFilter,
|
|
6500
|
+
searchable = false
|
|
6500
6501
|
}) => {
|
|
6501
6502
|
const [open, setOpen] = useState(false);
|
|
6502
6503
|
const [selectedOption, setSelectedOption] = useState(null);
|
|
6504
|
+
const [search, setSearch] = useState("");
|
|
6505
|
+
const searchRef = useRef(null);
|
|
6506
|
+
const filteredOptions = useMemo(
|
|
6507
|
+
() => searchable && search ? options.filter(
|
|
6508
|
+
(o) => o.label.toLowerCase().includes(search.toLowerCase())
|
|
6509
|
+
) : options,
|
|
6510
|
+
[options, search, searchable]
|
|
6511
|
+
);
|
|
6503
6512
|
const handleClear = () => {
|
|
6504
6513
|
setSelectedOption(null);
|
|
6505
6514
|
onChange(columnId, null);
|
|
@@ -6517,7 +6526,15 @@ var FilterSelect = ({
|
|
|
6517
6526
|
Menu,
|
|
6518
6527
|
{
|
|
6519
6528
|
opened: open,
|
|
6520
|
-
onChange:
|
|
6529
|
+
onChange: (opened) => {
|
|
6530
|
+
setOpen(opened);
|
|
6531
|
+
if (!opened) {
|
|
6532
|
+
setSearch("");
|
|
6533
|
+
}
|
|
6534
|
+
},
|
|
6535
|
+
onOpen: () => {
|
|
6536
|
+
setTimeout(() => searchRef.current?.focus(), 50);
|
|
6537
|
+
},
|
|
6521
6538
|
styles: {
|
|
6522
6539
|
dropdown: {
|
|
6523
6540
|
minWidth: 180
|
|
@@ -6556,17 +6573,31 @@ var FilterSelect = ({
|
|
|
6556
6573
|
children: selectedOption ? selectedOption.label : placeholder
|
|
6557
6574
|
}
|
|
6558
6575
|
) }),
|
|
6559
|
-
/* @__PURE__ */
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6576
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, { style: { boxShadow: "0 0 10px 0 rgba(0, 0, 0, 0.1)" }, children: [
|
|
6577
|
+
searchable && /* @__PURE__ */ jsx(
|
|
6578
|
+
TextInput,
|
|
6579
|
+
{
|
|
6580
|
+
ref: searchRef,
|
|
6581
|
+
variant: "unstyled",
|
|
6582
|
+
placeholder: "Buscar...",
|
|
6583
|
+
leftSection: /* @__PURE__ */ jsx(Search, { size: 14 }),
|
|
6584
|
+
value: search,
|
|
6585
|
+
onChange: (e) => setSearch(e.currentTarget.value)
|
|
6586
|
+
}
|
|
6587
|
+
),
|
|
6588
|
+
/* @__PURE__ */ jsx(ScrollArea, { h: 240, scrollbars: "y", type: "always", children: filteredOptions.map((option) => /* @__PURE__ */ jsx(
|
|
6589
|
+
Menu.Item,
|
|
6590
|
+
{
|
|
6591
|
+
leftSection: selectedOption?.value === option.value ? /* @__PURE__ */ jsx(Check, { size: 12 }) : null,
|
|
6592
|
+
onClick: () => {
|
|
6593
|
+
handleSelect(option);
|
|
6594
|
+
},
|
|
6595
|
+
children: option.label
|
|
6565
6596
|
},
|
|
6566
|
-
|
|
6567
|
-
},
|
|
6568
|
-
|
|
6569
|
-
|
|
6597
|
+
option.value
|
|
6598
|
+
)) }),
|
|
6599
|
+
searchable && filteredOptions.length === 0 && /* @__PURE__ */ jsx(Menu.Item, { disabled: true, children: "Sin resultados" })
|
|
6600
|
+
] })
|
|
6570
6601
|
]
|
|
6571
6602
|
}
|
|
6572
6603
|
);
|
|
@@ -6731,7 +6762,8 @@ var DataTable = ({
|
|
|
6731
6762
|
columnId: f.columnId,
|
|
6732
6763
|
options: f.options ?? [],
|
|
6733
6764
|
onChange: setColumnFilter,
|
|
6734
|
-
placeholder: f.placeholder ?? "Todos"
|
|
6765
|
+
placeholder: f.placeholder ?? "Todos",
|
|
6766
|
+
searchable: f.searchable
|
|
6735
6767
|
},
|
|
6736
6768
|
f.columnId
|
|
6737
6769
|
)
|