@harbortouch/skytab-analytics-report-utils 0.11.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 +209 -264
- package/dist/index.d.cts +100 -33
- package/dist/index.d.ts +100 -33
- package/dist/index.js +208 -247
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1219,6 +1219,7 @@ interface ReportConfig<TField extends string = string> {
|
|
|
1219
1219
|
availableColumns: TField[];
|
|
1220
1220
|
defaultVisibleColumns: TField[];
|
|
1221
1221
|
columnGroups?: ColumnGroupConfig[];
|
|
1222
|
+
chartFields?: TField[];
|
|
1222
1223
|
hasFooter: boolean;
|
|
1223
1224
|
}
|
|
1224
1225
|
|
|
@@ -1234,6 +1235,7 @@ declare const Report: {
|
|
|
1234
1235
|
readonly SALES_BY_ITEM: "sales-by-item";
|
|
1235
1236
|
readonly DAILY_SALES: "daily-sales";
|
|
1236
1237
|
readonly DAILY_SALES_LIVE: "daily-sales-live";
|
|
1238
|
+
readonly DAILY_SALES_TRENDS: "daily-sales-trends";
|
|
1237
1239
|
};
|
|
1238
1240
|
type ReportType = (typeof Report)[keyof typeof Report];
|
|
1239
1241
|
declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
|
|
@@ -1249,61 +1251,126 @@ declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: Column
|
|
|
1249
1251
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
|
|
1250
1252
|
|
|
1251
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';
|
|
1252
|
-
declare const
|
|
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
|
-
|
|
1263
|
+
declare const ticketSummaryConfig: {
|
|
1264
|
+
readonly fields: Record<TicketSummaryField, ColumnPresentationConfig<TicketSummaryField>>;
|
|
1265
|
+
readonly availableColumns: TicketSummaryField[];
|
|
1266
|
+
readonly defaultVisibleColumns: TicketSummaryField[];
|
|
1267
|
+
readonly hasFooter: true;
|
|
1268
|
+
};
|
|
1258
1269
|
|
|
1259
1270
|
type TicketLiveField = 'locationName' | 'orderNumber' | 'dateOpen' | 'timeOpen' | 'dateClose' | 'timeClose' | 'durationMinutes' | 'subtotal' | 'discountTotal' | 'surchargeTotal' | 'taxTotal' | 'grandTotal' | 'gratuityTotal' | 'totalTips' | 'paymentsReceived' | 'paymentTypeName' | 'guestCount' | 'customerName' | 'employeeName' | 'orderType';
|
|
1260
|
-
declare const
|
|
1261
|
-
|
|
1271
|
+
declare const ticketLiveConfig: {
|
|
1272
|
+
readonly fields: Record<TicketLiveField, ColumnPresentationConfig<TicketLiveField>>;
|
|
1273
|
+
readonly availableColumns: TicketLiveField[];
|
|
1274
|
+
readonly defaultVisibleColumns: TicketLiveField[];
|
|
1275
|
+
readonly hasFooter: true;
|
|
1276
|
+
};
|
|
1262
1277
|
|
|
1263
1278
|
type ProductMixField = 'groupById' | 'groupByName' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'itemsQuantity' | 'avgPrice' | 'salesMixPct';
|
|
1264
|
-
declare const
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
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
|
+
};
|
|
1268
1286
|
|
|
1269
1287
|
type ModifierMixField = 'groupById' | 'groupByName' | 'groupById2' | 'groupByName2' | 'modifiersSales' | 'modifiersQuantity' | 'itemsQuantity' | 'avgGross' | 'attachRate' | 'modifiersSalesComp' | 'modifiersQuantityComp' | 'itemsQuantityComp' | 'attachRateComp' | 'modifiersSalesVar' | 'modifiersSalesVarPct' | 'modifiersQuantityVar' | 'modifiersQuantityVarPct' | 'attachRateVar' | 'attachRateVarPct';
|
|
1270
|
-
declare const
|
|
1271
|
-
|
|
1288
|
+
declare const modifierMixConfig: {
|
|
1289
|
+
readonly fields: Record<ModifierMixField, ColumnPresentationConfig<ModifierMixField>>;
|
|
1290
|
+
readonly availableColumns: ModifierMixField[];
|
|
1291
|
+
readonly defaultVisibleColumns: ModifierMixField[];
|
|
1292
|
+
readonly hasFooter: true;
|
|
1293
|
+
};
|
|
1272
1294
|
|
|
1273
1295
|
type ItemTaxField = 'locationId' | 'taxIsFlat' | 'merchantId' | 'locationName' | 'locationCity' | 'locationState' | 'itemName' | 'itemPrice' | 'departmentName' | 'revenueClassName' | 'orderTypeName' | 'taxName' | 'taxValue' | 'taxRate' | 'recordsCount' | 'taxableSales' | 'totalCollected' | 'itemTax' | 'taxCollected';
|
|
1274
|
-
declare const
|
|
1275
|
-
|
|
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
|
+
};
|
|
1276
1310
|
|
|
1277
|
-
type
|
|
1278
|
-
declare const
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
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
|
+
};
|
|
1283
1318
|
|
|
1284
1319
|
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
1285
|
-
declare const
|
|
1286
|
-
|
|
1320
|
+
declare const dailySalesPaymentsConfig: {
|
|
1321
|
+
readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
|
|
1322
|
+
readonly availableColumns: DailySalesPaymentsField[];
|
|
1323
|
+
readonly defaultVisibleColumns: DailySalesPaymentsField[];
|
|
1324
|
+
readonly hasFooter: true;
|
|
1325
|
+
};
|
|
1287
1326
|
|
|
1288
1327
|
type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
|
|
1289
|
-
declare const
|
|
1290
|
-
|
|
1328
|
+
declare const dailySalesDiscountsConfig: {
|
|
1329
|
+
readonly fields: Record<DailySalesDiscountsField, ColumnPresentationConfig<DailySalesDiscountsField>>;
|
|
1330
|
+
readonly availableColumns: DailySalesDiscountsField[];
|
|
1331
|
+
readonly defaultVisibleColumns: DailySalesDiscountsField[];
|
|
1332
|
+
readonly hasFooter: true;
|
|
1333
|
+
};
|
|
1291
1334
|
|
|
1292
1335
|
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
1293
|
-
declare const
|
|
1294
|
-
|
|
1336
|
+
declare const dailySalesRefundsVoidsConfig: {
|
|
1337
|
+
readonly fields: Record<DailySalesRefundsVoidsField, ColumnPresentationConfig<DailySalesRefundsVoidsField>>;
|
|
1338
|
+
readonly availableColumns: DailySalesRefundsVoidsField[];
|
|
1339
|
+
readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
|
|
1340
|
+
readonly hasFooter: true;
|
|
1341
|
+
};
|
|
1295
1342
|
|
|
1296
1343
|
type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
|
|
1297
|
-
declare const
|
|
1298
|
-
|
|
1344
|
+
declare const dailySalesTaxesConfig: {
|
|
1345
|
+
readonly fields: Record<DailySalesTaxesField, ColumnPresentationConfig<DailySalesTaxesField>>;
|
|
1346
|
+
readonly availableColumns: DailySalesTaxesField[];
|
|
1347
|
+
readonly defaultVisibleColumns: DailySalesTaxesField[];
|
|
1348
|
+
readonly hasFooter: true;
|
|
1349
|
+
};
|
|
1299
1350
|
|
|
1300
1351
|
type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
|
|
1301
|
-
declare const
|
|
1302
|
-
|
|
1352
|
+
declare const employeeTimecardConfig: {
|
|
1353
|
+
readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
|
|
1354
|
+
readonly availableColumns: EmployeeTimecardField[];
|
|
1355
|
+
readonly defaultVisibleColumns: EmployeeTimecardField[];
|
|
1356
|
+
readonly hasFooter: true;
|
|
1357
|
+
};
|
|
1303
1358
|
|
|
1304
1359
|
type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
|
|
1305
|
-
declare const
|
|
1306
|
-
|
|
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
|
+
};
|
|
1307
1374
|
|
|
1308
1375
|
type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
|
|
1309
1376
|
interface LocaleOption {
|
|
@@ -1346,4 +1413,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
1346
1413
|
}[]) => LocaleOption[];
|
|
1347
1414
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
1348
1415
|
|
|
1349
|
-
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,7 @@ interface ReportConfig<TField extends string = string> {
|
|
|
1219
1219
|
availableColumns: TField[];
|
|
1220
1220
|
defaultVisibleColumns: TField[];
|
|
1221
1221
|
columnGroups?: ColumnGroupConfig[];
|
|
1222
|
+
chartFields?: TField[];
|
|
1222
1223
|
hasFooter: boolean;
|
|
1223
1224
|
}
|
|
1224
1225
|
|
|
@@ -1234,6 +1235,7 @@ declare const Report: {
|
|
|
1234
1235
|
readonly SALES_BY_ITEM: "sales-by-item";
|
|
1235
1236
|
readonly DAILY_SALES: "daily-sales";
|
|
1236
1237
|
readonly DAILY_SALES_LIVE: "daily-sales-live";
|
|
1238
|
+
readonly DAILY_SALES_TRENDS: "daily-sales-trends";
|
|
1237
1239
|
};
|
|
1238
1240
|
type ReportType = (typeof Report)[keyof typeof Report];
|
|
1239
1241
|
declare const getReportConfig: (reportType: ReportType) => ReportConfig<string> | null;
|
|
@@ -1249,61 +1251,126 @@ declare const calculateFieldTotal: <T>(rows: T[], field: keyof T, config: Column
|
|
|
1249
1251
|
declare const calculateReportTotals: <T>(data: T[], fieldConfig: Record<string, ColumnPresentationConfig>, opts: CalculateReportTotalsOptions) => T;
|
|
1250
1252
|
|
|
1251
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';
|
|
1252
|
-
declare const
|
|
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
|
-
|
|
1263
|
+
declare const ticketSummaryConfig: {
|
|
1264
|
+
readonly fields: Record<TicketSummaryField, ColumnPresentationConfig<TicketSummaryField>>;
|
|
1265
|
+
readonly availableColumns: TicketSummaryField[];
|
|
1266
|
+
readonly defaultVisibleColumns: TicketSummaryField[];
|
|
1267
|
+
readonly hasFooter: true;
|
|
1268
|
+
};
|
|
1258
1269
|
|
|
1259
1270
|
type TicketLiveField = 'locationName' | 'orderNumber' | 'dateOpen' | 'timeOpen' | 'dateClose' | 'timeClose' | 'durationMinutes' | 'subtotal' | 'discountTotal' | 'surchargeTotal' | 'taxTotal' | 'grandTotal' | 'gratuityTotal' | 'totalTips' | 'paymentsReceived' | 'paymentTypeName' | 'guestCount' | 'customerName' | 'employeeName' | 'orderType';
|
|
1260
|
-
declare const
|
|
1261
|
-
|
|
1271
|
+
declare const ticketLiveConfig: {
|
|
1272
|
+
readonly fields: Record<TicketLiveField, ColumnPresentationConfig<TicketLiveField>>;
|
|
1273
|
+
readonly availableColumns: TicketLiveField[];
|
|
1274
|
+
readonly defaultVisibleColumns: TicketLiveField[];
|
|
1275
|
+
readonly hasFooter: true;
|
|
1276
|
+
};
|
|
1262
1277
|
|
|
1263
1278
|
type ProductMixField = 'groupById' | 'groupByName' | 'salesAmountGross' | 'discountsAmount' | 'inclusiveTaxesAmount' | 'salesAmountNet' | 'itemsQuantity' | 'avgPrice' | 'salesMixPct';
|
|
1264
|
-
declare const
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
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
|
+
};
|
|
1268
1286
|
|
|
1269
1287
|
type ModifierMixField = 'groupById' | 'groupByName' | 'groupById2' | 'groupByName2' | 'modifiersSales' | 'modifiersQuantity' | 'itemsQuantity' | 'avgGross' | 'attachRate' | 'modifiersSalesComp' | 'modifiersQuantityComp' | 'itemsQuantityComp' | 'attachRateComp' | 'modifiersSalesVar' | 'modifiersSalesVarPct' | 'modifiersQuantityVar' | 'modifiersQuantityVarPct' | 'attachRateVar' | 'attachRateVarPct';
|
|
1270
|
-
declare const
|
|
1271
|
-
|
|
1288
|
+
declare const modifierMixConfig: {
|
|
1289
|
+
readonly fields: Record<ModifierMixField, ColumnPresentationConfig<ModifierMixField>>;
|
|
1290
|
+
readonly availableColumns: ModifierMixField[];
|
|
1291
|
+
readonly defaultVisibleColumns: ModifierMixField[];
|
|
1292
|
+
readonly hasFooter: true;
|
|
1293
|
+
};
|
|
1272
1294
|
|
|
1273
1295
|
type ItemTaxField = 'locationId' | 'taxIsFlat' | 'merchantId' | 'locationName' | 'locationCity' | 'locationState' | 'itemName' | 'itemPrice' | 'departmentName' | 'revenueClassName' | 'orderTypeName' | 'taxName' | 'taxValue' | 'taxRate' | 'recordsCount' | 'taxableSales' | 'totalCollected' | 'itemTax' | 'taxCollected';
|
|
1274
|
-
declare const
|
|
1275
|
-
|
|
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
|
+
};
|
|
1276
1310
|
|
|
1277
|
-
type
|
|
1278
|
-
declare const
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
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
|
+
};
|
|
1283
1318
|
|
|
1284
1319
|
type DailySalesPaymentsField = 'paymentTypeName' | 'paymentsCount' | 'paymentsAmount' | 'tipsAmount' | 'totalSales';
|
|
1285
|
-
declare const
|
|
1286
|
-
|
|
1320
|
+
declare const dailySalesPaymentsConfig: {
|
|
1321
|
+
readonly fields: Record<DailySalesPaymentsField, ColumnPresentationConfig<DailySalesPaymentsField>>;
|
|
1322
|
+
readonly availableColumns: DailySalesPaymentsField[];
|
|
1323
|
+
readonly defaultVisibleColumns: DailySalesPaymentsField[];
|
|
1324
|
+
readonly hasFooter: true;
|
|
1325
|
+
};
|
|
1287
1326
|
|
|
1288
1327
|
type DailySalesDiscountsField = 'discountName' | 'ticketCount' | 'itemCount' | 'discountsAmount';
|
|
1289
|
-
declare const
|
|
1290
|
-
|
|
1328
|
+
declare const dailySalesDiscountsConfig: {
|
|
1329
|
+
readonly fields: Record<DailySalesDiscountsField, ColumnPresentationConfig<DailySalesDiscountsField>>;
|
|
1330
|
+
readonly availableColumns: DailySalesDiscountsField[];
|
|
1331
|
+
readonly defaultVisibleColumns: DailySalesDiscountsField[];
|
|
1332
|
+
readonly hasFooter: true;
|
|
1333
|
+
};
|
|
1291
1334
|
|
|
1292
1335
|
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
1293
|
-
declare const
|
|
1294
|
-
|
|
1336
|
+
declare const dailySalesRefundsVoidsConfig: {
|
|
1337
|
+
readonly fields: Record<DailySalesRefundsVoidsField, ColumnPresentationConfig<DailySalesRefundsVoidsField>>;
|
|
1338
|
+
readonly availableColumns: DailySalesRefundsVoidsField[];
|
|
1339
|
+
readonly defaultVisibleColumns: DailySalesRefundsVoidsField[];
|
|
1340
|
+
readonly hasFooter: true;
|
|
1341
|
+
};
|
|
1295
1342
|
|
|
1296
1343
|
type DailySalesTaxesField = 'taxName' | 'taxableSales' | 'taxesAmount' | 'exemptSales';
|
|
1297
|
-
declare const
|
|
1298
|
-
|
|
1344
|
+
declare const dailySalesTaxesConfig: {
|
|
1345
|
+
readonly fields: Record<DailySalesTaxesField, ColumnPresentationConfig<DailySalesTaxesField>>;
|
|
1346
|
+
readonly availableColumns: DailySalesTaxesField[];
|
|
1347
|
+
readonly defaultVisibleColumns: DailySalesTaxesField[];
|
|
1348
|
+
readonly hasFooter: true;
|
|
1349
|
+
};
|
|
1299
1350
|
|
|
1300
1351
|
type EmployeeTimecardField = 'locationId' | 'locationName' | 'businessDate' | 'employeeName' | 'isActive' | 'lookup' | 'payrollCode' | 'jobName' | 'isBreak' | 'startTime' | 'endTime' | 'shiftHours';
|
|
1301
|
-
declare const
|
|
1302
|
-
|
|
1352
|
+
declare const employeeTimecardConfig: {
|
|
1353
|
+
readonly fields: Record<EmployeeTimecardField, ColumnPresentationConfig<EmployeeTimecardField>>;
|
|
1354
|
+
readonly availableColumns: EmployeeTimecardField[];
|
|
1355
|
+
readonly defaultVisibleColumns: EmployeeTimecardField[];
|
|
1356
|
+
readonly hasFooter: true;
|
|
1357
|
+
};
|
|
1303
1358
|
|
|
1304
1359
|
type SalesByItemDetailField = 'businessDate' | 'ticketClosedAt' | 'hourId' | 'daypartName' | 'locationId' | 'locationName' | 'departmentName' | 'itemName' | 'revenueCenterName' | 'revenueClassName' | 'salesAmountGross' | 'itemsQuantity' | 'transactionId' | 'guestsCount' | 'employeeName' | 'orderTypeName' | 'salesType' | 'itemPrice';
|
|
1305
|
-
declare const
|
|
1306
|
-
|
|
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
|
+
};
|
|
1307
1374
|
|
|
1308
1375
|
type TimeFormat = '00:00' | '00:00:00' | '00:00-24H';
|
|
1309
1376
|
interface LocaleOption {
|
|
@@ -1346,4 +1413,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
1346
1413
|
}[]) => LocaleOption[];
|
|
1347
1414
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
1348
1415
|
|
|
1349
|
-
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 };
|