robbyson-frontend-library 1.0.53 → 1.0.55
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/dist/models/tree/tree.model.js +12 -2
- package/package.json +1 -1
- package/src/components/context-menu/context-menu.interface.ts +1 -0
- package/src/components/daily-chart/daily-chart.interface.ts +1 -1
- package/src/components/dropdown/dropdown.interface.ts +3 -0
- package/src/components/icon-button/icon-button.interface.ts +1 -0
- package/src/components/result-chart/result-chart.interface.ts +1 -1
- package/src/components/sidebar/sidebar.interface.ts +1 -0
- package/src/components/toggle-icon-button/toggle-icon-button.interface.ts +12 -9
- package/src/components/weekly-chart/weekly-chart.interface.ts +2 -0
- package/src/constants/market.constants.ts +13 -0
- package/src/models/tree/tree.model.ts +7 -3
- package/src/models/user-session.model.ts +8 -0
- package/src/services/upload.service.interface.ts +1 -0
- package/src/states/main-container/tree-app.state.interface.ts +1 -0
- package/src/utils/date.utils.ts +7 -8
|
@@ -13,6 +13,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
16
27
|
import { BaseRepositoryModel } from "../base.repository.model";
|
|
17
28
|
function registerHierarchy(hierarchies) {
|
|
18
29
|
return hierarchies === null || hierarchies === void 0 ? void 0 : hierarchies.map(function (hierarchy) {
|
|
@@ -50,7 +61,6 @@ var TreeModel = /** @class */ (function (_super) {
|
|
|
50
61
|
d: props === null || props === void 0 ? void 0 : props.data.d,
|
|
51
62
|
g: props === null || props === void 0 ? void 0 : props.data.g,
|
|
52
63
|
c: props === null || props === void 0 ? void 0 : props.data.c,
|
|
53
|
-
cd: props === null || props === void 0 ? void 0 : props.data.cd,
|
|
54
64
|
f: registerHierarchy(props === null || props === void 0 ? void 0 : props.data.f),
|
|
55
65
|
cpf: props === null || props === void 0 ? void 0 : props.data.cpf,
|
|
56
66
|
resultRegister: props === null || props === void 0 ? void 0 : props.data.resultadoCadastrado,
|
|
@@ -63,7 +73,7 @@ var TreeModel = /** @class */ (function (_super) {
|
|
|
63
73
|
},
|
|
64
74
|
} : {};
|
|
65
75
|
if (((_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.cd) !== undefined)
|
|
66
|
-
props.data
|
|
76
|
+
_this.data = (props === null || props === void 0 ? void 0 : props.data) != null ? __assign(__assign({}, props === null || props === void 0 ? void 0 : props.data), { cd: props === null || props === void 0 ? void 0 : props.data.cd }) : {};
|
|
67
77
|
_this.colors = props === null || props === void 0 ? void 0 : props.colors;
|
|
68
78
|
_this.highlightColors = props === null || props === void 0 ? void 0 : props.highlightColors;
|
|
69
79
|
_this.faixas = props === null || props === void 0 ? void 0 : props.faixas;
|
package/package.json
CHANGED
|
@@ -29,6 +29,9 @@ export interface IDropdownProps
|
|
|
29
29
|
pointerCursor?: boolean;
|
|
30
30
|
textarea?: boolean;
|
|
31
31
|
preventCloseOnClickOutside?: boolean;
|
|
32
|
+
suffixIconHandleAriaLabel?: string;
|
|
33
|
+
outSuffixIconHandleAriaLabel?: string;
|
|
34
|
+
prefixIconHandleAriaLabel?: string;
|
|
32
35
|
}
|
|
33
36
|
export type ValuesDropdownData = {
|
|
34
37
|
labelLocaleHandle: string;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
2
|
import { IconHandle } from "../../models";
|
|
3
3
|
|
|
4
|
-
export type ToggleActualState = "disabled" | "on" | "off"
|
|
4
|
+
export type ToggleActualState = "disabled" | "on" | "off";
|
|
5
5
|
|
|
6
|
-
export interface IToggleIconButtonProps<T>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
export interface IToggleIconButtonProps<T>
|
|
7
|
+
extends React.ButtonHTMLAttributes<T>,
|
|
8
|
+
IBaseComponentProp {
|
|
9
|
+
iconHandle: IconHandle;
|
|
10
|
+
selectedIconHandle: IconHandle;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
disabledIconHandle?: IconHandle;
|
|
14
|
+
fatherControl?: boolean;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
}
|
|
@@ -22,6 +22,18 @@ export const PRODUCT_TYPE_BY_ID: {
|
|
|
22
22
|
7: "voucher",
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
export const PRODUCT_TYPE_BY_ID_LOCALES: {
|
|
26
|
+
[key: number]: string;
|
|
27
|
+
} = {
|
|
28
|
+
1: "main_enumeratorProductType_experiences",
|
|
29
|
+
2: "main_enumeratorProductType_customization",
|
|
30
|
+
3: "main_enumeratorProductType_material",
|
|
31
|
+
4: "main_enumeratorProductType_raffle",
|
|
32
|
+
// 5: "auction",
|
|
33
|
+
// 6: "donation",
|
|
34
|
+
7: "main_enumeratorProductType_voucher",
|
|
35
|
+
};
|
|
36
|
+
|
|
25
37
|
export enum PRODUCT_ORDER_STATUS_ID {
|
|
26
38
|
ORDERED = 1,
|
|
27
39
|
BEING_PROCESSED = 2,
|
|
@@ -71,6 +83,7 @@ export const MarketConstants = {
|
|
|
71
83
|
PRODUCT_TYPE_ID,
|
|
72
84
|
PRODUCT_TYPE_BY_ID,
|
|
73
85
|
PRODUCT_ORDER_STATUS_ID,
|
|
86
|
+
PRODUCT_TYPE_BY_ID_LOCALES,
|
|
74
87
|
PURCHASED_ORDERS_PROJECTION_FILTER,
|
|
75
88
|
PURCHASED_ORDERS_SORT_FILTER,
|
|
76
89
|
PRODUCTS_PROJECTION_FILTER,
|
|
@@ -86,12 +86,13 @@ export class TreeModel extends BaseRepositoryModel {
|
|
|
86
86
|
constructor(props: ITreeOldModel){
|
|
87
87
|
super();
|
|
88
88
|
this._id = props?._id;
|
|
89
|
-
this.data =
|
|
89
|
+
this.data = Object.keys(
|
|
90
|
+
props?.data ?? {}
|
|
91
|
+
)?.length > 0 ? {
|
|
90
92
|
i : props?.data.i,
|
|
91
93
|
d : props?.data.d,
|
|
92
94
|
g : props?.data.g,
|
|
93
95
|
c : props?.data.c,
|
|
94
|
-
cd : props?.data.cd,
|
|
95
96
|
f : registerHierarchy(props?.data.f),
|
|
96
97
|
cpf : props?.data.cpf,
|
|
97
98
|
resultRegister : props?.data.resultadoCadastrado,
|
|
@@ -104,7 +105,10 @@ export class TreeModel extends BaseRepositoryModel {
|
|
|
104
105
|
},
|
|
105
106
|
} : {}
|
|
106
107
|
if(props?.data?.cd !== undefined)
|
|
107
|
-
|
|
108
|
+
this.data = props?.data != null ? {
|
|
109
|
+
...props?.data,
|
|
110
|
+
cd : props?.data.cd,
|
|
111
|
+
} : {}
|
|
108
112
|
this.colors = props?.colors;
|
|
109
113
|
this.highlightColors = props?.highlightColors;
|
|
110
114
|
this.faixas = props?.faixas;
|
|
@@ -47,6 +47,14 @@ export class UserSessionModel extends BaseRepositoryModel {
|
|
|
47
47
|
_id: string;
|
|
48
48
|
active: boolean;
|
|
49
49
|
}[];
|
|
50
|
+
userPrimaryAttribute?: {
|
|
51
|
+
attribute: {
|
|
52
|
+
_id: string;
|
|
53
|
+
primary: boolean;
|
|
54
|
+
};
|
|
55
|
+
_id: string;
|
|
56
|
+
active: boolean;
|
|
57
|
+
};
|
|
50
58
|
name: string;
|
|
51
59
|
userHierarchyLevel: number; // Hierarquia do usuario em si, não do espelho
|
|
52
60
|
};
|
package/src/utils/date.utils.ts
CHANGED
|
@@ -96,14 +96,13 @@ export class DateUtils {
|
|
|
96
96
|
|
|
97
97
|
const minutes = Math.floor((secondsAsNumber % 3600) / 60);
|
|
98
98
|
const seconds = Math.floor((secondsAsNumber % 3600) % 60);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
seconds;
|
|
99
|
+
|
|
100
|
+
let formattedHours = parseFloat(hours) > 0 ? hours.padStart(2, "0") : "00";
|
|
101
|
+
let formattedMinutes = minutes === 0 ? "00" : minutes < 10 ? "0" + minutes : minutes.toString();
|
|
102
|
+
let formattedSeconds = seconds === 0 ? "00" : seconds < 10 ? "0" + seconds : seconds.toString()
|
|
103
|
+
|
|
104
|
+
let result = `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
|
|
105
|
+
|
|
107
106
|
if (valueNegative) {
|
|
108
107
|
result = `- ${result}`;
|
|
109
108
|
}
|