@retalia/pos-components 0.0.16 → 0.0.18
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/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
3
|
|
|
4
|
+
/** Projects partner content into the login shop column, after the date and POS number. */
|
|
5
|
+
declare class PosLoginAside {
|
|
6
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosLoginAside, never>;
|
|
7
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PosLoginAside, "[posLoginAside]", never, {}, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
/** Projects partner content under the login keypad. */
|
|
10
|
+
declare class PosLoginPanel {
|
|
11
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosLoginPanel, never>;
|
|
12
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PosLoginPanel, "[posLoginPanel]", never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
4
14
|
type PosLoginIntent = {
|
|
5
15
|
readonly type: 'login.key';
|
|
6
16
|
readonly key: string;
|
|
@@ -69,7 +79,117 @@ declare class PosLogin {
|
|
|
69
79
|
protected onPrimary(): void;
|
|
70
80
|
protected onBack(): void;
|
|
71
81
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosLogin, never>;
|
|
72
|
-
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,
|
|
82
|
+
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, ["[posLoginAside]", "[posLoginPanel]"], true, never>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
type PosTillDeviceKind = 'hardware' | 'software' | 'virtual';
|
|
86
|
+
type PosTillDevicesVariant = 'dialog' | 'summary' | 'link';
|
|
87
|
+
type PosTillDevicesIcon = 'none' | 'plug';
|
|
88
|
+
/**
|
|
89
|
+
* Display model for a till connector. Hosts can pass a `paymentDevices` config
|
|
90
|
+
* entry directly: extra fields are ignored. `selectedId` uses `deviceId` when
|
|
91
|
+
* that is set, otherwise `String(id)`.
|
|
92
|
+
*/
|
|
93
|
+
interface PosTillDevice {
|
|
94
|
+
readonly id: string | number;
|
|
95
|
+
readonly deviceId?: string | null;
|
|
96
|
+
readonly name: string;
|
|
97
|
+
readonly host?: string | null;
|
|
98
|
+
readonly mac?: string | null;
|
|
99
|
+
readonly terminalType?: number;
|
|
100
|
+
readonly isVirtual?: boolean;
|
|
101
|
+
readonly kind?: PosTillDeviceKind;
|
|
102
|
+
/** Replaces the Hardware / Software / Virtual badge. */
|
|
103
|
+
readonly kindLabel?: string;
|
|
104
|
+
readonly printerLabel?: string;
|
|
105
|
+
/** Replaces the line derived from `terminalType`. */
|
|
106
|
+
readonly paymentLabel?: string;
|
|
107
|
+
/** Replaces the mac / host line. */
|
|
108
|
+
readonly detail?: string;
|
|
109
|
+
/** Offline devices stay visible and cannot be selected. Omit when unknown. */
|
|
110
|
+
readonly online?: boolean;
|
|
111
|
+
}
|
|
112
|
+
type PosTillDevicesIntent = {
|
|
113
|
+
readonly type: 'tillDevices.open';
|
|
114
|
+
} | {
|
|
115
|
+
readonly type: 'tillDevices.select';
|
|
116
|
+
readonly deviceId: string;
|
|
117
|
+
} | {
|
|
118
|
+
readonly type: 'tillDevices.confirm';
|
|
119
|
+
readonly deviceId: string;
|
|
120
|
+
} | {
|
|
121
|
+
readonly type: 'tillDevices.dismiss';
|
|
122
|
+
};
|
|
123
|
+
/** Id the host stores and passes back as `selectedId`. */
|
|
124
|
+
declare function posTillDeviceKey(device: PosTillDevice): string;
|
|
125
|
+
interface TillDeviceCard {
|
|
126
|
+
readonly index: number;
|
|
127
|
+
readonly key: string;
|
|
128
|
+
readonly device: PosTillDevice;
|
|
129
|
+
readonly kind: PosTillDeviceKind;
|
|
130
|
+
readonly kindText: string;
|
|
131
|
+
readonly payment: string;
|
|
132
|
+
readonly printer: string;
|
|
133
|
+
readonly detail: string;
|
|
134
|
+
readonly offline: boolean;
|
|
135
|
+
readonly selected: boolean;
|
|
136
|
+
readonly presence: 'online' | 'offline' | 'unknown';
|
|
137
|
+
}
|
|
138
|
+
declare class PosTillDevices {
|
|
139
|
+
readonly devices: _angular_core.InputSignal<readonly PosTillDevice[]>;
|
|
140
|
+
/** `deviceId` when the config has one, otherwise `String(id)`. */
|
|
141
|
+
readonly selectedId: _angular_core.InputSignal<string>;
|
|
142
|
+
/** `dialog` is the connector popup. `summary` and `link` open that popup. */
|
|
143
|
+
readonly variant: _angular_core.InputSignal<PosTillDevicesVariant>;
|
|
144
|
+
/** `plug` draws the till-devices button. `none` keeps the text link. */
|
|
145
|
+
readonly icon: _angular_core.InputSignal<PosTillDevicesIcon>;
|
|
146
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
147
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
148
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
149
|
+
readonly listLabel: _angular_core.InputSignal<string>;
|
|
150
|
+
readonly cancelLabel: _angular_core.InputSignal<string>;
|
|
151
|
+
readonly confirmLabel: _angular_core.InputSignal<string>;
|
|
152
|
+
readonly emptyLabel: _angular_core.InputSignal<string>;
|
|
153
|
+
readonly selectLabel: _angular_core.InputSignal<string>;
|
|
154
|
+
readonly changeLabel: _angular_core.InputSignal<string>;
|
|
155
|
+
readonly setupLabel: _angular_core.InputSignal<string>;
|
|
156
|
+
readonly connectorLabel: _angular_core.InputSignal<string>;
|
|
157
|
+
readonly printerCaption: _angular_core.InputSignal<string>;
|
|
158
|
+
readonly paymentCaption: _angular_core.InputSignal<string>;
|
|
159
|
+
readonly noPaymentLabel: _angular_core.InputSignal<string>;
|
|
160
|
+
readonly paymentFallbackLabel: _angular_core.InputSignal<string>;
|
|
161
|
+
readonly hardwareLabel: _angular_core.InputSignal<string>;
|
|
162
|
+
readonly softwareLabel: _angular_core.InputSignal<string>;
|
|
163
|
+
readonly virtualLabel: _angular_core.InputSignal<string>;
|
|
164
|
+
readonly offlineLabel: _angular_core.InputSignal<string>;
|
|
165
|
+
readonly nothingToInstallLabel: _angular_core.InputSignal<string>;
|
|
166
|
+
readonly action: _angular_core.OutputEmitterRef<PosTillDevicesIntent>;
|
|
167
|
+
private readonly dialogRef;
|
|
168
|
+
private readonly dialogOpen;
|
|
169
|
+
private readonly pickedId;
|
|
170
|
+
private restoreFocus;
|
|
171
|
+
protected readonly titleId: string;
|
|
172
|
+
protected readonly descriptionId: string;
|
|
173
|
+
protected readonly showDialog: _angular_core.Signal<boolean>;
|
|
174
|
+
protected readonly cards: _angular_core.Signal<TillDeviceCard[]>;
|
|
175
|
+
protected readonly selectedCard: _angular_core.Signal<TillDeviceCard | null>;
|
|
176
|
+
protected readonly linkText: _angular_core.Signal<string>;
|
|
177
|
+
protected readonly canConfirm: _angular_core.Signal<boolean>;
|
|
178
|
+
constructor();
|
|
179
|
+
protected openDialog(): void;
|
|
180
|
+
protected pick(card: TillDeviceCard): void;
|
|
181
|
+
protected moveSelection(index: number, step: number, event: Event): void;
|
|
182
|
+
protected confirm(): void;
|
|
183
|
+
protected dismiss(): void;
|
|
184
|
+
protected onDialogKeydown(event: KeyboardEvent): void;
|
|
185
|
+
private returnFocus;
|
|
186
|
+
private toCard;
|
|
187
|
+
private presence;
|
|
188
|
+
private kindText;
|
|
189
|
+
private paymentText;
|
|
190
|
+
private detailText;
|
|
191
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosTillDevices, never>;
|
|
192
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTillDevices, "pos-till-devices", never, { "devices": { "alias": "devices"; "required": false; "isSignal": true; }; "selectedId": { "alias": "selectedId"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "listLabel": { "alias": "listLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; "selectLabel": { "alias": "selectLabel"; "required": false; "isSignal": true; }; "changeLabel": { "alias": "changeLabel"; "required": false; "isSignal": true; }; "setupLabel": { "alias": "setupLabel"; "required": false; "isSignal": true; }; "connectorLabel": { "alias": "connectorLabel"; "required": false; "isSignal": true; }; "printerCaption": { "alias": "printerCaption"; "required": false; "isSignal": true; }; "paymentCaption": { "alias": "paymentCaption"; "required": false; "isSignal": true; }; "noPaymentLabel": { "alias": "noPaymentLabel"; "required": false; "isSignal": true; }; "paymentFallbackLabel": { "alias": "paymentFallbackLabel"; "required": false; "isSignal": true; }; "hardwareLabel": { "alias": "hardwareLabel"; "required": false; "isSignal": true; }; "softwareLabel": { "alias": "softwareLabel"; "required": false; "isSignal": true; }; "virtualLabel": { "alias": "virtualLabel"; "required": false; "isSignal": true; }; "offlineLabel": { "alias": "offlineLabel"; "required": false; "isSignal": true; }; "nothingToInstallLabel": { "alias": "nothingToInstallLabel"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
73
193
|
}
|
|
74
194
|
|
|
75
195
|
type PosBasketIntent = {
|
|
@@ -175,16 +295,20 @@ declare class PosTransactionActionBar {
|
|
|
175
295
|
/** Envelope action names. `clearBasket` shows Cancel. `tender` shows Cash and Card. */
|
|
176
296
|
readonly availableActions: _angular_core.InputSignal<readonly string[]>;
|
|
177
297
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
298
|
+
/** Key that clicks Cash. Empty hides the hint and the shortcut. */
|
|
299
|
+
readonly cashHotkey: _angular_core.InputSignal<string>;
|
|
178
300
|
/** Key that clicks Card. Empty hides the hint and the shortcut. */
|
|
179
301
|
readonly cardHotkey: _angular_core.InputSignal<string>;
|
|
180
302
|
readonly action: _angular_core.OutputEmitterRef<PosTransactionActionBarIntent>;
|
|
303
|
+
private readonly cashButton;
|
|
181
304
|
private readonly cardButton;
|
|
182
305
|
protected onDocumentKeydown(event: KeyboardEvent): void;
|
|
306
|
+
private buttonForHotkey;
|
|
183
307
|
protected onClear(): void;
|
|
184
308
|
protected onCash(): void;
|
|
185
309
|
protected onCard(): void;
|
|
186
310
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosTransactionActionBar, never>;
|
|
187
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTransactionActionBar, "pos-transaction-action-bar", never, { "availableActions": { "alias": "availableActions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "cardHotkey": { "alias": "cardHotkey"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, ["*"], true, never>;
|
|
311
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTransactionActionBar, "pos-transaction-action-bar", never, { "availableActions": { "alias": "availableActions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "cashHotkey": { "alias": "cashHotkey"; "required": false; "isSignal": true; }; "cardHotkey": { "alias": "cardHotkey"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, ["*"], true, never>;
|
|
188
312
|
}
|
|
189
313
|
|
|
190
314
|
type PosItemEntryIntent = {
|
|
@@ -640,5 +764,5 @@ declare class PosTokens {
|
|
|
640
764
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosTokens, "pos-tokens", never, {}, {}, never, never, true, never>;
|
|
641
765
|
}
|
|
642
766
|
|
|
643
|
-
export { POS_WORKSPACE_BASKET_RIGHT_LAYOUT, POS_WORKSPACE_DEFAULT_LAYOUT, POS_WORKSPACE_EMPTY_LAYOUT, POS_WORKSPACE_HEADER_SPAN_LAYOUT, PosBasket, PosHeader, PosItemEntry, PosLogin, PosReceipt, PosTender, PosTokens, PosTransactionActionBar, PosWorkspace, PosWorkspacePane, parseWorkspaceLayout, workspaceLayoutJson };
|
|
644
|
-
export type { PosBasketIntent, PosBasketLine, PosBasketTotals, PosBasketVat, PosHeaderIntent, PosItemEntryIntent, PosLoginIntent, PosLoginSessionState, PosLoginSessionStatus, PosReceiptDocument, PosReceiptIntent, PosReceiptLine, PosReceiptPayment, PosReceiptTotals, PosReceiptVat, PosTenderIntent, PosTokenSwatch, PosTransactionActionBarIntent, PosWorkspaceColumn, PosWorkspaceLayout, PosWorkspacePaneId, PosWorkspacePanePlacement, PosWorkspaceSpan };
|
|
767
|
+
export { POS_WORKSPACE_BASKET_RIGHT_LAYOUT, POS_WORKSPACE_DEFAULT_LAYOUT, POS_WORKSPACE_EMPTY_LAYOUT, POS_WORKSPACE_HEADER_SPAN_LAYOUT, PosBasket, PosHeader, PosItemEntry, PosLogin, PosLoginAside, PosLoginPanel, PosReceipt, PosTender, PosTillDevices, PosTokens, PosTransactionActionBar, PosWorkspace, PosWorkspacePane, parseWorkspaceLayout, posTillDeviceKey, workspaceLayoutJson };
|
|
768
|
+
export type { PosBasketIntent, PosBasketLine, PosBasketTotals, PosBasketVat, PosHeaderIntent, PosItemEntryIntent, PosLoginIntent, PosLoginSessionState, PosLoginSessionStatus, PosReceiptDocument, PosReceiptIntent, PosReceiptLine, PosReceiptPayment, PosReceiptTotals, PosReceiptVat, PosTenderIntent, PosTillDevice, PosTillDeviceKind, PosTillDevicesIcon, PosTillDevicesIntent, PosTillDevicesVariant, PosTokenSwatch, PosTransactionActionBarIntent, PosWorkspaceColumn, PosWorkspaceLayout, PosWorkspacePaneId, PosWorkspacePanePlacement, PosWorkspaceSpan };
|