ngx-sfc-common 0.0.4 → 0.0.5

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.
Files changed (84) hide show
  1. package/_ngx-sfc-common.styles.scss +25 -0
  2. package/esm2020/lib/components/button/button.component.mjs +7 -6
  3. package/esm2020/lib/components/checkmark/checkmark-type.enum.mjs +6 -0
  4. package/esm2020/lib/components/checkmark/checkmark.component.mjs +21 -8
  5. package/esm2020/lib/components/index.mjs +7 -2
  6. package/esm2020/lib/components/load-container/load-container.component.mjs +161 -0
  7. package/esm2020/lib/components/load-container/load-container.constants.mjs +5 -0
  8. package/esm2020/lib/components/load-container/load-container.enum.mjs +6 -0
  9. package/esm2020/lib/components/load-container/models/load-container.model.mjs +2 -0
  10. package/esm2020/lib/components/load-container/models/load-more-parameters.model.mjs +2 -0
  11. package/esm2020/lib/components/load-container/models/load-more.model.mjs +2 -0
  12. package/esm2020/lib/components/load-container/service/load-more.service.mjs +27 -0
  13. package/esm2020/lib/components/load-more-button/load-more-button.component.mjs +31 -0
  14. package/esm2020/lib/components/loader/service/loader.service.mjs +4 -4
  15. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +48 -0
  16. package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +29 -0
  17. package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +1 -1
  18. package/esm2020/lib/components/modal/modal.component.mjs +3 -3
  19. package/esm2020/lib/components/modal/service/modal.service.mjs +1 -1
  20. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +9 -3
  21. package/esm2020/lib/constants/common.constants.mjs +2 -1
  22. package/esm2020/lib/constants/date-time.constants.mjs +3 -1
  23. package/esm2020/lib/constants/file.constants.mjs +2 -0
  24. package/esm2020/lib/constants/index.mjs +1 -1
  25. package/esm2020/lib/directives/component-size/component-size.directive.mjs +23 -10
  26. package/esm2020/lib/directives/dom-changes/dom-changes.directive.mjs +32 -0
  27. package/esm2020/lib/directives/index.mjs +4 -1
  28. package/esm2020/lib/directives/scroll-into-view/scroll-into-view.directive.mjs +29 -0
  29. package/esm2020/lib/directives/scroll-tracker/scroll-tracker.directive.mjs +39 -0
  30. package/esm2020/lib/enums/index.mjs +2 -1
  31. package/esm2020/lib/enums/sequence.enum.mjs +9 -0
  32. package/esm2020/lib/enums/ui.enum.mjs +4 -1
  33. package/esm2020/lib/ngx-sfc-common.module.mjs +41 -8
  34. package/esm2020/lib/pipes/index.mjs +2 -0
  35. package/esm2020/lib/pipes/switch-multi-case/switch-multi-case.pipe.mjs +16 -0
  36. package/esm2020/lib/utils/collections.utils.mjs +30 -3
  37. package/esm2020/lib/utils/common.utils.mjs +9 -2
  38. package/esm2020/lib/utils/date-time.utils.mjs +57 -10
  39. package/esm2020/lib/utils/file.utils.mjs +4 -3
  40. package/esm2020/lib/utils/index.mjs +5 -5
  41. package/esm2020/lib/utils/ui.utils.mjs +9 -1
  42. package/esm2020/public-api.mjs +2 -1
  43. package/fesm2015/ngx-sfc-common.mjs +558 -52
  44. package/fesm2015/ngx-sfc-common.mjs.map +1 -1
  45. package/fesm2020/ngx-sfc-common.mjs +558 -52
  46. package/fesm2020/ngx-sfc-common.mjs.map +1 -1
  47. package/lib/components/checkmark/checkmark-type.enum.d.ts +4 -0
  48. package/lib/components/checkmark/checkmark.component.d.ts +5 -2
  49. package/lib/components/index.d.ts +11 -1
  50. package/lib/components/load-container/load-container.component.d.ts +49 -0
  51. package/lib/components/load-container/load-container.constants.d.ts +4 -0
  52. package/lib/components/load-container/load-container.enum.d.ts +4 -0
  53. package/lib/components/load-container/models/load-container.model.d.ts +11 -0
  54. package/lib/components/load-container/models/load-more-parameters.model.d.ts +4 -0
  55. package/lib/components/load-container/models/load-more.model.d.ts +4 -0
  56. package/lib/components/load-container/service/load-more.service.d.ts +12 -0
  57. package/lib/components/load-more-button/load-more-button.component.d.ts +12 -0
  58. package/lib/components/modal/directive/{modal-open-on-click.directive.d.ts → click/modal-open-on-click.directive.d.ts} +1 -1
  59. package/lib/components/modal/directive/open/modal-open.directive.d.ts +14 -0
  60. package/lib/components/modal/service/modal.service.d.ts +1 -1
  61. package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +2 -1
  62. package/lib/constants/common.constants.d.ts +1 -0
  63. package/lib/constants/date-time.constants.d.ts +2 -0
  64. package/lib/constants/file.constants.d.ts +1 -0
  65. package/lib/constants/index.d.ts +1 -0
  66. package/lib/directives/component-size/component-size.directive.d.ts +7 -2
  67. package/lib/directives/dom-changes/dom-changes.directive.d.ts +12 -0
  68. package/lib/directives/index.d.ts +3 -0
  69. package/lib/directives/scroll-into-view/scroll-into-view.directive.d.ts +7 -0
  70. package/lib/directives/scroll-tracker/scroll-tracker.directive.d.ts +11 -0
  71. package/lib/enums/index.d.ts +1 -0
  72. package/lib/enums/sequence.enum.d.ts +7 -0
  73. package/lib/enums/ui.enum.d.ts +4 -1
  74. package/lib/ngx-sfc-common.module.d.ts +28 -21
  75. package/lib/pipes/index.d.ts +1 -0
  76. package/lib/pipes/switch-multi-case/switch-multi-case.pipe.d.ts +7 -0
  77. package/lib/utils/collections.utils.d.ts +16 -2
  78. package/lib/utils/common.utils.d.ts +5 -0
  79. package/lib/utils/date-time.utils.d.ts +26 -0
  80. package/lib/utils/index.d.ts +4 -4
  81. package/lib/utils/ui.utils.d.ts +6 -0
  82. package/package.json +1 -1
  83. package/public-api.d.ts +1 -0
  84. package/esm2020/lib/components/modal/directive/modal-open-on-click.directive.mjs +0 -50
