@milaboratories/milaboratories.ui-examples.model 1.2.4 → 1.2.6
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +15 -0
- package/dist/bundle.js +329 -329
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -3069,31 +3069,31 @@
|
|
|
3069
3069
|
});
|
|
3070
3070
|
}
|
|
3071
3071
|
const params = { errorMap: ctx.common.contextualErrorMap };
|
|
3072
|
-
const
|
|
3072
|
+
const fn2 = ctx.data;
|
|
3073
3073
|
if (this._def.returns instanceof ZodPromise) {
|
|
3074
|
-
const
|
|
3074
|
+
const me = this;
|
|
3075
3075
|
return OK(async function(...args) {
|
|
3076
3076
|
const error = new ZodError([]);
|
|
3077
|
-
const parsedArgs = await
|
|
3077
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
3078
3078
|
error.addIssue(makeArgsIssue(args, e));
|
|
3079
3079
|
throw error;
|
|
3080
3080
|
});
|
|
3081
|
-
const result = await Reflect.apply(
|
|
3082
|
-
const parsedReturns = await
|
|
3081
|
+
const result = await Reflect.apply(fn2, this, parsedArgs);
|
|
3082
|
+
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
3083
3083
|
error.addIssue(makeReturnsIssue(result, e));
|
|
3084
3084
|
throw error;
|
|
3085
3085
|
});
|
|
3086
3086
|
return parsedReturns;
|
|
3087
3087
|
});
|
|
3088
3088
|
} else {
|
|
3089
|
-
const
|
|
3089
|
+
const me = this;
|
|
3090
3090
|
return OK(function(...args) {
|
|
3091
|
-
const parsedArgs =
|
|
3091
|
+
const parsedArgs = me._def.args.safeParse(args, params);
|
|
3092
3092
|
if (!parsedArgs.success) {
|
|
3093
3093
|
throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
3094
3094
|
}
|
|
3095
|
-
const result = Reflect.apply(
|
|
3096
|
-
const parsedReturns =
|
|
3095
|
+
const result = Reflect.apply(fn2, this, parsedArgs.data);
|
|
3096
|
+
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
3097
3097
|
if (!parsedReturns.success) {
|
|
3098
3098
|
throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
3099
3099
|
}
|
|
@@ -3955,9 +3955,9 @@
|
|
|
3955
3955
|
return canonicalize;
|
|
3956
3956
|
}
|
|
3957
3957
|
var canonicalizeExports = requireCanonicalize();
|
|
3958
|
-
const
|
|
3959
|
-
var R = Object.defineProperty;
|
|
3960
|
-
var L = (e, n2, t) => n2 in e ? R(e, n2, { enumerable: true, configurable: true, writable: true, value: t }) : e[n2] = t;
|
|
3958
|
+
const Ne = /* @__PURE__ */ getDefaultExportFromCjs(canonicalizeExports);
|
|
3959
|
+
var R$1 = Object.defineProperty;
|
|
3960
|
+
var L = (e, n2, t) => n2 in e ? R$1(e, n2, { enumerable: true, configurable: true, writable: true, value: t }) : e[n2] = t;
|
|
3961
3961
|
var d = (e, n2, t) => L(e, typeof n2 != "symbol" ? n2 + "" : n2, t);
|
|
3962
3962
|
z$1.object({
|
|
3963
3963
|
/** Included left border. */
|
|
@@ -3968,7 +3968,7 @@
|
|
|
3968
3968
|
function A(e) {
|
|
3969
3969
|
throw new Error("Unexpected object: " + e);
|
|
3970
3970
|
}
|
|
3971
|
-
function Ce(e) {
|
|
3971
|
+
function Ce$1(e) {
|
|
3972
3972
|
if (!e || typeof e != "object")
|
|
3973
3973
|
return false;
|
|
3974
3974
|
const n2 = e;
|
|
@@ -4030,10 +4030,10 @@
|
|
|
4030
4030
|
return false;
|
|
4031
4031
|
}
|
|
4032
4032
|
}
|
|
4033
|
-
function
|
|
4033
|
+
function Ve(e) {
|
|
4034
4034
|
return _(e) ? e.type === "JsonPartitioned" || e.type === "BinaryPartitioned" : false;
|
|
4035
4035
|
}
|
|
4036
|
-
function
|
|
4036
|
+
function je$1(e) {
|
|
4037
4037
|
switch (e.type) {
|
|
4038
4038
|
case "Json": {
|
|
4039
4039
|
const n2 = Object.entries(e.data).map(([t, r]) => ({ key: JSON.parse(t), value: r }));
|
|
@@ -4095,7 +4095,7 @@
|
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
4097
|
}
|
|
4098
|
-
function
|
|
4098
|
+
function qe(e) {
|
|
4099
4099
|
return {
|
|
4100
4100
|
columnId: e.id,
|
|
4101
4101
|
spec: e.spec
|
|
@@ -4108,20 +4108,20 @@
|
|
|
4108
4108
|
function C(e) {
|
|
4109
4109
|
return e.map(y);
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4112
|
-
return
|
|
4111
|
+
function Te$1(e) {
|
|
4112
|
+
return Ne(y(e));
|
|
4113
4113
|
}
|
|
4114
|
-
function ee
|
|
4114
|
+
function ee(e, n2) {
|
|
4115
4115
|
if (e === void 0) return n2 === void 0;
|
|
4116
4116
|
if (n2 === void 0) return true;
|
|
4117
4117
|
for (const t in n2)
|
|
4118
4118
|
if (e[t] !== n2[t]) return false;
|
|
4119
4119
|
return true;
|
|
4120
4120
|
}
|
|
4121
|
-
function ne
|
|
4122
|
-
return e.name === n2.name && ee
|
|
4121
|
+
function ne(e, n2) {
|
|
4122
|
+
return e.name === n2.name && ee(e.domain, n2.domain);
|
|
4123
4123
|
}
|
|
4124
|
-
function
|
|
4124
|
+
function ze(e, n2) {
|
|
4125
4125
|
return { ...e, src: g(e.src, n2) };
|
|
4126
4126
|
}
|
|
4127
4127
|
function g(e, n2) {
|
|
@@ -4156,16 +4156,16 @@
|
|
|
4156
4156
|
A(e);
|
|
4157
4157
|
}
|
|
4158
4158
|
}
|
|
4159
|
-
function te(e) {
|
|
4160
|
-
return
|
|
4159
|
+
function te$1(e) {
|
|
4160
|
+
return Ne(e);
|
|
4161
4161
|
}
|
|
4162
|
-
function
|
|
4163
|
-
return
|
|
4162
|
+
function E(e) {
|
|
4163
|
+
return Ne(y(e));
|
|
4164
4164
|
}
|
|
4165
|
-
function
|
|
4165
|
+
function x$1(e, n2) {
|
|
4166
4166
|
return JSON.stringify([e, n2]);
|
|
4167
4167
|
}
|
|
4168
|
-
class
|
|
4168
|
+
let Ge$1 = class Ge {
|
|
4169
4169
|
/**
|
|
4170
4170
|
* Creates a new anchor context from a set of anchor column specifications
|
|
4171
4171
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -4180,14 +4180,14 @@
|
|
|
4180
4180
|
t.sort((r, o) => r[0].localeCompare(o[0]));
|
|
4181
4181
|
for (const [r, o] of t) {
|
|
4182
4182
|
for (let i = 0; i < o.axesSpec.length; i++) {
|
|
4183
|
-
const a = o.axesSpec[i], s2 =
|
|
4183
|
+
const a = o.axesSpec[i], s2 = E(a);
|
|
4184
4184
|
this.axes.set(s2, { anchor: r, idx: i });
|
|
4185
4185
|
}
|
|
4186
4186
|
if (o.domain !== void 0) {
|
|
4187
4187
|
const i = Object.entries(o.domain);
|
|
4188
4188
|
i.sort((a, s2) => a[0].localeCompare(s2[0])), this.domainPackToAnchor.set(JSON.stringify(i), r), this.domainPacks.push(i.map(([a]) => a));
|
|
4189
4189
|
for (const [a, s2] of i) {
|
|
4190
|
-
const u2 =
|
|
4190
|
+
const u2 = x$1(a, s2);
|
|
4191
4191
|
this.domains.set(u2, r);
|
|
4192
4192
|
}
|
|
4193
4193
|
}
|
|
@@ -4222,11 +4222,11 @@
|
|
|
4222
4222
|
for (const [a, s2] of Object.entries(n2.domain ?? {})) {
|
|
4223
4223
|
if (o !== void 0 && o.has(a))
|
|
4224
4224
|
continue;
|
|
4225
|
-
const u2 =
|
|
4225
|
+
const u2 = x$1(a, s2), c2 = this.domains.get(u2);
|
|
4226
4226
|
r.domain ?? (r.domain = {}), r.domain[a] = c2 ? { anchor: c2 } : s2;
|
|
4227
4227
|
}
|
|
4228
4228
|
if (r.axes = n2.axesSpec.map((a) => {
|
|
4229
|
-
const s2 =
|
|
4229
|
+
const s2 = E(a), u2 = this.axes.get(s2);
|
|
4230
4230
|
return u2 === void 0 ? y(a) : u2;
|
|
4231
4231
|
}), !t || t.length === 0)
|
|
4232
4232
|
return r;
|
|
@@ -4256,10 +4256,10 @@
|
|
|
4256
4256
|
* @returns A canonicalized string representation of the anchored column identifier
|
|
4257
4257
|
*/
|
|
4258
4258
|
deriveS(n2, t) {
|
|
4259
|
-
return te(this.derive(n2, t));
|
|
4259
|
+
return te$1(this.derive(n2, t));
|
|
4260
4260
|
}
|
|
4261
|
-
}
|
|
4262
|
-
function
|
|
4261
|
+
};
|
|
4262
|
+
function Xe$1(e, n2, t) {
|
|
4263
4263
|
const r = { ...n2 }, o = (t == null ? void 0 : t.ignoreMissingDomains) ?? false;
|
|
4264
4264
|
if (r.domainAnchor !== void 0) {
|
|
4265
4265
|
const i = e[r.domainAnchor];
|
|
@@ -4306,7 +4306,7 @@
|
|
|
4306
4306
|
throw new Error(`Axis with name "${n2.name}" not found in anchor "${t}"`);
|
|
4307
4307
|
return o[0];
|
|
4308
4308
|
} else if ("id" in n2) {
|
|
4309
|
-
const o = r.axesSpec.filter((i) => ne
|
|
4309
|
+
const o = r.axesSpec.filter((i) => ne(n2.id, y(i)));
|
|
4310
4310
|
if (o.length > 1)
|
|
4311
4311
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
4312
4312
|
if (o.length === 0)
|
|
@@ -4324,17 +4324,17 @@
|
|
|
4324
4324
|
function ie$1(e) {
|
|
4325
4325
|
return l$1(e.spec);
|
|
4326
4326
|
}
|
|
4327
|
-
function
|
|
4327
|
+
function en(e) {
|
|
4328
4328
|
if (!ie$1(e)) throw new Error(`not a PColumn (kind = ${e.spec.kind})`);
|
|
4329
4329
|
return e;
|
|
4330
4330
|
}
|
|
4331
|
-
function
|
|
4331
|
+
function nn(e, n2) {
|
|
4332
4332
|
return e === void 0 ? void 0 : {
|
|
4333
4333
|
...e,
|
|
4334
4334
|
data: n2(e.data)
|
|
4335
4335
|
};
|
|
4336
4336
|
}
|
|
4337
|
-
function
|
|
4337
|
+
function tn(e) {
|
|
4338
4338
|
const n2 = /* @__PURE__ */ new Map(), t = (r) => {
|
|
4339
4339
|
switch (r.type) {
|
|
4340
4340
|
case "column":
|
|
@@ -4423,15 +4423,15 @@
|
|
|
4423
4423
|
}
|
|
4424
4424
|
return true;
|
|
4425
4425
|
}
|
|
4426
|
-
function
|
|
4426
|
+
function rn(e) {
|
|
4427
4427
|
return Array.isArray(e) ? (n2) => e.some((t) => l$1(n2) && v$1(n2, t)) : (n2) => l$1(n2) && v$1(n2, e);
|
|
4428
4428
|
}
|
|
4429
|
-
function
|
|
4429
|
+
function on(e) {
|
|
4430
4430
|
const n2 = {
|
|
4431
4431
|
kind: e.kind,
|
|
4432
4432
|
name: e.name
|
|
4433
4433
|
};
|
|
4434
|
-
return e.domain !== void 0 && (n2.domain = e.domain), l$1(e) && (n2.axesSpec = C(e.axesSpec)),
|
|
4434
|
+
return e.domain !== void 0 && (n2.domain = e.domain), l$1(e) && (n2.axesSpec = C(e.axesSpec)), Ne(n2);
|
|
4435
4435
|
}
|
|
4436
4436
|
z$1.object({
|
|
4437
4437
|
__isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
@@ -4441,10 +4441,10 @@
|
|
|
4441
4441
|
}).describe(
|
|
4442
4442
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
4443
4443
|
).readonly();
|
|
4444
|
-
function
|
|
4444
|
+
function un(e) {
|
|
4445
4445
|
return typeof e == "object" && e !== null && "__isRef" in e && e.__isRef === true && "blockId" in e && "name" in e;
|
|
4446
4446
|
}
|
|
4447
|
-
function
|
|
4447
|
+
function fn(e, n2 = true) {
|
|
4448
4448
|
if (n2)
|
|
4449
4449
|
return {
|
|
4450
4450
|
...e,
|
|
@@ -4455,13 +4455,13 @@
|
|
|
4455
4455
|
return r;
|
|
4456
4456
|
}
|
|
4457
4457
|
}
|
|
4458
|
-
function
|
|
4458
|
+
function ln(e, n2) {
|
|
4459
4459
|
return e.ok ? { ok: true, value: n2(e.value) } : e;
|
|
4460
4460
|
}
|
|
4461
4461
|
const de$1 = 24;
|
|
4462
4462
|
z$1.string().length(de$1).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
4463
|
-
function
|
|
4464
|
-
return
|
|
4463
|
+
function hn(e) {
|
|
4464
|
+
return Ne(e);
|
|
4465
4465
|
}
|
|
4466
4466
|
var stringify = { exports: {} };
|
|
4467
4467
|
var hasRequiredStringify;
|
|
@@ -4522,22 +4522,22 @@
|
|
|
4522
4522
|
cause: z$1.lazy(() => n).optional(),
|
|
4523
4523
|
errors: z$1.lazy(() => n.array()).optional()
|
|
4524
4524
|
});
|
|
4525
|
-
var
|
|
4526
|
-
var
|
|
4527
|
-
var k = (t, e, n2) =>
|
|
4528
|
-
function
|
|
4525
|
+
var Xe = Object.defineProperty;
|
|
4526
|
+
var Qe = (t, e, n2) => e in t ? Xe(t, e, { enumerable: true, configurable: true, writable: true, value: n2 }) : t[e] = n2;
|
|
4527
|
+
var k = (t, e, n2) => Qe(t, typeof e != "symbol" ? e + "" : e, n2);
|
|
4528
|
+
function ie(t) {
|
|
4529
4529
|
return { type: "Immediate", value: t };
|
|
4530
4530
|
}
|
|
4531
|
-
function
|
|
4531
|
+
function yt() {
|
|
4532
4532
|
return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
|
|
4533
4533
|
}
|
|
4534
|
-
function
|
|
4534
|
+
function Me(t) {
|
|
4535
4535
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
4536
4536
|
return globalThis.getPlatforma(t);
|
|
4537
4537
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
4538
4538
|
throw new Error("Can't get platforma instance.");
|
|
4539
4539
|
}
|
|
4540
|
-
function
|
|
4540
|
+
function bt() {
|
|
4541
4541
|
if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
|
|
4542
4542
|
}
|
|
4543
4543
|
function v() {
|
|
@@ -4545,23 +4545,23 @@
|
|
|
4545
4545
|
throw new Error("Not in config rendering context");
|
|
4546
4546
|
}
|
|
4547
4547
|
function G(t, e) {
|
|
4548
|
-
const n2 =
|
|
4548
|
+
const n2 = bt();
|
|
4549
4549
|
if (n2 === void 0) return false;
|
|
4550
4550
|
if (t in n2.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
|
|
4551
4551
|
return n2.callbackRegistry[t] = e, true;
|
|
4552
4552
|
}
|
|
4553
|
-
const
|
|
4554
|
-
function
|
|
4553
|
+
const pe = /* @__PURE__ */ new Map();
|
|
4554
|
+
function vt(t, e) {
|
|
4555
4555
|
t in v().callbackRegistry || (v().callbackRegistry[t] = (n2) => {
|
|
4556
|
-
for (const r of
|
|
4556
|
+
for (const r of pe.get(t))
|
|
4557
4557
|
r(n2);
|
|
4558
|
-
},
|
|
4558
|
+
}, pe.set(t, [])), pe.get(t).push(e);
|
|
4559
4559
|
}
|
|
4560
4560
|
class F {
|
|
4561
4561
|
constructor(e, n2 = (r) => r) {
|
|
4562
4562
|
k(this, "isResolved", false);
|
|
4563
4563
|
k(this, "resolvedValue");
|
|
4564
|
-
this.handle = e, this.postProcess = n2,
|
|
4564
|
+
this.handle = e, this.postProcess = n2, vt(e, (r) => {
|
|
4565
4565
|
this.resolvedValue = n2(r), this.isResolved = true;
|
|
4566
4566
|
});
|
|
4567
4567
|
}
|
|
@@ -4578,10 +4578,10 @@
|
|
|
4578
4578
|
return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
|
|
4579
4579
|
}
|
|
4580
4580
|
}
|
|
4581
|
-
function
|
|
4581
|
+
function ge(t, e) {
|
|
4582
4582
|
return t === void 0 ? void 0 : e(t);
|
|
4583
4583
|
}
|
|
4584
|
-
class
|
|
4584
|
+
class R {
|
|
4585
4585
|
constructor(e, n2) {
|
|
4586
4586
|
this.handle = e, this.resolvePath = n2;
|
|
4587
4587
|
}
|
|
@@ -4620,9 +4620,9 @@
|
|
|
4620
4620
|
...this.resolvePath,
|
|
4621
4621
|
...n2.map((i) => typeof i == "string" ? i : i.field)
|
|
4622
4622
|
];
|
|
4623
|
-
return
|
|
4623
|
+
return ge(
|
|
4624
4624
|
v().resolveWithCommon(this.handle, e, ...n2),
|
|
4625
|
-
(i) => new
|
|
4625
|
+
(i) => new R(i, r)
|
|
4626
4626
|
);
|
|
4627
4627
|
}
|
|
4628
4628
|
get resourceType() {
|
|
@@ -4642,9 +4642,9 @@
|
|
|
4642
4642
|
}
|
|
4643
4643
|
getError() {
|
|
4644
4644
|
const e = [...this.resolvePath, "error"];
|
|
4645
|
-
return
|
|
4645
|
+
return ge(
|
|
4646
4646
|
v().getError(this.handle),
|
|
4647
|
-
(n2) => new
|
|
4647
|
+
(n2) => new R(n2, e)
|
|
4648
4648
|
);
|
|
4649
4649
|
}
|
|
4650
4650
|
listInputFields() {
|
|
@@ -4702,7 +4702,7 @@
|
|
|
4702
4702
|
const i = {};
|
|
4703
4703
|
for (const [s2, o] of Object.entries(r)) {
|
|
4704
4704
|
const a = [...this.resolvePath, s2];
|
|
4705
|
-
i[s2] =
|
|
4705
|
+
i[s2] = nn(o, (l2) => new R(l2, a));
|
|
4706
4706
|
}
|
|
4707
4707
|
return i;
|
|
4708
4708
|
}
|
|
@@ -4801,103 +4801,103 @@
|
|
|
4801
4801
|
return s2 && (l2 = l2.filter((u2) => u2[1] !== void 0)), l2.map(([u2, h]) => o(u2, h));
|
|
4802
4802
|
}
|
|
4803
4803
|
}
|
|
4804
|
-
const
|
|
4805
|
-
const
|
|
4804
|
+
const je = "staging", Je = "main";
|
|
4805
|
+
const wt = "pl7.app/label", At = "pl7.app/trace", Pt = z$1.object({
|
|
4806
4806
|
type: z$1.string(),
|
|
4807
4807
|
importance: z$1.number().optional(),
|
|
4808
4808
|
id: z$1.string().optional(),
|
|
4809
4809
|
label: z$1.string()
|
|
4810
|
-
}),
|
|
4811
|
-
function
|
|
4812
|
-
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((
|
|
4813
|
-
var c2,
|
|
4814
|
-
const
|
|
4815
|
-
let
|
|
4816
|
-
"spec" in
|
|
4817
|
-
const
|
|
4818
|
-
...
|
|
4810
|
+
}), xt = z$1.array(Pt), _t = 1e-3, It = "__LABEL__", Ie = "__LABEL__@1";
|
|
4811
|
+
function Be(t, e, n2 = {}) {
|
|
4812
|
+
const r = /* @__PURE__ */ new Map(), i = n2.forceTraceElements !== void 0 && n2.forceTraceElements.length > 0 ? new Set(n2.forceTraceElements) : void 0, s2 = /* @__PURE__ */ new Map(), o = t.map((d2) => {
|
|
4813
|
+
var c2, b;
|
|
4814
|
+
const y2 = e(d2);
|
|
4815
|
+
let p2, m2, C2;
|
|
4816
|
+
"spec" in y2 && typeof y2.spec == "object" ? (p2 = y2.spec, m2 = y2.prefixTrace, C2 = y2.suffixTrace) : p2 = y2;
|
|
4817
|
+
const E2 = (c2 = p2.annotations) == null ? void 0 : c2[wt], _2 = (b = p2.annotations) == null ? void 0 : b[At], w = (_2 ? xt.safeParse(JSON.parse(_2)).data : void 0) ?? [], A2 = [
|
|
4818
|
+
...m2 ?? [],
|
|
4819
4819
|
...w,
|
|
4820
|
-
...
|
|
4820
|
+
...C2 ?? []
|
|
4821
4821
|
];
|
|
4822
|
-
if (
|
|
4823
|
-
const T = { label:
|
|
4822
|
+
if (E2 !== void 0) {
|
|
4823
|
+
const T = { label: E2, type: It, importance: -2 };
|
|
4824
4824
|
n2.addLabelAsSuffix ? A2.push(T) : A2.splice(0, 0, T);
|
|
4825
4825
|
}
|
|
4826
|
-
const
|
|
4826
|
+
const S2 = [], I = /* @__PURE__ */ new Map();
|
|
4827
4827
|
for (let T = A2.length - 1; T >= 0; --T) {
|
|
4828
|
-
const { type: U } = A2[T], V = A2[T].importance ?? 0,
|
|
4829
|
-
I.set(U,
|
|
4830
|
-
const K = `${U}@${
|
|
4828
|
+
const { type: U } = A2[T], V = A2[T].importance ?? 0, j = (I.get(U) ?? 0) + 1;
|
|
4829
|
+
I.set(U, j);
|
|
4830
|
+
const K = `${U}@${j}`;
|
|
4831
4831
|
s2.set(K, (s2.get(K) ?? 0) + 1), r.set(
|
|
4832
4832
|
K,
|
|
4833
4833
|
Math.max(
|
|
4834
4834
|
r.get(K) ?? Number.NEGATIVE_INFINITY,
|
|
4835
|
-
V - (A2.length - T) *
|
|
4835
|
+
V - (A2.length - T) * _t
|
|
4836
4836
|
)
|
|
4837
|
-
),
|
|
4837
|
+
), S2.push({ ...A2[T], fullType: K, occurrenceIndex: j });
|
|
4838
4838
|
}
|
|
4839
|
-
return
|
|
4840
|
-
value:
|
|
4841
|
-
spec:
|
|
4842
|
-
label:
|
|
4843
|
-
fullTrace:
|
|
4839
|
+
return S2.reverse(), {
|
|
4840
|
+
value: d2,
|
|
4841
|
+
spec: p2,
|
|
4842
|
+
label: E2,
|
|
4843
|
+
fullTrace: S2
|
|
4844
4844
|
};
|
|
4845
4845
|
}), a = [], l2 = [], u2 = [...r];
|
|
4846
|
-
u2.sort(([,
|
|
4847
|
-
for (const [
|
|
4848
|
-
|
|
4849
|
-
const h = (
|
|
4850
|
-
const
|
|
4851
|
-
for (let
|
|
4852
|
-
const
|
|
4853
|
-
if (
|
|
4854
|
-
if (
|
|
4855
|
-
|
|
4846
|
+
u2.sort(([, d2], [, y2]) => y2 - d2);
|
|
4847
|
+
for (const [d2] of u2)
|
|
4848
|
+
d2.endsWith("@1") || s2.get(d2) === t.length ? a.push(d2) : l2.push(d2);
|
|
4849
|
+
const h = (d2, y2 = false) => {
|
|
4850
|
+
const p2 = [];
|
|
4851
|
+
for (let m2 = 0; m2 < o.length; m2++) {
|
|
4852
|
+
const C2 = o[m2], E2 = C2.fullTrace.filter((A2) => d2.has(A2.fullType) || i && i.has(A2.type));
|
|
4853
|
+
if (E2.length === 0)
|
|
4854
|
+
if (y2)
|
|
4855
|
+
p2.push({
|
|
4856
4856
|
label: "Unlabeled",
|
|
4857
|
-
value:
|
|
4857
|
+
value: C2.value
|
|
4858
4858
|
});
|
|
4859
4859
|
else return;
|
|
4860
|
-
const _2 =
|
|
4861
|
-
|
|
4860
|
+
const _2 = E2.map((A2) => A2.label), w = n2.separator ?? " / ";
|
|
4861
|
+
p2.push({
|
|
4862
4862
|
label: _2.join(w),
|
|
4863
|
-
value:
|
|
4863
|
+
value: C2.value
|
|
4864
4864
|
});
|
|
4865
4865
|
}
|
|
4866
|
-
return
|
|
4866
|
+
return p2;
|
|
4867
4867
|
};
|
|
4868
4868
|
if (a.length === 0) {
|
|
4869
4869
|
if (l2.length !== 0) throw new Error("Non-empty secondary types list while main types list is empty.");
|
|
4870
|
-
return h(new Set(
|
|
4870
|
+
return h(new Set(Ie), true);
|
|
4871
4871
|
}
|
|
4872
4872
|
let f = 0, g2 = -1;
|
|
4873
4873
|
for (; f < a.length; ) {
|
|
4874
|
-
const
|
|
4875
|
-
n2.includeNativeLabel &&
|
|
4876
|
-
for (let
|
|
4877
|
-
g2 >= 0 &&
|
|
4878
|
-
const
|
|
4879
|
-
if (
|
|
4874
|
+
const d2 = /* @__PURE__ */ new Set();
|
|
4875
|
+
n2.includeNativeLabel && d2.add(Ie);
|
|
4876
|
+
for (let p2 = 0; p2 < f; ++p2) d2.add(a[p2]);
|
|
4877
|
+
g2 >= 0 && d2.add(a[g2]);
|
|
4878
|
+
const y2 = h(d2);
|
|
4879
|
+
if (y2 !== void 0 && new Set(y2.map((p2) => p2.label)).size === t.length) return y2;
|
|
4880
4880
|
g2++, g2 >= a.length && (f++, g2 = f);
|
|
4881
4881
|
}
|
|
4882
4882
|
return h(/* @__PURE__ */ new Set([...a, ...l2]), true);
|
|
4883
4883
|
}
|
|
4884
|
-
const
|
|
4885
|
-
const
|
|
4884
|
+
const Z = "PColumnData/", oe = Z + "ResourceMap", ae = Z + "Partitioned/ResourceMap", H = Z + "JsonPartitioned", B = Z + "BinaryPartitioned", Ue = Z + "Partitioned/", le = Ue + "JsonPartitioned", q = Ue + "BinaryPartitioned";
|
|
4885
|
+
const ye = (t) => {
|
|
4886
4886
|
if (t.endsWith(".index"))
|
|
4887
4887
|
return { baseKey: t.substring(0, t.length - 6), type: "index" };
|
|
4888
4888
|
if (t.endsWith(".values"))
|
|
4889
4889
|
return { baseKey: t.substring(0, t.length - 7), type: "values" };
|
|
4890
4890
|
throw new Error(`key must ends on .index/.values for binary p-column, got: ${t}`);
|
|
4891
4891
|
};
|
|
4892
|
-
function
|
|
4892
|
+
function Tt(t) {
|
|
4893
4893
|
if (!t) return;
|
|
4894
4894
|
const e = t.resourceType.name, n2 = t.getDataAsJson(), r = [];
|
|
4895
4895
|
let i = 0;
|
|
4896
4896
|
switch (e) {
|
|
4897
|
-
case
|
|
4897
|
+
case oe:
|
|
4898
4898
|
i = n2.keyLength;
|
|
4899
4899
|
break;
|
|
4900
|
-
case
|
|
4900
|
+
case ae:
|
|
4901
4901
|
i = n2.partitionKeyLength + n2.keyLength;
|
|
4902
4902
|
break;
|
|
4903
4903
|
case H:
|
|
@@ -4905,28 +4905,28 @@
|
|
|
4905
4905
|
i = n2.partitionKeyLength;
|
|
4906
4906
|
break;
|
|
4907
4907
|
case q:
|
|
4908
|
-
case
|
|
4908
|
+
case le:
|
|
4909
4909
|
i = n2.superPartitionKeyLength + n2.partitionKeyLength;
|
|
4910
4910
|
break;
|
|
4911
4911
|
}
|
|
4912
4912
|
switch (e) {
|
|
4913
|
-
case
|
|
4913
|
+
case oe:
|
|
4914
4914
|
case H:
|
|
4915
4915
|
case B:
|
|
4916
4916
|
for (let s2 of t.listInputFields()) {
|
|
4917
|
-
e === B && (s2 =
|
|
4917
|
+
e === B && (s2 = ye(s2).baseKey);
|
|
4918
4918
|
const o = [...JSON.parse(s2)];
|
|
4919
4919
|
r.push(o);
|
|
4920
4920
|
}
|
|
4921
4921
|
break;
|
|
4922
|
-
case
|
|
4922
|
+
case ae:
|
|
4923
4923
|
case q:
|
|
4924
|
-
case
|
|
4924
|
+
case le:
|
|
4925
4925
|
for (const s2 of t.listInputFields()) {
|
|
4926
4926
|
const o = [...JSON.parse(s2)], a = t.resolve({ field: s2, assertFieldType: "Input" });
|
|
4927
4927
|
if (a !== void 0)
|
|
4928
4928
|
for (let l2 of a.listInputFields()) {
|
|
4929
|
-
e === q && (l2 =
|
|
4929
|
+
e === q && (l2 = ye(l2).baseKey);
|
|
4930
4930
|
const u2 = [...o, ...JSON.parse(l2)];
|
|
4931
4931
|
r.push(u2);
|
|
4932
4932
|
}
|
|
@@ -4935,7 +4935,7 @@
|
|
|
4935
4935
|
}
|
|
4936
4936
|
return { data: r, keyLength: i };
|
|
4937
4937
|
}
|
|
4938
|
-
function
|
|
4938
|
+
function Lt(t) {
|
|
4939
4939
|
if (t.type !== "JsonPartitioned" && t.type !== "BinaryPartitioned")
|
|
4940
4940
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${t.type}`);
|
|
4941
4941
|
const { parts: e, partitionKeyLength: n2 } = t, r = [];
|
|
@@ -4954,11 +4954,11 @@
|
|
|
4954
4954
|
}
|
|
4955
4955
|
return r.map((i) => Array.from(i.values()));
|
|
4956
4956
|
}
|
|
4957
|
-
function
|
|
4957
|
+
function Ft(t) {
|
|
4958
4958
|
if (t === void 0) return;
|
|
4959
4959
|
if (_(t))
|
|
4960
|
-
return
|
|
4961
|
-
const e =
|
|
4960
|
+
return Lt(t);
|
|
4961
|
+
const e = Tt(t);
|
|
4962
4962
|
if (!e) return;
|
|
4963
4963
|
const { data: n2, keyLength: r } = e, i = [];
|
|
4964
4964
|
for (let s2 = 0; s2 < r; ++s2)
|
|
@@ -4971,14 +4971,14 @@
|
|
|
4971
4971
|
}
|
|
4972
4972
|
return i.map((s2) => Array.from(s2.values()));
|
|
4973
4973
|
}
|
|
4974
|
-
function
|
|
4974
|
+
function be(t, e = []) {
|
|
4975
4975
|
if (t === void 0 || !t.getIsReadyOrError()) return;
|
|
4976
4976
|
const n2 = t.resourceType.name, r = t.getDataAsJson();
|
|
4977
|
-
if (e.length > 0 && (n2 ===
|
|
4977
|
+
if (e.length > 0 && (n2 === le || n2 === q))
|
|
4978
4978
|
throw new Error(`Unexpected nested super-partitioned resource: ${n2}`);
|
|
4979
4979
|
switch (n2) {
|
|
4980
|
-
case
|
|
4981
|
-
case
|
|
4980
|
+
case oe:
|
|
4981
|
+
case ae:
|
|
4982
4982
|
throw new Error(`Only data columns are supported, got: ${n2}`);
|
|
4983
4983
|
case H: {
|
|
4984
4984
|
if (typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
@@ -5001,7 +5001,7 @@
|
|
|
5001
5001
|
throw new Error(`Missing partitionKeyLength in metadata for ${n2}`);
|
|
5002
5002
|
const i = [], s2 = /* @__PURE__ */ new Map();
|
|
5003
5003
|
for (const o of t.listInputFields()) {
|
|
5004
|
-
const a =
|
|
5004
|
+
const a = ye(o), l2 = t.resolve({ field: o, assertFieldType: "Input" });
|
|
5005
5005
|
if (l2 === void 0) return;
|
|
5006
5006
|
let u2 = s2.get(a.baseKey);
|
|
5007
5007
|
u2 || (u2 = {}, s2.set(a.baseKey, u2)), a.type === "index" ? u2.index = l2 : u2.values = l2;
|
|
@@ -5023,7 +5023,7 @@
|
|
|
5023
5023
|
parts: i
|
|
5024
5024
|
};
|
|
5025
5025
|
}
|
|
5026
|
-
case
|
|
5026
|
+
case le: {
|
|
5027
5027
|
if (typeof (r == null ? void 0 : r.superPartitionKeyLength) != "number" || typeof (r == null ? void 0 : r.partitionKeyLength) != "number")
|
|
5028
5028
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${n2}`);
|
|
5029
5029
|
const i = r.superPartitionKeyLength + r.partitionKeyLength, s2 = [];
|
|
@@ -5032,7 +5032,7 @@
|
|
|
5032
5032
|
if (a === void 0) return;
|
|
5033
5033
|
if (a.resourceType.name !== H)
|
|
5034
5034
|
throw new Error(`Expected ${H} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5035
|
-
const l2 =
|
|
5035
|
+
const l2 = be(a, JSON.parse(o));
|
|
5036
5036
|
if (l2 === void 0) return;
|
|
5037
5037
|
if (l2.type !== "JsonPartitioned")
|
|
5038
5038
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5053,7 +5053,7 @@
|
|
|
5053
5053
|
if (a === void 0) return;
|
|
5054
5054
|
if (a.resourceType.name !== B)
|
|
5055
5055
|
throw new Error(`Expected ${B} inside ${n2}, but got ${a.resourceType.name}`);
|
|
5056
|
-
const l2 =
|
|
5056
|
+
const l2 = be(a, JSON.parse(o));
|
|
5057
5057
|
if (l2 === void 0) return;
|
|
5058
5058
|
if (l2.type !== "BinaryPartitioned")
|
|
5059
5059
|
throw new Error(`Unexpected inner result type for ${n2}: ${l2.type}`);
|
|
@@ -5069,15 +5069,15 @@
|
|
|
5069
5069
|
throw new Error(`Unknown resource type: ${n2}`);
|
|
5070
5070
|
}
|
|
5071
5071
|
}
|
|
5072
|
-
function
|
|
5072
|
+
function Et(t) {
|
|
5073
5073
|
if (t !== void 0) {
|
|
5074
5074
|
if (_(t)) return t;
|
|
5075
|
-
if (Ce(t)) return
|
|
5076
|
-
if (t instanceof
|
|
5075
|
+
if (Ce$1(t)) return je$1(t);
|
|
5076
|
+
if (t instanceof R) return be(t);
|
|
5077
5077
|
throw new Error(`Unexpected input type: ${typeof t}`);
|
|
5078
5078
|
}
|
|
5079
5079
|
}
|
|
5080
|
-
function
|
|
5080
|
+
function kt(t, e) {
|
|
5081
5081
|
const n2 = [...e].sort((s2, o) => o[0] - s2[0]);
|
|
5082
5082
|
if (t.type === "JsonPartitioned" || t.type === "BinaryPartitioned") {
|
|
5083
5083
|
const { partitionKeyLength: s2 } = t;
|
|
@@ -5137,45 +5137,45 @@
|
|
|
5137
5137
|
}
|
|
5138
5138
|
}
|
|
5139
5139
|
}
|
|
5140
|
-
function
|
|
5140
|
+
function Dt(t) {
|
|
5141
5141
|
if (!Array.isArray(t)) return false;
|
|
5142
5142
|
if (t.length === 0) return true;
|
|
5143
5143
|
const e = t[0];
|
|
5144
5144
|
return typeof e == "object" && e !== null && "key" in e && "val" in e;
|
|
5145
5145
|
}
|
|
5146
|
-
class
|
|
5146
|
+
class Rt {
|
|
5147
5147
|
constructor(e) {
|
|
5148
5148
|
this.columns = e;
|
|
5149
5149
|
}
|
|
5150
5150
|
selectColumns(e) {
|
|
5151
|
-
const n2 = typeof e == "function" ? e :
|
|
5151
|
+
const n2 = typeof e == "function" ? e : rn(e);
|
|
5152
5152
|
return this.columns.filter((r) => n2(r.spec));
|
|
5153
5153
|
}
|
|
5154
5154
|
}
|
|
5155
|
-
function
|
|
5155
|
+
function Ot(t) {
|
|
5156
5156
|
if (t)
|
|
5157
5157
|
return t.map((e) => ({
|
|
5158
|
-
type: `split:${
|
|
5158
|
+
type: `split:${Te$1(e.axisId)}`,
|
|
5159
5159
|
label: e.label,
|
|
5160
5160
|
importance: 1e6
|
|
5161
5161
|
// High importance for split filters in labels
|
|
5162
5162
|
}));
|
|
5163
5163
|
}
|
|
5164
|
-
function
|
|
5164
|
+
function Kt(t) {
|
|
5165
5165
|
if (t)
|
|
5166
5166
|
return t.map((e) => [e.axisIdx, e.value]);
|
|
5167
5167
|
}
|
|
5168
|
-
function
|
|
5168
|
+
function Nt(t, e) {
|
|
5169
5169
|
if (!e || e.length === 0) return t;
|
|
5170
5170
|
const n2 = [...e].sort((r, i) => r[0] - i[0]);
|
|
5171
|
-
return
|
|
5171
|
+
return Ne({ id: t, axisFilters: n2 });
|
|
5172
5172
|
}
|
|
5173
|
-
function
|
|
5173
|
+
function Te(t) {
|
|
5174
5174
|
if (!t || typeof t != "object") return false;
|
|
5175
5175
|
const e = t, n2 = e.domain && typeof e.domain == "object" && Object.values(e.domain).some((i) => typeof i == "object" && i !== null && "anchor" in i), r = e.axes && Array.isArray(e.axes) && e.axes.some((i) => typeof i == "object" && i !== null && "anchor" in i);
|
|
5176
5176
|
return !!e.domainAnchor || n2 || r;
|
|
5177
5177
|
}
|
|
5178
|
-
function
|
|
5178
|
+
function Vt(t) {
|
|
5179
5179
|
if (typeof t != "object" || !("axes" in t) || t.axes === void 0)
|
|
5180
5180
|
return [];
|
|
5181
5181
|
const e = t.axes.map((n2, r) => typeof n2 == "object" && "split" in n2 && n2.split === true ? r : -1).filter((n2) => n2 !== -1);
|
|
@@ -5183,10 +5183,10 @@
|
|
|
5183
5183
|
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
5184
5184
|
return e.sort((n2, r) => n2 - r), e;
|
|
5185
5185
|
}
|
|
5186
|
-
class
|
|
5186
|
+
class X {
|
|
5187
5187
|
constructor() {
|
|
5188
5188
|
k(this, "defaultProviderStore", []);
|
|
5189
|
-
k(this, "providers", [new
|
|
5189
|
+
k(this, "providers", [new Rt(this.defaultProviderStore)]);
|
|
5190
5190
|
k(this, "axisLabelProviders", []);
|
|
5191
5191
|
}
|
|
5192
5192
|
addColumnProvider(e) {
|
|
@@ -5215,88 +5215,88 @@
|
|
|
5215
5215
|
};
|
|
5216
5216
|
let u2 = () => false;
|
|
5217
5217
|
if (a) {
|
|
5218
|
-
const
|
|
5219
|
-
if (
|
|
5218
|
+
const p2 = (Array.isArray(a) ? a : [a]).map((m2) => {
|
|
5219
|
+
if (Te(m2)) {
|
|
5220
5220
|
if (!r)
|
|
5221
5221
|
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
5222
|
-
return
|
|
5222
|
+
return rn(Xe$1(r.anchors, m2, n2));
|
|
5223
5223
|
} else
|
|
5224
|
-
return
|
|
5224
|
+
return rn(m2);
|
|
5225
5225
|
});
|
|
5226
|
-
u2 = (
|
|
5226
|
+
u2 = (m2) => p2.some((C2) => C2(m2));
|
|
5227
5227
|
}
|
|
5228
5228
|
const h = typeof e == "function" ? [e] : Array.isArray(e) ? e : [e], f = [], g2 = /* @__PURE__ */ new Set();
|
|
5229
|
-
for (const
|
|
5230
|
-
const
|
|
5231
|
-
let
|
|
5232
|
-
if (
|
|
5229
|
+
for (const p2 of h) {
|
|
5230
|
+
const m2 = Te(p2);
|
|
5231
|
+
let C2;
|
|
5232
|
+
if (m2) {
|
|
5233
5233
|
if (!r)
|
|
5234
5234
|
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
5235
|
-
|
|
5235
|
+
C2 = Xe$1(r.anchors, p2, n2);
|
|
5236
5236
|
} else
|
|
5237
|
-
|
|
5238
|
-
const
|
|
5239
|
-
for (const
|
|
5240
|
-
const I =
|
|
5237
|
+
C2 = p2;
|
|
5238
|
+
const E2 = /* @__PURE__ */ new Set(), _2 = [];
|
|
5239
|
+
for (const S2 of this.providers) {
|
|
5240
|
+
const I = S2.selectColumns(C2);
|
|
5241
5241
|
for (const c2 of I) {
|
|
5242
5242
|
if (u2(c2.spec)) continue;
|
|
5243
|
-
if (
|
|
5244
|
-
throw new Error(`Duplicate column id ${c2.id} in provider ${
|
|
5245
|
-
const
|
|
5246
|
-
g2.has(
|
|
5243
|
+
if (E2.has(c2.id))
|
|
5244
|
+
throw new Error(`Duplicate column id ${c2.id} in provider ${S2.constructor.name}`);
|
|
5245
|
+
const b = on(c2.spec);
|
|
5246
|
+
g2.has(b) || (E2.add(c2.id), g2.add(b), _2.push(c2));
|
|
5247
5247
|
}
|
|
5248
5248
|
}
|
|
5249
5249
|
if (_2.length === 0) continue;
|
|
5250
|
-
const w =
|
|
5251
|
-
for (const
|
|
5252
|
-
if (!l$1(
|
|
5253
|
-
const I =
|
|
5250
|
+
const w = Vt(p2), A2 = w.length > 0;
|
|
5251
|
+
for (const S2 of _2) {
|
|
5252
|
+
if (!l$1(S2.spec)) continue;
|
|
5253
|
+
const I = S2.spec;
|
|
5254
5254
|
if (A2) {
|
|
5255
|
-
if (
|
|
5256
|
-
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${
|
|
5257
|
-
const c2 =
|
|
5255
|
+
if (Dt(S2.data))
|
|
5256
|
+
throw new Error(`Splitting is not supported for PColumns with PColumnValues data format. Column id: ${S2.id}`);
|
|
5257
|
+
const c2 = Et(S2.data);
|
|
5258
5258
|
if (!c2) {
|
|
5259
5259
|
if (s2) continue;
|
|
5260
5260
|
return;
|
|
5261
5261
|
}
|
|
5262
|
-
if (
|
|
5263
|
-
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c2.type} for column ${
|
|
5264
|
-
const
|
|
5262
|
+
if (!Ve(c2))
|
|
5263
|
+
throw new Error(`Splitting requires Partitioned DataInfoEntries, but parsing resulted in ${c2.type} for column ${S2.id}`);
|
|
5264
|
+
const b = Ft(c2), T = w[w.length - 1];
|
|
5265
5265
|
if (T >= c2.partitionKeyLength)
|
|
5266
5266
|
throw new Error(`Not enough partition keys (${c2.partitionKeyLength}) for requested split axes (max index ${T}) in column ${I.name}`);
|
|
5267
|
-
const U = w.map((L2) => this.findLabels(y(I.axesSpec[L2]))), V = [],
|
|
5267
|
+
const U = w.map((L2) => this.findLabels(y(I.axesSpec[L2]))), V = [], j = (L2, W) => {
|
|
5268
5268
|
if (W >= w.length) {
|
|
5269
5269
|
if (V.push([...L2]), V.length > 1e4)
|
|
5270
5270
|
throw new Error("Too many key combinations, aborting.");
|
|
5271
5271
|
return;
|
|
5272
5272
|
}
|
|
5273
|
-
const
|
|
5274
|
-
if (
|
|
5275
|
-
throw new Error(`Axis index ${
|
|
5276
|
-
const
|
|
5277
|
-
if (!
|
|
5273
|
+
const M = w[W];
|
|
5274
|
+
if (M >= b.length)
|
|
5275
|
+
throw new Error(`Axis index ${M} out of bounds for unique keys array (length ${b.length}) during split key generation for column ${S2.id}`);
|
|
5276
|
+
const J = b[M];
|
|
5277
|
+
if (!J || J.length === 0) {
|
|
5278
5278
|
V.length = 0;
|
|
5279
5279
|
return;
|
|
5280
5280
|
}
|
|
5281
|
-
for (const
|
|
5282
|
-
L2.push(
|
|
5281
|
+
for (const ee2 of J)
|
|
5282
|
+
L2.push(ee2), j(L2, W + 1), L2.pop();
|
|
5283
5283
|
};
|
|
5284
|
-
if (
|
|
5284
|
+
if (j([], 0), V.length === 0)
|
|
5285
5285
|
continue;
|
|
5286
|
-
const K = [...I.axesSpec],
|
|
5286
|
+
const K = [...I.axesSpec], He = w.map((L2) => L2);
|
|
5287
5287
|
for (let L2 = w.length - 1; L2 >= 0; L2--)
|
|
5288
5288
|
K.splice(w[L2], 1);
|
|
5289
|
-
const
|
|
5289
|
+
const qe2 = { ...I, axesSpec: K };
|
|
5290
5290
|
for (const L2 of V) {
|
|
5291
|
-
const W = L2.map((
|
|
5292
|
-
const
|
|
5293
|
-
return { axisIdx:
|
|
5291
|
+
const W = L2.map((M, J) => {
|
|
5292
|
+
const ee2 = He[J], ze2 = y(I.axesSpec[ee2]), ce = U[J], Ye = (ce == null ? void 0 : ce[M]) ?? String(M);
|
|
5293
|
+
return { axisIdx: ee2, axisId: ze2, value: M, label: Ye };
|
|
5294
5294
|
});
|
|
5295
5295
|
f.push({
|
|
5296
5296
|
type: "split",
|
|
5297
|
-
originalColumn:
|
|
5297
|
+
originalColumn: S2,
|
|
5298
5298
|
spec: I,
|
|
5299
|
-
adjustedSpec:
|
|
5299
|
+
adjustedSpec: qe2,
|
|
5300
5300
|
dataEntries: c2,
|
|
5301
5301
|
axisFilters: W
|
|
5302
5302
|
});
|
|
@@ -5304,40 +5304,40 @@
|
|
|
5304
5304
|
} else
|
|
5305
5305
|
f.push({
|
|
5306
5306
|
type: "direct",
|
|
5307
|
-
originalColumn:
|
|
5307
|
+
originalColumn: S2,
|
|
5308
5308
|
spec: I,
|
|
5309
5309
|
adjustedSpec: I
|
|
5310
5310
|
});
|
|
5311
5311
|
}
|
|
5312
5312
|
}
|
|
5313
5313
|
if (f.length === 0) return [];
|
|
5314
|
-
const
|
|
5314
|
+
const d2 = Be(
|
|
5315
5315
|
f,
|
|
5316
|
-
(
|
|
5317
|
-
spec:
|
|
5318
|
-
suffixTrace:
|
|
5316
|
+
(p2) => ({
|
|
5317
|
+
spec: p2.spec,
|
|
5318
|
+
suffixTrace: p2.type === "split" ? Ot(p2.axisFilters) : void 0
|
|
5319
5319
|
}),
|
|
5320
5320
|
l2
|
|
5321
|
-
),
|
|
5322
|
-
for (const { value:
|
|
5323
|
-
const { originalColumn:
|
|
5321
|
+
), y$1 = [];
|
|
5322
|
+
for (const { value: p2, label: m2 } of d2) {
|
|
5323
|
+
const { originalColumn: C2, spec: E2 } = p2, _2 = p2.type === "split" ? p2.axisFilters : void 0, w = Kt(_2);
|
|
5324
5324
|
let A2;
|
|
5325
|
-
r ? A2 = r.deriveS(
|
|
5326
|
-
let
|
|
5327
|
-
o && (
|
|
5328
|
-
...
|
|
5325
|
+
r ? A2 = r.deriveS(E2, w) : A2 = Nt(C2.id, w);
|
|
5326
|
+
let S2 = { ...p2.adjustedSpec };
|
|
5327
|
+
o && (S2 = {
|
|
5328
|
+
...S2,
|
|
5329
5329
|
annotations: {
|
|
5330
|
-
...
|
|
5331
|
-
"pl7.app/label":
|
|
5330
|
+
...S2.annotations ?? {},
|
|
5331
|
+
"pl7.app/label": m2
|
|
5332
5332
|
}
|
|
5333
|
-
}),
|
|
5333
|
+
}), y$1.push({
|
|
5334
5334
|
id: A2,
|
|
5335
|
-
spec:
|
|
5336
|
-
data: () =>
|
|
5337
|
-
label:
|
|
5335
|
+
spec: S2,
|
|
5336
|
+
data: () => p2.type === "split" ? Ie$1(kt(p2.dataEntries, w)) : p2.originalColumn.data,
|
|
5337
|
+
label: m2
|
|
5338
5338
|
});
|
|
5339
5339
|
}
|
|
5340
|
-
return
|
|
5340
|
+
return y$1;
|
|
5341
5341
|
}
|
|
5342
5342
|
getColumns(e, n2) {
|
|
5343
5343
|
const r = this.getUniversalEntries(e, {
|
|
@@ -5362,7 +5362,7 @@
|
|
|
5362
5362
|
return i;
|
|
5363
5363
|
}
|
|
5364
5364
|
}
|
|
5365
|
-
function
|
|
5365
|
+
function ve(t) {
|
|
5366
5366
|
const e = (i) => i.operator !== "InSet" ? i : {
|
|
5367
5367
|
operator: "Or",
|
|
5368
5368
|
operands: i.references.map((s2) => ({
|
|
@@ -5395,17 +5395,17 @@
|
|
|
5395
5395
|
});
|
|
5396
5396
|
return t.map((i) => r(i, e));
|
|
5397
5397
|
}
|
|
5398
|
-
function
|
|
5398
|
+
function de(t, e) {
|
|
5399
5399
|
if (t === void 0) return e === void 0;
|
|
5400
5400
|
if (e === void 0) return true;
|
|
5401
5401
|
for (const n2 in e)
|
|
5402
5402
|
if (t[n2] !== e[n2]) return false;
|
|
5403
5403
|
return true;
|
|
5404
5404
|
}
|
|
5405
|
-
function
|
|
5406
|
-
return
|
|
5405
|
+
function Le(t) {
|
|
5406
|
+
return nn(t, (e) => e instanceof R ? e.handle : Ce$1(e) ? Fe$1(e, (n2) => n2.handle) : e);
|
|
5407
5407
|
}
|
|
5408
|
-
class
|
|
5408
|
+
class Mt {
|
|
5409
5409
|
constructor() {
|
|
5410
5410
|
k(this, "ctx", v());
|
|
5411
5411
|
}
|
|
@@ -5416,28 +5416,28 @@
|
|
|
5416
5416
|
return this.ctx.calculateOptions(e);
|
|
5417
5417
|
}
|
|
5418
5418
|
getOptions(e, n2) {
|
|
5419
|
-
const r = typeof e == "function" ? e :
|
|
5419
|
+
const r = typeof e == "function" ? e : rn(e), i = this.getSpecs().entries.filter((a) => r(a.obj));
|
|
5420
5420
|
let s2 = {}, o = false;
|
|
5421
|
-
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ?
|
|
5422
|
-
ref:
|
|
5421
|
+
return typeof n2 < "u" && (typeof n2 == "function" ? s2 = n2 : typeof n2 == "object" && ("includeNativeLabel" in n2 || "separator" in n2 || "addLabelAsSuffix" in n2 ? s2 = n2 : (n2 = n2, s2 = n2.label ?? {}, o = n2.refsWithEnrichments ?? false))), typeof s2 == "object" ? Be(i, (a) => a.obj, s2 ?? {}).map(({ value: { ref: a }, label: l2 }) => ({
|
|
5422
|
+
ref: fn(a, o),
|
|
5423
5423
|
label: l2
|
|
5424
5424
|
})) : i.map(({ ref: a, obj: l2 }) => ({
|
|
5425
|
-
ref:
|
|
5425
|
+
ref: fn(a, o),
|
|
5426
5426
|
label: s2(l2, a)
|
|
5427
5427
|
}));
|
|
5428
5428
|
}
|
|
5429
5429
|
resolveAnchorCtx(e) {
|
|
5430
|
-
if (e instanceof
|
|
5430
|
+
if (e instanceof Ge$1) return e;
|
|
5431
5431
|
const n2 = {};
|
|
5432
5432
|
for (const [r, i] of Object.entries(e))
|
|
5433
|
-
if (
|
|
5433
|
+
if (un(i)) {
|
|
5434
5434
|
const s2 = this.getPColumnSpecByRef(i);
|
|
5435
5435
|
if (!s2)
|
|
5436
5436
|
return;
|
|
5437
5437
|
n2[r] = s2;
|
|
5438
5438
|
} else
|
|
5439
5439
|
n2[r] = i;
|
|
5440
|
-
return new
|
|
5440
|
+
return new Ge$1(n2);
|
|
5441
5441
|
}
|
|
5442
5442
|
/**
|
|
5443
5443
|
* Returns columns that match the provided anchors and selectors. It applies axis filters and label derivation.
|
|
@@ -5450,7 +5450,7 @@
|
|
|
5450
5450
|
getAnchoredPColumns(e, n2, r) {
|
|
5451
5451
|
const i = this.resolveAnchorCtx(e);
|
|
5452
5452
|
if (i)
|
|
5453
|
-
return new
|
|
5453
|
+
return new X().addColumnProvider(this).addAxisLabelProvider(this).getColumns(n2, {
|
|
5454
5454
|
...r,
|
|
5455
5455
|
anchorCtx: i
|
|
5456
5456
|
});
|
|
@@ -5487,7 +5487,7 @@
|
|
|
5487
5487
|
getCanonicalOptions(e, n2, r) {
|
|
5488
5488
|
const i = this.resolveAnchorCtx(e);
|
|
5489
5489
|
if (!i) return;
|
|
5490
|
-
const s2 = new
|
|
5490
|
+
const s2 = new X().addColumnProvider(this).addAxisLabelProvider(this).getUniversalEntries(n2, {
|
|
5491
5491
|
...r,
|
|
5492
5492
|
anchorCtx: i
|
|
5493
5493
|
});
|
|
@@ -5511,7 +5511,7 @@
|
|
|
5511
5511
|
ref: n2.ref,
|
|
5512
5512
|
obj: {
|
|
5513
5513
|
...n2.obj,
|
|
5514
|
-
data: new
|
|
5514
|
+
data: new R(n2.obj.data, [n2.ref.blockId, n2.ref.name])
|
|
5515
5515
|
}
|
|
5516
5516
|
}))
|
|
5517
5517
|
};
|
|
@@ -5530,9 +5530,9 @@
|
|
|
5530
5530
|
ref: n2.ref,
|
|
5531
5531
|
obj: {
|
|
5532
5532
|
...n2.obj,
|
|
5533
|
-
data:
|
|
5533
|
+
data: ln(
|
|
5534
5534
|
n2.obj.data,
|
|
5535
|
-
(r) => new
|
|
5535
|
+
(r) => new R(r, [n2.ref.blockId, n2.ref.name])
|
|
5536
5536
|
)
|
|
5537
5537
|
}
|
|
5538
5538
|
}))
|
|
@@ -5559,9 +5559,9 @@
|
|
|
5559
5559
|
)) == null ? void 0 : r.obj;
|
|
5560
5560
|
const n2 = this.ctx.getDataFromResultPoolByRef(e.blockId, e.name);
|
|
5561
5561
|
if (n2)
|
|
5562
|
-
return
|
|
5562
|
+
return nn(
|
|
5563
5563
|
n2,
|
|
5564
|
-
(i) => new
|
|
5564
|
+
(i) => new R(i, [e.blockId, e.name])
|
|
5565
5565
|
);
|
|
5566
5566
|
}
|
|
5567
5567
|
/**
|
|
@@ -5572,7 +5572,7 @@
|
|
|
5572
5572
|
getPColumnByRef(e) {
|
|
5573
5573
|
const n2 = this.getDataByRef(e);
|
|
5574
5574
|
if (n2)
|
|
5575
|
-
return
|
|
5575
|
+
return en(n2);
|
|
5576
5576
|
}
|
|
5577
5577
|
/**
|
|
5578
5578
|
* Returns spec associated with the ref ensuring that it is a p-column spec.
|
|
@@ -5604,10 +5604,10 @@
|
|
|
5604
5604
|
if (!l$1(r.obj.spec))
|
|
5605
5605
|
continue;
|
|
5606
5606
|
const i = r.obj.spec;
|
|
5607
|
-
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length &&
|
|
5607
|
+
if (e.name === i.name && e.valueType === i.valueType && e.axesSpec.length === i.axesSpec.length && de(e.domain, i.domain)) {
|
|
5608
5608
|
for (let s2 = 0; s2 < e.axesSpec.length; ++s2) {
|
|
5609
5609
|
const o = e.axesSpec[s2], a = i.axesSpec[s2];
|
|
5610
|
-
if (o.name !== a.name || o.type !== a.type || !
|
|
5610
|
+
if (o.name !== a.name || o.type !== a.type || !de(o.domain, a.domain))
|
|
5611
5611
|
continue e;
|
|
5612
5612
|
}
|
|
5613
5613
|
n2.push(r.obj);
|
|
@@ -5624,7 +5624,7 @@
|
|
|
5624
5624
|
for (const r of n2.entries) {
|
|
5625
5625
|
if (!ie$1(r.obj)) continue;
|
|
5626
5626
|
const i = r.obj.spec;
|
|
5627
|
-
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type &&
|
|
5627
|
+
if (i.name === "pl7.app/label" && i.axesSpec.length === 1 && i.axesSpec[0].name === e.name && i.axesSpec[0].type === e.type && de(e.domain, i.axesSpec[0].domain)) {
|
|
5628
5628
|
if (r.obj.data.resourceType.name !== "PColumnData/Json")
|
|
5629
5629
|
throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
|
|
5630
5630
|
return Object.fromEntries(
|
|
@@ -5643,13 +5643,13 @@
|
|
|
5643
5643
|
* @returns An array of PColumn objects matching the selectors. Data is loaded on first access.
|
|
5644
5644
|
*/
|
|
5645
5645
|
selectColumns(e) {
|
|
5646
|
-
const n2 = typeof e == "function" ? e :
|
|
5646
|
+
const n2 = typeof e == "function" ? e : rn(e);
|
|
5647
5647
|
return this.getSpecs().entries.filter(({ obj: i }) => l$1(i) ? n2(i) : false).map(({ ref: i, obj: s2 }) => {
|
|
5648
5648
|
const o = s2;
|
|
5649
5649
|
let a = null;
|
|
5650
5650
|
const l2 = this;
|
|
5651
5651
|
return {
|
|
5652
|
-
id:
|
|
5652
|
+
id: Ne(i),
|
|
5653
5653
|
spec: o,
|
|
5654
5654
|
get data() {
|
|
5655
5655
|
var u2;
|
|
@@ -5674,13 +5674,13 @@
|
|
|
5674
5674
|
return r;
|
|
5675
5675
|
}
|
|
5676
5676
|
}
|
|
5677
|
-
class
|
|
5677
|
+
class te {
|
|
5678
5678
|
constructor() {
|
|
5679
5679
|
k(this, "ctx");
|
|
5680
5680
|
k(this, "_argsCache");
|
|
5681
5681
|
k(this, "_uiStateCache");
|
|
5682
5682
|
k(this, "_activeArgsCache");
|
|
5683
|
-
k(this, "resultPool", new
|
|
5683
|
+
k(this, "resultPool", new Mt());
|
|
5684
5684
|
this.ctx = v();
|
|
5685
5685
|
}
|
|
5686
5686
|
get args() {
|
|
@@ -5715,16 +5715,16 @@
|
|
|
5715
5715
|
// return this.ctx.featureFlags;
|
|
5716
5716
|
// }
|
|
5717
5717
|
getNamedAccessor(e) {
|
|
5718
|
-
return
|
|
5718
|
+
return ge(
|
|
5719
5719
|
this.ctx.getAccessorHandleByName(e),
|
|
5720
|
-
(n2) => new
|
|
5720
|
+
(n2) => new R(n2, [e])
|
|
5721
5721
|
);
|
|
5722
5722
|
}
|
|
5723
5723
|
get prerun() {
|
|
5724
|
-
return this.getNamedAccessor(
|
|
5724
|
+
return this.getNamedAccessor(je);
|
|
5725
5725
|
}
|
|
5726
5726
|
get outputs() {
|
|
5727
|
-
return this.getNamedAccessor(
|
|
5727
|
+
return this.getNamedAccessor(Je);
|
|
5728
5728
|
}
|
|
5729
5729
|
/**
|
|
5730
5730
|
* Find labels data for a given axis id. It will search for a label column and return its data as a map.
|
|
@@ -5736,7 +5736,7 @@
|
|
|
5736
5736
|
}
|
|
5737
5737
|
verifyInlineAndExplicitColumnsSupport(e) {
|
|
5738
5738
|
var i;
|
|
5739
|
-
const n2 = e.some((s2) => !(s2.data instanceof
|
|
5739
|
+
const n2 = e.some((s2) => !(s2.data instanceof R) || Ce$1(s2.data)), r = ((i = this.ctx.featureFlags) == null ? void 0 : i.inlineColumnsSupport) === true;
|
|
5740
5740
|
if (n2 && !r) throw Error("Inline or explicit columns not supported");
|
|
5741
5741
|
}
|
|
5742
5742
|
patchPTableDef(e) {
|
|
@@ -5747,14 +5747,14 @@
|
|
|
5747
5747
|
filters: [...e.partitionFilters, ...e.filters]
|
|
5748
5748
|
}), (r = this.ctx.featureFlags) != null && r.pFrameInSetFilterSupport || (e = {
|
|
5749
5749
|
...e,
|
|
5750
|
-
partitionFilters:
|
|
5751
|
-
filters:
|
|
5750
|
+
partitionFilters: ve(e.partitionFilters),
|
|
5751
|
+
filters: ve(e.filters)
|
|
5752
5752
|
}), e;
|
|
5753
5753
|
}
|
|
5754
5754
|
// TODO remove all non-PColumn fields
|
|
5755
5755
|
createPFrame(e) {
|
|
5756
5756
|
return this.verifyInlineAndExplicitColumnsSupport(e), this.ctx.createPFrame(
|
|
5757
|
-
e.map((n2) =>
|
|
5757
|
+
e.map((n2) => Le(n2))
|
|
5758
5758
|
);
|
|
5759
5759
|
}
|
|
5760
5760
|
createPTable(e) {
|
|
@@ -5767,8 +5767,8 @@
|
|
|
5767
5767
|
partitionFilters: e.filters ?? [],
|
|
5768
5768
|
filters: [],
|
|
5769
5769
|
sorting: e.sorting ?? []
|
|
5770
|
-
}) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(
|
|
5771
|
-
|
|
5770
|
+
}) : n2 = this.patchPTableDef(e), this.verifyInlineAndExplicitColumnsSupport(tn(n2.src)), this.ctx.createPTable(
|
|
5771
|
+
ze(n2, (r) => Le(r))
|
|
5772
5772
|
);
|
|
5773
5773
|
}
|
|
5774
5774
|
/** @deprecated scheduled for removal from SDK */
|
|
@@ -5788,13 +5788,13 @@
|
|
|
5788
5788
|
this.ctx.logError(e);
|
|
5789
5789
|
}
|
|
5790
5790
|
}
|
|
5791
|
-
const z = "1.
|
|
5792
|
-
function
|
|
5791
|
+
const z = "1.40.0";
|
|
5792
|
+
function jt(t) {
|
|
5793
5793
|
return t.__renderLambda === true;
|
|
5794
5794
|
}
|
|
5795
|
-
function
|
|
5795
|
+
function fe(t) {
|
|
5796
5796
|
if (t !== void 0)
|
|
5797
|
-
return
|
|
5797
|
+
return jt(t) ? t.handle : t;
|
|
5798
5798
|
}
|
|
5799
5799
|
const x = class x2 {
|
|
5800
5800
|
constructor(e, n2, r, i, s2, o, a, l2, u2) {
|
|
@@ -5806,8 +5806,8 @@
|
|
|
5806
5806
|
void 0,
|
|
5807
5807
|
{},
|
|
5808
5808
|
{},
|
|
5809
|
-
|
|
5810
|
-
|
|
5809
|
+
ie(true),
|
|
5810
|
+
ie([]),
|
|
5811
5811
|
void 0,
|
|
5812
5812
|
void 0,
|
|
5813
5813
|
{ ...x2.INITIAL_BLOCK_FEATURE_FLAGS }
|
|
@@ -5816,7 +5816,7 @@
|
|
|
5816
5816
|
output(e, n2, r = {}) {
|
|
5817
5817
|
if (typeof n2 == "function") {
|
|
5818
5818
|
const i = `output#${e}`;
|
|
5819
|
-
return G(i, () => n2(new
|
|
5819
|
+
return G(i, () => n2(new te())), new x2(
|
|
5820
5820
|
this._renderingMode,
|
|
5821
5821
|
this._initialArgs,
|
|
5822
5822
|
this._initialUiState,
|
|
@@ -5855,7 +5855,7 @@
|
|
|
5855
5855
|
return this.output(e, n2, { retentive: true });
|
|
5856
5856
|
}
|
|
5857
5857
|
argsValid(e) {
|
|
5858
|
-
return typeof e == "function" ? (G("inputsValid", () => e(new
|
|
5858
|
+
return typeof e == "function" ? (G("inputsValid", () => e(new te())), new x2(
|
|
5859
5859
|
this._renderingMode,
|
|
5860
5860
|
this._initialArgs,
|
|
5861
5861
|
this._initialUiState,
|
|
@@ -5881,7 +5881,7 @@
|
|
|
5881
5881
|
);
|
|
5882
5882
|
}
|
|
5883
5883
|
sections(e) {
|
|
5884
|
-
return Array.isArray(e) ? this.sections(
|
|
5884
|
+
return Array.isArray(e) ? this.sections(ie(e)) : typeof e == "function" ? (G("sections", () => e(new te())), new x2(
|
|
5885
5885
|
this._renderingMode,
|
|
5886
5886
|
this._initialArgs,
|
|
5887
5887
|
this._initialUiState,
|
|
@@ -5905,7 +5905,7 @@
|
|
|
5905
5905
|
}
|
|
5906
5906
|
/** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
|
|
5907
5907
|
title(e) {
|
|
5908
|
-
return G("title", () => e(new
|
|
5908
|
+
return G("title", () => e(new te())), new x2(
|
|
5909
5909
|
this._renderingMode,
|
|
5910
5910
|
this._initialArgs,
|
|
5911
5911
|
this._initialUiState,
|
|
@@ -6001,13 +6001,13 @@
|
|
|
6001
6001
|
sdkVersion: z,
|
|
6002
6002
|
renderingMode: this._renderingMode,
|
|
6003
6003
|
initialArgs: this._initialArgs,
|
|
6004
|
-
inputsValid:
|
|
6005
|
-
sections:
|
|
6004
|
+
inputsValid: fe(this._inputsValid),
|
|
6005
|
+
sections: fe(this._sections),
|
|
6006
6006
|
outputs: Object.fromEntries(
|
|
6007
|
-
Object.entries(this._outputs).map(([n2, r]) => [n2,
|
|
6007
|
+
Object.entries(this._outputs).map(([n2, r]) => [n2, fe(r)])
|
|
6008
6008
|
)
|
|
6009
6009
|
};
|
|
6010
|
-
return
|
|
6010
|
+
return yt() ? Me({ sdkVersion: z }) : { config: e };
|
|
6011
6011
|
}
|
|
6012
6012
|
};
|
|
6013
6013
|
k(x, "INITIAL_BLOCK_FEATURE_FLAGS", {
|
|
@@ -6015,8 +6015,8 @@
|
|
|
6015
6015
|
requiresUIAPIVersion: 1,
|
|
6016
6016
|
requiresModelAPIVersion: 1
|
|
6017
6017
|
});
|
|
6018
|
-
let
|
|
6019
|
-
function
|
|
6018
|
+
let Fe = x;
|
|
6019
|
+
function Ge() {
|
|
6020
6020
|
return {
|
|
6021
6021
|
sourceId: null,
|
|
6022
6022
|
hiddenColIds: null,
|
|
@@ -6025,45 +6025,45 @@
|
|
|
6025
6025
|
sorting: []
|
|
6026
6026
|
};
|
|
6027
6027
|
}
|
|
6028
|
-
function
|
|
6028
|
+
function Jt() {
|
|
6029
6029
|
return {
|
|
6030
6030
|
version: 3,
|
|
6031
6031
|
stateCache: [],
|
|
6032
|
-
pTableParams:
|
|
6032
|
+
pTableParams: Ge()
|
|
6033
6033
|
};
|
|
6034
6034
|
}
|
|
6035
|
-
function
|
|
6035
|
+
function $t(t) {
|
|
6036
6036
|
return "version" in t ? (t.version === 2 && (t = {
|
|
6037
6037
|
version: 3,
|
|
6038
6038
|
stateCache: t.stateCache.map((e) => ({
|
|
6039
6039
|
...e,
|
|
6040
6040
|
filtersState: []
|
|
6041
6041
|
})),
|
|
6042
|
-
pTableParams:
|
|
6043
|
-
}), t) :
|
|
6042
|
+
pTableParams: Ge()
|
|
6043
|
+
}), t) : Jt();
|
|
6044
6044
|
}
|
|
6045
|
-
function
|
|
6045
|
+
function Ce(t) {
|
|
6046
6046
|
return t.axesSpec.length === 1 && t.name === "pl7.app/label";
|
|
6047
6047
|
}
|
|
6048
|
-
function
|
|
6049
|
-
return new
|
|
6048
|
+
function Bt(t) {
|
|
6049
|
+
return new X().addAxisLabelProvider(t).addColumnProvider(t).getColumns({
|
|
6050
6050
|
name: "pl7.app/label",
|
|
6051
6051
|
axes: [{}]
|
|
6052
6052
|
// exactly one axis
|
|
6053
6053
|
}, { dontWaitAllData: true });
|
|
6054
6054
|
}
|
|
6055
|
-
function
|
|
6055
|
+
function Ee(t, e) {
|
|
6056
6056
|
const n2 = [], r = [];
|
|
6057
6057
|
for (const a of t)
|
|
6058
|
-
|
|
6058
|
+
Ce(a.spec) ? n2.push(a) : r.push(a);
|
|
6059
6059
|
const i = [];
|
|
6060
6060
|
for (const a of r)
|
|
6061
6061
|
for (const l2 of a.spec.axesSpec) {
|
|
6062
6062
|
const u2 = y(l2);
|
|
6063
|
-
i.some((h) => ne
|
|
6063
|
+
i.some((h) => ne(h, u2)) || i.push(u2);
|
|
6064
6064
|
}
|
|
6065
6065
|
for (const a of n2) {
|
|
6066
|
-
const l2 = y(a.spec.axesSpec[0]), u2 = i.findIndex((h) => ne
|
|
6066
|
+
const l2 = y(a.spec.axesSpec[0]), u2 = i.findIndex((h) => ne(h, l2));
|
|
6067
6067
|
u2 !== -1 && i.splice(u2, 1);
|
|
6068
6068
|
}
|
|
6069
6069
|
const s2 = (a, l2) => {
|
|
@@ -6074,10 +6074,10 @@
|
|
|
6074
6074
|
return u2;
|
|
6075
6075
|
}, o = [];
|
|
6076
6076
|
for (const a of e) {
|
|
6077
|
-
const l2 = a.spec.axesSpec[0], u2 = y(l2), h = i.findIndex((f) => ne
|
|
6077
|
+
const l2 = a.spec.axesSpec[0], u2 = y(l2), h = i.findIndex((f) => ne(f, u2));
|
|
6078
6078
|
if (h !== -1) {
|
|
6079
|
-
const f = i[h], g2 = Object.keys(f.domain ?? {}).length,
|
|
6080
|
-
g2 >
|
|
6079
|
+
const f = i[h], g2 = Object.keys(f.domain ?? {}).length, d2 = Object.keys(l2.domain ?? {}).length;
|
|
6080
|
+
g2 > d2 ? o.push({
|
|
6081
6081
|
id: s2(a.id, f.domain),
|
|
6082
6082
|
spec: {
|
|
6083
6083
|
...a.spec,
|
|
@@ -6089,8 +6089,8 @@
|
|
|
6089
6089
|
}
|
|
6090
6090
|
return o;
|
|
6091
6091
|
}
|
|
6092
|
-
function
|
|
6093
|
-
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof
|
|
6092
|
+
function Ut(t) {
|
|
6093
|
+
const e = (i) => Array.isArray(i), n2 = (i) => i instanceof R, r = (i) => typeof i == "object" && "type" in i;
|
|
6094
6094
|
return t.map((i) => i.data).every((i) => {
|
|
6095
6095
|
if (e(i))
|
|
6096
6096
|
return true;
|
|
@@ -6109,7 +6109,7 @@
|
|
|
6109
6109
|
throw Error(`unsupported column data type: ${i}`);
|
|
6110
6110
|
});
|
|
6111
6111
|
}
|
|
6112
|
-
function
|
|
6112
|
+
function ke(t) {
|
|
6113
6113
|
let e = t.columns;
|
|
6114
6114
|
const n2 = [];
|
|
6115
6115
|
if (t.coreColumnPredicate) {
|
|
@@ -6131,72 +6131,72 @@
|
|
|
6131
6131
|
sorting: t.sorting
|
|
6132
6132
|
};
|
|
6133
6133
|
}
|
|
6134
|
-
function
|
|
6134
|
+
function Wt(t) {
|
|
6135
6135
|
var e;
|
|
6136
6136
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "hidden";
|
|
6137
6137
|
}
|
|
6138
|
-
function
|
|
6138
|
+
function Gt(t) {
|
|
6139
6139
|
var e;
|
|
6140
6140
|
return ((e = t.annotations) == null ? void 0 : e["pl7.app/table/visibility"]) === "optional";
|
|
6141
6141
|
}
|
|
6142
|
-
function
|
|
6142
|
+
function he(t, e) {
|
|
6143
6143
|
return [...new Map(t.map((n2) => [e(n2), n2])).values()];
|
|
6144
6144
|
}
|
|
6145
|
-
function
|
|
6145
|
+
function Jn(t, e, n2, r) {
|
|
6146
6146
|
if (e.length === 0) return;
|
|
6147
|
-
const i = e.filter((c2) =>
|
|
6147
|
+
const i = e.filter((c2) => !Wt(c2.spec)), s2 = $t(n2), o = Bt(t.resultPool);
|
|
6148
6148
|
if (!o) return;
|
|
6149
|
-
const a =
|
|
6150
|
-
...
|
|
6151
|
-
[...l2.flatMap((c2) => c2.spec.axesSpec.map((
|
|
6152
|
-
(c2) =>
|
|
6149
|
+
const a = Ee(i.map(qe), o), l2 = [...i, ...a], h = [
|
|
6150
|
+
...he(
|
|
6151
|
+
[...l2.flatMap((c2) => c2.spec.axesSpec.map((b) => y(b)))],
|
|
6152
|
+
(c2) => hn(c2)
|
|
6153
6153
|
).map((c2) => ({ type: "axis", id: c2 })),
|
|
6154
6154
|
...l2.map((c2) => ({ type: "column", id: c2.id }))
|
|
6155
|
-
], f = new Set(h.map((c2) =>
|
|
6156
|
-
const
|
|
6157
|
-
return
|
|
6158
|
-
}),
|
|
6155
|
+
], f = new Set(h.map((c2) => hn(c2))), g2 = (c2) => f.has(hn(c2)), d2 = "full", y$1 = s2.pTableParams.partitionFilters.filter((c2) => {
|
|
6156
|
+
const b = g2(c2.column);
|
|
6157
|
+
return b || t.logWarn(`Partition filter ${JSON.stringify(c2)} does not match provided columns, skipping`), b;
|
|
6158
|
+
}), p2 = he(
|
|
6159
6159
|
[...[], ...s2.pTableParams.filters],
|
|
6160
|
-
(c2) =>
|
|
6160
|
+
(c2) => hn(c2.column)
|
|
6161
6161
|
).filter((c2) => {
|
|
6162
|
-
const
|
|
6163
|
-
return
|
|
6164
|
-
}),
|
|
6162
|
+
const b = g2(c2.column);
|
|
6163
|
+
return b || t.logWarn(`Filter ${JSON.stringify(c2)} does not match provided columns, skipping`), b;
|
|
6164
|
+
}), m2 = he(
|
|
6165
6165
|
[...[], ...s2.pTableParams.sorting],
|
|
6166
|
-
(c2) =>
|
|
6166
|
+
(c2) => hn(c2.column)
|
|
6167
6167
|
).filter((c2) => {
|
|
6168
|
-
const
|
|
6169
|
-
return
|
|
6170
|
-
}),
|
|
6168
|
+
const b = g2(c2.column);
|
|
6169
|
+
return b || t.logWarn(`Sorting ${JSON.stringify(c2)} does not match provided columns, skipping`), b;
|
|
6170
|
+
}), C2 = ke({
|
|
6171
6171
|
columns: i,
|
|
6172
6172
|
labelColumns: a,
|
|
6173
|
-
coreJoinType:
|
|
6174
|
-
partitionFilters:
|
|
6175
|
-
filters:
|
|
6176
|
-
sorting:
|
|
6173
|
+
coreJoinType: d2,
|
|
6174
|
+
partitionFilters: y$1,
|
|
6175
|
+
filters: p2,
|
|
6176
|
+
sorting: m2,
|
|
6177
6177
|
coreColumnPredicate: void 0
|
|
6178
|
-
}),
|
|
6178
|
+
}), E2 = t.createPTable(C2), _2 = new Set((() => {
|
|
6179
6179
|
const c2 = s2.pTableParams.hiddenColIds;
|
|
6180
|
-
return c2 || i.filter((
|
|
6180
|
+
return c2 || i.filter((b) => Gt(b.spec)).map((b) => b.id);
|
|
6181
6181
|
})());
|
|
6182
6182
|
i.filter((c2) => {
|
|
6183
|
-
var
|
|
6184
|
-
return ((
|
|
6185
|
-
}).forEach((c2) => _2.delete(c2.id)), [...
|
|
6186
|
-
const w = i.filter((c2) => !_2.has(c2.id)), A2 =
|
|
6187
|
-
if (!
|
|
6188
|
-
const
|
|
6183
|
+
var b;
|
|
6184
|
+
return ((b = c2.spec.annotations) == null ? void 0 : b["pl7.app/isLinkerColumn"]) === "true";
|
|
6185
|
+
}).forEach((c2) => _2.delete(c2.id)), [...y$1.map((c2) => c2.column), ...p2.map((c2) => c2.column), ...m2.map((c2) => c2.column)].filter((c2) => c2.type === "column").forEach((c2) => _2.delete(c2.id));
|
|
6186
|
+
const w = i.filter((c2) => !_2.has(c2.id)), A2 = Ee(w.map(qe), o);
|
|
6187
|
+
if (!Ut([...w, ...A2])) return;
|
|
6188
|
+
const S2 = ke({
|
|
6189
6189
|
columns: w,
|
|
6190
6190
|
labelColumns: A2,
|
|
6191
|
-
coreJoinType:
|
|
6192
|
-
partitionFilters:
|
|
6193
|
-
filters:
|
|
6194
|
-
sorting:
|
|
6191
|
+
coreJoinType: d2,
|
|
6192
|
+
partitionFilters: y$1,
|
|
6193
|
+
filters: p2,
|
|
6194
|
+
sorting: m2,
|
|
6195
6195
|
coreColumnPredicate: void 0
|
|
6196
|
-
}), I = t.createPTable(
|
|
6196
|
+
}), I = t.createPTable(S2);
|
|
6197
6197
|
return {
|
|
6198
6198
|
sourceId: s2.pTableParams.sourceId,
|
|
6199
|
-
fullTableHandle:
|
|
6199
|
+
fullTableHandle: E2,
|
|
6200
6200
|
visibleTableHandle: I
|
|
6201
6201
|
};
|
|
6202
6202
|
}
|
|
@@ -6223,8 +6223,8 @@
|
|
|
6223
6223
|
numbers: z$1.array(z$1.coerce.number()),
|
|
6224
6224
|
handles: z$1.array(ImportFileHandleSchema)
|
|
6225
6225
|
});
|
|
6226
|
-
const platforma =
|
|
6227
|
-
dataTableStateV2:
|
|
6226
|
+
const platforma = Fe.create("Heavy").withArgs({ numbers: [1, 2, 3, 4], tableNumRows: 100, handles: [] }).withUiState({
|
|
6227
|
+
dataTableStateV2: Jt(),
|
|
6228
6228
|
dynamicSections: []
|
|
6229
6229
|
}).argsValid((ctx) => {
|
|
6230
6230
|
if (ctx.args.numbers.length === 5) {
|
|
@@ -6365,7 +6365,7 @@
|
|
|
6365
6365
|
})
|
|
6366
6366
|
});
|
|
6367
6367
|
}
|
|
6368
|
-
return
|
|
6368
|
+
return Jn(
|
|
6369
6369
|
ctx,
|
|
6370
6370
|
columns,
|
|
6371
6371
|
ctx.uiState.dataTableStateV2
|