@webiny/app-utils 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e
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/README.md +6 -13
- package/features/List/FilterFeature.d.ts +11 -0
- package/features/List/FilterFeature.js +26 -0
- package/features/List/FilterFeature.js.map +1 -0
- package/features/List/ListQueryParamsRepository.d.ts +18 -0
- package/features/List/ListQueryParamsRepository.js +68 -0
- package/features/List/ListQueryParamsRepository.js.map +1 -0
- package/features/List/LoadMoreFeature.d.ts +13 -0
- package/features/List/LoadMoreFeature.js +28 -0
- package/features/List/LoadMoreFeature.js.map +1 -0
- package/features/List/LoadingRepository.d.ts +15 -0
- package/features/List/LoadingRepository.js +48 -0
- package/features/List/LoadingRepository.js.map +1 -0
- package/features/List/SearchFeature.d.ts +10 -0
- package/features/List/SearchFeature.js +20 -0
- package/features/List/SearchFeature.js.map +1 -0
- package/features/List/SortFeature.d.ts +10 -0
- package/features/List/SortFeature.js +23 -0
- package/features/List/SortFeature.js.map +1 -0
- package/features/List/abstractions.d.ts +73 -0
- package/features/List/abstractions.js +11 -0
- package/features/List/abstractions.js.map +1 -0
- package/features/List/feature.d.ts +8 -0
- package/features/List/feature.js +30 -0
- package/features/List/feature.js.map +1 -0
- package/fta/Domain/Models/Meta/Meta.js +17 -16
- package/fta/Domain/Models/Meta/Meta.js.map +1 -1
- package/fta/Domain/Models/Meta/MetaMapper.d.ts +1 -1
- package/fta/Domain/Models/Meta/MetaMapper.js +9 -8
- package/fta/Domain/Models/Meta/MetaMapper.js.map +1 -1
- package/fta/Domain/Models/Meta/index.d.ts +2 -2
- package/fta/Domain/Models/Meta/index.js +2 -4
- package/fta/Domain/Models/Sorting/Sorting.js +9 -8
- package/fta/Domain/Models/Sorting/Sorting.js.map +1 -1
- package/fta/Domain/Models/Sorting/SortingMapper.d.ts +1 -1
- package/fta/Domain/Models/Sorting/SortingMapper.js +27 -40
- package/fta/Domain/Models/Sorting/SortingMapper.js.map +1 -1
- package/fta/Domain/Models/Sorting/index.d.ts +2 -2
- package/fta/Domain/Models/Sorting/index.js +2 -4
- package/fta/Domain/Models/index.d.ts +2 -2
- package/fta/Domain/Models/index.js +2 -4
- package/fta/Domain/Repositories/Loading/ILoadingRepository.d.ts +1 -0
- package/fta/Domain/Repositories/Loading/ILoadingRepository.js +0 -3
- package/fta/Domain/Repositories/Loading/LoadingRepository.d.ts +1 -1
- package/fta/Domain/Repositories/Loading/LoadingRepository.js +39 -29
- package/fta/Domain/Repositories/Loading/LoadingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.d.ts +1 -1
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.js +14 -13
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Loading/index.d.ts +3 -3
- package/fta/Domain/Repositories/Loading/index.js +2 -5
- package/fta/Domain/Repositories/Meta/IMetaRepository.d.ts +1 -1
- package/fta/Domain/Repositories/Meta/IMetaRepository.js +0 -3
- package/fta/Domain/Repositories/Meta/MetaRepository.d.ts +2 -2
- package/fta/Domain/Repositories/Meta/MetaRepository.js +33 -39
- package/fta/Domain/Repositories/Meta/MetaRepository.js.map +1 -1
- package/fta/Domain/Repositories/Meta/MetaRepositoryFactory.d.ts +1 -1
- package/fta/Domain/Repositories/Meta/MetaRepositoryFactory.js +14 -13
- package/fta/Domain/Repositories/Meta/MetaRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Meta/index.d.ts +3 -3
- package/fta/Domain/Repositories/Meta/index.js +2 -5
- package/fta/Domain/Repositories/Sorting/ISortingRepository.d.ts +1 -1
- package/fta/Domain/Repositories/Sorting/ISortingRepository.js +0 -3
- package/fta/Domain/Repositories/Sorting/SortingRepository.d.ts +2 -2
- package/fta/Domain/Repositories/Sorting/SortingRepository.js +12 -11
- package/fta/Domain/Repositories/Sorting/SortingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.d.ts +1 -1
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.js +14 -13
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/index.d.ts +3 -3
- package/fta/Domain/Repositories/Sorting/index.js +2 -5
- package/fta/Domain/Repositories/index.d.ts +3 -3
- package/fta/Domain/Repositories/index.js +3 -5
- package/fta/Domain/index.d.ts +2 -2
- package/fta/Domain/index.js +2 -4
- package/fta/index.d.ts +1 -1
- package/fta/index.js +1 -3
- package/index.d.ts +1 -1
- package/index.js +1 -3
- package/package.json +15 -13
- package/fta/Domain/Models/Meta/index.js.map +0 -1
- package/fta/Domain/Models/Sorting/index.js.map +0 -1
- package/fta/Domain/Models/index.js.map +0 -1
- package/fta/Domain/Repositories/Loading/ILoadingRepository.js.map +0 -1
- package/fta/Domain/Repositories/Loading/index.js.map +0 -1
- package/fta/Domain/Repositories/Meta/IMetaRepository.js.map +0 -1
- package/fta/Domain/Repositories/Meta/index.js.map +0 -1
- package/fta/Domain/Repositories/Sorting/ISortingRepository.js.map +0 -1
- package/fta/Domain/Repositories/Sorting/index.js.map +0 -1
- package/fta/Domain/Repositories/index.js.map +0 -1
- package/fta/Domain/index.js.map +0 -1
- package/fta/index.js.map +0 -1
- package/index.js.map +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { SortingRepository } from "./SortingRepository";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { SortingRepository } from "./SortingRepository.js";
|
|
2
|
+
class SortingRepositoryFactory {
|
|
3
|
+
getRepository(namespace) {
|
|
4
|
+
const cacheKey = this.getCacheKey(namespace);
|
|
5
|
+
if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SortingRepository());
|
|
6
|
+
return this.cache.get(cacheKey);
|
|
7
|
+
}
|
|
8
|
+
getCacheKey(namespace) {
|
|
9
|
+
return namespace ?? Date.now().toString();
|
|
10
|
+
}
|
|
11
|
+
constructor(){
|
|
12
|
+
this.cache = new Map();
|
|
8
13
|
}
|
|
9
|
-
return this.cache.get(cacheKey);
|
|
10
|
-
}
|
|
11
|
-
getCacheKey(namespace) {
|
|
12
|
-
return namespace ?? Date.now().toString();
|
|
13
|
-
}
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
const sortRepositoryFactory = new SortingRepositoryFactory();
|
|
16
|
+
export { SortingRepositoryFactory, sortRepositoryFactory };
|
|
16
17
|
|
|
17
18
|
//# sourceMappingURL=SortingRepositoryFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"fta/Domain/Repositories/Sorting/SortingRepositoryFactory.js","sources":["../../../../../src/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.ts"],"sourcesContent":["import { SortingRepository } from \"./SortingRepository.js\";\nimport type { ISortingRepository } from \"~/fta/index.js\";\n\nexport class SortingRepositoryFactory {\n private cache: Map<string, ISortingRepository> = new Map();\n\n getRepository(namespace?: string) {\n const cacheKey = this.getCacheKey(namespace);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SortingRepository());\n }\n\n return this.cache.get(cacheKey) as ISortingRepository;\n }\n\n private getCacheKey(namespace?: string) {\n return namespace ?? Date.now().toString();\n }\n}\n\nexport const sortRepositoryFactory = new SortingRepositoryFactory();\n"],"names":["SortingRepositoryFactory","namespace","cacheKey","SortingRepository","Date","Map","sortRepositoryFactory"],"mappings":";AAGO,MAAMA;IAGT,cAAcC,SAAkB,EAAE;QAC9B,MAAMC,WAAW,IAAI,CAAC,WAAW,CAACD;QAElC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACC,WAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,UAAU,IAAIC;QAGjC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACD;IAC1B;IAEQ,YAAYD,SAAkB,EAAE;QACpC,OAAOA,aAAaG,KAAK,GAAG,GAAG,QAAQ;IAC3C;;aAdQ,KAAK,GAAoC,IAAIC;;AAezD;AAEO,MAAMC,wBAAwB,IAAIN"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./ISortingRepository";
|
|
2
|
-
export * from "./SortingRepository";
|
|
3
|
-
export * from "./SortingRepositoryFactory";
|
|
1
|
+
export type * from "./ISortingRepository.js";
|
|
2
|
+
export * from "./SortingRepository.js";
|
|
3
|
+
export * from "./SortingRepositoryFactory.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./Loading";
|
|
2
|
-
export * from "./Meta";
|
|
3
|
-
export * from "./Sorting";
|
|
1
|
+
export * from "./Loading/index.js";
|
|
2
|
+
export * from "./Meta/index.js";
|
|
3
|
+
export * from "./Sorting/index.js";
|
package/fta/Domain/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Models";
|
|
2
|
-
export * from "./Repositories";
|
|
1
|
+
export * from "./Models/index.js";
|
|
2
|
+
export * from "./Repositories/index.js";
|
package/fta/Domain/index.js
CHANGED
package/fta/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./Domain";
|
|
1
|
+
export * from "./Domain/index.js";
|
package/fta/index.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./fta";
|
|
1
|
+
export * from "./fta/index.js";
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-utils",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.0-unstable.eb81deee7e",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js",
|
|
7
|
+
"./*": "./*"
|
|
8
|
+
},
|
|
5
9
|
"repository": {
|
|
6
10
|
"type": "git",
|
|
7
11
|
"url": "https://github.com/webiny/webiny-js.git",
|
|
@@ -10,20 +14,18 @@
|
|
|
10
14
|
"author": "Webiny Ltd.",
|
|
11
15
|
"license": "MIT",
|
|
12
16
|
"dependencies": {
|
|
13
|
-
"@webiny/
|
|
14
|
-
"
|
|
17
|
+
"@webiny/feature": "0.0.0-unstable.eb81deee7e",
|
|
18
|
+
"@webiny/utils": "0.0.0-unstable.eb81deee7e",
|
|
19
|
+
"mobx": "7.0.3"
|
|
15
20
|
},
|
|
16
21
|
"devDependencies": {
|
|
17
|
-
"@webiny/
|
|
18
|
-
"typescript": "
|
|
22
|
+
"@webiny/build-tools": "0.0.0-unstable.eb81deee7e",
|
|
23
|
+
"typescript": "7.0.2"
|
|
19
24
|
},
|
|
20
25
|
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
22
|
-
"directory": "dist"
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "node ../cli/bin.js run build",
|
|
26
|
-
"watch": "node ../cli/bin.js run watch"
|
|
26
|
+
"access": "public"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
28
|
+
"webiny": {
|
|
29
|
+
"publishFrom": "dist"
|
|
30
|
+
}
|
|
29
31
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Meta\";\nexport * from \"./MetaMapper\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Sorting\";\nexport * from \"./SortingMapper\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Meta\";\nexport * from \"./Sorting\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ILoadingRepository.ts"],"sourcesContent":["export interface ILoadingRepository {\n get: () => Record<string, boolean>;\n set: (action: string, isLoading?: boolean) => Promise<void>;\n runCallBack: <T>(callback: Promise<T>, action: string) => Promise<T>;\n isLoading: (action: string) => boolean;\n hasLoading: () => boolean;\n isEmpty: () => boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ILoadingRepository\";\nexport * from \"./LoadingRepository\";\nexport * from \"./LoadingRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IMetaRepository.ts"],"sourcesContent":["import type { Meta } from \"../../Models\";\n\nexport interface IMetaRepository {\n get: () => Meta;\n set: (meta: Meta) => Promise<void>;\n increaseTotalCount: (count?: number) => Promise<void>;\n decreaseTotalCount: (count?: number) => Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./IMetaRepository\";\nexport * from \"./MetaRepository\";\nexport * from \"./MetaRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ISortingRepository.ts"],"sourcesContent":["import type { Sorting } from \"~/fta/Domain/Models\";\n\nexport interface ISortingRepository {\n set: (sorts: Sorting[]) => Promise<void>;\n get: () => Sorting[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ISortingRepository\";\nexport * from \"./SortingRepository\";\nexport * from \"./SortingRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Loading\";\nexport * from \"./Meta\";\nexport * from \"./Sorting\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
package/fta/Domain/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Models\";\nexport * from \"./Repositories\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
package/fta/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Domain\";\n"],"mappings":"AAAA","ignoreList":[]}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./fta\";\n"],"mappings":"AAAA","ignoreList":[]}
|