@harbortouch/skytab-analytics-report-utils 0.10.0 → 0.12.0
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 +228 -308
- package/dist/index.d.cts +101 -45
- package/dist/index.d.ts +101 -45
- package/dist/index.js +227 -279
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1219,6 +1219,8 @@ interface ReportConfig<TField extends string = string> {
|
|
|
1219
1219
|
availableColumns: TField[];
|
|
1220
1220
|
defaultVisibleColumns: TField[];
|
|
1221
1221
|
columnGroups?: ColumnGroupConfig[];
|
|
1222
|
+
chartFields?: TField[];
|
|
1223
|
+
hasFooter: boolean;
|
|
1222
1224
|
}
|
|
1223
1225
|
|
|
1224
1226
|
declare const Report: {
|
|
@@ -1233,6 +1235,7 @@ declare const Report: {
|
|
|
1233
1235
|
readonly SALES_BY_ITEM: "sales-by-item";
|
|
1234
1236
|
readonly DAILY_SALES: "daily-sales";
|
|
1235
1237
|
readonly DAILY_SALES_LIVE: "daily-sales-live";
|
|
1238
|
+
readonly DAILY_SALES_TRENDS: "daily-sales-trends";
|
|
1236
1239
|
};
|
|
1237
1240
|
type ReportType = (typeof Report)[keyof typeof Report];
|
|
1238
1241
|
declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
|
|
@@ -1248,73 +1251,126 @@ declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: Column
|
|
|
1248
1251
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
|
|
1249
1252
|
|
|
1250
1253
|
type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
|
|
1251
|
-
declare const
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
+
declare const salesSummaryConfig: {
|
|
1255
|
+
readonly fields: Record<SalesSummaryField, ColumnPresentationConfig<SalesSummaryField>>;
|
|
1256
|
+
readonly availableColumns: SalesSummaryField[];
|
|
1257
|
+
readonly defaultVisibleColumns: SalesSummaryField[];
|
|
1258
|
+
readonly columnGroups: ColumnGroupConfig[];
|
|
1259
|
+
readonly hasFooter: true;
|
|
1260
|
+
};
|
|
1254
1261
|
|
|
1255
1262
|
type TicketSummaryField = 'ticketId' | 'locationId' | 'orderName' | 'revenueCenterName' | 'daypartName' | 'inclusiveTaxesAmount' | 'locationName' | 'orderNumber' | 'businessDate' | 'ticketOpenedAt' | 'ticketClosedAt' | 'ticketTime' | 'ticketSubtotal' | 'discountsAmount' | 'surchargesAmount' | 'taxesAmount' | 'ticketGrandTotal' | 'gratuitiesAmount' | 'tipAmount' | 'paymentsAmount' | 'paymentTypeName' | 'guestsCount' | 'employeeName' | 'orderTypeName';
|
|
1256
|
-
declare const
|
|
1257
|
-
|
|
1258
|
-
|
|
1263
|
+
declare const ticketSummaryConfig: {
|
|
1264
|
+
readonly fields: Record<TicketSummaryField, ColumnPresentationConfig<TicketSummaryField>>;
|
|
1265
|
+
readonly availableColumns: TicketSummaryField[];
|
|
1266
|
+
readonly defaultVisibleColumns: TicketSummaryField[];
|
|
1267
|
+
readonly hasFooter: true;
|
|
1268
|
+
};
|
|
1259
1269
|
|
|
1260
1270
|
type TicketLiveField = 'locationName' | 'orderNumber' | 'dateOpen' | 'timeOpen' | 'dateClose' | 'timeClose' | 'durationMinutes' | 'subtotal' | 'discountTotal' | 'surchargeTotal' | 'taxTotal' | 'grandTotal' | 'gratuityTotal' | 'totalTips' | 'paymentsReceived' | 'paymentTypeName' | 'guestCount' | 'customerName' | 'employeeName' | 'orderType';
|
|
1261
|
-
declare const
|
|
1262
|
-
|
|
1263
|
-
|
|
1271
|
+
declare const ticketLiveConfig: {
|
|
1272
|
+
readonly fields: Record<TicketLiveField, ColumnPresentationConfig<TicketLiveField>>;
|
|
1273
|
+
readonly availableColumns: TicketLiveField[];
|
|
1274
|
+
readonly defaultVisibleColumns: TicketLiveField[];
|
|
1275
|
+
readonly hasFooter: true;
|
|
1276
|
+
};
|
|
1264
1277
|
|
|
1265
1278
|
type ProductMixField = 'groupById' | 'groupByName' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'itemsQuantity' | 'avgPrice' | 'salesMixPct';
|
|
1266
|
-
declare const
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1279
|
+
declare const productMixConfig: {
|
|
1280
|
+
readonly fields: Record<ProductMixField, ColumnPresentationConfig<ProductMixField>>;
|
|
1281
|
+
readonly availableColumns: ProductMixField[];
|
|
1282
|
+
readonly defaultVisibleColumns: ProductMixField[];
|
|
1283
|
+
readonly chartFields: ProductMixField[];
|
|
1284
|
+
readonly hasFooter: true;
|
|
1285
|
+
};
|
|
1270
1286
|
|
|
1271
1287
|
type ModifierMixField = 'groupById' | 'groupByName' | 'groupById2' | 'groupByName2' | 'modifiersSales' | 'modifiersQuantity' | 'itemsQuantity' | 'avgGross' | 'attachRate' | 'modifiersSalesComp' | 'modifiersQuantityComp' | 'itemsQuantityComp' | 'attachRateComp' | 'modifiersSalesVar' | 'modifiersSalesVarPct' | 'modifiersQuantityVar' | 'modifiersQuantityVarPct' | 'attachRateVar' | 'attachRateVarPct';
|
|
1272
|
-
declare const
|
|
1273
|
-
|
|
1274
|
-
|
|
1288
|
+
declare const modifierMixConfig: {
|
|
1289
|
+
readonly fields: Record<ModifierMixField, ColumnPresentationConfig<ModifierMixField>>;
|
|
1290
|
+
readonly availableColumns: ModifierMixField[];
|
|
1291
|
+
readonly defaultVisibleColumns: ModifierMixField[];
|
|
1292
|
+
readonly hasFooter: true;
|
|
1293
|
+
};
|
|
1275
1294
|
|
|
1276
1295
|
type ItemTaxField = 'locationId' | 'taxIsFlat' | 'merchantId' | 'locationName' | 'locationCity' | 'locationState' | 'itemName' | 'itemPrice' | 'departmentName' | 'revenueClassName' | 'orderTypeName' | 'taxName' | 'taxValue' | 'taxRate' | 'recordsCount' | 'taxableSales' | 'totalCollected' | 'itemTax' | 'taxCollected';
|
|
1277
|
-
declare const
|
|
1278
|
-
|
|
1279
|
-
|
|
1296
|
+
declare const itemTaxConfig: {
|
|
1297
|
+
readonly fields: Record<ItemTaxField, ColumnPresentationConfig<ItemTaxField>>;
|
|
1298
|
+
readonly availableColumns: ItemTaxField[];
|
|
1299
|
+
readonly defaultVisibleColumns: ItemTaxField[];
|
|
1300
|
+
readonly hasFooter: false;
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct';
|
|
1304
|
+
declare const dailySalesConfig: {
|
|
1305
|
+
readonly fields: Record<DailySalesField, ColumnPresentationConfig<DailySalesField>>;
|
|
1306
|
+
readonly availableColumns: DailySalesField[];
|
|
1307
|
+
readonly defaultVisibleColumns: DailySalesField[];
|
|
1308
|
+
readonly hasFooter: true;
|
|
1309
|
+
};
|
|
1280
1310
|
|
|
1281
|
-
type
|
|
1282
|
-
declare const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1311
|
+
type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
|
|
1312
|
+
declare const dailySalesLiveConfig: {
|
|
1313
|
+
readonly fields: Record<DailySalesLiveField, ColumnPresentationConfig<DailySalesLiveField>>;
|
|
1314
|
+
readonly availableColumns: DailySalesLiveField[];
|
|
1315
|
+
readonly defaultVisibleColumns: DailySalesLiveField[];
|
|
1316
|
+
readonly hasFooter: true;
|
|
1317
|
+
};
|
|
1288
1318
|
|
|
1289
1319
|
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
1290
|
-
declare const
|
|
1291
|
-
|
|
1292
|
-
|
|
1320
|
+
declare const dailySalesPaymentsConfig: {
|
|
1321
|
+
readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
|
|
1322
|
+
readonly availableColumns: DailySalesPaymentsField[];
|
|
1323
|
+
readonly defaultVisibleColumns: DailySalesPaymentsField[];
|
|
1324
|
+
readonly hasFooter: true;
|
|
1325
|
+
};
|
|
1293
1326
|
|
|
1294
1327
|
type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
|
|
1295
|
-
declare const
|
|
1296
|
-
|
|
1297
|
-
|
|
1328
|
+
declare const dailySalesDiscountsConfig: {
|
|
1329
|
+
readonly fields: Record<DailySalesDiscountsField, ColumnPresentationConfig<DailySalesDiscountsField>>;
|
|
1330
|
+
readonly availableColumns: DailySalesDiscountsField[];
|
|
1331
|
+
readonly defaultVisibleColumns: DailySalesDiscountsField[];
|
|
1332
|
+
readonly hasFooter: true;
|
|
1333
|
+
};
|
|
1298
1334
|
|
|
1299
1335
|
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
1300
|
-
declare const
|
|
1301
|
-
|
|
1302
|
-
|
|
1336
|
+
declare const dailySalesRefundsVoidsConfig: {
|
|
1337
|
+
readonly fields: Record<DailySalesRefundsVoidsField, ColumnPresentationConfig<DailySalesRefundsVoidsField>>;
|
|
1338
|
+
readonly availableColumns: DailySalesRefundsVoidsField[];
|
|
1339
|
+
readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
|
|
1340
|
+
readonly hasFooter: true;
|
|
1341
|
+
};
|
|
1303
1342
|
|
|
1304
1343
|
type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
|
|
1305
|
-
declare const
|
|
1306
|
-
|
|
1307
|
-
|
|
1344
|
+
declare const dailySalesTaxesConfig: {
|
|
1345
|
+
readonly fields: Record<DailySalesTaxesField, ColumnPresentationConfig<DailySalesTaxesField>>;
|
|
1346
|
+
readonly availableColumns: DailySalesTaxesField[];
|
|
1347
|
+
readonly defaultVisibleColumns: DailySalesTaxesField[];
|
|
1348
|
+
readonly hasFooter: true;
|
|
1349
|
+
};
|
|
1308
1350
|
|
|
1309
1351
|
type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
|
|
1310
|
-
declare const
|
|
1311
|
-
|
|
1312
|
-
|
|
1352
|
+
declare const employeeTimecardConfig: {
|
|
1353
|
+
readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
|
|
1354
|
+
readonly availableColumns: EmployeeTimecardField[];
|
|
1355
|
+
readonly defaultVisibleColumns: EmployeeTimecardField[];
|
|
1356
|
+
readonly hasFooter: true;
|
|
1357
|
+
};
|
|
1313
1358
|
|
|
1314
1359
|
type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
|
|
1315
|
-
declare const
|
|
1316
|
-
|
|
1317
|
-
|
|
1360
|
+
declare const salesByItemDetailConfig: {
|
|
1361
|
+
readonly fields: Record<SalesByItemDetailField, ColumnPresentationConfig<SalesByItemDetailField>>;
|
|
1362
|
+
readonly availableColumns: SalesByItemDetailField[];
|
|
1363
|
+
readonly defaultVisibleColumns: SalesByItemDetailField[];
|
|
1364
|
+
readonly hasFooter: false;
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1367
|
+
type DailySalesTrendsField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'ticketsCount' | 'guestsCount' | 'ticketAvg' | 'guestAvg';
|
|
1368
|
+
declare const dailySalesTrendsConfig: {
|
|
1369
|
+
readonly fields: Record<DailySalesTrendsField, ColumnPresentationConfig<DailySalesTrendsField>>;
|
|
1370
|
+
readonly availableColumns: DailySalesTrendsField[];
|
|
1371
|
+
readonly defaultVisibleColumns: DailySalesTrendsField[];
|
|
1372
|
+
readonly hasFooter: true;
|
|
1373
|
+
};
|
|
1318
1374
|
|
|
1319
1375
|
type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
|
|
1320
1376
|
interface LocaleOption {
|
|
@@ -1357,4 +1413,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
1357
1413
|
}[]) => LocaleOption[];
|
|
1358
1414
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
1359
1415
|
|
|
1360
|
-
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig,
|
|
1416
|
+
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1219,6 +1219,8 @@ interface ReportConfig<TField extends string = string> {
|
|
|
1219
1219
|
availableColumns: TField[];
|
|
1220
1220
|
defaultVisibleColumns: TField[];
|
|
1221
1221
|
columnGroups?: ColumnGroupConfig[];
|
|
1222
|
+
chartFields?: TField[];
|
|
1223
|
+
hasFooter: boolean;
|
|
1222
1224
|
}
|
|
1223
1225
|
|
|
1224
1226
|
declare const Report: {
|
|
@@ -1233,6 +1235,7 @@ declare const Report: {
|
|
|
1233
1235
|
readonly SALES_BY_ITEM: "sales-by-item";
|
|
1234
1236
|
readonly DAILY_SALES: "daily-sales";
|
|
1235
1237
|
readonly DAILY_SALES_LIVE: "daily-sales-live";
|
|
1238
|
+
readonly DAILY_SALES_TRENDS: "daily-sales-trends";
|
|
1236
1239
|
};
|
|
1237
1240
|
type ReportType = (typeof Report)[keyof typeof Report];
|
|
1238
1241
|
declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
|
|
@@ -1248,73 +1251,126 @@ declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: Column
|
|
|
1248
1251
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
|
|
1249
1252
|
|
|
1250
1253
|
type SalesSummaryField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'salesVarLW' | 'salesVarLY' | 'salesVarLWPct' | 'salesVarLYPct' | 'salesAmountNetLastWeek' | 'salesAmountNetLastYear' | 'salesAmountGross' | 'salesAmountGrossLastWeek' | 'salesAmountGrossLastYear' | 'ticketsCount' | 'ticketsCountLastWeek' | 'ticketsCountLastYear' | 'guestsCount' | 'guestsVarLW' | 'guestsVarLY' | 'guestsVarLWPct' | 'guestsVarLYPct' | 'guestsCountLastWeek' | 'guestsCountLastYear' | 'salesPerGuestTY' | 'salesPerGuestLW' | 'salesPerGuestLY';
|
|
1251
|
-
declare const
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
+
declare const salesSummaryConfig: {
|
|
1255
|
+
readonly fields: Record<SalesSummaryField, ColumnPresentationConfig<SalesSummaryField>>;
|
|
1256
|
+
readonly availableColumns: SalesSummaryField[];
|
|
1257
|
+
readonly defaultVisibleColumns: SalesSummaryField[];
|
|
1258
|
+
readonly columnGroups: ColumnGroupConfig[];
|
|
1259
|
+
readonly hasFooter: true;
|
|
1260
|
+
};
|
|
1254
1261
|
|
|
1255
1262
|
type TicketSummaryField = 'ticketId' | 'locationId' | 'orderName' | 'revenueCenterName' | 'daypartName' | 'inclusiveTaxesAmount' | 'locationName' | 'orderNumber' | 'businessDate' | 'ticketOpenedAt' | 'ticketClosedAt' | 'ticketTime' | 'ticketSubtotal' | 'discountsAmount' | 'surchargesAmount' | 'taxesAmount' | 'ticketGrandTotal' | 'gratuitiesAmount' | 'tipAmount' | 'paymentsAmount' | 'paymentTypeName' | 'guestsCount' | 'employeeName' | 'orderTypeName';
|
|
1256
|
-
declare const
|
|
1257
|
-
|
|
1258
|
-
|
|
1263
|
+
declare const ticketSummaryConfig: {
|
|
1264
|
+
readonly fields: Record<TicketSummaryField, ColumnPresentationConfig<TicketSummaryField>>;
|
|
1265
|
+
readonly availableColumns: TicketSummaryField[];
|
|
1266
|
+
readonly defaultVisibleColumns: TicketSummaryField[];
|
|
1267
|
+
readonly hasFooter: true;
|
|
1268
|
+
};
|
|
1259
1269
|
|
|
1260
1270
|
type TicketLiveField = 'locationName' | 'orderNumber' | 'dateOpen' | 'timeOpen' | 'dateClose' | 'timeClose' | 'durationMinutes' | 'subtotal' | 'discountTotal' | 'surchargeTotal' | 'taxTotal' | 'grandTotal' | 'gratuityTotal' | 'totalTips' | 'paymentsReceived' | 'paymentTypeName' | 'guestCount' | 'customerName' | 'employeeName' | 'orderType';
|
|
1261
|
-
declare const
|
|
1262
|
-
|
|
1263
|
-
|
|
1271
|
+
declare const ticketLiveConfig: {
|
|
1272
|
+
readonly fields: Record<TicketLiveField, ColumnPresentationConfig<TicketLiveField>>;
|
|
1273
|
+
readonly availableColumns: TicketLiveField[];
|
|
1274
|
+
readonly defaultVisibleColumns: TicketLiveField[];
|
|
1275
|
+
readonly hasFooter: true;
|
|
1276
|
+
};
|
|
1264
1277
|
|
|
1265
1278
|
type ProductMixField = 'groupById' | 'groupByName' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'itemsQuantity' | 'avgPrice' | 'salesMixPct';
|
|
1266
|
-
declare const
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1279
|
+
declare const productMixConfig: {
|
|
1280
|
+
readonly fields: Record<ProductMixField, ColumnPresentationConfig<ProductMixField>>;
|
|
1281
|
+
readonly availableColumns: ProductMixField[];
|
|
1282
|
+
readonly defaultVisibleColumns: ProductMixField[];
|
|
1283
|
+
readonly chartFields: ProductMixField[];
|
|
1284
|
+
readonly hasFooter: true;
|
|
1285
|
+
};
|
|
1270
1286
|
|
|
1271
1287
|
type ModifierMixField = 'groupById' | 'groupByName' | 'groupById2' | 'groupByName2' | 'modifiersSales' | 'modifiersQuantity' | 'itemsQuantity' | 'avgGross' | 'attachRate' | 'modifiersSalesComp' | 'modifiersQuantityComp' | 'itemsQuantityComp' | 'attachRateComp' | 'modifiersSalesVar' | 'modifiersSalesVarPct' | 'modifiersQuantityVar' | 'modifiersQuantityVarPct' | 'attachRateVar' | 'attachRateVarPct';
|
|
1272
|
-
declare const
|
|
1273
|
-
|
|
1274
|
-
|
|
1288
|
+
declare const modifierMixConfig: {
|
|
1289
|
+
readonly fields: Record<ModifierMixField, ColumnPresentationConfig<ModifierMixField>>;
|
|
1290
|
+
readonly availableColumns: ModifierMixField[];
|
|
1291
|
+
readonly defaultVisibleColumns: ModifierMixField[];
|
|
1292
|
+
readonly hasFooter: true;
|
|
1293
|
+
};
|
|
1275
1294
|
|
|
1276
1295
|
type ItemTaxField = 'locationId' | 'taxIsFlat' | 'merchantId' | 'locationName' | 'locationCity' | 'locationState' | 'itemName' | 'itemPrice' | 'departmentName' | 'revenueClassName' | 'orderTypeName' | 'taxName' | 'taxValue' | 'taxRate' | 'recordsCount' | 'taxableSales' | 'totalCollected' | 'itemTax' | 'taxCollected';
|
|
1277
|
-
declare const
|
|
1278
|
-
|
|
1279
|
-
|
|
1296
|
+
declare const itemTaxConfig: {
|
|
1297
|
+
readonly fields: Record<ItemTaxField, ColumnPresentationConfig<ItemTaxField>>;
|
|
1298
|
+
readonly availableColumns: ItemTaxField[];
|
|
1299
|
+
readonly defaultVisibleColumns: ItemTaxField[];
|
|
1300
|
+
readonly hasFooter: false;
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
type DailySalesField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct';
|
|
1304
|
+
declare const dailySalesConfig: {
|
|
1305
|
+
readonly fields: Record<DailySalesField, ColumnPresentationConfig<DailySalesField>>;
|
|
1306
|
+
readonly availableColumns: DailySalesField[];
|
|
1307
|
+
readonly defaultVisibleColumns: DailySalesField[];
|
|
1308
|
+
readonly hasFooter: true;
|
|
1309
|
+
};
|
|
1280
1310
|
|
|
1281
|
-
type
|
|
1282
|
-
declare const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1311
|
+
type DailySalesLiveField = 'groupById' | 'groupByName' | 'itemsQuantity' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'salesMixPct' | 'guestsCount';
|
|
1312
|
+
declare const dailySalesLiveConfig: {
|
|
1313
|
+
readonly fields: Record<DailySalesLiveField, ColumnPresentationConfig<DailySalesLiveField>>;
|
|
1314
|
+
readonly availableColumns: DailySalesLiveField[];
|
|
1315
|
+
readonly defaultVisibleColumns: DailySalesLiveField[];
|
|
1316
|
+
readonly hasFooter: true;
|
|
1317
|
+
};
|
|
1288
1318
|
|
|
1289
1319
|
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
1290
|
-
declare const
|
|
1291
|
-
|
|
1292
|
-
|
|
1320
|
+
declare const dailySalesPaymentsConfig: {
|
|
1321
|
+
readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
|
|
1322
|
+
readonly availableColumns: DailySalesPaymentsField[];
|
|
1323
|
+
readonly defaultVisibleColumns: DailySalesPaymentsField[];
|
|
1324
|
+
readonly hasFooter: true;
|
|
1325
|
+
};
|
|
1293
1326
|
|
|
1294
1327
|
type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
|
|
1295
|
-
declare const
|
|
1296
|
-
|
|
1297
|
-
|
|
1328
|
+
declare const dailySalesDiscountsConfig: {
|
|
1329
|
+
readonly fields: Record<DailySalesDiscountsField, ColumnPresentationConfig<DailySalesDiscountsField>>;
|
|
1330
|
+
readonly availableColumns: DailySalesDiscountsField[];
|
|
1331
|
+
readonly defaultVisibleColumns: DailySalesDiscountsField[];
|
|
1332
|
+
readonly hasFooter: true;
|
|
1333
|
+
};
|
|
1298
1334
|
|
|
1299
1335
|
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
1300
|
-
declare const
|
|
1301
|
-
|
|
1302
|
-
|
|
1336
|
+
declare const dailySalesRefundsVoidsConfig: {
|
|
1337
|
+
readonly fields: Record<DailySalesRefundsVoidsField, ColumnPresentationConfig<DailySalesRefundsVoidsField>>;
|
|
1338
|
+
readonly availableColumns: DailySalesRefundsVoidsField[];
|
|
1339
|
+
readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
|
|
1340
|
+
readonly hasFooter: true;
|
|
1341
|
+
};
|
|
1303
1342
|
|
|
1304
1343
|
type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
|
|
1305
|
-
declare const
|
|
1306
|
-
|
|
1307
|
-
|
|
1344
|
+
declare const dailySalesTaxesConfig: {
|
|
1345
|
+
readonly fields: Record<DailySalesTaxesField, ColumnPresentationConfig<DailySalesTaxesField>>;
|
|
1346
|
+
readonly availableColumns: DailySalesTaxesField[];
|
|
1347
|
+
readonly defaultVisibleColumns: DailySalesTaxesField[];
|
|
1348
|
+
readonly hasFooter: true;
|
|
1349
|
+
};
|
|
1308
1350
|
|
|
1309
1351
|
type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
|
|
1310
|
-
declare const
|
|
1311
|
-
|
|
1312
|
-
|
|
1352
|
+
declare const employeeTimecardConfig: {
|
|
1353
|
+
readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
|
|
1354
|
+
readonly availableColumns: EmployeeTimecardField[];
|
|
1355
|
+
readonly defaultVisibleColumns: EmployeeTimecardField[];
|
|
1356
|
+
readonly hasFooter: true;
|
|
1357
|
+
};
|
|
1313
1358
|
|
|
1314
1359
|
type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
|
|
1315
|
-
declare const
|
|
1316
|
-
|
|
1317
|
-
|
|
1360
|
+
declare const salesByItemDetailConfig: {
|
|
1361
|
+
readonly fields: Record<SalesByItemDetailField, ColumnPresentationConfig<SalesByItemDetailField>>;
|
|
1362
|
+
readonly availableColumns: SalesByItemDetailField[];
|
|
1363
|
+
readonly defaultVisibleColumns: SalesByItemDetailField[];
|
|
1364
|
+
readonly hasFooter: false;
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1367
|
+
type DailySalesTrendsField = 'groupById' | 'groupByName' | 'salesAmountNet' | 'ticketsCount' | 'guestsCount' | 'ticketAvg' | 'guestAvg';
|
|
1368
|
+
declare const dailySalesTrendsConfig: {
|
|
1369
|
+
readonly fields: Record<DailySalesTrendsField, ColumnPresentationConfig<DailySalesTrendsField>>;
|
|
1370
|
+
readonly availableColumns: DailySalesTrendsField[];
|
|
1371
|
+
readonly defaultVisibleColumns: DailySalesTrendsField[];
|
|
1372
|
+
readonly hasFooter: true;
|
|
1373
|
+
};
|
|
1318
1374
|
|
|
1319
1375
|
type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
|
|
1320
1376
|
interface LocaleOption {
|
|
@@ -1357,4 +1413,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
1357
1413
|
}[]) => LocaleOption[];
|
|
1358
1414
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
1359
1415
|
|
|
1360
|
-
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig,
|
|
1416
|
+
export { COLUMN_REGISTRY, type CalculateReportTotalsOptions, type ColumnAlignment, type ColumnGroupConfig, type ColumnMetadata, type ColumnPresentationConfig, type DailySalesDiscountsField, type DailySalesField, type DailySalesLiveField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type FieldType, type FooterCalculation, type FooterCalculationType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, Report, type ReportColumnKey, type ReportConfig, type ReportType, type SalesByItemDetailField, type SalesSummaryField, type TicketLiveField, type TicketSummaryField, type TimeFormat, calculateFieldTotal, calculateReportTotals, dailySalesConfig, dailySalesDiscountsConfig, dailySalesLiveConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, employeeTimecardConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getColumnExportHeaderLabel, getColumnMetadata, getDateToFormat, getNumberToFormat, getReportConfig, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|