ngx-sfc-common 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/esm2020/lib/components/button/button.component.mjs +2 -2
  2. package/esm2020/lib/components/checkmark/checkmark.component.mjs +2 -2
  3. package/esm2020/lib/components/delimeter/delimeter.component.mjs +2 -2
  4. package/esm2020/lib/components/dots/dots.component.mjs +2 -2
  5. package/esm2020/lib/components/hamburger/menu/hamburger-menu.component.mjs +2 -2
  6. package/esm2020/lib/components/icon/icon.component.mjs +5 -1
  7. package/esm2020/lib/components/load-container/load-container.component.mjs +2 -2
  8. package/esm2020/lib/components/load-more-button/load-more-button.component.mjs +2 -2
  9. package/esm2020/lib/components/loader/bounce/bounce-loader.component.mjs +2 -2
  10. package/esm2020/lib/components/loader/circle/circle-loader.component.mjs +2 -2
  11. package/esm2020/lib/components/modal/header/default/default-modal-header.component.mjs +2 -2
  12. package/esm2020/lib/components/modal/modal.component.mjs +2 -2
  13. package/esm2020/lib/components/pagination/pagination.component.mjs +2 -2
  14. package/esm2020/lib/components/sorting/sorting.component.mjs +2 -2
  15. package/esm2020/lib/components/toggle-switcher/toggle-switcher.component.mjs +2 -2
  16. package/esm2020/lib/enums/compare.enum.mjs +10 -0
  17. package/esm2020/lib/enums/index.mjs +2 -1
  18. package/esm2020/lib/utils/date-time.utils.mjs +31 -1
  19. package/esm2020/lib/utils/file.utils.mjs +24 -1
  20. package/esm2020/lib/utils/index.mjs +3 -3
  21. package/fesm2015/ngx-sfc-common.mjs +99 -29
  22. package/fesm2015/ngx-sfc-common.mjs.map +1 -1
  23. package/fesm2020/ngx-sfc-common.mjs +96 -29
  24. package/fesm2020/ngx-sfc-common.mjs.map +1 -1
  25. package/lib/components/icon/icon.component.d.ts +2 -2
  26. package/lib/enums/compare.enum.d.ts +7 -0
  27. package/lib/enums/index.d.ts +1 -0
  28. package/lib/utils/date-time.utils.d.ts +18 -0
  29. package/lib/utils/file.utils.d.ts +13 -0
  30. package/lib/utils/index.d.ts +2 -2
  31. package/package.json +1 -1
  32. package/styles/_colors.scss +1 -0
  33. package/styles/_mixins.scss +7 -0
