@retalia/pos-components 0.0.1 → 0.0.2
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 +41 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @retalia/pos-components
|
|
2
2
|
|
|
3
|
-
Presentational Adaptive POS components.
|
|
3
|
+
Presentational Adaptive POS Angular components. State in, typed intents out — no service calls.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Requires **Angular 21** (`@angular/core` and `@angular/common` `^21.2.0`).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i @retalia/pos-components
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Hello world
|
|
14
|
+
|
|
15
|
+
Import the standalone component and put it in the template.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { Component } from '@angular/core';
|
|
19
|
+
import { PosHelloWorld, HelloWorldIntent } from '@retalia/pos-components';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'app-root',
|
|
23
|
+
imports: [PosHelloWorld],
|
|
24
|
+
template: `
|
|
25
|
+
<pos-hello-world
|
|
26
|
+
[label]="'Library connected'"
|
|
27
|
+
(acknowledge)="onAcknowledge($event)"
|
|
28
|
+
/>
|
|
29
|
+
`,
|
|
30
|
+
})
|
|
31
|
+
export class App {
|
|
32
|
+
onAcknowledge(intent: HelloWorldIntent): void {
|
|
33
|
+
console.log(intent.type); // 'helloWorld.acknowledge'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
| | |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Selector | `pos-hello-world` |
|
|
41
|
+
| Input `label` | Heading text (optional) |
|
|
42
|
+
| Output `acknowledge` | `{ type: 'helloWorld.acknowledge' }` when the user clicks Acknowledge |
|
|
43
|
+
|
|
44
|
+
If the card renders, the package installed and the host can consume components from this library.
|