@camstack/addon-training 0.1.87 → 0.1.88

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/_stub.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./virtualExposes-0m8NqEDE.mjs";
2
- import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-BvSjPfq3.mjs";
2
+ import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C7h1o2pO.mjs";
3
3
  import { C as i, S as a, _ as o, a as s, b as c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, p as _, r as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-CEvdvp1T.mjs";
4
4
  import { i as T, n as E, r as D, t as O } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
5
5
  import { n as k, r as A, t as j } from "./ui-text-CqJgUCKX.mjs";
@@ -13400,27 +13400,38 @@ function X_(e, t) {
13400
13400
  return n;
13401
13401
  }
13402
13402
  function Z_({ field: e, value: t, values: n, onChange: r, disabled: i, onAction: a }) {
13403
- let o = A(), [s, c] = w(!1), [u, d] = w(null), [f, p] = w(null), m = X_(e, n), h = Object.keys(e.paramsFromForm ?? {}).some((e) => m[e] === void 0);
13404
- l(() => {
13405
- if (!a || h) {
13403
+ let o = A(), [s, c] = w(!1), [u, d] = w(null), [f, p] = w(null), m = X_(e, n), h = Object.keys(e.paramsFromForm ?? {}).some((e) => m[e] === void 0), g = e.mapOption.value, _ = e.mapOption.label, v = e.mapOption.description, y = (e.refreshOn ?? Object.values(e.paramsFromForm ?? {})).map((e) => `${e}=${JSON.stringify(n[e])}`).join("|"), b = x(a);
13404
+ b.current = a;
13405
+ let S = x(r);
13406
+ S.current = r;
13407
+ let C = x(m);
13408
+ C.current = m;
13409
+ let T = x(t);
13410
+ return T.current = t, l(() => {
13411
+ let t = b.current;
13412
+ if (!t || h) {
13406
13413
  p(null), d(null);
13407
13414
  return;
13408
13415
  }
13409
13416
  let n = !1;
13410
- return c(!0), d(null), a(e.action, e.key, m).then((i) => {
13417
+ c(!0), d(null);
13418
+ let r = C.current;
13419
+ return t(e.action, e.key, r).then((t) => {
13411
13420
  if (n) return;
13412
- let a = i, o = [];
13413
- if (Array.isArray(a)) o = a;
13414
- else if (a && typeof a == "object") for (let e of Object.keys(a)) {
13415
- let t = a[e];
13421
+ let r = t, i = [];
13422
+ if (Array.isArray(r)) i = r;
13423
+ else if (r && typeof r == "object") for (let e of Object.keys(r)) {
13424
+ let t = r[e];
13416
13425
  if (Array.isArray(t)) {
13417
- o = t;
13426
+ i = t;
13418
13427
  break;
13419
13428
  }
13420
13429
  }
13421
- if (p(o), e.hideWhenFewerThan !== void 0 && o.length === 1 && (typeof t != "string" || t.length === 0)) {
13422
- let e = o[0]?.[g];
13423
- typeof e == "string" && e.length > 0 && r(e);
13430
+ p(i);
13431
+ let a = T.current;
13432
+ if (e.hideWhenFewerThan !== void 0 && i.length === 1 && (typeof a != "string" || a.length === 0)) {
13433
+ let e = i[0]?.[g];
13434
+ typeof e == "string" && e.length > 0 && S.current(e);
13424
13435
  }
13425
13436
  }).catch((e) => {
13426
13437
  n || (d(e instanceof Error ? e.message : String(e)), p([]));
@@ -13430,13 +13441,14 @@ function Z_({ field: e, value: t, values: n, onChange: r, disabled: i, onAction:
13430
13441
  n = !0;
13431
13442
  };
13432
13443
  }, [
13433
- (e.refreshOn ?? Object.values(e.paramsFromForm ?? {})).map((e) => `${e}=${JSON.stringify(n[e])}`).join("|"),
13434
- a,
13444
+ y,
13445
+ h,
13446
+ a !== void 0,
13435
13447
  e.action,
13436
- e.key
13437
- ]);
13438
- let g = e.mapOption.value, _ = e.mapOption.label, v = e.mapOption.description;
13439
- return !a && e.hideWhenFewerThan !== void 0 || e.hideWhenFewerThan !== void 0 && f !== null && f.length < e.hideWhenFewerThan ? null : /* @__PURE__ */ E(y_, {
13448
+ e.key,
13449
+ e.hideWhenFewerThan,
13450
+ g
13451
+ ]), !a && e.hideWhenFewerThan !== void 0 || e.hideWhenFewerThan !== void 0 && f !== null && f.length < e.hideWhenFewerThan ? null : /* @__PURE__ */ E(y_, {
13440
13452
  label: e.label,
13441
13453
  description: e.description,
13442
13454
  required: e.required,
@@ -1,4 +1,4 @@
1
- import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-BvSjPfq3.mjs";
1
+ import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C7h1o2pO.mjs";
2
2
  //#region \0virtual:mf-localSharedImportMap:__mfe_internal__addon_training_page
3
3
  var e = {
4
4
  "@camstack/sdk": {
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.330",
36
+ version: "1.2.331",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_training_page",
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.330",
84
+ version: "1.2.331",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-BvSjPfq3.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C7h1o2pO.mjs";
2
2
  export { t as get, e as init };
@@ -2762,7 +2762,7 @@ async function or(e) {
2762
2762
  }
2763
2763
  }
2764
2764
  async function sr() {
2765
- return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-BNJmzVCS.mjs")).catch((e) => {
2765
+ return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-CXs_K1We.mjs")).catch((e) => {
2766
2766
  throw ir = void 0, e;
2767
2767
  }), ir;
2768
2768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-training",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "description": "Cloud training for CamStack: fine-tune the root detector on your own frames, on your own GPU-cloud account",
5
5
  "keywords": [
6
6
  "camstack",