erp-pos-ecommerce-shared 0.2.18 → 0.2.20
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.js +44 -20
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +6 -4
- package/dist/hooks.js +16 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +60 -21
- package/dist/index.js.map +1 -1
- package/dist/queries.d.ts +12 -3
- package/dist/queries.js +11 -0
- package/dist/queries.js.map +1 -1
- package/dist/services.d.ts +1 -1
- package/dist/services.js +5 -1
- package/dist/services.js.map +1 -1
- package/dist/{shift.queries-Cy85o6l8.d.ts → shift.queries-CaMY7FWd.d.ts} +1 -1
- package/dist/{warehouse.service-C51KYjQB.d.ts → warehouse.service-CV2UDqAD.d.ts} +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export { B as ButtonTypes, F as FieldTypes, a as FileType, I as IBaseField, b as
|
|
|
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
|
|
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 getBatchById, w as getBatches, x as getBatchesForSelect, y as getExchangeRate, z as getExchangeRates, A as getLocationById, B as getLocations, D as getLocationsForSelect, E as getMatchedBatches, F as getMaterialById, H as getMaterials, J as getMaterialsForSelect, K as getOrderById, N as getOrders, O as getOrdersStatusForSelect, T as getPaymentTypes, V as getPermissionRoleByRoleID, X as getQRBaseUrl, Y as getReturnsByOrderId, Z as getWarehouseById, _ as getWarehouses, $ as getWarehousesForSelect, a0 as login, a1 as makeNewCashMovement, a2 as printQR, a3 as restoreLocation, a4 as restoreWarehouse, a5 as setNewShift, a6 as undeleteMaterial, a7 as updateBatch, a8 as updateLocation, a9 as updateMaterial, aa as updatePermission, ab as updateWarehouse } from './warehouse.service-CV2UDqAD.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-
|
|
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, useMediaQuery, 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';
|
|
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-CaMY7FWd.js';
|
|
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, useBatchById, 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, useMediaQuery, 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';
|
|
16
16
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -331,6 +331,10 @@ var createBatchAndUpdateOtherBatches = async (batch) => {
|
|
|
331
331
|
const { data } = await api.post("batch/create-batch-and-update-other-batches", batch);
|
|
332
332
|
return data;
|
|
333
333
|
};
|
|
334
|
+
var getBatchById = async (batchId) => {
|
|
335
|
+
const { data } = await api.get(`batch/${batchId}`);
|
|
336
|
+
return data;
|
|
337
|
+
};
|
|
334
338
|
var getMatchedBatches = async ({
|
|
335
339
|
productDetailId
|
|
336
340
|
}) => {
|
|
@@ -2232,6 +2236,7 @@ var batchQueryKeys = {
|
|
|
2232
2236
|
all: ["batches"],
|
|
2233
2237
|
lists: () => [...batchQueryKeys.all, "list"],
|
|
2234
2238
|
list: (params) => [...batchQueryKeys.lists(), { filters: params }],
|
|
2239
|
+
detail: (batchId) => [...batchQueryKeys.all, "detail", batchId],
|
|
2235
2240
|
forSelect: () => [...batchQueryKeys.all, "select"],
|
|
2236
2241
|
matched: (productDetailId) => [...batchQueryKeys.all, "matched", productDetailId]
|
|
2237
2242
|
};
|
|
@@ -2248,6 +2253,12 @@ var batches = {
|
|
|
2248
2253
|
queryKey: batchQueryKeys.list(params),
|
|
2249
2254
|
staleTime: 3e4
|
|
2250
2255
|
}),
|
|
2256
|
+
getBatchById: (batchId) => queryOptions({
|
|
2257
|
+
queryFn: () => getBatchById(batchId),
|
|
2258
|
+
queryKey: batchQueryKeys.detail(batchId),
|
|
2259
|
+
enabled: !!batchId && batchId > 0,
|
|
2260
|
+
staleTime: 3e4
|
|
2261
|
+
}),
|
|
2251
2262
|
getBatchesForTable: (params) => queryOptions({
|
|
2252
2263
|
queryFn: () => getBatches({
|
|
2253
2264
|
skip: params.skip ?? 0,
|
|
@@ -3989,6 +4000,10 @@ var useBatches = (params = {}, options) => useQuery({
|
|
|
3989
4000
|
...options
|
|
3990
4001
|
});
|
|
3991
4002
|
var useBatchesTable = useBatches;
|
|
4003
|
+
var useBatchById = (batchId, options) => useQuery({
|
|
4004
|
+
...batches.queries.getBatchById(batchId ?? 0),
|
|
4005
|
+
...options
|
|
4006
|
+
});
|
|
3992
4007
|
var useBatchesForSelect = (options) => useQuery({
|
|
3993
4008
|
...batches.queries.getBatchesForSelect(),
|
|
3994
4009
|
...options
|
|
@@ -6094,11 +6109,19 @@ var TableHeader = ({
|
|
|
6094
6109
|
const bgColor = style.bgColor ?? defaultHeaderBgColor;
|
|
6095
6110
|
const hoverBg = style.hoverBgColor ?? defaultHeaderHoverBg;
|
|
6096
6111
|
const hoverText = style.hoverTextColor ?? style.textColor ?? defaultHeaderTextColor;
|
|
6112
|
+
const totalColumnsSize = table.getVisibleLeafColumns().reduce((sum, column) => sum + column.getSize(), 0);
|
|
6097
6113
|
const getSortIcon = (sortState) => {
|
|
6098
6114
|
if (sortState === "asc") return SortIconAsc;
|
|
6099
6115
|
if (sortState === "desc") return SortIconDesc;
|
|
6100
6116
|
return SortIcon;
|
|
6101
6117
|
};
|
|
6118
|
+
const getColumnStyle = (size) => {
|
|
6119
|
+
if (!size || totalColumnsSize <= 0) return void 0;
|
|
6120
|
+
return {
|
|
6121
|
+
width: `${size / totalColumnsSize * 100}%`,
|
|
6122
|
+
minWidth: size
|
|
6123
|
+
};
|
|
6124
|
+
};
|
|
6102
6125
|
const baseButtonStyle = {
|
|
6103
6126
|
padding: style.padding ?? "4px 10px",
|
|
6104
6127
|
fontSize: style.fontSize ?? 14,
|
|
@@ -6140,26 +6163,34 @@ var TableHeader = ({
|
|
|
6140
6163
|
const sortState = header.column.getIsSorted();
|
|
6141
6164
|
const Icon = canSort ? getSortIcon(sortState) : null;
|
|
6142
6165
|
const isHovered = hoveredHeaderId === header.id;
|
|
6143
|
-
return /* @__PURE__ */ jsx(
|
|
6144
|
-
|
|
6166
|
+
return /* @__PURE__ */ jsx(
|
|
6167
|
+
Table.Th,
|
|
6145
6168
|
{
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
header.column.
|
|
6157
|
-
header.
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6169
|
+
bg: bgColor,
|
|
6170
|
+
style: getColumnStyle(header.column.getSize()),
|
|
6171
|
+
children: /* @__PURE__ */ jsxs(
|
|
6172
|
+
UnstyledButton,
|
|
6173
|
+
{
|
|
6174
|
+
style: {
|
|
6175
|
+
...baseButtonStyle,
|
|
6176
|
+
color: isHovered ? hoverText : style.textColor ?? defaultHeaderTextColor,
|
|
6177
|
+
backgroundColor: isHovered ? hoverBg : void 0
|
|
6178
|
+
},
|
|
6179
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
6180
|
+
onMouseEnter: () => setHoveredHeaderId(header.id),
|
|
6181
|
+
onMouseLeave: () => setHoveredHeaderId(null),
|
|
6182
|
+
children: [
|
|
6183
|
+
header.isPlaceholder ? null : flexRender(
|
|
6184
|
+
header.column.columnDef.header,
|
|
6185
|
+
header.getContext()
|
|
6186
|
+
),
|
|
6187
|
+
Icon && /* @__PURE__ */ jsx(Icon, { size: 16 })
|
|
6188
|
+
]
|
|
6189
|
+
}
|
|
6190
|
+
)
|
|
6191
|
+
},
|
|
6192
|
+
header.id
|
|
6193
|
+
);
|
|
6163
6194
|
}),
|
|
6164
6195
|
hasActionsColumn && /* @__PURE__ */ jsx(Table.Th, { bg: bgColor })
|
|
6165
6196
|
] }, headerGroup.id)) });
|
|
@@ -6174,6 +6205,14 @@ var TableBody = ({
|
|
|
6174
6205
|
onRowHover
|
|
6175
6206
|
}) => {
|
|
6176
6207
|
const [hoveredRowId, setHoveredRowId] = useState(null);
|
|
6208
|
+
const totalColumnsSize = table.getVisibleLeafColumns().reduce((sum, column) => sum + column.getSize(), 0);
|
|
6209
|
+
const getColumnStyle = (size) => {
|
|
6210
|
+
if (!size || totalColumnsSize <= 0) return void 0;
|
|
6211
|
+
return {
|
|
6212
|
+
width: `${size / totalColumnsSize * 100}%`,
|
|
6213
|
+
minWidth: size
|
|
6214
|
+
};
|
|
6215
|
+
};
|
|
6177
6216
|
return /* @__PURE__ */ jsx(Table.Tbody, { children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs(
|
|
6178
6217
|
Table.Tr,
|
|
6179
6218
|
{
|
|
@@ -6217,7 +6256,7 @@ var TableBody = ({
|
|
|
6217
6256
|
row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(
|
|
6218
6257
|
Table.Td,
|
|
6219
6258
|
{
|
|
6220
|
-
style: cell.column.
|
|
6259
|
+
style: getColumnStyle(cell.column.getSize()),
|
|
6221
6260
|
onClick: () => onRowClick?.(row.original),
|
|
6222
6261
|
children: /* @__PURE__ */ jsx(
|
|
6223
6262
|
Text,
|
|
@@ -6947,6 +6986,6 @@ var FormPage = ({
|
|
|
6947
6986
|
] });
|
|
6948
6987
|
};
|
|
6949
6988
|
|
|
6950
|
-
export { BottomPagination, ButtonTypes, ChartType, ComparisonBy, CreateEditForm, DataTable, EmptyState, FieldTypes, FilterDate, FilterSelect, FormGenerator, FormPage, ImageForm, Permission, PromotionTypeEnum, SearchInput, SimpleDataTable, TablePage, TableSkeleton, api, attributeKeys, attributeQueryKeys, attributes, auth, bankTerminalKeys, bankTerminalQueryKeys, bankTerminals, batchKeys, batchQueryKeys, batches, categories, categoryKeys, categoryQueryKeys, changeOrderProduct, checkPendingReportZ, clientKeys, clientQueryKeys, clients, closeShift, configureApi, configureEnv, configureImageFormIcons, createAttribute, createAttributeValue, createAttributesForCategory, createAttributesValuesBatch, createBankTerminal, createBatch, createBatchAndUpdateOtherBatches, createCategory, createClient, createExchangeRate, createLocation, createMaterial, createMovement, createPriceType, createProduct, createProductVariant, createProductVariants, createPromotion, createProvider, createReturn, createRole, createUser, createWareHouse, dateGteFilterFn, defaultDataTableConfig, deleteAttribute, deleteBankTerminal, deleteCategory, deleteClient, deleteImageFromProduct, deleteLocation, deleteMaterial, deletePriceType, deleteProduct, deleteProductVariant, deleteProvider, deleteRole, deleteUser, deleteWarehouse, exchange, exchangeKeys, exchangeQueryKeys, fieldGenerator, folioKeys, folioQueryKeys, folios, genderKeys, genderQueryKeys, genders, generateFormSchema, getAllAgents, getAllBankTerminals, getAllCategories, getAllClients, getAllGenders, getAllLocations, getAllMaterials, getAllModules, getAllPermissions, getAllPriceTypes, getAllProviders, getAllStates, getAllTags, getAttributeById, getAttributeValues, getAttributes, getAttributesByCategoryID, getAttributesByProductID, getAttributesForSelect, getAttributesTable, getBankTerminalById, getBankTerminals, getBankTerminalsForSelect, getBatches, getBatchesForSelect, getCategories, getCategoriesForSelect, getCategoryById, getClientById, getClientsForSelect, getExchangeRate, getExchangeRates, getIsDevEnv, getLocationById, getLocations, getLocationsForSelect, getMatchedBatches, getMaterialById, getMaterials, getMaterialsForSelect, getMovements, getOrderById, getOrders, getOrdersStatusForSelect, getPaymentMethods, getPaymentMethodsWithAmountExpected, getPaymentTypes, getPermissionRoleByRoleID, getPriceTypeById, getPriceTypesForSelect, getProductById, getProductVariantById, getProductVariants, getProductVariantsForSelect, getProducts, getProductsByCategory, getProductsForSelect, getProductsTable, getPromotionById, getPromotions, getPromotionsTypeForSelect, getProviderById, getProvidersForSelect, getQRBaseUrl, getReportByInventory, getReportComparisonByTimeFrame, getReportX, getReportZ, getReturnsByOrderId, getRoleByID, getRoles, getSellersOfDayForSelect, getSellersWithShift, getStockByWarehouseReport, getTaxesForSelect, getUserById, getUsers, getWarehouseById, getWarehouses, getWarehousesForSelect, health, healthKeys, healthQueryKeys, healthService, isAValidDiscountCode, locationKeys, locationQueryKeys, locations, login, makeNewCashMovement, mapTableParamsToAttributeParams, mapTableParamsToProductParams, materialKeys, materialQueryKeys, materials, moduleKeys, moduleQueryKeys, modules, orderKeys, orderQueryKeys, orders, paymentKeys, paymentQueryKeys, payments, permissionKeys, permissionQueryKeys, permissions, pricePerGram, pricePerGramKeys, pricePerGramQueryKeys, pricePerGramService, priceTypeKeys, priceTypeQueryKeys, priceTypes, printProductTag, printQR, printReportX, printReportZ, productKeys, productQueryKeys, productTagKeys, productTagQueryKeys, productTags, products, promotionKeys, promotionQueryKeys, promotions, providerKeys, providerQueryKeys, providers, qr, qrKeys, qrQueryKeys, reportKeys, reportQueryKeys, reports, restoreBankTerminal, restoreCategory, restoreClient, restoreLocation, restoreProduct, restoreProductVariant, restoreProvider, restoreUser, restoreWarehouse, returnKeys, returnQueryKeys, returns, roleKeys, roleQueryKeys, roles, sendCreditPaymentData, sendPaymentData, setNewShift, shifts, stateKeys, stateQueryKeys, states, stockMovementKeys, stockMovementQueryKeys, stockMovements, taxKeys, taxQueryKeys, taxes, undeleteAttribute, undeleteMaterial, undeletePriceType, updateAttribute, updateAttributesForCategory, updateBankTerminal, updateBatch, updateCategory, updateClient, updateLocation, updateMaterial, updatePermission, updatePriceType, updateProduct, updateProductVariant, updatePromotion, updateProvider, updateRole, updateUser, updateWarehouse, 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, useMediaQuery, 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, userQueryKeys, users, warehouseKeys, warehouseQueryKeys, warehouses };
|
|
6989
|
+
export { BottomPagination, ButtonTypes, ChartType, ComparisonBy, CreateEditForm, DataTable, EmptyState, FieldTypes, FilterDate, FilterSelect, FormGenerator, FormPage, ImageForm, Permission, PromotionTypeEnum, SearchInput, SimpleDataTable, TablePage, TableSkeleton, api, attributeKeys, attributeQueryKeys, attributes, auth, bankTerminalKeys, bankTerminalQueryKeys, bankTerminals, batchKeys, batchQueryKeys, batches, categories, categoryKeys, categoryQueryKeys, changeOrderProduct, checkPendingReportZ, clientKeys, clientQueryKeys, clients, closeShift, configureApi, configureEnv, configureImageFormIcons, createAttribute, createAttributeValue, createAttributesForCategory, createAttributesValuesBatch, createBankTerminal, createBatch, createBatchAndUpdateOtherBatches, createCategory, createClient, createExchangeRate, createLocation, createMaterial, createMovement, createPriceType, createProduct, createProductVariant, createProductVariants, createPromotion, createProvider, createReturn, createRole, createUser, createWareHouse, dateGteFilterFn, defaultDataTableConfig, deleteAttribute, deleteBankTerminal, deleteCategory, deleteClient, deleteImageFromProduct, deleteLocation, deleteMaterial, deletePriceType, deleteProduct, deleteProductVariant, deleteProvider, deleteRole, deleteUser, deleteWarehouse, exchange, exchangeKeys, exchangeQueryKeys, fieldGenerator, folioKeys, folioQueryKeys, folios, genderKeys, genderQueryKeys, genders, generateFormSchema, getAllAgents, getAllBankTerminals, getAllCategories, getAllClients, getAllGenders, getAllLocations, getAllMaterials, getAllModules, getAllPermissions, getAllPriceTypes, getAllProviders, getAllStates, getAllTags, getAttributeById, getAttributeValues, getAttributes, getAttributesByCategoryID, getAttributesByProductID, getAttributesForSelect, getAttributesTable, getBankTerminalById, getBankTerminals, getBankTerminalsForSelect, getBatchById, getBatches, getBatchesForSelect, getCategories, getCategoriesForSelect, getCategoryById, getClientById, getClientsForSelect, getExchangeRate, getExchangeRates, getIsDevEnv, getLocationById, getLocations, getLocationsForSelect, getMatchedBatches, getMaterialById, getMaterials, getMaterialsForSelect, getMovements, getOrderById, getOrders, getOrdersStatusForSelect, getPaymentMethods, getPaymentMethodsWithAmountExpected, getPaymentTypes, getPermissionRoleByRoleID, getPriceTypeById, getPriceTypesForSelect, getProductById, getProductVariantById, getProductVariants, getProductVariantsForSelect, getProducts, getProductsByCategory, getProductsForSelect, getProductsTable, getPromotionById, getPromotions, getPromotionsTypeForSelect, getProviderById, getProvidersForSelect, getQRBaseUrl, getReportByInventory, getReportComparisonByTimeFrame, getReportX, getReportZ, getReturnsByOrderId, getRoleByID, getRoles, getSellersOfDayForSelect, getSellersWithShift, getStockByWarehouseReport, getTaxesForSelect, getUserById, getUsers, getWarehouseById, getWarehouses, getWarehousesForSelect, health, healthKeys, healthQueryKeys, healthService, isAValidDiscountCode, locationKeys, locationQueryKeys, locations, login, makeNewCashMovement, mapTableParamsToAttributeParams, mapTableParamsToProductParams, materialKeys, materialQueryKeys, materials, moduleKeys, moduleQueryKeys, modules, orderKeys, orderQueryKeys, orders, paymentKeys, paymentQueryKeys, payments, permissionKeys, permissionQueryKeys, permissions, pricePerGram, pricePerGramKeys, pricePerGramQueryKeys, pricePerGramService, priceTypeKeys, priceTypeQueryKeys, priceTypes, printProductTag, printQR, printReportX, printReportZ, productKeys, productQueryKeys, productTagKeys, productTagQueryKeys, productTags, products, promotionKeys, promotionQueryKeys, promotions, providerKeys, providerQueryKeys, providers, qr, qrKeys, qrQueryKeys, reportKeys, reportQueryKeys, reports, restoreBankTerminal, restoreCategory, restoreClient, restoreLocation, restoreProduct, restoreProductVariant, restoreProvider, restoreUser, restoreWarehouse, returnKeys, returnQueryKeys, returns, roleKeys, roleQueryKeys, roles, sendCreditPaymentData, sendPaymentData, setNewShift, shifts, stateKeys, stateQueryKeys, states, stockMovementKeys, stockMovementQueryKeys, stockMovements, taxKeys, taxQueryKeys, taxes, undeleteAttribute, undeleteMaterial, undeletePriceType, updateAttribute, updateAttributesForCategory, updateBankTerminal, updateBatch, updateCategory, updateClient, updateLocation, updateMaterial, updatePermission, updatePriceType, updateProduct, updateProductVariant, updatePromotion, updateProvider, updateRole, updateUser, updateWarehouse, useAllAgents, useAllBankTerminals, useAllCategories, useAllGenders, useAllLocations, useAllMaterials, useAllModules, useAllProductTags, useAllStates, useAttribute, useAttributeValues, useAttributes, useAttributesByCategoryID, useAttributesByProductID, useAttributesForSelect, useAttributesTable, useBankTerminal, useBankTerminals, useBankTerminalsForSelect, useBankTerminalsTable, useBatchById, 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, useMediaQuery, 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, userQueryKeys, users, warehouseKeys, warehouseQueryKeys, warehouses };
|
|
6951
6990
|
//# sourceMappingURL=index.js.map
|
|
6952
6991
|
//# sourceMappingURL=index.js.map
|