@limetech/limepkg-cpq-order 2.11.0-dev.2 → 2.11.0-dev.20
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 +2 -0
- package/dist/components/cpq-tab/cpq-tab.d.ts +1 -0
- package/dist/components/deal-view/deal-view.d.ts +5 -2
- package/dist/components/edit-item-dialog/edit-item-dialog.d.ts +1 -0
- package/dist/components/item-form/item-form.d.ts +24 -102
- package/dist/components/item-summary/item-summary.d.ts +6 -0
- package/dist/components/item-table/item-sorter.d.ts +13 -0
- package/dist/components/item-table/item-table.d.ts +16 -0
- package/dist/components/loader/coc-loader.d.ts +2 -0
- package/dist/components/order-view/order-view.d.ts +6 -2
- package/dist/components/position-index/position-index.d.ts +27 -0
- package/dist/components/vat-selector/vat-selector.d.ts +4 -0
- package/dist/components.d.ts +59 -1
- package/dist/interfaces/config.d.ts +20 -0
- package/dist/interfaces/objects.d.ts +8 -2
- package/dist/testing/setup.d.ts +10 -0
- package/dist/testing/test-platform.d.ts +8 -0
- package/package.json +1 -1
package/dist/classes/item.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Iarticle, Iitem, DiscountClasses, IarticleGroup } from '../interfaces';
|
|
2
|
+
export declare const NUMBER_OF_DISCOUNT_DECIMALS = 2;
|
|
2
3
|
export declare class Item implements Iitem {
|
|
3
4
|
id: number;
|
|
4
5
|
articleGroup?: IarticleGroup;
|
|
@@ -21,6 +22,7 @@ export declare class Item implements Iitem {
|
|
|
21
22
|
guid?: string;
|
|
22
23
|
deleted: boolean;
|
|
23
24
|
additionalProperties: {};
|
|
25
|
+
overviewProperties: {};
|
|
24
26
|
constructor(props?: Iitem);
|
|
25
27
|
get totalVat(): number;
|
|
26
28
|
get discountedPricePerUnit(): number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator, DialogRenderer } from '@limetech/lime-web-components';
|
|
2
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
3
|
import { Deal, Item } from '../../classes';
|
|
4
|
-
import { Iconfig } from '../../interfaces';
|
|
4
|
+
import { Iconfig, ActiveEventItem } from '../../interfaces';
|
|
5
5
|
export declare class DealView implements LimeWebComponent {
|
|
6
6
|
/**
|
|
7
7
|
* @inherit
|
|
@@ -21,10 +21,13 @@ export declare class DealView implements LimeWebComponent {
|
|
|
21
21
|
get translate(): Translator;
|
|
22
22
|
get dialog(): DialogRenderer;
|
|
23
23
|
render(): any[];
|
|
24
|
-
activateRowHandler(event: CustomEvent<
|
|
24
|
+
activateRowHandler(event: CustomEvent<ActiveEventItem | Item>): void;
|
|
25
25
|
closeDialogHandler: () => void;
|
|
26
26
|
updateItemHandler: (event: CustomEvent<Item>) => void;
|
|
27
|
+
deleteItemHandler: (event: CustomEvent<Item>) => void;
|
|
27
28
|
newItemHandler: (event: CustomEvent<Item>) => void;
|
|
29
|
+
setActiveRowAfterPositionChange: (event: CustomEvent<Item>) => void;
|
|
30
|
+
updateItemPositions: (event: CustomEvent<Item[]>) => void;
|
|
28
31
|
private buttonNewItemClickHandler;
|
|
29
32
|
private openEditDialog;
|
|
30
33
|
}
|
|
@@ -31,6 +31,7 @@ export declare class EditItemDialog implements LimeWebComponent {
|
|
|
31
31
|
get translate(): Translator;
|
|
32
32
|
componentWillLoad(): Promise<void>;
|
|
33
33
|
componentWillRender(): void;
|
|
34
|
+
private handleKeyDown;
|
|
34
35
|
render(): any;
|
|
35
36
|
private renderDialogTitle;
|
|
36
37
|
private handleArticleChange;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { LimeType, LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator } from '@limetech/lime-web-components';
|
|
2
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
|
-
import { IconfigItemMapping } from '../../interfaces';
|
|
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
|
+
discountPerUnit: number;
|
|
12
|
+
discountPercent: number;
|
|
13
|
+
discountTotal: number;
|
|
14
|
+
}
|
|
5
15
|
export declare class ItemForm implements LimeWebComponent {
|
|
6
16
|
/**
|
|
7
17
|
* @inherit
|
|
@@ -15,112 +25,24 @@ export declare class ItemForm implements LimeWebComponent {
|
|
|
15
25
|
currency: string;
|
|
16
26
|
itemMapping: IconfigItemMapping;
|
|
17
27
|
limetype: LimeType;
|
|
28
|
+
generalConfig: IconfigGeneral;
|
|
29
|
+
private itemCopy;
|
|
18
30
|
validate: EventEmitter;
|
|
31
|
+
change: EventEmitter<Item>;
|
|
32
|
+
private schema;
|
|
33
|
+
private discountClass;
|
|
34
|
+
private shouldShowArticleInfo;
|
|
19
35
|
get translate(): Translator;
|
|
36
|
+
componentWillLoad(): void;
|
|
37
|
+
watchItemData(): void;
|
|
38
|
+
watchGeneralConfig(newValue: IconfigGeneral, oldValue: IconfigGeneral): void;
|
|
20
39
|
render(): any[];
|
|
21
40
|
private renderGrossMarginRatio;
|
|
22
41
|
private renderSummary;
|
|
23
42
|
private renderHelperText;
|
|
43
|
+
private calculateDiscount;
|
|
24
44
|
private renderSubtotalAndDiscount;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
layout: {
|
|
29
|
-
type: string;
|
|
30
|
-
columns: number;
|
|
31
|
-
dense: boolean;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
required: string[];
|
|
35
|
-
properties: {
|
|
36
|
-
description: {
|
|
37
|
-
type: string;
|
|
38
|
-
title: string;
|
|
39
|
-
maxLength: number;
|
|
40
|
-
lime: {
|
|
41
|
-
layout: {
|
|
42
|
-
colSpan: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
quantity: {
|
|
47
|
-
type: string;
|
|
48
|
-
title: string;
|
|
49
|
-
minimum: number;
|
|
50
|
-
lime: {
|
|
51
|
-
component: {
|
|
52
|
-
props: {
|
|
53
|
-
suffix: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
pricePerUnit: {
|
|
59
|
-
type: string;
|
|
60
|
-
title: string;
|
|
61
|
-
description: string;
|
|
62
|
-
lime: {
|
|
63
|
-
component: {
|
|
64
|
-
props: {
|
|
65
|
-
suffix: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
vat: {
|
|
71
|
-
title: string;
|
|
72
|
-
minimum: number;
|
|
73
|
-
lime: {
|
|
74
|
-
component: {
|
|
75
|
-
name: string;
|
|
76
|
-
props: {
|
|
77
|
-
value: number;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
discountClass: {
|
|
83
|
-
type: string;
|
|
84
|
-
title: string;
|
|
85
|
-
oneOf: {
|
|
86
|
-
type: string;
|
|
87
|
-
const: string;
|
|
88
|
-
title: string;
|
|
89
|
-
}[];
|
|
90
|
-
lime: {
|
|
91
|
-
component: {
|
|
92
|
-
props: {
|
|
93
|
-
readonly: boolean;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
discountPerUnit: {
|
|
99
|
-
type: string;
|
|
100
|
-
title: string;
|
|
101
|
-
description: string;
|
|
102
|
-
lime: {
|
|
103
|
-
component: {
|
|
104
|
-
props: {
|
|
105
|
-
prefix: string;
|
|
106
|
-
readonly: boolean;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
discountPercent: {
|
|
112
|
-
type: string[];
|
|
113
|
-
title: string;
|
|
114
|
-
description: string;
|
|
115
|
-
lime: {
|
|
116
|
-
component: {
|
|
117
|
-
props: {
|
|
118
|
-
prefix: string;
|
|
119
|
-
readonly: boolean;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
};
|
|
45
|
+
private buildSchema;
|
|
46
|
+
private handleFormChange;
|
|
47
|
+
private shouldHideDiscount;
|
|
126
48
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator } from '@limetech/lime-web-components';
|
|
2
|
+
import { IconfigGeneral } from 'src/interfaces';
|
|
2
3
|
export declare class ItemSummary implements LimeWebComponent {
|
|
3
4
|
/**
|
|
4
5
|
* @inherit
|
|
@@ -14,7 +15,12 @@ export declare class ItemSummary implements LimeWebComponent {
|
|
|
14
15
|
vat: number;
|
|
15
16
|
totalInclVat: number;
|
|
16
17
|
currency: string;
|
|
18
|
+
generalConfig?: IconfigGeneral;
|
|
19
|
+
private vatBehaviour;
|
|
17
20
|
get translate(): Translator;
|
|
21
|
+
componentWillLoad(): void;
|
|
18
22
|
render(): any;
|
|
23
|
+
private renderPriceInfoWithoutTax;
|
|
24
|
+
private renderPriceInfoWithTax;
|
|
19
25
|
private renderSubtotalAndDiscount;
|
|
20
26
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Item } from 'src/classes';
|
|
2
|
+
import { ItemPosition } from './item-table';
|
|
3
|
+
/**
|
|
4
|
+
* Sorts items based on a new item's position.
|
|
5
|
+
*
|
|
6
|
+
* This function adjusts the positions of other items in the list to make room
|
|
7
|
+
* for the new item's position. It ensures that no two items have the same position.
|
|
8
|
+
*
|
|
9
|
+
* @param items - The list of items to sort.
|
|
10
|
+
* @param newItemPosition - The new position of the item being updated.
|
|
11
|
+
* @returns A new array of items with updated positions.
|
|
12
|
+
*/
|
|
13
|
+
export declare function sortItems(items: Item[], newItemPosition: ItemPosition): Item[];
|
|
@@ -1,6 +1,11 @@
|
|
|
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';
|
|
5
|
+
export declare type ItemPosition = {
|
|
6
|
+
guid: string;
|
|
7
|
+
position: number;
|
|
8
|
+
};
|
|
4
9
|
export declare class ItemTable implements LimeWebComponent {
|
|
5
10
|
/**
|
|
6
11
|
* @inherit
|
|
@@ -16,8 +21,19 @@ export declare class ItemTable implements LimeWebComponent {
|
|
|
16
21
|
tableIsReadonly: boolean;
|
|
17
22
|
itemMapping: IconfigItemMapping;
|
|
18
23
|
private limetypes;
|
|
24
|
+
activate: EventEmitter<Item>;
|
|
25
|
+
positionUpdate: EventEmitter<Item[]>;
|
|
26
|
+
activeRowChange: EventEmitter<Item>;
|
|
27
|
+
private columns;
|
|
28
|
+
private filteredItems;
|
|
19
29
|
get translate(): Translator;
|
|
30
|
+
componentWillLoad(): void;
|
|
31
|
+
protected itemMappingChanged(newValue: IconfigItemMapping, oldValue: IconfigItemMapping): void;
|
|
32
|
+
protected itemsChanged(newValue: Item[], oldValue: Item[]): void;
|
|
20
33
|
render(): any;
|
|
34
|
+
private renderLoadingBar;
|
|
35
|
+
private handleActivate;
|
|
21
36
|
private defineColumns;
|
|
22
37
|
private filterItems;
|
|
38
|
+
private handlePositionChange;
|
|
23
39
|
}
|
|
@@ -8,6 +8,7 @@ export declare class Loader implements LimePluginLoader {
|
|
|
8
8
|
get dialogService(): DialogRenderer;
|
|
9
9
|
get eventDispatcher(): EventDispatcher;
|
|
10
10
|
get commandBus(): CommandBus;
|
|
11
|
+
private get webComponentRegistry();
|
|
11
12
|
componentWillLoad(): void;
|
|
12
13
|
componentWillUpdate(): void;
|
|
13
14
|
disconnectedCallback(): void;
|
|
@@ -16,4 +17,5 @@ export declare class Loader implements LimePluginLoader {
|
|
|
16
17
|
private openNewOrderDialog;
|
|
17
18
|
private onDestroyDialog;
|
|
18
19
|
private isEmpty;
|
|
20
|
+
private registerWebComponents;
|
|
19
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator, DialogRenderer } from '@limetech/lime-web-components';
|
|
2
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
3
|
import { Item, Order } from '../../classes';
|
|
4
|
-
import { Iconfig } from '../../interfaces';
|
|
4
|
+
import { Iconfig, ActiveEventItem } from '../../interfaces';
|
|
5
5
|
export declare class OrderView implements LimeWebComponent {
|
|
6
6
|
/**
|
|
7
7
|
* @inherit
|
|
@@ -21,10 +21,14 @@ export declare class OrderView implements LimeWebComponent {
|
|
|
21
21
|
get translate(): Translator;
|
|
22
22
|
get dialog(): DialogRenderer;
|
|
23
23
|
render(): any[];
|
|
24
|
-
activateRowHandler(event: CustomEvent<
|
|
24
|
+
activateRowHandler(event: CustomEvent<ActiveEventItem | Item>): void;
|
|
25
25
|
closeDialogHandler: () => void;
|
|
26
26
|
updateItemHandler: (event: CustomEvent<Item>) => void;
|
|
27
27
|
newItemHandler: (event: CustomEvent<Item>) => void;
|
|
28
|
+
deleteItemHandler: (event: CustomEvent<Item>) => void;
|
|
29
|
+
setActiveRowAfterPositionChange: (event: CustomEvent<Item>) => void;
|
|
30
|
+
updateItemPositions: (event: CustomEvent<Item[]>) => void;
|
|
28
31
|
private buttonNewItemClickHandler;
|
|
29
32
|
private openEditDialog;
|
|
33
|
+
private handleOverviewPropertiesInNewOrderDialog;
|
|
30
34
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TableComponent } from '@limetech/lime-elements';
|
|
2
|
+
import { LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
4
|
+
import { ItemPosition } from '../item-table/item-table';
|
|
5
|
+
export declare class CocPositionIndex implements TableComponent {
|
|
6
|
+
/**
|
|
7
|
+
* @inherit
|
|
8
|
+
*/
|
|
9
|
+
platform: LimeWebComponentPlatform;
|
|
10
|
+
/**
|
|
11
|
+
* @inherit
|
|
12
|
+
*/
|
|
13
|
+
context: LimeWebComponentContext;
|
|
14
|
+
value: ItemPosition;
|
|
15
|
+
private inputValue;
|
|
16
|
+
valueChange: EventEmitter<ItemPosition>;
|
|
17
|
+
private valueHasChanged;
|
|
18
|
+
componentWillLoad(): void;
|
|
19
|
+
private handleChange;
|
|
20
|
+
protected valueChanged(newValue: ItemPosition, oldValue: ItemPosition): void;
|
|
21
|
+
render(): any;
|
|
22
|
+
private handleClick;
|
|
23
|
+
private handleDoubleClick;
|
|
24
|
+
private handleEnterClick;
|
|
25
|
+
private handleBlur;
|
|
26
|
+
private emitValueChange;
|
|
27
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
2
2
|
import { FormComponent } from '@limetech/lime-elements';
|
|
3
3
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
4
|
+
import { VatBehaviour } from 'src/interfaces';
|
|
4
5
|
export declare class VatSelector implements LimeWebComponent, FormComponent {
|
|
5
6
|
platform: LimeWebComponentPlatform;
|
|
6
7
|
context: LimeWebComponentContext;
|
|
@@ -10,6 +11,7 @@ export declare class VatSelector implements LimeWebComponent, FormComponent {
|
|
|
10
11
|
readonly?: boolean;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
helperText?: string;
|
|
14
|
+
vatBehaviour: VatBehaviour;
|
|
13
15
|
change: EventEmitter<number>;
|
|
14
16
|
vatValue: string;
|
|
15
17
|
private readonly hundred;
|
|
@@ -18,4 +20,6 @@ export declare class VatSelector implements LimeWebComponent, FormComponent {
|
|
|
18
20
|
private roundToOneDecimal;
|
|
19
21
|
render(): any;
|
|
20
22
|
private handleChange;
|
|
23
|
+
private shouldHideVatField;
|
|
24
|
+
private shouldBeReadOnly;
|
|
21
25
|
}
|
package/dist/components.d.ts
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { LimeProperty, LimeType, LimeWebComponentContext, LimeWebComponentPlatform } from "@limetech/lime-web-components";
|
|
9
|
-
import { ErpStatus, Iarticle, IarticleGroup, Iconfig, IconfigItemMapping, Iitem } from "./interfaces";
|
|
9
|
+
import { ErpStatus, Iarticle, IarticleGroup, Iconfig, IconfigGeneral, IconfigItemMapping, Iitem } from "./interfaces";
|
|
10
10
|
import { Deal, Item, Order } from "./classes";
|
|
11
11
|
import { StatusLabelMapping } from "./components/erp-status/flow-items";
|
|
12
|
+
import { IconfigGeneral as IconfigGeneral1, VatBehaviour } from "src/interfaces";
|
|
13
|
+
import { ItemPosition } from "./components/item-table/item-table";
|
|
12
14
|
import { DocumentTemplate } from "@limetech/limepkg-document-templates";
|
|
13
15
|
export namespace Components {
|
|
14
16
|
interface CocArticleGroupPicker {
|
|
@@ -148,6 +150,7 @@ export namespace Components {
|
|
|
148
150
|
*/
|
|
149
151
|
"context": LimeWebComponentContext;
|
|
150
152
|
"currency": string;
|
|
153
|
+
"generalConfig": IconfigGeneral;
|
|
151
154
|
"itemData": Item;
|
|
152
155
|
"itemMapping": IconfigItemMapping;
|
|
153
156
|
"limetype": LimeType;
|
|
@@ -165,6 +168,7 @@ export namespace Components {
|
|
|
165
168
|
"context": LimeWebComponentContext;
|
|
166
169
|
"currency": string;
|
|
167
170
|
"discount": number;
|
|
171
|
+
"generalConfig"?: IconfigGeneral1;
|
|
168
172
|
/**
|
|
169
173
|
* Reference to the platform
|
|
170
174
|
* @inherit
|
|
@@ -233,6 +237,20 @@ export namespace Components {
|
|
|
233
237
|
*/
|
|
234
238
|
"platform": LimeWebComponentPlatform;
|
|
235
239
|
}
|
|
240
|
+
interface CocPositionIndex {
|
|
241
|
+
/**
|
|
242
|
+
* @inherit
|
|
243
|
+
*/
|
|
244
|
+
"context": LimeWebComponentContext;
|
|
245
|
+
/**
|
|
246
|
+
* @inherit
|
|
247
|
+
*/
|
|
248
|
+
"platform": LimeWebComponentPlatform;
|
|
249
|
+
/**
|
|
250
|
+
* Value being rendered
|
|
251
|
+
*/
|
|
252
|
+
"value": ItemPosition;
|
|
253
|
+
}
|
|
236
254
|
interface CocTemplateSelector {
|
|
237
255
|
/**
|
|
238
256
|
* The context this component belongs to
|
|
@@ -279,6 +297,7 @@ export namespace Components {
|
|
|
279
297
|
* The value of the current property
|
|
280
298
|
*/
|
|
281
299
|
"value": number;
|
|
300
|
+
"vatBehaviour": VatBehaviour;
|
|
282
301
|
}
|
|
283
302
|
interface LwcLimepkgCpqOrderLoader {
|
|
284
303
|
/**
|
|
@@ -319,6 +338,10 @@ export interface CocItemFormCustomEvent<T> extends CustomEvent<T> {
|
|
|
319
338
|
detail: T;
|
|
320
339
|
target: HTMLCocItemFormElement;
|
|
321
340
|
}
|
|
341
|
+
export interface CocItemTableCustomEvent<T> extends CustomEvent<T> {
|
|
342
|
+
detail: T;
|
|
343
|
+
target: HTMLCocItemTableElement;
|
|
344
|
+
}
|
|
322
345
|
export interface CocNewOrderDialogCustomEvent<T> extends CustomEvent<T> {
|
|
323
346
|
detail: T;
|
|
324
347
|
target: HTMLCocNewOrderDialogElement;
|
|
@@ -327,6 +350,10 @@ export interface CocOrderViewCustomEvent<T> extends CustomEvent<T> {
|
|
|
327
350
|
detail: T;
|
|
328
351
|
target: HTMLCocOrderViewElement;
|
|
329
352
|
}
|
|
353
|
+
export interface CocPositionIndexCustomEvent<T> extends CustomEvent<T> {
|
|
354
|
+
detail: T;
|
|
355
|
+
target: HTMLCocPositionIndexElement;
|
|
356
|
+
}
|
|
330
357
|
export interface CocTemplateSelectorCustomEvent<T> extends CustomEvent<T> {
|
|
331
358
|
detail: T;
|
|
332
359
|
target: HTMLCocTemplateSelectorElement;
|
|
@@ -426,6 +453,12 @@ declare global {
|
|
|
426
453
|
prototype: HTMLCocOrderViewElement;
|
|
427
454
|
new (): HTMLCocOrderViewElement;
|
|
428
455
|
};
|
|
456
|
+
interface HTMLCocPositionIndexElement extends Components.CocPositionIndex, HTMLStencilElement {
|
|
457
|
+
}
|
|
458
|
+
var HTMLCocPositionIndexElement: {
|
|
459
|
+
prototype: HTMLCocPositionIndexElement;
|
|
460
|
+
new (): HTMLCocPositionIndexElement;
|
|
461
|
+
};
|
|
429
462
|
interface HTMLCocTemplateSelectorElement extends Components.CocTemplateSelector, HTMLStencilElement {
|
|
430
463
|
}
|
|
431
464
|
var HTMLCocTemplateSelectorElement: {
|
|
@@ -460,6 +493,7 @@ declare global {
|
|
|
460
493
|
"coc-new-order-dialog": HTMLCocNewOrderDialogElement;
|
|
461
494
|
"coc-order-card": HTMLCocOrderCardElement;
|
|
462
495
|
"coc-order-view": HTMLCocOrderViewElement;
|
|
496
|
+
"coc-position-index": HTMLCocPositionIndexElement;
|
|
463
497
|
"coc-template-selector": HTMLCocTemplateSelectorElement;
|
|
464
498
|
"coc-vat-selector": HTMLCocVatSelectorElement;
|
|
465
499
|
"lwc-limepkg-cpq-order-loader": HTMLLwcLimepkgCpqOrderLoaderElement;
|
|
@@ -612,9 +646,11 @@ declare namespace LocalJSX {
|
|
|
612
646
|
*/
|
|
613
647
|
"context"?: LimeWebComponentContext;
|
|
614
648
|
"currency"?: string;
|
|
649
|
+
"generalConfig"?: IconfigGeneral;
|
|
615
650
|
"itemData"?: Item;
|
|
616
651
|
"itemMapping"?: IconfigItemMapping;
|
|
617
652
|
"limetype"?: LimeType;
|
|
653
|
+
"onChange"?: (event: CocItemFormCustomEvent<Item>) => void;
|
|
618
654
|
"onValidate"?: (event: CocItemFormCustomEvent<any>) => void;
|
|
619
655
|
/**
|
|
620
656
|
* Reference to the platform
|
|
@@ -630,6 +666,7 @@ declare namespace LocalJSX {
|
|
|
630
666
|
"context"?: LimeWebComponentContext;
|
|
631
667
|
"currency"?: string;
|
|
632
668
|
"discount"?: number;
|
|
669
|
+
"generalConfig"?: IconfigGeneral1;
|
|
633
670
|
/**
|
|
634
671
|
* Reference to the platform
|
|
635
672
|
* @inherit
|
|
@@ -650,6 +687,9 @@ declare namespace LocalJSX {
|
|
|
650
687
|
"discount"?: number;
|
|
651
688
|
"itemMapping"?: IconfigItemMapping;
|
|
652
689
|
"items"?: Item[];
|
|
690
|
+
"onActivate"?: (event: CocItemTableCustomEvent<Item>) => void;
|
|
691
|
+
"onActiveRowChange"?: (event: CocItemTableCustomEvent<Item>) => void;
|
|
692
|
+
"onPositionUpdate"?: (event: CocItemTableCustomEvent<Item[]>) => void;
|
|
653
693
|
/**
|
|
654
694
|
* Reference to the platform
|
|
655
695
|
* @inherit
|
|
@@ -700,6 +740,21 @@ declare namespace LocalJSX {
|
|
|
700
740
|
*/
|
|
701
741
|
"platform"?: LimeWebComponentPlatform;
|
|
702
742
|
}
|
|
743
|
+
interface CocPositionIndex {
|
|
744
|
+
/**
|
|
745
|
+
* @inherit
|
|
746
|
+
*/
|
|
747
|
+
"context"?: LimeWebComponentContext;
|
|
748
|
+
"onValueChange"?: (event: CocPositionIndexCustomEvent<ItemPosition>) => void;
|
|
749
|
+
/**
|
|
750
|
+
* @inherit
|
|
751
|
+
*/
|
|
752
|
+
"platform"?: LimeWebComponentPlatform;
|
|
753
|
+
/**
|
|
754
|
+
* Value being rendered
|
|
755
|
+
*/
|
|
756
|
+
"value"?: ItemPosition;
|
|
757
|
+
}
|
|
703
758
|
interface CocTemplateSelector {
|
|
704
759
|
/**
|
|
705
760
|
* The context this component belongs to
|
|
@@ -751,6 +806,7 @@ declare namespace LocalJSX {
|
|
|
751
806
|
* The value of the current property
|
|
752
807
|
*/
|
|
753
808
|
"value"?: number;
|
|
809
|
+
"vatBehaviour"?: VatBehaviour;
|
|
754
810
|
}
|
|
755
811
|
interface LwcLimepkgCpqOrderLoader {
|
|
756
812
|
/**
|
|
@@ -778,6 +834,7 @@ declare namespace LocalJSX {
|
|
|
778
834
|
"coc-new-order-dialog": CocNewOrderDialog;
|
|
779
835
|
"coc-order-card": CocOrderCard;
|
|
780
836
|
"coc-order-view": CocOrderView;
|
|
837
|
+
"coc-position-index": CocPositionIndex;
|
|
781
838
|
"coc-template-selector": CocTemplateSelector;
|
|
782
839
|
"coc-vat-selector": CocVatSelector;
|
|
783
840
|
"lwc-limepkg-cpq-order-loader": LwcLimepkgCpqOrderLoader;
|
|
@@ -802,6 +859,7 @@ declare module "@stencil/core" {
|
|
|
802
859
|
"coc-new-order-dialog": LocalJSX.CocNewOrderDialog & JSXBase.HTMLAttributes<HTMLCocNewOrderDialogElement>;
|
|
803
860
|
"coc-order-card": LocalJSX.CocOrderCard & JSXBase.HTMLAttributes<HTMLCocOrderCardElement>;
|
|
804
861
|
"coc-order-view": LocalJSX.CocOrderView & JSXBase.HTMLAttributes<HTMLCocOrderViewElement>;
|
|
862
|
+
"coc-position-index": LocalJSX.CocPositionIndex & JSXBase.HTMLAttributes<HTMLCocPositionIndexElement>;
|
|
805
863
|
"coc-template-selector": LocalJSX.CocTemplateSelector & JSXBase.HTMLAttributes<HTMLCocTemplateSelectorElement>;
|
|
806
864
|
"coc-vat-selector": LocalJSX.CocVatSelector & JSXBase.HTMLAttributes<HTMLCocVatSelectorElement>;
|
|
807
865
|
"lwc-limepkg-cpq-order-loader": LocalJSX.LwcLimepkgCpqOrderLoader & JSXBase.HTMLAttributes<HTMLLwcLimepkgCpqOrderLoaderElement>;
|
|
@@ -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;
|
|
@@ -98,9 +99,28 @@ export interface IconfigOrder {
|
|
|
98
99
|
orderrowMapping: IconfigOrderrowMapping;
|
|
99
100
|
orderFromDealMapping: IconfigOrderFromDealMapping[];
|
|
100
101
|
}
|
|
102
|
+
export interface IconfigGeneral {
|
|
103
|
+
vat: IconfigVatBehaviour;
|
|
104
|
+
discount: IconfigDiscountBehaviour;
|
|
105
|
+
gross_margin_cost_price: IconfigGrossMarginCostPrice;
|
|
106
|
+
}
|
|
107
|
+
interface IconfigVatBehaviour {
|
|
108
|
+
vat_behaviour: VatBehaviour;
|
|
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
|
+
}
|
|
118
|
+
export declare type VatBehaviour = 'hide' | 'show' | 'show_and_edit';
|
|
101
119
|
export interface Iconfig {
|
|
102
120
|
article: IconfigArticle;
|
|
103
121
|
customization?: IconfigCustomization;
|
|
104
122
|
cpq?: IconfigCpq;
|
|
105
123
|
order?: IconfigOrder;
|
|
124
|
+
general_config?: IconfigGeneral;
|
|
106
125
|
}
|
|
126
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Column } from '@limetech/lime-elements';
|
|
1
2
|
import { IconfigBaseMapping } from './config';
|
|
3
|
+
import { ItemPosition } from 'src/components/item-table/item-table';
|
|
2
4
|
export interface Iitem<T extends {} = Record<string, any>> {
|
|
3
5
|
id: number;
|
|
4
6
|
articleGroup?: IarticleGroup;
|
|
@@ -21,6 +23,7 @@ export interface Iitem<T extends {} = Record<string, any>> {
|
|
|
21
23
|
guid?: string;
|
|
22
24
|
deleted: boolean;
|
|
23
25
|
additionalProperties?: T;
|
|
26
|
+
overviewProperties?: T;
|
|
24
27
|
}
|
|
25
28
|
export interface Iarticle {
|
|
26
29
|
id: number;
|
|
@@ -56,13 +59,16 @@ export interface Iorder extends Base {
|
|
|
56
59
|
deal: number;
|
|
57
60
|
orderstatus: ErpStatus;
|
|
58
61
|
}
|
|
59
|
-
export interface Icolumn {
|
|
62
|
+
export interface Icolumn extends Column {
|
|
60
63
|
title: string;
|
|
61
64
|
field: string;
|
|
62
65
|
headerSort: boolean;
|
|
63
66
|
horizontalAlign?: 'left' | 'center' | 'right';
|
|
64
67
|
formatter?: any;
|
|
65
68
|
}
|
|
69
|
+
export interface ActiveEventItem extends Omit<Iitem, 'position'> {
|
|
70
|
+
position: ItemPosition;
|
|
71
|
+
}
|
|
66
72
|
export declare enum ErpStatus {
|
|
67
73
|
notready = "notready",
|
|
68
74
|
readytobesent = "readytobesent",
|
|
@@ -70,4 +76,4 @@ export declare enum ErpStatus {
|
|
|
70
76
|
senttoerp = "senttoerp",
|
|
71
77
|
error = "error"
|
|
72
78
|
}
|
|
73
|
-
export declare type DiscountClasses = 'amount' | 'percent';
|
|
79
|
+
export declare type DiscountClasses = 'amount' | 'percent' | 'total';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LimeObject, LimeType, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
2
|
+
export declare const limeTypes: {
|
|
3
|
+
readonly person: LimeType;
|
|
4
|
+
readonly company: LimeType;
|
|
5
|
+
};
|
|
6
|
+
export declare const limeObjects: {
|
|
7
|
+
readonly person1: LimeObject;
|
|
8
|
+
readonly company1: LimeObject;
|
|
9
|
+
};
|
|
10
|
+
export declare function createTestPlatform(): LimeWebComponentPlatform;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
2
|
+
export declare class TestPlatform implements LimeWebComponentPlatform {
|
|
3
|
+
get type(): LimeWebComponentPlatform['type'];
|
|
4
|
+
private services;
|
|
5
|
+
get(name: string): any;
|
|
6
|
+
has(name: string): boolean;
|
|
7
|
+
register(name: string, service: any): void;
|
|
8
|
+
}
|