@retalia/pos-components 0.0.7 → 0.0.9
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/README.md +80 -8
- package/fesm2022/retalia-pos-components-services.mjs +12 -2
- package/fesm2022/retalia-pos-components-services.mjs.map +1 -1
- package/fesm2022/retalia-pos-components.mjs +267 -106
- package/fesm2022/retalia-pos-components.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/styles.css +1 -0
- package/styles/tokens.css +21 -15
- package/types/retalia-pos-components-services.d.ts +11 -2
- package/types/retalia-pos-components.d.ts +95 -23
package/package.json
CHANGED
package/styles/styles.css
CHANGED
package/styles/tokens.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
/* Color —
|
|
2
|
+
/* Color — white surfaces from the POS POC. Coral, mint, and lilac stay on confirm, cancel, and primary actions. */
|
|
3
3
|
--pos-color-primary: #c9b5f0;
|
|
4
4
|
--pos-color-on-primary: #333333;
|
|
5
5
|
--pos-color-success: #16dbcc;
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
--pos-color-on-danger: #ffffff;
|
|
9
9
|
--pos-color-secondary: #16dbcc;
|
|
10
10
|
--pos-color-warning: #f0ad4e;
|
|
11
|
-
--pos-color-text: #
|
|
12
|
-
--pos-color-text-muted: #
|
|
11
|
+
--pos-color-text: #1a1a1a;
|
|
12
|
+
--pos-color-text-muted: #666a70;
|
|
13
13
|
--pos-color-surface: #ffffff;
|
|
14
|
-
--pos-color-surface-muted: #
|
|
15
|
-
--pos-color-panel: #
|
|
14
|
+
--pos-color-surface-muted: #f5f5f7;
|
|
15
|
+
--pos-color-panel: #ffffff;
|
|
16
16
|
--pos-color-panel-elevated: #ffffff;
|
|
17
|
-
--pos-color-ink: #
|
|
18
|
-
--pos-color-border: #
|
|
17
|
+
--pos-color-ink: #1a1a1a;
|
|
18
|
+
--pos-color-border: #ececf0;
|
|
19
19
|
--pos-color-disabled: #dddddd;
|
|
20
20
|
--pos-color-on-disabled: #999999;
|
|
21
|
-
--pos-color-display: #
|
|
21
|
+
--pos-color-display: #1a1a1a;
|
|
22
22
|
--pos-color-on-display: #ffffff;
|
|
23
23
|
--pos-color-key: #ffffff;
|
|
24
|
-
--pos-color-key-border: #
|
|
25
|
-
--pos-color-key-active: #
|
|
26
|
-
--pos-color-on-key-active: #
|
|
24
|
+
--pos-color-key-border: #ececf0;
|
|
25
|
+
--pos-color-key-active: #f0e6fd;
|
|
26
|
+
--pos-color-on-key-active: #1a1a1a;
|
|
27
27
|
|
|
28
28
|
/* Shape / size */
|
|
29
29
|
--pos-radius-sm: 4px;
|
|
@@ -35,16 +35,22 @@
|
|
|
35
35
|
--pos-keypad-size-md: 3.75rem;
|
|
36
36
|
--pos-keypad-size-lg: 4.25rem;
|
|
37
37
|
|
|
38
|
-
/* Type —
|
|
39
|
-
--pos-font-family:
|
|
40
|
-
--pos-font-family-display:
|
|
38
|
+
/* Type — Chakra Petch body and Helvetica Neue headlines, matching the POS POC */
|
|
39
|
+
--pos-font-family: 'Chakra Petch', ui-sans-serif, system-ui, sans-serif;
|
|
40
|
+
--pos-font-family-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
41
41
|
--pos-font-size-sm: 0.8125rem;
|
|
42
|
-
--pos-font-size-md: 0.
|
|
42
|
+
--pos-font-size-md: 0.90625rem;
|
|
43
43
|
--pos-font-size-lg: 1.125rem;
|
|
44
44
|
--pos-font-size-xl: 1.375rem;
|
|
45
45
|
--pos-font-weight-semibold: 600;
|
|
46
46
|
--pos-font-weight-bold: 700;
|
|
47
47
|
--pos-letter-spacing-display: 0.28em;
|
|
48
|
+
--pos-letter-spacing-brand: 0.08em;
|
|
49
|
+
--pos-letter-spacing-tight: -0.03em;
|
|
50
|
+
|
|
51
|
+
/* Elevation */
|
|
52
|
+
--pos-shadow-key: 0 1px 3px color-mix(in srgb, var(--pos-color-ink) 8%, transparent);
|
|
53
|
+
--pos-shadow-overlay: 0 var(--pos-space-md) var(--pos-space-2xl) color-mix(in srgb, var(--pos-color-ink) 14%, transparent);
|
|
48
54
|
|
|
49
55
|
/* Space */
|
|
50
56
|
--pos-space-xs: 4px;
|
|
@@ -12,13 +12,22 @@ interface PosApiConfig {
|
|
|
12
12
|
readonly shopContextCookieName: string;
|
|
13
13
|
readonly getAccessToken?: () => string | null;
|
|
14
14
|
readonly getShopContext?: () => string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Signed-in clerk number, sent as `Clerk-Context`. There is no cookie for it: the host app
|
|
17
|
+
* returns it once its clerk sign-in (and password check) has passed, null otherwise.
|
|
18
|
+
*/
|
|
19
|
+
readonly getClerkContext?: () => string | null;
|
|
15
20
|
}
|
|
16
21
|
declare const DEFAULT_POS_API_CONFIG: PosApiConfig;
|
|
17
22
|
declare const POS_API_CONFIG: InjectionToken<PosApiConfig>;
|
|
18
23
|
declare function readAccessToken(config: PosApiConfig): string | null;
|
|
19
24
|
declare function readShopContext(config: PosApiConfig): string | null;
|
|
25
|
+
declare function readClerkContext(config: PosApiConfig): string | null;
|
|
20
26
|
|
|
21
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Attaches Bearer + Shop-Context from cookies (or host overrides), and Clerk-Context once the
|
|
29
|
+
* host reports a signed-in clerk.
|
|
30
|
+
*/
|
|
22
31
|
declare const posApiInterceptor: HttpInterceptorFn;
|
|
23
32
|
|
|
24
33
|
interface ClerkSession {
|
|
@@ -166,5 +175,5 @@ declare class PosCommandsClient {
|
|
|
166
175
|
static ɵprov: i0.ɵɵInjectableDeclaration<PosCommandsClient>;
|
|
167
176
|
}
|
|
168
177
|
|
|
169
|
-
export { ClerkAuthError, ClerkAuthService, DEFAULT_POS_API_CONFIG, POS_API_CONFIG, PosCommandsClient, posApiInterceptor, readAccessToken, readShopContext };
|
|
178
|
+
export { ClerkAuthError, ClerkAuthService, DEFAULT_POS_API_CONFIG, POS_API_CONFIG, PosCommandsClient, posApiInterceptor, readAccessToken, readClerkContext, readShopContext };
|
|
170
179
|
export type { AddItemCommand, Advisory, Basket, BasketLine, ChangeQuantityCommand, ClearBasketCommand, ClerkSession, Constraints, Document, LineDiscount, LineModifier, NewSaleCommand, Payment, PosApiConfig, PosStateEnvelope, Session, TenderCashCommand, Totals, ValidationIssue, Vat, Workflow };
|
|
@@ -25,27 +25,50 @@ type LoginStage = 'clerkNumber' | 'password';
|
|
|
25
25
|
declare class PosLogin {
|
|
26
26
|
readonly errorMessage: _angular_core.InputSignal<string>;
|
|
27
27
|
readonly session: _angular_core.InputSignal<PosLoginSessionState>;
|
|
28
|
+
readonly heading: _angular_core.InputSignal<string>;
|
|
28
29
|
readonly titleClerkNumber: _angular_core.InputSignal<string>;
|
|
29
30
|
readonly titleClerkPassword: _angular_core.InputSignal<string>;
|
|
30
31
|
readonly nextLabel: _angular_core.InputSignal<string>;
|
|
31
32
|
readonly loginLabel: _angular_core.InputSignal<string>;
|
|
33
|
+
/** Shop context beside the keypad. Off leaves the keypad on its own. */
|
|
34
|
+
readonly showAside: _angular_core.InputSignal<boolean>;
|
|
35
|
+
/** Draws a frame around the login shell. Off by default. */
|
|
36
|
+
readonly bordered: _angular_core.InputSignal<boolean>;
|
|
37
|
+
/** When false, the brand image is omitted, including the built-in mark. */
|
|
38
|
+
readonly showBrandImage: _angular_core.InputSignal<boolean>;
|
|
39
|
+
/** Partner image URL. Empty, while `showBrandImage` is true, uses the built-in Retalia mark. */
|
|
40
|
+
readonly brandImage: _angular_core.InputSignal<string>;
|
|
41
|
+
/** Wordmark after the image. Empty shows no text. */
|
|
42
|
+
readonly brandLabel: _angular_core.InputSignal<string>;
|
|
43
|
+
/** First address line under the brand. Empty hides it. */
|
|
44
|
+
readonly locationName: _angular_core.InputSignal<string>;
|
|
45
|
+
/** Second address line. Empty hides it. */
|
|
46
|
+
readonly terminalLine: _angular_core.InputSignal<string>;
|
|
47
|
+
/** Shop line. Empty hides it. */
|
|
48
|
+
readonly shopName: _angular_core.InputSignal<string>;
|
|
49
|
+
readonly dateLabel: _angular_core.InputSignal<string>;
|
|
50
|
+
readonly posNumberLabel: _angular_core.InputSignal<string>;
|
|
51
|
+
/** Empty hides the POS number tile. */
|
|
52
|
+
readonly posNumber: _angular_core.InputSignal<string>;
|
|
32
53
|
readonly action: _angular_core.OutputEmitterRef<PosLoginIntent>;
|
|
33
|
-
protected readonly
|
|
54
|
+
protected readonly digitKeys: readonly string[];
|
|
34
55
|
protected readonly inputValue: _angular_core.WritableSignal<string>;
|
|
35
56
|
protected readonly stage: _angular_core.WritableSignal<LoginStage>;
|
|
36
57
|
private readonly clerkNumber;
|
|
37
58
|
protected readonly title: _angular_core.Signal<string>;
|
|
38
59
|
protected readonly maskInput: _angular_core.Signal<boolean>;
|
|
60
|
+
protected readonly hasEntry: _angular_core.Signal<boolean>;
|
|
61
|
+
protected readonly displayText: _angular_core.Signal<string>;
|
|
39
62
|
protected readonly showBack: _angular_core.Signal<boolean>;
|
|
40
63
|
protected readonly primaryLabel: _angular_core.Signal<string>;
|
|
41
|
-
protected readonly primaryEnabled: _angular_core.Signal<boolean>;
|
|
42
64
|
protected readonly interactionLocked: _angular_core.Signal<boolean>;
|
|
65
|
+
protected readonly shownDate: _angular_core.Signal<string>;
|
|
43
66
|
protected readonly sessionStatusText: _angular_core.Signal<string>;
|
|
44
67
|
protected onKeypad(key: string): void;
|
|
45
68
|
protected onPrimary(): void;
|
|
46
69
|
protected onBack(): void;
|
|
47
70
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosLogin, never>;
|
|
48
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosLogin, "pos-login", never, { "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "session": { "alias": "session"; "required": false; "isSignal": true; }; "titleClerkNumber": { "alias": "titleClerkNumber"; "required": false; "isSignal": true; }; "titleClerkPassword": { "alias": "titleClerkPassword"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "loginLabel": { "alias": "loginLabel"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
71
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosLogin, "pos-login", never, { "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "session": { "alias": "session"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "titleClerkNumber": { "alias": "titleClerkNumber"; "required": false; "isSignal": true; }; "titleClerkPassword": { "alias": "titleClerkPassword"; "required": false; "isSignal": true; }; "nextLabel": { "alias": "nextLabel"; "required": false; "isSignal": true; }; "loginLabel": { "alias": "loginLabel"; "required": false; "isSignal": true; }; "showAside": { "alias": "showAside"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "showBrandImage": { "alias": "showBrandImage"; "required": false; "isSignal": true; }; "brandImage": { "alias": "brandImage"; "required": false; "isSignal": true; }; "brandLabel": { "alias": "brandLabel"; "required": false; "isSignal": true; }; "locationName": { "alias": "locationName"; "required": false; "isSignal": true; }; "terminalLine": { "alias": "terminalLine"; "required": false; "isSignal": true; }; "shopName": { "alias": "shopName"; "required": false; "isSignal": true; }; "dateLabel": { "alias": "dateLabel"; "required": false; "isSignal": true; }; "posNumberLabel": { "alias": "posNumberLabel"; "required": false; "isSignal": true; }; "posNumber": { "alias": "posNumber"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
49
72
|
}
|
|
50
73
|
|
|
51
74
|
type PosBasketIntent = {
|
|
@@ -88,12 +111,12 @@ declare class PosBasket {
|
|
|
88
111
|
readonly lines: _angular_core.InputSignal<readonly PosBasketLine[]>;
|
|
89
112
|
readonly totals: _angular_core.InputSignal<PosBasketTotals>;
|
|
90
113
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
114
|
+
/** Draws the panel frame. Off by default so the host can sit the basket flush. */
|
|
115
|
+
readonly bordered: _angular_core.InputSignal<boolean>;
|
|
91
116
|
readonly title: _angular_core.InputSignal<string>;
|
|
92
117
|
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
93
|
-
readonly clearLabel: _angular_core.InputSignal<string>;
|
|
94
118
|
readonly action: _angular_core.OutputEmitterRef<PosBasketIntent>;
|
|
95
119
|
protected readonly hasLines: _angular_core.Signal<boolean>;
|
|
96
|
-
protected readonly canClear: _angular_core.Signal<boolean>;
|
|
97
120
|
protected formatMoney(amount: number): string;
|
|
98
121
|
protected canChangeQuantity(line: PosBasketLine): boolean;
|
|
99
122
|
protected canDecrement(line: PosBasketLine): boolean;
|
|
@@ -101,9 +124,41 @@ declare class PosBasket {
|
|
|
101
124
|
protected onIncrement(line: PosBasketLine): void;
|
|
102
125
|
protected onDecrement(line: PosBasketLine): void;
|
|
103
126
|
protected onVoid(line: PosBasketLine): void;
|
|
104
|
-
protected onClear(): void;
|
|
105
127
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosBasket, never>;
|
|
106
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosBasket, "pos-basket", never, { "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "totals": { "alias": "totals"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "
|
|
128
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosBasket, "pos-basket", never, { "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "totals": { "alias": "totals"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
type PosHeaderIntent = {
|
|
132
|
+
readonly type: 'header.signOut';
|
|
133
|
+
};
|
|
134
|
+
declare class PosHeader {
|
|
135
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
136
|
+
readonly context: _angular_core.InputSignal<string>;
|
|
137
|
+
/** When false, the brand image is omitted, including the built-in mark. */
|
|
138
|
+
readonly showBrandImage: _angular_core.InputSignal<boolean>;
|
|
139
|
+
/** Partner image URL. Empty, while `showBrandImage` is true, uses the built-in Retalia mark. */
|
|
140
|
+
readonly brandImage: _angular_core.InputSignal<string>;
|
|
141
|
+
/** Wordmark after the image. Empty shows no text. */
|
|
142
|
+
readonly brandLabel: _angular_core.InputSignal<string>;
|
|
143
|
+
readonly clerkName: _angular_core.InputSignal<string>;
|
|
144
|
+
readonly clerkRole: _angular_core.InputSignal<string>;
|
|
145
|
+
readonly signOutLabel: _angular_core.InputSignal<string>;
|
|
146
|
+
readonly menuLabel: _angular_core.InputSignal<string>;
|
|
147
|
+
readonly canSignOut: _angular_core.InputSignal<boolean>;
|
|
148
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
149
|
+
readonly action: _angular_core.OutputEmitterRef<PosHeaderIntent>;
|
|
150
|
+
protected readonly menuOpen: _angular_core.WritableSignal<boolean>;
|
|
151
|
+
protected readonly initial: _angular_core.Signal<string>;
|
|
152
|
+
protected toggleMenu(): void;
|
|
153
|
+
protected closeMenu(): void;
|
|
154
|
+
protected onSignOut(): void;
|
|
155
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosHeader, never>;
|
|
156
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosHeader, "pos-header", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "showBrandImage": { "alias": "showBrandImage"; "required": false; "isSignal": true; }; "brandImage": { "alias": "brandImage"; "required": false; "isSignal": true; }; "brandLabel": { "alias": "brandLabel"; "required": false; "isSignal": true; }; "clerkName": { "alias": "clerkName"; "required": false; "isSignal": true; }; "clerkRole": { "alias": "clerkRole"; "required": false; "isSignal": true; }; "signOutLabel": { "alias": "signOutLabel"; "required": false; "isSignal": true; }; "menuLabel": { "alias": "menuLabel"; "required": false; "isSignal": true; }; "canSignOut": { "alias": "canSignOut"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
declare class PosTransactionActionBar {
|
|
160
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosTransactionActionBar, never>;
|
|
161
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTransactionActionBar, "pos-transaction-action-bar", never, {}, {}, never, ["*"], true, never>;
|
|
107
162
|
}
|
|
108
163
|
|
|
109
164
|
type PosItemEntryIntent = {
|
|
@@ -112,11 +167,15 @@ type PosItemEntryIntent = {
|
|
|
112
167
|
};
|
|
113
168
|
declare class PosItemEntry {
|
|
114
169
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
170
|
+
/** Draws the panel frame. Off by default so the host can sit the field flush. */
|
|
171
|
+
readonly bordered: _angular_core.InputSignal<boolean>;
|
|
115
172
|
readonly errorMessage: _angular_core.InputSignal<string>;
|
|
116
173
|
readonly autofocus: _angular_core.InputSignal<boolean>;
|
|
117
174
|
readonly label: _angular_core.InputSignal<string>;
|
|
118
175
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
119
|
-
readonly
|
|
176
|
+
readonly scannerStatus: _angular_core.InputSignal<string>;
|
|
177
|
+
/** Key that moves focus to the field. Empty hides the hint and the shortcut. */
|
|
178
|
+
readonly focusHotkey: _angular_core.InputSignal<string>;
|
|
120
179
|
readonly action: _angular_core.OutputEmitterRef<{
|
|
121
180
|
readonly type: "itemEntry.submit";
|
|
122
181
|
readonly reference: string;
|
|
@@ -125,16 +184,19 @@ declare class PosItemEntry {
|
|
|
125
184
|
protected readonly reference: _angular_core.WritableSignal<string>;
|
|
126
185
|
protected readonly canSubmit: _angular_core.Signal<boolean>;
|
|
127
186
|
constructor();
|
|
187
|
+
protected onDocumentKeydown(event: KeyboardEvent): void;
|
|
128
188
|
protected onInput(event: Event): void;
|
|
129
189
|
protected onSubmit(event: Event): void;
|
|
130
190
|
private focusInput;
|
|
131
191
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosItemEntry, never>;
|
|
132
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosItemEntry, "pos-item-entry", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "
|
|
192
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosItemEntry, "pos-item-entry", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "scannerStatus": { "alias": "scannerStatus"; "required": false; "isSignal": true; }; "focusHotkey": { "alias": "focusHotkey"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
133
193
|
}
|
|
134
194
|
|
|
135
195
|
type PosTenderIntent = {
|
|
136
196
|
readonly type: 'tender.cash';
|
|
137
197
|
readonly amount: number;
|
|
198
|
+
} | {
|
|
199
|
+
readonly type: 'tender.cancel';
|
|
138
200
|
};
|
|
139
201
|
declare class PosTender {
|
|
140
202
|
/** Display-only amount due from the host envelope — not calculated here. */
|
|
@@ -149,23 +211,30 @@ declare class PosTender {
|
|
|
149
211
|
readonly tenderedLabel: _angular_core.InputSignal<string>;
|
|
150
212
|
readonly changeDueLabel: _angular_core.InputSignal<string>;
|
|
151
213
|
readonly tenderLabel: _angular_core.InputSignal<string>;
|
|
214
|
+
readonly cancelLabel: _angular_core.InputSignal<string>;
|
|
215
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
152
216
|
readonly processingLabel: _angular_core.InputSignal<string>;
|
|
153
|
-
readonly action: _angular_core.OutputEmitterRef<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
protected readonly keypadRows: readonly (readonly string[])[];
|
|
158
|
-
protected readonly amountInput: _angular_core.WritableSignal<string>;
|
|
217
|
+
readonly action: _angular_core.OutputEmitterRef<PosTenderIntent>;
|
|
218
|
+
protected readonly coins: readonly number[];
|
|
219
|
+
protected readonly notes: readonly number[];
|
|
220
|
+
protected readonly given: _angular_core.WritableSignal<number>;
|
|
159
221
|
protected readonly parsedAmount: _angular_core.Signal<number | null>;
|
|
160
222
|
protected readonly canTender: _angular_core.Signal<boolean>;
|
|
161
223
|
protected readonly hasChangeDue: _angular_core.Signal<boolean>;
|
|
162
|
-
protected readonly
|
|
224
|
+
protected readonly displayGiven: _angular_core.Signal<string>;
|
|
225
|
+
protected readonly quickAmounts: _angular_core.Signal<number[]>;
|
|
163
226
|
protected readonly statusText: _angular_core.Signal<string>;
|
|
164
227
|
protected formatMoney(amount: number): string;
|
|
165
|
-
protected
|
|
228
|
+
protected denominationLabel(amount: number): string;
|
|
229
|
+
protected quickLabel(amount: number): string;
|
|
230
|
+
protected isExact(amount: number): boolean;
|
|
231
|
+
protected addAmount(amount: number): void;
|
|
232
|
+
protected setAmount(amount: number): void;
|
|
233
|
+
protected resetAmount(): void;
|
|
166
234
|
protected onTender(): void;
|
|
235
|
+
protected onCancel(): void;
|
|
167
236
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosTender, never>;
|
|
168
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTender, "pos-tender", never, { "amountDue": { "alias": "amountDue"; "required": false; "isSignal": true; }; "changeDue": { "alias": "changeDue"; "required": false; "isSignal": true; }; "currency": { "alias": "currency"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "amountDueLabel": { "alias": "amountDueLabel"; "required": false; "isSignal": true; }; "tenderedLabel": { "alias": "tenderedLabel"; "required": false; "isSignal": true; }; "changeDueLabel": { "alias": "changeDueLabel"; "required": false; "isSignal": true; }; "tenderLabel": { "alias": "tenderLabel"; "required": false; "isSignal": true; }; "processingLabel": { "alias": "processingLabel"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
237
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTender, "pos-tender", never, { "amountDue": { "alias": "amountDue"; "required": false; "isSignal": true; }; "changeDue": { "alias": "changeDue"; "required": false; "isSignal": true; }; "currency": { "alias": "currency"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "amountDueLabel": { "alias": "amountDueLabel"; "required": false; "isSignal": true; }; "tenderedLabel": { "alias": "tenderedLabel"; "required": false; "isSignal": true; }; "changeDueLabel": { "alias": "changeDueLabel"; "required": false; "isSignal": true; }; "tenderLabel": { "alias": "tenderLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "processingLabel": { "alias": "processingLabel"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
169
238
|
}
|
|
170
239
|
|
|
171
240
|
interface PosReceiptIntent {
|
|
@@ -216,6 +285,8 @@ declare class PosReceipt {
|
|
|
216
285
|
readonly payments: _angular_core.InputSignal<readonly PosReceiptPayment[]>;
|
|
217
286
|
readonly document: _angular_core.InputSignal<PosReceiptDocument>;
|
|
218
287
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
288
|
+
/** Draws the panel frame. Off by default so the host can sit the receipt flush. */
|
|
289
|
+
readonly bordered: _angular_core.InputSignal<boolean>;
|
|
219
290
|
readonly title: _angular_core.InputSignal<string>;
|
|
220
291
|
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
221
292
|
readonly preparingLabel: _angular_core.InputSignal<string>;
|
|
@@ -234,7 +305,7 @@ declare class PosReceipt {
|
|
|
234
305
|
protected formatMoney(amount: number): string;
|
|
235
306
|
protected onNewSale(): void;
|
|
236
307
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosReceipt, never>;
|
|
237
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosReceipt, "pos-receipt", never, { "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "totals": { "alias": "totals"; "required": false; "isSignal": true; }; "payments": { "alias": "payments"; "required": false; "isSignal": true; }; "document": { "alias": "document"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "preparingLabel": { "alias": "preparingLabel"; "required": false; "isSignal": true; }; "readyLabel": { "alias": "readyLabel"; "required": false; "isSignal": true; }; "newSaleLabel": { "alias": "newSaleLabel"; "required": false; "isSignal": true; }; "tenderLabel": { "alias": "tenderLabel"; "required": false; "isSignal": true; }; "amountLabel": { "alias": "amountLabel"; "required": false; "isSignal": true; }; "tenderedLabel": { "alias": "tenderedLabel"; "required": false; "isSignal": true; }; "changeLabel": { "alias": "changeLabel"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
308
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosReceipt, "pos-receipt", never, { "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "totals": { "alias": "totals"; "required": false; "isSignal": true; }; "payments": { "alias": "payments"; "required": false; "isSignal": true; }; "document": { "alias": "document"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "preparingLabel": { "alias": "preparingLabel"; "required": false; "isSignal": true; }; "readyLabel": { "alias": "readyLabel"; "required": false; "isSignal": true; }; "newSaleLabel": { "alias": "newSaleLabel"; "required": false; "isSignal": true; }; "tenderLabel": { "alias": "tenderLabel"; "required": false; "isSignal": true; }; "amountLabel": { "alias": "amountLabel"; "required": false; "isSignal": true; }; "tenderedLabel": { "alias": "tenderedLabel"; "required": false; "isSignal": true; }; "changeLabel": { "alias": "changeLabel"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
238
309
|
}
|
|
239
310
|
|
|
240
311
|
/**
|
|
@@ -242,8 +313,8 @@ declare class PosReceipt {
|
|
|
242
313
|
* The lab never writes that file; edits are live overrides only.
|
|
243
314
|
*/
|
|
244
315
|
type PosTokenKind = 'color' | 'length' | 'font-family' | 'font-weight' | 'other';
|
|
245
|
-
type PosTokenGroup = 'color' | 'radius' | 'space' | 'type' | 'control';
|
|
246
|
-
type PosTokenPreview = 'color' | 'radius' | 'space' | 'font-size' | 'font-family' | 'font-weight' | 'letter-spacing' | 'size';
|
|
316
|
+
type PosTokenGroup = 'color' | 'radius' | 'space' | 'type' | 'shadow' | 'control';
|
|
317
|
+
type PosTokenPreview = 'color' | 'radius' | 'space' | 'font-size' | 'font-family' | 'font-weight' | 'letter-spacing' | 'shadow' | 'size';
|
|
247
318
|
interface PosTokenSwatch {
|
|
248
319
|
readonly name: string;
|
|
249
320
|
readonly variable: string;
|
|
@@ -265,6 +336,7 @@ declare class PosTokens {
|
|
|
265
336
|
protected readonly radiusTokens: readonly PosTokenDefinition[];
|
|
266
337
|
protected readonly spaceTokens: readonly PosTokenDefinition[];
|
|
267
338
|
protected readonly typeTokens: readonly PosTokenDefinition[];
|
|
339
|
+
protected readonly shadowTokens: readonly PosTokenDefinition[];
|
|
268
340
|
protected readonly controlTokens: readonly PosTokenDefinition[];
|
|
269
341
|
private readonly overrides;
|
|
270
342
|
protected readonly selection: _angular_core.WritableSignal<PosTokenSelection | null>;
|
|
@@ -296,5 +368,5 @@ declare class PosTokens {
|
|
|
296
368
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTokens, "pos-tokens", never, {}, {}, never, never, true, never>;
|
|
297
369
|
}
|
|
298
370
|
|
|
299
|
-
export { PosBasket, PosItemEntry, PosLogin, PosReceipt, PosTender, PosTokens };
|
|
300
|
-
export type { PosBasketIntent, PosBasketLine, PosBasketTotals, PosBasketVat, PosItemEntryIntent, PosLoginIntent, PosLoginSessionState, PosLoginSessionStatus, PosReceiptDocument, PosReceiptIntent, PosReceiptLine, PosReceiptPayment, PosReceiptTotals, PosReceiptVat, PosTenderIntent, PosTokenSwatch };
|
|
371
|
+
export { PosBasket, PosHeader, PosItemEntry, PosLogin, PosReceipt, PosTender, PosTokens, PosTransactionActionBar };
|
|
372
|
+
export type { PosBasketIntent, PosBasketLine, PosBasketTotals, PosBasketVat, PosHeaderIntent, PosItemEntryIntent, PosLoginIntent, PosLoginSessionState, PosLoginSessionStatus, PosReceiptDocument, PosReceiptIntent, PosReceiptLine, PosReceiptPayment, PosReceiptTotals, PosReceiptVat, PosTenderIntent, PosTokenSwatch };
|