@cuby-ui/cdk 0.0.150 → 0.0.151
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 +24 -24
- package/constants/index.d.ts +1 -1
- package/constants/svg-node-filter.d.ts +1 -1
- package/directives/auto-resizing.directive.d.ts +18 -18
- package/directives/click-outside.directive.d.ts +9 -9
- package/directives/content-editable-value-accessor.directive.d.ts +17 -17
- package/directives/dimensions-observer.directive.d.ts +13 -13
- package/directives/element.directive.d.ts +8 -8
- package/directives/focus-trap.directive.d.ts +14 -14
- package/directives/index.d.ts +10 -10
- package/directives/item.directive.d.ts +5 -5
- package/directives/let.context.d.ts +7 -7
- package/directives/let.directive.d.ts +9 -9
- package/directives/target.directive.d.ts +14 -14
- package/esm2020/constants/index.mjs +1 -1
- package/esm2020/constants/svg-node-filter.mjs +8 -8
- package/esm2020/cuby-ui-cdk.mjs +4 -4
- package/esm2020/directives/auto-resizing.directive.mjs +67 -67
- package/esm2020/directives/click-outside.directive.mjs +29 -29
- package/esm2020/directives/content-editable-value-accessor.directive.mjs +44 -44
- package/esm2020/directives/dimensions-observer.directive.mjs +32 -32
- package/esm2020/directives/element.directive.mjs +19 -19
- package/esm2020/directives/focus-trap.directive.mjs +50 -50
- package/esm2020/directives/index.mjs +11 -11
- package/esm2020/directives/item.directive.mjs +14 -14
- package/esm2020/directives/let.context.mjs +12 -12
- package/esm2020/directives/let.directive.mjs +23 -23
- package/esm2020/directives/target.directive.mjs +35 -35
- package/esm2020/index.mjs +8 -8
- package/esm2020/interfaces/dimensions.mjs +2 -2
- package/esm2020/interfaces/index.mjs +4 -4
- package/esm2020/interfaces/on-change.mjs +2 -2
- package/esm2020/interfaces/on-touched.mjs +2 -2
- package/esm2020/pipes/filter.pipe.mjs +17 -17
- package/esm2020/pipes/index.mjs +2 -2
- package/esm2020/services/destroy.service.mjs +15 -15
- package/esm2020/services/id.service.mjs +18 -18
- package/esm2020/services/index.mjs +4 -4
- package/esm2020/services/popover.service.mjs +38 -38
- package/esm2020/tokens/history.mjs +5 -5
- package/esm2020/tokens/index.mjs +5 -5
- package/esm2020/tokens/local-storage.mjs +5 -5
- package/esm2020/tokens/session-storage.mjs +5 -5
- package/esm2020/tokens/window.mjs +11 -11
- package/esm2020/types/date-time.mjs +2 -0
- package/esm2020/types/index.mjs +7 -6
- package/esm2020/types/input-type.mjs +2 -2
- package/esm2020/types/mapper.mjs +2 -2
- package/esm2020/types/matcher.mjs +2 -2
- package/esm2020/types/nullable.mjs +2 -2
- package/esm2020/types/value-of.mjs +1 -1
- package/esm2020/utils/dom/contains-or-after.mjs +10 -10
- package/esm2020/utils/dom/index.mjs +3 -3
- package/esm2020/utils/dom/is-html-element.mjs +4 -4
- package/esm2020/utils/focus/blur-native-focused.mjs +9 -9
- package/esm2020/utils/focus/get-closest-focusable.mjs +22 -22
- package/esm2020/utils/focus/get-native-focused.mjs +11 -11
- package/esm2020/utils/focus/index.mjs +6 -6
- package/esm2020/utils/focus/is-native-keyboard-focusable.mjs +27 -27
- package/esm2020/utils/focus/is-native-mouse-focusable.mjs +7 -7
- package/esm2020/utils/index.mjs +4 -4
- package/esm2020/utils/token/create-token.mjs +8 -8
- package/esm2020/utils/token/index.mjs +3 -3
- package/esm2020/utils/token/provide.mjs +4 -4
- package/fesm2015/cuby-ui-cdk.mjs +430 -430
- package/fesm2015/cuby-ui-cdk.mjs.map +1 -1
- package/fesm2020/cuby-ui-cdk.mjs +437 -437
- package/fesm2020/cuby-ui-cdk.mjs.map +1 -1
- package/index.d.ts +7 -7
- package/interfaces/dimensions.d.ts +4 -4
- package/interfaces/index.d.ts +3 -3
- package/interfaces/on-change.d.ts +3 -3
- package/interfaces/on-touched.d.ts +3 -3
- package/package.json +1 -1
- package/pipes/filter.pipe.d.ts +8 -8
- package/pipes/index.d.ts +1 -1
- package/services/destroy.service.d.ts +8 -8
- package/services/id.service.d.ts +7 -7
- package/services/index.d.ts +3 -3
- package/services/popover.service.d.ts +22 -22
- package/tokens/history.d.ts +1 -1
- package/tokens/index.d.ts +4 -4
- package/tokens/local-storage.d.ts +1 -1
- package/tokens/session-storage.d.ts +1 -1
- package/tokens/window.d.ts +1 -1
- package/types/date-time.d.ts +1 -0
- package/types/index.d.ts +6 -5
- package/types/input-type.d.ts +1 -1
- package/types/mapper.d.ts +1 -1
- package/types/matcher.d.ts +2 -2
- package/types/nullable.d.ts +1 -1
- package/types/value-of.d.ts +1 -1
- package/utils/dom/contains-or-after.d.ts +1 -1
- package/utils/dom/index.d.ts +2 -2
- package/utils/dom/is-html-element.d.ts +1 -1
- package/utils/focus/blur-native-focused.d.ts +1 -1
- package/utils/focus/get-closest-focusable.d.ts +7 -7
- package/utils/focus/get-native-focused.d.ts +1 -1
- package/utils/focus/index.d.ts +5 -5
- package/utils/focus/is-native-keyboard-focusable.d.ts +1 -1
- package/utils/focus/is-native-mouse-focusable.d.ts +1 -1
- package/utils/index.d.ts +3 -3
- package/utils/token/create-token.d.ts +3 -3
- package/utils/token/index.d.ts +2 -2
- package/utils/token/provide.d.ts +3 -3
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# Cdk
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project cdk` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project cdk`.
|
|
8
|
-
> Note: Don't forget to add `--project cdk` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build cdk` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build cdk`, go to the dist folder `cd dist/cdk` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test cdk` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# Cdk
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project cdk` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project cdk`.
|
|
8
|
+
> Note: Don't forget to add `--project cdk` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build cdk` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build cdk`, go to the dist folder `cd dist/cdk` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test cdk` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
package/constants/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './svg-node-filter';
|
|
1
|
+
export * from './svg-node-filter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const svgNodeFilter: Exclude<NodeFilter, (node: Node) => number>;
|
|
1
|
+
export declare const svgNodeFilter: Exclude<NodeFilter, (node: Node) => number>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CuiAutoResizingDirective implements OnInit, AfterViewInit {
|
|
4
|
-
private readonly window;
|
|
5
|
-
private readonly element;
|
|
6
|
-
private readonly ngControl;
|
|
7
|
-
private readonly ngModel;
|
|
8
|
-
private readonly destroy$;
|
|
9
|
-
private readonly elementStyles;
|
|
10
|
-
ngOnInit(): void;
|
|
11
|
-
ngAfterViewInit(): void;
|
|
12
|
-
protected onInput(): void;
|
|
13
|
-
private initNgControlValueChangeSubscription;
|
|
14
|
-
private initNgModelValueChangeSubscription;
|
|
15
|
-
private resize;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiAutoResizingDirective, never>;
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiAutoResizingDirective, "textarea[cuiAutoResizing]", never, {}, {}, never, never, true, never>;
|
|
18
|
-
}
|
|
1
|
+
import type { AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CuiAutoResizingDirective implements OnInit, AfterViewInit {
|
|
4
|
+
private readonly window;
|
|
5
|
+
private readonly element;
|
|
6
|
+
private readonly ngControl;
|
|
7
|
+
private readonly ngModel;
|
|
8
|
+
private readonly destroy$;
|
|
9
|
+
private readonly elementStyles;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngAfterViewInit(): void;
|
|
12
|
+
protected onInput(): void;
|
|
13
|
+
private initNgControlValueChangeSubscription;
|
|
14
|
+
private initNgModelValueChangeSubscription;
|
|
15
|
+
private resize;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiAutoResizingDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiAutoResizingDirective, "textarea[cuiAutoResizing]", never, {}, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CuiClickOutsideDirective {
|
|
4
|
-
private readonly element;
|
|
5
|
-
cuiClickOutside: EventEmitter<HTMLElement>;
|
|
6
|
-
protected onClickOutside(target: HTMLElement): void;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiClickOutsideDirective, never>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiClickOutsideDirective, "(cuiClickOutside)", never, {}, { "cuiClickOutside": "cuiClickOutside"; }, never, never, true, never>;
|
|
9
|
-
}
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CuiClickOutsideDirective {
|
|
4
|
+
private readonly element;
|
|
5
|
+
cuiClickOutside: EventEmitter<HTMLElement>;
|
|
6
|
+
protected onClickOutside(target: HTMLElement): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiClickOutsideDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiClickOutsideDirective, "(cuiClickOutside)", never, {}, { "cuiClickOutside": "cuiClickOutside"; }, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { ControlValueAccessor } from '@angular/forms';
|
|
2
|
-
import type { CuiNullable } from '../types';
|
|
3
|
-
import type { CuiOnChange, CuiOnTouched } from '../interfaces';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CuiContentEditableValueAccessorDirective implements ControlValueAccessor {
|
|
6
|
-
private readonly element;
|
|
7
|
-
protected onChange: CuiOnChange<string>;
|
|
8
|
-
protected onTouched: CuiOnTouched;
|
|
9
|
-
writeValue(value: CuiNullable<string>): void;
|
|
10
|
-
registerOnChange(fn: CuiOnChange<string>): void;
|
|
11
|
-
registerOnTouched(fn: CuiOnTouched): void;
|
|
12
|
-
setDisabledState(isDisabled: boolean): void;
|
|
13
|
-
protected onInput(): void;
|
|
14
|
-
protected onBlur(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiContentEditableValueAccessorDirective, never>;
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiContentEditableValueAccessorDirective, "[contenteditable][formControlName], [contenteditable][formControl], [contenteditable][ngModel]", never, {}, {}, never, never, true, never>;
|
|
17
|
-
}
|
|
1
|
+
import type { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import type { CuiNullable } from '../types';
|
|
3
|
+
import type { CuiOnChange, CuiOnTouched } from '../interfaces';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CuiContentEditableValueAccessorDirective implements ControlValueAccessor {
|
|
6
|
+
private readonly element;
|
|
7
|
+
protected onChange: CuiOnChange<string>;
|
|
8
|
+
protected onTouched: CuiOnTouched;
|
|
9
|
+
writeValue(value: CuiNullable<string>): void;
|
|
10
|
+
registerOnChange(fn: CuiOnChange<string>): void;
|
|
11
|
+
registerOnTouched(fn: CuiOnTouched): void;
|
|
12
|
+
setDisabledState(isDisabled: boolean): void;
|
|
13
|
+
protected onInput(): void;
|
|
14
|
+
protected onBlur(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiContentEditableValueAccessorDirective, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiContentEditableValueAccessorDirective, "[contenteditable][formControlName], [contenteditable][formControl], [contenteditable][ngModel]", never, {}, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { EventEmitter } from '@angular/core';
|
|
3
|
-
import type { CuiDimensions } from '../interfaces';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CuiDimensionsObserverDirective implements OnInit, OnDestroy {
|
|
6
|
-
private readonly element;
|
|
7
|
-
private readonly observer;
|
|
8
|
-
cuiResizeObserver: EventEmitter<CuiDimensions>;
|
|
9
|
-
ngOnInit(): void;
|
|
10
|
-
ngOnDestroy(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiDimensionsObserverDirective, never>;
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiDimensionsObserverDirective, "[cuiResizeObserver]", never, {}, { "cuiResizeObserver": "cuiResizeObserver"; }, never, never, true, never>;
|
|
13
|
-
}
|
|
1
|
+
import type { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import type { CuiDimensions } from '../interfaces';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CuiDimensionsObserverDirective implements OnInit, OnDestroy {
|
|
6
|
+
private readonly element;
|
|
7
|
+
private readonly observer;
|
|
8
|
+
cuiResizeObserver: EventEmitter<CuiDimensions>;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
ngOnDestroy(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiDimensionsObserverDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiDimensionsObserverDirective, "[cuiResizeObserver]", never, {}, { "cuiResizeObserver": "cuiResizeObserver"; }, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CuiElementDirective<T extends Element = HTMLElement> implements ElementRef<T> {
|
|
4
|
-
nativeElement: any;
|
|
5
|
-
constructor();
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiElementDirective<any>, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiElementDirective<any>, "[cuiElement]", ["elementRef"], {}, {}, never, never, true, never>;
|
|
8
|
-
}
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CuiElementDirective<T extends Element = HTMLElement> implements ElementRef<T> {
|
|
4
|
+
nativeElement: any;
|
|
5
|
+
constructor();
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiElementDirective<any>, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiElementDirective<any>, "[cuiElement]", ["elementRef"], {}, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { OnDestroy } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CuiFocusTrapDirective implements OnDestroy {
|
|
4
|
-
private readonly document;
|
|
5
|
-
private readonly element;
|
|
6
|
-
private readonly activeElement;
|
|
7
|
-
constructor();
|
|
8
|
-
ngOnDestroy(): void;
|
|
9
|
-
protected readonly tabIndex = 0;
|
|
10
|
-
protected onFocusIn(node: Node): void;
|
|
11
|
-
private initElementFocus;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiFocusTrapDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiFocusTrapDirective, "[cuiFocusTrap]", never, {}, {}, never, never, true, never>;
|
|
14
|
-
}
|
|
1
|
+
import type { OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CuiFocusTrapDirective implements OnDestroy {
|
|
4
|
+
private readonly document;
|
|
5
|
+
private readonly element;
|
|
6
|
+
private readonly activeElement;
|
|
7
|
+
constructor();
|
|
8
|
+
ngOnDestroy(): void;
|
|
9
|
+
protected readonly tabIndex = 0;
|
|
10
|
+
protected onFocusIn(node: Node): void;
|
|
11
|
+
private initElementFocus;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiFocusTrapDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiFocusTrapDirective, "[cuiFocusTrap]", never, {}, {}, never, never, true, never>;
|
|
14
|
+
}
|
package/directives/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './auto-resizing.directive';
|
|
2
|
-
export * from './click-outside.directive';
|
|
3
|
-
export * from './dimensions-observer.directive';
|
|
4
|
-
export * from './content-editable-value-accessor.directive';
|
|
5
|
-
export * from './element.directive';
|
|
6
|
-
export * from './focus-trap.directive';
|
|
7
|
-
export * from './item.directive';
|
|
8
|
-
export * from './let.context';
|
|
9
|
-
export * from './let.directive';
|
|
10
|
-
export * from './target.directive';
|
|
1
|
+
export * from './auto-resizing.directive';
|
|
2
|
+
export * from './click-outside.directive';
|
|
3
|
+
export * from './dimensions-observer.directive';
|
|
4
|
+
export * from './content-editable-value-accessor.directive';
|
|
5
|
+
export * from './element.directive';
|
|
6
|
+
export * from './focus-trap.directive';
|
|
7
|
+
export * from './item.directive';
|
|
8
|
+
export * from './let.context';
|
|
9
|
+
export * from './let.directive';
|
|
10
|
+
export * from './target.directive';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class CuiItemDirective {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiItemDirective, never>;
|
|
4
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiItemDirective, "[cuiItem]", never, {}, {}, never, never, true, never>;
|
|
5
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CuiItemDirective {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiItemDirective, never>;
|
|
4
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiItemDirective, "[cuiItem]", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CuiLetDirective } from './let.directive';
|
|
2
|
-
export declare class CuiLetContext<T> {
|
|
3
|
-
private readonly internalDirectiveInstance;
|
|
4
|
-
constructor(internalDirectiveInstance: CuiLetDirective<T>);
|
|
5
|
-
get $implicit(): T;
|
|
6
|
-
get cuiLet(): T;
|
|
7
|
-
}
|
|
1
|
+
import type { CuiLetDirective } from './let.directive';
|
|
2
|
+
export declare class CuiLetContext<T> {
|
|
3
|
+
private readonly internalDirectiveInstance;
|
|
4
|
+
constructor(internalDirectiveInstance: CuiLetDirective<T>);
|
|
5
|
+
get $implicit(): T;
|
|
6
|
+
get cuiLet(): T;
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CuiLetContext } from './let.context';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CuiLetDirective<T> {
|
|
4
|
-
cuiLet: T;
|
|
5
|
-
constructor();
|
|
6
|
-
static ngTemplateContextGuard<T>(_dir: CuiLetDirective<T>, _ctx: unknown): _ctx is CuiLetContext<T>;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiLetDirective<any>, never>;
|
|
8
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiLetDirective<any>, "[cuiLet]", never, { "cuiLet": "cuiLet"; }, {}, never, never, true, never>;
|
|
9
|
-
}
|
|
1
|
+
import { CuiLetContext } from './let.context';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CuiLetDirective<T> {
|
|
4
|
+
cuiLet: T;
|
|
5
|
+
constructor();
|
|
6
|
+
static ngTemplateContextGuard<T>(_dir: CuiLetDirective<T>, _ctx: unknown): _ctx is CuiLetContext<T>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiLetDirective<any>, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiLetDirective<any>, "[cuiLet]", never, { "cuiLet": "cuiLet"; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { EventEmitter } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CuiTargetDirective implements OnInit, OnDestroy {
|
|
5
|
-
private readonly clickListener;
|
|
6
|
-
ccTarget: HTMLElement;
|
|
7
|
-
clicked: EventEmitter<MouseEvent>;
|
|
8
|
-
ngOnInit(): void;
|
|
9
|
-
ngOnDestroy(): void;
|
|
10
|
-
private initClickListener;
|
|
11
|
-
private destroyClickListener;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTargetDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTargetDirective, "[ccTarget]", never, { "ccTarget": "ccTarget"; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
14
|
-
}
|
|
1
|
+
import type { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CuiTargetDirective implements OnInit, OnDestroy {
|
|
5
|
+
private readonly clickListener;
|
|
6
|
+
ccTarget: HTMLElement;
|
|
7
|
+
clicked: EventEmitter<MouseEvent>;
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
ngOnDestroy(): void;
|
|
10
|
+
private initClickListener;
|
|
11
|
+
private destroyClickListener;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CuiTargetDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CuiTargetDirective, "[ccTarget]", never, { "ccTarget": "ccTarget"; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './svg-node-filter';
|
|
1
|
+
export * from './svg-node-filter';
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jZGsvY29uc3RhbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsbUJBQW1CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3N2Zy1ub2RlLWZpbHRlcic7Il19
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const svgNodeFilter = {
|
|
2
|
-
acceptNode(node) {
|
|
3
|
-
return 'ownerSVGElement' in node
|
|
4
|
-
? NodeFilter.FILTER_REJECT
|
|
5
|
-
: NodeFilter.FILTER_ACCEPT;
|
|
6
|
-
},
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ZnLW5vZGUtZmlsdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2RrL2NvbnN0YW50cy9zdmctbm9kZS1maWx0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFnRDtJQUN4RSxVQUFVLENBQUMsSUFBVTtRQUNuQixPQUFPLGlCQUFpQixJQUFJLElBQUk7WUFDOUIsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxhQUFhO1lBQzFCLENBQUMsQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDO0lBQy9CLENBQUM7Q0FDRixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IHN2Z05vZGVGaWx0ZXI6IEV4Y2x1ZGU8Tm9kZUZpbHRlciwgKG5vZGU6IE5vZGUpID0+
|
|
1
|
+
export const svgNodeFilter = {
|
|
2
|
+
acceptNode(node) {
|
|
3
|
+
return 'ownerSVGElement' in node
|
|
4
|
+
? NodeFilter.FILTER_REJECT
|
|
5
|
+
: NodeFilter.FILTER_ACCEPT;
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ZnLW5vZGUtZmlsdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2RrL2NvbnN0YW50cy9zdmctbm9kZS1maWx0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFnRDtJQUN4RSxVQUFVLENBQUMsSUFBVTtRQUNuQixPQUFPLGlCQUFpQixJQUFJLElBQUk7WUFDOUIsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxhQUFhO1lBQzFCLENBQUMsQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDO0lBQy9CLENBQUM7Q0FDRixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNvbnN0IHN2Z05vZGVGaWx0ZXI6IEV4Y2x1ZGU8Tm9kZUZpbHRlciwgKG5vZGU6IE5vZGUpID0+IG51bWJlcj4gPSB7XG4gIGFjY2VwdE5vZGUobm9kZTogTm9kZSk6IG51bWJlciB7XG4gICAgcmV0dXJuICdvd25lclNWR0VsZW1lbnQnIGluIG5vZGVcbiAgICAgID8gTm9kZUZpbHRlci5GSUxURVJfUkVKRUNUXG4gICAgICA6IE5vZGVGaWx0ZXIuRklMVEVSX0FDQ0VQVDtcbiAgfSxcbn07Il19
|
package/esm2020/cuby-ui-cdk.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VieS11aS1jZGsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9jZGsvY3VieS11aS1jZGsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { Directive, ElementRef, HostListener, inject } from '@angular/core';
|
|
2
|
-
import { NgControl, NgModel } from '@angular/forms';
|
|
3
|
-
import { takeUntil } from 'rxjs';
|
|
4
|
-
import { CUI_WINDOW } from '../tokens';
|
|
5
|
-
import { CuiDestroyService } from '../services';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export class CuiAutoResizingDirective {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.window = inject(CUI_WINDOW);
|
|
10
|
-
this.element = inject(ElementRef).nativeElement;
|
|
11
|
-
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
12
|
-
this.ngModel = inject(NgModel, { self: true, optional: true });
|
|
13
|
-
this.destroy$ = inject(CuiDestroyService, { self: true });
|
|
14
|
-
this.elementStyles = this.element.style;
|
|
15
|
-
}
|
|
16
|
-
ngOnInit() {
|
|
17
|
-
this.initNgControlValueChangeSubscription();
|
|
18
|
-
this.initNgModelValueChangeSubscription();
|
|
19
|
-
}
|
|
20
|
-
ngAfterViewInit() {
|
|
21
|
-
this.resize();
|
|
22
|
-
}
|
|
23
|
-
onInput() {
|
|
24
|
-
this.resize();
|
|
25
|
-
}
|
|
26
|
-
initNgControlValueChangeSubscription() {
|
|
27
|
-
if (!this.ngControl) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
this.ngControl.valueChanges
|
|
31
|
-
.pipe(takeUntil(this.destroy$))
|
|
32
|
-
.subscribe(this.resize.bind(this));
|
|
33
|
-
}
|
|
34
|
-
initNgModelValueChangeSubscription() {
|
|
35
|
-
if (!this.ngModel) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
this.ngModel.valueChanges
|
|
39
|
-
.pipe(takeUntil(this.destroy$))
|
|
40
|
-
.subscribe(this.resize.bind(this));
|
|
41
|
-
}
|
|
42
|
-
resize() {
|
|
43
|
-
const computedMaxHeight = this.window.getComputedStyle(this.element).maxHeight;
|
|
44
|
-
this.elementStyles.height = 'auto';
|
|
45
|
-
this.elementStyles.height = this.element.scrollHeight + 'px';
|
|
46
|
-
if (parseFloat(this.element.style.height) < parseFloat(computedMaxHeight)) {
|
|
47
|
-
this.elementStyles.overflow = 'hidden';
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
this.elementStyles.overflowY = 'scroll';
|
|
51
|
-
this.elementStyles.height = computedMaxHeight;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
CuiAutoResizingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAutoResizingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
55
|
-
CuiAutoResizingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiAutoResizingDirective, isStandalone: true, selector: "textarea[cuiAutoResizing]", host: { listeners: { "input": "onInput()" } }, providers: [CuiDestroyService], ngImport: i0 });
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAutoResizingDirective, decorators: [{
|
|
57
|
-
type: Directive,
|
|
58
|
-
args: [{
|
|
59
|
-
standalone: true,
|
|
60
|
-
selector: 'textarea[cuiAutoResizing]',
|
|
61
|
-
providers: [CuiDestroyService]
|
|
62
|
-
}]
|
|
63
|
-
}], propDecorators: { onInput: [{
|
|
64
|
-
type: HostListener,
|
|
65
|
-
args: ['input']
|
|
66
|
-
}] } });
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Directive, ElementRef, HostListener, inject } from '@angular/core';
|
|
2
|
+
import { NgControl, NgModel } from '@angular/forms';
|
|
3
|
+
import { takeUntil } from 'rxjs';
|
|
4
|
+
import { CUI_WINDOW } from '../tokens';
|
|
5
|
+
import { CuiDestroyService } from '../services';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class CuiAutoResizingDirective {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.window = inject(CUI_WINDOW);
|
|
10
|
+
this.element = inject(ElementRef).nativeElement;
|
|
11
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
12
|
+
this.ngModel = inject(NgModel, { self: true, optional: true });
|
|
13
|
+
this.destroy$ = inject(CuiDestroyService, { self: true });
|
|
14
|
+
this.elementStyles = this.element.style;
|
|
15
|
+
}
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
this.initNgControlValueChangeSubscription();
|
|
18
|
+
this.initNgModelValueChangeSubscription();
|
|
19
|
+
}
|
|
20
|
+
ngAfterViewInit() {
|
|
21
|
+
this.resize();
|
|
22
|
+
}
|
|
23
|
+
onInput() {
|
|
24
|
+
this.resize();
|
|
25
|
+
}
|
|
26
|
+
initNgControlValueChangeSubscription() {
|
|
27
|
+
if (!this.ngControl) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this.ngControl.valueChanges
|
|
31
|
+
.pipe(takeUntil(this.destroy$))
|
|
32
|
+
.subscribe(this.resize.bind(this));
|
|
33
|
+
}
|
|
34
|
+
initNgModelValueChangeSubscription() {
|
|
35
|
+
if (!this.ngModel) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.ngModel.valueChanges
|
|
39
|
+
.pipe(takeUntil(this.destroy$))
|
|
40
|
+
.subscribe(this.resize.bind(this));
|
|
41
|
+
}
|
|
42
|
+
resize() {
|
|
43
|
+
const computedMaxHeight = this.window.getComputedStyle(this.element).maxHeight;
|
|
44
|
+
this.elementStyles.height = 'auto';
|
|
45
|
+
this.elementStyles.height = this.element.scrollHeight + 'px';
|
|
46
|
+
if (parseFloat(this.element.style.height) < parseFloat(computedMaxHeight)) {
|
|
47
|
+
this.elementStyles.overflow = 'hidden';
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.elementStyles.overflowY = 'scroll';
|
|
51
|
+
this.elementStyles.height = computedMaxHeight;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
CuiAutoResizingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAutoResizingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
55
|
+
CuiAutoResizingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiAutoResizingDirective, isStandalone: true, selector: "textarea[cuiAutoResizing]", host: { listeners: { "input": "onInput()" } }, providers: [CuiDestroyService], ngImport: i0 });
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiAutoResizingDirective, decorators: [{
|
|
57
|
+
type: Directive,
|
|
58
|
+
args: [{
|
|
59
|
+
standalone: true,
|
|
60
|
+
selector: 'textarea[cuiAutoResizing]',
|
|
61
|
+
providers: [CuiDestroyService]
|
|
62
|
+
}]
|
|
63
|
+
}], propDecorators: { onInput: [{
|
|
64
|
+
type: HostListener,
|
|
65
|
+
args: ['input']
|
|
66
|
+
}] } });
|
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0by1yZXNpemluZy5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jZGsvZGlyZWN0aXZlcy9hdXRvLXJlc2l6aW5nLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQ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mxvYXQodGhpcy5lbGVtZW50LnN0eWxlLmhlaWdodCkgPCBwYXJzZUZsb2F0KGNvbXB1dGVkTWF4SGVpZ2h0KSkge1xuICAgICAgdGhpcy5lbGVtZW50U3R5bGVzLm92ZXJmbG93ID0gJ2hpZGRlbic7XG5cbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICB0aGlzLmVsZW1lbnRTdHlsZXMub3ZlcmZsb3dZID0gJ3Njcm9sbCc7XG4gICAgdGhpcy5lbGVtZW50U3R5bGVzLmhlaWdodCA9IGNvbXB1dGVkTWF4SGVpZ2h0O1xuICB9XG59XG4iXX0=
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Directive, ElementRef, EventEmitter, HostListener, inject, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class CuiClickOutsideDirective {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.element = inject(ElementRef).nativeElement;
|
|
6
|
-
this.cuiClickOutside = new EventEmitter();
|
|
7
|
-
}
|
|
8
|
-
onClickOutside(target) {
|
|
9
|
-
if (this.element.contains(target)) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
this.cuiClickOutside.emit(target);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
CuiClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
16
|
-
CuiClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiClickOutsideDirective, isStandalone: true, selector: "(cuiClickOutside)", outputs: { cuiClickOutside: "cuiClickOutside" }, host: { listeners: { "document:click": "onClickOutside($event.target)" } }, ngImport: i0 });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiClickOutsideDirective, decorators: [{
|
|
18
|
-
type: Directive,
|
|
19
|
-
args: [{
|
|
20
|
-
standalone: true,
|
|
21
|
-
selector: '(cuiClickOutside)'
|
|
22
|
-
}]
|
|
23
|
-
}], propDecorators: { cuiClickOutside: [{
|
|
24
|
-
type: Output
|
|
25
|
-
}], onClickOutside: [{
|
|
26
|
-
type: HostListener,
|
|
27
|
-
args: ['document:click', ['$event.target']]
|
|
28
|
-
}] } });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Directive, ElementRef, EventEmitter, HostListener, inject, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class CuiClickOutsideDirective {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.element = inject(ElementRef).nativeElement;
|
|
6
|
+
this.cuiClickOutside = new EventEmitter();
|
|
7
|
+
}
|
|
8
|
+
onClickOutside(target) {
|
|
9
|
+
if (this.element.contains(target)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
this.cuiClickOutside.emit(target);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
CuiClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
16
|
+
CuiClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CuiClickOutsideDirective, isStandalone: true, selector: "(cuiClickOutside)", outputs: { cuiClickOutside: "cuiClickOutside" }, host: { listeners: { "document:click": "onClickOutside($event.target)" } }, ngImport: i0 });
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiClickOutsideDirective, decorators: [{
|
|
18
|
+
type: Directive,
|
|
19
|
+
args: [{
|
|
20
|
+
standalone: true,
|
|
21
|
+
selector: '(cuiClickOutside)'
|
|
22
|
+
}]
|
|
23
|
+
}], propDecorators: { cuiClickOutside: [{
|
|
24
|
+
type: Output
|
|
25
|
+
}], onClickOutside: [{
|
|
26
|
+
type: HostListener,
|
|
27
|
+
args: ['document:click', ['$event.target']]
|
|
28
|
+
}] } });
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpY2stb3V0c2lkZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jZGsvZGlyZWN0aXZlcy9jbGljay1vdXRzaWRlLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxZQUFZLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTWxHLE1BQU0sT0FBTyx3QkFBd0I7SUFKckM7UUFLbUIsWUFBTyxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUMsQ0FBQyxhQUFhLENBQUM7UUFHckQsb0JBQWUsR0FBRyxJQUFJLFlBQVksRUFBZSxDQUFDO0tBVTFEO0lBUFcsY0FBYyxDQUFDLE1BQW1CO1FBQzFDLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLEVBQUU7WUFDakMsT0FBTztTQUNSO1FBRUQsSUFBSSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDcEMsQ0FBQzs7c0hBYlUsd0JBQXdCOzBHQUF4Qix3QkFBd0I7NEZBQXhCLHdCQUF3QjtrQkFKcEMsU0FBUzttQkFBQztvQkFDVCxVQUFVLEVBQUUsSUFBSTtvQkFDaEIsUUFBUSxFQUFFLG1CQUFtQjtpQkFDOUI7OEJBS1EsZUFBZTtzQkFEckIsTUFBTTtnQkF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