ngx-sfc-common 0.0.4 → 0.0.6

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 (129) hide show
  1. package/_ngx-sfc-common.styles.scss +25 -0
  2. package/esm2020/lib/components/button/button.component.mjs +11 -10
  3. package/esm2020/lib/components/checkmark/checkmark-type.enum.mjs +6 -0
  4. package/esm2020/lib/components/checkmark/checkmark.component.mjs +24 -11
  5. package/esm2020/lib/components/close/close.component.mjs +3 -3
  6. package/esm2020/lib/components/delimeter/delimeter.component.mjs +3 -3
  7. package/esm2020/lib/components/dots/dots.component.mjs +3 -3
  8. package/esm2020/lib/components/hamburger/hamburger.component.mjs +3 -3
  9. package/esm2020/lib/components/index.mjs +7 -2
  10. package/esm2020/lib/components/load-container/load-container.component.mjs +161 -0
  11. package/esm2020/lib/components/load-container/load-container.constants.mjs +5 -0
  12. package/esm2020/lib/components/load-container/load-container.enum.mjs +6 -0
  13. package/esm2020/lib/components/load-container/models/load-container.model.mjs +2 -0
  14. package/esm2020/lib/components/load-container/models/load-more-parameters.model.mjs +2 -0
  15. package/esm2020/lib/components/load-container/models/load-more.model.mjs +2 -0
  16. package/esm2020/lib/components/load-container/service/load-more.service.mjs +27 -0
  17. package/esm2020/lib/components/load-more-button/load-more-button.component.mjs +31 -0
  18. package/esm2020/lib/components/loader/bounce/bounce-loader.component.mjs +3 -3
  19. package/esm2020/lib/components/loader/circle/circle-loader.component.mjs +3 -3
  20. package/esm2020/lib/components/loader/loader-base.component.mjs +3 -3
  21. package/esm2020/lib/components/loader/service/loader.service.mjs +7 -7
  22. package/esm2020/lib/components/modal/directive/click/modal-open-on-click.directive.mjs +48 -0
  23. package/esm2020/lib/components/modal/directive/open/modal-open.directive.mjs +29 -0
  24. package/esm2020/lib/components/modal/footer/default/default-modal-footer.component.mjs +7 -7
  25. package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +6 -6
  26. package/esm2020/lib/components/modal/modal.component.mjs +5 -5
  27. package/esm2020/lib/components/modal/service/modal.service.mjs +4 -4
  28. package/esm2020/lib/components/pagination/pagination.component.mjs +7 -7
  29. package/esm2020/lib/components/pagination/service/pagination.service.mjs +3 -3
  30. package/esm2020/lib/components/sorting/service/sorting.service.mjs +3 -3
  31. package/esm2020/lib/components/sorting/sorting.component.mjs +5 -5
  32. package/esm2020/lib/components/template-content/template-content.component.mjs +5 -5
  33. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +13 -7
  34. package/esm2020/lib/components/tooltip/tooltip.component.mjs +4 -4
  35. package/esm2020/lib/constants/common.constants.mjs +2 -1
  36. package/esm2020/lib/constants/date-time.constants.mjs +3 -1
  37. package/esm2020/lib/constants/file.constants.mjs +2 -0
  38. package/esm2020/lib/constants/index.mjs +1 -1
  39. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +4 -4
  40. package/esm2020/lib/directives/component-size/component-size.directive.mjs +26 -13
  41. package/esm2020/lib/directives/destroy-parent/destroy-parent.directive.mjs +3 -3
  42. package/esm2020/lib/directives/dom-changes/dom-changes.directive.mjs +32 -0
  43. package/esm2020/lib/directives/index.mjs +4 -1
  44. package/esm2020/lib/directives/mouse-down/mouse-down.directive.mjs +3 -3
  45. package/esm2020/lib/directives/scroll-into-view/scroll-into-view.directive.mjs +29 -0
  46. package/esm2020/lib/directives/scroll-tracker/scroll-tracker.directive.mjs +39 -0
  47. package/esm2020/lib/directives/show-hide-element/show-hide-element.directive.mjs +3 -3
  48. package/esm2020/lib/directives/template-reference/template-reference.directive.mjs +3 -3
  49. package/esm2020/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.mjs +3 -3
  50. package/esm2020/lib/enums/index.mjs +2 -1
  51. package/esm2020/lib/enums/sequence.enum.mjs +9 -0
  52. package/esm2020/lib/enums/ui.enum.mjs +4 -1
  53. package/esm2020/lib/ngx-sfc-common.module.mjs +47 -16
  54. package/esm2020/lib/pipes/index.mjs +2 -0
  55. package/esm2020/lib/pipes/switch-multi-case/switch-multi-case.pipe.mjs +16 -0
  56. package/esm2020/lib/services/document-ref.service.mjs +3 -3
  57. package/esm2020/lib/services/resize.service.mjs +3 -3
  58. package/esm2020/lib/services/window-ref.service.mjs +3 -3
  59. package/esm2020/lib/utils/collections.utils.mjs +30 -3
  60. package/esm2020/lib/utils/common.utils.mjs +9 -2
  61. package/esm2020/lib/utils/date-time.utils.mjs +57 -10
  62. package/esm2020/lib/utils/file.utils.mjs +4 -3
  63. package/esm2020/lib/utils/index.mjs +5 -5
  64. package/esm2020/lib/utils/ui.utils.mjs +9 -1
  65. package/esm2020/public-api.mjs +2 -1
  66. package/fesm2015/ngx-sfc-common.mjs +661 -156
  67. package/fesm2015/ngx-sfc-common.mjs.map +1 -1
  68. package/fesm2020/ngx-sfc-common.mjs +661 -156
  69. package/fesm2020/ngx-sfc-common.mjs.map +1 -1
  70. package/{ngx-sfc-common.d.ts → index.d.ts} +0 -0
  71. package/lib/components/button/button.component.d.ts +1 -1
  72. package/lib/components/checkmark/checkmark-type.enum.d.ts +4 -0
  73. package/lib/components/checkmark/checkmark.component.d.ts +5 -2
  74. package/lib/components/close/close.component.d.ts +1 -1
  75. package/lib/components/delimeter/delimeter.component.d.ts +1 -1
  76. package/lib/components/dots/dots.component.d.ts +1 -1
  77. package/lib/components/hamburger/hamburger.component.d.ts +1 -1
  78. package/lib/components/index.d.ts +11 -1
  79. package/lib/components/load-container/load-container.component.d.ts +49 -0
  80. package/lib/components/load-container/load-container.constants.d.ts +4 -0
  81. package/lib/components/load-container/load-container.enum.d.ts +4 -0
  82. package/lib/components/load-container/models/load-container.model.d.ts +11 -0
  83. package/lib/components/load-container/models/load-more-parameters.model.d.ts +4 -0
  84. package/lib/components/load-container/models/load-more.model.d.ts +4 -0
  85. package/lib/components/load-container/service/load-more.service.d.ts +12 -0
  86. package/lib/components/load-more-button/load-more-button.component.d.ts +12 -0
  87. package/lib/components/loader/bounce/bounce-loader.component.d.ts +1 -1
  88. package/lib/components/loader/circle/circle-loader.component.d.ts +1 -1
  89. package/lib/components/loader/loader-base.component.d.ts +1 -1
  90. package/lib/components/modal/directive/{modal-open-on-click.directive.d.ts → click/modal-open-on-click.directive.d.ts} +2 -2
  91. package/lib/components/modal/directive/open/modal-open.directive.d.ts +14 -0
  92. package/lib/components/modal/footer/default/default-modal-footer.component.d.ts +1 -1
  93. package/lib/components/modal/header/default/default-modal-header.component.d.ts +1 -1
  94. package/lib/components/modal/modal.component.d.ts +1 -1
  95. package/lib/components/modal/service/modal.service.d.ts +1 -1
  96. package/lib/components/pagination/pagination.component.d.ts +1 -1
  97. package/lib/components/sorting/sorting.component.d.ts +1 -1
  98. package/lib/components/template-content/template-content.component.d.ts +1 -1
  99. package/lib/components/toggle-switcher/toggle-switcher.component.d.ts +2 -1
  100. package/lib/components/tooltip/tooltip.component.d.ts +1 -1
  101. package/lib/constants/common.constants.d.ts +1 -0
  102. package/lib/constants/date-time.constants.d.ts +2 -0
  103. package/lib/constants/file.constants.d.ts +1 -0
  104. package/lib/constants/index.d.ts +1 -0
  105. package/lib/directives/click-outside/click-outside.directive.d.ts +1 -1
  106. package/lib/directives/component-size/component-size.directive.d.ts +8 -3
  107. package/lib/directives/destroy-parent/destroy-parent.directive.d.ts +1 -1
  108. package/lib/directives/dom-changes/dom-changes.directive.d.ts +12 -0
  109. package/lib/directives/index.d.ts +3 -0
  110. package/lib/directives/mouse-down/mouse-down.directive.d.ts +1 -1
  111. package/lib/directives/scroll-into-view/scroll-into-view.directive.d.ts +7 -0
  112. package/lib/directives/scroll-tracker/scroll-tracker.directive.d.ts +11 -0
  113. package/lib/directives/show-hide-element/show-hide-element.directive.d.ts +1 -1
  114. package/lib/directives/template-reference/template-reference.directive.d.ts +1 -1
  115. package/lib/directives/throw-element-on-hover/throw-element-on-hover.directive.d.ts +1 -1
  116. package/lib/enums/index.d.ts +1 -0
  117. package/lib/enums/sequence.enum.d.ts +7 -0
  118. package/lib/enums/ui.enum.d.ts +4 -1
  119. package/lib/ngx-sfc-common.module.d.ts +28 -21
  120. package/lib/pipes/index.d.ts +1 -0
  121. package/lib/pipes/switch-multi-case/switch-multi-case.pipe.d.ts +7 -0
  122. package/lib/utils/collections.utils.d.ts +16 -2
  123. package/lib/utils/common.utils.d.ts +5 -0
  124. package/lib/utils/date-time.utils.d.ts +26 -0
  125. package/lib/utils/index.d.ts +4 -4
  126. package/lib/utils/ui.utils.d.ts +6 -0
  127. package/package.json +5 -5
  128. package/public-api.d.ts +1 -0
  129. package/esm2020/lib/components/modal/directive/modal-open-on-click.directive.mjs +0 -50
