@radix-ng/primitives 0.13.0 → 0.15.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/alert-dialog/index.d.ts +11 -0
- package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +3 -3
- package/alert-dialog/src/alert-dialog-content.directive.d.ts +3 -3
- package/alert-dialog/src/alert-dialog-root.directive.d.ts +3 -3
- package/alert-dialog/src/alert-dialog-title.directive.d.ts +3 -3
- package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +3 -3
- package/alert-dialog/src/alert-dialog.service.d.ts +3 -3
- package/aspect-ratio/README.md +1 -0
- package/aspect-ratio/index.d.ts +1 -0
- package/aspect-ratio/src/aspect-ratio.directive.d.ts +28 -0
- package/avatar/src/avatar-fallback.directive.d.ts +2 -1
- package/compodoc/documentation.json +1306 -805
- package/core/index.d.ts +6 -0
- package/core/src/accessor/provide-value-accessor.d.ts +12 -0
- package/core/src/auto-focus.directive.d.ts +14 -0
- package/core/src/document.d.ts +1 -0
- package/core/src/inject-ng-control.d.ts +8 -0
- package/core/src/is-client.d.ts +1 -0
- package/core/src/window.d.ts +3 -0
- package/esm2022/accordion/src/accordion-root.directive.mjs +14 -2
- package/esm2022/alert-dialog/index.mjs +35 -1
- package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +7 -7
- package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +7 -7
- package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +7 -7
- package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +5 -5
- package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +7 -7
- package/esm2022/alert-dialog/src/alert-dialog.service.mjs +5 -5
- package/esm2022/aspect-ratio/index.mjs +2 -0
- package/esm2022/aspect-ratio/radix-ng-primitives-aspect-ratio.mjs +5 -0
- package/esm2022/aspect-ratio/src/aspect-ratio.directive.mjs +53 -0
- package/esm2022/avatar/src/avatar-fallback.directive.mjs +9 -7
- package/esm2022/core/index.mjs +7 -0
- package/esm2022/core/radix-ng-primitives-core.mjs +5 -0
- package/esm2022/core/src/accessor/provide-value-accessor.mjs +19 -0
- package/esm2022/core/src/auto-focus.directive.mjs +80 -0
- package/esm2022/core/src/document.mjs +6 -0
- package/esm2022/core/src/inject-ng-control.mjs +17 -0
- package/esm2022/core/src/is-client.mjs +6 -0
- package/esm2022/core/src/window.mjs +15 -0
- package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +5 -3
- package/esm2022/radio/src/radio-root.directive.mjs +6 -6
- package/esm2022/separator/src/separator.directive.mjs +33 -15
- package/esm2022/switch/src/switch-root.directive.mjs +19 -39
- package/esm2022/toggle/src/toggle.directive.mjs +21 -11
- package/esm2022/toggle-group/index.mjs +4 -4
- package/esm2022/toggle-group/src/toggle-group-item.directive.mjs +84 -0
- package/esm2022/toggle-group/src/toggle-group-item.token.mjs +3 -0
- package/esm2022/toggle-group/src/toggle-group-multiple.directive.mjs +185 -0
- package/esm2022/toggle-group/src/toggle-group.directive.mjs +51 -6
- package/esm2022/toggle-group/src/toggle-group.token.mjs +1 -1
- package/esm2022/visually-hidden/index.mjs +4 -0
- package/esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs +5 -0
- package/esm2022/visually-hidden/src/visually-hidden-input-bubble.directive.mjs +74 -0
- package/esm2022/visually-hidden/src/visually-hidden-input.directive.mjs +74 -0
- package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +42 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +13 -1
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +59 -31
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +60 -0
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-avatar.mjs +7 -5
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +144 -0
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +4 -2
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +5 -5
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +32 -14
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +18 -38
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +127 -35
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +20 -10
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +189 -0
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -0
- package/package.json +19 -1
- package/radio/src/radio-root.directive.d.ts +2 -2
- package/separator/src/separator.directive.d.ts +29 -5
- package/switch/src/switch-root.directive.d.ts +12 -24
- package/toggle/src/toggle.directive.d.ts +24 -7
- package/toggle-group/index.d.ts +3 -3
- package/toggle-group/src/{toggle-group-button.directive.d.ts → toggle-group-item.directive.d.ts} +10 -4
- package/toggle-group/src/toggle-group-item.token.d.ts +3 -0
- package/toggle-group/src/{toggle-group-multi.directive.d.ts → toggle-group-multiple.directive.d.ts} +11 -5
- package/toggle-group/src/toggle-group.directive.d.ts +9 -3
- package/toggle-group/src/toggle-group.token.d.ts +3 -3
- package/visually-hidden/README.md +3 -0
- package/visually-hidden/index.d.ts +3 -0
- package/visually-hidden/src/visually-hidden-input-bubble.directive.d.ts +21 -0
- package/visually-hidden/src/visually-hidden-input.directive.d.ts +19 -0
- package/visually-hidden/src/visually-hidden.directive.d.ts +15 -0
- package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +0 -75
- package/esm2022/toggle-group/src/toggle-group-button.token.mjs +0 -6
- package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +0 -143
- package/toggle-group/src/toggle-group-button.token.d.ts +0 -4
@@ -196,12 +196,12 @@
|
|
196
196
|
},
|
197
197
|
{
|
198
198
|
"name": "RdxAvatarFallbackProps",
|
199
|
-
"id": "interface-RdxAvatarFallbackProps-
|
199
|
+
"id": "interface-RdxAvatarFallbackProps-3ec0a285681b4e3cef007c029710e37483fa80c00cbfcce5147fbcb173c808e1606e55fea16a94eb028b2692758b9c15c983bf6f8e5d3bb38210d8ba1d5d3ec0",
|
200
200
|
"file": "avatar/src/avatar-fallback.directive.ts",
|
201
201
|
"deprecated": false,
|
202
202
|
"deprecationMessage": "",
|
203
203
|
"type": "interface",
|
204
|
-
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport {
|
204
|
+
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n inject,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n signal\n} from '@angular/core';\nimport { injectAvatar } from './avatar-root.directive';\nimport { injectAvatarConfig } from './avatar.config';\n\nexport interface RdxAvatarFallbackProps {\n delayMs?: number;\n}\n\n@Directive({\n selector: 'span[rdxAvatarFallback]',\n exportAs: 'rdxAvatarFallback',\n standalone: true,\n host: {\n '[style.display]': 'visible() ? null : \"none\"'\n }\n})\nexport class RdxAvatarFallbackDirective implements RdxAvatarFallbackProps, OnInit, OnDestroy {\n private readonly avatar = injectAvatar();\n\n private readonly config = injectAvatarConfig();\n\n private readonly ngZone = inject(NgZone);\n\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Define a delay before the fallback is shown.\n * This is useful to only show the fallback for those with slower connections.\n * @default 0\n */\n @Input({ alias: 'rdxDelayMs', transform: numberAttribute }) delayMs: number = this.config.delayMs;\n\n readonly visible = signal(false);\n\n /**\n * Determine the delay has elapsed, and we can show the fallback.\n */\n private delayElapsed = false;\n\n private timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.ngZone.runOutsideAngular(() => {\n this.timeoutId = globalThis.setTimeout(() => {\n this.ngZone.run(() => {\n this.delayElapsed = true;\n this.updateVisibility();\n });\n }, this.delayMs);\n });\n }\n }\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId) && this.timeoutId !== null) {\n globalThis.clearTimeout(this.timeoutId);\n }\n }\n\n private updateVisibility(): void {\n this.visible.set(this.delayElapsed && this.avatar._state() !== 'loaded');\n }\n}\n",
|
205
205
|
"properties": [
|
206
206
|
{
|
207
207
|
"name": "delayMs",
|
@@ -210,7 +210,7 @@
|
|
210
210
|
"type": "number",
|
211
211
|
"optional": true,
|
212
212
|
"description": "",
|
213
|
-
"line":
|
213
|
+
"line": 17
|
214
214
|
}
|
215
215
|
],
|
216
216
|
"indexSignatures": [],
|
@@ -244,12 +244,12 @@
|
|
244
244
|
},
|
245
245
|
{
|
246
246
|
"name": "SeparatorProps",
|
247
|
-
"id": "interface-SeparatorProps-
|
247
|
+
"id": "interface-SeparatorProps-b69bdacfd17a9613b054bf8ca89fdc318eb7cac4d0d01179b19d405de3894ec017075d1b44c9d9a19e23ca7070398a1ce34ec61a992e0b6e21349554d1300827",
|
248
248
|
"file": "separator/src/separator.directive.ts",
|
249
249
|
"deprecated": false,
|
250
250
|
"deprecationMessage": "",
|
251
251
|
"type": "interface",
|
252
|
-
"sourceCode": "import { booleanAttribute, Directive,
|
252
|
+
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\n\nconst DEFAULT_ORIENTATION = 'horizontal';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\nexport type Orientation = (typeof ORIENTATIONS)[number];\n\nexport interface SeparatorProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether the component is purely decorative. When true, accessibility-related attributes\n * are updated so that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\n/**\n * Directive that adds accessible and configurable separator element to the DOM.\n * This can be either horizontal or vertical and optionally decorative (which removes\n * it from the accessibility tree).\n */\n@Directive({\n selector: 'div[rdxSeparatorRoot]',\n standalone: true,\n host: {\n '[attr.role]': 'computedRole()',\n '[attr.aria-orientation]': 'computedAriaOrientation()',\n\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxSeparatorRootDirective {\n /**\n * Orientation of the separator, can be either 'horizontal' or 'vertical'.\n * Defaults to 'horizontal'.\n */\n readonly orientation = input<Orientation>(DEFAULT_ORIENTATION);\n\n /**\n * If true, the separator will be considered decorative and removed from\n * the accessibility tree. Defaults to false.\n */\n readonly decorative = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Computes the `role` attribute for the separator. If `decorative` is true,\n * the role is set to \"none\", otherwise it is \"separator\".\n */\n protected readonly computedRole = computed(() => (this.decorative() ? 'none' : 'separator'));\n\n /**\n * Computes the `aria-orientation` attribute. It is set to \"vertical\" only if\n * the separator is not decorative and the orientation is set to \"vertical\".\n * For horizontal orientation, the attribute is omitted.\n */\n protected readonly computedAriaOrientation = computed(() =>\n !this.decorative() && this.orientation() === 'vertical' ? 'vertical' : null\n );\n}\n",
|
253
253
|
"properties": [
|
254
254
|
{
|
255
255
|
"name": "decorative",
|
@@ -258,7 +258,7 @@
|
|
258
258
|
"type": "boolean",
|
259
259
|
"optional": true,
|
260
260
|
"description": "<p>Whether the component is purely decorative. When true, accessibility-related attributes\nare updated so that the rendered element is removed from the accessibility tree.</p>\n",
|
261
|
-
"line":
|
261
|
+
"line": 20,
|
262
262
|
"rawdescription": "\n\nWhether the component is purely decorative. When true, accessibility-related attributes\nare updated so that the rendered element is removed from the accessibility tree.\n"
|
263
263
|
},
|
264
264
|
{
|
@@ -268,7 +268,7 @@
|
|
268
268
|
"type": "Orientation",
|
269
269
|
"optional": true,
|
270
270
|
"description": "<p>Either <code>vertical</code> or <code>horizontal</code>. Defaults to <code>horizontal</code>.</p>\n",
|
271
|
-
"line":
|
271
|
+
"line": 15,
|
272
272
|
"rawdescription": "\n\nEither `vertical` or `horizontal`. Defaults to `horizontal`.\n"
|
273
273
|
}
|
274
274
|
],
|
@@ -279,12 +279,12 @@
|
|
279
279
|
},
|
280
280
|
{
|
281
281
|
"name": "SwitchProps",
|
282
|
-
"id": "interface-SwitchProps-
|
282
|
+
"id": "interface-SwitchProps-a1d1ce9095ddd803dd1679e08e7914e7bbc821178d609e91909c39171ce2013fa88949495d3569fcd36dc50f9ffd58e50d69a30df9f1344c8d7f6610de2d389f",
|
283
283
|
"file": "switch/src/switch-root.directive.ts",
|
284
284
|
"deprecated": false,
|
285
285
|
"deprecationMessage": "",
|
286
286
|
"type": "interface",
|
287
|
-
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n
|
287
|
+
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n InjectionToken,\n input,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n OutputEmitterRef\n} from '@angular/core';\n\nexport const RdxSwitchToken = new InjectionToken<RdxSwitchRootDirective>('RdxSwitchToken');\n\nexport function injectSwitch(): RdxSwitchRootDirective {\n return inject(RdxSwitchToken);\n}\n\nexport interface SwitchProps {\n checked?: ModelSignal<boolean>;\n defaultChecked?: boolean;\n required?: InputSignalWithTransform<boolean, BooleanInput>;\n onCheckedChange?: OutputEmitterRef<boolean>;\n}\n\nlet idIterator = 0;\n\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n standalone: true,\n providers: [\n { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'elementId()',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-required]': 'required',\n '[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'disabledState() ? \"true\" : null',\n '[attr.disabled]': 'disabledState() ? disabledState() : null',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxSwitchRootDirective implements SwitchProps {\n readonly id = input<string>(`rdx-switch-${idIterator++}`);\n protected readonly elementId = computed(() => (this.id() ? this.id() : null));\n\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n */\n readonly required = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n */\n readonly checked = model<boolean>(false);\n\n /**\n * When true, prevents the user from interacting with the switch.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /*\n * @ignore\n */\n readonly disabledState = computed(() => this.disabled());\n\n /**\n * Event handler called when the state of the switch changes.\n */\n readonly onCheckedChange = output<boolean>();\n\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n */\n protected toggle(): void {\n if (this.disabledState()) {\n return;\n }\n\n this.checked.set(!this.checked());\n\n this.onCheckedChange.emit(this.checked());\n }\n}\n",
|
288
288
|
"properties": [
|
289
289
|
{
|
290
290
|
"name": "checked",
|
@@ -293,7 +293,7 @@
|
|
293
293
|
"type": "ModelSignal<boolean>",
|
294
294
|
"optional": true,
|
295
295
|
"description": "",
|
296
|
-
"line":
|
296
|
+
"line": 23
|
297
297
|
},
|
298
298
|
{
|
299
299
|
"name": "defaultChecked",
|
@@ -302,16 +302,16 @@
|
|
302
302
|
"type": "boolean",
|
303
303
|
"optional": true,
|
304
304
|
"description": "",
|
305
|
-
"line":
|
305
|
+
"line": 24
|
306
306
|
},
|
307
307
|
{
|
308
308
|
"name": "onCheckedChange",
|
309
309
|
"deprecated": false,
|
310
310
|
"deprecationMessage": "",
|
311
|
-
"type": "
|
311
|
+
"type": "OutputEmitterRef<boolean>",
|
312
312
|
"optional": true,
|
313
313
|
"description": "",
|
314
|
-
"line":
|
314
|
+
"line": 26
|
315
315
|
},
|
316
316
|
{
|
317
317
|
"name": "required",
|
@@ -320,7 +320,7 @@
|
|
320
320
|
"type": "InputSignalWithTransform<boolean | BooleanInput>",
|
321
321
|
"optional": true,
|
322
322
|
"description": "",
|
323
|
-
"line":
|
323
|
+
"line": 25
|
324
324
|
}
|
325
325
|
],
|
326
326
|
"indexSignatures": [],
|
@@ -493,12 +493,12 @@
|
|
493
493
|
},
|
494
494
|
{
|
495
495
|
"name": "ToggleProps",
|
496
|
-
"id": "interface-ToggleProps-
|
496
|
+
"id": "interface-ToggleProps-0bcbd664ea72aa02f90b3331238e8a118a14b8566bd36067013921c606f502814694751ab854825b1057106f71febb584ae15da9ebef63dc60001540db7e5906",
|
497
497
|
"file": "toggle/src/toggle.directive.ts",
|
498
498
|
"deprecated": false,
|
499
499
|
"deprecationMessage": "",
|
500
500
|
"type": "interface",
|
501
|
-
"sourceCode": "import {
|
501
|
+
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, model, output, OutputEmitterRef } from '@angular/core';\n\nexport interface ToggleProps {\n /**\n * The controlled state of the toggle.\n */\n pressed?: boolean;\n\n /**\n * The state of the toggle when initially rendered. Use `defaultPressed`\n * if you do not need to control the state of the toggle.\n * @defaultValue false\n */\n defaultPressed?: boolean;\n\n /**\n * The callback that fires when the state of the toggle changes.\n */\n onPressedChange?: OutputEmitterRef<boolean>;\n\n /**\n * Whether the toggle is disabled.\n * @defaultValue false\n */\n disabled?: boolean;\n}\n\n@Directive({\n selector: '[rdxToggle]',\n exportAs: 'rdxToggle',\n standalone: true,\n host: {\n type: 'button',\n '[attr.aria-pressed]': 'pressed()',\n '[attr.data-state]': 'pressed() ? \"on\" : \"off\"',\n '[attr.data-disabled]': 'disabled()',\n '[disabled]': 'disabled()',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleDirective {\n /**\n * The pressed state of the toggle when it is initially rendered.\n * Use when you do not need to control its pressed state.\n */\n readonly defaultPressed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled pressed state of the toggle.\n * Must be used in conjunction with `onPressedChange`.\n */\n readonly pressed = model<boolean>(this.defaultPressed());\n\n /**\n * When true, prevents the user from interacting with the toggle.\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the pressed state of the toggle changes.\n */\n readonly onPressedChange = output<boolean>();\n\n protected toggle(): void {\n if (!this.disabled()) {\n this.pressed.set(!this.pressed());\n this.onPressedChange.emit(this.pressed());\n }\n }\n}\n",
|
502
502
|
"properties": [
|
503
503
|
{
|
504
504
|
"name": "defaultPressed",
|
@@ -507,19 +507,49 @@
|
|
507
507
|
"type": "boolean",
|
508
508
|
"optional": true,
|
509
509
|
"description": "<p>The state of the toggle when initially rendered. Use <code>defaultPressed</code>\nif you do not need to control the state of the toggle.</p>\n",
|
510
|
-
"line":
|
510
|
+
"line": 15,
|
511
511
|
"rawdescription": "\n\nThe state of the toggle when initially rendered. Use `defaultPressed`\nif you do not need to control the state of the toggle.\n",
|
512
512
|
"jsdoctags": [
|
513
513
|
{
|
514
|
-
"pos":
|
515
|
-
"end":
|
514
|
+
"pos": 424,
|
515
|
+
"end": 449,
|
516
|
+
"flags": 16777216,
|
517
|
+
"modifierFlagsCache": 0,
|
518
|
+
"transformFlags": 0,
|
519
|
+
"kind": 334,
|
520
|
+
"tagName": {
|
521
|
+
"pos": 425,
|
522
|
+
"end": 437,
|
523
|
+
"flags": 16777216,
|
524
|
+
"modifierFlagsCache": 0,
|
525
|
+
"transformFlags": 0,
|
526
|
+
"kind": 80,
|
527
|
+
"escapedText": "defaultValue"
|
528
|
+
},
|
529
|
+
"comment": "<p>false</p>\n"
|
530
|
+
}
|
531
|
+
]
|
532
|
+
},
|
533
|
+
{
|
534
|
+
"name": "disabled",
|
535
|
+
"deprecated": false,
|
536
|
+
"deprecationMessage": "",
|
537
|
+
"type": "boolean",
|
538
|
+
"optional": true,
|
539
|
+
"description": "<p>Whether the toggle is disabled.</p>\n",
|
540
|
+
"line": 26,
|
541
|
+
"rawdescription": "\n\nWhether the toggle is disabled.\n",
|
542
|
+
"jsdoctags": [
|
543
|
+
{
|
544
|
+
"pos": 672,
|
545
|
+
"end": 697,
|
516
546
|
"flags": 16777216,
|
517
547
|
"modifierFlagsCache": 0,
|
518
548
|
"transformFlags": 0,
|
519
549
|
"kind": 334,
|
520
550
|
"tagName": {
|
521
|
-
"pos":
|
522
|
-
"end":
|
551
|
+
"pos": 673,
|
552
|
+
"end": 685,
|
523
553
|
"flags": 16777216,
|
524
554
|
"modifierFlagsCache": 0,
|
525
555
|
"transformFlags": 0,
|
@@ -534,10 +564,10 @@
|
|
534
564
|
"name": "onPressedChange",
|
535
565
|
"deprecated": false,
|
536
566
|
"deprecationMessage": "",
|
537
|
-
"type": "
|
567
|
+
"type": "OutputEmitterRef<boolean>",
|
538
568
|
"optional": true,
|
539
569
|
"description": "<p>The callback that fires when the state of the toggle changes.</p>\n",
|
540
|
-
"line":
|
570
|
+
"line": 20,
|
541
571
|
"rawdescription": "\n\nThe callback that fires when the state of the toggle changes.\n"
|
542
572
|
},
|
543
573
|
{
|
@@ -547,7 +577,7 @@
|
|
547
577
|
"type": "boolean",
|
548
578
|
"optional": true,
|
549
579
|
"description": "<p>The controlled state of the toggle.</p>\n",
|
550
|
-
"line":
|
580
|
+
"line": 8,
|
551
581
|
"rawdescription": "\n\nThe controlled state of the toggle.\n"
|
552
582
|
}
|
553
583
|
],
|
@@ -559,8 +589,8 @@
|
|
559
589
|
],
|
560
590
|
"injectables": [
|
561
591
|
{
|
562
|
-
"name": "
|
563
|
-
"id": "injectable-
|
592
|
+
"name": "RdxAlertDialogService",
|
593
|
+
"id": "injectable-RdxAlertDialogService-c42754b80223a5530d730417173e6eb90164a45164d767268b011c59e9012ff88d313a8ba20407a578b1a07d48bc540233a05a6f1c033230e0cf1deeda736aee",
|
564
594
|
"file": "alert-dialog/src/alert-dialog.service.ts",
|
565
595
|
"properties": [],
|
566
596
|
"methods": [
|
@@ -632,7 +662,7 @@
|
|
632
662
|
"deprecationMessage": "",
|
633
663
|
"description": "",
|
634
664
|
"rawdescription": "\n",
|
635
|
-
"sourceCode": "import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { Injectable, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class
|
665
|
+
"sourceCode": "import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { Injectable, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RdxAlertDialogService {\n private overlayRef: OverlayRef | null | undefined;\n private dialogContent:\n | {\n viewContainerRef: ViewContainerRef;\n template: TemplateRef<any>;\n }\n | undefined;\n\n constructor(private overlay: Overlay) {}\n\n setDialogContent(viewContainerRef: ViewContainerRef, template: TemplateRef<any>) {\n this.dialogContent = { viewContainerRef, template };\n }\n\n open() {\n if (!this.dialogContent) {\n throw new Error('Dialog content is not set');\n }\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()\n });\n\n const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);\n this.overlayRef.attach(templatePortal);\n\n this.overlayRef.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape' || event.code === 'Escape') {\n this.close();\n }\n });\n this.overlayRef.backdropClick().subscribe(() => this.close());\n }\n\n close() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n",
|
636
666
|
"constructorObj": {
|
637
667
|
"name": "constructor",
|
638
668
|
"description": "",
|
@@ -1103,226 +1133,6 @@
|
|
1103
1133
|
}
|
1104
1134
|
],
|
1105
1135
|
"directives": [
|
1106
|
-
{
|
1107
|
-
"name": "AlertDialogCancelDirective",
|
1108
|
-
"id": "directive-AlertDialogCancelDirective-ec486d3f2722528a718f88338533047b00f831f74a494264f69d6c4a190cde897fe0fc0316dfc2379fbda1fa9c2b4c3c47d8445604113be819acd9d8aa46aad0",
|
1109
|
-
"file": "alert-dialog/src/alert-dialog-cancel.directive.ts",
|
1110
|
-
"type": "directive",
|
1111
|
-
"description": "",
|
1112
|
-
"rawdescription": "\n",
|
1113
|
-
"sourceCode": "import { Directive, inject } from '@angular/core';\nimport { AlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogCancel]',\n standalone: true,\n host: {\n '(click)': 'onClick()'\n }\n})\nexport class AlertDialogCancelDirective {\n private readonly alertDialogService = inject(AlertDialogService);\n\n onClick() {\n this.alertDialogService.close();\n }\n}\n",
|
1114
|
-
"selector": "[rdxAlertDialogCancel]",
|
1115
|
-
"providers": [],
|
1116
|
-
"hostDirectives": [],
|
1117
|
-
"standalone": true,
|
1118
|
-
"inputsClass": [],
|
1119
|
-
"outputsClass": [],
|
1120
|
-
"deprecated": false,
|
1121
|
-
"deprecationMessage": "",
|
1122
|
-
"hostBindings": [],
|
1123
|
-
"hostListeners": [],
|
1124
|
-
"propertiesClass": [],
|
1125
|
-
"methodsClass": [
|
1126
|
-
{
|
1127
|
-
"name": "onClick",
|
1128
|
-
"args": [],
|
1129
|
-
"optional": false,
|
1130
|
-
"returnType": "void",
|
1131
|
-
"typeParameters": [],
|
1132
|
-
"line": 14,
|
1133
|
-
"deprecated": false,
|
1134
|
-
"deprecationMessage": ""
|
1135
|
-
}
|
1136
|
-
],
|
1137
|
-
"extends": []
|
1138
|
-
},
|
1139
|
-
{
|
1140
|
-
"name": "AlertDialogContentDirective",
|
1141
|
-
"id": "directive-AlertDialogContentDirective-fc5389414aee2ba13bf816c13ff24988883abbde938768bd1416238547bb3f21f1eec0996df1099cb0a248c9cbcd801e7e4586643221faa866010c5bc2981cc5",
|
1142
|
-
"file": "alert-dialog/src/alert-dialog-content.directive.ts",
|
1143
|
-
"type": "directive",
|
1144
|
-
"description": "",
|
1145
|
-
"rawdescription": "\n",
|
1146
|
-
"sourceCode": "import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: '[rdxAlertDialogContent]',\n hostDirectives: [\n {\n directive: CdkTrapFocus\n }\n ],\n standalone: true,\n host: {\n '[attr.data-state]': 'open',\n '[attr.cdkTrapFocusAutoCapture]': 'true'\n }\n})\nexport class AlertDialogContentDirective {\n private readonly renderer = inject(Renderer2);\n private readonly elementRef = inject(ElementRef);\n\n @Input() set maxWidth(value: string) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);\n }\n}\n",
|
1147
|
-
"selector": "[rdxAlertDialogContent]",
|
1148
|
-
"providers": [],
|
1149
|
-
"hostDirectives": [
|
1150
|
-
{
|
1151
|
-
"name": "CdkTrapFocus",
|
1152
|
-
"inputs": [],
|
1153
|
-
"outputs": []
|
1154
|
-
}
|
1155
|
-
],
|
1156
|
-
"standalone": true,
|
1157
|
-
"inputsClass": [
|
1158
|
-
{
|
1159
|
-
"name": "maxWidth",
|
1160
|
-
"deprecated": false,
|
1161
|
-
"deprecationMessage": "",
|
1162
|
-
"line": 21,
|
1163
|
-
"type": "string",
|
1164
|
-
"decorators": []
|
1165
|
-
}
|
1166
|
-
],
|
1167
|
-
"outputsClass": [],
|
1168
|
-
"deprecated": false,
|
1169
|
-
"deprecationMessage": "",
|
1170
|
-
"hostBindings": [],
|
1171
|
-
"hostListeners": [],
|
1172
|
-
"propertiesClass": [],
|
1173
|
-
"methodsClass": [],
|
1174
|
-
"extends": [],
|
1175
|
-
"accessors": {
|
1176
|
-
"maxWidth": {
|
1177
|
-
"name": "maxWidth",
|
1178
|
-
"setSignature": {
|
1179
|
-
"name": "maxWidth",
|
1180
|
-
"type": "void",
|
1181
|
-
"deprecated": false,
|
1182
|
-
"deprecationMessage": "",
|
1183
|
-
"args": [
|
1184
|
-
{
|
1185
|
-
"name": "value",
|
1186
|
-
"type": "string",
|
1187
|
-
"deprecated": false,
|
1188
|
-
"deprecationMessage": ""
|
1189
|
-
}
|
1190
|
-
],
|
1191
|
-
"returnType": "void",
|
1192
|
-
"line": 21,
|
1193
|
-
"jsdoctags": [
|
1194
|
-
{
|
1195
|
-
"name": "value",
|
1196
|
-
"type": "string",
|
1197
|
-
"deprecated": false,
|
1198
|
-
"deprecationMessage": "",
|
1199
|
-
"tagName": {
|
1200
|
-
"text": "param"
|
1201
|
-
}
|
1202
|
-
}
|
1203
|
-
]
|
1204
|
-
}
|
1205
|
-
}
|
1206
|
-
}
|
1207
|
-
},
|
1208
|
-
{
|
1209
|
-
"name": "AlertDialogRootDirective",
|
1210
|
-
"id": "directive-AlertDialogRootDirective-6d55043842c1b716957eb02fa934bad8a762c5a8f858e51cd0713938af47093c4103291bdd6195269978940b957c77900a759a1a7eacd12e33f954f59518f57e",
|
1211
|
-
"file": "alert-dialog/src/alert-dialog-root.directive.ts",
|
1212
|
-
"type": "directive",
|
1213
|
-
"description": "",
|
1214
|
-
"rawdescription": "\n",
|
1215
|
-
"sourceCode": "import { Directive, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogRoot]',\n standalone: true\n})\nexport class AlertDialogRootDirective {\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly alertDialogService = inject(AlertDialogService);\n\n @Input() set content(template: TemplateRef<any>) {\n this.alertDialogService.setDialogContent(this.viewContainerRef, template);\n }\n}\n",
|
1216
|
-
"selector": "[rdxAlertDialogRoot]",
|
1217
|
-
"providers": [],
|
1218
|
-
"hostDirectives": [],
|
1219
|
-
"standalone": true,
|
1220
|
-
"inputsClass": [
|
1221
|
-
{
|
1222
|
-
"name": "content",
|
1223
|
-
"deprecated": false,
|
1224
|
-
"deprecationMessage": "",
|
1225
|
-
"line": 12,
|
1226
|
-
"type": "TemplateRef<any>",
|
1227
|
-
"decorators": []
|
1228
|
-
}
|
1229
|
-
],
|
1230
|
-
"outputsClass": [],
|
1231
|
-
"deprecated": false,
|
1232
|
-
"deprecationMessage": "",
|
1233
|
-
"hostBindings": [],
|
1234
|
-
"hostListeners": [],
|
1235
|
-
"propertiesClass": [],
|
1236
|
-
"methodsClass": [],
|
1237
|
-
"extends": [],
|
1238
|
-
"accessors": {
|
1239
|
-
"content": {
|
1240
|
-
"name": "content",
|
1241
|
-
"setSignature": {
|
1242
|
-
"name": "content",
|
1243
|
-
"type": "void",
|
1244
|
-
"deprecated": false,
|
1245
|
-
"deprecationMessage": "",
|
1246
|
-
"args": [
|
1247
|
-
{
|
1248
|
-
"name": "template",
|
1249
|
-
"type": "TemplateRef<any>",
|
1250
|
-
"deprecated": false,
|
1251
|
-
"deprecationMessage": ""
|
1252
|
-
}
|
1253
|
-
],
|
1254
|
-
"returnType": "void",
|
1255
|
-
"line": 12,
|
1256
|
-
"jsdoctags": [
|
1257
|
-
{
|
1258
|
-
"name": "template",
|
1259
|
-
"type": "TemplateRef<any>",
|
1260
|
-
"deprecated": false,
|
1261
|
-
"deprecationMessage": "",
|
1262
|
-
"tagName": {
|
1263
|
-
"text": "param"
|
1264
|
-
}
|
1265
|
-
}
|
1266
|
-
]
|
1267
|
-
}
|
1268
|
-
}
|
1269
|
-
}
|
1270
|
-
},
|
1271
|
-
{
|
1272
|
-
"name": "AlertDialogTitleDirective",
|
1273
|
-
"id": "directive-AlertDialogTitleDirective-f00d6c32a66df82c82b0e83689b047ca8b2a3e61239b43ead945e45ccfb480dba01e597dcfe1c7cf5ab4bf44ffd1178cc0c4f8514924f04d3326dedfa8790dbd",
|
1274
|
-
"file": "alert-dialog/src/alert-dialog-title.directive.ts",
|
1275
|
-
"type": "directive",
|
1276
|
-
"description": "",
|
1277
|
-
"rawdescription": "\n",
|
1278
|
-
"sourceCode": "import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[rdxAlertDialogTitle]',\n standalone: true\n})\nexport class AlertDialogTitleDirective {}\n",
|
1279
|
-
"selector": "[rdxAlertDialogTitle]",
|
1280
|
-
"providers": [],
|
1281
|
-
"hostDirectives": [],
|
1282
|
-
"standalone": true,
|
1283
|
-
"inputsClass": [],
|
1284
|
-
"outputsClass": [],
|
1285
|
-
"deprecated": false,
|
1286
|
-
"deprecationMessage": "",
|
1287
|
-
"hostBindings": [],
|
1288
|
-
"hostListeners": [],
|
1289
|
-
"propertiesClass": [],
|
1290
|
-
"methodsClass": [],
|
1291
|
-
"extends": []
|
1292
|
-
},
|
1293
|
-
{
|
1294
|
-
"name": "AlertDialogTriggerDirective",
|
1295
|
-
"id": "directive-AlertDialogTriggerDirective-dd69bd1802ec0fddc8a5056a6ad30b0b655ef4f889001904d4dad8fdd78a9c4a067ade3b6466973c049824d81b5610184f01409bcb6d4c71c3ea70c781a1ffe9",
|
1296
|
-
"file": "alert-dialog/src/alert-dialog-trigger.directive.ts",
|
1297
|
-
"type": "directive",
|
1298
|
-
"description": "",
|
1299
|
-
"rawdescription": "\n",
|
1300
|
-
"sourceCode": "import { Directive, inject } from '@angular/core';\nimport { AlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogTrigger]',\n standalone: true,\n host: {\n '(click)': 'handleClick()'\n }\n})\nexport class AlertDialogTriggerDirective {\n private readonly alertDialogService = inject(AlertDialogService);\n\n handleClick() {\n this.alertDialogService.open();\n }\n}\n",
|
1301
|
-
"selector": "[rdxAlertDialogTrigger]",
|
1302
|
-
"providers": [],
|
1303
|
-
"hostDirectives": [],
|
1304
|
-
"standalone": true,
|
1305
|
-
"inputsClass": [],
|
1306
|
-
"outputsClass": [],
|
1307
|
-
"deprecated": false,
|
1308
|
-
"deprecationMessage": "",
|
1309
|
-
"hostBindings": [],
|
1310
|
-
"hostListeners": [],
|
1311
|
-
"propertiesClass": [],
|
1312
|
-
"methodsClass": [
|
1313
|
-
{
|
1314
|
-
"name": "handleClick",
|
1315
|
-
"args": [],
|
1316
|
-
"optional": false,
|
1317
|
-
"returnType": "void",
|
1318
|
-
"typeParameters": [],
|
1319
|
-
"line": 14,
|
1320
|
-
"deprecated": false,
|
1321
|
-
"deprecationMessage": ""
|
1322
|
-
}
|
1323
|
-
],
|
1324
|
-
"extends": []
|
1325
|
-
},
|
1326
1136
|
{
|
1327
1137
|
"name": "OnMountDirective",
|
1328
1138
|
"id": "directive-OnMountDirective-f1da695b0136450bf11acf48f95325bc4b4fcbd954ee2e2f98ecf0edecfc8aad023d6ca9d3f1c28ca07481a5526c6276e09a761bc8f572e200a4d94da96f8b33",
|
@@ -1806,12 +1616,12 @@
|
|
1806
1616
|
},
|
1807
1617
|
{
|
1808
1618
|
"name": "RdxAccordionRootDirective",
|
1809
|
-
"id": "directive-RdxAccordionRootDirective-
|
1619
|
+
"id": "directive-RdxAccordionRootDirective-f822c50ab367745ad4ae025b12316e626316425ea7d640415a16f915b90f04f64342b55cdda3c06cfeba6beed6a2238f674bc766003e254db3fb55588e3e4871",
|
1810
1620
|
"file": "accordion/src/accordion-root.directive.ts",
|
1811
1621
|
"type": "directive",
|
1812
1622
|
"description": "",
|
1813
1623
|
"rawdescription": "\n",
|
1814
|
-
"sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { ENTER, SPACE } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n Output,\n QueryList\n} from '@angular/core';\nimport { merge, Subject, Subscription } from 'rxjs';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\nexport type RdxAccordionType = 'single' | 'multiple';\nexport type RdxAccordionOrientation = 'horizontal' | 'vertical';\n\nexport const RdxAccordionRootToken = new InjectionToken<RdxAccordionRootDirective>('RdxAccordionRootDirective');\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxAccordionRoot]',\n standalone: true,\n providers: [\n { provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },\n { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }\n ],\n host: {\n '[attr.data-orientation]': 'orientation',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class RdxAccordionRootDirective implements AfterContentInit, OnDestroy {\n /**\n * @ignore\n */\n protected readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n /**\n * @ignore\n */\n protected readonly dir = inject(Directionality, { optional: true });\n\n /**\n * @ignore\n */\n protected keyManager: FocusKeyManager<RdxAccordionItemDirective>;\n\n /**\n * @ignore\n */\n readonly id: string = `rdx-accordion-${nextId++}`;\n\n /**\n * @ignore\n */\n readonly openCloseAllActions = new Subject<boolean>();\n\n get isMultiple(): boolean {\n return this.type === 'multiple';\n }\n\n /** Whether the Accordion is disabled. */\n @Input({ transform: booleanAttribute }) disabled: boolean;\n\n /**\n * The orientation of the accordion.\n */\n @Input() orientation: RdxAccordionOrientation = 'vertical';\n /**\n * @private\n * @ignore\n */\n @ContentChildren(forwardRef(() => RdxAccordionItemDirective), { descendants: true })\n items: QueryList<RdxAccordionItemDirective>;\n\n /**\n * The value of the item to expand when initially rendered and type is \"single\". Use when you do not need to control the state of the items.\n */\n @Input()\n set defaultValue(value: string[] | string) {\n if (value !== this._defaultValue) {\n this._defaultValue = Array.isArray(value) ? value : [value];\n }\n }\n\n get defaultValue(): string[] | string {\n return this.isMultiple ? this._defaultValue : this._defaultValue[0];\n }\n\n /**\n * Determines whether one or multiple items can be opened at the same time.\n */\n @Input() type: RdxAccordionType = 'single';\n /**\n * @ignore\n */\n @Input() collapsible = true;\n /**\n * The controlled value of the item to expand\n */\n @Input()\n set value(value: string[] | string) {\n if (value !== this._value) {\n this._value = Array.isArray(value) ? value : [value];\n\n this.selectionDispatcher.notify(this.value as unknown as string, this.id);\n }\n }\n\n get value(): string[] | string {\n if (this._value === undefined) {\n return this.defaultValue;\n }\n\n return this.isMultiple ? this._value : this._value[0];\n }\n\n @Output() readonly onValueChange: EventEmitter<void> = new EventEmitter<void>();\n\n private _value?: string[];\n private _defaultValue: string[] | string = [];\n\n private onValueChangeSubscription: Subscription;\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this.selectionDispatcher.notify((this._value ?? this._defaultValue) as unknown as string, this.id);\n\n this.keyManager = new FocusKeyManager(this.items).withHomeAndEnd();\n\n if (this.orientation === 'horizontal') {\n this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');\n } else {\n this.keyManager.withVerticalOrientation();\n }\n\n this.onValueChangeSubscription = merge(...this.items.map((item) => item.expandedChange)).subscribe(() =>\n this.onValueChange.emit()\n );\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.openCloseAllActions.complete();\n this.onValueChangeSubscription.unsubscribe();\n }\n\n /**\n * @ignore\n */\n handleKeydown(event: KeyboardEvent) {\n if (!this.keyManager.activeItem) {\n this.keyManager.setFirstItemActive();\n }\n\n const activeItem = this.keyManager.activeItem;\n\n if (\n (event.keyCode === ENTER || event.keyCode === SPACE) &&\n !this.keyManager.isTyping() &&\n activeItem &&\n !activeItem.disabled\n ) {\n event.preventDefault();\n activeItem.toggle();\n } else {\n this.keyManager.onKeydown(event);\n }\n }\n\n /** Opens all enabled accordion items in an accordion where multi is enabled.\n * @ignore\n */\n openAll(): void {\n if (this.isMultiple) {\n this.openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items.\n * @ignore\n */\n closeAll(): void {\n this.openCloseAllActions.next(false);\n }\n\n /**\n * @ignore\n */\n setActiveItem(item: RdxAccordionItemDirective) {\n this.keyManager.setActiveItem(item);\n }\n}\n",
|
1624
|
+
"sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { ENTER, SPACE, TAB } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n Input,\n OnDestroy,\n Output,\n QueryList\n} from '@angular/core';\nimport { merge, Subject, Subscription } from 'rxjs';\nimport { RdxAccordionItemDirective } from './accordion-item.directive';\n\nexport type RdxAccordionType = 'single' | 'multiple';\nexport type RdxAccordionOrientation = 'horizontal' | 'vertical';\n\nexport const RdxAccordionRootToken = new InjectionToken<RdxAccordionRootDirective>('RdxAccordionRootDirective');\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxAccordionRoot]',\n standalone: true,\n providers: [\n { provide: RdxAccordionRootToken, useExisting: RdxAccordionRootDirective },\n { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }\n ],\n host: {\n '[attr.data-orientation]': 'orientation',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class RdxAccordionRootDirective implements AfterContentInit, OnDestroy {\n /**\n * @ignore\n */\n protected readonly selectionDispatcher = inject(UniqueSelectionDispatcher);\n /**\n * @ignore\n */\n protected readonly dir = inject(Directionality, { optional: true });\n\n /**\n * @ignore\n */\n protected keyManager: FocusKeyManager<RdxAccordionItemDirective>;\n\n /**\n * @ignore\n */\n readonly id: string = `rdx-accordion-${nextId++}`;\n\n /**\n * @ignore\n */\n readonly openCloseAllActions = new Subject<boolean>();\n\n get isMultiple(): boolean {\n return this.type === 'multiple';\n }\n\n /** Whether the Accordion is disabled. */\n @Input({ transform: booleanAttribute }) disabled: boolean;\n\n /**\n * The orientation of the accordion.\n */\n @Input() orientation: RdxAccordionOrientation = 'vertical';\n /**\n * @private\n * @ignore\n */\n @ContentChildren(forwardRef(() => RdxAccordionItemDirective), { descendants: true })\n items: QueryList<RdxAccordionItemDirective>;\n\n /**\n * The value of the item to expand when initially rendered and type is \"single\". Use when you do not need to control the state of the items.\n */\n @Input()\n set defaultValue(value: string[] | string) {\n if (value !== this._defaultValue) {\n this._defaultValue = Array.isArray(value) ? value : [value];\n }\n }\n\n get defaultValue(): string[] | string {\n return this.isMultiple ? this._defaultValue : this._defaultValue[0];\n }\n\n /**\n * Determines whether one or multiple items can be opened at the same time.\n */\n @Input() type: RdxAccordionType = 'single';\n /**\n * @ignore\n */\n @Input() collapsible = true;\n /**\n * The controlled value of the item to expand\n */\n @Input()\n set value(value: string[] | string) {\n if (value !== this._value) {\n this._value = Array.isArray(value) ? value : [value];\n\n this.selectionDispatcher.notify(this.value as unknown as string, this.id);\n }\n }\n\n get value(): string[] | string {\n if (this._value === undefined) {\n return this.defaultValue;\n }\n\n return this.isMultiple ? this._value : this._value[0];\n }\n\n @Output() readonly onValueChange: EventEmitter<void> = new EventEmitter<void>();\n\n private _value?: string[];\n private _defaultValue: string[] | string = [];\n\n private onValueChangeSubscription: Subscription;\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this.selectionDispatcher.notify((this._value ?? this._defaultValue) as unknown as string, this.id);\n\n this.keyManager = new FocusKeyManager(this.items).withHomeAndEnd();\n\n if (this.orientation === 'horizontal') {\n this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');\n } else {\n this.keyManager.withVerticalOrientation();\n }\n\n this.onValueChangeSubscription = merge(...this.items.map((item) => item.expandedChange)).subscribe(() =>\n this.onValueChange.emit()\n );\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.openCloseAllActions.complete();\n this.onValueChangeSubscription.unsubscribe();\n }\n\n /**\n * @ignore\n */\n handleKeydown(event: KeyboardEvent) {\n if (!this.keyManager.activeItem) {\n this.keyManager.setFirstItemActive();\n }\n\n const activeItem = this.keyManager.activeItem;\n\n if (\n (event.keyCode === ENTER || event.keyCode === SPACE) &&\n !this.keyManager.isTyping() &&\n activeItem &&\n !activeItem.disabled\n ) {\n event.preventDefault();\n activeItem.toggle();\n } else if (event.keyCode === TAB && event.shiftKey) {\n if (this.keyManager.activeItemIndex === 0) return;\n\n this.keyManager.setPreviousItemActive();\n event.preventDefault();\n } else if (event.keyCode === TAB) {\n if (this.keyManager.activeItemIndex === this.items.length - 1) return;\n\n this.keyManager.setNextItemActive();\n event.preventDefault();\n } else {\n this.keyManager.onKeydown(event);\n }\n }\n\n /** Opens all enabled accordion items in an accordion where multi is enabled.\n * @ignore\n */\n openAll(): void {\n if (this.isMultiple) {\n this.openCloseAllActions.next(true);\n }\n }\n\n /** Closes all enabled accordion items.\n * @ignore\n */\n closeAll(): void {\n this.openCloseAllActions.next(false);\n }\n\n /**\n * @ignore\n */\n setActiveItem(item: RdxAccordionItemDirective) {\n this.keyManager.setActiveItem(item);\n }\n}\n",
|
1815
1625
|
"selector": "[rdxAccordionRoot]",
|
1816
1626
|
"providers": [
|
1817
1627
|
{
|
@@ -2077,19 +1887,295 @@
|
|
2077
1887
|
"extends": []
|
2078
1888
|
},
|
2079
1889
|
{
|
2080
|
-
"name": "
|
2081
|
-
"id": "directive-
|
2082
|
-
"file": "
|
1890
|
+
"name": "RdxAlertDialogCancelDirective",
|
1891
|
+
"id": "directive-RdxAlertDialogCancelDirective-d80bbcc24200cb95f19a5dd6a1f1e57d6c949b31566fc80c29d4b81d4558efdd1c5b7e257efa93d549ad088e73be6fd00e831786aebf3c43c6e5bffcd69fe53a",
|
1892
|
+
"file": "alert-dialog/src/alert-dialog-cancel.directive.ts",
|
2083
1893
|
"type": "directive",
|
2084
1894
|
"description": "",
|
2085
1895
|
"rawdescription": "\n",
|
2086
|
-
"sourceCode": "import {
|
2087
|
-
"selector": "[
|
1896
|
+
"sourceCode": "import { Directive, inject } from '@angular/core';\nimport { RdxAlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogCancel]',\n standalone: true,\n host: {\n '(click)': 'onClick()'\n }\n})\nexport class RdxAlertDialogCancelDirective {\n private readonly alertDialogService = inject(RdxAlertDialogService);\n\n onClick() {\n this.alertDialogService.close();\n }\n}\n",
|
1897
|
+
"selector": "[rdxAlertDialogCancel]",
|
2088
1898
|
"providers": [],
|
2089
1899
|
"hostDirectives": [],
|
2090
1900
|
"standalone": true,
|
2091
|
-
"inputsClass": [
|
2092
|
-
|
1901
|
+
"inputsClass": [],
|
1902
|
+
"outputsClass": [],
|
1903
|
+
"deprecated": false,
|
1904
|
+
"deprecationMessage": "",
|
1905
|
+
"hostBindings": [],
|
1906
|
+
"hostListeners": [],
|
1907
|
+
"propertiesClass": [],
|
1908
|
+
"methodsClass": [
|
1909
|
+
{
|
1910
|
+
"name": "onClick",
|
1911
|
+
"args": [],
|
1912
|
+
"optional": false,
|
1913
|
+
"returnType": "void",
|
1914
|
+
"typeParameters": [],
|
1915
|
+
"line": 14,
|
1916
|
+
"deprecated": false,
|
1917
|
+
"deprecationMessage": ""
|
1918
|
+
}
|
1919
|
+
],
|
1920
|
+
"extends": []
|
1921
|
+
},
|
1922
|
+
{
|
1923
|
+
"name": "RdxAlertDialogContentDirective",
|
1924
|
+
"id": "directive-RdxAlertDialogContentDirective-bcd379f8a36aafcdcddf8ed7d03e62ca30b760e9666397ded9ec4f69b08fb8dc849894cf891d03d233b5f79939f9aa7b388f8104e7d360a6a5469a40bc815680",
|
1925
|
+
"file": "alert-dialog/src/alert-dialog-content.directive.ts",
|
1926
|
+
"type": "directive",
|
1927
|
+
"description": "",
|
1928
|
+
"rawdescription": "\n",
|
1929
|
+
"sourceCode": "import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: '[rdxAlertDialogContent]',\n standalone: true,\n hostDirectives: [\n {\n directive: CdkTrapFocus\n }\n ],\n host: {\n '[attr.data-state]': '\"open\"',\n '[attr.cdkTrapFocusAutoCapture]': 'true'\n }\n})\nexport class RdxAlertDialogContentDirective {\n private readonly renderer = inject(Renderer2);\n private readonly elementRef = inject(ElementRef);\n\n @Input() set maxWidth(value: string) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);\n }\n}\n",
|
1930
|
+
"selector": "[rdxAlertDialogContent]",
|
1931
|
+
"providers": [],
|
1932
|
+
"hostDirectives": [
|
1933
|
+
{
|
1934
|
+
"name": "CdkTrapFocus",
|
1935
|
+
"inputs": [],
|
1936
|
+
"outputs": []
|
1937
|
+
}
|
1938
|
+
],
|
1939
|
+
"standalone": true,
|
1940
|
+
"inputsClass": [
|
1941
|
+
{
|
1942
|
+
"name": "maxWidth",
|
1943
|
+
"deprecated": false,
|
1944
|
+
"deprecationMessage": "",
|
1945
|
+
"line": 21,
|
1946
|
+
"type": "string",
|
1947
|
+
"decorators": []
|
1948
|
+
}
|
1949
|
+
],
|
1950
|
+
"outputsClass": [],
|
1951
|
+
"deprecated": false,
|
1952
|
+
"deprecationMessage": "",
|
1953
|
+
"hostBindings": [],
|
1954
|
+
"hostListeners": [],
|
1955
|
+
"propertiesClass": [],
|
1956
|
+
"methodsClass": [],
|
1957
|
+
"extends": [],
|
1958
|
+
"accessors": {
|
1959
|
+
"maxWidth": {
|
1960
|
+
"name": "maxWidth",
|
1961
|
+
"setSignature": {
|
1962
|
+
"name": "maxWidth",
|
1963
|
+
"type": "void",
|
1964
|
+
"deprecated": false,
|
1965
|
+
"deprecationMessage": "",
|
1966
|
+
"args": [
|
1967
|
+
{
|
1968
|
+
"name": "value",
|
1969
|
+
"type": "string",
|
1970
|
+
"deprecated": false,
|
1971
|
+
"deprecationMessage": ""
|
1972
|
+
}
|
1973
|
+
],
|
1974
|
+
"returnType": "void",
|
1975
|
+
"line": 21,
|
1976
|
+
"jsdoctags": [
|
1977
|
+
{
|
1978
|
+
"name": "value",
|
1979
|
+
"type": "string",
|
1980
|
+
"deprecated": false,
|
1981
|
+
"deprecationMessage": "",
|
1982
|
+
"tagName": {
|
1983
|
+
"text": "param"
|
1984
|
+
}
|
1985
|
+
}
|
1986
|
+
]
|
1987
|
+
}
|
1988
|
+
}
|
1989
|
+
}
|
1990
|
+
},
|
1991
|
+
{
|
1992
|
+
"name": "RdxAlertDialogRootDirective",
|
1993
|
+
"id": "directive-RdxAlertDialogRootDirective-4cb3487f643dbbef236c48379c7da78bf400ec2cf09d4ac725947e8c86e7dd0bebe63e406112cb8e58de641f984309e1b643ea857d8312574530a815a448a79e",
|
1994
|
+
"file": "alert-dialog/src/alert-dialog-root.directive.ts",
|
1995
|
+
"type": "directive",
|
1996
|
+
"description": "",
|
1997
|
+
"rawdescription": "\n",
|
1998
|
+
"sourceCode": "import { Directive, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { RdxAlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogRoot]',\n standalone: true\n})\nexport class RdxAlertDialogRootDirective {\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly alertDialogService = inject(RdxAlertDialogService);\n\n @Input() set content(template: TemplateRef<any>) {\n this.alertDialogService.setDialogContent(this.viewContainerRef, template);\n }\n}\n",
|
1999
|
+
"selector": "[rdxAlertDialogRoot]",
|
2000
|
+
"providers": [],
|
2001
|
+
"hostDirectives": [],
|
2002
|
+
"standalone": true,
|
2003
|
+
"inputsClass": [
|
2004
|
+
{
|
2005
|
+
"name": "content",
|
2006
|
+
"deprecated": false,
|
2007
|
+
"deprecationMessage": "",
|
2008
|
+
"line": 12,
|
2009
|
+
"type": "TemplateRef<any>",
|
2010
|
+
"decorators": []
|
2011
|
+
}
|
2012
|
+
],
|
2013
|
+
"outputsClass": [],
|
2014
|
+
"deprecated": false,
|
2015
|
+
"deprecationMessage": "",
|
2016
|
+
"hostBindings": [],
|
2017
|
+
"hostListeners": [],
|
2018
|
+
"propertiesClass": [],
|
2019
|
+
"methodsClass": [],
|
2020
|
+
"extends": [],
|
2021
|
+
"accessors": {
|
2022
|
+
"content": {
|
2023
|
+
"name": "content",
|
2024
|
+
"setSignature": {
|
2025
|
+
"name": "content",
|
2026
|
+
"type": "void",
|
2027
|
+
"deprecated": false,
|
2028
|
+
"deprecationMessage": "",
|
2029
|
+
"args": [
|
2030
|
+
{
|
2031
|
+
"name": "template",
|
2032
|
+
"type": "TemplateRef<any>",
|
2033
|
+
"deprecated": false,
|
2034
|
+
"deprecationMessage": ""
|
2035
|
+
}
|
2036
|
+
],
|
2037
|
+
"returnType": "void",
|
2038
|
+
"line": 12,
|
2039
|
+
"jsdoctags": [
|
2040
|
+
{
|
2041
|
+
"name": "template",
|
2042
|
+
"type": "TemplateRef<any>",
|
2043
|
+
"deprecated": false,
|
2044
|
+
"deprecationMessage": "",
|
2045
|
+
"tagName": {
|
2046
|
+
"text": "param"
|
2047
|
+
}
|
2048
|
+
}
|
2049
|
+
]
|
2050
|
+
}
|
2051
|
+
}
|
2052
|
+
}
|
2053
|
+
},
|
2054
|
+
{
|
2055
|
+
"name": "RdxAlertDialogTitleDirective",
|
2056
|
+
"id": "directive-RdxAlertDialogTitleDirective-9c00bcacce12a6a8a942c7696d936890dc26e3a7654205edf07def508039eb099fad0368f7b5eca7f5aea4efc156b3802d63cd96c52abcc6ff5190d70e0c09b5",
|
2057
|
+
"file": "alert-dialog/src/alert-dialog-title.directive.ts",
|
2058
|
+
"type": "directive",
|
2059
|
+
"description": "",
|
2060
|
+
"rawdescription": "\n",
|
2061
|
+
"sourceCode": "import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[rdxAlertDialogTitle]',\n standalone: true\n})\nexport class RdxAlertDialogTitleDirective {}\n",
|
2062
|
+
"selector": "[rdxAlertDialogTitle]",
|
2063
|
+
"providers": [],
|
2064
|
+
"hostDirectives": [],
|
2065
|
+
"standalone": true,
|
2066
|
+
"inputsClass": [],
|
2067
|
+
"outputsClass": [],
|
2068
|
+
"deprecated": false,
|
2069
|
+
"deprecationMessage": "",
|
2070
|
+
"hostBindings": [],
|
2071
|
+
"hostListeners": [],
|
2072
|
+
"propertiesClass": [],
|
2073
|
+
"methodsClass": [],
|
2074
|
+
"extends": []
|
2075
|
+
},
|
2076
|
+
{
|
2077
|
+
"name": "RdxAlertDialogTriggerDirective",
|
2078
|
+
"id": "directive-RdxAlertDialogTriggerDirective-422c72ac6dd420ea1027d9205052dc8fadb62cc127fc0dfd24099d56c973163df8719acef428bf74d102c4a5e6bd0a6aaf2f1957bb11a35ff9866ad4eb80e9b0",
|
2079
|
+
"file": "alert-dialog/src/alert-dialog-trigger.directive.ts",
|
2080
|
+
"type": "directive",
|
2081
|
+
"description": "",
|
2082
|
+
"rawdescription": "\n",
|
2083
|
+
"sourceCode": "import { Directive, inject } from '@angular/core';\nimport { RdxAlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogTrigger]',\n standalone: true,\n host: {\n '(click)': 'handleClick()'\n }\n})\nexport class RdxAlertDialogTriggerDirective {\n private readonly alertDialogService = inject(RdxAlertDialogService);\n\n handleClick() {\n this.alertDialogService.open();\n }\n}\n",
|
2084
|
+
"selector": "[rdxAlertDialogTrigger]",
|
2085
|
+
"providers": [],
|
2086
|
+
"hostDirectives": [],
|
2087
|
+
"standalone": true,
|
2088
|
+
"inputsClass": [],
|
2089
|
+
"outputsClass": [],
|
2090
|
+
"deprecated": false,
|
2091
|
+
"deprecationMessage": "",
|
2092
|
+
"hostBindings": [],
|
2093
|
+
"hostListeners": [],
|
2094
|
+
"propertiesClass": [],
|
2095
|
+
"methodsClass": [
|
2096
|
+
{
|
2097
|
+
"name": "handleClick",
|
2098
|
+
"args": [],
|
2099
|
+
"optional": false,
|
2100
|
+
"returnType": "void",
|
2101
|
+
"typeParameters": [],
|
2102
|
+
"line": 14,
|
2103
|
+
"deprecated": false,
|
2104
|
+
"deprecationMessage": ""
|
2105
|
+
}
|
2106
|
+
],
|
2107
|
+
"extends": []
|
2108
|
+
},
|
2109
|
+
{
|
2110
|
+
"name": "RdxAspectRatioDirective",
|
2111
|
+
"id": "directive-RdxAspectRatioDirective-b883c7bbe79c382fa6312aba8d6b55b2774a26494dc6d49d77e3d654fd0e27d8142fce11b91158010431c1e125d8b1cd424acbf9cd93a07c2c3020863090e54b",
|
2112
|
+
"file": "aspect-ratio/src/aspect-ratio.directive.ts",
|
2113
|
+
"type": "directive",
|
2114
|
+
"description": "<p>Directive to maintain an aspect ratio for an element.\nThe element will have its <code>padding-bottom</code> dynamically calculated\nbased on the provided aspect ratio to maintain the desired ratio.\nThe content inside the element will be positioned absolutely.</p>\n",
|
2115
|
+
"rawdescription": "\n\nDirective to maintain an aspect ratio for an element.\nThe element will have its `padding-bottom` dynamically calculated\nbased on the provided aspect ratio to maintain the desired ratio.\nThe content inside the element will be positioned absolutely.\n",
|
2116
|
+
"sourceCode": "import { NumberInput } from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n Renderer2\n} from '@angular/core';\n\n/**\n * Directive to maintain an aspect ratio for an element.\n * The element will have its `padding-bottom` dynamically calculated\n * based on the provided aspect ratio to maintain the desired ratio.\n * The content inside the element will be positioned absolutely.\n */\n@Directive({\n selector: '[rdxAspectRatio]',\n exportAs: 'rdxAspectRatio',\n standalone: true,\n host: {\n '[style.position]': `'relative'`,\n '[style.width]': `'100%'`,\n '[style.padding-bottom]': 'paddingBottom()'\n }\n})\nexport class RdxAspectRatioDirective implements AfterViewInit {\n private element = inject(ElementRef);\n private renderer = inject(Renderer2);\n\n /**\n * The desired aspect ratio (e.g., 16/9).\n * By default, it is set to 1 (which results in a square, 1:1).\n */\n readonly ratio = input<number, NumberInput>(1, { transform: numberAttribute });\n\n /**\n * Dynamically computed `padding-bottom` style for the element.\n * This value is calculated based on the inverse of the aspect ratio.\n *\n * If the ratio is zero, it defaults to `0%` to avoid division by zero.\n */\n protected readonly paddingBottom = computed(() => {\n const ratioValue = this.ratio();\n return `${ratioValue !== 0 ? (1 / ratioValue) * 100 : 0}%`;\n });\n\n ngAfterViewInit() {\n const content = this.element.nativeElement.firstElementChild;\n if (content) {\n // Set the content to cover the entire element with absolute positioning\n this.renderer.setStyle(content, 'position', 'absolute');\n this.renderer.setStyle(content, 'inset', '0');\n }\n }\n}\n",
|
2117
|
+
"selector": "[rdxAspectRatio]",
|
2118
|
+
"providers": [],
|
2119
|
+
"exportAs": "rdxAspectRatio",
|
2120
|
+
"hostDirectives": [],
|
2121
|
+
"standalone": true,
|
2122
|
+
"inputsClass": [],
|
2123
|
+
"outputsClass": [],
|
2124
|
+
"deprecated": false,
|
2125
|
+
"deprecationMessage": "",
|
2126
|
+
"hostBindings": [],
|
2127
|
+
"hostListeners": [],
|
2128
|
+
"propertiesClass": [
|
2129
|
+
{
|
2130
|
+
"name": "paddingBottom",
|
2131
|
+
"defaultValue": "computed(() => {\n const ratioValue = this.ratio();\n return `${ratioValue !== 0 ? (1 / ratioValue) * 100 : 0}%`;\n })",
|
2132
|
+
"deprecated": false,
|
2133
|
+
"deprecationMessage": "",
|
2134
|
+
"type": "",
|
2135
|
+
"optional": false,
|
2136
|
+
"description": "<p>Dynamically computed <code>padding-bottom</code> style for the element.\nThis value is calculated based on the inverse of the aspect ratio.</p>\n<p>If the ratio is zero, it defaults to <code>0%</code> to avoid division by zero.</p>\n",
|
2137
|
+
"line": 45,
|
2138
|
+
"rawdescription": "\n\nDynamically computed `padding-bottom` style for the element.\nThis value is calculated based on the inverse of the aspect ratio.\n\nIf the ratio is zero, it defaults to `0%` to avoid division by zero.\n",
|
2139
|
+
"modifierKind": [
|
2140
|
+
124,
|
2141
|
+
148
|
2142
|
+
]
|
2143
|
+
},
|
2144
|
+
{
|
2145
|
+
"name": "ratio",
|
2146
|
+
"defaultValue": "input<number, NumberInput>(1, { transform: numberAttribute })",
|
2147
|
+
"deprecated": false,
|
2148
|
+
"deprecationMessage": "",
|
2149
|
+
"type": "",
|
2150
|
+
"optional": false,
|
2151
|
+
"description": "<p>The desired aspect ratio (e.g., 16/9).\nBy default, it is set to 1 (which results in a square, 1:1).</p>\n",
|
2152
|
+
"line": 37,
|
2153
|
+
"rawdescription": "\n\nThe desired aspect ratio (e.g., 16/9).\nBy default, it is set to 1 (which results in a square, 1:1).\n",
|
2154
|
+
"modifierKind": [
|
2155
|
+
148
|
2156
|
+
]
|
2157
|
+
}
|
2158
|
+
],
|
2159
|
+
"methodsClass": [],
|
2160
|
+
"extends": [],
|
2161
|
+
"implements": [
|
2162
|
+
"AfterViewInit"
|
2163
|
+
]
|
2164
|
+
},
|
2165
|
+
{
|
2166
|
+
"name": "RdxAutoFocusDirective",
|
2167
|
+
"id": "directive-RdxAutoFocusDirective-36fdd916db27dba985b1c2f77905595edbce993570293a337d7b80f0efa4ef852996b041e5caad932322228c1d26e64ac067d0aac41a4e3e390475bed79dfb5d",
|
2168
|
+
"file": "core/src/auto-focus.directive.ts",
|
2169
|
+
"type": "directive",
|
2170
|
+
"description": "",
|
2171
|
+
"rawdescription": "\n",
|
2172
|
+
"sourceCode": "import { booleanAttribute, Directive, ElementRef, inject, Input, NgZone } from '@angular/core';\n\n/*\n * <div [rdxAutoFocus]=\"true\"></div>\n */\n\n@Directive({\n selector: '[rdxAutoFocus]',\n standalone: true\n})\nexport class RdxAutoFocusDirective {\n #elementRef = inject(ElementRef);\n #ngZone = inject(NgZone);\n\n private _autoSelect = false;\n\n /**\n * @default false\n */\n @Input({ alias: 'rdxAutoFocus', transform: booleanAttribute })\n set autoFocus(value: boolean) {\n if (value) {\n // Note: Running this outside Angular's zone because `element.focus()` does not trigger change detection.\n this.#ngZone.runOutsideAngular(() =>\n // Note: `element.focus()` causes re-layout which might lead to frame drops on slower devices.\n // https://gist.github.com/paulirish/5d52fb081b3570c81e3a#setting-focus\n // `setTimeout` is a macrotask executed within the current rendering frame.\n // Animation tasks are executed in the next rendering frame.\n reqAnimationFrame(() => {\n this.#elementRef.nativeElement.focus();\n if (this._autoSelect && this.#elementRef.nativeElement.select) {\n this.#elementRef.nativeElement.select();\n }\n })\n );\n }\n }\n\n // Setter for autoSelect attribute to enable text selection when autoFocus is true.\n @Input({ transform: booleanAttribute })\n set autoSelect(value: boolean) {\n this._autoSelect = value;\n }\n}\n\nconst availablePrefixes = ['moz', 'ms', 'webkit'];\n\nfunction requestAnimationFramePolyfill(): typeof requestAnimationFrame {\n let lastTime = 0;\n\n return function (callback: FrameRequestCallback): number {\n const currTime = new Date().getTime();\n const timeToCall = Math.max(0, 16 - (currTime - lastTime));\n\n const id = setTimeout(() => {\n callback(currTime + timeToCall);\n }, timeToCall) as any;\n\n lastTime = currTime + timeToCall;\n\n return id;\n };\n}\n\n// Function to get the appropriate requestAnimationFrame method with fallback to polyfill.\nfunction getRequestAnimationFrame(): typeof requestAnimationFrame {\n if (typeof window === 'undefined') {\n return () => 0;\n }\n if (window.requestAnimationFrame) {\n // https://github.com/vuejs/vue/issues/4465\n return window.requestAnimationFrame.bind(window);\n }\n\n const prefix = availablePrefixes.filter((key) => `${key}RequestAnimationFrame` in window)[0];\n\n return prefix ? (window as any)[`${prefix}RequestAnimationFrame`] : requestAnimationFramePolyfill();\n}\n\n// Get the requestAnimationFrame function or its polyfill.\nconst reqAnimationFrame = getRequestAnimationFrame();\n",
|
2173
|
+
"selector": "[rdxAutoFocus]",
|
2174
|
+
"providers": [],
|
2175
|
+
"hostDirectives": [],
|
2176
|
+
"standalone": true,
|
2177
|
+
"inputsClass": [
|
2178
|
+
{
|
2093
2179
|
"required": false,
|
2094
2180
|
"name": "autoSelect",
|
2095
2181
|
"deprecated": false,
|
@@ -2203,12 +2289,12 @@
|
|
2203
2289
|
},
|
2204
2290
|
{
|
2205
2291
|
"name": "RdxAvatarFallbackDirective",
|
2206
|
-
"id": "directive-RdxAvatarFallbackDirective-
|
2292
|
+
"id": "directive-RdxAvatarFallbackDirective-3ec0a285681b4e3cef007c029710e37483fa80c00cbfcce5147fbcb173c808e1606e55fea16a94eb028b2692758b9c15c983bf6f8e5d3bb38210d8ba1d5d3ec0",
|
2207
2293
|
"file": "avatar/src/avatar-fallback.directive.ts",
|
2208
2294
|
"type": "directive",
|
2209
2295
|
"description": "",
|
2210
2296
|
"rawdescription": "\n",
|
2211
|
-
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport {
|
2297
|
+
"sourceCode": "import { isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n inject,\n Input,\n NgZone,\n numberAttribute,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n signal\n} from '@angular/core';\nimport { injectAvatar } from './avatar-root.directive';\nimport { injectAvatarConfig } from './avatar.config';\n\nexport interface RdxAvatarFallbackProps {\n delayMs?: number;\n}\n\n@Directive({\n selector: 'span[rdxAvatarFallback]',\n exportAs: 'rdxAvatarFallback',\n standalone: true,\n host: {\n '[style.display]': 'visible() ? null : \"none\"'\n }\n})\nexport class RdxAvatarFallbackDirective implements RdxAvatarFallbackProps, OnInit, OnDestroy {\n private readonly avatar = injectAvatar();\n\n private readonly config = injectAvatarConfig();\n\n private readonly ngZone = inject(NgZone);\n\n private readonly platformId = inject(PLATFORM_ID);\n\n /**\n * Define a delay before the fallback is shown.\n * This is useful to only show the fallback for those with slower connections.\n * @default 0\n */\n @Input({ alias: 'rdxDelayMs', transform: numberAttribute }) delayMs: number = this.config.delayMs;\n\n readonly visible = signal(false);\n\n /**\n * Determine the delay has elapsed, and we can show the fallback.\n */\n private delayElapsed = false;\n\n private timeoutId: ReturnType<typeof setTimeout> | null = null;\n\n ngOnInit(): void {\n if (isPlatformBrowser(this.platformId)) {\n this.ngZone.runOutsideAngular(() => {\n this.timeoutId = globalThis.setTimeout(() => {\n this.ngZone.run(() => {\n this.delayElapsed = true;\n this.updateVisibility();\n });\n }, this.delayMs);\n });\n }\n }\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId) && this.timeoutId !== null) {\n globalThis.clearTimeout(this.timeoutId);\n }\n }\n\n private updateVisibility(): void {\n this.visible.set(this.delayElapsed && this.avatar._state() !== 'loaded');\n }\n}\n",
|
2212
2298
|
"selector": "span[rdxAvatarFallback]",
|
2213
2299
|
"providers": [],
|
2214
2300
|
"exportAs": "rdxAvatarFallback",
|
@@ -2223,15 +2309,15 @@
|
|
2223
2309
|
"deprecationMessage": "",
|
2224
2310
|
"jsdoctags": [
|
2225
2311
|
{
|
2226
|
-
"pos":
|
2227
|
-
"end":
|
2312
|
+
"pos": 1025,
|
2313
|
+
"end": 1041,
|
2228
2314
|
"flags": 16842752,
|
2229
2315
|
"modifierFlagsCache": 0,
|
2230
2316
|
"transformFlags": 0,
|
2231
2317
|
"kind": 334,
|
2232
2318
|
"tagName": {
|
2233
|
-
"pos":
|
2234
|
-
"end":
|
2319
|
+
"pos": 1026,
|
2320
|
+
"end": 1033,
|
2235
2321
|
"flags": 16842752,
|
2236
2322
|
"modifierFlagsCache": 0,
|
2237
2323
|
"transformFlags": 0,
|
@@ -2243,7 +2329,7 @@
|
|
2243
2329
|
],
|
2244
2330
|
"rawdescription": "\n\nDefine a delay before the fallback is shown.\nThis is useful to only show the fallback for those with slower connections.\n",
|
2245
2331
|
"description": "<p>Define a delay before the fallback is shown.\nThis is useful to only show the fallback for those with slower connections.</p>\n",
|
2246
|
-
"line":
|
2332
|
+
"line": 42,
|
2247
2333
|
"type": "number",
|
2248
2334
|
"decorators": []
|
2249
2335
|
}
|
@@ -2253,25 +2339,28 @@
|
|
2253
2339
|
"deprecationMessage": "",
|
2254
2340
|
"hostBindings": [],
|
2255
2341
|
"hostListeners": [],
|
2256
|
-
"propertiesClass": [
|
2257
|
-
|
2258
|
-
|
2259
|
-
|
2342
|
+
"propertiesClass": [
|
2343
|
+
{
|
2344
|
+
"name": "visible",
|
2345
|
+
"defaultValue": "signal(false)",
|
2346
|
+
"deprecated": false,
|
2347
|
+
"deprecationMessage": "",
|
2348
|
+
"type": "",
|
2349
|
+
"optional": false,
|
2350
|
+
"description": "",
|
2351
|
+
"line": 44,
|
2352
|
+
"modifierKind": [
|
2353
|
+
148
|
2354
|
+
]
|
2355
|
+
}
|
2356
|
+
],
|
2357
|
+
"methodsClass": [],
|
2358
|
+
"extends": [],
|
2359
|
+
"implements": [
|
2260
2360
|
"RdxAvatarFallbackProps",
|
2261
2361
|
"OnInit",
|
2262
2362
|
"OnDestroy"
|
2263
|
-
]
|
2264
|
-
"accessors": {
|
2265
|
-
"visible": {
|
2266
|
-
"name": "visible",
|
2267
|
-
"getSignature": {
|
2268
|
-
"name": "visible",
|
2269
|
-
"type": "boolean",
|
2270
|
-
"returnType": "boolean",
|
2271
|
-
"line": 34
|
2272
|
-
}
|
2273
|
-
}
|
2274
|
-
}
|
2363
|
+
]
|
2275
2364
|
},
|
2276
2365
|
{
|
2277
2366
|
"name": "RdxAvatarImageDirective",
|
@@ -5114,7 +5203,7 @@
|
|
5114
5203
|
"optional": false,
|
5115
5204
|
"returnType": "void",
|
5116
5205
|
"typeParameters": [],
|
5117
|
-
"line":
|
5206
|
+
"line": 55,
|
5118
5207
|
"deprecated": false,
|
5119
5208
|
"deprecationMessage": "",
|
5120
5209
|
"modifierKind": [
|
@@ -5158,12 +5247,12 @@
|
|
5158
5247
|
},
|
5159
5248
|
{
|
5160
5249
|
"name": "RdxDropdownMenuItemDirective",
|
5161
|
-
"id": "directive-RdxDropdownMenuItemDirective-
|
5250
|
+
"id": "directive-RdxDropdownMenuItemDirective-d0a62e1d8c17431571b907aeae565640da58d6cfc5b5ae0019a6bb9b3df14cd324bf7ecf2674d726e4a7926b389b453b465d9592627a36b965ddd620e2d5f1d8",
|
5162
5251
|
"file": "dropdown-menu/src/dropdown-menu-item.directive.ts",
|
5163
5252
|
"type": "directive",
|
5164
5253
|
"description": "",
|
5165
5254
|
"rawdescription": "\n",
|
5166
|
-
"sourceCode": "import { CDK_MENU, CdkMenuItem } from '@angular/cdk/menu';\nimport { booleanAttribute, Directive, ElementRef, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { RdxDropdownMenuContentDirective } from './dropdown-menu-content.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuItem]',\n standalone: true,\n host: {\n type: 'button',\n // todo horizontal ?\n '[attr.data-orientation]': '\"vertical\"',\n '[attr.data-highlighted]': 'highlighted ? \"\" : null',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.disabled]': 'disabled ? \"\" : null',\n '(pointermove)': 'onPointerMove()',\n '(focus)': 'menu.highlighted.next(this)',\n '(keydown)': 'onKeydown($event)'\n },\n providers: [\n { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective },\n { provide: CDK_MENU, useExisting: RdxDropdownMenuContentDirective }\n ]\n})\nexport class RdxDropdownMenuItemDirective extends CdkMenuItem {\n protected readonly menu = inject(RdxDropdownMenuContentDirective);\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n\n highlighted = false;\n\n @Input({ transform: booleanAttribute }) override disabled: boolean = false;\n\n @Output() readonly onSelect = new EventEmitter<void>();\n\n constructor() {\n super();\n\n this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {\n if (value !== this) {\n this.highlighted = false;\n }\n });\n\n this.triggered.subscribe(this.onSelect);\n }\n\n protected onPointerMove() {\n this.nativeElement.focus({ preventScroll: true });\n
|
5255
|
+
"sourceCode": "import { CDK_MENU, CdkMenuItem } from '@angular/cdk/menu';\nimport { booleanAttribute, Directive, ElementRef, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { RdxDropdownMenuContentDirective } from './dropdown-menu-content.directive';\n\n@Directive({\n selector: '[rdxDropdownMenuItem]',\n standalone: true,\n host: {\n type: 'button',\n // todo horizontal ?\n '[attr.data-orientation]': '\"vertical\"',\n '[attr.data-highlighted]': 'highlighted ? \"\" : null',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.disabled]': 'disabled ? \"\" : null',\n '(pointermove)': 'onPointerMove()',\n '(focus)': 'menu.highlighted.next(this)',\n '(keydown)': 'onKeydown($event)'\n },\n providers: [\n { provide: CdkMenuItem, useExisting: RdxDropdownMenuItemDirective },\n { provide: CDK_MENU, useExisting: RdxDropdownMenuContentDirective }\n ]\n})\nexport class RdxDropdownMenuItemDirective extends CdkMenuItem {\n protected readonly menu = inject(RdxDropdownMenuContentDirective);\n protected readonly nativeElement = inject(ElementRef).nativeElement;\n\n highlighted = false;\n\n @Input({ transform: booleanAttribute }) override disabled: boolean = false;\n\n @Output() readonly onSelect = new EventEmitter<void>();\n\n constructor() {\n super();\n\n this.menu.highlighted.pipe(takeUntilDestroyed()).subscribe((value) => {\n if (value !== this) {\n this.highlighted = false;\n }\n });\n\n this.triggered.subscribe(this.onSelect);\n }\n\n protected onPointerMove() {\n if (!this.highlighted) {\n this.nativeElement.focus({ preventScroll: true });\n this.menu.updateActiveItem(this);\n }\n }\n\n protected onKeydown(event: KeyboardEvent) {\n if (this.nativeElement.tagName !== 'BUTTON' && ['Enter', ' '].includes(event.key)) {\n event.preventDefault();\n }\n\n if (event.key === 'Escape') {\n if (!this.menu.closeOnEscape) {\n event.stopPropagation();\n } else {\n this.menu.onEscapeKeyDown(event);\n }\n }\n }\n}\n",
|
5167
5256
|
"selector": "[rdxDropdownMenuItem]",
|
5168
5257
|
"providers": [
|
5169
5258
|
{
|
@@ -5257,7 +5346,7 @@
|
|
5257
5346
|
"optional": false,
|
5258
5347
|
"returnType": "void",
|
5259
5348
|
"typeParameters": [],
|
5260
|
-
"line":
|
5349
|
+
"line": 55,
|
5261
5350
|
"deprecated": false,
|
5262
5351
|
"deprecationMessage": "",
|
5263
5352
|
"modifierKind": [
|
@@ -5492,7 +5581,7 @@
|
|
5492
5581
|
"optional": false,
|
5493
5582
|
"returnType": "void",
|
5494
5583
|
"typeParameters": [],
|
5495
|
-
"line":
|
5584
|
+
"line": 55,
|
5496
5585
|
"deprecated": false,
|
5497
5586
|
"deprecationMessage": "",
|
5498
5587
|
"modifierKind": [
|
@@ -5817,7 +5906,7 @@
|
|
5817
5906
|
"optional": false,
|
5818
5907
|
"returnType": "void",
|
5819
5908
|
"typeParameters": [],
|
5820
|
-
"line":
|
5909
|
+
"line": 55,
|
5821
5910
|
"deprecated": false,
|
5822
5911
|
"deprecationMessage": "",
|
5823
5912
|
"modifierKind": [
|
@@ -7216,12 +7305,12 @@
|
|
7216
7305
|
},
|
7217
7306
|
{
|
7218
7307
|
"name": "RdxRadioGroupDirective",
|
7219
|
-
"id": "directive-RdxRadioGroupDirective-
|
7308
|
+
"id": "directive-RdxRadioGroupDirective-6cd2bb486dcb41fcb3fe8c43f1f0e3f5fef08e9e5e35f9d9d5729e7bff3ec4cd98abc08817c80eceff4190327cce0daa0354559761520611b1e00456eb511063",
|
7220
7309
|
"file": "radio/src/radio-root.directive.ts",
|
7221
7310
|
"type": "directive",
|
7222
7311
|
"description": "",
|
7223
7312
|
"rawdescription": "\n",
|
7224
|
-
"sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { DOWN_ARROW, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, TAB, UP_ARROW } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n QueryList\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subject, takeUntil } from 'rxjs';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n standalone: true,\n providers: [\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }\n ],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': '_orientation',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.tabindex]': '-1',\n '[attr.dir]': 'dir',\n '(keydown)': '
|
7313
|
+
"sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { DOWN_ARROW, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, TAB, UP_ARROW } from '@angular/cdk/keycodes';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n QueryList\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subject, takeUntil } from 'rxjs';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n standalone: true,\n providers: [\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxRadioGroupDirective, multi: true }\n ],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': '_orientation',\n '[attr.data-disabled]': 'disabled ? \"\" : null',\n '[attr.tabindex]': '-1',\n '[attr.dir]': 'dir',\n '(keydown)': 'onKeydown($event)',\n '(focusin)': 'onFocusin($event)'\n }\n})\nexport class RdxRadioGroupDirective\n implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, AfterContentInit, OnDestroy\n{\n @ContentChildren(RdxRadioItemDirective, { descendants: true }) radioItems!: QueryList<RdxRadioItemDirective>;\n private focusKeyManager!: FocusKeyManager<RdxRadioItemDirective>;\n private destroy$ = new Subject<void>();\n\n name?: string | undefined;\n @Input() value?: string;\n\n @Input({ transform: booleanAttribute }) disabled = false;\n\n @Input() dir?: string;\n\n @Input() defaultValue?: string;\n\n /**\n * The orientation of the radio group only vertical.\n * Horizontal radio buttons can sometimes be challenging to scan and localize.\n * The horizontal arrangement of radio buttons may also lead to difficulties in determining which\n * label corresponds to which button: whether the label is above or below the button.\n * @default 'vertical'\n */\n readonly _orientation = 'vertical';\n\n /**\n * Event handler called when the value changes.\n */\n @Output() readonly onValueChange = new EventEmitter<string>();\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n ngAfterContentInit() {\n this.focusKeyManager = new FocusKeyManager(this.radioItems).withWrap().withVerticalOrientation();\n\n this.radioItems.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.updateActiveItem();\n });\n\n this.updateActiveItem(false);\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n */\n select(value: string): void {\n this.value = value;\n this.onValueChange.emit(value);\n this.onChange?.(value);\n this.updateActiveItem();\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @internal\n */\n writeValue(value: string): void {\n this.value = value;\n if (this.radioItems) {\n this.updateActiveItem(false);\n }\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @internal\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @internal\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * When focus leaves the radio group.\n */\n protected onFocusin(event: FocusEvent): void {\n const target = event.target as HTMLElement;\n const radioItem = this.radioItems.find((item) => item.element.nativeElement === target);\n if (radioItem) {\n this.focusKeyManager.setActiveItem(radioItem);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled) return;\n\n switch (event.keyCode) {\n case ENTER:\n case SPACE:\n event.preventDefault();\n this.selectFocusedItem();\n break;\n case DOWN_ARROW:\n case RIGHT_ARROW:\n event.preventDefault();\n this.focusKeyManager.setNextItemActive();\n this.selectFocusedItem();\n break;\n case UP_ARROW:\n case LEFT_ARROW:\n event.preventDefault();\n this.focusKeyManager.setPreviousItemActive();\n this.selectFocusedItem();\n break;\n case TAB:\n this.tabNavigation(event);\n break;\n default:\n this.focusKeyManager.onKeydown(event);\n }\n }\n\n private selectFocusedItem(): void {\n const focusedItem = this.focusKeyManager.activeItem;\n if (focusedItem) {\n this.select(focusedItem.value);\n }\n }\n\n private updateActiveItem(setFocus = true): void {\n const activeItem = this.radioItems.find((item) => item.value === this.value);\n if (activeItem) {\n this.focusKeyManager.setActiveItem(activeItem);\n } else if (this.radioItems.length > 0 && setFocus) {\n this.focusKeyManager.setFirstItemActive();\n }\n }\n\n private tabNavigation(event: KeyboardEvent): void {\n event.preventDefault();\n const checkedItem = this.radioItems.find((item) => item.checked);\n if (checkedItem) {\n checkedItem.focus();\n } else if (this.radioItems.first) {\n this.radioItems.first.focus();\n }\n }\n}\n",
|
7225
7314
|
"selector": "[rdxRadioRoot]",
|
7226
7315
|
"providers": [
|
7227
7316
|
{
|
@@ -7304,15 +7393,15 @@
|
|
7304
7393
|
],
|
7305
7394
|
"jsdoctags": [
|
7306
7395
|
{
|
7307
|
-
"pos":
|
7308
|
-
"end":
|
7396
|
+
"pos": 2104,
|
7397
|
+
"end": 2129,
|
7309
7398
|
"flags": 16842752,
|
7310
7399
|
"modifierFlagsCache": 0,
|
7311
7400
|
"transformFlags": 0,
|
7312
7401
|
"kind": 334,
|
7313
7402
|
"tagName": {
|
7314
|
-
"pos":
|
7315
|
-
"end":
|
7403
|
+
"pos": 2105,
|
7404
|
+
"end": 2112,
|
7316
7405
|
"flags": 16842752,
|
7317
7406
|
"modifierFlagsCache": 0,
|
7318
7407
|
"transformFlags": 0,
|
@@ -7364,7 +7453,7 @@
|
|
7364
7453
|
],
|
7365
7454
|
"methodsClass": [
|
7366
7455
|
{
|
7367
|
-
"name": "
|
7456
|
+
"name": "onFocusin",
|
7368
7457
|
"args": [
|
7369
7458
|
{
|
7370
7459
|
"name": "event",
|
@@ -7381,6 +7470,9 @@
|
|
7381
7470
|
"deprecationMessage": "",
|
7382
7471
|
"rawdescription": "\n\nWhen focus leaves the radio group.\n",
|
7383
7472
|
"description": "<p>When focus leaves the radio group.</p>\n",
|
7473
|
+
"modifierKind": [
|
7474
|
+
124
|
7475
|
+
],
|
7384
7476
|
"jsdoctags": [
|
7385
7477
|
{
|
7386
7478
|
"name": "event",
|
@@ -7394,7 +7486,7 @@
|
|
7394
7486
|
]
|
7395
7487
|
},
|
7396
7488
|
{
|
7397
|
-
"name": "
|
7489
|
+
"name": "onKeydown",
|
7398
7490
|
"args": [
|
7399
7491
|
{
|
7400
7492
|
"name": "event",
|
@@ -7409,6 +7501,9 @@
|
|
7409
7501
|
"line": 153,
|
7410
7502
|
"deprecated": false,
|
7411
7503
|
"deprecationMessage": "",
|
7504
|
+
"modifierKind": [
|
7505
|
+
124
|
7506
|
+
],
|
7412
7507
|
"jsdoctags": [
|
7413
7508
|
{
|
7414
7509
|
"name": "event",
|
@@ -7472,8 +7567,8 @@
|
|
7472
7567
|
"jsdoctags": [
|
7473
7568
|
{
|
7474
7569
|
"name": {
|
7475
|
-
"pos":
|
7476
|
-
"end":
|
7570
|
+
"pos": 3090,
|
7571
|
+
"end": 3095,
|
7477
7572
|
"flags": 16842752,
|
7478
7573
|
"modifierFlagsCache": 0,
|
7479
7574
|
"transformFlags": 0,
|
@@ -7484,8 +7579,8 @@
|
|
7484
7579
|
"deprecated": false,
|
7485
7580
|
"deprecationMessage": "",
|
7486
7581
|
"tagName": {
|
7487
|
-
"pos":
|
7488
|
-
"end":
|
7582
|
+
"pos": 3084,
|
7583
|
+
"end": 3089,
|
7489
7584
|
"flags": 16842752,
|
7490
7585
|
"modifierFlagsCache": 0,
|
7491
7586
|
"transformFlags": 0,
|
@@ -7687,35 +7782,31 @@
|
|
7687
7782
|
},
|
7688
7783
|
{
|
7689
7784
|
"name": "RdxSeparatorRootDirective",
|
7690
|
-
"id": "directive-RdxSeparatorRootDirective-
|
7785
|
+
"id": "directive-RdxSeparatorRootDirective-b69bdacfd17a9613b054bf8ca89fdc318eb7cac4d0d01179b19d405de3894ec017075d1b44c9d9a19e23ca7070398a1ce34ec61a992e0b6e21349554d1300827",
|
7691
7786
|
"file": "separator/src/separator.directive.ts",
|
7692
7787
|
"type": "directive",
|
7693
|
-
"description": "",
|
7694
|
-
"rawdescription": "\n",
|
7695
|
-
"sourceCode": "import { booleanAttribute, Directive,
|
7788
|
+
"description": "<p>Directive that adds accessible and configurable separator element to the DOM.\nThis can be either horizontal or vertical and optionally decorative (which removes\nit from the accessibility tree).</p>\n",
|
7789
|
+
"rawdescription": "\n\nDirective that adds accessible and configurable separator element to the DOM.\nThis can be either horizontal or vertical and optionally decorative (which removes\nit from the accessibility tree).\n",
|
7790
|
+
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input } from '@angular/core';\n\nconst DEFAULT_ORIENTATION = 'horizontal';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const;\n\nexport type Orientation = (typeof ORIENTATIONS)[number];\n\nexport interface SeparatorProps {\n /**\n * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n */\n orientation?: Orientation;\n /**\n * Whether the component is purely decorative. When true, accessibility-related attributes\n * are updated so that the rendered element is removed from the accessibility tree.\n */\n decorative?: boolean;\n}\n\n/**\n * Directive that adds accessible and configurable separator element to the DOM.\n * This can be either horizontal or vertical and optionally decorative (which removes\n * it from the accessibility tree).\n */\n@Directive({\n selector: 'div[rdxSeparatorRoot]',\n standalone: true,\n host: {\n '[attr.role]': 'computedRole()',\n '[attr.aria-orientation]': 'computedAriaOrientation()',\n\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxSeparatorRootDirective {\n /**\n * Orientation of the separator, can be either 'horizontal' or 'vertical'.\n * Defaults to 'horizontal'.\n */\n readonly orientation = input<Orientation>(DEFAULT_ORIENTATION);\n\n /**\n * If true, the separator will be considered decorative and removed from\n * the accessibility tree. Defaults to false.\n */\n readonly decorative = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Computes the `role` attribute for the separator. If `decorative` is true,\n * the role is set to \"none\", otherwise it is \"separator\".\n */\n protected readonly computedRole = computed(() => (this.decorative() ? 'none' : 'separator'));\n\n /**\n * Computes the `aria-orientation` attribute. It is set to \"vertical\" only if\n * the separator is not decorative and the orientation is set to \"vertical\".\n * For horizontal orientation, the attribute is omitted.\n */\n protected readonly computedAriaOrientation = computed(() =>\n !this.decorative() && this.orientation() === 'vertical' ? 'vertical' : null\n );\n}\n",
|
7696
7791
|
"selector": "div[rdxSeparatorRoot]",
|
7697
7792
|
"providers": [],
|
7698
7793
|
"hostDirectives": [],
|
7699
7794
|
"standalone": true,
|
7700
7795
|
"inputsClass": [
|
7701
|
-
{
|
7702
|
-
"required": false,
|
7703
|
-
"name": "decorative",
|
7704
|
-
"defaultValue": "false",
|
7705
|
-
"deprecated": false,
|
7706
|
-
"deprecationMessage": "",
|
7707
|
-
"line": 34,
|
7708
|
-
"type": "boolean",
|
7709
|
-
"decorators": []
|
7710
|
-
},
|
7711
7796
|
{
|
7712
7797
|
"name": "orientation",
|
7713
7798
|
"defaultValue": "DEFAULT_ORIENTATION",
|
7714
7799
|
"deprecated": false,
|
7715
7800
|
"deprecationMessage": "",
|
7716
|
-
"
|
7717
|
-
"
|
7718
|
-
"
|
7801
|
+
"type": "",
|
7802
|
+
"optional": false,
|
7803
|
+
"description": "<p>Orientation of the separator, can be either 'horizontal' or 'vertical'.\nDefaults to 'horizontal'.</p>\n",
|
7804
|
+
"line": 43,
|
7805
|
+
"rawdescription": "\n\nOrientation of the separator, can be either 'horizontal' or 'vertical'.\nDefaults to 'horizontal'.\n",
|
7806
|
+
"modifierKind": [
|
7807
|
+
148
|
7808
|
+
],
|
7809
|
+
"required": false
|
7719
7810
|
}
|
7720
7811
|
],
|
7721
7812
|
"outputsClass": [],
|
@@ -7723,12 +7814,69 @@
|
|
7723
7814
|
"deprecationMessage": "",
|
7724
7815
|
"hostBindings": [],
|
7725
7816
|
"hostListeners": [],
|
7726
|
-
"propertiesClass": [
|
7817
|
+
"propertiesClass": [
|
7818
|
+
{
|
7819
|
+
"name": "computedAriaOrientation",
|
7820
|
+
"defaultValue": "computed(() =>\n !this.decorative() && this.orientation() === 'vertical' ? 'vertical' : null\n )",
|
7821
|
+
"deprecated": false,
|
7822
|
+
"deprecationMessage": "",
|
7823
|
+
"type": "",
|
7824
|
+
"optional": false,
|
7825
|
+
"description": "<p>Computes the <code>aria-orientation</code> attribute. It is set to "vertical" only if\nthe separator is not decorative and the orientation is set to "vertical".\nFor horizontal orientation, the attribute is omitted.</p>\n",
|
7826
|
+
"line": 62,
|
7827
|
+
"rawdescription": "\n\nComputes the `aria-orientation` attribute. It is set to \"vertical\" only if\nthe separator is not decorative and the orientation is set to \"vertical\".\nFor horizontal orientation, the attribute is omitted.\n",
|
7828
|
+
"modifierKind": [
|
7829
|
+
124,
|
7830
|
+
148
|
7831
|
+
]
|
7832
|
+
},
|
7833
|
+
{
|
7834
|
+
"name": "computedRole",
|
7835
|
+
"defaultValue": "computed(() => (this.decorative() ? 'none' : 'separator'))",
|
7836
|
+
"deprecated": false,
|
7837
|
+
"deprecationMessage": "",
|
7838
|
+
"type": "",
|
7839
|
+
"optional": false,
|
7840
|
+
"description": "<p>Computes the <code>role</code> attribute for the separator. If <code>decorative</code> is true,\nthe role is set to "none", otherwise it is "separator".</p>\n",
|
7841
|
+
"line": 55,
|
7842
|
+
"rawdescription": "\n\nComputes the `role` attribute for the separator. If `decorative` is true,\nthe role is set to \"none\", otherwise it is \"separator\".\n",
|
7843
|
+
"modifierKind": [
|
7844
|
+
124,
|
7845
|
+
148
|
7846
|
+
]
|
7847
|
+
},
|
7848
|
+
{
|
7849
|
+
"name": "decorative",
|
7850
|
+
"defaultValue": "input<boolean, BooleanInput>(false, { transform: booleanAttribute })",
|
7851
|
+
"deprecated": false,
|
7852
|
+
"deprecationMessage": "",
|
7853
|
+
"type": "",
|
7854
|
+
"optional": false,
|
7855
|
+
"description": "<p>If true, the separator will be considered decorative and removed from\nthe accessibility tree. Defaults to false.</p>\n",
|
7856
|
+
"line": 49,
|
7857
|
+
"rawdescription": "\n\nIf true, the separator will be considered decorative and removed from\nthe accessibility tree. Defaults to false.\n",
|
7858
|
+
"modifierKind": [
|
7859
|
+
148
|
7860
|
+
]
|
7861
|
+
},
|
7862
|
+
{
|
7863
|
+
"name": "orientation",
|
7864
|
+
"defaultValue": "DEFAULT_ORIENTATION",
|
7865
|
+
"deprecated": false,
|
7866
|
+
"deprecationMessage": "",
|
7867
|
+
"type": "",
|
7868
|
+
"optional": false,
|
7869
|
+
"description": "<p>Orientation of the separator, can be either 'horizontal' or 'vertical'.\nDefaults to 'horizontal'.</p>\n",
|
7870
|
+
"line": 43,
|
7871
|
+
"rawdescription": "\n\nOrientation of the separator, can be either 'horizontal' or 'vertical'.\nDefaults to 'horizontal'.\n",
|
7872
|
+
"modifierKind": [
|
7873
|
+
148
|
7874
|
+
],
|
7875
|
+
"required": false
|
7876
|
+
}
|
7877
|
+
],
|
7727
7878
|
"methodsClass": [],
|
7728
|
-
"extends": []
|
7729
|
-
"implements": [
|
7730
|
-
"SeparatorProps"
|
7731
|
-
]
|
7879
|
+
"extends": []
|
7732
7880
|
},
|
7733
7881
|
{
|
7734
7882
|
"name": "RdxSliderDirective",
|
@@ -7893,21 +8041,17 @@
|
|
7893
8041
|
},
|
7894
8042
|
{
|
7895
8043
|
"name": "RdxSwitchRootDirective",
|
7896
|
-
"id": "directive-RdxSwitchRootDirective-
|
8044
|
+
"id": "directive-RdxSwitchRootDirective-a1d1ce9095ddd803dd1679e08e7914e7bbc821178d609e91909c39171ce2013fa88949495d3569fcd36dc50f9ffd58e50d69a30df9f1344c8d7f6610de2d389f",
|
7897
8045
|
"file": "switch/src/switch-root.directive.ts",
|
7898
8046
|
"type": "directive",
|
7899
8047
|
"description": "",
|
7900
8048
|
"rawdescription": "\n",
|
7901
|
-
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n
|
8049
|
+
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n InjectionToken,\n input,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n OutputEmitterRef\n} from '@angular/core';\n\nexport const RdxSwitchToken = new InjectionToken<RdxSwitchRootDirective>('RdxSwitchToken');\n\nexport function injectSwitch(): RdxSwitchRootDirective {\n return inject(RdxSwitchToken);\n}\n\nexport interface SwitchProps {\n checked?: ModelSignal<boolean>;\n defaultChecked?: boolean;\n required?: InputSignalWithTransform<boolean, BooleanInput>;\n onCheckedChange?: OutputEmitterRef<boolean>;\n}\n\nlet idIterator = 0;\n\n@Directive({\n selector: 'button[rdxSwitchRoot]',\n exportAs: 'rdxSwitchRoot',\n standalone: true,\n providers: [\n { provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }],\n host: {\n role: 'switch',\n type: 'button',\n '[id]': 'elementId()',\n '[attr.aria-checked]': 'checked()',\n '[attr.aria-required]': 'required',\n '[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'disabledState() ? \"true\" : null',\n '[attr.disabled]': 'disabledState() ? disabledState() : null',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxSwitchRootDirective implements SwitchProps {\n readonly id = input<string>(`rdx-switch-${idIterator++}`);\n protected readonly elementId = computed(() => (this.id() ? this.id() : null));\n\n /**\n * When true, indicates that the user must check the switch before the owning form can be submitted.\n */\n readonly required = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /**\n * The controlled state of the switch. Must be used in conjunction with onCheckedChange.\n */\n readonly checked = model<boolean>(false);\n\n /**\n * When true, prevents the user from interacting with the switch.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n });\n\n /*\n * @ignore\n */\n readonly disabledState = computed(() => this.disabled());\n\n /**\n * Event handler called when the state of the switch changes.\n */\n readonly onCheckedChange = output<boolean>();\n\n /**\n * Toggles the checked state of the switch.\n * If the switch is disabled, the function returns early.\n */\n protected toggle(): void {\n if (this.disabledState()) {\n return;\n }\n\n this.checked.set(!this.checked());\n\n this.onCheckedChange.emit(this.checked());\n }\n}\n",
|
7902
8050
|
"selector": "button[rdxSwitchRoot]",
|
7903
8051
|
"providers": [
|
7904
8052
|
{
|
7905
8053
|
"name": "{ provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective }",
|
7906
8054
|
"type": "directive"
|
7907
|
-
},
|
7908
|
-
{
|
7909
|
-
"name": "{ provide: NG_VALUE_ACCESSOR, useExisting: RdxSwitchRootDirective, multi: true }",
|
7910
|
-
"type": "directive"
|
7911
8055
|
}
|
7912
8056
|
],
|
7913
8057
|
"exportAs": "rdxSwitchRoot",
|
@@ -7921,49 +8065,21 @@
|
|
7921
8065
|
"deprecationMessage": "",
|
7922
8066
|
"type": "",
|
7923
8067
|
"optional": false,
|
7924
|
-
"description": "",
|
7925
|
-
"line":
|
8068
|
+
"description": "<p>The controlled state of the switch. Must be used in conjunction with onCheckedChange.</p>\n",
|
8069
|
+
"line": 64,
|
8070
|
+
"rawdescription": "\n\nThe controlled state of the switch. Must be used in conjunction with onCheckedChange.\n",
|
7926
8071
|
"modifierKind": [
|
7927
8072
|
148
|
7928
8073
|
],
|
7929
8074
|
"required": false
|
7930
8075
|
}
|
7931
8076
|
],
|
7932
|
-
"outputsClass": [
|
7933
|
-
{
|
7934
|
-
"name": "onCheckedChange",
|
7935
|
-
"defaultValue": "new EventEmitter<boolean>()",
|
7936
|
-
"deprecated": false,
|
7937
|
-
"deprecationMessage": "",
|
7938
|
-
"line": 77,
|
7939
|
-
"type": "EventEmitter"
|
7940
|
-
}
|
7941
|
-
],
|
8077
|
+
"outputsClass": [],
|
7942
8078
|
"deprecated": false,
|
7943
8079
|
"deprecationMessage": "",
|
7944
8080
|
"hostBindings": [],
|
7945
8081
|
"hostListeners": [],
|
7946
8082
|
"propertiesClass": [
|
7947
|
-
{
|
7948
|
-
"name": "_onChange",
|
7949
|
-
"deprecated": false,
|
7950
|
-
"deprecationMessage": "",
|
7951
|
-
"type": "function",
|
7952
|
-
"optional": true,
|
7953
|
-
"description": "<p>The method to be called in order to update ngModel.</p>\n",
|
7954
|
-
"line": 82,
|
7955
|
-
"rawdescription": "\n\nThe method to be called in order to update ngModel.\n"
|
7956
|
-
},
|
7957
|
-
{
|
7958
|
-
"name": "_onTouched",
|
7959
|
-
"deprecated": false,
|
7960
|
-
"deprecationMessage": "",
|
7961
|
-
"type": "function",
|
7962
|
-
"optional": true,
|
7963
|
-
"description": "<p>onTouch function registered via registerOnTouch (ControlValueAccessor).</p>\n",
|
7964
|
-
"line": 87,
|
7965
|
-
"rawdescription": "\n\nonTouch function registered via registerOnTouch (ControlValueAccessor).\n"
|
7966
|
-
},
|
7967
8083
|
{
|
7968
8084
|
"name": "checked",
|
7969
8085
|
"defaultValue": "false",
|
@@ -7971,8 +8087,9 @@
|
|
7971
8087
|
"deprecationMessage": "",
|
7972
8088
|
"type": "",
|
7973
8089
|
"optional": false,
|
7974
|
-
"description": "",
|
7975
|
-
"line":
|
8090
|
+
"description": "<p>The controlled state of the switch. Must be used in conjunction with onCheckedChange.</p>\n",
|
8091
|
+
"line": 64,
|
8092
|
+
"rawdescription": "\n\nThe controlled state of the switch. Must be used in conjunction with onCheckedChange.\n",
|
7976
8093
|
"modifierKind": [
|
7977
8094
|
148
|
7978
8095
|
],
|
@@ -7985,8 +8102,9 @@
|
|
7985
8102
|
"deprecationMessage": "",
|
7986
8103
|
"type": "",
|
7987
8104
|
"optional": false,
|
7988
|
-
"description": "",
|
7989
|
-
"line":
|
8105
|
+
"description": "<p>When true, prevents the user from interacting with the switch.</p>\n",
|
8106
|
+
"line": 69,
|
8107
|
+
"rawdescription": "\n\nWhen true, prevents the user from interacting with the switch.\n",
|
7990
8108
|
"modifierKind": [
|
7991
8109
|
148
|
7992
8110
|
]
|
@@ -7999,7 +8117,7 @@
|
|
7999
8117
|
"type": "",
|
8000
8118
|
"optional": false,
|
8001
8119
|
"description": "",
|
8002
|
-
"line":
|
8120
|
+
"line": 76,
|
8003
8121
|
"modifierKind": [
|
8004
8122
|
148
|
8005
8123
|
]
|
@@ -8012,7 +8130,7 @@
|
|
8012
8130
|
"type": "",
|
8013
8131
|
"optional": false,
|
8014
8132
|
"description": "",
|
8015
|
-
"line":
|
8133
|
+
"line": 52,
|
8016
8134
|
"modifierKind": [
|
8017
8135
|
124,
|
8018
8136
|
148
|
@@ -8026,141 +8144,48 @@
|
|
8026
8144
|
"type": "",
|
8027
8145
|
"optional": false,
|
8028
8146
|
"description": "",
|
8029
|
-
"line":
|
8147
|
+
"line": 51,
|
8030
8148
|
"modifierKind": [
|
8031
8149
|
148
|
8032
8150
|
]
|
8033
8151
|
},
|
8034
8152
|
{
|
8035
|
-
"name": "
|
8036
|
-
"defaultValue": "
|
8153
|
+
"name": "onCheckedChange",
|
8154
|
+
"defaultValue": "output<boolean>()",
|
8037
8155
|
"deprecated": false,
|
8038
8156
|
"deprecationMessage": "",
|
8039
8157
|
"type": "",
|
8040
8158
|
"optional": false,
|
8041
|
-
"description": "",
|
8042
|
-
"line":
|
8159
|
+
"description": "<p>Event handler called when the state of the switch changes.</p>\n",
|
8160
|
+
"line": 81,
|
8161
|
+
"rawdescription": "\n\nEvent handler called when the state of the switch changes.\n",
|
8043
8162
|
"modifierKind": [
|
8044
8163
|
148
|
8045
8164
|
]
|
8046
|
-
}
|
8047
|
-
],
|
8048
|
-
"methodsClass": [
|
8049
|
-
{
|
8050
|
-
"name": "registerOnChange",
|
8051
|
-
"args": [
|
8052
|
-
{
|
8053
|
-
"name": "fn",
|
8054
|
-
"type": "function",
|
8055
|
-
"deprecated": false,
|
8056
|
-
"deprecationMessage": "",
|
8057
|
-
"function": [
|
8058
|
-
{
|
8059
|
-
"name": "checked",
|
8060
|
-
"type": "boolean",
|
8061
|
-
"deprecated": false,
|
8062
|
-
"deprecationMessage": ""
|
8063
|
-
}
|
8064
|
-
]
|
8065
|
-
}
|
8066
|
-
],
|
8067
|
-
"optional": false,
|
8068
|
-
"returnType": "void",
|
8069
|
-
"typeParameters": [],
|
8070
|
-
"line": 93,
|
8071
|
-
"deprecated": false,
|
8072
|
-
"deprecationMessage": "",
|
8073
|
-
"rawdescription": "\n\nRegisters a function to call when the checked state changes.\n",
|
8074
|
-
"description": "<p>Registers a function to call when the checked state changes.</p>\n",
|
8075
|
-
"jsdoctags": [
|
8076
|
-
{
|
8077
|
-
"name": {
|
8078
|
-
"pos": 2720,
|
8079
|
-
"end": 2722,
|
8080
|
-
"flags": 16842752,
|
8081
|
-
"modifierFlagsCache": 0,
|
8082
|
-
"transformFlags": 0,
|
8083
|
-
"kind": 80,
|
8084
|
-
"escapedText": "fn"
|
8085
|
-
},
|
8086
|
-
"type": "function",
|
8087
|
-
"deprecated": false,
|
8088
|
-
"deprecationMessage": "",
|
8089
|
-
"function": [
|
8090
|
-
{
|
8091
|
-
"name": "checked",
|
8092
|
-
"type": "boolean",
|
8093
|
-
"deprecated": false,
|
8094
|
-
"deprecationMessage": ""
|
8095
|
-
}
|
8096
|
-
],
|
8097
|
-
"tagName": {
|
8098
|
-
"pos": 2714,
|
8099
|
-
"end": 2719,
|
8100
|
-
"flags": 16842752,
|
8101
|
-
"modifierFlagsCache": 0,
|
8102
|
-
"transformFlags": 0,
|
8103
|
-
"kind": 80,
|
8104
|
-
"escapedText": "param"
|
8105
|
-
},
|
8106
|
-
"comment": "<p>Function to call on change.</p>\n"
|
8107
|
-
}
|
8108
|
-
]
|
8109
8165
|
},
|
8110
8166
|
{
|
8111
|
-
"name": "
|
8112
|
-
"
|
8113
|
-
{
|
8114
|
-
"name": "fn",
|
8115
|
-
"type": "function",
|
8116
|
-
"deprecated": false,
|
8117
|
-
"deprecationMessage": "",
|
8118
|
-
"function": []
|
8119
|
-
}
|
8120
|
-
],
|
8121
|
-
"optional": false,
|
8122
|
-
"returnType": "void",
|
8123
|
-
"typeParameters": [],
|
8124
|
-
"line": 101,
|
8167
|
+
"name": "required",
|
8168
|
+
"defaultValue": "input<boolean, BooleanInput>(false, {\n transform: booleanAttribute\n })",
|
8125
8169
|
"deprecated": false,
|
8126
8170
|
"deprecationMessage": "",
|
8127
|
-
"
|
8128
|
-
"
|
8129
|
-
"
|
8130
|
-
|
8131
|
-
|
8132
|
-
|
8133
|
-
|
8134
|
-
"flags": 16842752,
|
8135
|
-
"modifierFlagsCache": 0,
|
8136
|
-
"transformFlags": 0,
|
8137
|
-
"kind": 80,
|
8138
|
-
"escapedText": "fn"
|
8139
|
-
},
|
8140
|
-
"type": "function",
|
8141
|
-
"deprecated": false,
|
8142
|
-
"deprecationMessage": "",
|
8143
|
-
"function": [],
|
8144
|
-
"tagName": {
|
8145
|
-
"pos": 2939,
|
8146
|
-
"end": 2944,
|
8147
|
-
"flags": 16842752,
|
8148
|
-
"modifierFlagsCache": 0,
|
8149
|
-
"transformFlags": 0,
|
8150
|
-
"kind": 80,
|
8151
|
-
"escapedText": "param"
|
8152
|
-
},
|
8153
|
-
"comment": "<p>Function to call on touch.</p>\n"
|
8154
|
-
}
|
8171
|
+
"type": "",
|
8172
|
+
"optional": false,
|
8173
|
+
"description": "<p>When true, indicates that the user must check the switch before the owning form can be submitted.</p>\n",
|
8174
|
+
"line": 57,
|
8175
|
+
"rawdescription": "\n\nWhen true, indicates that the user must check the switch before the owning form can be submitted.\n",
|
8176
|
+
"modifierKind": [
|
8177
|
+
148
|
8155
8178
|
]
|
8156
|
-
}
|
8179
|
+
}
|
8180
|
+
],
|
8181
|
+
"methodsClass": [
|
8157
8182
|
{
|
8158
8183
|
"name": "toggle",
|
8159
8184
|
"args": [],
|
8160
8185
|
"optional": false,
|
8161
8186
|
"returnType": "void",
|
8162
8187
|
"typeParameters": [],
|
8163
|
-
"line":
|
8188
|
+
"line": 87,
|
8164
8189
|
"deprecated": false,
|
8165
8190
|
"deprecationMessage": "",
|
8166
8191
|
"rawdescription": "\n\nToggles the checked state of the switch.\nIf the switch is disabled, the function returns early.\n",
|
@@ -8168,57 +8193,11 @@
|
|
8168
8193
|
"modifierKind": [
|
8169
8194
|
124
|
8170
8195
|
]
|
8171
|
-
},
|
8172
|
-
{
|
8173
|
-
"name": "writeValue",
|
8174
|
-
"args": [
|
8175
|
-
{
|
8176
|
-
"name": "checked",
|
8177
|
-
"type": "boolean",
|
8178
|
-
"deprecated": false,
|
8179
|
-
"deprecationMessage": ""
|
8180
|
-
}
|
8181
|
-
],
|
8182
|
-
"optional": false,
|
8183
|
-
"returnType": "void",
|
8184
|
-
"typeParameters": [],
|
8185
|
-
"line": 109,
|
8186
|
-
"deprecated": false,
|
8187
|
-
"deprecationMessage": "",
|
8188
|
-
"rawdescription": "\n\nWrites a new value to the model.\n",
|
8189
|
-
"description": "<p>Writes a new value to the model.</p>\n",
|
8190
|
-
"jsdoctags": [
|
8191
|
-
{
|
8192
|
-
"name": {
|
8193
|
-
"pos": 3128,
|
8194
|
-
"end": 3135,
|
8195
|
-
"flags": 16842752,
|
8196
|
-
"modifierFlagsCache": 0,
|
8197
|
-
"transformFlags": 0,
|
8198
|
-
"kind": 80,
|
8199
|
-
"escapedText": "checked"
|
8200
|
-
},
|
8201
|
-
"type": "boolean",
|
8202
|
-
"deprecated": false,
|
8203
|
-
"deprecationMessage": "",
|
8204
|
-
"tagName": {
|
8205
|
-
"pos": 3122,
|
8206
|
-
"end": 3127,
|
8207
|
-
"flags": 16842752,
|
8208
|
-
"modifierFlagsCache": 0,
|
8209
|
-
"transformFlags": 0,
|
8210
|
-
"kind": 80,
|
8211
|
-
"escapedText": "param"
|
8212
|
-
},
|
8213
|
-
"comment": "<p>The new checked value.</p>\n"
|
8214
|
-
}
|
8215
|
-
]
|
8216
8196
|
}
|
8217
8197
|
],
|
8218
8198
|
"extends": [],
|
8219
8199
|
"implements": [
|
8220
|
-
"SwitchProps"
|
8221
|
-
"ControlValueAccessor"
|
8200
|
+
"SwitchProps"
|
8222
8201
|
]
|
8223
8202
|
},
|
8224
8203
|
{
|
@@ -8642,91 +8621,65 @@
|
|
8642
8621
|
},
|
8643
8622
|
{
|
8644
8623
|
"name": "RdxToggleDirective",
|
8645
|
-
"id": "directive-RdxToggleDirective-
|
8624
|
+
"id": "directive-RdxToggleDirective-0bcbd664ea72aa02f90b3331238e8a118a14b8566bd36067013921c606f502814694751ab854825b1057106f71febb584ae15da9ebef63dc60001540db7e5906",
|
8646
8625
|
"file": "toggle/src/toggle.directive.ts",
|
8647
8626
|
"type": "directive",
|
8648
8627
|
"description": "",
|
8649
8628
|
"rawdescription": "\n",
|
8650
|
-
"sourceCode": "import {
|
8651
|
-
"selector": "
|
8629
|
+
"sourceCode": "import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, model, output, OutputEmitterRef } from '@angular/core';\n\nexport interface ToggleProps {\n /**\n * The controlled state of the toggle.\n */\n pressed?: boolean;\n\n /**\n * The state of the toggle when initially rendered. Use `defaultPressed`\n * if you do not need to control the state of the toggle.\n * @defaultValue false\n */\n defaultPressed?: boolean;\n\n /**\n * The callback that fires when the state of the toggle changes.\n */\n onPressedChange?: OutputEmitterRef<boolean>;\n\n /**\n * Whether the toggle is disabled.\n * @defaultValue false\n */\n disabled?: boolean;\n}\n\n@Directive({\n selector: '[rdxToggle]',\n exportAs: 'rdxToggle',\n standalone: true,\n host: {\n type: 'button',\n '[attr.aria-pressed]': 'pressed()',\n '[attr.data-state]': 'pressed() ? \"on\" : \"off\"',\n '[attr.data-disabled]': 'disabled()',\n '[disabled]': 'disabled()',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleDirective {\n /**\n * The pressed state of the toggle when it is initially rendered.\n * Use when you do not need to control its pressed state.\n */\n readonly defaultPressed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The controlled pressed state of the toggle.\n * Must be used in conjunction with `onPressedChange`.\n */\n readonly pressed = model<boolean>(this.defaultPressed());\n\n /**\n * When true, prevents the user from interacting with the toggle.\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the pressed state of the toggle changes.\n */\n readonly onPressedChange = output<boolean>();\n\n protected toggle(): void {\n if (!this.disabled()) {\n this.pressed.set(!this.pressed());\n this.onPressedChange.emit(this.pressed());\n }\n }\n}\n",
|
8630
|
+
"selector": "[rdxToggle]",
|
8652
8631
|
"providers": [],
|
8653
8632
|
"exportAs": "rdxToggle",
|
8654
8633
|
"hostDirectives": [],
|
8655
8634
|
"standalone": true,
|
8656
|
-
"inputsClass": [
|
8635
|
+
"inputsClass": [],
|
8636
|
+
"outputsClass": [],
|
8637
|
+
"deprecated": false,
|
8638
|
+
"deprecationMessage": "",
|
8639
|
+
"hostBindings": [],
|
8640
|
+
"hostListeners": [],
|
8641
|
+
"propertiesClass": [
|
8657
8642
|
{
|
8658
8643
|
"name": "defaultPressed",
|
8659
|
-
"defaultValue": "false",
|
8644
|
+
"defaultValue": "input<boolean, BooleanInput>(false, { transform: booleanAttribute })",
|
8660
8645
|
"deprecated": false,
|
8661
8646
|
"deprecationMessage": "",
|
8662
8647
|
"type": "",
|
8663
8648
|
"optional": false,
|
8664
|
-
"description": "",
|
8665
|
-
"line":
|
8649
|
+
"description": "<p>The pressed state of the toggle when it is initially rendered.\nUse when you do not need to control its pressed state.</p>\n",
|
8650
|
+
"line": 48,
|
8651
|
+
"rawdescription": "\n\nThe pressed state of the toggle when it is initially rendered.\nUse when you do not need to control its pressed state.\n",
|
8666
8652
|
"modifierKind": [
|
8667
8653
|
148
|
8668
|
-
]
|
8669
|
-
"required": false
|
8654
|
+
]
|
8670
8655
|
},
|
8671
8656
|
{
|
8672
8657
|
"name": "disabled",
|
8673
|
-
"defaultValue": "false",
|
8674
|
-
"deprecated": false,
|
8675
|
-
"deprecationMessage": "",
|
8676
|
-
"type": "",
|
8677
|
-
"optional": false,
|
8678
|
-
"description": "",
|
8679
|
-
"line": 36,
|
8680
|
-
"modifierKind": [
|
8681
|
-
148
|
8682
|
-
],
|
8683
|
-
"required": false
|
8684
|
-
}
|
8685
|
-
],
|
8686
|
-
"outputsClass": [
|
8687
|
-
{
|
8688
|
-
"name": "onPressedChange",
|
8689
|
-
"defaultValue": "new EventEmitter<boolean>()",
|
8690
|
-
"deprecated": false,
|
8691
|
-
"deprecationMessage": "",
|
8692
|
-
"rawdescription": "\n\nEvent emitted when the toggle is pressed.\n",
|
8693
|
-
"description": "<p>Event emitted when the toggle is pressed.</p>\n",
|
8694
|
-
"line": 41,
|
8695
|
-
"type": "EventEmitter"
|
8696
|
-
}
|
8697
|
-
],
|
8698
|
-
"deprecated": false,
|
8699
|
-
"deprecationMessage": "",
|
8700
|
-
"hostBindings": [],
|
8701
|
-
"hostListeners": [],
|
8702
|
-
"propertiesClass": [
|
8703
|
-
{
|
8704
|
-
"name": "defaultPressed",
|
8705
|
-
"defaultValue": "false",
|
8658
|
+
"defaultValue": "input<boolean, BooleanInput>(false, { transform: booleanAttribute })",
|
8706
8659
|
"deprecated": false,
|
8707
8660
|
"deprecationMessage": "",
|
8708
8661
|
"type": "",
|
8709
8662
|
"optional": false,
|
8710
|
-
"description": "",
|
8711
|
-
"line":
|
8663
|
+
"description": "<p>When true, prevents the user from interacting with the toggle.</p>\n",
|
8664
|
+
"line": 59,
|
8665
|
+
"rawdescription": "\n\nWhen true, prevents the user from interacting with the toggle.\n",
|
8712
8666
|
"modifierKind": [
|
8713
8667
|
148
|
8714
|
-
]
|
8715
|
-
"required": false
|
8668
|
+
]
|
8716
8669
|
},
|
8717
8670
|
{
|
8718
|
-
"name": "
|
8719
|
-
"defaultValue": "
|
8671
|
+
"name": "onPressedChange",
|
8672
|
+
"defaultValue": "output<boolean>()",
|
8720
8673
|
"deprecated": false,
|
8721
8674
|
"deprecationMessage": "",
|
8722
8675
|
"type": "",
|
8723
8676
|
"optional": false,
|
8724
|
-
"description": "",
|
8725
|
-
"line":
|
8677
|
+
"description": "<p>Event handler called when the pressed state of the toggle changes.</p>\n",
|
8678
|
+
"line": 64,
|
8679
|
+
"rawdescription": "\n\nEvent handler called when the pressed state of the toggle changes.\n",
|
8726
8680
|
"modifierKind": [
|
8727
8681
|
148
|
8728
|
-
]
|
8729
|
-
"required": false
|
8682
|
+
]
|
8730
8683
|
},
|
8731
8684
|
{
|
8732
8685
|
"name": "pressed",
|
@@ -8735,8 +8688,9 @@
|
|
8735
8688
|
"deprecationMessage": "",
|
8736
8689
|
"type": "",
|
8737
8690
|
"optional": false,
|
8738
|
-
"description": "",
|
8739
|
-
"line":
|
8691
|
+
"description": "<p>The controlled pressed state of the toggle.\nMust be used in conjunction with <code>onPressedChange</code>.</p>\n",
|
8692
|
+
"line": 54,
|
8693
|
+
"rawdescription": "\n\nThe controlled pressed state of the toggle.\nMust be used in conjunction with `onPressedChange`.\n",
|
8740
8694
|
"modifierKind": [
|
8741
8695
|
148
|
8742
8696
|
]
|
@@ -8749,7 +8703,7 @@
|
|
8749
8703
|
"optional": false,
|
8750
8704
|
"returnType": "void",
|
8751
8705
|
"typeParameters": [],
|
8752
|
-
"line":
|
8706
|
+
"line": 66,
|
8753
8707
|
"deprecated": false,
|
8754
8708
|
"deprecationMessage": "",
|
8755
8709
|
"modifierKind": [
|
@@ -8759,102 +8713,14 @@
|
|
8759
8713
|
],
|
8760
8714
|
"extends": []
|
8761
8715
|
},
|
8762
|
-
{
|
8763
|
-
"name": "RdxToggleGroupButtonDirective",
|
8764
|
-
"id": "directive-RdxToggleGroupButtonDirective-eaacd7b8661bf44dd75ecc33aaaf4b8c67bacd659999808fc901edc3cab910438b9a7d4392a7ddd2055f8cc6b0d2fb3be6a4d9711b9f05dbccff195fadf52a51",
|
8765
|
-
"file": "toggle-group/src/toggle-group-button.directive.ts",
|
8766
|
-
"type": "directive",
|
8767
|
-
"description": "",
|
8768
|
-
"rawdescription": "\n",
|
8769
|
-
"sourceCode": "import { booleanAttribute, Directive, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { RdxToggleGroupButtonToken } from './toggle-group-button.token';\nimport { injectToggleGroup } from './toggle-group.token';\n\n@Directive({\n selector: 'button[rdxToggleGroupButton]',\n standalone: true,\n providers: [{ provide: RdxToggleGroupButtonToken, useExisting: RdxToggleGroupButtonDirective }],\n host: {\n role: 'radio',\n '[attr.aria-checked]': 'checked',\n '[attr.aria-disabled]': 'disabled || toggleGroup.disabled',\n '[attr.data-disabled]': 'disabled || toggleGroup.disabled',\n '[attr.data-state]': 'checked ? \"on\" : \"off\"',\n '[attr.data-orientation]': 'toggleGroup.orientation',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleGroupButtonDirective implements OnChanges {\n /**\n * Access the toggle group.\n * @ignore\n */\n protected readonly toggleGroup = injectToggleGroup();\n\n /**\n * The value of this toggle button.\n */\n @Input({ required: true }) value!: string;\n\n /**\n * Whether this toggle button is disabled.\n * @default false\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Whether this toggle button is checked.\n */\n protected get checked(): boolean {\n return this.toggleGroup.isSelected(this.value);\n }\n\n /**\n * @ignore\n */\n ngOnChanges(changes: SimpleChanges): void {\n if ('disabled' in changes) {\n // TODO\n }\n }\n\n /**\n * @ignore\n */\n toggle(): void {\n if (this.disabled) {\n return;\n }\n\n this.toggleGroup.toggle(this.value);\n }\n\n /**\n * Ensure the disabled state is propagated to the roving focus item.\n * @internal\n * @ignore\n */\n updateDisabled(): void {\n // TODO\n }\n}\n",
|
8770
|
-
"selector": "button[rdxToggleGroupButton]",
|
8771
|
-
"providers": [
|
8772
|
-
{
|
8773
|
-
"name": "{ provide: RdxToggleGroupButtonToken, useExisting: RdxToggleGroupButtonDirective }",
|
8774
|
-
"type": "directive"
|
8775
|
-
}
|
8776
|
-
],
|
8777
|
-
"hostDirectives": [],
|
8778
|
-
"standalone": true,
|
8779
|
-
"inputsClass": [
|
8780
|
-
{
|
8781
|
-
"required": false,
|
8782
|
-
"name": "disabled",
|
8783
|
-
"defaultValue": "false",
|
8784
|
-
"deprecated": false,
|
8785
|
-
"deprecationMessage": "",
|
8786
|
-
"jsdoctags": [
|
8787
|
-
{
|
8788
|
-
"pos": 1132,
|
8789
|
-
"end": 1152,
|
8790
|
-
"flags": 16842752,
|
8791
|
-
"modifierFlagsCache": 0,
|
8792
|
-
"transformFlags": 0,
|
8793
|
-
"kind": 334,
|
8794
|
-
"tagName": {
|
8795
|
-
"pos": 1133,
|
8796
|
-
"end": 1140,
|
8797
|
-
"flags": 16842752,
|
8798
|
-
"modifierFlagsCache": 0,
|
8799
|
-
"transformFlags": 0,
|
8800
|
-
"kind": 80,
|
8801
|
-
"escapedText": "default"
|
8802
|
-
},
|
8803
|
-
"comment": "<p>false</p>\n"
|
8804
|
-
}
|
8805
|
-
],
|
8806
|
-
"rawdescription": "\n\nWhether this toggle button is disabled.\n",
|
8807
|
-
"description": "<p>Whether this toggle button is disabled.</p>\n",
|
8808
|
-
"line": 36,
|
8809
|
-
"type": "boolean",
|
8810
|
-
"decorators": []
|
8811
|
-
},
|
8812
|
-
{
|
8813
|
-
"required": true,
|
8814
|
-
"name": "value",
|
8815
|
-
"deprecated": false,
|
8816
|
-
"deprecationMessage": "",
|
8817
|
-
"optional": false,
|
8818
|
-
"rawdescription": "\n\nThe value of this toggle button.\n",
|
8819
|
-
"description": "<p>The value of this toggle button.</p>\n",
|
8820
|
-
"line": 30,
|
8821
|
-
"type": "string",
|
8822
|
-
"decorators": []
|
8823
|
-
}
|
8824
|
-
],
|
8825
|
-
"outputsClass": [],
|
8826
|
-
"deprecated": false,
|
8827
|
-
"deprecationMessage": "",
|
8828
|
-
"hostBindings": [],
|
8829
|
-
"hostListeners": [],
|
8830
|
-
"propertiesClass": [],
|
8831
|
-
"methodsClass": [],
|
8832
|
-
"extends": [],
|
8833
|
-
"implements": [
|
8834
|
-
"OnChanges"
|
8835
|
-
],
|
8836
|
-
"accessors": {
|
8837
|
-
"checked": {
|
8838
|
-
"name": "checked",
|
8839
|
-
"getSignature": {
|
8840
|
-
"name": "checked",
|
8841
|
-
"type": "boolean",
|
8842
|
-
"returnType": "boolean",
|
8843
|
-
"line": 41,
|
8844
|
-
"rawdescription": "\n\nWhether this toggle button is checked.\n",
|
8845
|
-
"description": "<p>Whether this toggle button is checked.</p>\n"
|
8846
|
-
}
|
8847
|
-
}
|
8848
|
-
}
|
8849
|
-
},
|
8850
8716
|
{
|
8851
8717
|
"name": "RdxToggleGroupDirective",
|
8852
|
-
"id": "directive-RdxToggleGroupDirective-
|
8718
|
+
"id": "directive-RdxToggleGroupDirective-a2eb5e3e27c5981ca8cf0a2e50c25e5b9e62fc0c2edf2e6374621ba9697612b4b4e71418691a2d27fe9df21928c6d0c2dfaef44cfd17788bbedf16de4943dc49",
|
8853
8719
|
"file": "toggle-group/src/toggle-group.directive.ts",
|
8854
8720
|
"type": "directive",
|
8855
8721
|
"description": "",
|
8856
8722
|
"rawdescription": "\n",
|
8857
|
-
"sourceCode": "import {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n QueryList,\n SimpleChanges\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type {
|
8723
|
+
"sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n QueryList,\n SimpleChanges\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';\nimport { RdxToggleGroupItemToken } from './toggle-group-item.token';\nimport { RdxToggleGroupToken } from './toggle-group.token';\n\n@Directive({\n selector: '[rdxToggleGroup]',\n exportAs: 'rdxToggleGroup',\n standalone: true,\n providers: [\n { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }\n ],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'orientation',\n\n '(focusout)': 'onTouched?.()',\n '(focusin)': 'onFocusIn()',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class RdxToggleGroupDirective implements OnChanges, AfterContentInit, ControlValueAccessor {\n /**\n * The selected toggle button.\n */\n @Input() value: string | null = null;\n\n /**\n * The orientation of the toggle group.\n * @default 'horizontal'\n */\n @Input() orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Whether the toggle group is disabled.\n * @default false\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Whether the toggle group roving focus should wrap.\n * @default true\n */\n @Input({ transform: booleanAttribute }) wrap = true;\n\n /**\n * Event emitted when the selected toggle button changes.\n */\n @Input() readonly valueChange = new EventEmitter<string | null>();\n\n /**\n * Access the buttons in the toggle group.\n */\n @ContentChildren(RdxToggleGroupItemToken)\n protected buttons?: QueryList<RdxToggleGroupItemDirective>;\n\n /**\n * FocusKeyManager to manage keyboard interactions.\n */\n private keyManager!: FocusKeyManager<RdxToggleGroupItemDirective>;\n\n /**\n * The value change callback.\n */\n private onChange?: (value: string | null) => void;\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n */\n protected onTouched?: () => void;\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('disabled' in changes) {\n this.buttons?.forEach((button) => button.updateDisabled());\n }\n }\n\n ngAfterContentInit(): void {\n if (this.disabled) {\n this.buttons?.forEach((button) => button.updateDisabled());\n }\n\n if (this.buttons) {\n this.keyManager = new FocusKeyManager(this.buttons).withWrap();\n }\n }\n\n protected onFocusIn(): void {\n if (!this.keyManager.activeItem) {\n this.keyManager.setFirstItemActive();\n }\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n this.keyManager.setNextItemActive();\n event.preventDefault();\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n this.keyManager.setPreviousItemActive();\n event.preventDefault();\n break;\n case 'Home':\n this.keyManager.setFirstItemActive();\n event.preventDefault();\n break;\n case 'End':\n this.keyManager.setLastItemActive();\n event.preventDefault();\n break;\n case 'Enter':\n case ' ':\n // eslint-disable-next-line no-case-declarations\n const activeItem = this.keyManager.activeItem;\n if (activeItem) {\n activeItem.toggle();\n }\n event.preventDefault();\n break;\n default:\n break;\n }\n }\n\n /**\n * Determine if a value is selected.\n * @param value The value to check.\n * @returns Whether the value is selected.\n * @internal\n */\n isSelected(value: string): boolean {\n return this.value === value;\n }\n\n /**\n * Toggle a value.\n * @param value The value to toggle.\n * @internal\n */\n toggle(value: string): void {\n if (this.disabled) {\n return;\n }\n\n this.value = this.value === value ? null : value;\n this.valueChange.emit(this.value);\n this.onChange?.(this.value);\n }\n\n /**\n * Select a value from Angular forms.\n * @param value The value to select.\n * @internal\n */\n writeValue(value: string): void {\n this.value = value;\n }\n\n /**\n * Register a callback to be called when the value changes.\n * @param fn The callback to register.\n * @internal\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Register a callback to be called when the toggle group is touched.\n * @param fn The callback to register.\n * @internal\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the toggle group.\n * @param isDisabled Whether the toggle group is disabled.\n * @internal\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.buttons?.forEach((button) => button.updateDisabled());\n }\n}\n",
|
8858
8724
|
"selector": "[rdxToggleGroup]",
|
8859
8725
|
"providers": [
|
8860
8726
|
{
|
@@ -8866,6 +8732,7 @@
|
|
8866
8732
|
"type": "directive"
|
8867
8733
|
}
|
8868
8734
|
],
|
8735
|
+
"exportAs": "rdxToggleGroup",
|
8869
8736
|
"hostDirectives": [],
|
8870
8737
|
"standalone": true,
|
8871
8738
|
"inputsClass": [
|
@@ -8877,15 +8744,15 @@
|
|
8877
8744
|
"deprecationMessage": "",
|
8878
8745
|
"jsdoctags": [
|
8879
8746
|
{
|
8880
|
-
"pos":
|
8881
|
-
"end":
|
8747
|
+
"pos": 1451,
|
8748
|
+
"end": 1471,
|
8882
8749
|
"flags": 16842752,
|
8883
8750
|
"modifierFlagsCache": 0,
|
8884
8751
|
"transformFlags": 0,
|
8885
8752
|
"kind": 334,
|
8886
8753
|
"tagName": {
|
8887
|
-
"pos":
|
8888
|
-
"end":
|
8754
|
+
"pos": 1452,
|
8755
|
+
"end": 1459,
|
8889
8756
|
"flags": 16842752,
|
8890
8757
|
"modifierFlagsCache": 0,
|
8891
8758
|
"transformFlags": 0,
|
@@ -8897,7 +8764,7 @@
|
|
8897
8764
|
],
|
8898
8765
|
"rawdescription": "\n\nWhether the toggle group is disabled.\n",
|
8899
8766
|
"description": "<p>Whether the toggle group is disabled.</p>\n",
|
8900
|
-
"line":
|
8767
|
+
"line": 51,
|
8901
8768
|
"type": "boolean",
|
8902
8769
|
"decorators": []
|
8903
8770
|
},
|
@@ -8908,15 +8775,15 @@
|
|
8908
8775
|
"deprecationMessage": "",
|
8909
8776
|
"jsdoctags": [
|
8910
8777
|
{
|
8911
|
-
"pos":
|
8912
|
-
"end":
|
8778
|
+
"pos": 1292,
|
8779
|
+
"end": 1319,
|
8913
8780
|
"flags": 16842752,
|
8914
8781
|
"modifierFlagsCache": 0,
|
8915
8782
|
"transformFlags": 0,
|
8916
8783
|
"kind": 334,
|
8917
8784
|
"tagName": {
|
8918
|
-
"pos":
|
8919
|
-
"end":
|
8785
|
+
"pos": 1293,
|
8786
|
+
"end": 1300,
|
8920
8787
|
"flags": 16842752,
|
8921
8788
|
"modifierFlagsCache": 0,
|
8922
8789
|
"transformFlags": 0,
|
@@ -8928,7 +8795,7 @@
|
|
8928
8795
|
],
|
8929
8796
|
"rawdescription": "\n\nThe orientation of the toggle group.\n",
|
8930
8797
|
"description": "<p>The orientation of the toggle group.</p>\n",
|
8931
|
-
"line":
|
8798
|
+
"line": 45,
|
8932
8799
|
"type": "\"horizontal\" | \"vertical\"",
|
8933
8800
|
"decorators": []
|
8934
8801
|
},
|
@@ -8939,7 +8806,7 @@
|
|
8939
8806
|
"deprecationMessage": "",
|
8940
8807
|
"rawdescription": "\n\nThe selected toggle button.\n",
|
8941
8808
|
"description": "<p>The selected toggle button.</p>\n",
|
8942
|
-
"line":
|
8809
|
+
"line": 39,
|
8943
8810
|
"type": "string | null",
|
8944
8811
|
"decorators": []
|
8945
8812
|
},
|
@@ -8950,7 +8817,7 @@
|
|
8950
8817
|
"deprecationMessage": "",
|
8951
8818
|
"rawdescription": "\n\nEvent emitted when the selected toggle button changes.\n",
|
8952
8819
|
"description": "<p>Event emitted when the selected toggle button changes.</p>\n",
|
8953
|
-
"line":
|
8820
|
+
"line": 62,
|
8954
8821
|
"type": "any",
|
8955
8822
|
"decorators": []
|
8956
8823
|
},
|
@@ -8962,15 +8829,15 @@
|
|
8962
8829
|
"deprecationMessage": "",
|
8963
8830
|
"jsdoctags": [
|
8964
8831
|
{
|
8965
|
-
"pos":
|
8966
|
-
"end":
|
8832
|
+
"pos": 1610,
|
8833
|
+
"end": 1629,
|
8967
8834
|
"flags": 16842752,
|
8968
8835
|
"modifierFlagsCache": 0,
|
8969
8836
|
"transformFlags": 0,
|
8970
8837
|
"kind": 334,
|
8971
8838
|
"tagName": {
|
8972
|
-
"pos":
|
8973
|
-
"end":
|
8839
|
+
"pos": 1611,
|
8840
|
+
"end": 1618,
|
8974
8841
|
"flags": 16842752,
|
8975
8842
|
"modifierFlagsCache": 0,
|
8976
8843
|
"transformFlags": 0,
|
@@ -8982,7 +8849,7 @@
|
|
8982
8849
|
],
|
8983
8850
|
"rawdescription": "\n\nWhether the toggle group roving focus should wrap.\n",
|
8984
8851
|
"description": "<p>Whether the toggle group roving focus should wrap.</p>\n",
|
8985
|
-
"line":
|
8852
|
+
"line": 57,
|
8986
8853
|
"type": "boolean",
|
8987
8854
|
"decorators": []
|
8988
8855
|
}
|
@@ -8997,15 +8864,15 @@
|
|
8997
8864
|
"name": "buttons",
|
8998
8865
|
"deprecated": false,
|
8999
8866
|
"deprecationMessage": "",
|
9000
|
-
"type": "QueryList<
|
8867
|
+
"type": "QueryList<RdxToggleGroupItemDirective>",
|
9001
8868
|
"optional": true,
|
9002
8869
|
"description": "<p>Access the buttons in the toggle group.</p>\n",
|
9003
|
-
"line":
|
8870
|
+
"line": 68,
|
9004
8871
|
"rawdescription": "\n\nAccess the buttons in the toggle group.\n",
|
9005
8872
|
"decorators": [
|
9006
8873
|
{
|
9007
8874
|
"name": "ContentChildren",
|
9008
|
-
"stringifiedArguments": "
|
8875
|
+
"stringifiedArguments": "RdxToggleGroupItemToken"
|
9009
8876
|
}
|
9010
8877
|
],
|
9011
8878
|
"modifierKind": [
|
@@ -9020,14 +8887,59 @@
|
|
9020
8887
|
"type": "function",
|
9021
8888
|
"optional": true,
|
9022
8889
|
"description": "<p>onTouch function registered via registerOnTouch (ControlValueAccessor).</p>\n",
|
9023
|
-
"line":
|
8890
|
+
"line": 83,
|
9024
8891
|
"rawdescription": "\n\nonTouch function registered via registerOnTouch (ControlValueAccessor).\n",
|
9025
8892
|
"modifierKind": [
|
9026
8893
|
124
|
9027
8894
|
]
|
9028
8895
|
}
|
9029
8896
|
],
|
9030
|
-
"methodsClass": [
|
8897
|
+
"methodsClass": [
|
8898
|
+
{
|
8899
|
+
"name": "handleKeydown",
|
8900
|
+
"args": [
|
8901
|
+
{
|
8902
|
+
"name": "event",
|
8903
|
+
"type": "KeyboardEvent",
|
8904
|
+
"deprecated": false,
|
8905
|
+
"deprecationMessage": ""
|
8906
|
+
}
|
8907
|
+
],
|
8908
|
+
"optional": false,
|
8909
|
+
"returnType": "void",
|
8910
|
+
"typeParameters": [],
|
8911
|
+
"line": 107,
|
8912
|
+
"deprecated": false,
|
8913
|
+
"deprecationMessage": "",
|
8914
|
+
"modifierKind": [
|
8915
|
+
124
|
8916
|
+
],
|
8917
|
+
"jsdoctags": [
|
8918
|
+
{
|
8919
|
+
"name": "event",
|
8920
|
+
"type": "KeyboardEvent",
|
8921
|
+
"deprecated": false,
|
8922
|
+
"deprecationMessage": "",
|
8923
|
+
"tagName": {
|
8924
|
+
"text": "param"
|
8925
|
+
}
|
8926
|
+
}
|
8927
|
+
]
|
8928
|
+
},
|
8929
|
+
{
|
8930
|
+
"name": "onFocusIn",
|
8931
|
+
"args": [],
|
8932
|
+
"optional": false,
|
8933
|
+
"returnType": "void",
|
8934
|
+
"typeParameters": [],
|
8935
|
+
"line": 101,
|
8936
|
+
"deprecated": false,
|
8937
|
+
"deprecationMessage": "",
|
8938
|
+
"modifierKind": [
|
8939
|
+
124
|
8940
|
+
]
|
8941
|
+
}
|
8942
|
+
],
|
9031
8943
|
"extends": [],
|
9032
8944
|
"implements": [
|
9033
8945
|
"OnChanges",
|
@@ -9036,44 +8948,41 @@
|
|
9036
8948
|
]
|
9037
8949
|
},
|
9038
8950
|
{
|
9039
|
-
"name": "
|
9040
|
-
"id": "directive-
|
9041
|
-
"file": "toggle-group/src/toggle-group-
|
8951
|
+
"name": "RdxToggleGroupItemDirective",
|
8952
|
+
"id": "directive-RdxToggleGroupItemDirective-687d59a75d8d7f33d385f82fdc4bbce77cba1472dd53ad79bfb1dd48559c4ba1bc22d43207e97a0d2bda91a93cd9845a9e7906ffd2dc266f20cdaaf277ce96db",
|
8953
|
+
"file": "toggle-group/src/toggle-group-item.directive.ts",
|
9042
8954
|
"type": "directive",
|
9043
8955
|
"description": "",
|
9044
8956
|
"rawdescription": "\n",
|
9045
|
-
"sourceCode": "import {
|
9046
|
-
"selector": "[
|
8957
|
+
"sourceCode": "import { FocusableOption } from '@angular/cdk/a11y';\nimport { booleanAttribute, Directive, ElementRef, inject, Input, OnChanges, SimpleChanges } from '@angular/core';\nimport { RdxToggleGroupItemToken } from './toggle-group-item.token';\nimport { injectToggleGroup } from './toggle-group.token';\n\n@Directive({\n selector: '[rdxToggleGroupItem]',\n exportAs: 'rdxToggleGroupItem',\n standalone: true,\n providers: [{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }],\n host: {\n role: 'radio',\n '[attr.aria-checked]': 'checked',\n '[attr.aria-disabled]': 'disabled || toggleGroup.disabled',\n '[attr.aria-pressed]': 'undefined',\n\n '[attr.data-disabled]': 'disabled || toggleGroup.disabled',\n '[attr.data-state]': 'checked ? \"on\" : \"off\"',\n '[attr.data-orientation]': 'toggleGroup.orientation',\n\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleGroupItemDirective implements OnChanges, FocusableOption {\n /**\n * Access the toggle group.\n * @ignore\n */\n protected readonly toggleGroup = injectToggleGroup();\n\n private readonly elementRef = inject(ElementRef);\n /**\n * The value of this toggle button.\n */\n @Input({ required: true }) value!: string;\n\n /**\n * Whether this toggle button is disabled.\n * @default false\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Whether this toggle button is checked.\n */\n protected get checked(): boolean {\n return this.toggleGroup.isSelected(this.value);\n }\n\n /**\n * @ignore\n */\n ngOnChanges(changes: SimpleChanges): void {\n if ('disabled' in changes) {\n // TODO\n }\n }\n\n /**\n * @ignore\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /**\n * @ignore\n */\n toggle(): void {\n if (this.disabled) {\n return;\n }\n\n this.toggleGroup.toggle(this.value);\n }\n\n /**\n * Ensure the disabled state is propagated to the roving focus item.\n * @internal\n * @ignore\n */\n updateDisabled(): void {\n // TODO\n }\n}\n",
|
8958
|
+
"selector": "[rdxToggleGroupItem]",
|
9047
8959
|
"providers": [
|
9048
8960
|
{
|
9049
|
-
"name": "{ provide:
|
9050
|
-
"type": "directive"
|
9051
|
-
},
|
9052
|
-
{
|
9053
|
-
"name": "{ provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupMultiDirective, multi: true }",
|
8961
|
+
"name": "{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }",
|
9054
8962
|
"type": "directive"
|
9055
8963
|
}
|
9056
8964
|
],
|
8965
|
+
"exportAs": "rdxToggleGroupItem",
|
9057
8966
|
"hostDirectives": [],
|
9058
8967
|
"standalone": true,
|
9059
8968
|
"inputsClass": [
|
9060
8969
|
{
|
9061
8970
|
"required": false,
|
9062
|
-
"name": "
|
8971
|
+
"name": "disabled",
|
9063
8972
|
"defaultValue": "false",
|
9064
8973
|
"deprecated": false,
|
9065
8974
|
"deprecationMessage": "",
|
9066
8975
|
"jsdoctags": [
|
9067
8976
|
{
|
9068
|
-
"pos":
|
9069
|
-
"end":
|
8977
|
+
"pos": 1339,
|
8978
|
+
"end": 1359,
|
9070
8979
|
"flags": 16842752,
|
9071
8980
|
"modifierFlagsCache": 0,
|
9072
8981
|
"transformFlags": 0,
|
9073
8982
|
"kind": 334,
|
9074
8983
|
"tagName": {
|
9075
|
-
"pos":
|
9076
|
-
"end":
|
8984
|
+
"pos": 1340,
|
8985
|
+
"end": 1347,
|
9077
8986
|
"flags": 16842752,
|
9078
8987
|
"modifierFlagsCache": 0,
|
9079
8988
|
"transformFlags": 0,
|
@@ -9083,110 +8992,546 @@
|
|
9083
8992
|
"comment": "<p>false</p>\n"
|
9084
8993
|
}
|
9085
8994
|
],
|
9086
|
-
"rawdescription": "\n\nWhether
|
9087
|
-
"description": "<p>Whether
|
9088
|
-
"line":
|
8995
|
+
"rawdescription": "\n\nWhether this toggle button is disabled.\n",
|
8996
|
+
"description": "<p>Whether this toggle button is disabled.</p>\n",
|
8997
|
+
"line": 41,
|
9089
8998
|
"type": "boolean",
|
9090
8999
|
"decorators": []
|
9091
9000
|
},
|
9092
9001
|
{
|
9093
|
-
"
|
9094
|
-
"
|
9002
|
+
"required": true,
|
9003
|
+
"name": "value",
|
9004
|
+
"deprecated": false,
|
9005
|
+
"deprecationMessage": "",
|
9006
|
+
"optional": false,
|
9007
|
+
"rawdescription": "\n\nThe value of this toggle button.\n",
|
9008
|
+
"description": "<p>The value of this toggle button.</p>\n",
|
9009
|
+
"line": 35,
|
9010
|
+
"type": "string",
|
9011
|
+
"decorators": []
|
9012
|
+
}
|
9013
|
+
],
|
9014
|
+
"outputsClass": [],
|
9015
|
+
"deprecated": false,
|
9016
|
+
"deprecationMessage": "",
|
9017
|
+
"hostBindings": [],
|
9018
|
+
"hostListeners": [],
|
9019
|
+
"propertiesClass": [],
|
9020
|
+
"methodsClass": [],
|
9021
|
+
"extends": [],
|
9022
|
+
"implements": [
|
9023
|
+
"OnChanges",
|
9024
|
+
"FocusableOption"
|
9025
|
+
],
|
9026
|
+
"accessors": {
|
9027
|
+
"checked": {
|
9028
|
+
"name": "checked",
|
9029
|
+
"getSignature": {
|
9030
|
+
"name": "checked",
|
9031
|
+
"type": "boolean",
|
9032
|
+
"returnType": "boolean",
|
9033
|
+
"line": 46,
|
9034
|
+
"rawdescription": "\n\nWhether this toggle button is checked.\n",
|
9035
|
+
"description": "<p>Whether this toggle button is checked.</p>\n"
|
9036
|
+
}
|
9037
|
+
}
|
9038
|
+
}
|
9039
|
+
},
|
9040
|
+
{
|
9041
|
+
"name": "RdxToggleGroupMultipleDirective",
|
9042
|
+
"id": "directive-RdxToggleGroupMultipleDirective-02fedd3015562ba7140c1e0e2cb6727c520f803ac25988f382a2311a05795cbbec8daa1138b5833c3d67ef1215b6b3445a922a154ea56120e578e0b7bb540642",
|
9043
|
+
"file": "toggle-group/src/toggle-group-multiple.directive.ts",
|
9044
|
+
"type": "directive",
|
9045
|
+
"description": "",
|
9046
|
+
"rawdescription": "\n",
|
9047
|
+
"sourceCode": "import { FocusKeyManager } from '@angular/cdk/a11y';\nimport {\n AfterContentInit,\n booleanAttribute,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n QueryList,\n SimpleChanges\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';\nimport { RdxToggleGroupItemToken } from './toggle-group-item.token';\nimport { RdxToggleGroupToken } from './toggle-group.token';\n\n@Directive({\n selector: '[rdxToggleGroupMultiple]',\n exportAs: 'rdxToggleGroupMultiple',\n standalone: true,\n providers: [\n { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupMultipleDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupMultipleDirective, multi: true }\n ],\n host: {\n role: 'group',\n '[attr.data-orientation]': 'orientation',\n\n '(keydown)': 'handleKeydown($event)',\n '(focusin)': 'onFocusIn()',\n '(focusout)': 'onTouched?.()'\n }\n})\nexport class RdxToggleGroupMultipleDirective implements OnChanges, AfterContentInit, ControlValueAccessor {\n /**\n * The selected toggle button.\n */\n @Input() value: ReadonlyArray<string> = [];\n\n /**\n * The orientation of the toggle group.\n * @default 'horizontal'\n */\n @Input() orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Whether the toggle group is disabled.\n * @default false\n */\n @Input({ transform: booleanAttribute }) disabled = false;\n\n /**\n * Whether the toggle group roving focus should wrap.\n * @default true\n */\n @Input({ transform: booleanAttribute }) wrap = true;\n\n /**\n * Event emitted when the selected toggle button changes.\n */\n @Input() readonly valueChange = new EventEmitter<ReadonlyArray<string>>();\n\n /**\n * Access the buttons in the toggle group.\n * @ignore\n */\n @ContentChildren(RdxToggleGroupItemToken)\n protected buttons?: QueryList<RdxToggleGroupItemDirective>;\n\n /**\n * FocusKeyManager to manage keyboard interactions.\n */\n private keyManager!: FocusKeyManager<RdxToggleGroupItemDirective>;\n\n /**\n * The value change callback.\n * @ignore\n */\n private onChange?: (value: ReadonlyArray<string>) => void;\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @ignore\n */\n protected onTouched?: () => void;\n\n /**\n * @ignore\n */\n ngOnChanges(changes: SimpleChanges): void {\n if ('disabled' in changes) {\n this.buttons?.forEach((button) => button.updateDisabled());\n }\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n if (this.disabled) {\n this.buttons?.forEach((button) => button.updateDisabled());\n }\n\n if (this.buttons) {\n this.keyManager = new FocusKeyManager(this.buttons).withWrap();\n }\n }\n\n protected onFocusIn(): void {\n if (!this.keyManager.activeItem) {\n this.keyManager.setFirstItemActive();\n }\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n this.keyManager.setNextItemActive();\n event.preventDefault();\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n this.keyManager.setPreviousItemActive();\n event.preventDefault();\n break;\n case 'Home':\n this.keyManager.setFirstItemActive();\n event.preventDefault();\n break;\n case 'End':\n this.keyManager.setLastItemActive();\n event.preventDefault();\n break;\n case 'Enter':\n case ' ':\n // eslint-disable-next-line no-case-declarations\n const activeItem = this.keyManager.activeItem;\n if (activeItem) {\n activeItem.toggle();\n }\n event.preventDefault();\n break;\n default:\n break;\n }\n }\n\n /**\n * Determine if a value is selected.\n * @param value The value to check.\n * @returns Whether the value is selected.\n * @ignore\n */\n isSelected(value: string): boolean {\n return this.value.includes(value);\n }\n\n /**\n * Toggle a value.\n * @param value The value to toggle.\n * @ignore\n */\n toggle(value: string): void {\n if (this.disabled) {\n return;\n }\n\n this.value = this.value.includes(value) ? this.value.filter((v) => v !== value) : [...this.value, value];\n\n this.valueChange.emit(this.value);\n this.onChange?.(this.value);\n }\n\n /**\n * Select a value from Angular forms.\n * @param value The value to select.\n * @ignore\n */\n writeValue(value: ReadonlyArray<string>): void {\n this.value = value;\n }\n\n /**\n * Register a callback to be called when the value changes.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnChange(fn: (value: ReadonlyArray<string>) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Register a callback to be called when the toggle group is touched.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the toggle group.\n * @param isDisabled Whether the toggle group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.buttons?.forEach((button) => button.updateDisabled());\n }\n}\n",
|
9048
|
+
"selector": "[rdxToggleGroupMultiple]",
|
9049
|
+
"providers": [
|
9050
|
+
{
|
9051
|
+
"name": "{ provide: RdxToggleGroupToken, useExisting: RdxToggleGroupMultipleDirective }",
|
9052
|
+
"type": "directive"
|
9053
|
+
},
|
9054
|
+
{
|
9055
|
+
"name": "{ provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupMultipleDirective, multi: true }",
|
9056
|
+
"type": "directive"
|
9057
|
+
}
|
9058
|
+
],
|
9059
|
+
"exportAs": "rdxToggleGroupMultiple",
|
9060
|
+
"hostDirectives": [],
|
9061
|
+
"standalone": true,
|
9062
|
+
"inputsClass": [
|
9063
|
+
{
|
9064
|
+
"required": false,
|
9065
|
+
"name": "disabled",
|
9066
|
+
"defaultValue": "false",
|
9067
|
+
"deprecated": false,
|
9068
|
+
"deprecationMessage": "",
|
9069
|
+
"jsdoctags": [
|
9070
|
+
{
|
9071
|
+
"pos": 1497,
|
9072
|
+
"end": 1517,
|
9073
|
+
"flags": 16842752,
|
9074
|
+
"modifierFlagsCache": 0,
|
9075
|
+
"transformFlags": 0,
|
9076
|
+
"kind": 334,
|
9077
|
+
"tagName": {
|
9078
|
+
"pos": 1498,
|
9079
|
+
"end": 1505,
|
9080
|
+
"flags": 16842752,
|
9081
|
+
"modifierFlagsCache": 0,
|
9082
|
+
"transformFlags": 0,
|
9083
|
+
"kind": 80,
|
9084
|
+
"escapedText": "default"
|
9085
|
+
},
|
9086
|
+
"comment": "<p>false</p>\n"
|
9087
|
+
}
|
9088
|
+
],
|
9089
|
+
"rawdescription": "\n\nWhether the toggle group is disabled.\n",
|
9090
|
+
"description": "<p>Whether the toggle group is disabled.</p>\n",
|
9091
|
+
"line": 51,
|
9092
|
+
"type": "boolean",
|
9093
|
+
"decorators": []
|
9094
|
+
},
|
9095
|
+
{
|
9096
|
+
"name": "orientation",
|
9097
|
+
"defaultValue": "'horizontal'",
|
9098
|
+
"deprecated": false,
|
9099
|
+
"deprecationMessage": "",
|
9100
|
+
"jsdoctags": [
|
9101
|
+
{
|
9102
|
+
"pos": 1338,
|
9103
|
+
"end": 1365,
|
9104
|
+
"flags": 16842752,
|
9105
|
+
"modifierFlagsCache": 0,
|
9106
|
+
"transformFlags": 0,
|
9107
|
+
"kind": 334,
|
9108
|
+
"tagName": {
|
9109
|
+
"pos": 1339,
|
9110
|
+
"end": 1346,
|
9111
|
+
"flags": 16842752,
|
9112
|
+
"modifierFlagsCache": 0,
|
9113
|
+
"transformFlags": 0,
|
9114
|
+
"kind": 80,
|
9115
|
+
"escapedText": "default"
|
9116
|
+
},
|
9117
|
+
"comment": "<p>'horizontal'</p>\n"
|
9118
|
+
}
|
9119
|
+
],
|
9120
|
+
"rawdescription": "\n\nThe orientation of the toggle group.\n",
|
9121
|
+
"description": "<p>The orientation of the toggle group.</p>\n",
|
9122
|
+
"line": 45,
|
9123
|
+
"type": "\"horizontal\" | \"vertical\"",
|
9124
|
+
"decorators": []
|
9125
|
+
},
|
9126
|
+
{
|
9127
|
+
"name": "value",
|
9128
|
+
"defaultValue": "[]",
|
9129
|
+
"deprecated": false,
|
9130
|
+
"deprecationMessage": "",
|
9131
|
+
"rawdescription": "\n\nThe selected toggle button.\n",
|
9132
|
+
"description": "<p>The selected toggle button.</p>\n",
|
9133
|
+
"line": 39,
|
9134
|
+
"type": "ReadonlyArray<string>",
|
9135
|
+
"decorators": []
|
9136
|
+
},
|
9137
|
+
{
|
9138
|
+
"name": "valueChange",
|
9139
|
+
"defaultValue": "new EventEmitter<ReadonlyArray<string>>()",
|
9140
|
+
"deprecated": false,
|
9141
|
+
"deprecationMessage": "",
|
9142
|
+
"rawdescription": "\n\nEvent emitted when the selected toggle button changes.\n",
|
9143
|
+
"description": "<p>Event emitted when the selected toggle button changes.</p>\n",
|
9144
|
+
"line": 62,
|
9145
|
+
"type": "any",
|
9146
|
+
"decorators": []
|
9147
|
+
},
|
9148
|
+
{
|
9149
|
+
"required": false,
|
9150
|
+
"name": "wrap",
|
9151
|
+
"defaultValue": "true",
|
9152
|
+
"deprecated": false,
|
9153
|
+
"deprecationMessage": "",
|
9154
|
+
"jsdoctags": [
|
9155
|
+
{
|
9156
|
+
"pos": 1656,
|
9157
|
+
"end": 1675,
|
9158
|
+
"flags": 16842752,
|
9159
|
+
"modifierFlagsCache": 0,
|
9160
|
+
"transformFlags": 0,
|
9161
|
+
"kind": 334,
|
9162
|
+
"tagName": {
|
9163
|
+
"pos": 1657,
|
9164
|
+
"end": 1664,
|
9165
|
+
"flags": 16842752,
|
9166
|
+
"modifierFlagsCache": 0,
|
9167
|
+
"transformFlags": 0,
|
9168
|
+
"kind": 80,
|
9169
|
+
"escapedText": "default"
|
9170
|
+
},
|
9171
|
+
"comment": "<p>true</p>\n"
|
9172
|
+
}
|
9173
|
+
],
|
9174
|
+
"rawdescription": "\n\nWhether the toggle group roving focus should wrap.\n",
|
9175
|
+
"description": "<p>Whether the toggle group roving focus should wrap.</p>\n",
|
9176
|
+
"line": 57,
|
9177
|
+
"type": "boolean",
|
9178
|
+
"decorators": []
|
9179
|
+
}
|
9180
|
+
],
|
9181
|
+
"outputsClass": [],
|
9182
|
+
"deprecated": false,
|
9183
|
+
"deprecationMessage": "",
|
9184
|
+
"hostBindings": [],
|
9185
|
+
"hostListeners": [],
|
9186
|
+
"propertiesClass": [],
|
9187
|
+
"methodsClass": [
|
9188
|
+
{
|
9189
|
+
"name": "handleKeydown",
|
9190
|
+
"args": [
|
9191
|
+
{
|
9192
|
+
"name": "event",
|
9193
|
+
"type": "KeyboardEvent",
|
9194
|
+
"deprecated": false,
|
9195
|
+
"deprecationMessage": ""
|
9196
|
+
}
|
9197
|
+
],
|
9198
|
+
"optional": false,
|
9199
|
+
"returnType": "void",
|
9200
|
+
"typeParameters": [],
|
9201
|
+
"line": 116,
|
9202
|
+
"deprecated": false,
|
9203
|
+
"deprecationMessage": "",
|
9204
|
+
"modifierKind": [
|
9205
|
+
124
|
9206
|
+
],
|
9207
|
+
"jsdoctags": [
|
9208
|
+
{
|
9209
|
+
"name": "event",
|
9210
|
+
"type": "KeyboardEvent",
|
9211
|
+
"deprecated": false,
|
9212
|
+
"deprecationMessage": "",
|
9213
|
+
"tagName": {
|
9214
|
+
"text": "param"
|
9215
|
+
}
|
9216
|
+
}
|
9217
|
+
]
|
9218
|
+
},
|
9219
|
+
{
|
9220
|
+
"name": "onFocusIn",
|
9221
|
+
"args": [],
|
9222
|
+
"optional": false,
|
9223
|
+
"returnType": "void",
|
9224
|
+
"typeParameters": [],
|
9225
|
+
"line": 110,
|
9226
|
+
"deprecated": false,
|
9227
|
+
"deprecationMessage": "",
|
9228
|
+
"modifierKind": [
|
9229
|
+
124
|
9230
|
+
]
|
9231
|
+
}
|
9232
|
+
],
|
9233
|
+
"extends": [],
|
9234
|
+
"implements": [
|
9235
|
+
"OnChanges",
|
9236
|
+
"AfterContentInit",
|
9237
|
+
"ControlValueAccessor"
|
9238
|
+
]
|
9239
|
+
},
|
9240
|
+
{
|
9241
|
+
"name": "RdxVisuallyHiddenDirective",
|
9242
|
+
"id": "directive-RdxVisuallyHiddenDirective-2486bcf46a8ae494e882cd43e8d4b6dc3f610595bc3d915c03f7c3e5d435d294e61608376a6489be59457c1034173d53dafe6b6d1d97c1290a2d9fdc1cb377de",
|
9243
|
+
"file": "visually-hidden/src/visually-hidden.directive.ts",
|
9244
|
+
"type": "directive",
|
9245
|
+
"description": "<p><span rdxVisuallyHidden [feature]="'fully-hidden'">\n <ng-content></ng-content>\n</span></p>\n<p><button (click)="directiveInstance.feature.set('focusable')">Make Focusable</button>\n<button (click)="directiveInstance.feature.set('fully-hidden')">Hide</button></p>\n",
|
9246
|
+
"rawdescription": "\n\n\n<span rdxVisuallyHidden [feature]=\"'fully-hidden'\">\n <ng-content></ng-content>\n</span>\n\n<button (click)=\"directiveInstance.feature.set('focusable')\">Make Focusable</button>\n<button (click)=\"directiveInstance.feature.set('fully-hidden')\">Hide</button>\n",
|
9247
|
+
"sourceCode": "import { Directive, input } from '@angular/core';\n\n/**\n *\n * <span rdxVisuallyHidden [feature]=\"'fully-hidden'\">\n * <ng-content></ng-content>\n * </span>\n *\n * <button (click)=\"directiveInstance.feature.set('focusable')\">Make Focusable</button>\n * <button (click)=\"directiveInstance.feature.set('fully-hidden')\">Hide</button>\n */\n@Directive({\n selector: '[rdxVisuallyHidden]',\n standalone: true,\n host: {\n '[attr.aria-hidden]': 'feature() === \"focusable\" ? \"true\" : null',\n '[hidden]': 'feature() === \"fully-hidden\" ? true : null',\n '[attr.tabindex]': 'feature() === \"fully-hidden\" ? \"-1\" : null',\n '[style.position]': '\"absolute\"',\n '[style.border]': '\"0\"',\n '[style.width]': '\"1px\"',\n '[style.display]': 'feature() === \"focusable\" ? \"inline-block\" : \"none\"',\n '[style.height]': '\"1px\"',\n '[style.padding]': '\"0\"',\n '[style.margin]': '\"-1px\"',\n '[style.overflow]': '\"hidden\"',\n '[style.clip]': '\"rect(0, 0, 0, 0)\"',\n '[style.white-space]': '\"nowrap\"',\n '[style.word-wrap]': '\"normal\"'\n }\n})\nexport class RdxVisuallyHiddenDirective {\n readonly feature = input<'focusable' | 'fully-hidden'>('focusable');\n}\n",
|
9248
|
+
"selector": "[rdxVisuallyHidden]",
|
9249
|
+
"providers": [],
|
9250
|
+
"hostDirectives": [],
|
9251
|
+
"standalone": true,
|
9252
|
+
"inputsClass": [],
|
9253
|
+
"outputsClass": [],
|
9254
|
+
"deprecated": false,
|
9255
|
+
"deprecationMessage": "",
|
9256
|
+
"hostBindings": [],
|
9257
|
+
"hostListeners": [],
|
9258
|
+
"propertiesClass": [
|
9259
|
+
{
|
9260
|
+
"name": "feature",
|
9261
|
+
"defaultValue": "input<'focusable' | 'fully-hidden'>('focusable')",
|
9262
|
+
"deprecated": false,
|
9263
|
+
"deprecationMessage": "",
|
9264
|
+
"type": "",
|
9265
|
+
"optional": false,
|
9266
|
+
"description": "",
|
9267
|
+
"line": 33,
|
9268
|
+
"modifierKind": [
|
9269
|
+
148
|
9270
|
+
]
|
9271
|
+
}
|
9272
|
+
],
|
9273
|
+
"methodsClass": [],
|
9274
|
+
"extends": []
|
9275
|
+
},
|
9276
|
+
{
|
9277
|
+
"name": "RdxVisuallyHiddenInputBubbleDirective",
|
9278
|
+
"id": "directive-RdxVisuallyHiddenInputBubbleDirective-f224287b6276012f697c2f366e570f826079a8257239ee8db19e9c603d52302e7bd2be94651ae4bea39a68f8c64173a96c05c0c52cd869ef10c2fdf92aff5bdd",
|
9279
|
+
"file": "visually-hidden/src/visually-hidden-input-bubble.directive.ts",
|
9280
|
+
"type": "directive",
|
9281
|
+
"description": "",
|
9282
|
+
"rawdescription": "\n\n\n",
|
9283
|
+
"sourceCode": "import { Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from './visually-hidden.directive';\n\n/**\n *\n */\n@Directive({\n selector: '[rdxVisuallyHiddenInputBubble]',\n standalone: true,\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature: feature'] }],\n host: {\n '[attr.name]': 'name()',\n '[attr.required]': 'required()',\n '[attr.disabled]': 'disabled()',\n '[attr.checked]': 'checked()',\n '[value]': 'value()',\n '(change)': 'onChange()'\n }\n})\nexport class RdxVisuallyHiddenInputBubbleDirective<T> {\n private readonly elementRef = inject(ElementRef);\n\n readonly name = input<string>('');\n readonly value = input<T | null>(null);\n readonly checked = input<boolean | undefined>(undefined);\n readonly required = input<boolean | undefined>(undefined);\n readonly disabled = input<boolean | undefined>(undefined);\n readonly feature = input<string>('fully-hidden');\n\n constructor() {\n effect(() => {\n this.updateInputValue();\n });\n }\n\n protected onChange() {\n this.updateInputValue();\n }\n\n private updateInputValue() {\n let valueChanged = false;\n let checkedChanged = false;\n\n // Check if the value has changed before applying the update\n const currentValue = this.inputElement.value;\n const newValue = String(this.value());\n\n if (currentValue !== newValue) {\n this.inputElement.value = newValue;\n valueChanged = true;\n }\n\n if (this.inputElement.type === 'checkbox' || this.inputElement.type === 'radio') {\n const currentChecked = this.inputElement.checked;\n const newChecked = !!this.checked();\n\n if (currentChecked !== newChecked) {\n this.inputElement.checked = newChecked;\n checkedChanged = true;\n }\n }\n\n if (valueChanged || checkedChanged) {\n this.dispatchInputEvents();\n }\n }\n\n private get inputElement() {\n return this.elementRef.nativeElement;\n }\n\n private dispatchInputEvents() {\n const inputEvent = new Event('input', { bubbles: true });\n const changeEvent = new Event('change', { bubbles: true });\n\n this.inputElement.dispatchEvent(inputEvent);\n this.inputElement.dispatchEvent(changeEvent);\n }\n}\n",
|
9284
|
+
"selector": "[rdxVisuallyHiddenInputBubble]",
|
9285
|
+
"providers": [],
|
9286
|
+
"hostDirectives": [
|
9287
|
+
{
|
9288
|
+
"name": "RdxVisuallyHiddenDirective",
|
9289
|
+
"inputs": [
|
9290
|
+
"feature: feature"
|
9291
|
+
],
|
9292
|
+
"outputs": []
|
9293
|
+
}
|
9294
|
+
],
|
9295
|
+
"standalone": true,
|
9296
|
+
"inputsClass": [],
|
9297
|
+
"outputsClass": [],
|
9298
|
+
"deprecated": false,
|
9299
|
+
"deprecationMessage": "",
|
9300
|
+
"hostBindings": [],
|
9301
|
+
"hostListeners": [],
|
9302
|
+
"propertiesClass": [
|
9303
|
+
{
|
9304
|
+
"name": "checked",
|
9305
|
+
"defaultValue": "input<boolean | undefined>(undefined)",
|
9306
|
+
"deprecated": false,
|
9307
|
+
"deprecationMessage": "",
|
9308
|
+
"type": "",
|
9309
|
+
"optional": false,
|
9310
|
+
"description": "",
|
9311
|
+
"line": 25,
|
9312
|
+
"modifierKind": [
|
9313
|
+
148
|
9314
|
+
]
|
9315
|
+
},
|
9316
|
+
{
|
9317
|
+
"name": "disabled",
|
9318
|
+
"defaultValue": "input<boolean | undefined>(undefined)",
|
9319
|
+
"deprecated": false,
|
9320
|
+
"deprecationMessage": "",
|
9321
|
+
"type": "",
|
9322
|
+
"optional": false,
|
9323
|
+
"description": "",
|
9324
|
+
"line": 27,
|
9325
|
+
"modifierKind": [
|
9326
|
+
148
|
9327
|
+
]
|
9328
|
+
},
|
9329
|
+
{
|
9330
|
+
"name": "feature",
|
9331
|
+
"defaultValue": "input<string>('fully-hidden')",
|
9332
|
+
"deprecated": false,
|
9333
|
+
"deprecationMessage": "",
|
9334
|
+
"type": "",
|
9335
|
+
"optional": false,
|
9336
|
+
"description": "",
|
9337
|
+
"line": 28,
|
9338
|
+
"modifierKind": [
|
9339
|
+
148
|
9340
|
+
]
|
9341
|
+
},
|
9342
|
+
{
|
9343
|
+
"name": "name",
|
9344
|
+
"defaultValue": "input<string>('')",
|
9345
|
+
"deprecated": false,
|
9346
|
+
"deprecationMessage": "",
|
9347
|
+
"type": "",
|
9348
|
+
"optional": false,
|
9349
|
+
"description": "",
|
9350
|
+
"line": 23,
|
9351
|
+
"modifierKind": [
|
9352
|
+
148
|
9353
|
+
]
|
9354
|
+
},
|
9355
|
+
{
|
9356
|
+
"name": "required",
|
9357
|
+
"defaultValue": "input<boolean | undefined>(undefined)",
|
9358
|
+
"deprecated": false,
|
9359
|
+
"deprecationMessage": "",
|
9360
|
+
"type": "",
|
9361
|
+
"optional": false,
|
9362
|
+
"description": "",
|
9363
|
+
"line": 26,
|
9364
|
+
"modifierKind": [
|
9365
|
+
148
|
9366
|
+
]
|
9367
|
+
},
|
9368
|
+
{
|
9369
|
+
"name": "value",
|
9370
|
+
"defaultValue": "input<T | null>(null)",
|
9371
|
+
"deprecated": false,
|
9372
|
+
"deprecationMessage": "",
|
9373
|
+
"type": "",
|
9374
|
+
"optional": false,
|
9375
|
+
"description": "",
|
9376
|
+
"line": 24,
|
9377
|
+
"modifierKind": [
|
9378
|
+
148
|
9379
|
+
]
|
9380
|
+
}
|
9381
|
+
],
|
9382
|
+
"methodsClass": [
|
9383
|
+
{
|
9384
|
+
"name": "onChange",
|
9385
|
+
"args": [],
|
9386
|
+
"optional": false,
|
9387
|
+
"returnType": "void",
|
9388
|
+
"typeParameters": [],
|
9389
|
+
"line": 36,
|
9390
|
+
"deprecated": false,
|
9391
|
+
"deprecationMessage": "",
|
9392
|
+
"modifierKind": [
|
9393
|
+
124
|
9394
|
+
]
|
9395
|
+
}
|
9396
|
+
],
|
9397
|
+
"extends": [],
|
9398
|
+
"constructorObj": {
|
9399
|
+
"name": "constructor",
|
9400
|
+
"description": "",
|
9401
|
+
"deprecated": false,
|
9402
|
+
"deprecationMessage": "",
|
9403
|
+
"args": [],
|
9404
|
+
"line": 28
|
9405
|
+
}
|
9406
|
+
},
|
9407
|
+
{
|
9408
|
+
"name": "RdxVisuallyHiddenInputDirective",
|
9409
|
+
"id": "directive-RdxVisuallyHiddenInputDirective-8de94a85e1953c9b820ea4160db45b0ed69d36f12bebf0283fa16f999ab74275a02156bdb61a122f4328e156fcc635e9727894c3f73df0b14fad1e35f0b51065",
|
9410
|
+
"file": "visually-hidden/src/visually-hidden-input.directive.ts",
|
9411
|
+
"type": "directive",
|
9412
|
+
"description": "",
|
9413
|
+
"rawdescription": "\n",
|
9414
|
+
"sourceCode": "import { Directive, ElementRef, OnInit, computed, inject, input } from '@angular/core';\nimport { RdxVisuallyHiddenInputBubbleDirective } from './visually-hidden-input-bubble.directive';\n\n@Directive({\n selector: '[rdxVisuallyHiddenInput]',\n standalone: true,\n hostDirectives: [\n {\n directive: RdxVisuallyHiddenInputBubbleDirective,\n inputs: [\n 'feature: feature',\n 'name: name ',\n 'value: value',\n 'checked: checked',\n 'disabled: disabled',\n 'required: required'\n ]\n }\n ]\n})\nexport class RdxVisuallyHiddenInputDirective<T> implements OnInit {\n private readonly elementRef = inject(ElementRef);\n\n readonly name = input<string>('');\n readonly value = input<T | null>(null);\n readonly checked = input<boolean | undefined>(undefined);\n readonly required = input<boolean | undefined>(undefined);\n readonly disabled = input<boolean | undefined>(undefined);\n readonly feature = input<'focusable' | 'fully-hidden'>('fully-hidden');\n\n readonly parsedValue = computed<{ name: string; value: any }[]>(() => {\n const value = this.value();\n const name = this.name();\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n return [{ name, value }];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap((obj, index) => {\n if (typeof obj === 'object') {\n return Object.entries(obj).map(([key, val]) => ({\n name: `[${name}][${index}][${key}]`,\n value: val\n }));\n } else {\n return { name: `[${name}][${index}]`, value: obj };\n }\n });\n }\n\n if (value !== null && typeof value === 'object') {\n return Object.entries(value).map(([key, val]) => ({\n name: `[${name}][${key}]`,\n value: val\n }));\n }\n\n return [];\n });\n\n ngOnInit() {\n const parsedValues = this.parsedValue();\n\n parsedValues.forEach((parsed) => {\n const inputElement = this.elementRef.nativeElement;\n inputElement.setAttribute('name', parsed.name);\n inputElement.setAttribute('value', parsed.value);\n });\n }\n}\n",
|
9415
|
+
"selector": "[rdxVisuallyHiddenInput]",
|
9416
|
+
"providers": [],
|
9417
|
+
"hostDirectives": [
|
9418
|
+
{
|
9419
|
+
"name": "RdxVisuallyHiddenInputBubbleDirective",
|
9420
|
+
"inputs": [
|
9421
|
+
"feature: feature",
|
9422
|
+
"name: name ",
|
9423
|
+
"value: value",
|
9424
|
+
"checked: checked",
|
9425
|
+
"disabled: disabled",
|
9426
|
+
"required: required"
|
9427
|
+
],
|
9428
|
+
"outputs": []
|
9429
|
+
}
|
9430
|
+
],
|
9431
|
+
"standalone": true,
|
9432
|
+
"inputsClass": [],
|
9433
|
+
"outputsClass": [],
|
9434
|
+
"deprecated": false,
|
9435
|
+
"deprecationMessage": "",
|
9436
|
+
"hostBindings": [],
|
9437
|
+
"hostListeners": [],
|
9438
|
+
"propertiesClass": [
|
9439
|
+
{
|
9440
|
+
"name": "checked",
|
9441
|
+
"defaultValue": "input<boolean | undefined>(undefined)",
|
9442
|
+
"deprecated": false,
|
9443
|
+
"deprecationMessage": "",
|
9444
|
+
"type": "",
|
9445
|
+
"optional": false,
|
9446
|
+
"description": "",
|
9447
|
+
"line": 28,
|
9448
|
+
"modifierKind": [
|
9449
|
+
148
|
9450
|
+
]
|
9451
|
+
},
|
9452
|
+
{
|
9453
|
+
"name": "disabled",
|
9454
|
+
"defaultValue": "input<boolean | undefined>(undefined)",
|
9095
9455
|
"deprecated": false,
|
9096
9456
|
"deprecationMessage": "",
|
9097
|
-
"
|
9098
|
-
|
9099
|
-
|
9100
|
-
|
9101
|
-
|
9102
|
-
|
9103
|
-
|
9104
|
-
"kind": 334,
|
9105
|
-
"tagName": {
|
9106
|
-
"pos": 1185,
|
9107
|
-
"end": 1192,
|
9108
|
-
"flags": 16842752,
|
9109
|
-
"modifierFlagsCache": 0,
|
9110
|
-
"transformFlags": 0,
|
9111
|
-
"kind": 80,
|
9112
|
-
"escapedText": "default"
|
9113
|
-
},
|
9114
|
-
"comment": "<p>'horizontal'</p>\n"
|
9115
|
-
}
|
9116
|
-
],
|
9117
|
-
"rawdescription": "\n\nThe orientation of the toggle group.\n",
|
9118
|
-
"description": "<p>The orientation of the toggle group.</p>\n",
|
9119
|
-
"line": 40,
|
9120
|
-
"type": "\"horizontal\" | \"vertical\"",
|
9121
|
-
"decorators": []
|
9457
|
+
"type": "",
|
9458
|
+
"optional": false,
|
9459
|
+
"description": "",
|
9460
|
+
"line": 30,
|
9461
|
+
"modifierKind": [
|
9462
|
+
148
|
9463
|
+
]
|
9122
9464
|
},
|
9123
9465
|
{
|
9124
|
-
"name": "
|
9125
|
-
"defaultValue": "
|
9466
|
+
"name": "feature",
|
9467
|
+
"defaultValue": "input<'focusable' | 'fully-hidden'>('fully-hidden')",
|
9126
9468
|
"deprecated": false,
|
9127
9469
|
"deprecationMessage": "",
|
9128
|
-
"
|
9129
|
-
"
|
9130
|
-
"
|
9131
|
-
"
|
9132
|
-
"
|
9470
|
+
"type": "",
|
9471
|
+
"optional": false,
|
9472
|
+
"description": "",
|
9473
|
+
"line": 31,
|
9474
|
+
"modifierKind": [
|
9475
|
+
148
|
9476
|
+
]
|
9133
9477
|
},
|
9134
9478
|
{
|
9135
|
-
"name": "
|
9136
|
-
"defaultValue": "
|
9479
|
+
"name": "name",
|
9480
|
+
"defaultValue": "input<string>('')",
|
9137
9481
|
"deprecated": false,
|
9138
9482
|
"deprecationMessage": "",
|
9139
|
-
"
|
9140
|
-
"
|
9141
|
-
"
|
9142
|
-
"
|
9143
|
-
"
|
9483
|
+
"type": "",
|
9484
|
+
"optional": false,
|
9485
|
+
"description": "",
|
9486
|
+
"line": 26,
|
9487
|
+
"modifierKind": [
|
9488
|
+
148
|
9489
|
+
]
|
9144
9490
|
},
|
9145
9491
|
{
|
9146
|
-
"
|
9147
|
-
"
|
9148
|
-
"defaultValue": "true",
|
9492
|
+
"name": "parsedValue",
|
9493
|
+
"defaultValue": "computed<{ name: string; value: any }[]>(() => {\n const value = this.value();\n const name = this.name();\n\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n return [{ name, value }];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap((obj, index) => {\n if (typeof obj === 'object') {\n return Object.entries(obj).map(([key, val]) => ({\n name: `[${name}][${index}][${key}]`,\n value: val\n }));\n } else {\n return { name: `[${name}][${index}]`, value: obj };\n }\n });\n }\n\n if (value !== null && typeof value === 'object') {\n return Object.entries(value).map(([key, val]) => ({\n name: `[${name}][${key}]`,\n value: val\n }));\n }\n\n return [];\n })",
|
9149
9494
|
"deprecated": false,
|
9150
9495
|
"deprecationMessage": "",
|
9151
|
-
"
|
9152
|
-
|
9153
|
-
|
9154
|
-
|
9155
|
-
|
9156
|
-
|
9157
|
-
|
9158
|
-
|
9159
|
-
|
9160
|
-
|
9161
|
-
|
9162
|
-
|
9163
|
-
|
9164
|
-
|
9165
|
-
|
9166
|
-
|
9167
|
-
|
9168
|
-
|
9169
|
-
|
9170
|
-
]
|
9171
|
-
|
9172
|
-
|
9173
|
-
"
|
9174
|
-
"
|
9175
|
-
"
|
9496
|
+
"type": "",
|
9497
|
+
"optional": false,
|
9498
|
+
"description": "",
|
9499
|
+
"line": 33,
|
9500
|
+
"modifierKind": [
|
9501
|
+
148
|
9502
|
+
]
|
9503
|
+
},
|
9504
|
+
{
|
9505
|
+
"name": "required",
|
9506
|
+
"defaultValue": "input<boolean | undefined>(undefined)",
|
9507
|
+
"deprecated": false,
|
9508
|
+
"deprecationMessage": "",
|
9509
|
+
"type": "",
|
9510
|
+
"optional": false,
|
9511
|
+
"description": "",
|
9512
|
+
"line": 29,
|
9513
|
+
"modifierKind": [
|
9514
|
+
148
|
9515
|
+
]
|
9516
|
+
},
|
9517
|
+
{
|
9518
|
+
"name": "value",
|
9519
|
+
"defaultValue": "input<T | null>(null)",
|
9520
|
+
"deprecated": false,
|
9521
|
+
"deprecationMessage": "",
|
9522
|
+
"type": "",
|
9523
|
+
"optional": false,
|
9524
|
+
"description": "",
|
9525
|
+
"line": 27,
|
9526
|
+
"modifierKind": [
|
9527
|
+
148
|
9528
|
+
]
|
9176
9529
|
}
|
9177
9530
|
],
|
9178
|
-
"outputsClass": [],
|
9179
|
-
"deprecated": false,
|
9180
|
-
"deprecationMessage": "",
|
9181
|
-
"hostBindings": [],
|
9182
|
-
"hostListeners": [],
|
9183
|
-
"propertiesClass": [],
|
9184
9531
|
"methodsClass": [],
|
9185
9532
|
"extends": [],
|
9186
9533
|
"implements": [
|
9187
|
-
"
|
9188
|
-
"AfterContentInit",
|
9189
|
-
"ControlValueAccessor"
|
9534
|
+
"OnInit"
|
9190
9535
|
]
|
9191
9536
|
},
|
9192
9537
|
{
|
@@ -10456,6 +10801,74 @@
|
|
10456
10801
|
}
|
10457
10802
|
]
|
10458
10803
|
},
|
10804
|
+
{
|
10805
|
+
"name": "RdxAlertDialogModule",
|
10806
|
+
"id": "module-RdxAlertDialogModule-d3e998524d0054b4cfd40d33a96bac63142ac9c816f7cbeb8a25c35948987be3cebdf91feea730c87aa648b7d973c885ddfae5dd0158133e7654ca87fa3de6b8",
|
10807
|
+
"description": "",
|
10808
|
+
"deprecationMessage": "",
|
10809
|
+
"deprecated": false,
|
10810
|
+
"file": "alert-dialog/index.ts",
|
10811
|
+
"methods": [],
|
10812
|
+
"sourceCode": "import { NgModule } from '@angular/core';\nimport { RdxAlertDialogCancelDirective } from './src/alert-dialog-cancel.directive';\nimport { RdxAlertDialogContentDirective } from './src/alert-dialog-content.directive';\nimport { RdxAlertDialogRootDirective } from './src/alert-dialog-root.directive';\nimport { RdxAlertDialogTitleDirective } from './src/alert-dialog-title.directive';\nimport { RdxAlertDialogTriggerDirective } from './src/alert-dialog-trigger.directive';\n\nexport * from './src/alert-dialog-cancel.directive';\nexport * from './src/alert-dialog-content.directive';\nexport * from './src/alert-dialog-root.directive';\nexport * from './src/alert-dialog-title.directive';\nexport * from './src/alert-dialog-trigger.directive';\n\nexport * from './src/alert-dialog.service';\n\nconst _imports = [\n RdxAlertDialogRootDirective,\n RdxAlertDialogContentDirective,\n RdxAlertDialogCancelDirective,\n RdxAlertDialogTriggerDirective,\n RdxAlertDialogTitleDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxAlertDialogModule {}\n",
|
10813
|
+
"children": [
|
10814
|
+
{
|
10815
|
+
"type": "providers",
|
10816
|
+
"elements": []
|
10817
|
+
},
|
10818
|
+
{
|
10819
|
+
"type": "declarations",
|
10820
|
+
"elements": []
|
10821
|
+
},
|
10822
|
+
{
|
10823
|
+
"type": "imports",
|
10824
|
+
"elements": [
|
10825
|
+
{
|
10826
|
+
"name": "RdxAccordionContentDirective"
|
10827
|
+
},
|
10828
|
+
{
|
10829
|
+
"name": "RdxAccordionHeaderDirective"
|
10830
|
+
},
|
10831
|
+
{
|
10832
|
+
"name": "RdxAccordionItemDirective"
|
10833
|
+
},
|
10834
|
+
{
|
10835
|
+
"name": "RdxAccordionRootDirective"
|
10836
|
+
},
|
10837
|
+
{
|
10838
|
+
"name": "RdxAccordionTriggerDirective"
|
10839
|
+
}
|
10840
|
+
]
|
10841
|
+
},
|
10842
|
+
{
|
10843
|
+
"type": "exports",
|
10844
|
+
"elements": [
|
10845
|
+
{
|
10846
|
+
"name": "RdxAccordionContentDirective"
|
10847
|
+
},
|
10848
|
+
{
|
10849
|
+
"name": "RdxAccordionHeaderDirective"
|
10850
|
+
},
|
10851
|
+
{
|
10852
|
+
"name": "RdxAccordionItemDirective"
|
10853
|
+
},
|
10854
|
+
{
|
10855
|
+
"name": "RdxAccordionRootDirective"
|
10856
|
+
},
|
10857
|
+
{
|
10858
|
+
"name": "RdxAccordionTriggerDirective"
|
10859
|
+
}
|
10860
|
+
]
|
10861
|
+
},
|
10862
|
+
{
|
10863
|
+
"type": "bootstrap",
|
10864
|
+
"elements": []
|
10865
|
+
},
|
10866
|
+
{
|
10867
|
+
"type": "classes",
|
10868
|
+
"elements": []
|
10869
|
+
}
|
10870
|
+
]
|
10871
|
+
},
|
10459
10872
|
{
|
10460
10873
|
"name": "RdxContextMenuModule",
|
10461
10874
|
"id": "module-RdxContextMenuModule-ae9a10be40adfa46fc65f5b123ada1b03497abba3f3f504d7b4b139f166b94164ca84a4daf2d6f2982807dbca7e074074ae7c773f91ddc7535160a8b3fbf93f9",
|
@@ -10795,6 +11208,16 @@
|
|
10795
11208
|
"type": "[]",
|
10796
11209
|
"defaultValue": "[\n RdxAccordionContentDirective,\n RdxAccordionHeaderDirective,\n RdxAccordionItemDirective,\n RdxAccordionRootDirective,\n RdxAccordionTriggerDirective\n]"
|
10797
11210
|
},
|
11211
|
+
{
|
11212
|
+
"name": "_imports",
|
11213
|
+
"ctype": "miscellaneous",
|
11214
|
+
"subtype": "variable",
|
11215
|
+
"file": "alert-dialog/index.ts",
|
11216
|
+
"deprecated": false,
|
11217
|
+
"deprecationMessage": "",
|
11218
|
+
"type": "[]",
|
11219
|
+
"defaultValue": "[\n RdxAlertDialogRootDirective,\n RdxAlertDialogContentDirective,\n RdxAlertDialogCancelDirective,\n RdxAlertDialogTriggerDirective,\n RdxAlertDialogTitleDirective\n]"
|
11220
|
+
},
|
10798
11221
|
{
|
10799
11222
|
"name": "_imports",
|
10800
11223
|
"ctype": "miscellaneous",
|
@@ -11240,14 +11663,14 @@
|
|
11240
11663
|
"defaultValue": "new InjectionToken<RdxSwitchRootDirective>('RdxSwitchToken')"
|
11241
11664
|
},
|
11242
11665
|
{
|
11243
|
-
"name": "
|
11666
|
+
"name": "RdxToggleGroupItemToken",
|
11244
11667
|
"ctype": "miscellaneous",
|
11245
11668
|
"subtype": "variable",
|
11246
|
-
"file": "toggle-group/src/toggle-group-
|
11669
|
+
"file": "toggle-group/src/toggle-group-item.token.ts",
|
11247
11670
|
"deprecated": false,
|
11248
11671
|
"deprecationMessage": "",
|
11249
11672
|
"type": "",
|
11250
|
-
"defaultValue": "new InjectionToken<
|
11673
|
+
"defaultValue": "new InjectionToken<RdxToggleGroupItemDirective>('RdxToggleGroupItemToken')"
|
11251
11674
|
},
|
11252
11675
|
{
|
11253
11676
|
"name": "RdxToggleGroupToken",
|
@@ -11257,7 +11680,7 @@
|
|
11257
11680
|
"deprecated": false,
|
11258
11681
|
"deprecationMessage": "",
|
11259
11682
|
"type": "",
|
11260
|
-
"defaultValue": "new InjectionToken<RdxToggleGroupDirective |
|
11683
|
+
"defaultValue": "new InjectionToken<RdxToggleGroupDirective | RdxToggleGroupMultipleDirective>(\n 'RdxToggleGroupToken'\n)"
|
11261
11684
|
},
|
11262
11685
|
{
|
11263
11686
|
"name": "reqAnimationFrame",
|
@@ -11362,6 +11785,16 @@
|
|
11362
11785
|
"defaultValue": "<T>(\n zone: NgZone,\n element: HTMLElement,\n startFn: TransitionStartFn<T>,\n options: TransitionOptions<T>\n): Observable<void> => {\n let context = options.context || <T>{};\n\n const transitionTimerDelayMs = options.transitionTimerDelayMs ?? 5;\n const state = options.state ?? 'stop';\n\n const running = TransitionsMap.get(element);\n\n if (running) {\n switch (state) {\n case 'continue':\n return EMPTY;\n case 'stop':\n zone.run(() => running.transition$.complete());\n context = { ...running.context, ...context };\n TransitionsMap.delete(element);\n break;\n }\n }\n const endFn = startFn(element, options.animation, context) || noopFn;\n\n if (!options.animation || window.getComputedStyle(element).transitionProperty === 'none') {\n zone.run(() => endFn());\n return of(undefined).pipe(runInZone(zone));\n }\n\n const transition$ = new Subject<void>();\n const finishTransition$ = new Subject<void>();\n const stop$ = transition$.pipe(endWith(true));\n\n TransitionsMap.set(element, {\n transition$,\n complete: () => {\n finishTransition$.next();\n finishTransition$.complete();\n },\n context\n });\n\n const transitionDurationMs = getTransitionDurationMs(element);\n\n zone.runOutsideAngular(() => {\n const transitionEnd$ = fromEvent<TransitionEvent>(element, 'transitionend').pipe(\n filter(({ target }) => target === element),\n takeUntil(stop$)\n );\n const timer$ = timer(transitionDurationMs + transitionTimerDelayMs).pipe(takeUntil(stop$));\n\n race(timer$, transitionEnd$, finishTransition$)\n .pipe(takeUntil(stop$))\n .subscribe(() => {\n TransitionsMap.delete(element);\n zone.run(() => {\n endFn();\n transition$.next();\n transition$.complete();\n });\n });\n });\n\n return transition$.asObservable();\n}",
|
11363
11786
|
"rawdescription": "Manages the presence of an element with optional transition animation.",
|
11364
11787
|
"description": "<p>Manages the presence of an element with optional transition animation.</p>\n"
|
11788
|
+
},
|
11789
|
+
{
|
11790
|
+
"name": "WINDOW",
|
11791
|
+
"ctype": "miscellaneous",
|
11792
|
+
"subtype": "variable",
|
11793
|
+
"file": "core/src/window.ts",
|
11794
|
+
"deprecated": false,
|
11795
|
+
"deprecationMessage": "",
|
11796
|
+
"type": "",
|
11797
|
+
"defaultValue": "new InjectionToken<Window & typeof globalThis>('An abstraction over global window object', {\n factory: () => {\n const { defaultView } = injectDocument();\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n return defaultView;\n }\n})"
|
11365
11798
|
}
|
11366
11799
|
],
|
11367
11800
|
"functions": [
|
@@ -11550,6 +11983,27 @@
|
|
11550
11983
|
"description": "",
|
11551
11984
|
"args": []
|
11552
11985
|
},
|
11986
|
+
{
|
11987
|
+
"name": "injectDocument",
|
11988
|
+
"file": "core/src/document.ts",
|
11989
|
+
"ctype": "miscellaneous",
|
11990
|
+
"subtype": "function",
|
11991
|
+
"deprecated": false,
|
11992
|
+
"deprecationMessage": "",
|
11993
|
+
"description": "",
|
11994
|
+
"args": [],
|
11995
|
+
"returnType": "Document"
|
11996
|
+
},
|
11997
|
+
{
|
11998
|
+
"name": "injectIsClient",
|
11999
|
+
"file": "core/src/is-client.ts",
|
12000
|
+
"ctype": "miscellaneous",
|
12001
|
+
"subtype": "function",
|
12002
|
+
"deprecated": false,
|
12003
|
+
"deprecationMessage": "",
|
12004
|
+
"description": "",
|
12005
|
+
"args": []
|
12006
|
+
},
|
11553
12007
|
{
|
11554
12008
|
"name": "injectNgControl",
|
11555
12009
|
"file": "core/src/inject-ng-control.ts",
|
@@ -11699,18 +12153,17 @@
|
|
11699
12153
|
"deprecationMessage": "",
|
11700
12154
|
"description": "",
|
11701
12155
|
"args": [],
|
11702
|
-
"returnType": "RdxToggleGroupDirective |
|
12156
|
+
"returnType": "RdxToggleGroupDirective | RdxToggleGroupMultipleDirective"
|
11703
12157
|
},
|
11704
12158
|
{
|
11705
|
-
"name": "
|
11706
|
-
"file": "
|
12159
|
+
"name": "injectWindow",
|
12160
|
+
"file": "core/src/window.ts",
|
11707
12161
|
"ctype": "miscellaneous",
|
11708
12162
|
"subtype": "function",
|
11709
12163
|
"deprecated": false,
|
11710
12164
|
"deprecationMessage": "",
|
11711
12165
|
"description": "",
|
11712
|
-
"args": []
|
11713
|
-
"returnType": "RdxToggleGroupButtonDirective"
|
12166
|
+
"args": []
|
11714
12167
|
},
|
11715
12168
|
{
|
11716
12169
|
"name": "isDismissed",
|
@@ -12456,6 +12909,18 @@
|
|
12456
12909
|
"defaultValue": "[\n RdxAccordionContentDirective,\n RdxAccordionHeaderDirective,\n RdxAccordionItemDirective,\n RdxAccordionRootDirective,\n RdxAccordionTriggerDirective\n]"
|
12457
12910
|
}
|
12458
12911
|
],
|
12912
|
+
"alert-dialog/index.ts": [
|
12913
|
+
{
|
12914
|
+
"name": "_imports",
|
12915
|
+
"ctype": "miscellaneous",
|
12916
|
+
"subtype": "variable",
|
12917
|
+
"file": "alert-dialog/index.ts",
|
12918
|
+
"deprecated": false,
|
12919
|
+
"deprecationMessage": "",
|
12920
|
+
"type": "[]",
|
12921
|
+
"defaultValue": "[\n RdxAlertDialogRootDirective,\n RdxAlertDialogContentDirective,\n RdxAlertDialogCancelDirective,\n RdxAlertDialogTriggerDirective,\n RdxAlertDialogTitleDirective\n]"
|
12922
|
+
}
|
12923
|
+
],
|
12459
12924
|
"context-menu/index.ts": [
|
12460
12925
|
{
|
12461
12926
|
"name": "_imports",
|
@@ -13016,16 +13481,16 @@
|
|
13016
13481
|
"defaultValue": "new InjectionToken<RdxCollapsibleRootDirective>('RdxCollapsibleRootToken')"
|
13017
13482
|
}
|
13018
13483
|
],
|
13019
|
-
"toggle-group/src/toggle-group-
|
13484
|
+
"toggle-group/src/toggle-group-item.token.ts": [
|
13020
13485
|
{
|
13021
|
-
"name": "
|
13486
|
+
"name": "RdxToggleGroupItemToken",
|
13022
13487
|
"ctype": "miscellaneous",
|
13023
13488
|
"subtype": "variable",
|
13024
|
-
"file": "toggle-group/src/toggle-group-
|
13489
|
+
"file": "toggle-group/src/toggle-group-item.token.ts",
|
13025
13490
|
"deprecated": false,
|
13026
13491
|
"deprecationMessage": "",
|
13027
13492
|
"type": "",
|
13028
|
-
"defaultValue": "new InjectionToken<
|
13493
|
+
"defaultValue": "new InjectionToken<RdxToggleGroupItemDirective>('RdxToggleGroupItemToken')"
|
13029
13494
|
}
|
13030
13495
|
],
|
13031
13496
|
"toggle-group/src/toggle-group.token.ts": [
|
@@ -13037,7 +13502,7 @@
|
|
13037
13502
|
"deprecated": false,
|
13038
13503
|
"deprecationMessage": "",
|
13039
13504
|
"type": "",
|
13040
|
-
"defaultValue": "new InjectionToken<RdxToggleGroupDirective |
|
13505
|
+
"defaultValue": "new InjectionToken<RdxToggleGroupDirective | RdxToggleGroupMultipleDirective>(\n 'RdxToggleGroupToken'\n)"
|
13041
13506
|
}
|
13042
13507
|
],
|
13043
13508
|
"switch/index.ts": [
|
@@ -13097,6 +13562,18 @@
|
|
13097
13562
|
"type": "TransitionStartFn",
|
13098
13563
|
"defaultValue": "({ classList }: HTMLElement) => {\n classList.add('showing');\n return () => {\n classList.remove('show', 'showing');\n };\n}"
|
13099
13564
|
}
|
13565
|
+
],
|
13566
|
+
"core/src/window.ts": [
|
13567
|
+
{
|
13568
|
+
"name": "WINDOW",
|
13569
|
+
"ctype": "miscellaneous",
|
13570
|
+
"subtype": "variable",
|
13571
|
+
"file": "core/src/window.ts",
|
13572
|
+
"deprecated": false,
|
13573
|
+
"deprecationMessage": "",
|
13574
|
+
"type": "",
|
13575
|
+
"defaultValue": "new InjectionToken<Window & typeof globalThis>('An abstraction over global window object', {\n factory: () => {\n const { defaultView } = injectDocument();\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n return defaultView;\n }\n})"
|
13576
|
+
}
|
13100
13577
|
]
|
13101
13578
|
},
|
13102
13579
|
"groupedFunctions": {
|
@@ -13450,6 +13927,31 @@
|
|
13450
13927
|
"args": []
|
13451
13928
|
}
|
13452
13929
|
],
|
13930
|
+
"core/src/document.ts": [
|
13931
|
+
{
|
13932
|
+
"name": "injectDocument",
|
13933
|
+
"file": "core/src/document.ts",
|
13934
|
+
"ctype": "miscellaneous",
|
13935
|
+
"subtype": "function",
|
13936
|
+
"deprecated": false,
|
13937
|
+
"deprecationMessage": "",
|
13938
|
+
"description": "",
|
13939
|
+
"args": [],
|
13940
|
+
"returnType": "Document"
|
13941
|
+
}
|
13942
|
+
],
|
13943
|
+
"core/src/is-client.ts": [
|
13944
|
+
{
|
13945
|
+
"name": "injectIsClient",
|
13946
|
+
"file": "core/src/is-client.ts",
|
13947
|
+
"ctype": "miscellaneous",
|
13948
|
+
"subtype": "function",
|
13949
|
+
"deprecated": false,
|
13950
|
+
"deprecationMessage": "",
|
13951
|
+
"description": "",
|
13952
|
+
"args": []
|
13953
|
+
}
|
13954
|
+
],
|
13453
13955
|
"core/src/inject-ng-control.ts": [
|
13454
13956
|
{
|
13455
13957
|
"name": "injectNgControl",
|
@@ -13608,20 +14110,19 @@
|
|
13608
14110
|
"deprecationMessage": "",
|
13609
14111
|
"description": "",
|
13610
14112
|
"args": [],
|
13611
|
-
"returnType": "RdxToggleGroupDirective |
|
14113
|
+
"returnType": "RdxToggleGroupDirective | RdxToggleGroupMultipleDirective"
|
13612
14114
|
}
|
13613
14115
|
],
|
13614
|
-
"
|
14116
|
+
"core/src/window.ts": [
|
13615
14117
|
{
|
13616
|
-
"name": "
|
13617
|
-
"file": "
|
14118
|
+
"name": "injectWindow",
|
14119
|
+
"file": "core/src/window.ts",
|
13618
14120
|
"ctype": "miscellaneous",
|
13619
14121
|
"subtype": "function",
|
13620
14122
|
"deprecated": false,
|
13621
14123
|
"deprecationMessage": "",
|
13622
14124
|
"description": "",
|
13623
|
-
"args": []
|
13624
|
-
"returnType": "RdxToggleGroupButtonDirective"
|
14125
|
+
"args": []
|
13625
14126
|
}
|
13626
14127
|
],
|
13627
14128
|
"dialog/src/dialog-ref.ts": [
|