@akcelik/strct 4.17.0 → 4.19.0
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/fesm2022/akcelik-strct.mjs +526 -78
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +135 -3
|
@@ -18108,6 +18108,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
18108
18108
|
`, host: { class: 'strct-gauge' }, styles: [".strct-gauge{display:inline-block}.strct-gauge__wrap{position:relative}.strct-gauge__track{stroke:var(--bg-3)}@media(prefers-reduced-motion:no-preference){.strct-gauge__value{transition:stroke-dasharray .4s ease}}.strct-gauge__center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.strct-gauge__num{font-size:var(--text-2xl);font-weight:600;color:var(--t1);line-height:1}.strct-gauge__pct{font-size:12px;color:var(--t2);margin-inline-start:1px}.strct-gauge__label{font-size:12px;color:var(--t2);margin-top:3px}\n"] }]
|
|
18109
18109
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], thresholds: [{ type: i0.Input, args: [{ isSignal: true, alias: "thresholds", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], thickness: [{ type: i0.Input, args: [{ isSignal: true, alias: "thickness", required: false }] }] } });
|
|
18110
18110
|
|
|
18111
|
+
/**
|
|
18112
|
+
* A node's own content in a fan-out diagram — chips, a bar, a count. The
|
|
18113
|
+
* template's context is the node (`let-node`), including its `data`.
|
|
18114
|
+
*/
|
|
18115
|
+
class StrctFlowNodeTemplate {
|
|
18116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctFlowNodeTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
18117
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: StrctFlowNodeTemplate, isStandalone: true, selector: "ng-template[strctFlowNode]", ngImport: i0 });
|
|
18118
|
+
}
|
|
18119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctFlowNodeTemplate, decorators: [{
|
|
18120
|
+
type: Directive,
|
|
18121
|
+
args: [{ selector: 'ng-template[strctFlowNode]' }]
|
|
18122
|
+
}] });
|
|
18111
18123
|
/**
|
|
18112
18124
|
* Shows a connection between two (or N) endpoints with an optional animated
|
|
18113
18125
|
* "flow" — moving dots travelling along the connector — to represent live data
|
|
@@ -18141,6 +18153,148 @@ class StrctFlow {
|
|
|
18141
18153
|
/** Layout axis. */
|
|
18142
18154
|
orientation = input('horizontal', /* @ts-ignore */
|
|
18143
18155
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
18156
|
+
/**
|
|
18157
|
+
* `chain` (default) is the straight A → B connector. `fan-out` places nodes
|
|
18158
|
+
* in columns and draws the edges between them; `tree` is `fan-out` with the
|
|
18159
|
+
* columns derived from each node's depth.
|
|
18160
|
+
*/
|
|
18161
|
+
layout = input('chain', /* @ts-ignore */
|
|
18162
|
+
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
18163
|
+
/** The edges of a fan-out / tree. `null` keeps the consecutive chain. */
|
|
18164
|
+
edges = input(null, /* @ts-ignore */
|
|
18165
|
+
...(ngDevMode ? [{ debugName: "edges" }] : /* istanbul ignore next */ []));
|
|
18166
|
+
/** Column headings, in order. */
|
|
18167
|
+
columns = input(null, /* @ts-ignore */
|
|
18168
|
+
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
18169
|
+
host = inject(ElementRef);
|
|
18170
|
+
destroyRef = inject(DestroyRef);
|
|
18171
|
+
nodeTpl = contentChild(StrctFlowNodeTemplate, { ...(ngDevMode ? { debugName: "nodeTpl" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
18172
|
+
/** Which column each node sits in: its own, or its depth in the edge graph. */
|
|
18173
|
+
columnOf = computed(() => {
|
|
18174
|
+
const nodes = this.nodes();
|
|
18175
|
+
const map = new Map();
|
|
18176
|
+
if (this.layout() === 'tree') {
|
|
18177
|
+
const parents = new Map();
|
|
18178
|
+
for (const e of this.edges() ?? [])
|
|
18179
|
+
parents.set(e.to, e.from);
|
|
18180
|
+
const depth = (id, seen = new Set()) => {
|
|
18181
|
+
const parent = parents.get(id);
|
|
18182
|
+
if (parent === undefined || seen.has(id))
|
|
18183
|
+
return 0;
|
|
18184
|
+
seen.add(id);
|
|
18185
|
+
return depth(parent, seen) + 1;
|
|
18186
|
+
};
|
|
18187
|
+
for (const n of nodes)
|
|
18188
|
+
map.set(n.id, n.column ?? depth(n.id));
|
|
18189
|
+
return map;
|
|
18190
|
+
}
|
|
18191
|
+
for (const [i, n] of nodes.entries())
|
|
18192
|
+
map.set(n.id, n.column ?? i);
|
|
18193
|
+
return map;
|
|
18194
|
+
}, /* @ts-ignore */
|
|
18195
|
+
...(ngDevMode ? [{ debugName: "columnOf" }] : /* istanbul ignore next */ []));
|
|
18196
|
+
/** The columns as rendered: a heading (when given) and the nodes in it. */
|
|
18197
|
+
columnsView = computed(() => {
|
|
18198
|
+
const byColumn = new Map();
|
|
18199
|
+
for (const n of this.nodes()) {
|
|
18200
|
+
const c = this.columnOf().get(n.id) ?? 0;
|
|
18201
|
+
byColumn.set(c, [...(byColumn.get(c) ?? []), n]);
|
|
18202
|
+
}
|
|
18203
|
+
const headings = this.columns() ?? [];
|
|
18204
|
+
return [...byColumn.keys()]
|
|
18205
|
+
.sort((a, b) => a - b)
|
|
18206
|
+
.map((index) => ({ index, heading: headings[index] ?? '', nodes: byColumn.get(index) }));
|
|
18207
|
+
}, /* @ts-ignore */
|
|
18208
|
+
...(ngDevMode ? [{ debugName: "columnsView" }] : /* istanbul ignore next */ []));
|
|
18209
|
+
/** What a node says to assistive tech: itself, then where it leads. */
|
|
18210
|
+
nodeSummary(node) {
|
|
18211
|
+
const out = (this.edges() ?? [])
|
|
18212
|
+
.filter((e) => e.from === node.id)
|
|
18213
|
+
.map((e) => this.nodes().find((n) => n.id === e.to)?.label ?? e.to);
|
|
18214
|
+
return out.length ? `→ ${out.join(', ')}` : '';
|
|
18215
|
+
}
|
|
18216
|
+
/** Measured edge geometry — recomputed whenever the boxes move or resize. */
|
|
18217
|
+
edgePaths = signal([], /* @ts-ignore */
|
|
18218
|
+
...(ngDevMode ? [{ debugName: "edgePaths" }] : /* istanbul ignore next */ []));
|
|
18219
|
+
viewBox = signal('0 0 0 0', /* @ts-ignore */
|
|
18220
|
+
...(ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []));
|
|
18221
|
+
constructor() {
|
|
18222
|
+
afterNextRender(() => this.observe());
|
|
18223
|
+
// Re-measure when the data changes; the observer covers size changes.
|
|
18224
|
+
effect(() => {
|
|
18225
|
+
this.nodes();
|
|
18226
|
+
this.edges();
|
|
18227
|
+
this.layout();
|
|
18228
|
+
queueMicrotask(() => this.measure());
|
|
18229
|
+
});
|
|
18230
|
+
}
|
|
18231
|
+
observe() {
|
|
18232
|
+
if (this.layout() === 'chain' || typeof ResizeObserver === 'undefined')
|
|
18233
|
+
return;
|
|
18234
|
+
const fan = this.host.nativeElement.querySelector('.strct-flow__fan');
|
|
18235
|
+
if (!fan)
|
|
18236
|
+
return;
|
|
18237
|
+
const ro = new ResizeObserver(() => this.measure());
|
|
18238
|
+
ro.observe(fan);
|
|
18239
|
+
for (const box of fan.querySelectorAll('.strct-flow__box'))
|
|
18240
|
+
ro.observe(box);
|
|
18241
|
+
this.destroyRef.onDestroy(() => ro.disconnect());
|
|
18242
|
+
this.measure();
|
|
18243
|
+
}
|
|
18244
|
+
/**
|
|
18245
|
+
* Orthogonal connectors, from the boxes' real positions: out of the source's
|
|
18246
|
+
* inline end, across the gap, then into the target's inline start.
|
|
18247
|
+
*/
|
|
18248
|
+
measure() {
|
|
18249
|
+
if (this.layout() === 'chain')
|
|
18250
|
+
return;
|
|
18251
|
+
const fan = this.host.nativeElement.querySelector('.strct-flow__fan');
|
|
18252
|
+
const edges = this.edges();
|
|
18253
|
+
if (!fan || !edges?.length) {
|
|
18254
|
+
this.edgePaths.set([]);
|
|
18255
|
+
return;
|
|
18256
|
+
}
|
|
18257
|
+
const base = fan.getBoundingClientRect();
|
|
18258
|
+
this.viewBox.set(`0 0 ${Math.round(base.width)} ${Math.round(base.height)}`);
|
|
18259
|
+
// Looked up from the boxes themselves rather than through a selector: a
|
|
18260
|
+
// node id is consumer data, and CSS.escape is not everywhere (jsdom).
|
|
18261
|
+
const boxes = new Map();
|
|
18262
|
+
for (const el of fan.querySelectorAll('[data-flow-node]')) {
|
|
18263
|
+
const id = el.dataset['flowNode'];
|
|
18264
|
+
if (id)
|
|
18265
|
+
boxes.set(id, el);
|
|
18266
|
+
}
|
|
18267
|
+
const rect = (id) => {
|
|
18268
|
+
const el = boxes.get(id);
|
|
18269
|
+
if (!el)
|
|
18270
|
+
return null;
|
|
18271
|
+
const r = el.getBoundingClientRect();
|
|
18272
|
+
return { x: r.left - base.left, y: r.top - base.top, w: r.width, h: r.height };
|
|
18273
|
+
};
|
|
18274
|
+
const paths = [];
|
|
18275
|
+
for (const [i, e] of edges.entries()) {
|
|
18276
|
+
const a = rect(e.from);
|
|
18277
|
+
const b = rect(e.to);
|
|
18278
|
+
if (!a || !b)
|
|
18279
|
+
continue;
|
|
18280
|
+
const x1 = a.x + a.w;
|
|
18281
|
+
const y1 = a.y + a.h / 2;
|
|
18282
|
+
const x2 = b.x;
|
|
18283
|
+
const y2 = b.y + b.h / 2;
|
|
18284
|
+
const mid = x1 + (x2 - x1) / 2;
|
|
18285
|
+
const d = Math.abs(y1 - y2) < 1
|
|
18286
|
+
? `M ${x1} ${y1} L ${x2} ${y2}`
|
|
18287
|
+
: `M ${x1} ${y1} H ${mid} V ${y2} H ${x2}`;
|
|
18288
|
+
paths.push({
|
|
18289
|
+
key: `${e.from}-${e.to}-${i}`,
|
|
18290
|
+
d,
|
|
18291
|
+
status: e.status ?? 'neutral',
|
|
18292
|
+
dashed: e.style === 'dashed',
|
|
18293
|
+
animated: !!e.animated,
|
|
18294
|
+
});
|
|
18295
|
+
}
|
|
18296
|
+
this.edgePaths.set(paths);
|
|
18297
|
+
}
|
|
18144
18298
|
/** A flow needs at least two terminals to animate. */
|
|
18145
18299
|
connected = computed(() => this.nodes().length > 1, /* @ts-ignore */
|
|
18146
18300
|
...(ngDevMode ? [{ debugName: "connected" }] : /* istanbul ignore next */ []));
|
|
@@ -18172,103 +18326,210 @@ class StrctFlow {
|
|
|
18172
18326
|
}, /* @ts-ignore */
|
|
18173
18327
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
18174
18328
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctFlow, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18175
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctFlow, isStandalone: true, selector: "strct-flow", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, live: { classPropertyName: "live", publicName: "live", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } },
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
|
|
18180
|
-
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
|
|
18329
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctFlow, isStandalone: true, selector: "strct-flow", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, live: { classPropertyName: "live", publicName: "live", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, edges: { classPropertyName: "edges", publicName: "edges", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "layout() === 'chain' ? 'img' : null", "class.strct-flow--fan": "layout() !== 'chain'", "class.strct-flow--vertical": "orientation() === 'vertical'", "class.strct-flow--neutral": "status() === 'neutral'", "class.strct-flow--accent": "status() === 'accent'", "class.strct-flow--success": "status() === 'success'", "class.strct-flow--warning": "status() === 'warning'", "class.strct-flow--critical": "status() === 'critical'", "class.strct-flow--live": "animated()", "attr.aria-label": "layout() === 'chain' ? ariaLabel() : null" }, classAttribute: "strct-flow" }, queries: [{ propertyName: "nodeTpl", first: true, predicate: StrctFlowNodeTemplate, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
|
|
18330
|
+
@if (layout() !== 'chain') {
|
|
18331
|
+
<div class="strct-flow__fan" #fan>
|
|
18332
|
+
<!-- The edges are geometry, not content: they are measured from the
|
|
18333
|
+
boxes after they render, and hidden from assistive tech, which is
|
|
18334
|
+
given the structure instead. -->
|
|
18335
|
+
<svg class="strct-flow__edges" aria-hidden="true" [attr.viewBox]="viewBox()">
|
|
18336
|
+
@for (e of edgePaths(); track e.key) {
|
|
18337
|
+
<path
|
|
18338
|
+
class="strct-flow__edge strct-flow__edge--{{ e.status }}"
|
|
18339
|
+
[class.strct-flow__edge--dashed]="e.dashed"
|
|
18340
|
+
[class.strct-flow__edge--animated]="e.animated"
|
|
18341
|
+
[attr.d]="e.d"
|
|
18342
|
+
fill="none"
|
|
18343
|
+
/>
|
|
18344
|
+
}
|
|
18345
|
+
</svg>
|
|
18346
|
+
@for (col of columnsView(); track col.index) {
|
|
18347
|
+
<div class="strct-flow__col" role="group" [attr.aria-label]="col.heading || null">
|
|
18348
|
+
@if (col.heading) {
|
|
18349
|
+
<div class="strct-flow__colhead">{{ col.heading }}</div>
|
|
18187
18350
|
}
|
|
18188
|
-
|
|
18189
|
-
|
|
18351
|
+
<ul class="strct-flow__boxes">
|
|
18352
|
+
@for (node of col.nodes; track node.id) {
|
|
18353
|
+
<li
|
|
18354
|
+
class="strct-flow__box strct-flow__box--{{ node.status ?? 'neutral' }}"
|
|
18355
|
+
[attr.data-flow-node]="node.id"
|
|
18356
|
+
>
|
|
18357
|
+
@if (nodeTpl(); as tpl) {
|
|
18358
|
+
<ng-container
|
|
18359
|
+
[ngTemplateOutlet]="tpl"
|
|
18360
|
+
[ngTemplateOutletContext]="{ $implicit: node, node }"
|
|
18361
|
+
/>
|
|
18362
|
+
} @else {
|
|
18363
|
+
<span class="strct-flow__label">{{ node.label }}</span>
|
|
18364
|
+
@if (node.role) {
|
|
18365
|
+
<span class="strct-flow__role">{{ node.role }}</span>
|
|
18366
|
+
}
|
|
18367
|
+
@if (node.sublabel) {
|
|
18368
|
+
<span class="strct-flow__sub">{{ node.sublabel }}</span>
|
|
18369
|
+
}
|
|
18370
|
+
}
|
|
18371
|
+
<span class="strct-flow__sr">{{ nodeSummary(node) }}</span>
|
|
18372
|
+
</li>
|
|
18373
|
+
}
|
|
18374
|
+
</ul>
|
|
18375
|
+
</div>
|
|
18376
|
+
}
|
|
18377
|
+
</div>
|
|
18378
|
+
@if (label()) {
|
|
18379
|
+
<div class="strct-flow__caption">{{ label() }}</div>
|
|
18380
|
+
}
|
|
18381
|
+
} @else {
|
|
18382
|
+
<div class="strct-flow__row">
|
|
18383
|
+
@for (node of nodes(); track node.id; let last = $last) {
|
|
18384
|
+
<div class="strct-flow__node strct-flow__node--{{ node.status ?? 'neutral' }}">
|
|
18385
|
+
<span class="strct-flow__dot" aria-hidden="true"></span>
|
|
18386
|
+
<span class="strct-flow__node-text">
|
|
18387
|
+
<span class="strct-flow__label">{{ node.label }}</span>
|
|
18388
|
+
@if (node.role) {
|
|
18389
|
+
<span class="strct-flow__role">{{ node.role }}</span>
|
|
18390
|
+
}
|
|
18391
|
+
@if (node.sublabel) {
|
|
18392
|
+
<span class="strct-flow__sub">{{ node.sublabel }}</span>
|
|
18393
|
+
}
|
|
18394
|
+
</span>
|
|
18395
|
+
</div>
|
|
18190
18396
|
|
|
18191
|
-
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
@if (showArrow('forward')) {
|
|
18195
|
-
<span class="strct-flow__arrow strct-flow__arrow--fwd"></span>
|
|
18196
|
-
}
|
|
18197
|
-
@if (showArrow('reverse')) {
|
|
18198
|
-
<span class="strct-flow__arrow strct-flow__arrow--rev"></span>
|
|
18199
|
-
}
|
|
18200
|
-
@if (animated()) {
|
|
18397
|
+
@if (!last) {
|
|
18398
|
+
<div class="strct-flow__conn" aria-hidden="true">
|
|
18399
|
+
<span class="strct-flow__line"></span>
|
|
18201
18400
|
@if (showArrow('forward')) {
|
|
18202
|
-
<span class="strct-
|
|
18203
|
-
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--2"></span>
|
|
18204
|
-
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--3"></span>
|
|
18401
|
+
<span class="strct-flow__arrow strct-flow__arrow--fwd"></span>
|
|
18205
18402
|
}
|
|
18206
18403
|
@if (showArrow('reverse')) {
|
|
18207
|
-
<span class="strct-
|
|
18208
|
-
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--2"></span>
|
|
18209
|
-
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--3"></span>
|
|
18404
|
+
<span class="strct-flow__arrow strct-flow__arrow--rev"></span>
|
|
18210
18405
|
}
|
|
18211
|
-
|
|
18212
|
-
|
|
18406
|
+
@if (animated()) {
|
|
18407
|
+
@if (showArrow('forward')) {
|
|
18408
|
+
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--1"></span>
|
|
18409
|
+
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--2"></span>
|
|
18410
|
+
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--3"></span>
|
|
18411
|
+
}
|
|
18412
|
+
@if (showArrow('reverse')) {
|
|
18413
|
+
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--1"></span>
|
|
18414
|
+
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--2"></span>
|
|
18415
|
+
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--3"></span>
|
|
18416
|
+
}
|
|
18417
|
+
}
|
|
18418
|
+
</div>
|
|
18419
|
+
}
|
|
18213
18420
|
}
|
|
18214
|
-
|
|
18215
|
-
</div>
|
|
18421
|
+
</div>
|
|
18216
18422
|
|
|
18217
|
-
|
|
18218
|
-
|
|
18423
|
+
@if (caption()) {
|
|
18424
|
+
<div class="strct-flow__caption">{{ caption() }}</div>
|
|
18425
|
+
}
|
|
18219
18426
|
}
|
|
18220
|
-
`, isInline: true, styles: [".strct-flow{--strct-flow-color: var(--acc);display:block}.strct-flow--neutral{--strct-flow-color: var(--t3)}.strct-flow--accent{--strct-flow-color: var(--acc)}.strct-flow--success{--strct-flow-color: var(--success)}.strct-flow--warning{--strct-flow-color: var(--warning)}.strct-flow--critical{--strct-flow-color: var(--critical)}.strct-flow__row{display:flex;align-items:center;gap:var(--space-2)}.strct-flow--vertical .strct-flow__row{flex-direction:column;align-items:stretch}.strct-flow__node{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);flex-shrink:0}.strct-flow__dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;background:var(--t3)}.strct-flow__node--accent .strct-flow__dot{background:var(--acc)}.strct-flow__node--success .strct-flow__dot{background:var(--success)}.strct-flow__node--warning .strct-flow__dot{background:var(--warning)}.strct-flow__node--critical .strct-flow__dot{background:var(--critical)}.strct-flow__node-text{display:flex;flex-direction:column;gap:1px;min-width:0}.strct-flow__label{font-size:var(--text-md);font-weight:600;color:var(--t1);line-height:1.2}.strct-flow__role{font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--t3)}.strct-flow__sub{font-size:var(--text-sm);color:var(--t3)}.strct-flow__conn{position:relative;flex:1 1 auto;min-width:40px;height:2px;align-self:center}.strct-flow--vertical .strct-flow__conn{width:2px;min-width:0;height:28px;flex:0 0 28px;align-self:center}.strct-flow__line{position:absolute;inset:0;border-radius:2px;background:linear-gradient(to right,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow--vertical .strct-flow__line{background:linear-gradient(to bottom,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow__arrow{position:absolute;top:50%;width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent}.strct-flow__arrow--fwd{right:-1px;transform:translateY(-50%);border-inline-start:6px solid var(--strct-flow-color)}.strct-flow__arrow--rev{left:-1px;transform:translateY(-50%);border-inline-end:6px solid var(--strct-flow-color)}.strct-flow--vertical .strct-flow__arrow{top:auto;left:50%}.strct-flow--vertical .strct-flow__arrow--fwd{right:auto;bottom:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-top:6px solid var(--strct-flow-color);border-bottom:0}.strct-flow--vertical .strct-flow__arrow--rev{left:50%;top:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-bottom:6px solid var(--strct-flow-color);border-top:0}.strct-flow__pkt{position:absolute;top:50%;width:5px;height:5px;margin:-2.5px 0 0 -2.5px;border-radius:50%;background:var(--strct-flow-color);box-shadow:0 0 5px var(--strct-flow-color)}.strct-flow--vertical .strct-flow__pkt{top:0;left:50%}.strct-flow__pkt--fwd{animation:strct-flow-fwd 1.8s linear infinite}.strct-flow__pkt--rev{animation:strct-flow-rev 1.8s linear infinite}.strct-flow--vertical .strct-flow__pkt--fwd{animation-name:strct-flow-fwd-v}.strct-flow--vertical .strct-flow__pkt--rev{animation-name:strct-flow-rev-v}.strct-flow__pkt--2{animation-delay:.6s}.strct-flow__pkt--3{animation-delay:1.2s}@keyframes strct-flow-fwd{0%{left:0;opacity:0}15%,85%{opacity:1}to{left:100%;opacity:0}}@keyframes strct-flow-rev{0%{left:100%;opacity:0}15%,85%{opacity:1}to{left:0;opacity:0}}@keyframes strct-flow-fwd-v{0%{top:0;opacity:0}15%,85%{opacity:1}to{top:100%;opacity:0}}@keyframes strct-flow-rev-v{0%{top:100%;opacity:0}15%,85%{opacity:1}to{top:0;opacity:0}}.strct-flow__caption{margin-top:var(--space-2);text-align:center;font-size:var(--text-sm);color:var(--t3)}.strct-flow--vertical .strct-flow__caption{text-align:start}@media(prefers-reduced-motion:reduce){.strct-flow__pkt{display:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
18427
|
+
`, isInline: true, styles: [".strct-flow{--strct-flow-color: var(--acc);display:block}.strct-flow--neutral{--strct-flow-color: var(--t3)}.strct-flow--accent{--strct-flow-color: var(--acc)}.strct-flow--success{--strct-flow-color: var(--success)}.strct-flow--warning{--strct-flow-color: var(--warning)}.strct-flow--critical{--strct-flow-color: var(--critical)}.strct-flow__row{display:flex;align-items:center;gap:var(--space-2)}.strct-flow--vertical .strct-flow__row{flex-direction:column;align-items:stretch}.strct-flow--fan{container-type:inline-size}.strct-flow__fan{position:relative;display:flex;align-items:flex-start;gap:var(--strct-flow-col-gap, 48px)}.strct-flow__edges{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.strct-flow__edge{stroke:var(--b3);stroke-width:1.5}.strct-flow__edge--accent{stroke:var(--acc)}.strct-flow__edge--success{stroke:var(--success)}.strct-flow__edge--warning{stroke:var(--warning)}.strct-flow__edge--critical{stroke:var(--critical)}.strct-flow__edge--dashed{stroke-dasharray:4 3}.strct-flow__edge--animated{stroke-dasharray:5 4;animation:strct-flow-dash 1s linear infinite}@keyframes strct-flow-dash{to{stroke-dashoffset:-9}}@media(prefers-reduced-motion:reduce){.strct-flow__edge--animated{animation:none}}.strct-flow__col{position:relative;flex:1 1 0;min-width:0}.strct-flow__colhead{font-size:var(--text-sm);font-weight:600;color:var(--t3);margin-block-end:var(--space-2)}.strct-flow__boxes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-2)}.strct-flow__box{display:flex;flex-direction:column;gap:3px;padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);min-width:0}.strct-flow__box--accent{border-color:var(--acc30)}.strct-flow__box--success{border-color:var(--success)}.strct-flow__box--warning{border-color:var(--warning)}.strct-flow__box--critical{border-color:var(--critical)}.strct-flow__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@container (max-width: 480px){.strct-flow__fan{flex-direction:column;gap:var(--space-3)}.strct-flow__edges{display:none}.strct-flow__col{padding-inline-start:var(--space-3);border-inline-start:2px solid var(--b2)}}.strct-flow__node{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);flex-shrink:0}.strct-flow__dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;background:var(--t3)}.strct-flow__node--accent .strct-flow__dot{background:var(--acc)}.strct-flow__node--success .strct-flow__dot{background:var(--success)}.strct-flow__node--warning .strct-flow__dot{background:var(--warning)}.strct-flow__node--critical .strct-flow__dot{background:var(--critical)}.strct-flow__node-text{display:flex;flex-direction:column;gap:1px;min-width:0}.strct-flow__label{font-size:var(--text-md);font-weight:600;color:var(--t1);line-height:1.2}.strct-flow__role{font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--t3)}.strct-flow__sub{font-size:var(--text-sm);color:var(--t3)}.strct-flow__conn{position:relative;flex:1 1 auto;min-width:40px;height:2px;align-self:center}.strct-flow--vertical .strct-flow__conn{width:2px;min-width:0;height:28px;flex:0 0 28px;align-self:center}.strct-flow__line{position:absolute;inset:0;border-radius:2px;background:linear-gradient(to right,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow--vertical .strct-flow__line{background:linear-gradient(to bottom,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow__arrow{position:absolute;top:50%;width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent}.strct-flow__arrow--fwd{right:-1px;transform:translateY(-50%);border-inline-start:6px solid var(--strct-flow-color)}.strct-flow__arrow--rev{left:-1px;transform:translateY(-50%);border-inline-end:6px solid var(--strct-flow-color)}.strct-flow--vertical .strct-flow__arrow{top:auto;left:50%}.strct-flow--vertical .strct-flow__arrow--fwd{right:auto;bottom:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-top:6px solid var(--strct-flow-color);border-bottom:0}.strct-flow--vertical .strct-flow__arrow--rev{left:50%;top:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-bottom:6px solid var(--strct-flow-color);border-top:0}.strct-flow__pkt{position:absolute;top:50%;width:5px;height:5px;margin:-2.5px 0 0 -2.5px;border-radius:50%;background:var(--strct-flow-color);box-shadow:0 0 5px var(--strct-flow-color)}.strct-flow--vertical .strct-flow__pkt{top:0;left:50%}.strct-flow__pkt--fwd{animation:strct-flow-fwd 1.8s linear infinite}.strct-flow__pkt--rev{animation:strct-flow-rev 1.8s linear infinite}.strct-flow--vertical .strct-flow__pkt--fwd{animation-name:strct-flow-fwd-v}.strct-flow--vertical .strct-flow__pkt--rev{animation-name:strct-flow-rev-v}.strct-flow__pkt--2{animation-delay:.6s}.strct-flow__pkt--3{animation-delay:1.2s}@keyframes strct-flow-fwd{0%{left:0;opacity:0}15%,85%{opacity:1}to{left:100%;opacity:0}}@keyframes strct-flow-rev{0%{left:100%;opacity:0}15%,85%{opacity:1}to{left:0;opacity:0}}@keyframes strct-flow-fwd-v{0%{top:0;opacity:0}15%,85%{opacity:1}to{top:100%;opacity:0}}@keyframes strct-flow-rev-v{0%{top:100%;opacity:0}15%,85%{opacity:1}to{top:0;opacity:0}}.strct-flow__caption{margin-top:var(--space-2);text-align:center;font-size:var(--text-sm);color:var(--t3)}.strct-flow--vertical .strct-flow__caption{text-align:start}@media(prefers-reduced-motion:reduce){.strct-flow__pkt{display:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
18221
18428
|
}
|
|
18222
18429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctFlow, decorators: [{
|
|
18223
18430
|
type: Component,
|
|
18224
|
-
args: [{ selector: 'strct-flow', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
|
|
18228
|
-
|
|
18229
|
-
|
|
18230
|
-
|
|
18231
|
-
|
|
18232
|
-
|
|
18233
|
-
|
|
18234
|
-
|
|
18235
|
-
|
|
18431
|
+
args: [{ selector: 'strct-flow', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet], template: `
|
|
18432
|
+
@if (layout() !== 'chain') {
|
|
18433
|
+
<div class="strct-flow__fan" #fan>
|
|
18434
|
+
<!-- The edges are geometry, not content: they are measured from the
|
|
18435
|
+
boxes after they render, and hidden from assistive tech, which is
|
|
18436
|
+
given the structure instead. -->
|
|
18437
|
+
<svg class="strct-flow__edges" aria-hidden="true" [attr.viewBox]="viewBox()">
|
|
18438
|
+
@for (e of edgePaths(); track e.key) {
|
|
18439
|
+
<path
|
|
18440
|
+
class="strct-flow__edge strct-flow__edge--{{ e.status }}"
|
|
18441
|
+
[class.strct-flow__edge--dashed]="e.dashed"
|
|
18442
|
+
[class.strct-flow__edge--animated]="e.animated"
|
|
18443
|
+
[attr.d]="e.d"
|
|
18444
|
+
fill="none"
|
|
18445
|
+
/>
|
|
18446
|
+
}
|
|
18447
|
+
</svg>
|
|
18448
|
+
@for (col of columnsView(); track col.index) {
|
|
18449
|
+
<div class="strct-flow__col" role="group" [attr.aria-label]="col.heading || null">
|
|
18450
|
+
@if (col.heading) {
|
|
18451
|
+
<div class="strct-flow__colhead">{{ col.heading }}</div>
|
|
18236
18452
|
}
|
|
18237
|
-
|
|
18238
|
-
|
|
18453
|
+
<ul class="strct-flow__boxes">
|
|
18454
|
+
@for (node of col.nodes; track node.id) {
|
|
18455
|
+
<li
|
|
18456
|
+
class="strct-flow__box strct-flow__box--{{ node.status ?? 'neutral' }}"
|
|
18457
|
+
[attr.data-flow-node]="node.id"
|
|
18458
|
+
>
|
|
18459
|
+
@if (nodeTpl(); as tpl) {
|
|
18460
|
+
<ng-container
|
|
18461
|
+
[ngTemplateOutlet]="tpl"
|
|
18462
|
+
[ngTemplateOutletContext]="{ $implicit: node, node }"
|
|
18463
|
+
/>
|
|
18464
|
+
} @else {
|
|
18465
|
+
<span class="strct-flow__label">{{ node.label }}</span>
|
|
18466
|
+
@if (node.role) {
|
|
18467
|
+
<span class="strct-flow__role">{{ node.role }}</span>
|
|
18468
|
+
}
|
|
18469
|
+
@if (node.sublabel) {
|
|
18470
|
+
<span class="strct-flow__sub">{{ node.sublabel }}</span>
|
|
18471
|
+
}
|
|
18472
|
+
}
|
|
18473
|
+
<span class="strct-flow__sr">{{ nodeSummary(node) }}</span>
|
|
18474
|
+
</li>
|
|
18475
|
+
}
|
|
18476
|
+
</ul>
|
|
18477
|
+
</div>
|
|
18478
|
+
}
|
|
18479
|
+
</div>
|
|
18480
|
+
@if (label()) {
|
|
18481
|
+
<div class="strct-flow__caption">{{ label() }}</div>
|
|
18482
|
+
}
|
|
18483
|
+
} @else {
|
|
18484
|
+
<div class="strct-flow__row">
|
|
18485
|
+
@for (node of nodes(); track node.id; let last = $last) {
|
|
18486
|
+
<div class="strct-flow__node strct-flow__node--{{ node.status ?? 'neutral' }}">
|
|
18487
|
+
<span class="strct-flow__dot" aria-hidden="true"></span>
|
|
18488
|
+
<span class="strct-flow__node-text">
|
|
18489
|
+
<span class="strct-flow__label">{{ node.label }}</span>
|
|
18490
|
+
@if (node.role) {
|
|
18491
|
+
<span class="strct-flow__role">{{ node.role }}</span>
|
|
18492
|
+
}
|
|
18493
|
+
@if (node.sublabel) {
|
|
18494
|
+
<span class="strct-flow__sub">{{ node.sublabel }}</span>
|
|
18495
|
+
}
|
|
18496
|
+
</span>
|
|
18497
|
+
</div>
|
|
18239
18498
|
|
|
18240
|
-
|
|
18241
|
-
|
|
18242
|
-
|
|
18243
|
-
@if (showArrow('forward')) {
|
|
18244
|
-
<span class="strct-flow__arrow strct-flow__arrow--fwd"></span>
|
|
18245
|
-
}
|
|
18246
|
-
@if (showArrow('reverse')) {
|
|
18247
|
-
<span class="strct-flow__arrow strct-flow__arrow--rev"></span>
|
|
18248
|
-
}
|
|
18249
|
-
@if (animated()) {
|
|
18499
|
+
@if (!last) {
|
|
18500
|
+
<div class="strct-flow__conn" aria-hidden="true">
|
|
18501
|
+
<span class="strct-flow__line"></span>
|
|
18250
18502
|
@if (showArrow('forward')) {
|
|
18251
|
-
<span class="strct-
|
|
18252
|
-
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--2"></span>
|
|
18253
|
-
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--3"></span>
|
|
18503
|
+
<span class="strct-flow__arrow strct-flow__arrow--fwd"></span>
|
|
18254
18504
|
}
|
|
18255
18505
|
@if (showArrow('reverse')) {
|
|
18256
|
-
<span class="strct-
|
|
18257
|
-
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--2"></span>
|
|
18258
|
-
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--3"></span>
|
|
18506
|
+
<span class="strct-flow__arrow strct-flow__arrow--rev"></span>
|
|
18259
18507
|
}
|
|
18260
|
-
|
|
18261
|
-
|
|
18508
|
+
@if (animated()) {
|
|
18509
|
+
@if (showArrow('forward')) {
|
|
18510
|
+
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--1"></span>
|
|
18511
|
+
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--2"></span>
|
|
18512
|
+
<span class="strct-flow__pkt strct-flow__pkt--fwd strct-flow__pkt--3"></span>
|
|
18513
|
+
}
|
|
18514
|
+
@if (showArrow('reverse')) {
|
|
18515
|
+
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--1"></span>
|
|
18516
|
+
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--2"></span>
|
|
18517
|
+
<span class="strct-flow__pkt strct-flow__pkt--rev strct-flow__pkt--3"></span>
|
|
18518
|
+
}
|
|
18519
|
+
}
|
|
18520
|
+
</div>
|
|
18521
|
+
}
|
|
18262
18522
|
}
|
|
18263
|
-
|
|
18264
|
-
</div>
|
|
18523
|
+
</div>
|
|
18265
18524
|
|
|
18266
|
-
|
|
18267
|
-
|
|
18525
|
+
@if (caption()) {
|
|
18526
|
+
<div class="strct-flow__caption">{{ caption() }}</div>
|
|
18527
|
+
}
|
|
18268
18528
|
}
|
|
18269
18529
|
`, host: {
|
|
18270
18530
|
class: 'strct-flow',
|
|
18271
|
-
role: 'img',
|
|
18531
|
+
'[attr.role]': "layout() === 'chain' ? 'img' : null",
|
|
18532
|
+
'[class.strct-flow--fan]': "layout() !== 'chain'",
|
|
18272
18533
|
'[class.strct-flow--vertical]': "orientation() === 'vertical'",
|
|
18273
18534
|
'[class.strct-flow--neutral]': "status() === 'neutral'",
|
|
18274
18535
|
'[class.strct-flow--accent]': "status() === 'accent'",
|
|
@@ -18276,9 +18537,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
18276
18537
|
'[class.strct-flow--warning]': "status() === 'warning'",
|
|
18277
18538
|
'[class.strct-flow--critical]': "status() === 'critical'",
|
|
18278
18539
|
'[class.strct-flow--live]': 'animated()',
|
|
18279
|
-
'[attr.aria-label]': 'ariaLabel()
|
|
18280
|
-
}, styles: [".strct-flow{--strct-flow-color: var(--acc);display:block}.strct-flow--neutral{--strct-flow-color: var(--t3)}.strct-flow--accent{--strct-flow-color: var(--acc)}.strct-flow--success{--strct-flow-color: var(--success)}.strct-flow--warning{--strct-flow-color: var(--warning)}.strct-flow--critical{--strct-flow-color: var(--critical)}.strct-flow__row{display:flex;align-items:center;gap:var(--space-2)}.strct-flow--vertical .strct-flow__row{flex-direction:column;align-items:stretch}.strct-flow__node{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);flex-shrink:0}.strct-flow__dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;background:var(--t3)}.strct-flow__node--accent .strct-flow__dot{background:var(--acc)}.strct-flow__node--success .strct-flow__dot{background:var(--success)}.strct-flow__node--warning .strct-flow__dot{background:var(--warning)}.strct-flow__node--critical .strct-flow__dot{background:var(--critical)}.strct-flow__node-text{display:flex;flex-direction:column;gap:1px;min-width:0}.strct-flow__label{font-size:var(--text-md);font-weight:600;color:var(--t1);line-height:1.2}.strct-flow__role{font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--t3)}.strct-flow__sub{font-size:var(--text-sm);color:var(--t3)}.strct-flow__conn{position:relative;flex:1 1 auto;min-width:40px;height:2px;align-self:center}.strct-flow--vertical .strct-flow__conn{width:2px;min-width:0;height:28px;flex:0 0 28px;align-self:center}.strct-flow__line{position:absolute;inset:0;border-radius:2px;background:linear-gradient(to right,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow--vertical .strct-flow__line{background:linear-gradient(to bottom,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow__arrow{position:absolute;top:50%;width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent}.strct-flow__arrow--fwd{right:-1px;transform:translateY(-50%);border-inline-start:6px solid var(--strct-flow-color)}.strct-flow__arrow--rev{left:-1px;transform:translateY(-50%);border-inline-end:6px solid var(--strct-flow-color)}.strct-flow--vertical .strct-flow__arrow{top:auto;left:50%}.strct-flow--vertical .strct-flow__arrow--fwd{right:auto;bottom:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-top:6px solid var(--strct-flow-color);border-bottom:0}.strct-flow--vertical .strct-flow__arrow--rev{left:50%;top:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-bottom:6px solid var(--strct-flow-color);border-top:0}.strct-flow__pkt{position:absolute;top:50%;width:5px;height:5px;margin:-2.5px 0 0 -2.5px;border-radius:50%;background:var(--strct-flow-color);box-shadow:0 0 5px var(--strct-flow-color)}.strct-flow--vertical .strct-flow__pkt{top:0;left:50%}.strct-flow__pkt--fwd{animation:strct-flow-fwd 1.8s linear infinite}.strct-flow__pkt--rev{animation:strct-flow-rev 1.8s linear infinite}.strct-flow--vertical .strct-flow__pkt--fwd{animation-name:strct-flow-fwd-v}.strct-flow--vertical .strct-flow__pkt--rev{animation-name:strct-flow-rev-v}.strct-flow__pkt--2{animation-delay:.6s}.strct-flow__pkt--3{animation-delay:1.2s}@keyframes strct-flow-fwd{0%{left:0;opacity:0}15%,85%{opacity:1}to{left:100%;opacity:0}}@keyframes strct-flow-rev{0%{left:100%;opacity:0}15%,85%{opacity:1}to{left:0;opacity:0}}@keyframes strct-flow-fwd-v{0%{top:0;opacity:0}15%,85%{opacity:1}to{top:100%;opacity:0}}@keyframes strct-flow-rev-v{0%{top:100%;opacity:0}15%,85%{opacity:1}to{top:0;opacity:0}}.strct-flow__caption{margin-top:var(--space-2);text-align:center;font-size:var(--text-sm);color:var(--t3)}.strct-flow--vertical .strct-flow__caption{text-align:start}@media(prefers-reduced-motion:reduce){.strct-flow__pkt{display:none}}\n"] }]
|
|
18281
|
-
}], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], live: [{ type: i0.Input, args: [{ isSignal: true, alias: "live", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
|
|
18540
|
+
'[attr.aria-label]': "layout() === 'chain' ? ariaLabel() : null",
|
|
18541
|
+
}, styles: [".strct-flow{--strct-flow-color: var(--acc);display:block}.strct-flow--neutral{--strct-flow-color: var(--t3)}.strct-flow--accent{--strct-flow-color: var(--acc)}.strct-flow--success{--strct-flow-color: var(--success)}.strct-flow--warning{--strct-flow-color: var(--warning)}.strct-flow--critical{--strct-flow-color: var(--critical)}.strct-flow__row{display:flex;align-items:center;gap:var(--space-2)}.strct-flow--vertical .strct-flow__row{flex-direction:column;align-items:stretch}.strct-flow--fan{container-type:inline-size}.strct-flow__fan{position:relative;display:flex;align-items:flex-start;gap:var(--strct-flow-col-gap, 48px)}.strct-flow__edges{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.strct-flow__edge{stroke:var(--b3);stroke-width:1.5}.strct-flow__edge--accent{stroke:var(--acc)}.strct-flow__edge--success{stroke:var(--success)}.strct-flow__edge--warning{stroke:var(--warning)}.strct-flow__edge--critical{stroke:var(--critical)}.strct-flow__edge--dashed{stroke-dasharray:4 3}.strct-flow__edge--animated{stroke-dasharray:5 4;animation:strct-flow-dash 1s linear infinite}@keyframes strct-flow-dash{to{stroke-dashoffset:-9}}@media(prefers-reduced-motion:reduce){.strct-flow__edge--animated{animation:none}}.strct-flow__col{position:relative;flex:1 1 0;min-width:0}.strct-flow__colhead{font-size:var(--text-sm);font-weight:600;color:var(--t3);margin-block-end:var(--space-2)}.strct-flow__boxes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-2)}.strct-flow__box{display:flex;flex-direction:column;gap:3px;padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);min-width:0}.strct-flow__box--accent{border-color:var(--acc30)}.strct-flow__box--success{border-color:var(--success)}.strct-flow__box--warning{border-color:var(--warning)}.strct-flow__box--critical{border-color:var(--critical)}.strct-flow__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@container (max-width: 480px){.strct-flow__fan{flex-direction:column;gap:var(--space-3)}.strct-flow__edges{display:none}.strct-flow__col{padding-inline-start:var(--space-3);border-inline-start:2px solid var(--b2)}}.strct-flow__node{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-md);background:var(--bg-1);flex-shrink:0}.strct-flow__dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;background:var(--t3)}.strct-flow__node--accent .strct-flow__dot{background:var(--acc)}.strct-flow__node--success .strct-flow__dot{background:var(--success)}.strct-flow__node--warning .strct-flow__dot{background:var(--warning)}.strct-flow__node--critical .strct-flow__dot{background:var(--critical)}.strct-flow__node-text{display:flex;flex-direction:column;gap:1px;min-width:0}.strct-flow__label{font-size:var(--text-md);font-weight:600;color:var(--t1);line-height:1.2}.strct-flow__role{font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--t3)}.strct-flow__sub{font-size:var(--text-sm);color:var(--t3)}.strct-flow__conn{position:relative;flex:1 1 auto;min-width:40px;height:2px;align-self:center}.strct-flow--vertical .strct-flow__conn{width:2px;min-width:0;height:28px;flex:0 0 28px;align-self:center}.strct-flow__line{position:absolute;inset:0;border-radius:2px;background:linear-gradient(to right,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow--vertical .strct-flow__line{background:linear-gradient(to bottom,var(--b3),color-mix(in srgb,var(--strct-flow-color) 55%,transparent),var(--b3))}.strct-flow__arrow{position:absolute;top:50%;width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent}.strct-flow__arrow--fwd{right:-1px;transform:translateY(-50%);border-inline-start:6px solid var(--strct-flow-color)}.strct-flow__arrow--rev{left:-1px;transform:translateY(-50%);border-inline-end:6px solid var(--strct-flow-color)}.strct-flow--vertical .strct-flow__arrow{top:auto;left:50%}.strct-flow--vertical .strct-flow__arrow--fwd{right:auto;bottom:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-top:6px solid var(--strct-flow-color);border-bottom:0}.strct-flow--vertical .strct-flow__arrow--rev{left:50%;top:-1px;transform:translate(-50%);border-inline-start:4px solid transparent;border-inline-end:4px solid transparent;border-bottom:6px solid var(--strct-flow-color);border-top:0}.strct-flow__pkt{position:absolute;top:50%;width:5px;height:5px;margin:-2.5px 0 0 -2.5px;border-radius:50%;background:var(--strct-flow-color);box-shadow:0 0 5px var(--strct-flow-color)}.strct-flow--vertical .strct-flow__pkt{top:0;left:50%}.strct-flow__pkt--fwd{animation:strct-flow-fwd 1.8s linear infinite}.strct-flow__pkt--rev{animation:strct-flow-rev 1.8s linear infinite}.strct-flow--vertical .strct-flow__pkt--fwd{animation-name:strct-flow-fwd-v}.strct-flow--vertical .strct-flow__pkt--rev{animation-name:strct-flow-rev-v}.strct-flow__pkt--2{animation-delay:.6s}.strct-flow__pkt--3{animation-delay:1.2s}@keyframes strct-flow-fwd{0%{left:0;opacity:0}15%,85%{opacity:1}to{left:100%;opacity:0}}@keyframes strct-flow-rev{0%{left:100%;opacity:0}15%,85%{opacity:1}to{left:0;opacity:0}}@keyframes strct-flow-fwd-v{0%{top:0;opacity:0}15%,85%{opacity:1}to{top:100%;opacity:0}}@keyframes strct-flow-rev-v{0%{top:100%;opacity:0}15%,85%{opacity:1}to{top:0;opacity:0}}.strct-flow__caption{margin-top:var(--space-2);text-align:center;font-size:var(--text-sm);color:var(--t3)}.strct-flow--vertical .strct-flow__caption{text-align:start}@media(prefers-reduced-motion:reduce){.strct-flow__pkt{display:none}}\n"] }]
|
|
18542
|
+
}], ctorParameters: () => [], propDecorators: { nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], live: [{ type: i0.Input, args: [{ isSignal: true, alias: "live", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], edges: [{ type: i0.Input, args: [{ isSignal: true, alias: "edges", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], nodeTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrctFlowNodeTemplate), { ...{ read: TemplateRef }, isSignal: true }] }] } });
|
|
18282
18543
|
|
|
18283
18544
|
/**
|
|
18284
18545
|
* Dense KPI tile: a label, a large value (+ unit), an optional change indicator
|
|
@@ -22395,6 +22656,193 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
22395
22656
|
}, styles: [".strct-legend{display:block;font-size:var(--text-sm);color:var(--t2)}.strct-legend__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 14px}.strct-legend--vertical .strct-legend__list{flex-direction:column;flex-wrap:nowrap;gap:2px}.strct-legend__row{display:flex;align-items:center;gap:7px;min-width:0}.strct-legend__row--muted{opacity:.55}.strct-legend__hit{display:flex;align-items:center;gap:7px;min-width:0;padding:2px 4px;margin:-2px -4px;border:0;border-radius:var(--radius-sm);background:none;font:inherit;color:inherit;cursor:pointer}.strct-legend__hit:hover{background:var(--bg-3)}.strct-legend__hit:focus-visible{outline:2px solid var(--acc50);outline-offset:1px}.strct-legend__hit[aria-pressed=false]{opacity:.45}.strct-legend__hit[aria-pressed=false] .strct-legend__label{text-decoration:line-through}.strct-legend__swatch{flex:none;background:var(--strct-legend-color, var(--t3))}.strct-legend__swatch--square{width:9px;height:9px;border-radius:2px}.strct-legend__swatch--dot{width:9px;height:9px;border-radius:50%}.strct-legend__swatch--line{width:14px;height:2px;border-radius:1px}.strct-legend__swatch--dash{width:14px;height:2px;background:repeating-linear-gradient(to right,var(--strct-legend-color, var(--t3)) 0 4px,transparent 4px 7px)}.strct-legend__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.strct-legend__value{margin-inline-start:auto;padding-inline-start:8px;color:var(--t3);font-variant-numeric:tabular-nums}\n"] }]
|
|
22396
22657
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }] } });
|
|
22397
22658
|
|
|
22659
|
+
const STEP_LABELS = {
|
|
22660
|
+
pending: 'pending',
|
|
22661
|
+
active: 'in progress',
|
|
22662
|
+
done: 'done',
|
|
22663
|
+
failed: 'failed',
|
|
22664
|
+
skipped: 'skipped',
|
|
22665
|
+
blocked: 'blocked',
|
|
22666
|
+
};
|
|
22667
|
+
/**
|
|
22668
|
+
* Per-step action for `appearance="cards"`. The template's context is the step:
|
|
22669
|
+
*
|
|
22670
|
+
* <ng-template strctStepAction let-step>
|
|
22671
|
+
* <button strct-button size="sm" (click)="run(step)">Run</button>
|
|
22672
|
+
* </ng-template>
|
|
22673
|
+
*/
|
|
22674
|
+
class StrctStepAction {
|
|
22675
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStepAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
22676
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: StrctStepAction, isStandalone: true, selector: "ng-template[strctStepAction]", ngImport: i0 });
|
|
22677
|
+
}
|
|
22678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctStepAction, decorators: [{
|
|
22679
|
+
type: Directive,
|
|
22680
|
+
args: [{ selector: 'ng-template[strctStepAction]' }]
|
|
22681
|
+
}] });
|
|
22682
|
+
/**
|
|
22683
|
+
* A process the user *watches* rather than drives: an update run per host
|
|
22684
|
+
* (Check → Download → Install → Verify), or a numbered method on a landing
|
|
22685
|
+
* page. A wizard's rail is the wrong control — the user did not start each step
|
|
22686
|
+
* and cannot go back to one — and a timeline implies history. Neither says
|
|
22687
|
+
* "skipped" or "blocked".
|
|
22688
|
+
*
|
|
22689
|
+
* <strct-steps [steps]="run" appearance="pills" />
|
|
22690
|
+
* <strct-steps [steps]="method" appearance="cards" numbered />
|
|
22691
|
+
*/
|
|
22692
|
+
class StrctSteps {
|
|
22693
|
+
/** The steps, in order. */
|
|
22694
|
+
steps = input.required(/* @ts-ignore */
|
|
22695
|
+
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
22696
|
+
/** `pills` (default), `dots` for a long run, `cards` for a numbered method. */
|
|
22697
|
+
appearance = input('pills', /* @ts-ignore */
|
|
22698
|
+
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
22699
|
+
/** Vertical stacks the steps and turns the connector into a rail. */
|
|
22700
|
+
orientation = input('horizontal', /* @ts-ignore */
|
|
22701
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
22702
|
+
/** Numbers the pills (cards are always numbered). */
|
|
22703
|
+
numbered = input(false, { ...(ngDevMode ? { debugName: "numbered" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
22704
|
+
/** Tighter pills, for one row per host in a long list. */
|
|
22705
|
+
dense = input(false, { ...(ngDevMode ? { debugName: "dense" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
22706
|
+
/** The state words read after each label. */
|
|
22707
|
+
labels = input({}, /* @ts-ignore */
|
|
22708
|
+
...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
22709
|
+
actionTpl = contentChild(StrctStepAction, { ...(ngDevMode ? { debugName: "actionTpl" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
22710
|
+
L = computed(() => ({ ...STEP_LABELS, ...this.labels() }), /* @ts-ignore */
|
|
22711
|
+
...(ngDevMode ? [{ debugName: "L" }] : /* istanbul ignore next */ []));
|
|
22712
|
+
stateWord(state) {
|
|
22713
|
+
return this.L()[state];
|
|
22714
|
+
}
|
|
22715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctSteps, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22716
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctSteps, isStandalone: true, selector: "strct-steps", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, numbered: { classPropertyName: "numbered", publicName: "numbered", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-steps--dots": "appearance() === 'dots'", "class.strct-steps--cards": "appearance() === 'cards'", "class.strct-steps--vertical": "orientation() === 'vertical'", "class.strct-steps--numbered": "numbered()", "class.strct-steps--dense": "dense()" }, classAttribute: "strct-steps" }, queries: [{ propertyName: "actionTpl", first: true, predicate: StrctStepAction, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
|
|
22717
|
+
<ol class="strct-steps__list">
|
|
22718
|
+
@for (step of steps(); track step.id; let i = $index) {
|
|
22719
|
+
<li
|
|
22720
|
+
class="strct-steps__step"
|
|
22721
|
+
[attr.data-state]="step.state"
|
|
22722
|
+
[attr.aria-current]="step.state === 'active' ? 'step' : null"
|
|
22723
|
+
[attr.title]="appearance() === 'cards' ? null : step.description || null"
|
|
22724
|
+
>
|
|
22725
|
+
<span class="strct-steps__marker" aria-hidden="true">
|
|
22726
|
+
@if (numbered() || appearance() === 'cards') {
|
|
22727
|
+
{{ i + 1 }}
|
|
22728
|
+
}
|
|
22729
|
+
</span>
|
|
22730
|
+
<span class="strct-steps__text">
|
|
22731
|
+
<span class="strct-steps__label">{{ step.label }}</span>
|
|
22732
|
+
@if (appearance() === 'cards' && step.description) {
|
|
22733
|
+
<span class="strct-steps__desc">{{ step.description }}</span>
|
|
22734
|
+
}
|
|
22735
|
+
</span>
|
|
22736
|
+
@if (actionTpl(); as tpl) {
|
|
22737
|
+
<span class="strct-steps__action">
|
|
22738
|
+
<ng-container
|
|
22739
|
+
[ngTemplateOutlet]="tpl"
|
|
22740
|
+
[ngTemplateOutletContext]="{ $implicit: step, step }"
|
|
22741
|
+
/>
|
|
22742
|
+
</span>
|
|
22743
|
+
}
|
|
22744
|
+
<!-- The colour says the state; this says it in words. -->
|
|
22745
|
+
<span class="strct-steps__sr">{{ stateWord(step.state) }}</span>
|
|
22746
|
+
</li>
|
|
22747
|
+
}
|
|
22748
|
+
</ol>
|
|
22749
|
+
`, isInline: true, styles: [".strct-steps{display:block;min-width:0}.strct-steps__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 4px}.strct-steps--vertical .strct-steps__list{flex-direction:column;align-items:stretch;flex-wrap:nowrap}.strct-steps__step{position:relative;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--b2);border-radius:999px;font-size:var(--text-sm);color:var(--t2);background:var(--bg-1);min-width:0}.strct-steps--dense .strct-steps__step{padding:2px 8px}.strct-steps__list>.strct-steps__step+.strct-steps__step:before{content:\"\";position:absolute;inset-inline-start:-5px;width:5px;height:1px;background:var(--b2)}.strct-steps--vertical .strct-steps__list>.strct-steps__step+.strct-steps__step:before{inset-inline-start:14px;top:-7px;width:1px;height:7px}.strct-steps__marker:empty{display:none}.strct-steps__marker{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:50%;font-size:11px;font-weight:600;background:var(--bg-3);color:var(--t2)}.strct-steps__text{display:flex;flex-direction:column;min-width:0}.strct-steps__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.strct-steps__desc{font-size:var(--text-sm);color:var(--t3);white-space:normal}.strct-steps__action{margin-inline-start:auto;padding-inline-start:8px;flex:none}.strct-steps__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-steps__step[data-state=done]{border-color:var(--success);color:var(--success)}.strct-steps__step[data-state=done] .strct-steps__marker{background:var(--success);color:var(--inv)}.strct-steps__step[data-state=active]{border-color:var(--acc);color:var(--acc);background:var(--acc-s)}.strct-steps__step[data-state=active] .strct-steps__marker{background:var(--acc);color:var(--inv)}.strct-steps__step[data-state=failed]{border-color:var(--critical);color:var(--critical)}.strct-steps__step[data-state=failed] .strct-steps__marker{background:var(--critical);color:var(--inv)}.strct-steps__step[data-state=blocked]{border-color:var(--warning);color:var(--warning)}.strct-steps__step[data-state=blocked] .strct-steps__marker{background:var(--warning);color:var(--inv)}.strct-steps__step[data-state=skipped]{color:var(--t3);border-style:dashed}.strct-steps__step[data-state=skipped] .strct-steps__label{text-decoration:line-through}.strct-steps__step[data-state=pending]{color:var(--t3);border-color:var(--t4)}.strct-steps__step[data-state=active]:after{content:\"\";position:absolute;inset:-1px;border-radius:inherit;border:1px solid var(--acc);animation:strct-steps-pulse 1.4s ease-out infinite;pointer-events:none}@keyframes strct-steps-pulse{0%{opacity:.9;transform:scale(1)}to{opacity:0;transform:scale(1.06)}}@media(prefers-reduced-motion:reduce){.strct-steps__step[data-state=active]:after{animation:none;opacity:.5;transform:none}}.strct-steps--dots .strct-steps__step{padding:0;border:0;background:none;gap:4px}.strct-steps--dots .strct-steps__label{display:none}.strct-steps--dots .strct-steps__marker{display:inline-flex;width:9px;height:9px;font-size:0}.strct-steps--dots .strct-steps__step[data-state=pending] .strct-steps__marker{background:var(--bg-3);box-shadow:inset 0 0 0 1px var(--b3)}.strct-steps--dots .strct-steps__list>.strct-steps__step+.strct-steps__step:before{inset-inline-start:-4px;width:4px}.strct-steps--cards .strct-steps__list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(var(--strct-steps-card-min, 220px),100%),1fr));gap:var(--space-3)}.strct-steps--cards .strct-steps__step{align-items:flex-start;border-radius:var(--radius-lg);padding:var(--space-3);background:var(--bg-1)}.strct-steps--cards .strct-steps__label{font-weight:600;white-space:normal}.strct-steps--cards .strct-steps__list>.strct-steps__step+.strct-steps__step:before{content:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22750
|
+
}
|
|
22751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctSteps, decorators: [{
|
|
22752
|
+
type: Component,
|
|
22753
|
+
args: [{ selector: 'strct-steps', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet], template: `
|
|
22754
|
+
<ol class="strct-steps__list">
|
|
22755
|
+
@for (step of steps(); track step.id; let i = $index) {
|
|
22756
|
+
<li
|
|
22757
|
+
class="strct-steps__step"
|
|
22758
|
+
[attr.data-state]="step.state"
|
|
22759
|
+
[attr.aria-current]="step.state === 'active' ? 'step' : null"
|
|
22760
|
+
[attr.title]="appearance() === 'cards' ? null : step.description || null"
|
|
22761
|
+
>
|
|
22762
|
+
<span class="strct-steps__marker" aria-hidden="true">
|
|
22763
|
+
@if (numbered() || appearance() === 'cards') {
|
|
22764
|
+
{{ i + 1 }}
|
|
22765
|
+
}
|
|
22766
|
+
</span>
|
|
22767
|
+
<span class="strct-steps__text">
|
|
22768
|
+
<span class="strct-steps__label">{{ step.label }}</span>
|
|
22769
|
+
@if (appearance() === 'cards' && step.description) {
|
|
22770
|
+
<span class="strct-steps__desc">{{ step.description }}</span>
|
|
22771
|
+
}
|
|
22772
|
+
</span>
|
|
22773
|
+
@if (actionTpl(); as tpl) {
|
|
22774
|
+
<span class="strct-steps__action">
|
|
22775
|
+
<ng-container
|
|
22776
|
+
[ngTemplateOutlet]="tpl"
|
|
22777
|
+
[ngTemplateOutletContext]="{ $implicit: step, step }"
|
|
22778
|
+
/>
|
|
22779
|
+
</span>
|
|
22780
|
+
}
|
|
22781
|
+
<!-- The colour says the state; this says it in words. -->
|
|
22782
|
+
<span class="strct-steps__sr">{{ stateWord(step.state) }}</span>
|
|
22783
|
+
</li>
|
|
22784
|
+
}
|
|
22785
|
+
</ol>
|
|
22786
|
+
`, host: {
|
|
22787
|
+
class: 'strct-steps',
|
|
22788
|
+
'[class.strct-steps--dots]': "appearance() === 'dots'",
|
|
22789
|
+
'[class.strct-steps--cards]': "appearance() === 'cards'",
|
|
22790
|
+
'[class.strct-steps--vertical]': "orientation() === 'vertical'",
|
|
22791
|
+
'[class.strct-steps--numbered]': 'numbered()',
|
|
22792
|
+
'[class.strct-steps--dense]': 'dense()',
|
|
22793
|
+
}, styles: [".strct-steps{display:block;min-width:0}.strct-steps__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 4px}.strct-steps--vertical .strct-steps__list{flex-direction:column;align-items:stretch;flex-wrap:nowrap}.strct-steps__step{position:relative;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--b2);border-radius:999px;font-size:var(--text-sm);color:var(--t2);background:var(--bg-1);min-width:0}.strct-steps--dense .strct-steps__step{padding:2px 8px}.strct-steps__list>.strct-steps__step+.strct-steps__step:before{content:\"\";position:absolute;inset-inline-start:-5px;width:5px;height:1px;background:var(--b2)}.strct-steps--vertical .strct-steps__list>.strct-steps__step+.strct-steps__step:before{inset-inline-start:14px;top:-7px;width:1px;height:7px}.strct-steps__marker:empty{display:none}.strct-steps__marker{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:50%;font-size:11px;font-weight:600;background:var(--bg-3);color:var(--t2)}.strct-steps__text{display:flex;flex-direction:column;min-width:0}.strct-steps__label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.strct-steps__desc{font-size:var(--text-sm);color:var(--t3);white-space:normal}.strct-steps__action{margin-inline-start:auto;padding-inline-start:8px;flex:none}.strct-steps__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-steps__step[data-state=done]{border-color:var(--success);color:var(--success)}.strct-steps__step[data-state=done] .strct-steps__marker{background:var(--success);color:var(--inv)}.strct-steps__step[data-state=active]{border-color:var(--acc);color:var(--acc);background:var(--acc-s)}.strct-steps__step[data-state=active] .strct-steps__marker{background:var(--acc);color:var(--inv)}.strct-steps__step[data-state=failed]{border-color:var(--critical);color:var(--critical)}.strct-steps__step[data-state=failed] .strct-steps__marker{background:var(--critical);color:var(--inv)}.strct-steps__step[data-state=blocked]{border-color:var(--warning);color:var(--warning)}.strct-steps__step[data-state=blocked] .strct-steps__marker{background:var(--warning);color:var(--inv)}.strct-steps__step[data-state=skipped]{color:var(--t3);border-style:dashed}.strct-steps__step[data-state=skipped] .strct-steps__label{text-decoration:line-through}.strct-steps__step[data-state=pending]{color:var(--t3);border-color:var(--t4)}.strct-steps__step[data-state=active]:after{content:\"\";position:absolute;inset:-1px;border-radius:inherit;border:1px solid var(--acc);animation:strct-steps-pulse 1.4s ease-out infinite;pointer-events:none}@keyframes strct-steps-pulse{0%{opacity:.9;transform:scale(1)}to{opacity:0;transform:scale(1.06)}}@media(prefers-reduced-motion:reduce){.strct-steps__step[data-state=active]:after{animation:none;opacity:.5;transform:none}}.strct-steps--dots .strct-steps__step{padding:0;border:0;background:none;gap:4px}.strct-steps--dots .strct-steps__label{display:none}.strct-steps--dots .strct-steps__marker{display:inline-flex;width:9px;height:9px;font-size:0}.strct-steps--dots .strct-steps__step[data-state=pending] .strct-steps__marker{background:var(--bg-3);box-shadow:inset 0 0 0 1px var(--b3)}.strct-steps--dots .strct-steps__list>.strct-steps__step+.strct-steps__step:before{inset-inline-start:-4px;width:4px}.strct-steps--cards .strct-steps__list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(var(--strct-steps-card-min, 220px),100%),1fr));gap:var(--space-3)}.strct-steps--cards .strct-steps__step{align-items:flex-start;border-radius:var(--radius-lg);padding:var(--space-3);background:var(--bg-1)}.strct-steps--cards .strct-steps__label{font-weight:600;white-space:normal}.strct-steps--cards .strct-steps__list>.strct-steps__step+.strct-steps__step:before{content:none}\n"] }]
|
|
22794
|
+
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], numbered: [{ type: i0.Input, args: [{ isSignal: true, alias: "numbered", required: false }] }], dense: [{ type: i0.Input, args: [{ isSignal: true, alias: "dense", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], actionTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrctStepAction), { ...{ read: TemplateRef }, isSignal: true }] }] } });
|
|
22795
|
+
|
|
22796
|
+
/**
|
|
22797
|
+
* A value change, as one phrase: "v10.27 → v10.28". The old value is muted, the
|
|
22798
|
+
* arrow is the library's, the new one is emphasised — and assistive tech hears
|
|
22799
|
+
* a sentence rather than an arrow glyph.
|
|
22800
|
+
*
|
|
22801
|
+
* <strct-change from="v10.27" to="v10.28" mono />
|
|
22802
|
+
*/
|
|
22803
|
+
class StrctChange {
|
|
22804
|
+
/** The value before. */
|
|
22805
|
+
from = input.required(/* @ts-ignore */
|
|
22806
|
+
...(ngDevMode ? [{ debugName: "from" }] : /* istanbul ignore next */ []));
|
|
22807
|
+
/** The value after. */
|
|
22808
|
+
to = input.required(/* @ts-ignore */
|
|
22809
|
+
...(ngDevMode ? [{ debugName: "to" }] : /* istanbul ignore next */ []));
|
|
22810
|
+
/** Monospace, for versions and identifiers. */
|
|
22811
|
+
mono = input(false, { ...(ngDevMode ? { debugName: "mono" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
22812
|
+
/** What assistive tech hears in place of the arrow (localisable). */
|
|
22813
|
+
label = input((from, to) => `from ${from} to ${to}`, /* @ts-ignore */
|
|
22814
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
22815
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChange, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22816
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: StrctChange, isStandalone: true, selector: "strct-change", inputs: { from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: true, transformFunction: null }, to: { classPropertyName: "to", publicName: "to", isSignal: true, isRequired: true, transformFunction: null }, mono: { classPropertyName: "mono", publicName: "mono", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.strct-change--mono": "mono()" }, classAttribute: "strct-change" }, ngImport: i0, template: `
|
|
22817
|
+
<span class="strct-change__from" aria-hidden="true">{{ from() }}</span>
|
|
22818
|
+
<strct-icon
|
|
22819
|
+
class="strct-change__arrow"
|
|
22820
|
+
strictName="arrowRight"
|
|
22821
|
+
[size]="13"
|
|
22822
|
+
aria-hidden="true"
|
|
22823
|
+
/>
|
|
22824
|
+
<span class="strct-change__to" aria-hidden="true">{{ to() }}</span>
|
|
22825
|
+
<span class="strct-change__sr">{{ label()(from(), to()) }}</span>
|
|
22826
|
+
`, isInline: true, styles: [".strct-change{display:inline-flex;align-items:center;gap:5px;min-width:0}.strct-change--mono{font-family:var(--mono);font-size:var(--text-sm)}.strct-change__from{color:var(--t3)}.strct-change__arrow{color:var(--t3);flex:none}.strct-change__to{color:var(--t1);font-weight:600}.strct-change__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
22827
|
+
}
|
|
22828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChange, decorators: [{
|
|
22829
|
+
type: Component,
|
|
22830
|
+
args: [{ selector: 'strct-change', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [StrctIcon], template: `
|
|
22831
|
+
<span class="strct-change__from" aria-hidden="true">{{ from() }}</span>
|
|
22832
|
+
<strct-icon
|
|
22833
|
+
class="strct-change__arrow"
|
|
22834
|
+
strictName="arrowRight"
|
|
22835
|
+
[size]="13"
|
|
22836
|
+
aria-hidden="true"
|
|
22837
|
+
/>
|
|
22838
|
+
<span class="strct-change__to" aria-hidden="true">{{ to() }}</span>
|
|
22839
|
+
<span class="strct-change__sr">{{ label()(from(), to()) }}</span>
|
|
22840
|
+
`, host: {
|
|
22841
|
+
class: 'strct-change',
|
|
22842
|
+
'[class.strct-change--mono]': 'mono()',
|
|
22843
|
+
}, styles: [".strct-change{display:inline-flex;align-items:center;gap:5px;min-width:0}.strct-change--mono{font-family:var(--mono);font-size:var(--text-sm)}.strct-change__from{color:var(--t3)}.strct-change__arrow{color:var(--t3);flex:none}.strct-change__to{color:var(--t1);font-weight:600}.strct-change__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
|
|
22844
|
+
}], propDecorators: { from: [{ type: i0.Input, args: [{ isSignal: true, alias: "from", required: true }] }], to: [{ type: i0.Input, args: [{ isSignal: true, alias: "to", required: true }] }], mono: [{ type: i0.Input, args: [{ isSignal: true, alias: "mono", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
22845
|
+
|
|
22398
22846
|
/**
|
|
22399
22847
|
* A generic anchored overlay panel for arbitrary projected content — the
|
|
22400
22848
|
* public primitive behind menus, signposts and rich pickers:
|
|
@@ -24261,5 +24709,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
24261
24709
|
* Generated bundle index. Do not edit.
|
|
24262
24710
|
*/
|
|
24263
24711
|
|
|
24264
|
-
export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctControlDescription, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownItemAction, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLegend, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLiveIndicator, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctTagLeading, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
|
|
24712
|
+
export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChange, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctControlDescription, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownItemAction, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFlowNodeTemplate, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLegend, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLiveIndicator, StrctLogViewer, StrctLogin, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderItem, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctStepAction, StrctSteps, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctTagLeading, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
|
|
24265
24713
|
//# sourceMappingURL=akcelik-strct.mjs.map
|