annil 1.15.1 → 1.16.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.
- package/CHANGELOG.md +7 -0
- package/README.md +0 -2
- package/dist/api/DefineComponent/SubComponents/SubComponentsOption.d.ts +3 -3
- package/dist/api/DefineComponent/index.d.ts +4 -4
- package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.d.ts +2 -3
- package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.d.ts +2 -2
- package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/initComputed/index.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.d.ts +2 -2
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js +3 -3
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js.map +1 -1
- package/dist/api/DefineComponent/returnType/GenerateComponentDoc.d.ts +2 -2
- package/dist/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.d.ts +3 -3
- package/dist/api/RootComponent/PageLifetimes/PageLifetimesOption.d.ts +1 -3
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.d.ts +3 -0
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js +2 -0
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js.map +1 -0
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.d.ts +3 -0
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js +2 -0
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js.map +1 -0
- package/dist/api/{CustomComponent/CustomComputed/CustomComputedOption.d.ts → SubComponent/SubComputed/SubComputedOption.d.ts} +1 -1
- package/dist/api/SubComponent/SubComputed/SubComputedOption.js +2 -0
- package/dist/api/SubComponent/SubComputed/SubComputedOption.js.map +1 -0
- package/dist/api/SubComponent/SubData/SubDataConstraint.d.ts +3 -0
- package/dist/api/SubComponent/SubData/SubDataConstraint.js +2 -0
- package/dist/api/SubComponent/SubData/SubDataConstraint.js.map +1 -0
- package/dist/api/{CustomComponent/CustomData/CustomDataOption.d.ts → SubComponent/SubData/SubDataOption.d.ts} +1 -1
- package/dist/api/SubComponent/SubData/SubDataOption.js +2 -0
- package/dist/api/SubComponent/SubData/SubDataOption.js.map +1 -0
- package/dist/api/{CustomComponent/CustomEvents/CustomEventsConstraint.d.ts → SubComponent/SubEvents/SubEventsConstraint.d.ts} +1 -1
- package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js +2 -0
- package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js.map +1 -0
- package/dist/api/{CustomComponent/CustomEvents/CustomEventsOption.d.ts → SubComponent/SubEvents/SubEventsOption.d.ts} +1 -1
- package/dist/api/SubComponent/SubEvents/SubEventsOption.js +2 -0
- package/dist/api/SubComponent/SubEvents/SubEventsOption.js.map +1 -0
- package/dist/api/{CustomComponent/CustomInherit/CustomInheritConstraint.d.ts → SubComponent/SubInherit/SubInheritConstraint.d.ts} +1 -1
- package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js +2 -0
- package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js.map +1 -0
- package/dist/api/{CustomComponent/CustomInherit/CustomInheritOption.d.ts → SubComponent/SubInherit/SubInheritOption.d.ts} +1 -1
- package/dist/api/SubComponent/SubInherit/SubInheritOption.js +2 -0
- package/dist/api/SubComponent/SubInherit/SubInheritOption.js.map +1 -0
- package/dist/api/SubComponent/SubInstance/SubInstance.d.ts +2 -0
- package/dist/api/SubComponent/SubInstance/SubInstance.js.map +1 -0
- package/dist/api/{CustomComponent/CustomLifetimes → SubComponent/SubLifetimes}/SubLifetimesOption.d.ts +1 -1
- package/dist/api/SubComponent/SubLifetimes/SubLifetimesOption.js.map +1 -0
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.d.ts +2 -0
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js +2 -0
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js.map +1 -0
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.d.ts +5 -0
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.js +2 -0
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.js.map +1 -0
- package/dist/api/SubComponent/SubObservers/SubObserversOption.d.ts +2 -0
- package/dist/api/SubComponent/SubObservers/SubObserversOption.js +2 -0
- package/dist/api/SubComponent/SubObservers/SubObserversOption.js.map +1 -0
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.d.ts +2 -0
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js +2 -0
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js.map +1 -0
- package/dist/api/{CustomComponent/CustomReturnType/CreateCustomComponentDoc.d.ts → SubComponent/SubReturnType/CreateSubComponentDoc.d.ts} +1 -1
- package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js +2 -0
- package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js.map +1 -0
- package/dist/api/{CustomComponent/CustomStore/CustomStoreConstraint.d.ts → SubComponent/SubStore/SubStoreConstraint.d.ts} +1 -1
- package/dist/api/SubComponent/SubStore/SubStoreConstraint.js +2 -0
- package/dist/api/SubComponent/SubStore/SubStoreConstraint.js.map +1 -0
- package/dist/api/{CustomComponent/CustomStore/CustomStoreOption.d.ts → SubComponent/SubStore/SubStoreOption.d.ts} +1 -1
- package/dist/api/SubComponent/SubStore/SubStoreOption.js +2 -0
- package/dist/api/SubComponent/SubStore/SubStoreOption.js.map +1 -0
- package/dist/api/SubComponent/SubWatch/SubWatchOption.d.ts +2 -0
- package/dist/api/SubComponent/SubWatch/SubWatchOption.js +2 -0
- package/dist/api/SubComponent/SubWatch/SubWatchOption.js.map +1 -0
- package/dist/api/SubComponent/index.d.ts +49 -0
- package/dist/api/SubComponent/index.js +4 -0
- package/dist/api/SubComponent/index.js.map +1 -0
- package/dist/api/{CustomComponent → SubComponent}/returnType.d.ts +3 -3
- package/dist/api/SubComponent/returnType.js.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/DefineComponent/SubComponents/SubComponentsOption.ts +3 -4
- package/src/api/DefineComponent/SubComponents/test/normal.test.ts +3 -3
- package/src/api/DefineComponent/index.ts +8 -8
- package/src/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.ts +2 -3
- package/src/api/DefineComponent/normalizeOptions/handleSubComponents.ts +2 -2
- package/src/api/DefineComponent/normalizeOptions/initComputed/index.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.ts +2 -2
- package/src/api/DefineComponent/normalizeOptions/watchHandler/index.ts +6 -3
- package/src/api/DefineComponent/returnType/GenerateComponentDoc.ts +2 -2
- package/src/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.ts +4 -4
- package/src/api/DefineComponent/returnType/test/normalComponentDoc.test.ts +6 -6
- package/src/api/RootComponent/Instance/test/properties/mormal.test.ts +1 -1
- package/src/api/RootComponent/PageLifetimes/PageLifetimesOption.ts +1 -4
- package/src/api/RootComponent/PageLifetimes/test/normal.test.ts +3 -31
- package/src/api/{CustomComponent/CustomComputed/GetCustomComputedDoc.ts → SubComponent/SubComputed/GetSubComputedDoc.ts} +1 -1
- package/src/api/SubComponent/SubComputed/SubComputedConstraint.ts +1 -0
- package/src/api/{CustomComponent/CustomComputed/CustomComputedOption.ts → SubComponent/SubComputed/SubComputedOption.ts} +1 -1
- package/src/api/{CustomComponent/CustomComputed → SubComponent/SubComputed}/test/error.test.ts +7 -7
- package/src/api/{CustomComponent/CustomComputed → SubComponent/SubComputed}/test/normal.test.ts +9 -9
- package/src/api/{CustomComponent/CustomData/CustomDataConstraint.ts → SubComponent/SubData/SubDataConstraint.ts} +1 -1
- package/src/api/{CustomComponent/CustomData/CustomDataOption.ts → SubComponent/SubData/SubDataOption.ts} +1 -1
- package/src/api/{CustomComponent/CustomData → SubComponent/SubData}/test/error.test.ts +5 -5
- package/src/api/{CustomComponent/CustomData → SubComponent/SubData}/test/normal.test.ts +6 -6
- package/src/api/{CustomComponent/CustomEvents/CustomEventsConstraint.ts → SubComponent/SubEvents/SubEventsConstraint.ts} +1 -1
- package/src/api/{CustomComponent/CustomEvents/CustomEventsOption.ts → SubComponent/SubEvents/SubEventsOption.ts} +1 -1
- package/src/api/{CustomComponent/CustomEvents → SubComponent/SubEvents}/test/error.test.ts +3 -3
- package/src/api/{CustomComponent/CustomEvents → SubComponent/SubEvents}/test/normal.test.ts +10 -10
- package/src/api/{CustomComponent/CustomInherit/CustomInheritConstraint.ts → SubComponent/SubInherit/SubInheritConstraint.ts} +1 -1
- package/src/api/{CustomComponent/CustomInherit/CustomInheritOption.ts → SubComponent/SubInherit/SubInheritOption.ts} +1 -1
- package/src/api/{CustomComponent/CustomInherit → SubComponent/SubInherit}/test/error.test.ts +7 -7
- package/src/api/{CustomComponent/CustomInherit → SubComponent/SubInherit}/test/normal.test.ts +5 -5
- package/src/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/SubInstance.ts +1 -1
- package/src/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/test/error.test.ts +2 -2
- package/src/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/test/normal.test.ts +2 -2
- package/src/api/{CustomComponent/CustomLifetimes → SubComponent/SubLifetimes}/SubLifetimesOption.ts +1 -1
- package/src/api/SubComponent/SubMethods/SubMethodsConstraint.ts +3 -0
- package/src/api/{CustomComponent/CustomMethods/CustomMethodsOption.ts → SubComponent/SubMethods/SubMethodsOption.ts} +3 -3
- package/src/api/{CustomComponent/CustomMethods → SubComponent/SubMethods}/test/error.test.ts +3 -3
- package/src/api/{CustomComponent/CustomMethods → SubComponent/SubMethods}/test/normarl.test.ts +3 -3
- package/src/api/SubComponent/SubObservers/SubObserversOption.ts +3 -0
- package/src/api/{CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.ts → SubComponent/SubPageLifetimes/SubPageLifetimesOption.ts} +1 -1
- package/src/api/{CustomComponent/CustomReturnType/CreateCustomComponentDoc.ts → SubComponent/SubReturnType/CreateSubComponentDoc.ts} +1 -1
- package/src/api/{CustomComponent/CustomReturnType → SubComponent/SubReturnType}/test/error.test.ts +2 -2
- package/src/api/{CustomComponent/CustomReturnType → SubComponent/SubReturnType}/test/normal.test.ts +4 -4
- package/src/api/{CustomComponent/CustomStore/CustomStoreConstraint.ts → SubComponent/SubStore/SubStoreConstraint.ts} +1 -1
- package/src/api/{CustomComponent/CustomStore/CustomStoreOption.ts → SubComponent/SubStore/SubStoreOption.ts} +1 -1
- package/src/api/{CustomComponent/CustomStore → SubComponent/SubStore}/test/error.test.ts +4 -4
- package/src/api/{CustomComponent/CustomStore → SubComponent/SubStore}/test/normal.test.ts +5 -5
- package/src/api/SubComponent/SubWatch/SubWatchOption.ts +3 -0
- package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchComputed.test.ts +2 -2
- package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchProperties.test.ts +2 -2
- package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchRootData.test.ts +2 -2
- package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchSubData.test.ts +3 -3
- package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WtachInject.test.ts +2 -2
- package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/error.test.ts +5 -5
- package/src/api/{CustomComponent → SubComponent}/index.ts +49 -49
- package/src/api/{CustomComponent → SubComponent}/returnType.ts +6 -6
- package/src/index.ts +2 -4
- package/src/thirdLib/wm/swiper.test.ts +2 -2
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.d.ts +0 -1
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js +0 -2
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js.map +0 -1
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.d.ts +0 -10
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js +0 -2
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js.map +0 -1
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.d.ts +0 -9
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js +0 -2
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js.map +0 -1
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.d.ts +0 -2
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.js +0 -2
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.js.map +0 -1
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.d.ts +0 -10
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js +0 -2
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js.map +0 -1
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.d.ts +0 -2
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js +0 -2
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js.map +0 -1
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.d.ts +0 -12
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js +0 -2
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js.map +0 -1
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.d.ts +0 -2
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js +0 -2
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js.map +0 -1
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.d.ts +0 -10
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js +0 -2
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js.map +0 -1
- package/dist/api/ChunkComponent/SlotComponentReturnType.d.ts +0 -20
- package/dist/api/ChunkComponent/SlotComponentReturnType.js +0 -2
- package/dist/api/ChunkComponent/SlotComponentReturnType.js.map +0 -1
- package/dist/api/ChunkComponent/index.d.ts +0 -24
- package/dist/api/ChunkComponent/index.js +0 -4
- package/dist/api/ChunkComponent/index.js.map +0 -1
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.d.ts +0 -3
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js +0 -2
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js.map +0 -1
- package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js +0 -2
- package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.d.ts +0 -3
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js +0 -2
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js.map +0 -1
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.d.ts +0 -3
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js +0 -2
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js.map +0 -1
- package/dist/api/CustomComponent/CustomData/CustomDataOption.js +0 -2
- package/dist/api/CustomComponent/CustomData/CustomDataOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js +0 -2
- package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js.map +0 -1
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js +0 -2
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js +0 -2
- package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js.map +0 -1
- package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js +0 -2
- package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomInstance/SubInstance.d.ts +0 -2
- package/dist/api/CustomComponent/CustomInstance/SubInstance.js.map +0 -1
- package/dist/api/CustomComponent/CustomLifetimes/SubLifetimesOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.d.ts +0 -2
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js +0 -2
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js.map +0 -1
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.d.ts +0 -5
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js +0 -2
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.d.ts +0 -2
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js +0 -2
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.d.ts +0 -2
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js +0 -2
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js +0 -2
- package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js.map +0 -1
- package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js +0 -2
- package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js.map +0 -1
- package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js +0 -2
- package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js.map +0 -1
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.d.ts +0 -2
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js +0 -2
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js.map +0 -1
- package/dist/api/CustomComponent/index.d.ts +0 -49
- package/dist/api/CustomComponent/index.js +0 -4
- package/dist/api/CustomComponent/index.js.map +0 -1
- package/dist/api/CustomComponent/returnType.js.map +0 -1
- package/src/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.ts +0 -1
- package/src/api/ChunkComponent/ChunkComputed/ChunkComputedOption.ts +0 -46
- package/src/api/ChunkComponent/ChunkComputed/GetChunkComputedDoc.ts +0 -9
- package/src/api/ChunkComponent/ChunkComputed/test/SlotGetComputedDoc.test.ts +0 -25
- package/src/api/ChunkComponent/ChunkComputed/test/error.test.ts +0 -33
- package/src/api/ChunkComponent/ChunkComputed/test/mock.ts +0 -37
- package/src/api/ChunkComponent/ChunkComputed/test/normal.test.ts +0 -86
- package/src/api/ChunkComponent/ChunkData/chunkDataConstraint.ts +0 -9
- package/src/api/ChunkComponent/ChunkData/chunkDataOption.ts +0 -17
- package/src/api/ChunkComponent/ChunkData/test/error.test.ts +0 -28
- package/src/api/ChunkComponent/ChunkData/test/mock.ts +0 -44
- package/src/api/ChunkComponent/ChunkData/test/normal.test.ts +0 -18
- package/src/api/ChunkComponent/ChunkData/validatePrefix.ts +0 -4
- package/src/api/ChunkComponent/ChunkLifetimes/ChunkLifetimes.test.ts +0 -24
- package/src/api/ChunkComponent/ChunkLifetimes/ChunkPageLifetimes.test.ts +0 -26
- package/src/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.ts +0 -27
- package/src/api/ChunkComponent/ChunkMethods/test/error.test.ts +0 -31
- package/src/api/ChunkComponent/ChunkMethods/test/normal.test.ts +0 -21
- package/src/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.ts +0 -3
- package/src/api/ChunkComponent/ChunkStore/ChunkStoreOption.ts +0 -33
- package/src/api/ChunkComponent/ChunkStore/test/error.test.ts +0 -36
- package/src/api/ChunkComponent/ChunkStore/test/mock.ts +0 -32
- package/src/api/ChunkComponent/ChunkStore/test/normal.test.ts +0 -52
- package/src/api/ChunkComponent/ChunkWatch/test/error.test.ts +0 -28
- package/src/api/ChunkComponent/ChunkWatch/test/normal.test.ts +0 -58
- package/src/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.ts +0 -3
- package/src/api/ChunkComponent/ChunklEvents/ChunkEventsOption.ts +0 -27
- package/src/api/ChunkComponent/ChunklEvents/test/error.test.ts +0 -24
- package/src/api/ChunkComponent/ChunklEvents/test/normal.test.ts +0 -26
- package/src/api/ChunkComponent/SlotComponentReturnType.ts +0 -32
- package/src/api/ChunkComponent/index.ts +0 -165
- package/src/api/CustomComponent/CustomComputed/CustomComputedConstraint.ts +0 -1
- package/src/api/CustomComponent/CustomMethods/CustomMethodsConstraint.ts +0 -3
- package/src/api/CustomComponent/CustomObservers/CustomObserversOption.ts +0 -3
- package/src/api/CustomComponent/CustomWatch/CustomWatchOption.ts +0 -3
- /package/dist/api/{CustomComponent/CustomInstance → SubComponent/SubInstance}/SubInstance.js +0 -0
- /package/dist/api/{CustomComponent/CustomLifetimes → SubComponent/SubLifetimes}/SubLifetimesOption.js +0 -0
- /package/dist/api/{CustomComponent → SubComponent}/returnType.js +0 -0
- /package/src/api/{CustomComponent/CustomPageLifetimes → SubComponent/SubPageLifetimes}/test/error.test.ts +0 -0
- /package/src/api/{CustomComponent/CustomPageLifetimes → SubComponent/SubPageLifetimes}/test/normal.test.ts +0 -0
package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchRootData.test.ts
RENAMED
|
@@ -3,7 +3,7 @@ import { Checking, type Test } from "hry-types";
|
|
|
3
3
|
import type { ComponentDoc } from "../../../DefineComponent/returnType/ComponentDoc";
|
|
4
4
|
|
|
5
5
|
import type { Mock_User } from "../../../RootComponent/Properties/test/normalRequired.test";
|
|
6
|
-
import {
|
|
6
|
+
import { SubComponent } from "../..";
|
|
7
7
|
|
|
8
8
|
interface TestObj {
|
|
9
9
|
subObj: Mock_User;
|
|
@@ -37,7 +37,7 @@ interface RootDoc {
|
|
|
37
37
|
/**
|
|
38
38
|
* watch RootDoc中的数据字段
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
SubComponent<RootDoc, CompDoc>()({
|
|
41
41
|
data: {
|
|
42
42
|
aaa_str: "str",
|
|
43
43
|
},
|
package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WatchSubData.test.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Checking, type Test } from "hry-types";
|
|
2
2
|
import type { ComponentDoc } from "../../../DefineComponent/returnType/ComponentDoc";
|
|
3
|
-
import {
|
|
3
|
+
import { SubComponent } from "../..";
|
|
4
4
|
|
|
5
5
|
type CompDoc = ComponentDoc<{
|
|
6
6
|
properties: {
|
|
@@ -10,14 +10,14 @@ type CompDoc = ComponentDoc<{
|
|
|
10
10
|
}>;
|
|
11
11
|
|
|
12
12
|
// 可以为空对象
|
|
13
|
-
|
|
13
|
+
SubComponent<{}, CompDoc>()({
|
|
14
14
|
watch: {},
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* watch 自身data字段
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
SubComponent<{}, CompDoc>()({
|
|
21
21
|
data: {
|
|
22
22
|
aaa_str: "123",
|
|
23
23
|
|
package/src/api/{CustomComponent/CustomWatch → SubComponent/SubWatch}/test/WtachInject.test.ts
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Checking, type Test } from "hry-types";
|
|
2
|
-
import {
|
|
2
|
+
import { SubComponent } from "../..";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* watch 注入的store字段
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
SubComponent<{}, { properties: { aaa_num: number } }>()({
|
|
8
8
|
watch: {
|
|
9
9
|
injectTheme(newValue, oldValue) {
|
|
10
10
|
void Checking<"dark" | "light" | undefined, typeof newValue, Test.Pass>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Wm } from "../../../..";
|
|
2
|
-
import {
|
|
2
|
+
import { SubComponent } from "../..";
|
|
3
3
|
|
|
4
4
|
// 测试1
|
|
5
|
-
|
|
5
|
+
SubComponent<{ events: { a: string } }, Wm.View>()({
|
|
6
6
|
watch: {
|
|
7
7
|
// @ts-expect-error 无可监控字段时,约束为EmptyObject,不可写任何字段
|
|
8
8
|
nothing() {
|
|
@@ -14,7 +14,7 @@ CustomComponent<{ events: { a: string } }, Wm.View>()({
|
|
|
14
14
|
/**
|
|
15
15
|
* 测试2 超出约束字段报错
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
SubComponent<{ events: { a: string } }, Wm.View>()({
|
|
18
18
|
data: {
|
|
19
19
|
view_hoverClass: " h-100",
|
|
20
20
|
},
|
|
@@ -28,7 +28,7 @@ CustomComponent<{ events: { a: string } }, Wm.View>()({
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
SubComponent<{ data: { user: null | object } }, Wm.View>()({
|
|
32
32
|
data: {
|
|
33
33
|
view_hoverClass: " h-100",
|
|
34
34
|
},
|
|
@@ -45,7 +45,7 @@ CustomComponent<{ data: { user: null | object } }, Wm.View>()({
|
|
|
45
45
|
/**
|
|
46
46
|
* 3 对象联合null的类型 不能watch子字段
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
SubComponent<{ data: { user: null | object } }, { properties: { a: number } }>()({
|
|
49
49
|
watch: {
|
|
50
50
|
user(newValue, oldValue) {
|
|
51
51
|
void oldValue;
|
|
@@ -12,25 +12,25 @@ import type { ComponentDoc } from "../DefineComponent/returnType/ComponentDoc";
|
|
|
12
12
|
import type { IInjectStore } from "../InstanceInject/instanceConfig";
|
|
13
13
|
import type { RootComponentDefinition } from "../RootComponent/returnType";
|
|
14
14
|
import type { GetStoreDef } from "../RootComponent/Store/GetStoreDef";
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
import type {
|
|
20
|
-
import type {
|
|
21
|
-
import type {
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
25
|
-
import type {
|
|
26
|
-
import type {
|
|
27
|
-
import type {
|
|
28
|
-
import type {
|
|
29
|
-
import type {
|
|
30
|
-
import type {
|
|
31
|
-
import type {
|
|
32
|
-
import type {
|
|
33
|
-
import type {
|
|
15
|
+
import type { GetSubComputedDoc } from "./SubComputed/GetSubComputedDoc";
|
|
16
|
+
import type { SubComputedConstraint } from "./SubComputed/SubComputedConstraint";
|
|
17
|
+
import type { SubComputedOption } from "./SubComputed/SubComputedOption";
|
|
18
|
+
import type { SubDataConstraint } from "./SubData/SubDataConstraint";
|
|
19
|
+
import type { SubDataOption } from "./SubData/SubDataOption";
|
|
20
|
+
import type { SubEventsConstraint } from "./SubEvents/SubEventsConstraint";
|
|
21
|
+
import type { SubEventsOption } from "./SubEvents/SubEventsOption";
|
|
22
|
+
import type { SubInheritConstraint } from "./SubInherit/SubInheritConstraint";
|
|
23
|
+
import type { SubInheritOption } from "./SubInherit/SubInheritOption";
|
|
24
|
+
import type { SubInstance } from "./SubInstance/SubInstance";
|
|
25
|
+
import type { SubLifetimesOption } from "./SubLifetimes/SubLifetimesOption";
|
|
26
|
+
import type { SubMethodsConstraint } from "./SubMethods/SubMethodsConstraint";
|
|
27
|
+
import type { SubMethodsOption } from "./SubMethods/SubMethodsOption";
|
|
28
|
+
import type { SubObserversOption } from "./SubObservers/SubObserversOption";
|
|
29
|
+
import type { SubPageLifetimesOption } from "./SubPageLifetimes/SubPageLifetimesOption";
|
|
30
|
+
import type { CreatSubComponentDoc } from "./SubReturnType/CreateSubComponentDoc";
|
|
31
|
+
import type { SubStoreConstraint } from "./SubStore/SubStoreConstraint";
|
|
32
|
+
import type { SubStoreOption } from "./SubStore/SubStoreOption";
|
|
33
|
+
import type { SubWatchOption } from "./SubWatch/SubWatchOption";
|
|
34
34
|
|
|
35
35
|
type Options<
|
|
36
36
|
RootDoc extends RootComponentDefinition,
|
|
@@ -43,7 +43,7 @@ type Options<
|
|
|
43
43
|
TSubStore extends object,
|
|
44
44
|
TSubComputed extends object,
|
|
45
45
|
TEvents extends object,
|
|
46
|
-
TSubMethods extends
|
|
46
|
+
TSubMethods extends SubMethodsConstraint,
|
|
47
47
|
InheritDoc extends object,
|
|
48
48
|
SubDataDoc extends object,
|
|
49
49
|
SubStoreDoc extends object,
|
|
@@ -52,7 +52,7 @@ type Options<
|
|
|
52
52
|
SubMethodsDoc extends object,
|
|
53
53
|
CompDocKeys extends PropertyKey = keyof CurrentCompDoc["properties"],
|
|
54
54
|
> =
|
|
55
|
-
&
|
|
55
|
+
& SubInheritOption<
|
|
56
56
|
TInherit,
|
|
57
57
|
{
|
|
58
58
|
[k in keyof NoInfer<TInherit>]:
|
|
@@ -63,7 +63,7 @@ type Options<
|
|
|
63
63
|
: never;
|
|
64
64
|
}[keyof NoInfer<TInherit>]
|
|
65
65
|
>
|
|
66
|
-
&
|
|
66
|
+
& SubDataOption<
|
|
67
67
|
TSubData,
|
|
68
68
|
// 合法的配置
|
|
69
69
|
{
|
|
@@ -78,7 +78,7 @@ type Options<
|
|
|
78
78
|
}[keyof NoInfer<TSubData>],
|
|
79
79
|
"子组件无需此字段或与Inherit字段重复"
|
|
80
80
|
>
|
|
81
|
-
&
|
|
81
|
+
& SubStoreOption<
|
|
82
82
|
TSubStore,
|
|
83
83
|
{
|
|
84
84
|
[k in keyof NoInfer<TSubStore>]:
|
|
@@ -91,7 +91,7 @@ type Options<
|
|
|
91
91
|
: never;
|
|
92
92
|
}[keyof NoInfer<TSubStore>]
|
|
93
93
|
>
|
|
94
|
-
&
|
|
94
|
+
& SubComputedOption<
|
|
95
95
|
TSubComputed,
|
|
96
96
|
{
|
|
97
97
|
[k in keyof NoInfer<TSubComputed>]:
|
|
@@ -116,11 +116,11 @@ type Options<
|
|
|
116
116
|
// >;
|
|
117
117
|
// }
|
|
118
118
|
// 无需与根组件的events字段重复检测,因为根组件多了bubbles字段,一定不会重复
|
|
119
|
-
&
|
|
120
|
-
&
|
|
121
|
-
&
|
|
122
|
-
&
|
|
123
|
-
&
|
|
119
|
+
& SubEventsOption<TEvents, SubEventsDoc, keyof SubEventsConstraint<CurrentCompDoc>>
|
|
120
|
+
& SubMethodsOption<TSubMethods, Prefix, keyof (CurrentCompDoc["events"] & SubEventsDoc)>
|
|
121
|
+
& SubPageLifetimesOption<IsPage, NonNullable<RootDoc["properties"]>>
|
|
122
|
+
& SubLifetimesOption
|
|
123
|
+
& SubWatchOption<
|
|
124
124
|
& SubComputedDoc
|
|
125
125
|
& SubDataDoc
|
|
126
126
|
& AllRootDataDoc
|
|
@@ -128,7 +128,7 @@ type Options<
|
|
|
128
128
|
& IInjectStore
|
|
129
129
|
>
|
|
130
130
|
& Partial<Omit<WMCompOtherOption, "pageLifetimes" | "definitionFilter" | "export" | "observers" | "relations">>
|
|
131
|
-
&
|
|
131
|
+
& SubObserversOption<
|
|
132
132
|
& SubComputedDoc
|
|
133
133
|
& SubDataDoc
|
|
134
134
|
& AllRootDataDoc
|
|
@@ -136,7 +136,7 @@ type Options<
|
|
|
136
136
|
& IInjectStore
|
|
137
137
|
>
|
|
138
138
|
& ThisType<
|
|
139
|
-
|
|
139
|
+
SubInstance<
|
|
140
140
|
SubMethodsDoc & RootDoc["methods"],
|
|
141
141
|
Replace<SubDataDoc, Required<CurrentCompDoc["properties"]>>, // Replace目的是让setData中的类型与文档中定义的类型一致
|
|
142
142
|
// SubDataDoc,
|
|
@@ -147,7 +147,7 @@ type Options<
|
|
|
147
147
|
>
|
|
148
148
|
>;
|
|
149
149
|
|
|
150
|
-
type
|
|
150
|
+
type SubComponentConstructor<
|
|
151
151
|
TRootDoc extends RootComponentDefinition,
|
|
152
152
|
TOriginalCompDoc extends ComponentDoc,
|
|
153
153
|
// 补充的前缀
|
|
@@ -169,34 +169,34 @@ type CustomComponentConstructor<
|
|
|
169
169
|
& TRootDoc["computed"]
|
|
170
170
|
& TRootDoc["store"],
|
|
171
171
|
> = <
|
|
172
|
-
TInherit extends
|
|
173
|
-
TData extends
|
|
172
|
+
TInherit extends SubInheritConstraint<AllRootDataDoc, CurrentCompDoc>,
|
|
173
|
+
TData extends SubDataConstraint<
|
|
174
174
|
& Omit<Required<CurrentCompDoc["properties"]>, keyof InheritDoc>
|
|
175
175
|
& Record<InnerFields<CurrentPrefix>, unknown> // 内部字段
|
|
176
176
|
>,
|
|
177
|
-
TStore extends
|
|
177
|
+
TStore extends SubStoreConstraint<
|
|
178
178
|
Required<TRootDoc["properties"]>,
|
|
179
179
|
& Omit<Required<CurrentCompDoc["properties"]>, keyof (InheritDoc & DataDoc)>
|
|
180
180
|
& Record<InnerFields<CurrentPrefix>, unknown> // 内部字段
|
|
181
181
|
>,
|
|
182
|
-
TEvents extends
|
|
182
|
+
TEvents extends SubEventsConstraint<CurrentCompDoc>,
|
|
183
183
|
// 加默认值计算字段无提示且需要手写返回类型,不加watch无法对computed监控
|
|
184
|
-
TComputed extends
|
|
184
|
+
TComputed extends SubComputedConstraint<
|
|
185
185
|
& Omit<
|
|
186
186
|
Required<CurrentCompDoc["properties"]>,
|
|
187
187
|
keyof (InheritDoc & DataDoc & StoreDoc)
|
|
188
188
|
>
|
|
189
189
|
& Record<InnerFields<CurrentPrefix>, unknown> // 内部字段
|
|
190
190
|
>,
|
|
191
|
-
TMethods extends
|
|
191
|
+
TMethods extends SubMethodsConstraint = {},
|
|
192
192
|
InheritDoc extends object = IfExtends<
|
|
193
|
-
|
|
193
|
+
SubInheritConstraint<AllRootDataDoc, CurrentCompDoc>,
|
|
194
194
|
TInherit,
|
|
195
195
|
{},
|
|
196
196
|
TInherit
|
|
197
197
|
>,
|
|
198
198
|
DataDoc extends object = IfExtends<
|
|
199
|
-
|
|
199
|
+
SubDataConstraint<
|
|
200
200
|
& Omit<Required<CurrentCompDoc["properties"]>, keyof InheritDoc>
|
|
201
201
|
& Record<InnerFields<CurrentPrefix>, unknown>
|
|
202
202
|
>,
|
|
@@ -205,7 +205,7 @@ type CustomComponentConstructor<
|
|
|
205
205
|
TData
|
|
206
206
|
>,
|
|
207
207
|
StoreDoc extends object = IfExtends<
|
|
208
|
-
|
|
208
|
+
SubStoreConstraint<
|
|
209
209
|
Required<TRootDoc["properties"]>,
|
|
210
210
|
& Omit<Required<CurrentCompDoc["properties"]>, keyof (InheritDoc & DataDoc)>
|
|
211
211
|
& Record<InnerFields<CurrentPrefix>, unknown>
|
|
@@ -216,7 +216,7 @@ type CustomComponentConstructor<
|
|
|
216
216
|
>,
|
|
217
217
|
// 无效的计算
|
|
218
218
|
ComputedDoc extends object = IfExtends<
|
|
219
|
-
|
|
219
|
+
SubComputedConstraint<
|
|
220
220
|
& Omit<
|
|
221
221
|
Required<CurrentCompDoc["properties"]>,
|
|
222
222
|
keyof (InheritDoc & DataDoc & StoreDoc)
|
|
@@ -225,10 +225,10 @@ type CustomComponentConstructor<
|
|
|
225
225
|
>,
|
|
226
226
|
TComputed,
|
|
227
227
|
{},
|
|
228
|
-
|
|
228
|
+
GetSubComputedDoc<TComputed>
|
|
229
229
|
>,
|
|
230
230
|
EventsDoc extends object = IfExtends<
|
|
231
|
-
|
|
231
|
+
SubEventsConstraint<CurrentCompDoc>,
|
|
232
232
|
TEvents,
|
|
233
233
|
{},
|
|
234
234
|
TEvents
|
|
@@ -243,12 +243,12 @@ type CustomComponentConstructor<
|
|
|
243
243
|
& StoreDoc
|
|
244
244
|
// 改用ComputedDoc是会报错的
|
|
245
245
|
& IfExtends<
|
|
246
|
-
|
|
246
|
+
SubComputedConstraint<
|
|
247
247
|
Omit<Required<CurrentCompDoc["properties"]>, keyof (InheritDoc & DataDoc & StoreDoc)>
|
|
248
248
|
>,
|
|
249
249
|
TComputed,
|
|
250
250
|
{},
|
|
251
|
-
|
|
251
|
+
GetSubComputedDoc<TComputed>
|
|
252
252
|
>
|
|
253
253
|
)
|
|
254
254
|
>,
|
|
@@ -275,7 +275,7 @@ type CustomComponentConstructor<
|
|
|
275
275
|
) => IfExtends<
|
|
276
276
|
MissingRequiredField,
|
|
277
277
|
never,
|
|
278
|
-
|
|
278
|
+
CreatSubComponentDoc<
|
|
279
279
|
NonNullable<CurrentCompDoc["events"]>,
|
|
280
280
|
EventsDoc
|
|
281
281
|
>,
|
|
@@ -286,7 +286,7 @@ type CustomComponentConstructor<
|
|
|
286
286
|
* 自定义组件构建函数
|
|
287
287
|
* @returns `(options:) => ComponentDoc`
|
|
288
288
|
*/
|
|
289
|
-
export function
|
|
289
|
+
export function SubComponent<
|
|
290
290
|
TRootComponentDefinition extends RootComponentDefinition,
|
|
291
291
|
TCompDoc extends ComponentDoc,
|
|
292
292
|
Prefix extends string = "",
|
|
@@ -294,7 +294,7 @@ export function CustomComponent<
|
|
|
294
294
|
EmptyObject,
|
|
295
295
|
TCompDoc,
|
|
296
296
|
(opt: EmptyObject) => never,
|
|
297
|
-
|
|
297
|
+
SubComponentConstructor<TRootComponentDefinition, TCompDoc, Prefix>
|
|
298
298
|
> {
|
|
299
299
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
300
300
|
return ((options: any) => options) as any;
|
|
@@ -7,7 +7,7 @@ import type { MethodsConstraint } from "../RootComponent/Methods/MethodsConstrai
|
|
|
7
7
|
import type { PageLifetimesOption } from "../RootComponent/PageLifetimes/PageLifetimesOption";
|
|
8
8
|
import type { StoreConstraint } from "../RootComponent/Store/StoreConstraint";
|
|
9
9
|
|
|
10
|
-
type
|
|
10
|
+
type _SubComponentDefinition = {
|
|
11
11
|
composedEvents?: Record<string, unknown>;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -15,15 +15,15 @@ type _CustomComponentDefinition = {
|
|
|
15
15
|
type _Validator<O, Doc, ErrKeys = Exclude<keyof O, keyof Doc>> = [ErrKeys] extends [never] ? Doc
|
|
16
16
|
: `错误的字段${ErrKeys & string}`;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* SubComponent API 的返回类型
|
|
19
19
|
*/
|
|
20
|
-
export type
|
|
21
|
-
O extends _Validator<O,
|
|
20
|
+
export type SubComponentDefinition<
|
|
21
|
+
O extends _Validator<O, _SubComponentDefinition> = _SubComponentDefinition,
|
|
22
22
|
> = O;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* SubComponent API 返回的运行时类型
|
|
25
25
|
*/
|
|
26
|
-
export type
|
|
26
|
+
export type SubComponentDefinitionRuntime = {
|
|
27
27
|
inhrit?: string;
|
|
28
28
|
data?: DataConstraint;
|
|
29
29
|
computed?: ComputedConstraint;
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ChunkComponent } from "./api/ChunkComponent";
|
|
2
|
-
import { CustomComponent } from "./api/CustomComponent";
|
|
3
1
|
import { DefineComponent } from "./api/DefineComponent";
|
|
4
2
|
import { type IInjectInfo, instanceConfig } from "./api/InstanceInject/instanceConfig";
|
|
5
3
|
import { RootComponent } from "./api/RootComponent";
|
|
4
|
+
import { SubComponent } from "./api/SubComponent";
|
|
6
5
|
import { navigateBack, navigateTo, redirectTo } from "./api/wxSugar";
|
|
7
6
|
import type { CreateComponentType } from "./types/CreateComponentType";
|
|
8
7
|
import type { DetailedType } from "./types/DetailedType";
|
|
@@ -33,9 +32,7 @@ export type {
|
|
|
33
32
|
} from "./types/OfficialTypeAlias";
|
|
34
33
|
|
|
35
34
|
export {
|
|
36
|
-
ChunkComponent,
|
|
37
35
|
type CreateComponentType,
|
|
38
|
-
CustomComponent,
|
|
39
36
|
DefineComponent,
|
|
40
37
|
type DetailedType,
|
|
41
38
|
type ExtendComponentType,
|
|
@@ -45,4 +42,5 @@ export {
|
|
|
45
42
|
navigateTo,
|
|
46
43
|
redirectTo,
|
|
47
44
|
RootComponent,
|
|
45
|
+
SubComponent,
|
|
48
46
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SubComponent, typeEqual } from "../../index";
|
|
2
2
|
import type { Wm } from "../index";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
SubComponent<{}, Wm.Swiper>()({
|
|
5
5
|
data: {
|
|
6
6
|
swiper_style: "16/9",
|
|
7
7
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ChunkComputedConstraint = Record<string, () => void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkComputedConstraint.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { G } from "hry-types";
|
|
2
|
-
import type { Validators } from "../../../types/Validators";
|
|
3
|
-
import type { ValidatorPrefix } from "../ChunkData/validatePrefix";
|
|
4
|
-
import type { ChunkComputedConstraint } from "./ChunkComputedConstraint";
|
|
5
|
-
export type ChunkComputedOption<TComputed extends ChunkComputedConstraint, CompareKeys extends PropertyKey, TPrefix extends string> = {
|
|
6
|
-
computed?: TComputed & Validators<[
|
|
7
|
-
G.DuplicateFieldValidator<TComputed, CompareKeys, "字段重复">,
|
|
8
|
-
ValidatorPrefix<TComputed, TPrefix>
|
|
9
|
-
]>;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkComputedOption.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkComputed/ChunkComputedOption.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { G } from "hry-types";
|
|
2
|
-
import type { Validators } from "../../../types/Validators";
|
|
3
|
-
import type { ValidatorPrefix } from "./validatePrefix";
|
|
4
|
-
export type ChunkDataOption<TData extends object, TDuplicateKeys extends PropertyKey, Prefix extends string> = {
|
|
5
|
-
data?: TData & Validators<[
|
|
6
|
-
G.DuplicateFieldValidator<TData, TDuplicateKeys, "字段重复">,
|
|
7
|
-
ValidatorPrefix<TData, Prefix>
|
|
8
|
-
]>;
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunkDataOption.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkData/chunkDataOption.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validatePrefix.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkData/validatePrefix.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { G } from "hry-types";
|
|
2
|
-
import type { IfExtends } from "hry-types/src/Any/_api";
|
|
3
|
-
import type { Validators } from "../../../types/Validators";
|
|
4
|
-
import type { MethodsConstraint } from "../../RootComponent/Methods/MethodsConstraint";
|
|
5
|
-
export type ChunkMethodsOption<TMethods extends MethodsConstraint, TDuplicateKeys extends PropertyKey, Prefix extends string> = {
|
|
6
|
-
methods?: TMethods & Validators<[
|
|
7
|
-
G.DuplicateFieldValidator<TMethods, TDuplicateKeys, "字段重复">,
|
|
8
|
-
IfExtends<MethodsConstraint, TMethods, unknown, IfExtends<Prefix, "", unknown, G.KeyValidator<TMethods, `${Prefix}_${string}`, "前缀错误">>>
|
|
9
|
-
]>;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkMethodsOption.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkStoreConstraint.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { G } from "hry-types";
|
|
2
|
-
import type { Validators } from "../../../types/Validators";
|
|
3
|
-
import type { TypeValidator } from "../../RootComponent/Store/StoreOption";
|
|
4
|
-
import type { ValidatorPrefix } from "../ChunkData/validatePrefix";
|
|
5
|
-
import type { ChunkStoreConstraint } from "./ChunkStoreConstraint";
|
|
6
|
-
export type ChunkStoreOption<TStore extends ChunkStoreConstraint, TDuplicateKeys extends PropertyKey, Prefix extends string> = {
|
|
7
|
-
store?: TStore & Validators<[
|
|
8
|
-
G.DuplicateFieldValidator<TStore, TDuplicateKeys, "字段重复">,
|
|
9
|
-
ValidatorPrefix<TStore, Prefix>,
|
|
10
|
-
TypeValidator<TStore>
|
|
11
|
-
]>;
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkStoreOption.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunkStore/ChunkStoreOption.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkEventsConstraint.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { G } from "hry-types";
|
|
2
|
-
import type { IfExtends } from "hry-types/src/Any/IfExtends";
|
|
3
|
-
import type { Validators } from "../../../types/Validators";
|
|
4
|
-
import type { ChunkEventsConstraint } from "./ChunkEventsConstraint";
|
|
5
|
-
export type ChunkEventsOption<TEvents extends ChunkEventsConstraint, TDuplicateKeys extends PropertyKey, Prefix extends string> = {
|
|
6
|
-
events?: TEvents & Validators<[
|
|
7
|
-
G.DuplicateFieldValidator<TEvents, TDuplicateKeys, "字段重复">,
|
|
8
|
-
IfExtends<ChunkEventsConstraint, TEvents, unknown, IfExtends<Prefix, "", unknown, G.KeyValidator<TEvents, `${Prefix}_${string}`, "前缀错误">>>
|
|
9
|
-
]>;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChunkEventsOption.js","sourceRoot":"","sources":["../../../../src/api/ChunkComponent/ChunklEvents/ChunkEventsOption.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Func } from "hry-types/src/Misc/_api";
|
|
2
|
-
import type { DataConstraint } from "../RootComponent/Data/DataConstraint";
|
|
3
|
-
import type { EventsConstraint } from "../RootComponent/Events/EventsConstraint";
|
|
4
|
-
import type { LifetimesConstraint } from "../RootComponent/Lifetimes/LifetimesConstraint";
|
|
5
|
-
import type { MethodsConstraint } from "../RootComponent/Methods/MethodsConstraint";
|
|
6
|
-
import type { PageLifetimesOption } from "../RootComponent/PageLifetimes/PageLifetimesOption";
|
|
7
|
-
import type { ChunkComputedConstraint } from "./ChunkComputed/ChunkComputedConstraint";
|
|
8
|
-
import type { ChunkStoreConstraint } from "./ChunkStore/ChunkStoreConstraint";
|
|
9
|
-
export type SlotComponentReturnType = {
|
|
10
|
-
data?: DataConstraint;
|
|
11
|
-
computed?: ChunkComputedConstraint;
|
|
12
|
-
methods?: MethodsConstraint;
|
|
13
|
-
events?: EventsConstraint;
|
|
14
|
-
store?: ChunkStoreConstraint;
|
|
15
|
-
observers?: Record<string, Func>;
|
|
16
|
-
watch?: Record<string, Func>;
|
|
17
|
-
lifetimes?: LifetimesConstraint;
|
|
18
|
-
behaviors?: string[];
|
|
19
|
-
pageLifetimes?: PageLifetimesOption<false, object>["pageLifetimes"] | PageLifetimesOption<true, object>["pageLifetimes"];
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SlotComponentReturnType.js","sourceRoot":"","sources":["../../../src/api/ChunkComponent/SlotComponentReturnType.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { IfExtends } from "hry-types/src/Any/_api";
|
|
2
|
-
import type { WMCompOtherOption } from "../../types/OfficialTypeAlias";
|
|
3
|
-
import type { IInjectAllData, IInjectMethods, IInjectStore } from "../InstanceInject/instanceConfig";
|
|
4
|
-
import type { GetComputedDef } from "../RootComponent/Computed/GetComputedDef";
|
|
5
|
-
import type { RootComponentInstance } from "../RootComponent/Instance/RootComponentInstance";
|
|
6
|
-
import type { LifetimesOption } from "../RootComponent/Lifetimes/LifetimesOption";
|
|
7
|
-
import type { MethodsConstraint } from "../RootComponent/Methods/MethodsConstraint";
|
|
8
|
-
import type { ObserversOption } from "../RootComponent/Observers/ObserversOption";
|
|
9
|
-
import type { PageLifetimesOption } from "../RootComponent/PageLifetimes/PageLifetimesOption";
|
|
10
|
-
import type { RootComponentDefinition } from "../RootComponent/returnType";
|
|
11
|
-
import type { GetStoreDef } from "../RootComponent/Store/GetStoreDef";
|
|
12
|
-
import type { WatchOption } from "../RootComponent/Watch/WatchOption";
|
|
13
|
-
import type { ChunkComputedConstraint } from "./ChunkComputed/ChunkComputedConstraint";
|
|
14
|
-
import type { ChunkComputedOption } from "./ChunkComputed/ChunkComputedOption";
|
|
15
|
-
import type { ChunkDataOption } from "./ChunkData/chunkDataOption";
|
|
16
|
-
import type { ChunkEventsConstraint } from "./ChunklEvents/ChunkEventsConstraint";
|
|
17
|
-
import type { ChunkEventsOption } from "./ChunklEvents/ChunkEventsOption";
|
|
18
|
-
import type { ChunkMethodsOption } from "./ChunkMethods/ChunkMethodsOption";
|
|
19
|
-
import type { ChunkStoreConstraint } from "./ChunkStore/ChunkStoreConstraint";
|
|
20
|
-
import type { ChunkStoreOption } from "./ChunkStore/ChunkStoreOption";
|
|
21
|
-
type ChunkComponentOptions<TIsPage extends boolean, Prefix extends string, RootDatas extends object, TEvents extends ChunkEventsConstraint, TData extends object, TStore extends ChunkStoreConstraint, StoreDoc extends object, TComputed extends ChunkComputedConstraint, ComputedDoc extends object, RootMethods extends object, RootEvents extends object, TMethods extends MethodsConstraint, EventsDoc extends object, PropertiesDoc extends object> = ChunkDataOption<TData, keyof (RootDatas & IInjectAllData), Prefix> & ChunkStoreOption<TStore, keyof (TData & RootDatas & IInjectAllData), Prefix> & ChunkComputedOption<TComputed, keyof (TData & StoreDoc & RootDatas & IInjectAllData), Prefix> & ChunkEventsOption<TEvents, keyof (RootMethods & RootEvents & IInjectMethods), Prefix> & ChunkMethodsOption<TMethods, keyof (RootMethods & RootEvents & EventsDoc & IInjectMethods), Prefix> & ThisType<RootComponentInstance<TIsPage, TMethods & RootMethods, TData, TData & StoreDoc & ComputedDoc & RootDatas & IInjectAllData, {}, StoreDoc>> & PageLifetimesOption<TIsPage, PropertiesDoc> & LifetimesOption & WatchOption<ComputedDoc & Required<RootDatas> & TData & StoreDoc & IInjectStore> & Partial<Omit<WMCompOtherOption, "pageLifetimes" | "definitionFilter" | "observers">> & ObserversOption<ComputedDoc & Required<RootDatas> & TData & StoreDoc & IInjectStore>;
|
|
22
|
-
type ChunkComponentConstructor<TRootComponentReturnType extends RootComponentDefinition, TPrefix extends string, IsPage extends boolean = TRootComponentReturnType["isPage"] extends true ? true : false, RootDatas extends object = Required<TRootComponentReturnType["properties"]> & TRootComponentReturnType["data"] & TRootComponentReturnType["computed"] & TRootComponentReturnType["store"], RootMethods extends object = TRootComponentReturnType["methods"] & {}, RootEvents extends object = TRootComponentReturnType["events"] & {}> = <TEvents extends ChunkEventsConstraint, TStore extends ChunkStoreConstraint<Required<TRootComponentReturnType["properties"]>>, TMethods extends MethodsConstraint = {}, TData extends object = {}, StoreDoc extends object = ChunkStoreConstraint<Required<TRootComponentReturnType["properties"]>> extends TStore ? {} : GetStoreDef<TStore>, TComputed extends ChunkComputedConstraint = {}, ComputedDoc extends object = GetComputedDef<TComputed>, EventsDoc extends object = IfExtends<ChunkEventsConstraint, TEvents, {}, TEvents>, PropertiesDoc extends object = NonNullable<TRootComponentReturnType["properties"]>>(options: ChunkComponentOptions<IsPage, TPrefix, RootDatas, TEvents, TData, TStore, StoreDoc, TComputed, ComputedDoc, RootMethods, RootEvents, TMethods, EventsDoc, PropertiesDoc>) => never;
|
|
23
|
-
export declare function ChunkComponent<TRootComponentReturnType extends RootComponentDefinition, TPrefix extends string = "">(): ChunkComponentConstructor<TRootComponentReturnType, TPrefix>;
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/ChunkComponent/index.ts"],"names":[],"mappings":"AA4JA,MAAM,UAAU,cAAc;IAO5B,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,OAAgB,CAAC;AACvC,CAAC"}
|