ngx-sfc-common 0.0.19 → 0.0.21
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/esm2020/lib/components/button/button.component.mjs +3 -3
- package/esm2020/lib/components/checkmark/checkmark.component.mjs +3 -6
- package/esm2020/lib/components/delimeter/delimeter.component.mjs +2 -2
- package/esm2020/lib/components/dots/dots.component.mjs +2 -2
- package/esm2020/lib/components/hamburger/menu/hamburger-menu.component.mjs +2 -2
- package/esm2020/lib/components/icon/icon.component.mjs +5 -1
- package/esm2020/lib/components/index.mjs +2 -1
- package/esm2020/lib/components/load-container/load-container.component.mjs +38 -19
- package/esm2020/lib/components/load-container/load-container.enum.mjs +6 -1
- package/esm2020/lib/components/load-container/models/load-container.model.mjs +1 -1
- package/esm2020/lib/components/load-container/models/load-more-parameters.model.mjs +1 -1
- package/esm2020/lib/components/load-container/models/load-more-predicate-parameters.model.mjs +2 -0
- package/esm2020/lib/components/load-container/models/load-more.model.mjs +1 -1
- package/esm2020/lib/components/load-container/service/load-more.service.mjs +4 -4
- package/esm2020/lib/components/load-more-button/load-more-button.component.mjs +2 -2
- package/esm2020/lib/components/loader/bounce/bounce-loader.component.mjs +2 -2
- package/esm2020/lib/components/loader/circle/circle-loader.component.mjs +2 -2
- package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +6 -4
- package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +5 -6
- package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +24 -12
- package/esm2020/lib/components/modal/footer/default/default-modal-footer.model.mjs +1 -1
- package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +5 -4
- package/esm2020/lib/components/modal/header/default/default-modal-header.model.mjs +1 -1
- package/esm2020/lib/components/modal/modal.component.mjs +15 -6
- package/esm2020/lib/components/modal/service/modal.event.mjs +2 -0
- package/esm2020/lib/components/modal/service/modal.service.mjs +14 -9
- package/esm2020/lib/components/pagination/pagination.component.mjs +2 -2
- package/esm2020/lib/components/sorting/sorting.component.mjs +2 -2
- package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +2 -2
- package/esm2020/lib/constants/common.constants.mjs +2 -1
- package/esm2020/lib/constants/ui.constants.mjs +4 -1
- package/esm2020/lib/directives/if/if.directive.mjs +26 -0
- package/esm2020/lib/directives/index.mjs +2 -1
- package/esm2020/lib/directives/scroll-into-view/scroll-into-view.directive.mjs +18 -8
- package/esm2020/lib/directives/show-hide-element/show-hide-element.directive.mjs +1 -1
- package/esm2020/lib/enums/compare.enum.mjs +10 -0
- package/esm2020/lib/enums/index.mjs +2 -1
- package/esm2020/lib/models/class.model.mjs +2 -0
- package/esm2020/lib/models/index.mjs +2 -0
- package/esm2020/lib/ngx-sfc-common.module.mjs +6 -2
- package/esm2020/lib/utils/collections.utils.mjs +10 -1
- package/esm2020/lib/utils/common.utils.mjs +71 -2
- package/esm2020/lib/utils/date-time.utils.mjs +41 -1
- package/esm2020/lib/utils/file.utils.mjs +24 -1
- package/esm2020/lib/utils/index.mjs +5 -5
- package/fesm2015/ngx-sfc-common.mjs +469 -224
- package/fesm2015/ngx-sfc-common.mjs.map +1 -1
- package/fesm2020/ngx-sfc-common.mjs +465 -223
- package/fesm2020/ngx-sfc-common.mjs.map +1 -1
- package/lib/components/button/button.component.d.ts +4 -3
- package/lib/components/checkmark/checkmark.component.d.ts +1 -2
- package/lib/components/icon/icon.component.d.ts +2 -2
- package/lib/components/index.d.ts +2 -0
- package/lib/components/load-container/load-container.component.d.ts +3 -2
- package/lib/components/load-container/load-container.enum.d.ts +4 -0
- package/lib/components/load-container/models/load-container.model.d.ts +5 -2
- package/lib/components/load-container/models/load-more-parameters.model.d.ts +2 -1
- package/lib/components/load-container/models/load-more-predicate-parameters.model.d.ts +3 -0
- package/lib/components/load-container/models/load-more.model.d.ts +1 -0
- package/lib/components/load-container/service/load-more.service.d.ts +1 -1
- package/lib/components/modal/directive/open/modal-open.directive.d.ts +0 -1
- package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +1 -1
- package/lib/components/modal/footer/default/default-modal-footer.model.d.ts +4 -2
- package/lib/components/modal/header/default/default-modal-header.component.d.ts +1 -1
- package/lib/components/modal/header/default/default-modal-header.model.d.ts +1 -1
- package/lib/components/modal/modal.component.d.ts +5 -3
- package/lib/components/modal/service/modal.event.d.ts +4 -0
- package/lib/components/modal/service/modal.service.d.ts +6 -5
- package/lib/constants/common.constants.d.ts +1 -0
- package/lib/constants/ui.constants.d.ts +3 -0
- package/lib/directives/if/if.directive.d.ts +11 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/scroll-into-view/scroll-into-view.directive.d.ts +6 -2
- package/lib/enums/compare.enum.d.ts +7 -0
- package/lib/enums/index.d.ts +1 -0
- package/lib/models/class.model.d.ts +3 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/ngx-sfc-common.module.d.ts +36 -35
- package/lib/utils/collections.utils.d.ts +7 -0
- package/lib/utils/common.utils.d.ts +7 -0
- package/lib/utils/date-time.utils.d.ts +25 -0
- package/lib/utils/file.utils.d.ts +13 -0
- package/lib/utils/index.d.ts +4 -4
- package/package.json +1 -1
- package/styles/_colors.scss +1 -0
- package/styles/_index.scss +2 -0
- package/styles/_mixins-delimeter.scss +21 -0
- package/styles/_mixins-scroll.scss +38 -0
- package/styles/_mixins.scss +10 -23
- package/styles/_variables.scss +5 -0
- package/styles/themes/_dark.scss +2 -2
- package/styles/themes/_default.scss +2 -2
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { ButtonType } from './button-type.enum';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import { IClassModel } from '../../models';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ButtonComponent {
|
|
5
6
|
private readonly BUTTON_DEFAULT_TEXT;
|
|
6
|
-
text
|
|
7
|
+
text?: string;
|
|
7
8
|
iconBefore?: IconDefinition;
|
|
8
9
|
iconAfter?: IconDefinition;
|
|
9
10
|
disabled: boolean;
|
|
10
11
|
types: Array<ButtonType>;
|
|
11
|
-
get label(): string;
|
|
12
|
-
get classes():
|
|
12
|
+
get label(): string | undefined;
|
|
13
|
+
get classes(): IClassModel;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
14
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "sfc-button", never, { "text": "text"; "iconBefore": "iconBefore"; "iconAfter": "iconAfter"; "disabled": "disabled"; "types": "types"; }, {}, never, never, false, never>;
|
|
15
16
|
}
|
|
@@ -6,7 +6,6 @@ export declare class CheckmarkComponent {
|
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
icon: IconDefinition;
|
|
8
8
|
type: CheckmarkType;
|
|
9
|
-
showNotActive: boolean;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckmarkComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CheckmarkComponent, "sfc-checkmark", never, { "active": "active"; "disabled": "disabled"; "icon": "icon"; "type": "type";
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CheckmarkComponent, "sfc-checkmark", never, { "active": "active"; "disabled": "disabled"; "icon": "icon"; "type": "type"; }, {}, never, never, false, never>;
|
|
12
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class IconComponent {
|
|
4
|
-
icon?: IconDefinition;
|
|
5
|
-
imageSrc?: string;
|
|
4
|
+
icon?: IconDefinition | null;
|
|
5
|
+
imageSrc?: string | null;
|
|
6
6
|
get showImage(): boolean;
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
8
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "sfc-icon", never, { "icon": "icon"; "imageSrc": "imageSrc"; }, {}, never, never, false, never>;
|
|
@@ -38,5 +38,7 @@ export { LoadMoreButtonComponent } from './load-more-button/load-more-button.com
|
|
|
38
38
|
export { LoadContainerType } from './load-container/load-container.enum';
|
|
39
39
|
export { LoaderFunction, FilterFunction, ILoadContainerModel } from './load-container/models/load-container.model';
|
|
40
40
|
export { ILoadMoreParameters } from './load-container/models/load-more-parameters.model';
|
|
41
|
+
export { ILoadMorePredicateParameters } from './load-container/models/load-more-predicate-parameters.model';
|
|
41
42
|
export { ILoadMoreModel } from './load-container/models/load-more.model';
|
|
43
|
+
export { LoadChangesSource } from './load-container/load-container.enum';
|
|
42
44
|
export { IconComponent } from './icon/icon.component';
|
|
@@ -14,7 +14,6 @@ export declare class LoadContainerComponent implements OnDestroy {
|
|
|
14
14
|
id: string;
|
|
15
15
|
type: LoadContainerType;
|
|
16
16
|
open: boolean;
|
|
17
|
-
size: number;
|
|
18
17
|
loadMore: boolean;
|
|
19
18
|
showEmpty: boolean;
|
|
20
19
|
showLoadMoreButton: boolean;
|
|
@@ -35,6 +34,7 @@ export declare class LoadContainerComponent implements OnDestroy {
|
|
|
35
34
|
private _loading;
|
|
36
35
|
private set loading(value);
|
|
37
36
|
private _subscription;
|
|
37
|
+
private source;
|
|
38
38
|
constructor(loaderService: LoaderService, loadMoreService: LoadMoreService);
|
|
39
39
|
ngOnDestroy(): void;
|
|
40
40
|
more(event: MouseEvent): void;
|
|
@@ -44,6 +44,7 @@ export declare class LoadContainerComponent implements OnDestroy {
|
|
|
44
44
|
private buildParameters;
|
|
45
45
|
private buildDynamic;
|
|
46
46
|
private buildStatic;
|
|
47
|
+
private resetParameters;
|
|
47
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoadContainerComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoadContainerComponent, "sfc-load-container", never, { "id": "id"; "type": "type"; "open": "open"; "
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadContainerComponent, "sfc-load-container", never, { "id": "id"; "type": "type"; "open": "open"; "loadMore": "loadMore"; "showEmpty": "showEmpty"; "showLoadMoreButton": "showLoadMoreButton"; "loadMoreLabel": "loadMoreLabel"; "notFoundLabel": "notFoundLabel"; "model": "model"; "scrollTarget": "scrollTarget"; }, { "handleError": "handleError"; "handleSuccess": "handleSuccess"; "handleLoading": "handleLoading"; }, never, ["*"], false, never>;
|
|
49
50
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { ILoadMoreModel } from "./load-more.model";
|
|
3
3
|
import { ILoadMoreParameters } from "./load-more-parameters.model";
|
|
4
|
-
|
|
4
|
+
import { ILoadMorePredicateParameters } from "./load-more-predicate-parameters.model";
|
|
5
|
+
import { LoadChangesSource } from "../load-container.enum";
|
|
6
|
+
export declare type LoaderFunction = (parameters: ILoadMoreParameters, source: LoadChangesSource) => Observable<ILoadMoreModel<any>>;
|
|
5
7
|
export declare type FilterFunction = (data: any[], parameters: ILoadMoreParameters) => any[];
|
|
6
8
|
export interface ILoadContainerModel {
|
|
7
|
-
|
|
9
|
+
size?: number;
|
|
10
|
+
predicate$?: Observable<ILoadMorePredicateParameters | null>;
|
|
8
11
|
data$?: Observable<any[]>;
|
|
9
12
|
loader?: LoaderFunction;
|
|
10
13
|
filter?: FilterFunction;
|
|
@@ -5,7 +5,6 @@ export declare class ModalOpenDirective implements OnDestroy {
|
|
|
5
5
|
private templateRef;
|
|
6
6
|
private viewContainer;
|
|
7
7
|
private modalService;
|
|
8
|
-
private _closeSubscription;
|
|
9
8
|
private _openSubscription;
|
|
10
9
|
constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, modalService: ModalService);
|
|
11
10
|
ngOnDestroy(): void;
|
|
@@ -10,7 +10,7 @@ export declare class DefaultModalFooterComponent implements OnInit {
|
|
|
10
10
|
readonly BUTTON_CUSTOM_SIZE = 0.9;
|
|
11
11
|
ComponentSize: typeof ComponentSize;
|
|
12
12
|
ButtonType: typeof ButtonType;
|
|
13
|
-
model
|
|
13
|
+
model: IDefaultModalFooterModel;
|
|
14
14
|
constructor(modalService: ModalService);
|
|
15
15
|
ngOnInit(): void;
|
|
16
16
|
onButtonClick(isCancelButton?: boolean): void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface IDefaultModalFooterModel {
|
|
2
2
|
cancelButton?: boolean;
|
|
3
|
+
cancelButtonText?: string;
|
|
4
|
+
onCancel?: (args: any) => void;
|
|
3
5
|
applyButton?: boolean;
|
|
4
|
-
|
|
5
|
-
onApply?: () => void;
|
|
6
|
+
applyButtonText?: string;
|
|
7
|
+
onApply?: (args: any) => void;
|
|
6
8
|
}
|
|
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class DefaultModalHeaderComponent implements OnInit {
|
|
7
7
|
private modalService;
|
|
8
8
|
private readonly DEFAULT_MODAL_HEADER_MODEL;
|
|
9
|
-
model
|
|
9
|
+
model: IDefaultModalHeaderModel;
|
|
10
10
|
get icon(): IconDefinition;
|
|
11
11
|
constructor(modalService: ModalService);
|
|
12
12
|
ngOnInit(): void;
|
|
@@ -11,14 +11,16 @@ export declare class ModalComponent {
|
|
|
11
11
|
body?: TemplateRef<any>;
|
|
12
12
|
header?: TemplateRef<any>;
|
|
13
13
|
footer?: TemplateRef<any>;
|
|
14
|
-
defaultHeaderModel
|
|
15
|
-
defaultFooterModel
|
|
14
|
+
defaultHeaderModel: IDefaultModalHeaderModel;
|
|
15
|
+
defaultFooterModel: IDefaultModalFooterModel;
|
|
16
16
|
hideOnEsc: boolean;
|
|
17
17
|
hideOnClickOutside: boolean;
|
|
18
|
+
showHeader: boolean;
|
|
19
|
+
showFooter: boolean;
|
|
18
20
|
onEscapeKeyDownHandler(): void;
|
|
19
21
|
templates: QueryList<TemplateReferenceDirective> | undefined;
|
|
20
22
|
constructor(modalService: ModalService);
|
|
21
23
|
close(): void;
|
|
22
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "sfc-modal", never, { "body": "body"; "header": "header"; "footer": "footer"; "defaultHeaderModel": "defaultHeaderModel"; "defaultFooterModel": "defaultFooterModel"; "hideOnEsc": "hideOnEsc"; "hideOnClickOutside": "hideOnClickOutside"; }, {}, ["templates"], never, false, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "sfc-modal", never, { "body": "body"; "header": "header"; "footer": "footer"; "defaultHeaderModel": "defaultHeaderModel"; "defaultFooterModel": "defaultFooterModel"; "hideOnEsc": "hideOnEsc"; "hideOnClickOutside": "hideOnClickOutside"; "showHeader": "showHeader"; "showFooter": "showFooter"; }, {}, ["templates"], never, false, never>;
|
|
24
26
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class ModalService {
|
|
4
|
-
private
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
private subject;
|
|
5
|
+
modal$: Observable<any>;
|
|
6
|
+
get isOpen(): boolean;
|
|
7
|
+
args: any;
|
|
8
|
+
toggle(): void;
|
|
8
9
|
close(): void;
|
|
9
|
-
open(
|
|
10
|
+
open(args?: any): void;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
11
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
12
13
|
}
|
|
@@ -3,7 +3,10 @@ export declare class UIConstants {
|
|
|
3
3
|
static CSS_PERCENTAGE: string;
|
|
4
4
|
static CSS_DEGREES: string;
|
|
5
5
|
static CSS_EM: string;
|
|
6
|
+
static CSS_CH: string;
|
|
6
7
|
static CSS_INITIAL: string;
|
|
8
|
+
static CSS_INHERIT: string;
|
|
9
|
+
static CSS_NONE: string;
|
|
7
10
|
static CSS_VISIBILITY_VISIBLE: string;
|
|
8
11
|
static CSS_VISIBILITY_HIDDEN: string;
|
|
9
12
|
static CSS_WIDTH: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IfDirective {
|
|
4
|
+
private el;
|
|
5
|
+
set sfcIf(show: boolean);
|
|
6
|
+
private display;
|
|
7
|
+
private get style();
|
|
8
|
+
constructor(el: ElementRef);
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IfDirective, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IfDirective, "[sfcIf]", never, { "sfcIf": "sfcIf"; }, {}, never, never, false, never>;
|
|
11
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ClickOutsideDirective } from './click-outside/click-outside.directive';
|
|
2
2
|
export { ClickOutsideEvent } from './click-outside/click-outside.event';
|
|
3
3
|
export { ShowHideElementDirective } from './show-hide-element/show-hide-element.directive';
|
|
4
|
+
export { IfDirective } from './if/if.directive';
|
|
4
5
|
export { ThrowElementOnHoverDirective } from './throw-element-on-hover/throw-element-on-hover.directive';
|
|
5
6
|
export { TemplateReferenceDirective } from './template-reference/template-reference.directive';
|
|
6
7
|
export { MouseDownDirective } from './mouse-down/mouse-down.directive';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class ScrollIntoViewDirective {
|
|
3
|
-
set sfcScrollIntoView(
|
|
3
|
+
set sfcScrollIntoView(target: HTMLElement);
|
|
4
|
+
/**
|
|
5
|
+
* Scroll into middle of local container(not whole page)
|
|
6
|
+
*/
|
|
7
|
+
local: boolean;
|
|
4
8
|
options: ScrollIntoViewOptions;
|
|
5
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollIntoViewDirective, never>;
|
|
6
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollIntoViewDirective, "[sfcScrollIntoView]", never, { "sfcScrollIntoView": "sfcScrollIntoView"; "options": "options"; }, {}, never, never, false, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollIntoViewDirective, "[sfcScrollIntoView]", never, { "sfcScrollIntoView": "sfcScrollIntoView"; "local": "local"; "options": "options"; }, {}, never, never, false, never>;
|
|
7
11
|
}
|
package/lib/enums/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IClassModel } from './class.model';
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./directives/click-outside/click-outside.directive";
|
|
3
3
|
import * as i2 from "./directives/show-hide-element/show-hide-element.directive";
|
|
4
|
-
import * as i3 from "./directives/
|
|
5
|
-
import * as i4 from "./directives/
|
|
6
|
-
import * as i5 from "./directives/
|
|
7
|
-
import * as i6 from "./directives/
|
|
8
|
-
import * as i7 from "./directives/
|
|
9
|
-
import * as i8 from "./directives/
|
|
10
|
-
import * as i9 from "./directives/
|
|
11
|
-
import * as i10 from "./directives/scroll-
|
|
12
|
-
import * as i11 from "./directives/
|
|
13
|
-
import * as i12 from "./
|
|
14
|
-
import * as i13 from "./components/
|
|
15
|
-
import * as i14 from "./components/
|
|
16
|
-
import * as i15 from "./components/
|
|
17
|
-
import * as i16 from "./components/
|
|
18
|
-
import * as i17 from "./components/
|
|
19
|
-
import * as i18 from "./components/
|
|
20
|
-
import * as i19 from "./components/
|
|
21
|
-
import * as i20 from "./components/hamburger/
|
|
22
|
-
import * as i21 from "./components/
|
|
23
|
-
import * as i22 from "./components/
|
|
24
|
-
import * as i23 from "./components/
|
|
25
|
-
import * as i24 from "./components/
|
|
26
|
-
import * as i25 from "./components/load-
|
|
27
|
-
import * as i26 from "./components/
|
|
28
|
-
import * as i27 from "./components/
|
|
29
|
-
import * as i28 from "./components/loader/
|
|
30
|
-
import * as i29 from "./components/
|
|
31
|
-
import * as i30 from "./components/modal/
|
|
32
|
-
import * as i31 from "./components/modal/directive/
|
|
33
|
-
import * as i32 from "./components/modal/
|
|
34
|
-
import * as i33 from "./components/modal/
|
|
35
|
-
import * as i34 from "./
|
|
36
|
-
import * as i35 from "
|
|
37
|
-
import * as i36 from "@
|
|
4
|
+
import * as i3 from "./directives/if/if.directive";
|
|
5
|
+
import * as i4 from "./directives/throw-element-on-hover/throw-element-on-hover.directive";
|
|
6
|
+
import * as i5 from "./directives/template-reference/template-reference.directive";
|
|
7
|
+
import * as i6 from "./directives/mouse-down/mouse-down.directive";
|
|
8
|
+
import * as i7 from "./directives/component-size/component-size.directive";
|
|
9
|
+
import * as i8 from "./directives/destroy-parent/destroy-parent.directive";
|
|
10
|
+
import * as i9 from "./directives/dom-changes/dom-changes.directive";
|
|
11
|
+
import * as i10 from "./directives/scroll-tracker/scroll-tracker.directive";
|
|
12
|
+
import * as i11 from "./directives/scroll-into-view/scroll-into-view.directive";
|
|
13
|
+
import * as i12 from "./directives/image-size/image-load.directive";
|
|
14
|
+
import * as i13 from "./components/button/button.component";
|
|
15
|
+
import * as i14 from "./components/tooltip/tooltip.component";
|
|
16
|
+
import * as i15 from "./components/delimeter/delimeter.component";
|
|
17
|
+
import * as i16 from "./components/toggle-switcher/toggle-switcher.component";
|
|
18
|
+
import * as i17 from "./components/checkmark/checkmark.component";
|
|
19
|
+
import * as i18 from "./components/template-content/template-content.component";
|
|
20
|
+
import * as i19 from "./components/close/close.component";
|
|
21
|
+
import * as i20 from "./components/hamburger/default/hamburger.component";
|
|
22
|
+
import * as i21 from "./components/hamburger/menu/hamburger-menu.component";
|
|
23
|
+
import * as i22 from "./components/dots/dots.component";
|
|
24
|
+
import * as i23 from "./components/pagination/pagination.component";
|
|
25
|
+
import * as i24 from "./components/sorting/sorting.component";
|
|
26
|
+
import * as i25 from "./components/load-more-button/load-more-button.component";
|
|
27
|
+
import * as i26 from "./components/load-container/load-container.component";
|
|
28
|
+
import * as i27 from "./components/icon/icon.component";
|
|
29
|
+
import * as i28 from "./components/loader/bounce/bounce-loader.component";
|
|
30
|
+
import * as i29 from "./components/loader/circle/circle-loader.component";
|
|
31
|
+
import * as i30 from "./components/modal/modal.component";
|
|
32
|
+
import * as i31 from "./components/modal/directive/open/modal-open.directive";
|
|
33
|
+
import * as i32 from "./components/modal/directive/click/modal-open-on-click.directive";
|
|
34
|
+
import * as i33 from "./components/modal/header/default/default-modal-header.component";
|
|
35
|
+
import * as i34 from "./components/modal/footer/default/default-modal-footer.component";
|
|
36
|
+
import * as i35 from "./pipes/switch-multi-case/switch-multi-case.pipe";
|
|
37
|
+
import * as i36 from "@angular/common";
|
|
38
|
+
import * as i37 from "@fortawesome/angular-fontawesome";
|
|
38
39
|
export declare class NgxSfcCommonModule {
|
|
39
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSfcCommonModule, never>;
|
|
40
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSfcCommonModule, [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.
|
|
41
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSfcCommonModule, [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.IfDirective, typeof i4.ThrowElementOnHoverDirective, typeof i5.TemplateReferenceDirective, typeof i6.MouseDownDirective, typeof i7.ComponentSizeDirective, typeof i8.DestroyParentDirective, typeof i9.DomChangesDirective, typeof i10.ScrollTrackerDirective, typeof i11.ScrollIntoViewDirective, typeof i12.ImageLoadDirective, typeof i13.ButtonComponent, typeof i14.TooltipComponent, typeof i15.DelimeterComponent, typeof i16.ToggleSwitcherComponent, typeof i17.CheckmarkComponent, typeof i18.TemplateContentComponent, typeof i19.CloseComponent, typeof i20.HamburgerComponent, typeof i21.HamburgerMenuComponent, typeof i22.DotsComponent, typeof i23.PaginationComponent, typeof i24.SortingComponent, typeof i25.LoadMoreButtonComponent, typeof i26.LoadContainerComponent, typeof i27.IconComponent, typeof i28.BounceLoaderComponent, typeof i29.CircleLoaderComponent, typeof i30.ModalComponent, typeof i31.ModalOpenDirective, typeof i32.ModalOpenOnClickDirective, typeof i33.DefaultModalHeaderComponent, typeof i34.DefaultModalFooterComponent, typeof i35.SwitchMultiCasePipe], [typeof i36.CommonModule, typeof i37.FontAwesomeModule], [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.IfDirective, typeof i4.ThrowElementOnHoverDirective, typeof i5.TemplateReferenceDirective, typeof i6.MouseDownDirective, typeof i7.ComponentSizeDirective, typeof i8.DestroyParentDirective, typeof i9.DomChangesDirective, typeof i10.ScrollTrackerDirective, typeof i11.ScrollIntoViewDirective, typeof i12.ImageLoadDirective, typeof i13.ButtonComponent, typeof i14.TooltipComponent, typeof i15.DelimeterComponent, typeof i19.CloseComponent, typeof i17.CheckmarkComponent, typeof i18.TemplateContentComponent, typeof i16.ToggleSwitcherComponent, typeof i22.DotsComponent, typeof i20.HamburgerComponent, typeof i21.HamburgerMenuComponent, typeof i23.PaginationComponent, typeof i24.SortingComponent, typeof i25.LoadMoreButtonComponent, typeof i26.LoadContainerComponent, typeof i27.IconComponent, typeof i28.BounceLoaderComponent, typeof i29.CircleLoaderComponent, typeof i30.ModalComponent, typeof i31.ModalOpenDirective, typeof i32.ModalOpenOnClickDirective, typeof i33.DefaultModalHeaderComponent, typeof i34.DefaultModalFooterComponent, typeof i35.SwitchMultiCasePipe]>;
|
|
41
42
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxSfcCommonModule>;
|
|
42
43
|
}
|
|
@@ -54,6 +54,13 @@ export declare function lastItem<T>(collection: Array<T>): T | null | undefined;
|
|
|
54
54
|
* @returns True if all values match predicate
|
|
55
55
|
*/
|
|
56
56
|
export declare function all<T>(collection: Array<T>, predicate: (item: T) => boolean): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Return count by predicate
|
|
59
|
+
* @param collection Array of objects
|
|
60
|
+
* @param predicate Function to define check logic
|
|
61
|
+
* @returns Items count
|
|
62
|
+
*/
|
|
63
|
+
export declare function count<T>(collection: Array<T>, predicate: (item: T) => boolean): number;
|
|
57
64
|
/**
|
|
58
65
|
* Return items from collection by predicate function
|
|
59
66
|
* @param collection Array of items
|
|
@@ -69,3 +69,10 @@ export declare function isEmail(value: string): boolean;
|
|
|
69
69
|
* @returns parsed string as boolean
|
|
70
70
|
*/
|
|
71
71
|
export declare function parseBoolean(value: string): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Return true if values equal
|
|
74
|
+
* @param obj1 First value to compare
|
|
75
|
+
* @param obj2 Second value to compare
|
|
76
|
+
* @returns True if equal
|
|
77
|
+
*/
|
|
78
|
+
export declare function isEqual(obj1: any, obj2: any): boolean;
|
|
@@ -52,6 +52,12 @@ export declare function setDefaultSecondsAndMiliseconds(date: Date): Date;
|
|
|
52
52
|
* @returns Next date
|
|
53
53
|
*/
|
|
54
54
|
export declare function getNextDate(date: Date): Date;
|
|
55
|
+
/**
|
|
56
|
+
* Get previous date
|
|
57
|
+
* @param date Date value
|
|
58
|
+
* @returns Previous date
|
|
59
|
+
*/
|
|
60
|
+
export declare function getPreviousDate(date: Date): Date;
|
|
55
61
|
/**
|
|
56
62
|
* Get next month as date
|
|
57
63
|
* @param date Date value
|
|
@@ -127,6 +133,13 @@ export declare function getWeeksNumberInMonth(date: Date): number;
|
|
|
127
133
|
* @returns True if first and second date are equal
|
|
128
134
|
*/
|
|
129
135
|
export declare function isEqualDates(date1: Date, date2: Date): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Return true if first and second datetime are equal
|
|
138
|
+
* @param date1 First datetime value
|
|
139
|
+
* @param date2 Second datetime value
|
|
140
|
+
* @returns True if first and second datetime are equal
|
|
141
|
+
*/
|
|
142
|
+
export declare function isEqualDateTimes(date1: Date, date2: Date): boolean;
|
|
130
143
|
/**
|
|
131
144
|
* Return true if first date greater than second date
|
|
132
145
|
* @param date1 First date value
|
|
@@ -155,3 +168,15 @@ export declare function isDateTimeGreat(date1: Date, date2: Date): boolean;
|
|
|
155
168
|
* @returns True if first date time greater or equal to second date time
|
|
156
169
|
*/
|
|
157
170
|
export declare function isDateTimeGreatOrEqual(date1: Date, date2: Date): boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Convert UTC date to local
|
|
173
|
+
* @param date Date value
|
|
174
|
+
* @returns Locale date
|
|
175
|
+
*/
|
|
176
|
+
export declare function convertUTCDateToLocalDate(date: Date): Date;
|
|
177
|
+
/**
|
|
178
|
+
* Convert Json representation of timestamp to date value
|
|
179
|
+
* @param timestamp Timestamp for example - 12:23:45
|
|
180
|
+
* @returns Date value
|
|
181
|
+
*/
|
|
182
|
+
export declare function convertTimestampToDate(timestamp: string): Date;
|
|
@@ -23,3 +23,16 @@ export declare function readAsDataURL(file: File, onLoad: (result: string | Arra
|
|
|
23
23
|
* @returns True if file is image
|
|
24
24
|
*/
|
|
25
25
|
export declare function isImage(file: File): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Convert file to base64 string
|
|
28
|
+
* @param file File value
|
|
29
|
+
* @returns Base64 string
|
|
30
|
+
*/
|
|
31
|
+
export declare function convertToBase64String(file: File): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Convert base64 string to file
|
|
34
|
+
* @param base64 Base64 string
|
|
35
|
+
* @param name File name
|
|
36
|
+
* @returns File value
|
|
37
|
+
*/
|
|
38
|
+
export declare function convertFromBase64String(base64: string, name: string): Promise<File>;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric, isChromeBrowser, isEmail, parseBoolean } from './common.utils';
|
|
1
|
+
export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric, isChromeBrowser, isEmail, parseBoolean, isEqual } from './common.utils';
|
|
2
2
|
export { isNullOrEmptyString, contains, trim } from './string.utils';
|
|
3
|
-
export { setMinutes, setHours, setDay, setYear, setSeconds, setMilliseconds, setDefaultSecondsAndMiliseconds, getNextDate, getNextMonth, getPreviousMonth, getNextYear, getPreviousYear, getFirstDayOfMonth, getLastDayOfMonth, getFirstDayOfYear, getLastDayOfYear, getFirstDayOfMonthByYearAndMonth, getLastDayOfMonthByYearAndMonth, getWeeksNumberInMonth, isEqualDates, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual } from './date-time.utils';
|
|
4
|
-
export { parseFileSize, getFileExtension, readAsDataURL, isImage } from './file.utils';
|
|
3
|
+
export { setMinutes, setHours, setDay, setYear, setSeconds, setMilliseconds, setDefaultSecondsAndMiliseconds, getNextDate, getPreviousDate, getNextMonth, getPreviousMonth, getNextYear, getPreviousYear, getFirstDayOfMonth, getLastDayOfMonth, getFirstDayOfYear, getLastDayOfYear, getFirstDayOfMonthByYearAndMonth, getLastDayOfMonthByYearAndMonth, getWeeksNumberInMonth, isEqualDates, isEqualDateTimes, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual, convertUTCDateToLocalDate, convertTimestampToDate } from './date-time.utils';
|
|
4
|
+
export { parseFileSize, getFileExtension, readAsDataURL, isImage, convertToBase64String, convertFromBase64String } from './file.utils';
|
|
5
5
|
export { getCssLikeValue, getValueFromCssLikeValue, getCalcValue, getRotateValue, addClasses, removeClasses, rgbToHex, hexToRgb, replaceRgbOpacity } from './ui.utils';
|
|
6
|
-
export { any, hasItem, hasItemBy, hasObjectItem, firstOrDefault, firstItem, lastItem, all, where, skip, sort, sortBy, sortByPath, distinct, sum, max, remove, addItem, removeItem, removeItemBy, updateItemBy, getCollectionOrEmpty } from './collections.utils';
|
|
6
|
+
export { any, hasItem, hasItemBy, hasObjectItem, firstOrDefault, firstItem, lastItem, all, where, skip, sort, sortBy, sortByPath, distinct, sum, max, remove, addItem, removeItem, removeItemBy, updateItemBy, getCollectionOrEmpty, count } from './collections.utils';
|
package/package.json
CHANGED
package/styles/_colors.scss
CHANGED
package/styles/_index.scss
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@mixin delimeter-color($direction, $slice, $value-common, $value-dark) {
|
|
2
|
+
@include theme-value(
|
|
3
|
+
border-image,
|
|
4
|
+
linear-gradient(to $direction, $value-common) $slice,
|
|
5
|
+
linear-gradient(to $direction, $value-dark) $slice
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin delimeter-same-as-default() {
|
|
10
|
+
::ng-deep sfc-delimeter {
|
|
11
|
+
&.horizontal {
|
|
12
|
+
&::before {
|
|
13
|
+
@include delimeter-color(right, 100% 1, $delimeter-common-color, $delimeter-common-color);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&::after {
|
|
17
|
+
@include delimeter-color(left, 100% 1, $delimeter-common-color, $delimeter-common-color);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@mixin scroll($selector: "::ng-deep") {
|
|
2
|
+
#{$selector} ::-webkit-scrollbar {
|
|
3
|
+
@include square-size(0.375em);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
#{$selector} ::-webkit-scrollbar-track {
|
|
7
|
+
border-radius: 0.625em;
|
|
8
|
+
background: $color-4;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
#{$selector} ::-webkit-scrollbar-thumb {
|
|
12
|
+
border-radius: 0.625em;
|
|
13
|
+
background: rgb(0 0 0 / 20%);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#{$selector} ::-webkit-scrollbar-thumb:hover {
|
|
17
|
+
background: rgb(0 0 0 / 40%);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#{$selector} ::-webkit-scrollbar-thumb:active {
|
|
21
|
+
background: rgb(0 0 0 / 60%);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin scroll-round-bordered($selector: "::ng-deep") {
|
|
26
|
+
#{$selector} ::-webkit-scrollbar {
|
|
27
|
+
width: 1em;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#{$selector} ::-webkit-scrollbar-thumb {
|
|
31
|
+
border: 0.35em solid rgb(0 0 0 / 0%);
|
|
32
|
+
background-clip: padding-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#{$selector} ::-webkit-scrollbar-track {
|
|
36
|
+
background: transparent;
|
|
37
|
+
}
|
|
38
|
+
}
|