meemup-library 1.2.10 → 1.2.12
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.
|
@@ -31,7 +31,7 @@ declare class ColorController {
|
|
|
31
31
|
* @returns رنگ متن متناظر (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
|
|
32
32
|
*/
|
|
33
33
|
generateContrastColorForBackground(background_color: string | null, default_text_color?: string): string;
|
|
34
|
-
generateColorForPosProduct(product: IProduct,
|
|
34
|
+
generateColorForPosProduct(product: IProduct, coloredTiles: boolean, defaultBackgroundColor: any, defaultTextColor: any): {
|
|
35
35
|
backgroundColor: any;
|
|
36
36
|
textColor: any;
|
|
37
37
|
};
|
|
@@ -86,10 +86,10 @@ class ColorController {
|
|
|
86
86
|
// اگر هیچکدام از فرمتهای بالا نبود، رنگ سیاه را برگردانید
|
|
87
87
|
return default_text_color;
|
|
88
88
|
}
|
|
89
|
-
generateColorForPosProduct(product,
|
|
89
|
+
generateColorForPosProduct(product, coloredTiles, defaultBackgroundColor, defaultTextColor) {
|
|
90
90
|
let textColor = defaultTextColor;
|
|
91
91
|
let backgroundColor = defaultBackgroundColor;
|
|
92
|
-
if (
|
|
92
|
+
if (coloredTiles) {
|
|
93
93
|
textColor = this.generateContrastColorForBackground(product.color, defaultTextColor);
|
|
94
94
|
backgroundColor = textColor === defaultTextColor ? defaultBackgroundColor : product.color;
|
|
95
95
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import IDProductDefaultExtraItem from "./IDProductDefaultExtraItem";
|
|
2
2
|
interface IProductDefaultExtra {
|
|
3
3
|
extraId: number;
|
|
4
|
+
secondExtraId: number | null;
|
|
5
|
+
secondExtraItemId: number | null;
|
|
4
6
|
items: IDProductDefaultExtraItem[];
|
|
5
7
|
}
|
|
6
8
|
export default IProductDefaultExtra;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
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.12\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|