ngx-sfc-common 0.0.26 → 0.0.28

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 (87) hide show
  1. package/components/button/button.component.mixins.scss +28 -0
  2. package/esm2020/lib/components/checkmark/checkmark.component.mjs +8 -4
  3. package/esm2020/lib/components/index.mjs +2 -1
  4. package/esm2020/lib/components/load-container/enums/load-container-load-type.enum.mjs +2 -1
  5. package/esm2020/lib/components/load-container/enums/load-container-type.enum.mjs +2 -1
  6. package/esm2020/lib/components/load-container/load-container.component.mjs +21 -17
  7. package/esm2020/lib/components/load-container/models/load-container-predicate-parameters.model.mjs +1 -1
  8. package/esm2020/lib/components/message/message.component.mjs +22 -0
  9. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +14 -12
  10. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.model.mjs +2 -0
  11. package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +10 -4
  12. package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +16 -17
  13. package/esm2020/lib/components/modal/footer/default/default-modal-footer.constants.mjs +10 -0
  14. package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +13 -14
  15. package/esm2020/lib/components/modal/header/default/default-modal-header.constants.mjs +9 -0
  16. package/esm2020/lib/components/modal/modal.component.mjs +43 -12
  17. package/esm2020/lib/components/modal/service/modal.event.mjs +1 -1
  18. package/esm2020/lib/components/modal/service/modal.service.mjs +17 -13
  19. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +10 -4
  20. package/esm2020/lib/constants/ui.constants.mjs +2 -1
  21. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -2
  22. package/esm2020/lib/directives/if/if.directive.mjs +5 -1
  23. package/esm2020/lib/enums/index.mjs +5 -1
  24. package/esm2020/lib/enums/items-view.enum.mjs +7 -0
  25. package/esm2020/lib/enums/notification-type.enum.mjs +7 -0
  26. package/esm2020/lib/enums/select.enum.mjs +6 -0
  27. package/esm2020/lib/enums/state.enum.mjs +6 -0
  28. package/esm2020/lib/models/index.mjs +2 -2
  29. package/esm2020/lib/models/observable.model.mjs +10 -0
  30. package/esm2020/lib/models/select.model.mjs +2 -0
  31. package/esm2020/lib/ngx-sfc-common.module.mjs +15 -7
  32. package/esm2020/lib/pipes/index.mjs +2 -1
  33. package/esm2020/lib/pipes/repeat/repeat.pipe.mjs +14 -0
  34. package/esm2020/lib/pipes/sort-by/sort-by.pipe.mjs +4 -3
  35. package/esm2020/lib/pipes/switch-multi-case/switch-multi-case.pipe.mjs +2 -4
  36. package/esm2020/lib/services/index.mjs +2 -1
  37. package/esm2020/lib/services/reload/reload.service.mjs +21 -0
  38. package/esm2020/lib/utils/collections.utils.mjs +27 -1
  39. package/esm2020/lib/utils/common.utils.mjs +39 -7
  40. package/esm2020/lib/utils/date-time.utils.mjs +33 -1
  41. package/esm2020/lib/utils/http.utils.mjs +3 -1
  42. package/esm2020/lib/utils/index.mjs +4 -4
  43. package/esm2020/public-api.mjs +2 -1
  44. package/fesm2015/ngx-sfc-common.mjs +414 -157
  45. package/fesm2015/ngx-sfc-common.mjs.map +1 -1
  46. package/fesm2020/ngx-sfc-common.mjs +411 -155
  47. package/fesm2020/ngx-sfc-common.mjs.map +1 -1
  48. package/lib/components/checkmark/checkmark.component.d.ts +1 -0
  49. package/lib/components/index.d.ts +1 -0
  50. package/lib/components/load-container/enums/load-container-load-type.enum.d.ts +1 -0
  51. package/lib/components/load-container/enums/load-container-type.enum.d.ts +2 -1
  52. package/lib/components/load-container/load-container.component.d.ts +3 -2
  53. package/lib/components/load-container/models/load-container-predicate-parameters.model.d.ts +1 -0
  54. package/lib/components/message/message.component.d.ts +9 -0
  55. package/lib/components/modal/directive/click/modal-open-on-click.directive.d.ts +5 -2
  56. package/lib/components/modal/directive/click/modal-open-on-click.model.d.ts +4 -0
  57. package/lib/components/modal/directive/open/modal-open.directive.d.ts +2 -1
  58. package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +4 -3
  59. package/lib/components/modal/footer/default/default-modal-footer.constants.d.ts +5 -0
  60. package/lib/components/modal/header/default/default-modal-header.component.d.ts +2 -2
  61. package/lib/components/modal/header/default/default-modal-header.constants.d.ts +4 -0
  62. package/lib/components/modal/modal.component.d.ts +14 -5
  63. package/lib/components/modal/service/modal.event.d.ts +1 -0
  64. package/lib/components/modal/service/modal.service.d.ts +7 -6
  65. package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +4 -2
  66. package/lib/constants/ui.constants.d.ts +1 -0
  67. package/lib/directives/if/if.directive.d.ts +1 -1
  68. package/lib/enums/index.d.ts +4 -0
  69. package/lib/enums/items-view.enum.d.ts +5 -0
  70. package/lib/enums/notification-type.enum.d.ts +5 -0
  71. package/lib/enums/select.enum.d.ts +4 -0
  72. package/lib/enums/state.enum.d.ts +4 -0
  73. package/lib/models/index.d.ts +2 -0
  74. package/lib/models/observable.model.d.ts +8 -0
  75. package/lib/models/select.model.d.ts +4 -0
  76. package/lib/ngx-sfc-common.module.d.ts +14 -12
  77. package/lib/pipes/index.d.ts +1 -0
  78. package/lib/pipes/repeat/repeat.pipe.d.ts +7 -0
  79. package/lib/services/index.d.ts +1 -0
  80. package/lib/services/reload/reload.service.d.ts +9 -0
  81. package/lib/utils/collections.utils.d.ts +14 -0
  82. package/lib/utils/common.utils.d.ts +18 -6
  83. package/lib/utils/date-time.utils.d.ts +22 -1
  84. package/lib/utils/index.d.ts +3 -3
  85. package/package.json +1 -1
  86. package/public-api.d.ts +1 -0
  87. package/styles/_mixins.scss +11 -0
