@feedmepos/mf-common 0.0.10 → 0.26.0

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 (121) hide show
  1. package/README.md +18 -31
  2. package/dist/App.vue.d.ts +19 -5
  3. package/dist/App.vue.d.ts.map +1 -0
  4. package/dist/CustomAttributesForm-84d67123.js +96 -0
  5. package/dist/Entry.vue.d.ts +3 -0
  6. package/dist/Entry.vue.d.ts.map +1 -0
  7. package/dist/ItemSelector-0ef7086f.js +24797 -0
  8. package/dist/RestaurantSelector-065f80f3.js +218 -0
  9. package/dist/api/index.d.ts +54 -3
  10. package/dist/api/index.d.ts.map +1 -0
  11. package/dist/api/menu.d.ts +7 -0
  12. package/dist/api/menu.d.ts.map +1 -0
  13. package/dist/app-7518a4c8.js +41042 -0
  14. package/dist/app-9575c6c7.js +7846 -0
  15. package/dist/app.d.ts +703 -1326
  16. package/dist/app.d.ts.map +1 -0
  17. package/dist/app.js +37 -16301
  18. package/dist/components/AllBusinessDialog.vue.d.ts +17 -0
  19. package/dist/components/AllBusinessDialog.vue.d.ts.map +1 -0
  20. package/dist/components/ChangePassword/ConfirmPassword.vue.d.ts +3 -0
  21. package/dist/components/ChangePassword/ConfirmPassword.vue.d.ts.map +1 -0
  22. package/dist/components/ChangePassword/NewPassword.vue.d.ts +3 -0
  23. package/dist/components/ChangePassword/NewPassword.vue.d.ts.map +1 -0
  24. package/dist/components/ChangePassword/PasswordField.vue.d.ts +15 -0
  25. package/dist/components/ChangePassword/PasswordField.vue.d.ts.map +1 -0
  26. package/dist/components/DebugUserDialog.vue.d.ts +3 -0
  27. package/dist/components/DebugUserDialog.vue.d.ts.map +1 -0
  28. package/dist/components/FeedmeLogo.vue.d.ts +3 -0
  29. package/dist/components/FeedmeLogo.vue.d.ts.map +1 -0
  30. package/dist/components/ItemSelector.vue.d.ts +46 -0
  31. package/dist/components/ItemSelector.vue.d.ts.map +1 -0
  32. package/dist/components/ManageAccountDialog.vue.d.ts +15 -0
  33. package/dist/components/ManageAccountDialog.vue.d.ts.map +1 -0
  34. package/dist/components/MyBusinessDialog.vue.d.ts +15 -0
  35. package/dist/components/MyBusinessDialog.vue.d.ts.map +1 -0
  36. package/dist/components/NoPermission.vue.d.ts +3 -0
  37. package/dist/components/NoPermission.vue.d.ts.map +1 -0
  38. package/dist/components/PermissionWrapper.vue.d.ts +10 -0
  39. package/dist/components/PermissionWrapper.vue.d.ts.map +1 -0
  40. package/dist/components/Portal/Ads.vue.d.ts +16 -0
  41. package/dist/components/Portal/Ads.vue.d.ts.map +1 -0
  42. package/dist/components/Portal/BusinessDialogMobile.vue.d.ts +17 -0
  43. package/dist/components/Portal/BusinessDialogMobile.vue.d.ts.map +1 -0
  44. package/dist/components/Portal/PortalDesktop.vue.d.ts +34 -0
  45. package/dist/components/Portal/PortalDesktop.vue.d.ts.map +1 -0
  46. package/dist/components/Portal/PortalMobile.vue.d.ts +34 -0
  47. package/dist/components/Portal/PortalMobile.vue.d.ts.map +1 -0
  48. package/dist/components/Portal/PortalSidebar.vue.d.ts +3 -0
  49. package/dist/components/Portal/PortalSidebar.vue.d.ts.map +1 -0
  50. package/dist/components/Portal/PortalTablet.vue.d.ts +33 -0
  51. package/dist/components/Portal/PortalTablet.vue.d.ts.map +1 -0
  52. package/dist/components/Portal/index.d.ts +28 -0
  53. package/dist/components/Portal/index.d.ts.map +1 -0
  54. package/dist/components/Portal/index.vue.d.ts +40 -0
  55. package/dist/components/Portal/index.vue.d.ts.map +1 -0
  56. package/dist/components/RestaurantSelector.vue.d.ts +48 -0
  57. package/dist/components/RestaurantSelector.vue.d.ts.map +1 -0
  58. package/dist/components/SelectCountryDialog.vue.d.ts +93 -0
  59. package/dist/components/SelectCountryDialog.vue.d.ts.map +1 -0
  60. package/dist/components/UserInfo/ProfileMenuItem.vue.d.ts +25 -0
  61. package/dist/components/UserInfo/ProfileMenuItem.vue.d.ts.map +1 -0
  62. package/dist/components/UserInfo/index.vue.d.ts +72 -0
  63. package/dist/components/UserInfo/index.vue.d.ts.map +1 -0
  64. package/dist/components/attribute/CustomAttributesForm.vue.d.ts +25 -0
  65. package/dist/components/attribute/CustomAttributesForm.vue.d.ts.map +1 -0
  66. package/dist/components/attribute/MongoQueryBuilder.vue.d.ts +22 -0
  67. package/dist/components/attribute/MongoQueryBuilder.vue.d.ts.map +1 -0
  68. package/dist/components/attribute/OptionChip.vue.d.ts +16 -0
  69. package/dist/components/attribute/OptionChip.vue.d.ts.map +1 -0
  70. package/dist/composables/filterSelector.d.ts +13 -0
  71. package/dist/composables/filterSelector.d.ts.map +1 -0
  72. package/dist/composables/search.d.ts +6 -0
  73. package/dist/composables/search.d.ts.map +1 -0
  74. package/dist/composables/useDebugUser.d.ts +6 -0
  75. package/dist/composables/useDebugUser.d.ts.map +1 -0
  76. package/dist/composables/useLocale.d.ts +27 -0
  77. package/dist/composables/useLocale.d.ts.map +1 -0
  78. package/dist/composables/usePaginatedBusinesses.d.ts +145 -0
  79. package/dist/composables/usePaginatedBusinesses.d.ts.map +1 -0
  80. package/dist/favicon.ico +0 -0
  81. package/dist/locales/en-US.json +33 -0
  82. package/dist/locales/th-TH.json +33 -0
  83. package/dist/locales/types.d.ts +104 -0
  84. package/dist/locales/zh-CN.json +33 -0
  85. package/dist/logo.svg +15 -0
  86. package/dist/main.d.ts +2 -1
  87. package/dist/main.d.ts.map +1 -0
  88. package/dist/object-27ce045b.js +16 -0
  89. package/dist/permission/permission.d.ts +107 -0
  90. package/dist/permission/permission.d.ts.map +1 -0
  91. package/dist/plugin/loading.d.ts +18 -0
  92. package/dist/plugin/loading.d.ts.map +1 -0
  93. package/dist/router/index.d.ts +3 -0
  94. package/dist/router/index.d.ts.map +1 -0
  95. package/dist/router/query.d.ts +3 -0
  96. package/dist/router/query.d.ts.map +1 -0
  97. package/dist/store.d.ts +13951 -301
  98. package/dist/store.d.ts.map +1 -0
  99. package/dist/stores/menu.d.ts +7231 -0
  100. package/dist/stores/menu.d.ts.map +1 -0
  101. package/dist/style.css +1 -1
  102. package/dist/tsconfig.app.tsbuildinfo +1 -1
  103. package/dist/utils/businessStorage.d.ts +12 -0
  104. package/dist/utils/businessStorage.d.ts.map +1 -0
  105. package/dist/utils/clipboard.d.ts +2 -0
  106. package/dist/utils/clipboard.d.ts.map +1 -0
  107. package/dist/utils/country.d.ts +11 -0
  108. package/dist/utils/country.d.ts.map +1 -0
  109. package/dist/utils/object.d.ts +2 -0
  110. package/dist/utils/object.d.ts.map +1 -0
  111. package/dist/utils/postMessageMethodCall.d.ts +16 -0
  112. package/dist/utils/postMessageMethodCall.d.ts.map +1 -0
  113. package/dist/utils/storage.d.ts +6 -0
  114. package/dist/utils/storage.d.ts.map +1 -0
  115. package/dist/vite-preset.d.ts +12 -2
  116. package/dist/vite-preset.d.ts.map +1 -0
  117. package/dist/vite-preset.js +89 -47
  118. package/package.json +27 -13
  119. package/dist/FeedmeLogo.vue.d.ts +0 -2
  120. package/dist/UserInfo.vue.d.ts +0 -268
  121. package/dist/auth.d.ts +0 -106
