@kcuf/helper-data 0.2.1 → 0.2.2
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/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './helper';\n\nexport type {\n IBaseParamsPage as BaseParamsPage,\n IBaseParamsPageWithQ as BaseParamsPageWithQ,\n
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from './helper';\n\nexport type {\n // 参数标准化\n IBaseParamsPage as BaseParamsPage,\n IBaseParamsPageWithQ as BaseParamsPageWithQ,\n IBaseParamsCursorPage as BaseParamsCursorPage,\n IBaseParamsCursorPageWithQ as BaseParamsCursorPageWithQ,\n // 数据标准化\n IBaseDataId as BaseDataId,\n IBaseDataName as BaseDataName,\n IBaseDataIdName as BaseDataIdName,\n IBaseDataTitle as BaseDataTitle,\n IBaseDataDescription as BaseDataDescription,\n IBaseDataContent as BaseDataContent,\n IBaseDataTimeCreated as BaseDataTimeCreated,\n IBaseDataTimeUpdated as BaseDataTimeModified,\n IBaseDataTimes as BaseDataTimes,\n IBaseDataCreator as BaseDataCreator,\n IBaseDataUpdater as BaseDataUpdater,\n // 数据标准化(泛型)\n IPagedList as PagedList,\n IPagedCursorList as PagedCursorList,\n IPagedListUncertain as PagedListUncertain\n} from './types';\n"],"mappings":"AAAA,cAAc,UAAU;AAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-params.js","names":[],"sources":["../../../src/types/base-params.ts"],"sourcesContent":["/**\n * 分页参数标准化\n */\nexport interface IBaseParamsPage {\n page?: number;\n pageSize?: number;\n}\n\n/**\n * 带关键词的分页参数标准化\n */\nexport interface IBaseParamsPageWithQ extends IBaseParamsPage {\n q?: string; // 前端「搜素关键字」参数统一为 q\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"base-params.js","names":[],"sources":["../../../src/types/base-params.ts"],"sourcesContent":["/**\n * 分页参数标准化\n */\nexport interface IBaseParamsPage {\n page?: number;\n pageSize?: number;\n}\n\n/**\n * 带关键词的分页参数标准化\n */\nexport interface IBaseParamsPageWithQ extends IBaseParamsPage {\n q?: string; // 前端「搜素关键字」参数统一为 q\n}\n\n/**\n * 游标分页参数标准化\n */\nexport interface IBaseParamsCursorPage {\n cursor?: string;\n pageSize?: number;\n}\n\n/**\n * 带关键词的游标分页参数标准化\n */\nexport interface IBaseParamsCursorPageWithQ extends IBaseParamsCursorPage {\n q?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","names":[],"sources":["../../../src/types/generic.ts"],"sourcesContent":["/**\n * 分页数据标准化\n */\nexport interface IPagedList<T> {\n total: number;\n page: number;\n pageSize: number;\n list: T[];\n}\n\n/**\n * 某些分页接口,后端给的数据只有列表,前端需根据返回转成非确定分页列表数据\n */\nexport interface IPagedListUncertain<T> extends Omit<IPagedList<T>, 'total'> {\n hasMore: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"generic.js","names":[],"sources":["../../../src/types/generic.ts"],"sourcesContent":["/**\n * 分页数据标准化\n */\nexport interface IPagedList<T> {\n total: number;\n page: number;\n pageSize: number;\n list: T[];\n}\n\n/**\n * 游标分页数据标准化\n */\nexport interface IPagedCursorList<T> {\n nextCursor: string;\n list: T[];\n}\n\n/**\n * 某些分页接口,后端给的数据只有列表,前端需根据返回转成非确定分页列表数据\n */\nexport interface IPagedListUncertain<T> extends Omit<IPagedList<T>, 'total'> {\n hasMore: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './helper';
|
|
2
|
-
export type { IBaseParamsPage as BaseParamsPage, IBaseParamsPageWithQ as BaseParamsPageWithQ, IBaseDataId as BaseDataId, IBaseDataName as BaseDataName, IBaseDataIdName as BaseDataIdName, IBaseDataTitle as BaseDataTitle, IBaseDataDescription as BaseDataDescription, IBaseDataContent as BaseDataContent, IBaseDataTimeCreated as BaseDataTimeCreated, IBaseDataTimeUpdated as BaseDataTimeModified, IBaseDataTimes as BaseDataTimes, IBaseDataCreator as BaseDataCreator, IBaseDataUpdater as BaseDataUpdater, IPagedList as PagedList, IPagedListUncertain as PagedListUncertain } from './types';
|
|
2
|
+
export type { IBaseParamsPage as BaseParamsPage, IBaseParamsPageWithQ as BaseParamsPageWithQ, IBaseParamsCursorPage as BaseParamsCursorPage, IBaseParamsCursorPageWithQ as BaseParamsCursorPageWithQ, IBaseDataId as BaseDataId, IBaseDataName as BaseDataName, IBaseDataIdName as BaseDataIdName, IBaseDataTitle as BaseDataTitle, IBaseDataDescription as BaseDataDescription, IBaseDataContent as BaseDataContent, IBaseDataTimeCreated as BaseDataTimeCreated, IBaseDataTimeUpdated as BaseDataTimeModified, IBaseDataTimes as BaseDataTimes, IBaseDataCreator as BaseDataCreator, IBaseDataUpdater as BaseDataUpdater, IPagedList as PagedList, IPagedCursorList as PagedCursorList, IPagedListUncertain as PagedListUncertain } from './types';
|
|
@@ -11,3 +11,16 @@ export interface IBaseParamsPage {
|
|
|
11
11
|
export interface IBaseParamsPageWithQ extends IBaseParamsPage {
|
|
12
12
|
q?: string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* 游标分页参数标准化
|
|
16
|
+
*/
|
|
17
|
+
export interface IBaseParamsCursorPage {
|
|
18
|
+
cursor?: string;
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 带关键词的游标分页参数标准化
|
|
23
|
+
*/
|
|
24
|
+
export interface IBaseParamsCursorPageWithQ extends IBaseParamsCursorPage {
|
|
25
|
+
q?: string;
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kcuf/helper-data",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Data normalizer helpers and loading stuff to make all frontend data processing sane.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/cli": "^7.28.3",
|
|
26
|
-
"@babel/core": "^7.28.
|
|
26
|
+
"@babel/core": "^7.28.4",
|
|
27
27
|
"@babel/plugin-transform-runtime": "^7.28.3",
|
|
28
28
|
"@babel/preset-env": "^7.28.3",
|
|
29
29
|
"@babel/preset-typescript": "^7.27.1",
|
|
30
30
|
"rimraf": "^6.0.1",
|
|
31
|
-
"typescript": "^5.9.
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
32
|
"@kcuf/ts-config": "^0.0.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|