@milaboratories/milaboratories.ui-examples.model 1.1.12 → 1.1.14

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @milaboratories/milaboratories.ui-examples.model@1.1.12 build /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model
2
+ > @milaboratories/milaboratories.ui-examples.model@1.1.14 build /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model
3
3
  > tsup && vite build && block-tools build-model
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,21 +10,21 @@
10
10
  CLI Cleaning output folder
11
11
  CJS Build start
12
12
  ESM Build start
13
- CJS dist/index.cjs 3.08 KB
14
- CJS dist/index.cjs.map 7.29 KB
15
- CJS ⚡️ Build success in 81ms
16
- ESM dist/index.js 3.04 KB
17
- ESM dist/index.js.map 7.25 KB
18
- ESM ⚡️ Build success in 81ms
13
+ CJS dist/index.cjs 3.02 KB
14
+ CJS dist/index.cjs.map 7.16 KB
15
+ CJS ⚡️ Build success in 82ms
16
+ ESM dist/index.js 2.98 KB
17
+ ESM dist/index.js.map 7.12 KB
18
+ ESM ⚡️ Build success in 83ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 861ms
21
- DTS dist/index.d.cts 1.45 KB
22
- DTS dist/index.d.ts 1.45 KB
20
+ DTS ⚡️ Build success in 823ms
21
+ DTS dist/index.d.cts 1.43 KB
22
+ DTS dist/index.d.ts 1.43 KB
23
23
  vite v5.4.11 building for production...
24
24
  transforming...
25
25
  ✓ 4 modules transformed.
26
26
  rendering chunks...
27
27
  computing gzip size...
28
- dist/bundle.js 144.78 kB │ gzip: 26.39 kB │ map: 316.80 kB
29
- dist/bundle.js 155.02 kB │ gzip: 26.89 kB │ map: 317.92 kB
30
- ✓ built in 483ms
28
+ dist/bundle.js 145.04 kB │ gzip: 26.56 kB │ map: 317.02 kB
29
+ dist/bundle.js 155.27 kB │ gzip: 27.07 kB │ map: 318.14 kB
30
+ ✓ built in 405ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @milaboratories/milaboratories.ui-examples.model
2
2
 
3
+ ## 1.1.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [c0d5856]
8
+ - @platforma-sdk/model@1.22.0
9
+
10
+ ## 1.1.13
11
+
12
+ ### Patch Changes
13
+
14
+ - ca66b2a: [ui-kit] Check that all standard components have tooltip slot
15
+
3
16
  ## 1.1.12
4
17
 
5
18
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -3917,7 +3917,7 @@
3917
3917
  function b$1(t) {
3918
3918
  throw new Error("Unexpected object: " + t);
3919
3919
  }
3920
- function J$1(t) {
3920
+ function J(t) {
3921
3921
  const { type: n, name: e, domain: r } = t;
3922
3922
  return { type: n, name: e, ...r && { domain: r } };
3923
3923
  }
@@ -4007,7 +4007,7 @@
4007
4007
  z.string().length(Q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4008
4008
  var fe = Object.defineProperty;
4009
4009
  var he = (n, e, t) => e in n ? fe(n, e, { enumerable: true, configurable: true, writable: true, value: t }) : n[e] = t;
4010
- var w = (n, e, t) => he(n, typeof e != "symbol" ? e + "" : e, t);
4010
+ var S = (n, e, t) => he(n, typeof e != "symbol" ? e + "" : e, t);
4011
4011
  function V(n) {
4012
4012
  return { type: "Immediate", value: n };
4013
4013
  }
@@ -4033,17 +4033,17 @@
4033
4033
  if (n in t.callbackRegistry) throw new Error(`Callback with key ${n} already registered.`);
4034
4034
  return t.callbackRegistry[n] = e, true;
4035
4035
  }
4036
- const J = /* @__PURE__ */ new Map();
4036
+ const U = /* @__PURE__ */ new Map();
4037
4037
  function Ce(n, e) {
4038
4038
  n in c().callbackRegistry || (c().callbackRegistry[n] = (t) => {
4039
- for (const r of J.get(n))
4039
+ for (const r of U.get(n))
4040
4040
  r(t);
4041
- }, J.set(n, [])), J.get(n).push(e);
4041
+ }, U.set(n, [])), U.get(n).push(e);
4042
4042
  }