package/README.md CHANGED
@@ -1,46 +1,33 @@
1
- # @feedmepos/mf-nav-bar
1
+ # @feedmepos/mf-common
2
2
 
3
- This template should help get you started developing with Vue 3 in Vite.
3
+ This package provide:
4
4
 
5
- ## Recommended IDE Setup
5
+ - shared portal shell component
6
6
 
7
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
7
+ - shared coreStore pinia store
8
8
 
9
- ## Type Support for `.vue` Imports in TS
9
+ - other shared utilities, like: i18n, country etc
10
10
 
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
11
+ Change log:
12
12
 
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
13
+ ### 1.26.0
14
14
 
15
- 1. Disable the built-in TypeScript Extension
16
- 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
15
+ - upgrade `@feedmepos/i18n` to `0.2.0`, support custom `preProcess` function
19
16
 
20
- ## Customize configuration
17
+ ### 1.25.1
21
18
 
22
- See [Vite Configuration Reference](https://vitejs.dev/config/).
19
+ - add `hide-app-drawer` prop on `FmNavBar`
23
20
 
24
- ## Project Setup
21
+ ### 1.24.0
25
22
 
26
- ```sh
27
- npm install
28
- ```
23
+ - add `showAddon` prop in `ItemSelector` component
29
24
 
30
- ### Compile and Hot-Reload for Development
25
+ ### 1.23.0
31
26
 
32
- ```sh
33
- npm run dev
34
- ```
27
+ - export `Dinero` and `FdoDinero`
35
28
 
36
- ### Type-Check, Compile and Minify for Production
29
+ ### 1.20.1-beta.1
37
30
 
38
- ```sh
39
- npm run build
40
- ```
41
-
42
- ### Lint with [ESLint](https://eslint.org/)
43
-
44
- ```sh
45
- npm run lint
46
- ```
31
+ - Add support for init and using `@feedmepos/vue-client-monitoring` package.
32
+ - `coreStore.pushDataLayer` method
33
+ - `initVueClientMonitoring` method
package/dist/App.vue.d.ts CHANGED
@@ -1,6 +1,20 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2
- "show-apps": (...args: any[]) => void;
3
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
4
- "onShow-apps"?: ((...args: any[]) => any) | undefined;
5
- }, {}, {}>;
1
+ import type { PortalProps } from "@/components/Portal/index";
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Partial<Pick<PortalProps, "hideAppDrawer">>>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Partial<Pick<PortalProps, "hideAppDrawer">>>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
3
+ default?(_: {}): any;
4
+ }>;
6
5
  export default _default;