@@ -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", false>;
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.6",
4
4
  "description": "Angular common(shared) library for SFC project",
5
5
  "keywords": [
6
6
  "Street Football Club",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "peerDependencies": {
27
- "@angular/common": "^13.2.0",
28
- "@angular/core": "^13.2.0",
27
+ "@angular/common": "^15.0.4",
28
+ "@angular/core": "^15.0.4",
29
29
  "@fortawesome/angular-fontawesome": "0.10.2",
30
30
  "@fortawesome/fontawesome-svg-core": "^6.1.1",
31
31
  "@fortawesome/free-solid-svg-icons": "^6.1.1"
@@ -38,13 +38,13 @@
38
38
  "esm2020": "esm2020/ngx-sfc-common.mjs",
39
39
  "fesm2020": "fesm2020/ngx-sfc-common.mjs",
40
40
  "fesm2015": "fesm2015/ngx-sfc-common.mjs",
41
- "typings": "ngx-sfc-common.d.ts",
41
+ "typings": "index.d.ts",
42
42
  "exports": {
43
43
  "./package.json": {
44
44
  "default": "./package.json"
45
45
  },
46
46
  ".": {
47
- "types": "./ngx-sfc-common.d.ts",
47
+ "types": "./index.d.ts",
48
48
  "esm2020": "./esm2020/ngx-sfc-common.mjs",
49
49
  "es2020": "./fesm2020/ngx-sfc-common.mjs",
50
50
  "es2015": "./fesm2015/ngx-sfc-common.mjs",
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtb3Blbi1vbi1jbGljay5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2ZjLWNvbW1vbi9zcmMvbGliL2NvbXBvbmVudHMvbW9kYWwvZGlyZWN0aXZlL21vZGFsLW9wZW4tb24tY2xpY2suZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUF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