@ng-prism/core 21.4.5 → 21.5.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/dist/app/canvas/prism-canvas-rulers.component.d.ts +16 -0
- package/dist/app/canvas/prism-canvas-rulers.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-canvas-rulers.component.js +177 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +14 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-canvas-toolbar.component.js +144 -0
- package/dist/app/canvas/prism-code-drawer.component.d.ts +12 -0
- package/dist/app/canvas/prism-code-drawer.component.d.ts.map +1 -0
- package/dist/app/canvas/prism-code-drawer.component.js +114 -0
- package/dist/app/component-head/prism-component-head.component.d.ts +15 -0
- package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -0
- package/dist/app/component-head/prism-component-head.component.js +207 -0
- package/dist/app/component-head/prism-stat.component.d.ts +10 -0
- package/dist/app/component-head/prism-stat.component.d.ts.map +1 -0
- package/dist/app/component-head/prism-stat.component.js +52 -0
- package/dist/app/controls/boolean-control.component.d.ts.map +1 -1
- package/dist/app/controls/boolean-control.component.js +16 -44
- package/dist/app/controls/json-control.component.d.ts.map +1 -1
- package/dist/app/controls/json-control.component.js +33 -54
- package/dist/app/controls/number-control.component.d.ts.map +1 -1
- package/dist/app/controls/number-control.component.js +18 -35
- package/dist/app/controls/string-control.component.d.ts.map +1 -1
- package/dist/app/controls/string-control.component.js +14 -41
- package/dist/app/controls/union-control.component.d.ts.map +1 -1
- package/dist/app/controls/union-control.component.js +26 -50
- package/dist/app/directives/prism-resizer.directive.d.ts +14 -0
- package/dist/app/directives/prism-resizer.directive.d.ts.map +1 -0
- package/dist/app/directives/prism-resizer.directive.js +71 -0
- package/dist/app/header/prism-header.component.d.ts +3 -0
- package/dist/app/header/prism-header.component.d.ts.map +1 -1
- package/dist/app/header/prism-header.component.js +91 -215
- package/dist/app/icons/prism-icon.component.d.ts +10 -0
- package/dist/app/icons/prism-icon.component.d.ts.map +1 -0
- package/dist/app/icons/prism-icon.component.js +64 -0
- package/dist/app/index.d.ts +4 -3
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +4 -3
- package/dist/app/layout-menu/prism-layout-menu.component.d.ts.map +1 -1
- package/dist/app/layout-menu/prism-layout-menu.component.js +63 -69
- package/dist/app/panels/a11y/a11y-core.plugin.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-core.plugin.js +1 -0
- package/dist/app/panels/a11y/a11y-keyboard.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-keyboard.component.js +61 -100
- package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts +4 -0
- package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-overlay-host.component.js +87 -11
- package/dist/app/panels/a11y/a11y-panel.component.d.ts +0 -2
- package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-panel.component.js +70 -85
- package/dist/app/panels/a11y/a11y-score.component.d.ts +2 -1
- package/dist/app/panels/a11y/a11y-score.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-score.component.js +55 -49
- package/dist/app/panels/a11y/a11y-sr.component.d.ts +1 -9
- package/dist/app/panels/a11y/a11y-sr.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-sr.component.js +60 -208
- package/dist/app/panels/a11y/a11y-tree.component.d.ts +2 -4
- package/dist/app/panels/a11y/a11y-tree.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-tree.component.js +92 -137
- package/dist/app/panels/a11y/a11y-violations.component.d.ts +2 -6
- package/dist/app/panels/a11y/a11y-violations.component.d.ts.map +1 -1
- package/dist/app/panels/a11y/a11y-violations.component.js +126 -373
- package/dist/app/panels/controls/controls-plugin.d.ts.map +1 -1
- package/dist/app/panels/controls/controls-plugin.js +1 -0
- package/dist/app/panels/controls/prism-controls-panel.component.d.ts.map +1 -1
- package/dist/app/panels/controls/prism-controls-panel.component.js +96 -88
- package/dist/app/panels/events/events-plugin.d.ts.map +1 -1
- package/dist/app/panels/events/events-plugin.js +1 -0
- package/dist/app/panels/events/prism-events-panel.component.d.ts +1 -0
- package/dist/app/panels/events/prism-events-panel.component.d.ts.map +1 -1
- package/dist/app/panels/events/prism-events-panel.component.js +44 -46
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +7 -2
- package/dist/app/panels/panel-host/prism-panel-host.component.d.ts.map +1 -1
- package/dist/app/panels/panel-host/prism-panel-host.component.js +102 -42
- package/dist/app/renderer/prism-renderer.component.d.ts +5 -6
- package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
- package/dist/app/renderer/prism-renderer.component.js +84 -150
- package/dist/app/services/prism-canvas.service.d.ts +18 -0
- package/dist/app/services/prism-canvas.service.d.ts.map +1 -0
- package/dist/app/services/prism-canvas.service.js +63 -0
- package/dist/app/services/prism-theme.service.d.ts +13 -1
- package/dist/app/services/prism-theme.service.d.ts.map +1 -1
- package/dist/app/services/prism-theme.service.js +56 -9
- package/dist/app/shell/prism-shell.component.d.ts +1 -2
- package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
- package/dist/app/shell/prism-shell.component.js +189 -178
- package/dist/app/sidebar/prism-sidebar.component.d.ts +16 -10
- package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
- package/dist/app/sidebar/prism-sidebar.component.js +318 -204
- package/dist/app/theme/prism-default-theme.d.ts +1 -0
- package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
- package/dist/app/theme/prism-default-theme.js +53 -34
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts +13 -0
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -0
- package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +134 -0
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts.map +1 -1
- package/dist/app/view-tab-bar/prism-view-tab-bar.component.js +15 -11
- package/dist/decorator/showcase.decorator.d.ts +1 -3
- package/dist/decorator/showcase.decorator.d.ts.map +1 -1
- package/dist/decorator/showcase.decorator.js +2 -6
- package/dist/plugin/plugin.types.d.ts +1 -0
- package/dist/plugin/plugin.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,107 +3,82 @@ import { A11yTreeService } from './a11y-tree.service.js';
|
|
|
3
3
|
import { PrismRendererService } from '../../services/prism-renderer.service.js';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
const _forTrack0 = ($index, $item) => $item.key;
|
|
6
|
+
function A11yTreeNodeComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵtext(0);
|
|
8
|
+
} if (rf & 2) {
|
|
9
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.isLast() ? "\u2514\u2500" : "\u251C\u2500", " ");
|
|
11
|
+
} }
|
|
6
12
|
function A11yTreeNodeComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
-
i0.ɵɵ
|
|
13
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
14
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
15
|
+
i0.ɵɵlistener("click", function A11yTreeNodeComponent_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.toggleExpanded()); });
|
|
8
16
|
i0.ɵɵtext(1);
|
|
9
17
|
i0.ɵɵelementEnd();
|
|
10
18
|
} if (rf & 2) {
|
|
11
19
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
12
20
|
i0.ɵɵadvance();
|
|
13
|
-
i0.ɵɵ
|
|
21
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.expanded() ? "\u25BE" : "\u25B8", " ");
|
|
14
22
|
} }
|
|
15
|
-
function
|
|
23
|
+
function A11yTreeNodeComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
16
24
|
i0.ɵɵelementStart(0, "span", 4);
|
|
17
|
-
i0.ɵɵtext(1, "\u00B7");
|
|
18
|
-
i0.ɵɵelementEnd();
|
|
19
|
-
} }
|
|
20
|
-
function A11yTreeNodeComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
-
i0.ɵɵelementStart(0, "span", 6);
|
|
22
25
|
i0.ɵɵtext(1);
|
|
23
26
|
i0.ɵɵelementEnd();
|
|
24
27
|
} if (rf & 2) {
|
|
25
28
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
26
29
|
i0.ɵɵadvance();
|
|
27
|
-
i0.ɵɵtextInterpolate1("
|
|
30
|
+
i0.ɵɵtextInterpolate1("\"", ctx_r0.node().name, "\"");
|
|
28
31
|
} }
|
|
29
|
-
function
|
|
30
|
-
i0.ɵɵelementStart(0, "span",
|
|
32
|
+
function A11yTreeNodeComponent_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
31
34
|
i0.ɵɵtext(1);
|
|
32
35
|
i0.ɵɵelementEnd();
|
|
33
36
|
} if (rf & 2) {
|
|
34
|
-
const
|
|
37
|
+
const entry_r3 = ctx.$implicit;
|
|
35
38
|
i0.ɵɵadvance();
|
|
36
|
-
i0.ɵɵ
|
|
37
|
-
} }
|
|
38
|
-
function A11yTreeNodeComponent_Conditional_10_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
-
i0.ɵɵelement(0, "prism-a11y-tree-node", 8);
|
|
40
|
-
} if (rf & 2) {
|
|
41
|
-
const child_r3 = ctx.$implicit;
|
|
42
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
43
|
-
i0.ɵɵproperty("node", child_r3)("depth", ctx_r0.depth() + 1);
|
|
39
|
+
i0.ɵɵtextInterpolate1("[", entry_r3.label, "]");
|
|
44
40
|
} }
|
|
45
|
-
function
|
|
46
|
-
i0.ɵɵ
|
|
47
|
-
i0.ɵɵtext(2);
|
|
48
|
-
i0.ɵɵelementEnd()();
|
|
41
|
+
function A11yTreeNodeComponent_Conditional_9_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
+
i0.ɵɵelement(0, "prism-a11y-tree-node", 7);
|
|
49
43
|
} if (rf & 2) {
|
|
44
|
+
const child_r4 = ctx.$implicit;
|
|
45
|
+
const ɵ$index_23_r5 = ctx.$index;
|
|
46
|
+
const ɵ$count_23_r6 = ctx.$count;
|
|
50
47
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
51
|
-
i0.ɵɵ
|
|
52
|
-
i0.ɵɵadvance(2);
|
|
53
|
-
i0.ɵɵtextInterpolate2(" ", ctx_r0.hiddenChildren().length, " hidden element", ctx_r0.hiddenChildren().length > 1 ? "s" : "", " (aria-hidden) ");
|
|
48
|
+
i0.ɵɵproperty("node", child_r4)("depth", ctx_r0.depth() + 1)("isLast", ɵ$index_23_r5 === ɵ$count_23_r6 - 1);
|
|
54
49
|
} }
|
|
55
|
-
function
|
|
56
|
-
i0.ɵɵrepeaterCreate(0,
|
|
57
|
-
i0.ɵɵconditionalCreate(2, A11yTreeNodeComponent_Conditional_10_Conditional_2_Template, 3, 4, "div", 9);
|
|
50
|
+
function A11yTreeNodeComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
i0.ɵɵrepeaterCreate(0, A11yTreeNodeComponent_Conditional_9_For_1_Template, 1, 3, "prism-a11y-tree-node", 7, i0.ɵɵrepeaterTrackByIndex);
|
|
58
52
|
} if (rf & 2) {
|
|
59
53
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
60
|
-
i0.ɵɵrepeater(ctx_r0.
|
|
61
|
-
i0.ɵɵadvance(2);
|
|
62
|
-
i0.ɵɵconditional(ctx_r0.hiddenChildren().length ? 2 : -1);
|
|
54
|
+
i0.ɵɵrepeater(ctx_r0.node().children);
|
|
63
55
|
} }
|
|
64
|
-
function
|
|
65
|
-
i0.ɵɵelementStart(0, "div",
|
|
66
|
-
i0.ɵɵtext(1, "Select a component to inspect the accessibility tree.");
|
|
56
|
+
function A11yTreeComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
58
|
+
i0.ɵɵtext(1, " Select a component to inspect the accessibility tree. ");
|
|
67
59
|
i0.ɵɵelementEnd();
|
|
68
60
|
} }
|
|
69
|
-
function
|
|
70
|
-
i0.ɵɵ
|
|
71
|
-
|
|
72
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
73
|
-
i0.ɵɵproperty("node", ctx_r1.tree())("depth", 0);
|
|
74
|
-
} }
|
|
75
|
-
function A11yTreeComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
77
|
-
i0.ɵɵelementStart(0, "div", 2)(1, "span");
|
|
78
|
-
i0.ɵɵtext(2, "Accessibility tree");
|
|
79
|
-
i0.ɵɵelementEnd();
|
|
80
|
-
i0.ɵɵelementStart(3, "button", 3);
|
|
81
|
-
i0.ɵɵlistener("click", function A11yTreeComponent_Conditional_2_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.expandAll.update(v => !v)); });
|
|
82
|
-
i0.ɵɵtext(4);
|
|
83
|
-
i0.ɵɵelementEnd()();
|
|
84
|
-
i0.ɵɵelementStart(5, "div", 4);
|
|
85
|
-
i0.ɵɵconditionalCreate(6, A11yTreeComponent_Conditional_2_Conditional_6_Template, 1, 2, "prism-a11y-tree-node", 5);
|
|
61
|
+
function A11yTreeComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
63
|
+
i0.ɵɵelement(1, "prism-a11y-tree-node", 2);
|
|
86
64
|
i0.ɵɵelementEnd();
|
|
87
65
|
} if (rf & 2) {
|
|
88
|
-
const
|
|
89
|
-
i0.ɵɵadvance(
|
|
90
|
-
i0.ɵɵ
|
|
91
|
-
i0.ɵɵadvance(2);
|
|
92
|
-
i0.ɵɵconditional(ctx_r1.tree() ? 6 : -1);
|
|
66
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
67
|
+
i0.ɵɵadvance();
|
|
68
|
+
i0.ɵɵproperty("node", ctx_r0.tree())("depth", 0)("isLast", true);
|
|
93
69
|
} }
|
|
94
70
|
export class A11yTreeNodeComponent {
|
|
95
71
|
node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
96
72
|
depth = input(0, ...(ngDevMode ? [{ debugName: "depth" }] : []));
|
|
73
|
+
isLast = input(false, ...(ngDevMode ? [{ debugName: "isLast" }] : []));
|
|
97
74
|
expanded = signal(true, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
|
|
98
|
-
visibleChildren = computed(() => this.node().children.filter((c) => !c.hidden), ...(ngDevMode ? [{ debugName: "visibleChildren" }] : []));
|
|
99
|
-
hiddenChildren = computed(() => this.node().children.filter((c) => c.hidden), ...(ngDevMode ? [{ debugName: "hiddenChildren" }] : []));
|
|
100
75
|
stateEntries = computed(() => {
|
|
101
76
|
const states = this.node().states;
|
|
102
77
|
return Object.entries(states)
|
|
103
78
|
.filter(([key]) => key !== 'hidden')
|
|
104
79
|
.map(([key, value]) => ({
|
|
105
80
|
key,
|
|
106
|
-
label: value === true ? key : `${key}
|
|
81
|
+
label: value === true ? key : `${key}=${value}`,
|
|
107
82
|
}));
|
|
108
83
|
}, ...(ngDevMode ? [{ debugName: "stateEntries" }] : []));
|
|
109
84
|
toggleExpanded() {
|
|
@@ -112,81 +87,72 @@ export class A11yTreeNodeComponent {
|
|
|
112
87
|
}
|
|
113
88
|
}
|
|
114
89
|
static ɵfac = function A11yTreeNodeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yTreeNodeComponent)(); };
|
|
115
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yTreeNodeComponent, selectors: [["prism-a11y-tree-node"]], inputs: { node: [1, "node"], depth: [1, "depth"] }, decls:
|
|
116
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "
|
|
117
|
-
i0.ɵɵ
|
|
118
|
-
i0.ɵɵelement(2, "span", 2);
|
|
119
|
-
i0.ɵɵconditionalCreate(3, A11yTreeNodeComponent_Conditional_3_Template, 2, 1, "span", 3)(4, A11yTreeNodeComponent_Conditional_4_Template, 2, 0, "span", 4);
|
|
120
|
-
i0.ɵɵelementStart(5, "span", 5);
|
|
121
|
-
i0.ɵɵtext(6);
|
|
90
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yTreeNodeComponent, selectors: [["prism-a11y-tree-node"]], inputs: { node: [1, "node"], depth: [1, "depth"], isLast: [1, "isLast"] }, decls: 10, vars: 9, consts: [[1, "aria-tree-line"], [1, "indent"], [1, "tree-toggle"], [1, "role"], [1, "name"], [1, "attr"], [1, "tree-toggle", 3, "click"], [3, "node", "depth", "isLast"]], template: function A11yTreeNodeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "span", 1);
|
|
92
|
+
i0.ɵɵconditionalCreate(2, A11yTreeNodeComponent_Conditional_2_Template, 1, 1);
|
|
122
93
|
i0.ɵɵelementEnd();
|
|
123
|
-
i0.ɵɵconditionalCreate(
|
|
124
|
-
i0.ɵɵ
|
|
94
|
+
i0.ɵɵconditionalCreate(3, A11yTreeNodeComponent_Conditional_3_Template, 2, 1, "button", 2);
|
|
95
|
+
i0.ɵɵelementStart(4, "span", 3);
|
|
96
|
+
i0.ɵɵtext(5);
|
|
125
97
|
i0.ɵɵelementEnd();
|
|
126
|
-
i0.ɵɵconditionalCreate(
|
|
98
|
+
i0.ɵɵconditionalCreate(6, A11yTreeNodeComponent_Conditional_6_Template, 2, 1, "span", 4);
|
|
99
|
+
i0.ɵɵrepeaterCreate(7, A11yTreeNodeComponent_For_8_Template, 2, 1, "span", 5, _forTrack0);
|
|
127
100
|
i0.ɵɵelementEnd();
|
|
101
|
+
i0.ɵɵconditionalCreate(9, A11yTreeNodeComponent_Conditional_9_Template, 2, 0);
|
|
128
102
|
} if (rf & 2) {
|
|
103
|
+
i0.ɵɵclassProp("aria-tree-line--hidden", ctx.node().hidden);
|
|
129
104
|
i0.ɵɵadvance();
|
|
130
|
-
i0.ɵɵ
|
|
105
|
+
i0.ɵɵstyleProp("width", ctx.depth() * 20, "px");
|
|
131
106
|
i0.ɵɵadvance();
|
|
132
|
-
i0.ɵɵ
|
|
107
|
+
i0.ɵɵconditional(ctx.depth() > 0 ? 2 : -1);
|
|
133
108
|
i0.ɵɵadvance();
|
|
134
|
-
i0.ɵɵconditional(ctx.node().children.length ? 3 :
|
|
135
|
-
i0.ɵɵadvance(
|
|
109
|
+
i0.ɵɵconditional(ctx.node().children.length ? 3 : -1);
|
|
110
|
+
i0.ɵɵadvance(2);
|
|
136
111
|
i0.ɵɵtextInterpolate(ctx.node().role);
|
|
137
112
|
i0.ɵɵadvance();
|
|
138
|
-
i0.ɵɵconditional(ctx.node().name ?
|
|
113
|
+
i0.ɵɵconditional(ctx.node().name ? 6 : -1);
|
|
139
114
|
i0.ɵɵadvance();
|
|
140
115
|
i0.ɵɵrepeater(ctx.stateEntries());
|
|
141
116
|
i0.ɵɵadvance(2);
|
|
142
|
-
i0.ɵɵconditional(ctx.expanded() && ctx.node().children.length ?
|
|
143
|
-
} }, dependencies: [A11yTreeNodeComponent], styles: ["[_nghost-%COMP%] { display: block; }\n\n .
|
|
117
|
+
i0.ɵɵconditional(ctx.expanded() && ctx.node().children.length ? 9 : -1);
|
|
118
|
+
} }, dependencies: [A11yTreeNodeComponent], styles: ["[_nghost-%COMP%] { display: block; }\n\n .aria-tree-line[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 0;\n font-family: var(--font-mono);\n font-size: 12.5px;\n line-height: 1.8;\n color: var(--prism-text-2);\n }\n .aria-tree-line--hidden[_ngcontent-%COMP%] { opacity: 0.4; }\n\n .indent[_ngcontent-%COMP%] {\n color: var(--prism-text-ghost);\n opacity: 0.5;\n user-select: none;\n flex-shrink: 0;\n white-space: pre;\n font-size: 12px;\n text-align: right;\n }\n\n .tree-toggle[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 10px;\n color: var(--prism-text-muted);\n padding: 0;\n width: 12px;\n flex-shrink: 0;\n }\n\n .role[_ngcontent-%COMP%] { color: var(--prism-primary); font-weight: 600; }\n .name[_ngcontent-%COMP%] { color: var(--prism-text); }\n .attr[_ngcontent-%COMP%] { color: var(--prism-text-ghost); }"], changeDetection: 0 });
|
|
144
119
|
}
|
|
145
120
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yTreeNodeComponent, [{
|
|
146
121
|
type: Component,
|
|
147
122
|
args: [{ selector: 'prism-a11y-tree-node', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
148
|
-
<div class="
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(click)="toggleExpanded()"
|
|
153
|
-
>
|
|
154
|
-
<span class="prism-a11y-tn__indent" [style.width.px]="depth() * 16"></span>
|
|
155
|
-
@if (node().children.length) {
|
|
156
|
-
<span class="prism-a11y-tn__chevron">{{ expanded() ? '▾' : '▸' }}</span>
|
|
157
|
-
} @else {
|
|
158
|
-
<span class="prism-a11y-tn__chevron prism-a11y-tn__chevron--leaf">·</span>
|
|
159
|
-
}
|
|
160
|
-
<span class="prism-a11y-tn__role">{{ node().role }}</span>
|
|
161
|
-
@if (node().name) {
|
|
162
|
-
<span class="prism-a11y-tn__name"> "{{ node().name }}"</span>
|
|
163
|
-
}
|
|
164
|
-
@for (entry of stateEntries(); track entry.key) {
|
|
165
|
-
<span class="prism-a11y-tn__state">{{ entry.label }}</span>
|
|
123
|
+
<div class="aria-tree-line" [class.aria-tree-line--hidden]="node().hidden">
|
|
124
|
+
<span class="indent" [style.width.px]="depth() * 20">
|
|
125
|
+
@if (depth() > 0) {
|
|
126
|
+
{{ isLast() ? '└─' : '├─' }}
|
|
166
127
|
}
|
|
128
|
+
</span>
|
|
129
|
+
@if (node().children.length) {
|
|
130
|
+
<button class="tree-toggle" (click)="toggleExpanded()">
|
|
131
|
+
{{ expanded() ? '▾' : '▸' }}
|
|
167
132
|
</button>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<div class="prism-a11y-tn__hidden-group" [style.padding-left.px]="(depth() + 1) * 16 + 24">
|
|
175
|
-
<span class="prism-a11y-tn__hidden-label">
|
|
176
|
-
{{ hiddenChildren().length }} hidden element{{ hiddenChildren().length > 1 ? 's' : '' }} (aria-hidden)
|
|
177
|
-
</span>
|
|
178
|
-
</div>
|
|
179
|
-
}
|
|
133
|
+
}
|
|
134
|
+
<span class="role">{{ node().role }}</span>
|
|
135
|
+
@if (node().name) {
|
|
136
|
+
<span class="name">"{{ node().name }}"</span>
|
|
137
|
+
} @for (entry of stateEntries(); track entry.key) {
|
|
138
|
+
<span class="attr">[{{ entry.label }}]</span>
|
|
180
139
|
}
|
|
181
140
|
</div>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
141
|
+
@if (expanded() && node().children.length) { @for (child of node().children;
|
|
142
|
+
track $index; let last = $last) {
|
|
143
|
+
<prism-a11y-tree-node
|
|
144
|
+
[node]="child"
|
|
145
|
+
[depth]="depth() + 1"
|
|
146
|
+
[isLast]="last"
|
|
147
|
+
/>
|
|
148
|
+
} }
|
|
149
|
+
`, styles: ["\n :host { display: block; }\n\n .aria-tree-line {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 2px 0;\n font-family: var(--font-mono);\n font-size: 12.5px;\n line-height: 1.8;\n color: var(--prism-text-2);\n }\n .aria-tree-line--hidden { opacity: 0.4; }\n\n .indent {\n color: var(--prism-text-ghost);\n opacity: 0.5;\n user-select: none;\n flex-shrink: 0;\n white-space: pre;\n font-size: 12px;\n text-align: right;\n }\n\n .tree-toggle {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 10px;\n color: var(--prism-text-muted);\n padding: 0;\n width: 12px;\n flex-shrink: 0;\n }\n\n .role { color: var(--prism-primary); font-weight: 600; }\n .name { color: var(--prism-text); }\n .attr { color: var(--prism-text-ghost); }\n "] }]
|
|
150
|
+
}], null, { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: false }] }], isLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLast", required: false }] }] }); })();
|
|
151
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeNodeComponent, { className: "A11yTreeNodeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber: 86 }); })();
|
|
185
152
|
export class A11yTreeComponent {
|
|
186
153
|
rendererService = inject(PrismRendererService);
|
|
187
154
|
treeService = inject(A11yTreeService);
|
|
188
155
|
activeComponent = input(null, ...(ngDevMode ? [{ debugName: "activeComponent" }] : []));
|
|
189
|
-
expandAll = signal(true, ...(ngDevMode ? [{ debugName: "expandAll" }] : []));
|
|
190
156
|
tree = computed(() => {
|
|
191
157
|
const root = this.rendererService.renderedElement();
|
|
192
158
|
if (!root)
|
|
@@ -195,35 +161,24 @@ export class A11yTreeComponent {
|
|
|
195
161
|
return this.treeService.buildTree(root, doc ? (id) => doc.getElementById(id) : undefined);
|
|
196
162
|
}, ...(ngDevMode ? [{ debugName: "tree" }] : []));
|
|
197
163
|
static ɵfac = function A11yTreeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yTreeComponent)(); };
|
|
198
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yTreeComponent, selectors: [["prism-a11y-tree"]], inputs: { activeComponent: [1, "activeComponent"] }, decls:
|
|
199
|
-
i0.ɵɵ
|
|
200
|
-
i0.ɵɵconditionalCreate(1, A11yTreeComponent_Conditional_1_Template, 2, 0, "div", 1)(2, A11yTreeComponent_Conditional_2_Template, 7, 2);
|
|
201
|
-
i0.ɵɵelementEnd();
|
|
164
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yTreeComponent, selectors: [["prism-a11y-tree"]], inputs: { activeComponent: [1, "activeComponent"] }, decls: 2, vars: 1, consts: [[1, "tree-empty"], [1, "aria-tree"], [3, "node", "depth", "isLast"]], template: function A11yTreeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
165
|
+
i0.ɵɵconditionalCreate(0, A11yTreeComponent_Conditional_0_Template, 2, 0, "div", 0)(1, A11yTreeComponent_Conditional_1_Template, 2, 3, "div", 1);
|
|
202
166
|
} if (rf & 2) {
|
|
203
|
-
i0.ɵɵ
|
|
204
|
-
|
|
205
|
-
} }, dependencies: [A11yTreeNodeComponent], styles: ["[_nghost-%COMP%] { display: flex; flex-direction: column; height: 100%; }\n\n .prism-a11y-tree[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .prism-a11y-tree__empty[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100px;\n color: var(--prism-text-muted);\n font-size: 13px;\n }\n\n .prism-a11y-tree__header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n border-bottom: 1px solid var(--prism-border);\n font-size: 12px;\n color: var(--prism-text-muted);\n flex-shrink: 0;\n }\n\n .prism-a11y-tree__expand-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 11px;\n color: var(--prism-primary);\n font-family: var(--prism-font-sans, system-ui, sans-serif);\n padding: 2px 6px;\n }\n .prism-a11y-tree__expand-btn[_ngcontent-%COMP%]:hover { text-decoration: underline; }\n\n .prism-a11y-tree__content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 8px 4px;\n }"], changeDetection: 0 });
|
|
167
|
+
i0.ɵɵconditional(!ctx.rendererService.renderedElement() ? 0 : ctx.tree() ? 1 : -1);
|
|
168
|
+
} }, dependencies: [A11yTreeNodeComponent], styles: ["[_nghost-%COMP%] { display: block; height: 100%; overflow: auto; }\n\n .aria-tree[_ngcontent-%COMP%] {\n padding: 14px 20px;\n }\n\n .tree-empty[_ngcontent-%COMP%] {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(--prism-text-muted); font-size: 13px;\n }"], changeDetection: 0 });
|
|
206
169
|
}
|
|
207
170
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yTreeComponent, [{
|
|
208
171
|
type: Component,
|
|
209
172
|
args: [{ selector: 'prism-a11y-tree', standalone: true, imports: [A11yTreeNodeComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
{{ expandAll() ? 'Collapse all' : 'Expand all' }}
|
|
218
|
-
</button>
|
|
219
|
-
</div>
|
|
220
|
-
<div class="prism-a11y-tree__content">
|
|
221
|
-
@if (tree()) {
|
|
222
|
-
<prism-a11y-tree-node [node]="tree()!" [depth]="0" />
|
|
223
|
-
}
|
|
224
|
-
</div>
|
|
225
|
-
}
|
|
173
|
+
@if (!rendererService.renderedElement()) {
|
|
174
|
+
<div class="tree-empty">
|
|
175
|
+
Select a component to inspect the accessibility tree.
|
|
176
|
+
</div>
|
|
177
|
+
} @else if (tree()) {
|
|
178
|
+
<div class="aria-tree">
|
|
179
|
+
<prism-a11y-tree-node [node]="tree()!" [depth]="0" [isLast]="true" />
|
|
226
180
|
</div>
|
|
227
|
-
|
|
181
|
+
}
|
|
182
|
+
`, styles: ["\n :host { display: block; height: 100%; overflow: auto; }\n\n .aria-tree {\n padding: 14px 20px;\n }\n\n .tree-empty {\n display: flex; align-items: center; justify-content: center;\n min-height: 100px; color: var(--prism-text-muted); font-size: 13px;\n }\n "] }]
|
|
228
183
|
}], null, { activeComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeComponent", required: false }] }] }); })();
|
|
229
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeComponent, { className: "A11yTreeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber:
|
|
184
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yTreeComponent, { className: "A11yTreeComponent", filePath: "app/panels/a11y/a11y-tree.component.ts", lineNumber: 139 }); })();
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type { Result } from 'axe-core';
|
|
2
1
|
import { A11yAuditService } from './a11y-audit.service.js';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class A11yViolationsComponent {
|
|
5
4
|
protected readonly auditService: A11yAuditService;
|
|
6
5
|
protected readonly scoreResult: import("@angular/core").Signal<import("./a11y.types.js").A11yScoreResult | null>;
|
|
7
|
-
protected readonly
|
|
8
|
-
protected
|
|
9
|
-
protected readonly passes: import("@angular/core").Signal<Result[]>;
|
|
10
|
-
protected readonly openSections: import("@angular/core").WritableSignal<Set<string>>;
|
|
11
|
-
protected toggle(section: string): void;
|
|
6
|
+
protected readonly allResults: import("@angular/core").Signal<import("axe-core").Result[]>;
|
|
7
|
+
protected sevColor(impact: string | undefined): string;
|
|
12
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<A11yViolationsComponent, never>;
|
|
13
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<A11yViolationsComponent, "prism-a11y-violations", never, {}, {}, never, never, true, never>;
|
|
14
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-violations.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-violations.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"a11y-violations.component.d.ts","sourceRoot":"","sources":["../../../../src/app/panels/a11y/a11y-violations.component.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAqB3D,qBA0Ka,uBAAuB;IAClC,SAAS,CAAC,QAAQ,CAAC,YAAY,mBAA4B;IAE3D,SAAS,CAAC,QAAQ,CAAC,WAAW,mFAE5B;IAEF,SAAS,CAAC,QAAQ,CAAC,UAAU,8DAU1B;IAEH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM;yCAnB3C,uBAAuB;2CAAvB,uBAAuB;CAsBnC"}
|