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.
@@ -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,5 @@
1
+ declare enum EnumExtraDisplayMode {
2
+ normal = 1,
3
+ nested = 2
4
+ }
5
+ export default EnumExtraDisplayMode;
@@ -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;
@@ -21,4 +21,5 @@ export const initExtraItem = {
21
21
  oldId: -1,
22
22
  packagingCost: "0.00",
23
23
  weight: 0,
24
+ options: []
24
25
  };
@@ -0,0 +1,6 @@
1
+ export default interface IExtraItemOption {
2
+ id: number;
3
+ title: string;
4
+ price: number;
5
+ }
6
+ export declare const initExtraItemOption: IExtraItemOption;
@@ -0,0 +1,5 @@
1
+ export const initExtraItemOption = {
2
+ id: -1,
3
+ price: 0,
4
+ title: ""
5
+ };
@@ -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;
@@ -47,4 +47,5 @@ export const initGeneralItems = {
47
47
  sendingCommandsTypes: [],
48
48
  splashPageLayoutTypes: [],
49
49
  tableLocationTypes: [],
50
+ relatedExtraDisplayModeType: [],
50
51
  };
@@ -43,5 +43,6 @@ export default interface IPointOfSaleSetting {
43
43
  coloredTiles: boolean;
44
44
  displayImages: boolean;
45
45
  additionalPickupInstructionsTypes: ITextValue[];
46
+ categories: ITextValue[];
46
47
  }
47
48
  export declare const initPointOfSaleSetting: IPointOfSaleSetting;
@@ -42,5 +42,6 @@ export const initPointOfSaleSetting = {
42
42
  additionalPickupInstructions: false,
43
43
  coloredTiles: false,
44
44
  displayImages: false,
45
- additionalPickupInstructionsTypes: []
45
+ additionalPickupInstructionsTypes: [],
46
+ categories: []
46
47
  };
@@ -1,4 +1,5 @@
1
- interface IDProductExtra {
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.12",
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.12\" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.2.14\" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"