@retalia/pos-components 0.0.1
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
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class PosHelloWorld {
|
|
5
|
+
label = input('Hello World library integration successful.', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
6
|
+
acknowledge = output();
|
|
7
|
+
confirmed = signal(false, ...(ngDevMode ? [{ debugName: "confirmed" }] : /* istanbul ignore next */ []));
|
|
8
|
+
onAcknowledge() {
|
|
9
|
+
this.confirmed.set(true);
|
|
10
|
+
this.acknowledge.emit({ type: 'helloWorld.acknowledge' });
|
|
11
|
+
}
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PosHelloWorld, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PosHelloWorld, isStandalone: true, selector: "pos-hello-world", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { acknowledge: "acknowledge" }, ngImport: i0, template: `
|
|
14
|
+
<article class="card">
|
|
15
|
+
<p class="kicker">@retalia/pos-components</p>
|
|
16
|
+
<h1>{{ label() }}</h1>
|
|
17
|
+
<p class="lede">
|
|
18
|
+
If this card rendered, the host installed the package and can consume
|
|
19
|
+
presentational POS components.
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
@if (confirmed()) {
|
|
23
|
+
<p class="status" role="status" aria-live="polite">
|
|
24
|
+
<svg
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
width="24"
|
|
27
|
+
height="24"
|
|
28
|
+
viewBox="0 0 24 24"
|
|
29
|
+
fill="none"
|
|
30
|
+
aria-hidden="true"
|
|
31
|
+
>
|
|
32
|
+
<circle cx="12" cy="12" r="9.1" stroke="currentColor" stroke-width="1.8" />
|
|
33
|
+
<path
|
|
34
|
+
d="M7.5 12.4 10.6 15.4 16.5 8.8"
|
|
35
|
+
stroke="currentColor"
|
|
36
|
+
stroke-width="1.8"
|
|
37
|
+
stroke-linecap="round"
|
|
38
|
+
stroke-linejoin="round"
|
|
39
|
+
/>
|
|
40
|
+
</svg>
|
|
41
|
+
Acknowledged
|
|
42
|
+
</p>
|
|
43
|
+
} @else {
|
|
44
|
+
<button type="button" (click)="onAcknowledge()">Acknowledge</button>
|
|
45
|
+
}
|
|
46
|
+
</article>
|
|
47
|
+
`, isInline: true, styles: [":host{display:block;color:#1a1a1a;font-family:Chakra Petch,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.5}.card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:24px;background:#fff;border:1px solid #ececf0;border-radius:12px;box-shadow:0 1px 3px #0000000d}.kicker{margin:0;color:#7b2ff2;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}h1{margin:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:22px;font-weight:700;letter-spacing:-.02em;line-height:1.25}.lede{margin:0 0 8px;color:#666a70}button,.status{min-height:52px;min-width:160px;margin:0;padding:0 18px;border-radius:8px;font:inherit;font-weight:600}button{border:0;background:#16dbcc;color:#1a1a1a;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #7b2ff2;outline-offset:2px}.status{display:inline-flex;align-items:center;gap:8px;background:#e4fbf5;color:#0ca678}.status svg{flex-shrink:0}@media(prefers-reduced-motion:reduce){button{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PosHelloWorld, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{ selector: 'pos-hello-world', changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
52
|
+
<article class="card">
|
|
53
|
+
<p class="kicker">@retalia/pos-components</p>
|
|
54
|
+
<h1>{{ label() }}</h1>
|
|
55
|
+
<p class="lede">
|
|
56
|
+
If this card rendered, the host installed the package and can consume
|
|
57
|
+
presentational POS components.
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
@if (confirmed()) {
|
|
61
|
+
<p class="status" role="status" aria-live="polite">
|
|
62
|
+
<svg
|
|
63
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
64
|
+
width="24"
|
|
65
|
+
height="24"
|
|
66
|
+
viewBox="0 0 24 24"
|
|
67
|
+
fill="none"
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
>
|
|
70
|
+
<circle cx="12" cy="12" r="9.1" stroke="currentColor" stroke-width="1.8" />
|
|
71
|
+
<path
|
|
72
|
+
d="M7.5 12.4 10.6 15.4 16.5 8.8"
|
|
73
|
+
stroke="currentColor"
|
|
74
|
+
stroke-width="1.8"
|
|
75
|
+
stroke-linecap="round"
|
|
76
|
+
stroke-linejoin="round"
|
|
77
|
+
/>
|
|
78
|
+
</svg>
|
|
79
|
+
Acknowledged
|
|
80
|
+
</p>
|
|
81
|
+
} @else {
|
|
82
|
+
<button type="button" (click)="onAcknowledge()">Acknowledge</button>
|
|
83
|
+
}
|
|
84
|
+
</article>
|
|
85
|
+
`, styles: [":host{display:block;color:#1a1a1a;font-family:Chakra Petch,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.5}.card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:24px;background:#fff;border:1px solid #ececf0;border-radius:12px;box-shadow:0 1px 3px #0000000d}.kicker{margin:0;color:#7b2ff2;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}h1{margin:0;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:22px;font-weight:700;letter-spacing:-.02em;line-height:1.25}.lede{margin:0 0 8px;color:#666a70}button,.status{min-height:52px;min-width:160px;margin:0;padding:0 18px;border-radius:8px;font:inherit;font-weight:600}button{border:0;background:#16dbcc;color:#1a1a1a;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #7b2ff2;outline-offset:2px}.status{display:inline-flex;align-items:center;gap:8px;background:#e4fbf5;color:#0ca678}.status svg{flex-shrink:0}@media(prefers-reduced-motion:reduce){button{transition:none}}\n"] }]
|
|
86
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], acknowledge: [{ type: i0.Output, args: ["acknowledge"] }] } });
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
* Public API Surface of @retalia/pos-components
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Generated bundle index. Do not edit.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
export { PosHelloWorld };
|
|
97
|
+
//# sourceMappingURL=retalia-pos-components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retalia-pos-components.mjs","sources":["../../../projects/pos-components/src/lib/hello-world/pos-hello-world.ts","../../../projects/pos-components/src/public-api.ts","../../../projects/pos-components/src/retalia-pos-components.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output, signal } from '@angular/core';\n\nexport interface HelloWorldIntent {\n readonly type: 'helloWorld.acknowledge';\n}\n\n@Component({\n selector: 'pos-hello-world',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <article class=\"card\">\n <p class=\"kicker\">@retalia/pos-components</p>\n <h1>{{ label() }}</h1>\n <p class=\"lede\">\n If this card rendered, the host installed the package and can consume\n presentational POS components.\n </p>\n\n @if (confirmed()) {\n <p class=\"status\" role=\"status\" aria-live=\"polite\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9.1\" stroke=\"currentColor\" stroke-width=\"1.8\" />\n <path\n d=\"M7.5 12.4 10.6 15.4 16.5 8.8\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n Acknowledged\n </p>\n } @else {\n <button type=\"button\" (click)=\"onAcknowledge()\">Acknowledge</button>\n }\n </article>\n `,\n styles: `\n :host {\n display: block;\n color: #1a1a1a;\n font-family: 'Chakra Petch', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-size: 15px;\n line-height: 1.5;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n padding: 24px;\n background: #fff;\n border: 1px solid #ececf0;\n border-radius: 12px;\n box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);\n }\n\n .kicker {\n margin: 0;\n color: #7b2ff2;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n }\n\n h1 {\n margin: 0;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-size: 22px;\n font-weight: 700;\n letter-spacing: -0.02em;\n line-height: 1.25;\n }\n\n .lede {\n margin: 0 0 8px;\n color: #666a70;\n }\n\n button,\n .status {\n min-height: 52px;\n min-width: 160px;\n margin: 0;\n padding: 0 18px;\n border-radius: 8px;\n font: inherit;\n font-weight: 600;\n }\n\n button {\n border: 0;\n background: #16dbcc;\n color: #1a1a1a;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n\n button:focus-visible {\n outline: 3px solid #7b2ff2;\n outline-offset: 2px;\n }\n\n .status {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n background: #e4fbf5;\n color: #0ca678;\n }\n\n .status svg {\n flex-shrink: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n button {\n transition: none;\n }\n }\n `,\n})\nexport class PosHelloWorld {\n readonly label = input('Hello World library integration successful.');\n readonly acknowledge = output<HelloWorldIntent>();\n\n protected readonly confirmed = signal(false);\n\n protected onAcknowledge(): void {\n this.confirmed.set(true);\n this.acknowledge.emit({ type: 'helloWorld.acknowledge' });\n }\n}\n","/*\n * Public API Surface of @retalia/pos-components\n */\n\nexport { PosHelloWorld } from './lib/hello-world/pos-hello-world';\nexport type { HelloWorldIntent } from './lib/hello-world/pos-hello-world';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAmIa,aAAa,CAAA;AACf,IAAA,KAAK,GAAG,KAAK,CAAC,6CAA6C,4EAAC;IAC5D,WAAW,GAAG,MAAM,EAAoB;AAE9B,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,gFAAC;IAElC,aAAa,GAAA;AACrB,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IAC3D;wGATW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA1Hd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,giCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAwFU,aAAa,EAAA,UAAA,EAAA,CAAA;kBA7HzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,giCAAA,CAAA,EAAA;;;AC3CH;;AAEG;;ACFH;;AAEG;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@retalia/pos-components",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"@angular/common": "^21.2.0",
|
|
10
|
+
"@angular/core": "^21.2.0"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"tslib": "^2.3.0"
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"module": "fesm2022/retalia-pos-components.mjs",
|
|
17
|
+
"typings": "types/retalia-pos-components.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./types/retalia-pos-components.d.ts",
|
|
24
|
+
"default": "./fesm2022/retalia-pos-components.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
interface HelloWorldIntent {
|
|
4
|
+
readonly type: 'helloWorld.acknowledge';
|
|
5
|
+
}
|
|
6
|
+
declare class PosHelloWorld {
|
|
7
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
8
|
+
readonly acknowledge: _angular_core.OutputEmitterRef<HelloWorldIntent>;
|
|
9
|
+
protected readonly confirmed: _angular_core.WritableSignal<boolean>;
|
|
10
|
+
protected onAcknowledge(): void;
|
|
11
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PosHelloWorld, never>;
|
|
12
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PosHelloWorld, "pos-hello-world", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "acknowledge": "acknowledge"; }, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { PosHelloWorld };
|
|
16
|
+
export type { HelloWorldIntent };
|