@limetech/limepkg-cpq-order 2.11.0-dev.3 → 2.11.0-dev.4
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/dist/classes/item.d.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { LimeType, LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator } from '@limetech/lime-web-components';
|
|
2
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
|
-
import { IconfigGeneral, IconfigItemMapping
|
|
3
|
+
import { IconfigGeneral, IconfigItemMapping } from '../../interfaces';
|
|
4
4
|
import { Item } from '../../classes';
|
|
5
|
+
import { FormSchema } from '@limetech/lime-elements';
|
|
6
|
+
export interface IitemFormSchema extends FormSchema {
|
|
7
|
+
description: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
pricePerUnit: number;
|
|
10
|
+
vat: number;
|
|
11
|
+
discount: {
|
|
12
|
+
discountPerUnit: number;
|
|
13
|
+
discountPercent: number;
|
|
14
|
+
discountTotal: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
5
17
|
export declare class ItemForm implements LimeWebComponent {
|
|
6
18
|
/**
|
|
7
19
|
* @inherit
|
|
@@ -16,113 +28,25 @@ export declare class ItemForm implements LimeWebComponent {
|
|
|
16
28
|
itemMapping: IconfigItemMapping;
|
|
17
29
|
limetype: LimeType;
|
|
18
30
|
generalConfig: IconfigGeneral;
|
|
31
|
+
private itemCopy;
|
|
19
32
|
validate: EventEmitter;
|
|
33
|
+
change: EventEmitter<Item>;
|
|
34
|
+
private percentageDiscountIsUsed;
|
|
35
|
+
private amountPerUnitDiscountIsUsed;
|
|
36
|
+
private totalAmountDiscountIsUsed;
|
|
37
|
+
private schema;
|
|
38
|
+
private discountClass;
|
|
39
|
+
private shouldShowArticleInfo;
|
|
20
40
|
get translate(): Translator;
|
|
41
|
+
componentWillLoad(): void;
|
|
42
|
+
watchItemData(): void;
|
|
43
|
+
watchGeneralConfig(newValue: IconfigGeneral, oldValue: IconfigGeneral): void;
|
|
21
44
|
render(): any[];
|
|
22
45
|
private renderGrossMarginRatio;
|
|
23
46
|
private renderSummary;
|
|
24
47
|
private renderHelperText;
|
|
25
48
|
private renderSubtotalAndDiscount;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
layout: {
|
|
30
|
-
type: string;
|
|
31
|
-
columns: number;
|
|
32
|
-
dense: boolean;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
required: string[];
|
|
36
|
-
properties: {
|
|
37
|
-
description: {
|
|
38
|
-
type: string;
|
|
39
|
-
title: string;
|
|
40
|
-
maxLength: number;
|
|
41
|
-
lime: {
|
|
42
|
-
layout: {
|
|
43
|
-
colSpan: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
quantity: {
|
|
48
|
-
type: string;
|
|
49
|
-
title: string;
|
|
50
|
-
minimum: number;
|
|
51
|
-
lime: {
|
|
52
|
-
component: {
|
|
53
|
-
props: {
|
|
54
|
-
suffix: string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
pricePerUnit: {
|
|
60
|
-
type: string;
|
|
61
|
-
title: string;
|
|
62
|
-
description: string;
|
|
63
|
-
lime: {
|
|
64
|
-
component: {
|
|
65
|
-
props: {
|
|
66
|
-
suffix: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
vat: {
|
|
72
|
-
title: string;
|
|
73
|
-
minimum: number;
|
|
74
|
-
lime: {
|
|
75
|
-
component: {
|
|
76
|
-
name: string;
|
|
77
|
-
props: {
|
|
78
|
-
value: number;
|
|
79
|
-
vatBehaviour: VatBehaviour;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
discountClass: {
|
|
85
|
-
type: string;
|
|
86
|
-
title: string;
|
|
87
|
-
oneOf: {
|
|
88
|
-
type: string;
|
|
89
|
-
const: string;
|
|
90
|
-
title: string;
|
|
91
|
-
}[];
|
|
92
|
-
lime: {
|
|
93
|
-
component: {
|
|
94
|
-
props: {
|
|
95
|
-
readonly: boolean;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
discountPerUnit: {
|
|
101
|
-
type: string;
|
|
102
|
-
title: string;
|
|
103
|
-
description: string;
|
|
104
|
-
lime: {
|
|
105
|
-
component: {
|
|
106
|
-
props: {
|
|
107
|
-
prefix: string;
|
|
108
|
-
readonly: boolean;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
discountPercent: {
|
|
114
|
-
type: string[];
|
|
115
|
-
title: string;
|
|
116
|
-
description: string;
|
|
117
|
-
lime: {
|
|
118
|
-
component: {
|
|
119
|
-
props: {
|
|
120
|
-
prefix: string;
|
|
121
|
-
readonly: boolean;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
};
|
|
49
|
+
private buildSchema;
|
|
50
|
+
private handleFormChange;
|
|
51
|
+
private shouldHideDiscount;
|
|
128
52
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator } from '@limetech/lime-web-components';
|
|
2
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
3
|
import { IconfigItemMapping } from '../../interfaces';
|
|
3
4
|
import { Item } from '../../classes';
|
|
4
5
|
export declare class ItemTable implements LimeWebComponent {
|
|
@@ -16,8 +17,10 @@ export declare class ItemTable implements LimeWebComponent {
|
|
|
16
17
|
tableIsReadonly: boolean;
|
|
17
18
|
itemMapping: IconfigItemMapping;
|
|
18
19
|
private limetypes;
|
|
20
|
+
activate: EventEmitter<Item>;
|
|
19
21
|
get translate(): Translator;
|
|
20
22
|
render(): any;
|
|
23
|
+
private handleActivate;
|
|
21
24
|
private defineColumns;
|
|
22
25
|
private filterItems;
|
|
23
26
|
}
|
package/dist/components.d.ts
CHANGED
|
@@ -323,6 +323,10 @@ export interface CocItemFormCustomEvent<T> extends CustomEvent<T> {
|
|
|
323
323
|
detail: T;
|
|
324
324
|
target: HTMLCocItemFormElement;
|
|
325
325
|
}
|
|
326
|
+
export interface CocItemTableCustomEvent<T> extends CustomEvent<T> {
|
|
327
|
+
detail: T;
|
|
328
|
+
target: HTMLCocItemTableElement;
|
|
329
|
+
}
|
|
326
330
|
export interface CocNewOrderDialogCustomEvent<T> extends CustomEvent<T> {
|
|
327
331
|
detail: T;
|
|
328
332
|
target: HTMLCocNewOrderDialogElement;
|
|
@@ -620,6 +624,7 @@ declare namespace LocalJSX {
|
|
|
620
624
|
"itemData"?: Item;
|
|
621
625
|
"itemMapping"?: IconfigItemMapping;
|
|
622
626
|
"limetype"?: LimeType;
|
|
627
|
+
"onChange"?: (event: CocItemFormCustomEvent<Item>) => void;
|
|
623
628
|
"onValidate"?: (event: CocItemFormCustomEvent<any>) => void;
|
|
624
629
|
/**
|
|
625
630
|
* Reference to the platform
|
|
@@ -656,6 +661,7 @@ declare namespace LocalJSX {
|
|
|
656
661
|
"discount"?: number;
|
|
657
662
|
"itemMapping"?: IconfigItemMapping;
|
|
658
663
|
"items"?: Item[];
|
|
664
|
+
"onActivate"?: (event: CocItemTableCustomEvent<Item>) => void;
|
|
659
665
|
/**
|
|
660
666
|
* Reference to the platform
|
|
661
667
|
* @inherit
|
|
@@ -47,6 +47,7 @@ export interface IconfigItemMapping {
|
|
|
47
47
|
propertyDiscount: string;
|
|
48
48
|
propertyTotalvalue: string;
|
|
49
49
|
propertyPosition: string;
|
|
50
|
+
overviewProperties: string[];
|
|
50
51
|
}
|
|
51
52
|
export interface IconfigBaseMapping {
|
|
52
53
|
limetype: string;
|
|
@@ -100,10 +101,20 @@ export interface IconfigOrder {
|
|
|
100
101
|
}
|
|
101
102
|
export interface IconfigGeneral {
|
|
102
103
|
vat: IconfigVatBehaviour;
|
|
104
|
+
discount: IconfigDiscountBehaviour;
|
|
105
|
+
gross_margin_cost_price: IconfigGrossMarginCostPrice;
|
|
103
106
|
}
|
|
104
107
|
interface IconfigVatBehaviour {
|
|
105
108
|
vat_behaviour: VatBehaviour;
|
|
106
109
|
}
|
|
110
|
+
interface IconfigDiscountBehaviour {
|
|
111
|
+
percentage_discount: boolean;
|
|
112
|
+
amount_per_unit_discount: boolean;
|
|
113
|
+
total_amount_discount: boolean;
|
|
114
|
+
}
|
|
115
|
+
interface IconfigGrossMarginCostPrice {
|
|
116
|
+
should_show_article_info: boolean;
|
|
117
|
+
}
|
|
107
118
|
export declare type VatBehaviour = 'hide' | 'show' | 'show_and_edit';
|
|
108
119
|
export interface Iconfig {
|
|
109
120
|
article: IconfigArticle;
|
|
@@ -21,6 +21,7 @@ export interface Iitem<T extends {} = Record<string, any>> {
|
|
|
21
21
|
guid?: string;
|
|
22
22
|
deleted: boolean;
|
|
23
23
|
additionalProperties?: T;
|
|
24
|
+
overviewProperties?: T;
|
|
24
25
|
}
|
|
25
26
|
export interface Iarticle {
|
|
26
27
|
id: number;
|
|
@@ -70,4 +71,4 @@ export declare enum ErpStatus {
|
|
|
70
71
|
senttoerp = "senttoerp",
|
|
71
72
|
error = "error"
|
|
72
73
|
}
|
|
73
|
-
export declare type DiscountClasses = 'amount' | 'percent';
|
|
74
|
+
export declare type DiscountClasses = 'amount' | 'percent' | 'total';
|