@@ -1,8 +1,8 @@
1
1
  import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class IconComponent {
4
- icon?: IconDefinition;
5
- imageSrc?: string;
4
+ icon?: IconDefinition | null;
5
+ imageSrc?: string | null;
6
6
  get showImage(): boolean;
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
8
8
  static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "sfc-icon", never, { "icon": "icon"; "imageSrc": "imageSrc"; }, {}, never, never, false, never>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Flag for validation compare
3
+ */
4
+ export declare enum Compare {
5
+ More = "more",
6
+ Less = "less"
7
+ }
@@ -6,3 +6,4 @@ export { SortingDirection } from './sorting-direction.enum';
6
6
  export { Theme } from './theme.enum';
7
7
  export { UIClass } from './ui.enum';
8
8
  export { Sequence } from './sequence.enum';
9
+ export { Compare } from './compare.enum';
@@ -52,6 +52,12 @@ export declare function setDefaultSecondsAndMiliseconds(date: Date): Date;
52
52
  * @returns Next date
53
53
  */
54
54
  export declare function getNextDate(date: Date): Date;
55
+ /**
56
+ * Get previous date
57
+ * @param date Date value
58
+ * @returns Previous date
59
+ */
60
+ export declare function getPreviousDate(date: Date): Date;
55
61
  /**
56
62
  * Get next month as date
57
63
  * @param date Date value
@@ -162,3 +168,15 @@ export declare function isDateTimeGreat(date1: Date, date2: Date): boolean;
162
168
  * @returns True if first date time greater or equal to second date time
163
169
  */
164
170
  export declare function isDateTimeGreatOrEqual(date1: Date, date2: Date): boolean;
171
+ /**
172
+ * Convert UTC date to local
173
+ * @param date Date value
174
+ * @returns Locale date
175
+ */
176
+ export declare function convertUTCDateToLocalDate(date: Date): Date;
177
+ /**
178
+ * Convert Json representation of timestamp to date value
179
+ * @param timestamp Timestamp for example - 12:23:45
180
+ * @returns Date value
181
+ */
182
+ export declare function convertTimestampToDate(timestamp: string): Date;
@@ -23,3 +23,16 @@ export declare function readAsDataURL(file: File, onLoad: (result: string | Arra
23
23
  * @returns True if file is image
24
24
  */
25
25
  export declare function isImage(file: File): boolean;
26
+ /**
27
+ * Convert file to base64 string
28
+ * @param file File value
29
+ * @returns Base64 string
30
+ */
31
+ export declare function convertToBase64String(file: File): Promise<string>;
32
+ /**
33
+ * Convert base64 string to file
34
+ * @param base64 Base64 string
35
+ * @param name File name
36
+ * @returns File value
37
+ */
38
+ export declare function convertFromBase64String(base64: string, name: string): Promise<File>;
@@ -1,6 +1,6 @@
1
1
  export { isDefined, isObject, isAsyncData, addPropertyToObject, removePropertyFromObject, mergeDeep, nameof, isNumeric, isChromeBrowser, isEmail, parseBoolean, isEqual } from './common.utils';
2
2
  export { isNullOrEmptyString, contains, trim } from './string.utils';
3
- export { setMinutes, setHours, setDay, setYear, setSeconds, setMilliseconds, setDefaultSecondsAndMiliseconds, getNextDate, getNextMonth, getPreviousMonth, getNextYear, getPreviousYear, getFirstDayOfMonth, getLastDayOfMonth, getFirstDayOfYear, getLastDayOfYear, getFirstDayOfMonthByYearAndMonth, getLastDayOfMonthByYearAndMonth, getWeeksNumberInMonth, isEqualDates, isEqualDateTimes, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual } from './date-time.utils';
4
- export { parseFileSize, getFileExtension, readAsDataURL, isImage } from './file.utils';
3
+ export { setMinutes, setHours, setDay, setYear, setSeconds, setMilliseconds, setDefaultSecondsAndMiliseconds, getNextDate, getPreviousDate, getNextMonth, getPreviousMonth, getNextYear, getPreviousYear, getFirstDayOfMonth, getLastDayOfMonth, getFirstDayOfYear, getLastDayOfYear, getFirstDayOfMonthByYearAndMonth, getLastDayOfMonthByYearAndMonth, getWeeksNumberInMonth, isEqualDates, isEqualDateTimes, isDateGreat, isDateGreatOrEqual, isDateTimeGreat, isDateTimeGreatOrEqual, convertUTCDateToLocalDate, convertTimestampToDate } from './date-time.utils';
4
+ export { parseFileSize, getFileExtension, readAsDataURL, isImage, convertToBase64String, convertFromBase64String } from './file.utils';
5
5
  export { getCssLikeValue, getValueFromCssLikeValue, getCalcValue, getRotateValue, addClasses, removeClasses, rgbToHex, hexToRgb, replaceRgbOpacity } from './ui.utils';
6
6
  export { any, hasItem, hasItemBy, hasObjectItem, firstOrDefault, firstItem, lastItem, all, where, skip, sort, sortBy, sortByPath, distinct, sum, max, remove, addItem, removeItem, removeItemBy, updateItemBy, getCollectionOrEmpty, count } from './collections.utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-sfc-common",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Angular common(shared) library for SFC project",
5
5
  "keywords": [
6
6
  "Street Football Club",
@@ -11,6 +11,7 @@ $color-8: #656d78 !default;
11
11
  $color-9: #434a54 !default;
12
12
  $color-10: #34323d !default;
13
13
  $color-11: #1b1d1f !default;
14
+ $color-12: #000 !default;
14
15
 
15
16
  // shades
16
17
  $color-shadow-0: #00000005 !default;
@@ -15,6 +15,8 @@
15
15
  :host-context(.sfc-dark-theme) #{$selector} {
16
16
  #{$property}: $value-dark;
17
17
  }
18
+
19
+ transition: #{$property} $transition-duration-default $transition-timing-function-default;
18
20
  }
19
21
 
20
22
  @mixin visibility($show) {
@@ -44,3 +46,8 @@
44
46
  @content;
45
47
  }
46
48
  }
49
+
50
+ @mixin text-ellipsis() {
51
+ text-overflow: ellipsis;
52
+ overflow: hidden;
53
+ }