@rabassoft/schema-engine-angular-aria 0.1.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/LICENSE +661 -0
- package/NOTICE.md +12 -0
- package/README.md +70 -0
- package/SOURCE.md +33 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +339 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
- package/source-build/package.json +25 -0
- package/source-build/pnpm-lock.yaml +672 -0
- package/source-build/prepare-schema-engine.mjs +49 -0
- package/source-build/tsconfig.json +34 -0
- package/src/index.ts +254 -0
- package/styles.css +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# @rabassoft/schema-engine-angular-aria
|
|
2
|
+
|
|
3
|
+
Angular Aria 22 presentation-container candidate for Schema Engine.
|
|
4
|
+
|
|
5
|
+
## Delivery status
|
|
6
|
+
|
|
7
|
+
- Package manifest: `0.1.0`.
|
|
8
|
+
- API classification: Public + Experimental + Active.
|
|
9
|
+
- Private source candidate; no registry publication is implied.
|
|
10
|
+
- The only root API is `provideSchemaEngineAngularAriaContainers()`; the only
|
|
11
|
+
style entry point is the explicit `./styles.css` export.
|
|
12
|
+
- PLAN-021 governs later publication. Every registry read, package write and
|
|
13
|
+
tag mutation retains a separate approval gate.
|
|
14
|
+
- Recommended channel after publication: exact `0.1.0` or `next`. The first
|
|
15
|
+
observed `latest` state is not predicted and never implies Stable.
|
|
16
|
+
|
|
17
|
+
## Fixed compatibility contract
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
@rabassoft/schema-engine-angular-aria 0.1.x
|
|
21
|
+
@rabassoft/schema-engine-angular ^0.3.0
|
|
22
|
+
@angular/core >=22.0.6 <23.0.0
|
|
23
|
+
@angular/aria >=22.0.5 <23.0.0
|
|
24
|
+
@angular/cdk >=22.0.5 <23.0.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Verified tuples use Angular core `22.0.6` and `22.0.7`, with Angular Aria
|
|
28
|
+
`22.0.5` and Angular CDK `22.0.5`. The resolved Aria peer must require the same
|
|
29
|
+
exact CDK patch.
|
|
30
|
+
|
|
31
|
+
Register the pilot after the mandatory native base providers:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { provideSchemaEngineAngularNative } from '@rabassoft/schema-engine-angular';
|
|
35
|
+
import { provideSchemaEngineAngularAriaContainers } from '@rabassoft/schema-engine-angular-aria';
|
|
36
|
+
|
|
37
|
+
bootstrapApplication(AppComponent, {
|
|
38
|
+
providers: [
|
|
39
|
+
provideSchemaEngineAngularNative(),
|
|
40
|
+
provideSchemaEngineAngularAriaContainers(),
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Import `@rabassoft/schema-engine-angular-aria/styles.css` explicitly when the
|
|
46
|
+
pilot visual baseline is wanted. Behavior remains usable without it: hidden
|
|
47
|
+
panels stay mounted and inaccessible, and grid content falls back to source
|
|
48
|
+
order in one column. Applications own light/dark selectors and may set only:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
--se-aria-container-surface
|
|
52
|
+
--se-aria-container-text
|
|
53
|
+
--se-aria-container-border
|
|
54
|
+
--se-aria-container-accent
|
|
55
|
+
--se-aria-container-radius
|
|
56
|
+
--se-aria-container-gap
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Tabs use Angular Aria follow-focus/wrapping with preserved content. Section,
|
|
60
|
+
accordion and logical grid intentionally retain native semantics.
|
|
61
|
+
|
|
62
|
+
## License and source
|
|
63
|
+
|
|
64
|
+
This package is licensed under GNU AGPL v3 only (`AGPL-3.0-only`), including
|
|
65
|
+
commercial use under its conditions. A separate paid commercial license may be
|
|
66
|
+
available; contact `ricard@rabassoft.com`. No final commercial agreement or
|
|
67
|
+
support SLA is represented by this package.
|
|
68
|
+
|
|
69
|
+
Preferred TypeScript source is included in `src/`; see `SOURCE.md`. There is no
|
|
70
|
+
npm provenance while the development repository remains private.
|
package/SOURCE.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Building from Corresponding Source
|
|
2
|
+
|
|
3
|
+
The candidate includes its preferred TypeScript source in `src/` and a frozen
|
|
4
|
+
standalone partial-compilation harness in `source-build/`. It does not require
|
|
5
|
+
the private development repository.
|
|
6
|
+
|
|
7
|
+
Extract the coordinated core, base Angular and Angular Aria tarballs as sibling
|
|
8
|
+
directories with this layout:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
core/package/
|
|
12
|
+
angular/package/
|
|
13
|
+
pilot/package/
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Rebuild core and base Angular first using their included instructions. Then,
|
|
17
|
+
from the extracted pilot package directory:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
corepack pnpm install --frozen-lockfile --modules-dir ../node_modules
|
|
21
|
+
corepack pnpm run build
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The pilot harness copies only the rebuilt package metadata and output of the
|
|
25
|
+
two coordinated Schema Engine packages into its local build environment before
|
|
26
|
+
invoking Angular partial compilation.
|
|
27
|
+
|
|
28
|
+
The accepted implementation toolchain is Node.js `22.23.1`, pnpm `10.28.2`,
|
|
29
|
+
TypeScript `6.0.2`, Angular compiler/core `22.0.6`, Angular Aria `22.0.5` and
|
|
30
|
+
Angular CDK `22.0.5`. Release verification checks the resolved Aria/CDK graph,
|
|
31
|
+
exact CDK peer patch, licenses and lifecycle metadata.
|
|
32
|
+
|
|
33
|
+
No package publication or registry state is implied by this source harness.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AA8OvB,wBAAgB,wCAAwC,IAAI,oBAAoB,CAI/E"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
// Copyright (C) 2026 Ricardo Rabassó Rodríguez, operating as Rabassoft
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
import { ChangeDetectionStrategy, Component, input, makeEnvironmentProviders, signal, } from '@angular/core';
|
|
4
|
+
import { Tab, TabList, TabPanel, Tabs } from '@angular/aria/tabs';
|
|
5
|
+
import { SchemaPresentationEntryOutletComponent, SchemaPresentationPanelOutletComponent, provideSchemaPresentationContainer, } from '@rabassoft/schema-engine-angular';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
class AngularAriaPresentationSectionComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.presentation = input.required(/* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
11
|
+
this.section = () => {
|
|
12
|
+
const model = this.presentation();
|
|
13
|
+
return model.kind === 'section' ? model : undefined;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AngularAriaPresentationSectionComponent, isStandalone: true, selector: "schema-aria-presentation-section", inputs: { presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
18
|
+
@if (section(); as model) {
|
|
19
|
+
<fieldset>
|
|
20
|
+
<legend [id]="model.legendId">{{ model.label }}</legend>
|
|
21
|
+
@for (
|
|
22
|
+
child of model.definition.children;
|
|
23
|
+
track child.kind === 'form-node' ? child.node.key : child.key
|
|
24
|
+
) {
|
|
25
|
+
<schema-presentation-entry-outlet [entry]="child" />
|
|
26
|
+
}
|
|
27
|
+
</fieldset>
|
|
28
|
+
}
|
|
29
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SchemaPresentationEntryOutletComponent, selector: "schema-presentation-entry-outlet", inputs: ["entry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationSectionComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: 'schema-aria-presentation-section',
|
|
35
|
+
standalone: true,
|
|
36
|
+
imports: [SchemaPresentationEntryOutletComponent],
|
|
37
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
38
|
+
template: `
|
|
39
|
+
@if (section(); as model) {
|
|
40
|
+
<fieldset>
|
|
41
|
+
<legend [id]="model.legendId">{{ model.label }}</legend>
|
|
42
|
+
@for (
|
|
43
|
+
child of model.definition.children;
|
|
44
|
+
track child.kind === 'form-node' ? child.node.key : child.key
|
|
45
|
+
) {
|
|
46
|
+
<schema-presentation-entry-outlet [entry]="child" />
|
|
47
|
+
}
|
|
48
|
+
</fieldset>
|
|
49
|
+
}
|
|
50
|
+
`,
|
|
51
|
+
}]
|
|
52
|
+
}], propDecorators: { presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: true }] }] } });
|
|
53
|
+
class AngularAriaPresentationTabsComponent {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.presentation = input.required(/* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
57
|
+
this.selectedTab = signal(undefined, /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []));
|
|
59
|
+
this.tabs = () => {
|
|
60
|
+
const model = this.presentation();
|
|
61
|
+
return model.kind === 'tabs' ? model : undefined;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
ngOnInit() {
|
|
65
|
+
this.selectedTab.set(this.tabs()?.panels[0]?.tabpanelId);
|
|
66
|
+
}
|
|
67
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AngularAriaPresentationTabsComponent, isStandalone: true, selector: "schema-aria-presentation-tabs", inputs: { presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
69
|
+
@if (tabs(); as model) {
|
|
70
|
+
<div ngTabs>
|
|
71
|
+
<div
|
|
72
|
+
ngTabList
|
|
73
|
+
orientation="horizontal"
|
|
74
|
+
focusMode="roving"
|
|
75
|
+
selectionMode="follow"
|
|
76
|
+
[wrap]="true"
|
|
77
|
+
[(selectedTab)]="selectedTab"
|
|
78
|
+
[id]="model.tablistId"
|
|
79
|
+
[attr.aria-label]="model.label"
|
|
80
|
+
>
|
|
81
|
+
@for (panel of model.panels; track panel.definition.key) {
|
|
82
|
+
<button
|
|
83
|
+
ngTab
|
|
84
|
+
type="button"
|
|
85
|
+
[id]="panel.tabId"
|
|
86
|
+
[value]="panel.tabpanelId"
|
|
87
|
+
>
|
|
88
|
+
{{ panel.label }}
|
|
89
|
+
</button>
|
|
90
|
+
}
|
|
91
|
+
</div>
|
|
92
|
+
@for (panel of model.panels; track panel.definition.key) {
|
|
93
|
+
<div
|
|
94
|
+
ngTabPanel
|
|
95
|
+
[preserveContent]="true"
|
|
96
|
+
[id]="panel.tabpanelId"
|
|
97
|
+
[value]="panel.tabpanelId"
|
|
98
|
+
[hidden]="selectedTab() !== panel.tabpanelId"
|
|
99
|
+
[attr.inert]="selectedTab() !== panel.tabpanelId ? '' : null"
|
|
100
|
+
>
|
|
101
|
+
<schema-presentation-panel-outlet [panel]="panel.definition" />
|
|
102
|
+
</div>
|
|
103
|
+
}
|
|
104
|
+
</div>
|
|
105
|
+
}
|
|
106
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: Tabs, selector: "[ngTabs]", exportAs: ["ngTabs"] }, { kind: "directive", type: TabList, selector: "[ngTabList]", inputs: ["orientation", "wrap", "softDisabled", "focusMode", "selectionMode", "selectedTab", "disabled"], outputs: ["selectedTabChange"], exportAs: ["ngTabList"] }, { kind: "directive", type: Tab, selector: "[ngTab]", inputs: ["id", "disabled", "value"], exportAs: ["ngTab"] }, { kind: "directive", type: TabPanel, selector: "[ngTabPanel]", inputs: ["id", "value"], exportAs: ["ngTabPanel"] }, { kind: "component", type: SchemaPresentationPanelOutletComponent, selector: "schema-presentation-panel-outlet", inputs: ["panel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationTabsComponent, decorators: [{
|
|
109
|
+
type: Component,
|
|
110
|
+
args: [{
|
|
111
|
+
selector: 'schema-aria-presentation-tabs',
|
|
112
|
+
standalone: true,
|
|
113
|
+
imports: [
|
|
114
|
+
Tabs,
|
|
115
|
+
TabList,
|
|
116
|
+
Tab,
|
|
117
|
+
TabPanel,
|
|
118
|
+
SchemaPresentationPanelOutletComponent,
|
|
119
|
+
],
|
|
120
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
121
|
+
template: `
|
|
122
|
+
@if (tabs(); as model) {
|
|
123
|
+
<div ngTabs>
|
|
124
|
+
<div
|
|
125
|
+
ngTabList
|
|
126
|
+
orientation="horizontal"
|
|
127
|
+
focusMode="roving"
|
|
128
|
+
selectionMode="follow"
|
|
129
|
+
[wrap]="true"
|
|
130
|
+
[(selectedTab)]="selectedTab"
|
|
131
|
+
[id]="model.tablistId"
|
|
132
|
+
[attr.aria-label]="model.label"
|
|
133
|
+
>
|
|
134
|
+
@for (panel of model.panels; track panel.definition.key) {
|
|
135
|
+
<button
|
|
136
|
+
ngTab
|
|
137
|
+
type="button"
|
|
138
|
+
[id]="panel.tabId"
|
|
139
|
+
[value]="panel.tabpanelId"
|
|
140
|
+
>
|
|
141
|
+
{{ panel.label }}
|
|
142
|
+
</button>
|
|
143
|
+
}
|
|
144
|
+
</div>
|
|
145
|
+
@for (panel of model.panels; track panel.definition.key) {
|
|
146
|
+
<div
|
|
147
|
+
ngTabPanel
|
|
148
|
+
[preserveContent]="true"
|
|
149
|
+
[id]="panel.tabpanelId"
|
|
150
|
+
[value]="panel.tabpanelId"
|
|
151
|
+
[hidden]="selectedTab() !== panel.tabpanelId"
|
|
152
|
+
[attr.inert]="selectedTab() !== panel.tabpanelId ? '' : null"
|
|
153
|
+
>
|
|
154
|
+
<schema-presentation-panel-outlet [panel]="panel.definition" />
|
|
155
|
+
</div>
|
|
156
|
+
}
|
|
157
|
+
</div>
|
|
158
|
+
}
|
|
159
|
+
`,
|
|
160
|
+
}]
|
|
161
|
+
}], propDecorators: { presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: true }] }] } });
|
|
162
|
+
class AngularAriaPresentationAccordionComponent {
|
|
163
|
+
constructor() {
|
|
164
|
+
this.presentation = input.required(/* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
166
|
+
this.expanded = signal(new Set(), /* @ts-ignore */
|
|
167
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
168
|
+
this.accordion = () => {
|
|
169
|
+
const model = this.presentation();
|
|
170
|
+
return model.kind === 'accordion' ? model : undefined;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
toggle(index) {
|
|
174
|
+
const next = new Set(this.expanded());
|
|
175
|
+
if (next.has(index))
|
|
176
|
+
next.delete(index);
|
|
177
|
+
else
|
|
178
|
+
next.add(index);
|
|
179
|
+
this.expanded.set(next);
|
|
180
|
+
}
|
|
181
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AngularAriaPresentationAccordionComponent, isStandalone: true, selector: "schema-aria-presentation-accordion", inputs: { presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
183
|
+
@if (accordion(); as model) {
|
|
184
|
+
<div
|
|
185
|
+
role="group"
|
|
186
|
+
[id]="model.accordionId"
|
|
187
|
+
[attr.aria-label]="model.label"
|
|
188
|
+
>
|
|
189
|
+
@for (
|
|
190
|
+
panel of model.panels;
|
|
191
|
+
track panel.definition.key;
|
|
192
|
+
let index = $index
|
|
193
|
+
) {
|
|
194
|
+
<button
|
|
195
|
+
type="button"
|
|
196
|
+
[id]="panel.triggerId"
|
|
197
|
+
[attr.aria-expanded]="expanded().has(index)"
|
|
198
|
+
[attr.aria-controls]="panel.regionId"
|
|
199
|
+
(click)="toggle(index)"
|
|
200
|
+
>
|
|
201
|
+
{{ panel.label }}
|
|
202
|
+
</button>
|
|
203
|
+
<div
|
|
204
|
+
role="region"
|
|
205
|
+
[id]="panel.regionId"
|
|
206
|
+
[attr.aria-labelledby]="panel.triggerId"
|
|
207
|
+
[hidden]="!expanded().has(index)"
|
|
208
|
+
[attr.inert]="!expanded().has(index) ? '' : null"
|
|
209
|
+
>
|
|
210
|
+
<schema-presentation-panel-outlet [panel]="panel.definition" />
|
|
211
|
+
</div>
|
|
212
|
+
}
|
|
213
|
+
</div>
|
|
214
|
+
}
|
|
215
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SchemaPresentationPanelOutletComponent, selector: "schema-presentation-panel-outlet", inputs: ["panel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
216
|
+
}
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationAccordionComponent, decorators: [{
|
|
218
|
+
type: Component,
|
|
219
|
+
args: [{
|
|
220
|
+
selector: 'schema-aria-presentation-accordion',
|
|
221
|
+
standalone: true,
|
|
222
|
+
imports: [SchemaPresentationPanelOutletComponent],
|
|
223
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
224
|
+
template: `
|
|
225
|
+
@if (accordion(); as model) {
|
|
226
|
+
<div
|
|
227
|
+
role="group"
|
|
228
|
+
[id]="model.accordionId"
|
|
229
|
+
[attr.aria-label]="model.label"
|
|
230
|
+
>
|
|
231
|
+
@for (
|
|
232
|
+
panel of model.panels;
|
|
233
|
+
track panel.definition.key;
|
|
234
|
+
let index = $index
|
|
235
|
+
) {
|
|
236
|
+
<button
|
|
237
|
+
type="button"
|
|
238
|
+
[id]="panel.triggerId"
|
|
239
|
+
[attr.aria-expanded]="expanded().has(index)"
|
|
240
|
+
[attr.aria-controls]="panel.regionId"
|
|
241
|
+
(click)="toggle(index)"
|
|
242
|
+
>
|
|
243
|
+
{{ panel.label }}
|
|
244
|
+
</button>
|
|
245
|
+
<div
|
|
246
|
+
role="region"
|
|
247
|
+
[id]="panel.regionId"
|
|
248
|
+
[attr.aria-labelledby]="panel.triggerId"
|
|
249
|
+
[hidden]="!expanded().has(index)"
|
|
250
|
+
[attr.inert]="!expanded().has(index) ? '' : null"
|
|
251
|
+
>
|
|
252
|
+
<schema-presentation-panel-outlet [panel]="panel.definition" />
|
|
253
|
+
</div>
|
|
254
|
+
}
|
|
255
|
+
</div>
|
|
256
|
+
}
|
|
257
|
+
`,
|
|
258
|
+
}]
|
|
259
|
+
}], propDecorators: { presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: true }] }] } });
|
|
260
|
+
class AngularAriaPresentationGridComponent {
|
|
261
|
+
constructor() {
|
|
262
|
+
this.presentation = input.required(/* @ts-ignore */
|
|
263
|
+
...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
264
|
+
this.grid = () => {
|
|
265
|
+
const model = this.presentation();
|
|
266
|
+
return model.kind === 'grid' ? model : undefined;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
270
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AngularAriaPresentationGridComponent, isStandalone: true, selector: "schema-aria-presentation-grid", inputs: { presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
271
|
+
@if (grid(); as model) {
|
|
272
|
+
<div
|
|
273
|
+
class="se-aria-grid"
|
|
274
|
+
role="group"
|
|
275
|
+
[id]="model.gridId"
|
|
276
|
+
[attr.aria-label]="model.label"
|
|
277
|
+
[style.--se-aria-grid-columns]="model.definition.columns"
|
|
278
|
+
>
|
|
279
|
+
@for (item of model.items; track item.definition.key) {
|
|
280
|
+
<div
|
|
281
|
+
class="se-aria-grid-cell"
|
|
282
|
+
[id]="item.cellId"
|
|
283
|
+
[style.--se-aria-grid-span]="item.definition.span"
|
|
284
|
+
>
|
|
285
|
+
<schema-presentation-entry-outlet [entry]="item.definition.child" />
|
|
286
|
+
</div>
|
|
287
|
+
}
|
|
288
|
+
</div>
|
|
289
|
+
}
|
|
290
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SchemaPresentationEntryOutletComponent, selector: "schema-presentation-entry-outlet", inputs: ["entry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
291
|
+
}
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AngularAriaPresentationGridComponent, decorators: [{
|
|
293
|
+
type: Component,
|
|
294
|
+
args: [{
|
|
295
|
+
selector: 'schema-aria-presentation-grid',
|
|
296
|
+
standalone: true,
|
|
297
|
+
imports: [SchemaPresentationEntryOutletComponent],
|
|
298
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
299
|
+
template: `
|
|
300
|
+
@if (grid(); as model) {
|
|
301
|
+
<div
|
|
302
|
+
class="se-aria-grid"
|
|
303
|
+
role="group"
|
|
304
|
+
[id]="model.gridId"
|
|
305
|
+
[attr.aria-label]="model.label"
|
|
306
|
+
[style.--se-aria-grid-columns]="model.definition.columns"
|
|
307
|
+
>
|
|
308
|
+
@for (item of model.items; track item.definition.key) {
|
|
309
|
+
<div
|
|
310
|
+
class="se-aria-grid-cell"
|
|
311
|
+
[id]="item.cellId"
|
|
312
|
+
[style.--se-aria-grid-span]="item.definition.span"
|
|
313
|
+
>
|
|
314
|
+
<schema-presentation-entry-outlet [entry]="item.definition.child" />
|
|
315
|
+
</div>
|
|
316
|
+
}
|
|
317
|
+
</div>
|
|
318
|
+
}
|
|
319
|
+
`,
|
|
320
|
+
}]
|
|
321
|
+
}], propDecorators: { presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: true }] }] } });
|
|
322
|
+
const registrations = Object.freeze([
|
|
323
|
+
registration('angular-aria-section', AngularAriaPresentationSectionComponent, 'section'),
|
|
324
|
+
registration('angular-aria-tabs', AngularAriaPresentationTabsComponent, 'tabs'),
|
|
325
|
+
registration('angular-aria-accordion', AngularAriaPresentationAccordionComponent, 'accordion'),
|
|
326
|
+
registration('angular-aria-grid', AngularAriaPresentationGridComponent, 'grid'),
|
|
327
|
+
]);
|
|
328
|
+
function registration(id, renderer, kind) {
|
|
329
|
+
return Object.freeze({
|
|
330
|
+
id,
|
|
331
|
+
renderer,
|
|
332
|
+
tester: (definition) => definition.kind === kind ? 10 : null,
|
|
333
|
+
priority: 0,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
export function provideSchemaEngineAngularAriaContainers() {
|
|
337
|
+
return makeEnvironmentProviders(registrations.map((value) => provideSchemaPresentationContainer(value)));
|
|
338
|
+
}
|
|
339
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yCAAyC;AAEzC,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,EACL,wBAAwB,EACxB,MAAM,GAGP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EACL,sCAAsC,EACtC,sCAAsC,EACtC,kCAAkC,GAKnC,MAAM,kCAAkC,CAAC;;AAE1C,MAmBM,uCAAuC;IAnB7C;QAoBW,iBAAY,GACnB,KAAK,CAAC,QAAQ;yFAA2C,CAAC;QACzC,YAAO,GAAG,GAAG,EAAE;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,CAAC,CAAC;KACH;8GAPK,uCAAuC;kGAAvC,uCAAuC,oPAdjC;;;;;;;;;;;;GAYT,4DAdS,sCAAsC;;2FAgB5C,uCAAuC;kBAnB5C,SAAS;mBAAC;oBACT,QAAQ,EAAE,kCAAkC;oBAC5C,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,sCAAsC,CAAC;oBACjD,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;;;;;;;;;;;GAYT;iBACF;;AAUD,MAmDM,oCAAoC;IAnD1C;QAsDW,iBAAY,GACnB,KAAK,CAAC,QAAQ;yFAA2C,CAAC;QACzC,gBA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;;;;;;;;;;;;;;;;;;;;GAoBT;iBACF;;AAUD,MAAM,aAAa,GACjB,MAAM,CAAC,MAAM,CAAC;IACZ,YAAY,CACV,sBAAsB,EACtB,uCAAuC,EACvC,SAAS,CACV;IACD,YAAY,CACV,mBAAmB,EACnB,oCAAoC,EACpC,MAAM,CACP;IACD,YAAY,CACV,wBAAwB,EACxB,yCAAyC,EACzC,WAAW,CACZ;IACD,YAAY,CACV,mBAAmB,EACnB,oCAAoC,EACpC,MAAM,CACP;CACF,CAAC,CAAC;AAEL,SAAS,YAAY,CACnB,EAAU,EACV,QAA8D,EAC9D,IAAoD;IAEpD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE;QACF,QAAQ;QACR,MAAM,EAAE,CAAC,UAAkD,EAAE,EAAE,CAC7D,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;QACtC,QAAQ,EAAE,CAAC;KACZ,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,wCAAwC;IACtD,OAAO,wBAAwB,CAC7B,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,CAAC,CAAC,CACxE,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rabassoft/schema-engine-angular-aria",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"./styles.css"
|
|
7
|
+
],
|
|
8
|
+
"license": "AGPL-3.0-only",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "Ricardo Rabassó Rodríguez, operating as Rabassoft",
|
|
11
|
+
"email": "ricard@rabassoft.com"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"src",
|
|
16
|
+
"source-build",
|
|
17
|
+
"README.md",
|
|
18
|
+
"SOURCE.md",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"NOTICE.md",
|
|
21
|
+
"styles.css"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./styles.css": "./styles.css"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"tag": "next",
|
|
34
|
+
"provenance": false
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"tslib": "^2.8.1"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@angular/aria": "22.0.5",
|
|
41
|
+
"@angular/cdk": "22.0.5",
|
|
42
|
+
"@rabassoft/schema-engine-angular": "0.3.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@angular/aria": ">=22.0.5 <23.0.0",
|
|
46
|
+
"@angular/cdk": ">=22.0.5 <23.0.0",
|
|
47
|
+
"@angular/core": ">=22.0.6 <23.0.0",
|
|
48
|
+
"@rabassoft/schema-engine-angular": "^0.3.0"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "ngc -p tsconfig.build.json",
|
|
52
|
+
"test": "pnpm build && vitest run --passWithNoTests",
|
|
53
|
+
"test:dependencies": "node test/dependency-gate.mjs",
|
|
54
|
+
"test:package": "node test/package-smoke.mjs",
|
|
55
|
+
"typecheck": "pnpm build && tsc --noEmit -p tsconfig.json"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rabassoft/schema-engine-angular-aria-source-build",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"packageManager": "pnpm@10.28.2",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "22.23.1"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "node prepare-schema-engine.mjs && pnpm --dir .. exec ngc -p source-build/tsconfig.json"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@angular/aria": "22.0.5",
|
|
14
|
+
"@angular/cdk": "22.0.5",
|
|
15
|
+
"@angular/common": "22.0.6",
|
|
16
|
+
"@angular/compiler": "22.0.6",
|
|
17
|
+
"@angular/compiler-cli": "22.0.6",
|
|
18
|
+
"@angular/core": "22.0.6",
|
|
19
|
+
"@angular/forms": "22.0.6",
|
|
20
|
+
"@angular/platform-browser": "22.0.6",
|
|
21
|
+
"rxjs": "7.8.2",
|
|
22
|
+
"tslib": "2.8.1",
|
|
23
|
+
"typescript": "6.0.2"
|
|
24
|
+
}
|
|
25
|
+
}
|