@@ -0,0 +1,4 @@
1
+ export declare enum CheckmarkType {
2
+ Square = "square",
3
+ Rounded = "rounded"
4
+ }
@@ -1,9 +1,12 @@
1
1
  import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
2
+ import { CheckmarkType } from './checkmark-type.enum';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class CheckmarkComponent {
4
5
  active: boolean;
6
+ disabled: boolean;
5
7
  icon: IconDefinition;
6
- onClick: () => boolean;
8
+ type: CheckmarkType;
9
+ showNotActive: boolean;
7
10
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckmarkComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckmarkComponent, "sfc-checkmark", never, { "active": "active"; "icon": "icon"; }, {}, never, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckmarkComponent, "sfc-checkmark", never, { "active": "active"; "disabled": "disabled"; "icon": "icon"; "type": "type"; "showNotActive": "showNotActive"; }, {}, never, never>;
9
12
  }
@@ -9,16 +9,20 @@ export { CircleLoaderType } from './loader/circle/circle-loader-type.enum';
9
9
  export { LoaderService } from './loader/service/loader.service';
10
10
  export { ILoaderEvent } from './loader/loader.event';
11
11
  export { ModalComponent } from './modal/modal.component';
12
- export { ModalOpenOnClickDirective } from './modal/directive/modal-open-on-click.directive';
12
+ export { ModalOpenOnClickDirective } from './modal/directive/click/modal-open-on-click.directive';
13
+ export { ModalOpenDirective } from './modal/directive/open/modal-open.directive';
13
14
  export { ModalService } from './modal/service/modal.service';
14
15
  export { DefaultModalHeaderComponent } from './modal/header/default/default-modal-header.component';
15
16
  export { DefaultModalFooterComponent } from './modal/footer/default/default-modal-footer.component';
17
+ export { IDefaultModalFooterModel } from './modal/footer/default/default-modal-footer.model';
18
+ export { IDefaultModalHeaderModel } from './modal/header/default/default-modal-header.model';
16
19
  export { ModalTemplate } from './modal/modal-template.enum';
17
20
  export { HamburgerComponent } from './hamburger/hamburger.component';
18
21
  export { DotsComponent } from './dots/dots.component';
19
22
  export { ToggleSwitcherComponent } from './toggle-switcher/toggle-switcher.component';
20
23
  export { IToggleSwitcherModel } from './toggle-switcher/toggle-switcher.model';
21
24
  export { CheckmarkComponent } from './checkmark/checkmark.component';
25
+ export { CheckmarkType } from './checkmark/checkmark-type.enum';
22
26
  export { TemplateContentComponent } from './template-content/template-content.component';
23
27
  export { CloseComponent } from './close/close.component';
24
28
  export { PaginationComponent } from './pagination/pagination.component';
@@ -28,3 +32,9 @@ export { SortingComponent } from './sorting/sorting.component';
28
32
  export { SortingService } from './sorting/service/sorting.service';
