meemup-library 1.2.7 → 1.2.9

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.
Files changed (33) hide show
  1. package/dist/controllers/ApiController.d.ts +1 -1
  2. package/dist/controllers/ColorController.d.ts +13 -13
  3. package/dist/controllers/ColorController.js +11 -11
  4. package/dist/controllers/MoneyController.js +4 -1
  5. package/dist/controllers/OrderScreenController.d.ts +5 -5
  6. package/dist/controllers/PrintContentController.js +268 -268
  7. package/dist/controllers/ProductModalController.d.ts +16 -18
  8. package/dist/controllers/ProductModalController.js +6 -4
  9. package/dist/controllers/ZoneController.d.ts +7 -7
  10. package/dist/controllers/ZoneController.js +7 -7
  11. package/dist/index.d.ts +4 -0
  12. package/dist/index.js +4 -0
  13. package/dist/interfaces/IExtra.d.ts +2 -2
  14. package/dist/interfaces/IExtra.js +16 -1
  15. package/dist/interfaces/IExtraItem.d.ts +2 -0
  16. package/dist/interfaces/IExtraItem.js +3 -1
  17. package/dist/interfaces/IPointOfSaleLocalSetting.js +1 -2
  18. package/dist/interfaces/IProduct.d.ts +2 -1
  19. package/dist/interfaces/IProductExtra.d.ts +3 -9
  20. package/dist/interfaces/IProductExtra.js +3 -1
  21. package/dist/interfaces/ISelectedExtraItem.d.ts +2 -2
  22. package/dist/interfaces/ISelectedProductExtra.js +1 -3
  23. package/dist/interfaces/IStore.d.ts +4 -4
  24. package/dist/interfaces/database/{IDProductDefaultExtra.d.ts → IProductDefaultExtra.d.ts} +2 -2
  25. package/dist/types/TBaseExtra.d.ts +2 -2
  26. package/package.json +29 -29
  27. package/dist/interfaces/database/IDExtra.d.ts +0 -16
  28. package/dist/interfaces/database/IDExtraItem.d.ts +0 -20
  29. package/dist/interfaces/database/IDExtraItem.js +0 -1
  30. package/dist/interfaces/database/IDProduct.d.ts +0 -57
  31. package/dist/interfaces/database/IDProduct.js +0 -1
  32. package/dist/interfaces/database/IDProductDefaultExtra.js +0 -1
  33. /package/dist/interfaces/database/{IDExtra.js → IProductDefaultExtra.js} +0 -0
