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.
@@ -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['cd'] = props.data.cd;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.53",
3
+ "version": "1.0.55",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -11,6 +11,7 @@ export interface IContextMenuProps
11
11
  position?: "center" | "left" | "right";
12
12
  width?: string | number;
13
13
  offset?: number;
14
+ ariaLabel?: string;
14
15
  }
15
16
 
16
17
  export interface DefaultItem {
@@ -19,7 +19,7 @@ export interface IDailyChartProps extends IBaseComponentProp {
19
19
  groupIndex:number;
20
20
  indicator:Indicator
21
21
  overlay?: boolean;
22
-
22
+ tabIndex?: number;
23
23
  }
24
24
  export interface IDailyChartState {
25
25
  tipText:string
@@ -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;
@@ -7,4 +7,5 @@ export interface IIconButtonProps<T>
7
7
  iconHandle: IconHandle;
8
8
  variant: "primary" | "secondary" | "ead" | "meeting" | "media";
9
9
  size?: number;
10
+ ariaLabel?: string;
10
11
  }
@@ -18,7 +18,7 @@ export interface IResultChartProps extends IBaseComponentProp {
18
18
  data: ResultModel[];
19
19
  colorDivision: number[];
20
20
  isInitialPosition?: boolean;
21
-
21
+ tabIndex?: number;
22
22
  }
23
23
 
24
24
  export interface IResultChartState {
@@ -22,6 +22,7 @@ export interface ISidebarProps extends IBaseComponentProp {
22
22
  iconName: IconHandle;
23
23
  iconAction: () => void;
24
24
  };
25
+ additionalIconAriaLabel?: string;
25
26
  hasHeaderShadow?: boolean;
26
27
  removeRoundedBorders?: boolean;
27
28
  }
@@ -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> extends React.ButtonHTMLAttributes<T>,IBaseComponentProp {
7
- iconHandle: IconHandle,
8
- selectedIconHandle: IconHandle,
9
- active?: boolean,
10
- disabled?: boolean,
11
- disabledIconHandle?: IconHandle,
12
- fatherControl?: boolean,
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
+ }
@@ -19,6 +19,8 @@ export interface IWeeklyChartProps extends IBaseComponentProp {
19
19
  hit:number;
20
20
  days: ResultModel[];
21
21
  colorDivision: number[];
22
+ selectedReference ?: string;
23
+ tabIndex?: number;
22
24
  }
23
25
 
24
26
  export interface IWeeklyData {
@@ -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 = props?.data != null ? {
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
- props.data['cd'] = props.data.cd;
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
  };
@@ -10,4 +10,5 @@ export interface IUploadService {
10
10
  ): string;
11
11
  getRawFileUrl(imageName: string): string;
12
12
  downloadFile(fileName: string): Promise<void>;
13
+ onImageError(e: React.SyntheticEvent<HTMLImageElement, Event>): void;
13
14
  }
@@ -26,6 +26,7 @@ interface ISimulationGroup {
26
26
  }
27
27
  export interface ITreeApp {
28
28
  treeData: {
29
+ node: string | undefined;
29
30
  indicators: {
30
31
  items: TreeIndicatorModel[];
31
32
  selected: TreeIndicatorModel;
@@ -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
- let result =
100
- (parseFloat(hours) > 0
101
- ? hours + ":" + (minutes < 10 ? "0" : "")
102
- : "00:") +
103
- minutes +
104
- ":" +
105
- (seconds < 10 ? "0" : "") +
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
  }