annil 1.0.0 → 1.0.4
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 +20 -0
- package/README.md +38 -2
- package/dist/api/DefineComponent/ReturnType/test/normalComponentDoc.test.js.map +1 -1
- package/dist/api/DefineComponent/ReturnType/test/normalPageDoc.test.js.map +1 -1
- package/dist/api/DefineComponent/collectOptionsForComponent.d.ts +4 -0
- package/dist/api/DefineComponent/collectOptionsForComponent.js +152 -0
- package/dist/api/DefineComponent/collectOptionsForComponent.js.map +1 -0
- package/dist/api/DefineComponent/index.d.ts +4 -28
- package/dist/api/DefineComponent/index.js +2 -32
- package/dist/api/DefineComponent/index.js.map +1 -1
- package/dist/api/RootComponent/CustomEvents/CustomEventConstraint.d.ts +2 -1
- package/dist/api/RootComponent/Data/DataConstraint.d.ts +1 -0
- package/dist/api/RootComponent/Data/DataConstraint.js +2 -0
- package/dist/api/RootComponent/Data/DataConstraint.js.map +1 -0
- package/dist/api/RootComponent/Lifetimes/LifetimesConstraint.d.ts +4 -1
- package/dist/api/RootComponent/Lifetimes/test/error.test.js +1 -0
- package/dist/api/RootComponent/Lifetimes/test/error.test.js.map +1 -1
- package/dist/api/RootComponent/Lifetimes/test/normal.test.js +3 -0
- package/dist/api/RootComponent/Lifetimes/test/normal.test.js.map +1 -1
- package/dist/api/RootComponent/Properties/{expected/normalEmpty.js → test/normalEmpty.test.js} +1 -1
- package/dist/api/RootComponent/Properties/test/normalEmpty.test.js.map +1 -0
- package/dist/api/RootComponent/Properties/test/normalOptional.test.js +15 -0
- package/dist/api/RootComponent/Properties/test/normalOptional.test.js.map +1 -1
- package/dist/api/RootComponent/Watch/test/WatchProperties.test.js +1 -1
- package/dist/api/RootComponent/Watch/test/WatchProperties.test.js.map +1 -1
- package/dist/api/RootComponent/index.d.ts +19 -2
- package/dist/api/RootComponent/index.js +1 -1
- package/dist/api/RootComponent/index.js.map +1 -1
- package/dist/api/SubComponent/SubComputed/test/normal.test.js.map +1 -1
- package/dist/api/SubComponent/SubData/test/error.test.js.map +1 -1
- package/dist/api/SubComponent/SubData/test/normal.test.js.map +1 -1
- package/dist/api/SubComponent/SubInstance/test/normal.test.js.map +1 -1
- package/dist/api/SubComponent/SubPageLifetimes/test/normal.test.js.map +1 -1
- package/dist/api/SubComponent/SubWatch/test/WatchRootData.test.js.map +1 -1
- package/dist/api/SubComponent/index.d.ts +2 -2
- package/dist/api/SubComponent/index.js.map +1 -1
- package/dist/{utils → behaviors/BComputedAndWatch}/computedUpdater.d.ts +1 -1
- package/dist/{utils → behaviors/BComputedAndWatch}/computedUpdater.js +2 -2
- package/dist/behaviors/BComputedAndWatch/computedUpdater.js.map +1 -0
- package/dist/behaviors/BComputedAndWatch/data-tracer.js +0 -3
- package/dist/behaviors/BComputedAndWatch/data-tracer.js.map +1 -1
- package/dist/{utils → behaviors/BComputedAndWatch}/getPathsValue.d.ts +1 -1
- package/dist/behaviors/BComputedAndWatch/getPathsValue.js.map +1 -0
- package/dist/behaviors/BComputedAndWatch/index.js +10 -2
- package/dist/behaviors/BComputedAndWatch/index.js.map +1 -1
- package/dist/behaviors/BComputedAndWatch/initComputed.js +4 -12
- package/dist/behaviors/BComputedAndWatch/initComputed.js.map +1 -1
- package/dist/behaviors/BComputedAndWatch/isEqual.js.map +1 -1
- package/dist/behaviors/BStore.js.map +1 -1
- package/dist/behaviors/BbeforeCreated.js +1 -2
- package/dist/behaviors/BbeforeCreated.js.map +1 -1
- package/dist/types/GetComponentPrefix.js +1 -4
- package/dist/types/GetComponentPrefix.js.map +1 -1
- package/dist/types/OfficialTypeAlias.d.ts +2 -2
- package/dist/types/ReplacePrefix.js +1 -4
- package/dist/types/ReplacePrefix.js.map +1 -1
- package/package.json +5 -4
- package/src/api/DefineComponent/ReturnType/test/normalComponentDoc.test.ts +2 -1
- package/src/api/DefineComponent/ReturnType/test/normalPageDoc.test.ts +2 -1
- package/src/api/DefineComponent/collectOptionsForComponent.ts +290 -0
- package/src/api/DefineComponent/index.ts +13 -81
- package/src/api/RootComponent/Computed/test/normal.test.ts +1 -1
- package/src/api/RootComponent/CustomEvents/CustomEventConstraint.ts +3 -1
- package/src/api/RootComponent/Data/DataConstraint.ts +1 -0
- package/src/api/RootComponent/IsPage/IsPageOption.ts +6 -1
- package/src/api/RootComponent/Lifetimes/LifetimesConstraint.ts +8 -7
- package/src/api/RootComponent/Lifetimes/test/error.test.ts +1 -1
- package/src/api/RootComponent/Lifetimes/test/normal.test.ts +3 -3
- package/src/api/RootComponent/PageLifetimes/test/normal.test.ts +1 -1
- package/src/api/RootComponent/Properties/test/normalOptional.test.ts +20 -0
- package/src/api/RootComponent/Watch/test/WatchComputed.test.ts +1 -1
- package/src/api/RootComponent/Watch/test/WatchData.test.ts +1 -1
- package/src/api/RootComponent/Watch/test/WatchProperties.test.ts +8 -2
- package/src/api/RootComponent/index.ts +19 -3
- package/src/api/SubComponent/SubComputed/test/normal.test.ts +2 -1
- package/src/api/SubComponent/SubData/test/error.test.ts +2 -1
- package/src/api/SubComponent/SubData/test/normal.test.ts +2 -1
- package/src/api/SubComponent/SubInstance/test/normal.test.ts +2 -1
- package/src/api/SubComponent/SubPageLifetimes/test/normal.test.ts +2 -1
- package/src/api/SubComponent/SubWatch/test/WatchRootData.test.ts +2 -1
- package/src/api/SubComponent/SubWatch/test/error.test.ts +1 -1
- package/src/api/SubComponent/index.ts +11 -4
- package/src/{utils → behaviors/BComputedAndWatch}/computedUpdater.ts +5 -4
- package/src/behaviors/BComputedAndWatch/data-tracer.ts +0 -3
- package/src/{utils → behaviors/BComputedAndWatch}/getPathsValue.ts +1 -1
- package/src/behaviors/BComputedAndWatch/index.ts +21 -8
- package/src/behaviors/BComputedAndWatch/initComputed.ts +26 -19
- package/src/behaviors/BComputedAndWatch/isEqual.ts +1 -0
- package/src/behaviors/BStore.ts +5 -3
- package/src/behaviors/BbeforeCreated.ts +4 -2
- package/src/types/GetComponentPrefix.ts +11 -11
- package/src/types/OfficialTypeAlias.ts +2 -2
- package/src/types/ReplacePrefix.ts +9 -10
- package/src/types/SpecificType.ts +0 -4
- package/tsconfig.json +6 -15
- package/dist/api/RootComponent/Data/expected/error.js +0 -10
- package/dist/api/RootComponent/Data/expected/error.js.map +0 -1
- package/dist/api/RootComponent/Data/expected/normal.d.ts +0 -1
- package/dist/api/RootComponent/Data/expected/normal.js +0 -33
- package/dist/api/RootComponent/Data/expected/normal.js.map +0 -1
- package/dist/api/RootComponent/Properties/expected/error.d.ts +0 -1
- package/dist/api/RootComponent/Properties/expected/error.js +0 -38
- package/dist/api/RootComponent/Properties/expected/error.js.map +0 -1
- package/dist/api/RootComponent/Properties/expected/normalEmpty.d.ts +0 -1
- package/dist/api/RootComponent/Properties/expected/normalEmpty.js.map +0 -1
- package/dist/api/RootComponent/Properties/expected/normalOptional.d.ts +0 -1
- package/dist/api/RootComponent/Properties/expected/normalOptional.js +0 -80
- package/dist/api/RootComponent/Properties/expected/normalOptional.js.map +0 -1
- package/dist/api/RootComponent/Properties/expected/normalRequired.d.ts +0 -69
- package/dist/api/RootComponent/Properties/expected/normalRequired.js +0 -44
- package/dist/api/RootComponent/Properties/expected/normalRequired.js.map +0 -1
- package/dist/api/RootComponent/Properties/test/normalEmpty.test..d.ts +0 -1
- package/dist/api/RootComponent/Properties/test/normalEmpty.test..js +0 -20
- package/dist/api/RootComponent/Properties/test/normalEmpty.test..js.map +0 -1
- package/dist/types/RestorePropTypeOfList.d.ts +0 -2
- package/dist/types/RestorePropTypeOfList.js +0 -3
- package/dist/types/RestorePropTypeOfList.js.map +0 -1
- package/dist/utils/computedUpdater.js.map +0 -1
- package/dist/utils/getPathsValue.js.map +0 -1
- package/dist/utils/initWatchOldValue.d.ts +0 -2
- package/dist/utils/initWatchOldValue.js +0 -10
- package/dist/utils/initWatchOldValue.js.map +0 -1
- package/dist/utils/preprocessingOptions.d.ts +0 -18
- package/dist/utils/preprocessingOptions.js +0 -184
- package/dist/utils/preprocessingOptions.js.map +0 -1
- package/src/api/RootComponent/Data/expected/error.ts +0 -14
- package/src/api/RootComponent/Data/expected/normal.ts +0 -68
- package/src/api/RootComponent/Properties/expected/error.ts +0 -49
- package/src/api/RootComponent/Properties/expected/normalEmpty.ts +0 -33
- package/src/api/RootComponent/Properties/expected/normalOptional.ts +0 -136
- package/src/api/RootComponent/Properties/expected/normalRequired.ts +0 -100
- package/src/types/RestorePropTypeOfList.ts +0 -20
- package/src/utils/initWatchOldValue.ts +0 -12
- package/src/utils/preprocessingOptions.ts +0 -334
- /package/dist/api/RootComponent/{Data/expected/error.d.ts → Properties/test/normalEmpty.test.d.ts} +0 -0
- /package/dist/{utils → behaviors/BComputedAndWatch}/getPathsValue.js +0 -0
- /package/src/api/RootComponent/Properties/test/{normalEmpty.test..ts → normalEmpty.test.ts} +0 -0
package/src/behaviors/BStore.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type mobx from "mobx";
|
|
2
|
-
import type {
|
|
2
|
+
import type { FinalOptionsForComponent } from "../api/DefineComponent";
|
|
3
3
|
import { deleteProtoField } from "../utils/deleteProtoField";
|
|
4
4
|
import type { Instance } from "./BComputedAndWatch/types";
|
|
5
5
|
|
|
6
6
|
export const BStore = Behavior({
|
|
7
|
-
definitionFilter(options:
|
|
7
|
+
definitionFilter(options: FinalOptionsForComponent) {
|
|
8
8
|
// 初始化store
|
|
9
9
|
const storeConfig = options.store;
|
|
10
10
|
if (!storeConfig) return;
|
|
@@ -15,6 +15,7 @@ export const BStore = Behavior({
|
|
|
15
15
|
options.data[key] = toJS(storeConfig[key]());
|
|
16
16
|
|
|
17
17
|
// 把响应式数据配置保留在methods的__storeConfig__字段下带入到组件实例中(不用函数返回方式也可以,但不符合methods字段类型),后续再从原型上删除。
|
|
18
|
+
/* istanbul ignore next */
|
|
18
19
|
options.methods ||= {};
|
|
19
20
|
|
|
20
21
|
options.methods.__storeConfig__ = () => storeConfig;
|
|
@@ -50,7 +51,8 @@ export const BStore = Behavior({
|
|
|
50
51
|
deleteProtoField(this, "__storeConfig__");
|
|
51
52
|
},
|
|
52
53
|
detached(this: Instance) {
|
|
53
|
-
// 清除store数据
|
|
54
|
+
// 清除store数据 test中模拟了测试,所以忽略 框架不支持 issue {@link https://github.com/wechat-miniprogram/miniprogram-simulate/issues/110}
|
|
55
|
+
/* istanbul ignore next */
|
|
54
56
|
for (const key in this.disposer) {
|
|
55
57
|
this.disposer[key]();
|
|
56
58
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { FinalOptionsForComponent } from "../api/DefineComponent";
|
|
2
|
+
|
|
1
3
|
export const BBeforeCreate = Behavior({
|
|
2
|
-
definitionFilter(options:
|
|
4
|
+
definitionFilter(options: FinalOptionsForComponent) {
|
|
3
5
|
// 触发beforeCreate生命周期函数
|
|
4
|
-
const beforeCreateFunc = options.lifetimes
|
|
6
|
+
const beforeCreateFunc = options.lifetimes!.beforeCreate;
|
|
5
7
|
|
|
6
8
|
beforeCreateFunc && beforeCreateFunc(options);
|
|
7
9
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Checking, type Test } from "hry-types";
|
|
1
|
+
// import { Checking, type Test } from "hry-types";
|
|
2
2
|
import type { IfExtends } from "hry-types/src/Any/IfExtends";
|
|
3
3
|
import type { ComponentDoc } from "../api/DefineComponent/ReturnType/ComponentDoc";
|
|
4
4
|
|
|
@@ -14,21 +14,21 @@ export type ExtractDocPrefix<TComponentDoc extends ComponentDoc> = keyof IfExten
|
|
|
14
14
|
> extends `${infer P}_${string}` ? P
|
|
15
15
|
: "";
|
|
16
16
|
|
|
17
|
-
type Test1 = ExtractDocPrefix<{ properties: { xxx_name: string } }>;
|
|
17
|
+
// type Test1 = ExtractDocPrefix<{ properties: { xxx_name: string } }>;
|
|
18
18
|
|
|
19
|
-
type Test1Expect = "xxx";
|
|
19
|
+
// type Test1Expect = "xxx";
|
|
20
20
|
|
|
21
|
-
Checking<Test1, Test1Expect, Test.Pass>;
|
|
21
|
+
// Checking<Test1, Test1Expect, Test.Pass>;
|
|
22
22
|
|
|
23
|
-
type Test2 = ExtractDocPrefix<{ customEvents: { xxx_name: string } }>;
|
|
23
|
+
// type Test2 = ExtractDocPrefix<{ customEvents: { xxx_name: string } }>;
|
|
24
24
|
|
|
25
|
-
type Test2Expect = "xxx";
|
|
25
|
+
// type Test2Expect = "xxx";
|
|
26
26
|
|
|
27
|
-
Checking<Test2, Test2Expect, Test.Pass>;
|
|
27
|
+
// Checking<Test2, Test2Expect, Test.Pass>;
|
|
28
28
|
|
|
29
|
-
// type lll = never extends `${infer P}_${string}` ? P: ""; // => string bug?
|
|
30
|
-
type Test3 = ExtractDocPrefix<{}>;
|
|
29
|
+
// // type lll = never extends `${infer P}_${string}` ? P: ""; // => string bug?
|
|
30
|
+
// type Test3 = ExtractDocPrefix<{}>;
|
|
31
31
|
|
|
32
|
-
type Test3Expect = string;
|
|
32
|
+
// type Test3Expect = string;
|
|
33
33
|
|
|
34
|
-
Checking<Test3, Test3Expect, Test.Pass>;
|
|
34
|
+
// Checking<Test3, Test3Expect, Test.Pass>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type WMTriggerEventOption = WechatMiniprogram.Component.TriggerEventOption;
|
|
2
2
|
|
|
3
3
|
export type WMCustomEvent<
|
|
4
|
-
Detail =
|
|
4
|
+
Detail = undefined,
|
|
5
5
|
Mark extends object = object,
|
|
6
6
|
CurrentTargetDataset extends object = object,
|
|
7
7
|
TargetDataset extends object = CurrentTargetDataset,
|
|
@@ -25,7 +25,7 @@ export type WMBaseEvent<
|
|
|
25
25
|
export type Dataset<
|
|
26
26
|
TCurrentTargetDataset extends object,
|
|
27
27
|
TargetDataset extends object = TCurrentTargetDataset,
|
|
28
|
-
Detail =
|
|
28
|
+
Detail = undefined,
|
|
29
29
|
> = WMCustomEvent<Detail, object, TCurrentTargetDataset, TargetDataset>;
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Checking, type Test } from "hry-types";
|
|
2
1
|
import type { IfExtends } from "hry-types/src/Any/IfExtends";
|
|
3
2
|
import type { ComponentDoc } from "../api/DefineComponent/ReturnType/ComponentDoc";
|
|
4
3
|
// import type { ComponentDoc } from "../api/DefineComponent/CreateDoc/ComponentDoc";
|
|
@@ -28,20 +27,20 @@ export type ReplacePrefix<TComponentDoc extends ComponentDoc, TPrefix extends st
|
|
|
28
27
|
{ customEvents: _ReplacePrefix<TComponentDoc["customEvents"], TPrefix> }
|
|
29
28
|
>;
|
|
30
29
|
|
|
31
|
-
type Test1 = ReplacePrefix<{ properties: { xxx_name: string } }, "xxxDaa">;
|
|
30
|
+
// type Test1 = ReplacePrefix<{ properties: { xxx_name: string } }, "xxxDaa">;
|
|
32
31
|
|
|
33
|
-
type Test1Expect = { properties: { xxxDaa_name: string } };
|
|
32
|
+
// type Test1Expect = { properties: { xxxDaa_name: string } };
|
|
34
33
|
|
|
35
|
-
Checking<Test1, Test1Expect, Test.Pass>;
|
|
34
|
+
// Checking<Test1, Test1Expect, Test.Pass>;
|
|
36
35
|
|
|
37
|
-
type Test2 = ReplacePrefix<{ customEvents: { xxx_name: string } }, "xxxDaa">;
|
|
36
|
+
// type Test2 = ReplacePrefix<{ customEvents: { xxx_name: string } }, "xxxDaa">;
|
|
38
37
|
|
|
39
|
-
type Test2Expect = { customEvents: { xxxDaa_name: string } };
|
|
38
|
+
// type Test2Expect = { customEvents: { xxxDaa_name: string } };
|
|
40
39
|
|
|
41
|
-
Checking<Test2, Test2Expect, Test.Pass>;
|
|
40
|
+
// Checking<Test2, Test2Expect, Test.Pass>;
|
|
42
41
|
|
|
43
|
-
type Test3 = ReplacePrefix<{}, "xxxDaa">;
|
|
42
|
+
// type Test3 = ReplacePrefix<{}, "xxxDaa">;
|
|
44
43
|
|
|
45
|
-
type Test3Expect = {};
|
|
44
|
+
// type Test3Expect = {};
|
|
46
45
|
|
|
47
|
-
Checking<Test3, Test3Expect, Test.Pass>;
|
|
46
|
+
// Checking<Test3, Test3Expect, Test.Pass>;
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
* unionArr: Array as SpecificType<string[] | number[]>,
|
|
11
11
|
* },
|
|
12
12
|
* });
|
|
13
|
-
* type PropConstructor<T> =
|
|
14
|
-
| { (): T }
|
|
15
|
-
| { new (...args: never[]): T & object }
|
|
16
|
-
| { new (...args: string[]): Func }
|
|
17
13
|
* ```
|
|
18
14
|
*/
|
|
19
15
|
export type SpecificType<T = unknown> = { (): T } | { new(...arg: any[]): T };
|
package/tsconfig.json
CHANGED
|
@@ -1,37 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"lib": ["ES2022", "DOM"],
|
|
3
|
+
"lib": ["ES2022", "DOM"], // jest中用到了DOM类型
|
|
4
4
|
"target": "ES2017",
|
|
5
5
|
"module": "ES2022",
|
|
6
|
-
"strict": true,
|
|
6
|
+
"strict": true,
|
|
7
7
|
"strictFunctionTypes": false, // e: Dataset<{ id: string }>会报错。
|
|
8
8
|
"exactOptionalPropertyTypes": true, // 带有?标志的属性类型不在包含undefined
|
|
9
9
|
"skipLibCheck": true, // 跳过声明文件的类型检查(.d.ts),除了你引用的, 默认false(不跳过)。
|
|
10
|
-
"moduleResolution": "
|
|
11
|
-
|
|
10
|
+
"moduleResolution": "Bundler", // 模块解析策略 //5.0 新值 bundler
|
|
11
|
+
"noImplicitAny": true, // 不允许隐式的any类型
|
|
12
12
|
"esModuleInterop": true, // 默认false 将 CommonJS/AMD/UMD 模块视为类似于 ES6 模块,但有缺陷。
|
|
13
13
|
"removeComments": true, // 去除注释
|
|
14
14
|
"noEmit": true,
|
|
15
|
-
"allowJs": true, // 默认false 开启后会保留js文件
|
|
16
|
-
// "diagnostics": true, // 2.65
|
|
17
|
-
// "watch": true,
|
|
18
|
-
// // "experimentalDecorators": true,//实验性质的装饰器
|
|
19
15
|
"noImplicitReturns": true, // 隐式函数返回
|
|
20
|
-
// "resolveJsonModule": true, //import settings from "./settings.json";
|
|
21
16
|
"forceConsistentCasingInFileNames": true, // 区分文件名的大小写
|
|
22
|
-
"noUnusedLocals":
|
|
17
|
+
"noUnusedLocals": true, // 报告未使用局部变量的错误
|
|
23
18
|
"noUnusedParameters": false, // 报告函数中未使用参数的错误
|
|
24
19
|
"suppressImplicitAnyIndexErrors": true, // 为true关闭隐式索引错误,但很激进,建议使用@ts-ignore
|
|
25
20
|
"isolatedModules": true, // 独立模块(必须有导入或导出) 默认false
|
|
26
21
|
"preserveValueImports": true, // 引入类型加type
|
|
27
|
-
"useUnknownInCatchVariables": false, // catch 子句 err为unknown 可以显示指定类型 4.4 --strict
|
|
28
|
-
// "verbatimModuleSyntax": true,
|
|
29
|
-
// "importsNotUsedAsValues":"remove",
|
|
30
22
|
"ignoreDeprecations": "5.0",
|
|
31
|
-
// "noEmitOnError": true, // 错误情况下不编译 开启会导致wtach下报错
|
|
32
23
|
"noFallthroughCasesInSwitch": true, // 报告switch语句中漏接情况的错误
|
|
33
|
-
// 指定加载包的路径,默认加载所有@types下的包 包含上级目录
|
|
34
24
|
"allowSyntheticDefaultImports": true, // esModuleInterop 为true时自动true
|
|
25
|
+
// 指定加载包的路径,默认加载所有@types下的包 包含上级目录
|
|
35
26
|
"types": ["./node_modules/hry-types", "./node_modules/mobx", "jest", "./node_modules/miniprogram-api-typings/"]
|
|
36
27
|
},
|
|
37
28
|
"include": ["**/*.ts"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Data/expected/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,aAAa,EAAE,CAAC;IACd,UAAU,EAAE;QACV,GAAG,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QAEJ,GAAG,EAAE,GAAG;KACT;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Checking } from "hry-types";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
const RootDoc = RootComponent()({
|
|
4
|
-
data: {
|
|
5
|
-
gender: "male",
|
|
6
|
-
num: 123,
|
|
7
|
-
_innernalFields: false,
|
|
8
|
-
},
|
|
9
|
-
methods: {
|
|
10
|
-
foo() {
|
|
11
|
-
Checking;
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
Checking;
|
|
16
|
-
const EmptyDataRootDoc = RootComponent()({
|
|
17
|
-
data: {},
|
|
18
|
-
methods: {
|
|
19
|
-
M1() {
|
|
20
|
-
Checking;
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
Checking;
|
|
25
|
-
const noDataRootDoc = RootComponent()({
|
|
26
|
-
methods: {
|
|
27
|
-
M1() {
|
|
28
|
-
Checking;
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
Checking;
|
|
33
|
-
//# sourceMappingURL=normal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normal.js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Data/expected/normal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAC9B,IAAI,EAAE;QACJ,MAAM,EAAsB,MAAM;QAClC,GAAG,EAAE,GAAG;QACR,eAAe,EAAE,KAAK;KACvB;IACD,OAAO,EAAE;QACP,GAAG;YAED,QAAoE,CAAC;QACvE,CAAC;KACF;CACF,CAAC,CAAC;AASH,QAA4D,CAAC;AAK7D,MAAM,gBAAgB,GAAG,aAAa,EAAE,CAAC;IACvC,IAAI,EAAE,EAAE;IACR,OAAO,EAAE;QACP,EAAE;YAEA,QAAyC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAA6E,CAAC;AAK9E,MAAM,aAAa,GAAG,aAAa,EAAE,CAAC;IACpC,OAAO,EAAE;QACP,EAAE;YAEA,QAAyC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAA0E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { RootComponent } from "../../../../index";
|
|
2
|
-
RootComponent()({
|
|
3
|
-
properties: {
|
|
4
|
-
num: {
|
|
5
|
-
type: Number,
|
|
6
|
-
values: 123,
|
|
7
|
-
},
|
|
8
|
-
bool: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
value: true,
|
|
11
|
-
optionalType: [String],
|
|
12
|
-
},
|
|
13
|
-
union: {
|
|
14
|
-
type: Number,
|
|
15
|
-
value: 123,
|
|
16
|
-
optionalTypes: [String],
|
|
17
|
-
observable: "",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
RootComponent()({
|
|
22
|
-
properties: {
|
|
23
|
-
str: {
|
|
24
|
-
type: String,
|
|
25
|
-
value: 123,
|
|
26
|
-
},
|
|
27
|
-
optionalObj: {
|
|
28
|
-
type: Object,
|
|
29
|
-
value: null,
|
|
30
|
-
},
|
|
31
|
-
str_num: {
|
|
32
|
-
type: String,
|
|
33
|
-
value: 123,
|
|
34
|
-
optionalTypes: [Number],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Properties/expected/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,MAAM,mBAAmB,CAAC;AAIrE,aAAa,EAAE,CAAC;IACd,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,MAAM;YAEZ,MAAM,EAAE,GAAG;SACZ;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAI;YAEX,YAAY,EAAE,CAAC,MAAM,CAAC;SACvB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,aAAa,EAAE,CAAC,MAAM,CAAC;YAEvB,UAAU,EAAE,EAAE;SACf;KACF;CACF,CAAC,CAAC;AAGH,aAAa,EAAE,CAAC;IACd,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,MAAM;YAEZ,KAAK,EAAE,GAAG;SACX;QACD,WAAW,EAAE;YAEX,IAAI,EAAE,MAAiC;YAEvC,KAAK,EAAE,IAAI;SACZ;QACD,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YAEZ,KAAK,EAAE,GAAG;YACV,aAAa,EAAE,CAAC,MAAM,CAAC;SACxB;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalEmpty.js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Properties/expected/normalEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC;IAC/B,UAAU,EAAE,EAAE;IACd,OAAO,EAAE;QACP,GAAG;YAED,QAAyC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAAsE,CAAC;AAKvE,MAAM,YAAY,GAAG,aAAa,EAAE,CAAC;IACnC,OAAO,EAAE;QACP,GAAG;YAED,QAAyC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAAsE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Checking } from "hry-types";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
const OptionalDoc = RootComponent()({
|
|
4
|
-
properties: {
|
|
5
|
-
optional_num: {
|
|
6
|
-
type: Number,
|
|
7
|
-
value: 123,
|
|
8
|
-
},
|
|
9
|
-
optional_gender: {
|
|
10
|
-
type: String,
|
|
11
|
-
value: "male",
|
|
12
|
-
},
|
|
13
|
-
optional_tuple: {
|
|
14
|
-
type: Array,
|
|
15
|
-
value: [1, "a", true],
|
|
16
|
-
},
|
|
17
|
-
optional_obj: {
|
|
18
|
-
type: Object,
|
|
19
|
-
value: {
|
|
20
|
-
id: "id",
|
|
21
|
-
age: 20,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
optional_objOrNull: {
|
|
25
|
-
type: Object,
|
|
26
|
-
value: null,
|
|
27
|
-
},
|
|
28
|
-
optional_union: {
|
|
29
|
-
type: String,
|
|
30
|
-
value: "string",
|
|
31
|
-
optionalTypes: [Number],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
methods: {
|
|
35
|
-
foo() {
|
|
36
|
-
Checking;
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
Checking;
|
|
41
|
-
const OptionalDocWhenIsPage = RootComponent()({
|
|
42
|
-
isPage: true,
|
|
43
|
-
properties: {
|
|
44
|
-
optional_num: {
|
|
45
|
-
type: Number,
|
|
46
|
-
value: 123,
|
|
47
|
-
},
|
|
48
|
-
optional_gender: {
|
|
49
|
-
type: String,
|
|
50
|
-
value: "male",
|
|
51
|
-
},
|
|
52
|
-
optional_tuple: {
|
|
53
|
-
type: Array,
|
|
54
|
-
value: [1, "a", true],
|
|
55
|
-
},
|
|
56
|
-
optional_obj: {
|
|
57
|
-
type: Object,
|
|
58
|
-
value: {
|
|
59
|
-
id: "id",
|
|
60
|
-
age: 20,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
optional_objOrNull: {
|
|
64
|
-
type: Object,
|
|
65
|
-
value: null,
|
|
66
|
-
},
|
|
67
|
-
optional_union: {
|
|
68
|
-
type: String,
|
|
69
|
-
value: "string",
|
|
70
|
-
optionalTypes: [Number],
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
methods: {
|
|
74
|
-
foo() {
|
|
75
|
-
Checking;
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
Checking;
|
|
80
|
-
//# sourceMappingURL=normalOptional.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalOptional.js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Properties/expected/normalOptional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAMtC,MAAM,WAAW,GAAG,aAAa,EAAE,CAAC;IAClC,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;SACX;QACD,eAAe,EAAE;YACf,IAAI,EAAE,MAAyC;YAC/C,KAAK,EAAE,MAAM;SACd;QACD,cAAc,EAAE;YACd,IAAI,EAAE,KAA2D;YACjE,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAA8B;SACnD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAiC;YACvC,KAAK,EAAE;gBACL,EAAE,EAAE,IAAI;gBACR,GAAG,EAAE,EAAE;aACR;SACF;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,MAAwC;YAC9C,KAAK,EAAE,IAAI;SACZ;QACD,cAAc,EAAE;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE,CAAC,MAAM,CAAC;SACxB;KACF;IACD,OAAO,EAAE;QACP,GAAG;YAED,QAWC,CAAC;QACJ,CAAC;KACF;CACF,CAAC,CAAC;AAaH,QAA0E,CAAC;AAG3E,MAAM,qBAAqB,GAAG,aAAa,EAAE,CAAC;IAC5C,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;SACX;QACD,eAAe,EAAE;YACf,IAAI,EAAE,MAAyC;YAC/C,KAAK,EAAE,MAAM;SACd;QACD,cAAc,EAAE;YACd,IAAI,EAAE,KAA2D;YACjE,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAA8B;SACnD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAiC;YACvC,KAAK,EAAE;gBACL,EAAE,EAAE,IAAI;gBACR,GAAG,EAAE,EAAE;aACR;SACF;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,MAAwC;YAC9C,KAAK,EAAE,IAAI;SACZ;QACD,cAAc,EAAE;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,QAAQ;YACf,aAAa,EAAE,CAAC,MAAM,CAAC;SACxB;KACF;IACD,OAAO,EAAE;QACP,GAAG;YAED,QAWC,CAAC;QACJ,CAAC;KACF;CACF,CAAC,CAAC;AAaH,QAA8F,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { SpecificType } from "../../../../types/SpecificType";
|
|
2
|
-
export type Mock_User = {
|
|
3
|
-
id: string;
|
|
4
|
-
age?: number;
|
|
5
|
-
};
|
|
6
|
-
export type Mock_Cart = {
|
|
7
|
-
id: string;
|
|
8
|
-
selectedCount: number;
|
|
9
|
-
};
|
|
10
|
-
export declare const mock_requiredSingle: {
|
|
11
|
-
str: StringConstructor;
|
|
12
|
-
num: NumberConstructor;
|
|
13
|
-
bool: BooleanConstructor;
|
|
14
|
-
arr: ArrayConstructor;
|
|
15
|
-
obj: ObjectConstructor;
|
|
16
|
-
tuple: SpecificType<[string, number, boolean]>;
|
|
17
|
-
union_str: SpecificType<"male" | "female">;
|
|
18
|
-
union_num: SpecificType<0 | 1 | 2>;
|
|
19
|
-
union_bool: SpecificType<boolean>;
|
|
20
|
-
union_arr: SpecificType<string[] | number[]>;
|
|
21
|
-
union_obj: SpecificType<Mock_User | Mock_Cart>;
|
|
22
|
-
};
|
|
23
|
-
export declare const mock_requiredUnion: {
|
|
24
|
-
union_str_num_bool: {
|
|
25
|
-
type: StringConstructor;
|
|
26
|
-
optionalTypes: (NumberConstructor | BooleanConstructor)[];
|
|
27
|
-
};
|
|
28
|
-
union_literalStr_Literalnum: {
|
|
29
|
-
type: SpecificType<"male" | "female">;
|
|
30
|
-
optionalTypes: SpecificType<0 | 1 | 2>[];
|
|
31
|
-
};
|
|
32
|
-
union_mockUser_num: {
|
|
33
|
-
type: SpecificType<Mock_User>;
|
|
34
|
-
optionalTypes: NumberConstructor[];
|
|
35
|
-
};
|
|
36
|
-
union_num_mockUser: {
|
|
37
|
-
type: NumberConstructor;
|
|
38
|
-
optionalTypes: SpecificType<Mock_User>[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export declare const mock_requiredTypes: {
|
|
42
|
-
union_str_num_bool: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
optionalTypes: (NumberConstructor | BooleanConstructor)[];
|
|
45
|
-
};
|
|
46
|
-
union_literalStr_Literalnum: {
|
|
47
|
-
type: SpecificType<"male" | "female">;
|
|
48
|
-
optionalTypes: SpecificType<0 | 1 | 2>[];
|
|
49
|
-
};
|
|
50
|
-
union_mockUser_num: {
|
|
51
|
-
type: SpecificType<Mock_User>;
|
|
52
|
-
optionalTypes: NumberConstructor[];
|
|
53
|
-
};
|
|
54
|
-
union_num_mockUser: {
|
|
55
|
-
type: NumberConstructor;
|
|
56
|
-
optionalTypes: SpecificType<Mock_User>[];
|
|
57
|
-
};
|
|
58
|
-
str: StringConstructor;
|
|
59
|
-
num: NumberConstructor;
|
|
60
|
-
bool: BooleanConstructor;
|
|
61
|
-
arr: ArrayConstructor;
|
|
62
|
-
obj: ObjectConstructor;
|
|
63
|
-
tuple: SpecificType<[string, number, boolean]>;
|
|
64
|
-
union_str: SpecificType<"male" | "female">;
|
|
65
|
-
union_num: SpecificType<0 | 1 | 2>;
|
|
66
|
-
union_bool: SpecificType<boolean>;
|
|
67
|
-
union_arr: SpecificType<string[] | number[]>;
|
|
68
|
-
union_obj: SpecificType<Mock_User | Mock_Cart>;
|
|
69
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Checking } from "hry-types";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
export const mock_requiredSingle = {
|
|
4
|
-
str: String,
|
|
5
|
-
num: Number,
|
|
6
|
-
bool: Boolean,
|
|
7
|
-
arr: Array,
|
|
8
|
-
obj: Object,
|
|
9
|
-
tuple: Array,
|
|
10
|
-
union_str: String,
|
|
11
|
-
union_num: Number,
|
|
12
|
-
union_bool: Boolean,
|
|
13
|
-
union_arr: Array,
|
|
14
|
-
union_obj: Object,
|
|
15
|
-
};
|
|
16
|
-
export const mock_requiredUnion = {
|
|
17
|
-
union_str_num_bool: {
|
|
18
|
-
type: String,
|
|
19
|
-
optionalTypes: [Number, Boolean],
|
|
20
|
-
},
|
|
21
|
-
union_literalStr_Literalnum: {
|
|
22
|
-
type: String,
|
|
23
|
-
optionalTypes: [Number],
|
|
24
|
-
},
|
|
25
|
-
union_mockUser_num: {
|
|
26
|
-
type: Object,
|
|
27
|
-
optionalTypes: [Number],
|
|
28
|
-
},
|
|
29
|
-
union_num_mockUser: {
|
|
30
|
-
type: Number,
|
|
31
|
-
optionalTypes: [Object],
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
export const mock_requiredTypes = Object.assign(Object.assign({}, mock_requiredSingle), mock_requiredUnion);
|
|
35
|
-
const RequiredDoc = RootComponent()({
|
|
36
|
-
properties: mock_requiredTypes,
|
|
37
|
-
methods: {
|
|
38
|
-
foo() {
|
|
39
|
-
Checking;
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
Checking;
|
|
44
|
-
//# sourceMappingURL=normalRequired.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalRequired.js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Properties/expected/normalRequired.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAIhD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAsBtC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,KAA2D;IAClE,SAAS,EAAE,MAAyC;IACpD,SAAS,EAAE,MAAiC;IAC5C,UAAU,EAAE,OAAqC;IACjD,SAAS,EAAE,KAA0C;IACrD,SAAS,EAAE,MAA6C;CAChB,CAAC;AAK3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KACjC;IACD,2BAA2B,EAAE;QAC3B,IAAI,EAAE,MAAyC;QAC/C,aAAa,EAAE,CAAC,MAAiC,CAAC;KACnD;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAiC;QACvC,aAAa,EAAE,CAAC,MAAM,CAAC;KACxB;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,aAAa,EAAE,CAAC,MAAiC,CAAC;KACnD;CACsC,CAAC;AAK1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,gCAC7B,mBAAmB,GACnB,kBAAkB,CACiB,CAAC;AAoBzC,MAAM,WAAW,GAAG,aAAa,EAAE,CAAC;IAClC,UAAU,EAAE,kBAAkB;IAC9B,OAAO,EAAE;QACP,GAAG;YAED,QAAyE,CAAC;QAC5E,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAA2E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Checking } from "hry-types";
|
|
2
|
-
import { RootComponent } from "../..";
|
|
3
|
-
const emptyObj = RootComponent()({
|
|
4
|
-
properties: {},
|
|
5
|
-
methods: {
|
|
6
|
-
foo() {
|
|
7
|
-
Checking;
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
Checking;
|
|
12
|
-
const noProperties = RootComponent()({
|
|
13
|
-
methods: {
|
|
14
|
-
foo() {
|
|
15
|
-
Checking;
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
Checking;
|
|
20
|
-
//# sourceMappingURL=normalEmpty.test..js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalEmpty.test..js","sourceRoot":"","sources":["../../../../../src/api/RootComponent/Properties/test/normalEmpty.test..ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC;IAC/B,UAAU,EAAE,EAAE;IACd,OAAO,EAAE;QACP,GAAG;YAED,QAAyC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAIa,CAAC;AAKd,MAAM,YAAY,GAAG,aAAa,EAAE,CAAC;IACnC,OAAO,EAAE;QACP,GAAG;YAED,QAAyC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC;AAGH,QAIa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RestorePropTypeOfList.js","sourceRoot":"","sources":["../../src/types/RestorePropTypeOfList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,WAAW,CAAC;AAmBhD,QAAuC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computedUpdater.js","sourceRoot":"","sources":["../../src/utils/computedUpdater.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,UAAU,eAAe,CAAiB,SAAS,GAAG,KAAK;IAK/D,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAGzC,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YAGnD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC9B,OAAO,GAAG,IAAI,CAAC;gBAEf,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,cAAc,GAAyB,EAAE,CAAC;YAEhD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;gBACrC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC;aAC3C,CAAC,CAAC;YAGH,IAAI,CAAC,OAAO,CAAC;gBACX,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;aACxB,CAAC,CAAC;YAEH,SAAS,GAAG,IAAI,CAAC;YAGjB,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,WAAW,GAAG,cAAc,CAAC;YAGzD,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getPathsValue.js","sourceRoot":"","sources":["../../src/utils/getPathsValue.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAiB,KAAe;IAC3D,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAQ,EAAE,IAAI,EAAE,EAAE;QAErC,IAAI,CAAC;YACH,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { deepClone } from "./deepClone";
|
|
2
|
-
import { getPathsValue } from "./getPathsValue";
|
|
3
|
-
export function initWatchOldValue(watchConfig) {
|
|
4
|
-
const watchOldValue = {};
|
|
5
|
-
for (const key in watchConfig) {
|
|
6
|
-
watchOldValue[key] = deepClone(getPathsValue.call(this, key.split(".")));
|
|
7
|
-
}
|
|
8
|
-
return watchOldValue;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=initWatchOldValue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initWatchOldValue.js","sourceRoot":"","sources":["../../src/utils/initWatchOldValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,UAAU,iBAAiB,CAAiB,WAAmB;IACnE,MAAM,aAAa,GAAG,EAAE,CAAC;IACzB,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Func } from "hry-types/src/Misc/Func";
|
|
2
|
-
import type { ComponentOptions, FuncConfig } from "../api/DefineComponent";
|
|
3
|
-
import type { PageInstance } from "../api/RootComponent/Instance/RootComponentInstance";
|
|
4
|
-
import type { RootComponentDoc } from "../api/RootComponent/RootComponentDoc";
|
|
5
|
-
import type { SubComponentOptions } from "../api/SubComponent";
|
|
6
|
-
import type { Instance } from "../behaviors/BComputedAndWatch/types";
|
|
7
|
-
import { INNERMARKER } from "./InnerMarker";
|
|
8
|
-
export declare function rootComponentFieldHandle(rootComponentConfig: RootComponentDoc, componentOptions: ComponentOptions, funcConfig: FuncConfig): void;
|
|
9
|
-
export declare function subComponentsHandle(componentOptions: ComponentOptions, subComponents: SubComponentOptions[], funcConfig: FuncConfig): void;
|
|
10
|
-
export declare function funcConfigHandle(componentOptions: ComponentOptions, isPage: boolean | undefined, funcConfig: FuncConfig): void;
|
|
11
|
-
export declare function createdHijack(componentOptions: ComponentOptions, before?: Func[], after?: Func[]): void;
|
|
12
|
-
export declare function addComputedFieldToMethods(componentOptions: ComponentOptions): void;
|
|
13
|
-
export declare function attachedHijack(componentOptions: ComponentOptions, beforeHandleList?: Func[], afterHandleList?: Func[]): void;
|
|
14
|
-
export declare function detachedHijack(componentOptions: ComponentOptions, beforeHandleList?: Func[], afterHandleList?: Func[]): void;
|
|
15
|
-
export declare function storeHandle(this: Instance): void;
|
|
16
|
-
export declare function excludeFields(config: object, excludeKeys: string[]): void;
|
|
17
|
-
export declare function onLoadHijack(options: ComponentOptions, before: Func[], after?: Func[]): void;
|
|
18
|
-
export declare function onLoadReceivedDataHandle(this: PageInstance, option: Record<typeof INNERMARKER.url, string>): void;
|