ngx-sfc-common 0.0.36 → 0.0.37

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.
@@ -1,12 +1,13 @@
1
1
  import { ButtonType } from './button-type.enum';
2
2
  import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
3
3
  import { IClassModel } from '../../models';
4
+ import { empty } from '../../types';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ButtonComponent {
6
7
  private readonly BUTTON_DEFAULT_TEXT;
7
8
  text?: string;
8
- iconBefore?: IconDefinition;
9
- iconAfter?: IconDefinition;
9
+ iconBefore?: IconDefinition | empty;
10
+ iconAfter?: IconDefinition | empty;
10
11
  disabled: boolean;
11
12
  types: Array<ButtonType>;
12
13
  get label(): string | undefined;
@@ -3,5 +3,7 @@
3
3
  */
4
4
  export declare enum Compare {
5
5
  More = "more",
6
- Less = "less"
6
+ Less = "less",
7
+ Equal = "equal",
8
+ NotEqual = "not-equal"
7
9
  }
@@ -175,3 +175,19 @@ export declare function getCollectionOrEmpty<T>(collection: Array<T>): Array<T>;
175
175
  * @returns True if arrays are equal
176
176
  */
177
177
  export declare function isArraysEquals<T>(a: Array<T>, b: Array<T>): boolean;
178
+ /**
179
+ * Get previous item in array depend on key
180
+ * @param array Array of objects
181
+ * @param key Key name
182
+ * @param value Value for key
183
+ * @returns Previous item
184
+ */
185
+ export declare function getPreviousItemByKey<T, K extends keyof T>(array: T[], key: K, value: T[K]): T | undefined;
186
+ /**
187
+ * Get next item in array depend on key
188
+ * @param array Array of objects
189
+ * @param key Key name
190
+ * @param value Value for key
191
+ * @returns Next item
192
+ */
193
+ export declare function getNextItemByKey<T, K extends keyof T>(array: T[], key: K, value: T[K]): T | undefined;
@@ -3,5 +3,5 @@ export { isNullOrEmptyString, contains, trim } from './string.utils';
3
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, hasAnyItem, firstOrDefault, firstItem, lastItem, all, where, skip, sort, sortBy, sortByPath, distinct, sum, max, remove, addItem, removeItem, removeItemBy, updateItemBy, toggleItem, getCollectionOrEmpty, count, isArraysEquals } 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, toggleItem, getCollectionOrEmpty, count, isArraysEquals, getPreviousItemByKey, getNextItemByKey } 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.36",
3
+ "version": "0.0.37",
4
4
  "description": "Angular common(shared) library for SFC project",
5
5
  "keywords": [
6
6
  "Street Football Club",
@@ -46,4 +46,4 @@ $color-blue-3: #4a89dc !default;
46
46
  $color-magenta-0: #ac92ec !default;
47
47
  $color-magenta-1: #967adc !default;
48
48
  $color-pink-0: #ec87c0 !default;
49
- $color-pink-1: #d770ad !default;
49
+ $color-pink-1: #d770ad !default;
@@ -36,19 +36,21 @@
36
36
  }
37
37
  }
38
38
 
39
- @mixin wrap($gap: 1em) {
39
+ @mixin wrap($gap: 0) {
40
40
  display: flex;
41
41
  flex-wrap: wrap;
42
42
  gap: $gap;
43
43
  }
44
44
 
45
- @mixin wrap-row($gap: 1em) {
45
+ @mixin wrap-row($gap: 0) {
46
46
  @include wrap($gap);
47
+
47
48
  flex-direction: row;
48
49
  }
49
50
 
50
- @mixin wrap-column($gap: 1em) {
51
+ @mixin wrap-column($gap: 0) {
51
52
  @include wrap($gap);
53
+
52
54
  flex-direction: column;
53
55
  }
54
56
 
@@ -58,7 +60,7 @@
58
60
  justify-content: center;
59
61
  }
60
62
 
61
- @mixin center-wrap($gap: 1em) {
63
+ @mixin center-wrap($gap: 0) {
62
64
  @include center;
63
65
 
64
66
  flex-wrap: wrap;
@@ -71,7 +73,7 @@
71
73
  flex-direction: column;
72
74
  }
73
75
 
74
- @mixin center-wrap-column($gap: 1em) {
76
+ @mixin center-wrap-column($gap: 0) {
75
77
  @include center-wrap($gap);
76
78
 
77
79
  flex-direction: column;
@@ -83,7 +85,7 @@
83
85
  flex-direction: row;
84
86
  }
85
87
 
86
- @mixin center-wrap-row($gap: 1em) {
88
+ @mixin center-wrap-row($gap: 0) {
87
89
  @include center-wrap($gap);
88
90
 
89
91
  flex-direction: row;