ngx-sfc-common 0.0.1
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 +460 -0
- package/esm2020/lib/components/button/button-type.enum.mjs +9 -0
- package/esm2020/lib/components/button/button.component.mjs +38 -0
- package/esm2020/lib/components/checkmark/checkmark.component.mjs +27 -0
- package/esm2020/lib/components/delimeter/delimeter.component.mjs +11 -0
- package/esm2020/lib/components/dots/dots.component.mjs +30 -0
- package/esm2020/lib/components/hamburger/hamburger.component.mjs +24 -0
- package/esm2020/lib/components/index.mjs +20 -0
- package/esm2020/lib/components/loader/bounce/bounce-loader.component.mjs +13 -0
- package/esm2020/lib/components/loader/circle/circle-loader-type.enum.mjs +6 -0
- package/esm2020/lib/components/loader/circle/circle-loader.component.mjs +20 -0
- package/esm2020/lib/components/loader/loader-base.component.mjs +51 -0
- package/esm2020/lib/components/loader/loader.constants.mjs +6 -0
- package/esm2020/lib/components/loader/loader.event.mjs +2 -0
- package/esm2020/lib/components/loader/service/loader.service.mjs +76 -0
- package/esm2020/lib/components/modal/directive/modal-open-on-click.directive.mjs +50 -0
- package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +48 -0
- package/esm2020/lib/components/modal/footer/default/default-modal-footer.model.mjs +2 -0
- package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +31 -0
- package/esm2020/lib/components/modal/header/default/default-modal-header.model.mjs +2 -0
- package/esm2020/lib/components/modal/modal-template.enum.mjs +7 -0
- package/esm2020/lib/components/modal/modal.component.mjs +107 -0
- package/esm2020/lib/components/modal/service/modal.service.mjs +26 -0
- package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +31 -0
- package/esm2020/lib/components/toggle-switcher/toggle-switcher.model.mjs +2 -0
- package/esm2020/lib/components/tooltip/tooltip-type.enum.mjs +6 -0
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +69 -0
- package/esm2020/lib/constants/common.constants.mjs +6 -0
- package/esm2020/lib/constants/date-time.constants.mjs +8 -0
- package/esm2020/lib/constants/index.mjs +4 -0
- package/esm2020/lib/constants/ui.constants.mjs +16 -0
- package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +65 -0
- package/esm2020/lib/directives/click-outside/click-outside.event.mjs +2 -0
- package/esm2020/lib/directives/component-size/component-size.directive.mjs +46 -0
- package/esm2020/lib/directives/index.mjs +7 -0
- package/esm2020/lib/directives/mouse-down/mouse-down.directive.mjs +37 -0
- package/esm2020/lib/directives/show-hide-element/show-hide-element.directive.mjs +42 -0
- package/esm2020/lib/directives/template-reference/template-reference.directive.mjs +21 -0
- package/esm2020/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.mjs +38 -0
- package/esm2020/lib/enums/common.enums.mjs +69 -0
- package/esm2020/lib/enums/index.mjs +2 -0
- package/esm2020/lib/ngx-sfc-common.module.mjs +135 -0
- package/esm2020/lib/services/document-ref.service.mjs +70 -0
- package/esm2020/lib/services/index.mjs +4 -0
- package/esm2020/lib/services/resize.service.mjs +42 -0
- package/esm2020/lib/services/window-ref.service.mjs +70 -0
- package/esm2020/lib/utils/collections.utils.mjs +244 -0
- package/esm2020/lib/utils/common.utils.mjs +86 -0
- package/esm2020/lib/utils/date-time.utils.mjs +208 -0
- package/esm2020/lib/utils/file.utils.mjs +52 -0
- package/esm2020/lib/utils/index.mjs +7 -0
- package/esm2020/lib/utils/string.utils.mjs +31 -0
- package/esm2020/lib/utils/ui.utils.mjs +39 -0
- package/esm2020/ngx-sfc-common.mjs +5 -0
- package/esm2020/public-api.mjs +11 -0
- package/fesm2015/ngx-sfc-common.mjs +1908 -0
- package/fesm2015/ngx-sfc-common.mjs.map +1 -0
- package/fesm2020/ngx-sfc-common.mjs +1900 -0
- package/fesm2020/ngx-sfc-common.mjs.map +1 -0
- package/lib/components/button/button-type.enum.d.ts +7 -0
- package/lib/components/button/button.component.d.ts +13 -0
- package/lib/components/checkmark/checkmark.component.d.ts +8 -0
- package/lib/components/delimeter/delimeter.component.d.ts +5 -0
- package/lib/components/dots/dots.component.d.ts +9 -0
- package/lib/components/hamburger/hamburger.component.d.ts +7 -0
- package/lib/components/index.d.ts +21 -0
- package/lib/components/loader/bounce/bounce-loader.component.d.ts +6 -0
- package/lib/components/loader/circle/circle-loader-type.enum.d.ts +4 -0
- package/lib/components/loader/circle/circle-loader.component.d.ts +8 -0
- package/lib/components/loader/loader-base.component.d.ts +27 -0
- package/lib/components/loader/loader.constants.d.ts +5 -0
- package/lib/components/loader/loader.event.d.ts +4 -0
- package/lib/components/loader/service/loader.service.d.ts +33 -0
- package/lib/components/modal/directive/modal-open-on-click.directive.d.ts +17 -0
- package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +19 -0
- package/lib/components/modal/footer/default/default-modal-footer.model.d.ts +6 -0
- package/lib/components/modal/header/default/default-modal-header.component.d.ts +14 -0
- package/lib/components/modal/header/default/default-modal-header.model.d.ts +5 -0
- package/lib/components/modal/modal-template.enum.d.ts +5 -0
- package/lib/components/modal/modal.component.d.ts +25 -0
- package/lib/components/modal/service/modal.service.d.ts +12 -0
- package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +11 -0
- package/lib/components/toggle-switcher/toggle-switcher.model.d.ts +4 -0
- package/lib/components/tooltip/tooltip-type.enum.d.ts +4 -0
- package/lib/components/tooltip/tooltip.component.d.ts +22 -0
- package/lib/constants/common.constants.d.ts +5 -0
- package/lib/constants/date-time.constants.d.ts +7 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/ui.constants.d.ts +15 -0
- package/lib/directives/click-outside/click-outside.directive.d.ts +23 -0
- package/lib/directives/click-outside/click-outside.event.d.ts +4 -0
- package/lib/directives/component-size/component-size.directive.d.ts +13 -0
- package/lib/directives/index.d.ts +7 -0
- package/lib/directives/mouse-down/mouse-down.directive.d.ts +12 -0
- package/lib/directives/show-hide-element/show-hide-element.directive.d.ts +13 -0
- package/lib/directives/template-reference/template-reference.directive.d.ts +9 -0
- package/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.d.ts +13 -0
- package/lib/enums/common.enums.d.ts +61 -0
- package/lib/enums/index.d.ts +1 -0
- package/lib/ngx-sfc-common.module.d.ts +27 -0
- package/lib/services/document-ref.service.d.ts +43 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/resize.service.d.ts +32 -0
- package/lib/services/window-ref.service.d.ts +43 -0
- package/lib/utils/collections.utils.d.ts +135 -0
- package/lib/utils/common.utils.d.ts +50 -0
- package/lib/utils/date-time.utils.d.ts +131 -0
- package/lib/utils/file.utils.d.ts +25 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/string.utils.d.ts +19 -0
- package/lib/utils/ui.utils.d.ts +24 -0
- package/ngx-sfc-common.d.ts +5 -0
- package/package.json +53 -0
- package/public-api.d.ts +7 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IToggleSwitcherModel } from './toggle-switcher.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ToggleSwitcherComponent {
|
|
4
|
+
active: boolean;
|
|
5
|
+
leftModel: IToggleSwitcherModel;
|
|
6
|
+
rightModel: IToggleSwitcherModel;
|
|
7
|
+
onClick: () => boolean;
|
|
8
|
+
constructor();
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleSwitcherComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleSwitcherComponent, "sfc-toggle-switcher", never, { "active": "active"; "leftModel": "leftModel"; "rightModel": "rightModel"; }, {}, never, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AfterContentInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Position } from '../../enums';
|
|
3
|
+
import { ResizeService } from '../../services';
|
|
4
|
+
import { TooltipType } from './tooltip-type.enum';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TooltipComponent implements OnInit, OnDestroy, AfterContentInit {
|
|
7
|
+
private resizeService;
|
|
8
|
+
private window;
|
|
9
|
+
value?: string;
|
|
10
|
+
tooltipType: TooltipType;
|
|
11
|
+
tooltipPosition: Position;
|
|
12
|
+
tooltipShow: boolean;
|
|
13
|
+
click(): void;
|
|
14
|
+
private _position;
|
|
15
|
+
private _resizeSubscription?;
|
|
16
|
+
constructor(resizeService: ResizeService, window: Window);
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngAfterContentInit(): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "[sfc-tooltip]", never, { "value": "sfc-tooltip"; "tooltipType": "tooltipType"; "tooltipPosition": "tooltipPosition"; "tooltipShow": "tooltipShow"; }, {}, never, ["*"]>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class UIConstants {
|
|
2
|
+
static CSS_PIXELS: string;
|
|
3
|
+
static CSS_PERCENTAGE: string;
|
|
4
|
+
static CSS_DEGREES: string;
|
|
5
|
+
static CSS_EM: string;
|
|
6
|
+
static CSS_VISIBILITY_VISIBLE: string;
|
|
7
|
+
static CSS_VISIBILITY_HIDDEN: string;
|
|
8
|
+
static DEFAULT_THEME: string;
|
|
9
|
+
static DARK_THEME: string;
|
|
10
|
+
static CSS_WIDTH: string;
|
|
11
|
+
static CSS_LEFT: string;
|
|
12
|
+
static CSS_CLASS_FIXED: string;
|
|
13
|
+
static CSS_CLASS_BACKGROUND: string;
|
|
14
|
+
static CSS_CLASS_TOP: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ClickOutsideEvent } from './click-outside.event';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ClickOutsideDirective implements OnInit, OnDestroy {
|
|
5
|
+
private elementRef;
|
|
6
|
+
private document;
|
|
7
|
+
/**
|
|
8
|
+
* Toggler for checking ouside click event
|
|
9
|
+
*/
|
|
10
|
+
listening: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Emitter for click event
|
|
13
|
+
*/
|
|
14
|
+
action: EventEmitter<ClickOutsideEvent>;
|
|
15
|
+
private _clickSubscription?;
|
|
16
|
+
constructor(elementRef: ElementRef, document: Document);
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
private onClick;
|
|
20
|
+
private isDescendant;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClickOutsideDirective, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[sfcClickOutside]", never, { "listening": "sfcClickOutside"; }, { "action": "action"; }, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { ComponentSize } from '../../enums';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ComponentSizeDirective {
|
|
5
|
+
private el;
|
|
6
|
+
set size(value: ComponentSize | null | undefined);
|
|
7
|
+
set customSize(value: number);
|
|
8
|
+
private get style();
|
|
9
|
+
constructor(el: ElementRef);
|
|
10
|
+
private getSizeValue;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentSizeDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentSizeDirective, "[sfcComponentSize]", never, { "size": "sfcComponentSize"; "customSize": "customSize"; }, {}, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ClickOutsideDirective } from './click-outside/click-outside.directive';
|
|
2
|
+
export { ClickOutsideEvent } from './click-outside/click-outside.event';
|
|
3
|
+
export { ShowHideElementDirective } from './show-hide-element/show-hide-element.directive';
|
|
4
|
+
export { ThrowElementOnHoverDirective } from './throw-element-on-hover/throw-element-on-hover.directive';
|
|
5
|
+
export { TemplateReferenceDirective } from './template-reference/template-reference.directive';
|
|
6
|
+
export { MouseDownDirective } from './mouse-down/mouse-down.directive';
|
|
7
|
+
export { ComponentSizeDirective } from './component-size/component-size.directive';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MouseDownDirective {
|
|
4
|
+
/**
|
|
5
|
+
* Allowed mouse button
|
|
6
|
+
*/
|
|
7
|
+
button: number;
|
|
8
|
+
action: EventEmitter<MouseEvent>;
|
|
9
|
+
onMouseDown($event: MouseEvent): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MouseDownDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MouseDownDirective, "[sfcMouseDown]", never, { "button": "button"; }, { "action": "sfcMouseDown"; }, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ShowHideElementDirective {
|
|
4
|
+
private el;
|
|
5
|
+
private readonly SHOW_HIDE_TRANSITION_DELAY_DEFAULT;
|
|
6
|
+
set showHideElement(show: boolean);
|
|
7
|
+
set delay(value: number);
|
|
8
|
+
private get style();
|
|
9
|
+
constructor(el: ElementRef);
|
|
10
|
+
private getTransitionValue;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShowHideElementDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ShowHideElementDirective, "[sfcShowHideElement]", never, { "showHideElement": "sfcShowHideElement"; "delay": "delay"; }, {}, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TemplateReferenceDirective {
|
|
4
|
+
readonly template: TemplateRef<any>;
|
|
5
|
+
templateName: string;
|
|
6
|
+
constructor(template: TemplateRef<any>);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateReferenceDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplateReferenceDirective, "[sfcTemplateReference]", never, { "templateName": "sfcTemplateReference"; }, {}, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ThrowElementOnHoverDirective {
|
|
4
|
+
private el;
|
|
5
|
+
throwValue?: number;
|
|
6
|
+
onMouseEnter(): void;
|
|
7
|
+
onMouseLeave(): void;
|
|
8
|
+
private get style();
|
|
9
|
+
constructor(el: ElementRef);
|
|
10
|
+
private throw;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThrowElementOnHoverDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ThrowElementOnHoverDirective, "[sfcThrowElementOnHover]", never, { "throwValue": "sfcThrowElementOnHover"; }, {}, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component sizes
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ComponentSize {
|
|
5
|
+
Small = "small",
|
|
6
|
+
Medium = "medium",
|
|
7
|
+
Large = "large",
|
|
8
|
+
Custom = "custom"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Type of sorting
|
|
12
|
+
*/
|
|
13
|
+
export declare enum SortingDirection {
|
|
14
|
+
Ascending = "ascending",
|
|
15
|
+
Descending = "descending"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* UI classes
|
|
19
|
+
*/
|
|
20
|
+
export declare enum UIClass {
|
|
21
|
+
Active = "active",
|
|
22
|
+
Valid = "valid",
|
|
23
|
+
Invalid = "invalid",
|
|
24
|
+
Enabled = "enabled",
|
|
25
|
+
Disabled = "disabled",
|
|
26
|
+
Selected = "selected",
|
|
27
|
+
Empty = "empty",
|
|
28
|
+
Focus = "focus",
|
|
29
|
+
Open = "open",
|
|
30
|
+
Loading = "loading",
|
|
31
|
+
Removed = "removed",
|
|
32
|
+
Visible = "visible",
|
|
33
|
+
Hidden = "hidden",
|
|
34
|
+
Animated = "animated",
|
|
35
|
+
Expanded = "expanded",
|
|
36
|
+
Fixed = "fixed"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Position directions
|
|
40
|
+
*/
|
|
41
|
+
export declare enum Position {
|
|
42
|
+
Top = "top",
|
|
43
|
+
Bottom = "bottom",
|
|
44
|
+
Left = "left",
|
|
45
|
+
Right = "right"
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* CSS Media limits
|
|
49
|
+
*/
|
|
50
|
+
export declare enum MediaLimits {
|
|
51
|
+
Laptop = 1200,
|
|
52
|
+
Tablet = 767,
|
|
53
|
+
Phone = 430
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Direction types
|
|
57
|
+
*/
|
|
58
|
+
export declare enum Direction {
|
|
59
|
+
Horizontal = "horizontal",
|
|
60
|
+
Vertical = "vertical"
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SortingDirection, UIClass, ComponentSize, Position, MediaLimits, Direction } from './common.enums';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./directives/click-outside/click-outside.directive";
|
|
3
|
+
import * as i2 from "./directives/show-hide-element/show-hide-element.directive";
|
|
4
|
+
import * as i3 from "./directives/throw-element-on-hover/throw-element-on-hover.directive";
|
|
5
|
+
import * as i4 from "./directives/template-reference/template-reference.directive";
|
|
6
|
+
import * as i5 from "./directives/mouse-down/mouse-down.directive";
|
|
7
|
+
import * as i6 from "./directives/component-size/component-size.directive";
|
|
8
|
+
import * as i7 from "./components/button/button.component";
|
|
9
|
+
import * as i8 from "./components/tooltip/tooltip.component";
|
|
10
|
+
import * as i9 from "./components/delimeter/delimeter.component";
|
|
11
|
+
import * as i10 from "./components/loader/bounce/bounce-loader.component";
|
|
12
|
+
import * as i11 from "./components/loader/circle/circle-loader.component";
|
|
13
|
+
import * as i12 from "./components/modal/modal.component";
|
|
14
|
+
import * as i13 from "./components/modal/directive/modal-open-on-click.directive";
|
|
15
|
+
import * as i14 from "./components/modal/header/default/default-modal-header.component";
|
|
16
|
+
import * as i15 from "./components/modal/footer/default/default-modal-footer.component";
|
|
17
|
+
import * as i16 from "./components/hamburger/hamburger.component";
|
|
18
|
+
import * as i17 from "./components/dots/dots.component";
|
|
19
|
+
import * as i18 from "./components/toggle-switcher/toggle-switcher.component";
|
|
20
|
+
import * as i19 from "./components/checkmark/checkmark.component";
|
|
21
|
+
import * as i20 from "@angular/common";
|
|
22
|
+
import * as i21 from "@angular/platform-browser/animations";
|
|
23
|
+
export declare class NgxSfcCommonModule {
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSfcCommonModule, never>;
|
|
25
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSfcCommonModule, [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.ThrowElementOnHoverDirective, typeof i4.TemplateReferenceDirective, typeof i5.MouseDownDirective, typeof i6.ComponentSizeDirective, typeof i7.ButtonComponent, typeof i8.TooltipComponent, typeof i9.DelimeterComponent, typeof i10.BounceLoaderComponent, typeof i11.CircleLoaderComponent, typeof i12.ModalComponent, typeof i13.ModalOpenOnClickDirective, typeof i14.DefaultModalHeaderComponent, typeof i15.DefaultModalFooterComponent, typeof i16.HamburgerComponent, typeof i17.DotsComponent, typeof i18.ToggleSwitcherComponent, typeof i19.CheckmarkComponent], [typeof i20.CommonModule, typeof i21.BrowserAnimationsModule], [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.ThrowElementOnHoverDirective, typeof i4.TemplateReferenceDirective, typeof i5.MouseDownDirective, typeof i6.ComponentSizeDirective, typeof i7.ButtonComponent, typeof i8.TooltipComponent, typeof i9.DelimeterComponent, typeof i10.BounceLoaderComponent, typeof i11.CircleLoaderComponent, typeof i12.ModalComponent, typeof i13.ModalOpenOnClickDirective, typeof i14.DefaultModalHeaderComponent, typeof i15.DefaultModalFooterComponent, typeof i16.HamburgerComponent, typeof i17.DotsComponent, typeof i18.ToggleSwitcherComponent, typeof i19.CheckmarkComponent]>;
|
|
26
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxSfcCommonModule>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ClassProvider, FactoryProvider, InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Create a new injection token for injecting the Document into a component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DOCUMENT: InjectionToken<Document>;
|
|
7
|
+
/**
|
|
8
|
+
* Define abstract class for obtaining reference to the global Document object.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class DocumentRef {
|
|
11
|
+
get nativeDocument(): Document | Object;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Define class that implements the abstract class and returns the native Document object.
|
|
15
|
+
*/
|
|
16
|
+
export declare class BrowserDocumentRef extends DocumentRef {
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* @returns Document object
|
|
20
|
+
*/
|
|
21
|
+
get nativeDocument(): Document | Object;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserDocumentRef, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserDocumentRef>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create an factory function that returns the native Document object.
|
|
27
|
+
* @param browserDocumentRef Native Document object
|
|
28
|
+
* @param platformId id of platform
|
|
29
|
+
* @returns type of platform of empty object
|
|
30
|
+
*/
|
|
31
|
+
export declare function documentFactory(browserDocumentRef: BrowserDocumentRef, platformId: Object): Document | Object;
|
|
32
|
+
/**
|
|
33
|
+
* Create a injectable provider for the DocumentRef token that uses the BrowserDocumentRef class.
|
|
34
|
+
*/
|
|
35
|
+
export declare const browserDocumentProvider: ClassProvider;
|
|
36
|
+
/**
|
|
37
|
+
* Create an injectable provider that uses the DocumentFactory function for returning the native Document object.
|
|
38
|
+
*/
|
|
39
|
+
export declare const documentProvider: FactoryProvider;
|
|
40
|
+
/**
|
|
41
|
+
* Create an array of providers.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DOCUMENT_PROVIDERS: (ClassProvider | FactoryProvider)[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EventManager } from '@angular/platform-browser';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ResizeService {
|
|
5
|
+
private eventManager;
|
|
6
|
+
/**
|
|
7
|
+
* Width of window
|
|
8
|
+
*/
|
|
9
|
+
windowWidth: any;
|
|
10
|
+
/**
|
|
11
|
+
* Makes resizeSubject become Observable
|
|
12
|
+
* @returns Observable of resizeSubject
|
|
13
|
+
*/
|
|
14
|
+
get onResize$(): Observable<Window>;
|
|
15
|
+
/**
|
|
16
|
+
* Subject of 'resize' event
|
|
17
|
+
*/
|
|
18
|
+
private resizeSubject;
|
|
19
|
+
constructor(eventManager: EventManager);
|
|
20
|
+
/**
|
|
21
|
+
* Handler of 'resize' event. Passes data throw resizeSubject
|
|
22
|
+
* @param event Event Object of 'resize' event
|
|
23
|
+
*/
|
|
24
|
+
private onResize;
|
|
25
|
+
/**
|
|
26
|
+
* Handler of 'onload' event. Defines the width of window
|
|
27
|
+
* @param event Event Object of 'onload' event
|
|
28
|
+
*/
|
|
29
|
+
private onLoaded;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResizeService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResizeService>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ClassProvider, FactoryProvider, InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Create a new injection token for injecting the window into a component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const WINDOW: InjectionToken<unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Define abstract class for obtaining reference to the global window object.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class WindowRef {
|
|
11
|
+
get nativeWindow(): Window | Object;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Define class that implements the abstract class and returns the native window object.
|
|
15
|
+
*/
|
|
16
|
+
export declare class BrowserWindowRef extends WindowRef {
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* @returns window object
|
|
20
|
+
*/
|
|
21
|
+
get nativeWindow(): Window | Object;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BrowserWindowRef, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BrowserWindowRef>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create an factory function that returns the native window object.
|
|
27
|
+
* @param browserWindowRef Native window object
|
|
28
|
+
* @param platformId id of platform
|
|
29
|
+
* @returns type of platform of empty object
|
|
30
|
+
*/
|
|
31
|
+
export declare function windowFactory(browserWindowRef: BrowserWindowRef, platformId: Object): Window | Object;
|
|
32
|
+
/**
|
|
33
|
+
* Create a injectable provider for the WindowRef token that uses the BrowserWindowRef class.
|
|
34
|
+
*/
|
|
35
|
+
export declare const browserWindowProvider: ClassProvider;
|
|
36
|
+
/**
|
|
37
|
+
* Create an injectable provider that uses the windowFactory function for returning the native window object.
|
|
38
|
+
*/
|
|
39
|
+
export declare const windowProvider: FactoryProvider;
|
|
40
|
+
/**
|
|
41
|
+
* Create an array of providers.
|
|
42
|
+
*/
|
|
43
|
+
export declare const WINDOW_PROVIDERS: (ClassProvider | FactoryProvider)[];
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { SortingDirection } from "../enums";
|
|
2
|
+
/**
|
|
3
|
+
* Return true if collection not empty
|
|
4
|
+
* @param collection Array of items
|
|
5
|
+
* @returns True if collection not empty
|
|
6
|
+
*/
|
|
7
|
+
export declare function any<T>(collection: Array<T> | null | undefined): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Return true if collection has such value
|
|
10
|
+
* @param collection Array of items
|
|
11
|
+
* @param value Value to check
|
|
12
|
+
* @returns True if found value in collection
|
|
13
|
+
*/
|
|
14
|
+
export declare function hasItem<T>(collection: Array<T>, value: T): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Return true if collection has such value by predicate function
|
|
17
|
+
* @param collection Array of items
|
|
18
|
+
* @param predicate Function to define check logic
|
|
19
|
+
* @returns True if found value in collection
|
|
20
|
+
*/
|
|
21
|
+
export declare function hasItemBy<T>(collection: Array<T>, predicate: (item: T) => boolean): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Return true if collection of objects has such value as object
|
|
24
|
+
* @param collection Array of objects
|
|
25
|
+
* @param property Property name
|
|
26
|
+
* @param value Value to check
|
|
27
|
+
* @returns True if found value in collection
|
|
28
|
+
*/
|
|
29
|
+
export declare function hasObjectItem<T>(collection: Array<any>, // TODO <-- Array<T>
|
|
30
|
+
property: string, value: T): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Return value from collection by predicate function
|
|
33
|
+
* @param collection Array of items
|
|
34
|
+
* @param predicate Function to define search logic
|
|
35
|
+
* @returns Value from collection
|
|
36
|
+
*/
|
|
37
|
+
export declare function firstOrDefault<T>(collection: Array<T> | null | undefined, predicate: (item: T) => boolean): T | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Return first item from collection
|
|
40
|
+
* @param collection Array of items
|
|
41
|
+
* @returns First value from collection
|
|
42
|
+
*/
|
|
43
|
+
export declare function firstItem<T>(collection: Array<T>): T | null | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Return last item from collection
|
|
46
|
+
* @param collection Array of items
|
|
47
|
+
* @returns Last value from collection
|
|
48
|
+
*/
|
|
49
|
+
export declare function lastItem<T>(collection: Array<T>): T | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Return True if all values match predicate function
|
|
52
|
+
* @param collection Array of objects
|
|
53
|
+
* @param predicate Function to define check logic
|
|
54
|
+
* @returns True if all values match predicate
|
|
55
|
+
*/
|
|
56
|
+
export declare function all<T>(collection: Array<T>, predicate: (item: T) => boolean): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Return items from collection by predicate function
|
|
59
|
+
* @param collection Array of items
|
|
60
|
+
* @param predicate Function to define search logic
|
|
61
|
+
* @returns Values from collection
|
|
62
|
+
*/
|
|
63
|
+
export declare function where<T>(collection: Array<T>, predicate: (item: T) => boolean): Array<T> | null | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Return sliced collection by page number and page size
|
|
66
|
+
* @param collection Array of items
|
|
67
|
+
* @param page Page number
|
|
68
|
+
* @param size Page size
|
|
69
|
+
* @returns Sliced collection
|
|
70
|
+
*/
|
|
71
|
+
export declare function skip<T>(collection: Array<T>, page: number, size: number): Array<T>;
|
|
72
|
+
/**
|
|
73
|
+
* Return sorted collection of objects by property
|
|
74
|
+
* @param collection Array of items
|
|
75
|
+
* @param property Property name
|
|
76
|
+
* @param direction Sorting direction
|
|
77
|
+
* @returns Sorted collection
|
|
78
|
+
*/
|
|
79
|
+
export declare function sortBy<T>(collection: Array<T>, property: string, direction: SortingDirection): Array<T>;
|
|
80
|
+
/**
|
|
81
|
+
* Return sorted collection of objects by path
|
|
82
|
+
* @param collection Array of items
|
|
83
|
+
* @param path Path to property
|
|
84
|
+
* @param direction Sorting direction
|
|
85
|
+
* @returns Sorted collection
|
|
86
|
+
*/
|
|
87
|
+
export declare function sortByPath<T>(collection: Array<T>, path: string, direction: SortingDirection): Array<T>;
|
|
88
|
+
/**
|
|
89
|
+
* Return collection without matches
|
|
90
|
+
* @param collection Array of items
|
|
91
|
+
* @returns Collection without matches
|
|
92
|
+
*/
|
|
93
|
+
export declare function distinct<T>(collection: Array<T>): Array<T>;
|
|
94
|
+
/**
|
|
95
|
+
* Return sum value from collection items by map function
|
|
96
|
+
* @param collection Array of items
|
|
97
|
+
* @param select Map function
|
|
98
|
+
* @returns Sum value of colection items
|
|
99
|
+
*/
|
|
100
|
+
export declare function sum<T>(collection: Array<T>, select: (item: T) => number): number;
|
|
101
|
+
/**
|
|
102
|
+
* Return max value from collection items by map function
|
|
103
|
+
* @param collection Array of items
|
|
104
|
+
* @param select Map function
|
|
105
|
+
* @returns Max value of collection items
|
|
106
|
+
*/
|
|
107
|
+
export declare function max<T>(collection: Array<T>, select: (item: T) => number): number;
|
|
108
|
+
/**
|
|
109
|
+
* Delete items from collection by predicate
|
|
110
|
+
* @param collection Array of items
|
|
111
|
+
* @param predicate Function to define remove logic
|
|
112
|
+
*/
|
|
113
|
+
export declare function remove<T>(collection: Array<T>, predicate: (item: T) => boolean): void;
|
|
114
|
+
/**
|
|
115
|
+
* Add item to collection
|
|
116
|
+
* @param collection Array of items
|
|
117
|
+
* @param item New item
|
|
118
|
+
* @param predicate Function to define if allowed to add new item
|
|
119
|
+
* @returns True if successfully added
|
|
120
|
+
*/
|
|
121
|
+
export declare function addItem<T>(collection: Array<T>, item: T, predicate: (item: T) => boolean): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Delete item from collection by predicate
|
|
124
|
+
* @param collection Array of items
|
|
125
|
+
* @param predicate Function to define remove logic
|
|
126
|
+
* @returns True if successfully removed
|
|
127
|
+
*/
|
|
128
|
+
export declare function removeItem<T>(collection: Array<T>, predicate: (item: T) => boolean): boolean;
|
|
129
|
+
export declare function updateItem<T>(collection: Array<T>, predicate: (item: T) => boolean, newItem: T): Array<T> | null;
|
|
130
|
+
/**
|
|
131
|
+
* Return collection or empty if collection is not defined
|
|
132
|
+
* @param collection Array of items
|
|
133
|
+
* @returns Collection or empty
|
|
134
|
+
*/
|
|
135
|
+
export declare function getCollectionOrEmpty<T>(collection: Array<T>): Array<T>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return true if value defined
|
|
3
|
+
* @param value Value to check
|
|
4
|
+
* @returns True if value is not null and defined
|
|
5
|
+
*/
|
|
6
|
+
export declare function isDefined<T>(value: T | undefined | null): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Return true if value is object
|
|
9
|
+
* @param value Value to check
|
|
10
|
+
* @returns True if value is object
|
|
11
|
+
*/
|
|
12
|
+
export declare function isObject(value: any): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Return true if data is observable
|
|
15
|
+
* @param data Object to check
|
|
16
|
+
* @returns True if data is observable
|
|
17
|
+
*/
|
|
18
|
+
export declare function isAsyncData(data: any): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Return extended object with new property
|
|
21
|
+
* @param obj Object to extend by property
|
|
22
|
+
* @param property New property name
|
|
23
|
+
* @param value Value for new property
|
|
24
|
+
* @returns Extended object with new property
|
|
25
|
+
*/
|
|
26
|
+
export declare function addPropertyToObject(obj: any, property: string, value?: any): any;
|
|
27
|
+
/**
|
|
28
|
+
* Remove property from object
|
|
29
|
+
* @param obj Object for removing property
|
|
30
|
+
* @param property Property name to remove
|
|
31
|
+
*/
|
|
32
|
+
export declare function removePropertyFromObject(obj: any, property: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Deep merge object with others
|
|
35
|
+
* @param target Object to merge
|
|
36
|
+
* @param sources
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* Deep merge object with others
|
|
40
|
+
* @param target Object to merge
|
|
41
|
+
* @param sources Objects to be merged with target
|
|
42
|
+
* @returns Merged object
|
|
43
|
+
*/
|
|
44
|
+
export declare function mergeDeep(target: any, ...sources: any[]): any;
|
|
45
|
+
/**
|
|
46
|
+
* Get type's property name safety
|
|
47
|
+
* @param name KeyOf property
|
|
48
|
+
* @returns Type's property name
|
|
49
|
+
*/
|
|
50
|
+
export declare const nameof: <T>(name: keyof T) => keyof T;
|