@webiny/app-utils 6.3.0-beta.4 → 6.4.0-beta.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/features/List/FilterFeature.js +21 -20
- package/features/List/FilterFeature.js.map +1 -1
- package/features/List/ListQueryParamsRepository.js +62 -64
- package/features/List/ListQueryParamsRepository.js.map +1 -1
- package/features/List/LoadMoreFeature.js +21 -23
- package/features/List/LoadMoreFeature.js.map +1 -1
- package/features/List/LoadingRepository.js +41 -43
- package/features/List/LoadingRepository.js.map +1 -1
- package/features/List/SearchFeature.js +15 -12
- package/features/List/SearchFeature.js.map +1 -1
- package/features/List/SortFeature.js +18 -15
- package/features/List/SortFeature.js.map +1 -1
- package/features/List/abstractions.js +8 -31
- package/features/List/abstractions.js.map +1 -1
- package/features/List/feature.js +26 -30
- package/features/List/feature.js.map +1 -1
- 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.js +9 -8
- package/fta/Domain/Models/Meta/MetaMapper.js.map +1 -1
- package/fta/Domain/Models/Meta/index.js +0 -2
- 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.js +27 -40
- package/fta/Domain/Models/Sorting/SortingMapper.js.map +1 -1
- package/fta/Domain/Models/Sorting/index.js +0 -2
- package/fta/Domain/Models/index.js +0 -2
- package/fta/Domain/Repositories/Loading/ILoadingRepository.js +0 -3
- package/fta/Domain/Repositories/Loading/LoadingRepository.js +39 -34
- package/fta/Domain/Repositories/Loading/LoadingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.js +13 -12
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Loading/index.js +0 -2
- package/fta/Domain/Repositories/Meta/IMetaRepository.js +0 -3
- package/fta/Domain/Repositories/Meta/MetaRepository.js +32 -38
- package/fta/Domain/Repositories/Meta/MetaRepository.js.map +1 -1
- package/fta/Domain/Repositories/Meta/MetaRepositoryFactory.js +13 -12
- package/fta/Domain/Repositories/Meta/MetaRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Meta/index.js +0 -2
- package/fta/Domain/Repositories/Sorting/ISortingRepository.js +0 -3
- 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.js +13 -12
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/index.js +0 -2
- package/fta/Domain/Repositories/index.js +0 -2
- package/fta/Domain/index.js +0 -2
- package/fta/index.js +0 -2
- package/index.js +0 -2
- package/package.json +6 -6
- 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,15 +1,16 @@
|
|
|
1
1
|
import { makeAutoObservable } from "mobx";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
class SortingRepository {
|
|
3
|
+
constructor(){
|
|
4
|
+
this.sorting = [];
|
|
5
|
+
makeAutoObservable(this);
|
|
6
|
+
}
|
|
7
|
+
get() {
|
|
8
|
+
return this.sorting;
|
|
9
|
+
}
|
|
10
|
+
async set(sorts) {
|
|
11
|
+
this.sorting = sorts;
|
|
12
|
+
}
|
|
13
13
|
}
|
|
14
|
+
export { SortingRepository };
|
|
14
15
|
|
|
15
16
|
//# sourceMappingURL=SortingRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"fta/Domain/Repositories/Sorting/SortingRepository.js","sources":["../../../../../src/fta/Domain/Repositories/Sorting/SortingRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ISortingRepository } from \"./ISortingRepository.js\";\nimport type { Sorting } from \"~/fta/Domain/Models/index.js\";\n\nexport class SortingRepository implements ISortingRepository {\n private sorting: Sorting[] = [];\n\n constructor() {\n makeAutoObservable(this);\n }\n\n get() {\n return this.sorting;\n }\n\n async set(sorts: Sorting[]) {\n this.sorting = sorts;\n }\n}\n"],"names":["SortingRepository","makeAutoObservable","sorts"],"mappings":";AAIO,MAAMA;IAGT,aAAc;aAFN,OAAO,GAAc,EAAE;QAG3BC,mBAAmB,IAAI;IAC3B;IAEA,MAAM;QACF,OAAO,IAAI,CAAC,OAAO;IACvB;IAEA,MAAM,IAAIC,KAAgB,EAAE;QACxB,IAAI,CAAC,OAAO,GAAGA;IACnB;AACJ"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { SortingRepository } from "./SortingRepository.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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"}
|
package/fta/Domain/index.js
CHANGED
package/fta/index.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-utils",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"author": "Webiny Ltd.",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@webiny/feature": "6.
|
|
18
|
-
"@webiny/utils": "6.
|
|
19
|
-
"mobx": "6.15.
|
|
17
|
+
"@webiny/feature": "6.4.0-beta.0",
|
|
18
|
+
"@webiny/utils": "6.4.0-beta.0",
|
|
19
|
+
"mobx": "6.15.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@webiny/build-tools": "6.
|
|
22
|
+
"@webiny/build-tools": "6.4.0-beta.0",
|
|
23
23
|
"typescript": "6.0.3"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public",
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a545d7529828af07d08d49c3da1bcb967483b9ce"
|
|
30
30
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Meta.js\";\nexport * from \"./MetaMapper.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Sorting.js\";\nexport * from \"./SortingMapper.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Meta/index.js\";\nexport * from \"./Sorting/index.js\";\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 getActiveLoadings(): string[];\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 type * from \"./ILoadingRepository.js\";\nexport * from \"./LoadingRepository.js\";\nexport * from \"./LoadingRepositoryFactory.js\";\n"],"mappings":"AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IMetaRepository.ts"],"sourcesContent":["import type { Meta } from \"../../Models/index.js\";\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 type * from \"./IMetaRepository.js\";\nexport * from \"./MetaRepository.js\";\nexport * from \"./MetaRepositoryFactory.js\";\n"],"mappings":"AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ISortingRepository.ts"],"sourcesContent":["import type { Sorting } from \"~/fta/Domain/Models/index.js\";\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 type * from \"./ISortingRepository.js\";\nexport * from \"./SortingRepository.js\";\nexport * from \"./SortingRepositoryFactory.js\";\n"],"mappings":"AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Loading/index.js\";\nexport * from \"./Meta/index.js\";\nexport * from \"./Sorting/index.js\";\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/index.js\";\nexport * from \"./Repositories/index.js\";\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/index.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./fta/index.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|