@webiny/app-utils 5.43.2 → 6.0.0-alpha.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/fta/Domain/Models/Meta/Meta.js +13 -28
- package/fta/Domain/Models/Meta/Meta.js.map +1 -1
- package/fta/Domain/Models/Meta/MetaMapper.js +8 -23
- package/fta/Domain/Models/Meta/MetaMapper.js.map +1 -1
- package/fta/Domain/Models/Meta/index.js +2 -27
- package/fta/Domain/Models/Meta/index.js.map +1 -1
- package/fta/Domain/Models/Sorting/Sorting.js +6 -19
- package/fta/Domain/Models/Sorting/Sorting.js.map +1 -1
- package/fta/Domain/Models/Sorting/SortingMapper.js +40 -53
- package/fta/Domain/Models/Sorting/SortingMapper.js.map +1 -1
- package/fta/Domain/Models/Sorting/index.js +2 -27
- package/fta/Domain/Models/Sorting/index.js.map +1 -1
- package/fta/Domain/Models/index.js +2 -27
- package/fta/Domain/Models/index.js.map +1 -1
- package/fta/Domain/Repositories/Loading/ILoadingRepository.d.ts +1 -0
- package/fta/Domain/Repositories/Loading/ILoadingRepository.js +1 -5
- package/fta/Domain/Repositories/Loading/ILoadingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Loading/LoadingRepository.d.ts +2 -0
- package/fta/Domain/Repositories/Loading/LoadingRepository.js +30 -47
- package/fta/Domain/Repositories/Loading/LoadingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.js +14 -32
- package/fta/Domain/Repositories/Loading/LoadingRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Loading/index.js +3 -38
- package/fta/Domain/Repositories/Loading/index.js.map +1 -1
- package/fta/Domain/Repositories/Meta/IMetaRepository.js +1 -5
- package/fta/Domain/Repositories/Meta/MetaRepository.js +36 -59
- 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 -32
- package/fta/Domain/Repositories/Meta/MetaRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Meta/index.js +3 -38
- package/fta/Domain/Repositories/Meta/index.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/ISortingRepository.d.ts +1 -1
- package/fta/Domain/Repositories/Sorting/ISortingRepository.js +1 -5
- package/fta/Domain/Repositories/Sorting/ISortingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/SortingRepository.d.ts +1 -1
- package/fta/Domain/Repositories/Sorting/SortingRepository.js +12 -28
- package/fta/Domain/Repositories/Sorting/SortingRepository.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.d.ts +2 -2
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.js +14 -32
- package/fta/Domain/Repositories/Sorting/SortingRepositoryFactory.js.map +1 -1
- package/fta/Domain/Repositories/Sorting/index.js +3 -38
- package/fta/Domain/Repositories/Sorting/index.js.map +1 -1
- package/fta/Domain/Repositories/index.js +3 -38
- package/fta/Domain/Repositories/index.js.map +1 -1
- package/fta/Domain/index.js +2 -27
- package/fta/Domain/index.js.map +1 -1
- package/fta/index.js +1 -16
- package/fta/index.js.map +1 -1
- package/index.js +1 -16
- package/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,65 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var MetaRepository = exports.MetaRepository = /*#__PURE__*/function () {
|
|
15
|
-
function MetaRepository() {
|
|
16
|
-
(0, _classCallCheck2.default)(this, MetaRepository);
|
|
17
|
-
this.meta = _Meta.Meta.createEmpty();
|
|
18
|
-
(0, _mobx.makeAutoObservable)(this);
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
import { decodeCursor, encodeCursor } from "@webiny/utils";
|
|
3
|
+
import { Meta, MetaMapper } from "../../Models/Meta";
|
|
4
|
+
export class MetaRepository {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.meta = Meta.createEmpty();
|
|
7
|
+
makeAutoObservable(this);
|
|
8
|
+
}
|
|
9
|
+
async set(meta) {
|
|
10
|
+
this.meta = Meta.create(meta);
|
|
11
|
+
}
|
|
12
|
+
get() {
|
|
13
|
+
return MetaMapper.toDto(this.meta);
|
|
19
14
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
key: "decreaseTotalCount",
|
|
32
|
-
value: async function decreaseTotalCount() {
|
|
33
|
-
var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
34
|
-
return await this.updateMetaOnColumnDeltaChange(-count);
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
key: "increaseTotalCount",
|
|
38
|
-
value: async function increaseTotalCount() {
|
|
39
|
-
var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
40
|
-
return await this.updateMetaOnColumnDeltaChange(count);
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
key: "updateMetaOnColumnDeltaChange",
|
|
44
|
-
value: async function updateMetaOnColumnDeltaChange(countDelta) {
|
|
45
|
-
// Retrieve the current meta
|
|
46
|
-
var current = this.get();
|
|
15
|
+
async decreaseTotalCount(count = 1) {
|
|
16
|
+
return await this.updateMetaOnColumnDeltaChange(-count);
|
|
17
|
+
}
|
|
18
|
+
async increaseTotalCount(count = 1) {
|
|
19
|
+
return await this.updateMetaOnColumnDeltaChange(count);
|
|
20
|
+
}
|
|
21
|
+
async updateMetaOnColumnDeltaChange(countDelta) {
|
|
22
|
+
// Retrieve the current meta
|
|
23
|
+
const current = this.get();
|
|
47
24
|
|
|
48
|
-
|
|
49
|
-
|
|
25
|
+
// Calculate the new totalCount based on the delta change
|
|
26
|
+
const totalCount = current.totalCount + countDelta;
|
|
50
27
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
// Calculate the new cursor position based on the delta change
|
|
29
|
+
const cursorDecoded = decodeCursor(current.cursor);
|
|
30
|
+
const newCursorDecoded = String(Number(cursorDecoded) + countDelta);
|
|
31
|
+
const cursor = encodeCursor(newCursorDecoded);
|
|
55
32
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
33
|
+
// Update the meta with the new totalCount and cursor
|
|
34
|
+
return await this.set({
|
|
35
|
+
...current,
|
|
36
|
+
totalCount,
|
|
37
|
+
cursor
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
64
41
|
|
|
65
42
|
//# sourceMappingURL=MetaRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","decodeCursor","encodeCursor","Meta","MetaMapper","MetaRepository","constructor","meta","createEmpty","set","create","get","toDto","decreaseTotalCount","count","updateMetaOnColumnDeltaChange","increaseTotalCount","countDelta","current","totalCount","cursorDecoded","cursor","newCursorDecoded","String","Number"],"sources":["MetaRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport { decodeCursor, encodeCursor } from \"@webiny/utils\";\nimport { IMetaRepository } from \"./IMetaRepository\";\nimport { Meta, MetaDTO, MetaMapper } from \"~/fta/Domain/Models/Meta\";\n\nexport class MetaRepository implements IMetaRepository {\n private meta: Meta;\n\n constructor() {\n this.meta = Meta.createEmpty();\n makeAutoObservable(this);\n }\n\n async set(meta: MetaDTO) {\n this.meta = Meta.create(meta);\n }\n\n get() {\n return MetaMapper.toDto(this.meta);\n }\n\n async decreaseTotalCount(count = 1) {\n return await this.updateMetaOnColumnDeltaChange(-count);\n }\n\n async increaseTotalCount(count = 1) {\n return await this.updateMetaOnColumnDeltaChange(count);\n }\n\n private async updateMetaOnColumnDeltaChange(countDelta: number) {\n // Retrieve the current meta\n const current = this.get();\n\n // Calculate the new totalCount based on the delta change\n const totalCount = current.totalCount + countDelta;\n\n // Calculate the new cursor position based on the delta change\n const cursorDecoded = decodeCursor(current.cursor);\n const newCursorDecoded = String(Number(cursorDecoded) + countDelta);\n const cursor = encodeCursor(newCursorDecoded);\n\n // Update the meta with the new totalCount and cursor\n return await this.set({ ...current, totalCount, cursor });\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AACzC,SAASC,YAAY,EAAEC,YAAY,QAAQ,eAAe;AAE1D,SAASC,IAAI,EAAWC,UAAU;AAElC,OAAO,MAAMC,cAAc,CAA4B;EAGnDC,WAAWA,CAAA,EAAG;IACV,IAAI,CAACC,IAAI,GAAGJ,IAAI,CAACK,WAAW,CAAC,CAAC;IAC9BR,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEA,MAAMS,GAAGA,CAACF,IAAa,EAAE;IACrB,IAAI,CAACA,IAAI,GAAGJ,IAAI,CAACO,MAAM,CAACH,IAAI,CAAC;EACjC;EAEAI,GAAGA,CAAA,EAAG;IACF,OAAOP,UAAU,CAACQ,KAAK,CAAC,IAAI,CAACL,IAAI,CAAC;EACtC;EAEA,MAAMM,kBAAkBA,CAACC,KAAK,GAAG,CAAC,EAAE;IAChC,OAAO,MAAM,IAAI,CAACC,6BAA6B,CAAC,CAACD,KAAK,CAAC;EAC3D;EAEA,MAAME,kBAAkBA,CAACF,KAAK,GAAG,CAAC,EAAE;IAChC,OAAO,MAAM,IAAI,CAACC,6BAA6B,CAACD,KAAK,CAAC;EAC1D;EAEA,MAAcC,6BAA6BA,CAACE,UAAkB,EAAE;IAC5D;IACA,MAAMC,OAAO,GAAG,IAAI,CAACP,GAAG,CAAC,CAAC;;IAE1B;IACA,MAAMQ,UAAU,GAAGD,OAAO,CAACC,UAAU,GAAGF,UAAU;;IAElD;IACA,MAAMG,aAAa,GAAGnB,YAAY,CAACiB,OAAO,CAACG,MAAM,CAAC;IAClD,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,MAAM,CAACJ,aAAa,CAAC,GAAGH,UAAU,CAAC;IACnE,MAAMI,MAAM,GAAGnB,YAAY,CAACoB,gBAAgB,CAAC;;IAE7C;IACA,OAAO,MAAM,IAAI,CAACb,GAAG,CAAC;MAAE,GAAGS,OAAO;MAAEC,UAAU;MAAEE;IAAO,CAAC,CAAC;EAC7D;AACJ","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MetaRepository } from "./MetaRepository";
|
|
2
2
|
export declare class MetaRepositoryFactory {
|
|
3
3
|
private cache;
|
|
4
|
-
getRepository(): MetaRepository;
|
|
4
|
+
getRepository(namespace?: string): MetaRepository;
|
|
5
5
|
private getCacheKey;
|
|
6
6
|
}
|
|
7
7
|
export declare const metaRepositoryFactory: MetaRepositoryFactory;
|
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _MetaRepository = require("./MetaRepository");
|
|
12
|
-
var MetaRepositoryFactory = exports.MetaRepositoryFactory = /*#__PURE__*/function () {
|
|
13
|
-
function MetaRepositoryFactory() {
|
|
14
|
-
(0, _classCallCheck2.default)(this, MetaRepositoryFactory);
|
|
15
|
-
(0, _defineProperty2.default)(this, "cache", new Map());
|
|
16
|
-
}
|
|
17
|
-
return (0, _createClass2.default)(MetaRepositoryFactory, [{
|
|
18
|
-
key: "getRepository",
|
|
19
|
-
value: function getRepository() {
|
|
20
|
-
var cacheKey = this.getCacheKey();
|
|
21
|
-
if (!this.cache.has(cacheKey)) {
|
|
22
|
-
this.cache.set(cacheKey, new _MetaRepository.MetaRepository());
|
|
23
|
-
}
|
|
24
|
-
return this.cache.get(cacheKey);
|
|
25
|
-
}
|
|
26
|
-
}, {
|
|
27
|
-
key: "getCacheKey",
|
|
28
|
-
value: function getCacheKey() {
|
|
29
|
-
return Date.now().toString();
|
|
1
|
+
import { MetaRepository } from "./MetaRepository";
|
|
2
|
+
export class MetaRepositoryFactory {
|
|
3
|
+
cache = new Map();
|
|
4
|
+
getRepository(namespace) {
|
|
5
|
+
const cacheKey = this.getCacheKey(namespace);
|
|
6
|
+
if (!this.cache.has(cacheKey)) {
|
|
7
|
+
this.cache.set(cacheKey, new MetaRepository());
|
|
30
8
|
}
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
9
|
+
return this.cache.get(cacheKey);
|
|
10
|
+
}
|
|
11
|
+
getCacheKey(namespace) {
|
|
12
|
+
return namespace ?? Date.now().toString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const metaRepositoryFactory = new MetaRepositoryFactory();
|
|
34
16
|
|
|
35
17
|
//# sourceMappingURL=MetaRepositoryFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["MetaRepository","MetaRepositoryFactory","cache","Map","getRepository","namespace","cacheKey","getCacheKey","has","set","get","Date","now","toString","metaRepositoryFactory"],"sources":["MetaRepositoryFactory.ts"],"sourcesContent":["import { MetaRepository } from \"./MetaRepository\";\n\nexport class MetaRepositoryFactory {\n private cache: Map<string, MetaRepository> = 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 MetaRepository());\n }\n\n return this.cache.get(cacheKey) as MetaRepository;\n }\n\n private getCacheKey(namespace?: string) {\n return namespace ?? Date.now().toString();\n }\n}\n\nexport const metaRepositoryFactory = new MetaRepositoryFactory();\n"],"mappings":"AAAA,SAASA,cAAc;AAEvB,OAAO,MAAMC,qBAAqB,CAAC;EACvBC,KAAK,GAAgC,IAAIC,GAAG,CAAC,CAAC;EAEtDC,aAAaA,CAACC,SAAkB,EAAE;IAC9B,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAACF,SAAS,CAAC;IAE5C,IAAI,CAAC,IAAI,CAACH,KAAK,CAACM,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACJ,KAAK,CAACO,GAAG,CAACH,QAAQ,EAAE,IAAIN,cAAc,CAAC,CAAC,CAAC;IAClD;IAEA,OAAO,IAAI,CAACE,KAAK,CAACQ,GAAG,CAACJ,QAAQ,CAAC;EACnC;EAEQC,WAAWA,CAACF,SAAkB,EAAE;IACpC,OAAOA,SAAS,IAAIM,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7C;AACJ;AAEA,OAAO,MAAMC,qBAAqB,GAAG,IAAIb,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,40 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _IMetaRepository = require("./IMetaRepository");
|
|
7
|
-
Object.keys(_IMetaRepository).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _IMetaRepository[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _IMetaRepository[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _MetaRepository = require("./MetaRepository");
|
|
18
|
-
Object.keys(_MetaRepository).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _MetaRepository[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _MetaRepository[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _MetaRepositoryFactory = require("./MetaRepositoryFactory");
|
|
29
|
-
Object.keys(_MetaRepositoryFactory).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _MetaRepositoryFactory[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _MetaRepositoryFactory[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
1
|
+
export * from "./IMetaRepository";
|
|
2
|
+
export * from "./MetaRepository";
|
|
3
|
+
export * from "./MetaRepositoryFactory";
|
|
39
4
|
|
|
40
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./IMetaRepository\";\nexport * from \"./MetaRepository\";\nexport * from \"./MetaRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ISortingRepository.ts"],"sourcesContent":["import { Sorting } from \"~/fta/Domain/Models\";\n\nexport interface ISortingRepository {\n set: (sorts: Sorting[]) => void
|
|
1
|
+
{"version":3,"names":[],"sources":["ISortingRepository.ts"],"sourcesContent":["import { Sorting } from \"~/fta/Domain/Models\";\n\nexport interface ISortingRepository {\n set: (sorts: Sorting[]) => Promise<void>;\n get: () => Sorting[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var SortingRepository = exports.SortingRepository = /*#__PURE__*/function () {
|
|
13
|
-
function SortingRepository() {
|
|
14
|
-
(0, _classCallCheck2.default)(this, SortingRepository);
|
|
15
|
-
(0, _defineProperty2.default)(this, "sorting", []);
|
|
16
|
-
(0, _mobx.makeAutoObservable)(this);
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
export class SortingRepository {
|
|
3
|
+
sorting = [];
|
|
4
|
+
constructor() {
|
|
5
|
+
makeAutoObservable(this);
|
|
6
|
+
}
|
|
7
|
+
get() {
|
|
8
|
+
return this.sorting;
|
|
9
|
+
}
|
|
10
|
+
async set(sorts) {
|
|
11
|
+
this.sorting = sorts;
|
|
17
12
|
}
|
|
18
|
-
|
|
19
|
-
key: "get",
|
|
20
|
-
value: function get() {
|
|
21
|
-
return this.sorting;
|
|
22
|
-
}
|
|
23
|
-
}, {
|
|
24
|
-
key: "set",
|
|
25
|
-
value: function set(sorts) {
|
|
26
|
-
this.sorting = sorts;
|
|
27
|
-
}
|
|
28
|
-
}]);
|
|
29
|
-
}();
|
|
13
|
+
}
|
|
30
14
|
|
|
31
15
|
//# sourceMappingURL=SortingRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","SortingRepository","sorting","constructor","get","set","sorts"],"sources":["SortingRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport { ISortingRepository } from \"./ISortingRepository\";\nimport { Sorting } from \"~/fta/Domain/Models\";\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"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AAIzC,OAAO,MAAMC,iBAAiB,CAA+B;EACjDC,OAAO,GAAc,EAAE;EAE/BC,WAAWA,CAAA,EAAG;IACVH,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAI,GAAGA,CAAA,EAAG;IACF,OAAO,IAAI,CAACF,OAAO;EACvB;EAEA,MAAMG,GAAGA,CAACC,KAAgB,EAAE;IACxB,IAAI,CAACJ,OAAO,GAAGI,KAAK;EACxB;AACJ","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ISortingRepository } from "../../../index.js";
|
|
2
2
|
export declare class SortingRepositoryFactory {
|
|
3
3
|
private cache;
|
|
4
|
-
getRepository():
|
|
4
|
+
getRepository(namespace?: string): ISortingRepository;
|
|
5
5
|
private getCacheKey;
|
|
6
6
|
}
|
|
7
7
|
export declare const sortRepositoryFactory: SortingRepositoryFactory;
|
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _SortingRepository = require("./SortingRepository");
|
|
12
|
-
var SortingRepositoryFactory = exports.SortingRepositoryFactory = /*#__PURE__*/function () {
|
|
13
|
-
function SortingRepositoryFactory() {
|
|
14
|
-
(0, _classCallCheck2.default)(this, SortingRepositoryFactory);
|
|
15
|
-
(0, _defineProperty2.default)(this, "cache", new Map());
|
|
16
|
-
}
|
|
17
|
-
return (0, _createClass2.default)(SortingRepositoryFactory, [{
|
|
18
|
-
key: "getRepository",
|
|
19
|
-
value: function getRepository() {
|
|
20
|
-
var cacheKey = this.getCacheKey();
|
|
21
|
-
if (!this.cache.has(cacheKey)) {
|
|
22
|
-
this.cache.set(cacheKey, new _SortingRepository.SortingRepository());
|
|
23
|
-
}
|
|
24
|
-
return this.cache.get(cacheKey);
|
|
25
|
-
}
|
|
26
|
-
}, {
|
|
27
|
-
key: "getCacheKey",
|
|
28
|
-
value: function getCacheKey() {
|
|
29
|
-
return Date.now().toString();
|
|
1
|
+
import { SortingRepository } from "./SortingRepository";
|
|
2
|
+
export class SortingRepositoryFactory {
|
|
3
|
+
cache = new Map();
|
|
4
|
+
getRepository(namespace) {
|
|
5
|
+
const cacheKey = this.getCacheKey(namespace);
|
|
6
|
+
if (!this.cache.has(cacheKey)) {
|
|
7
|
+
this.cache.set(cacheKey, new SortingRepository());
|
|
30
8
|
}
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
9
|
+
return this.cache.get(cacheKey);
|
|
10
|
+
}
|
|
11
|
+
getCacheKey(namespace) {
|
|
12
|
+
return namespace ?? Date.now().toString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const sortRepositoryFactory = new SortingRepositoryFactory();
|
|
34
16
|
|
|
35
17
|
//# sourceMappingURL=SortingRepositoryFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["SortingRepository","SortingRepositoryFactory","cache","Map","getRepository","namespace","cacheKey","getCacheKey","has","set","get","Date","now","toString","sortRepositoryFactory"],"sources":["SortingRepositoryFactory.ts"],"sourcesContent":["import { SortingRepository } from \"./SortingRepository\";\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"],"mappings":"AAAA,SAASA,iBAAiB;AAG1B,OAAO,MAAMC,wBAAwB,CAAC;EAC1BC,KAAK,GAAoC,IAAIC,GAAG,CAAC,CAAC;EAE1DC,aAAaA,CAACC,SAAkB,EAAE;IAC9B,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAACF,SAAS,CAAC;IAE5C,IAAI,CAAC,IAAI,CAACH,KAAK,CAACM,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACJ,KAAK,CAACO,GAAG,CAACH,QAAQ,EAAE,IAAIN,iBAAiB,CAAC,CAAC,CAAC;IACrD;IAEA,OAAO,IAAI,CAACE,KAAK,CAACQ,GAAG,CAACJ,QAAQ,CAAC;EACnC;EAEQC,WAAWA,CAACF,SAAkB,EAAE;IACpC,OAAOA,SAAS,IAAIM,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7C;AACJ;AAEA,OAAO,MAAMC,qBAAqB,GAAG,IAAIb,wBAAwB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,40 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _ISortingRepository = require("./ISortingRepository");
|
|
7
|
-
Object.keys(_ISortingRepository).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _ISortingRepository[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _ISortingRepository[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _SortingRepository = require("./SortingRepository");
|
|
18
|
-
Object.keys(_SortingRepository).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _SortingRepository[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _SortingRepository[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _SortingRepositoryFactory = require("./SortingRepositoryFactory");
|
|
29
|
-
Object.keys(_SortingRepositoryFactory).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _SortingRepositoryFactory[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _SortingRepositoryFactory[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
1
|
+
export * from "./ISortingRepository";
|
|
2
|
+
export * from "./SortingRepository";
|
|
3
|
+
export * from "./SortingRepositoryFactory";
|
|
39
4
|
|
|
40
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ISortingRepository\";\nexport * from \"./SortingRepository\";\nexport * from \"./SortingRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,40 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Loading = require("./Loading");
|
|
7
|
-
Object.keys(_Loading).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Loading[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Loading[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _Meta = require("./Meta");
|
|
18
|
-
Object.keys(_Meta).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _Meta[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _Meta[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _Sorting = require("./Sorting");
|
|
29
|
-
Object.keys(_Sorting).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _Sorting[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _Sorting[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
1
|
+
export * from "./Loading";
|
|
2
|
+
export * from "./Meta";
|
|
3
|
+
export * from "./Sorting";
|
|
39
4
|
|
|
40
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
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
CHANGED
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Models = require("./Models");
|
|
7
|
-
Object.keys(_Models).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Models[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Models[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _Repositories = require("./Repositories");
|
|
18
|
-
Object.keys(_Repositories).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _Repositories[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _Repositories[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
1
|
+
export * from "./Models";
|
|
2
|
+
export * from "./Repositories";
|
|
28
3
|
|
|
29
4
|
//# sourceMappingURL=index.js.map
|
package/fta/Domain/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Models\";\nexport * from \"./Repositories\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
package/fta/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _Domain = require("./Domain");
|
|
7
|
-
Object.keys(_Domain).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _Domain[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _Domain[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
export * from "./Domain";
|
|
17
2
|
|
|
18
3
|
//# sourceMappingURL=index.js.map
|
package/fta/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Domain\";\n"],"mappings":"AAAA","ignoreList":[]}
|
package/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _fta = require("./fta");
|
|
7
|
-
Object.keys(_fta).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _fta[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _fta[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
1
|
+
export * from "./fta";
|
|
17
2
|
|
|
18
3
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./fta\";\n"],"mappings":"AAAA","ignoreList":[]}
|