@elliemae/pui-app-sdk 5.17.3 → 5.17.5
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/cjs/index.js +1 -1
- package/dist/cjs/utils/decorators/functionDecorators.js +9 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/utils/decorators/functionDecorators.js +9 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -168,7 +168,7 @@ var import_react = require("./data/react.js");
|
|
|
168
168
|
var import_use_state_selector = require("./utils/custom-hooks/use-state-selector.js");
|
|
169
169
|
var import_errorMiddleware = require("./data/errorMiddleware.js");
|
|
170
170
|
var import_listenerMiddleware = require("./data/listenerMiddleware.js");
|
|
171
|
-
var import_decorators = require("./utils/decorators");
|
|
171
|
+
var import_decorators = require("./utils/decorators/index.js");
|
|
172
172
|
var import_helper = require("./utils/auth/helper.js");
|
|
173
173
|
var import_url = require("./utils/url.js");
|
|
174
174
|
var import_store = require("./data/store.js");
|
|
@@ -75,13 +75,21 @@ function ImmutableArgs(_target, _propertyKey, descriptor) {
|
|
|
75
75
|
function Memoize(_target, _key, descriptor) {
|
|
76
76
|
const originalMethod = descriptor.value;
|
|
77
77
|
const cache = /* @__PURE__ */ new Map();
|
|
78
|
+
const maxSize = 500;
|
|
78
79
|
descriptor.value = function value(...args) {
|
|
79
80
|
const key = JSON.stringify(args);
|
|
80
81
|
if (cache.has(key)) {
|
|
81
|
-
|
|
82
|
+
const cacheValue = cache.get(key);
|
|
83
|
+
cache.delete(key);
|
|
84
|
+
cache.set(key, cacheValue);
|
|
85
|
+
return cacheValue;
|
|
82
86
|
}
|
|
83
87
|
const result = originalMethod.call(this, ...args);
|
|
84
88
|
cache.set(key, result);
|
|
89
|
+
if (cache.size > maxSize) {
|
|
90
|
+
const firstKey = cache.keys().next().value;
|
|
91
|
+
cache.delete(firstKey);
|
|
92
|
+
}
|
|
85
93
|
return result;
|
|
86
94
|
};
|
|
87
95
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
removeSideEffect,
|
|
42
42
|
clearSideEffects
|
|
43
43
|
} from "./data/listenerMiddleware.js";
|
|
44
|
-
import { decorators } from "./utils/decorators";
|
|
44
|
+
import { decorators } from "./utils/decorators/index.js";
|
|
45
45
|
import { getAuthorizationHeader } from "./utils/auth/helper.js";
|
|
46
46
|
import { getRedirectUrl, removeDoubleSlash } from "./utils/url.js";
|
|
47
47
|
import { createAppStore } from "./data/store.js";
|
|
@@ -46,13 +46,21 @@ function ImmutableArgs(_target, _propertyKey, descriptor) {
|
|
|
46
46
|
function Memoize(_target, _key, descriptor) {
|
|
47
47
|
const originalMethod = descriptor.value;
|
|
48
48
|
const cache = /* @__PURE__ */ new Map();
|
|
49
|
+
const maxSize = 500;
|
|
49
50
|
descriptor.value = function value(...args) {
|
|
50
51
|
const key = JSON.stringify(args);
|
|
51
52
|
if (cache.has(key)) {
|
|
52
|
-
|
|
53
|
+
const cacheValue = cache.get(key);
|
|
54
|
+
cache.delete(key);
|
|
55
|
+
cache.set(key, cacheValue);
|
|
56
|
+
return cacheValue;
|
|
53
57
|
}
|
|
54
58
|
const result = originalMethod.call(this, ...args);
|
|
55
59
|
cache.set(key, result);
|
|
60
|
+
if (cache.size > maxSize) {
|
|
61
|
+
const firstKey = cache.keys().next().value;
|
|
62
|
+
cache.delete(firstKey);
|
|
63
|
+
}
|
|
56
64
|
return result;
|
|
57
65
|
};
|
|
58
66
|
}
|
|
@@ -16,7 +16,7 @@ export { useStateSelector, useStateSelectorShallow, } from './utils/custom-hooks
|
|
|
16
16
|
export type { UseStateSelectorOptions } from './utils/custom-hooks/use-state-selector.js';
|
|
17
17
|
export { errorMiddleware } from './data/errorMiddleware.js';
|
|
18
18
|
export { startSideEffect, createSideEffect, removeSideEffect, clearSideEffects, } from './data/listenerMiddleware.js';
|
|
19
|
-
export { decorators } from './utils/decorators';
|
|
19
|
+
export { decorators } from './utils/decorators/index.js';
|
|
20
20
|
export { getAuthorizationHeader } from './utils/auth/helper.js';
|
|
21
21
|
export { getRedirectUrl, removeDoubleSlash } from './utils/url.js';
|
|
22
22
|
export { createAppStore as configureStore } from './data/store.js';
|