@jetthai/cuora 1.1.221-layout-1 → 1.1.222

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/CHANGELOG.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.1.221-layout-1](https://github.com/jetthai/cuora-module/compare/v1.1.221-layout...v1.1.221-layout-1) (2024-02-06)
6
-
7
- ### [1.1.221-layout](https://github.com/jetthai/cuora-module/compare/v1.1.221...v1.1.221-layout) (2024-02-02)
5
+ ### [1.1.222](https://github.com/jetthai/cuora-module/compare/v1.1.221...v1.1.222) (2024-02-01)
8
6
 
9
7
  ### [1.1.221](https://github.com/jetthai/cuora-module/compare/v1.1.220...v1.1.221) (2024-01-23)
10
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.221-layout-1",
3
+ "version": "1.1.222",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/common.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  getConfig: ({ appSecret }) => ({ url: 'getConfig', method: 'get', params: { appSecret }, isPublic: true }),
3
- getLayoutConfig: ({ appSecret }) => ({ url: 'getQuickLayout', method: 'get', params: { appSecret }, isPublic: true }),
3
+ getQuickLayout: ({ appSecret }) => ({ url: 'getQuickLayout', method: 'get', params: { appSecret }, isPublic: true }),
4
4
  feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
5
5
  broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
6
6
  getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
@@ -29,7 +29,7 @@ export default function (request) {
29
29
  },
30
30
  paymentMethods: {},
31
31
  },
32
- layoutConfig: null,
32
+ quickConfig: [],
33
33
  userAgent: '',
34
34
  isMobile: false,
35
35
  announcementList: null,
@@ -160,11 +160,11 @@ export default function (request) {
160
160
  },
161
161
  actions: {
162
162
  setConfig: assign((context, event) => {
163
- const { siteConfig, layoutConfig } = event.data
163
+ const { siteConfig, quickConfig } = event.data
164
164
  const { loginMethods = {}, registerMethods = {} } = siteConfig
165
165
  return {
166
166
  siteConfig: { ...siteConfig, loginMethods: pickBy(loginMethods), registerMethods: pickBy(registerMethods) },
167
- layoutConfig,
167
+ quickConfig,
168
168
  }
169
169
  }),
170
170
  setUA: assign((context, event) => {
@@ -269,8 +269,8 @@ export default function (request) {
269
269
  },
270
270
  services: {
271
271
  fetchConfig: async (context, event) => {
272
- const [site, layout] = await Promise.all([request.send(api.getConfig({ appSecret })), request.send(api.getLayoutConfig({ appSecret }))])
273
- return { siteConfig: JSON.parse(window.atob(site.config)), layoutConfig: JSON.parse(window.atob(layout.config)) }
272
+ const [config, quick] = await Promise.all([request.send(api.getConfig({ appSecret })), request.send(api.getQuickLayout({ appSecret }))])
273
+ return { siteConfig: JSON.parse(window.atob(config)), quickConfig: JSON.parse(window.atob(quick)) }
274
274
  },
275
275
  fetchFeeds: async (context, event) => {
276
276
  return await request.send(api.feeds({ appSecret }))