pos-reports 0.1.0
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 +40 -0
- package/dist/index.cjs +2620 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1665 -0
- package/dist/index.d.ts +1665 -0
- package/dist/index.js +2565 -0
- package/dist/index.js.map +1 -0
- package/package.json +29 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# pos-reports
|
|
2
|
+
|
|
3
|
+
Shared POS report catalog and pure helpers for POS frontends.
|
|
4
|
+
|
|
5
|
+
This package owns report definitions that must be shared by `pos-al-app` and
|
|
6
|
+
`pos/apps/pos`, such as report ids, report names, filter definitions, report
|
|
7
|
+
groups, and report rights.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import {
|
|
13
|
+
REPORT_LIST,
|
|
14
|
+
REPORT_TRANSLATIONS,
|
|
15
|
+
REPORTS_ENTITY_QUERY,
|
|
16
|
+
buildReportMessage,
|
|
17
|
+
groupedReportEntries,
|
|
18
|
+
translateReportKey,
|
|
19
|
+
} from "pos-reports";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const label = translateReportKey(locale, REPORT_LIST.dailySales.name);
|
|
24
|
+
const translations = REPORT_TRANSLATIONS.al;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm install
|
|
31
|
+
npm run typecheck
|
|
32
|
+
npm run build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Before publishing:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npm pack --dry-run
|
|
39
|
+
npm publish
|
|
40
|
+
```
|