@kosdev-code/kos-ui-sdk 0.1.0-next.871 → 0.1.0-next.894

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/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const service$8 = require("./index-DsRhHHtS.cjs");
3
+ const service$8 = require("./index-DUoSahlA.cjs");
4
4
  const mobx = require("mobx");
5
5
  const log$s = require("loglevel");
6
6
  const dateFns = require("date-fns");
@@ -3085,6 +3085,10 @@ const FutureManager = {
3085
3085
  getFuture
3086
3086
  };
3087
3087
  const isFutureResponse = (response) => !response || !response.data;
3088
+ const resolveFutureHandler = (model) => {
3089
+ const handlerProperty = model?.[service$8.MultipleFutureContainerSetup]?.handlerProperty ?? model?.[service$8.FutureContainerSetup]?.handlerProperty ?? "futureHandler";
3090
+ return model[handlerProperty];
3091
+ };
3088
3092
  function wrapWithFutureLifecycle(original, methodName, props = {}) {
3089
3093
  const {
3090
3094
  alias,
@@ -3114,7 +3118,7 @@ function wrapWithFutureLifecycle(original, methodName, props = {}) {
3114
3118
  service$8.KosLog.debug(`future ${future.id} is ready`);
3115
3119
  service$8.kosAction(() => {
3116
3120
  service$8.KosLog.debug(`Adding future ${future.id} to futureHandler`);
3117
- this.futureHandler.addFuture(future, alias);
3121
+ resolveFutureHandler(this).addFuture(future, alias);
3118
3122
  });
3119
3123
  if (abortController && abortControllerInstance) {
3120
3124
  effectDisposer = service$8.kosAutoEffect(() => {
@@ -3187,7 +3191,7 @@ function wrapWithFutureLifecycle(original, methodName, props = {}) {
3187
3191
  );
3188
3192
  }
3189
3193
  } else {
3190
- this.futureHandler.removeFuture(alias);
3194
+ resolveFutureHandler(this).removeFuture(alias);
3191
3195
  }
3192
3196
  cleanup();
3193
3197
  return response;
@@ -12176,7 +12180,7 @@ const updateRegion = async (region) => {
12176
12180
  regionInfo.updateProperty(region);
12177
12181
  };
12178
12182
  async function getKosServiceApi() {
12179
- const { default: API } = await Promise.resolve().then(() => require("./index-DsRhHHtS.cjs")).then((n) => n.service);
12183
+ const { default: API } = await Promise.resolve().then(() => require("./index-DUoSahlA.cjs")).then((n) => n.service);
12180
12184
  return API;
12181
12185
  }
12182
12186
  function kosServiceRequest$7(params2) {