@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.js CHANGED
@@ -746,6 +746,664 @@ var REPORT_CONFIG_MAP = {
746
746
  };
747
747
  var getReportConfig = (reportType) => REPORT_CONFIG_MAP[reportType];
748
748
 
749
+ // src/columns/index.ts
750
+ var COLUMN_REGISTRY = {
751
+ fifteenMinInterval: {
752
+ titleKey: "common.report-col.fifteen-min-interval",
753
+ shortTitleKey: "common.report-col.fifteen-min-interval.short",
754
+ infoTextKey: "common.report-col.fifteen-min-interval.info"
755
+ },
756
+ adjustedTips: {
757
+ titleKey: "common.report-col.adjusted-tips",
758
+ shortTitleKey: "common.report-col.adjusted-tips.short",
759
+ infoTextKey: "common.report-col.adjusted-tips.info"
760
+ },
761
+ advantageProgram: {
762
+ titleKey: "common.report-col.advantage-program",
763
+ shortTitleKey: "common.report-col.advantage-program.short",
764
+ infoTextKey: "common.report-col.advantage-program.info"
765
+ },
766
+ amex: {
767
+ titleKey: "common.report-col.amex",
768
+ shortTitleKey: "common.report-col.amex.short",
769
+ infoTextKey: "common.report-col.amex.info"
770
+ },
771
+ amexReturns: {
772
+ titleKey: "common.report-col.amex-returns",
773
+ shortTitleKey: "common.report-col.amex-returns.short",
774
+ infoTextKey: "common.report-col.amex-returns.info"
775
+ },
776
+ attachRate: {
777
+ titleKey: "common.report-col.attach-rate",
778
+ shortTitleKey: "common.report-col.attach-rate.short",
779
+ infoTextKey: "common.report-col.attach-rate.info"
780
+ },
781
+ autoGratuity: {
782
+ titleKey: "common.report-col.auto-gratuity",
783
+ shortTitleKey: "common.report-col.auto-gratuity.short",
784
+ infoTextKey: "common.report-col.auto-gratuity.info"
785
+ },
786
+ averageGrossPrice: {
787
+ titleKey: "common.report-col.average-gross-price",
788
+ shortTitleKey: "common.report-col.average-gross-price.short",
789
+ infoTextKey: "common.report-col.average-gross-price.info"
790
+ },
791
+ bankFees: {
792
+ titleKey: "common.report-col.bank-fees",
793
+ shortTitleKey: "common.report-col.bank-fees.short",
794
+ infoTextKey: "common.report-col.bank-fees.info"
795
+ },
796
+ batchAmount: {
797
+ titleKey: "common.report-col.batch-amount",
798
+ shortTitleKey: "common.report-col.batch-amount.short",
799
+ infoTextKey: "common.report-col.batch-amount.info"
800
+ },
801
+ batchDate: {
802
+ titleKey: "common.report-col.batch-date",
803
+ shortTitleKey: "common.report-col.batch-date.short",
804
+ infoTextKey: "common.report-col.batch-date.info"
805
+ },
806
+ batchNumber: {
807
+ titleKey: "common.report-col.batch-number",
808
+ shortTitleKey: "common.report-col.batch-number.short",
809
+ infoTextKey: "common.report-col.batch-number.info"
810
+ },
811
+ clockInTime: {
812
+ titleKey: "common.report-col.clock-in-time",
813
+ shortTitleKey: "common.report-col.clock-in-time.short",
814
+ infoTextKey: "common.report-col.clock-in-time.info"
815
+ },
816
+ clockOutTime: {
817
+ titleKey: "common.report-col.clock-out-time",
818
+ shortTitleKey: "common.report-col.clock-out-time.short",
819
+ infoTextKey: "common.report-col.clock-out-time.info"
820
+ },
821
+ country: {
822
+ titleKey: "common.report-col.country",
823
+ shortTitleKey: "common.report-col.country.short",
824
+ infoTextKey: "common.report-col.country.info"
825
+ },
826
+ customerName: {
827
+ titleKey: "common.report-col.customer-name",
828
+ shortTitleKey: "common.report-col.customer-name.short",
829
+ infoTextKey: "common.report-col.customer-name.info"
830
+ },
831
+ date: {
832
+ titleKey: "common.report-col.date",
833
+ shortTitleKey: "common.report-col.date.short",
834
+ infoTextKey: "common.report-col.date.info"
835
+ },
836
+ dateClose: {
837
+ titleKey: "common.report-col.date-close",
838
+ shortTitleKey: "common.report-col.date-close.short",
839
+ infoTextKey: "common.report-col.date-close.info"
840
+ },
841
+ daypart: {
842
+ titleKey: "common.report-col.daypart",
843
+ shortTitleKey: "common.report-col.daypart.short",
844
+ infoTextKey: "common.report-col.daypart.info"
845
+ },
846
+ debit: {
847
+ titleKey: "common.report-col.debit",
848
+ shortTitleKey: "common.report-col.debit.short",
849
+ infoTextKey: "common.report-col.debit.info"
850
+ },
851
+ debitReturns: {
852
+ titleKey: "common.report-col.debit-returns",
853
+ shortTitleKey: "common.report-col.debit-returns.short",
854
+ infoTextKey: "common.report-col.debit-returns.info"
855
+ },
856
+ declaredTips: {
857
+ titleKey: "common.report-col.declared-tips",
858
+ shortTitleKey: "common.report-col.declared-tips.short",
859
+ infoTextKey: "common.report-col.declared-tips.info"
860
+ },
861
+ department: {
862
+ titleKey: "common.report-col.department",
863
+ shortTitleKey: "common.report-col.department.short",
864
+ infoTextKey: "common.report-col.department.info"
865
+ },
866
+ depositCurrency: {
867
+ titleKey: "common.report-col.deposit-currency",
868
+ shortTitleKey: "common.report-col.deposit-currency.short",
869
+ infoTextKey: "common.report-col.deposit-currency.info"
870
+ },
871
+ depositDate: {
872
+ titleKey: "common.report-col.deposit-date",
873
+ shortTitleKey: "common.report-col.deposit-date.short",
874
+ infoTextKey: "common.report-col.deposit-date.info"
875
+ },
876
+ discountAmount: {
877
+ titleKey: "common.report-col.discount-amount",
878
+ shortTitleKey: "common.report-col.discount-amount.short",
879
+ infoTextKey: "common.report-col.discount-amount.info"
880
+ },
881
+ discountCount: {
882
+ titleKey: "common.report-col.discount-count",
883
+ shortTitleKey: "common.report-col.discount-count.short",
884
+ infoTextKey: "common.report-col.discount-count.info"
885
+ },
886
+ discover: {
887
+ titleKey: "common.report-col.discover",
888
+ shortTitleKey: "common.report-col.discover.short",
889
+ infoTextKey: "common.report-col.discover.info"
890
+ },
891
+ discoverReturns: {
892
+ titleKey: "common.report-col.discover-returns",
893
+ shortTitleKey: "common.report-col.discover-returns.short",
894
+ infoTextKey: "common.report-col.discover-returns.info"
895
+ },
896
+ ebt: {
897
+ titleKey: "common.report-col.ebt",
898
+ shortTitleKey: "common.report-col.ebt.short",
899
+ infoTextKey: "common.report-col.ebt.info"
900
+ },
901
+ ebtReturns: {
902
+ titleKey: "common.report-col.ebt-returns",
903
+ shortTitleKey: "common.report-col.ebt-returns.short",
904
+ infoTextKey: "common.report-col.ebt-returns.info"
905
+ },
906
+ employeeId: {
907
+ titleKey: "common.report-col.employee-id",
908
+ shortTitleKey: "common.report-col.employee-id.short",
909
+ infoTextKey: "common.report-col.employee-id.info"
910
+ },
911
+ employeeJob: {
912
+ titleKey: "common.report-col.employee-job",
913
+ shortTitleKey: "common.report-col.employee-job.short",
914
+ infoTextKey: "common.report-col.employee-job.info"
915
+ },
916
+ employeeName: {
917
+ titleKey: "common.report-col.employee-name",
918
+ shortTitleKey: "common.report-col.employee-name.short",
919
+ infoTextKey: "common.report-col.employee-name.info"
920
+ },
921
+ exemptTaxes: {
922
+ titleKey: "common.report-col.exempt-taxes",
923
+ shortTitleKey: "common.report-col.exempt-taxes.short",
924
+ infoTextKey: "common.report-col.exempt-taxes.info"
925
+ },
926
+ grandTotal: {
927
+ titleKey: "common.report-col.grand-total",
928
+ shortTitleKey: "common.report-col.grand-total.short",
929
+ infoTextKey: "common.report-col.grand-total.info"
930
+ },
931
+ grossCashSales: {
932
+ titleKey: "common.report-col.gross-cash-sales",
933
+ shortTitleKey: "common.report-col.gross-cash-sales.short",
934
+ infoTextKey: "common.report-col.gross-cash-sales.info"
935
+ },
936
+ grossCashTips: {
937
+ titleKey: "common.report-col.gross-cash-tips",
938
+ shortTitleKey: "common.report-col.gross-cash-tips.short",
939
+ infoTextKey: "common.report-col.gross-cash-tips.info"
940
+ },
941
+ grossCreditCardTips: {
942
+ titleKey: "common.report-col.gross-credit-card-tips",
943
+ shortTitleKey: "common.report-col.gross-credit-card-tips.short",
944
+ infoTextKey: "common.report-col.gross-credit-card-tips.info"
945
+ },
946
+ grossCreditSales: {
947
+ titleKey: "common.report-col.gross-credit-sales",
948
+ shortTitleKey: "common.report-col.gross-credit-sales.short",
949
+ infoTextKey: "common.report-col.gross-credit-sales.info"
950
+ },
951
+ grossSales: {
952
+ titleKey: "common.report-col.gross-sales",
953
+ shortTitleKey: "common.report-col.gross-sales.short",
954
+ infoTextKey: "common.report-col.gross-sales.info"
955
+ },
956
+ grossTips: {
957
+ titleKey: "common.report-col.gross-tips",
958
+ shortTitleKey: "common.report-col.gross-tips.short",
959
+ infoTextKey: "common.report-col.gross-tips.info"
960
+ },
961
+ guestCount: {
962
+ titleKey: "common.report-col.guest-count",
963
+ shortTitleKey: "common.report-col.guest-count.short",
964
+ infoTextKey: "common.report-col.guest-count.info"
965
+ },
966
+ guestsVarLw: {
967
+ titleKey: "common.report-col.guests-var-lw",
968
+ shortTitleKey: "common.report-col.guests-var-lw.short",
969
+ infoTextKey: "common.report-col.guests-var-lw.info"
970
+ },
971
+ guestsVarLwPct: {
972
+ titleKey: "common.report-col.guests-var-lw-pct",
973
+ shortTitleKey: "common.report-col.guests-var-lw-pct.short",
974
+ infoTextKey: "common.report-col.guests-var-lw-pct.info"
975
+ },
976
+ guestsVarLy: {
977
+ titleKey: "common.report-col.guests-var-ly",
978
+ shortTitleKey: "common.report-col.guests-var-ly.short",
979
+ infoTextKey: "common.report-col.guests-var-ly.info"
980
+ },
981
+ guestsVarLyPct: {
982
+ titleKey: "common.report-col.guests-var-ly-pct",
983
+ shortTitleKey: "common.report-col.guests-var-ly-pct.short",
984
+ infoTextKey: "common.report-col.guests-var-ly-pct.info"
985
+ },
986
+ hour: {
987
+ titleKey: "common.report-col.hour",
988
+ shortTitleKey: "common.report-col.hour.short",
989
+ infoTextKey: "common.report-col.hour.info"
990
+ },
991
+ hoursWorked: {
992
+ titleKey: "common.report-col.hours-worked",
993
+ shortTitleKey: "common.report-col.hours-worked.short",
994
+ infoTextKey: "common.report-col.hours-worked.info"
995
+ },
996
+ inclusiveTax: {
997
+ titleKey: "common.report-col.inclusive-tax",
998
+ shortTitleKey: "common.report-col.inclusive-tax.short",
999
+ infoTextKey: "common.report-col.inclusive-tax.info"
1000
+ },
1001
+ itemName: {
1002
+ titleKey: "common.report-col.item-name",
1003
+ shortTitleKey: "common.report-col.item-name.short",
1004
+ infoTextKey: "common.report-col.item-name.info"
1005
+ },
1006
+ itemPrice: {
1007
+ titleKey: "common.report-col.item-price",
1008
+ shortTitleKey: "common.report-col.item-price.short",
1009
+ infoTextKey: "common.report-col.item-price.info"
1010
+ },
1011
+ locationCity: {
1012
+ titleKey: "common.report-col.location-city",
1013
+ shortTitleKey: "common.report-col.location-city.short",
1014
+ infoTextKey: "common.report-col.location-city.info"
1015
+ },
1016
+ locationId: {
1017
+ titleKey: "common.report-col.location-id",
1018
+ shortTitleKey: "common.report-col.location-id.short",
1019
+ infoTextKey: "common.report-col.location-id.info"
1020
+ },
1021
+ locationMid: {
1022
+ titleKey: "common.report-col.location-mid",
1023
+ shortTitleKey: "common.report-col.location-mid.short",
1024
+ infoTextKey: "common.report-col.location-mid.info"
1025
+ },
1026
+ locationName: {
1027
+ titleKey: "common.report-col.location-name",
1028
+ shortTitleKey: "common.report-col.location-name.short",
1029
+ infoTextKey: "common.report-col.location-name.info"
1030
+ },
1031
+ locationState: {
1032
+ titleKey: "common.report-col.location-state",
1033
+ shortTitleKey: "common.report-col.location-state.short",
1034
+ infoTextKey: "common.report-col.location-state.info"
1035
+ },
1036
+ mastercard: {
1037
+ titleKey: "common.report-col.mastercard",
1038
+ shortTitleKey: "common.report-col.mastercard.short",
1039
+ infoTextKey: "common.report-col.mastercard.info"
1040
+ },
1041
+ mcReturns: {
1042
+ titleKey: "common.report-col.mc-returns",
1043
+ shortTitleKey: "common.report-col.mc-returns.short",
1044
+ infoTextKey: "common.report-col.mc-returns.info"
1045
+ },
1046
+ modifierName: {
1047
+ titleKey: "common.report-col.modifier-name",
1048
+ shortTitleKey: "common.report-col.modifier-name.short",
1049
+ infoTextKey: "common.report-col.modifier-name.info"
1050
+ },
1051
+ modifierPrice: {
1052
+ titleKey: "common.report-col.modifier-price",
1053
+ shortTitleKey: "common.report-col.modifier-price.short",
1054
+ infoTextKey: "common.report-col.modifier-price.info"
1055
+ },
1056
+ modifierQuantity: {
1057
+ titleKey: "common.report-col.modifier-quantity",
1058
+ shortTitleKey: "common.report-col.modifier-quantity.short",
1059
+ infoTextKey: "common.report-col.modifier-quantity.info"
1060
+ },
1061
+ netSales: {
1062
+ titleKey: "common.report-col.net-sales",
1063
+ shortTitleKey: "common.report-col.net-sales.short",
1064
+ infoTextKey: "common.report-col.net-sales.info"
1065
+ },
1066
+ netTaxCollected: {
1067
+ titleKey: "common.report-col.net-tax-collected",
1068
+ shortTitleKey: "common.report-col.net-tax-collected.short",
1069
+ infoTextKey: "common.report-col.net-tax-collected.info"
1070
+ },
1071
+ netTips: {
1072
+ titleKey: "common.report-col.net-tips",
1073
+ shortTitleKey: "common.report-col.net-tips.short",
1074
+ infoTextKey: "common.report-col.net-tips.info"
1075
+ },
1076
+ numberOfGuests: {
1077
+ titleKey: "common.report-col.number-of-guests",
1078
+ shortTitleKey: "common.report-col.number-of-guests.short",
1079
+ infoTextKey: "common.report-col.number-of-guests.info"
1080
+ },
1081
+ orderType: {
1082
+ titleKey: "common.report-col.order-type",
1083
+ shortTitleKey: "common.report-col.order-type.short",
1084
+ infoTextKey: "common.report-col.order-type.info"
1085
+ },
1086
+ paymentType: {
1087
+ titleKey: "common.report-col.payment-type",
1088
+ shortTitleKey: "common.report-col.payment-type.short",
1089
+ infoTextKey: "common.report-col.payment-type.info"
1090
+ },
1091
+ payrollId: {
1092
+ titleKey: "common.report-col.payroll-id",
1093
+ shortTitleKey: "common.report-col.payroll-id.short",
1094
+ infoTextKey: "common.report-col.payroll-id.info"
1095
+ },
1096
+ quantity: {
1097
+ titleKey: "common.report-col.quantity",
1098
+ shortTitleKey: "common.report-col.quantity.short",
1099
+ infoTextKey: "common.report-col.quantity.info"
1100
+ },
1101
+ referenceNumber: {
1102
+ titleKey: "common.report-col.reference-number",
1103
+ shortTitleKey: "common.report-col.reference-number.short",
1104
+ infoTextKey: "common.report-col.reference-number.info"
1105
+ },
1106
+ refundAmount: {
1107
+ titleKey: "common.report-col.refund-amount",
1108
+ shortTitleKey: "common.report-col.refund-amount.short",
1109
+ infoTextKey: "common.report-col.refund-amount.info"
1110
+ },
1111
+ refundedTaxAmount: {
1112
+ titleKey: "common.report-col.refunded-tax-amount",
1113
+ shortTitleKey: "common.report-col.refunded-tax-amount.short",
1114
+ infoTextKey: "common.report-col.refunded-tax-amount.info"
1115
+ },
1116
+ revenueCenter: {
1117
+ titleKey: "common.report-col.revenue-center",
1118
+ shortTitleKey: "common.report-col.revenue-center.short",
1119
+ infoTextKey: "common.report-col.revenue-center.info"
1120
+ },
1121
+ revenueClass: {
1122
+ titleKey: "common.report-col.revenue-class",
1123
+ shortTitleKey: "common.report-col.revenue-class.short",
1124
+ infoTextKey: "common.report-col.revenue-class.info"
1125
+ },
1126
+ salesVarLw: {
1127
+ titleKey: "common.report-col.sales-var-lw",
1128
+ shortTitleKey: "common.report-col.sales-var-lw.short",
1129
+ infoTextKey: "common.report-col.sales-var-lw.info"
1130
+ },
1131
+ salesVarLwPct: {
1132
+ titleKey: "common.report-col.sales-var-lw-pct",
1133
+ shortTitleKey: "common.report-col.sales-var-lw-pct.short",
1134
+ infoTextKey: "common.report-col.sales-var-lw-pct.info"
1135
+ },
1136
+ salesVarLy: {
1137
+ titleKey: "common.report-col.sales-var-ly",
1138
+ shortTitleKey: "common.report-col.sales-var-ly.short",
1139
+ infoTextKey: "common.report-col.sales-var-ly.info"
1140
+ },
1141
+ salesVarLyPct: {
1142
+ titleKey: "common.report-col.sales-var-ly-pct",
1143
+ shortTitleKey: "common.report-col.sales-var-ly-pct.short",
1144
+ infoTextKey: "common.report-col.sales-var-ly-pct.info"
1145
+ },
1146
+ salesMixByPct: {
1147
+ titleKey: "common.report-col.sales-mix-by-pct",
1148
+ shortTitleKey: "common.report-col.sales-mix-by-pct.short",
1149
+ infoTextKey: "common.report-col.sales-mix-by-pct.info"
1150
+ },
1151
+ salesPerGuest: {
1152
+ titleKey: "common.report-col.sales-per-guest",
1153
+ shortTitleKey: "common.report-col.sales-per-guest.short",
1154
+ infoTextKey: "common.report-col.sales-per-guest.info"
1155
+ },
1156
+ salesPerGuestLw: {
1157
+ titleKey: "common.report-col.sales-per-guest-lw",
1158
+ shortTitleKey: "common.report-col.sales-per-guest-lw.short",
1159
+ infoTextKey: "common.report-col.sales-per-guest-lw.info"
1160
+ },
1161
+ salesPerGuestLy: {
1162
+ titleKey: "common.report-col.sales-per-guest-ly",
1163
+ shortTitleKey: "common.report-col.sales-per-guest-ly.short",
1164
+ infoTextKey: "common.report-col.sales-per-guest-ly.info"
1165
+ },
1166
+ scheduledShiftEnd: {
1167
+ titleKey: "common.report-col.scheduled-shift-end",
1168
+ shortTitleKey: "common.report-col.scheduled-shift-end.short",
1169
+ infoTextKey: "common.report-col.scheduled-shift-end.info"
1170
+ },
1171
+ scheduledShiftStart: {
1172
+ titleKey: "common.report-col.scheduled-shift-start",
1173
+ shortTitleKey: "common.report-col.scheduled-shift-start.short",
1174
+ infoTextKey: "common.report-col.scheduled-shift-start.info"
1175
+ },
1176
+ settlementBatchDate: {
1177
+ titleKey: "common.report-col.settlement-batch-date",
1178
+ shortTitleKey: "common.report-col.settlement-batch-date.short",
1179
+ infoTextKey: "common.report-col.settlement-batch-date.info"
1180
+ },
1181
+ shiftDurationHrs: {
1182
+ titleKey: "common.report-col.shift-duration-hrs",
1183
+ shortTitleKey: "common.report-col.shift-duration-hrs.short",
1184
+ infoTextKey: "common.report-col.shift-duration-hrs.info"
1185
+ },
1186
+ salePaymentType: {
1187
+ titleKey: "common.report-col.sale-payment-type",
1188
+ shortTitleKey: "common.report-col.sale-payment-type.short",
1189
+ infoTextKey: "common.report-col.sale-payment-type.info"
1190
+ },
1191
+ status: {
1192
+ titleKey: "common.report-col.status",
1193
+ shortTitleKey: "common.report-col.status.short",
1194
+ infoTextKey: "common.report-col.status.info"
1195
+ },
1196
+ subtotal: {
1197
+ titleKey: "common.report-col.subtotal",
1198
+ shortTitleKey: "common.report-col.subtotal.short",
1199
+ infoTextKey: "common.report-col.subtotal.info"
1200
+ },
1201
+ taxCollected: {
1202
+ titleKey: "common.report-col.tax-collected",
1203
+ shortTitleKey: "common.report-col.tax-collected.short",
1204
+ infoTextKey: "common.report-col.tax-collected.info"
1205
+ },
1206
+ taxName: {
1207
+ titleKey: "common.report-col.tax-name",
1208
+ shortTitleKey: "common.report-col.tax-name.short",
1209
+ infoTextKey: "common.report-col.tax-name.info"
1210
+ },
1211
+ taxRate: {
1212
+ titleKey: "common.report-col.tax-rate",
1213
+ shortTitleKey: "common.report-col.tax-rate.short",
1214
+ infoTextKey: "common.report-col.tax-rate.info"
1215
+ },
1216
+ taxableSales: {
1217
+ titleKey: "common.report-col.taxable-sales",
1218
+ shortTitleKey: "common.report-col.taxable-sales.short",
1219
+ infoTextKey: "common.report-col.taxable-sales.info"
1220
+ },
1221
+ ticketClosed: {
1222
+ titleKey: "common.report-col.ticket-closed",
1223
+ shortTitleKey: "common.report-col.ticket-closed.short",
1224
+ infoTextKey: "common.report-col.ticket-closed.info"
1225
+ },
1226
+ ticketFee: {
1227
+ titleKey: "common.report-col.ticket-fee",
1228
+ shortTitleKey: "common.report-col.ticket-fee.short",
1229
+ infoTextKey: "common.report-col.ticket-fee.info"
1230
+ },
1231
+ ticketNumber: {
1232
+ titleKey: "common.report-col.ticket-number",
1233
+ shortTitleKey: "common.report-col.ticket-number.short",
1234
+ infoTextKey: "common.report-col.ticket-number.info"
1235
+ },
1236
+ ticketOpen: {
1237
+ titleKey: "common.report-col.ticket-open",
1238
+ shortTitleKey: "common.report-col.ticket-open.short",
1239
+ infoTextKey: "common.report-col.ticket-open.info"
1240
+ },
1241
+ ticketTotal: {
1242
+ titleKey: "common.report-col.ticket-total",
1243
+ shortTitleKey: "common.report-col.ticket-total.short",
1244
+ infoTextKey: "common.report-col.ticket-total.info"
1245
+ },
1246
+ timeOpenMins: {
1247
+ titleKey: "common.report-col.time-open-mins",
1248
+ shortTitleKey: "common.report-col.time-open-mins.short",
1249
+ infoTextKey: "common.report-col.time-open-mins.info"
1250
+ },
1251
+ tipPct: {
1252
+ titleKey: "common.report-col.tip-pct",
1253
+ shortTitleKey: "common.report-col.tip-pct.short",
1254
+ infoTextKey: "common.report-col.tip-pct.info"
1255
+ },
1256
+ tipReduction: {
1257
+ titleKey: "common.report-col.tip-reduction",
1258
+ shortTitleKey: "common.report-col.tip-reduction.short",
1259
+ infoTextKey: "common.report-col.tip-reduction.info"
1260
+ },
1261
+ tipShare: {
1262
+ titleKey: "common.report-col.tip-share",
1263
+ shortTitleKey: "common.report-col.tip-share.short",
1264
+ infoTextKey: "common.report-col.tip-share.info"
1265
+ },
1266
+ tips: {
1267
+ titleKey: "common.report-col.tips",
1268
+ shortTitleKey: "common.report-col.tips.short",
1269
+ infoTextKey: "common.report-col.tips.info"
1270
+ },
1271
+ tipsPerHour: {
1272
+ titleKey: "common.report-col.tips-per-hour",
1273
+ shortTitleKey: "common.report-col.tips-per-hour.short",
1274
+ infoTextKey: "common.report-col.tips-per-hour.info"
1275
+ },
1276
+ totalCollected: {
1277
+ titleKey: "common.report-col.total-collected",
1278
+ shortTitleKey: "common.report-col.total-collected.short",
1279
+ infoTextKey: "common.report-col.total-collected.info"
1280
+ },
1281
+ totalItemSales: {
1282
+ titleKey: "common.report-col.total-item-sales",
1283
+ shortTitleKey: "common.report-col.total-item-sales.short",
1284
+ infoTextKey: "common.report-col.total-item-sales.info"
1285
+ },
1286
+ totalModifierSales: {
1287
+ titleKey: "common.report-col.total-modifier-sales",
1288
+ shortTitleKey: "common.report-col.total-modifier-sales.short",
1289
+ infoTextKey: "common.report-col.total-modifier-sales.info"
1290
+ },
1291
+ totalReturns: {
1292
+ titleKey: "common.report-col.total-returns",
1293
+ shortTitleKey: "common.report-col.total-returns.short",
1294
+ infoTextKey: "common.report-col.total-returns.info"
1295
+ },
1296
+ totalSales: {
1297
+ titleKey: "common.report-col.total-sales",
1298
+ shortTitleKey: "common.report-col.total-sales.short",
1299
+ infoTextKey: "common.report-col.total-sales.info"
1300
+ },
1301
+ totalTips: {
1302
+ titleKey: "common.report-col.total-tips",
1303
+ shortTitleKey: "common.report-col.total-tips.short",
1304
+ infoTextKey: "common.report-col.total-tips.info"
1305
+ },
1306
+ transactionDate: {
1307
+ titleKey: "common.report-col.transaction-date",
1308
+ shortTitleKey: "common.report-col.transaction-date.short",
1309
+ infoTextKey: "common.report-col.transaction-date.info"
1310
+ },
1311
+ transactionType: {
1312
+ titleKey: "common.report-col.transaction-type",
1313
+ shortTitleKey: "common.report-col.transaction-type.short",
1314
+ infoTextKey: "common.report-col.transaction-type.info"
1315
+ },
1316
+ untaxedSales: {
1317
+ titleKey: "common.report-col.untaxed-sales",
1318
+ shortTitleKey: "common.report-col.untaxed-sales.short",
1319
+ infoTextKey: "common.report-col.untaxed-sales.info"
1320
+ },
1321
+ visa: {
1322
+ titleKey: "common.report-col.visa",
1323
+ shortTitleKey: "common.report-col.visa.short",
1324
+ infoTextKey: "common.report-col.visa.info"
1325
+ },
1326
+ visaReturns: {
1327
+ titleKey: "common.report-col.visa-returns",
1328
+ shortTitleKey: "common.report-col.visa-returns.short",
1329
+ infoTextKey: "common.report-col.visa-returns.info"
1330
+ },
1331
+ paymentsCount: {
1332
+ titleKey: "common.report-col.payments-count",
1333
+ shortTitleKey: "common.report-col.payments-count.short",
1334
+ infoTextKey: "common.report-col.payments-count.info"
1335
+ },
1336
+ paymentsAmount: {
1337
+ titleKey: "common.report-col.payments-amount",
1338
+ shortTitleKey: "common.report-col.payments-amount.short",
1339
+ infoTextKey: "common.report-col.payments-amount.info"
1340
+ },
1341
+ paymentsTotal: {
1342
+ titleKey: "common.report-col.payments-total",
1343
+ shortTitleKey: "common.report-col.payments-total.short",
1344
+ infoTextKey: "common.report-col.payments-total.info"
1345
+ },
1346
+ refundVoidDescription: {
1347
+ titleKey: "common.report-col.refund-void-description",
1348
+ shortTitleKey: "common.report-col.refund-void-description.short",
1349
+ infoTextKey: "common.report-col.refund-void-description.info"
1350
+ },
1351
+ refundVoidCount: {
1352
+ titleKey: "common.report-col.refund-void-count",
1353
+ shortTitleKey: "common.report-col.refund-void-count.short",
1354
+ infoTextKey: "common.report-col.refund-void-count.info"
1355
+ },
1356
+ refundVoidAmount: {
1357
+ titleKey: "common.report-col.refund-void-amount",
1358
+ shortTitleKey: "common.report-col.refund-void-amount.short",
1359
+ infoTextKey: "common.report-col.refund-void-amount.info"
1360
+ },
1361
+ refundVoidPctSales: {
1362
+ titleKey: "common.report-col.refund-void-pct-sales",
1363
+ shortTitleKey: "common.report-col.refund-void-pct-sales.short",
1364
+ infoTextKey: "common.report-col.refund-void-pct-sales.info"
1365
+ },
1366
+ discountName: {
1367
+ titleKey: "common.report-col.discount-name",
1368
+ shortTitleKey: "common.report-col.discount-name.short",
1369
+ infoTextKey: "common.report-col.discount-name.info"
1370
+ },
1371
+ tickets: {
1372
+ titleKey: "common.report-col.tickets",
1373
+ shortTitleKey: "common.report-col.tickets.short",
1374
+ infoTextKey: "common.report-col.tickets.info"
1375
+ },
1376
+ guests: {
1377
+ titleKey: "common.report-col.guests",
1378
+ shortTitleKey: "common.report-col.guests.short",
1379
+ infoTextKey: "common.report-col.guests.info"
1380
+ },
1381
+ ticketAverage: {
1382
+ titleKey: "common.report-col.ticket-average",
1383
+ shortTitleKey: "common.report-col.ticket-average.short",
1384
+ infoTextKey: "common.report-col.ticket-average.info"
1385
+ },
1386
+ guestAverage: {
1387
+ titleKey: "common.report-col.guest-average",
1388
+ shortTitleKey: "common.report-col.guest-average.short",
1389
+ infoTextKey: "common.report-col.guest-average.info"
1390
+ },
1391
+ net: {
1392
+ titleKey: "common.report-col.net",
1393
+ shortTitleKey: "common.report-col.net.short",
1394
+ infoTextKey: "common.report-col.net.info"
1395
+ }
1396
+ };
1397
+ function getColumnMetadata(key) {
1398
+ return COLUMN_REGISTRY[key];
1399
+ }
1400
+ function getColumnExportHeaderLabel(colTitle, groupTitle) {
1401
+ if (groupTitle) {
1402
+ return `${groupTitle}: ${colTitle}`;
1403
+ }
1404
+ return colTitle;
1405
+ }
1406
+
749
1407
  // src/utils/alignment.ts
