@a2ui/angular 0.8.2 → 0.9.0-alpha.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.
Files changed (48) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +111 -3
  3. package/fesm2022/a2ui-angular-src-v0_8.mjs +1797 -0
  4. package/fesm2022/a2ui-angular-src-v0_8.mjs.map +1 -0
  5. package/fesm2022/a2ui-angular-src-v0_9.mjs +2330 -0
  6. package/fesm2022/a2ui-angular-src-v0_9.mjs.map +1 -0
  7. package/fesm2022/a2ui-angular-v0_8.mjs +1797 -0
  8. package/fesm2022/a2ui-angular-v0_8.mjs.map +1 -0
  9. package/fesm2022/a2ui-angular-v0_9.mjs +2330 -0
  10. package/fesm2022/a2ui-angular-v0_9.mjs.map +1 -0
  11. package/fesm2022/a2ui-angular.mjs +1558 -616
  12. package/fesm2022/a2ui-angular.mjs.map +1 -1
  13. package/package.json +51 -7
  14. package/types/a2ui-angular-src-v0_8.d.ts +400 -0
  15. package/types/a2ui-angular-src-v0_9.d.ts +813 -0
  16. package/types/a2ui-angular-v0_8.d.ts +400 -0
  17. package/types/a2ui-angular-v0_9.d.ts +813 -0
  18. package/types/a2ui-angular.d.ts +362 -35
  19. package/fesm2022/a2ui-angular-audio-DoZb9mn_.mjs +0 -48
  20. package/fesm2022/a2ui-angular-audio-DoZb9mn_.mjs.map +0 -1
  21. package/fesm2022/a2ui-angular-button-CvH0kAtN.mjs +0 -61
  22. package/fesm2022/a2ui-angular-button-CvH0kAtN.mjs.map +0 -1
  23. package/fesm2022/a2ui-angular-card-Ix6OIdUv.mjs +0 -48
  24. package/fesm2022/a2ui-angular-card-Ix6OIdUv.mjs.map +0 -1
  25. package/fesm2022/a2ui-angular-checkbox-BN4EF2Ci.mjs +0 -78
  26. package/fesm2022/a2ui-angular-checkbox-BN4EF2Ci.mjs.map +0 -1
  27. package/fesm2022/a2ui-angular-datetime-input-dmZAjvrF.mjs +0 -120
  28. package/fesm2022/a2ui-angular-datetime-input-dmZAjvrF.mjs.map +0 -1
  29. package/fesm2022/a2ui-angular-divider-BizPl3qL.mjs +0 -30
  30. package/fesm2022/a2ui-angular-divider-BizPl3qL.mjs.map +0 -1
  31. package/fesm2022/a2ui-angular-icon-BE9Hj9V6.mjs +0 -48
  32. package/fesm2022/a2ui-angular-icon-BE9Hj9V6.mjs.map +0 -1
  33. package/fesm2022/a2ui-angular-image-BWzAw0rh.mjs +0 -54
  34. package/fesm2022/a2ui-angular-image-BWzAw0rh.mjs.map +0 -1
  35. package/fesm2022/a2ui-angular-list-nEeT59V3.mjs +0 -45
  36. package/fesm2022/a2ui-angular-list-nEeT59V3.mjs.map +0 -1
  37. package/fesm2022/a2ui-angular-modal-mr9LmczA.mjs +0 -108
  38. package/fesm2022/a2ui-angular-modal-mr9LmczA.mjs.map +0 -1
  39. package/fesm2022/a2ui-angular-multiple-choice-Bry7X74i.mjs +0 -78
  40. package/fesm2022/a2ui-angular-multiple-choice-Bry7X74i.mjs.map +0 -1
  41. package/fesm2022/a2ui-angular-slider-BgseUbN2.mjs +0 -79
  42. package/fesm2022/a2ui-angular-slider-BgseUbN2.mjs.map +0 -1
  43. package/fesm2022/a2ui-angular-tabs-q5Mn9vgq.mjs +0 -87
  44. package/fesm2022/a2ui-angular-tabs-q5Mn9vgq.mjs.map +0 -1
  45. package/fesm2022/a2ui-angular-text-field-Deokh07j.mjs +0 -85
  46. package/fesm2022/a2ui-angular-text-field-Deokh07j.mjs.map +0 -1
  47. package/fesm2022/a2ui-angular-video-DuFTfN0B.mjs +0 -48
  48. package/fesm2022/a2ui-angular-video-DuFTfN0B.mjs.map +0 -1
