robbyson-frontend-library 1.0.28 → 1.0.30

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.
@@ -55,6 +55,31 @@ var DateUtils = /** @class */ (function () {
55
55
  secondsDistance: diff,
56
56
  };
57
57
  };
58
+ DateUtils.secondsToHours = function (secondsToConvert) {
59
+ var secondsAsNumber = Number(secondsToConvert);
60
+ var valueNegative = false;
61
+ if (secondsAsNumber < 0) {
62
+ secondsAsNumber = -1 * secondsAsNumber;
63
+ valueNegative = true;
64
+ }
65
+ var hours = Math.floor(secondsAsNumber / 3600).toString();
66
+ if (parseFloat(hours) < 10) {
67
+ hours = "0".concat(hours);
68
+ }
69
+ var minutes = Math.floor((secondsAsNumber % 3600) / 60);
70
+ var seconds = Math.floor((secondsAsNumber % 3600) % 60);
71
+ var result = (parseFloat(hours) > 0
72
+ ? hours + ":" + (minutes < 10 ? "0" : "")
73
+ : "00:") +
74
+ minutes +
75
+ ":" +
76
+ (seconds < 10 ? "0" : "") +
77
+ seconds;
78
+ if (valueNegative) {
79
+ result = "- ".concat(result);
80
+ }
81
+ return result;
82
+ };
58
83
  return DateUtils;
59
84
  }());
60
85
  export { DateUtils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -34,6 +34,7 @@ export interface IFilter {
34
34
  options: Array<IOption>;
35
35
  searchInput?: boolean;
36
36
  searchInputValue?: string;
37
+ filterOnClick?: boolean
37
38
  }
38
39
 
39
40
  export interface IOption {
@@ -1,12 +1,12 @@
1
1
  export class ProfileInfoModel {
2
2
  nickname: string;
3
3
  about: string;
4
- allowAngelFriend: boolean;
4
+ notAllowAngelFriend: boolean;
5
5
  currentPassword: string;
6
6
  newPassword: string;
7
7
  confirmPassword: string;
8
8
  }
9
9
 
10
- export class ProfileImageModel{
10
+ export class ProfileImageModel {
11
11
  image: string;
12
- }
12
+ }
@@ -33,6 +33,9 @@ export interface IHandleBreadCrumbTreeDTO {
33
33
  }
34
34
  export interface IHandleSearchTreeDTO {
35
35
  text: string;
36
+ limit?: number;
37
+ groups?: string[]
38
+ excludeIdentifications?: string[];
36
39
  }
37
40
 
38
41
  export interface IGetDataTreeServiceDTO {
@@ -135,8 +138,14 @@ export interface IHandleSearchUser {
135
138
  materialized_path?: string;
136
139
  uniqueId?: string;
137
140
  identification?: string;
141
+ group?: string;
138
142
  id?: number;
139
143
  }
144
+
145
+ export interface IMembersBroadcast extends Omit<IHandleSearchUser, 'identification' | 'group'> {
146
+ identification: string;
147
+ group: string;
148
+ }
140
149
  export interface IInsertSimulationTreeDTO {
141
150
  body: {
142
151
  user_id?: number;
@@ -41,7 +41,7 @@ export interface Result {
41
41
  name: string;
42
42
  configurationName: string;
43
43
  identification: string;
44
- paymentType: string;
44
+ paymentType: PaymentType;
45
45
  updatedAt: string;
46
46
  ruleResult?: string | null;
47
47
  effectResult?: number | null;
@@ -79,4 +79,34 @@ export class DateUtils {
79
79
  secondsDistance: diff,
80
80
  };
81
81
  }
82
+
83
+ static secondsToHours(secondsToConvert: number): string {
84
+ let secondsAsNumber = Number(secondsToConvert);
85
+ let valueNegative = false;
86
+ if (secondsAsNumber < 0) {
87
+ secondsAsNumber = -1 * secondsAsNumber;
88
+ valueNegative = true;
89
+ }
90
+
91
+ let hours: string = Math.floor(secondsAsNumber / 3600).toString();
92
+
93
+ if (parseFloat(hours) < 10) {
94
+ hours = `0${hours}`;
95
+ }
96
+
97
+ const minutes = Math.floor((secondsAsNumber % 3600) / 60);
98
+ const seconds = Math.floor((secondsAsNumber % 3600) % 60);
99
+ let result =
100
+ (parseFloat(hours) > 0
101
+ ? hours + ":" + (minutes < 10 ? "0" : "")
102
+ : "00:") +
103
+ minutes +
104
+ ":" +
105
+ (seconds < 10 ? "0" : "") +
106
+ seconds;
107
+ if (valueNegative) {
108
+ result = `- ${result}`;
109
+ }
110
+ return result;
111
+ }
82
112
  }