@harbortouch/skytab-analytics-report-utils 0.22.0 → 0.23.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.
|
@@ -760,6 +760,7 @@ var FIELDS13 = {
|
|
|
760
760
|
paymentTypeName: {
|
|
761
761
|
type: "string",
|
|
762
762
|
size: FIRST_COLUMN_WIDTH,
|
|
763
|
+
columnKey: "paymentType",
|
|
763
764
|
footerCalculation: { type: "label", label: "table.total" }
|
|
764
765
|
},
|
|
765
766
|
paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
|
|
@@ -3226,7 +3227,6 @@ var filterCrowdin = (messages) => Object.fromEntries(
|
|
|
3226
3227
|
Object.entries(messages).filter((entry) => typeof entry[1] === "string")
|
|
3227
3228
|
);
|
|
3228
3229
|
var LOCALE_OVERRIDES = {
|
|
3229
|
-
"en-US": {},
|
|
3230
3230
|
"en-GB": filterCrowdin(en_GB_default),
|
|
3231
3231
|
"es-ES": filterCrowdin(es_ES_default)
|
|
3232
3232
|
};
|
|
@@ -1490,7 +1490,6 @@ var filterCrowdin = (messages) => Object.fromEntries(
|
|
|
1490
1490
|
Object.entries(messages).filter((entry) => typeof entry[1] === "string")
|
|
1491
1491
|
);
|
|
1492
1492
|
var LOCALE_OVERRIDES = {
|
|
1493
|
-
"en-US": {},
|
|
1494
1493
|
"en-GB": filterCrowdin(en_GB_default),
|
|
1495
1494
|
"es-ES": filterCrowdin(es_ES_default)
|
|
1496
1495
|
};
|
|
@@ -2395,6 +2394,7 @@ var FIELDS13 = {
|
|
|
2395
2394
|
paymentTypeName: {
|
|
2396
2395
|
type: "string",
|
|
2397
2396
|
size: FIRST_COLUMN_WIDTH,
|
|
2397
|
+
columnKey: "paymentType",
|
|
2398
2398
|
footerCalculation: { type: "label", label: "table.total" }
|
|
2399
2399
|
},
|
|
2400
2400
|
paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
|
package/dist/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ __export(index_exports, {
|
|
|
28
28
|
TENDER_TYPE: () => TENDER_TYPE,
|
|
29
29
|
buildDailySalesCashPayments: () => buildDailySalesCashPayments,
|
|
30
30
|
buildDailySalesRevClassFooter: () => buildDailySalesRevClassFooter,
|
|
31
|
+
buildPaymentsSectionData: () => buildPaymentsSectionData,
|
|
31
32
|
calculateReportTotals: () => calculateReportTotals,
|
|
32
33
|
dailySalesCacheConfig: () => dailySalesCacheConfig,
|
|
33
34
|
dailySalesConfig: () => dailySalesConfig,
|
|
@@ -831,6 +832,7 @@ var FIELDS13 = {
|
|
|
831
832
|
paymentTypeName: {
|
|
832
833
|
type: "string",
|
|
833
834
|
size: FIRST_COLUMN_WIDTH,
|
|
835
|
+
columnKey: "paymentType",
|
|
834
836
|
footerCalculation: { type: "label", label: "table.total" }
|
|
835
837
|
},
|
|
836
838
|
paymentsCount: { type: "number", columnKey: "paymentsCount", footerCalculation: { type: "sum" } },
|
|
@@ -1995,6 +1997,9 @@ var buildDailySalesRevClassFooter = (inputs) => {
|
|
|
1995
1997
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
|
|
1996
1998
|
];
|
|
1997
1999
|
};
|
|
2000
|
+
var buildPaymentsSectionData = (payments) => {
|
|
2001
|
+
return payments.filter((payment) => payment.paymentTypeName !== TENDER_TYPE.HOUSE_ACCOUNT);
|
|
2002
|
+
};
|
|
1998
2003
|
|
|
1999
2004
|
// src/translations/crowdin/skytab-analytics-report-utils/en-GB.ts
|
|
2000
2005
|
var enUS = {
|
|
@@ -3462,7 +3467,6 @@ var filterCrowdin = (messages) => Object.fromEntries(
|
|
|
3462
3467
|
Object.entries(messages).filter((entry) => typeof entry[1] === "string")
|
|
3463
3468
|
);
|
|
3464
3469
|
var LOCALE_OVERRIDES = {
|
|
3465
|
-
"en-US": {},
|
|
3466
3470
|
"en-GB": filterCrowdin(en_GB_default),
|
|
3467
3471
|
"es-ES": filterCrowdin(es_ES_default)
|
|
3468
3472
|
};
|
|
@@ -3629,6 +3633,7 @@ var formatFieldValue = (value, type, localeOptions, fullRecord, fieldConfig = DE
|
|
|
3629
3633
|
TENDER_TYPE,
|
|
3630
3634
|
buildDailySalesCashPayments,
|
|
3631
3635
|
buildDailySalesRevClassFooter,
|
|
3636
|
+
buildPaymentsSectionData,
|
|
3632
3637
|
calculateReportTotals,
|
|
3633
3638
|
dailySalesCacheConfig,
|
|
3634
3639
|
dailySalesConfig,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { M as MessageKey, F as FieldType, C as ColumnAlignment, a as ColumnPresentationConfig, b as ColumnGroupConfig, R as ReportType, c as ReportConfig, d as ReportColumnKey } from './report-DklnjPk7.cjs';
|
|
2
2
|
export { e as COLUMN_REGISTRY, f as ColumnMessageKey, g as ColumnMetadata, h as FooterCalculation, i as FooterCalculationType, j as Report, k as getColumnExportHeaderLabel, l as getColumnMetadata, m as getReportConfig, n as getReportExportFileName } from './report-DklnjPk7.cjs';
|
|
3
|
+
import { LocaleCode } from '@harbortouch/locale-registry';
|
|
3
4
|
|
|
4
|
-
type SupportedLocale =
|
|
5
|
+
type SupportedLocale = LocaleCode;
|
|
5
6
|
declare function resolveTranslate(key: MessageKey, locale: string): string;
|
|
6
7
|
|
|
7
8
|
declare function getColumnAlignment(type?: FieldType): ColumnAlignment;
|
|
@@ -141,6 +142,9 @@ declare const buildDailySalesRevClassFooter: (inputs: {
|
|
|
141
142
|
groupByName: "common.report-section.rev-class-footer.total-accountable";
|
|
142
143
|
salesAmountNet: number;
|
|
143
144
|
})[];
|
|
145
|
+
declare const buildPaymentsSectionData: <T extends {
|
|
146
|
+
paymentTypeName: string;
|
|
147
|
+
}>(payments: T[]) => T[];
|
|
144
148
|
|
|
145
149
|
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
146
150
|
declare const dailySalesRefundsVoidsConfig: {
|
|
@@ -302,4 +306,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
302
306
|
}[]) => LocaleOption[];
|
|
303
307
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
304
308
|
|
|
305
|
-
export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
|
309
|
+
export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, buildPaymentsSectionData, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { M as MessageKey, F as FieldType, C as ColumnAlignment, a as ColumnPresentationConfig, b as ColumnGroupConfig, R as ReportType, c as ReportConfig, d as ReportColumnKey } from './report-DklnjPk7.js';
|
|
2
2
|
export { e as COLUMN_REGISTRY, f as ColumnMessageKey, g as ColumnMetadata, h as FooterCalculation, i as FooterCalculationType, j as Report, k as getColumnExportHeaderLabel, l as getColumnMetadata, m as getReportConfig, n as getReportExportFileName } from './report-DklnjPk7.js';
|
|
3
|
+
import { LocaleCode } from '@harbortouch/locale-registry';
|
|
3
4
|
|
|
4
|
-
type SupportedLocale =
|
|
5
|
+
type SupportedLocale = LocaleCode;
|
|
5
6
|
declare function resolveTranslate(key: MessageKey, locale: string): string;
|
|
6
7
|
|
|
7
8
|
declare function getColumnAlignment(type?: FieldType): ColumnAlignment;
|
|
@@ -141,6 +142,9 @@ declare const buildDailySalesRevClassFooter: (inputs: {
|
|
|
141
142
|
groupByName: "common.report-section.rev-class-footer.total-accountable";
|
|
142
143
|
salesAmountNet: number;
|
|
143
144
|
})[];
|
|
145
|
+
declare const buildPaymentsSectionData: <T extends {
|
|
146
|
+
paymentTypeName: string;
|
|
147
|
+
}>(payments: T[]) => T[];
|
|
144
148
|
|
|
145
149
|
type DailySalesRefundsVoidsField = 'description' | 'count' | 'amount' | 'pctSales';
|
|
146
150
|
declare const dailySalesRefundsVoidsConfig: {
|
|
@@ -302,4 +306,4 @@ declare const getReportFormattingLocaleOptions: (locations: {
|
|
|
302
306
|
}[]) => LocaleOption[];
|
|
303
307
|
declare const formatFieldValue: (value: unknown, type: FieldType, localeOptions: LocaleOption, fullRecord: Record<string, unknown> | null | undefined, fieldConfig?: ColumnPresentationConfig) => string;
|
|
304
308
|
|
|
305
|
-
export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
|
309
|
+
export { type CalculateReportTotalsOptions, ColumnAlignment, ColumnGroupConfig, ColumnPresentationConfig, DAILY_SALES_CASH_ROW_LABELS, DAILY_SALES_REV_CLASS_FOOTER_LABELS, type DailySalesCacheField, type DailySalesDiscountsField, type DailySalesField, type DailySalesPaymentsField, type DailySalesRefundsVoidsField, type DailySalesTaxesField, type DailySalesTrendsField, type EmployeeTimecardField, type EmployeeTipField, FieldType, type FormatDateOptions, type FormatMoneyOptions, type FormatNumberOptions, type FormatTimeOptions, type ItemTaxField, type LocaleOption, type ModifierMixField, type ProductMixField, REPORT_SECTION_CONFIGS, ReportColumnKey, ReportConfig, type ReportSectionColumnDef, type ReportSectionDefinition, ReportType, type SalesByItemDetailField, type SalesSummaryField, type SupportedLocale, TENDER_TYPE, type TicketLiveField, type TicketSummaryField, type TimeFormat, buildDailySalesCashPayments, buildDailySalesRevClassFooter, buildPaymentsSectionData, calculateReportTotals, dailySalesCacheConfig, dailySalesConfig, dailySalesDiscountsConfig, dailySalesPaymentsConfig, dailySalesRefundsVoidsConfig, dailySalesTaxesConfig, dailySalesTrendsConfig, dailySalesTrendsOrderTypeConfig, employeeTimecardConfig, employeeTipConfig, formatDate, formatFieldValue, formatFixedNumber, formatInteger, formatMoney, formatMoneyWithoutSymbol, formatPercent, formatString, formatTime, getColumnAlignment, getDateToFormat, getFooterValue, getNumberToFormat, getReportFormattingLocaleOptions, isNumericType, itemTaxConfig, modifierMixConfig, productMixConfig, resolveTranslate, salesByItemDetailConfig, salesSummaryConfig, ticketLiveConfig, ticketSummaryConfig };
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
salesSummaryConfig,
|
|
38
38
|
ticketLiveConfig,
|
|
39
39
|
ticketSummaryConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SP2ZXKSZ.js";
|
|
41
41
|
|
|
42
42
|
// src/utils/alignment.ts
|
|
43
43
|
function getColumnAlignment(type) {
|
|
@@ -203,6 +203,9 @@ var buildDailySalesRevClassFooter = (inputs) => {
|
|
|
203
203
|
{ groupByName: DAILY_SALES_REV_CLASS_FOOTER_LABELS.totalAccountable, salesAmountNet: totalAccountable }
|
|
204
204
|
];
|
|
205
205
|
};
|
|
206
|
+
var buildPaymentsSectionData = (payments) => {
|
|
207
|
+
return payments.filter((payment) => payment.paymentTypeName !== TENDER_TYPE.HOUSE_ACCOUNT);
|
|
208
|
+
};
|
|
206
209
|
export {
|
|
207
210
|
COLUMN_REGISTRY,
|
|
208
211
|
DAILY_SALES_CASH_ROW_LABELS,
|
|
@@ -212,6 +215,7 @@ export {
|
|
|
212
215
|
TENDER_TYPE,
|
|
213
216
|
buildDailySalesCashPayments,
|
|
214
217
|
buildDailySalesRevClassFooter,
|
|
218
|
+
buildPaymentsSectionData,
|
|
215
219
|
calculateReportTotals,
|
|
216
220
|
dailySalesCacheConfig,
|
|
217
221
|
dailySalesConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harbortouch/skytab-analytics-report-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Centralized report column presentation configuration for SkyTab Analytics",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.6.0",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"packageManager": "pnpm@10.24.0+sha512.01ff8ae71b4419903b65c60fb2dc9d34cf8bb6e06d03bde112ef38f7a34d6904c424ba66bea5cdcf12890230bf39f9580473140ed9c946fef328b6e5238a345a",
|
|
72
72
|
"dependencies": {
|
|
73
|
+
"@harbortouch/locale-registry": "^1.0.1",
|
|
73
74
|
"csv-stringify": "^6.8.0",
|
|
74
75
|
"date-fns": "^4.4.0",
|
|
75
76
|
"exceljs": "^4.4.0",
|