@harbortouch/skytab-analytics-report-utils 0.4.8 → 0.5.1
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 +17 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -2
- package/dist/report.d.ts +12 -0
- package/dist/reports/salesByItemDetail.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __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
|
+
Report: () => Report,
|
|
45
46
|
SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
|
|
46
47
|
SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: () => SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
|
|
47
48
|
SALES_SUMMARY_AVAILABLE_COLUMNS: () => SALES_SUMMARY_AVAILABLE_COLUMNS,
|
|
@@ -71,6 +72,19 @@ __export(index_exports, {
|
|
|
71
72
|
});
|
|
72
73
|
module.exports = __toCommonJS(index_exports);
|
|
73
74
|
|
|
75
|
+
// src/report.ts
|
|
76
|
+
var Report = {
|
|
77
|
+
TICKET_LIVE: "ticket-live",
|
|
78
|
+
TICKET_ANALYTICS: "ticket-analytics",
|
|
79
|
+
SALES_SUMMARY: "sales-summary",
|
|
80
|
+
PRODUCT_MIX: "product-mix",
|
|
81
|
+
MODIFIER_MIX: "modifier-mix",
|
|
82
|
+
ITEM_TAX: "item-tax",
|
|
83
|
+
EMPLOYEE_TIMECARD: "employee-timecard",
|
|
84
|
+
EMPLOYEE_TIP: "employee-tip",
|
|
85
|
+
SALES_BY_ITEM: "sales-by-item"
|
|
86
|
+
};
|
|
87
|
+
|
|
74
88
|
// src/columns/index.ts
|
|
75
89
|
var COLUMN_REGISTRY = {
|
|
76
90
|
fifteenMinInterval: {
|
|
@@ -1517,7 +1531,7 @@ var FIELDS13 = {
|
|
|
1517
1531
|
itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
|
|
1518
1532
|
revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
|
|
1519
1533
|
revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
|
|
1520
|
-
|
|
1534
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1521
1535
|
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
1522
1536
|
transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
|
|
1523
1537
|
guestsCount: { type: "number", columnKey: "guestCount" },
|
|
@@ -1537,7 +1551,7 @@ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
|
|
|
1537
1551
|
"itemName",
|
|
1538
1552
|
"revenueCenterName",
|
|
1539
1553
|
"revenueClassName",
|
|
1540
|
-
"
|
|
1554
|
+
"salesAmountGross",
|
|
1541
1555
|
"itemsQuantity",
|
|
1542
1556
|
"transactionId",
|
|
1543
1557
|
"guestsCount",
|
|
@@ -1576,6 +1590,7 @@ var salesByItemDetailConfig = {
|
|
|
1576
1590
|
PRODUCT_MIX_AVAILABLE_COLUMNS,
|
|
1577
1591
|
PRODUCT_MIX_CHART_FIELDS,
|
|
1578
1592
|
PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
|
|
1593
|
+
Report,
|
|
1579
1594
|
SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
|
|
1580
1595
|
SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
|
|
1581
1596
|
SALES_SUMMARY_AVAILABLE_COLUMNS,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { FieldType, ColumnAlignment, FooterCalculationType, FooterCalculation, ColumnPresentationConfig, ColumnGroupConfig, ReportConfig, } from './types';
|
|
2
|
+
export { type ReportType, Report } from './report';
|
|
2
3
|
export type { ReportColumnKey, ColumnMetadata } from './columns';
|
|
3
4
|
export { COLUMN_REGISTRY, getColumnMetadata } from './columns';
|
|
4
5
|
export { getColumnAlignment, isNumericType } from './utils/alignment';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
// src/report.ts
|
|
2
|
+
var Report = {
|
|
3
|
+
TICKET_LIVE: "ticket-live",
|
|
4
|
+
TICKET_ANALYTICS: "ticket-analytics",
|
|
5
|
+
SALES_SUMMARY: "sales-summary",
|
|
6
|
+
PRODUCT_MIX: "product-mix",
|
|
7
|
+
MODIFIER_MIX: "modifier-mix",
|
|
8
|
+
ITEM_TAX: "item-tax",
|
|
9
|
+
EMPLOYEE_TIMECARD: "employee-timecard",
|
|
10
|
+
EMPLOYEE_TIP: "employee-tip",
|
|
11
|
+
SALES_BY_ITEM: "sales-by-item"
|
|
12
|
+
};
|
|
13
|
+
|
|
1
14
|
// src/columns/index.ts
|
|
2
15
|
var COLUMN_REGISTRY = {
|
|
3
16
|
fifteenMinInterval: {
|
|
@@ -1444,7 +1457,7 @@ var FIELDS13 = {
|
|
|
1444
1457
|
itemName: { type: "string", columnKey: "itemName", filteringAvailable: false },
|
|
1445
1458
|
revenueCenterName: { type: "string", columnKey: "revenueCenter", filteringAvailable: false },
|
|
1446
1459
|
revenueClassName: { type: "string", columnKey: "revenueClass", filteringAvailable: false },
|
|
1447
|
-
|
|
1460
|
+
salesAmountGross: { type: "money", columnKey: "grossSales" },
|
|
1448
1461
|
itemsQuantity: { type: "number", columnKey: "quantity" },
|
|
1449
1462
|
transactionId: { type: "string", columnKey: "ticketNumber", filteringAvailable: false },
|
|
1450
1463
|
guestsCount: { type: "number", columnKey: "guestCount" },
|
|
@@ -1464,7 +1477,7 @@ var SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS = [
|
|
|
1464
1477
|
"itemName",
|
|
1465
1478
|
"revenueCenterName",
|
|
1466
1479
|
"revenueClassName",
|
|
1467
|
-
"
|
|
1480
|
+
"salesAmountGross",
|
|
1468
1481
|
"itemsQuantity",
|
|
1469
1482
|
"transactionId",
|
|
1470
1483
|
"guestsCount",
|
|
@@ -1502,6 +1515,7 @@ export {
|
|
|
1502
1515
|
PRODUCT_MIX_AVAILABLE_COLUMNS,
|
|
1503
1516
|
PRODUCT_MIX_CHART_FIELDS,
|
|
1504
1517
|
PRODUCT_MIX_DEFAULT_VISIBLE_COLUMNS,
|
|
1518
|
+
Report,
|
|
1505
1519
|
SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS,
|
|
1506
1520
|
SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS,
|
|
1507
1521
|
SALES_SUMMARY_AVAILABLE_COLUMNS,
|
package/dist/report.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const Report: {
|
|
2
|
+
readonly TICKET_LIVE: "ticket-live";
|
|
3
|
+
readonly TICKET_ANALYTICS: "ticket-analytics";
|
|
4
|
+
readonly SALES_SUMMARY: "sales-summary";
|
|
5
|
+
readonly PRODUCT_MIX: "product-mix";
|
|
6
|
+
readonly MODIFIER_MIX: "modifier-mix";
|
|
7
|
+
readonly ITEM_TAX: "item-tax";
|
|
8
|
+
readonly EMPLOYEE_TIMECARD: "employee-timecard";
|
|
9
|
+
readonly EMPLOYEE_TIP: "employee-tip";
|
|
10
|
+
readonly SALES_BY_ITEM: "sales-by-item";
|
|
11
|
+
};
|
|
12
|
+
export type ReportType = (typeof Report)[keyof typeof Report];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReportConfig } from '../types';
|
|
2
|
-
type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | '
|
|
2
|
+
type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
|
|
3
3
|
export declare const SALES_BY_ITEM_DETAIL_AVAILABLE_COLUMNS: SalesByItemDetailField[];
|
|
4
4
|
export declare const SALES_BY_ITEM_DETAIL_DEFAULT_VISIBLE_COLUMNS: SalesByItemDetailField[];
|
|
5
5
|
export declare const salesByItemDetailConfig: ReportConfig<SalesByItemDetailField>;
|