@@ -6,6 +6,7 @@ export declare class CheckmarkComponent {
6
6
  disabled: boolean;
7
7
  icon: IconDefinition;
8
8
  type: CheckmarkType;
9
+ onClick(): void;
9
10
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckmarkComponent, never>;
10
11
  static ɵcmp: i0.ɵɵComponentDeclaration<CheckmarkComponent, "sfc-checkmark", never, { "active": "active"; "disabled": "disabled"; "icon": "icon"; "type": "type"; }, {}, never, never, false, never>;
11
12
  }
@@ -44,3 +44,4 @@ export { IconComponent } from './icon/icon.component';
44
44
  export { CollapseExpandComponent } from './collapse-expand/collapse-expand.component';
45
45
  export { CollapseExpandContainerComponent } from './collapse-expand-container/collapse-expand-container.component';
46
46
  export { ToggleComponent } from './toggle/toggle.component';
47
+ export { MessageComponent } from './message/message.component';
@@ -1,4 +1,5 @@
1
1
  export declare enum LoadContainerLoadType {
2
+ Common = "common",
2
3
  Button = "button",
3
4
  Scroll = "scroll",
4
5
  Pagination = "pagination"
@@ -1,4 +1,5 @@
1
1
  export declare enum LoadContainerType {
2
2
  Dropdown = "dropdown",
3
- Table = "table"
3
+ Table = "table",
4
+ Container = "container"
4
5
  }
@@ -3,7 +3,7 @@ import { ComponentSize, Position } from '../../enums';
3
3
  import { ILoadContainerResultModel } from './models/load-container-result.model';
4
4
  import { LoaderService } from '../loader/service/loader.service';
5
5
  import { ILoadContainerModel } from './models/load-container.model';
6
- import { LoadMoreService, PaginationService, SortingService } from '../../services';
6
+ import { LoadMoreService, PaginationService, ReloadService, SortingService } from '../../services';
7
7
  import { LoadContainerType } from './enums/load-container-type.enum';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class LoadContainerComponent implements OnDestroy {
@@ -11,6 +11,7 @@ export declare class LoadContainerComponent implements OnDestroy {
11
11
  private loadMoreService;
12
12
  private paginationService;
13
13
  private sortingService;
14
+ private reloadService;
14
15
  ComponentSize: typeof ComponentSize;
15
16
  Position: typeof Position;
16
17
  id: string;
@@ -48,7 +49,7 @@ export declare class LoadContainerComponent implements OnDestroy {
48
49
  private _subscription;
49
50
  private source;
50
51
  private predicateChanged;
51
- constructor(loaderService: LoaderService, loadMoreService: LoadMoreService, paginationService: PaginationService, sortingService: SortingService);
52
+ constructor(loaderService: LoaderService, loadMoreService: LoadMoreService, paginationService: PaginationService, sortingService: SortingService, reloadService: ReloadService);
52
53
  ngOnDestroy(): void;
53
54
  more(event: MouseEvent): void;
54
55
  onScroll(): void;
@@ -1,3 +1,4 @@
1
1
  export interface ILoadContainerPredicateParameters {
2
2
  value: any;
3
+ reload?: boolean;
3
4
  }
@@ -0,0 +1,9 @@
1
+ import { NotificationType } from '../../enums';
2
+ import { empty } from '../../types';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MessageComponent {
5
+ message: string | empty;
6
+ type: NotificationType;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "sfc-message", never, { "message": "message"; "type": "type"; }, {}, never, never, false, never>;
9
+ }
@@ -1,13 +1,16 @@
1
1
  import { OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
2
2
  import { ModalService } from '../../service/modal.service';
3
+ import { IModalOpenOnClickModel } from './modal-open-on-click.model';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class ModalOpenOnClickDirective implements OnInit, OnDestroy {
5
6
  private templateRef;
6
7
  private viewContainer;
7
8
  private modalService;
8
- set modalOpenOnClick(elements: HTMLElement | HTMLElement[]);
9
- private clickHandler;
9
+ set modalOpenOnClick(model: IModalOpenOnClickModel);
10
+ private _id;
11
+ get id(): string;
10
12
  private elements;
13
+ private clickHandler;
11
14
  private _closeSubscription?;
12
15
  constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, modalService: ModalService);
13
16
  ngOnInit(): void;
@@ -0,0 +1,4 @@
1
+ export interface IModalOpenOnClickModel {
2
+ id: string;
3
+ elements: HTMLElement | HTMLElement[];
4
+ }
@@ -5,9 +5,10 @@ export declare class ModalOpenDirective implements OnDestroy {
5
5
  private templateRef;
6
6
  private viewContainer;
7
7
  private modalService;
8
+ id: string;
8
9
  private _openSubscription;
9
10
  constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, modalService: ModalService);
10
11
  ngOnDestroy(): void;
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalOpenDirective, never>;
12
- static ɵdir: i0.ɵɵDirectiveDeclaration<ModalOpenDirective, "[sfcModalOpen]", never, {}, {}, never, never, false, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalOpenDirective, "[sfcModalOpen]", never, { "id": "sfcModalOpen"; }, {}, never, never, false, never>;
13
14
  }
@@ -3,17 +3,18 @@ import { IDefaultModalFooterModel } from './default-modal-footer.model';
3
3
  import { ButtonType } from '../../../button/button-type.enum';
4
4
  import { ComponentSize } from '../../../../enums';
5
5
  import { ModalService } from '../../service/modal.service';
6
+ import { DefaultModalFooterConstants } from './default-modal-footer.constants';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class DefaultModalFooterComponent implements OnInit {
8
9
  private modalService;
9
- private readonly DEFAULT_MODAL_FOOTER_MODEL;
10
- readonly BUTTON_CUSTOM_SIZE = 0.9;
11
10
  ComponentSize: typeof ComponentSize;
12
11
  ButtonType: typeof ButtonType;
12
+ Constants: typeof DefaultModalFooterConstants;
13
+ id: string;
13
14
  model: IDefaultModalFooterModel;
14
15
  constructor(modalService: ModalService);
15
16
  ngOnInit(): void;
16
17
  onButtonClick(isCancelButton?: boolean): void;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<DefaultModalFooterComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultModalFooterComponent, "sfc-default-modal-footer", never, { "model": "model"; }, {}, never, never, false, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DefaultModalFooterComponent, "sfc-default-modal-footer", never, { "id": "id"; "model": "model"; }, {}, never, never, false, never>;
19
20
  }
@@ -0,0 +1,5 @@
1
+ import { IDefaultModalFooterModel } from "./default-modal-footer.model";
2
+ export declare class DefaultModalFooterConstants {
3
+ static BUTTON_CUSTOM_SIZE: number;
4
+ static DEFAULT_MODAL_FOOTER_MODEL: IDefaultModalFooterModel;
5
+ }
@@ -5,12 +5,12 @@ import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class DefaultModalHeaderComponent implements OnInit {
7
7
  private modalService;
8
- private readonly DEFAULT_MODAL_HEADER_MODEL;
8
+ id: string;
9
9
  model: IDefaultModalHeaderModel;
10
10
  get icon(): IconDefinition;
11
11
  constructor(modalService: ModalService);
12
12
  ngOnInit(): void;
13
13
  onClose(): void;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<DefaultModalHeaderComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<DefaultModalHeaderComponent, "sfc-default-modal-header", never, { "model": "model"; }, {}, never, never, false, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<DefaultModalHeaderComponent, "sfc-default-modal-header", never, { "id": "id"; "model": "model"; }, {}, never, never, false, never>;
16
16
  }
@@ -0,0 +1,4 @@
1
+ import { IDefaultModalHeaderModel } from "./default-modal-header.model";
2
+ export declare class DefaultModalHeaderConstants {
3
+ static DEFAULT_MODAL_HEADER_MODEL: IDefaultModalHeaderModel;
4
+ }
@@ -1,12 +1,17 @@
1
- import { QueryList, TemplateRef } from '@angular/core';
1
+ import { AfterViewInit, OnDestroy, QueryList, TemplateRef } from '@angular/core';
2
+ import { ModalOpenDirective } from './directive/open/modal-open.directive';
2
3
  import { TemplateReferenceDirective } from '../../directives';
3
4
  import { IDefaultModalFooterModel } from './footer/default/default-modal-footer.model';
4
5
  import { IDefaultModalHeaderModel } from './header/default/default-modal-header.model';
5
6
  import { ModalTemplate } from './modal-template.enum';
6
7
  import { ModalService } from './service/modal.service';
8
+ import { ModalOpenOnClickDirective } from './directive/click/modal-open-on-click.directive';
7
9
  import * as i0 from "@angular/core";
8
- export declare class ModalComponent {
9
- private modalService;
10
+ export declare class ModalComponent implements AfterViewInit, OnDestroy {
11
+ modalService: ModalService;
12
+ private document;
13
+ private openDirective;
14
+ private openOnClickDirective;
10
15
  ModalTemplate: typeof ModalTemplate;
11
16
  body?: TemplateRef<any>;
12
17
  header?: TemplateRef<any>;
@@ -19,8 +24,12 @@ export declare class ModalComponent {
19
24
  showFooter: boolean;
20
25
  onEscapeKeyDownHandler(): void;
21
26
  templates: QueryList<TemplateReferenceDirective> | undefined;
22
- constructor(modalService: ModalService);
27
+ get id(): string;
28
+ private bodyOverflow;
29
+ constructor(modalService: ModalService, document: Document, openDirective: ModalOpenDirective, openOnClickDirective: ModalOpenOnClickDirective);
30
+ ngAfterViewInit(): void;
31
+ ngOnDestroy(): void;
23
32
  close(): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, [null, null, { optional: true; }, { optional: true; }]>;
25
34
  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>;
26
35
  }
@@ -1,4 +1,5 @@
1
1
  export interface IModalEvent {
2
+ id: string;
2
3
  open: boolean;
3
4
  args?: any;
4
5
  }
@@ -2,13 +2,14 @@ import { Observable } from 'rxjs';
2
2
  import { IModalEvent } from './modal.event';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ModalService {
5
- private subject;
6
- modal$: Observable<IModalEvent>;
7
- get isOpen(): boolean;
5
+ private model;
6
+ get modal$(): Observable<IModalEvent>;
7
+ isOpen: boolean;
8
8
  args: any;
9
- toggle(): void;
10
- close(): void;
11
- open(args?: any): void;
9
+ toggle(id: any, args?: any): void;
10
+ close(id: any, args?: any): void;
11
+ open(id: any, args?: any): void;
12
+ private emit;
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
13
14
  static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
14
15
  }
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from '@angular/core';
1
2
  import { IToggleSwitcherModel } from './toggle-switcher.model';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class ToggleSwitcherComponent {
@@ -5,8 +6,9 @@ export declare class ToggleSwitcherComponent {
5
6
  disabled: boolean;
6
7
  leftModel: IToggleSwitcherModel;
7
8
  rightModel: IToggleSwitcherModel;
8
- onClick: () => boolean;
9
+ toggle: EventEmitter<boolean>;
10
+ onClick: () => void;
9
11
  constructor();
10
12
  static ɵfac: i0.ɵɵFactoryDeclaration<ToggleSwitcherComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<ToggleSwitcherComponent, "sfc-toggle-switcher", never, { "active": "active"; "disabled": "disabled"; "leftModel": "leftModel"; "rightModel": "rightModel"; }, {}, never, never, false, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleSwitcherComponent, "sfc-toggle-switcher", never, { "active": "active"; "disabled": "disabled"; "leftModel": "leftModel"; "rightModel": "rightModel"; }, { "toggle": "toggle"; }, never, never, false, never>;
12
14
  }
@@ -18,5 +18,6 @@ export declare class UIConstants {
18
18
  static CSS_CLASS_FIXED: string;
19
19
  static CSS_CLASS_BACKGROUND: string;
20
20
  static CSS_CLASS_TOP: string;
21
+ static CSS_CLASS_SCROLL: string;
21
22
  static RGB_OPACITY_PLACEHOLDER: string;
22
23
  }
@@ -3,8 +3,8 @@ import * as i0 from "@angular/core";
3
3
  export declare class IfDirective {
4
4
  private el;
5
5
  set sfcIf(show: boolean);
6
- private display;
7
6
  private get style();
7
+ private display;
8
8
  constructor(el: ElementRef);
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<IfDirective, never>;
10
10
  static ɵdir: i0.ɵɵDirectiveDeclaration<IfDirective, "[sfcIf]", never, { "sfcIf": "sfcIf"; }, {}, never, never, false, never>;
@@ -7,3 +7,7 @@ export { Theme } from './theme.enum';
7
7
  export { UIClass } from './ui.enum';
8
8
  export { Sequence } from './sequence.enum';
9
9
  export { Compare } from './compare.enum';
10
+ export { State } from './state.enum';
11
+ export { NotificationType } from './notification-type.enum';
12
+ export { Select } from './select.enum';
13
+ export { ItemsView } from './items-view.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum ItemsView {
2
+ List = "list",
3
+ Icons = "icons",
4
+ Cards = "cards"
5
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum NotificationType {
2
+ Info = "info",
3
+ Success = "success",
4
+ Failed = "failed"
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum Select {
2
+ Single = "single",
3
+ Multiple = "multiple"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum State {
2
+ Added = "added",
3
+ Removed = "removed"
4
+ }
@@ -1 +1,3 @@
1
1
  export { IClassModel } from './class.model';
2
+ export { ISelectModel } from './select.model';
3
+ export { ObservableModel } from './observable.model';
@@ -0,0 +1,8 @@
1
+ import { BehaviorSubject, Observable } from "rxjs";
2
+ export declare class ObservableModel<T> {
3
+ private defaultValue;
4
+ constructor(defaultValue?: T | null);
5
+ subject: BehaviorSubject<T>;
6
+ value$: Observable<T>;
7
+ get value(): T | null;
8
+ }
@@ -0,0 +1,4 @@
1
+ export interface ISelectModel {
2
+ active: boolean;
3
+ disabled: boolean;
4
+ }
@@ -31,19 +31,21 @@ import * as i29 from "./components/icon/icon.component";
31
31
  import * as i30 from "./components/collapse-expand/collapse-expand.component";
32
32
  import * as i31 from "./components/collapse-expand-container/collapse-expand-container.component";
33
33
  import * as i32 from "./components/toggle/toggle.component";
34
- import * as i33 from "./components/loader/bounce/bounce-loader.component";
35
- import * as i34 from "./components/loader/circle/circle-loader.component";
36
- import * as i35 from "./components/modal/modal.component";
37
- import * as i36 from "./components/modal/directive/open/modal-open.directive";
38
- import * as i37 from "./components/modal/directive/click/modal-open-on-click.directive";
39
- import * as i38 from "./components/modal/header/default/default-modal-header.component";
40
- import * as i39 from "./components/modal/footer/default/default-modal-footer.component";
41
- import * as i40 from "./pipes/switch-multi-case/switch-multi-case.pipe";
42
- import * as i41 from "./pipes/sort-by/sort-by.pipe";
43
- import * as i42 from "@angular/common";
44
- import * as i43 from "@fortawesome/angular-fontawesome";
34
+ import * as i33 from "./components/message/message.component";
35
+ import * as i34 from "./components/loader/bounce/bounce-loader.component";
36
+ import * as i35 from "./components/loader/circle/circle-loader.component";
37
+ import * as i36 from "./components/modal/modal.component";
38
+ import * as i37 from "./components/modal/directive/open/modal-open.directive";
39
+ import * as i38 from "./components/modal/directive/click/modal-open-on-click.directive";
40
+ import * as i39 from "./components/modal/header/default/default-modal-header.component";
41
+ import * as i40 from "./components/modal/footer/default/default-modal-footer.component";
42
+ import * as i41 from "./pipes/switch-multi-case/switch-multi-case.pipe";
43
+ import * as i42 from "./pipes/sort-by/sort-by.pipe";
44
+ import * as i43 from "./pipes/repeat/repeat.pipe";
45
+ import * as i44 from "@angular/common";
46
+ import * as i45 from "@fortawesome/angular-fontawesome";
45
47
  export declare class NgxSfcCommonModule {
46
48
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxSfcCommonModule, never>;
47
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSfcCommonModule, [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.CollapseExpandDirective, typeof i4.IfDirective, typeof i5.ThrowElementOnHoverDirective, typeof i6.TemplateReferenceDirective, typeof i7.MouseDownDirective, typeof i8.ComponentSizeDirective, typeof i9.DestroyParentDirective, typeof i10.DomChangesDirective, typeof i11.ScrollTrackerDirective, typeof i12.ScrollIntoViewDirective, typeof i13.ImageLoadDirective, typeof i14.ComponentReferenceDirective, typeof i15.ButtonComponent, typeof i16.TooltipComponent, typeof i17.DelimeterComponent, typeof i18.ToggleSwitcherComponent, typeof i19.CheckmarkComponent, typeof i20.TemplateContentComponent, typeof i21.CloseComponent, typeof i22.HamburgerComponent, typeof i23.HamburgerMenuComponent, typeof i24.DotComponent, typeof i25.DotsComponent, typeof i26.PaginationComponent, typeof i27.LoadMoreButtonComponent, typeof i28.LoadContainerComponent, typeof i29.IconComponent, typeof i30.CollapseExpandComponent, typeof i31.CollapseExpandContainerComponent, typeof i32.ToggleComponent, typeof i33.BounceLoaderComponent, typeof i34.CircleLoaderComponent, typeof i35.ModalComponent, typeof i36.ModalOpenDirective, typeof i37.ModalOpenOnClickDirective, typeof i38.DefaultModalHeaderComponent, typeof i39.DefaultModalFooterComponent, typeof i40.SwitchMultiCasePipe, typeof i41.SortByPipe], [typeof i42.CommonModule, typeof i43.FontAwesomeModule], [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.CollapseExpandDirective, typeof i4.IfDirective, typeof i5.ThrowElementOnHoverDirective, typeof i6.TemplateReferenceDirective, typeof i7.MouseDownDirective, typeof i8.ComponentSizeDirective, typeof i9.DestroyParentDirective, typeof i10.DomChangesDirective, typeof i11.ScrollTrackerDirective, typeof i12.ScrollIntoViewDirective, typeof i13.ImageLoadDirective, typeof i14.ComponentReferenceDirective, typeof i15.ButtonComponent, typeof i16.TooltipComponent, typeof i17.DelimeterComponent, typeof i21.CloseComponent, typeof i19.CheckmarkComponent, typeof i20.TemplateContentComponent, typeof i18.ToggleSwitcherComponent, typeof i24.DotComponent, typeof i25.DotsComponent, typeof i22.HamburgerComponent, typeof i23.HamburgerMenuComponent, typeof i26.PaginationComponent, typeof i27.LoadMoreButtonComponent, typeof i28.LoadContainerComponent, typeof i29.IconComponent, typeof i30.CollapseExpandComponent, typeof i31.CollapseExpandContainerComponent, typeof i32.ToggleComponent, typeof i33.BounceLoaderComponent, typeof i34.CircleLoaderComponent, typeof i35.ModalComponent, typeof i36.ModalOpenDirective, typeof i37.ModalOpenOnClickDirective, typeof i38.DefaultModalHeaderComponent, typeof i39.DefaultModalFooterComponent, typeof i40.SwitchMultiCasePipe, typeof i41.SortByPipe]>;
49
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxSfcCommonModule, [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.CollapseExpandDirective, typeof i4.IfDirective, typeof i5.ThrowElementOnHoverDirective, typeof i6.TemplateReferenceDirective, typeof i7.MouseDownDirective, typeof i8.ComponentSizeDirective, typeof i9.DestroyParentDirective, typeof i10.DomChangesDirective, typeof i11.ScrollTrackerDirective, typeof i12.ScrollIntoViewDirective, typeof i13.ImageLoadDirective, typeof i14.ComponentReferenceDirective, typeof i15.ButtonComponent, typeof i16.TooltipComponent, typeof i17.DelimeterComponent, typeof i18.ToggleSwitcherComponent, typeof i19.CheckmarkComponent, typeof i20.TemplateContentComponent, typeof i21.CloseComponent, typeof i22.HamburgerComponent, typeof i23.HamburgerMenuComponent, typeof i24.DotComponent, typeof i25.DotsComponent, typeof i26.PaginationComponent, typeof i27.LoadMoreButtonComponent, typeof i28.LoadContainerComponent, typeof i29.IconComponent, typeof i30.CollapseExpandComponent, typeof i31.CollapseExpandContainerComponent, typeof i32.ToggleComponent, typeof i33.MessageComponent, typeof i34.BounceLoaderComponent, typeof i35.CircleLoaderComponent, typeof i36.ModalComponent, typeof i37.ModalOpenDirective, typeof i38.ModalOpenOnClickDirective, typeof i39.DefaultModalHeaderComponent, typeof i40.DefaultModalFooterComponent, typeof i41.SwitchMultiCasePipe, typeof i42.SortByPipe, typeof i43.RepeatPipe], [typeof i44.CommonModule, typeof i45.FontAwesomeModule], [typeof i1.ClickOutsideDirective, typeof i2.ShowHideElementDirective, typeof i3.CollapseExpandDirective, typeof i4.IfDirective, typeof i5.ThrowElementOnHoverDirective, typeof i6.TemplateReferenceDirective, typeof i7.MouseDownDirective, typeof i8.ComponentSizeDirective, typeof i9.DestroyParentDirective, typeof i10.DomChangesDirective, typeof i11.ScrollTrackerDirective, typeof i12.ScrollIntoViewDirective, typeof i13.ImageLoadDirective, typeof i14.ComponentReferenceDirective, typeof i15.ButtonComponent, typeof i16.TooltipComponent, typeof i17.DelimeterComponent, typeof i21.CloseComponent, typeof i19.CheckmarkComponent, typeof i20.TemplateContentComponent, typeof i18.ToggleSwitcherComponent, typeof i24.DotComponent, typeof i25.DotsComponent, typeof i22.HamburgerComponent, typeof i23.HamburgerMenuComponent, typeof i26.PaginationComponent, typeof i27.LoadMoreButtonComponent, typeof i28.LoadContainerComponent, typeof i29.IconComponent, typeof i30.CollapseExpandComponent, typeof i31.CollapseExpandContainerComponent, typeof i32.ToggleComponent, typeof i33.MessageComponent, typeof i34.BounceLoaderComponent, typeof i35.CircleLoaderComponent, typeof i36.ModalComponent, typeof i37.ModalOpenDirective, typeof i38.ModalOpenOnClickDirective, typeof i39.DefaultModalHeaderComponent, typeof i40.DefaultModalFooterComponent, typeof i41.SwitchMultiCasePipe, typeof i42.SortByPipe, typeof i43.RepeatPipe]>;
48
50
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxSfcCommonModule>;
49
51
  }
@@ -1,2 +1,3 @@
1
1
  export { SwitchMultiCasePipe } from './switch-multi-case/switch-multi-case.pipe';
2
2
  export { SortByPipe } from './sort-by/sort-by.pipe';
3
+ export { RepeatPipe } from './repeat/repeat.pipe';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RepeatPipe implements PipeTransform {
4
+ transform(value: number): number[];
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<RepeatPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<RepeatPipe, "sfcRepeat", false>;
7
+ }
@@ -5,3 +5,4 @@ export { LoadMoreService } from './load-more/load-more.service';
5
5
  export { PaginationService } from './pagination/pagination.service';
6
6
  export { SortingService } from './sorting/sorting.service';
7
7
  export { ISortingModel } from './sorting/sorting.model';
8
+ export { ReloadService } from './reload/reload.service';
@@ -0,0 +1,9 @@
1
+ import { Observable } from "rxjs";
2
+ import * as i0 from "@angular/core";
3
+ export declare class ReloadService {
4
+ private model;
5
+ get reload$(): Observable<string[]>;
6
+ reload(...ids: string[]): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReloadService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReloadService>;
9
+ }
@@ -28,6 +28,13 @@ export declare function hasItemBy<T>(collection: Array<T>, predicate: (item: T)
28
28
  */
29
29
  export declare function hasObjectItem<T>(collection: Array<any>, // TODO <-- Array<T>
30
30
  property: string, value: T): boolean;
31
+ /**
32
+ * Return true if first collection has item in second collection
33
+ * @param collection1 Array of objects where search
34
+ * @param collection2 Array of objects where try to find
35
+ * @returns
36
+ */
37
+ export declare function hasAnyItem<T>(collection1: T[], collection2: T[]): boolean;
31
38
  /**
32
39
  * Return value from collection by predicate function
33
40
  * @param collection Array of items
@@ -154,3 +161,10 @@ export declare function updateItemBy<T>(collection: Array<T>, predicate: (item:
154
161
  * @returns Collection or empty
155
162
  */
156
163
  export declare function getCollectionOrEmpty<T>(collection: Array<T>): Array<T>;
164
+ /**
165
+ * Check if arrays are equal
166
+ * @param a First array
167
+ * @param b Second array
168
+ * @returns True if arrays are equal
169
+ */
170
+ export declare function isArraysEquals<T>(a: Array<T>, b: Array<T>): boolean;
@@ -30,11 +30,6 @@ export declare function addPropertyToObject(obj: any, property: string, value?:
30
30
  * @param property Property name to remove
31
31
  */
32
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
33
  /**
39
34
  * Deep merge object with others
40
35
  * @param target Object to merge
@@ -50,10 +45,16 @@ export declare function mergeDeep(target: any, ...sources: any[]): any;
50
45
  export declare const nameof: <T>(name: keyof T) => keyof T;
51
46
  /**
52
47
  * Determines if the input is a Number or something that can be coerced to a Number
53
- * @param - The input to be tested
48
+ * @param number The input to be tested
54
49
  * @returns - An indication if the input is a Number or can be coerced to a Number
55
50
  */
56
51
  export declare function isNumeric(number: any): boolean;
52
+ /**
53
+ * Determines if the input is a string
54
+ * @param value The input to be tested
55
+ * @returns An indication if the input is a string
56
+ */
57
+ export declare function isString(value: any): boolean;
57
58
  /**
58
59
  * Return true if current browser is Chrome
59
60
  * @returns If current browser is Chrome
@@ -81,3 +82,14 @@ export declare function isEqual(obj1: any, obj2: any): boolean;
81
82
  * @returns Random GUID
82
83
  */
83
84
  export declare function generateGuid(): string;
85
+ /**
86
+ * Check if value is Json parsable string
87
+ * @param value string value
88
+ * @returns True if string can be JSON parsed
89
+ */
90
+ export declare function isJsonString(value: string): boolean;
91
+ /**
92
+ * Stop propagation and prevent default
93
+ * @param event Event object
94
+ */
95
+ export declare function stopAndPreventPropagation(event: Event): void;
@@ -168,6 +168,27 @@ export declare function isDateTimeGreat(date1: Date, date2: Date): boolean;
168
168
  * @returns True if first date time greater or equal to second date time
169
169
  */
170
170
  export declare function isDateTimeGreatOrEqual(date1: Date, date2: Date): boolean;
171
+ /**
172
+ * Return true if first time greater or equal to second time
173
+ * @param date1 First date time value
174
+ * @param date2 Second date time value
175
+ * @returns True if first time greater or equal to second time
176
+ */
177
+ export declare function isTimeGreatOrEqual(date1: Date, date2: Date): boolean;
178
+ /**
179
+ * Return true if first time less or equal to second time
180
+ * @param date1 First date time value
181
+ * @param date2 Second date time value
182
+ * @returns True if first time less or equal to second time
183
+ */
184
+ export declare function isDateTimeLessOrEqual(date1: Date, date2: Date): boolean;
185
+ /**
186
+ * Return true if first time less or equal to second time
187
+ * @param date1 First date time value
188
+ * @param date2 Second date time value
189
+ * @returns True if first time less or equal to second time
190
+ */
191
+ export declare function isTimeLessOrEqual(date1: Date, date2: Date): boolean;
171
192
  /**
172
193
  * Convert UTC date to local
173
194
  * @param date Date value
@@ -192,4 +213,4 @@ export declare function convertDateToTimestamp(date: Date, locale?: string): str
192
213
  * @param birthdate Date of birth
193
214
  * @returns Age
194
215
  */
195
- export declare function getAge(birthdate: Date): number;
216
+ export declare function getAge(birthdate: Date | null): number | null;
@@ -1,7 +1,7 @@
1
- export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric, isChromeBrowser, isEmail, parseBoolean, isEqual, generateGuid } from './common.utils';
1
+ export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric, isString, isChromeBrowser, isEmail, parseBoolean, isEqual, generateGuid, isJsonString, stopAndPreventPropagation } from './common.utils';
2
2
  export { isNullOrEmptyString, contains, trim } from './string.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, convertDateToTimestamp, getAge } from './date-time.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, isDateTimeLessOrEqual, isTimeGreatOrEqual, isTimeLessOrEqual, convertUTCDateToLocalDate, convertTimestampToDate, convertDateToTimestamp, getAge } from './date-time.utils';
4
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, count } from './collections.utils';
6
+ export { any, hasItem, hasItemBy, hasObjectItem, hasAnyItem, firstOrDefault, firstItem, lastItem, all, where, skip, sort, sortBy, sortByPath, distinct, sum, max, remove, addItem, removeItem, removeItemBy, updateItemBy, getCollectionOrEmpty, count, isArraysEquals } from './collections.utils';
7
7
  export { buildHttpParams } from './http.utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-sfc-common",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "Angular common(shared) library for SFC project",
5
5
  "keywords": [
6
6
  "Street Football Club",
package/public-api.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from './lib/directives';
7
7
  export * from './lib/pipes';
8
8
  export * from './lib/components';
9
9
  export * from './lib/types';
10
+ export * from './lib/models';
@@ -48,6 +48,12 @@
48
48
  flex-wrap: wrap;
49
49
  }
50
50
 
51
+ @mixin center-column() {
52
+ @include center;
53
+
54
+ flex-direction: column;
55
+ }
56
+
51
57
  @mixin not-first-not-last {
52
58
  &:not(:first-child, :last-child) {
53
59
  @content;
@@ -97,3 +103,8 @@
97
103
  background: transparent;
98
104
  }
99
105
  }
106
+
107
+ @mixin host($cursor: default) {
108
+ cursor: $cursor;
109
+ user-select: none;
110
+ }