@@ -1,78 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, Component } from '@angular/core';
3
- import { DynamicComponent } from './a2ui-angular.mjs';
4
-
5
- /*
6
- Copyright 2025 Google LLC
7
-
8
- Licensed under the Apache License, Version 2.0 (the "License");
9
- you may not use this file except in compliance with the License.
10
- You may obtain a copy of the License at
11
-
12
- https://www.apache.org/licenses/LICENSE-2.0
13
-
14
- Unless required by applicable law or agreed to in writing, software
15
- distributed under the License is distributed on an "AS IS" BASIS,
16
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- See the License for the specific language governing permissions and
18
- limitations under the License.
19
- */
20
- class MultipleChoice extends DynamicComponent {
21
- options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
22
- value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
23
- description = input.required(...(ngDevMode ? [{ debugName: "description" }] : []));
24
- selectId = super.getUniqueId('a2ui-multiple-choice');
25
- selectValue = computed(() => super.resolvePrimitive(this.value()), ...(ngDevMode ? [{ debugName: "selectValue" }] : []));
26
- handleChange(event) {
27
- const path = this.value()?.path;
28
- if (!(event.target instanceof HTMLSelectElement) || !event.target.value || !path) {
29
- return;
30
- }
31
- this.processor.setData(this.component(), this.processor.resolvePath(path, this.component().dataContextPath), event.target.value);
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MultipleChoice, deps: null, target: i0.ɵɵFactoryTarget.Component });
34
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: MultipleChoice, isStandalone: true, selector: "a2ui-multiple-choice", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
35
- <section [class]="theme.components.MultipleChoice.container">
36
- <label [class]="theme.components.MultipleChoice.label" [for]="selectId">{{
37
- description()
38
- }}</label>
39
-
40
- <select
41
- (change)="handleChange($event)"
42
- [id]="selectId"
43
- [value]="selectValue()"
44
- [class]="theme.components.MultipleChoice.element"
45
- [style]="theme.additionalStyles?.MultipleChoice"
46
- >
47
- @for (option of options(); track option.value) {
48
- <option [value]="option.value">{{ resolvePrimitive(option.label) }}</option>
49
- }
50
- </select>
51
- </section>
52
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}select{width:100%;box-sizing:border-box}\n"] });
53
- }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: MultipleChoice, decorators: [{
55
- type: Component,
56
- args: [{ selector: 'a2ui-multiple-choice', template: `
57
- <section [class]="theme.components.MultipleChoice.container">
58
- <label [class]="theme.components.MultipleChoice.label" [for]="selectId">{{
59
- description()
60
- }}</label>
61
-
62
- <select
63
- (change)="handleChange($event)"
64
- [id]="selectId"
65
- [value]="selectValue()"
66
- [class]="theme.components.MultipleChoice.element"
67
- [style]="theme.additionalStyles?.MultipleChoice"
68
- >
69
- @for (option of options(); track option.value) {
70
- <option [value]="option.value">{{ resolvePrimitive(option.label) }}</option>
71
- }
72
- </select>
73
- </section>
74
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}select{width:100%;box-sizing:border-box}\n"] }]
75
- }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: true }] }] } });
76
-
77
- export { MultipleChoice };
78
- //# sourceMappingURL=a2ui-angular-multiple-choice-Bry7X74i.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-multiple-choice-Bry7X74i.mjs","sources":["../../src/lib/catalog/multiple-choice.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, computed, input } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Primitives } from '@a2ui/lit/0.8';\n\n@Component({\n selector: 'a2ui-multiple-choice',\n template: `\n <section [class]=\"theme.components.MultipleChoice.container\">\n <label [class]=\"theme.components.MultipleChoice.label\" [for]=\"selectId\">{{\n description()\n }}</label>\n\n <select\n (change)=\"handleChange($event)\"\n [id]=\"selectId\"\n [value]=\"selectValue()\"\n [class]=\"theme.components.MultipleChoice.element\"\n [style]=\"theme.additionalStyles?.MultipleChoice\"\n >\n @for (option of options(); track option.value) {\n <option [value]=\"option.value\">{{ resolvePrimitive(option.label) }}</option>\n }\n </select>\n </section>\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n select {\n width: 100%;\n box-sizing: border-box;\n }\n `,\n})\nexport class MultipleChoice extends DynamicComponent {\n readonly options = input.required<{ label: Primitives.StringValue; value: string }[]>();\n readonly value = input.required<Primitives.StringValue | null>();\n readonly description = input.required<string>();\n\n protected readonly selectId = super.getUniqueId('a2ui-multiple-choice');\n protected selectValue = computed(() => super.resolvePrimitive(this.value()));\n\n protected handleChange(event: Event) {\n const path = this.value()?.path;\n\n if (!(event.target instanceof HTMLSelectElement) || !event.target.value || !path) {\n return;\n }\n\n this.processor.setData(\n this.component(),\n this.processor.resolvePath(path, this.component().dataContextPath),\n event.target.value,\n );\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAyCG,MAAO,cAAe,SAAQ,gBAAgB,CAAA;AACzC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAsD;AAC9E,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAiC;AACvD,IAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,sDAAU;AAE5B,IAAA,QAAQ,GAAG,KAAK,CAAC,WAAW,C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,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAjCf;;;;;;;;;;;;;;;;;;AAkBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8GAAA,CAAA,EAAA,CAAA;;2FAeU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAnC1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAAA,QAAA,EACtB;;;;;;;;;;;;;;;;;;AAkBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,8GAAA,CAAA,EAAA;;;;;"}
@@ -1,79 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, Component } from '@angular/core';
3
- import { DynamicComponent } from './a2ui-angular.mjs';
4
-
5
- /*
6
- Copyright 2025 Google LLC
7
-
8
- Licensed under the Apache License, Version 2.0 (the "License");
9
- you may not use this file except in compliance with the License.
10
- You may obtain a copy of the License at
11
-
12
- https://www.apache.org/licenses/LICENSE-2.0
13
-
14
- Unless required by applicable law or agreed to in writing, software
15
- distributed under the License is distributed on an "AS IS" BASIS,
16
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- See the License for the specific language governing permissions and
18
- limitations under the License.
19
- */
20
- class Slider extends DynamicComponent {
21
- value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
22
- label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
23
- minValue = input.required(...(ngDevMode ? [{ debugName: "minValue" }] : []));
24
- maxValue = input.required(...(ngDevMode ? [{ debugName: "maxValue" }] : []));
25
- inputId = super.getUniqueId('a2ui-slider');
26
- resolvedValue = computed(() => super.resolvePrimitive(this.value()) ?? 0, ...(ngDevMode ? [{ debugName: "resolvedValue" }] : []));
27
- handleInput(event) {
28
- const path = this.value()?.path;
29
- if (!(event.target instanceof HTMLInputElement) || !path) {
30
- return;
31
- }
32
- this.processor.setData(this.component(), path, event.target.valueAsNumber, this.surfaceId());
33
- }
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Slider, deps: null, target: i0.ɵɵFactoryTarget.Component });
35
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: Slider, isStandalone: true, selector: "[a2ui-slider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: true, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
36
- <section [class]="theme.components.Slider.container">
37
- <label [class]="theme.components.Slider.label" [for]="inputId">
38
- {{ label() }}
39
- </label>
40
-
41
- <input
42
- autocomplete="off"
43
- type="range"
44
- [value]="resolvedValue()"
45
- [min]="minValue()"
46
- [max]="maxValue()"
47
- [id]="inputId"
48
- (input)="handleInput($event)"
49
- [class]="theme.components.Slider.element"
50
- [style]="theme.additionalStyles?.Slider"
51
- />
52
- </section>
53
- `, isInline: true, styles: [":host{display:block;flex:var(--weight)}input{display:block;width:100%;box-sizing:border-box}\n"] });
54
- }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Slider, decorators: [{
56
- type: Component,
57
- args: [{ selector: '[a2ui-slider]', template: `
58
- <section [class]="theme.components.Slider.container">
59
- <label [class]="theme.components.Slider.label" [for]="inputId">
60
- {{ label() }}
61
- </label>
62
-
63
- <input
64
- autocomplete="off"
65
- type="range"
66
- [value]="resolvedValue()"
67
- [min]="minValue()"
68
- [max]="maxValue()"
69
- [id]="inputId"
70
- (input)="handleInput($event)"
71
- [class]="theme.components.Slider.element"
72
- [style]="theme.additionalStyles?.Slider"
73
- />
74
- </section>
75
- `, styles: [":host{display:block;flex:var(--weight)}input{display:block;width:100%;box-sizing:border-box}\n"] }]
76
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: true }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: true }] }] } });
77
-
78
- export { Slider };
79
- //# sourceMappingURL=a2ui-angular-slider-BgseUbN2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-slider-BgseUbN2.mjs","sources":["../../src/lib/catalog/slider.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, computed, input } from '@angular/core';\nimport { Primitives } from '@a2ui/lit/0.8';\nimport { DynamicComponent } from '../rendering/dynamic-component';\n\n@Component({\n selector: '[a2ui-slider]',\n template: `\n <section [class]=\"theme.components.Slider.container\">\n <label [class]=\"theme.components.Slider.label\" [for]=\"inputId\">\n {{ label() }}\n </label>\n\n <input\n autocomplete=\"off\"\n type=\"range\"\n [value]=\"resolvedValue()\"\n [min]=\"minValue()\"\n [max]=\"maxValue()\"\n [id]=\"inputId\"\n (input)=\"handleInput($event)\"\n [class]=\"theme.components.Slider.element\"\n [style]=\"theme.additionalStyles?.Slider\"\n />\n </section>\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n }\n\n input {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n `,\n})\nexport class Slider extends DynamicComponent {\n readonly value = input.required<Primitives.NumberValue | null>();\n readonly label = input('');\n readonly minValue = input.required<number | undefined>();\n readonly maxValue = input.required<number | undefined>();\n\n protected readonly inputId = super.getUniqueId('a2ui-slider');\n protected resolvedValue = computed(() => super.resolvePrimitive(this.value()) ?? 0);\n\n protected handleInput(event: Event) {\n const path = this.value()?.path;\n\n if (!(event.target instanceof HTMLInputElement) || !path) {\n return;\n }\n\n this.processor.setData(this.component(), path, event.target.valueAsNumber, this.surfaceId());\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAwCG,MAAO,MAAO,SAAQ,gBAAgB,CAAA;AACjC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAiC;AACvD,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC;AACjB,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,mDAAsB;AAC/C,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,mDAAsB;AAErC,IAAA,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC;AACnD,IAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,yDAAC;AAEzE,IAAA,WAAW,CAAC,KAAY,EAAA;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI;AAE/B,QAAA,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;YACxD;QACF;QAEA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IAC9F;uGAjBW,MAAM,EAAA,IAAA,EAAA,IAAA,EAA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;;"}
@@ -1,87 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, input, computed, Component } from '@angular/core';
3
- import { DynamicComponent, Renderer } from './a2ui-angular.mjs';
4
- import { Styles } from '@a2ui/lit/0.8';
5
-
6
- /*
7
- Copyright 2025 Google LLC
8
-
9
- Licensed under the Apache License, Version 2.0 (the "License");
10
- you may not use this file except in compliance with the License.
11
- You may obtain a copy of the License at
12
-
13
- https://www.apache.org/licenses/LICENSE-2.0
14
-
15
- Unless required by applicable law or agreed to in writing, software
16
- distributed under the License is distributed on an "AS IS" BASIS,
17
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- See the License for the specific language governing permissions and
19
- limitations under the License.
20
- */
21
- class Tabs extends DynamicComponent {
22
- selectedIndex = signal(0, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
23
- tabs = input.required(...(ngDevMode ? [{ debugName: "tabs" }] : []));
24
- buttonClasses = computed(() => {
25
- const selectedIndex = this.selectedIndex();
26
- return this.tabs().map((_, index) => {
27
- return index === selectedIndex
28
- ? Styles.merge(this.theme.components.Tabs.controls.all, this.theme.components.Tabs.controls.selected)
29
- : this.theme.components.Tabs.controls.all;
30
- });
31
- }, ...(ngDevMode ? [{ debugName: "buttonClasses" }] : []));
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Tabs, deps: null, target: i0.ɵɵFactoryTarget.Component });
33
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Tabs, isStandalone: true, selector: "a2ui-tabs", inputs: { tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
34
- @let tabs = this.tabs();
35
- @let selectedIndex = this.selectedIndex();
36
-
37
- <section [class]="theme.components.Tabs.container" [style]="theme.additionalStyles?.Tabs">
38
- <div [class]="theme.components.Tabs.element">
39
- @for (tab of tabs; track tab) {
40
- <button
41
- (click)="this.selectedIndex.set($index)"
42
- [disabled]="selectedIndex === $index"
43
- [class]="buttonClasses()[selectedIndex]"
44
- >
45
- {{ resolvePrimitive(tab.title) }}
46
- </button>
47
- }
48
- </div>
49
-
50
- <ng-container
51
- a2ui-renderer
52
- [surfaceId]="surfaceId()!"
53
- [component]="tabs[selectedIndex].child"
54
- />
55
- </section>
56
- `, isInline: true, styles: [":host{display:block;flex:var(--weight)}\n"], dependencies: [{ kind: "directive", type: Renderer, selector: "ng-container[a2ui-renderer]", inputs: ["surfaceId", "component"] }] });
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Tabs, decorators: [{
59
- type: Component,
60
- args: [{ selector: 'a2ui-tabs', imports: [Renderer], template: `
61
- @let tabs = this.tabs();
62
- @let selectedIndex = this.selectedIndex();
63
-
64
- <section [class]="theme.components.Tabs.container" [style]="theme.additionalStyles?.Tabs">
65
- <div [class]="theme.components.Tabs.element">
66
- @for (tab of tabs; track tab) {
67
- <button
68
- (click)="this.selectedIndex.set($index)"
69
- [disabled]="selectedIndex === $index"
70
- [class]="buttonClasses()[selectedIndex]"
71
- >
72
- {{ resolvePrimitive(tab.title) }}
73
- </button>
74
- }
75
- </div>
76
-
77
- <ng-container
78
- a2ui-renderer
79
- [surfaceId]="surfaceId()!"
80
- [component]="tabs[selectedIndex].child"
81
- />
82
- </section>
83
- `, styles: [":host{display:block;flex:var(--weight)}\n"] }]
84
- }], propDecorators: { tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: true }] }] } });
85
-
86
- export { Tabs };
87
- //# sourceMappingURL=a2ui-angular-tabs-q5Mn9vgq.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-tabs-q5Mn9vgq.mjs","sources":["../../src/lib/catalog/tabs.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, computed, input, signal } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Renderer } from '../rendering/renderer';\nimport { Styles, Types } from '@a2ui/lit/0.8';\n\n@Component({\n selector: 'a2ui-tabs',\n imports: [Renderer],\n template: `\n @let tabs = this.tabs();\n @let selectedIndex = this.selectedIndex();\n\n <section [class]=\"theme.components.Tabs.container\" [style]=\"theme.additionalStyles?.Tabs\">\n <div [class]=\"theme.components.Tabs.element\">\n @for (tab of tabs; track tab) {\n <button\n (click)=\"this.selectedIndex.set($index)\"\n [disabled]=\"selectedIndex === $index\"\n [class]=\"buttonClasses()[selectedIndex]\"\n >\n {{ resolvePrimitive(tab.title) }}\n </button>\n }\n </div>\n\n <ng-container\n a2ui-renderer\n [surfaceId]=\"surfaceId()!\"\n [component]=\"tabs[selectedIndex].child\"\n />\n </section>\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n }\n `,\n})\nexport class Tabs extends DynamicComponent {\n protected selectedIndex = signal(0);\n readonly tabs = input.required<Types.ResolvedTabItem[]>();\n\n protected readonly buttonClasses = computed(() => {\n const selectedIndex = this.selectedIndex();\n\n return this.tabs().map((_, index) => {\n return index === selectedIndex\n ? Styles.merge(\n this.theme.components.Tabs.controls.all,\n this.theme.components.Tabs.controls.selected,\n )\n : this.theme.components.Tabs.controls.all;\n });\n });\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;;AAcG;AAyCG,MAAO,IAAK,SAAQ,gBAAgB,CAAA;AAC9B,IAAA,aAAa,GAAG,MAAM,CAAC,CAAC,yDAAC;AAC1B,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,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A,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAgCP,IAAI,EAAA,UAAA,EAAA,CAAA;kBAlChB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,OAAA,EACZ,CAAC,QAAQ,CAAC,EAAA,QAAA,EACT;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2CAAA,CAAA,EAAA;;;;;"}
@@ -1,85 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, Component } from '@angular/core';
3
- import { DynamicComponent } from './a2ui-angular.mjs';
4
-
5
- /*
6
- Copyright 2025 Google LLC
7
-
8
- Licensed under the Apache License, Version 2.0 (the "License");
9
- you may not use this file except in compliance with the License.
10
- You may obtain a copy of the License at
11
-
12
- https://www.apache.org/licenses/LICENSE-2.0
13
-
14
- Unless required by applicable law or agreed to in writing, software
15
- distributed under the License is distributed on an "AS IS" BASIS,
16
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- See the License for the specific language governing permissions and
18
- limitations under the License.
19
- */
20
- class TextField extends DynamicComponent {
21
- text = input.required(...(ngDevMode ? [{ debugName: "text" }] : []));
22
- label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
23
- inputType = input.required(...(ngDevMode ? [{ debugName: "inputType" }] : []));
24
- inputValue = computed(() => super.resolvePrimitive(this.text()) || '', ...(ngDevMode ? [{ debugName: "inputValue" }] : []));
25
- resolvedLabel = computed(() => super.resolvePrimitive(this.label()), ...(ngDevMode ? [{ debugName: "resolvedLabel" }] : []));
26
- inputId = super.getUniqueId('a2ui-input');
27
- handleInput(event) {
28
- const path = this.text()?.path;
29
- if (!(event.target instanceof HTMLInputElement) || !path) {
30
- return;
31
- }
32
- this.processor.setData(this.component(), path, event.target.value, this.surfaceId());
33
- }
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TextField, deps: null, target: i0.ɵɵFactoryTarget.Component });
35
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TextField, isStandalone: true, selector: "a2ui-text-field", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, inputType: { classPropertyName: "inputType", publicName: "inputType", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
36
- @let resolvedLabel = this.resolvedLabel();
37
-
38
- <section [class]="theme.components.TextField.container">
39
- @if (resolvedLabel) {
40
- <label [for]="inputId" [class]="theme.components.TextField.label">{{
41
- resolvedLabel
42
- }}</label>
43
- }
44
-
45
- <input
46
- autocomplete="off"
47
- [class]="theme.components.TextField.element"
48
- [style]="theme.additionalStyles?.TextField"
49
- (input)="handleInput($event)"
50
- [id]="inputId"
51
- [value]="inputValue()"
52
- placeholder="Please enter a value"
53
- [type]="inputType() === 'number' ? 'number' : 'text'"
54
- />
55
- </section>
56
- `, isInline: true, styles: [":host{display:flex;flex:var(--weight)}section,input,label{box-sizing:border-box}input{display:block;width:100%}label{display:block;margin-bottom:4px}\n"] });
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TextField, decorators: [{
59
- type: Component,
60
- args: [{ selector: 'a2ui-text-field', template: `
61
- @let resolvedLabel = this.resolvedLabel();
62
-
63
- <section [class]="theme.components.TextField.container">
64
- @if (resolvedLabel) {
65
- <label [for]="inputId" [class]="theme.components.TextField.label">{{
66
- resolvedLabel
67
- }}</label>
68
- }
69
-
70
- <input
71
- autocomplete="off"
72
- [class]="theme.components.TextField.element"
73
- [style]="theme.additionalStyles?.TextField"
74
- (input)="handleInput($event)"
75
- [id]="inputId"
76
- [value]="inputValue()"
77
- placeholder="Please enter a value"
78
- [type]="inputType() === 'number' ? 'number' : 'text'"
79
- />
80
- </section>
81
- `, styles: [":host{display:flex;flex:var(--weight)}section,input,label{box-sizing:border-box}input{display:block;width:100%}label{display:block;margin-bottom:4px}\n"] }]
82
- }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], inputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputType", required: true }] }] } });
83
-
84
- export { TextField };
85
- //# sourceMappingURL=a2ui-angular-text-field-Deokh07j.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-text-field-Deokh07j.mjs","sources":["../../src/lib/catalog/text-field.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { computed, Component, input } from '@angular/core';\nimport { Primitives, Types } from '@a2ui/lit/0.8';\nimport { DynamicComponent } from '../rendering/dynamic-component';\n\n@Component({\n selector: 'a2ui-text-field',\n styles: `\n :host {\n display: flex;\n flex: var(--weight);\n }\n\n section,\n input,\n label {\n box-sizing: border-box;\n }\n\n input {\n display: block;\n width: 100%;\n }\n\n label {\n display: block;\n margin-bottom: 4px;\n }\n `,\n template: `\n @let resolvedLabel = this.resolvedLabel();\n\n <section [class]=\"theme.components.TextField.container\">\n @if (resolvedLabel) {\n <label [for]=\"inputId\" [class]=\"theme.components.TextField.label\">{{\n resolvedLabel\n }}</label>\n }\n\n <input\n autocomplete=\"off\"\n [class]=\"theme.components.TextField.element\"\n [style]=\"theme.additionalStyles?.TextField\"\n (input)=\"handleInput($event)\"\n [id]=\"inputId\"\n [value]=\"inputValue()\"\n placeholder=\"Please enter a value\"\n [type]=\"inputType() === 'number' ? 'number' : 'text'\"\n />\n </section>\n `,\n})\nexport class TextField extends DynamicComponent {\n readonly text = input.required<Primitives.StringValue | null>();\n readonly label = input.required<Primitives.StringValue | null>();\n readonly inputType = input.required<Types.ResolvedTextField['type'] | null>();\n\n protected inputValue = computed(() => super.resolvePrimitive(this.text()) || '');\n protected resolvedLabel = computed(() => super.resolvePrimitive(this.label()));\n protected inputId = super.getUniqueId('a2ui-input');\n\n protected handleInput(event: Event) {\n const path = this.text()?.path;\n\n if (!(event.target instanceof HTMLInputElement) || !path) {\n return;\n }\n\n this.processor.setData(this.component(), path, event.target.value, this.surfaceId());\n }\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAqDG,MAAO,SAAU,SAAQ,gBAAgB,CAAA;AACpC,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAiC;AACtD,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAiC;AACvD,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAA0C;AAEnE,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,sDAAC;AACtE,IAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,yDAAC;AACpE,IAAA,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC;AAEzC,IAAA,WAAW,CAAC,KAAY,EAAA;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI;AAE9B,QAAA,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE;YACxD;QACF;QAEA,IAAI,CAAC,SAAS,CAAC,O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A,EAAA,CAAA,yJAAA,CAAA,EAAA;;;;;"}
@@ -1,48 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, Component } from '@angular/core';
3
- import { DynamicComponent } from './a2ui-angular.mjs';
4
-
5
- /*
6
- Copyright 2025 Google LLC
7
-
8
- Licensed under the Apache License, Version 2.0 (the "License");
9
- you may not use this file except in compliance with the License.
10
- You may obtain a copy of the License at
11
-
12
- https://www.apache.org/licenses/LICENSE-2.0
13
-
14
- Unless required by applicable law or agreed to in writing, software
15
- distributed under the License is distributed on an "AS IS" BASIS,
16
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- See the License for the specific language governing permissions and
18
- limitations under the License.
19
- */
20
- class Video extends DynamicComponent {
21
- url = input.required(...(ngDevMode ? [{ debugName: "url" }] : []));
22
- resolvedUrl = computed(() => this.resolvePrimitive(this.url()), ...(ngDevMode ? [{ debugName: "resolvedUrl" }] : []));
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Video, deps: null, target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: Video, isStandalone: true, selector: "a2ui-video", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
25
- @let resolvedUrl = this.resolvedUrl();
26
-
27
- @if (resolvedUrl) {
28
- <section [class]="theme.components.Video" [style]="theme.additionalStyles?.Video">
29
- <video controls [src]="resolvedUrl"></video>
30
- </section>
31
- }
32
- `, isInline: true, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}video{display:block;width:100%;box-sizing:border-box}\n"] });
33
- }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: Video, decorators: [{
35
- type: Component,
36
- args: [{ selector: 'a2ui-video', template: `
37
- @let resolvedUrl = this.resolvedUrl();
38
-
39
- @if (resolvedUrl) {
40
- <section [class]="theme.components.Video" [style]="theme.additionalStyles?.Video">
41
- <video controls [src]="resolvedUrl"></video>
42
- </section>
43
- }
44
- `, styles: [":host{display:block;flex:var(--weight);min-height:0;overflow:auto}video{display:block;width:100%;box-sizing:border-box}\n"] }]
45
- }], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: true }] }] } });
46
-
47
- export { Video };
48
- //# sourceMappingURL=a2ui-angular-video-DuFTfN0B.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-angular-video-DuFTfN0B.mjs","sources":["../../src/lib/catalog/video.ts"],"sourcesContent":["/*\n Copyright 2025 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\nimport { Component, computed, input } from '@angular/core';\nimport { DynamicComponent } from '../rendering/dynamic-component';\nimport { Primitives } from '@a2ui/lit/0.8';\n\n@Component({\n selector: 'a2ui-video',\n template: `\n @let resolvedUrl = this.resolvedUrl();\n\n @if (resolvedUrl) {\n <section [class]=\"theme.components.Video\" [style]=\"theme.additionalStyles?.Video\">\n <video controls [src]=\"resolvedUrl\"></video>\n </section>\n }\n `,\n styles: `\n :host {\n display: block;\n flex: var(--weight);\n min-height: 0;\n overflow: auto;\n }\n\n video {\n display: block;\n width: 100%;\n box-sizing: border-box;\n }\n `,\n})\nexport class Video extends DynamicComponent {\n readonly url = input.required<Primitives.StringValue | null>();\n protected readonly resolvedUrl = computed(() => this.resolvePrimitive(this.url()));\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;AAcG;AAgCG,MAAO,KAAM,SAAQ,gBAAgB,CAAA;AAChC,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,8CAAiC;AAC3C,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uDAAC;uGAFvE,KAAK,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAK,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAxBN;;;;;;;;AAQT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA,CAAA;;2FAgBU,KAAK,EAAA,UAAA,EAAA,CAAA;kBA1BjB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,QAAA,EACZ;;;;;;;;AAQT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2HAAA,CAAA,EAAA;;;;;"}