@htmlbricks/hb-page-invoice 0.71.36 → 0.72.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/manifest.json CHANGED
@@ -18,16 +18,30 @@
18
18
  "additionalProperties": false,
19
19
  "properties": {
20
20
  "headers": {
21
- "$ref": "#/definitions/IHeaders"
21
+ "anyOf": [
22
+ {
23
+ "$ref": "#/definitions/IHeaders"
24
+ },
25
+ {
26
+ "type": "string"
27
+ }
28
+ ]
22
29
  },
23
30
  "id": {
24
31
  "type": "string"
25
32
  },
26
33
  "items": {
27
- "items": {
28
- "$ref": "#/definitions/IItem"
29
- },
30
- "type": "array"
34
+ "anyOf": [
35
+ {
36
+ "items": {
37
+ "$ref": "#/definitions/IItem"
38
+ },
39
+ "type": "array"
40
+ },
41
+ {
42
+ "type": "string"
43
+ }
44
+ ]
31
45
  },
32
46
  "printer": {
33
47
  "enum": [
@@ -40,10 +54,6 @@
40
54
  "type": "string"
41
55
  }
42
56
  },
43
- "required": [
44
- "items",
45
- "headers"
46
- ],
47
57
  "type": "object"
48
58
  },
49
59
  "ICompany": {
@@ -436,7 +446,7 @@
436
446
  }
437
447
  }
438
448
  ],
439
- "iifeIntegrity": "sha384-ZadsB6Lj3Zne+v9vICHN8LfsfSpeWb4ZTMwr0/znl7Jr/e3UYbLuV3x+tK76BEo2",
449
+ "iifeIntegrity": "sha384-mlaV6OudWMGmdZyuIdlUQ9naMes0lNS+Qbzcpdhxqk2UG/3/tGvcZi371lHeddr1",
440
450
  "dependencies": [
441
451
  {
442
452
  "name": "hb-table",
@@ -586,5 +596,5 @@
586
596
  "size": {},
587
597
  "iifePath": "main.iife.js",
588
598
  "repoName": "@htmlbricks/hb-page-invoice",
589
- "version": "0.71.36"
599
+ "version": "0.72.0"
590
600
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-page-invoice",
3
- "version": "0.71.36",
3
+ "version": "0.72.0",
4
4
  "contributors": [],
5
5
  "description": "Printable invoice page: shows seller and buyer from headers, invoice date and serial, line items in hb-table with price, quantity, VAT and row totals, plus subtotal, tax and grand total in the invoice currency. When printer is not yes, offers print and open-in-window actions.",
6
6
  "licenses": [
@@ -6,16 +6,30 @@
6
6
  "additionalProperties": false,
7
7
  "properties": {
8
8
  "headers": {
9
- "$ref": "#/definitions/IHeaders"
9
+ "anyOf": [
10
+ {
11
+ "$ref": "#/definitions/IHeaders"
12
+ },
13
+ {
14
+ "type": "string"
15
+ }
16
+ ]
10
17
  },
11
18
  "id": {
12
19
  "type": "string"
13
20
  },
14
21
  "items": {
15
- "items": {
16
- "$ref": "#/definitions/IItem"
17
- },
18
- "type": "array"
22
+ "anyOf": [
23
+ {
24
+ "items": {
25
+ "$ref": "#/definitions/IItem"
26
+ },
27
+ "type": "array"
28
+ },
29
+ {
30
+ "type": "string"
31
+ }
32
+ ]
19
33
  },
20
34
  "printer": {
21
35
  "enum": [
@@ -28,10 +42,6 @@
28
42
  "type": "string"
29
43
  }
30
44
  },
31
- "required": [
32
- "items",
33
- "headers"
34
- ],
35
45
  "type": "object"
36
46
  },
37
47
  "ICompany": {
@@ -1,39 +1,39 @@
1
1
  export interface IItem {
2
- unit?: string;
3
- desc: string;
4
- unitaryPrice: number;
5
- taxPercentage: number;
6
- quantity?: number;
7
- discount?: {
8
- type: "gross" | "item";
9
- includeVat?: boolean;
10
- };
2
+ unit?: string;
3
+ desc: string;
4
+ unitaryPrice: number;
5
+ taxPercentage: number;
6
+ quantity?: number;
7
+ discount?: {
8
+ type: "gross" | "item";
9
+ includeVat?: boolean;
10
+ };
11
11
  }
12
12
  export interface ICompany {
13
- piva: string;
14
- name: string;
15
- address: string;
16
- email: string;
17
- phone: string;
18
- iban?: string;
13
+ piva: string;
14
+ name: string;
15
+ address: string;
16
+ email: string;
17
+ phone: string;
18
+ iban?: string;
19
19
  }
20
20
 
21
21
  export interface IHeaders {
22
- country?: "it" | "eu" | "us";
23
- serial: string;
24
- date?: Date;
25
- expirationDate?: Date;
26
- category?: "items" | "services";
27
- from: ICompany & { logo: string; shortName: string };
28
- to: ICompany;
22
+ country?: "it" | "eu" | "us";
23
+ serial: string;
24
+ date?: Date;
25
+ expirationDate?: Date;
26
+ category?: "items" | "services";
27
+ from: ICompany & { logo: string; shortName: string };
28
+ to: ICompany;
29
29
  }
30
30
 
31
31
  export type Component = {
32
- id?: string;
33
- style?: string;
34
- printer?: "yes" | "no";
35
- items: IItem[];
36
- headers: IHeaders;
32
+ id?: string;
33
+ style?: string;
34
+ printer?: "yes" | "no";
35
+ items?: IItem[] | string;
36
+ headers?: IHeaders | string;
37
37
  };
38
38
 
39
39
  export type Events = {};