zakeke-configurator-react 0.1.334 → 0.1.335
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/declarations/composer/Module/src/environment.d.ts +5 -0
- package/dist/declarations/composer/Module/src/state/providerValue.d.ts +5 -0
- package/dist/declarations/libs/pricingRuleBase/DesignPriceCalculatorRuleBased.d.ts +83 -83
- package/dist/globals1.js +1 -1
- package/dist/index.js +71 -18
- package/package.json +1 -1
|
@@ -259,6 +259,11 @@ export declare class ZakekeEnvironment {
|
|
|
259
259
|
text: string;
|
|
260
260
|
fontFamily: string;
|
|
261
261
|
}, areaId: number): Promise<void>;
|
|
262
|
+
setPrintingMethod(printingMethodId: number, areaId: number): Promise<void>;
|
|
263
|
+
getPrintingMethods(): Array<{
|
|
264
|
+
printMethodId: number;
|
|
265
|
+
name: string;
|
|
266
|
+
}>;
|
|
262
267
|
moveItemUp: (guid: string) => void;
|
|
263
268
|
moveItemDown: (guid: string) => void;
|
|
264
269
|
setItemText: (guid: string, text: string) => string;
|
|
@@ -228,5 +228,10 @@ export interface Zakeke {
|
|
|
228
228
|
exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
|
|
229
229
|
moveItemUp: (itemGuid: string) => void;
|
|
230
230
|
moveItemDown: (itemGuid: string) => void;
|
|
231
|
+
getPrintingMethods: () => Array<{
|
|
232
|
+
printMethodId: number;
|
|
233
|
+
name: string;
|
|
234
|
+
}>;
|
|
235
|
+
setPrintingMethod: (printingMethodId: number, areaId: number) => void;
|
|
231
236
|
}
|
|
232
237
|
export {};
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
interface FormulaModel {
|
|
2
|
-
operator: string;
|
|
3
|
-
values: number[];
|
|
4
|
-
}
|
|
5
|
-
interface PricingRulePropertyModel {
|
|
6
|
-
propertyID: number;
|
|
7
|
-
functionName: string;
|
|
8
|
-
}
|
|
9
|
-
interface IContext {
|
|
10
|
-
sides: any;
|
|
11
|
-
items: any;
|
|
12
|
-
design: MPlaza.Design;
|
|
13
|
-
rule: any;
|
|
14
|
-
}
|
|
15
|
-
export declare class DesignPriceCalculatorRuleFactory {
|
|
16
|
-
static create: (product: any, apiUrl?: string, token?: string, isOwin?: boolean, cloudFlareApiUrl?: string, clientLang?: string) => Promise<DesignPriceCalculatorRuleBased>;
|
|
17
|
-
}
|
|
18
|
-
export declare class DesignPriceCalculatorRuleBased {
|
|
19
|
-
colorID: number;
|
|
20
|
-
private product?;
|
|
21
|
-
private pricings?;
|
|
22
|
-
private pricing?;
|
|
23
|
-
private properties?;
|
|
24
|
-
private config;
|
|
25
|
-
constructor(apiUrl?: string, token?: string, isOwin?: boolean, cloudFlareApiUrl?: string, clientLang?: string);
|
|
26
|
-
init: (product: any) => Promise<void>;
|
|
27
|
-
getPricings: (product: any, callback: (pricings: any, properties?: PricingRulePropertyModel[]) => void) => Promise<void>;
|
|
28
|
-
getPricing: (design: any) => any;
|
|
29
|
-
distinct: (value: any, index: any, self: any) => boolean;
|
|
30
|
-
ElementSizeFunction: (pContext: any, formula: FormulaModel) => {
|
|
31
|
-
result: boolean;
|
|
32
|
-
multiplier: number;
|
|
33
|
-
items: any;
|
|
34
|
-
};
|
|
35
|
-
NumberOfElementsSimplifiedFunction: (pContext: any, formula: FormulaModel) => {
|
|
36
|
-
result: boolean;
|
|
37
|
-
multiplier: any;
|
|
38
|
-
items: any;
|
|
39
|
-
};
|
|
40
|
-
LinesLengthFunction: (pContext: any, formula: FormulaModel) => any;
|
|
41
|
-
AmountOfElementsFunction: (pContext: any, formula: FormulaModel) => any;
|
|
42
|
-
AmountOfUsedColorsFunction: (pContext: any, formula: FormulaModel) => any;
|
|
43
|
-
PriceByDesignSizeSimplifiedFunction: (pContext: any, formula: FormulaModel) => any;
|
|
44
|
-
PriceByAreaSimplifiedFunction: (pContext: any, formula: FormulaModel) => any;
|
|
45
|
-
CanvasSizeFunction: (pContext: IContext, formula: FormulaModel) => any;
|
|
46
|
-
DesignSizeFunction: (pContext: any, formula: FormulaModel) => any;
|
|
47
|
-
DesignTextLengthFunction: (pContext: any, formula: FormulaModel) => any;
|
|
48
|
-
CustomizedSidesFunction: (pContext: any, formula: FormulaModel) => any;
|
|
49
|
-
TextLengthFunction: (pContext: any, formula: FormulaModel) => any;
|
|
50
|
-
conditionsToConditionsGroupByFormula: (conditions: any) => {
|
|
51
|
-
formula: string;
|
|
52
|
-
position: any;
|
|
53
|
-
conditions: any[];
|
|
54
|
-
}[];
|
|
55
|
-
getFunctionName: (properties: any, rule: any) => any;
|
|
56
|
-
GetContextForRule: (rule: any, product: any, design: any, sidesOnWhichThePriceIsEnabled: any, attributeMatchColorId?: number | null) => IContext;
|
|
57
|
-
isUsingAmountOfColors: (printTypeID: number) => boolean;
|
|
58
|
-
getPremiumPhotosPrice: (design: any, quantity: number) => number;
|
|
59
|
-
/**
|
|
60
|
-
* Get Image Price
|
|
61
|
-
*
|
|
62
|
-
* Metodo che calcola il prezzo per le immagini nel design a cui a backoffice
|
|
63
|
-
* è stato valorizzato un prezzo
|
|
64
|
-
*
|
|
65
|
-
* @author f.checchia
|
|
66
|
-
*
|
|
67
|
-
* @param design Il design in input
|
|
68
|
-
* @param {number} quantity La quantità del prodotto che si sta acquistando
|
|
69
|
-
*
|
|
70
|
-
* @return {number} Il prezzo complessivo delle immagini per la quantità
|
|
71
|
-
*
|
|
72
|
-
* */
|
|
73
|
-
getImagePrice: (design: any, quantity: number) => number;
|
|
74
|
-
getMatchedConditions: (design: any, quantity: number, includePercentage: boolean, attributeMatchColorId?: number | null) => any;
|
|
75
|
-
calculate: (design: any, quantity: number, attributeMatchColorId?: number | null, isPricingAdvancedEnabled?: boolean) => number;
|
|
76
|
-
getPricingAdditionalInfo: (printTypeID: number) => {
|
|
77
|
-
description: any;
|
|
78
|
-
priceDescriptionEnabled: any;
|
|
79
|
-
infoPricingText: any;
|
|
80
|
-
priceStructure: any;
|
|
81
|
-
} | undefined;
|
|
82
|
-
}
|
|
83
|
-
export {};
|
|
1
|
+
interface FormulaModel {
|
|
2
|
+
operator: string;
|
|
3
|
+
values: number[];
|
|
4
|
+
}
|
|
5
|
+
interface PricingRulePropertyModel {
|
|
6
|
+
propertyID: number;
|
|
7
|
+
functionName: string;
|
|
8
|
+
}
|
|
9
|
+
interface IContext {
|
|
10
|
+
sides: any;
|
|
11
|
+
items: any;
|
|
12
|
+
design: MPlaza.Design;
|
|
13
|
+
rule: any;
|
|
14
|
+
}
|
|
15
|
+
export declare class DesignPriceCalculatorRuleFactory {
|
|
16
|
+
static create: (product: any, apiUrl?: string, token?: string, isOwin?: boolean, cloudFlareApiUrl?: string, clientLang?: string) => Promise<DesignPriceCalculatorRuleBased>;
|
|
17
|
+
}
|
|
18
|
+
export declare class DesignPriceCalculatorRuleBased {
|
|
19
|
+
colorID: number;
|
|
20
|
+
private product?;
|
|
21
|
+
private pricings?;
|
|
22
|
+
private pricing?;
|
|
23
|
+
private properties?;
|
|
24
|
+
private config;
|
|
25
|
+
constructor(apiUrl?: string, token?: string, isOwin?: boolean, cloudFlareApiUrl?: string, clientLang?: string);
|
|
26
|
+
init: (product: any) => Promise<void>;
|
|
27
|
+
getPricings: (product: any, callback: (pricings: any, properties?: PricingRulePropertyModel[]) => void) => Promise<void>;
|
|
28
|
+
getPricing: (design: any) => any;
|
|
29
|
+
distinct: (value: any, index: any, self: any) => boolean;
|
|
30
|
+
ElementSizeFunction: (pContext: any, formula: FormulaModel) => {
|
|
31
|
+
result: boolean;
|
|
32
|
+
multiplier: number;
|
|
33
|
+
items: any;
|
|
34
|
+
};
|
|
35
|
+
NumberOfElementsSimplifiedFunction: (pContext: any, formula: FormulaModel) => {
|
|
36
|
+
result: boolean;
|
|
37
|
+
multiplier: any;
|
|
38
|
+
items: any;
|
|
39
|
+
};
|
|
40
|
+
LinesLengthFunction: (pContext: any, formula: FormulaModel) => any;
|
|
41
|
+
AmountOfElementsFunction: (pContext: any, formula: FormulaModel) => any;
|
|
42
|
+
AmountOfUsedColorsFunction: (pContext: any, formula: FormulaModel) => any;
|
|
43
|
+
PriceByDesignSizeSimplifiedFunction: (pContext: any, formula: FormulaModel) => any;
|
|
44
|
+
PriceByAreaSimplifiedFunction: (pContext: any, formula: FormulaModel) => any;
|
|
45
|
+
CanvasSizeFunction: (pContext: IContext, formula: FormulaModel) => any;
|
|
46
|
+
DesignSizeFunction: (pContext: any, formula: FormulaModel) => any;
|
|
47
|
+
DesignTextLengthFunction: (pContext: any, formula: FormulaModel) => any;
|
|
48
|
+
CustomizedSidesFunction: (pContext: any, formula: FormulaModel) => any;
|
|
49
|
+
TextLengthFunction: (pContext: any, formula: FormulaModel) => any;
|
|
50
|
+
conditionsToConditionsGroupByFormula: (conditions: any) => {
|
|
51
|
+
formula: string;
|
|
52
|
+
position: any;
|
|
53
|
+
conditions: any[];
|
|
54
|
+
}[];
|
|
55
|
+
getFunctionName: (properties: any, rule: any) => any;
|
|
56
|
+
GetContextForRule: (rule: any, product: any, design: any, sidesOnWhichThePriceIsEnabled: any, attributeMatchColorId?: number | null) => IContext;
|
|
57
|
+
isUsingAmountOfColors: (printTypeID: number) => boolean;
|
|
58
|
+
getPremiumPhotosPrice: (design: any, quantity: number) => number;
|
|
59
|
+
/**
|
|
60
|
+
* Get Image Price
|
|
61
|
+
*
|
|
62
|
+
* Metodo che calcola il prezzo per le immagini nel design a cui a backoffice
|
|
63
|
+
* è stato valorizzato un prezzo
|
|
64
|
+
*
|
|
65
|
+
* @author f.checchia
|
|
66
|
+
*
|
|
67
|
+
* @param design Il design in input
|
|
68
|
+
* @param {number} quantity La quantità del prodotto che si sta acquistando
|
|
69
|
+
*
|
|
70
|
+
* @return {number} Il prezzo complessivo delle immagini per la quantità
|
|
71
|
+
*
|
|
72
|
+
* */
|
|
73
|
+
getImagePrice: (design: any, quantity: number) => number;
|
|
74
|
+
getMatchedConditions: (design: any, quantity: number, includePercentage: boolean, attributeMatchColorId?: number | null) => any;
|
|
75
|
+
calculate: (design: any, quantity: number, attributeMatchColorId?: number | null, isPricingAdvancedEnabled?: boolean) => number;
|
|
76
|
+
getPricingAdditionalInfo: (printTypeID: number) => {
|
|
77
|
+
description: any;
|
|
78
|
+
priceDescriptionEnabled: any;
|
|
79
|
+
infoPricingText: any;
|
|
80
|
+
priceStructure: any;
|
|
81
|
+
} | undefined;
|
|
82
|
+
}
|
|
83
|
+
export {};
|