meemup-library 1.2.12 → 1.2.14
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/controllers/ColorController.d.ts +4 -0
- package/dist/controllers/ColorController.js +9 -0
- package/dist/controllers/ProductModalController.js +4 -2
- package/dist/enums/EnumExtraDisplayMode.d.ts +5 -0
- package/dist/enums/EnumExtraDisplayMode.js +6 -0
- package/dist/interfaces/IExtraItem.d.ts +2 -0
- package/dist/interfaces/IExtraItem.js +1 -0
- package/dist/interfaces/IExtraItemOption.d.ts +6 -0
- package/dist/interfaces/IExtraItemOption.js +5 -0
- package/dist/interfaces/IGeneralItems.d.ts +1 -0
- package/dist/interfaces/IGeneralItems.js +1 -0
- package/dist/interfaces/IPointOfSaleSetting.d.ts +1 -0
- package/dist/interfaces/IPointOfSaleSetting.js +2 -1
- package/dist/interfaces/database/IDProductExtra.d.ts +3 -2
- package/dist/interfaces/database/IDProductExtra.js +3 -1
- package/package.json +2 -2
|
@@ -31,6 +31,10 @@ declare class ColorController {
|
|
|
31
31
|
* @returns رنگ متن متناظر (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
|
|
32
32
|
*/
|
|
33
33
|
generateContrastColorForBackground(background_color: string | null, default_text_color?: string): string;
|
|
34
|
+
generateColorForPos(color: string | null, coloredTiles: boolean, defaultBackgroundColor: any, defaultTextColor: any): {
|
|
35
|
+
backgroundColor: any;
|
|
36
|
+
textColor: any;
|
|
37
|
+
};
|
|
34
38
|
generateColorForPosProduct(product: IProduct, coloredTiles: boolean, defaultBackgroundColor: any, defaultTextColor: any): {
|
|
35
39
|
backgroundColor: any;
|
|
36
40
|
textColor: any;
|
|
@@ -86,6 +86,15 @@ class ColorController {
|
|
|
86
86
|
// اگر هیچکدام از فرمتهای بالا نبود، رنگ سیاه را برگردانید
|
|
87
87
|
return default_text_color;
|
|
88
88
|
}
|
|
89
|
+
generateColorForPos(color, coloredTiles, defaultBackgroundColor, defaultTextColor) {
|
|
90
|
+
let textColor = defaultTextColor;
|
|
91
|
+
let backgroundColor = defaultBackgroundColor;
|
|
92
|
+
if (coloredTiles) {
|
|
93
|
+
textColor = this.generateContrastColorForBackground(color, defaultTextColor);
|
|
94
|
+
backgroundColor = textColor === defaultTextColor ? defaultBackgroundColor : color;
|
|
95
|
+
}
|
|
96
|
+
return { backgroundColor, textColor };
|
|
97
|
+
}
|
|
89
98
|
generateColorForPosProduct(product, coloredTiles, defaultBackgroundColor, defaultTextColor) {
|
|
90
99
|
let textColor = defaultTextColor;
|
|
91
100
|
let backgroundColor = defaultBackgroundColor;
|
|
@@ -212,7 +212,8 @@ export default new class ProductModalController {
|
|
|
212
212
|
color: extraItemModel.color,
|
|
213
213
|
oldId: extraItemModel.oldId,
|
|
214
214
|
packagingCost: extraItemModel.packagingCost,
|
|
215
|
-
weight: extraItemModel.weight
|
|
215
|
+
weight: extraItemModel.weight,
|
|
216
|
+
options: extraItemModel.options
|
|
216
217
|
});
|
|
217
218
|
}
|
|
218
219
|
});
|
|
@@ -226,7 +227,8 @@ export default new class ProductModalController {
|
|
|
226
227
|
showType: item.showType,
|
|
227
228
|
availableTypeText: item.availableTypeText,
|
|
228
229
|
secondExtraItemId: item.secondExtraItemId,
|
|
229
|
-
availableType: item.availableType
|
|
230
|
+
availableType: item.availableType,
|
|
231
|
+
relatedExtraDisplayMode: item.relatedExtraDisplayMode
|
|
230
232
|
};
|
|
231
233
|
list.push(newItem);
|
|
232
234
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var EnumExtraDisplayMode;
|
|
2
|
+
(function (EnumExtraDisplayMode) {
|
|
3
|
+
EnumExtraDisplayMode[EnumExtraDisplayMode["normal"] = 1] = "normal";
|
|
4
|
+
EnumExtraDisplayMode[EnumExtraDisplayMode["nested"] = 2] = "nested";
|
|
5
|
+
})(EnumExtraDisplayMode || (EnumExtraDisplayMode = {}));
|
|
6
|
+
export default EnumExtraDisplayMode;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import IExtraItemOption from "./IExtraItemOption";
|
|
1
2
|
interface IExtraItem {
|
|
2
3
|
id: number;
|
|
3
4
|
title: string;
|
|
@@ -21,6 +22,7 @@ interface IExtraItem {
|
|
|
21
22
|
oldId: number;
|
|
22
23
|
packagingCost: string;
|
|
23
24
|
weight: number;
|
|
25
|
+
options: IExtraItemOption[];
|
|
24
26
|
}
|
|
25
27
|
export declare const initExtraItem: IExtraItem;
|
|
26
28
|
export default IExtraItem;
|
|
@@ -48,5 +48,6 @@ export default interface IGeneralItems {
|
|
|
48
48
|
orderArrangeFieldItems: ITextValue[];
|
|
49
49
|
orderArrangeSortItems: ITextValue[];
|
|
50
50
|
customerMandatoryTypes: ITextValue[];
|
|
51
|
+
relatedExtraDisplayModeType: ITextValue[];
|
|
51
52
|
}
|
|
52
53
|
export declare const initGeneralItems: IGeneralItems;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import EnumExtraDisplayMode from "../../enums/EnumExtraDisplayMode";
|
|
2
|
+
export default interface IDProductExtra {
|
|
2
3
|
extraId: number;
|
|
3
4
|
availableType: number;
|
|
4
5
|
showType: number;
|
|
@@ -7,6 +8,6 @@ interface IDProductExtra {
|
|
|
7
8
|
secondExtraId: number | null;
|
|
8
9
|
secondExtraItemId: number | null;
|
|
9
10
|
priority: number;
|
|
11
|
+
relatedExtraDisplayMode: EnumExtraDisplayMode;
|
|
10
12
|
}
|
|
11
13
|
export declare const initDProductExtra: IDProductExtra;
|
|
12
|
-
export default IDProductExtra;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import EnumExtraDisplayMode from "../../enums/EnumExtraDisplayMode";
|
|
1
2
|
export const initDProductExtra = {
|
|
2
3
|
extraId: -1,
|
|
3
4
|
availableType: 1,
|
|
@@ -6,5 +7,6 @@ export const initDProductExtra = {
|
|
|
6
7
|
showTypeText: "",
|
|
7
8
|
secondExtraId: null,
|
|
8
9
|
secondExtraItemId: null,
|
|
9
|
-
priority: 0
|
|
10
|
+
priority: 0,
|
|
11
|
+
relatedExtraDisplayMode: EnumExtraDisplayMode.normal
|
|
10
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"remove:one": "rimraf dist",
|
|
12
12
|
"remove:two": "rimraf ./src/dist",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"commit": "git add . && git commit -m \"version.1.2.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.2.14\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|