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.
- package/esm2020/lib/components/button/button.component.mjs +1 -1
- package/esm2020/lib/components/pagination/pagination.component.mjs +2 -2
- package/esm2020/lib/enums/compare.enum.mjs +3 -1
- package/esm2020/lib/utils/collections.utils.mjs +26 -1
- package/esm2020/lib/utils/index.mjs +2 -2
- package/fesm2015/ngx-sfc-common.mjs +31 -4
- package/fesm2015/ngx-sfc-common.mjs.map +1 -1
- package/fesm2020/ngx-sfc-common.mjs +31 -4
- package/fesm2020/ngx-sfc-common.mjs.map +1 -1
- package/lib/components/button/button.component.d.ts +3 -2
- package/lib/enums/compare.enum.d.ts +3 -1
- package/lib/utils/collections.utils.d.ts +16 -0
- package/lib/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/styles/_colors.scss +1 -1
- package/styles/_mixins.scss +8 -6
|
@@ -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;
|
|
@@ -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;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -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
package/styles/_colors.scss
CHANGED
package/styles/_mixins.scss
CHANGED
|
@@ -36,19 +36,21 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@mixin wrap($gap:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
88
|
+
@mixin center-wrap-row($gap: 0) {
|
|
87
89
|
@include center-wrap($gap);
|
|
88
90
|
|
|
89
91
|
flex-direction: row;
|