29
33
  export { ISortingModel } from './sorting/sorting.model';
30
34
  export { ISortingEvent } from './sorting/service/sorting.event';
35
+ export { LoadContainerComponent } from './load-container/load-container.component';
36
+ export { LoadMoreButtonComponent } from './load-more-button/load-more-button.component';
37
+ export { LoadContainerType } from './load-container/load-container.enum';
38
+ export { LoaderFunction, FilterFunction, ILoadContainerModel } from './load-container/models/load-container.model';
39
+ export { ILoadMoreParameters } from './load-container/models/load-more-parameters.model';
40
+ export { ILoadMoreModel } from './load-container/models/load-more.model';
@@ -0,0 +1,49 @@
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import { ComponentSize, Position } from '../../enums';
3
+ import { ILoadMoreModel } from './models/load-more.model';
4
+ import { LoaderService } from '../loader/service/loader.service';
5
+ import { LoadMoreService } from './service/load-more.service';
6
+ import { ILoadContainerModel } from './models/load-container.model';
7
+ import { LoadContainerType } from './load-container.enum';
8
+ import * as i0 from "@angular/core";
9
+ export declare class LoadContainerComponent implements OnDestroy {
10
+ private loaderService;
11
+ private loadMoreService;
12
+ ComponentSize: typeof ComponentSize;
13
+ Position: typeof Position;
14
+ id: string;
15
+ type: LoadContainerType;
16
+ open: boolean;
17
+ size: number;
18
+ loadMore: boolean;
19
+ showEmpty: boolean;
20
+ showLoadMoreButton: boolean;
21
+ loadMoreLabel: string;
22
+ notFoundLabel: string;
23
+ set model(model: ILoadContainerModel);
24
+ scrollTarget: HTMLElement;
25
+ handleError: EventEmitter<any>;
26
+ handleSuccess: EventEmitter<ILoadMoreModel<any>>;
27
+ handleLoading: EventEmitter<boolean>;
28
+ private contentEl;
29
+ next: boolean;
30
+ get scrollPosition(): Position[];
31
+ get allowLoadMore(): boolean;
32
+ get hideLoadMoreButton(): boolean;
33
+ empty: boolean;
34
+ get isEmpty(): boolean;
35
+ private _loading;
36
+ private set loading(value);
37
+ private _subscription;
38
+ constructor(loaderService: LoaderService, loadMoreService: LoadMoreService);
39
+ ngOnDestroy(): void;
40
+ more(event: MouseEvent): void;
41
+ onScroll(): void;
42
+ private success;
43
+ private error;
44
+ private buildParameters;
45
+ private buildDynamic;
46
+ private buildStatic;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadContainerComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadContainerComponent, "sfc-load-container", never, { "id": "id"; "type": "type"; "open": "open"; "size": "size"; "loadMore": "loadMore"; "showEmpty": "showEmpty"; "showLoadMoreButton": "showLoadMoreButton"; "loadMoreLabel": "loadMoreLabel"; "notFoundLabel": "notFoundLabel"; "model": "model"; "scrollTarget": "scrollTarget"; }, { "handleError": "handleError"; "handleSuccess": "handleSuccess"; "handleLoading": "handleLoading"; }, never, ["*"]>;
49
+ }
@@ -0,0 +1,4 @@
1
+ export declare class LoadContainerConstants {
2
+ static DEFAULT_PAGE_SIZE: number;
3
+ static DEFAULT_NOT_FOUND_LABEL: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum LoadContainerType {
2
+ Dropdown = "dropdown",
3
+ Table = "table"
4
+ }
@@ -0,0 +1,11 @@
1
+ import { Observable } from "rxjs";
2
+ import { ILoadMoreModel } from "./load-more.model";
3
+ import { ILoadMoreParameters } from "./load-more-parameters.model";
4
+ export declare type LoaderFunction = (parameters: ILoadMoreParameters) => Observable<ILoadMoreModel<any>>;
5
+ export declare type FilterFunction = (data: any[], parameters: ILoadMoreParameters) => any[];
6
+ export interface ILoadContainerModel {
7
+ predicate$?: Observable<any>;
8
+ data$?: Observable<any[]>;
9
+ loader?: LoaderFunction;
10
+ filter?: FilterFunction;
11
+ }
@@ -0,0 +1,4 @@
1
+ export interface ILoadMoreParameters {
2
+ params: any;
3
+ page: number;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface ILoadMoreModel<T> {
2
+ next: boolean;
3
+ items: T[];
4
+ }
@@ -0,0 +1,12 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LoadMoreService {
4
+ readonly START_PAGE: number;
5
+ private _page;
6
+ private moreSubject;
7
+ more$: Observable<number>;
8
+ more(): void;
9
+ reset(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadMoreService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoadMoreService>;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
3
+ import * as i0 from "@angular/core";
4
+ export declare class LoadMoreButtonComponent implements OnInit {
5
+ private readonly DEFAULT_LABEL;
6
+ label: string;
7
+ icon: IconDefinition;
8
+ more: EventEmitter<MouseEvent>;
9
+ ngOnInit(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadMoreButtonComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadMoreButtonComponent, "sfc-load-more-button", never, { "label": "label"; "icon": "icon"; }, { "more": "more"; }, never, never>;
12
+ }
@@ -1,5 +1,5 @@
1
1
  import { OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { ModalService } from '../service/modal.service';
2
+ import { ModalService } from '../../service/modal.service';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ModalOpenOnClickDirective implements OnInit, OnDestroy {
5
5
  private templateRef;
@@ -0,0 +1,14 @@
1
+ import { OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { ModalService } from '../../service/modal.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ModalOpenDirective implements OnDestroy {
5
+ private templateRef;
6
+ private viewContainer;
7
+ private modalService;
8
+ private _closeSubscription;
9
+ private _openSubscription;
10
+ constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, modalService: ModalService);
11
+ ngOnDestroy(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalOpenDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalOpenDirective, "[sfcModalOpen]", never, {}, {}, never>;
14
+ }
@@ -6,7 +6,7 @@ export declare class ModalService {
6
6
  close$: Observable<void>;
7
7
  open$: Observable<any>;
8
8
  close(): void;
9
- open(options: any): void;
9
+ open(options?: any): void;
10
10
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
11
11
  static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
12
12
  }
@@ -2,10 +2,11 @@ import { IToggleSwitcherModel } from './toggle-switcher.model';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class ToggleSwitcherComponent {
4
4
  active: boolean;
5
+ disabled: boolean;
5
6
  leftModel: IToggleSwitcherModel;
6
7
  rightModel: IToggleSwitcherModel;
7
8
  onClick: () => boolean;
8
9
  constructor();
9
10
  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
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleSwitcherComponent, "sfc-toggle-switcher", never, { "active": "active"; "disabled": "disabled"; "leftModel": "leftModel"; "rightModel": "rightModel"; }, {}, never, never>;
11
12
  }
@@ -3,4 +3,5 @@ export declare class CommonConstants {
3
3
  static EMPTY_STRING: string;
4
4
  static MOUSE_BUTTON_LEFT: number;
5
5
  static FULL_PERCENTAGE: number;
6
+ static COMMON_TEXT_DELIMETER: string;
6
7
  }
@@ -1,6 +1,8 @@
1
1
  export declare class DateTimeConstants {
2
2
  static DAYS_IN_WEEK: number;
3
3
  static HOURS_IN_SHORT_TIME: number;
4
+ static HOURS_IN_TIME: number;
5
+ static MIDNIGHT_HOUR: number;
4
6
  static MINUTES_IN_HOUR: number;
5
7
  static DAYS_OF_WEEK: string[];
6
8
  static DAYS_OF_WEEK_3: string[];
@@ -0,0 +1 @@
1
+ export declare type ImageFormat = 'gif' | 'jpeg' | 'jpg' | 'tiff' | 'png' | 'webp' | 'bmp';
@@ -1,3 +1,4 @@
1
1
  export { CommonConstants } from './common.constants';
2
2
  export { DateTimeConstants } from './date-time.constants';
3
3
  export { UIConstants } from './ui.constants';
4
+ export { ImageFormat } from './file.constants';
@@ -3,11 +3,16 @@ import { ComponentSize } from '../../enums';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ComponentSizeDirective {
5
5
  private el;
6
+ private _size;
6
7
  set size(value: ComponentSize | null | undefined);
7
- set customSize(value: number);
8
+ get size(): ComponentSize | null | undefined;
9
+ private _customSize;
10
+ set customSize(value: number | null);
11
+ get customSize(): number | null;
12
+ get proportion(): number;
8
13
  private get style();
9
14
  constructor(el: ElementRef);
10
- private getSizeValue;
15
+ private getSizeProportion;
11
16
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentSizeDirective, never>;
12
17
  static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentSizeDirective, "[sfcComponentSize]", never, { "size": "sfcComponentSize"; "customSize": "customSize"; }, {}, never>;
13
18
  }
@@ -0,0 +1,12 @@
1
+ import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DomChangesDirective implements OnDestroy {
4
+ private elementRef;
5
+ sfcDomChanges: EventEmitter<MutationRecord>;
6
+ options: MutationObserverInit;
7
+ private changes;
8
+ constructor(elementRef: ElementRef);
9
+ ngOnDestroy(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DomChangesDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DomChangesDirective, "[sfcDomChanges]", never, { "options": "options"; }, { "sfcDomChanges": "sfcDomChanges"; }, never>;
12
+ }
@@ -6,3 +6,6 @@ export { TemplateReferenceDirective } from './template-reference/template-refere
6
6
  export { MouseDownDirective } from './mouse-down/mouse-down.directive';
7
7
  export { ComponentSizeDirective } from './component-size/component-size.directive';
8
8
  export { DestroyParentDirective } from './destroy-parent/destroy-parent.directive';
9
+ export { DomChangesDirective } from './dom-changes/dom-changes.directive';
10
+ export { ScrollTrackerDirective } from './scroll-tracker/scroll-tracker.directive';
11
+ export { ScrollIntoViewDirective } from './scroll-into-view/scroll-into-view.directive';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ScrollIntoViewDirective {
3
+ set sfcScrollIntoView(value: HTMLElement);
4
+ options: ScrollIntoViewOptions;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScrollIntoViewDirective, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollIntoViewDirective, "[sfcScrollIntoView]", never, { "sfcScrollIntoView": "sfcScrollIntoView"; "options": "options"; }, {}, never>;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { Position } from '../../enums';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ScrollTrackerDirective {
5
+ positions: Position[];
6
+ sfcScrollTracker: EventEmitter<Position>;
7
+ private onScroll;
8
+ private getPosition;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScrollTrackerDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ScrollTrackerDirective, "[sfcScrollTracker]", never, { "positions": "positions"; }, { "sfcScrollTracker": "sfcScrollTracker"; }, never>;
11
+ }
@@ -5,3 +5,4 @@ export { Position } from './position.enum';
5
5
  export { SortingDirection } from './sorting-direction.enum';
6
6
  export { Theme } from './theme.enum';
7
7
  export { UIClass } from './ui.enum';
8
+ export { Sequence } from './sequence.enum';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Sequence types
3
+ */
4
+ export declare enum Sequence {
5
+ Previous = "previous",
6
+ Next = "next"
7
+ }
@@ -5,6 +5,7 @@ export declare enum UIClass {
5
5
  Active = "active",
6
6
  Valid = "valid",
7
7
  Invalid = "invalid",
8
+ InnerInvalid = "inner-invalid",
8
9
  Enabled = "enabled",
9
10
  Disabled = "disabled",
10
11
  Selected = "selected",
@@ -20,5 +21,7 @@ export declare enum UIClass {
20
21
  Fixed = "fixed",
21
22
  Bordered = "bordered",
22
23
  Even = "even",
23
- Pointer = "pointer"
24
+ Pointer = "pointer",
25
+ Default = "default",
26
+ Initialization = "initialization"
24
27
  }
@@ -6,28 +6,35 @@ import * as i4 from "./directives/template-reference/template-reference.directiv
6
6
  import * as i5 from "./directives/mouse-down/mouse-down.directive";
7
7
  import * as i6 from "./directives/component-size/component-size.directive";
8
8
  import * as i7 from "./directives/destroy-parent/destroy-parent.directive";
9
- import * as i8 from "./components/button/button.component";
10
- import * as i9 from "./components/tooltip/tooltip.component";
11
- import * as i10 from "./components/delimeter/delimeter.component";
12
- import * as i11 from "./components/toggle-switcher/toggle-switcher.component";
13
- import * as i12 from "./components/checkmark/checkmark.component";
14
- import * as i13 from "./components/template-content/template-content.component";
15
- import * as i14 from "./components/close/close.component";
16
- import * as i15 from "./components/hamburger/hamburger.component";
17
- import * as i16 from "./components/dots/dots.component";
18
- import * as i17 from "./components/pagination/pagination.component";
19
- import * as i18 from "./components/sorting/sorting.component";
20
- import * as i19 from "./components/loader/bounce/bounce-loader.component";
21
- import * as i20 from "./components/loader/circle/circle-loader.component";
22
- import * as i21 from "./components/modal/modal.component";
23
- import * as i22 from "./components/modal/directive/modal-open-on-click.directive";
24
- import * as i23 from "./components/modal/header/default/default-modal-header.component";
25
- import * as i24 from "./components/modal/footer/default/default-modal-footer.component";
26
- import * as i25 from "@angular/common";
27
- import * as i26 from "@angular/platform-browser/animations";
28
- import * as i27 from "@fortawesome/angular-fontawesome";
9
+ import * as i8 from "./directives/dom-changes/dom-changes.directive";
10
+ import * as i9 from "./directives/scroll-tracker/scroll-tracker.directive";
11
+ import * as i10 from "./directives/scroll-into-view/scroll-into-view.directive";
12
+ import * as i11 from "./components/button/button.component";
13
+ import * as i12 from "./components/tooltip/tooltip.component";
14
+ import * as i13 from "./components/delimeter/delimeter.component";
15
+ import * as i14 from "./components/toggle-switcher/toggle-switcher.component";
16
+ import * as i15 from "./components/checkmark/checkmark.component";
17
+ import * as i16 from "./components/template-content/template-content.component";
18
+ import * as i17 from "./components/close/close.component";
19
+ import * as i18 from "./components/hamburger/hamburger.component";
20
+ import * as i19 from "./components/dots/dots.component";
21
+ import * as i20 from "./components/pagination/pagination.component";
22
+ import * as i21 from "./components/sorting/sorting.component";
23
+ import * as i22 from "./components/load-more-button/load-more-button.component";
24
+ import * as i23 from "./components/load-container/load-container.component";
25
+ import * as i24 from "./components/loader/bounce/bounce-loader.component";
26
+ import * as i25 from "./components/loader/circle/circle-loader.component";
27
+ import * as i26 from "./components/modal/modal.component";
28
+ import * as i27 from "./components/modal/directive/open/modal-open.directive";
29
+ import * as i28 from "./components/modal/directive/click/modal-open-on-click.directive";
30
+ import * as i29 from "./components/modal/header/default/default-modal-header.component";
31
+ import * as i30 from "./components/modal/footer/default/default-modal-footer.component";
32
+ import * as i31 from "./pipes/switch-multi-case/switch-multi-case.pipe";
33
+ import * as i32 from "@angular/common";
34
+ import * as i33 from "@angular/platform-browser/animations";
35
+ import * as i34 from "@fortawesome/angular-fontawesome";
29
36
  export declare class NgxSfcCommonModule {
30
37
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxSfcCommonModule, never>;
31
- 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.DestroyParentDirective, typeof i8.ButtonComponent, typeof i9.TooltipComponent, typeof i10.DelimeterComponent, typeof i11.ToggleSwitcherComponent, typeof i12.CheckmarkComponent, typeof i13.TemplateContentComponent, typeof i14.CloseComponent, typeof i15.HamburgerComponent, typeof i16.DotsComponent, typeof i17.PaginationComponent, typeof i18.SortingComponent, typeof i19.BounceLoaderComponent, typeof i20.CircleLoaderComponent, typeof i21.ModalComponent, typeof i22.ModalOpenOnClickDirective, typeof i23.DefaultModalHeaderComponent, typeof i24.DefaultModalFooterComponent], [typeof i25.CommonModule, typeof i26.BrowserAnimationsModule, typeof i27.FontAwesomeModule], [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.ThrowElementOnHoverDirective, typeof i4.TemplateReferenceDirective, typeof i5.MouseDownDirective, typeof i6.ComponentSizeDirective, typeof i7.DestroyParentDirective, typeof i8.ButtonComponent, typeof i9.TooltipComponent, typeof i10.DelimeterComponent, typeof i14.CloseComponent, typeof i12.CheckmarkComponent, typeof i13.TemplateContentComponent, typeof i11.ToggleSwitcherComponent, typeof i16.DotsComponent, typeof i15.HamburgerComponent, typeof i17.PaginationComponent, typeof i18.SortingComponent, typeof i19.BounceLoaderComponent, typeof i20.CircleLoaderComponent, typeof i21.ModalComponent, typeof i22.ModalOpenOnClickDirective, typeof i23.DefaultModalHeaderComponent, typeof i24.DefaultModalFooterComponent]>;
38
+ 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.DestroyParentDirective, typeof i8.DomChangesDirective, typeof i9.ScrollTrackerDirective, typeof i10.ScrollIntoViewDirective, typeof i11.ButtonComponent, typeof i12.TooltipComponent, typeof i13.DelimeterComponent, typeof i14.ToggleSwitcherComponent, typeof i15.CheckmarkComponent, typeof i16.TemplateContentComponent, typeof i17.CloseComponent, typeof i18.HamburgerComponent, typeof i19.DotsComponent, typeof i20.PaginationComponent, typeof i21.SortingComponent, typeof i22.LoadMoreButtonComponent, typeof i23.LoadContainerComponent, typeof i24.BounceLoaderComponent, typeof i25.CircleLoaderComponent, typeof i26.ModalComponent, typeof i27.ModalOpenDirective, typeof i28.ModalOpenOnClickDirective, typeof i29.DefaultModalHeaderComponent, typeof i30.DefaultModalFooterComponent, typeof i31.SwitchMultiCasePipe], [typeof i32.CommonModule, typeof i33.BrowserAnimationsModule, typeof i34.FontAwesomeModule], [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.ThrowElementOnHoverDirective, typeof i4.TemplateReferenceDirective, typeof i5.MouseDownDirective, typeof i6.ComponentSizeDirective, typeof i7.DestroyParentDirective, typeof i8.DomChangesDirective, typeof i9.ScrollTrackerDirective, typeof i10.ScrollIntoViewDirective, typeof i11.ButtonComponent, typeof i12.TooltipComponent, typeof i13.DelimeterComponent, typeof i17.CloseComponent, typeof i15.CheckmarkComponent, typeof i16.TemplateContentComponent, typeof i14.ToggleSwitcherComponent, typeof i19.DotsComponent, typeof i18.HamburgerComponent, typeof i20.PaginationComponent, typeof i21.SortingComponent, typeof i22.LoadMoreButtonComponent, typeof i23.LoadContainerComponent, typeof i24.BounceLoaderComponent, typeof i25.CircleLoaderComponent, typeof i26.ModalComponent, typeof i27.ModalOpenDirective, typeof i28.ModalOpenOnClickDirective, typeof i29.DefaultModalHeaderComponent, typeof i30.DefaultModalFooterComponent, typeof i31.SwitchMultiCasePipe]>;
32
39
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxSfcCommonModule>;
33
40
  }
@@ -0,0 +1 @@
1
+ export { SwitchMultiCasePipe } from './switch-multi-case/switch-multi-case.pipe';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SwitchMultiCasePipe implements PipeTransform {
4
+ transform(cases: any[], switchOption: any): any;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SwitchMultiCasePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<SwitchMultiCasePipe, "sfcSwitchMultiCase">;
7
+ }
@@ -69,6 +69,7 @@ export declare function where<T>(collection: Array<T>, predicate: (item: T) => b
69
69
  * @returns Sliced collection
70
70
  */
71
71
  export declare function skip<T>(collection: Array<T>, page: number, size: number): Array<T>;
72
+ export declare function sort<T>(collection: Array<T>, direction?: SortingDirection): Array<T>;
72
73
  /**
73
74
  * Return sorted collection of objects by property
74
75
  * @param collection Array of items
@@ -119,14 +120,27 @@ export declare function remove<T>(collection: Array<T>, predicate: (item: T) =>
119
120
  * @returns True if successfully added
120
121
  */
121
122
  export declare function addItem<T>(collection: Array<T>, item: T, predicate: (item: T) => boolean): boolean;
123
+ /**
124
+ * Delete item from collection
125
+ * @param collection Array of items
126
+ * @param item Item to delete
127
+ * @returns True if successfully removed
128
+ */
129
+ export declare function removeItem<T>(collection: Array<T>, item: T): boolean;
122
130
  /**
123
131
  * Delete item from collection by predicate
124
132
  * @param collection Array of items
125
133
  * @param predicate Function to define remove logic
126
134
  * @returns True if successfully removed
127
135
  */
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;
136
+ export declare function removeItemBy<T>(collection: Array<T>, predicate: (item: T) => boolean): boolean;
137
+ /**
138
+ * Update item in collection by predicate
139
+ * @param collection Array of items
140
+ * @param predicate Function to define item for deleting
141
+ * @returns True if successfully removed
142
+ */
143
+ export declare function updateItemBy<T>(collection: Array<T>, predicate: (item: T) => boolean, newItem: T): Array<T> | null;
130
144
  /**
131
145
  * Return collection or empty if collection is not defined
132
146
  * @param collection Array of items
@@ -54,3 +54,8 @@ export declare const nameof: <T>(name: keyof T) => keyof T;
54
54
  * @returns - An indication if the input is a Number or can be coerced to a Number
55
55
  */
56
56
  export declare function isNumeric(number: any): boolean;
57
+ /**
58
+ * Return true if current browser is Chrome
59
+ * @returns If current browser is Chrome
60
+ */
61
+ export declare function isChromeBrowser(): boolean;
@@ -26,6 +26,32 @@ export declare function setDay(date: Date, dayNumber: number): Date;
26
26
  * @returns Date with year value
27
27
  */
28
28
  export declare function setYear(date: Date, year: number): Date;
29
+ /**
30
+ * Set seconds for date
31
+ * @param date Date value
32
+ * @param value Seconds value
33
+ * @returns Date with minute value
34
+ */
35
+ export declare function setSeconds(date: Date, value: number): Date;
36
+ /**
37
+ * Set milliseconds for date
38
+ * @param date Date value
39
+ * @param value Milliseconds value
40
+ * @returns Date with minute value
41
+ */
42
+ export declare function setMilliseconds(date: Date, value: number): Date;
43
+ /**
44
+ * Set 0 for seconds and milliseconds of date
45
+ * @param date Date value
46
+ * @returns Date with minute value
47
+ */
48
+ export declare function setDefaultSecondsAndMiliseconds(date: Date): Date;
49
+ /**
50
+ * Get next date
51
+ * @param date Date value
52
+ * @returns Next date
53
+ */
54
+ export declare function getNextDate(date: Date): Date;
29
55
  /**
30
56
  * Get next month as date
31
57
  * @param date Date value
@@ -1,6 +1,6 @@
1
- export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric } from './common.utils';
1
+ export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric, isChromeBrowser } from './common.utils';
2
2
  export { isNullOrEmptyString, contains, trim } from './string.utils';
3
- export { setMinutes, setHours, setDay, setYear, getNextMonth, getPreviousMonth, getNextYear, getPreviousYear, getFirstDayOfMonth, getLastDayOfMonth, getFirstDayOfYear, getLastDayOfYear, getFirstDayOfMonthByYearAndMonth, getLastDayOfMonthByYearAndMonth, getWeeksNumberInMonth, isEqualDates, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual } from './date-time.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
4
  export { parseFileSize, getFileExtension, readAsDataURL, isImage } from './file.utils';
5
- export { getCssLikeValue, getValueFromCssLikeValue, getCalcValue, addClasses, removeClasses, rgbToHex, hexToRgb, replaceRgbOpacity } from './ui.utils';
6
- export { any, hasItem, hasItemBy, hasObjectItem, firstOrDefault, firstItem, lastItem, all, where, skip, sortBy, sortByPath, distinct, sum, max, remove, addItem, removeItem, updateItem, getCollectionOrEmpty } from './collections.utils';
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';
@@ -17,6 +17,12 @@ export declare function getValueFromCssLikeValue(value: string, type?: string):
17
17
  * @returns Calc value
18
18
  */
19
19
  export declare function getCalcValue(part: number, value?: number): string;
20
+ /**
21
+ * Return CCS like rotate value
22
+ * @param value value as degrees
23
+ * @returns Rotate value
24
+ */
25
+ export declare function getRotateValue(value: number): string;
20
26
  /**
21
27
  * Add classes to HTML element
22
28
  * @param element HTML element
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-sfc-common",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Angular common(shared) library for SFC project",
5
5
  "keywords": [
6
6
  "Street Football Club",
package/public-api.d.ts CHANGED
@@ -4,4 +4,5 @@ export * from './lib/enums';
4
4
  export * from './lib/utils';
5
5
  export * from './lib/services';
6
6
  export * from './lib/directives';
7
+ export * from './lib/pipes';
7
8
  export * from './lib/components';
@@ -1,50 +0,0 @@
1
- import { Directive, Input } from '@angular/core';
2
- import { isDefined } from '../../../utils';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "../service/modal.service";
5
- export class ModalOpenOnClickDirective {
6
- constructor(templateRef, viewContainer, modalService) {
7
- this.templateRef = templateRef;
8
- this.viewContainer = viewContainer;
9
- this.modalService = modalService;
10
- this.clickHandler = ((event) => {
11
- this.viewContainer.clear();
12
- this.viewContainer.createEmbeddedView(this.templateRef);
13
- this.modalService.open(event.currentTarget);
14
- }).bind(this);
15
- this.elements = [];
16
- }
17
- set modalOpenOnClick(elements) {
18
- if (!isDefined(elements))
19
- return;
20
- if (elements instanceof HTMLElement)
21
- this.elements = [elements];
22
- else
23
- this.elements = elements;
24
- this.elements.forEach(el => {
25
- el.addEventListener('click', this.clickHandler);
26
- });
27
- }
28
- ngOnInit() {
29
- this._closeSubscription = this.modalService.close$
30
- .subscribe(() => {
31
- this.viewContainer.clear();
32
- });
33
- }
34
- ngOnDestroy() {
35
- this._closeSubscription?.unsubscribe();
36
- this.elements.forEach(el => el.removeEventListener('click', this.clickHandler));
37
- }
38
- }
39
- ModalOpenOnClickDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ModalOpenOnClickDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Directive });
40
- ModalOpenOnClickDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: ModalOpenOnClickDirective, selector: "[sfcModalOpenOnClick]", inputs: { modalOpenOnClick: ["sfcModalOpenOnClick", "modalOpenOnClick"] }, ngImport: i0 });
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ModalOpenOnClickDirective, decorators: [{
42
- type: Directive,
43
- args: [{
44
- selector: '[sfcModalOpenOnClick]'
45
- }]
46
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i1.ModalService }]; }, propDecorators: { modalOpenOnClick: [{
47
- type: Input,
48
- args: ['sfcModalOpenOnClick']
49
- }] } });
50
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtb3Blbi1vbi1jb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