@elliemae/pui-app-sdk 5.21.0 → 5.21.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.
@@ -34,12 +34,12 @@ __export(config_exports, {
34
34
  setAppConfigValue: () => setAppConfigValue
35
35
  });
36
36
  module.exports = __toCommonJS(config_exports);
37
- var import_lodash = __toESM(require("lodash"));
37
+ var import_lodash = require("lodash");
38
38
  var import_app_config = __toESM(require("../../app.config.json"));
39
39
  let gAppConfig = import_app_config.default;
40
40
  const setAppConfig = (config) => {
41
41
  gAppConfig = config;
42
42
  };
43
- const getAppConfigValue = (key = "", defaultValue = null) => import_lodash.default.clone(import_lodash.default.get(gAppConfig, key, defaultValue));
44
- const setAppConfigValue = (key, value) => import_lodash.default.set(gAppConfig, key, value);
45
- const hasItem = (key = "") => import_lodash.default.has(gAppConfig, key);
43
+ const getAppConfigValue = (key = "", defaultValue = null) => (0, import_lodash.clone)((0, import_lodash.get)(gAppConfig, key, defaultValue));
44
+ const setAppConfigValue = (key, value) => (0, import_lodash.set)(gAppConfig, key, value);
45
+ const hasItem = (key = "") => (0, import_lodash.has)(gAppConfig, key);
@@ -160,8 +160,13 @@ function Throttle(delay = 300) {
160
160
  }
161
161
  function AsyncSingleExecution(_target, _propertyKey, descriptor) {
162
162
  const originalMethod = descriptor.value;
163
- const promiseMap = /* @__PURE__ */ new Map();
163
+ const instanceMap = /* @__PURE__ */ new WeakMap();
164
164
  descriptor.value = function(...args) {
165
+ const instance = this;
166
+ if (!instanceMap.has(instance)) {
167
+ instanceMap.set(instance, /* @__PURE__ */ new Map());
168
+ }
169
+ const promiseMap = instanceMap.get(instance);
165
170
  const key = JSON.stringify(args);
166
171
  if (promiseMap.has(key)) {
167
172
  return promiseMap.get(key);
@@ -1,12 +1,12 @@
1
- import _ from "lodash";
1
+ import { get, set, clone, has } from "lodash";
2
2
  import appConfig from "../../app.config.json";
3
3
  let gAppConfig = appConfig;
4
4
  const setAppConfig = (config) => {
5
5
  gAppConfig = config;
6
6
  };
7
- const getAppConfigValue = (key = "", defaultValue = null) => _.clone(_.get(gAppConfig, key, defaultValue));
8
- const setAppConfigValue = (key, value) => _.set(gAppConfig, key, value);
9
- const hasItem = (key = "") => _.has(gAppConfig, key);
7
+ const getAppConfigValue = (key = "", defaultValue = null) => clone(get(gAppConfig, key, defaultValue));
8
+ const setAppConfigValue = (key, value) => set(gAppConfig, key, value);
9
+ const hasItem = (key = "") => has(gAppConfig, key);
10
10
  export {
11
11
  getAppConfigValue,
12
12
  hasItem,
@@ -129,8 +129,13 @@ function Throttle(delay = 300) {
129
129
  }
130
130
  function AsyncSingleExecution(_target, _propertyKey, descriptor) {
131
131
  const originalMethod = descriptor.value;
132
- const promiseMap = /* @__PURE__ */ new Map();
132
+ const instanceMap = /* @__PURE__ */ new WeakMap();
133
133
  descriptor.value = function(...args) {
134
+ const instance = this;
135
+ if (!instanceMap.has(instance)) {
136
+ instanceMap.set(instance, /* @__PURE__ */ new Map());
137
+ }
138
+ const promiseMap = instanceMap.get(instance);
134
139
  const key = JSON.stringify(args);
135
140
  if (promiseMap.has(key)) {
136
141
  return promiseMap.get(key);