6
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
7
+ type __VLS_TypePropsToRuntimeProps<T> = {
8
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
9
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
10
+ } : {
11
+ type: import('vue').PropType<T[K]>;
12
+ required: true;
13
+ };
14
+ };
15
+ type __VLS_WithTemplateSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
20
+ //# sourceMappingURL=App.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../../src/App.vue.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAA;;;;AA6JrE,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { defineComponent as _, computed as m, resolveComponent as v, openBlock as c, createElementBlock as p, createVNode as k, toDisplayString as A, unref as N, h as V } from "vue";
2
+ import { n as S, u as C } from "./app-7518a4c8.js";
3
+ import { components as O } from "@feedmepos/ui-library";
4
+ import { c as w } from "./object-27ce045b.js";
5
+ import "pinia";
6
+ import "vue-router";
7
+ const F = { key: 0 }, x = {
8
+ key: 1,
9
+ class: "text-fm-color-neutral-gray-500"
10
+ }, D = /* @__PURE__ */ _({
11
+ __name: "CustomAttributesForm",
12
+ props: {
13
+ entity: {},
14
+ modelValue: {},
15
+ valueOptions: {}
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(d, { emit: f }) {
19
+ const s = d, b = f, { t: l } = S(), a = C();
20
+ function h(t) {
21
+ var o;
22
+ if ((o = s.valueOptions) != null && o[t] && s.valueOptions[t].length > 0)
23
+ return s.valueOptions[t];
24
+ if (s.entity === "restaurant") {
25
+ const e = a.restaurants.value.map((n) => {
26
+ var i;
27
+ return (i = n.customAttributes) == null ? void 0 : i[t];
28
+ }).filter((n) => typeof n == "string" && !!n), r = [...new Set(e)];
29
+ return r.length > 0 ? r : void 0;
30
+ }
31
+ }
32
+ const y = m(() => {
33
+ var t, o;
34
+ return ((o = (t = a.currentBusiness.value) == null ? void 0 : t.attributeSettings) == null ? void 0 : o.filter(
35
+ (e) => e.entity === s.entity
36
+ )) || [];
37
+ }), u = m(() => y.value.map((t) => {
38
+ var e;
39
+ const o = h(t.key);
40
+ return {
41
+ key: t.key,
42
+ type: t.type,
43
+ value: ((e = s.modelValue) == null ? void 0 : e[t.key]) || "",
44
+ options: o
45
+ };
46
+ }) || []), g = [
47
+ {
48
+ header: () => l("portalshell.customAttributes.form.key"),
49
+ accessorKey: "key",
50
+ enableSorting: !1
51
+ },
52
+ {
53
+ header: () => l("portalshell.customAttributes.form.value"),
54
+ accessorKey: "value",
55
+ enableSorting: !1,
56
+ cell: (t) => {
57
+ const o = t.row.original;
58
+ return V(O.FmTextField, {
59
+ modelValue: o.value,
60
+ placeholder: l("portalshell.customAttributes.form.valuePlaceholder"),
61
+ datalist: o.options,
62
+ rules: [
63
+ (e) => o.type === "number" && isNaN(Number(e)) ? l("portalshell.customAttributes.form.attributeValueMustBeNumber") : !0
64
+ ],
65
+ "onUpdate:modelValue": (e) => {
66
+ const r = w(s.modelValue);
67
+ if (r[o.key] = e == null ? void 0 : e.trim(), o.type === "number") {
68
+ if (isNaN(Number(e)))
69
+ return;
70
+ r[o.key] = Number(e);
71
+ }
72
+ Object.keys(r).forEach((n) => {
73
+ r[n] || delete r[n];
74
+ }), b("update:modelValue", r);
75
+ }
76
+ });
77
+ }
78
+ }
79
+ ];
80
+ return (t, o) => {
81
+ const e = v("FmTable");
82
+ return u.value.length > 0 ? (c(), p("div", F, [
83
+ k(e, {
84
+ "column-defs": g,
85
+ "row-data": u.value,
86
+ "shrink-at": !1,
87
+ "page-size": u.value.length,
88
+ "hide-footer": ""
89
+ }, null, 8, ["row-data", "page-size"])
90
+ ])) : (c(), p("p", x, A(N(l)("portalshell.customAttributes.form.noCustomAttributes")), 1));
91
+ };
92
+ }
93
+ });
94
+ export {
95
+ D as default
96
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=Entry.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Entry.vue.d.ts","sourceRoot":"","sources":["../../src/Entry.vue.ts"],"names":[],"mappings":";AAgUA,wBAKG"}