@mpxjs/core 2.9.58 → 2.9.62
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/@types/index.d.ts +28 -47
- package/package.json +15 -3
- package/src/convertor/wxToReact.js +1 -1
- package/src/core/innerLifecycle.js +2 -0
- package/src/core/mergeOptions.js +1 -1
- package/src/core/proxy.js +26 -7
- package/src/index.js +10 -7
- package/src/platform/builtInMixins/directiveHelperMixin.ios.js +1 -7
- package/src/platform/builtInMixins/refsMixin.ios.js +6 -4
- package/src/platform/builtInMixins/styleHelperMixin.ios.js +14 -10
- package/src/platform/createApp.ios.js +17 -14
- package/src/platform/patch/react/getDefaultOptions.ios.js +78 -61
- package/src/platform/patch/wx/lifecycle.js +10 -3
package/@types/index.d.ts
CHANGED
|
@@ -34,17 +34,17 @@ type Data = object | (() => object)
|
|
|
34
34
|
export type PropType<T> = {
|
|
35
35
|
__type: T
|
|
36
36
|
} & (
|
|
37
|
-
|
|
37
|
+
T extends String
|
|
38
38
|
? StringConstructor
|
|
39
39
|
: T extends number
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
? NumberConstructor
|
|
41
|
+
: T extends boolean
|
|
42
|
+
? BooleanConstructor
|
|
43
|
+
: T extends any[]
|
|
44
|
+
? ArrayConstructor
|
|
45
|
+
: T extends object
|
|
46
|
+
? ObjectConstructor
|
|
47
|
+
: never
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
type FullPropType<T> = {
|
|
@@ -85,10 +85,10 @@ type GetDataType<T> = T extends () => any ? ReturnType<T> : T
|
|
|
85
85
|
|
|
86
86
|
type GetPropsType<T extends Properties> = {
|
|
87
87
|
readonly [K in keyof T]: T[K] extends FullPropType<infer V>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
? V
|
|
89
|
+
: T[K] extends PropType<infer V>
|
|
90
|
+
? V
|
|
91
|
+
: WechatMiniprogram.Component.PropertyToData<T[K]>
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
type RequiredPropertyNames<T> = {
|
|
@@ -246,7 +246,7 @@ export function injectMixins (mixins: object | Array<object>, options?: MixinTyp
|
|
|
246
246
|
// export function watch (expr: string | (() => any), handler: WatchHandler | WatchOptWithHandler, options?: WatchOpt): () => void
|
|
247
247
|
|
|
248
248
|
interface AnyConstructor {
|
|
249
|
-
new
|
|
249
|
+
new(...args: any[]): any
|
|
250
250
|
|
|
251
251
|
prototype: any
|
|
252
252
|
}
|
|
@@ -266,6 +266,7 @@ interface MpxConfig {
|
|
|
266
266
|
setDataHandler: (data: object, target: ComponentIns<{}, {}, {}, {}, []>) => any | null
|
|
267
267
|
forceFlushSync: boolean,
|
|
268
268
|
webRouteConfig: object,
|
|
269
|
+
webConfig: object,
|
|
269
270
|
webviewConfig?: WebviewConfig
|
|
270
271
|
}
|
|
271
272
|
|
|
@@ -285,9 +286,9 @@ export type Plugin = PluginInstallFunction | {
|
|
|
285
286
|
install: PluginInstallFunction
|
|
286
287
|
}
|
|
287
288
|
|
|
288
|
-
export type PluginFunction<T extends Plugin> = T extends PluginInstallFunction ? T : T extends { install: infer U } ? U : never
|
|
289
|
+
export type PluginFunction<T extends Plugin> = T extends PluginInstallFunction ? T : T extends { install: infer U } ? U : never
|
|
289
290
|
|
|
290
|
-
export type PluginFunctionParams<T extends PluginInstallFunction> = T extends (app: any, ...args: infer P) => any ? P : []
|
|
291
|
+
export type PluginFunctionParams<T extends PluginInstallFunction> = T extends (app: any, ...args: infer P) => any ? P : []
|
|
291
292
|
|
|
292
293
|
export interface Mpx {
|
|
293
294
|
getMixin: typeof getMixin
|
|
@@ -297,7 +298,7 @@ export interface Mpx {
|
|
|
297
298
|
observable: typeof observable
|
|
298
299
|
watch: typeof watch
|
|
299
300
|
|
|
300
|
-
use
|
|
301
|
+
use<T extends Plugin = Plugin> (plugin: T, ...rest: PluginFunctionParams<PluginFunction<T>>): Mpx
|
|
301
302
|
|
|
302
303
|
implement (name: string, options?: ImplementOptions): void
|
|
303
304
|
|
|
@@ -376,8 +377,8 @@ export interface RefUnwrapBailTypes {
|
|
|
376
377
|
export type UnwrapRef<T> = T extends ShallowRef<infer V>
|
|
377
378
|
? V
|
|
378
379
|
: T extends Ref<infer V>
|
|
379
|
-
|
|
380
|
-
|
|
380
|
+
? UnwrapRefSimple<V>
|
|
381
|
+
: UnwrapRefSimple<T>
|
|
381
382
|
|
|
382
383
|
export type UnwrapRefSimple<T> = T extends | Function
|
|
383
384
|
| CollectionTypes
|
|
@@ -386,10 +387,10 @@ export type UnwrapRefSimple<T> = T extends | Function
|
|
|
386
387
|
| RefUnwrapBailTypes[keyof RefUnwrapBailTypes]
|
|
387
388
|
? T
|
|
388
389
|
: T extends Array<any>
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
? { [K in keyof T]: UnwrapRefSimple<T[K]> }
|
|
391
|
+
: T extends object & { [ShallowReactiveMarker]?: never } // not a shallowReactive
|
|
392
|
+
? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]> }
|
|
393
|
+
: T
|
|
393
394
|
|
|
394
395
|
// If the the type T accepts type "any", output type Y, otherwise output type N.
|
|
395
396
|
// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
|
|
@@ -572,13 +573,9 @@ export function watch<T extends Reactive<object>> ( // for reactive value
|
|
|
572
573
|
): () => void
|
|
573
574
|
|
|
574
575
|
export function effectScope (detached?: boolean): EffectScope
|
|
575
|
-
|
|
576
576
|
export function getCurrentScope (): EffectScope | undefined
|
|
577
|
-
|
|
578
577
|
export function onScopeDispose (fn: () => void): void
|
|
579
|
-
|
|
580
578
|
export function set<T extends object> (target: T, key: string | number, value: any): void
|
|
581
|
-
|
|
582
579
|
export function del<T extends object> (target: T, key: keyof T): void
|
|
583
580
|
|
|
584
581
|
// nextTick
|
|
@@ -586,43 +583,25 @@ export function nextTick (fn: () => any): void
|
|
|
586
583
|
|
|
587
584
|
// lifecycle
|
|
588
585
|
export function onBeforeMount (callback: () => void): void
|
|
589
|
-
|
|
590
586
|
export function onMounted (callback: () => void): void
|
|
591
|
-
|
|
592
587
|
export function onBeforeUpdate (callback: () => void): void
|
|
593
|
-
|
|
594
588
|
export function onUpdated (callback: () => void): void
|
|
595
|
-
|
|
596
589
|
export function onBeforeUnmount (callback: () => void): void
|
|
597
|
-
|
|
598
590
|
export function onUnmounted (callback: () => void): void
|
|
599
|
-
|
|
600
591
|
export function onLoad<T extends Record<string, string | undefined>> (callback: (query: T) => void): void
|
|
601
|
-
|
|
602
|
-
// wechat dose not have generics
|
|
603
|
-
// export function onLoad (callback: WechatMiniprogram.Page.ILifetime['onLoad']): void
|
|
604
|
-
|
|
605
592
|
export function onShow (callback: WechatMiniprogram.Page.ILifetime['onShow']): void
|
|
606
|
-
|
|
607
593
|
export function onHide (callback: WechatMiniprogram.Page.ILifetime['onHide']): void
|
|
608
|
-
|
|
609
594
|
export function onResize (callback: WechatMiniprogram.Page.ILifetime['onResize']): void
|
|
610
|
-
|
|
611
595
|
export function onPullDownRefresh (callback: WechatMiniprogram.Page.ILifetime['onPullDownRefresh']): void
|
|
612
|
-
|
|
613
596
|
export function onReachBottom (callback: WechatMiniprogram.Page.ILifetime['onReachBottom']): void
|
|
614
|
-
|
|
615
597
|
export function onShareAppMessage (callback: WechatMiniprogram.Page.ILifetime['onShareAppMessage']): void
|
|
616
|
-
|
|
617
598
|
export function onShareTimeline (callback: WechatMiniprogram.Page.ILifetime['onShareTimeline']): void
|
|
618
|
-
|
|
619
599
|
export function onAddToFavorites (callback: WechatMiniprogram.Page.ILifetime['onAddToFavorites']): void
|
|
620
|
-
|
|
621
600
|
export function onPageScroll (callback: WechatMiniprogram.Page.ILifetime['onPageScroll']): void
|
|
622
|
-
|
|
623
601
|
export function onTabItemTap (callback: WechatMiniprogram.Page.ILifetime['onTabItemTap']): void
|
|
624
|
-
|
|
625
602
|
export function onSaveExitState (callback: () => void): void
|
|
603
|
+
export function onServerPrefetch (callback: () => any): void
|
|
604
|
+
export function onReactHooksExec (callback: () => void): void
|
|
626
605
|
|
|
627
606
|
// get instance
|
|
628
607
|
export function getCurrentInstance<T extends ComponentIns<{}, {}, {}>> (): { proxy: T, [x: string]: any }
|
|
@@ -672,6 +651,8 @@ export const ONLOAD: string
|
|
|
672
651
|
export const ONSHOW: string
|
|
673
652
|
export const ONHIDE: string
|
|
674
653
|
export const ONRESIZE: string
|
|
654
|
+
export const SERVERPREFETCH: string
|
|
655
|
+
export const REACTHOOKSEXEC: string
|
|
675
656
|
|
|
676
657
|
declare global {
|
|
677
658
|
const defineProps: (<T extends Properties = {}>(props: T) => Readonly<GetPropsType<T>>) & (<T>() => Readonly<T>)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpxjs/core",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.62",
|
|
4
4
|
"description": "mpx runtime core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"miniprogram",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"main": "src/index.js",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@mpxjs/utils": "^2.9.
|
|
22
|
+
"@mpxjs/utils": "^2.9.59",
|
|
23
23
|
"lodash": "^4.1.1",
|
|
24
24
|
"miniprogram-api-typings": "^3.10.0"
|
|
25
25
|
},
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
"@react-navigation/native-stack": "^6.9.26",
|
|
32
32
|
"react": "*",
|
|
33
33
|
"react-native": "*",
|
|
34
|
+
"react-native-gesture-handler": "^2.19.0",
|
|
35
|
+
"react-native-safe-area-context": "^4.10.1",
|
|
36
|
+
"react-native-webview": "^13.10.5",
|
|
34
37
|
"vue": "^2.7.10",
|
|
35
38
|
"vue-demi": "^0.14.6",
|
|
36
39
|
"vue-i18n": "^8.27.2",
|
|
@@ -63,6 +66,15 @@
|
|
|
63
66
|
},
|
|
64
67
|
"@ant-design/react-native": {
|
|
65
68
|
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"react-native-safe-area-context": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"react-native-webview": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"react-native-gesture-handler": {
|
|
77
|
+
"optional": true
|
|
66
78
|
}
|
|
67
79
|
},
|
|
68
80
|
"publishConfig": {
|
|
@@ -81,5 +93,5 @@
|
|
|
81
93
|
"url": "https://github.com/didi/mpx/issues"
|
|
82
94
|
},
|
|
83
95
|
"sideEffects": false,
|
|
84
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "c31a343e7ef2c1c1585002752d8c50f016a858ae"
|
|
85
97
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import { implemented } from '../core/implement'
|
|
6
6
|
|
|
7
7
|
// 暂不支持的wx选项,后期需要各种花式支持
|
|
8
|
-
const unsupported = ['relations', 'moved', 'definitionFilter', 'onShareAppMessage', 'options'
|
|
8
|
+
const unsupported = ['relations', 'moved', 'definitionFilter', 'onShareAppMessage', 'options']
|
|
9
9
|
|
|
10
10
|
function convertErrorDesc (key) {
|
|
11
11
|
error(`Options.${key} is not supported in runtime conversion from wx to react native.`, global.currentResource)
|
|
@@ -11,6 +11,7 @@ export const ONSHOW = '__onShow__'
|
|
|
11
11
|
export const ONHIDE = '__onHide__'
|
|
12
12
|
export const ONRESIZE = '__onResize__'
|
|
13
13
|
export const SERVERPREFETCH = '__serverPrefetch__'
|
|
14
|
+
export const REACTHOOKSEXEC = '__reactHooksExec__'
|
|
14
15
|
|
|
15
16
|
export const INNER_LIFECYCLES = [
|
|
16
17
|
BEFORECREATE,
|
|
@@ -21,6 +22,7 @@ export const INNER_LIFECYCLES = [
|
|
|
21
22
|
UPDATED,
|
|
22
23
|
BEFOREUNMOUNT,
|
|
23
24
|
SERVERPREFETCH,
|
|
25
|
+
REACTHOOKSEXEC,
|
|
24
26
|
UNMOUNTED,
|
|
25
27
|
ONLOAD,
|
|
26
28
|
ONSHOW,
|
package/src/core/mergeOptions.js
CHANGED
|
@@ -354,7 +354,7 @@ function transformHOOKS (options) {
|
|
|
354
354
|
const componentHooksMap = makeMap(convertRule.lifecycle.component)
|
|
355
355
|
for (const key in options) {
|
|
356
356
|
// 使用Component创建page实例,页面专属生命周期&自定义方法需写在methods内部
|
|
357
|
-
if (typeof options[key] === 'function' && key !== 'dataFn' && key !== 'setup' &&
|
|
357
|
+
if (typeof options[key] === 'function' && key !== 'dataFn' && key !== 'setup' && !componentHooksMap[key]) {
|
|
358
358
|
if (!options.methods) options.methods = {}
|
|
359
359
|
options.methods[key] = options[key]
|
|
360
360
|
delete options[key]
|
package/src/core/proxy.js
CHANGED
|
@@ -42,7 +42,8 @@ import {
|
|
|
42
42
|
ONLOAD,
|
|
43
43
|
ONSHOW,
|
|
44
44
|
ONHIDE,
|
|
45
|
-
ONRESIZE
|
|
45
|
+
ONRESIZE,
|
|
46
|
+
REACTHOOKSEXEC
|
|
46
47
|
} from './innerLifecycle'
|
|
47
48
|
import contextMap from '../dynamic/vnode/context'
|
|
48
49
|
import { getAst } from '../dynamic/astCache'
|
|
@@ -498,11 +499,28 @@ export default class MpxProxy {
|
|
|
498
499
|
return result
|
|
499
500
|
}
|
|
500
501
|
|
|
501
|
-
doRenderWithVNode (vnode) {
|
|
502
|
+
doRenderWithVNode (vnode, cb) {
|
|
503
|
+
const renderTask = this.createRenderTask()
|
|
504
|
+
let callback = cb
|
|
505
|
+
// mounted之后才会触发BEFOREUPDATE/UPDATED
|
|
506
|
+
if (this.isMounted()) {
|
|
507
|
+
this.callHook(BEFOREUPDATE)
|
|
508
|
+
callback = () => {
|
|
509
|
+
cb && cb()
|
|
510
|
+
this.callHook(UPDATED)
|
|
511
|
+
renderTask && renderTask.resolve()
|
|
512
|
+
}
|
|
513
|
+
}
|
|
502
514
|
if (!this._vnode) {
|
|
503
|
-
this.
|
|
515
|
+
this._vnode = diffAndCloneA(vnode).clone
|
|
516
|
+
pauseTracking()
|
|
517
|
+
// 触发渲染时暂停数据响应追踪,避免误收集到子组件的数据依赖
|
|
518
|
+
this.target.__render({ r: vnode }, callback)
|
|
519
|
+
resetTracking()
|
|
504
520
|
} else {
|
|
505
|
-
|
|
521
|
+
const result = diffAndCloneA(vnode, this._vnode)
|
|
522
|
+
this._vnode = result.clone
|
|
523
|
+
let diffPath = result.diffData
|
|
506
524
|
if (!isEmptyObject(diffPath)) {
|
|
507
525
|
// 构造 diffPath 数据
|
|
508
526
|
diffPath = Object.keys(diffPath).reduce((preVal, curVal) => {
|
|
@@ -510,11 +528,11 @@ export default class MpxProxy {
|
|
|
510
528
|
preVal[key] = diffPath[curVal]
|
|
511
529
|
return preVal
|
|
512
530
|
}, {})
|
|
513
|
-
|
|
531
|
+
pauseTracking()
|
|
532
|
+
this.target.__render(diffPath, callback)
|
|
533
|
+
resetTracking()
|
|
514
534
|
}
|
|
515
535
|
}
|
|
516
|
-
// 缓存本地的 vnode 用以下一次 diff
|
|
517
|
-
this._vnode = diffAndCloneA(vnode).clone
|
|
518
536
|
}
|
|
519
537
|
|
|
520
538
|
doRender (data, cb) {
|
|
@@ -734,6 +752,7 @@ export const onShow = createHook(ONSHOW)
|
|
|
734
752
|
export const onHide = createHook(ONHIDE)
|
|
735
753
|
export const onResize = createHook(ONRESIZE)
|
|
736
754
|
export const onServerPrefetch = createHook(SERVERPREFETCH)
|
|
755
|
+
export const onReactHooksExec = createHook(REACTHOOKSEXEC)
|
|
737
756
|
export const onPullDownRefresh = createHook('__onPullDownRefresh__')
|
|
738
757
|
export const onReachBottom = createHook('__onReachBottom__')
|
|
739
758
|
export const onShareAppMessage = createHook('__onShareAppMessage__')
|
package/src/index.js
CHANGED
|
@@ -29,11 +29,12 @@ export {
|
|
|
29
29
|
UPDATED,
|
|
30
30
|
BEFOREUNMOUNT,
|
|
31
31
|
UNMOUNTED,
|
|
32
|
-
SERVERPREFETCH,
|
|
33
32
|
ONLOAD,
|
|
34
33
|
ONSHOW,
|
|
35
34
|
ONHIDE,
|
|
36
|
-
ONRESIZE
|
|
35
|
+
ONRESIZE,
|
|
36
|
+
SERVERPREFETCH,
|
|
37
|
+
REACTHOOKSEXEC
|
|
37
38
|
} from './core/innerLifecycle'
|
|
38
39
|
|
|
39
40
|
export {
|
|
@@ -43,7 +44,6 @@ export {
|
|
|
43
44
|
onUpdated,
|
|
44
45
|
onBeforeUnmount,
|
|
45
46
|
onUnmounted,
|
|
46
|
-
onServerPrefetch,
|
|
47
47
|
onLoad,
|
|
48
48
|
onShow,
|
|
49
49
|
onHide,
|
|
@@ -55,7 +55,9 @@ export {
|
|
|
55
55
|
onAddToFavorites,
|
|
56
56
|
onPageScroll,
|
|
57
57
|
onTabItemTap,
|
|
58
|
-
onSaveExitState
|
|
58
|
+
onSaveExitState,
|
|
59
|
+
onServerPrefetch,
|
|
60
|
+
onReactHooksExec
|
|
59
61
|
} from './core/proxy'
|
|
60
62
|
|
|
61
63
|
export { getMixin } from './core/mergeOptions'
|
|
@@ -140,15 +142,16 @@ Mpx.config = {
|
|
|
140
142
|
setDataHandler: null,
|
|
141
143
|
forceFlushSync: false,
|
|
142
144
|
webRouteConfig: {},
|
|
145
|
+
webConfig: {},
|
|
143
146
|
/*
|
|
144
147
|
支持两个属性
|
|
145
148
|
hostWhitelists Array 类型 支持h5域名白名单安全校验
|
|
146
149
|
apiImplementations webview JSSDK接口 例如getlocation
|
|
147
150
|
*/
|
|
148
151
|
webviewConfig: {},
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
+
/**
|
|
153
|
+
* react-native 相关配置,用于挂载事件等,如 onShareAppMessage
|
|
154
|
+
*/
|
|
152
155
|
rnConfig: {}
|
|
153
156
|
}
|
|
154
157
|
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { warn, type } from '@mpxjs/utils'
|
|
2
1
|
export default function directiveHelperMixin () {
|
|
3
2
|
return {
|
|
4
3
|
methods: {
|
|
5
4
|
__getWxKey (item, key) {
|
|
6
|
-
|
|
7
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
8
|
-
return value
|
|
9
|
-
} else {
|
|
10
|
-
warn(`wx:key's value should return a string or a number, received: ${type(value)}`, this.__mpxProxy.options.mpxFileResource)
|
|
11
|
-
}
|
|
5
|
+
return key === '*this' ? item : item[key]
|
|
12
6
|
}
|
|
13
7
|
}
|
|
14
8
|
}
|
|
@@ -57,13 +57,15 @@ export default function getRefsMixin () {
|
|
|
57
57
|
})
|
|
58
58
|
},
|
|
59
59
|
__getRefVal (key) {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
return (instance) => {
|
|
61
|
+
if (instance) {
|
|
62
|
+
this.__refs[key] = this.__refs[key] || []
|
|
63
|
+
this.__refs[key].push(instance)
|
|
64
|
+
}
|
|
62
65
|
}
|
|
63
|
-
return (instance) => instance && this.__refs[key].push(instance)
|
|
64
66
|
},
|
|
65
67
|
__selectRef (selector, refType, all = false) {
|
|
66
|
-
const splitedSelector = selector.match(/(#|\.)
|
|
68
|
+
const splitedSelector = selector.match(/(#|\.)?[^.#]+/g) || []
|
|
67
69
|
const refsArr = splitedSelector.map(selector => {
|
|
68
70
|
const selectorMap = this.__selectorMap?.value[selector] || []
|
|
69
71
|
const res = []
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isObject, isArray, dash2hump, isFunction
|
|
1
|
+
import { isObject, isArray, dash2hump, isFunction } from '@mpxjs/utils'
|
|
2
2
|
import { Dimensions } from 'react-native'
|
|
3
3
|
|
|
4
|
-
function concat (a, b) {
|
|
5
|
-
return a ? b ? (a + ' ' + b) : a :
|
|
4
|
+
function concat (a = '', b = '') {
|
|
5
|
+
return a ? b ? (a + ' ' + b) : a : b
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
function stringifyArray (value) {
|
|
@@ -44,7 +44,7 @@ const propertyDelimiter = /:(.+)/
|
|
|
44
44
|
const rpxRegExp = /^\s*(-?\d+(\.\d+)?)rpx\s*$/
|
|
45
45
|
const pxRegExp = /^\s*(-?\d+(\.\d+)?)(px)?\s*$/
|
|
46
46
|
|
|
47
|
-
function parseStyleText (cssText) {
|
|
47
|
+
function parseStyleText (cssText = '') {
|
|
48
48
|
const res = {}
|
|
49
49
|
const arr = cssText.split(listDelimiter)
|
|
50
50
|
for (let i = 0; i < arr.length; i++) {
|
|
@@ -110,7 +110,8 @@ export default function styleHelperMixin (type) {
|
|
|
110
110
|
return concat(staticClass, stringifyDynamicClass(dynamicClass))
|
|
111
111
|
},
|
|
112
112
|
__getStyle (staticClass, dynamicClass, staticStyle, dynamicStyle, show) {
|
|
113
|
-
|
|
113
|
+
// todo 每次返回新对象会导致react memo优化失效,需要考虑优化手段
|
|
114
|
+
const result = {}
|
|
114
115
|
const classMap = {}
|
|
115
116
|
if (type === 'page' && isFunction(global.__getAppClassMap)) {
|
|
116
117
|
Object.assign(classMap, global.__getAppClassMap.call(this))
|
|
@@ -118,22 +119,25 @@ export default function styleHelperMixin (type) {
|
|
|
118
119
|
if (isFunction(this.__getClassMap)) {
|
|
119
120
|
Object.assign(classMap, this.__getClassMap())
|
|
120
121
|
}
|
|
121
|
-
if (
|
|
122
|
+
if (staticClass || dynamicClass) {
|
|
122
123
|
const classString = concat(staticClass, stringifyDynamicClass(dynamicClass))
|
|
123
|
-
classString.split(
|
|
124
|
+
classString.split(/\s+/).forEach((className) => {
|
|
124
125
|
if (classMap[className]) {
|
|
125
|
-
|
|
126
|
+
Object.assign(result, classMap[className])
|
|
127
|
+
} else if (this.props[className] && isObject(this.props[className])) {
|
|
128
|
+
// externalClasses必定以对象形式传递下来
|
|
129
|
+
Object.assign(result, this.props[className])
|
|
126
130
|
}
|
|
127
131
|
})
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
if (staticStyle || dynamicStyle) {
|
|
131
135
|
const styleObj = Object.assign(parseStyleText(staticStyle), normalizeDynamicStyle(dynamicStyle))
|
|
132
|
-
|
|
136
|
+
Object.assign(result, transformStyleObj(this, styleObj))
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
if (show === false) {
|
|
136
|
-
|
|
140
|
+
Object.assign(result, {
|
|
137
141
|
display: 'none'
|
|
138
142
|
})
|
|
139
143
|
}
|
|
@@ -40,7 +40,7 @@ function createAppInstance (appData) {
|
|
|
40
40
|
export default function createApp (option, config = {}) {
|
|
41
41
|
const appData = {}
|
|
42
42
|
|
|
43
|
-
const { NavigationContainer, createNavigationContainerRef, createNativeStackNavigator } = global.__navigationHelper
|
|
43
|
+
const { NavigationContainer, createNavigationContainerRef, createNativeStackNavigator, SafeAreaProvider } = global.__navigationHelper
|
|
44
44
|
// app选项目前不需要进行转换
|
|
45
45
|
const { rawOptions, currentInject } = transferOptions(option, 'app', false)
|
|
46
46
|
const defaultOptions = filterOptions(spreadProp(rawOptions, 'methods'), appData)
|
|
@@ -114,13 +114,13 @@ export default function createApp (option, config = {}) {
|
|
|
114
114
|
if (currentState === 'active') {
|
|
115
115
|
global.__mpxAppCbs.show.forEach((cb) => {
|
|
116
116
|
cb(options)
|
|
117
|
-
global.__mpxAppFocusedState.value = 'show'
|
|
118
117
|
})
|
|
119
|
-
|
|
118
|
+
global.__mpxAppFocusedState.value = 'show'
|
|
119
|
+
} else if (currentState === 'inactive') {
|
|
120
120
|
global.__mpxAppCbs.hide.forEach((cb) => {
|
|
121
121
|
cb()
|
|
122
|
-
global.__mpxAppFocusedState.value = 'hide'
|
|
123
122
|
})
|
|
123
|
+
global.__mpxAppFocusedState.value = 'hide'
|
|
124
124
|
}
|
|
125
125
|
})
|
|
126
126
|
|
|
@@ -133,22 +133,25 @@ export default function createApp (option, config = {}) {
|
|
|
133
133
|
global.__mpxAppFocusedState.value = `resize${count++}`
|
|
134
134
|
})
|
|
135
135
|
return () => {
|
|
136
|
-
changeSubscription()
|
|
136
|
+
changeSubscription && changeSubscription.remove()
|
|
137
137
|
resizeSubScription && resizeSubScription.remove()
|
|
138
138
|
}
|
|
139
139
|
}, [])
|
|
140
140
|
|
|
141
|
-
return createElement(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
onStateChange,
|
|
145
|
-
onUnhandledAction
|
|
146
|
-
},
|
|
147
|
-
createElement(Stack.Navigator,
|
|
141
|
+
return createElement(SafeAreaProvider,
|
|
142
|
+
null,
|
|
143
|
+
createElement(NavigationContainer,
|
|
148
144
|
{
|
|
149
|
-
|
|
145
|
+
ref: navigationRef,
|
|
146
|
+
onStateChange,
|
|
147
|
+
onUnhandledAction
|
|
150
148
|
},
|
|
151
|
-
|
|
149
|
+
createElement(Stack.Navigator,
|
|
150
|
+
{
|
|
151
|
+
initialRouteName: firstPage
|
|
152
|
+
},
|
|
153
|
+
...pageScreens
|
|
154
|
+
)
|
|
152
155
|
)
|
|
153
156
|
)
|
|
154
157
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useEffect, useLayoutEffect, useSyncExternalStore, useRef, createElement, memo, forwardRef, useImperativeHandle, useContext, createContext, Fragment } from 'react'
|
|
1
|
+
import { useEffect, useLayoutEffect, useSyncExternalStore, useRef, useMemo, createElement, memo, forwardRef, useImperativeHandle, useContext, createContext, Fragment } from 'react'
|
|
2
2
|
import * as ReactNative from 'react-native'
|
|
3
3
|
import { ReactiveEffect } from '../../../observer/effect'
|
|
4
4
|
import { watch } from '../../../observer/watch'
|
|
5
|
-
import { reactive, set } from '../../../observer/reactive'
|
|
5
|
+
import { reactive, set, del } from '../../../observer/reactive'
|
|
6
6
|
import { hasOwn, isFunction, noop, isObject, error, getByPath, collectDataset } from '@mpxjs/utils'
|
|
7
7
|
import MpxProxy from '../../../core/proxy'
|
|
8
|
-
import { BEFOREUPDATE, ONLOAD, UPDATED, ONSHOW, ONHIDE, ONRESIZE } from '../../../core/innerLifecycle'
|
|
8
|
+
import { BEFOREUPDATE, ONLOAD, UPDATED, ONSHOW, ONHIDE, ONRESIZE, REACTHOOKSEXEC } from '../../../core/innerLifecycle'
|
|
9
9
|
import mergeOptions from '../../../core/mergeOptions'
|
|
10
10
|
import { queueJob } from '../../../observer/scheduler'
|
|
11
11
|
import { createSelectorQuery } from '@mpxjs/api-proxy'
|
|
@@ -24,20 +24,7 @@ function getSystemInfo () {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function
|
|
28
|
-
const rootProps = {}
|
|
29
|
-
for (const key in props) {
|
|
30
|
-
if (hasOwn(props, key)) {
|
|
31
|
-
const match = /^(bind|catch|capture-bind|capture-catch|style):?(.*?)(?:\.(.*))?$/.exec(key)
|
|
32
|
-
if (match) {
|
|
33
|
-
rootProps[key] = props[key]
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return rootProps
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function createEffect (proxy, components, props) {
|
|
27
|
+
function createEffect (proxy, components) {
|
|
41
28
|
const update = proxy.update = () => {
|
|
42
29
|
// pre render for props update
|
|
43
30
|
if (proxy.propsUpdatedFlag) {
|
|
@@ -57,7 +44,9 @@ function createEffect (proxy, components, props) {
|
|
|
57
44
|
return components[tagName] || getByPath(ReactNative, tagName)
|
|
58
45
|
}
|
|
59
46
|
proxy.effect = new ReactiveEffect(() => {
|
|
60
|
-
|
|
47
|
+
// reset instance
|
|
48
|
+
proxy.target.__resetInstance()
|
|
49
|
+
return proxy.target.__injectedRender(createElement, getComponent, proxy.target.__getRootProps())
|
|
61
50
|
}, () => queueJob(update), proxy.scope)
|
|
62
51
|
}
|
|
63
52
|
|
|
@@ -67,8 +56,8 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
|
|
|
67
56
|
return this.__mpxProxy.forceUpdate(data, { sync: true }, callback)
|
|
68
57
|
},
|
|
69
58
|
__getProps () {
|
|
70
|
-
const propsData = {}
|
|
71
59
|
const props = propsRef.current
|
|
60
|
+
const propsData = {}
|
|
72
61
|
Object.keys(validProps).forEach((key) => {
|
|
73
62
|
if (hasOwn(props, key)) {
|
|
74
63
|
propsData[key] = props[key]
|
|
@@ -85,6 +74,23 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
|
|
|
85
74
|
})
|
|
86
75
|
return propsData
|
|
87
76
|
},
|
|
77
|
+
__getRootProps () {
|
|
78
|
+
const props = propsRef.current
|
|
79
|
+
const rootProps = {}
|
|
80
|
+
for (const key in props) {
|
|
81
|
+
if (hasOwn(props, key)) {
|
|
82
|
+
const match = /^(bind|catch|capture-bind|capture-catch|style):?(.*?)(?:\.(.*))?$/.exec(key)
|
|
83
|
+
if (match) {
|
|
84
|
+
rootProps[key] = props[key]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return rootProps
|
|
89
|
+
},
|
|
90
|
+
__resetInstance () {
|
|
91
|
+
this.__refs = {}
|
|
92
|
+
this.__dispatchedSlotSet = new WeakSet()
|
|
93
|
+
},
|
|
88
94
|
__getSlot (name) {
|
|
89
95
|
const { children } = propsRef.current
|
|
90
96
|
if (children) {
|
|
@@ -185,6 +191,12 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
|
|
|
185
191
|
return props.id
|
|
186
192
|
},
|
|
187
193
|
enumerable: true
|
|
194
|
+
},
|
|
195
|
+
props: {
|
|
196
|
+
get () {
|
|
197
|
+
return propsRef.current
|
|
198
|
+
},
|
|
199
|
+
enumerable: true
|
|
188
200
|
}
|
|
189
201
|
})
|
|
190
202
|
|
|
@@ -198,17 +210,13 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
|
|
|
198
210
|
const proxy = instance.__mpxProxy = new MpxProxy(rawOptions, instance)
|
|
199
211
|
proxy.created()
|
|
200
212
|
|
|
201
|
-
if (type === 'page') {
|
|
202
|
-
proxy.callHook(ONLOAD, [props.route.params || {}])
|
|
203
|
-
}
|
|
204
|
-
|
|
205
213
|
Object.assign(proxy, {
|
|
206
214
|
onStoreChange: null,
|
|
207
215
|
// eslint-disable-next-line symbol-description
|
|
208
216
|
stateVersion: Symbol(),
|
|
209
217
|
subscribe: (onStoreChange) => {
|
|
210
218
|
if (!proxy.effect) {
|
|
211
|
-
createEffect(proxy, components
|
|
219
|
+
createEffect(proxy, components)
|
|
212
220
|
// eslint-disable-next-line symbol-description
|
|
213
221
|
proxy.stateVersion = Symbol()
|
|
214
222
|
}
|
|
@@ -225,7 +233,7 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
|
|
|
225
233
|
})
|
|
226
234
|
// react数据响应组件更新管理器
|
|
227
235
|
if (!proxy.effect) {
|
|
228
|
-
createEffect(proxy, components
|
|
236
|
+
createEffect(proxy, components)
|
|
229
237
|
}
|
|
230
238
|
|
|
231
239
|
return instance
|
|
@@ -271,8 +279,12 @@ const triggerResizeEvent = (mpxProxy) => {
|
|
|
271
279
|
}
|
|
272
280
|
}
|
|
273
281
|
|
|
274
|
-
function usePageContext (mpxProxy) {
|
|
275
|
-
const {
|
|
282
|
+
function usePageContext (mpxProxy, instance) {
|
|
283
|
+
const { pageId } = useContext(routeContext) || {}
|
|
284
|
+
|
|
285
|
+
instance.getPageId = () => {
|
|
286
|
+
return pageId
|
|
287
|
+
}
|
|
276
288
|
|
|
277
289
|
useEffect(() => {
|
|
278
290
|
let unWatch
|
|
@@ -280,8 +292,8 @@ function usePageContext (mpxProxy) {
|
|
|
280
292
|
const hasHideHook = hasPageHook(mpxProxy, [ONHIDE, 'hide'])
|
|
281
293
|
const hasResizeHook = hasPageHook(mpxProxy, [ONRESIZE, 'resize'])
|
|
282
294
|
if (hasShowHook || hasHideHook || hasResizeHook) {
|
|
283
|
-
if (hasOwn(pageStatusContext,
|
|
284
|
-
unWatch = watch(() => pageStatusContext[
|
|
295
|
+
if (hasOwn(pageStatusContext, pageId)) {
|
|
296
|
+
unWatch = watch(() => pageStatusContext[pageId], (newVal) => {
|
|
285
297
|
if (newVal === 'show' || newVal === 'hide') {
|
|
286
298
|
triggerPageStatusHook(mpxProxy, newVal)
|
|
287
299
|
} else if (/^resize/.test(newVal)) {
|
|
@@ -298,27 +310,23 @@ function usePageContext (mpxProxy) {
|
|
|
298
310
|
}
|
|
299
311
|
|
|
300
312
|
const pageStatusContext = reactive({})
|
|
301
|
-
|
|
302
|
-
set(pageStatusContext, routeName, val)
|
|
303
|
-
}
|
|
313
|
+
let pageId = 0
|
|
304
314
|
|
|
305
|
-
function usePageStatus (navigation,
|
|
315
|
+
function usePageStatus (navigation, pageId) {
|
|
306
316
|
let isFocused = true
|
|
307
|
-
|
|
317
|
+
set(pageStatusContext, pageId, '')
|
|
308
318
|
useEffect(() => {
|
|
309
|
-
setPageStatus(route.name, 'show')
|
|
310
319
|
const focusSubscription = navigation.addListener('focus', () => {
|
|
311
|
-
|
|
320
|
+
pageStatusContext[pageId] = 'show'
|
|
312
321
|
isFocused = true
|
|
313
322
|
})
|
|
314
323
|
const blurSubscription = navigation.addListener('blur', () => {
|
|
315
|
-
|
|
324
|
+
pageStatusContext[pageId] = 'hide'
|
|
316
325
|
isFocused = false
|
|
317
326
|
})
|
|
318
|
-
|
|
319
327
|
const unWatchAppFocusedState = watch(global.__mpxAppFocusedState, (value) => {
|
|
320
328
|
if (isFocused) {
|
|
321
|
-
|
|
329
|
+
pageStatusContext[pageId] = value
|
|
322
330
|
}
|
|
323
331
|
})
|
|
324
332
|
|
|
@@ -326,6 +334,7 @@ function usePageStatus (navigation, route) {
|
|
|
326
334
|
focusSubscription()
|
|
327
335
|
blurSubscription()
|
|
328
336
|
unWatchAppFocusedState()
|
|
337
|
+
del(pageStatusContext, pageId)
|
|
329
338
|
}
|
|
330
339
|
}, [navigation])
|
|
331
340
|
}
|
|
@@ -336,42 +345,43 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
|
|
|
336
345
|
const validProps = Object.assign({}, rawOptions.props, rawOptions.properties)
|
|
337
346
|
const defaultOptions = memo(forwardRef((props, ref) => {
|
|
338
347
|
const instanceRef = useRef(null)
|
|
339
|
-
const propsRef = useRef(
|
|
348
|
+
const propsRef = useRef(null)
|
|
349
|
+
propsRef.current = props
|
|
340
350
|
let isFirst = false
|
|
341
351
|
if (!instanceRef.current) {
|
|
342
352
|
isFirst = true
|
|
343
353
|
instanceRef.current = createInstance({ propsRef, type, rawOptions, currentInject, validProps, components })
|
|
344
354
|
}
|
|
345
355
|
const instance = instanceRef.current
|
|
346
|
-
// reset instance
|
|
347
|
-
instance.__refs = {}
|
|
348
|
-
instance.__dispatchedSlotSet = new WeakSet()
|
|
349
356
|
useImperativeHandle(ref, () => {
|
|
350
357
|
return instance
|
|
351
358
|
})
|
|
352
|
-
const proxy = instance.__mpxProxy
|
|
353
359
|
|
|
354
|
-
|
|
355
|
-
// 处理props更新
|
|
356
|
-
propsRef.current = props
|
|
357
|
-
Object.keys(props).forEach(key => {
|
|
358
|
-
if (hasOwn(validProps, key)) {
|
|
359
|
-
instance[key] = props[key]
|
|
360
|
-
}
|
|
361
|
-
})
|
|
362
|
-
proxy.propsUpdated()
|
|
363
|
-
}
|
|
360
|
+
const proxy = instance.__mpxProxy
|
|
364
361
|
|
|
365
|
-
|
|
362
|
+
proxy.callHook(REACTHOOKSEXEC)
|
|
366
363
|
|
|
367
364
|
useEffect(() => {
|
|
365
|
+
if (!isFirst) {
|
|
366
|
+
// 处理props更新
|
|
367
|
+
Object.keys(props).forEach(key => {
|
|
368
|
+
if (hasOwn(validProps, key)) {
|
|
369
|
+
instance[key] = props[key]
|
|
370
|
+
}
|
|
371
|
+
})
|
|
372
|
+
}
|
|
368
373
|
if (proxy.pendingUpdatedFlag) {
|
|
369
374
|
proxy.pendingUpdatedFlag = false
|
|
370
375
|
proxy.callHook(UPDATED)
|
|
371
376
|
}
|
|
372
377
|
})
|
|
373
378
|
|
|
379
|
+
usePageContext(proxy, instance)
|
|
380
|
+
|
|
374
381
|
useEffect(() => {
|
|
382
|
+
if (type === 'page') {
|
|
383
|
+
proxy.callHook(ONLOAD, [props.route.params || {}])
|
|
384
|
+
}
|
|
375
385
|
proxy.mounted()
|
|
376
386
|
return () => {
|
|
377
387
|
proxy.unmounted()
|
|
@@ -383,17 +393,19 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
|
|
|
383
393
|
|
|
384
394
|
useSyncExternalStore(proxy.subscribe, proxy.getSnapshot)
|
|
385
395
|
|
|
386
|
-
return proxy.effect.run()
|
|
396
|
+
return rawOptions.__disableMemo ? proxy.effect.run() : useMemo(() => proxy.effect.run(), [proxy.stateVersion])
|
|
387
397
|
}))
|
|
388
398
|
|
|
389
399
|
if (type === 'page') {
|
|
390
|
-
const { Provider } = global.__navigationHelper
|
|
400
|
+
const { Provider, useSafeAreaInsets, GestureHandlerRootView } = global.__navigationHelper
|
|
391
401
|
const pageConfig = Object.assign({}, global.__mpxPageConfig, currentInject.pageConfig)
|
|
392
402
|
const Page = ({ navigation, route }) => {
|
|
393
|
-
|
|
403
|
+
const currentPageId = useMemo(() => ++pageId, [])
|
|
404
|
+
usePageStatus(navigation, currentPageId)
|
|
394
405
|
|
|
395
406
|
useLayoutEffect(() => {
|
|
396
407
|
navigation.setOptions({
|
|
408
|
+
headerShown: pageConfig.navigationStyle !== 'custom',
|
|
397
409
|
headerTitle: pageConfig.navigationBarTitleText || '',
|
|
398
410
|
headerStyle: {
|
|
399
411
|
backgroundColor: pageConfig.navigationBarBackgroundColor || '#000000'
|
|
@@ -402,18 +414,23 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
|
|
|
402
414
|
})
|
|
403
415
|
}, [])
|
|
404
416
|
|
|
417
|
+
navigation.insets = useSafeAreaInsets()
|
|
418
|
+
|
|
405
419
|
return createElement(Provider,
|
|
406
420
|
null,
|
|
407
|
-
createElement(
|
|
421
|
+
createElement(GestureHandlerRootView,
|
|
408
422
|
{
|
|
409
423
|
style: {
|
|
410
|
-
|
|
424
|
+
flex: 1,
|
|
411
425
|
backgroundColor: pageConfig.backgroundColor || '#ffffff'
|
|
426
|
+
},
|
|
427
|
+
onLayout (e) {
|
|
428
|
+
navigation.layout = e.nativeEvent.layout
|
|
412
429
|
}
|
|
413
430
|
},
|
|
414
431
|
createElement(routeContext.Provider,
|
|
415
432
|
{
|
|
416
|
-
value: {
|
|
433
|
+
value: { pageId: currentPageId }
|
|
417
434
|
},
|
|
418
435
|
createElement(defaultOptions,
|
|
419
436
|
{
|
|
@@ -5,7 +5,9 @@ import {
|
|
|
5
5
|
ONSHOW,
|
|
6
6
|
ONHIDE,
|
|
7
7
|
ONLOAD,
|
|
8
|
-
ONRESIZE
|
|
8
|
+
ONRESIZE,
|
|
9
|
+
SERVERPREFETCH,
|
|
10
|
+
REACTHOOKSEXEC
|
|
9
11
|
} from '../../../core/innerLifecycle'
|
|
10
12
|
|
|
11
13
|
const APP_HOOKS = [
|
|
@@ -16,6 +18,7 @@ const APP_HOOKS = [
|
|
|
16
18
|
'onPageNotFound',
|
|
17
19
|
'onUnhandledRejection',
|
|
18
20
|
'onThemeChange',
|
|
21
|
+
'onSSRAppCreated',
|
|
19
22
|
'onAppInit'
|
|
20
23
|
]
|
|
21
24
|
|
|
@@ -43,7 +46,9 @@ const COMPONENT_HOOKS = [
|
|
|
43
46
|
'moved',
|
|
44
47
|
'detached',
|
|
45
48
|
'pageShow',
|
|
46
|
-
'pageHide'
|
|
49
|
+
'pageHide',
|
|
50
|
+
'serverPrefetch',
|
|
51
|
+
'reactHooksExec'
|
|
47
52
|
]
|
|
48
53
|
|
|
49
54
|
export const lifecycleProxyMap = {
|
|
@@ -54,7 +59,9 @@ export const lifecycleProxyMap = {
|
|
|
54
59
|
[ONSHOW]: ['pageShow', 'onShow'],
|
|
55
60
|
[ONHIDE]: ['pageHide', 'onHide'],
|
|
56
61
|
[ONLOAD]: ['onLoad'],
|
|
57
|
-
[ONRESIZE]: ['onResize']
|
|
62
|
+
[ONRESIZE]: ['onResize'],
|
|
63
|
+
[SERVERPREFETCH]: ['serverPrefetch'],
|
|
64
|
+
[REACTHOOKSEXEC]: ['reactHooksExec']
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
export const LIFECYCLE = {
|