@tabres/react 1.0.40 → 1.0.41
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/constants/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.esm.js +1 -1
- package/dist/constants/index.esm.js.map +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/modules/pos/constants/countries.d.ts +6 -0
- package/dist/constants/modules/pos/constants/posCompliance.d.ts +22 -0
- package/dist/constants/modules/pos/models/compliance.d.ts +9 -0
- package/dist/modules/pos/constants/countries.d.ts +6 -0
- package/dist/modules/pos/constants/posCompliance.d.ts +22 -0
- package/dist/modules/pos/models/compliance.d.ts +9 -0
- package/dist/modules/pos/utils/index.d.ts +1 -0
- package/dist/modules/pos/utils/posCompliance.d.ts +10 -0
- package/dist/modules/pos/utils/posCompliance.test.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/modules/pos/constants/countries.d.ts +6 -0
- package/dist/utils/modules/pos/constants/posCompliance.d.ts +22 -0
- package/dist/utils/modules/pos/models/compliance.d.ts +9 -0
- package/dist/utils/modules/pos/utils/index.d.ts +1 -0
- package/dist/utils/modules/pos/utils/posCompliance.d.ts +10 -0
- package/dist/utils/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PosAllowance } from "../models/compliance";
|
|
2
|
+
/**
|
|
3
|
+
* Severity of each POS-allowance value, low → high. When the signed-in user's
|
|
4
|
+
* account country and the active branch's country disagree, the stricter
|
|
5
|
+
* (higher-severity) outcome wins — we never under-restrict and expose the
|
|
6
|
+
* merchant (or us) to fiscal penalties.
|
|
7
|
+
*/
|
|
8
|
+
export declare const POS_ALLOWANCE_SEVERITY: Record<PosAllowance, number>;
|
|
9
|
+
export declare const BLOCKING_ALLOWANCES: PosAllowance[];
|
|
10
|
+
export declare const WARNING_ALLOWANCES: PosAllowance[];
|
|
11
|
+
export declare const POS_ALLOWANCE_BY_CODE: Record<string, PosAllowance>;
|
|
12
|
+
export interface PosComplianceCopy {
|
|
13
|
+
heading: string;
|
|
14
|
+
body: string;
|
|
15
|
+
note?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Official, liability-protective copy per allowance. "no" and "restricted" share
|
|
19
|
+
* the hard-block message; the two advisory states each have their own; "yes" has
|
|
20
|
+
* none. The strings double as i18n keys (human-readable English fallback).
|
|
21
|
+
*/
|
|
22
|
+
export declare const POS_COMPLIANCE_COPY: Record<PosAllowance, PosComplianceCopy | null>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a restaurant can legally run a generic, NON-government-certified POS for HoReCa:
|
|
3
|
+
* - "restricted": Do not operate — comprehensive sanctions/embargo make a Western POS + payments SaaS illegal/unworkable, regardless of local tax law.
|
|
4
|
+
* - "no": Effectively forbidden — the POS software itself must be government-certified/registered before use (vendor is liable), or POS is banned.
|
|
5
|
+
* - "requires_integration": Allowed, but the business must connect to a government e-tax/e-invoice API or use a certified fiscal device/printer.
|
|
6
|
+
* - "own_risk": No certified/real-time mandate, but strict tax & bookkeeping rules apply and the restaurant is responsible.
|
|
7
|
+
* - "yes": No strict POS rules; an uncertified POS won't get the restaurant (or us) fined.
|
|
8
|
+
*/
|
|
9
|
+
export type PosAllowance = "restricted" | "no" | "requires_integration" | "own_risk" | "yes";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./posCompliance";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PosAllowance } from "../models/compliance";
|
|
2
|
+
export declare const getPosAllowance: (code?: string | null) => PosAllowance | null;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the effective POS allowance from the user's account country and the
|
|
5
|
+
* active branch's country, taking the stricter of the two (most-restrictive
|
|
6
|
+
* wins). Returns null when neither country is known.
|
|
7
|
+
*/
|
|
8
|
+
export declare const resolvePosAllowance: (userCountry?: string | null, branchCountryCode?: string | null) => PosAllowance | null;
|
|
9
|
+
export declare const isBlockingAllowance: (allowance: PosAllowance | null) => boolean;
|
|
10
|
+
export declare const isWarningAllowance: (allowance: PosAllowance | null) => boolean;
|