750
1408
  function getColumnAlignment(type) {
751
1409
  if (type === "string" || type === "date" || type === "time") {
@@ -853,7 +1511,83 @@ var dailySalesTaxesConfig = {
853
1511
  availableColumns: DAILY_SALES_TAXES_AVAILABLE_COLUMNS,
854
1512
  defaultVisibleColumns: DAILY_SALES_TAXES_DEFAULT_VISIBLE_COLUMNS
855
1513
  };
1514
+
1515
+ // src/formatting.ts
1516
+ var formatDate = (date, options = {}) => {
1517
+ const { locale = "en-US", timeZone = "UTC" } = options;
1518
+ const d = new Date(date);
1519
+ return new Intl.DateTimeFormat(locale, {
1520
+ dateStyle: "short",
1521
+ timeZone
1522
+ }).format(d);
1523
+ };
1524
+ var formatTime = (date, options) => {
1525
+ const { locale = "en-US", timeZone = "UTC", format } = options;
1526
+ const d = new Date(date);
1527
+ if (format === "00:00") {
1528
+ return new Intl.DateTimeFormat(locale, {
1529
+ hour: "2-digit",
1530
+ minute: "2-digit",
1531
+ timeZone
1532
+ }).format(d);
1533
+ }
1534
+ if (format === "00:00-24H") {
1535
+ return new Intl.DateTimeFormat(locale, {
1536
+ hour: "2-digit",
1537
+ minute: "2-digit",
1538
+ hour12: false,
1539
+ hourCycle: "h23",
1540
+ timeZone
1541
+ }).format(d);
1542
+ }
1543
+ return new Intl.DateTimeFormat(locale, {
1544
+ hour: "2-digit",
1545
+ minute: "2-digit",
1546
+ second: "2-digit",
1547
+ timeZone
1548
+ }).format(d);
1549
+ };
1550
+ var formatMoney = (amount, options = {}) => {
1551
+ const { locale = "en-US", currency = "USD", decimals = 2 } = options;
1552
+ return new Intl.NumberFormat(locale, {
1553
+ style: "currency",
1554
+ currency,
1555
+ minimumFractionDigits: decimals,
1556
+ maximumFractionDigits: decimals
1557
+ }).format(amount);
1558
+ };
1559
+ var formatPercent = (value, decimals = 2) => `${value.toFixed(decimals)}%`;
1560
+ var formatInteger = (value) => Math.round(value).toString();
1561
+ var formatFixedNumber = (value, decimals = 2) => value.toFixed(decimals);
1562
+ var formatString = (value) => {
1563
+ return value == null ? "" : typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value) : "";
1564
+ };
1565
+ var getNumberToFormat = (value) => typeof value === "number" ? value : 0;
1566
+ var getDateToFormat = (value) => {
1567
+ if (value instanceof Date) {
1568
+ return isNaN(value.getTime()) ? null : value;
1569
+ }
1570
+ if (typeof value === "string" || typeof value === "number") {
1571
+ const d = new Date(value);
1572
+ return isNaN(d.getTime()) ? null : d;
1573
+ }
1574
+ return null;
1575
+ };
1576
+ var getReportFormattingLocaleOptions = (locations) => {
1577
+ if (locations.length === 0) {
1578
+ return [{ currency: "USD", locale: "en-US" }];
1579
+ }
1580
+ return Array.from(
1581
+ new Map(
1582
+ locations.map((loc) => ({
1583
+ currency: loc.currency,
1584
+ locale: `${loc.language ?? "en"}-${loc.countryCode}`
1585
+ })).map((item) => [`${item.currency}-${item.locale}`, item])
1586
+ ).values()
1587
+ );
1588
+ };
856
1589
  export {
1590
+ COLUMN_REGISTRY,
857
1591
  DAILY_SALES_AVAILABLE_COLUMNS,
858
1592
  DAILY_SALES_BY_GROUP_AVAILABLE_COLUMNS,
859
1593
  DAILY_SALES_DEFAULT_VISIBLE_COLUMNS,
@@ -892,8 +1626,20 @@ export {
892
1626
  dailySalesTaxesConfig,
893
1627
  dailySalesTrendsConfig,
894
1628
  employeeTimecardConfig,
1629
+ formatDate,
1630
+ formatFixedNumber,
1631
+ formatInteger,
1632
+ formatMoney,
1633
+ formatPercent,
1634
+ formatString,
1635
+ formatTime,
895
1636
  getColumnAlignment,
1637
+ getColumnExportHeaderLabel,
1638
+ getColumnMetadata,
1639
+ getDateToFormat,
1640
+ getNumberToFormat,
896
1641
  getReportConfig,
1642
+ getReportFormattingLocaleOptions,
897
1643
  isNumericType,
898
1644
  itemTaxConfig,
899
1645
  modifierMixConfig,