4043
4043
  class _ {
4044
4044
  constructor(e, t = (r) => r) {
4045
- w(this, "isResolved", false);
4046
- w(this, "resolvedValue");
4045
+ S(this, "isResolved", false);
4046
+ S(this, "resolvedValue");
4047
4047
  this.handle = e, this.postProcess = t, Ce(e, (r) => {
4048
4048
  this.resolvedValue = t(r), this.isResolved = true;
4049
4049
  });
@@ -4281,27 +4281,27 @@
4281
4281
  importance: z.number().optional(),
4282
4282
  id: z.string().optional(),
4283
4283
  label: z.string()
4284
- }), Oe = z.array(Re), Te = 1e-3, ke = "__LABEL__", ee = "__LABEL__@1";
4285
- function xe(n, e, t = {}) {
4284
+ }), Te = z.array(Re), Oe = 1e-3, xe = "__LABEL__", ee = "__LABEL__@1";
4285
+ function ke(n, e, t = {}) {
4286
4286
  const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i2 = n.map((p) => {
4287
4287
  var F, Q2;
4288
- const g = e(p), f2 = (F = g.annotations) == null ? void 0 : F[Ie], C = (Q2 = g.annotations) == null ? void 0 : Q2[Fe], y = (C ? Oe.safeParse(JSON.parse(C)).data : void 0) ?? [];
4288
+ const g = e(p), f2 = (F = g.annotations) == null ? void 0 : F[Ie], C = (Q2 = g.annotations) == null ? void 0 : Q2[Fe], y = (C ? Te.safeParse(JSON.parse(C)).data : void 0) ?? [];
4289
4289
  if (f2) {
4290
- const S = { label: f2, type: ke, importance: -2 };
4291
- t.addLabelAsSuffix ? y.push(S) : y.splice(0, 0, S);
4290
+ const w = { label: f2, type: xe, importance: -2 };
4291
+ t.addLabelAsSuffix ? y.push(w) : y.splice(0, 0, w);
4292
4292
  }
4293
4293
  const I = [], D = /* @__PURE__ */ new Map();
4294
- for (let S = y.length - 1; S >= 0; --S) {
4295
- const { type: M } = y[S], pe = y[S].importance ?? 0, U = (D.get(M) ?? 0) + 1;
4296
- D.set(M, U);
4297
- const R = `${M}@${U}`;
4294
+ for (let w = y.length - 1; w >= 0; --w) {
4295
+ const { type: M } = y[w], pe = y[w].importance ?? 0, J2 = (D.get(M) ?? 0) + 1;
4296
+ D.set(M, J2);
4297
+ const R = `${M}@${J2}`;
4298
4298
  s.set(R, (s.get(R) ?? 0) + 1), r.set(
4299
4299
  R,
4300
4300
  Math.max(
4301
4301
  r.get(R) ?? Number.NEGATIVE_INFINITY,
4302
- pe - (y.length - S) * Te
4302
+ pe - (y.length - w) * Oe
4303
4303
  )
4304
- ), I.push({ ...y[S], fullType: R, occurenceIndex: U });
4304
+ ), I.push({ ...y[w], fullType: R, occurenceIndex: J2 });
4305
4305
  }
4306
4306
  return I.reverse(), {
4307
4307
  value: p,
@@ -4338,8 +4338,8 @@
4338
4338
  }
4339
4339
  class De {
4340
4340
  constructor() {
4341
- w(this, "ctx", c());
4342
- w(this, "defaultLabelFn", (e, t) => {
4341
+ S(this, "ctx", c());
4342
+ S(this, "defaultLabelFn", (e, t) => {
4343
4343
  var r;
4344
4344
  return ((r = e.annotations) == null ? void 0 : r["pl7.app/label"]) ?? "Unlabelled";
4345
4345
  });
@@ -4352,7 +4352,7 @@
4352
4352
  }
4353
4353
  getOptions(e, t) {
4354
4354
  const r = this.getSpecs().entries.filter((s) => e(s.obj));
4355
- return typeof t == "object" || typeof t > "u" ? xe(r, (s) => s.obj, t ?? {}).map(({ value: { ref: s }, label: i2 }) => ({
4355
+ return typeof t == "object" || typeof t > "u" ? ke(r, (s) => s.obj, t ?? {}).map(({ value: { ref: s }, label: i2 }) => ({
4356
4356
  ref: s,
4357
4357
  label: i2
4358
4358
  })) : r.map((s) => ({
@@ -4487,12 +4487,26 @@
4487
4487
  }
4488
4488
  class L {
4489
4489
  constructor() {
4490
- w(this, "ctx");
4491
- w(this, "args");
4492
- w(this, "uiState");
4493
- w(this, "resultPool", new De());
4490
+ S(this, "ctx");
4491
+ S(this, "args");
4492
+ S(this, "uiState");
4493
+ S(this, "_activeArgsCache");
4494
+ S(this, "resultPool", new De());
4494
4495
  this.ctx = c(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
4495
4496
  }
4497
+ /**
4498
+ * Returns args snapshot the block was executed for (i.e. when "Run" button was pressed).
4499
+ * Returns undefined, if block was never executed or stopped mid-way execution, so that the result was cleared.
4500
+ * */
4501
+ get activeArgs() {
4502
+ return this._activeArgsCache === void 0 && (this._activeArgsCache = {
4503
+ v: this.ctx.activeArgs ? JSON.parse(this.ctx.activeArgs) : void 0
4504
+ }), this._activeArgsCache.v;
4505
+ }
4506
+ // /** Can be used to determine features provided by the desktop instance. */
4507
+ // public get featureFlags() {
4508
+ // return this.ctx.featureFlags;
4509
+ // }
4496
4510
  getNamedAccessor(e) {
4497
4511
  return H(
4498
4512
  this.ctx.getAccessorHandleByName(e),
@@ -4502,27 +4516,9 @@
4502
4516
  get prerun() {
4503
4517
  return this.getNamedAccessor(ae);
4504
4518
  }
4505
- /**
4506
- * @deprecated use prerun
4507
- */
4508
- get precalc() {
4509
- return this.prerun;
4510
- }
4511
- /**
4512
- * @deprecated use prerun
4513
- */
4514
- get stagingOutput() {
4515
- return this.precalc;
4516
- }
4517
4519
  get outputs() {
4518
4520
  return this.getNamedAccessor(le);
4519
4521
  }
4520
- /**
4521
- * @deprecated use outputs
4522
- */
4523
- get mainOutput() {
4524
- return this.outputs;
4525
- }
4526
4522
  /**
4527
4523
  * Find labels data for a given axis id. It will search for a label column and return its data as a map.
4528
4524
  * @returns a map of axis value => label
@@ -4578,7 +4574,7 @@
4578
4574
  return this.ctx.getCurrentUnstableMarker();
4579
4575
  }
4580
4576
  }
4581
- const T = "1.21.20";
4577
+ const O = "1.22.0";
4582
4578
  function Le(n) {
4583
4579
  return n.__renderLambda === true;
4584
4580
  }
@@ -4638,10 +4634,6 @@
4638
4634
  retentiveOutput(e, t) {
4639
4635
  return this.output(e, t, { retentive: true });
4640
4636
  }
4641
- /** @deprecated */
4642
- canRun(e) {
4643
- return this.inputsValid(e);
4644
- }
4645
4637
  argsValid(e) {
4646
4638
  return typeof e == "function" ? (E("inputsValid", () => e(new L())), new v(
4647
4639
  this._renderingMode,
@@ -4664,9 +4656,6 @@
4664
4656
  this._title
4665
4657
  );
4666
4658
  }
4667
- inputsValid(e) {
4668
- return this.argsValid(e);
4669
- }
4670
4659
  sections(e) {
4671
4660
  return Array.isArray(e) ? this.sections(V(e)) : typeof e == "function" ? (E("sections", () => e(new L())), new v(
4672
4661
  this._renderingMode,
@@ -4686,6 +4675,7 @@
4686
4675
  this._title
4687
4676
  );
4688
4677
  }
4678
+ /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
4689
4679
  title(e) {
4690
4680
  return E("title", () => e(new L())), new v(
4691
4681
  this._renderingMode,
@@ -4743,7 +4733,7 @@
4743
4733
  if (this._initialArgs === void 0) throw new Error("Initial arguments not set.");
4744
4734
  const e = {
4745
4735
  v3: {
4746
- sdkVersion: T,
4736
+ sdkVersion: O,
4747
4737
  renderingMode: this._renderingMode,
4748
4738
  initialArgs: this._initialArgs,
4749
4739
  initialUiState: this._initialUiState,
@@ -4753,7 +4743,7 @@
4753
4743
  outputs: this._outputs
4754
4744
  },
4755
4745
  // fields below are added to allow previous desktop versions read generated configs
4756
- sdkVersion: T,
4746
+ sdkVersion: O,
4757
4747
  renderingMode: this._renderingMode,
4758
4748
  initialArgs: this._initialArgs,
4759
4749
  inputsValid: G(this._inputsValid),
@@ -4762,7 +4752,7 @@
4762
4752
  Object.entries(this._outputs).map(([t, r]) => [t, G(r)])
4763
4753
  )
4764
4754
  };
4765
- return Se() ? oe({ sdkVersion: T }) : { config: e };
4755
+ return Se() ? oe({ sdkVersion: O }) : { config: e };
4766
4756
  }
4767
4757
  }
4768
4758
  function _t(n, e, t, r) {
@@ -4777,9 +4767,9 @@
4777
4767
  }, o = /* @__PURE__ */ new Map();
4778
4768
  for (const d of e)
4779
4769
  for (const p of d.spec.axesSpec) {
4780
- const g = J$1(p);
4770
+ const g = J(p);
4781
4771
  for (const f2 of s) {
4782
- const C = f2.spec.axesSpec[0], y = J$1(f2.spec.axesSpec[0]);
4772
+ const C = f2.spec.axesSpec[0], y = J(f2.spec.axesSpec[0]);
4783
4773
  if (ot(g, y)) {
4784
4774
  const I = Object.keys(g.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
4785
4775
  if (I > D) {
@@ -4874,7 +4864,6 @@
4874
4864
  { type: "link", href: "/modals", label: "Modals" },
4875
4865
  { type: "link", href: "/select-files", label: "Select Files" },
4876
4866
  { type: "link", href: "/inject-env", label: "Inject env" },
4877
- { type: "link", href: "/dropdowns", label: "Dropdowns" },
4878
4867
  { type: "link", href: "/use-watch-fetch", label: "useWatchFetch" },
4879
4868
  { type: "link", href: "/typography", label: "Typography" },
4880
4869
  { type: "link", href: "/ag-grid-vue", label: "AgGridVue" },