@sigmaott/base-next 1.2.6 → 1.2.8

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/nuxt.config.ts CHANGED
@@ -144,16 +144,6 @@ export default defineNuxtConfig({
144
144
  },
145
145
  optimizeDeps: {
146
146
  needsInterop: ['mediainfo.js'],
147
- include: [
148
- "dayjs",
149
- "dayjs/plugin/utc",
150
- "dayjs/plugin/timezone",
151
- "dayjs/plugin/customParseFormat",
152
- 'axios',
153
- 'validator/lib/isIP',
154
- 'validator/lib/isEmail',
155
- 'clipboard'
156
- ],
157
147
  },
158
148
  server: {
159
149
  cors: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sigmaott/base-next",
3
3
  "type": "module",
4
- "version": "1.2.6",
4
+ "version": "1.2.8",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -10,6 +10,7 @@
10
10
  "locales",
11
11
  "src",
12
12
  "public",
13
+ ".npmrc",
13
14
  "nuxt.config.ts",
14
15
  "hyrd-ui.preset.ts",
15
16
  "nuxt-config.ts",
@@ -3,7 +3,7 @@ import '../../assets/global.css'
3
3
  import type { RouteRecordRaw } from 'vue-router'
4
4
  import viVN from 'element-plus/es/locale/lang/vi'
5
5
  import enEN from 'element-plus/es/locale/lang/en'
6
- import { bus } from 'wujie'
6
+ // import { bus } from 'wujie'
7
7
  import GlobalASide from '../DefaultLayout/GlobalASide.vue'
8
8
  import GlobalHeader from '../DefaultLayout/GlobalHeader.vue'
9
9
 
@@ -39,11 +39,11 @@ useProvideLayoutStore({
39
39
  })
40
40
 
41
41
  watch(layoutMode, (newValue, oldValue) => {
42
- bus.$emit('__SET_STATE__', {
43
- meta: {
44
- layoutMode: newValue === 'horizontal' ? 'vertical' : 'horizontal',
45
- },
46
- })
42
+ // bus.$emit('__SET_STATE__', {
43
+ // meta: {
44
+ // layoutMode: newValue === 'horizontal' ? 'vertical' : 'horizontal',
45
+ // },
46
+ // })
47
47
  })
48
48
 
49
49
  // Chunk error
@@ -1 +1 @@
1
- 1752482651170
1
+ 1752483854874
@@ -1,19 +1,19 @@
1
1
  import { deepMerge, p } from '@antfu/utils'
2
- import type { cacheOptions, loadErrorHandler, plugin } from 'wujie'
3
- import type { lifecycle } from 'wujie/esm/sandbox'
2
+ // import type { cacheOptions, loadErrorHandler, plugin } from 'wujie'
3
+ // import type { lifecycle } from 'wujie/esm/sandbox'
4
4
  import { defu } from 'defu'
5
- import { bus, destroyApp, setupApp } from 'wujie'
5
+ // import { bus, destroyApp, setupApp } from 'wujie'
6
6
  export const isSubApp = window.__MICRO_APP_ENVIRONMENT__ ?? window.__POWERED_BY_WUJIE__ ?? false
7
7
 
8
8
  interface Lifecycles {
9
- beforeLoad: lifecycle
10
- beforeMount: lifecycle
11
- afterMount: lifecycle
12
- beforeUnmount: lifecycle
13
- afterUnmount: lifecycle
14
- activated: lifecycle
15
- deactivated: lifecycle
16
- loadError: loadErrorHandler
9
+ beforeLoad: any
10
+ beforeMount: any
11
+ afterMount: any
12
+ beforeUnmount: any
13
+ afterUnmount: any
14
+ activated: any
15
+ deactivated: any
16
+ loadError: any
17
17
  }
18
18
 
19
19
  export interface MenuItem {
@@ -45,7 +45,7 @@ export interface GlobalState extends AppConfig {
45
45
  [key: string]: any
46
46
  }
47
47
 
48
- export interface MicroApp extends cacheOptions {
48
+ export interface MicroApp {
49
49
  preload?: boolean
50
50
  }
51
51
 
@@ -118,14 +118,14 @@ export function registerSigmaApps(
118
118
  window.__SIGMA_STATE__ = defu(appConfig, window.__SIGMA_STATE__) as any
119
119
  window.localStorage.setItem('__SS_LAYOUT_MODE__', window.__SIGMA_STATE__.meta?.layoutMode || 'horizontal')
120
120
 
121
- bus.$on(SigmaMicroEnum.__STATE_CHANGE__, (newState: GlobalState) => {
122
- window.__SIGMA_STATE__ = deepMerge(window.__SIGMA_STATE__, newState) as any
123
- })
121
+ // bus.$on(SigmaMicroEnum.__STATE_CHANGE__, (newState: GlobalState) => {
122
+ // window.__SIGMA_STATE__ = deepMerge(window.__SIGMA_STATE__, newState) as any
123
+ // })
124
124
 
125
- bus.$on(SigmaMicroEnum.__SET_STATE__, (newState: Partial<GlobalState>) => {
126
- window.__SIGMA_STATE__ = deepMerge(window.__SIGMA_STATE__, newState) as any
127
- bus.$emit(SigmaMicroEnum.__STATE_CHANGE__, window.__SIGMA_STATE__)
128
- })
125
+ // bus.$on(SigmaMicroEnum.__SET_STATE__, (newState: Partial<GlobalState>) => {
126
+ // window.__SIGMA_STATE__ = deepMerge(window.__SIGMA_STATE__, newState) as any
127
+ // bus.$emit(SigmaMicroEnum.__STATE_CHANGE__, window.__SIGMA_STATE__)
128
+ // })
129
129
 
130
130
  microApps = registrableApps
131
131
 
@@ -148,19 +148,19 @@ export function registerSigmaApps(
148
148
  .map(async ({ name, url, preload, ...rest }) => {
149
149
  const routes: any[] = []
150
150
  try {
151
- setupApp({
152
- name,
153
- url,
154
- attrs: isProduction ? { src: url } : {},
155
- exec: true,
156
- alive: true,
157
- // fetch: credentialsFetch,
158
- plugins,
159
- // prefix: { "prefix-dialog": "/dialog", "prefix-location": "/location" },
160
- // degrade,
161
- ...rest,
162
- ...lifecycles,
163
- })
151
+ // setupApp({
152
+ // name,
153
+ // url,
154
+ // attrs: isProduction ? { src: url } : {},
155
+ // exec: true,
156
+ // alive: true,
157
+ // // fetch: credentialsFetch,
158
+ // plugins,
159
+ // // prefix: { "prefix-dialog": "/dialog", "prefix-location": "/location" },
160
+ // // degrade,
161
+ // ...rest,
162
+ // ...lifecycles,
163
+ // })
164
164
 
165
165
  // if (preload || window.localStorage.getItem('preload') !== 'false') {
166
166
  // preloadApp({
@@ -180,26 +180,26 @@ export function registerSigmaApps(
180
180
  return { name, url, routes }
181
181
  })
182
182
 
183
- bus.$emit(SigmaMicroEnum.__SET_STATE__, { children: menus })
183
+ // bus.$emit(SigmaMicroEnum.__SET_STATE__, { children: menus })
184
184
  }
185
185
 
186
186
  // getMenu()
187
187
 
188
188
  return {
189
- bus,
190
- setState: (newState: Partial<GlobalState>) => {
191
- bus.$emit(SigmaMicroEnum.__SET_STATE__, newState)
192
- },
193
- onStateChange: (callback: (newState: GlobalState) => void) => {
194
- bus.$on(SigmaMicroEnum.__STATE_CHANGE__, callback)
195
- return () =>
196
- bus.$off(SigmaMicroEnum.__STATE_CHANGE__, () => { })
197
- },
198
- destroy() {
199
- registrableApps.forEach(({ name }) => {
200
- destroyApp(name)
201
- })
202
- },
189
+ // bus,
190
+ // setState: (newState: Partial<GlobalState>) => {
191
+ // bus.$emit(SigmaMicroEnum.__SET_STATE__, newState)
192
+ // },
193
+ // onStateChange: (callback: (newState: GlobalState) => void) => {
194
+ // bus.$on(SigmaMicroEnum.__STATE_CHANGE__, callback)
195
+ // return () =>
196
+ // bus.$off(SigmaMicroEnum.__STATE_CHANGE__, () => { })
197
+ // },
198
+ // destroy() {
199
+ // registrableApps.forEach(({ name }) => {
200
+ // destroyApp(name)
201
+ // })
202
+ // },
203
203
  }
204
204
  }
205
205