@harbortouch/skytab-analytics-report-utils 0.4.6 → 0.4.7

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.
@@ -1,4 +1,4 @@
1
- export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'status';
1
+ export type ReportColumnKey = 'fifteenMinInterval' | 'adjustedTips' | 'advantageProgram' | 'amex' | 'amexReturns' | 'attachRate' | 'autoGratuity' | 'averageGrossPrice' | 'bankFees' | 'batchAmount' | 'batchDate' | 'batchNumber' | 'clockInTime' | 'clockOutTime' | 'country' | 'customerName' | 'date' | 'dateClose' | 'daypart' | 'debit' | 'debitReturns' | 'declaredTips' | 'department' | 'depositCurrency' | 'depositDate' | 'discountAmount' | 'discountCount' | 'discover' | 'discoverReturns' | 'ebt' | 'ebtReturns' | 'employeeId' | 'employeeJob' | 'employeeName' | 'exemptTaxes' | 'grandTotal' | 'grossCashSales' | 'grossCashTips' | 'grossCreditCardTips' | 'grossCreditSales' | 'grossSales' | 'grossTips' | 'guestCount' | 'guestsVarLw' | 'guestsVarLwPct' | 'guestsVarLy' | 'guestsVarLyPct' | 'hour' | 'hoursWorked' | 'inclusiveTax' | 'itemName' | 'itemPrice' | 'locationCity' | 'locationId' | 'locationMid' | 'locationName' | 'locationState' | 'mastercard' | 'mcReturns' | 'modifierName' | 'modifierPrice' | 'modifierQuantity' | 'netSales' | 'netTaxCollected' | 'netTips' | 'numberOfGuests' | 'orderType' | 'paymentType' | 'payrollId' | 'quantity' | 'referenceNumber' | 'refundAmount' | 'refundedTaxAmount' | 'revenueCenter' | 'revenueClass' | 'salesVarLw' | 'salesVarLwPct' | 'salesVarLy' | 'salesVarLyPct' | 'salesMixByPct' | 'salesPerGuest' | 'salesPerGuestLw' | 'salesPerGuestLy' | 'scheduledShiftEnd' | 'scheduledShiftStart' | 'settlementBatchDate' | 'shiftDurationHrs' | 'subtotal' | 'taxCollected' | 'taxName' | 'taxRate' | 'taxableSales' | 'ticketClosed' | 'ticketFee' | 'ticketNumber' | 'ticketOpen' | 'ticketTotal' | 'timeOpenMins' | 'tipPct' | 'tipReduction' | 'tipShare' | 'tips' | 'tipsPerHour' | 'totalCollected' | 'totalItemSales' | 'totalModifierSales' | 'totalReturns' | 'totalSales' | 'totalTips' | 'transactionDate' | 'transactionType' | 'untaxedSales' | 'visa' | 'visaReturns' | 'paymentsCount' | 'paymentsAmount' | 'paymentsTotal' | 'refundVoidDescription' | 'refundVoidCount' | 'refundVoidAmount' | 'refundVoidPctSales' | 'discountName' | 'tickets' | 'guests' | 'ticketAverage' | 'guestAverage' | 'net' | 'status';
2
2
  export interface ColumnMetadata {
3
3
  titleKey: string;
4
4
  shortTitleKey: string;
package/dist/index.cjs CHANGED
@@ -42,6 +42,8 @@ __export(index_exports, {
42
42
  PRODUCT_MIX_AVAILABLE_COLUMNS: () => PRODUCT_MIX_AVAILABLE_COLUMNS,
43
43
  PRODUCT_MIX_CHART_FIELDS: () => PRODUCT_MIX_CHART_FIELDS,
44
44
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS: () => PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
45
+ SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
46
+ SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
45
47
  SALES_SUMMARY_AVAILABLE_COLUMNS: () => SALES_SUMMARY_AVAILABLE_COLUMNS,
46
48
  SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS: () => SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
47
49
  TICKET_LIVE_AVAILABLE_COLUMNS: () => TICKET_LIVE_AVAILABLE_COLUMNS,
@@ -62,6 +64,7 @@ __export(index_exports, {
62
64
  itemTaxConfig: () => itemTaxConfig,
63
65
  modifierMixConfig: () => modifierMixConfig,
64
66
  productMixConfig: () => productMixConfig,
67
+ salesByItemDetailConfig: () => salesByItemDetailConfig,
65
68
  salesSummaryConfig: () => salesSummaryConfig,
66
69
  ticketLiveConfig: () => ticketLiveConfig,
67
70
  ticketSummaryConfig: () => ticketSummaryConfig
@@ -335,6 +338,11 @@ var COLUMN_REGISTRY = {
335
338
  shortTitleKey: "common.report-col.location-city.short",
336
339
  infoTextKey: "common.report-col.location-city.info"
337
340
  },
341
+ locationId: {
342
+ titleKey: "common.report-col.location-id",
343
+ shortTitleKey: "common.report-col.location-id.short",
344
+ infoTextKey: "common.report-col.location-id.info"
345
+ },
338
346
  locationMid: {
339
347
  titleKey: "common.report-col.location-mid",
340
348
  shortTitleKey: "common.report-col.location-mid.short",
@@ -1491,6 +1499,54 @@ var employeeTimecardConfig = {
1491
1499
  columnGroups: []
1492
1500
  // No column groups for this report
1493
1501
  };
1502
+
1503
+ // src/reports/salesByItemDetail.ts
1504
+ var FIELDS13 = {
1505
+ businessDate: { type: "string", columnKey: "date", filteringAvailable: false },
1506
+ ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1507
+ hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
1508
+ daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
1509
+ locationId: { type: "number", columnKey: "locationId", filteringAvailable: false },
1510
+ locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
1511
+ departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
1512
+ itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
1513
+ revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
1514
+ revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
1515
+ salesAmountNet: { type: "money", columnKey: "netSales" },
1516
+ itemsQuantity: { type: "number", columnKey: "quantity" },
1517
+ transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
1518
+ guestsCount: { type: "number", columnKey: "guestCount" },
1519
+ employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1520
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1521
+ salesType: { type: "string", columnKey: "transactionType", filteringAvailable: false },
1522
+ itemPrice: { type: "money", columnKey: "itemPrice" }
1523
+ };
1524
+ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
1525
+ "businessDate",
1526
+ "ticketClosedAt",
1527
+ "hourId",
1528
+ "daypartName",
1529
+ "locationId",
1530
+ "locationName",
1531
+ "departmentName",
1532
+ "itemName",
1533
+ "revenueCenterName",
1534
+ "revenueClassName",
1535
+ "salesAmountNet",
1536
+ "itemsQuantity",
1537
+ "transactionId",
1538
+ "guestsCount",
1539
+ "employeeName",
1540
+ "orderTypeName",
1541
+ "salesType",
1542
+ "itemPrice"
1543
+ ];
1544
+ var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
1545
+ var salesByItemDetailConfig = {
1546
+ fields: FIELDS13,
1547
+ availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1548
+ defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
1549
+ };
1494
1550
  // Annotate the CommonJS export names for ESM import in node:
1495
1551
  0 && (module.exports = {
1496
1552
  COLUMN_REGISTRY,
@@ -1515,6 +1571,8 @@ var employeeTimecardConfig = {
1515
1571
  PRODUCT_MIX_AVAILABLE_COLUMNS,
1516
1572
  PRODUCT_MIX_CHART_FIELDS,
1517
1573
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1574
+ SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1575
+ SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
1518
1576
  SALES_SUMMARY_AVAILABLE_COLUMNS,
1519
1577
  SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
1520
1578
  TICKET_LIVE_AVAILABLE_COLUMNS,
@@ -1535,6 +1593,7 @@ var employeeTimecardConfig = {
1535
1593
  itemTaxConfig,
1536
1594
  modifierMixConfig,
1537
1595
  productMixConfig,
1596
+ salesByItemDetailConfig,
1538
1597
  salesSummaryConfig,
1539
1598
  ticketLiveConfig,
1540
1599
  ticketSummaryConfig
package/dist/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export { dailySalesDiscountsConfig, DAILY_SALES_DISCOUNTS_AVAILABLE_COLUMNS, DAI
16
16
  export { dailySalesRefundsVoidsConfig, DAILY_SALES_REFUNDS_VOIDS_AVAILABLE_COLUMNS, DAILY_SALES_REFUNDS_VOIDS_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesRefundsVoids';
17
17
  export { dailySalesTaxesConfig, DAILY_SALES_TAXES_AVAILABLE_COLUMNS, DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS, } from './reports/dailySalesTaxes';
18
18
  export { employeeTimecardConfig, EMPLOYEE_TIMECARD_AVAILABLE_COLUMNS, EMPLOYEE_TIMECARD_DEFAULT_VISIBLE_COLUMNS, } from './reports/employeeTimecard';
19
+ export { salesByItemDetailConfig, SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS, SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS, } from './reports/salesByItemDetail';
package/dist/index.js CHANGED
@@ -265,6 +265,11 @@ var COLUMN_REGISTRY = {
265
265
  shortTitleKey: "common.report-col.location-city.short",
266
266
  infoTextKey: "common.report-col.location-city.info"
267
267
  },
268
+ locationId: {
269
+ titleKey: "common.report-col.location-id",
270
+ shortTitleKey: "common.report-col.location-id.short",
271
+ infoTextKey: "common.report-col.location-id.info"
272
+ },
268
273
  locationMid: {
269
274
  titleKey: "common.report-col.location-mid",
270
275
  shortTitleKey: "common.report-col.location-mid.short",
@@ -1421,6 +1426,54 @@ var employeeTimecardConfig = {
1421
1426
  columnGroups: []
1422
1427
  // No column groups for this report
1423
1428
  };
1429
+
1430
+ // src/reports/salesByItemDetail.ts
1431
+ var FIELDS13 = {
1432
+ businessDate: { type: "string", columnKey: "date", filteringAvailable: false },
1433
+ ticketClosedAt: { type: "string", columnKey: "ticketClosed", filteringAvailable: false },
1434
+ hourId: { type: "number", columnKey: "hour", filteringAvailable: false },
1435
+ daypartName: { type: "string", columnKey: "daypart", filteringAvailable: false },
1436
+ locationId: { type: "number", columnKey: "locationId", filteringAvailable: false },
1437
+ locationName: { type: "string", columnKey: "locationName", filteringAvailable: false },
1438
+ departmentName: { type: "string", columnKey: "department", filteringAvailable: false },
1439
+ itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
1440
+ revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
1441
+ revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
1442
+ salesAmountNet: { type: "money", columnKey: "netSales" },
1443
+ itemsQuantity: { type: "number", columnKey: "quantity" },
1444
+ transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
1445
+ guestsCount: { type: "number", columnKey: "guestCount" },
1446
+ employeeName: { type: "string", columnKey: "employeeName", filteringAvailable: false },
1447
+ orderTypeName: { type: "string", columnKey: "orderType", filteringAvailable: false },
1448
+ salesType: { type: "string", columnKey: "transactionType", filteringAvailable: false },
1449
+ itemPrice: { type: "money", columnKey: "itemPrice" }
1450
+ };
1451
+ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
1452
+ "businessDate",
1453
+ "ticketClosedAt",
1454
+ "hourId",
1455
+ "daypartName",
1456
+ "locationId",
1457
+ "locationName",
1458
+ "departmentName",
1459
+ "itemName",
1460
+ "revenueCenterName",
1461
+ "revenueClassName",
1462
+ "salesAmountNet",
1463
+ "itemsQuantity",
1464
+ "transactionId",
1465
+ "guestsCount",
1466
+ "employeeName",
1467
+ "orderTypeName",
1468
+ "salesType",
1469
+ "itemPrice"
1470
+ ];
1471
+ var SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS = SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS;
1472
+ var salesByItemDetailConfig = {
1473
+ fields: FIELDS13,
1474
+ availableColumns: SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1475
+ defaultVisibleColumns: SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS
1476
+ };
1424
1477
  export {
1425
1478
  COLUMN_REGISTRY,
1426
1479
  DAILY_SALES_AVAILABLE_COLUMNS,
@@ -1444,6 +1497,8 @@ export {
1444
1497
  PRODUCT_MIX_AVAILABLE_COLUMNS,
1445
1498
  PRODUCT_MIX_CHART_FIELDS,
1446
1499
  PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
1500
+ SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
1501
+ SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
1447
1502
  SALES_SUMMARY_AVAILABLE_COLUMNS,
1448
1503
  SALES_SUMMARY_DEFAULT_VISIBLE_COLUMNS,
1449
1504
  TICKET_LIVE_AVAILABLE_COLUMNS,
@@ -1464,6 +1519,7 @@ export {
1464
1519
  itemTaxConfig,
1465
1520
  modifierMixConfig,
1466
1521
  productMixConfig,
1522
+ salesByItemDetailConfig,
1467
1523
  salesSummaryConfig,
1468
1524
  ticketLiveConfig,
1469
1525
  ticketSummaryConfig
@@ -0,0 +1,6 @@
1
+ import { type ReportConfig } from '../types';
2
+ type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountNet' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
3
+ export declare const SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: SalesByItemDetailField[];
4
+ export declare const SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: SalesByItemDetailField[];
5
+ export declare const salesByItemDetailConfig: ReportConfig<SalesByItemDetailField>;
6
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harbortouch/skytab-analytics-report-utils",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "Centralized report column presentation configuration for SkyTab Analytics",
5
5
  "engines": {
6
6
  "node": ">=22.6.0",