@harbortouch/skytab-analytics-report-utils 0.6.1 → 0.7.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 CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ COLUMN_REGISTRY: () => COLUMN_REGISTRY,
23
24
  DAILY_SALES_AVAILABLE_COLUMNS: () => DAILY_SALES_AVAILABLE_COLUMNS,
24
25
  DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS: () => DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
25
26
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS: () => DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
@@ -58,8 +59,20 @@ __export(index_exports, {
58
59
  dailySalesTaxesConfig: () => dailySalesTaxesConfig,
59
60
  dailySalesTrendsConfig: () => dailySalesTrendsConfig,
60
61
  employeeTimecardConfig: () => employeeTimecardConfig,
62
+ formatDate: () => formatDate,
63
+ formatFixedNumber: () => formatFixedNumber,
64
+ formatInteger: () => formatInteger,
65
+ formatMoney: () => formatMoney,
66
+ formatPercent: () => formatPercent,
67
+ formatString: () => formatString,
68
+ formatTime: () => formatTime,
61
69
  getColumnAlignment: () => getColumnAlignment,
70
+ getColumnExportHeaderLabel: () => getColumnExportHeaderLabel,
71
+ getColumnMetadata: () => getColumnMetadata,
72
+ getDateToFormat: () => getDateToFormat,
73
+ getNumberToFormat: () => getNumberToFormat,
62
74
  getReportConfig: () => getReportConfig,
75
+ getReportFormattingLocaleOptions: () => getReportFormattingLocaleOptions,
63
76
  isNumericType: () => isNumericType,
64
77
  itemTaxConfig: () => itemTaxConfig,
65
78
  modifierMixConfig: () => modifierMixConfig,
@@ -819,6 +832,664 @@ var REPORT_CONFIG_MAP = {
819
832
  };
820
833
  var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
821
834
 
835
+ // src/columns/index.ts
836
+ var COLUMN_REGISTRY = {
837
+ fifteenMinInterval: {
838
+ titleKey: "common.report-col.fifteen-min-interval",
839
+ shortTitleKey: "common.report-col.fifteen-min-interval.short",
840
+ infoTextKey: "common.report-col.fifteen-min-interval.info"
841
+ },
842
+ adjustedTips: {
843
+ titleKey: "common.report-col.adjusted-tips",
844
+ shortTitleKey: "common.report-col.adjusted-tips.short",
845
+ infoTextKey: "common.report-col.adjusted-tips.info"
846
+ },
847
+ advantageProgram: {
848
+ titleKey: "common.report-col.advantage-program",
849
+ shortTitleKey: "common.report-col.advantage-program.short",
850
+ infoTextKey: "common.report-col.advantage-program.info"
851
+ },
852
+ amex: {
853
+ titleKey: "common.report-col.amex",
854
+ shortTitleKey: "common.report-col.amex.short",
855
+ infoTextKey: "common.report-col.amex.info"
856
+ },
857
+ amexReturns: {
858
+ titleKey: "common.report-col.amex-returns",
859
+ shortTitleKey: "common.report-col.amex-returns.short",
860
+ infoTextKey: "common.report-col.amex-returns.info"
861
+ },
862
+ attachRate: {
863
+ titleKey: "common.report-col.attach-rate",
864
+ shortTitleKey: "common.report-col.attach-rate.short",
865
+ infoTextKey: "common.report-col.attach-rate.info"
866
+ },
867
+ autoGratuity: {
868
+ titleKey: "common.report-col.auto-gratuity",
869
+ shortTitleKey: "common.report-col.auto-gratuity.short",
870
+ infoTextKey: "common.report-col.auto-gratuity.info"
871
+ },
872
+ averageGrossPrice: {
873
+ titleKey: "common.report-col.average-gross-price",
874
+ shortTitleKey: "common.report-col.average-gross-price.short",
875
+ infoTextKey: "common.report-col.average-gross-price.info"
876
+ },
877
+ bankFees: {
878
+ titleKey: "common.report-col.bank-fees",
879
+ shortTitleKey: "common.report-col.bank-fees.short",
880
+ infoTextKey: "common.report-col.bank-fees.info"
881
+ },
882
+ batchAmount: {
883
+ titleKey: "common.report-col.batch-amount",
884
+ shortTitleKey: "common.report-col.batch-amount.short",
885
+ infoTextKey: "common.report-col.batch-amount.info"
886
+ },
887
+ batchDate: {
888
+ titleKey: "common.report-col.batch-date",
889
+ shortTitleKey: "common.report-col.batch-date.short",
890
+ infoTextKey: "common.report-col.batch-date.info"
891
+ },
892
+ batchNumber: {
893
+ titleKey: "common.report-col.batch-number",
894
+ shortTitleKey: "common.report-col.batch-number.short",
895
+ infoTextKey: "common.report-col.batch-number.info"
896
+ },
897
+ clockInTime: {
898
+ titleKey: "common.report-col.clock-in-time",
899
+ shortTitleKey: "common.report-col.clock-in-time.short",
900
+ infoTextKey: "common.report-col.clock-in-time.info"
901
+ },
902
+ clockOutTime: {
903
+ titleKey: "common.report-col.clock-out-time",
904
+ shortTitleKey: "common.report-col.clock-out-time.short",
905
+ infoTextKey: "common.report-col.clock-out-time.info"
906
+ },
907
+ country: {
908
+ titleKey: "common.report-col.country",
909
+ shortTitleKey: "common.report-col.country.short",
910
+ infoTextKey: "common.report-col.country.info"
911
+ },
912
+ customerName: {
913
+ titleKey: "common.report-col.customer-name",
914
+ shortTitleKey: "common.report-col.customer-name.short",
915
+ infoTextKey: "common.report-col.customer-name.info"
916
+ },
917
+ date: {
918
+ titleKey: "common.report-col.date",
919
+ shortTitleKey: "common.report-col.date.short",
920
+ infoTextKey: "common.report-col.date.info"
921
+ },
922
+ dateClose: {
923
+ titleKey: "common.report-col.date-close",
924
+ shortTitleKey: "common.report-col.date-close.short",
925
+ infoTextKey: "common.report-col.date-close.info"
926
+ },
927
+ daypart: {
928
+ titleKey: "common.report-col.daypart",
929
+ shortTitleKey: "common.report-col.daypart.short",
930
+ infoTextKey: "common.report-col.daypart.info"
931
+ },
932
+ debit: {
933
+ titleKey: "common.report-col.debit",
934
+ shortTitleKey: "common.report-col.debit.short",
935
+ infoTextKey: "common.report-col.debit.info"
936
+ },
937
+ debitReturns: {
938
+ titleKey: "common.report-col.debit-returns",
939
+ shortTitleKey: "common.report-col.debit-returns.short",
940
+ infoTextKey: "common.report-col.debit-returns.info"
941
+ },
942
+ declaredTips: {
943
+ titleKey: "common.report-col.declared-tips",
944
+ shortTitleKey: "common.report-col.declared-tips.short",
945
+ infoTextKey: "common.report-col.declared-tips.info"
946
+ },
947
+ department: {
948
+ titleKey: "common.report-col.department",
949
+ shortTitleKey: "common.report-col.department.short",
950
+ infoTextKey: "common.report-col.department.info"
951
+ },
952
+ depositCurrency: {
953
+ titleKey: "common.report-col.deposit-currency",
954
+ shortTitleKey: "common.report-col.deposit-currency.short",
955
+ infoTextKey: "common.report-col.deposit-currency.info"
956
+ },
957
+ depositDate: {
958
+ titleKey: "common.report-col.deposit-date",
959
+ shortTitleKey: "common.report-col.deposit-date.short",
960
+ infoTextKey: "common.report-col.deposit-date.info"
961
+ },
962
+ discountAmount: {
963
+ titleKey: "common.report-col.discount-amount",
964
+ shortTitleKey: "common.report-col.discount-amount.short",
965
+ infoTextKey: "common.report-col.discount-amount.info"
966
+ },
967
+ discountCount: {
968
+ titleKey: "common.report-col.discount-count",
969
+ shortTitleKey: "common.report-col.discount-count.short",
970
+ infoTextKey: "common.report-col.discount-count.info"
971
+ },
972
+ discover: {
973
+ titleKey: "common.report-col.discover",
974
+ shortTitleKey: "common.report-col.discover.short",
975
+ infoTextKey: "common.report-col.discover.info"
976
+ },
977
+ discoverReturns: {
978
+ titleKey: "common.report-col.discover-returns",
979
+ shortTitleKey: "common.report-col.discover-returns.short",
980
+ infoTextKey: "common.report-col.discover-returns.info"
981
+ },
982
+ ebt: {
983
+ titleKey: "common.report-col.ebt",
984
+ shortTitleKey: "common.report-col.ebt.short",
985
+ infoTextKey: "common.report-col.ebt.info"
986
+ },
987
+ ebtReturns: {
988
+ titleKey: "common.report-col.ebt-returns",
989
+ shortTitleKey: "common.report-col.ebt-returns.short",
990
+ infoTextKey: "common.report-col.ebt-returns.info"
991
+ },
992
+ employeeId: {
993
+ titleKey: "common.report-col.employee-id",
994
+ shortTitleKey: "common.report-col.employee-id.short",
995
+ infoTextKey: "common.report-col.employee-id.info"
996
+ },
997
+ employeeJob: {
998
+ titleKey: "common.report-col.employee-job",
999
+ shortTitleKey: "common.report-col.employee-job.short",
1000
+ infoTextKey: "common.report-col.employee-job.info"
1001
+ },
1002
+ employeeName: {
1003
+ titleKey: "common.report-col.employee-name",
1004
+ shortTitleKey: "common.report-col.employee-name.short",
1005
+ infoTextKey: "common.report-col.employee-name.info"
1006
+ },
1007
+ exemptTaxes: {
1008
+ titleKey: "common.report-col.exempt-taxes",
1009
+ shortTitleKey: "common.report-col.exempt-taxes.short",
1010
+ infoTextKey: "common.report-col.exempt-taxes.info"
1011
+ },
1012
+ grandTotal: {
1013
+ titleKey: "common.report-col.grand-total",
1014
+ shortTitleKey: "common.report-col.grand-total.short",
1015
+ infoTextKey: "common.report-col.grand-total.info"
1016
+ },
1017
+ grossCashSales: {
1018
+ titleKey: "common.report-col.gross-cash-sales",
1019
+ shortTitleKey: "common.report-col.gross-cash-sales.short",
1020
+ infoTextKey: "common.report-col.gross-cash-sales.info"
1021
+ },
1022
+ grossCashTips: {
1023
+ titleKey: "common.report-col.gross-cash-tips",
1024
+ shortTitleKey: "common.report-col.gross-cash-tips.short",
1025
+ infoTextKey: "common.report-col.gross-cash-tips.info"
1026
+ },
1027
+ grossCreditCardTips: {
1028
+ titleKey: "common.report-col.gross-credit-card-tips",
1029
+ shortTitleKey: "common.report-col.gross-credit-card-tips.short",
1030
+ infoTextKey: "common.report-col.gross-credit-card-tips.info"
1031
+ },
1032
+ grossCreditSales: {
1033
+ titleKey: "common.report-col.gross-credit-sales",
1034
+ shortTitleKey: "common.report-col.gross-credit-sales.short",
1035
+ infoTextKey: "common.report-col.gross-credit-sales.info"
1036
+ },
1037
+ grossSales: {
1038
+ titleKey: "common.report-col.gross-sales",
1039
+ shortTitleKey: "common.report-col.gross-sales.short",
1040
+ infoTextKey: "common.report-col.gross-sales.info"
1041
+ },
1042
+ grossTips: {
1043
+ titleKey: "common.report-col.gross-tips",
1044
+ shortTitleKey: "common.report-col.gross-tips.short",
1045
+ infoTextKey: "common.report-col.gross-tips.info"
1046
+ },
1047
+ guestCount: {
1048
+ titleKey: "common.report-col.guest-count",
1049
+ shortTitleKey: "common.report-col.guest-count.short",
1050
+ infoTextKey: "common.report-col.guest-count.info"
1051
+ },
1052
+ guestsVarLw: {
1053
+ titleKey: "common.report-col.guests-var-lw",
1054
+ shortTitleKey: "common.report-col.guests-var-lw.short",
1055
+ infoTextKey: "common.report-col.guests-var-lw.info"
1056
+ },
1057
+ guestsVarLwPct: {
1058
+ titleKey: "common.report-col.guests-var-lw-pct",
1059
+ shortTitleKey: "common.report-col.guests-var-lw-pct.short",
1060
+ infoTextKey: "common.report-col.guests-var-lw-pct.info"
1061
+ },
1062
+ guestsVarLy: {
1063
+ titleKey: "common.report-col.guests-var-ly",
1064
+ shortTitleKey: "common.report-col.guests-var-ly.short",
1065
+ infoTextKey: "common.report-col.guests-var-ly.info"
1066
+ },
1067
+ guestsVarLyPct: {
1068
+ titleKey: "common.report-col.guests-var-ly-pct",
1069
+ shortTitleKey: "common.report-col.guests-var-ly-pct.short",
1070
+ infoTextKey: "common.report-col.guests-var-ly-pct.info"
1071
+ },
1072
+ hour: {
1073
+ titleKey: "common.report-col.hour",
1074
+ shortTitleKey: "common.report-col.hour.short",
1075
+ infoTextKey: "common.report-col.hour.info"
1076
+ },
1077
+ hoursWorked: {
1078
+ titleKey: "common.report-col.hours-worked",
1079
+ shortTitleKey: "common.report-col.hours-worked.short",
1080
+ infoTextKey: "common.report-col.hours-worked.info"
1081
+ },
1082
+ inclusiveTax: {
1083
+ titleKey: "common.report-col.inclusive-tax",
1084
+ shortTitleKey: "common.report-col.inclusive-tax.short",
1085
+ infoTextKey: "common.report-col.inclusive-tax.info"
1086
+ },
1087
+ itemName: {
1088
+ titleKey: "common.report-col.item-name",
1089
+ shortTitleKey: "common.report-col.item-name.short",
1090
+ infoTextKey: "common.report-col.item-name.info"
1091
+ },
1092
+ itemPrice: {
1093
+ titleKey: "common.report-col.item-price",
1094
+ shortTitleKey: "common.report-col.item-price.short",
1095
+ infoTextKey: "common.report-col.item-price.info"
1096
+ },
1097
+ locationCity: {
1098
+ titleKey: "common.report-col.location-city",
1099
+ shortTitleKey: "common.report-col.location-city.short",
1100
+ infoTextKey: "common.report-col.location-city.info"
1101
+ },
1102
+ locationId: {
1103
+ titleKey: "common.report-col.location-id",
1104
+ shortTitleKey: "common.report-col.location-id.short",
1105
+ infoTextKey: "common.report-col.location-id.info"
1106
+ },
1107
+ locationMid: {
1108
+ titleKey: "common.report-col.location-mid",
1109
+ shortTitleKey: "common.report-col.location-mid.short",
1110
+ infoTextKey: "common.report-col.location-mid.info"
1111
+ },
1112
+ locationName: {
1113
+ titleKey: "common.report-col.location-name",
1114
+ shortTitleKey: "common.report-col.location-name.short",
1115
+ infoTextKey: "common.report-col.location-name.info"
1116
+ },
1117
+ locationState: {
1118
+ titleKey: "common.report-col.location-state",
1119
+ shortTitleKey: "common.report-col.location-state.short",
1120
+ infoTextKey: "common.report-col.location-state.info"
1121
+ },
1122
+ mastercard: {
1123
+ titleKey: "common.report-col.mastercard",
1124
+ shortTitleKey: "common.report-col.mastercard.short",
1125
+ infoTextKey: "common.report-col.mastercard.info"
1126
+ },
1127
+ mcReturns: {
1128
+ titleKey: "common.report-col.mc-returns",
1129
+ shortTitleKey: "common.report-col.mc-returns.short",
1130
+ infoTextKey: "common.report-col.mc-returns.info"
1131
+ },
1132
+ modifierName: {
1133
+ titleKey: "common.report-col.modifier-name",
1134
+ shortTitleKey: "common.report-col.modifier-name.short",
1135
+ infoTextKey: "common.report-col.modifier-name.info"
1136
+ },
1137
+ modifierPrice: {
1138
+ titleKey: "common.report-col.modifier-price",
1139
+ shortTitleKey: "common.report-col.modifier-price.short",
1140
+ infoTextKey: "common.report-col.modifier-price.info"
1141
+ },
1142
+ modifierQuantity: {
1143
+ titleKey: "common.report-col.modifier-quantity",
1144
+ shortTitleKey: "common.report-col.modifier-quantity.short",
1145
+ infoTextKey: "common.report-col.modifier-quantity.info"
1146
+ },
1147
+ netSales: {
1148
+ titleKey: "common.report-col.net-sales",
1149
+ shortTitleKey: "common.report-col.net-sales.short",
1150
+ infoTextKey: "common.report-col.net-sales.info"
1151
+ },
1152
+ netTaxCollected: {
1153
+ titleKey: "common.report-col.net-tax-collected",
1154
+ shortTitleKey: "common.report-col.net-tax-collected.short",
1155
+ infoTextKey: "common.report-col.net-tax-collected.info"
1156
+ },
1157
+ netTips: {
1158
+ titleKey: "common.report-col.net-tips",
1159
+ shortTitleKey: "common.report-col.net-tips.short",
1160
+ infoTextKey: "common.report-col.net-tips.info"
1161
+ },
1162
+ numberOfGuests: {
1163
+ titleKey: "common.report-col.number-of-guests",
1164
+ shortTitleKey: "common.report-col.number-of-guests.short",
1165
+ infoTextKey: "common.report-col.number-of-guests.info"
1166
+ },
1167
+ orderType: {
1168
+ titleKey: "common.report-col.order-type",
1169
+ shortTitleKey: "common.report-col.order-type.short",
1170
+ infoTextKey: "common.report-col.order-type.info"
1171
+ },
1172
+ paymentType: {
1173
+ titleKey: "common.report-col.payment-type",
1174
+ shortTitleKey: "common.report-col.payment-type.short",
1175
+ infoTextKey: "common.report-col.payment-type.info"
1176
+ },
1177
+ payrollId: {
1178
+ titleKey: "common.report-col.payroll-id",
1179
+ shortTitleKey: "common.report-col.payroll-id.short",
1180
+ infoTextKey: "common.report-col.payroll-id.info"
1181
+ },
1182
+ quantity: {
1183
+ titleKey: "common.report-col.quantity",
1184
+ shortTitleKey: "common.report-col.quantity.short",
1185
+ infoTextKey: "common.report-col.quantity.info"
1186
+ },
1187
+ referenceNumber: {
1188
+ titleKey: "common.report-col.reference-number",
1189
+ shortTitleKey: "common.report-col.reference-number.short",
1190
+ infoTextKey: "common.report-col.reference-number.info"
1191
+ },
1192
+ refundAmount: {
1193
+ titleKey: "common.report-col.refund-amount",
1194
+ shortTitleKey: "common.report-col.refund-amount.short",
1195
+ infoTextKey: "common.report-col.refund-amount.info"
1196
+ },
1197
+ refundedTaxAmount: {
1198
+ titleKey: "common.report-col.refunded-tax-amount",
1199
+ shortTitleKey: "common.report-col.refunded-tax-amount.short",
1200
+ infoTextKey: "common.report-col.refunded-tax-amount.info"
1201
+ },
1202
+ revenueCenter: {
1203
+ titleKey: "common.report-col.revenue-center",
1204
+ shortTitleKey: "common.report-col.revenue-center.short",
1205
+ infoTextKey: "common.report-col.revenue-center.info"
1206
+ },
1207
+ revenueClass: {
1208
+ titleKey: "common.report-col.revenue-class",
1209
+ shortTitleKey: "common.report-col.revenue-class.short",
1210
+ infoTextKey: "common.report-col.revenue-class.info"
1211
+ },
1212
+ salesVarLw: {
1213
+ titleKey: "common.report-col.sales-var-lw",
1214
+ shortTitleKey: "common.report-col.sales-var-lw.short",
1215
+ infoTextKey: "common.report-col.sales-var-lw.info"
1216
+ },
1217
+ salesVarLwPct: {
1218
+ titleKey: "common.report-col.sales-var-lw-pct",
1219
+ shortTitleKey: "common.report-col.sales-var-lw-pct.short",
1220
+ infoTextKey: "common.report-col.sales-var-lw-pct.info"
1221
+ },
1222
+ salesVarLy: {
1223
+ titleKey: "common.report-col.sales-var-ly",
1224
+ shortTitleKey: "common.report-col.sales-var-ly.short",
1225
+ infoTextKey: "common.report-col.sales-var-ly.info"
1226
+ },
1227
+ salesVarLyPct: {
1228
+ titleKey: "common.report-col.sales-var-ly-pct",
1229
+ shortTitleKey: "common.report-col.sales-var-ly-pct.short",
1230
+ infoTextKey: "common.report-col.sales-var-ly-pct.info"
1231
+ },
1232
+ salesMixByPct: {
1233
+ titleKey: "common.report-col.sales-mix-by-pct",
1234
+ shortTitleKey: "common.report-col.sales-mix-by-pct.short",
1235
+ infoTextKey: "common.report-col.sales-mix-by-pct.info"
1236
+ },
1237
+ salesPerGuest: {
1238
+ titleKey: "common.report-col.sales-per-guest",
1239
+ shortTitleKey: "common.report-col.sales-per-guest.short",
1240
+ infoTextKey: "common.report-col.sales-per-guest.info"
1241
+ },
1242
+ salesPerGuestLw: {
1243
+ titleKey: "common.report-col.sales-per-guest-lw",
1244
+ shortTitleKey: "common.report-col.sales-per-guest-lw.short",
1245
+ infoTextKey: "common.report-col.sales-per-guest-lw.info"
1246
+ },
1247
+ salesPerGuestLy: {
1248
+ titleKey: "common.report-col.sales-per-guest-ly",
1249
+ shortTitleKey: "common.report-col.sales-per-guest-ly.short",
1250
+ infoTextKey: "common.report-col.sales-per-guest-ly.info"
1251
+ },
1252
+ scheduledShiftEnd: {
1253
+ titleKey: "common.report-col.scheduled-shift-end",
1254
+ shortTitleKey: "common.report-col.scheduled-shift-end.short",
1255
+ infoTextKey: "common.report-col.scheduled-shift-end.info"
1256
+ },
1257
+ scheduledShiftStart: {
1258
+ titleKey: "common.report-col.scheduled-shift-start",
1259
+ shortTitleKey: "common.report-col.scheduled-shift-start.short",
1260
+ infoTextKey: "common.report-col.scheduled-shift-start.info"
1261
+ },
1262
+ settlementBatchDate: {
1263
+ titleKey: "common.report-col.settlement-batch-date",
1264
+ shortTitleKey: "common.report-col.settlement-batch-date.short",
1265
+ infoTextKey: "common.report-col.settlement-batch-date.info"
1266
+ },
1267
+ shiftDurationHrs: {
1268
+ titleKey: "common.report-col.shift-duration-hrs",
1269
+ shortTitleKey: "common.report-col.shift-duration-hrs.short",
1270
+ infoTextKey: "common.report-col.shift-duration-hrs.info"
1271
+ },
1272
+ salePaymentType: {
1273
+ titleKey: "common.report-col.sale-payment-type",
1274
+ shortTitleKey: "common.report-col.sale-payment-type.short",
1275
+ infoTextKey: "common.report-col.sale-payment-type.info"
1276
+ },
1277
+ status: {
1278
+ titleKey: "common.report-col.status",
1279
+ shortTitleKey: "common.report-col.status.short",
1280
+ infoTextKey: "common.report-col.status.info"
1281
+ },
1282
+ subtotal: {
1283
+ titleKey: "common.report-col.subtotal",
1284
+ shortTitleKey: "common.report-col.subtotal.short",
1285
+ infoTextKey: "common.report-col.subtotal.info"
1286
+ },
1287
+ taxCollected: {
1288
+ titleKey: "common.report-col.tax-collected",
1289
+ shortTitleKey: "common.report-col.tax-collected.short",
1290
+ infoTextKey: "common.report-col.tax-collected.info"
1291
+ },
1292
+ taxName: {
1293
+ titleKey: "common.report-col.tax-name",
1294
+ shortTitleKey: "common.report-col.tax-name.short",
1295
+ infoTextKey: "common.report-col.tax-name.info"
1296
+ },
1297
+ taxRate: {
1298
+ titleKey: "common.report-col.tax-rate",
1299
+ shortTitleKey: "common.report-col.tax-rate.short",
1300
+ infoTextKey: "common.report-col.tax-rate.info"
1301
+ },
1302
+ taxableSales: {
1303
+ titleKey: "common.report-col.taxable-sales",
1304
+ shortTitleKey: "common.report-col.taxable-sales.short",
1305
+ infoTextKey: "common.report-col.taxable-sales.info"
1306
+ },
1307
+ ticketClosed: {
1308
+ titleKey: "common.report-col.ticket-closed",
1309
+ shortTitleKey: "common.report-col.ticket-closed.short",
1310
+ infoTextKey: "common.report-col.ticket-closed.info"
1311
+ },
1312
+ ticketFee: {
1313
+ titleKey: "common.report-col.ticket-fee",
1314
+ shortTitleKey: "common.report-col.ticket-fee.short",
1315
+ infoTextKey: "common.report-col.ticket-fee.info"
1316
+ },
1317
+ ticketNumber: {
1318
+ titleKey: "common.report-col.ticket-number",
1319
+ shortTitleKey: "common.report-col.ticket-number.short",
1320
+ infoTextKey: "common.report-col.ticket-number.info"
1321
+ },
1322
+ ticketOpen: {
1323
+ titleKey: "common.report-col.ticket-open",
1324
+ shortTitleKey: "common.report-col.ticket-open.short",
1325
+ infoTextKey: "common.report-col.ticket-open.info"
1326
+ },
1327
+ ticketTotal: {
1328
+ titleKey: "common.report-col.ticket-total",
1329
+ shortTitleKey: "common.report-col.ticket-total.short",
1330
+ infoTextKey: "common.report-col.ticket-total.info"
1331
+ },
1332
+ timeOpenMins: {
1333
+ titleKey: "common.report-col.time-open-mins",
1334
+ shortTitleKey: "common.report-col.time-open-mins.short",
1335
+ infoTextKey: "common.report-col.time-open-mins.info"
1336
+ },
1337
+ tipPct: {
1338
+ titleKey: "common.report-col.tip-pct",
1339
+ shortTitleKey: "common.report-col.tip-pct.short",
1340
+ infoTextKey: "common.report-col.tip-pct.info"
1341
+ },
1342
+ tipReduction: {
1343
+ titleKey: "common.report-col.tip-reduction",
1344
+ shortTitleKey: "common.report-col.tip-reduction.short",
1345
+ infoTextKey: "common.report-col.tip-reduction.info"
1346
+ },
1347
+ tipShare: {
1348
+ titleKey: "common.report-col.tip-share",
1349
+ shortTitleKey: "common.report-col.tip-share.short",
1350
+ infoTextKey: "common.report-col.tip-share.info"
1351
+ },
1352
+ tips: {
1353
+ titleKey: "common.report-col.tips",
1354
+ shortTitleKey: "common.report-col.tips.short",
1355
+ infoTextKey: "common.report-col.tips.info"
1356
+ },
1357
+ tipsPerHour: {
1358
+ titleKey: "common.report-col.tips-per-hour",
1359
+ shortTitleKey: "common.report-col.tips-per-hour.short",
1360
+ infoTextKey: "common.report-col.tips-per-hour.info"
1361
+ },
1362
+ totalCollected: {
1363
+ titleKey: "common.report-col.total-collected",
1364
+ shortTitleKey: "common.report-col.total-collected.short",
1365
+ infoTextKey: "common.report-col.total-collected.info"
1366
+ },
1367
+ totalItemSales: {
1368
+ titleKey: "common.report-col.total-item-sales",
1369
+ shortTitleKey: "common.report-col.total-item-sales.short",
1370
+ infoTextKey: "common.report-col.total-item-sales.info"
1371
+ },
1372
+ totalModifierSales: {
1373
+ titleKey: "common.report-col.total-modifier-sales",
1374
+ shortTitleKey: "common.report-col.total-modifier-sales.short",
1375
+ infoTextKey: "common.report-col.total-modifier-sales.info"
1376
+ },
1377
+ totalReturns: {
1378
+ titleKey: "common.report-col.total-returns",
1379
+ shortTitleKey: "common.report-col.total-returns.short",
1380
+ infoTextKey: "common.report-col.total-returns.info"
1381
+ },
1382
+ totalSales: {
1383
+ titleKey: "common.report-col.total-sales",
1384
+ shortTitleKey: "common.report-col.total-sales.short",
1385
+ infoTextKey: "common.report-col.total-sales.info"
1386
+ },
1387
+ totalTips: {
1388
+ titleKey: "common.report-col.total-tips",
1389
+ shortTitleKey: "common.report-col.total-tips.short",
1390
+ infoTextKey: "common.report-col.total-tips.info"
1391
+ },
1392
+ transactionDate: {
1393
+ titleKey: "common.report-col.transaction-date",
1394
+ shortTitleKey: "common.report-col.transaction-date.short",
1395
+ infoTextKey: "common.report-col.transaction-date.info"
1396
+ },
1397
+ transactionType: {
1398
+ titleKey: "common.report-col.transaction-type",
1399
+ shortTitleKey: "common.report-col.transaction-type.short",
1400
+ infoTextKey: "common.report-col.transaction-type.info"
1401
+ },
1402
+ untaxedSales: {
1403
+ titleKey: "common.report-col.untaxed-sales",
1404
+ shortTitleKey: "common.report-col.untaxed-sales.short",
1405
+ infoTextKey: "common.report-col.untaxed-sales.info"
1406
+ },
1407
+ visa: {
1408
+ titleKey: "common.report-col.visa",
1409
+ shortTitleKey: "common.report-col.visa.short",
1410
+ infoTextKey: "common.report-col.visa.info"
1411
+ },
1412
+ visaReturns: {
1413
+ titleKey: "common.report-col.visa-returns",
1414
+ shortTitleKey: "common.report-col.visa-returns.short",
1415
+ infoTextKey: "common.report-col.visa-returns.info"
1416
+ },
1417
+ paymentsCount: {
1418
+ titleKey: "common.report-col.payments-count",
1419
+ shortTitleKey: "common.report-col.payments-count.short",
1420
+ infoTextKey: "common.report-col.payments-count.info"
1421
+ },
1422
+ paymentsAmount: {
1423
+ titleKey: "common.report-col.payments-amount",
1424
+ shortTitleKey: "common.report-col.payments-amount.short",
1425
+ infoTextKey: "common.report-col.payments-amount.info"
1426
+ },
1427
+ paymentsTotal: {
1428
+ titleKey: "common.report-col.payments-total",
1429
+ shortTitleKey: "common.report-col.payments-total.short",
1430
+ infoTextKey: "common.report-col.payments-total.info"
1431
+ },
1432
+ refundVoidDescription: {
1433
+ titleKey: "common.report-col.refund-void-description",
1434
+ shortTitleKey: "common.report-col.refund-void-description.short",
1435
+ infoTextKey: "common.report-col.refund-void-description.info"
1436
+ },
1437
+ refundVoidCount: {
1438
+ titleKey: "common.report-col.refund-void-count",
1439
+ shortTitleKey: "common.report-col.refund-void-count.short",
1440
+ infoTextKey: "common.report-col.refund-void-count.info"
1441
+ },
1442
+ refundVoidAmount: {
1443
+ titleKey: "common.report-col.refund-void-amount",
1444
+ shortTitleKey: "common.report-col.refund-void-amount.short",
1445
+ infoTextKey: "common.report-col.refund-void-amount.info"
1446
+ },
1447
+ refundVoidPctSales: {
1448
+ titleKey: "common.report-col.refund-void-pct-sales",
1449
+ shortTitleKey: "common.report-col.refund-void-pct-sales.short",
1450
+ infoTextKey: "common.report-col.refund-void-pct-sales.info"
1451
+ },
1452
+ discountName: {
1453
+ titleKey: "common.report-col.discount-name",
1454
+ shortTitleKey: "common.report-col.discount-name.short",
1455
+ infoTextKey: "common.report-col.discount-name.info"
1456
+ },
1457
+ tickets: {
1458
+ titleKey: "common.report-col.tickets",
1459
+ shortTitleKey: "common.report-col.tickets.short",
1460
+ infoTextKey: "common.report-col.tickets.info"
1461
+ },
1462
+ guests: {
1463
+ titleKey: "common.report-col.guests",
1464
+ shortTitleKey: "common.report-col.guests.short",
1465
+ infoTextKey: "common.report-col.guests.info"
1466
+ },
1467
+ ticketAverage: {
1468
+ titleKey: "common.report-col.ticket-average",
1469
+ shortTitleKey: "common.report-col.ticket-average.short",
1470
+ infoTextKey: "common.report-col.ticket-average.info"
1471
+ },
1472
+ guestAverage: {
1473
+ titleKey: "common.report-col.guest-average",
1474
+ shortTitleKey: "common.report-col.guest-average.short",
1475
+ infoTextKey: "common.report-col.guest-average.info"
1476
+ },
1477
+ net: {
1478
+ titleKey: "common.report-col.net",
1479
+ shortTitleKey: "common.report-col.net.short",
1480
+ infoTextKey: "common.report-col.net.info"
1481
+ }
1482
+ };
1483
+ function getColumnMetadata(key) {
1484
+ return COLUMN_REGISTRY[key];
1485
+ }
1486
+ function getColumnExportHeaderLabel(colTitle, groupTitle) {
1487
+ if (groupTitle) {
1488
+ return `${groupTitle}: ${colTitle}`;
1489
+ }
1490
+ return colTitle;
1491
+ }
1492
+
822
1493
  // src/utils/alignment.ts
823
1494
  function getColumnAlignment(type) {
824
1495
  if (type === "string" || type === "date" || type === "time") {
@@ -926,8 +1597,84 @@ var dailySalesTaxesConfig = {
926
1597
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
927
1598
  defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
928
1599
  };
1600
+
1601
+ // src/formatting.ts
1602
+ var formatDate = (date, options = {}) => {
1603
+ const { locale = "en-US", timeZone = "UTC" } = options;
1604
+ const d = new Date(date);
1605
+ return new Intl.DateTimeFormat(locale, {
1606
+ dateStyle: "short",
1607
+ timeZone
1608
+ }).format(d);
1609
+ };
1610
+ var formatTime = (date, options) => {
1611
+ const { locale = "en-US", timeZone = "UTC", format } = options;
1612
+ const d = new Date(date);
1613
+ if (format === "00:00") {
1614
+ return new Intl.DateTimeFormat(locale, {
1615
+ hour: "2-digit",
1616
+ minute: "2-digit",
1617
+ timeZone
1618
+ }).format(d);
1619
+ }
1620
+ if (format === "00:00-24H") {
1621
+ return new Intl.DateTimeFormat(locale, {
1622
+ hour: "2-digit",
1623
+ minute: "2-digit",
1624
+ hour12: false,
1625
+ hourCycle: "h23",
1626
+ timeZone
1627
+ }).format(d);
1628
+ }
1629
+ return new Intl.DateTimeFormat(locale, {
1630
+ hour: "2-digit",
1631
+ minute: "2-digit",
1632
+ second: "2-digit",
1633
+ timeZone
1634
+ }).format(d);
1635
+ };
1636
+ var formatMoney = (amount, options = {}) => {
1637
+ const { locale = "en-US", currency = "USD", decimals = 2 } = options;
1638
+ return new Intl.NumberFormat(locale, {
1639
+ style: "currency",
1640
+ currency,
1641
+ minimumFractionDigits: decimals,
1642
+ maximumFractionDigits: decimals
1643
+ }).format(amount);
1644
+ };
1645
+ var formatPercent = (value, decimals = 2) => `${value.toFixed(decimals)}%`;
1646
+ var formatInteger = (value) => Math.round(value).toString();
1647
+ var formatFixedNumber = (value, decimals = 2) => value.toFixed(decimals);
1648
+ var formatString = (value) => {
1649
+ return value == null ? "" : typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value) : "";
1650
+ };
1651
+ var getNumberToFormat = (value) => typeof value === "number" ? value : 0;
1652
+ var getDateToFormat = (value) => {
1653
+ if (value instanceof Date) {
1654
+ return isNaN(value.getTime()) ? null : value;
1655
+ }
1656
+ if (typeof value === "string" || typeof value === "number") {
1657
+ const d = new Date(value);
1658
+ return isNaN(d.getTime()) ? null : d;
1659
+ }
1660
+ return null;
1661
+ };
1662
+ var getReportFormattingLocaleOptions = (locations) => {
1663
+ if (locations.length === 0) {
1664
+ return [{ currency: "USD", locale: "en-US" }];
1665
+ }
1666
+ return Array.from(
1667
+ new Map(
1668
+ locations.map((loc) => ({
1669
+ currency: loc.currency,
1670
+ locale: `${loc.language ?? "en"}-${loc.countryCode}`
1671
+ })).map((item) => [`${item.currency}-${item.locale}`, item])
1672
+ ).values()
1673
+ );
1674
+ };
929
1675
  // Annotate the CommonJS export names for ESM import in node:
930
1676
  0 && (module.exports = {
1677
+ COLUMN_REGISTRY,
931
1678
  DAILY_SALES_AVAILABLE_COLUMNS,
932
1679
  DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
933
1680
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
@@ -966,8 +1713,20 @@ var dailySalesTaxesConfig = {
966
1713
  dailySalesTaxesConfig,
967
1714
  dailySalesTrendsConfig,
968
1715
  employeeTimecardConfig,
1716
+ formatDate,
1717
+ formatFixedNumber,
1718
+ formatInteger,
1719
+ formatMoney,
1720
+ formatPercent,
1721
+ formatString,
1722
+ formatTime,
969
1723
  getColumnAlignment,
1724
+ getColumnExportHeaderLabel,
1725
+ getColumnMetadata,
1726
+ getDateToFormat,
1727
+ getNumberToFormat,
970
1728
  getReportConfig,
1729
+ getReportFormattingLocaleOptions,
971
1730
  isNumericType,
972
1731
  itemTaxConfig,
973
1732
  modifierMixConfig,