@magmonium/one 0.4.79 → 0.4.81
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/assets/i18n/af.json +4 -0
- package/assets/i18n/am.json +4 -0
- package/assets/i18n/ar.json +4 -0
- package/assets/i18n/as.json +4 -0
- package/assets/i18n/az.json +4 -0
- package/assets/i18n/ba.json +4 -0
- package/assets/i18n/be.json +4 -0
- package/assets/i18n/bg.json +4 -0
- package/assets/i18n/bn.json +4 -0
- package/assets/i18n/br.json +4 -0
- package/assets/i18n/brx.json +4 -0
- package/assets/i18n/bs.json +4 -0
- package/assets/i18n/ca.json +4 -0
- package/assets/i18n/ceb.json +4 -0
- package/assets/i18n/cnr.json +4 -0
- package/assets/i18n/co.json +4 -0
- package/assets/i18n/cs.json +4 -0
- package/assets/i18n/cy.json +4 -0
- package/assets/i18n/da.json +4 -0
- package/assets/i18n/de.json +4 -0
- package/assets/i18n/doi.json +4 -0
- package/assets/i18n/el.json +4 -0
- package/assets/i18n/en.json +44 -0
- package/assets/i18n/eo.json +4 -0
- package/assets/i18n/es.json +4 -0
- package/assets/i18n/et.json +4 -0
- package/assets/i18n/eu.json +4 -0
- package/assets/i18n/fa.json +4 -0
- package/assets/i18n/fi.json +4 -0
- package/assets/i18n/fr.json +4 -0
- package/assets/i18n/fy.json +4 -0
- package/assets/i18n/ga.json +4 -0
- package/assets/i18n/gd.json +4 -0
- package/assets/i18n/gl.json +4 -0
- package/assets/i18n/gu.json +4 -0
- package/assets/i18n/ha.json +4 -0
- package/assets/i18n/haw.json +4 -0
- package/assets/i18n/he.json +4 -0
- package/assets/i18n/hi.json +4 -0
- package/assets/i18n/hmn.json +4 -0
- package/assets/i18n/hr.json +4 -0
- package/assets/i18n/hu.json +4 -0
- package/assets/i18n/hy.json +4 -0
- package/assets/i18n/id.json +4 -0
- package/assets/i18n/ie.json +4 -0
- package/assets/i18n/ig.json +4 -0
- package/assets/i18n/ilo.json +4 -0
- package/assets/i18n/is.json +4 -0
- package/assets/i18n/it.json +4 -0
- package/assets/i18n/iw.json +4 -0
- package/assets/i18n/ja.json +4 -0
- package/assets/i18n/jw.json +4 -0
- package/assets/i18n/ka.json +4 -0
- package/assets/i18n/kk.json +4 -0
- package/assets/i18n/km.json +4 -0
- package/assets/i18n/kn.json +4 -0
- package/assets/i18n/ko.json +4 -0
- package/assets/i18n/kok.json +4 -0
- package/assets/i18n/ks.json +4 -0
- package/assets/i18n/ku.json +4 -0
- package/assets/i18n/ky.json +4 -0
- package/assets/i18n/la.json +4 -0
- package/assets/i18n/lb.json +4 -0
- package/assets/i18n/lo.json +4 -0
- package/assets/i18n/lt.json +4 -0
- package/assets/i18n/lv.json +4 -0
- package/assets/i18n/ma.json +4 -0
- package/assets/i18n/mai.json +4 -0
- package/assets/i18n/me.json +4 -0
- package/assets/i18n/mg.json +4 -0
- package/assets/i18n/mi.json +4 -0
- package/assets/i18n/mk.json +4 -0
- package/assets/i18n/ml.json +4 -0
- package/assets/i18n/mn.json +4 -0
- package/assets/i18n/mni.json +4 -0
- package/assets/i18n/mr.json +4 -0
- package/assets/i18n/ms.json +4 -0
- package/assets/i18n/mt.json +4 -0
- package/assets/i18n/my.json +4 -0
- package/assets/i18n/ne.json +4 -0
- package/assets/i18n/nl.json +4 -0
- package/assets/i18n/no.json +4 -0
- package/assets/i18n/ny.json +4 -0
- package/assets/i18n/or.json +4 -0
- package/assets/i18n/pa.json +4 -0
- package/assets/i18n/pl.json +4 -0
- package/assets/i18n/ps.json +4 -0
- package/assets/i18n/pt.json +4 -0
- package/assets/i18n/rm.json +4 -0
- package/assets/i18n/ro.json +4 -0
- package/assets/i18n/ru.json +4 -0
- package/assets/i18n/sa.json +4 -0
- package/assets/i18n/sat.json +4 -0
- package/assets/i18n/sc.json +4 -0
- package/assets/i18n/sd.json +4 -0
- package/assets/i18n/si.json +4 -0
- package/assets/i18n/sk.json +4 -0
- package/assets/i18n/sl.json +4 -0
- package/assets/i18n/sm.json +4 -0
- package/assets/i18n/sn.json +4 -0
- package/assets/i18n/so.json +4 -0
- package/assets/i18n/sq.json +4 -0
- package/assets/i18n/sr.json +4 -0
- package/assets/i18n/st.json +4 -0
- package/assets/i18n/su.json +4 -0
- package/assets/i18n/sv.json +4 -0
- package/assets/i18n/sw.json +4 -0
- package/assets/i18n/ta.json +4 -0
- package/assets/i18n/te.json +4 -0
- package/assets/i18n/tg.json +4 -0
- package/assets/i18n/th.json +4 -0
- package/assets/i18n/tl.json +4 -0
- package/assets/i18n/tr.json +4 -0
- package/assets/i18n/uk.json +4 -0
- package/assets/i18n/ur.json +4 -0
- package/assets/i18n/uz.json +4 -0
- package/assets/i18n/vi.json +4 -0
- package/assets/i18n/xh.json +4 -0
- package/assets/i18n/yi.json +4 -0
- package/assets/i18n/yo.json +4 -0
- package/assets/i18n/zh.json +4 -0
- package/assets/i18n/zu.json +4 -0
- package/fesm2022/magmonium-one.mjs +1460 -15
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +644 -2
|
@@ -18005,15 +18005,14 @@ const toChartTime = (value) => {
|
|
|
18005
18005
|
const parsed = Date.parse(value);
|
|
18006
18006
|
return Number.isFinite(parsed) ? parsed : null;
|
|
18007
18007
|
};
|
|
18008
|
-
const readChartPoints = (rows, x, y) => {
|
|
18008
|
+
const readChartPoints = (rows, x, y, per) => {
|
|
18009
18009
|
const pairs = [];
|
|
18010
18010
|
for (const row of rows ?? []) {
|
|
18011
18011
|
if (row == null || typeof row !== "object") continue;
|
|
18012
18012
|
const record = row;
|
|
18013
18013
|
const t = toChartTime(record[x]);
|
|
18014
|
-
const
|
|
18015
|
-
|
|
18016
|
-
if (t === null || typeof v !== "number" || !Number.isFinite(v)) continue;
|
|
18014
|
+
const v = readChartValue(record, y, per);
|
|
18015
|
+
if (t === null || v === null) continue;
|
|
18017
18016
|
pairs.push([t, v]);
|
|
18018
18017
|
}
|
|
18019
18018
|
for (let i = 1; i < pairs.length; i++) if (pairs[i][0] < pairs[i - 1][0]) {
|
|
@@ -18025,6 +18024,46 @@ const readChartPoints = (rows, x, y) => {
|
|
|
18025
18024
|
y: pairs.map((p) => p[1])
|
|
18026
18025
|
};
|
|
18027
18026
|
};
|
|
18027
|
+
const toChartNumber = (raw) => {
|
|
18028
|
+
const v = typeof raw === "string" && raw.trim() ? Number(raw) : raw;
|
|
18029
|
+
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
18030
|
+
};
|
|
18031
|
+
const readChartValue = (record, y, per) => {
|
|
18032
|
+
const v = toChartNumber(record[y]);
|
|
18033
|
+
if (v === null || !per) return v;
|
|
18034
|
+
const base = toChartNumber(record[per]);
|
|
18035
|
+
return base ? v / base * 100 : null;
|
|
18036
|
+
};
|
|
18037
|
+
const readChartCategories = (rows, x, y, per) => {
|
|
18038
|
+
const out = {
|
|
18039
|
+
x: [],
|
|
18040
|
+
y: []
|
|
18041
|
+
};
|
|
18042
|
+
for (const row of rows ?? []) {
|
|
18043
|
+
if (row == null || typeof row !== "object") continue;
|
|
18044
|
+
const record = row;
|
|
18045
|
+
const raw = record[x];
|
|
18046
|
+
const label = typeof raw === "string" || typeof raw === "number" ? String(raw).trim() : "";
|
|
18047
|
+
const v = readChartValue(record, y, per);
|
|
18048
|
+
if (!label || v === null) continue;
|
|
18049
|
+
out.x.push(label);
|
|
18050
|
+
out.y.push(v);
|
|
18051
|
+
}
|
|
18052
|
+
return out;
|
|
18053
|
+
};
|
|
18054
|
+
const mergeCategories = (series) => {
|
|
18055
|
+
const seen = /* @__PURE__ */ new Set();
|
|
18056
|
+
for (const { x } of series) for (const label of x) seen.add(label);
|
|
18057
|
+
return [...seen];
|
|
18058
|
+
};
|
|
18059
|
+
const columnPath = (x, width, y0, y1, radius = 4) => {
|
|
18060
|
+
const h = Math.abs(y0 - y1);
|
|
18061
|
+
const r = Math.max(0, Math.min(radius, h / 2, width / 2));
|
|
18062
|
+
const f = (v) => v.toFixed(1);
|
|
18063
|
+
const dir = y1 <= y0 ? 1 : -1;
|
|
18064
|
+
const right = x + width;
|
|
18065
|
+
return `M${f(x)} ${f(y0)}V${f(y1 + dir * r)}Q${f(x)} ${f(y1)} ${f(x + r)} ${f(y1)}H${f(right - r)}Q${f(right)} ${f(y1)} ${f(right)} ${f(y1 + dir * r)}V${f(y0)}Z`;
|
|
18066
|
+
};
|
|
18028
18067
|
const lowerBound = (times, x) => {
|
|
18029
18068
|
let lo = 0;
|
|
18030
18069
|
let hi = times.length;
|
|
@@ -18265,6 +18304,22 @@ const sampleChartPoints = (index, end = Date.UTC(2026, 0, 2)) => {
|
|
|
18265
18304
|
y
|
|
18266
18305
|
};
|
|
18267
18306
|
};
|
|
18307
|
+
const sampleChartCategories = (index) => ({
|
|
18308
|
+
x: [
|
|
18309
|
+
"2022",
|
|
18310
|
+
"2023",
|
|
18311
|
+
"2024",
|
|
18312
|
+
"2025",
|
|
18313
|
+
"2026"
|
|
18314
|
+
],
|
|
18315
|
+
y: [
|
|
18316
|
+
59,
|
|
18317
|
+
68,
|
|
18318
|
+
94,
|
|
18319
|
+
107,
|
|
18320
|
+
108
|
|
18321
|
+
].map((v) => v * .25 ** index)
|
|
18322
|
+
});
|
|
18268
18323
|
const MARGIN = {
|
|
18269
18324
|
top: 12,
|
|
18270
18325
|
right: 16,
|
|
@@ -18288,6 +18343,12 @@ const NAV_TOP = 4;
|
|
|
18288
18343
|
const GRIP_SLOP = 8;
|
|
18289
18344
|
const MIN_WINDOW_SHARE = .02;
|
|
18290
18345
|
const KEY_PAN_SHARE = .1;
|
|
18346
|
+
const STRIP_GAP = 40;
|
|
18347
|
+
const STRIP_HEIGHT = 72;
|
|
18348
|
+
const COLUMN_MAX = 40;
|
|
18349
|
+
const COLUMN_MIN = 4;
|
|
18350
|
+
const COLUMN_GAP = 2;
|
|
18351
|
+
const COLUMN_FILL = .6;
|
|
18291
18352
|
const optionalNumber = (value) => value == null || value === "" ? void 0 : numberAttribute(value, void 0);
|
|
18292
18353
|
const optionalBoolean = (value) => value == null ? void 0 : booleanAttribute(value);
|
|
18293
18354
|
let nextId$2 = 0;
|
|
@@ -18345,7 +18406,7 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18345
18406
|
minimal = computed(() => (this.variant() ?? this.config()?.variant) === "minimal", ...ngDevMode ? [{ debugName: "minimal" }] : /* istanbul ignore next */ []);
|
|
18346
18407
|
margin = computed(() => this.minimal() ? MINIMAL_MARGIN : MARGIN, ...ngDevMode ? [{ debugName: "margin" }] : /* istanbul ignore next */ []);
|
|
18347
18408
|
showNavigator = computed(() => !this.minimal() && (this.navigator() ?? this.config()?.navigator ?? false), ...ngDevMode ? [{ debugName: "showNavigator" }] : /* istanbul ignore next */ []);
|
|
18348
|
-
canMeasure = computed(() => !this.minimal() && (this.measure() ?? this.config()?.measure ?? false), ...ngDevMode ? [{ debugName: "canMeasure" }] : /* istanbul ignore next */ []);
|
|
18409
|
+
canMeasure = computed(() => !this.minimal() && !this.categorical() && (this.measure() ?? this.config()?.measure ?? false), ...ngDevMode ? [{ debugName: "canMeasure" }] : /* istanbul ignore next */ []);
|
|
18349
18410
|
presets = computed(() => {
|
|
18350
18411
|
const authored = this.config()?.ranges;
|
|
18351
18412
|
const ids = (authored?.length ? authored : DEFAULT_SECTION_CHART_RANGES).filter(isPresetId).map((id) => id.trim().toLowerCase());
|
|
@@ -18370,7 +18431,158 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18370
18431
|
};
|
|
18371
18432
|
});
|
|
18372
18433
|
}, ...ngDevMode ? [{ debugName: "painted" }] : /* istanbul ignore next */ []);
|
|
18434
|
+
categorical = computed(() => this.members().some(({ member }) => member.mark() === "column"), ...ngDevMode ? [{ debugName: "categorical" }] : /* istanbul ignore next */ []);
|
|
18435
|
+
categoryData = computed(() => {
|
|
18436
|
+
if (!this.categorical()) return {
|
|
18437
|
+
categories: [],
|
|
18438
|
+
series: []
|
|
18439
|
+
};
|
|
18440
|
+
const read = this.painted().map(({ member, color }) => ({
|
|
18441
|
+
member,
|
|
18442
|
+
color,
|
|
18443
|
+
label: member.label(),
|
|
18444
|
+
noTranslate: member.noTranslate(),
|
|
18445
|
+
params: member.params(),
|
|
18446
|
+
mark: member.mark(),
|
|
18447
|
+
panel: member.panel(),
|
|
18448
|
+
ratio: member.ratio(),
|
|
18449
|
+
...member.categories()
|
|
18450
|
+
}));
|
|
18451
|
+
const withData = read.filter((s) => s.x.length);
|
|
18452
|
+
const source = withData.length || !this.isDesignMode ? withData : read.map((s, i) => ({
|
|
18453
|
+
...s,
|
|
18454
|
+
...sampleChartCategories(i)
|
|
18455
|
+
}));
|
|
18456
|
+
const categories = mergeCategories(source);
|
|
18457
|
+
return {
|
|
18458
|
+
categories,
|
|
18459
|
+
series: source.map(({ x, y, ...s }) => ({
|
|
18460
|
+
...s,
|
|
18461
|
+
values: categories.map((c) => {
|
|
18462
|
+
const j = x.indexOf(c);
|
|
18463
|
+
return j < 0 ? null : y[j];
|
|
18464
|
+
})
|
|
18465
|
+
}))
|
|
18466
|
+
};
|
|
18467
|
+
}, ...ngDevMode ? [{ debugName: "categoryData" }] : /* istanbul ignore next */ []);
|
|
18468
|
+
hasStrip = computed(() => this.categoryData().series.some((s) => s.panel === "strip"), ...ngDevMode ? [{ debugName: "hasStrip" }] : /* istanbul ignore next */ []);
|
|
18469
|
+
svgHeight = computed(() => this.resolvedHeight() + (this.hasStrip() ? 112 : 0), ...ngDevMode ? [{ debugName: "svgHeight" }] : /* istanbul ignore next */ []);
|
|
18470
|
+
bandCentre = computed(() => {
|
|
18471
|
+
const band = this.plotWidth() / Math.max(1, this.categoryData().categories.length);
|
|
18472
|
+
const left = this.left();
|
|
18473
|
+
return (i) => left + band * (i + .5);
|
|
18474
|
+
}, ...ngDevMode ? [{ debugName: "bandCentre" }] : /* istanbul ignore next */ []);
|
|
18475
|
+
categoryExtent = computed(() => {
|
|
18476
|
+
const main = this.categoryData().series.filter((s) => s.panel === "main");
|
|
18477
|
+
const values = main.flatMap((s) => s.values.filter((v) => v !== null));
|
|
18478
|
+
if (!values.length) return null;
|
|
18479
|
+
return {
|
|
18480
|
+
...niceTicks(Math.min(0, ...values), Math.max(0, ...values)),
|
|
18481
|
+
ratio: main.every((s) => s.ratio)
|
|
18482
|
+
};
|
|
18483
|
+
}, ...ngDevMode ? [{ debugName: "categoryExtent" }] : /* istanbul ignore next */ []);
|
|
18484
|
+
categorySy = computed(() => {
|
|
18485
|
+
const extent = this.categoryExtent();
|
|
18486
|
+
const height = this.plotHeight();
|
|
18487
|
+
const top = this.top();
|
|
18488
|
+
return (v) => extent ? top + (1 - (v - extent.min) / (extent.max - extent.min)) * height : top + height;
|
|
18489
|
+
}, ...ngDevMode ? [{ debugName: "categorySy" }] : /* istanbul ignore next */ []);
|
|
18490
|
+
categoryView = computed(() => {
|
|
18491
|
+
const { categories, series } = this.categoryData();
|
|
18492
|
+
const extent = this.categoryExtent();
|
|
18493
|
+
if (!categories.length) return null;
|
|
18494
|
+
const n = categories.length;
|
|
18495
|
+
const band = this.plotWidth() / n;
|
|
18496
|
+
const centre = this.bandCentre();
|
|
18497
|
+
const sy = this.categorySy();
|
|
18498
|
+
const last = n - 1;
|
|
18499
|
+
const columnSeries = series.filter((s) => s.panel === "main" && s.mark === "column");
|
|
18500
|
+
const k = Math.max(1, columnSeries.length);
|
|
18501
|
+
const colWidth = Math.max(COLUMN_MIN, Math.min(COLUMN_MAX, (band * COLUMN_FILL - (k - 1) * COLUMN_GAP) / k));
|
|
18502
|
+
const group = k * colWidth + (k - 1) * COLUMN_GAP;
|
|
18503
|
+
const base = extent ? sy(0) : this.bottom();
|
|
18504
|
+
const columns = [];
|
|
18505
|
+
const labels = [];
|
|
18506
|
+
columnSeries.forEach((s, c) => {
|
|
18507
|
+
s.values.forEach((v, i) => {
|
|
18508
|
+
if (v === null) return;
|
|
18509
|
+
const x = centre(i) - group / 2 + c * (colWidth + COLUMN_GAP);
|
|
18510
|
+
columns.push({
|
|
18511
|
+
d: columnPath(x, colWidth, base, sy(v)),
|
|
18512
|
+
color: s.color
|
|
18513
|
+
});
|
|
18514
|
+
if (i === last) labels.push({
|
|
18515
|
+
x: x + colWidth / 2,
|
|
18516
|
+
y: Math.min(sy(v), base) - 6,
|
|
18517
|
+
text: this.formatShort(v, s.ratio)
|
|
18518
|
+
});
|
|
18519
|
+
});
|
|
18520
|
+
});
|
|
18521
|
+
const lineOf = (s, y) => {
|
|
18522
|
+
const dots = s.values.flatMap((v, i) => v === null ? [] : [{
|
|
18523
|
+
cx: centre(i),
|
|
18524
|
+
cy: y(v),
|
|
18525
|
+
v
|
|
18526
|
+
}]);
|
|
18527
|
+
return {
|
|
18528
|
+
d: dots.map((p, i) => `${i ? "L" : "M"}${p.cx.toFixed(1)} ${p.cy.toFixed(1)}`).join(""),
|
|
18529
|
+
dots
|
|
18530
|
+
};
|
|
18531
|
+
};
|
|
18532
|
+
return {
|
|
18533
|
+
columns,
|
|
18534
|
+
labels,
|
|
18535
|
+
lines: series.filter((s) => s.panel === "main" && s.mark === "line").map((s) => {
|
|
18536
|
+
const { d, dots } = lineOf(s, sy);
|
|
18537
|
+
const end = dots[dots.length - 1];
|
|
18538
|
+
return {
|
|
18539
|
+
d,
|
|
18540
|
+
color: s.color,
|
|
18541
|
+
endX: end?.cx ?? 0,
|
|
18542
|
+
endY: end?.cy ?? 0
|
|
18543
|
+
};
|
|
18544
|
+
}),
|
|
18545
|
+
strip: this.stripView(series, lineOf)
|
|
18546
|
+
};
|
|
18547
|
+
}, ...ngDevMode ? [{ debugName: "categoryView" }] : /* istanbul ignore next */ []);
|
|
18548
|
+
stripView = (series, lineOf) => {
|
|
18549
|
+
const strip = series.filter((s) => s.panel === "strip");
|
|
18550
|
+
const values = strip.flatMap((s) => s.values.filter((v) => v !== null));
|
|
18551
|
+
if (!values.length) return null;
|
|
18552
|
+
const lo = Math.min(...values);
|
|
18553
|
+
const hi = Math.max(...values);
|
|
18554
|
+
const pad = (hi - lo || Math.abs(hi) || 1) * .2;
|
|
18555
|
+
const ticks = niceTicks(lo - pad, hi + pad, 2);
|
|
18556
|
+
const top = this.bottom() + STRIP_GAP;
|
|
18557
|
+
const sy = (v) => top + (1 - (v - ticks.min) / (ticks.max - ticks.min || 1)) * STRIP_HEIGHT;
|
|
18558
|
+
const ratio = strip.every((s) => s.ratio);
|
|
18559
|
+
return {
|
|
18560
|
+
top,
|
|
18561
|
+
bottom: top + STRIP_HEIGHT,
|
|
18562
|
+
ticks: [ticks.min, ticks.max].map((v) => ({
|
|
18563
|
+
y: sy(v),
|
|
18564
|
+
label: this.formatShort(v, ratio)
|
|
18565
|
+
})),
|
|
18566
|
+
lines: strip.map((s) => {
|
|
18567
|
+
const { d, dots } = lineOf(s, sy);
|
|
18568
|
+
return {
|
|
18569
|
+
d,
|
|
18570
|
+
color: s.color,
|
|
18571
|
+
dots: dots.map((p) => ({
|
|
18572
|
+
...p,
|
|
18573
|
+
text: this.formatShort(p.v, s.ratio)
|
|
18574
|
+
}))
|
|
18575
|
+
};
|
|
18576
|
+
})
|
|
18577
|
+
};
|
|
18578
|
+
};
|
|
18579
|
+
categoryIndex = linkedSignal({
|
|
18580
|
+
...ngDevMode ? { debugName: "categoryIndex" } : /* istanbul ignore next */ {},
|
|
18581
|
+
source: this.categoryData,
|
|
18582
|
+
computation: () => null
|
|
18583
|
+
});
|
|
18373
18584
|
lines = computed(() => {
|
|
18585
|
+
if (this.categorical()) return [];
|
|
18374
18586
|
const palette = this.palette();
|
|
18375
18587
|
const drawn = this.painted().map(({ member, color }) => ({
|
|
18376
18588
|
...member.points(),
|
|
@@ -18427,7 +18639,7 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18427
18639
|
top = computed(() => this.margin().top, ...ngDevMode ? [{ debugName: "top" }] : /* istanbul ignore next */ []);
|
|
18428
18640
|
right = computed(() => this.left() + this.plotWidth(), ...ngDevMode ? [{ debugName: "right" }] : /* istanbul ignore next */ []);
|
|
18429
18641
|
bottom = computed(() => this.top() + this.plotHeight(), ...ngDevMode ? [{ debugName: "bottom" }] : /* istanbul ignore next */ []);
|
|
18430
|
-
viewBox = computed(() => `0 0 ${this.width()} ${this.
|
|
18642
|
+
viewBox = computed(() => `0 0 ${this.width()} ${this.svgHeight()}`, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []);
|
|
18431
18643
|
plotted = computed(() => {
|
|
18432
18644
|
const pct = this.percent();
|
|
18433
18645
|
const maxPoints = Math.max(3, Math.round(this.plotWidth() / 1.5));
|
|
@@ -18491,8 +18703,18 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18491
18703
|
});
|
|
18492
18704
|
}, ...ngDevMode ? [{ debugName: "paths" }] : /* istanbul ignore next */ []);
|
|
18493
18705
|
yTicks = computed(() => {
|
|
18706
|
+
if (this.minimal()) return [];
|
|
18707
|
+
if (this.categorical()) {
|
|
18708
|
+
const extent = this.categoryExtent();
|
|
18709
|
+
const sy = this.categorySy();
|
|
18710
|
+
return (extent?.ticks ?? []).map((v) => ({
|
|
18711
|
+
y: sy(v),
|
|
18712
|
+
label: this.formatShort(v, extent?.ratio ?? false),
|
|
18713
|
+
zero: v === 0
|
|
18714
|
+
}));
|
|
18715
|
+
}
|
|
18494
18716
|
const extent = this.extent();
|
|
18495
|
-
if (!extent
|
|
18717
|
+
if (!extent) return [];
|
|
18496
18718
|
const sy = this.sy();
|
|
18497
18719
|
const pct = this.percent();
|
|
18498
18720
|
return extent.ticks.map((v) => ({
|
|
@@ -18502,8 +18724,16 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18502
18724
|
}));
|
|
18503
18725
|
}, ...ngDevMode ? [{ debugName: "yTicks" }] : /* istanbul ignore next */ []);
|
|
18504
18726
|
xTicks = computed(() => {
|
|
18727
|
+
if (this.minimal()) return [];
|
|
18728
|
+
if (this.categorical()) {
|
|
18729
|
+
const centre = this.bandCentre();
|
|
18730
|
+
return this.categoryData().categories.map((label, i) => ({
|
|
18731
|
+
x: centre(i),
|
|
18732
|
+
label
|
|
18733
|
+
}));
|
|
18734
|
+
}
|
|
18505
18735
|
const extent = this.extent();
|
|
18506
|
-
if (!extent
|
|
18736
|
+
if (!extent) return [];
|
|
18507
18737
|
const sx = this.sx();
|
|
18508
18738
|
return timeTicks(extent.t0, extent.t1, this.plotWidth() / 80).map((tick) => ({
|
|
18509
18739
|
x: sx(tick.t),
|
|
@@ -18511,11 +18741,18 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18511
18741
|
}));
|
|
18512
18742
|
}, ...ngDevMode ? [{ debugName: "xTicks" }] : /* istanbul ignore next */ []);
|
|
18513
18743
|
windowLabel = computed(() => {
|
|
18744
|
+
const { categories } = this.categoryData();
|
|
18745
|
+
if (categories.length) {
|
|
18746
|
+
const first = categories[0];
|
|
18747
|
+
const last = categories[categories.length - 1];
|
|
18748
|
+
return first === last ? first : `${first} – ${last}`;
|
|
18749
|
+
}
|
|
18514
18750
|
const span = this.drawnSpan();
|
|
18515
18751
|
return span ? `${this.dateFormat.format(span[0])} – ${this.dateFormat.format(span[1])}` : "";
|
|
18516
18752
|
}, ...ngDevMode ? [{ debugName: "windowLabel" }] : /* istanbul ignore next */ []);
|
|
18517
18753
|
periodLabel = computed(() => this.displayPeriod() || this.config()?.displayPeriod || this.windowLabel(), ...ngDevMode ? [{ debugName: "periodLabel" }] : /* istanbul ignore next */ []);
|
|
18518
18754
|
legendRows = computed(() => {
|
|
18755
|
+
if (this.categorical()) return this.categoryLegendRows();
|
|
18519
18756
|
const changes = /* @__PURE__ */ new Map();
|
|
18520
18757
|
for (const line of this.windowed()) if (line.member) changes.set(line.member, chartChange(line.y));
|
|
18521
18758
|
return new Map(this.painted().map(({ member, color }) => [member, {
|
|
@@ -18575,7 +18812,68 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18575
18812
|
}
|
|
18576
18813
|
};
|
|
18577
18814
|
}, ...ngDevMode ? [{ debugName: "measureView" }] : /* istanbul ignore next */ []);
|
|
18815
|
+
categoryLegendRows = () => {
|
|
18816
|
+
const series = new Map(this.categoryData().series.map((s) => [s.member, s]));
|
|
18817
|
+
return new Map(this.painted().map(({ member, color }) => {
|
|
18818
|
+
const s = series.get(member);
|
|
18819
|
+
return [member, {
|
|
18820
|
+
color,
|
|
18821
|
+
...s ? this.categoryChange(s.values, s.ratio, s.values.length - 1) : this.signedChange(null)
|
|
18822
|
+
}];
|
|
18823
|
+
}));
|
|
18824
|
+
};
|
|
18825
|
+
categoryChange = (values, ratio, i) => {
|
|
18826
|
+
let last = i;
|
|
18827
|
+
while (last >= 0 && values[last] === null) last--;
|
|
18828
|
+
let prev = last - 1;
|
|
18829
|
+
while (prev >= 0 && values[prev] === null) prev--;
|
|
18830
|
+
const to = values[last];
|
|
18831
|
+
const from = values[prev];
|
|
18832
|
+
if (last < 0 || prev < 0 || to == null || from == null) return this.signedChange(null);
|
|
18833
|
+
if (ratio) return this.signedPoints(to - from);
|
|
18834
|
+
return this.signedChange(from ? (to / from - 1) * 100 : null);
|
|
18835
|
+
};
|
|
18836
|
+
categoryHover = computed(() => {
|
|
18837
|
+
const index = this.categoryIndex();
|
|
18838
|
+
const { categories, series } = this.categoryData();
|
|
18839
|
+
if (index === null || !categories.length || this.minimal()) return null;
|
|
18840
|
+
const i = Math.min(index, categories.length - 1);
|
|
18841
|
+
const centre = this.bandCentre();
|
|
18842
|
+
const band = this.plotWidth() / categories.length;
|
|
18843
|
+
const sy = this.categorySy();
|
|
18844
|
+
const strip = this.categoryView()?.strip;
|
|
18845
|
+
const x = centre(i);
|
|
18846
|
+
const rows = series.flatMap((s) => {
|
|
18847
|
+
const v = s.values[i];
|
|
18848
|
+
if (v === null) return [];
|
|
18849
|
+
const line = s.panel === "main" && s.mark === "line";
|
|
18850
|
+
const change = this.categoryChange(s.values, s.ratio, i);
|
|
18851
|
+
return [{
|
|
18852
|
+
color: s.color,
|
|
18853
|
+
label: s.label,
|
|
18854
|
+
noTranslate: s.noTranslate,
|
|
18855
|
+
params: s.params,
|
|
18856
|
+
v,
|
|
18857
|
+
value: s.ratio ? this.formatShort(v, true) : this.numberFormat.format(v),
|
|
18858
|
+
sub: change.change === "—" ? "" : change.change,
|
|
18859
|
+
cx: line ? x : null,
|
|
18860
|
+
cy: line ? sy(v) : null
|
|
18861
|
+
}];
|
|
18862
|
+
});
|
|
18863
|
+
return {
|
|
18864
|
+
x,
|
|
18865
|
+
title: categories[i],
|
|
18866
|
+
rows,
|
|
18867
|
+
flip: x > this.width() - TOOLTIP_ROOM,
|
|
18868
|
+
band: {
|
|
18869
|
+
x: x - band / 2,
|
|
18870
|
+
width: band,
|
|
18871
|
+
bottom: strip?.bottom ?? this.bottom()
|
|
18872
|
+
}
|
|
18873
|
+
};
|
|
18874
|
+
}, ...ngDevMode ? [{ debugName: "categoryHover" }] : /* istanbul ignore next */ []);
|
|
18578
18875
|
hover = computed(() => {
|
|
18876
|
+
if (this.categorical()) return this.categoryHover();
|
|
18579
18877
|
const index = this.hoverIndex();
|
|
18580
18878
|
const times = this.times();
|
|
18581
18879
|
if (index === null || !times.length || this.minimal()) return null;
|
|
@@ -18603,7 +18901,8 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18603
18901
|
x,
|
|
18604
18902
|
title: this.dateFormat.format(t),
|
|
18605
18903
|
rows,
|
|
18606
|
-
flip: x > this.width() - TOOLTIP_ROOM
|
|
18904
|
+
flip: x > this.width() - TOOLTIP_ROOM,
|
|
18905
|
+
band: null
|
|
18607
18906
|
};
|
|
18608
18907
|
}, ...ngDevMode ? [{ debugName: "hover" }] : /* istanbul ignore next */ []);
|
|
18609
18908
|
navScale = computed(() => {
|
|
@@ -18651,6 +18950,24 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18651
18950
|
navTop = NAV_TOP;
|
|
18652
18951
|
navViewBox = computed(() => `0 0 ${this.width()} ${NAV_HEIGHT}`, ...ngDevMode ? [{ debugName: "navViewBox" }] : /* istanbul ignore next */ []);
|
|
18653
18952
|
table = computed(() => {
|
|
18953
|
+
if (this.categorical()) {
|
|
18954
|
+
const { categories, series } = this.categoryData();
|
|
18955
|
+
return {
|
|
18956
|
+
columns: series.map((s) => ({
|
|
18957
|
+
label: s.label,
|
|
18958
|
+
noTranslate: s.noTranslate,
|
|
18959
|
+
params: s.params
|
|
18960
|
+
})),
|
|
18961
|
+
rows: categories.map((date, i) => ({
|
|
18962
|
+
date,
|
|
18963
|
+
cells: series.map((s) => {
|
|
18964
|
+
const v = s.values[i];
|
|
18965
|
+
if (v === null) return "—";
|
|
18966
|
+
return s.ratio ? this.formatShort(v, true) : this.numberFormat.format(v);
|
|
18967
|
+
})
|
|
18968
|
+
})).reverse()
|
|
18969
|
+
};
|
|
18970
|
+
}
|
|
18654
18971
|
const plotted = this.plotted();
|
|
18655
18972
|
const pct = this.percent();
|
|
18656
18973
|
const rows = [...plotted.reduce((best, p) => !best || p.line.t.length > best.line.t.length ? p : best, null)?.ds.t ?? []].reverse().map((t) => ({
|
|
@@ -18788,6 +19105,15 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18788
19105
|
return times[nearestIndex(times, t)];
|
|
18789
19106
|
};
|
|
18790
19107
|
onPointerMove = (event) => {
|
|
19108
|
+
if (this.categorical()) {
|
|
19109
|
+
const count = this.categoryData().categories.length;
|
|
19110
|
+
if (!count) return;
|
|
19111
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
19112
|
+
const px = event.clientX - rect.left - this.left();
|
|
19113
|
+
if (px < 0 || px > this.plotWidth()) return;
|
|
19114
|
+
this.categoryIndex.set(Math.min(count - 1, Math.floor(px / this.plotWidth() * count)));
|
|
19115
|
+
return;
|
|
19116
|
+
}
|
|
18791
19117
|
const t = this.plotTime(event);
|
|
18792
19118
|
if (t === null) return;
|
|
18793
19119
|
const measured = this.measured();
|
|
@@ -18815,9 +19141,37 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18815
19141
|
if (measured && measured[0] === measured[1]) this.measured.set(null);
|
|
18816
19142
|
};
|
|
18817
19143
|
clearHover = () => {
|
|
19144
|
+
this.categoryIndex.set(null);
|
|
18818
19145
|
if (!this.measuring) this.hoverIndex.set(null);
|
|
18819
19146
|
};
|
|
19147
|
+
onCategoryKeydown = (event) => {
|
|
19148
|
+
const count = this.categoryData().categories.length;
|
|
19149
|
+
if (!count) return;
|
|
19150
|
+
const current = this.categoryIndex();
|
|
19151
|
+
let next;
|
|
19152
|
+
switch (event.key) {
|
|
19153
|
+
case "ArrowLeft":
|
|
19154
|
+
next = Math.max(0, (current ?? count) - 1);
|
|
19155
|
+
break;
|
|
19156
|
+
case "ArrowRight":
|
|
19157
|
+
next = Math.min(count - 1, (current ?? -1) + 1);
|
|
19158
|
+
break;
|
|
19159
|
+
case "Home":
|
|
19160
|
+
next = 0;
|
|
19161
|
+
break;
|
|
19162
|
+
case "End":
|
|
19163
|
+
next = count - 1;
|
|
19164
|
+
break;
|
|
19165
|
+
case "Escape":
|
|
19166
|
+
next = null;
|
|
19167
|
+
break;
|
|
19168
|
+
default: return;
|
|
19169
|
+
}
|
|
19170
|
+
event.preventDefault();
|
|
19171
|
+
this.categoryIndex.set(next);
|
|
19172
|
+
};
|
|
18820
19173
|
onKeydown = (event) => {
|
|
19174
|
+
if (this.categorical()) return this.onCategoryKeydown(event);
|
|
18821
19175
|
const times = this.times();
|
|
18822
19176
|
const count = times.length;
|
|
18823
19177
|
if (!count) return;
|
|
@@ -18874,6 +19228,24 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18874
19228
|
trend
|
|
18875
19229
|
};
|
|
18876
19230
|
};
|
|
19231
|
+
signedPoints = (diff) => {
|
|
19232
|
+
const trend = diff > 0 ? "up" : diff < 0 ? "down" : "flat";
|
|
19233
|
+
return {
|
|
19234
|
+
change: `${trend === "up" ? "▲" : trend === "down" ? "▼" : "■"} ${this.pointsFormat.format(diff)} pp`,
|
|
19235
|
+
trend
|
|
19236
|
+
};
|
|
19237
|
+
};
|
|
19238
|
+
pointsFormat = new Intl.NumberFormat(this.locale, {
|
|
19239
|
+
signDisplay: "exceptZero",
|
|
19240
|
+
minimumFractionDigits: 1,
|
|
19241
|
+
maximumFractionDigits: 1
|
|
19242
|
+
});
|
|
19243
|
+
levelFormat = new Intl.NumberFormat(this.locale, {
|
|
19244
|
+
style: "percent",
|
|
19245
|
+
minimumFractionDigits: 1,
|
|
19246
|
+
maximumFractionDigits: 1
|
|
19247
|
+
});
|
|
19248
|
+
formatShort = (v, ratio) => ratio ? this.levelFormat.format(v / 100) : this.compactFormat.format(v);
|
|
18877
19249
|
percentFormats = /* @__PURE__ */ new Map();
|
|
18878
19250
|
formatPercent = (v, digits) => {
|
|
18879
19251
|
let format = this.percentFormats.get(digits);
|
|
@@ -18984,8 +19356,8 @@ var SectionChartComponent = class SectionChartComponent extends ConfigComponent
|
|
|
18984
19356
|
}],
|
|
18985
19357
|
usesInheritance: true,
|
|
18986
19358
|
ngImport: i0,
|
|
18987
|
-
template: "<div class=\"m-section-chart__top\">\n <!-- Each series draws its own legend row: the row is the series' element,\n which is what the editor's Canvas selects it by. -->\n <div class=\"m-section-chart__legend\" role=\"list\">\n <ng-content />\n </div>\n @if (periodLabel(); as label) {\n <span class=\"m-section-chart__window\">{{ label }}</span>\n }\n</div>\n\n<div class=\"m-section-chart__plot\">\n <svg\n class=\"m-section-chart__svg\"\n role=\"img\"\n tabindex=\"0\"\n [class.is-measurable]=\"canMeasure()\"\n [attr.width]=\"width()\"\n [attr.height]=\"resolvedHeight()\"\n [attr.viewBox]=\"viewBox()\"\n [attr.aria-label]=\"windowLabel()\"\n [attr.aria-describedby]=\"tableId\"\n (pointerdown)=\"onPlotDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPlotUp()\"\n (pointercancel)=\"onPlotUp()\"\n (pointerleave)=\"clearHover()\"\n (blur)=\"clearHover()\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (tick of yTicks(); track $index) {\n <svg:line\n class=\"m-section-chart__grid\"\n [class.m-section-chart__grid--zero]=\"tick.zero\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n />\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"end\"\n [attr.x]=\"left() - 8\"\n [attr.y]=\"tick.y + 4\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (!minimal()) {\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"bottom()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (tick of xTicks(); track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"bottom() + 18\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (measureView(); as band) {\n <svg:rect\n class=\"m-section-chart__band\"\n [attr.x]=\"band.start\"\n [attr.y]=\"top()\"\n [attr.width]=\"band.width\"\n [attr.height]=\"bottom() - top()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start\"\n [attr.x2]=\"band.start\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start + band.width\"\n [attr.x2]=\"band.start + band.width\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (path of paths(); track $index) {\n @if (path.area; as area) {\n <svg:defs>\n <svg:linearGradient [attr.id]=\"path.fillId\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop offset=\"0\" stop-opacity=\"0.22\" [attr.stop-color]=\"path.color\" />\n <svg:stop offset=\"1\" stop-opacity=\"0\" [attr.stop-color]=\"path.color\" />\n </svg:linearGradient>\n </svg:defs>\n <svg:path class=\"m-section-chart__area\" [attr.d]=\"area\" [attr.fill]=\"path.fill\" />\n }\n }\n @for (path of paths(); track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"path.d\"\n [style.stroke]=\"path.color\"\n />\n }\n @if (!minimal()) {\n @for (path of paths(); track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"path.endX\"\n [attr.cy]=\"path.endY\"\n [style.fill]=\"path.color\"\n />\n }\n }\n @if (hover(); as h) {\n <svg:line\n class=\"m-section-chart__cross\"\n [attr.x1]=\"h.x\"\n [attr.x2]=\"h.x\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n @for (row of h.rows; track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"row.cx\"\n [attr.cy]=\"row.cy\"\n [style.fill]=\"row.color\"\n />\n }\n }\n </svg>\n\n @if (hover(); as h) {\n <div\n class=\"m-section-chart__tip\"\n role=\"status\"\n [class.m-section-chart__tip--flip]=\"h.flip\"\n [style.left.px]=\"h.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ h.title }}</span>\n @for (row of h.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n\n @if (measureView()?.card; as card) {\n <div\n class=\"m-section-chart__measure\"\n role=\"status\"\n [class.m-section-chart__measure--flip]=\"card.flip\"\n [style.left.px]=\"card.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ card.title }}</span>\n @for (row of card.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n</div>\n\n@if (presets().length > 1 && !minimal()) {\n <div class=\"m-section-chart__presets\">\n <m-section-toggle\n [items]=\"presets()\"\n [selectedIndex]=\"presetIndex()\"\n [border]=\"false\"\n (action)=\"selectPreset($event)\"\n >\n <ng-template [mSectionToggleItem]=\"presets()\" let-preset>\n <span class=\"m-section-chart__preset\">{{ preset.label }}</span>\n </ng-template>\n </m-section-toggle>\n </div>\n}\n\n@if (navigatorView(); as nav) {\n <svg\n class=\"m-section-chart__navigator\"\n role=\"slider\"\n tabindex=\"0\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'zoom' | translate\"\n [attr.aria-valuenow]=\"nav.position\"\n [attr.aria-valuetext]=\"windowLabel()\"\n [attr.width]=\"width()\"\n [attr.height]=\"navHeight\"\n [attr.viewBox]=\"navViewBox()\"\n (pointerdown)=\"onNavigatorDown($event)\"\n (pointermove)=\"onNavigatorMove($event)\"\n (pointerup)=\"onNavigatorUp()\"\n (pointercancel)=\"onNavigatorUp()\"\n (keydown)=\"onNavigatorKeydown($event)\"\n >\n <svg:path class=\"m-section-chart__nav-area\" [attr.d]=\"nav.area\" />\n <svg:path class=\"m-section-chart__nav-line\" [attr.d]=\"nav.d\" />\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"nav.base\"\n [attr.y2]=\"nav.base\"\n />\n @for (tick of nav.ticks; track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"nav.base + 15\"\n >\n {{ tick.label }}\n </svg:text>\n }\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"left()\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.start - left()\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"nav.end\"\n [attr.y]=\"navTop\"\n [attr.width]=\"right() - nav.end\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-window\"\n [attr.x]=\"nav.start\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.end - nav.start\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.start - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.end - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n </svg>\n}\n\n<table class=\"m-section-chart__table\" [id]=\"tableId\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'date' | translate }}</th>\n @for (column of table().columns; track $index) {\n <th scope=\"col\">\n {{ column.noTranslate ? column.label : (column.label | translate: column.params) }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of table().rows; track $index) {\n <tr>\n <td>{{ row.date }}</td>\n @for (cell of row.cells; track $index) {\n <td>{{ cell }}</td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
18988
|
-
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;position:relative;width:100%;min-width:0}.m-section-chart__top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:.5rem 1rem;margin-bottom:.5rem}.m-section-chart__legend{display:grid;gap:.15rem;min-width:0}.m-section-chart__tip-key{display:inline-block;width:.75rem;height:2px;border-radius:1px}.m-section-chart__window{color:var(--m-text-tertiary);font-size:.8rem}:host(.m-section-chart--minimal) .m-section-chart__svg{cursor:default}:host(.m-section-chart--minimal) .m-section-chart__line{stroke-width:2.25}.m-section-chart__area{stroke:none}.m-section-chart__plot{position:relative}.m-section-chart__svg{display:block;overflow:visible}.m-section-chart__svg:focus{outline:none}.m-section-chart__svg:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__svg.is-measurable{cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none}.m-section-chart__band{fill:var(--m-text);opacity:.06}.m-section-chart__band-edge{stroke:var(--m-text-secondary);stroke-width:1}.m-section-chart__grid{stroke:var(--m-text-septenary);stroke-width:1}.m-section-chart__grid--zero{stroke:var(--m-text-quinary);stroke-width:1.5}.m-section-chart__axis{stroke:var(--m-text-quinary);stroke-width:1}.m-section-chart__tick{fill:var(--m-text-tertiary);font-size:11px;font-variant-numeric:tabular-nums}.m-section-chart__line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.m-section-chart__dot{stroke:var(--m-background);stroke-width:2}.m-section-chart__cross{stroke:var(--m-text-secondary);stroke-width:1;opacity:.55}.m-section-chart__tip,.m-section-chart__measure{position:absolute;z-index:2;display:grid;gap:.25rem;min-width:10rem;padding:.5rem .625rem;border:1px solid var(--m-backdrop-border);border-radius:.5rem;background:var(--m-background);box-shadow:0 6px 20px var(--m-backdrop-shadow);font-size:.75rem;pointer-events:none}.m-section-chart__tip{top:0;margin-left:.875rem}.m-section-chart__tip--flip{transform:translate(calc(-100% - 1.75rem))}.m-section-chart__measure{bottom:2.25rem}.m-section-chart__measure--flip{transform:translate(-100%)}.m-section-chart__tip-title{color:var(--m-text-secondary);font-weight:600}.m-section-chart__tip-row{display:grid;grid-template-columns:.75rem auto 1fr auto;align-items:center;gap:.5rem}.m-section-chart__tip-value{color:var(--m-text);font-weight:650;font-variant-numeric:tabular-nums}.m-section-chart__tip-label{color:var(--m-text-secondary);white-space:nowrap}.m-section-chart__tip-sub{color:var(--m-text-tertiary);font-variant-numeric:tabular-nums}.m-section-chart__presets{--section-px: 0;margin-top:.5rem}.m-section-chart__preset{font-size:.8rem;font-weight:600;font-variant-numeric:tabular-nums}.m-section-chart__navigator{display:block;margin-top:.25rem;overflow:visible;touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer}.m-section-chart__navigator:focus{outline:none}.m-section-chart__navigator:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__nav-area{fill:var(--m-text-tertiary);opacity:.12}.m-section-chart__nav-line{fill:none;stroke:var(--m-text-tertiary);stroke-width:1.25}.m-section-chart__nav-dim{fill:var(--m-background);opacity:.6}.m-section-chart__nav-window{fill:transparent;stroke:var(--m-text-secondary);stroke-width:1;cursor:grab}.m-section-chart__nav-handle{fill:var(--m-text-secondary);cursor:ew-resize}.m-section-chart__table{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"],
|
|
19359
|
+
template: "<div class=\"m-section-chart__top\">\n <!-- Each series draws its own legend row: the row is the series' element,\n which is what the editor's Canvas selects it by. -->\n <div class=\"m-section-chart__legend\" role=\"list\">\n <ng-content />\n </div>\n @if (periodLabel(); as label) {\n <span class=\"m-section-chart__window\">{{ label }}</span>\n }\n</div>\n\n<div class=\"m-section-chart__plot\">\n <svg\n class=\"m-section-chart__svg\"\n role=\"img\"\n tabindex=\"0\"\n [class.is-measurable]=\"canMeasure()\"\n [attr.width]=\"width()\"\n [attr.height]=\"svgHeight()\"\n [attr.viewBox]=\"viewBox()\"\n [attr.aria-label]=\"windowLabel()\"\n [attr.aria-describedby]=\"tableId\"\n (pointerdown)=\"onPlotDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPlotUp()\"\n (pointercancel)=\"onPlotUp()\"\n (pointerleave)=\"clearHover()\"\n (blur)=\"clearHover()\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (tick of yTicks(); track $index) {\n <svg:line\n class=\"m-section-chart__grid\"\n [class.m-section-chart__grid--zero]=\"tick.zero\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n />\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"end\"\n [attr.x]=\"left() - 8\"\n [attr.y]=\"tick.y + 4\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (!minimal()) {\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"bottom()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (tick of xTicks(); track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"bottom() + 18\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (measureView(); as band) {\n <svg:rect\n class=\"m-section-chart__band\"\n [attr.x]=\"band.start\"\n [attr.y]=\"top()\"\n [attr.width]=\"band.width\"\n [attr.height]=\"bottom() - top()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start\"\n [attr.x2]=\"band.start\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start + band.width\"\n [attr.x2]=\"band.start + band.width\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @if (hover()?.band; as band) {\n <svg:rect\n class=\"m-section-chart__hover-band\"\n [attr.x]=\"band.x\"\n [attr.y]=\"top()\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - top()\"\n />\n }\n @if (categoryView(); as cat) {\n @for (column of cat.columns; track $index) {\n <svg:path\n class=\"m-section-chart__column\"\n [attr.d]=\"column.d\"\n [style.fill]=\"column.color\"\n />\n }\n @for (line of cat.lines; track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"line.d\"\n [style.stroke]=\"line.color\"\n />\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"line.endX\"\n [attr.cy]=\"line.endY\"\n [style.fill]=\"line.color\"\n />\n }\n @for (label of cat.labels; track $index) {\n <svg:text\n class=\"m-section-chart__value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\"\n >\n {{ label.text }}\n </svg:text>\n }\n @if (cat.strip; as strip) {\n @for (tick of strip.ticks; track $index) {\n <svg:line\n class=\"m-section-chart__grid\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n />\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"end\"\n [attr.x]=\"left() - 8\"\n [attr.y]=\"tick.y + 4\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @for (line of strip.lines; track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"line.d\"\n [style.stroke]=\"line.color\"\n />\n @for (dot of line.dots; track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"dot.cx\"\n [attr.cy]=\"dot.cy\"\n [style.fill]=\"line.color\"\n />\n <svg:text\n class=\"m-section-chart__value\"\n text-anchor=\"middle\"\n [attr.x]=\"dot.cx\"\n [attr.y]=\"dot.cy - 9\"\n >\n {{ dot.text }}\n </svg:text>\n }\n }\n }\n }\n @for (path of paths(); track $index) {\n @if (path.area; as area) {\n <svg:defs>\n <svg:linearGradient [attr.id]=\"path.fillId\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop offset=\"0\" stop-opacity=\"0.22\" [attr.stop-color]=\"path.color\" />\n <svg:stop offset=\"1\" stop-opacity=\"0\" [attr.stop-color]=\"path.color\" />\n </svg:linearGradient>\n </svg:defs>\n <svg:path class=\"m-section-chart__area\" [attr.d]=\"area\" [attr.fill]=\"path.fill\" />\n }\n }\n @for (path of paths(); track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"path.d\"\n [style.stroke]=\"path.color\"\n />\n }\n @if (!minimal()) {\n @for (path of paths(); track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"path.endX\"\n [attr.cy]=\"path.endY\"\n [style.fill]=\"path.color\"\n />\n }\n }\n @if (hover(); as h) {\n @if (!h.band) {\n <svg:line\n class=\"m-section-chart__cross\"\n [attr.x1]=\"h.x\"\n [attr.x2]=\"h.x\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (row of h.rows; track $index) {\n @if (row.cx !== null) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"row.cx\"\n [attr.cy]=\"row.cy\"\n [style.fill]=\"row.color\"\n />\n }\n }\n }\n </svg>\n\n @if (hover(); as h) {\n <div\n class=\"m-section-chart__tip\"\n role=\"status\"\n [class.m-section-chart__tip--flip]=\"h.flip\"\n [style.left.px]=\"h.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ h.title }}</span>\n @for (row of h.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n\n @if (measureView()?.card; as card) {\n <div\n class=\"m-section-chart__measure\"\n role=\"status\"\n [class.m-section-chart__measure--flip]=\"card.flip\"\n [style.left.px]=\"card.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ card.title }}</span>\n @for (row of card.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n</div>\n\n@if (presets().length > 1 && !minimal() && !categorical()) {\n <div class=\"m-section-chart__presets\">\n <m-section-toggle\n [items]=\"presets()\"\n [selectedIndex]=\"presetIndex()\"\n [border]=\"false\"\n (action)=\"selectPreset($event)\"\n >\n <ng-template [mSectionToggleItem]=\"presets()\" let-preset>\n <span class=\"m-section-chart__preset\">{{ preset.label }}</span>\n </ng-template>\n </m-section-toggle>\n </div>\n}\n\n@if (navigatorView(); as nav) {\n <svg\n class=\"m-section-chart__navigator\"\n role=\"slider\"\n tabindex=\"0\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'zoom' | translate\"\n [attr.aria-valuenow]=\"nav.position\"\n [attr.aria-valuetext]=\"windowLabel()\"\n [attr.width]=\"width()\"\n [attr.height]=\"navHeight\"\n [attr.viewBox]=\"navViewBox()\"\n (pointerdown)=\"onNavigatorDown($event)\"\n (pointermove)=\"onNavigatorMove($event)\"\n (pointerup)=\"onNavigatorUp()\"\n (pointercancel)=\"onNavigatorUp()\"\n (keydown)=\"onNavigatorKeydown($event)\"\n >\n <svg:path class=\"m-section-chart__nav-area\" [attr.d]=\"nav.area\" />\n <svg:path class=\"m-section-chart__nav-line\" [attr.d]=\"nav.d\" />\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"nav.base\"\n [attr.y2]=\"nav.base\"\n />\n @for (tick of nav.ticks; track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"nav.base + 15\"\n >\n {{ tick.label }}\n </svg:text>\n }\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"left()\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.start - left()\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"nav.end\"\n [attr.y]=\"navTop\"\n [attr.width]=\"right() - nav.end\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-window\"\n [attr.x]=\"nav.start\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.end - nav.start\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.start - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.end - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n </svg>\n}\n\n<table class=\"m-section-chart__table\" [id]=\"tableId\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'date' | translate }}</th>\n @for (column of table().columns; track $index) {\n <th scope=\"col\">\n {{ column.noTranslate ? column.label : (column.label | translate: column.params) }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of table().rows; track $index) {\n <tr>\n <td>{{ row.date }}</td>\n @for (cell of row.cells; track $index) {\n <td>{{ cell }}</td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
19360
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;position:relative;width:100%;min-width:0}.m-section-chart__top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:.5rem 1rem;margin-bottom:.5rem}.m-section-chart__legend{display:grid;gap:.15rem;min-width:0}.m-section-chart__tip-key{display:inline-block;width:.75rem;height:2px;border-radius:1px}.m-section-chart__window{color:var(--m-text-tertiary);font-size:.8rem}:host(.m-section-chart--minimal) .m-section-chart__svg{cursor:default}:host(.m-section-chart--minimal) .m-section-chart__line{stroke-width:2.25}.m-section-chart__area{stroke:none}.m-section-chart__plot{position:relative}.m-section-chart__svg{display:block;overflow:visible}.m-section-chart__svg:focus{outline:none}.m-section-chart__svg:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__svg.is-measurable{cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none}.m-section-chart__band{fill:var(--m-text);opacity:.06}.m-section-chart__band-edge{stroke:var(--m-text-secondary);stroke-width:1}.m-section-chart__grid{stroke:var(--m-text-septenary);stroke-width:1}.m-section-chart__grid--zero{stroke:var(--m-text-quinary);stroke-width:1.5}.m-section-chart__axis{stroke:var(--m-text-quinary);stroke-width:1}.m-section-chart__tick{fill:var(--m-text-tertiary);font-size:11px;font-variant-numeric:tabular-nums}.m-section-chart__line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.m-section-chart__dot{stroke:var(--m-background);stroke-width:2}.m-section-chart__cross{stroke:var(--m-text-secondary);stroke-width:1;opacity:.55}.m-section-chart__hover-band{fill:var(--m-text);opacity:.05}.m-section-chart__column{stroke:none}.m-section-chart__value{fill:var(--m-text-secondary);font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}.m-section-chart__tip,.m-section-chart__measure{position:absolute;z-index:2;display:grid;gap:.25rem;min-width:10rem;padding:.5rem .625rem;border:1px solid var(--m-backdrop-border);border-radius:.5rem;background:var(--m-background);box-shadow:0 6px 20px var(--m-backdrop-shadow);font-size:.75rem;pointer-events:none}.m-section-chart__tip{top:0;margin-left:.875rem}.m-section-chart__tip--flip{transform:translate(calc(-100% - 1.75rem))}.m-section-chart__measure{bottom:2.25rem}.m-section-chart__measure--flip{transform:translate(-100%)}.m-section-chart__tip-title{color:var(--m-text-secondary);font-weight:600}.m-section-chart__tip-row{display:grid;grid-template-columns:.75rem auto 1fr auto;align-items:center;gap:.5rem}.m-section-chart__tip-value{color:var(--m-text);font-weight:650;font-variant-numeric:tabular-nums}.m-section-chart__tip-label{color:var(--m-text-secondary);white-space:nowrap}.m-section-chart__tip-sub{color:var(--m-text-tertiary);font-variant-numeric:tabular-nums}.m-section-chart__presets{--section-px: 0;margin-top:.5rem}.m-section-chart__preset{font-size:.8rem;font-weight:600;font-variant-numeric:tabular-nums}.m-section-chart__navigator{display:block;margin-top:.25rem;overflow:visible;touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer}.m-section-chart__navigator:focus{outline:none}.m-section-chart__navigator:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__nav-area{fill:var(--m-text-tertiary);opacity:.12}.m-section-chart__nav-line{fill:none;stroke:var(--m-text-tertiary);stroke-width:1.25}.m-section-chart__nav-dim{fill:var(--m-background);opacity:.6}.m-section-chart__nav-window{fill:transparent;stroke:var(--m-text-secondary);stroke-width:1;cursor:grab}.m-section-chart__nav-handle{fill:var(--m-text-secondary);cursor:ew-resize}.m-section-chart__table{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"],
|
|
18989
19361
|
dependencies: [
|
|
18990
19362
|
{
|
|
18991
19363
|
kind: "component",
|
|
@@ -19045,8 +19417,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
19045
19417
|
};
|
|
19046
19418
|
}
|
|
19047
19419
|
}],
|
|
19048
|
-
template: "<div class=\"m-section-chart__top\">\n <!-- Each series draws its own legend row: the row is the series' element,\n which is what the editor's Canvas selects it by. -->\n <div class=\"m-section-chart__legend\" role=\"list\">\n <ng-content />\n </div>\n @if (periodLabel(); as label) {\n <span class=\"m-section-chart__window\">{{ label }}</span>\n }\n</div>\n\n<div class=\"m-section-chart__plot\">\n <svg\n class=\"m-section-chart__svg\"\n role=\"img\"\n tabindex=\"0\"\n [class.is-measurable]=\"canMeasure()\"\n [attr.width]=\"width()\"\n [attr.height]=\"resolvedHeight()\"\n [attr.viewBox]=\"viewBox()\"\n [attr.aria-label]=\"windowLabel()\"\n [attr.aria-describedby]=\"tableId\"\n (pointerdown)=\"onPlotDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPlotUp()\"\n (pointercancel)=\"onPlotUp()\"\n (pointerleave)=\"clearHover()\"\n (blur)=\"clearHover()\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (tick of yTicks(); track $index) {\n <svg:line\n class=\"m-section-chart__grid\"\n [class.m-section-chart__grid--zero]=\"tick.zero\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n />\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"end\"\n [attr.x]=\"left() - 8\"\n [attr.y]=\"tick.y + 4\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (!minimal()) {\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"bottom()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (tick of xTicks(); track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"bottom() + 18\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (measureView(); as band) {\n <svg:rect\n class=\"m-section-chart__band\"\n [attr.x]=\"band.start\"\n [attr.y]=\"top()\"\n [attr.width]=\"band.width\"\n [attr.height]=\"bottom() - top()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start\"\n [attr.x2]=\"band.start\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start + band.width\"\n [attr.x2]=\"band.start + band.width\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (path of paths(); track $index) {\n @if (path.area; as area) {\n <svg:defs>\n <svg:linearGradient [attr.id]=\"path.fillId\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop offset=\"0\" stop-opacity=\"0.22\" [attr.stop-color]=\"path.color\" />\n <svg:stop offset=\"1\" stop-opacity=\"0\" [attr.stop-color]=\"path.color\" />\n </svg:linearGradient>\n </svg:defs>\n <svg:path class=\"m-section-chart__area\" [attr.d]=\"area\" [attr.fill]=\"path.fill\" />\n }\n }\n @for (path of paths(); track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"path.d\"\n [style.stroke]=\"path.color\"\n />\n }\n @if (!minimal()) {\n @for (path of paths(); track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"path.endX\"\n [attr.cy]=\"path.endY\"\n [style.fill]=\"path.color\"\n />\n }\n }\n @if (hover(); as h) {\n <svg:line\n class=\"m-section-chart__cross\"\n [attr.x1]=\"h.x\"\n [attr.x2]=\"h.x\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n @for (row of h.rows; track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"row.cx\"\n [attr.cy]=\"row.cy\"\n [style.fill]=\"row.color\"\n />\n }\n }\n </svg>\n\n @if (hover(); as h) {\n <div\n class=\"m-section-chart__tip\"\n role=\"status\"\n [class.m-section-chart__tip--flip]=\"h.flip\"\n [style.left.px]=\"h.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ h.title }}</span>\n @for (row of h.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n\n @if (measureView()?.card; as card) {\n <div\n class=\"m-section-chart__measure\"\n role=\"status\"\n [class.m-section-chart__measure--flip]=\"card.flip\"\n [style.left.px]=\"card.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ card.title }}</span>\n @for (row of card.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n</div>\n\n@if (presets().length > 1 && !minimal()) {\n <div class=\"m-section-chart__presets\">\n <m-section-toggle\n [items]=\"presets()\"\n [selectedIndex]=\"presetIndex()\"\n [border]=\"false\"\n (action)=\"selectPreset($event)\"\n >\n <ng-template [mSectionToggleItem]=\"presets()\" let-preset>\n <span class=\"m-section-chart__preset\">{{ preset.label }}</span>\n </ng-template>\n </m-section-toggle>\n </div>\n}\n\n@if (navigatorView(); as nav) {\n <svg\n class=\"m-section-chart__navigator\"\n role=\"slider\"\n tabindex=\"0\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'zoom' | translate\"\n [attr.aria-valuenow]=\"nav.position\"\n [attr.aria-valuetext]=\"windowLabel()\"\n [attr.width]=\"width()\"\n [attr.height]=\"navHeight\"\n [attr.viewBox]=\"navViewBox()\"\n (pointerdown)=\"onNavigatorDown($event)\"\n (pointermove)=\"onNavigatorMove($event)\"\n (pointerup)=\"onNavigatorUp()\"\n (pointercancel)=\"onNavigatorUp()\"\n (keydown)=\"onNavigatorKeydown($event)\"\n >\n <svg:path class=\"m-section-chart__nav-area\" [attr.d]=\"nav.area\" />\n <svg:path class=\"m-section-chart__nav-line\" [attr.d]=\"nav.d\" />\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"nav.base\"\n [attr.y2]=\"nav.base\"\n />\n @for (tick of nav.ticks; track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"nav.base + 15\"\n >\n {{ tick.label }}\n </svg:text>\n }\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"left()\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.start - left()\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"nav.end\"\n [attr.y]=\"navTop\"\n [attr.width]=\"right() - nav.end\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-window\"\n [attr.x]=\"nav.start\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.end - nav.start\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.start - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.end - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n </svg>\n}\n\n<table class=\"m-section-chart__table\" [id]=\"tableId\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'date' | translate }}</th>\n @for (column of table().columns; track $index) {\n <th scope=\"col\">\n {{ column.noTranslate ? column.label : (column.label | translate: column.params) }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of table().rows; track $index) {\n <tr>\n <td>{{ row.date }}</td>\n @for (cell of row.cells; track $index) {\n <td>{{ cell }}</td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
19049
|
-
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;position:relative;width:100%;min-width:0}.m-section-chart__top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:.5rem 1rem;margin-bottom:.5rem}.m-section-chart__legend{display:grid;gap:.15rem;min-width:0}.m-section-chart__tip-key{display:inline-block;width:.75rem;height:2px;border-radius:1px}.m-section-chart__window{color:var(--m-text-tertiary);font-size:.8rem}:host(.m-section-chart--minimal) .m-section-chart__svg{cursor:default}:host(.m-section-chart--minimal) .m-section-chart__line{stroke-width:2.25}.m-section-chart__area{stroke:none}.m-section-chart__plot{position:relative}.m-section-chart__svg{display:block;overflow:visible}.m-section-chart__svg:focus{outline:none}.m-section-chart__svg:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__svg.is-measurable{cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none}.m-section-chart__band{fill:var(--m-text);opacity:.06}.m-section-chart__band-edge{stroke:var(--m-text-secondary);stroke-width:1}.m-section-chart__grid{stroke:var(--m-text-septenary);stroke-width:1}.m-section-chart__grid--zero{stroke:var(--m-text-quinary);stroke-width:1.5}.m-section-chart__axis{stroke:var(--m-text-quinary);stroke-width:1}.m-section-chart__tick{fill:var(--m-text-tertiary);font-size:11px;font-variant-numeric:tabular-nums}.m-section-chart__line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.m-section-chart__dot{stroke:var(--m-background);stroke-width:2}.m-section-chart__cross{stroke:var(--m-text-secondary);stroke-width:1;opacity:.55}.m-section-chart__tip,.m-section-chart__measure{position:absolute;z-index:2;display:grid;gap:.25rem;min-width:10rem;padding:.5rem .625rem;border:1px solid var(--m-backdrop-border);border-radius:.5rem;background:var(--m-background);box-shadow:0 6px 20px var(--m-backdrop-shadow);font-size:.75rem;pointer-events:none}.m-section-chart__tip{top:0;margin-left:.875rem}.m-section-chart__tip--flip{transform:translate(calc(-100% - 1.75rem))}.m-section-chart__measure{bottom:2.25rem}.m-section-chart__measure--flip{transform:translate(-100%)}.m-section-chart__tip-title{color:var(--m-text-secondary);font-weight:600}.m-section-chart__tip-row{display:grid;grid-template-columns:.75rem auto 1fr auto;align-items:center;gap:.5rem}.m-section-chart__tip-value{color:var(--m-text);font-weight:650;font-variant-numeric:tabular-nums}.m-section-chart__tip-label{color:var(--m-text-secondary);white-space:nowrap}.m-section-chart__tip-sub{color:var(--m-text-tertiary);font-variant-numeric:tabular-nums}.m-section-chart__presets{--section-px: 0;margin-top:.5rem}.m-section-chart__preset{font-size:.8rem;font-weight:600;font-variant-numeric:tabular-nums}.m-section-chart__navigator{display:block;margin-top:.25rem;overflow:visible;touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer}.m-section-chart__navigator:focus{outline:none}.m-section-chart__navigator:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__nav-area{fill:var(--m-text-tertiary);opacity:.12}.m-section-chart__nav-line{fill:none;stroke:var(--m-text-tertiary);stroke-width:1.25}.m-section-chart__nav-dim{fill:var(--m-background);opacity:.6}.m-section-chart__nav-window{fill:transparent;stroke:var(--m-text-secondary);stroke-width:1;cursor:grab}.m-section-chart__nav-handle{fill:var(--m-text-secondary);cursor:ew-resize}.m-section-chart__table{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"]
|
|
19420
|
+
template: "<div class=\"m-section-chart__top\">\n <!-- Each series draws its own legend row: the row is the series' element,\n which is what the editor's Canvas selects it by. -->\n <div class=\"m-section-chart__legend\" role=\"list\">\n <ng-content />\n </div>\n @if (periodLabel(); as label) {\n <span class=\"m-section-chart__window\">{{ label }}</span>\n }\n</div>\n\n<div class=\"m-section-chart__plot\">\n <svg\n class=\"m-section-chart__svg\"\n role=\"img\"\n tabindex=\"0\"\n [class.is-measurable]=\"canMeasure()\"\n [attr.width]=\"width()\"\n [attr.height]=\"svgHeight()\"\n [attr.viewBox]=\"viewBox()\"\n [attr.aria-label]=\"windowLabel()\"\n [attr.aria-describedby]=\"tableId\"\n (pointerdown)=\"onPlotDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPlotUp()\"\n (pointercancel)=\"onPlotUp()\"\n (pointerleave)=\"clearHover()\"\n (blur)=\"clearHover()\"\n (keydown)=\"onKeydown($event)\"\n >\n @for (tick of yTicks(); track $index) {\n <svg:line\n class=\"m-section-chart__grid\"\n [class.m-section-chart__grid--zero]=\"tick.zero\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n />\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"end\"\n [attr.x]=\"left() - 8\"\n [attr.y]=\"tick.y + 4\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (!minimal()) {\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"bottom()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (tick of xTicks(); track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"bottom() + 18\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @if (measureView(); as band) {\n <svg:rect\n class=\"m-section-chart__band\"\n [attr.x]=\"band.start\"\n [attr.y]=\"top()\"\n [attr.width]=\"band.width\"\n [attr.height]=\"bottom() - top()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start\"\n [attr.x2]=\"band.start\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n <svg:line\n class=\"m-section-chart__band-edge\"\n [attr.x1]=\"band.start + band.width\"\n [attr.x2]=\"band.start + band.width\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @if (hover()?.band; as band) {\n <svg:rect\n class=\"m-section-chart__hover-band\"\n [attr.x]=\"band.x\"\n [attr.y]=\"top()\"\n [attr.width]=\"band.width\"\n [attr.height]=\"band.bottom - top()\"\n />\n }\n @if (categoryView(); as cat) {\n @for (column of cat.columns; track $index) {\n <svg:path\n class=\"m-section-chart__column\"\n [attr.d]=\"column.d\"\n [style.fill]=\"column.color\"\n />\n }\n @for (line of cat.lines; track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"line.d\"\n [style.stroke]=\"line.color\"\n />\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"line.endX\"\n [attr.cy]=\"line.endY\"\n [style.fill]=\"line.color\"\n />\n }\n @for (label of cat.labels; track $index) {\n <svg:text\n class=\"m-section-chart__value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\"\n >\n {{ label.text }}\n </svg:text>\n }\n @if (cat.strip; as strip) {\n @for (tick of strip.ticks; track $index) {\n <svg:line\n class=\"m-section-chart__grid\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"tick.y\"\n [attr.y2]=\"tick.y\"\n />\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"end\"\n [attr.x]=\"left() - 8\"\n [attr.y]=\"tick.y + 4\"\n >\n {{ tick.label }}\n </svg:text>\n }\n @for (line of strip.lines; track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"line.d\"\n [style.stroke]=\"line.color\"\n />\n @for (dot of line.dots; track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"dot.cx\"\n [attr.cy]=\"dot.cy\"\n [style.fill]=\"line.color\"\n />\n <svg:text\n class=\"m-section-chart__value\"\n text-anchor=\"middle\"\n [attr.x]=\"dot.cx\"\n [attr.y]=\"dot.cy - 9\"\n >\n {{ dot.text }}\n </svg:text>\n }\n }\n }\n }\n @for (path of paths(); track $index) {\n @if (path.area; as area) {\n <svg:defs>\n <svg:linearGradient [attr.id]=\"path.fillId\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <svg:stop offset=\"0\" stop-opacity=\"0.22\" [attr.stop-color]=\"path.color\" />\n <svg:stop offset=\"1\" stop-opacity=\"0\" [attr.stop-color]=\"path.color\" />\n </svg:linearGradient>\n </svg:defs>\n <svg:path class=\"m-section-chart__area\" [attr.d]=\"area\" [attr.fill]=\"path.fill\" />\n }\n }\n @for (path of paths(); track $index) {\n <svg:path\n class=\"m-section-chart__line\"\n [attr.d]=\"path.d\"\n [style.stroke]=\"path.color\"\n />\n }\n @if (!minimal()) {\n @for (path of paths(); track $index) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"path.endX\"\n [attr.cy]=\"path.endY\"\n [style.fill]=\"path.color\"\n />\n }\n }\n @if (hover(); as h) {\n @if (!h.band) {\n <svg:line\n class=\"m-section-chart__cross\"\n [attr.x1]=\"h.x\"\n [attr.x2]=\"h.x\"\n [attr.y1]=\"top()\"\n [attr.y2]=\"bottom()\"\n />\n }\n @for (row of h.rows; track $index) {\n @if (row.cx !== null) {\n <svg:circle\n class=\"m-section-chart__dot\"\n r=\"4\"\n [attr.cx]=\"row.cx\"\n [attr.cy]=\"row.cy\"\n [style.fill]=\"row.color\"\n />\n }\n }\n }\n </svg>\n\n @if (hover(); as h) {\n <div\n class=\"m-section-chart__tip\"\n role=\"status\"\n [class.m-section-chart__tip--flip]=\"h.flip\"\n [style.left.px]=\"h.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ h.title }}</span>\n @for (row of h.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n\n @if (measureView()?.card; as card) {\n <div\n class=\"m-section-chart__measure\"\n role=\"status\"\n [class.m-section-chart__measure--flip]=\"card.flip\"\n [style.left.px]=\"card.x\"\n >\n <span class=\"m-section-chart__tip-title\">{{ card.title }}</span>\n @for (row of card.rows; track $index) {\n <span class=\"m-section-chart__tip-row\">\n <span class=\"m-section-chart__tip-key\" [style.background]=\"row.color\"></span>\n <span class=\"m-section-chart__tip-value\">{{ row.value }}</span>\n <span class=\"m-section-chart__tip-label\">{{\n row.noTranslate ? row.label : (row.label | translate: row.params)\n }}</span>\n <span class=\"m-section-chart__tip-sub\">{{ row.sub }}</span>\n </span>\n }\n </div>\n }\n</div>\n\n@if (presets().length > 1 && !minimal() && !categorical()) {\n <div class=\"m-section-chart__presets\">\n <m-section-toggle\n [items]=\"presets()\"\n [selectedIndex]=\"presetIndex()\"\n [border]=\"false\"\n (action)=\"selectPreset($event)\"\n >\n <ng-template [mSectionToggleItem]=\"presets()\" let-preset>\n <span class=\"m-section-chart__preset\">{{ preset.label }}</span>\n </ng-template>\n </m-section-toggle>\n </div>\n}\n\n@if (navigatorView(); as nav) {\n <svg\n class=\"m-section-chart__navigator\"\n role=\"slider\"\n tabindex=\"0\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'zoom' | translate\"\n [attr.aria-valuenow]=\"nav.position\"\n [attr.aria-valuetext]=\"windowLabel()\"\n [attr.width]=\"width()\"\n [attr.height]=\"navHeight\"\n [attr.viewBox]=\"navViewBox()\"\n (pointerdown)=\"onNavigatorDown($event)\"\n (pointermove)=\"onNavigatorMove($event)\"\n (pointerup)=\"onNavigatorUp()\"\n (pointercancel)=\"onNavigatorUp()\"\n (keydown)=\"onNavigatorKeydown($event)\"\n >\n <svg:path class=\"m-section-chart__nav-area\" [attr.d]=\"nav.area\" />\n <svg:path class=\"m-section-chart__nav-line\" [attr.d]=\"nav.d\" />\n <svg:line\n class=\"m-section-chart__axis\"\n [attr.x1]=\"left()\"\n [attr.x2]=\"right()\"\n [attr.y1]=\"nav.base\"\n [attr.y2]=\"nav.base\"\n />\n @for (tick of nav.ticks; track $index) {\n <svg:text\n class=\"m-section-chart__tick\"\n text-anchor=\"middle\"\n [attr.x]=\"tick.x\"\n [attr.y]=\"nav.base + 15\"\n >\n {{ tick.label }}\n </svg:text>\n }\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"left()\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.start - left()\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-dim\"\n [attr.x]=\"nav.end\"\n [attr.y]=\"navTop\"\n [attr.width]=\"right() - nav.end\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-window\"\n [attr.x]=\"nav.start\"\n [attr.y]=\"navTop\"\n [attr.width]=\"nav.end - nav.start\"\n [attr.height]=\"nav.base - navTop\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.start - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n <svg:rect\n class=\"m-section-chart__nav-handle\"\n rx=\"2\"\n width=\"6\"\n height=\"20\"\n [attr.x]=\"nav.end - 3\"\n [attr.y]=\"(nav.base + navTop) / 2 - 10\"\n />\n </svg>\n}\n\n<table class=\"m-section-chart__table\" [id]=\"tableId\">\n <thead>\n <tr>\n <th scope=\"col\">{{ 'date' | translate }}</th>\n @for (column of table().columns; track $index) {\n <th scope=\"col\">\n {{ column.noTranslate ? column.label : (column.label | translate: column.params) }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of table().rows; track $index) {\n <tr>\n <td>{{ row.date }}</td>\n @for (cell of row.cells; track $index) {\n <td>{{ cell }}</td>\n }\n </tr>\n }\n </tbody>\n</table>\n",
|
|
19421
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;position:relative;width:100%;min-width:0}.m-section-chart__top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:.5rem 1rem;margin-bottom:.5rem}.m-section-chart__legend{display:grid;gap:.15rem;min-width:0}.m-section-chart__tip-key{display:inline-block;width:.75rem;height:2px;border-radius:1px}.m-section-chart__window{color:var(--m-text-tertiary);font-size:.8rem}:host(.m-section-chart--minimal) .m-section-chart__svg{cursor:default}:host(.m-section-chart--minimal) .m-section-chart__line{stroke-width:2.25}.m-section-chart__area{stroke:none}.m-section-chart__plot{position:relative}.m-section-chart__svg{display:block;overflow:visible}.m-section-chart__svg:focus{outline:none}.m-section-chart__svg:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__svg.is-measurable{cursor:crosshair;touch-action:none;-webkit-user-select:none;user-select:none}.m-section-chart__band{fill:var(--m-text);opacity:.06}.m-section-chart__band-edge{stroke:var(--m-text-secondary);stroke-width:1}.m-section-chart__grid{stroke:var(--m-text-septenary);stroke-width:1}.m-section-chart__grid--zero{stroke:var(--m-text-quinary);stroke-width:1.5}.m-section-chart__axis{stroke:var(--m-text-quinary);stroke-width:1}.m-section-chart__tick{fill:var(--m-text-tertiary);font-size:11px;font-variant-numeric:tabular-nums}.m-section-chart__line{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}.m-section-chart__dot{stroke:var(--m-background);stroke-width:2}.m-section-chart__cross{stroke:var(--m-text-secondary);stroke-width:1;opacity:.55}.m-section-chart__hover-band{fill:var(--m-text);opacity:.05}.m-section-chart__column{stroke:none}.m-section-chart__value{fill:var(--m-text-secondary);font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}.m-section-chart__tip,.m-section-chart__measure{position:absolute;z-index:2;display:grid;gap:.25rem;min-width:10rem;padding:.5rem .625rem;border:1px solid var(--m-backdrop-border);border-radius:.5rem;background:var(--m-background);box-shadow:0 6px 20px var(--m-backdrop-shadow);font-size:.75rem;pointer-events:none}.m-section-chart__tip{top:0;margin-left:.875rem}.m-section-chart__tip--flip{transform:translate(calc(-100% - 1.75rem))}.m-section-chart__measure{bottom:2.25rem}.m-section-chart__measure--flip{transform:translate(-100%)}.m-section-chart__tip-title{color:var(--m-text-secondary);font-weight:600}.m-section-chart__tip-row{display:grid;grid-template-columns:.75rem auto 1fr auto;align-items:center;gap:.5rem}.m-section-chart__tip-value{color:var(--m-text);font-weight:650;font-variant-numeric:tabular-nums}.m-section-chart__tip-label{color:var(--m-text-secondary);white-space:nowrap}.m-section-chart__tip-sub{color:var(--m-text-tertiary);font-variant-numeric:tabular-nums}.m-section-chart__presets{--section-px: 0;margin-top:.5rem}.m-section-chart__preset{font-size:.8rem;font-weight:600;font-variant-numeric:tabular-nums}.m-section-chart__navigator{display:block;margin-top:.25rem;overflow:visible;touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer}.m-section-chart__navigator:focus{outline:none}.m-section-chart__navigator:focus-visible{outline:2px solid var(--m-focus);outline-offset:4px;border-radius:4px}.m-section-chart__nav-area{fill:var(--m-text-tertiary);opacity:.12}.m-section-chart__nav-line{fill:none;stroke:var(--m-text-tertiary);stroke-width:1.25}.m-section-chart__nav-dim{fill:var(--m-background);opacity:.6}.m-section-chart__nav-window{fill:transparent;stroke:var(--m-text-secondary);stroke-width:1;cursor:grab}.m-section-chart__nav-handle{fill:var(--m-text-secondary);cursor:ew-resize}.m-section-chart__table{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"]
|
|
19050
19422
|
}]
|
|
19051
19423
|
}],
|
|
19052
19424
|
ctorParameters: () => [],
|
|
@@ -19131,7 +19503,12 @@ var SectionChartSeriesComponent = class SectionChartSeriesComponent {
|
|
|
19131
19503
|
noTranslate = input(false, ...ngDevMode ? [{ debugName: "noTranslate" }] : /* istanbul ignore next */ []);
|
|
19132
19504
|
params = input(void 0, ...ngDevMode ? [{ debugName: "params" }] : /* istanbul ignore next */ []);
|
|
19133
19505
|
color = input(void 0, ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
|
|
19134
|
-
|
|
19506
|
+
mark = input("line", ...ngDevMode ? [{ debugName: "mark" }] : /* istanbul ignore next */ []);
|
|
19507
|
+
per = input(void 0, ...ngDevMode ? [{ debugName: "per" }] : /* istanbul ignore next */ []);
|
|
19508
|
+
panel = input("main", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
|
|
19509
|
+
points = computed(() => readChartPoints(this.data(), this.x(), this.y(), this.per()), ...ngDevMode ? [{ debugName: "points" }] : /* istanbul ignore next */ []);
|
|
19510
|
+
categories = computed(() => readChartCategories(this.data(), this.x(), this.y(), this.per()), ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
|
|
19511
|
+
ratio = computed(() => !!this.per(), ...ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []);
|
|
19135
19512
|
row;
|
|
19136
19513
|
constructor() {
|
|
19137
19514
|
const chart = inject(SECTION_CHART_CONTEXT, { optional: true });
|
|
@@ -19141,6 +19518,10 @@ var SectionChartSeriesComponent = class SectionChartSeriesComponent {
|
|
|
19141
19518
|
}
|
|
19142
19519
|
const member = {
|
|
19143
19520
|
points: this.points,
|
|
19521
|
+
categories: this.categories,
|
|
19522
|
+
mark: this.mark,
|
|
19523
|
+
panel: this.panel,
|
|
19524
|
+
ratio: this.ratio,
|
|
19144
19525
|
label: this.label,
|
|
19145
19526
|
noTranslate: this.noTranslate,
|
|
19146
19527
|
params: this.params,
|
|
@@ -19213,6 +19594,27 @@ var SectionChartSeriesComponent = class SectionChartSeriesComponent {
|
|
|
19213
19594
|
isSignal: true,
|
|
19214
19595
|
isRequired: false,
|
|
19215
19596
|
transformFunction: null
|
|
19597
|
+
},
|
|
19598
|
+
mark: {
|
|
19599
|
+
classPropertyName: "mark",
|
|
19600
|
+
publicName: "mark",
|
|
19601
|
+
isSignal: true,
|
|
19602
|
+
isRequired: false,
|
|
19603
|
+
transformFunction: null
|
|
19604
|
+
},
|
|
19605
|
+
per: {
|
|
19606
|
+
classPropertyName: "per",
|
|
19607
|
+
publicName: "per",
|
|
19608
|
+
isSignal: true,
|
|
19609
|
+
isRequired: false,
|
|
19610
|
+
transformFunction: null
|
|
19611
|
+
},
|
|
19612
|
+
panel: {
|
|
19613
|
+
classPropertyName: "panel",
|
|
19614
|
+
publicName: "panel",
|
|
19615
|
+
isSignal: true,
|
|
19616
|
+
isRequired: false,
|
|
19617
|
+
transformFunction: null
|
|
19216
19618
|
}
|
|
19217
19619
|
},
|
|
19218
19620
|
host: {
|
|
@@ -19341,6 +19743,30 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
19341
19743
|
alias: "color",
|
|
19342
19744
|
required: false
|
|
19343
19745
|
}]
|
|
19746
|
+
}],
|
|
19747
|
+
mark: [{
|
|
19748
|
+
type: i0.Input,
|
|
19749
|
+
args: [{
|
|
19750
|
+
isSignal: true,
|
|
19751
|
+
alias: "mark",
|
|
19752
|
+
required: false
|
|
19753
|
+
}]
|
|
19754
|
+
}],
|
|
19755
|
+
per: [{
|
|
19756
|
+
type: i0.Input,
|
|
19757
|
+
args: [{
|
|
19758
|
+
isSignal: true,
|
|
19759
|
+
alias: "per",
|
|
19760
|
+
required: false
|
|
19761
|
+
}]
|
|
19762
|
+
}],
|
|
19763
|
+
panel: [{
|
|
19764
|
+
type: i0.Input,
|
|
19765
|
+
args: [{
|
|
19766
|
+
isSignal: true,
|
|
19767
|
+
alias: "panel",
|
|
19768
|
+
required: false
|
|
19769
|
+
}]
|
|
19344
19770
|
}]
|
|
19345
19771
|
}
|
|
19346
19772
|
});
|
|
@@ -34286,6 +34712,1025 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
34286
34712
|
}]
|
|
34287
34713
|
}
|
|
34288
34714
|
});
|
|
34715
|
+
const gapPct = (level, value) => (level / value - 1) * 100;
|
|
34716
|
+
const formatGap = (gap) => `${gap > 0 ? "+" : gap < 0 ? "−" : ""}${Math.abs(gap).toFixed(1)}%`;
|
|
34717
|
+
const PAD = .04;
|
|
34718
|
+
const ladderScale = ({ value, levels, forward = [], maxSpanPct }) => {
|
|
34719
|
+
const within = (v) => Math.abs(gapPct(v, value)) <= maxSpanPct;
|
|
34720
|
+
const values = [
|
|
34721
|
+
value,
|
|
34722
|
+
...levels,
|
|
34723
|
+
...forward.filter(within)
|
|
34724
|
+
];
|
|
34725
|
+
const min = Math.min(...values);
|
|
34726
|
+
const max = Math.max(...values);
|
|
34727
|
+
const span = max - min || Math.abs(max) * .02 || 1;
|
|
34728
|
+
const lo = max === min ? min - span / 2 : min - span * PAD;
|
|
34729
|
+
const width = max === min ? span : span * 1.08;
|
|
34730
|
+
const pos = (v) => (v - lo) / width * 100;
|
|
34731
|
+
return {
|
|
34732
|
+
pos,
|
|
34733
|
+
within,
|
|
34734
|
+
clamp: (v) => Math.max(0, Math.min(100, pos(v)))
|
|
34735
|
+
};
|
|
34736
|
+
};
|
|
34737
|
+
const layoutLanes = (items, minGapPx) => {
|
|
34738
|
+
const labels = [];
|
|
34739
|
+
const last = [null, null];
|
|
34740
|
+
for (const item of [...items].sort((a, b) => a.x - b.x)) {
|
|
34741
|
+
const lane = [0, 1].find((l) => !last[l] || item.x - last[l].x >= minGapPx);
|
|
34742
|
+
if (lane !== void 0) {
|
|
34743
|
+
const label = {
|
|
34744
|
+
lane,
|
|
34745
|
+
x: item.x,
|
|
34746
|
+
keys: [item.key]
|
|
34747
|
+
};
|
|
34748
|
+
labels.push(label);
|
|
34749
|
+
last[lane] = label;
|
|
34750
|
+
continue;
|
|
34751
|
+
}
|
|
34752
|
+
const [a, b] = last;
|
|
34753
|
+
(Math.abs(a.x - item.x) <= Math.abs(b.x - item.x) ? a : b).keys.push(item.key);
|
|
34754
|
+
}
|
|
34755
|
+
return labels;
|
|
34756
|
+
};
|
|
34757
|
+
const PRICE_LADDER_RULES = [
|
|
34758
|
+
"golden-cross",
|
|
34759
|
+
"death-cross",
|
|
34760
|
+
"death-cross-near",
|
|
34761
|
+
"golden-cross-near",
|
|
34762
|
+
"bullish-alignment",
|
|
34763
|
+
"bearish-alignment",
|
|
34764
|
+
"strongly-bullish",
|
|
34765
|
+
"bullish-support",
|
|
34766
|
+
"recovering",
|
|
34767
|
+
"bearish-pressure",
|
|
34768
|
+
"stretched",
|
|
34769
|
+
"far-below-sma-200",
|
|
34770
|
+
"averages-converging",
|
|
34771
|
+
"52w-breakout",
|
|
34772
|
+
"near-52w-high",
|
|
34773
|
+
"new-52w-low",
|
|
34774
|
+
"near-52w-low",
|
|
34775
|
+
"forecast-against-trend",
|
|
34776
|
+
"forecast-above-52w-high"
|
|
34777
|
+
];
|
|
34778
|
+
const CROSS_NEAR_PCT = 1;
|
|
34779
|
+
const STRETCHED_PCT = 20;
|
|
34780
|
+
const SQUEEZE_PCT = 3;
|
|
34781
|
+
const NEAR_BOUND_PCT = 3;
|
|
34782
|
+
const usable = (v) => typeof v === "number" && Number.isFinite(v) && v > 0;
|
|
34783
|
+
const ladderSignals = (levels, symbol = "₹") => {
|
|
34784
|
+
const { value: v, sma10: s10, sma50: s50, sma100: s100, sma200: s200, low52w: lo, high52w: hi } = levels;
|
|
34785
|
+
if (!usable(v)) return [];
|
|
34786
|
+
const money = (n) => `${symbol}${n.toLocaleString("en-IN", { maximumFractionDigits: 2 })}`;
|
|
34787
|
+
const out = [];
|
|
34788
|
+
const add = (rule, tone, params = {}) => out.push({
|
|
34789
|
+
rule,
|
|
34790
|
+
tone,
|
|
34791
|
+
params
|
|
34792
|
+
});
|
|
34793
|
+
if (usable(s50) && usable(s200)) {
|
|
34794
|
+
const gap = gapPct(s50, s200);
|
|
34795
|
+
if (gap >= 0) add("golden-cross", "gold", { gap: formatGap(gap) });
|
|
34796
|
+
else add("death-cross", "down", { gap: formatGap(gap) });
|
|
34797
|
+
if (Math.abs(gap) < CROSS_NEAR_PCT) add(gap >= 0 ? "death-cross-near" : "golden-cross-near", "warn", { gap: formatGap(Math.abs(gap)) });
|
|
34798
|
+
}
|
|
34799
|
+
const stack = [
|
|
34800
|
+
v,
|
|
34801
|
+
s10,
|
|
34802
|
+
s50,
|
|
34803
|
+
s100,
|
|
34804
|
+
s200
|
|
34805
|
+
];
|
|
34806
|
+
if (stack.every(usable)) {
|
|
34807
|
+
const nums = stack;
|
|
34808
|
+
if (nums.every((x, i) => i === 0 || nums[i - 1] > x)) add("bullish-alignment", "up");
|
|
34809
|
+
else if (nums.every((x, i) => i === 0 || nums[i - 1] < x)) add("bearish-alignment", "down");
|
|
34810
|
+
}
|
|
34811
|
+
if (usable(s50) && usable(s200)) {
|
|
34812
|
+
const above50 = v > s50;
|
|
34813
|
+
const above200 = v > s200;
|
|
34814
|
+
if (above50 && above200) add("strongly-bullish", "up");
|
|
34815
|
+
else if (above200) add("bullish-support", "up");
|
|
34816
|
+
else if (above50) add("recovering", "neutral");
|
|
34817
|
+
else add("bearish-pressure", "down");
|
|
34818
|
+
}
|
|
34819
|
+
if (usable(s200)) {
|
|
34820
|
+
const gap = gapPct(v, s200);
|
|
34821
|
+
if (gap > STRETCHED_PCT) add("stretched", "warn", { gap: formatGap(gap) });
|
|
34822
|
+
if (gap < -20) add("far-below-sma-200", "down", { gap: formatGap(gap) });
|
|
34823
|
+
}
|
|
34824
|
+
const smas = [
|
|
34825
|
+
s10,
|
|
34826
|
+
s50,
|
|
34827
|
+
s100,
|
|
34828
|
+
s200
|
|
34829
|
+
].filter(usable);
|
|
34830
|
+
if (smas.length >= 3) {
|
|
34831
|
+
const spread = gapPct(Math.max(...smas), Math.min(...smas));
|
|
34832
|
+
if (spread < SQUEEZE_PCT) add("averages-converging", "warn", { spread: `${spread.toFixed(1)}%` });
|
|
34833
|
+
}
|
|
34834
|
+
if (usable(lo) && usable(hi)) {
|
|
34835
|
+
if (v >= hi) add("52w-breakout", "up", { level: money(hi) });
|
|
34836
|
+
else if (gapPct(hi, v) < NEAR_BOUND_PCT) add("near-52w-high", "up", {
|
|
34837
|
+
gap: formatGap(gapPct(hi, v)),
|
|
34838
|
+
level: money(hi)
|
|
34839
|
+
});
|
|
34840
|
+
if (v <= lo) add("new-52w-low", "down", { level: money(lo) });
|
|
34841
|
+
else if (gapPct(v, lo) < NEAR_BOUND_PCT) add("near-52w-low", "down", {
|
|
34842
|
+
gap: formatGap(gapPct(v, lo)),
|
|
34843
|
+
level: money(lo)
|
|
34844
|
+
});
|
|
34845
|
+
}
|
|
34846
|
+
const target = levels.target;
|
|
34847
|
+
if (usable(target)) {
|
|
34848
|
+
const gap = gapPct(target, v);
|
|
34849
|
+
const has = (...rules) => out.some((s) => rules.includes(s.rule));
|
|
34850
|
+
if (gap > 0 && has("death-cross", "bearish-alignment") || gap < 0 && has("golden-cross", "bullish-alignment")) add("forecast-against-trend", "warn", { gap: formatGap(gap) });
|
|
34851
|
+
if (usable(hi) && target > hi) add("forecast-above-52w-high", "neutral", { level: money(hi) });
|
|
34852
|
+
}
|
|
34853
|
+
return out;
|
|
34854
|
+
};
|
|
34855
|
+
const isLadderRule = (name) => PRICE_LADDER_RULES.includes(name);
|
|
34856
|
+
const PRICE_LADDER_LEVELS = [
|
|
34857
|
+
{
|
|
34858
|
+
key: "sma10",
|
|
34859
|
+
label: "sma-10",
|
|
34860
|
+
kind: "level",
|
|
34861
|
+
rank: 1
|
|
34862
|
+
},
|
|
34863
|
+
{
|
|
34864
|
+
key: "sma50",
|
|
34865
|
+
label: "sma-50",
|
|
34866
|
+
kind: "level",
|
|
34867
|
+
rank: 2
|
|
34868
|
+
},
|
|
34869
|
+
{
|
|
34870
|
+
key: "sma100",
|
|
34871
|
+
label: "sma-100",
|
|
34872
|
+
kind: "level",
|
|
34873
|
+
rank: 3
|
|
34874
|
+
},
|
|
34875
|
+
{
|
|
34876
|
+
key: "sma200",
|
|
34877
|
+
label: "sma-200",
|
|
34878
|
+
kind: "level",
|
|
34879
|
+
rank: 4
|
|
34880
|
+
},
|
|
34881
|
+
{
|
|
34882
|
+
key: "ema10",
|
|
34883
|
+
label: "ema-10",
|
|
34884
|
+
kind: "level",
|
|
34885
|
+
rank: 1
|
|
34886
|
+
},
|
|
34887
|
+
{
|
|
34888
|
+
key: "ema50",
|
|
34889
|
+
label: "ema-50",
|
|
34890
|
+
kind: "level",
|
|
34891
|
+
rank: 2
|
|
34892
|
+
},
|
|
34893
|
+
{
|
|
34894
|
+
key: "ema100",
|
|
34895
|
+
label: "ema-100",
|
|
34896
|
+
kind: "level",
|
|
34897
|
+
rank: 3
|
|
34898
|
+
},
|
|
34899
|
+
{
|
|
34900
|
+
key: "ema200",
|
|
34901
|
+
label: "ema-200",
|
|
34902
|
+
kind: "level",
|
|
34903
|
+
rank: 4
|
|
34904
|
+
},
|
|
34905
|
+
{
|
|
34906
|
+
key: "low52w",
|
|
34907
|
+
label: "52w-low",
|
|
34908
|
+
kind: "bound",
|
|
34909
|
+
rank: 1
|
|
34910
|
+
},
|
|
34911
|
+
{
|
|
34912
|
+
key: "high52w",
|
|
34913
|
+
label: "52w-high",
|
|
34914
|
+
kind: "bound",
|
|
34915
|
+
rank: 1
|
|
34916
|
+
},
|
|
34917
|
+
{
|
|
34918
|
+
key: "current",
|
|
34919
|
+
label: "current-price",
|
|
34920
|
+
kind: "current",
|
|
34921
|
+
rank: 1
|
|
34922
|
+
},
|
|
34923
|
+
{
|
|
34924
|
+
key: "forecast",
|
|
34925
|
+
label: "model-forecast",
|
|
34926
|
+
kind: "forecast",
|
|
34927
|
+
rank: 1
|
|
34928
|
+
}
|
|
34929
|
+
];
|
|
34930
|
+
const ladderLevelOf = (key) => PRICE_LADDER_LEVELS.find((l) => l.key === key);
|
|
34931
|
+
var PriceLadderMarkComponent = class PriceLadderMarkComponent {
|
|
34932
|
+
key = input("", ...ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []);
|
|
34933
|
+
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
34934
|
+
value = input(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
34935
|
+
kind = input(void 0, ...ngDevMode ? [{ debugName: "kind" }] : /* istanbul ignore next */ []);
|
|
34936
|
+
rank = input(void 0, ...ngDevMode ? [{ debugName: "rank" }] : /* istanbul ignore next */ []);
|
|
34937
|
+
note = input(void 0, ...ngDevMode ? [{ debugName: "note" }] : /* istanbul ignore next */ []);
|
|
34938
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
34939
|
+
minVersion: "12.0.0",
|
|
34940
|
+
version: "22.2.1",
|
|
34941
|
+
ngImport: i0,
|
|
34942
|
+
type: PriceLadderMarkComponent,
|
|
34943
|
+
deps: [],
|
|
34944
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
34945
|
+
});
|
|
34946
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
34947
|
+
minVersion: "17.1.0",
|
|
34948
|
+
version: "22.2.1",
|
|
34949
|
+
type: PriceLadderMarkComponent,
|
|
34950
|
+
isStandalone: true,
|
|
34951
|
+
selector: "m-price-ladder-mark",
|
|
34952
|
+
inputs: {
|
|
34953
|
+
key: {
|
|
34954
|
+
classPropertyName: "key",
|
|
34955
|
+
publicName: "key",
|
|
34956
|
+
isSignal: true,
|
|
34957
|
+
isRequired: false,
|
|
34958
|
+
transformFunction: null
|
|
34959
|
+
},
|
|
34960
|
+
label: {
|
|
34961
|
+
classPropertyName: "label",
|
|
34962
|
+
publicName: "label",
|
|
34963
|
+
isSignal: true,
|
|
34964
|
+
isRequired: false,
|
|
34965
|
+
transformFunction: null
|
|
34966
|
+
},
|
|
34967
|
+
value: {
|
|
34968
|
+
classPropertyName: "value",
|
|
34969
|
+
publicName: "value",
|
|
34970
|
+
isSignal: true,
|
|
34971
|
+
isRequired: false,
|
|
34972
|
+
transformFunction: null
|
|
34973
|
+
},
|
|
34974
|
+
kind: {
|
|
34975
|
+
classPropertyName: "kind",
|
|
34976
|
+
publicName: "kind",
|
|
34977
|
+
isSignal: true,
|
|
34978
|
+
isRequired: false,
|
|
34979
|
+
transformFunction: null
|
|
34980
|
+
},
|
|
34981
|
+
rank: {
|
|
34982
|
+
classPropertyName: "rank",
|
|
34983
|
+
publicName: "rank",
|
|
34984
|
+
isSignal: true,
|
|
34985
|
+
isRequired: false,
|
|
34986
|
+
transformFunction: null
|
|
34987
|
+
},
|
|
34988
|
+
note: {
|
|
34989
|
+
classPropertyName: "note",
|
|
34990
|
+
publicName: "note",
|
|
34991
|
+
isSignal: true,
|
|
34992
|
+
isRequired: false,
|
|
34993
|
+
transformFunction: null
|
|
34994
|
+
}
|
|
34995
|
+
},
|
|
34996
|
+
host: { styleAttribute: "display: none" },
|
|
34997
|
+
ngImport: i0,
|
|
34998
|
+
template: "",
|
|
34999
|
+
isInline: true,
|
|
35000
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
35001
|
+
});
|
|
35002
|
+
};
|
|
35003
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
35004
|
+
minVersion: "12.0.0",
|
|
35005
|
+
version: "22.2.1",
|
|
35006
|
+
ngImport: i0,
|
|
35007
|
+
type: PriceLadderMarkComponent,
|
|
35008
|
+
decorators: [{
|
|
35009
|
+
type: Component,
|
|
35010
|
+
args: [{
|
|
35011
|
+
selector: "m-price-ladder-mark",
|
|
35012
|
+
template: "",
|
|
35013
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35014
|
+
host: { style: "display: none" }
|
|
35015
|
+
}]
|
|
35016
|
+
}],
|
|
35017
|
+
propDecorators: {
|
|
35018
|
+
key: [{
|
|
35019
|
+
type: i0.Input,
|
|
35020
|
+
args: [{
|
|
35021
|
+
isSignal: true,
|
|
35022
|
+
alias: "key",
|
|
35023
|
+
required: false
|
|
35024
|
+
}]
|
|
35025
|
+
}],
|
|
35026
|
+
label: [{
|
|
35027
|
+
type: i0.Input,
|
|
35028
|
+
args: [{
|
|
35029
|
+
isSignal: true,
|
|
35030
|
+
alias: "label",
|
|
35031
|
+
required: false
|
|
35032
|
+
}]
|
|
35033
|
+
}],
|
|
35034
|
+
value: [{
|
|
35035
|
+
type: i0.Input,
|
|
35036
|
+
args: [{
|
|
35037
|
+
isSignal: true,
|
|
35038
|
+
alias: "value",
|
|
35039
|
+
required: false
|
|
35040
|
+
}]
|
|
35041
|
+
}],
|
|
35042
|
+
kind: [{
|
|
35043
|
+
type: i0.Input,
|
|
35044
|
+
args: [{
|
|
35045
|
+
isSignal: true,
|
|
35046
|
+
alias: "kind",
|
|
35047
|
+
required: false
|
|
35048
|
+
}]
|
|
35049
|
+
}],
|
|
35050
|
+
rank: [{
|
|
35051
|
+
type: i0.Input,
|
|
35052
|
+
args: [{
|
|
35053
|
+
isSignal: true,
|
|
35054
|
+
alias: "rank",
|
|
35055
|
+
required: false
|
|
35056
|
+
}]
|
|
35057
|
+
}],
|
|
35058
|
+
note: [{
|
|
35059
|
+
type: i0.Input,
|
|
35060
|
+
args: [{
|
|
35061
|
+
isSignal: true,
|
|
35062
|
+
alias: "note",
|
|
35063
|
+
required: false
|
|
35064
|
+
}]
|
|
35065
|
+
}]
|
|
35066
|
+
}
|
|
35067
|
+
});
|
|
35068
|
+
var PriceLadderSignalComponent = class PriceLadderSignalComponent {
|
|
35069
|
+
key = input("", ...ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []);
|
|
35070
|
+
rule = input(void 0, ...ngDevMode ? [{ debugName: "rule" }] : /* istanbul ignore next */ []);
|
|
35071
|
+
label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
35072
|
+
tone = input("neutral", ...ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []);
|
|
35073
|
+
detail = input("", ...ngDevMode ? [{ debugName: "detail" }] : /* istanbul ignore next */ []);
|
|
35074
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
35075
|
+
minVersion: "12.0.0",
|
|
35076
|
+
version: "22.2.1",
|
|
35077
|
+
ngImport: i0,
|
|
35078
|
+
type: PriceLadderSignalComponent,
|
|
35079
|
+
deps: [],
|
|
35080
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
35081
|
+
});
|
|
35082
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
35083
|
+
minVersion: "17.1.0",
|
|
35084
|
+
version: "22.2.1",
|
|
35085
|
+
type: PriceLadderSignalComponent,
|
|
35086
|
+
isStandalone: true,
|
|
35087
|
+
selector: "m-price-ladder-signal",
|
|
35088
|
+
inputs: {
|
|
35089
|
+
key: {
|
|
35090
|
+
classPropertyName: "key",
|
|
35091
|
+
publicName: "key",
|
|
35092
|
+
isSignal: true,
|
|
35093
|
+
isRequired: false,
|
|
35094
|
+
transformFunction: null
|
|
35095
|
+
},
|
|
35096
|
+
rule: {
|
|
35097
|
+
classPropertyName: "rule",
|
|
35098
|
+
publicName: "rule",
|
|
35099
|
+
isSignal: true,
|
|
35100
|
+
isRequired: false,
|
|
35101
|
+
transformFunction: null
|
|
35102
|
+
},
|
|
35103
|
+
label: {
|
|
35104
|
+
classPropertyName: "label",
|
|
35105
|
+
publicName: "label",
|
|
35106
|
+
isSignal: true,
|
|
35107
|
+
isRequired: false,
|
|
35108
|
+
transformFunction: null
|
|
35109
|
+
},
|
|
35110
|
+
tone: {
|
|
35111
|
+
classPropertyName: "tone",
|
|
35112
|
+
publicName: "tone",
|
|
35113
|
+
isSignal: true,
|
|
35114
|
+
isRequired: false,
|
|
35115
|
+
transformFunction: null
|
|
35116
|
+
},
|
|
35117
|
+
detail: {
|
|
35118
|
+
classPropertyName: "detail",
|
|
35119
|
+
publicName: "detail",
|
|
35120
|
+
isSignal: true,
|
|
35121
|
+
isRequired: false,
|
|
35122
|
+
transformFunction: null
|
|
35123
|
+
}
|
|
35124
|
+
},
|
|
35125
|
+
host: { styleAttribute: "display: none" },
|
|
35126
|
+
ngImport: i0,
|
|
35127
|
+
template: "",
|
|
35128
|
+
isInline: true,
|
|
35129
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
35130
|
+
});
|
|
35131
|
+
};
|
|
35132
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
35133
|
+
minVersion: "12.0.0",
|
|
35134
|
+
version: "22.2.1",
|
|
35135
|
+
ngImport: i0,
|
|
35136
|
+
type: PriceLadderSignalComponent,
|
|
35137
|
+
decorators: [{
|
|
35138
|
+
type: Component,
|
|
35139
|
+
args: [{
|
|
35140
|
+
selector: "m-price-ladder-signal",
|
|
35141
|
+
template: "",
|
|
35142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35143
|
+
host: { style: "display: none" }
|
|
35144
|
+
}]
|
|
35145
|
+
}],
|
|
35146
|
+
propDecorators: {
|
|
35147
|
+
key: [{
|
|
35148
|
+
type: i0.Input,
|
|
35149
|
+
args: [{
|
|
35150
|
+
isSignal: true,
|
|
35151
|
+
alias: "key",
|
|
35152
|
+
required: false
|
|
35153
|
+
}]
|
|
35154
|
+
}],
|
|
35155
|
+
rule: [{
|
|
35156
|
+
type: i0.Input,
|
|
35157
|
+
args: [{
|
|
35158
|
+
isSignal: true,
|
|
35159
|
+
alias: "rule",
|
|
35160
|
+
required: false
|
|
35161
|
+
}]
|
|
35162
|
+
}],
|
|
35163
|
+
label: [{
|
|
35164
|
+
type: i0.Input,
|
|
35165
|
+
args: [{
|
|
35166
|
+
isSignal: true,
|
|
35167
|
+
alias: "label",
|
|
35168
|
+
required: false
|
|
35169
|
+
}]
|
|
35170
|
+
}],
|
|
35171
|
+
tone: [{
|
|
35172
|
+
type: i0.Input,
|
|
35173
|
+
args: [{
|
|
35174
|
+
isSignal: true,
|
|
35175
|
+
alias: "tone",
|
|
35176
|
+
required: false
|
|
35177
|
+
}]
|
|
35178
|
+
}],
|
|
35179
|
+
detail: [{
|
|
35180
|
+
type: i0.Input,
|
|
35181
|
+
args: [{
|
|
35182
|
+
isSignal: true,
|
|
35183
|
+
alias: "detail",
|
|
35184
|
+
required: false
|
|
35185
|
+
}]
|
|
35186
|
+
}]
|
|
35187
|
+
}
|
|
35188
|
+
});
|
|
35189
|
+
const LIST_BELOW_PX = 360;
|
|
35190
|
+
const FALLBACK_PX = 640;
|
|
35191
|
+
const LABEL_GAP_PX = 64;
|
|
35192
|
+
const price = (v) => typeof v === "number" && Number.isFinite(v) && v > 0 ? v : null;
|
|
35193
|
+
var PriceLadderComponent = class PriceLadderComponent {
|
|
35194
|
+
value = input(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
35195
|
+
valueLabel = input("current-price", ...ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []);
|
|
35196
|
+
target = input(null, ...ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []);
|
|
35197
|
+
targetLow = input(null, ...ngDevMode ? [{ debugName: "targetLow" }] : /* istanbul ignore next */ []);
|
|
35198
|
+
targetHigh = input(null, ...ngDevMode ? [{ debugName: "targetHigh" }] : /* istanbul ignore next */ []);
|
|
35199
|
+
targetLabel = input("model-forecast", ...ngDevMode ? [{ debugName: "targetLabel" }] : /* istanbul ignore next */ []);
|
|
35200
|
+
targetNote = input("", ...ngDevMode ? [{ debugName: "targetNote" }] : /* istanbul ignore next */ []);
|
|
35201
|
+
maxSpanPct = input(60, ...ngDevMode ? [{ debugName: "maxSpanPct" }] : /* istanbul ignore next */ []);
|
|
35202
|
+
variant = input("auto", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
35203
|
+
symbol = input("₹", ...ngDevMode ? [{ debugName: "symbol" }] : /* istanbul ignore next */ []);
|
|
35204
|
+
signals = input(void 0, ...ngDevMode ? [{ debugName: "signals" }] : /* istanbul ignore next */ []);
|
|
35205
|
+
crossFrom = input(void 0, ...ngDevMode ? [{ debugName: "crossFrom" }] : /* istanbul ignore next */ []);
|
|
35206
|
+
crossTo = input(void 0, ...ngDevMode ? [{ debugName: "crossTo" }] : /* istanbul ignore next */ []);
|
|
35207
|
+
crossTone = input("neutral", ...ngDevMode ? [{ debugName: "crossTone" }] : /* istanbul ignore next */ []);
|
|
35208
|
+
markTags = contentChildren(PriceLadderMarkComponent, ...ngDevMode ? [{ debugName: "markTags" }] : /* istanbul ignore next */ []);
|
|
35209
|
+
signalTags = contentChildren(PriceLadderSignalComponent, ...ngDevMode ? [{ debugName: "signalTags" }] : /* istanbul ignore next */ []);
|
|
35210
|
+
translateService = inject(TranslateService);
|
|
35211
|
+
width = signal(0, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
35212
|
+
constructor() {
|
|
35213
|
+
const host = inject(ElementRef).nativeElement;
|
|
35214
|
+
const destroyRef = inject(DestroyRef);
|
|
35215
|
+
afterNextRender(() => {
|
|
35216
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
35217
|
+
const observer = new ResizeObserver(([entry]) => this.width.set(entry.contentRect.width));
|
|
35218
|
+
observer.observe(host);
|
|
35219
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
35220
|
+
});
|
|
35221
|
+
}
|
|
35222
|
+
t = (key) => this.translateService.translate(key);
|
|
35223
|
+
money = (v) => `${this.symbol()}${v.toLocaleString("en-IN", { maximumFractionDigits: 2 })}`;
|
|
35224
|
+
anchor = (kind) => this.everyMark().find((m) => m.kind === kind)?.value ?? null;
|
|
35225
|
+
current = computed(() => this.anchor("current") ?? price(this.value()), ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
|
|
35226
|
+
targetPoint = computed(() => this.anchor("forecast") ?? price(this.target()), ...ngDevMode ? [{ debugName: "targetPoint" }] : /* istanbul ignore next */ []);
|
|
35227
|
+
shownAs = computed(() => {
|
|
35228
|
+
const variant = this.variant();
|
|
35229
|
+
if (variant !== "auto") return variant;
|
|
35230
|
+
const w = this.width();
|
|
35231
|
+
return w > 0 && w < LIST_BELOW_PX ? "list" : "line";
|
|
35232
|
+
}, ...ngDevMode ? [{ debugName: "shownAs" }] : /* istanbul ignore next */ []);
|
|
35233
|
+
everyMark = computed(() => this.markTags().flatMap((tag) => {
|
|
35234
|
+
const value = price(tag.value());
|
|
35235
|
+
if (value === null) return [];
|
|
35236
|
+
const level = ladderLevelOf(tag.key());
|
|
35237
|
+
const note = tag.note();
|
|
35238
|
+
const name = this.t(tag.label() || level?.label || "");
|
|
35239
|
+
return [{
|
|
35240
|
+
key: tag.key(),
|
|
35241
|
+
name: note ? `${name} · ${this.t(note)}` : name,
|
|
35242
|
+
value,
|
|
35243
|
+
kind: tag.kind() ?? level?.kind ?? "level",
|
|
35244
|
+
rank: Math.min(4, Math.max(1, tag.rank() ?? level?.rank ?? 1))
|
|
35245
|
+
}];
|
|
35246
|
+
}), ...ngDevMode ? [{ debugName: "everyMark" }] : /* istanbul ignore next */ []);
|
|
35247
|
+
marks = computed(() => this.everyMark().filter((m) => m.kind === "level" || m.kind === "bound"), ...ngDevMode ? [{ debugName: "marks" }] : /* istanbul ignore next */ []);
|
|
35248
|
+
matched = computed(() => {
|
|
35249
|
+
const value = this.current();
|
|
35250
|
+
if (value === null) return /* @__PURE__ */ new Map();
|
|
35251
|
+
const at = (key) => this.marks().find((m) => m.key === key)?.value;
|
|
35252
|
+
const found = ladderSignals({
|
|
35253
|
+
value,
|
|
35254
|
+
target: this.targetPoint(),
|
|
35255
|
+
sma10: at("sma10"),
|
|
35256
|
+
sma50: at("sma50"),
|
|
35257
|
+
sma100: at("sma100"),
|
|
35258
|
+
sma200: at("sma200"),
|
|
35259
|
+
low52w: at("low52w"),
|
|
35260
|
+
high52w: at("high52w")
|
|
35261
|
+
}, this.symbol());
|
|
35262
|
+
return new Map(found.map((s) => [s.rule, s]));
|
|
35263
|
+
}, ...ngDevMode ? [{ debugName: "matched" }] : /* istanbul ignore next */ []);
|
|
35264
|
+
picked = computed(() => {
|
|
35265
|
+
const raw = this.signals();
|
|
35266
|
+
const names = typeof raw === "string" ? raw.split(/[\s,]+/) : raw ?? [];
|
|
35267
|
+
if (names.includes("all")) return PRICE_LADDER_RULES;
|
|
35268
|
+
return PRICE_LADDER_RULES.filter((r) => names.includes(r));
|
|
35269
|
+
}, ...ngDevMode ? [{ debugName: "picked" }] : /* istanbul ignore next */ []);
|
|
35270
|
+
chips = computed(() => {
|
|
35271
|
+
const tagged = this.tagChips();
|
|
35272
|
+
const shown = new Set(tagged.map((c) => c.rule));
|
|
35273
|
+
const picked = this.picked().flatMap((rule) => {
|
|
35274
|
+
const hit = this.matched().get(rule);
|
|
35275
|
+
if (!hit || shown.has(rule)) return [];
|
|
35276
|
+
return [this.ruleChip(rule, rule, hit, "", "")];
|
|
35277
|
+
});
|
|
35278
|
+
return [...tagged, ...picked];
|
|
35279
|
+
}, ...ngDevMode ? [{ debugName: "chips" }] : /* istanbul ignore next */ []);
|
|
35280
|
+
ruleChip = (key, rule, hit, label, detail) => ({
|
|
35281
|
+
key,
|
|
35282
|
+
rule,
|
|
35283
|
+
label: this.t(label || rule),
|
|
35284
|
+
tone: hit.tone,
|
|
35285
|
+
detail: detail || this.translateService.translate(`${rule}-detail`, hit.params)
|
|
35286
|
+
});
|
|
35287
|
+
tagChips = computed(() => this.signalTags().flatMap((tag, i) => {
|
|
35288
|
+
const raw = tag.rule();
|
|
35289
|
+
const rule = isLadderRule(raw) ? raw : void 0;
|
|
35290
|
+
const key = tag.key() || rule || `signal-${i}`;
|
|
35291
|
+
if (!rule) return [{
|
|
35292
|
+
key,
|
|
35293
|
+
rule: void 0,
|
|
35294
|
+
label: this.t(tag.label()),
|
|
35295
|
+
tone: tag.tone(),
|
|
35296
|
+
detail: tag.detail()
|
|
35297
|
+
}];
|
|
35298
|
+
const hit = this.matched().get(rule);
|
|
35299
|
+
if (!hit) return [];
|
|
35300
|
+
return [this.ruleChip(key, rule, hit, tag.label(), tag.detail())];
|
|
35301
|
+
}), ...ngDevMode ? [{ debugName: "tagChips" }] : /* istanbul ignore next */ []);
|
|
35302
|
+
crossPair = computed(() => {
|
|
35303
|
+
const from = this.crossFrom();
|
|
35304
|
+
const to = this.crossTo();
|
|
35305
|
+
if (from && to) return {
|
|
35306
|
+
from,
|
|
35307
|
+
to,
|
|
35308
|
+
tone: this.crossTone()
|
|
35309
|
+
};
|
|
35310
|
+
const cross = this.chips().find((c) => c.rule === "golden-cross" || c.rule === "death-cross");
|
|
35311
|
+
return cross ? {
|
|
35312
|
+
from: "sma50",
|
|
35313
|
+
to: "sma200",
|
|
35314
|
+
tone: cross.tone
|
|
35315
|
+
} : null;
|
|
35316
|
+
}, ...ngDevMode ? [{ debugName: "crossPair" }] : /* istanbul ignore next */ []);
|
|
35317
|
+
forward = computed(() => {
|
|
35318
|
+
const value = this.current();
|
|
35319
|
+
if (value === null) return null;
|
|
35320
|
+
const point = this.targetPoint();
|
|
35321
|
+
const low = price(this.targetLow());
|
|
35322
|
+
const high = price(this.targetHigh());
|
|
35323
|
+
const range = low !== null && high !== null ? {
|
|
35324
|
+
low: Math.min(low, high),
|
|
35325
|
+
high: Math.max(low, high)
|
|
35326
|
+
} : null;
|
|
35327
|
+
if (point === null && range === null) return null;
|
|
35328
|
+
const label = point !== null ? this.t(this.targetLabel()) : this.translateService.translate("forecast-range");
|
|
35329
|
+
const note = this.targetNote();
|
|
35330
|
+
const rangeText = range ? `${this.money(range.low)} – ${this.money(range.high)}` : "";
|
|
35331
|
+
const gap = gapPct(point ?? (range ? (range.low + range.high) / 2 : value), value);
|
|
35332
|
+
return {
|
|
35333
|
+
point,
|
|
35334
|
+
range,
|
|
35335
|
+
label,
|
|
35336
|
+
name: note ? `${label} · ${note}` : label,
|
|
35337
|
+
valueText: point !== null ? `${this.money(point)} ${formatGap(gap)}` : rangeText,
|
|
35338
|
+
rowText: point !== null ? this.money(point) : rangeText,
|
|
35339
|
+
up: gap >= 0,
|
|
35340
|
+
shown: point ?? range?.high ?? value
|
|
35341
|
+
};
|
|
35342
|
+
}, ...ngDevMode ? [{ debugName: "forward" }] : /* istanbul ignore next */ []);
|
|
35343
|
+
line = computed(() => {
|
|
35344
|
+
const value = this.current();
|
|
35345
|
+
if (value === null) return null;
|
|
35346
|
+
const marks = this.marks();
|
|
35347
|
+
const fwd = this.forward();
|
|
35348
|
+
const forwardValues = fwd ? [
|
|
35349
|
+
fwd.point,
|
|
35350
|
+
fwd.range?.low,
|
|
35351
|
+
fwd.range?.high
|
|
35352
|
+
].filter((v) => v != null) : [];
|
|
35353
|
+
const scale = ladderScale({
|
|
35354
|
+
value,
|
|
35355
|
+
levels: marks.map((m) => m.value),
|
|
35356
|
+
forward: forwardValues,
|
|
35357
|
+
maxSpanPct: this.maxSpanPct()
|
|
35358
|
+
});
|
|
35359
|
+
const at = new Map(marks.map((m) => [m.key, m]));
|
|
35360
|
+
const widthPx = this.width() || FALLBACK_PX;
|
|
35361
|
+
const labels = layoutLanes(marks.map((m) => ({
|
|
35362
|
+
key: m.key,
|
|
35363
|
+
x: scale.pos(m.value) / 100 * widthPx
|
|
35364
|
+
})), LABEL_GAP_PX).map((label) => {
|
|
35365
|
+
const group = marks.filter((m) => label.keys.includes(m.key));
|
|
35366
|
+
const level = group.some((m) => m.kind === "level");
|
|
35367
|
+
return {
|
|
35368
|
+
key: label.keys.join("+"),
|
|
35369
|
+
lane: label.lane,
|
|
35370
|
+
pos: label.x / widthPx * 100,
|
|
35371
|
+
bound: !level,
|
|
35372
|
+
name: group.map((m) => m.name).join(" · "),
|
|
35373
|
+
valueText: group.map((m) => this.money(m.value)).join(" · "),
|
|
35374
|
+
gapText: level ? group.map((m) => formatGap(gapPct(m.value, value))).join(" · ") : ""
|
|
35375
|
+
};
|
|
35376
|
+
});
|
|
35377
|
+
const valuePos = scale.pos(value);
|
|
35378
|
+
let target = null;
|
|
35379
|
+
if (fwd?.point != null) {
|
|
35380
|
+
const onScale = scale.within(fwd.point);
|
|
35381
|
+
target = {
|
|
35382
|
+
pos: onScale ? scale.pos(fwd.point) : fwd.point > value ? 100 : 0,
|
|
35383
|
+
offScale: !onScale,
|
|
35384
|
+
point: true
|
|
35385
|
+
};
|
|
35386
|
+
} else if (fwd?.range) target = {
|
|
35387
|
+
pos: (scale.clamp(fwd.range.low) + scale.clamp(fwd.range.high)) / 2,
|
|
35388
|
+
offScale: false,
|
|
35389
|
+
point: false
|
|
35390
|
+
};
|
|
35391
|
+
const pair = this.crossPair();
|
|
35392
|
+
const from = at.get(pair?.from ?? "");
|
|
35393
|
+
const to = at.get(pair?.to ?? "");
|
|
35394
|
+
const cross = pair && from && to ? {
|
|
35395
|
+
...span(scale.pos(from.value), scale.pos(to.value)),
|
|
35396
|
+
tone: pair.tone
|
|
35397
|
+
} : null;
|
|
35398
|
+
const ends = marks.filter((m) => m.kind === "bound");
|
|
35399
|
+
const bounds = ends.length === 2 ? span(scale.pos(ends[0].value), scale.pos(ends[1].value)) : null;
|
|
35400
|
+
return {
|
|
35401
|
+
valuePos,
|
|
35402
|
+
ticks: marks.map((m) => ({
|
|
35403
|
+
key: m.key,
|
|
35404
|
+
kind: m.kind,
|
|
35405
|
+
rank: m.rank,
|
|
35406
|
+
pos: scale.pos(m.value)
|
|
35407
|
+
})),
|
|
35408
|
+
labels,
|
|
35409
|
+
lanes: labels.some((l) => l.lane === 1) ? 2 : 1,
|
|
35410
|
+
target,
|
|
35411
|
+
connector: target && fwd?.point != null ? span(valuePos, target.pos) : null,
|
|
35412
|
+
band: fwd?.range ? span(scale.clamp(fwd.range.low), scale.clamp(fwd.range.high)) : null,
|
|
35413
|
+
cross,
|
|
35414
|
+
bounds
|
|
35415
|
+
};
|
|
35416
|
+
}, ...ngDevMode ? [{ debugName: "line" }] : /* istanbul ignore next */ []);
|
|
35417
|
+
rows = computed(() => {
|
|
35418
|
+
const value = this.current();
|
|
35419
|
+
if (value === null) return [];
|
|
35420
|
+
const fwd = this.forward();
|
|
35421
|
+
const rows = [
|
|
35422
|
+
...this.marks().map((m) => ({
|
|
35423
|
+
key: m.key,
|
|
35424
|
+
kind: m.kind,
|
|
35425
|
+
name: m.name,
|
|
35426
|
+
value: m.value,
|
|
35427
|
+
valueText: this.money(m.value)
|
|
35428
|
+
})),
|
|
35429
|
+
{
|
|
35430
|
+
key: "current",
|
|
35431
|
+
kind: "current",
|
|
35432
|
+
name: this.t(this.valueLabel()),
|
|
35433
|
+
value,
|
|
35434
|
+
valueText: this.money(value)
|
|
35435
|
+
},
|
|
35436
|
+
...fwd ? [{
|
|
35437
|
+
key: "target",
|
|
35438
|
+
kind: "target",
|
|
35439
|
+
name: fwd.name,
|
|
35440
|
+
value: fwd.shown,
|
|
35441
|
+
valueText: fwd.rowText
|
|
35442
|
+
}] : []
|
|
35443
|
+
].sort((a, b) => b.value - a.value);
|
|
35444
|
+
const lo = rows[rows.length - 1].value;
|
|
35445
|
+
const hi = rows[0].value;
|
|
35446
|
+
return rows.map((r) => ({
|
|
35447
|
+
...r,
|
|
35448
|
+
gapText: r.kind === "current" ? "" : formatGap(gapPct(r.value, value)),
|
|
35449
|
+
up: r.value >= value,
|
|
35450
|
+
pos: hi === lo ? 50 : (r.value - lo) / (hi - lo) * 100
|
|
35451
|
+
}));
|
|
35452
|
+
}, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
35453
|
+
summary = computed(() => {
|
|
35454
|
+
const value = this.current();
|
|
35455
|
+
if (value === null) return this.translateService.translate("no-data");
|
|
35456
|
+
const fwd = this.forward();
|
|
35457
|
+
const head = this.translateService.translate("price-ladder-summary", {
|
|
35458
|
+
value: this.money(value),
|
|
35459
|
+
n: String(this.marks().length)
|
|
35460
|
+
});
|
|
35461
|
+
return fwd ? `${head}; ${fwd.label} ${fwd.valueText}` : head;
|
|
35462
|
+
}, ...ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []);
|
|
35463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
35464
|
+
minVersion: "12.0.0",
|
|
35465
|
+
version: "22.2.1",
|
|
35466
|
+
ngImport: i0,
|
|
35467
|
+
type: PriceLadderComponent,
|
|
35468
|
+
deps: [],
|
|
35469
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
35470
|
+
});
|
|
35471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
35472
|
+
minVersion: "17.0.0",
|
|
35473
|
+
version: "22.2.1",
|
|
35474
|
+
type: PriceLadderComponent,
|
|
35475
|
+
isStandalone: true,
|
|
35476
|
+
selector: "m-price-ladder",
|
|
35477
|
+
inputs: {
|
|
35478
|
+
value: {
|
|
35479
|
+
classPropertyName: "value",
|
|
35480
|
+
publicName: "value",
|
|
35481
|
+
isSignal: true,
|
|
35482
|
+
isRequired: false,
|
|
35483
|
+
transformFunction: null
|
|
35484
|
+
},
|
|
35485
|
+
valueLabel: {
|
|
35486
|
+
classPropertyName: "valueLabel",
|
|
35487
|
+
publicName: "valueLabel",
|
|
35488
|
+
isSignal: true,
|
|
35489
|
+
isRequired: false,
|
|
35490
|
+
transformFunction: null
|
|
35491
|
+
},
|
|
35492
|
+
target: {
|
|
35493
|
+
classPropertyName: "target",
|
|
35494
|
+
publicName: "target",
|
|
35495
|
+
isSignal: true,
|
|
35496
|
+
isRequired: false,
|
|
35497
|
+
transformFunction: null
|
|
35498
|
+
},
|
|
35499
|
+
targetLow: {
|
|
35500
|
+
classPropertyName: "targetLow",
|
|
35501
|
+
publicName: "targetLow",
|
|
35502
|
+
isSignal: true,
|
|
35503
|
+
isRequired: false,
|
|
35504
|
+
transformFunction: null
|
|
35505
|
+
},
|
|
35506
|
+
targetHigh: {
|
|
35507
|
+
classPropertyName: "targetHigh",
|
|
35508
|
+
publicName: "targetHigh",
|
|
35509
|
+
isSignal: true,
|
|
35510
|
+
isRequired: false,
|
|
35511
|
+
transformFunction: null
|
|
35512
|
+
},
|
|
35513
|
+
targetLabel: {
|
|
35514
|
+
classPropertyName: "targetLabel",
|
|
35515
|
+
publicName: "targetLabel",
|
|
35516
|
+
isSignal: true,
|
|
35517
|
+
isRequired: false,
|
|
35518
|
+
transformFunction: null
|
|
35519
|
+
},
|
|
35520
|
+
targetNote: {
|
|
35521
|
+
classPropertyName: "targetNote",
|
|
35522
|
+
publicName: "targetNote",
|
|
35523
|
+
isSignal: true,
|
|
35524
|
+
isRequired: false,
|
|
35525
|
+
transformFunction: null
|
|
35526
|
+
},
|
|
35527
|
+
maxSpanPct: {
|
|
35528
|
+
classPropertyName: "maxSpanPct",
|
|
35529
|
+
publicName: "maxSpanPct",
|
|
35530
|
+
isSignal: true,
|
|
35531
|
+
isRequired: false,
|
|
35532
|
+
transformFunction: null
|
|
35533
|
+
},
|
|
35534
|
+
variant: {
|
|
35535
|
+
classPropertyName: "variant",
|
|
35536
|
+
publicName: "variant",
|
|
35537
|
+
isSignal: true,
|
|
35538
|
+
isRequired: false,
|
|
35539
|
+
transformFunction: null
|
|
35540
|
+
},
|
|
35541
|
+
symbol: {
|
|
35542
|
+
classPropertyName: "symbol",
|
|
35543
|
+
publicName: "symbol",
|
|
35544
|
+
isSignal: true,
|
|
35545
|
+
isRequired: false,
|
|
35546
|
+
transformFunction: null
|
|
35547
|
+
},
|
|
35548
|
+
signals: {
|
|
35549
|
+
classPropertyName: "signals",
|
|
35550
|
+
publicName: "signals",
|
|
35551
|
+
isSignal: true,
|
|
35552
|
+
isRequired: false,
|
|
35553
|
+
transformFunction: null
|
|
35554
|
+
},
|
|
35555
|
+
crossFrom: {
|
|
35556
|
+
classPropertyName: "crossFrom",
|
|
35557
|
+
publicName: "crossFrom",
|
|
35558
|
+
isSignal: true,
|
|
35559
|
+
isRequired: false,
|
|
35560
|
+
transformFunction: null
|
|
35561
|
+
},
|
|
35562
|
+
crossTo: {
|
|
35563
|
+
classPropertyName: "crossTo",
|
|
35564
|
+
publicName: "crossTo",
|
|
35565
|
+
isSignal: true,
|
|
35566
|
+
isRequired: false,
|
|
35567
|
+
transformFunction: null
|
|
35568
|
+
},
|
|
35569
|
+
crossTone: {
|
|
35570
|
+
classPropertyName: "crossTone",
|
|
35571
|
+
publicName: "crossTone",
|
|
35572
|
+
isSignal: true,
|
|
35573
|
+
isRequired: false,
|
|
35574
|
+
transformFunction: null
|
|
35575
|
+
}
|
|
35576
|
+
},
|
|
35577
|
+
queries: [{
|
|
35578
|
+
propertyName: "markTags",
|
|
35579
|
+
predicate: PriceLadderMarkComponent,
|
|
35580
|
+
isSignal: true
|
|
35581
|
+
}, {
|
|
35582
|
+
propertyName: "signalTags",
|
|
35583
|
+
predicate: PriceLadderSignalComponent,
|
|
35584
|
+
isSignal: true
|
|
35585
|
+
}],
|
|
35586
|
+
ngImport: i0,
|
|
35587
|
+
template: "<div class=\"m-price-ladder\" role=\"img\" [attr.aria-label]=\"summary()\">\n @if (chips().length) {\n <div class=\"m-price-ladder__signals\">\n @for (s of chips(); track s.key) {\n <span\n [class]=\"'m-price-ladder__signal is-' + s.tone\"\n [attr.title]=\"s.detail || null\"\n >{{ s.label }}</span\n >\n }\n </div>\n }\n\n @if (current(); as value) {\n @if (shownAs() === 'line') {\n @if (line(); as l) {\n <div class=\"m-price-ladder__line\" [style.--_lanes]=\"l.lanes\">\n @if (forward(); as f) {\n @if (l.target; as t) {\n <div\n class=\"m-price-ladder__target\"\n [class.is-off-scale]=\"t.offScale\"\n [class.is-up]=\"f.up\"\n [class.is-down]=\"!f.up\"\n [style.--_x.%]=\"t.pos\"\n >\n <span class=\"m-price-ladder__target-name\">{{ f.name }}</span>\n <span class=\"m-price-ladder__target-value\">{{ f.valueText }}</span>\n </div>\n }\n }\n\n <div class=\"m-price-ladder__axis\">\n @if (l.bounds; as b) {\n <span class=\"m-price-ladder__range\" [style.left.%]=\"b.left\" [style.width.%]=\"b.width\"></span>\n }\n @if (l.band; as b) {\n <span class=\"m-price-ladder__band\" [style.left.%]=\"b.left\" [style.width.%]=\"b.width\"></span>\n }\n @if (l.connector; as c) {\n <span\n class=\"m-price-ladder__connector\"\n [class.is-up]=\"forward()?.up\"\n [class.is-down]=\"!forward()?.up\"\n [style.left.%]=\"c.left\"\n [style.width.%]=\"c.width\"\n ></span>\n }\n @if (l.cross; as c) {\n <span\n [class]=\"'m-price-ladder__cross is-' + c.tone\"\n [style.left.%]=\"c.left\"\n [style.width.%]=\"c.width\"\n ></span>\n }\n @for (tick of l.ticks; track tick.key) {\n <span\n class=\"m-price-ladder__tick\"\n [class.is-bound]=\"tick.kind === 'bound'\"\n [style.--_rank]=\"tick.rank\"\n [style.left.%]=\"tick.pos\"\n ></span>\n }\n @if (l.target; as t) {\n @if (t.point) {\n <span\n class=\"m-price-ladder__target-tick\"\n [class.is-off-scale]=\"t.offScale\"\n [class.is-left]=\"t.pos === 0\"\n [style.left.%]=\"t.pos\"\n ></span>\n }\n }\n <span class=\"m-price-ladder__current\" [style.--_x.%]=\"l.valuePos\">\n <span class=\"m-price-ladder__current-value\">{{ money(value) }}</span>\n </span>\n </div>\n\n <div class=\"m-price-ladder__labels\">\n @for (label of l.labels; track label.key) {\n <span\n class=\"m-price-ladder__label\"\n [class.is-bound]=\"label.bound\"\n [class.is-lane-2]=\"label.lane === 1\"\n [style.--_x.%]=\"label.pos\"\n >\n <span class=\"m-price-ladder__label-name\">{{ label.name }}</span>\n <span class=\"m-price-ladder__label-value\">{{ label.valueText }}</span>\n @if (label.gapText) {\n <span class=\"m-price-ladder__label-gap\">{{ label.gapText }}</span>\n }\n </span>\n }\n </div>\n </div>\n }\n } @else {\n <div class=\"m-price-ladder__list\">\n @for (row of rows(); track row.key) {\n <div [class]=\"'m-price-ladder__row is-' + row.kind\">\n <span class=\"m-price-ladder__row-name\">{{ row.name }}</span>\n <span class=\"m-price-ladder__row-value\">{{ row.valueText }}</span>\n <span class=\"m-price-ladder__row-gap\" [class.is-up]=\"row.up\" [class.is-down]=\"!row.up\">{{\n row.gapText\n }}</span>\n <span class=\"m-price-ladder__row-track\">\n <span class=\"m-price-ladder__row-dot\" [style.left.%]=\"row.pos\"></span>\n </span>\n </div>\n }\n </div>\n }\n } @else {\n <div class=\"m-price-ladder__empty\">—</div>\n }\n</div>\n",
|
|
35588
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;--m-price-ladder-forward: var(--m-mm);--m-price-ladder-up: var(--m-success);--m-price-ladder-down: var(--m-error);--m-price-ladder-warn: var(--m-warning);--m-price-ladder-gold: var(--m-gold)}.m-price-ladder{display:flex;flex-direction:column;gap:.75em;font-variant-numeric:tabular-nums}.m-price-ladder__signals{display:flex;flex-wrap:wrap;gap:.4em}.m-price-ladder__signal{display:inline-flex;align-items:center;gap:.4em;padding:.15em .65em .15em .5em;border:1px solid var(--m-border);border-radius:999px;font-size:.8em;font-weight:500}.m-price-ladder__signal:before{content:\"\";width:.55em;height:.55em;border-radius:50%;background:var(--_tone, var(--m-text-tertiary))}.m-price-ladder__signal.is-up{--_tone: var(--m-price-ladder-up)}.m-price-ladder__signal.is-down{--_tone: var(--m-price-ladder-down)}.m-price-ladder__signal.is-warn{--_tone: var(--m-price-ladder-warn)}.m-price-ladder__signal.is-gold{--_tone: var(--m-price-ladder-gold);border-color:var(--m-price-ladder-gold)}.m-price-ladder__line{display:grid;--_edge: 3em}.m-price-ladder__target{position:relative;left:clamp(var(--_edge),var(--_x),100% - var(--_edge));display:flex;flex-direction:column;align-items:center;width:max-content;max-width:50%;transform:translate(-50%);font-size:.8em}.m-price-ladder__target.is-up{--_dir: var(--m-price-ladder-up)}.m-price-ladder__target.is-down{--_dir: var(--m-price-ladder-down)}.m-price-ladder__target-name{color:var(--m-price-ladder-forward);font-style:italic}.m-price-ladder__target-value{color:var(--m-text);font-weight:600}.m-price-ladder__axis{position:relative;height:3.6em}.m-price-ladder__axis:before{content:\"\";position:absolute;inset:50% 0 auto;height:2px;background:var(--m-border);transform:translateY(-50%)}.m-price-ladder__range,.m-price-ladder__band,.m-price-ladder__connector,.m-price-ladder__tick,.m-price-ladder__target-tick,.m-price-ladder__cross{position:absolute;top:50%;transform:translateY(-50%)}.m-price-ladder__range{height:.5em;background:color-mix(in srgb,var(--m-text-tertiary) 18%,transparent)}.m-price-ladder__band{height:1.6em;border:1px dashed var(--m-price-ladder-forward);border-radius:.2em;background:repeating-linear-gradient(45deg,color-mix(in srgb,var(--m-price-ladder-forward) 22%,transparent) 0 2px,transparent 2px 6px)}.m-price-ladder__connector{height:4px;border-radius:2px;opacity:.55}.m-price-ladder__connector.is-up{background:var(--m-price-ladder-up)}.m-price-ladder__connector.is-down{background:var(--m-price-ladder-down)}.m-price-ladder__cross{top:calc(50% + 1.2em);height:.45em;border:1.5px solid var(--m-text-tertiary);border-top:0}.m-price-ladder__cross.is-gold{border-color:var(--m-price-ladder-gold)}.m-price-ladder__cross.is-down{border-color:var(--m-price-ladder-down)}.m-price-ladder__cross.is-up{border-color:var(--m-price-ladder-up)}.m-price-ladder__tick{width:calc(1px + var(--_rank, 1) * .5px);height:calc(.5em + var(--_rank, 1) * .35em);margin-left:calc(var(--_rank, 1) * -.25px);background:var(--m-text-secondary);opacity:calc(.35 + var(--_rank, 1) * .16)}.m-price-ladder__tick.is-bound{width:2px;height:1.2em;background:var(--m-text-tertiary);opacity:1}.m-price-ladder__target-tick{height:2.4em;border-left:2px dashed var(--m-price-ladder-forward)}.m-price-ladder__target-tick.is-off-scale{width:.6em;height:.6em;margin-left:-.7em;border:0;border-top:2.5px solid var(--m-price-ladder-forward);border-right:2.5px solid var(--m-price-ladder-forward);transform:translateY(-50%) rotate(45deg)}.m-price-ladder__target-tick.is-off-scale.is-left{margin-left:.1em;transform:translateY(-50%) rotate(-135deg)}.m-price-ladder__current{position:absolute;inset:0 auto 0 var(--_x)}.m-price-ladder__current:after{content:\"\";position:absolute;top:50%;width:.9em;height:.9em;border:2px solid var(--m-background);border-radius:50%;background:var(--m-text);transform:translate(-50%,-50%)}.m-price-ladder__current-value{position:absolute;top:-.1em;font-size:.85em;font-weight:650;white-space:nowrap;transform:translate(-50%)}.m-price-ladder__labels{position:relative;height:calc(var(--_lanes, 1) * 3.4em)}.m-price-ladder__label{position:absolute;top:0;left:clamp(var(--_edge),var(--_x),100% - var(--_edge));display:flex;flex-direction:column;align-items:center;font-size:.75em;line-height:1.3;white-space:nowrap;transform:translate(-50%)}.m-price-ladder__label.is-lane-2{top:4.4em}.m-price-ladder__label.is-bound{color:var(--m-text-tertiary)}.m-price-ladder__label-name{color:var(--m-text-secondary)}.m-price-ladder__label-value{color:var(--m-text)}.m-price-ladder__label-gap{color:var(--m-text-tertiary)}.m-price-ladder__list{display:grid}.m-price-ladder__row{display:grid;grid-template-columns:minmax(0,1.2fr) auto 4.5em minmax(3em,1fr);gap:.6em;align-items:center;padding:.45em .1em;border-bottom:1px solid var(--m-border);font-size:.9em}.m-price-ladder__row:last-child{border-bottom:0}.m-price-ladder__row.is-current{font-weight:650}.m-price-ladder__row.is-target{color:var(--m-price-ladder-forward);font-style:italic}.m-price-ladder__row.is-bound{color:var(--m-text-tertiary)}.m-price-ladder__row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-price-ladder__row-value{text-align:end}.m-price-ladder__row-gap{text-align:end;color:var(--m-text-tertiary)}.m-price-ladder__row-track{position:relative;height:.6em}.m-price-ladder__row-track:before{content:\"\";position:absolute;inset:50% 0 auto;height:1px;background:var(--m-border)}.m-price-ladder__row-dot{position:absolute;top:50%;width:.4em;height:.4em;border-radius:50%;background:currentColor;transform:translate(-50%,-50%)}.m-price-ladder__empty{padding:1em;color:var(--m-text-tertiary);font-size:1.25em;text-align:center}\n"],
|
|
35589
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
35590
|
+
});
|
|
35591
|
+
};
|
|
35592
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
35593
|
+
minVersion: "12.0.0",
|
|
35594
|
+
version: "22.2.1",
|
|
35595
|
+
ngImport: i0,
|
|
35596
|
+
type: PriceLadderComponent,
|
|
35597
|
+
decorators: [{
|
|
35598
|
+
type: Component,
|
|
35599
|
+
args: [{
|
|
35600
|
+
selector: "m-price-ladder",
|
|
35601
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
35602
|
+
template: "<div class=\"m-price-ladder\" role=\"img\" [attr.aria-label]=\"summary()\">\n @if (chips().length) {\n <div class=\"m-price-ladder__signals\">\n @for (s of chips(); track s.key) {\n <span\n [class]=\"'m-price-ladder__signal is-' + s.tone\"\n [attr.title]=\"s.detail || null\"\n >{{ s.label }}</span\n >\n }\n </div>\n }\n\n @if (current(); as value) {\n @if (shownAs() === 'line') {\n @if (line(); as l) {\n <div class=\"m-price-ladder__line\" [style.--_lanes]=\"l.lanes\">\n @if (forward(); as f) {\n @if (l.target; as t) {\n <div\n class=\"m-price-ladder__target\"\n [class.is-off-scale]=\"t.offScale\"\n [class.is-up]=\"f.up\"\n [class.is-down]=\"!f.up\"\n [style.--_x.%]=\"t.pos\"\n >\n <span class=\"m-price-ladder__target-name\">{{ f.name }}</span>\n <span class=\"m-price-ladder__target-value\">{{ f.valueText }}</span>\n </div>\n }\n }\n\n <div class=\"m-price-ladder__axis\">\n @if (l.bounds; as b) {\n <span class=\"m-price-ladder__range\" [style.left.%]=\"b.left\" [style.width.%]=\"b.width\"></span>\n }\n @if (l.band; as b) {\n <span class=\"m-price-ladder__band\" [style.left.%]=\"b.left\" [style.width.%]=\"b.width\"></span>\n }\n @if (l.connector; as c) {\n <span\n class=\"m-price-ladder__connector\"\n [class.is-up]=\"forward()?.up\"\n [class.is-down]=\"!forward()?.up\"\n [style.left.%]=\"c.left\"\n [style.width.%]=\"c.width\"\n ></span>\n }\n @if (l.cross; as c) {\n <span\n [class]=\"'m-price-ladder__cross is-' + c.tone\"\n [style.left.%]=\"c.left\"\n [style.width.%]=\"c.width\"\n ></span>\n }\n @for (tick of l.ticks; track tick.key) {\n <span\n class=\"m-price-ladder__tick\"\n [class.is-bound]=\"tick.kind === 'bound'\"\n [style.--_rank]=\"tick.rank\"\n [style.left.%]=\"tick.pos\"\n ></span>\n }\n @if (l.target; as t) {\n @if (t.point) {\n <span\n class=\"m-price-ladder__target-tick\"\n [class.is-off-scale]=\"t.offScale\"\n [class.is-left]=\"t.pos === 0\"\n [style.left.%]=\"t.pos\"\n ></span>\n }\n }\n <span class=\"m-price-ladder__current\" [style.--_x.%]=\"l.valuePos\">\n <span class=\"m-price-ladder__current-value\">{{ money(value) }}</span>\n </span>\n </div>\n\n <div class=\"m-price-ladder__labels\">\n @for (label of l.labels; track label.key) {\n <span\n class=\"m-price-ladder__label\"\n [class.is-bound]=\"label.bound\"\n [class.is-lane-2]=\"label.lane === 1\"\n [style.--_x.%]=\"label.pos\"\n >\n <span class=\"m-price-ladder__label-name\">{{ label.name }}</span>\n <span class=\"m-price-ladder__label-value\">{{ label.valueText }}</span>\n @if (label.gapText) {\n <span class=\"m-price-ladder__label-gap\">{{ label.gapText }}</span>\n }\n </span>\n }\n </div>\n </div>\n }\n } @else {\n <div class=\"m-price-ladder__list\">\n @for (row of rows(); track row.key) {\n <div [class]=\"'m-price-ladder__row is-' + row.kind\">\n <span class=\"m-price-ladder__row-name\">{{ row.name }}</span>\n <span class=\"m-price-ladder__row-value\">{{ row.valueText }}</span>\n <span class=\"m-price-ladder__row-gap\" [class.is-up]=\"row.up\" [class.is-down]=\"!row.up\">{{\n row.gapText\n }}</span>\n <span class=\"m-price-ladder__row-track\">\n <span class=\"m-price-ladder__row-dot\" [style.left.%]=\"row.pos\"></span>\n </span>\n </div>\n }\n </div>\n }\n } @else {\n <div class=\"m-price-ladder__empty\">—</div>\n }\n</div>\n",
|
|
35603
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;--m-price-ladder-forward: var(--m-mm);--m-price-ladder-up: var(--m-success);--m-price-ladder-down: var(--m-error);--m-price-ladder-warn: var(--m-warning);--m-price-ladder-gold: var(--m-gold)}.m-price-ladder{display:flex;flex-direction:column;gap:.75em;font-variant-numeric:tabular-nums}.m-price-ladder__signals{display:flex;flex-wrap:wrap;gap:.4em}.m-price-ladder__signal{display:inline-flex;align-items:center;gap:.4em;padding:.15em .65em .15em .5em;border:1px solid var(--m-border);border-radius:999px;font-size:.8em;font-weight:500}.m-price-ladder__signal:before{content:\"\";width:.55em;height:.55em;border-radius:50%;background:var(--_tone, var(--m-text-tertiary))}.m-price-ladder__signal.is-up{--_tone: var(--m-price-ladder-up)}.m-price-ladder__signal.is-down{--_tone: var(--m-price-ladder-down)}.m-price-ladder__signal.is-warn{--_tone: var(--m-price-ladder-warn)}.m-price-ladder__signal.is-gold{--_tone: var(--m-price-ladder-gold);border-color:var(--m-price-ladder-gold)}.m-price-ladder__line{display:grid;--_edge: 3em}.m-price-ladder__target{position:relative;left:clamp(var(--_edge),var(--_x),100% - var(--_edge));display:flex;flex-direction:column;align-items:center;width:max-content;max-width:50%;transform:translate(-50%);font-size:.8em}.m-price-ladder__target.is-up{--_dir: var(--m-price-ladder-up)}.m-price-ladder__target.is-down{--_dir: var(--m-price-ladder-down)}.m-price-ladder__target-name{color:var(--m-price-ladder-forward);font-style:italic}.m-price-ladder__target-value{color:var(--m-text);font-weight:600}.m-price-ladder__axis{position:relative;height:3.6em}.m-price-ladder__axis:before{content:\"\";position:absolute;inset:50% 0 auto;height:2px;background:var(--m-border);transform:translateY(-50%)}.m-price-ladder__range,.m-price-ladder__band,.m-price-ladder__connector,.m-price-ladder__tick,.m-price-ladder__target-tick,.m-price-ladder__cross{position:absolute;top:50%;transform:translateY(-50%)}.m-price-ladder__range{height:.5em;background:color-mix(in srgb,var(--m-text-tertiary) 18%,transparent)}.m-price-ladder__band{height:1.6em;border:1px dashed var(--m-price-ladder-forward);border-radius:.2em;background:repeating-linear-gradient(45deg,color-mix(in srgb,var(--m-price-ladder-forward) 22%,transparent) 0 2px,transparent 2px 6px)}.m-price-ladder__connector{height:4px;border-radius:2px;opacity:.55}.m-price-ladder__connector.is-up{background:var(--m-price-ladder-up)}.m-price-ladder__connector.is-down{background:var(--m-price-ladder-down)}.m-price-ladder__cross{top:calc(50% + 1.2em);height:.45em;border:1.5px solid var(--m-text-tertiary);border-top:0}.m-price-ladder__cross.is-gold{border-color:var(--m-price-ladder-gold)}.m-price-ladder__cross.is-down{border-color:var(--m-price-ladder-down)}.m-price-ladder__cross.is-up{border-color:var(--m-price-ladder-up)}.m-price-ladder__tick{width:calc(1px + var(--_rank, 1) * .5px);height:calc(.5em + var(--_rank, 1) * .35em);margin-left:calc(var(--_rank, 1) * -.25px);background:var(--m-text-secondary);opacity:calc(.35 + var(--_rank, 1) * .16)}.m-price-ladder__tick.is-bound{width:2px;height:1.2em;background:var(--m-text-tertiary);opacity:1}.m-price-ladder__target-tick{height:2.4em;border-left:2px dashed var(--m-price-ladder-forward)}.m-price-ladder__target-tick.is-off-scale{width:.6em;height:.6em;margin-left:-.7em;border:0;border-top:2.5px solid var(--m-price-ladder-forward);border-right:2.5px solid var(--m-price-ladder-forward);transform:translateY(-50%) rotate(45deg)}.m-price-ladder__target-tick.is-off-scale.is-left{margin-left:.1em;transform:translateY(-50%) rotate(-135deg)}.m-price-ladder__current{position:absolute;inset:0 auto 0 var(--_x)}.m-price-ladder__current:after{content:\"\";position:absolute;top:50%;width:.9em;height:.9em;border:2px solid var(--m-background);border-radius:50%;background:var(--m-text);transform:translate(-50%,-50%)}.m-price-ladder__current-value{position:absolute;top:-.1em;font-size:.85em;font-weight:650;white-space:nowrap;transform:translate(-50%)}.m-price-ladder__labels{position:relative;height:calc(var(--_lanes, 1) * 3.4em)}.m-price-ladder__label{position:absolute;top:0;left:clamp(var(--_edge),var(--_x),100% - var(--_edge));display:flex;flex-direction:column;align-items:center;font-size:.75em;line-height:1.3;white-space:nowrap;transform:translate(-50%)}.m-price-ladder__label.is-lane-2{top:4.4em}.m-price-ladder__label.is-bound{color:var(--m-text-tertiary)}.m-price-ladder__label-name{color:var(--m-text-secondary)}.m-price-ladder__label-value{color:var(--m-text)}.m-price-ladder__label-gap{color:var(--m-text-tertiary)}.m-price-ladder__list{display:grid}.m-price-ladder__row{display:grid;grid-template-columns:minmax(0,1.2fr) auto 4.5em minmax(3em,1fr);gap:.6em;align-items:center;padding:.45em .1em;border-bottom:1px solid var(--m-border);font-size:.9em}.m-price-ladder__row:last-child{border-bottom:0}.m-price-ladder__row.is-current{font-weight:650}.m-price-ladder__row.is-target{color:var(--m-price-ladder-forward);font-style:italic}.m-price-ladder__row.is-bound{color:var(--m-text-tertiary)}.m-price-ladder__row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-price-ladder__row-value{text-align:end}.m-price-ladder__row-gap{text-align:end;color:var(--m-text-tertiary)}.m-price-ladder__row-track{position:relative;height:.6em}.m-price-ladder__row-track:before{content:\"\";position:absolute;inset:50% 0 auto;height:1px;background:var(--m-border)}.m-price-ladder__row-dot{position:absolute;top:50%;width:.4em;height:.4em;border-radius:50%;background:currentColor;transform:translate(-50%,-50%)}.m-price-ladder__empty{padding:1em;color:var(--m-text-tertiary);font-size:1.25em;text-align:center}\n"]
|
|
35604
|
+
}]
|
|
35605
|
+
}],
|
|
35606
|
+
ctorParameters: () => [],
|
|
35607
|
+
propDecorators: {
|
|
35608
|
+
value: [{
|
|
35609
|
+
type: i0.Input,
|
|
35610
|
+
args: [{
|
|
35611
|
+
isSignal: true,
|
|
35612
|
+
alias: "value",
|
|
35613
|
+
required: false
|
|
35614
|
+
}]
|
|
35615
|
+
}],
|
|
35616
|
+
valueLabel: [{
|
|
35617
|
+
type: i0.Input,
|
|
35618
|
+
args: [{
|
|
35619
|
+
isSignal: true,
|
|
35620
|
+
alias: "valueLabel",
|
|
35621
|
+
required: false
|
|
35622
|
+
}]
|
|
35623
|
+
}],
|
|
35624
|
+
target: [{
|
|
35625
|
+
type: i0.Input,
|
|
35626
|
+
args: [{
|
|
35627
|
+
isSignal: true,
|
|
35628
|
+
alias: "target",
|
|
35629
|
+
required: false
|
|
35630
|
+
}]
|
|
35631
|
+
}],
|
|
35632
|
+
targetLow: [{
|
|
35633
|
+
type: i0.Input,
|
|
35634
|
+
args: [{
|
|
35635
|
+
isSignal: true,
|
|
35636
|
+
alias: "targetLow",
|
|
35637
|
+
required: false
|
|
35638
|
+
}]
|
|
35639
|
+
}],
|
|
35640
|
+
targetHigh: [{
|
|
35641
|
+
type: i0.Input,
|
|
35642
|
+
args: [{
|
|
35643
|
+
isSignal: true,
|
|
35644
|
+
alias: "targetHigh",
|
|
35645
|
+
required: false
|
|
35646
|
+
}]
|
|
35647
|
+
}],
|
|
35648
|
+
targetLabel: [{
|
|
35649
|
+
type: i0.Input,
|
|
35650
|
+
args: [{
|
|
35651
|
+
isSignal: true,
|
|
35652
|
+
alias: "targetLabel",
|
|
35653
|
+
required: false
|
|
35654
|
+
}]
|
|
35655
|
+
}],
|
|
35656
|
+
targetNote: [{
|
|
35657
|
+
type: i0.Input,
|
|
35658
|
+
args: [{
|
|
35659
|
+
isSignal: true,
|
|
35660
|
+
alias: "targetNote",
|
|
35661
|
+
required: false
|
|
35662
|
+
}]
|
|
35663
|
+
}],
|
|
35664
|
+
maxSpanPct: [{
|
|
35665
|
+
type: i0.Input,
|
|
35666
|
+
args: [{
|
|
35667
|
+
isSignal: true,
|
|
35668
|
+
alias: "maxSpanPct",
|
|
35669
|
+
required: false
|
|
35670
|
+
}]
|
|
35671
|
+
}],
|
|
35672
|
+
variant: [{
|
|
35673
|
+
type: i0.Input,
|
|
35674
|
+
args: [{
|
|
35675
|
+
isSignal: true,
|
|
35676
|
+
alias: "variant",
|
|
35677
|
+
required: false
|
|
35678
|
+
}]
|
|
35679
|
+
}],
|
|
35680
|
+
symbol: [{
|
|
35681
|
+
type: i0.Input,
|
|
35682
|
+
args: [{
|
|
35683
|
+
isSignal: true,
|
|
35684
|
+
alias: "symbol",
|
|
35685
|
+
required: false
|
|
35686
|
+
}]
|
|
35687
|
+
}],
|
|
35688
|
+
signals: [{
|
|
35689
|
+
type: i0.Input,
|
|
35690
|
+
args: [{
|
|
35691
|
+
isSignal: true,
|
|
35692
|
+
alias: "signals",
|
|
35693
|
+
required: false
|
|
35694
|
+
}]
|
|
35695
|
+
}],
|
|
35696
|
+
crossFrom: [{
|
|
35697
|
+
type: i0.Input,
|
|
35698
|
+
args: [{
|
|
35699
|
+
isSignal: true,
|
|
35700
|
+
alias: "crossFrom",
|
|
35701
|
+
required: false
|
|
35702
|
+
}]
|
|
35703
|
+
}],
|
|
35704
|
+
crossTo: [{
|
|
35705
|
+
type: i0.Input,
|
|
35706
|
+
args: [{
|
|
35707
|
+
isSignal: true,
|
|
35708
|
+
alias: "crossTo",
|
|
35709
|
+
required: false
|
|
35710
|
+
}]
|
|
35711
|
+
}],
|
|
35712
|
+
crossTone: [{
|
|
35713
|
+
type: i0.Input,
|
|
35714
|
+
args: [{
|
|
35715
|
+
isSignal: true,
|
|
35716
|
+
alias: "crossTone",
|
|
35717
|
+
required: false
|
|
35718
|
+
}]
|
|
35719
|
+
}],
|
|
35720
|
+
markTags: [{
|
|
35721
|
+
type: i0.ContentChildren,
|
|
35722
|
+
args: [i0.forwardRef(() => PriceLadderMarkComponent), { isSignal: true }]
|
|
35723
|
+
}],
|
|
35724
|
+
signalTags: [{
|
|
35725
|
+
type: i0.ContentChildren,
|
|
35726
|
+
args: [i0.forwardRef(() => PriceLadderSignalComponent), { isSignal: true }]
|
|
35727
|
+
}]
|
|
35728
|
+
}
|
|
35729
|
+
});
|
|
35730
|
+
const span = (a, b) => ({
|
|
35731
|
+
left: Math.min(a, b),
|
|
35732
|
+
width: Math.abs(b - a)
|
|
35733
|
+
});
|
|
34289
35734
|
const DOCS_FOLDER = "docs";
|
|
34290
35735
|
const LIBRARY_TIER = "one";
|
|
34291
35736
|
function docAssetCandidates({ name, lang, defaultLang }) {
|
|
@@ -53952,6 +55397,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
53952
55397
|
}]
|
|
53953
55398
|
}
|
|
53954
55399
|
});
|
|
53955
|
-
export { ACCESS_DOMAINS, APP_CONTEXT_REF, APP_LINK, APP_LOGO_ICON, APP_LOGO_SOURCE, APP_THEME_COLOR, ASSET_BASE_URL, AUDIENCE_ICONS, AUDIENCE_LEVELS, AccordionBodyDirective, AccordionComponent, AccordionGroupComponent, ActionComponent, AnimatedGraphsComponent, AppAvailability, AppCardComponent, AppIdentityService, AppLogoComponent, AppLogoState, AppRelationType, AppTileComponent, AssetStore, AssetUrlPipe, Assets, AudiencePickerBoxComponent, AudiencePickerComponent, AuthActivityPageComponent, AuthApiService, AuthStore, AutosizeDirective, BadgeComponent, BandingComponent, BaseArrayInputComponent, BaseRootWebComponent, BaseWebComponent, BrowserLocaleService, ButtonComponent, ButtonGroupComponent, CALLING_APP_HEADER, COMPONENT_INPUT_REGISTRY, CardComponent, CardWrapperComponent, CarouselComponent, ChartComponent, ChatBubbleComponent, CheckboxGroupComponent, CheckboxInputComponent, ClearableInputComponent, ClipboardService, ColComponent, ColorPickerInputComponent, CommentItemComponent, CommentsApiService, CommentsComponent, CommentsStore, CompactNumberPipe, ComponentInputComponent, ComponentStepperComponent, ConfigComponent, ConfirmComponent, ContextMenuComponent, CustomIconClass, CustomIconEditComponent, DEFAULT_AUDIENCE, DEFAULT_DENIAL, DEFAULT_DOC_ALIGN, DEFAULT_DOC_DENSITY, DEFAULT_DOC_VARIANT, DEFAULT_FILTER_RANGE_MODE, DEFAULT_FILTER_VARIANT, DEFAULT_NAV_PARAM, DEFAULT_NAV_SEGMENT, DEFAULT_SECTION_CHART_RANGES, DEFAULT_SIZE, DOCK_MIN_PAGE_REMAINDER, DOCS_FOLDER, DOC_ACTION_ICONS, DOC_ALIGNS, DOC_DENSITIES, DOC_EDIT_ACTIONS, DOC_TOOLBAR_GROUPS, DOC_VARIANTS, DashboardCardComponent, DateInputComponent, DatePickerComponent, DeviceService, DocComponent, DocEditorComponent, DomService, Domain, DotGridComponent, DragListDirective, DragListItemDirective, DraggableDirective, DropdownInputComponent, FILTER_GROUP_CONTEXT, FILTER_RANGE_MODES, FILTER_VARIANTS, FLEX_VARIANTS, FOLDER_PICK_LISTENER, FORM_ASSET_FOLDER, FileService, FileUploadDirective, FileUploadInputComponent, FlexComponent, FlexItemComponent, FormGroupComponent, FrameComponent, FreezeService, GRID_BREAKPOINTS, GetNavService, HOST_SESSION, HeaderComponent, HeatSwatchComponent, HighlightDirective, HttpService, HttpSharingClient, ICON_SOURCE, IS_DESIGN_MODE, IS_SIDE_PANEL, IconComponent, ImgComponent, InputType, InstrumentScoreComponent, InterceptorObservables, JumbotronComponent, KeyValueComponent, LAYOUT_ASSET_FOLDER, LOADING_ACTIONS_REF, LOGIN_COMPONENT, LOGIN_STORE, LOGO_GLYPH_MAX_BYTES, LanguageComponent, ListComponent, LogoComponent, LogoGlyphInputComponent, MAG_SOCKET_EVENT, MHeroColorDirective, MHeroComponent, MODAL_REF, MODAL_STORE_REF, MOUNT_STATIC_SEGMENT, MOUNT_TOKEN, MRefDirective, MStepComponent, MURL_PARAM, MURL_SEP, ManifestEnrichmentService, MarginDirective, MenuComponent, ModalDirective, ModalRef, ModalStore, MoneyPipe, MultiRangeInputComponent, MultiselectInputComponent, MurlUrlSerializer, NAV_DEFAULT_MURL, NAV_ID_SEP, NAV_MAIN_BUTTONS, NAV_SEGMENT_RE, NAV_STORE_REF, NAV_WC_COMPONENTS, NAV_WIDGET_MAP, NavComponent, NavDetailsComponent, NavHeaderComponent, NavMenuComponent, NavStore, NavTrailComponent, NothingComponent, NotificationElementComponent, NotificationGroupComponent, NotificationPopupComponent, NotificationService, NotificationStore, NotificationType, NotificationWidgetComponent, ONE_ASSET_BASE_URL, OPTIONS_SOURCE, OVERLAY_WIDGETS, OneApp, OptionsSourceDirective, OverlayBodyComponent, OverlayRef, OverlayService, PLATFORM_BUTTON_NAV_IDS, PLATFORM_EXTENSIBLE_NAV_IDS, PLATFORM_NAV_MAP, PLATFORM_ROOT_CHILDREN, PLUGIN_FALLBACK_LANG, PLUGIN_OUTPUT_EVENT, PLUGIN_SCREENS, PaddingDirective, PaginationComponent, PanelComponent, PercentagePipe, PlaygroundComponent, PluginComponent, PluginInputComponent, PluginOutputComponent, PositionDirective, PwaInstallComponent, RECENT_SEARCH_LIMIT, REMOTE_BOOT_TIMEOUT_MS, REMOTE_PAGE_RELOAD, ROOT_NAV, RadioGroupComponent, RadioInputComponent, RangeInputComponent, RatingInputComponent, ReactiveElementComponent, RemoteComponent, RemoteLoaderService, ResizeElementComponent, RouteContainer, RowComponent, SCORE_TONE_COUNT, SEARCH_ANSWER_KEY, SEARCH_LABEL_KEY, SEARCH_QUERY, SEARCH_RESULTS_EVENT, SECTION_ACCORDION_GROUP, SECTION_CHART_CUSTOM_RANGE, SECTION_CHART_SCALES, SECTION_FORM_CONTEXT, SECTION_TABLE_VARIANTS, SHARED_ICONS, SHARING_CLIENT, SIZE_CONTEXT, SPACING_INWARD, SPLASH_ID, ScoreComponent, ScoreSetComponent, ScoreSetItemComponent, ScrollComponent, ScrollService, SearchPanelComponent, SearchStore, SearchUserPanelComponent, SectionAccordionDirective, SectionAccordionGroupDirective, SectionBackComponent, SectionBadgesComponent, SectionButtonGroupComponent, SectionCardComponent, SectionCarouselComponent, SectionChartComponent, SectionChartSeriesComponent, SectionComponent, SectionFilterComponent, SectionFilterGroupComponent, SectionFilterMenuComponent, SectionFilterPanelComponent, SectionFilterRangePanelComponent, SectionFooterComponent, SectionFormComponent, SectionFormItemComponent, SectionHeaderComponent, SectionHeroComponent, SectionPaginationComponent, SectionSearchComponent, SectionStepperComponent, SectionTableCellComponent, SectionTableComponent, SectionTableRowComponent, SectionTableSortDirection, SectionTableSortPipe, SectionTabsComponent, SectionToggleComponent, SectionToggleItemDirective, SelectableCardInputComponent, SelectorDirective, SettingsSearchBarComponent, SettingsSearchService, ShapeComponent, SharedStoreRegistry, SidePanelDirective, SignColorPipe, Size, SocketStore, SortComponent, StatComponent, StepComponent, StepperComponent, StepsComponent, StorageService, StrokeLinecap, StrokeLinejoin, SummaryComponent, SvgGeneratorComponent, SvgGeneratorService, SvgService, TOTAL_COLUMNS, TRANSLATION_SOURCE, TableComponent, TechnicalMeterComponent, TextInputComponent, TextOutputComponent, TextareaInputComponent, ThemeComponent, ThemeDataService, ThemeService, ThemeStore, TimeAgoPipe, TimelineComponent, ToListPipe, ToggleButtonComponent, ToggleInputComponent, ToggleRadioInputComponent, ToolTipDirective, TooltipComponent, TranslatePipe, TranslateService, TreeGridComponent, URL_SEP, USER_STORE_REF, USER_TAB_MAP, UniverseComponent, UserApiService, UserAvatarComponent, UserComponent, UserNavComponent, UserSettingsComponent, UserStore, WC_BUNDLE, WC_NAVIGATE_EVENT, WC_ROUTE_CHANGED_EVENT, WC_SEARCH_GROUPS, WIN_USER_TAB_HOOK, WIN_USER_TAB_KEY, WatermarkComponent, WcRouterStore, WrapperInputComponent, actionName, activeElementWithin, allowedCodes, anchorNavId, appColorBrand, appLogoShadowColor, appThemeColorFactory, applyColorsToElement, applyDocEdit, assetOptions, baseUnderHost, bootstrapMagApp, bootstrapPwaInstall, browserLocale, buildWcBaseUrl, calculateLuminance, calculateRanks, categoricalTone, cellText, checkDoc, checkFilterCondition, childNavId, claimDenial, classListSignal, coerceSize, cornerEdge, cornerSide, createLoadingState, createMap, createPlatformNavMap, createPluginElement, definePluginScreens, definedWcBundleOf, definedWcTierOf, deriveAvatarGradient, deriveContrastColor, deriveOppositeColor, derivePropertyName, docActionKey, docAssetCandidates, docProblemKey, docRemotePath, emailValidation, enumValue, escapeHtml, evaluate, evaluateBool, existsInMap, exposeScreens, exposedScreensOf, fieldBoolean, fieldNumber, fieldString, filterHoldsList, filterHoldsOneBound, filterHoldsOptions, filterHoldsRange, filterList, filterNumber, filterNumberList, filterOne, filterPanelOf, filterPanelWidth, filterRange, filterTreeGridRows, filterValueList, filterValues, flattenTreeGridRows, formatBadgeCount, fullName, generateClipPath, generateTransform, getClassList, getFromMap, getProperty, getScrollParent, getTierFromPreviewPath, getTreeGridRow, getUniqueId, getValue, hasErrorComputed, heatColor, heatShare, hexToRgb, hslToRgb, initMagmoniumApp, initialNotificationState, initialState, initials, injectAuthenticate, injectDefaultDenial, injectInstallApp, injectParentSize, injectScrollSticky, isBootRedirect, isButtonName, isCancelledComputed, isExtensiblePlatformNavId, isJson, isLightAppColor, isLoadingComputed, isLocalhost, isNavCountConfig, isNavInstanceConfig, isNavMenuConfig, isNavRowsConfig, isNavVisibilityConfig, isPlatformNavId, isPlatformPanelNavId, isReadableOn, isScoreStale, isSize, isTierPreview, isUrlLocalhost, isValidNavId, isValidNavSegment, isWebComponent, linkToId, linkToNav, loadingActions, logoGlyphMaskUrl, mInterceptor, manualValidation, matchFieldValidation, matchMount, maxLengthValidation, maxValidation, mergePlatformNav, mergeUnique, mergeUniqueBy, mergeUniqueWith, minAgeValidation, minLengthValidation, minValidation, miniMarkInlineToHtml, miniMarkToHtml, mountFor, mountPatternProblem, mountPatternText, mountSegmentOf, mountTokenOf, navIdChain, navIdFor, navIdSegment, navIdToRoutePath, navIdToSegments, navParamOf, navTailMatcher, navToId, navVisibilityGuard, nextSectionTableSort, normalizeAppColor, normalizeAssetOptions, notExistsInMap, offsetOfLine, outletPathOf, outletSegmentsOf, paintAppColor, parentNavId, parseAddress, parseColor, parseMountPattern, parsePatternNames, patternValidation, patternsValidation, permissionRefusal, pickCount, pickSupportedLanguage, picksMembers, platformNavWidgets, pluginTag, presetDefaultOption, privateGuard, processImageToSvg, provideAppContext, provideMagAppConfig, provideMagWcConfig, provideMagWcRoutes, provideModalComponents, provideMurlUrlSerializer, provideNavWidgets, provideOverlayWidgets, providePlatformNavWidgets, providePluginRuntime, provideSearch, provideSizeContext, provideUserTabs, publicGuard, readChartPoints, readFieldPatterns, readableAppColor, rebuildLogoGlyph, recordDefinedWcTier, registerSessionRenewal, remoteOutletRoute, renderAddress, renderDocument, requiredValidation, resolveConfigAsset, resolveIconSize, resolvePallet, resolvePatternRules, resolveSize, resolveSpacing, rgbToHex, rgbToHsl, rowHasChildren, samePatterns, scoreBand, scoreStanding, sectionTableColumnId, sectionTableColumnWidths, sectionTableFrozenCount, segmentsToNavId, setProperty, setTreeGridChildren, setWcLocalPort, setWcTier, settingsWidgets, shouldShowBadge, sortSectionTableRows, splashHtml, splitNavId, splitOnMatch, splitPath, stringToColor, tailRouteOf, toAttrBool, toAttrNumber, toCssLength, toHostNavId, toLength, toLocalNavId, toggleGroup, toggleTreeGridRow, toggleUid, unfetchedPlatformNav, ungroupedDocActions, urlValidation, wcLocalBaseOf, wcTierOf, withLevel };
|
|
55400
|
+
export { ACCESS_DOMAINS, APP_CONTEXT_REF, APP_LINK, APP_LOGO_ICON, APP_LOGO_SOURCE, APP_THEME_COLOR, ASSET_BASE_URL, AUDIENCE_ICONS, AUDIENCE_LEVELS, AccordionBodyDirective, AccordionComponent, AccordionGroupComponent, ActionComponent, AnimatedGraphsComponent, AppAvailability, AppCardComponent, AppIdentityService, AppLogoComponent, AppLogoState, AppRelationType, AppTileComponent, AssetStore, AssetUrlPipe, Assets, AudiencePickerBoxComponent, AudiencePickerComponent, AuthActivityPageComponent, AuthApiService, AuthStore, AutosizeDirective, BadgeComponent, BandingComponent, BaseArrayInputComponent, BaseRootWebComponent, BaseWebComponent, BrowserLocaleService, ButtonComponent, ButtonGroupComponent, CALLING_APP_HEADER, COMPONENT_INPUT_REGISTRY, CardComponent, CardWrapperComponent, CarouselComponent, ChartComponent, ChatBubbleComponent, CheckboxGroupComponent, CheckboxInputComponent, ClearableInputComponent, ClipboardService, ColComponent, ColorPickerInputComponent, CommentItemComponent, CommentsApiService, CommentsComponent, CommentsStore, CompactNumberPipe, ComponentInputComponent, ComponentStepperComponent, ConfigComponent, ConfirmComponent, ContextMenuComponent, CustomIconClass, CustomIconEditComponent, DEFAULT_AUDIENCE, DEFAULT_DENIAL, DEFAULT_DOC_ALIGN, DEFAULT_DOC_DENSITY, DEFAULT_DOC_VARIANT, DEFAULT_FILTER_RANGE_MODE, DEFAULT_FILTER_VARIANT, DEFAULT_NAV_PARAM, DEFAULT_NAV_SEGMENT, DEFAULT_SECTION_CHART_RANGES, DEFAULT_SIZE, DOCK_MIN_PAGE_REMAINDER, DOCS_FOLDER, DOC_ACTION_ICONS, DOC_ALIGNS, DOC_DENSITIES, DOC_EDIT_ACTIONS, DOC_TOOLBAR_GROUPS, DOC_VARIANTS, DashboardCardComponent, DateInputComponent, DatePickerComponent, DeviceService, DocComponent, DocEditorComponent, DomService, Domain, DotGridComponent, DragListDirective, DragListItemDirective, DraggableDirective, DropdownInputComponent, FILTER_GROUP_CONTEXT, FILTER_RANGE_MODES, FILTER_VARIANTS, FLEX_VARIANTS, FOLDER_PICK_LISTENER, FORM_ASSET_FOLDER, FileService, FileUploadDirective, FileUploadInputComponent, FlexComponent, FlexItemComponent, FormGroupComponent, FrameComponent, FreezeService, GRID_BREAKPOINTS, GetNavService, HOST_SESSION, HeaderComponent, HeatSwatchComponent, HighlightDirective, HttpService, HttpSharingClient, ICON_SOURCE, IS_DESIGN_MODE, IS_SIDE_PANEL, IconComponent, ImgComponent, InputType, InstrumentScoreComponent, InterceptorObservables, JumbotronComponent, KeyValueComponent, LAYOUT_ASSET_FOLDER, LOADING_ACTIONS_REF, LOGIN_COMPONENT, LOGIN_STORE, LOGO_GLYPH_MAX_BYTES, LanguageComponent, ListComponent, LogoComponent, LogoGlyphInputComponent, MAG_SOCKET_EVENT, MHeroColorDirective, MHeroComponent, MODAL_REF, MODAL_STORE_REF, MOUNT_STATIC_SEGMENT, MOUNT_TOKEN, MRefDirective, MStepComponent, MURL_PARAM, MURL_SEP, ManifestEnrichmentService, MarginDirective, MenuComponent, ModalDirective, ModalRef, ModalStore, MoneyPipe, MultiRangeInputComponent, MultiselectInputComponent, MurlUrlSerializer, NAV_DEFAULT_MURL, NAV_ID_SEP, NAV_MAIN_BUTTONS, NAV_SEGMENT_RE, NAV_STORE_REF, NAV_WC_COMPONENTS, NAV_WIDGET_MAP, NavComponent, NavDetailsComponent, NavHeaderComponent, NavMenuComponent, NavStore, NavTrailComponent, NothingComponent, NotificationElementComponent, NotificationGroupComponent, NotificationPopupComponent, NotificationService, NotificationStore, NotificationType, NotificationWidgetComponent, ONE_ASSET_BASE_URL, OPTIONS_SOURCE, OVERLAY_WIDGETS, OneApp, OptionsSourceDirective, OverlayBodyComponent, OverlayRef, OverlayService, PLATFORM_BUTTON_NAV_IDS, PLATFORM_EXTENSIBLE_NAV_IDS, PLATFORM_NAV_MAP, PLATFORM_ROOT_CHILDREN, PLUGIN_FALLBACK_LANG, PLUGIN_OUTPUT_EVENT, PLUGIN_SCREENS, PRICE_LADDER_LEVELS, PRICE_LADDER_RULES, PaddingDirective, PaginationComponent, PanelComponent, PercentagePipe, PlaygroundComponent, PluginComponent, PluginInputComponent, PluginOutputComponent, PositionDirective, PriceLadderComponent, PriceLadderMarkComponent, PriceLadderSignalComponent, PwaInstallComponent, RECENT_SEARCH_LIMIT, REMOTE_BOOT_TIMEOUT_MS, REMOTE_PAGE_RELOAD, ROOT_NAV, RadioGroupComponent, RadioInputComponent, RangeInputComponent, RatingInputComponent, ReactiveElementComponent, RemoteComponent, RemoteLoaderService, ResizeElementComponent, RouteContainer, RowComponent, SCORE_TONE_COUNT, SEARCH_ANSWER_KEY, SEARCH_LABEL_KEY, SEARCH_QUERY, SEARCH_RESULTS_EVENT, SECTION_ACCORDION_GROUP, SECTION_CHART_CUSTOM_RANGE, SECTION_CHART_SCALES, SECTION_FORM_CONTEXT, SECTION_TABLE_VARIANTS, SHARED_ICONS, SHARING_CLIENT, SIZE_CONTEXT, SPACING_INWARD, SPLASH_ID, ScoreComponent, ScoreSetComponent, ScoreSetItemComponent, ScrollComponent, ScrollService, SearchPanelComponent, SearchStore, SearchUserPanelComponent, SectionAccordionDirective, SectionAccordionGroupDirective, SectionBackComponent, SectionBadgesComponent, SectionButtonGroupComponent, SectionCardComponent, SectionCarouselComponent, SectionChartComponent, SectionChartSeriesComponent, SectionComponent, SectionFilterComponent, SectionFilterGroupComponent, SectionFilterMenuComponent, SectionFilterPanelComponent, SectionFilterRangePanelComponent, SectionFooterComponent, SectionFormComponent, SectionFormItemComponent, SectionHeaderComponent, SectionHeroComponent, SectionPaginationComponent, SectionSearchComponent, SectionStepperComponent, SectionTableCellComponent, SectionTableComponent, SectionTableRowComponent, SectionTableSortDirection, SectionTableSortPipe, SectionTabsComponent, SectionToggleComponent, SectionToggleItemDirective, SelectableCardInputComponent, SelectorDirective, SettingsSearchBarComponent, SettingsSearchService, ShapeComponent, SharedStoreRegistry, SidePanelDirective, SignColorPipe, Size, SocketStore, SortComponent, StatComponent, StepComponent, StepperComponent, StepsComponent, StorageService, StrokeLinecap, StrokeLinejoin, SummaryComponent, SvgGeneratorComponent, SvgGeneratorService, SvgService, TOTAL_COLUMNS, TRANSLATION_SOURCE, TableComponent, TechnicalMeterComponent, TextInputComponent, TextOutputComponent, TextareaInputComponent, ThemeComponent, ThemeDataService, ThemeService, ThemeStore, TimeAgoPipe, TimelineComponent, ToListPipe, ToggleButtonComponent, ToggleInputComponent, ToggleRadioInputComponent, ToolTipDirective, TooltipComponent, TranslatePipe, TranslateService, TreeGridComponent, URL_SEP, USER_STORE_REF, USER_TAB_MAP, UniverseComponent, UserApiService, UserAvatarComponent, UserComponent, UserNavComponent, UserSettingsComponent, UserStore, WC_BUNDLE, WC_NAVIGATE_EVENT, WC_ROUTE_CHANGED_EVENT, WC_SEARCH_GROUPS, WIN_USER_TAB_HOOK, WIN_USER_TAB_KEY, WatermarkComponent, WcRouterStore, WrapperInputComponent, actionName, activeElementWithin, allowedCodes, anchorNavId, appColorBrand, appLogoShadowColor, appThemeColorFactory, applyColorsToElement, applyDocEdit, assetOptions, baseUnderHost, bootstrapMagApp, bootstrapPwaInstall, browserLocale, buildWcBaseUrl, calculateLuminance, calculateRanks, categoricalTone, cellText, checkDoc, checkFilterCondition, childNavId, claimDenial, classListSignal, coerceSize, cornerEdge, cornerSide, createLoadingState, createMap, createPlatformNavMap, createPluginElement, definePluginScreens, definedWcBundleOf, definedWcTierOf, deriveAvatarGradient, deriveContrastColor, deriveOppositeColor, derivePropertyName, docActionKey, docAssetCandidates, docProblemKey, docRemotePath, emailValidation, enumValue, escapeHtml, evaluate, evaluateBool, existsInMap, exposeScreens, exposedScreensOf, fieldBoolean, fieldNumber, fieldString, filterHoldsList, filterHoldsOneBound, filterHoldsOptions, filterHoldsRange, filterList, filterNumber, filterNumberList, filterOne, filterPanelOf, filterPanelWidth, filterRange, filterTreeGridRows, filterValueList, filterValues, flattenTreeGridRows, formatBadgeCount, formatGap, fullName, gapPct, generateClipPath, generateTransform, getClassList, getFromMap, getProperty, getScrollParent, getTierFromPreviewPath, getTreeGridRow, getUniqueId, getValue, hasErrorComputed, heatColor, heatShare, hexToRgb, hslToRgb, initMagmoniumApp, initialNotificationState, initialState, initials, injectAuthenticate, injectDefaultDenial, injectInstallApp, injectParentSize, injectScrollSticky, isBootRedirect, isButtonName, isCancelledComputed, isExtensiblePlatformNavId, isJson, isLadderRule, isLightAppColor, isLoadingComputed, isLocalhost, isNavCountConfig, isNavInstanceConfig, isNavMenuConfig, isNavRowsConfig, isNavVisibilityConfig, isPlatformNavId, isPlatformPanelNavId, isReadableOn, isScoreStale, isSize, isTierPreview, isUrlLocalhost, isValidNavId, isValidNavSegment, isWebComponent, ladderLevelOf, ladderScale, ladderSignals, layoutLanes, linkToId, linkToNav, loadingActions, logoGlyphMaskUrl, mInterceptor, manualValidation, matchFieldValidation, matchMount, maxLengthValidation, maxValidation, mergePlatformNav, mergeUnique, mergeUniqueBy, mergeUniqueWith, minAgeValidation, minLengthValidation, minValidation, miniMarkInlineToHtml, miniMarkToHtml, mountFor, mountPatternProblem, mountPatternText, mountSegmentOf, mountTokenOf, navIdChain, navIdFor, navIdSegment, navIdToRoutePath, navIdToSegments, navParamOf, navTailMatcher, navToId, navVisibilityGuard, nextSectionTableSort, normalizeAppColor, normalizeAssetOptions, notExistsInMap, offsetOfLine, outletPathOf, outletSegmentsOf, paintAppColor, parentNavId, parseAddress, parseColor, parseMountPattern, parsePatternNames, patternValidation, patternsValidation, permissionRefusal, pickCount, pickSupportedLanguage, picksMembers, platformNavWidgets, pluginTag, presetDefaultOption, privateGuard, processImageToSvg, provideAppContext, provideMagAppConfig, provideMagWcConfig, provideMagWcRoutes, provideModalComponents, provideMurlUrlSerializer, provideNavWidgets, provideOverlayWidgets, providePlatformNavWidgets, providePluginRuntime, provideSearch, provideSizeContext, provideUserTabs, publicGuard, readChartPoints, readFieldPatterns, readableAppColor, rebuildLogoGlyph, recordDefinedWcTier, registerSessionRenewal, remoteOutletRoute, renderAddress, renderDocument, requiredValidation, resolveConfigAsset, resolveIconSize, resolvePallet, resolvePatternRules, resolveSize, resolveSpacing, rgbToHex, rgbToHsl, rowHasChildren, samePatterns, scoreBand, scoreStanding, sectionTableColumnId, sectionTableColumnWidths, sectionTableFrozenCount, segmentsToNavId, setProperty, setTreeGridChildren, setWcLocalPort, setWcTier, settingsWidgets, shouldShowBadge, sortSectionTableRows, splashHtml, splitNavId, splitOnMatch, splitPath, stringToColor, tailRouteOf, toAttrBool, toAttrNumber, toCssLength, toHostNavId, toLength, toLocalNavId, toggleGroup, toggleTreeGridRow, toggleUid, unfetchedPlatformNav, ungroupedDocActions, urlValidation, wcLocalBaseOf, wcTierOf, withLevel };
|
|
53956
55401
|
|
|
53957
55402
|
//# sourceMappingURL=magmonium-one.mjs.map
|