@limetech/limepkg-cpq-order 2.11.0-dev.2 → 2.11.0-dev.21

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.
@@ -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;
@@ -21,6 +21,7 @@ export declare class CpqTab implements LimeWebComponent {
21
21
  private setup;
22
22
  render(): any;
23
23
  private handleItemsChange;
24
+ private saveAndLoadDeal;
24
25
  private handlePropertiesChange;
25
26
  private handleTemplateSelected;
26
27
  private attachLimetypes;
@@ -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<any>): void;
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
  }
@@ -5,7 +5,6 @@ export declare class DynamicProperties implements LimeWebComponent {
5
5
  context: LimeWebComponentContext;
6
6
  limetype: string;
7
7
  properties: Record<string, any>;
8
- columns?: number;
9
8
  private schema;
10
9
  private limeobjectService;
11
10
  private formData;
@@ -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
- get schema(): {
26
- type: string;
27
- lime: {
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<any>): void;
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
  }
@@ -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 {
@@ -96,7 +98,6 @@ export namespace Components {
96
98
  "platform": LimeWebComponentPlatform;
97
99
  }
98
100
  interface CocDynamicProperties {
99
- "columns"?: number;
100
101
  /**
101
102
  * The context this component belongs to
102
103
  */
@@ -148,6 +149,7 @@ export namespace Components {
148
149
  */
149
150
  "context": LimeWebComponentContext;
150
151
  "currency": string;
152
+ "generalConfig": IconfigGeneral;
151
153
  "itemData": Item;
152
154
  "itemMapping": IconfigItemMapping;
153
155
  "limetype": LimeType;
@@ -165,6 +167,7 @@ export namespace Components {
165
167
  "context": LimeWebComponentContext;
166
168
  "currency": string;
167
169
  "discount": number;
170
+ "generalConfig"?: IconfigGeneral1;
168
171
  /**
169
172
  * Reference to the platform
170
173
  * @inherit
@@ -233,6 +236,20 @@ export namespace Components {
233
236
  */
234
237
  "platform": LimeWebComponentPlatform;
235
238
  }
239
+ interface CocPositionIndex {
240
+ /**
241
+ * @inherit
242
+ */
243
+ "context": LimeWebComponentContext;
244
+ /**
245
+ * @inherit
246
+ */
247
+ "platform": LimeWebComponentPlatform;
248
+ /**
249
+ * Value being rendered
250
+ */
251
+ "value": ItemPosition;
252
+ }
236
253
  interface CocTemplateSelector {
237
254
  /**
238
255
  * The context this component belongs to
@@ -279,6 +296,7 @@ export namespace Components {
279
296
  * The value of the current property
280
297
  */
281
298
  "value": number;
299
+ "vatBehaviour": VatBehaviour;
282
300
  }
283
301
  interface LwcLimepkgCpqOrderLoader {
284
302
  /**
@@ -319,6 +337,10 @@ export interface CocItemFormCustomEvent<T> extends CustomEvent<T> {
319
337
  detail: T;
320
338
  target: HTMLCocItemFormElement;
321
339
  }
340
+ export interface CocItemTableCustomEvent<T> extends CustomEvent<T> {
341
+ detail: T;
342
+ target: HTMLCocItemTableElement;
343
+ }
322
344
  export interface CocNewOrderDialogCustomEvent<T> extends CustomEvent<T> {
323
345
  detail: T;
324
346
  target: HTMLCocNewOrderDialogElement;
@@ -327,6 +349,10 @@ export interface CocOrderViewCustomEvent<T> extends CustomEvent<T> {
327
349
  detail: T;
328
350
  target: HTMLCocOrderViewElement;
329
351
  }
352
+ export interface CocPositionIndexCustomEvent<T> extends CustomEvent<T> {
353
+ detail: T;
354
+ target: HTMLCocPositionIndexElement;
355
+ }
330
356
  export interface CocTemplateSelectorCustomEvent<T> extends CustomEvent<T> {
331
357
  detail: T;
332
358
  target: HTMLCocTemplateSelectorElement;
@@ -426,6 +452,12 @@ declare global {
426
452
  prototype: HTMLCocOrderViewElement;
427
453
  new (): HTMLCocOrderViewElement;
428
454
  };
455
+ interface HTMLCocPositionIndexElement extends Components.CocPositionIndex, HTMLStencilElement {
456
+ }
457
+ var HTMLCocPositionIndexElement: {
458
+ prototype: HTMLCocPositionIndexElement;
459
+ new (): HTMLCocPositionIndexElement;
460
+ };
429
461
  interface HTMLCocTemplateSelectorElement extends Components.CocTemplateSelector, HTMLStencilElement {
430
462
  }
431
463
  var HTMLCocTemplateSelectorElement: {
@@ -460,6 +492,7 @@ declare global {
460
492
  "coc-new-order-dialog": HTMLCocNewOrderDialogElement;
461
493
  "coc-order-card": HTMLCocOrderCardElement;
462
494
  "coc-order-view": HTMLCocOrderViewElement;
495
+ "coc-position-index": HTMLCocPositionIndexElement;
463
496
  "coc-template-selector": HTMLCocTemplateSelectorElement;
464
497
  "coc-vat-selector": HTMLCocVatSelectorElement;
465
498
  "lwc-limepkg-cpq-order-loader": HTMLLwcLimepkgCpqOrderLoaderElement;
@@ -555,7 +588,6 @@ declare namespace LocalJSX {
555
588
  "platform"?: LimeWebComponentPlatform;
556
589
  }
557
590
  interface CocDynamicProperties {
558
- "columns"?: number;
559
591
  /**
560
592
  * The context this component belongs to
561
593
  */
@@ -612,9 +644,11 @@ declare namespace LocalJSX {
612
644
  */
613
645
  "context"?: LimeWebComponentContext;
614
646
  "currency"?: string;
647
+ "generalConfig"?: IconfigGeneral;
615
648
  "itemData"?: Item;
616
649
  "itemMapping"?: IconfigItemMapping;
617
650
  "limetype"?: LimeType;
651
+ "onChange"?: (event: CocItemFormCustomEvent<Item>) => void;
618
652
  "onValidate"?: (event: CocItemFormCustomEvent<any>) => void;
619
653
  /**
620
654
  * Reference to the platform
@@ -630,6 +664,7 @@ declare namespace LocalJSX {
630
664
  "context"?: LimeWebComponentContext;
631
665
  "currency"?: string;
632
666
  "discount"?: number;
667
+ "generalConfig"?: IconfigGeneral1;
633
668
  /**
634
669
  * Reference to the platform
635
670
  * @inherit
@@ -650,6 +685,9 @@ declare namespace LocalJSX {
650
685
  "discount"?: number;
651
686
  "itemMapping"?: IconfigItemMapping;
652
687
  "items"?: Item[];
688
+ "onActivate"?: (event: CocItemTableCustomEvent<Item>) => void;
689
+ "onActiveRowChange"?: (event: CocItemTableCustomEvent<Item>) => void;
690
+ "onPositionUpdate"?: (event: CocItemTableCustomEvent<Item[]>) => void;
653
691
  /**
654
692
  * Reference to the platform
655
693
  * @inherit
@@ -700,6 +738,21 @@ declare namespace LocalJSX {
700
738
  */
701
739
  "platform"?: LimeWebComponentPlatform;
702
740
  }
741
+ interface CocPositionIndex {
742
+ /**
743
+ * @inherit
744
+ */
745
+ "context"?: LimeWebComponentContext;
746
+ "onValueChange"?: (event: CocPositionIndexCustomEvent<ItemPosition>) => void;
747
+ /**
748
+ * @inherit
749
+ */
750
+ "platform"?: LimeWebComponentPlatform;
751
+ /**
752
+ * Value being rendered
753
+ */
754
+ "value"?: ItemPosition;
755
+ }
703
756
  interface CocTemplateSelector {
704
757
  /**
705
758
  * The context this component belongs to
@@ -751,6 +804,7 @@ declare namespace LocalJSX {
751
804
  * The value of the current property
752
805
  */
753
806
  "value"?: number;
807
+ "vatBehaviour"?: VatBehaviour;
754
808
  }
755
809
  interface LwcLimepkgCpqOrderLoader {
756
810
  /**
@@ -778,6 +832,7 @@ declare namespace LocalJSX {
778
832
  "coc-new-order-dialog": CocNewOrderDialog;
779
833
  "coc-order-card": CocOrderCard;
780
834
  "coc-order-view": CocOrderView;
835
+ "coc-position-index": CocPositionIndex;
781
836
  "coc-template-selector": CocTemplateSelector;
782
837
  "coc-vat-selector": CocVatSelector;
783
838
  "lwc-limepkg-cpq-order-loader": LwcLimepkgCpqOrderLoader;
@@ -802,6 +857,7 @@ declare module "@stencil/core" {
802
857
  "coc-new-order-dialog": LocalJSX.CocNewOrderDialog & JSXBase.HTMLAttributes<HTMLCocNewOrderDialogElement>;
803
858
  "coc-order-card": LocalJSX.CocOrderCard & JSXBase.HTMLAttributes<HTMLCocOrderCardElement>;
804
859
  "coc-order-view": LocalJSX.CocOrderView & JSXBase.HTMLAttributes<HTMLCocOrderViewElement>;
860
+ "coc-position-index": LocalJSX.CocPositionIndex & JSXBase.HTMLAttributes<HTMLCocPositionIndexElement>;
805
861
  "coc-template-selector": LocalJSX.CocTemplateSelector & JSXBase.HTMLAttributes<HTMLCocTemplateSelectorElement>;
806
862
  "coc-vat-selector": LocalJSX.CocVatSelector & JSXBase.HTMLAttributes<HTMLCocVatSelectorElement>;
807
863
  "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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/limepkg-cpq-order",
3
- "version": "2.11.0-dev.2",
3
+ "version": "2.11.0-dev.21",
4
4
  "description": "Type definitions for limepkg-cpq-order frontend",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",