@ng-doc/ui-kit 22.0.0-beta.1 → 22.0.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/README.md +20 -29
- package/fesm2022/ng-doc-ui-kit-cdk-combobox-host.mjs +43 -22
- package/fesm2022/ng-doc-ui-kit-cdk-combobox-host.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-classes-base-input.mjs +24 -13
- package/fesm2022/ng-doc-ui-kit-classes-base-input.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-classes-overlay-ref.mjs +62 -22
- package/fesm2022/ng-doc-ui-kit-classes-overlay-ref.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-blockquote.mjs +39 -14
- package/fesm2022/ng-doc-ui-kit-components-blockquote.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-button-icon.mjs +30 -18
- package/fesm2022/ng-doc-ui-kit-components-button-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-button-toggle.mjs +12 -9
- package/fesm2022/ng-doc-ui-kit-components-button-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-button.mjs +15 -24
- package/fesm2022/ng-doc-ui-kit-components-button.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-checkbox.mjs +13 -13
- package/fesm2022/ng-doc-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-clear-control.mjs +14 -9
- package/fesm2022/ng-doc-ui-kit-components-clear-control.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-combobox.mjs +30 -26
- package/fesm2022/ng-doc-ui-kit-components-combobox.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-data-list-group.mjs +37 -38
- package/fesm2022/ng-doc-ui-kit-components-data-list-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-data-list.mjs +32 -39
- package/fesm2022/ng-doc-ui-kit-components-data-list.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-dialog-outlet.mjs +23 -20
- package/fesm2022/ng-doc-ui-kit-components-dialog-outlet.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-dot.mjs +20 -16
- package/fesm2022/ng-doc-ui-kit-components-dot.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-dropdown.mjs +120 -125
- package/fesm2022/ng-doc-ui-kit-components-dropdown.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-expander.mjs +17 -17
- package/fesm2022/ng-doc-ui-kit-components-expander.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-floated-border.mjs +4 -4
- package/fesm2022/ng-doc-ui-kit-components-floated-border.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-floated-content.mjs +16 -17
- package/fesm2022/ng-doc-ui-kit-components-floated-content.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-focus-control.mjs +20 -12
- package/fesm2022/ng-doc-ui-kit-components-focus-control.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-icon.mjs +175 -54
- package/fesm2022/ng-doc-ui-kit-components-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-input-wrapper.mjs +43 -46
- package/fesm2022/ng-doc-ui-kit-components-input-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-label.mjs +14 -16
- package/fesm2022/ng-doc-ui-kit-components-label.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-line.mjs +7 -4
- package/fesm2022/ng-doc-ui-kit-components-line.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-list.mjs +24 -8
- package/fesm2022/ng-doc-ui-kit-components-list.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-magnifier-controller.mjs +9 -4
- package/fesm2022/ng-doc-ui-kit-components-magnifier-controller.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-magnifier.mjs +39 -18
- package/fesm2022/ng-doc-ui-kit-components-magnifier.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-option-group.mjs +22 -27
- package/fesm2022/ng-doc-ui-kit-components-option-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-option.mjs +28 -22
- package/fesm2022/ng-doc-ui-kit-components-option.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-overlay-container.mjs +56 -52
- package/fesm2022/ng-doc-ui-kit-components-overlay-container.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-overlay-pointer.mjs +19 -21
- package/fesm2022/ng-doc-ui-kit-components-overlay-pointer.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-pane.mjs +91 -69
- package/fesm2022/ng-doc-ui-kit-components-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-selection.mjs +173 -76
- package/fesm2022/ng-doc-ui-kit-components-selection.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-sidenav.mjs +23 -22
- package/fesm2022/ng-doc-ui-kit-components-sidenav.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-spinner.mjs +14 -12
- package/fesm2022/ng-doc-ui-kit-components-spinner.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-tab-group.mjs +86 -61
- package/fesm2022/ng-doc-ui-kit-components-tab-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-tab-routes-group.mjs +16 -13
- package/fesm2022/ng-doc-ui-kit-components-tab-routes-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-tag.mjs +23 -24
- package/fesm2022/ng-doc-ui-kit-components-tag.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-text.mjs +37 -52
- package/fesm2022/ng-doc-ui-kit-components-text.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-toggle.mjs +82 -57
- package/fesm2022/ng-doc-ui-kit-components-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-components-wrapper.mjs +7 -4
- package/fesm2022/ng-doc-ui-kit-components-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-autofocus.mjs +13 -10
- package/fesm2022/ng-doc-ui-kit-directives-autofocus.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-checked-change.mjs +30 -26
- package/fesm2022/ng-doc-ui-kit-directives-checked-change.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-data.mjs +8 -5
- package/fesm2022/ng-doc-ui-kit-directives-data.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-handler.mjs +19 -18
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-handler.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-origin.mjs +7 -9
- package/fesm2022/ng-doc-ui-kit-directives-dropdown-origin.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-event-switcher.mjs +22 -19
- package/fesm2022/ng-doc-ui-kit-directives-event-switcher.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-focus-catcher.mjs +30 -25
- package/fesm2022/ng-doc-ui-kit-directives-focus-catcher.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-focusable.mjs +13 -16
- package/fesm2022/ng-doc-ui-kit-directives-focusable.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-fullscreen.mjs +90 -0
- package/fesm2022/ng-doc-ui-kit-directives-fullscreen.mjs.map +1 -0
- package/fesm2022/ng-doc-ui-kit-directives-hotkey.mjs +34 -28
- package/fesm2022/ng-doc-ui-kit-directives-hotkey.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-input-number.mjs +10 -12
- package/fesm2022/ng-doc-ui-kit-directives-input-number.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-input-string.mjs +9 -12
- package/fesm2022/ng-doc-ui-kit-directives-input-string.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-radio-group.mjs +7 -4
- package/fesm2022/ng-doc-ui-kit-directives-radio-group.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-rotator.mjs +16 -22
- package/fesm2022/ng-doc-ui-kit-directives-rotator.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives-tooltip.mjs +105 -101
- package/fesm2022/ng-doc-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-directives.mjs +1 -1
- package/fesm2022/ng-doc-ui-kit-interceptors.mjs +24 -21
- package/fesm2022/ng-doc-ui-kit-interceptors.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-observables.mjs +2 -58
- package/fesm2022/ng-doc-ui-kit-observables.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-as-array.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-as-array.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-bind.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-bind.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-execute.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-execute.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-pipes-highlighter.mjs +3 -4
- package/fesm2022/ng-doc-ui-kit-pipes-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-dialog.mjs +14 -8
- package/fesm2022/ng-doc-ui-kit-services-dialog.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-notify.mjs +13 -8
- package/fesm2022/ng-doc-ui-kit-services-notify.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-overlay-strategy.mjs +15 -11
- package/fesm2022/ng-doc-ui-kit-services-overlay-strategy.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-overlay.mjs +20 -9
- package/fesm2022/ng-doc-ui-kit-services-overlay.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-services-scroll.mjs +11 -13
- package/fesm2022/ng-doc-ui-kit-services-scroll.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-tokens.mjs +29 -3
- package/fesm2022/ng-doc-ui-kit-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-ui-kit-types.mjs +0 -1
- package/fesm2022/ng-doc-ui-kit-types.mjs.map +1 -1
- package/package.json +31 -33
- package/styles/main.css +275 -38
- package/types/ng-doc-ui-kit-cdk-combobox-host.d.ts +16 -8
- package/types/ng-doc-ui-kit-classes-base-input.d.ts +12 -1
- package/types/ng-doc-ui-kit-classes-overlay-ref.d.ts +27 -4
- package/types/ng-doc-ui-kit-components-blockquote.d.ts +22 -5
- package/types/ng-doc-ui-kit-components-button-icon.d.ts +23 -5
- package/types/ng-doc-ui-kit-components-button-toggle.d.ts +5 -1
- package/types/ng-doc-ui-kit-components-button.d.ts +6 -6
- package/types/ng-doc-ui-kit-components-checkbox.d.ts +5 -3
- package/types/ng-doc-ui-kit-components-clear-control.d.ts +7 -0
- package/types/ng-doc-ui-kit-components-combobox.d.ts +19 -9
- package/types/ng-doc-ui-kit-components-data-list-group.d.ts +16 -11
- package/types/ng-doc-ui-kit-components-data-list.d.ts +21 -11
- package/types/ng-doc-ui-kit-components-dialog-outlet.d.ts +11 -6
- package/types/ng-doc-ui-kit-components-dot.d.ts +10 -5
- package/types/ng-doc-ui-kit-components-dropdown.d.ts +39 -27
- package/types/ng-doc-ui-kit-components-expander.d.ts +9 -7
- package/types/ng-doc-ui-kit-components-floated-content.d.ts +8 -6
- package/types/ng-doc-ui-kit-components-focus-control.d.ts +10 -4
- package/types/ng-doc-ui-kit-components-icon.d.ts +49 -14
- package/types/ng-doc-ui-kit-components-input-wrapper.d.ts +31 -17
- package/types/ng-doc-ui-kit-components-label.d.ts +8 -5
- package/types/ng-doc-ui-kit-components-line.d.ts +3 -0
- package/types/ng-doc-ui-kit-components-list.d.ts +14 -3
- package/types/ng-doc-ui-kit-components-magnifier-controller.d.ts +5 -1
- package/types/ng-doc-ui-kit-components-magnifier.d.ts +19 -4
- package/types/ng-doc-ui-kit-components-option-group.d.ts +12 -8
- package/types/ng-doc-ui-kit-components-option.d.ts +9 -2
- package/types/ng-doc-ui-kit-components-overlay-container.d.ts +18 -15
- package/types/ng-doc-ui-kit-components-overlay-pointer.d.ts +10 -6
- package/types/ng-doc-ui-kit-components-pane.d.ts +25 -9
- package/types/ng-doc-ui-kit-components-selection.d.ts +59 -21
- package/types/ng-doc-ui-kit-components-sidenav.d.ts +17 -8
- package/types/ng-doc-ui-kit-components-spinner.d.ts +7 -3
- package/types/ng-doc-ui-kit-components-tab-group.d.ts +43 -22
- package/types/ng-doc-ui-kit-components-tab-routes-group.d.ts +4 -2
- package/types/ng-doc-ui-kit-components-tag.d.ts +13 -6
- package/types/ng-doc-ui-kit-components-text.d.ts +21 -19
- package/types/ng-doc-ui-kit-components-toggle.d.ts +13 -7
- package/types/ng-doc-ui-kit-components-wrapper.d.ts +3 -0
- package/types/ng-doc-ui-kit-directives-autofocus.d.ts +7 -5
- package/types/ng-doc-ui-kit-directives-checked-change.d.ts +15 -11
- package/types/ng-doc-ui-kit-directives-data.d.ts +6 -4
- package/types/ng-doc-ui-kit-directives-dropdown-handler.d.ts +5 -3
- package/types/ng-doc-ui-kit-directives-dropdown-origin.d.ts +0 -2
- package/types/ng-doc-ui-kit-directives-event-switcher.d.ts +11 -6
- package/types/ng-doc-ui-kit-directives-focus-catcher.d.ts +11 -8
- package/types/ng-doc-ui-kit-directives-focusable.d.ts +6 -3
- package/types/ng-doc-ui-kit-directives-fullscreen.d.ts +39 -0
- package/types/ng-doc-ui-kit-directives-hotkey.d.ts +14 -7
- package/types/ng-doc-ui-kit-directives-input-number.d.ts +3 -2
- package/types/ng-doc-ui-kit-directives-input-string.d.ts +2 -2
- package/types/ng-doc-ui-kit-directives-radio-group.d.ts +4 -0
- package/types/ng-doc-ui-kit-directives-rotator.d.ts +8 -8
- package/types/ng-doc-ui-kit-directives-tooltip.d.ts +35 -23
- package/types/ng-doc-ui-kit-directives.d.ts +1 -1
- package/types/ng-doc-ui-kit-interceptors.d.ts +18 -2
- package/types/ng-doc-ui-kit-interfaces.d.ts +20 -4
- package/types/ng-doc-ui-kit-observables.d.ts +2 -19
- package/types/ng-doc-ui-kit-services-dialog.d.ts +10 -1
- package/types/ng-doc-ui-kit-services-notify.d.ts +9 -1
- package/types/ng-doc-ui-kit-services-overlay-strategy.d.ts +5 -3
- package/types/ng-doc-ui-kit-services-overlay.d.ts +14 -3
- package/types/ng-doc-ui-kit-services-scroll.d.ts +4 -5
- package/types/ng-doc-ui-kit-types.d.ts +2 -2
- package/fesm2022/ng-doc-ui-kit-decorators.mjs +0 -53
- package/fesm2022/ng-doc-ui-kit-decorators.mjs.map +0 -1
- package/fesm2022/ng-doc-ui-kit-directives-let.mjs +0 -43
- package/fesm2022/ng-doc-ui-kit-directives-let.mjs.map +0 -1
- package/types/ng-doc-ui-kit-decorators.d.ts +0 -12
- package/types/ng-doc-ui-kit-directives-let.d.ts +0 -22
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A small coloured dot, for example to mark a state next to a label.
|
|
6
|
+
*/
|
|
4
7
|
class NgDocDotComponent {
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
constructor() {
|
|
9
|
+
/** Colour of the dot. */
|
|
10
|
+
this.color = input(/* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
12
|
+
/** Size of the dot: 4px (`small`), 8px (`medium`) or 16px (`large`). */
|
|
13
|
+
this.size = input(/* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
15
|
+
}
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocDotComponent, isStandalone: true, selector: "ng-doc-dot", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-ng-doc-color": "color()", "attr.data-ng-doc-size": "size()" } }, ngImport: i0, template: ``, isInline: true, styles: [":host{display:inline;width:var(--ng-doc-dot-size);height:var(--ng-doc-dot-size);border-radius:var(--ng-doc-dot-size);line-height:var(--ng-doc-line-height);background-color:var(--ng-doc-dot-background);transition:var(--ng-doc-transition)}:host[data-ng-doc-size=small]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) / 2)}:host[data-ng-doc-size=medium]{--ng-doc-dot-size: var(--ng-doc-base-gutter)}:host[data-ng-doc-size=large]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) * 2)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
18
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDotComponent, decorators: [{
|
|
9
20
|
type: Component,
|
|
10
|
-
args: [{ selector: 'ng-doc-dot', template: ``, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
args: ['attr.data-ng-doc-color']
|
|
16
|
-
}], size: [{
|
|
17
|
-
type: Input
|
|
18
|
-
}, {
|
|
19
|
-
type: HostBinding,
|
|
20
|
-
args: ['attr.data-ng-doc-size']
|
|
21
|
-
}] } });
|
|
21
|
+
args: [{ selector: 'ng-doc-dot', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
22
|
+
'[attr.data-ng-doc-color]': 'color()',
|
|
23
|
+
'[attr.data-ng-doc-size]': 'size()',
|
|
24
|
+
}, styles: [":host{display:inline;width:var(--ng-doc-dot-size);height:var(--ng-doc-dot-size);border-radius:var(--ng-doc-dot-size);line-height:var(--ng-doc-line-height);background-color:var(--ng-doc-dot-background);transition:var(--ng-doc-transition)}:host[data-ng-doc-size=small]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) / 2)}:host[data-ng-doc-size=medium]{--ng-doc-dot-size: var(--ng-doc-base-gutter)}:host[data-ng-doc-size=large]{--ng-doc-dot-size: calc(var(--ng-doc-base-gutter) * 2)}\n"] }]
|
|
25
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
22
26
|
|
|
23
27
|
/**
|
|
24
28
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-ui-kit-components-dot.mjs","sources":["../../../../libs/ui-kit/components/dot/dot.component.ts","../../../../libs/ui-kit/components/dot/ng-doc-ui-kit-components-dot.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component,
|
|
1
|
+
{"version":3,"file":"ng-doc-ui-kit-components-dot.mjs","sources":["../../../../libs/ui-kit/components/dot/dot.component.ts","../../../../libs/ui-kit/components/dot/ng-doc-ui-kit-components-dot.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { NgDocColor, NgDocSize } from '@ng-doc/ui-kit/types';\n\n/**\n * A small coloured dot, for example to mark a state next to a label.\n */\n@Component({\n selector: 'ng-doc-dot',\n template: ``,\n styleUrls: ['./dot.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-ng-doc-color]': 'color()',\n '[attr.data-ng-doc-size]': 'size()',\n },\n})\nexport class NgDocDotComponent {\n /** Colour of the dot. */\n readonly color = input<NgDocColor>();\n\n /** Size of the dot: 4px (`small`), 8px (`medium`) or 16px (`large`). */\n readonly size = input<NgDocSize>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA;;AAEG;MAWU,iBAAiB,CAAA;AAV9B,IAAA,WAAA,GAAA;;AAYW,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAc;;AAG3B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAa;AACnC,IAAA;8GANY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,iaARlB,CAAA,CAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ueAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,YACZ,CAAA,CAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,0BAA0B,EAAE,SAAS;AACrC,wBAAA,yBAAyB,EAAE,QAAQ;AACpC,qBAAA,EAAA,MAAA,EAAA,CAAA,ueAAA,CAAA,EAAA;;;ACdH;;AAEG;;;;"}
|
|
@@ -1,67 +1,96 @@
|
|
|
1
1
|
import { FlexibleConnectedPositionStrategy, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ChangeDetectorRef, ViewContainerRef,
|
|
3
|
+
import { inject, ChangeDetectorRef, ViewContainerRef, DestroyRef, input, output, signal, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
5
|
import { asArray } from '@ng-doc/core/helpers/as-array';
|
|
5
6
|
import { dropdownOpenAnimation } from '@ng-doc/ui-kit/animations';
|
|
6
7
|
import { NgDocOverlayHost } from '@ng-doc/ui-kit/classes/overlay-host';
|
|
7
8
|
import { NgDocOverlayContainerComponent } from '@ng-doc/ui-kit/components/overlay-container';
|
|
8
9
|
import { toElement, mergeOverlayConfigs } from '@ng-doc/ui-kit/helpers';
|
|
9
|
-
import { ngDocZoneDetach } from '@ng-doc/ui-kit/observables';
|
|
10
10
|
import { NgDocOverlayService } from '@ng-doc/ui-kit/services/overlay';
|
|
11
11
|
import { NgDocOverlayUtils } from '@ng-doc/ui-kit/utils';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Renders its content in an overlay connected to an origin: the `origin` input, or the
|
|
15
|
+
* surrounding `ngDocDropdownOrigin`.
|
|
16
|
+
*/
|
|
13
17
|
class NgDocDropdownComponent {
|
|
14
18
|
constructor() {
|
|
15
19
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
16
20
|
this.overlayService = inject(NgDocOverlayService);
|
|
17
21
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
18
|
-
this.ngZone = inject(NgZone);
|
|
19
22
|
this.overlayHost = inject(NgDocOverlayHost, { optional: true });
|
|
20
|
-
this.
|
|
21
|
-
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.
|
|
29
|
-
|
|
23
|
+
this.destroyRef = inject(DestroyRef);
|
|
24
|
+
/** What the dropdown renders: a string, a template or a component. */
|
|
25
|
+
this.content = input('', /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
27
|
+
/**
|
|
28
|
+
* The origin to connect to. When it changes to `null`, the dropdown stays connected to the
|
|
29
|
+
* previous origin.
|
|
30
|
+
*/
|
|
31
|
+
this.origin = input(null, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "origin" }] : /* istanbul ignore next */ []));
|
|
33
|
+
this.closeIfOutsideClick = input(true, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "closeIfOutsideClick" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.closeIfInnerClick = input(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "closeIfInnerClick" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.withArrow = input(false, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "withArrow" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.borderOffset = input(-8, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "borderOffset" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.panelClass = input([], /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
|
|
43
|
+
this.contactBorder = input(true, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "contactBorder" }] : /* istanbul ignore next */ []));
|
|
45
|
+
this.hasBackdrop = input(false, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "hasBackdrop" }] : /* istanbul ignore next */ []));
|
|
47
|
+
this.positions = input([
|
|
30
48
|
'bottom-center',
|
|
31
49
|
'top-center',
|
|
32
50
|
'right-center',
|
|
33
51
|
'left-center',
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
-
this.
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
this.
|
|
52
|
+
], /* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
|
|
54
|
+
this.minHeight = input('', /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
|
|
56
|
+
this.maxHeight = input('', /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
58
|
+
this.height = input('', /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
60
|
+
this.minWidth = input('', /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
|
|
62
|
+
this.maxWidth = input('', /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
|
|
64
|
+
this.width = input('', /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
66
|
+
/** Emits when the dropdown starts opening. */
|
|
67
|
+
this.beforeOpen = output();
|
|
68
|
+
/** Emits when the open animation has finished. */
|
|
69
|
+
this.afterOpen = output();
|
|
70
|
+
/** Emits when the dropdown starts closing. */
|
|
71
|
+
this.beforeClose = output();
|
|
72
|
+
/** Emits when the dropdown has closed. */
|
|
73
|
+
this.afterClose = output();
|
|
45
74
|
this.overlay = null;
|
|
75
|
+
// The last origin bound to the input that was not null. It is recorded in ngOnChanges, so that
|
|
76
|
+
// every change is seen, including changes while the dropdown is closed.
|
|
77
|
+
this.lastOrigin = signal(null, /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "lastOrigin" }] : /* istanbul ignore next */ []));
|
|
79
|
+
// The defaults the other inputs are compared with; declared after `lastOrigin`, which it reads.
|
|
46
80
|
this.overlayProperties = this.getOverlayProperties();
|
|
47
81
|
}
|
|
48
82
|
ngOnChanges({ origin }) {
|
|
49
|
-
if (origin
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.overlay.overlayRef.updatePositionStrategy(positionStrategy.setOrigin(this.currentOrigin));
|
|
57
|
-
}
|
|
83
|
+
if (origin?.currentValue) {
|
|
84
|
+
this.lastOrigin.set(origin.currentValue);
|
|
85
|
+
}
|
|
86
|
+
if (origin && origin.currentValue !== origin.previousValue && this.overlay) {
|
|
87
|
+
const positionStrategy = this.overlay.overlayRef.getConfig().positionStrategy;
|
|
88
|
+
if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {
|
|
89
|
+
this.overlay.overlayRef.updatePositionStrategy(positionStrategy.setOrigin(this.currentOrigin));
|
|
58
90
|
}
|
|
59
91
|
}
|
|
60
92
|
this.updateOverlayPosition();
|
|
61
93
|
}
|
|
62
|
-
get tabIndex() {
|
|
63
|
-
return this.isOpened ? 0 : -1;
|
|
64
|
-
}
|
|
65
94
|
focus() {
|
|
66
95
|
this.overlay?.focus();
|
|
67
96
|
}
|
|
@@ -69,25 +98,33 @@ class NgDocDropdownComponent {
|
|
|
69
98
|
return !!this.overlay?.isFocused;
|
|
70
99
|
}
|
|
71
100
|
open() {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
101
|
+
// Opening reads the inputs; `untracked` keeps an effect that calls open() from depending on
|
|
102
|
+
// them.
|
|
103
|
+
untracked(() => {
|
|
104
|
+
if (!this.overlay?.hasAttached) {
|
|
105
|
+
const config = this.getConfig();
|
|
106
|
+
const overlay = this.overlayService.open(this.content(), config);
|
|
107
|
+
this.overlay = overlay;
|
|
108
|
+
this.beforeOpen.emit();
|
|
109
|
+
// The animations can finish after the dropdown is destroyed; its outputs must not emit then.
|
|
110
|
+
overlay
|
|
111
|
+
.afterOpen()
|
|
112
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
113
|
+
.subscribe(() => this.afterOpen.emit());
|
|
114
|
+
overlay
|
|
115
|
+
.beforeClose()
|
|
116
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
117
|
+
.subscribe(() => {
|
|
118
|
+
this.beforeClose.emit();
|
|
119
|
+
this.close();
|
|
120
|
+
});
|
|
121
|
+
overlay
|
|
122
|
+
.afterClose()
|
|
123
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
124
|
+
.subscribe(() => this.afterClose.emit());
|
|
125
|
+
this.changeDetectorRef.markForCheck();
|
|
126
|
+
}
|
|
127
|
+
});
|
|
91
128
|
}
|
|
92
129
|
close() {
|
|
93
130
|
if (this.isOpened) {
|
|
@@ -108,16 +145,17 @@ class NgDocDropdownComponent {
|
|
|
108
145
|
}
|
|
109
146
|
}
|
|
110
147
|
get currentOrigin() {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
148
|
+
const origin = this.lastOrigin();
|
|
149
|
+
return origin instanceof CdkOverlayOrigin
|
|
150
|
+
? origin.elementRef.nativeElement
|
|
151
|
+
: origin || this.overlayHost?.origin || null;
|
|
114
152
|
}
|
|
115
153
|
getPositions(positions, border) {
|
|
116
154
|
const origin = toElement(this.currentOrigin);
|
|
117
155
|
if (origin instanceof HTMLElement) {
|
|
118
156
|
return NgDocOverlayUtils.getConnectedPosition(!!positions && asArray(positions).length
|
|
119
157
|
? positions
|
|
120
|
-
: ['bottom-center', 'top-center', 'right-center', 'left-center'], origin, border * -1, this.withArrow);
|
|
158
|
+
: ['bottom-center', 'top-center', 'right-center', 'left-center'], origin, border * -1, this.withArrow());
|
|
121
159
|
}
|
|
122
160
|
else {
|
|
123
161
|
return !!positions && asArray(positions).length
|
|
@@ -136,11 +174,11 @@ class NgDocDropdownComponent {
|
|
|
136
174
|
scrollStrategy: this.overlayService.scrollStrategy().reposition(),
|
|
137
175
|
viewContainerRef: this.viewContainerRef,
|
|
138
176
|
openAnimation: dropdownOpenAnimation,
|
|
139
|
-
hasBackdrop: this.hasBackdrop,
|
|
177
|
+
hasBackdrop: this.hasBackdrop(),
|
|
140
178
|
...overlayProperties,
|
|
141
179
|
panelClass: [
|
|
142
180
|
'ng-doc-dropdown',
|
|
143
|
-
...asArray(this.panelClass),
|
|
181
|
+
...asArray(this.panelClass()),
|
|
144
182
|
...asArray(this.overlayHost?.panelClass),
|
|
145
183
|
],
|
|
146
184
|
};
|
|
@@ -148,19 +186,19 @@ class NgDocDropdownComponent {
|
|
|
148
186
|
getOverlayProperties() {
|
|
149
187
|
return {
|
|
150
188
|
origin: this.currentOrigin || undefined,
|
|
151
|
-
positions: this.positions,
|
|
152
|
-
closeIfOutsideClick: this.closeIfOutsideClick,
|
|
153
|
-
closeIfInnerClick: this.closeIfInnerClick,
|
|
154
|
-
withPointer: this.withArrow,
|
|
155
|
-
contactBorder: this.contactBorder,
|
|
156
|
-
borderOffset: this.borderOffset,
|
|
157
|
-
panelClass: this.panelClass,
|
|
158
|
-
width: this.width,
|
|
159
|
-
height: this.height,
|
|
160
|
-
minWidth: this.minWidth,
|
|
161
|
-
minHeight: this.minHeight,
|
|
162
|
-
maxWidth: this.maxWidth,
|
|
163
|
-
maxHeight: this.maxHeight,
|
|
189
|
+
positions: this.positions(),
|
|
190
|
+
closeIfOutsideClick: this.closeIfOutsideClick(),
|
|
191
|
+
closeIfInnerClick: this.closeIfInnerClick(),
|
|
192
|
+
withPointer: this.withArrow(),
|
|
193
|
+
contactBorder: this.contactBorder(),
|
|
194
|
+
borderOffset: this.borderOffset(),
|
|
195
|
+
panelClass: this.panelClass(),
|
|
196
|
+
width: this.width(),
|
|
197
|
+
height: this.height(),
|
|
198
|
+
minWidth: this.minWidth(),
|
|
199
|
+
minHeight: this.minHeight(),
|
|
200
|
+
maxWidth: this.maxWidth(),
|
|
201
|
+
maxHeight: this.maxHeight(),
|
|
164
202
|
disposeOnNavigation: true,
|
|
165
203
|
disposeOnRouteNavigation: true,
|
|
166
204
|
};
|
|
@@ -170,59 +208,16 @@ class NgDocDropdownComponent {
|
|
|
170
208
|
this.overlay.overlayRef.dispose();
|
|
171
209
|
}
|
|
172
210
|
}
|
|
173
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
174
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
211
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
212
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocDropdownComponent, isStandalone: true, selector: "ng-doc-dropdown", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, origin: { classPropertyName: "origin", publicName: "origin", isSignal: true, isRequired: false, transformFunction: null }, closeIfOutsideClick: { classPropertyName: "closeIfOutsideClick", publicName: "closeIfOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, closeIfInnerClick: { classPropertyName: "closeIfInnerClick", publicName: "closeIfInnerClick", isSignal: true, isRequired: false, transformFunction: null }, withArrow: { classPropertyName: "withArrow", publicName: "withArrow", isSignal: true, isRequired: false, transformFunction: null }, borderOffset: { classPropertyName: "borderOffset", publicName: "borderOffset", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, contactBorder: { classPropertyName: "contactBorder", publicName: "contactBorder", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { beforeOpen: "beforeOpen", afterOpen: "afterOpen", beforeClose: "beforeClose", afterClose: "afterClose" }, host: { listeners: { "focus": "focus()" }, properties: { "attr.tabIndex": "isOpened ? 0 : -1" } }, providers: [NgDocOverlayService], usesOnChanges: true, ngImport: i0, template: ``, isInline: true, styles: ["::ng-deep .ng-doc-dropdown{--ng-doc-overlay-background: var(--ng-doc-background);--ng-doc-overlay-border: var(--ng-doc-base-2);--ng-doc-overlay-border-radius: var(--ng-doc-base-gutter);--ng-doc-overlay-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
175
213
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDropdownComponent, decorators: [{
|
|
177
215
|
type: Component,
|
|
178
|
-
args: [{ selector: 'ng-doc-dropdown', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NgDocOverlayService],
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}], closeIfOutsideClick: [{
|
|
184
|
-
type: Input
|
|
185
|
-
}], closeIfInnerClick: [{
|
|
186
|
-
type: Input
|
|
187
|
-
}], withArrow: [{
|
|
188
|
-
type: Input
|
|
189
|
-
}], borderOffset: [{
|
|
190
|
-
type: Input
|
|
191
|
-
}], panelClass: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}], contactBorder: [{
|
|
194
|
-
type: Input
|
|
195
|
-
}], hasBackdrop: [{
|
|
196
|
-
type: Input
|
|
197
|
-
}], positions: [{
|
|
198
|
-
type: Input
|
|
199
|
-
}], minHeight: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}], maxHeight: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}], height: [{
|
|
204
|
-
type: Input
|
|
205
|
-
}], minWidth: [{
|
|
206
|
-
type: Input
|
|
207
|
-
}], maxWidth: [{
|
|
208
|
-
type: Input
|
|
209
|
-
}], width: [{
|
|
210
|
-
type: Input
|
|
211
|
-
}], beforeOpen: [{
|
|
212
|
-
type: Output
|
|
213
|
-
}], afterOpen: [{
|
|
214
|
-
type: Output
|
|
215
|
-
}], beforeClose: [{
|
|
216
|
-
type: Output
|
|
217
|
-
}], afterClose: [{
|
|
218
|
-
type: Output
|
|
219
|
-
}], tabIndex: [{
|
|
220
|
-
type: HostBinding,
|
|
221
|
-
args: ['attr.tabIndex']
|
|
222
|
-
}], focus: [{
|
|
223
|
-
type: HostListener,
|
|
224
|
-
args: ['focus']
|
|
225
|
-
}] } });
|
|
216
|
+
args: [{ selector: 'ng-doc-dropdown', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, providers: [NgDocOverlayService], host: {
|
|
217
|
+
'[attr.tabIndex]': 'isOpened ? 0 : -1',
|
|
218
|
+
'(focus)': 'focus()',
|
|
219
|
+
}, styles: ["::ng-deep .ng-doc-dropdown{--ng-doc-overlay-background: var(--ng-doc-background);--ng-doc-overlay-border: var(--ng-doc-base-2);--ng-doc-overlay-border-radius: var(--ng-doc-base-gutter);--ng-doc-overlay-shadow: 0px 12px 16px -4px rgba(16, 24, 40, .08), 0px 4px 6px -2px rgba(16, 24, 40, .03)}\n"] }]
|
|
220
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], origin: [{ type: i0.Input, args: [{ isSignal: true, alias: "origin", required: false }] }], closeIfOutsideClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIfOutsideClick", required: false }] }], closeIfInnerClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeIfInnerClick", required: false }] }], withArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "withArrow", required: false }] }], borderOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderOffset", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], contactBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "contactBorder", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], positions: [{ type: i0.Input, args: [{ isSignal: true, alias: "positions", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], beforeOpen: [{ type: i0.Output, args: ["beforeOpen"] }], afterOpen: [{ type: i0.Output, args: ["afterOpen"] }], beforeClose: [{ type: i0.Output, args: ["beforeClose"] }], afterClose: [{ type: i0.Output, args: ["afterClose"] }] } });
|
|
226
221
|
|
|
227
222
|
/**
|
|
228
223
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-ui-kit-components-dropdown.mjs","sources":["../../../../libs/ui-kit/components/dropdown/dropdown.component.ts","../../../../libs/ui-kit/components/dropdown/ng-doc-ui-kit-components-dropdown.ts"],"sourcesContent":["import { Point } from '@angular/cdk/drag-drop';\nimport {\n CdkOverlayOrigin,\n FlexibleConnectedPositionStrategy,\n PositionStrategy,\n} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { dropdownOpenAnimation } from '@ng-doc/ui-kit/animations';\nimport { NgDocOverlayHost } from '@ng-doc/ui-kit/classes/overlay-host';\nimport { NgDocOverlayRef } from '@ng-doc/ui-kit/classes/overlay-ref';\nimport { NgDocOverlayContainerComponent } from '@ng-doc/ui-kit/components/overlay-container';\nimport { mergeOverlayConfigs, toElement } from '@ng-doc/ui-kit/helpers';\nimport { NgDocOverlayConfig, NgDocOverlayProperties } from '@ng-doc/ui-kit/interfaces';\nimport { ngDocZoneDetach } from '@ng-doc/ui-kit/observables';\nimport { NgDocOverlayService } from '@ng-doc/ui-kit/services/overlay';\nimport { NgDocContent, NgDocOverlayOrigin, NgDocOverlayPosition } from '@ng-doc/ui-kit/types';\nimport { NgDocOverlayUtils } from '@ng-doc/ui-kit/utils';\n\n@Component({\n selector: 'ng-doc-dropdown',\n template: ``,\n styleUrls: ['./dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [NgDocOverlayService],\n standalone: true,\n})\nexport class NgDocDropdownComponent implements OnChanges, OnDestroy {\n protected changeDetectorRef = inject(ChangeDetectorRef);\n protected overlayService = inject(NgDocOverlayService);\n protected viewContainerRef = inject(ViewContainerRef);\n protected ngZone = inject(NgZone);\n protected overlayHost = inject<NgDocOverlayHost>(NgDocOverlayHost, { optional: true });\n\n @Input()\n content: NgDocContent = '';\n\n @Input()\n origin: CdkOverlayOrigin | Point | null = null;\n\n @Input()\n closeIfOutsideClick: boolean = true;\n\n @Input()\n closeIfInnerClick: boolean = false;\n\n @Input()\n withArrow: boolean = false;\n\n @Input()\n borderOffset: number = -8;\n\n @Input()\n panelClass: string | string[] = [];\n\n @Input()\n contactBorder: boolean = true;\n\n @Input()\n hasBackdrop: boolean = false;\n\n @Input()\n positions: NgDocOverlayPosition | NgDocOverlayPosition[] = [\n 'bottom-center',\n 'top-center',\n 'right-center',\n 'left-center',\n ];\n\n @Input()\n minHeight: number | string = '';\n\n @Input()\n maxHeight: number | string = '';\n\n @Input()\n height: number | string = '';\n\n @Input()\n minWidth: number | string = '';\n\n @Input()\n maxWidth: number | string = '';\n\n @Input()\n width: number | string = '';\n\n @Output()\n beforeOpen: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n afterOpen: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n beforeClose: EventEmitter<void> = new EventEmitter<void>();\n\n @Output()\n afterClose: EventEmitter<void> = new EventEmitter<void>();\n\n overlay: NgDocOverlayRef | null = null;\n overlayProperties: NgDocOverlayProperties = this.getOverlayProperties();\n\n constructor() {}\n\n ngOnChanges({ origin }: SimpleChanges): void {\n if (origin && origin.currentValue !== origin.previousValue) {\n if (!origin.currentValue) {\n this.origin = origin.previousValue as CdkOverlayOrigin | Point | null;\n }\n\n if (this.overlay) {\n const positionStrategy: PositionStrategy | undefined =\n this.overlay.overlayRef.getConfig().positionStrategy;\n if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {\n this.overlay.overlayRef.updatePositionStrategy(\n positionStrategy.setOrigin(this.currentOrigin),\n );\n }\n }\n }\n this.updateOverlayPosition();\n }\n\n @HostBinding('attr.tabIndex')\n get tabIndex(): number {\n return this.isOpened ? 0 : -1;\n }\n\n @HostListener('focus')\n focus(): void {\n this.overlay?.focus();\n }\n\n get isFocused(): boolean {\n return !!this.overlay?.isFocused;\n }\n\n open(): void {\n if (!this.overlay?.hasAttached) {\n const config: NgDocOverlayConfig = this.getConfig();\n this.overlay = this.overlayService.open(this.content, config);\n this.beforeOpen.emit();\n this.overlay\n ?.afterOpen()\n .pipe(ngDocZoneDetach(this.ngZone))\n .subscribe(() => this.afterOpen.emit());\n\n this.overlay\n ?.beforeClose()\n .pipe(ngDocZoneDetach(this.ngZone))\n .subscribe(() => this.beforeClose.emit());\n\n this.overlay\n ?.afterClose()\n .pipe(ngDocZoneDetach(this.ngZone))\n .subscribe(() => this.afterClose.emit());\n\n this.overlay.beforeClose().subscribe(() => this.close());\n\n this.changeDetectorRef.markForCheck();\n }\n }\n\n close(): void {\n if (this.isOpened) {\n this.overlay?.close();\n this.changeDetectorRef.markForCheck();\n }\n }\n\n toggle(): void {\n this.isOpened ? this.close() : this.open();\n }\n\n get isOpened(): boolean {\n return this.overlay?.isOpened === true;\n }\n\n updateOverlayPosition(): void {\n if (this.overlay && this.overlay.hasAttached) {\n this.overlay.overlayRef.updateSize(this.getConfig());\n this.overlay.overlayRef.updatePosition();\n }\n }\n\n private get currentOrigin(): NgDocOverlayOrigin | null {\n return this.origin instanceof CdkOverlayOrigin\n ? (this.origin.elementRef.nativeElement as HTMLElement)\n : this.origin || this.overlayHost?.origin || null;\n }\n\n private getPositions(\n positions: NgDocOverlayPosition | NgDocOverlayPosition[],\n border: number,\n ): NgDocOverlayPosition[] {\n const origin: NgDocOverlayOrigin = toElement(this.currentOrigin) as HTMLElement;\n if (origin instanceof HTMLElement) {\n return NgDocOverlayUtils.getConnectedPosition(\n !!positions && asArray(positions).length\n ? positions\n : ['bottom-center', 'top-center', 'right-center', 'left-center'],\n origin,\n border * -1,\n this.withArrow,\n );\n } else {\n return !!positions && asArray(positions).length\n ? asArray(positions)\n : ['bottom-center', 'top-center', 'right-center', 'left-center'];\n }\n }\n\n private getConfig(): NgDocOverlayConfig {\n const overlayProperties: NgDocOverlayProperties = mergeOverlayConfigs(\n this.overlayProperties,\n this.getOverlayProperties(),\n this.overlayHost ?? undefined,\n );\n if (!this.currentOrigin) {\n throw new Error('Origin for the dropdown was not provided.');\n }\n return {\n overlayContainer: NgDocOverlayContainerComponent,\n positionStrategy: this.overlayService.connectedPositionStrategy(\n this.currentOrigin,\n this.getPositions(overlayProperties.positions || [], overlayProperties.borderOffset || 0),\n ),\n scrollStrategy: this.overlayService.scrollStrategy().reposition(),\n viewContainerRef: this.viewContainerRef,\n openAnimation: dropdownOpenAnimation,\n hasBackdrop: this.hasBackdrop,\n ...overlayProperties,\n panelClass: [\n 'ng-doc-dropdown',\n ...asArray(this.panelClass),\n ...asArray(this.overlayHost?.panelClass),\n ],\n };\n }\n\n private getOverlayProperties(): NgDocOverlayProperties {\n return {\n origin: this.currentOrigin || undefined,\n positions: this.positions,\n closeIfOutsideClick: this.closeIfOutsideClick,\n closeIfInnerClick: this.closeIfInnerClick,\n withPointer: this.withArrow,\n contactBorder: this.contactBorder,\n borderOffset: this.borderOffset,\n panelClass: this.panelClass,\n width: this.width,\n height: this.height,\n minWidth: this.minWidth,\n minHeight: this.minHeight,\n maxWidth: this.maxWidth,\n maxHeight: this.maxHeight,\n disposeOnNavigation: true,\n disposeOnRouteNavigation: true,\n };\n }\n\n ngOnDestroy(): void {\n if (this.overlay) {\n this.overlay.overlayRef.dispose();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MA0Ca,sBAAsB,CAAA;AA2EjC,IAAA,WAAA,GAAA;AA1EU,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC3C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QACvB,IAAA,CAAA,WAAW,GAAG,MAAM,CAAmB,gBAAgB,EAAE,EA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BAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAQA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBAGA;;sBA2BA,WAAW;uBAAC,eAAe;;sBAK3B,YAAY;uBAAC,OAAO;;;AC/IvB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-ui-kit-components-dropdown.mjs","sources":["../../../../libs/ui-kit/components/dropdown/dropdown.component.ts","../../../../libs/ui-kit/components/dropdown/ng-doc-ui-kit-components-dropdown.ts"],"sourcesContent":["import { Point } from '@angular/cdk/drag-drop';\nimport {\n CdkOverlayOrigin,\n FlexibleConnectedPositionStrategy,\n PositionStrategy,\n} from '@angular/cdk/overlay';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n output,\n signal,\n SimpleChanges,\n untracked,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { dropdownOpenAnimation } from '@ng-doc/ui-kit/animations';\nimport { NgDocOverlayHost } from '@ng-doc/ui-kit/classes/overlay-host';\nimport { NgDocOverlayRef } from '@ng-doc/ui-kit/classes/overlay-ref';\nimport { NgDocOverlayContainerComponent } from '@ng-doc/ui-kit/components/overlay-container';\nimport { mergeOverlayConfigs, toElement } from '@ng-doc/ui-kit/helpers';\nimport { NgDocOverlayConfig, NgDocOverlayProperties } from '@ng-doc/ui-kit/interfaces';\nimport { NgDocOverlayService } from '@ng-doc/ui-kit/services/overlay';\nimport { NgDocContent, NgDocOverlayOrigin, NgDocOverlayPosition } from '@ng-doc/ui-kit/types';\nimport { NgDocOverlayUtils } from '@ng-doc/ui-kit/utils';\n\n/**\n * Renders its content in an overlay connected to an origin: the `origin` input, or the\n * surrounding `ngDocDropdownOrigin`.\n */\n@Component({\n selector: 'ng-doc-dropdown',\n template: ``,\n styleUrls: ['./dropdown.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [NgDocOverlayService],\n host: {\n '[attr.tabIndex]': 'isOpened ? 0 : -1',\n '(focus)': 'focus()',\n },\n})\nexport class NgDocDropdownComponent implements OnChanges, OnDestroy {\n protected changeDetectorRef = inject(ChangeDetectorRef);\n protected overlayService = inject(NgDocOverlayService);\n protected viewContainerRef = inject(ViewContainerRef);\n protected overlayHost = inject<NgDocOverlayHost>(NgDocOverlayHost, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n\n /** What the dropdown renders: a string, a template or a component. */\n readonly content = input<NgDocContent>('');\n\n /**\n * The origin to connect to. When it changes to `null`, the dropdown stays connected to the\n * previous origin.\n */\n readonly origin = input<CdkOverlayOrigin | Point | null>(null);\n\n readonly closeIfOutsideClick = input<boolean>(true);\n\n readonly closeIfInnerClick = input<boolean>(false);\n\n readonly withArrow = input<boolean>(false);\n\n readonly borderOffset = input<number>(-8);\n\n readonly panelClass = input<string | string[]>([]);\n\n readonly contactBorder = input<boolean>(true);\n\n readonly hasBackdrop = input<boolean>(false);\n\n readonly positions = input<NgDocOverlayPosition | NgDocOverlayPosition[]>([\n 'bottom-center',\n 'top-center',\n 'right-center',\n 'left-center',\n ]);\n\n readonly minHeight = input<number | string>('');\n\n readonly maxHeight = input<number | string>('');\n\n readonly height = input<number | string>('');\n\n readonly minWidth = input<number | string>('');\n\n readonly maxWidth = input<number | string>('');\n\n readonly width = input<number | string>('');\n\n /** Emits when the dropdown starts opening. */\n readonly beforeOpen = output<void>();\n\n /** Emits when the open animation has finished. */\n readonly afterOpen = output<void>();\n\n /** Emits when the dropdown starts closing. */\n readonly beforeClose = output<void>();\n\n /** Emits when the dropdown has closed. */\n readonly afterClose = output<void>();\n\n overlay: NgDocOverlayRef | null = null;\n\n // The last origin bound to the input that was not null. It is recorded in ngOnChanges, so that\n // every change is seen, including changes while the dropdown is closed.\n private readonly lastOrigin = signal<CdkOverlayOrigin | Point | null>(null);\n\n // The defaults the other inputs are compared with; declared after `lastOrigin`, which it reads.\n overlayProperties: NgDocOverlayProperties = this.getOverlayProperties();\n\n ngOnChanges({ origin }: SimpleChanges): void {\n if (origin?.currentValue) {\n this.lastOrigin.set(origin.currentValue);\n }\n\n if (origin && origin.currentValue !== origin.previousValue && this.overlay) {\n const positionStrategy: PositionStrategy | undefined =\n this.overlay.overlayRef.getConfig().positionStrategy;\n if (positionStrategy instanceof FlexibleConnectedPositionStrategy && this.currentOrigin) {\n this.overlay.overlayRef.updatePositionStrategy(\n positionStrategy.setOrigin(this.currentOrigin),\n );\n }\n }\n this.updateOverlayPosition();\n }\n\n focus(): void {\n this.overlay?.focus();\n }\n\n get isFocused(): boolean {\n return !!this.overlay?.isFocused;\n }\n\n open(): void {\n // Opening reads the inputs; `untracked` keeps an effect that calls open() from depending on\n // them.\n untracked(() => {\n if (!this.overlay?.hasAttached) {\n const config: NgDocOverlayConfig = this.getConfig();\n const overlay: NgDocOverlayRef = this.overlayService.open(this.content(), config);\n\n this.overlay = overlay;\n this.beforeOpen.emit();\n // The animations can finish after the dropdown is destroyed; its outputs must not emit then.\n overlay\n .afterOpen()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.afterOpen.emit());\n overlay\n .beforeClose()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.beforeClose.emit();\n this.close();\n });\n overlay\n .afterClose()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.afterClose.emit());\n\n this.changeDetectorRef.markForCheck();\n }\n });\n }\n\n close(): void {\n if (this.isOpened) {\n this.overlay?.close();\n this.changeDetectorRef.markForCheck();\n }\n }\n\n toggle(): void {\n this.isOpened ? this.close() : this.open();\n }\n\n get isOpened(): boolean {\n return this.overlay?.isOpened === true;\n }\n\n updateOverlayPosition(): void {\n if (this.overlay && this.overlay.hasAttached) {\n this.overlay.overlayRef.updateSize(this.getConfig());\n this.overlay.overlayRef.updatePosition();\n }\n }\n\n private get currentOrigin(): NgDocOverlayOrigin | null {\n const origin: CdkOverlayOrigin | Point | null = this.lastOrigin();\n\n return origin instanceof CdkOverlayOrigin\n ? (origin.elementRef.nativeElement as HTMLElement)\n : origin || this.overlayHost?.origin || null;\n }\n\n private getPositions(\n positions: NgDocOverlayPosition | NgDocOverlayPosition[],\n border: number,\n ): NgDocOverlayPosition[] {\n const origin: NgDocOverlayOrigin = toElement(this.currentOrigin) as HTMLElement;\n if (origin instanceof HTMLElement) {\n return NgDocOverlayUtils.getConnectedPosition(\n !!positions && asArray(positions).length\n ? positions\n : ['bottom-center', 'top-center', 'right-center', 'left-center'],\n origin,\n border * -1,\n this.withArrow(),\n );\n } else {\n return !!positions && asArray(positions).length\n ? asArray(positions)\n : ['bottom-center', 'top-center', 'right-center', 'left-center'];\n }\n }\n\n private getConfig(): NgDocOverlayConfig {\n const overlayProperties: NgDocOverlayProperties = mergeOverlayConfigs(\n this.overlayProperties,\n this.getOverlayProperties(),\n this.overlayHost ?? undefined,\n );\n if (!this.currentOrigin) {\n throw new Error('Origin for the dropdown was not provided.');\n }\n return {\n overlayContainer: NgDocOverlayContainerComponent,\n positionStrategy: this.overlayService.connectedPositionStrategy(\n this.currentOrigin,\n this.getPositions(overlayProperties.positions || [], overlayProperties.borderOffset || 0),\n ),\n scrollStrategy: this.overlayService.scrollStrategy().reposition(),\n viewContainerRef: this.viewContainerRef,\n openAnimation: dropdownOpenAnimation,\n hasBackdrop: this.hasBackdrop(),\n ...overlayProperties,\n panelClass: [\n 'ng-doc-dropdown',\n ...asArray(this.panelClass()),\n ...asArray(this.overlayHost?.panelClass),\n ],\n };\n }\n\n private getOverlayProperties(): NgDocOverlayProperties {\n return {\n origin: this.currentOrigin || undefined,\n positions: this.positions(),\n closeIfOutsideClick: this.closeIfOutsideClick(),\n closeIfInnerClick: this.closeIfInnerClick(),\n withPointer: this.withArrow(),\n contactBorder: this.contactBorder(),\n borderOffset: this.borderOffset(),\n panelClass: this.panelClass(),\n width: this.width(),\n height: this.height(),\n minWidth: this.minWidth(),\n minHeight: this.minHeight(),\n maxWidth: this.maxWidth(),\n maxHeight: this.maxHeight(),\n disposeOnNavigation: true,\n disposeOnRouteNavigation: true,\n };\n }\n\n ngOnDestroy(): void {\n if (this.overlay) {\n this.overlay.overlayRef.dispose();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAiCA;;;AAGG;MAYU,sBAAsB,CAAA;AAXnC,IAAA,WAAA,GAAA;AAYY,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAC5C,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAC3C,IAAA,CAAA,WAAW,GAAG,MAAM,CAAmB,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrE,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAe,EAAE;oFAAC;AAE1C;;;AAGG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAkC,IAAI;mFAAC;QAErD,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAU,IAAI;gGAAC;QAE1C,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAU,KAAK;8FAAC;QAEzC,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,KAAK;sFAAC;AAEjC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,CAAC,CAAC;yFAAC;QAEhC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAoB,EAAE;uFAAC;QAEzC,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,IAAI;0FAAC;QAEpC,IAAA,CA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AAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,SAAA,EANtB,CAAC,mBAAmB,CAAC,+CAHtB,CAAA,CAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uSAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FASD,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;+BACE,iBAAiB,EAAA,QAAA,EACjB,CAAA,CAAE,EAAA,eAAA,EAEK,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,mBAAmB,CAAC,EAAA,IAAA,EAC1B;AACJ,wBAAA,iBAAiB,EAAE,mBAAmB;AACtC,wBAAA,SAAS,EAAE,SAAS;AACrB,qBAAA,EAAA,MAAA,EAAA,CAAA,uSAAA,CAAA,EAAA;;;AC9CH;;AAEG;;;;"}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { model, input, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
4
4
|
|
|
5
5
|
/** Component helps to expand or collapse content */
|
|
6
6
|
class NgDocExpanderComponent {
|
|
7
7
|
constructor() {
|
|
8
|
-
/**
|
|
9
|
-
this.expanded = false
|
|
10
|
-
|
|
8
|
+
/** Whether the content is shown. */
|
|
9
|
+
this.expanded = model(false, /* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
11
|
+
/** Expander content */
|
|
12
|
+
this.content = input.required(/* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
14
|
+
/** `remove` removes the collapsed content from the DOM; `hide` keeps it, inert and hidden. */
|
|
15
|
+
this.collapseMod = input('remove', /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "collapseMod" }] : /* istanbul ignore next */ []));
|
|
11
17
|
}
|
|
18
|
+
/** Shows or hides the content. */
|
|
12
19
|
toggle() {
|
|
13
|
-
this.expanded
|
|
20
|
+
untracked(() => this.expanded.update((expanded) => !expanded));
|
|
14
21
|
}
|
|
15
22
|
enter(container, event) {
|
|
16
23
|
container
|
|
@@ -34,20 +41,13 @@ class NgDocExpanderComponent {
|
|
|
34
41
|
})
|
|
35
42
|
.finished.then(() => event.animationComplete());
|
|
36
43
|
}
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocExpanderComponent, isStandalone: true, selector: "ng-doc-expander", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, collapseMod: { classPropertyName: "collapseMod", publicName: "collapseMod", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "@if (collapseMod() === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded() ? null : ''\"\n [class.expanded]=\"expanded()\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded()) {\n <div\n [attr.inert]=\"expanded() ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
39
46
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocExpanderComponent, decorators: [{
|
|
41
48
|
type: Component,
|
|
42
|
-
args: [{ selector: 'ng-doc-expander', changeDetection: ChangeDetectionStrategy.OnPush, imports: [PolymorpheusOutlet], template: "@if (collapseMod === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded ? null : ''\"\n [class.expanded]=\"expanded\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded) {\n <div\n [attr.inert]=\"expanded ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"] }]
|
|
43
|
-
}], propDecorators: { expanded: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], content: [{
|
|
46
|
-
type: Input,
|
|
47
|
-
args: [{ required: true }]
|
|
48
|
-
}], collapseMod: [{
|
|
49
|
-
type: Input
|
|
50
|
-
}] } });
|
|
49
|
+
args: [{ selector: 'ng-doc-expander', changeDetection: ChangeDetectionStrategy.OnPush, imports: [PolymorpheusOutlet], template: "@if (collapseMod() === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded() ? null : ''\"\n [class.expanded]=\"expanded()\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded()) {\n <div\n [attr.inert]=\"expanded() ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n", styles: [":host{display:block}:host>div{overflow:hidden}:host .ng-doc-expander-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--ng-doc-transition)}:host .ng-doc-expander-container.expanded{grid-template-rows:1fr}:host .ng-doc-expander-container.expanded .ng-doc-expander-content{visibility:visible}:host .ng-doc-expander-container .ng-doc-expander-content{min-height:0;transition:visibility var(--ng-doc-transition);visibility:hidden;overflow:hidden}\n"] }]
|
|
50
|
+
}], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], collapseMod: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseMod", required: false }] }] } });
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-ui-kit-components-expander.mjs","sources":["../../../../libs/ui-kit/components/expander/expander.component.ts","../../../../libs/ui-kit/components/expander/expander.component.html","../../../../libs/ui-kit/components/expander/ng-doc-ui-kit-components-expander.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ng-doc-ui-kit-components-expander.mjs","sources":["../../../../libs/ui-kit/components/expander/expander.component.ts","../../../../libs/ui-kit/components/expander/expander.component.html","../../../../libs/ui-kit/components/expander/ng-doc-ui-kit-components-expander.ts"],"sourcesContent":["import {\n AnimationCallbackEvent,\n ChangeDetectionStrategy,\n Component,\n input,\n model,\n untracked,\n} from '@angular/core';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\nimport { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';\n\n/** Component helps to expand or collapse content */\n@Component({\n selector: 'ng-doc-expander',\n templateUrl: './expander.component.html',\n styleUrls: ['./expander.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PolymorpheusOutlet],\n})\nexport class NgDocExpanderComponent {\n /** Whether the content is shown. */\n readonly expanded = model<boolean>(false);\n\n /** Expander content */\n readonly content = input.required<NgDocContent>();\n\n /** `remove` removes the collapsed content from the DOM; `hide` keeps it, inert and hidden. */\n readonly collapseMod = input<'remove' | 'hide'>('remove');\n\n /** Shows or hides the content. */\n toggle(): void {\n untracked(() => this.expanded.update((expanded: boolean) => !expanded));\n }\n\n protected enter(container: HTMLElement, event: AnimationCallbackEvent): void {\n container\n .animate(\n [\n { opacity: '0', height: '0px' },\n { opacity: '1', height: container.scrollHeight + 'px' },\n ],\n {\n duration: 225,\n easing: 'cubic-bezier(0.4,0.0,0.2,1)',\n },\n )\n .finished.then(() => event.animationComplete());\n }\n\n protected leave(container: HTMLElement, event: AnimationCallbackEvent): void {\n container\n .animate(\n [\n { opacity: '1', height: container.scrollHeight + 'px' },\n { opacity: '0', height: '0px' },\n ],\n {\n duration: 225,\n easing: 'cubic-bezier(0.4,0.0,0.2,1)',\n },\n )\n .finished.then(() => event.animationComplete());\n }\n}\n","@if (collapseMod() === 'hide') {\n <div\n class=\"ng-doc-expander-container\"\n [attr.inert]=\"expanded() ? null : ''\"\n [class.expanded]=\"expanded()\">\n <div class=\"ng-doc-expander-content\">\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n} @else {\n @if (expanded()) {\n <div\n [attr.inert]=\"expanded() ? null : ''\"\n (animate.enter)=\"enter(container, $event)\"\n (animate.leave)=\"leave(container, $event)\"\n #container>\n <div>\n <ng-container *polymorpheusOutlet=\"content() as text\">{{ text }}</ng-container>\n </div>\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWA;MAQa,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;;QASW,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;;QAGhC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ;oFAAgB;;QAGxC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAoB,QAAQ;wFAAC;AAoC1D,IAAA;;IAjCC,MAAM,GAAA;AACJ,QAAA,SAAS,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAiB,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzE;IAEU,KAAK,CAAC,SAAsB,EAAE,KAA6B,EAAA;QACnE;AACG,aAAA,OAAO,CACN;AACE,YAAA,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,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,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBnC,mqBAsBA,EAAA,MAAA,EAAA,CAAA,6eAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDLY,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEjB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,mBAGV,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,kBAAkB,CAAC,EAAA,QAAA,EAAA,mqBAAA,EAAA,MAAA,EAAA,CAAA,6eAAA,CAAA,EAAA;;;AEjB/B;;AAEG;;;;"}
|
|
@@ -2,12 +2,12 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class NgDocFloatedBorderComponent {
|
|
5
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFloatedBorderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: NgDocFloatedBorderComponent, isStandalone: true, selector: "ng-doc-floated-border", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, styles: [":host{position:relative;display:block}:host:after{position:absolute;content:\"\";top:0;left:0;z-index:3;width:100%;height:100%;pointer-events:none;border:var(--ng-doc-floated-border);border-color:var(--ng-doc-floated-border-color);border-radius:var(--ng-doc-floated-border-radius);box-shadow:0 1px 2px #1018280d,0 0 0 4px var(--ng-doc-floated-border-shadow-color);transition:var(--ng-doc-transition)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFloatedBorderComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
|
-
args: [{ selector: 'ng-doc-floated-border', template: ` <ng-content></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
args: [{ selector: 'ng-doc-floated-border', template: ` <ng-content></ng-content> `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{position:relative;display:block}:host:after{position:absolute;content:\"\";top:0;left:0;z-index:3;width:100%;height:100%;pointer-events:none;border:var(--ng-doc-floated-border);border-color:var(--ng-doc-floated-border-color);border-radius:var(--ng-doc-floated-border-radius);box-shadow:0 1px 2px #1018280d,0 0 0 4px var(--ng-doc-floated-border-shadow-color);transition:var(--ng-doc-transition)}\n"] }]
|
|
11
11
|
}] });
|
|
12
12
|
|
|
13
13
|
/**
|