@@ -5,7 +5,6 @@ import IDriverAccount from "../interfaces/IDriverAccount";
5
5
  export default class ApiController {
6
6
  account: IAccount | IDriverAccount;
7
7
  constructor(account: IAccount | IDriverAccount);
8
- private getCompanyId;
9
8
  defaultHeader(authorization?: boolean): Promise<{
10
9
  Authorization?: string | undefined;
11
10
  companyId: string;
@@ -18,4 +17,5 @@ export default class ApiController {
18
17
  getWithAuth(url: string, header?: any): Promise<IAnswer>;
19
18
  get(url: string, header?: any): Promise<IAnswer>;
20
19
  deleteWithAuth(url: string, header?: any): Promise<IAnswer>;
20
+ private getCompanyId;
21
21
  }
@@ -1,5 +1,5 @@
1
1
  import IPointOfSaleSetting from "../interfaces/IPointOfSaleSetting";
2
- import IDProduct from "../interfaces/database/IDProduct";
2
+ import IProduct from "../interfaces/IProduct";
3
3
  /**
4
4
  * کلاس ColorController برای مدیریت رنگ‌ها و تولید رنگ متن بر اساس رنگ پس زمینه استفاده می‌شود.
5
5
  */
@@ -11,10 +11,10 @@ declare class ColorController {
11
11
  */
12
12
  generateContrastColorForHex(background_color: string): string;
13
13
  /**
14
- * متد generateContrastColorForRgba برای تولید رنگ متن بر اساس رنگ پس زمینه به صورت RGBA استفاده می‌شود.
15
- * @param rgba_color رنگ پس زمینه به صورت RGBA (رنگ، سبز، آبی، شفافیت).
16
- * @returns رنگ متن متناسب (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
17
- */
14
+ * متد generateContrastColorForRgba برای تولید رنگ متن بر اساس رنگ پس زمینه به صورت RGBA استفاده می‌شود.
15
+ * @param rgba_color رنگ پس زمینه به صورت RGBA (رنگ، سبز، آبی، شفافیت).
16
+ * @returns رنگ متن متناسب (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
17
+ */
18
18
  generateContrastColorForRgba(rgba_color: string): string;
19
19
  /**
20
20
  * متد generateContrastColorForRgb برای تولید رنگ متن بر اساس رنگ پس زمینه به صورت RGB استفاده می‌شود.
@@ -23,15 +23,15 @@ declare class ColorController {
23
23
  */
24
24
  generateContrastColorForRgb(rgb_color: string): string;
25
25
  /**
26
- * متد generateContrastColorForBackground برای تولید رنگ متن بر اساس رنگ پس زمینه مورد نظر استفاده می‌شود.
27
- * اگر رنگ پس زمینه null یا "transparent" باشد، رنگ متن #000000 (سیاه) برگردانده می‌شود.
28
- * در غیر این صورت، از سه متد generateContrastColorForRgb و generateContrastColorForRgba و generateContrastColorForHex برای تولید رنگ متن استفاده می‌شود.
29
- * اگر در هیچکدام از سه متد مورد نظر نگنجید، رنگ متن #000000 (سیاه) برگردانده می‌شود.
30
- * @param background_color رنگ پس زمینه به هر فرمتی که می‌تواند string یا null باشد.
31
- * @returns رنگ متن متناظر (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
32
- */
26
+ * متد generateContrastColorForBackground برای تولید رنگ متن بر اساس رنگ پس زمینه مورد نظر استفاده می‌شود.
27
+ * اگر رنگ پس زمینه null یا "transparent" باشد، رنگ متن #000000 (سیاه) برگردانده می‌شود.
28
+ * در غیر این صورت، از سه متد generateContrastColorForRgb و generateContrastColorForRgba و generateContrastColorForHex برای تولید رنگ متن استفاده می‌شود.
29
+ * اگر در هیچکدام از سه متد مورد نظر نگنجید، رنگ متن #000000 (سیاه) برگردانده می‌شود.
30
+ * @param background_color رنگ پس زمینه به هر فرمتی که می‌تواند string یا null باشد.
31
+ * @returns رنگ متن متناظر (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
32
+ */
33
33
  generateContrastColorForBackground(background_color: string | null, default_text_color?: string): string;
34
- generateColorForPosProduct(product: IDProduct, setting: IPointOfSaleSetting, defaultBackgroundColor: any, defaultTextColor: any): {
34
+ generateColorForPosProduct(product: IProduct, setting: IPointOfSaleSetting, defaultBackgroundColor: any, defaultTextColor: any): {
35
35
  backgroundColor: any;
36
36
  textColor: any;
37
37
  };
@@ -20,10 +20,10 @@ class ColorController {
20
20
  return text_color;
21
21
  }
22
22
  /**
23
- * متد generateContrastColorForRgba برای تولید رنگ متن بر اساس رنگ پس زمینه به صورت RGBA استفاده می‌شود.
24
- * @param rgba_color رنگ پس زمینه به صورت RGBA (رنگ، سبز، آبی، شفافیت).
25
- * @returns رنگ متن متناسب (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
26
- */
23
+ * متد generateContrastColorForRgba برای تولید رنگ متن بر اساس رنگ پس زمینه به صورت RGBA استفاده می‌شود.
24
+ * @param rgba_color رنگ پس زمینه به صورت RGBA (رنگ، سبز، آبی، شفافیت).
25
+ * @returns رنگ متن متناسب (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
26
+ */
27
27
  generateContrastColorForRgba(rgba_color) {
28
28
  var _a;
29
29
  // استخراج مقادیر R، G، B از RGBA
@@ -56,13 +56,13 @@ class ColorController {
56
56
  return text_color;
57
57
  }
58
58
  /**
59
- * متد generateContrastColorForBackground برای تولید رنگ متن بر اساس رنگ پس زمینه مورد نظر استفاده می‌شود.
60
- * اگر رنگ پس زمینه null یا "transparent" باشد، رنگ متن #000000 (سیاه) برگردانده می‌شود.
61
- * در غیر این صورت، از سه متد generateContrastColorForRgb و generateContrastColorForRgba و generateContrastColorForHex برای تولید رنگ متن استفاده می‌شود.
62
- * اگر در هیچکدام از سه متد مورد نظر نگنجید، رنگ متن #000000 (سیاه) برگردانده می‌شود.
63
- * @param background_color رنگ پس زمینه به هر فرمتی که می‌تواند string یا null باشد.
64
- * @returns رنگ متن متناظر (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
65
- */
59
+ * متد generateContrastColorForBackground برای تولید رنگ متن بر اساس رنگ پس زمینه مورد نظر استفاده می‌شود.
60
+ * اگر رنگ پس زمینه null یا "transparent" باشد، رنگ متن #000000 (سیاه) برگردانده می‌شود.
61
+ * در غیر این صورت، از سه متد generateContrastColorForRgb و generateContrastColorForRgba و generateContrastColorForHex برای تولید رنگ متن استفاده می‌شود.
62
+ * اگر در هیچکدام از سه متد مورد نظر نگنجید، رنگ متن #000000 (سیاه) برگردانده می‌شود.
63
+ * @param background_color رنگ پس زمینه به هر فرمتی که می‌تواند string یا null باشد.
64
+ * @returns رنگ متن متناظر (به صورت hex) که برای نمایش بر روی رنگ پس زمینه انتخاب شده است.
65
+ */
66
66
  generateContrastColorForBackground(background_color, default_text_color = "#000") {
67
67
  // اگر رنگ پس زمینه null یا "transparent" باشد، رنگ سیاه را برگردانید
68
68
  if (background_color === null || background_color.trim().toLowerCase() === "transparent") {
@@ -23,7 +23,10 @@ export default new class MoneyController {
23
23
  };
24
24
  }
25
25
  format(money, currency = "$", preText = "") {
26
- return `${preText}${currency}${Intl.NumberFormat("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(this.round(money))}`;
26
+ return `${preText}${currency}${Intl.NumberFormat("en-US", {
27
+ minimumFractionDigits: 2,
28
+ maximumFractionDigits: 2
29
+ }).format(this.round(money))}`;
27
30
  }
28
31
  sum(values) {
29
32
  let sum = 0;
@@ -1,14 +1,14 @@
1
1
  import IOrderScreenState from "../interfaces/IOrderScreenState";
2
2
  import EnumOrderType from "../enums/EnumOrderType";
3
3
  import IOrderItem from "../interfaces/order/IOrderItem";
4
- import IDProduct from "../interfaces/database/IDProduct";
5
4
  import ICategory from "../interfaces/ICategory";
5
+ import IProduct from "../interfaces/IProduct";
6
6
  declare const _default: {
7
7
  checkDayWeek: (index: number, weekDays: number) => boolean;
8
8
  fetchCategories(categories: ICategory[]): ICategory[];
9
- fetchProducts(arg: IOrderScreenState, products: IDProduct[], categories: ICategory[]): IDProduct[];
10
- searchProduct(products: IDProduct[], word: string): IDProduct[];
11
- productPrice(product: IDProduct, orderType: EnumOrderType): number;
12
- productCountInOrder(product: IDProduct, items: IOrderItem[]): number;
9
+ fetchProducts(arg: IOrderScreenState, products: IProduct[], categories: ICategory[]): IProduct[];
10
+ searchProduct(products: IProduct[], word: string): IProduct[];
11
+ productPrice(product: IProduct, orderType: EnumOrderType): number;
12
+ productCountInOrder(product: IProduct, items: IOrderItem[]): number;
13
13
  };
14
14
  export default _default;