@solar-kit/planets 1.0.2 → 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/earth/model.d.ts +1 -1
- package/earth/model.js +33 -1
- package/earth/model.js.map +1 -1
- package/package.json +1 -1
- package/sun/index.d.ts +1 -0
- package/sun/index.js +1 -0
- package/sun/index.js.map +1 -1
- package/sun/model.d.ts +5 -0
- package/sun/model.js +5 -1
- package/sun/model.js.map +1 -1
- package/sun/operator.d.ts +4 -1
- package/sun/operator.js +17 -1
- package/sun/operator.js.map +1 -1
- package/sun/wx.d.ts +8 -0
- package/sun/wx.js +2 -0
- package/sun/wx.js.map +1 -0
package/earth/model.d.ts
CHANGED
package/earth/model.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Origin;
|
|
2
|
+
(function (Origin) {
|
|
3
|
+
/** 优鲜 */
|
|
4
|
+
Origin[Origin["Fresh"] = 0] = "Fresh";
|
|
5
|
+
/** 农资 */
|
|
6
|
+
Origin[Origin["Material"] = 1] = "Material";
|
|
7
|
+
/** 农作物 */
|
|
8
|
+
Origin[Origin["Crop"] = 2] = "Crop";
|
|
9
|
+
/** 家禽 */
|
|
10
|
+
Origin[Origin["Poultry"] = 3] = "Poultry";
|
|
11
|
+
/** 家畜 */
|
|
12
|
+
Origin[Origin["Animal"] = 4] = "Animal";
|
|
13
|
+
/** 海鲜水产 */
|
|
14
|
+
Origin[Origin["Aquatic"] = 5] = "Aquatic";
|
|
15
|
+
/** 病虫害 */
|
|
16
|
+
Origin[Origin["Disease"] = 6] = "Disease";
|
|
17
|
+
/** 办公资产 */
|
|
18
|
+
Origin[Origin["Asset"] = 7] = "Asset";
|
|
19
|
+
/** 种子 */
|
|
20
|
+
Origin[Origin["Seed"] = 8] = "Seed";
|
|
21
|
+
/** 农耗品 */
|
|
22
|
+
Origin[Origin["Tool"] = 9] = "Tool";
|
|
23
|
+
/** 农药 */
|
|
24
|
+
Origin[Origin["Pesticide"] = 10] = "Pesticide";
|
|
25
|
+
/** 肥料 */
|
|
26
|
+
Origin[Origin["Fertilizer"] = 11] = "Fertilizer";
|
|
27
|
+
/** 食材 */
|
|
28
|
+
Origin[Origin["Food"] = 12] = "Food";
|
|
29
|
+
/** 单位 */
|
|
30
|
+
Origin[Origin["Unit"] = 13] = "Unit";
|
|
31
|
+
/** 蔬菜 */
|
|
32
|
+
Origin[Origin["Vegetable"] = 14] = "Vegetable";
|
|
33
|
+
})(Origin || (Origin = {}));
|
|
2
34
|
//# sourceMappingURL=model.js.map
|
package/earth/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../packages/planets/src/earth/model.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../packages/planets/src/earth/model.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,MA+BX;AA/BD,WAAY,MAAM;IAChB,SAAS;IACT,qCAAK,CAAA;IACL,SAAS;IACT,2CAAQ,CAAA;IACR,UAAU;IACV,mCAAI,CAAA;IACJ,SAAS;IACT,yCAAO,CAAA;IACP,SAAS;IACT,uCAAM,CAAA;IACN,WAAW;IACX,yCAAO,CAAA;IACP,UAAU;IACV,yCAAO,CAAA;IACP,WAAW;IACX,qCAAK,CAAA;IACL,SAAS;IACT,mCAAI,CAAA;IACJ,UAAU;IACV,mCAAI,CAAA;IACJ,SAAS;IACT,8CAAS,CAAA;IACT,SAAS;IACT,gDAAU,CAAA;IACV,SAAS;IACT,oCAAI,CAAA;IACJ,SAAS;IACT,oCAAI,CAAA;IACJ,SAAS;IACT,8CAAS,CAAA;AACX,CAAC,EA/BW,MAAM,KAAN,MAAM,QA+BjB"}
|
package/package.json
CHANGED
package/sun/index.d.ts
CHANGED
package/sun/index.js
CHANGED
package/sun/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,MAAM,CAAA"}
|
package/sun/model.d.ts
CHANGED
package/sun/model.js
CHANGED
package/sun/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/model.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/model.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAkB,MAGjB;AAHD,WAAkB,MAAM;IACtB,qCAAK,CAAA;IACL,iCAAG,CAAA;AACL,CAAC,EAHiB,MAAM,KAAN,MAAM,QAGvB"}
|
package/sun/operator.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
1
2
|
import { Result } from './model';
|
|
2
3
|
/**
|
|
3
4
|
* 根据 code 过滤 result
|
|
4
5
|
* @param code 默认为 0
|
|
5
6
|
*/
|
|
6
|
-
export declare function filterResult<T extends Result<any>>(code?: number):
|
|
7
|
+
export declare function filterResult<T extends Result<any>>(code?: number): MonoTypeOperatorFunction<T>;
|
|
7
8
|
/**
|
|
8
9
|
* 解包 result 里的 data 出来
|
|
9
10
|
*/
|
|
10
11
|
export declare function unpackResult<T extends Result<any>>(): import("rxjs").OperatorFunction<T, T["data"]>;
|
|
12
|
+
export declare function tapResult<T extends Result<any>>(next: (value: T) => void): MonoTypeOperatorFunction<T>;
|
|
13
|
+
export declare function tapResult<T extends Result<any>>(code: number, next: (value: T) => void): MonoTypeOperatorFunction<T>;
|
package/sun/operator.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { filter, map } from 'rxjs';
|
|
1
|
+
import { filter, map, tap } from 'rxjs';
|
|
2
2
|
/**
|
|
3
3
|
* 根据 code 过滤 result
|
|
4
4
|
* @param code 默认为 0
|
|
@@ -12,4 +12,20 @@ export function filterResult(code = 0) {
|
|
|
12
12
|
export function unpackResult() {
|
|
13
13
|
return map(({ data }) => data);
|
|
14
14
|
}
|
|
15
|
+
export function tapResult(codeOrNext, next) {
|
|
16
|
+
let code = 0;
|
|
17
|
+
let callback;
|
|
18
|
+
if (typeof codeOrNext === 'number') {
|
|
19
|
+
code = codeOrNext;
|
|
20
|
+
callback = next;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
callback = codeOrNext;
|
|
24
|
+
}
|
|
25
|
+
return tap(value => {
|
|
26
|
+
if (value.code === code) {
|
|
27
|
+
callback(value);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
15
31
|
//# sourceMappingURL=operator.js.map
|
package/sun/operator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"operator.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAA4B,GAAG,EAAE,MAAM,MAAM,CAAC;AAGlE;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAwB,IAAI,GAAG,CAAC;IAC1D,OAAO,MAAM,CAAI,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,GAAG,CAAe,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAID,MAAM,UAAU,SAAS,CAAwB,UAAyC,EAAE,IAAyB;IACnH,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,IAAI,QAA4B,CAAA;IAEhC,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,IAAI,GAAG,UAAU,CAAA;QACjB,QAAQ,GAAG,IAAK,CAAA;IAClB,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,UAAU,CAAA;IACvB,CAAC;IAED,OAAO,GAAG,CAAI,KAAK,CAAC,EAAE;QACpB,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACxB,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/sun/wx.d.ts
ADDED
package/sun/wx.js
ADDED
package/sun/wx.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wx.js","sourceRoot":"","sources":["../../../../packages/planets/src/sun/wx.ts"],"names":[],"mappings":""}
|