robbyson-frontend-library 1.0.58 → 1.0.59
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/components/line-chart /line-chart.interface.js +1 -0
- package/dist/components/pie-chart /pie-chart.interface.js +1 -0
- package/dist/components/simple-table/simple-table.interface.js +1 -0
- package/dist/components/staked-chart/staked-chart.interface.js +1 -0
- package/dist/components/vertical-bar-chart/vertical-bar-chart.interface.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/string.utils.js +13 -0
- package/index.d.ts +6 -0
- package/package.json +3 -2
- package/src/components/basic-button/basic-button.interface.ts +1 -0
- package/src/components/checkbox/checkbox.interface.ts +1 -0
- package/src/components/date-picker/date-picker.interface.ts +1 -0
- package/src/components/line-chart /index.d.ts +1 -0
- package/src/components/line-chart /line-chart.interface.ts +16 -0
- package/src/components/line-chart /line-chart.types.d.ts +9 -0
- package/src/components/pie-chart /index.d.ts +1 -0
- package/src/components/pie-chart /pie-chart.interface.ts +15 -0
- package/src/components/pie-chart /pie-chart.types.d.ts +9 -0
- package/src/components/primary-tag/primary-tag.interface.ts +2 -0
- package/src/components/result-chart/result-chart.interface.ts +2 -0
- package/src/components/simple-table/index.d.ts +1 -0
- package/src/components/simple-table/simple-table.interface.ts +6 -0
- package/src/components/simple-table/simple-table.types.d.ts +9 -0
- package/src/components/sort/sort.interface.ts +6 -4
- package/src/components/staked-chart/index.d.ts +1 -0
- package/src/components/staked-chart/staked-chart.interface.ts +19 -0
- package/src/components/staked-chart/staked-chart.types.d.ts +9 -0
- package/src/components/table/table.interface.ts +1 -0
- package/src/components/tag-expand/tag-expand.interface.ts +1 -0
- package/src/components/time-picker/time-picker.interface.ts +1 -0
- package/src/components/toggle-icon-button/toggle-icon-button.interface.ts +1 -0
- package/src/components/vertical-bar-chart/index.d.ts +1 -0
- package/src/components/vertical-bar-chart/vertical-bar-chart.interface.ts +19 -0
- package/src/components/vertical-bar-chart/vertical-bar-chart.types.d.ts +9 -0
- package/src/models/notification.model.ts +32 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/string.utils.ts +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ToWords } from "to-words";
|
|
2
|
+
var StringUtils = /** @class */ (function () {
|
|
3
|
+
function StringUtils() {
|
|
4
|
+
}
|
|
5
|
+
StringUtils.numberToWords = function (num) {
|
|
6
|
+
return this._toWords.convert(num);
|
|
7
|
+
};
|
|
8
|
+
StringUtils._toWords = new ToWords({
|
|
9
|
+
localeCode: "pt-BR",
|
|
10
|
+
});
|
|
11
|
+
return StringUtils;
|
|
12
|
+
}());
|
|
13
|
+
export { StringUtils };
|
package/index.d.ts
CHANGED
|
@@ -85,4 +85,10 @@ export * from "./src/components/full-balance-page";
|
|
|
85
85
|
export * from "./src/components/guard-module";
|
|
86
86
|
export * from "./src/components/guard-permission";
|
|
87
87
|
export * from "./src/components/favorite-button";
|
|
88
|
+
export * from "./src/components/vertical-bar-chart";
|
|
89
|
+
export * from "./src/components/simple-table";
|
|
90
|
+
export * from "./src/components/staked-chart";
|
|
91
|
+
export * from "./src/components/line-chart";
|
|
92
|
+
export * from "./src/components/pie-chart";
|
|
93
|
+
export * from "./src/components/radar-chart";
|
|
88
94
|
export * from "./src/components/tab-result";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robbyson-frontend-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
4
4
|
"description": "Robbyson frontend Library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"redux-micro-frontend": "^1.3.0",
|
|
47
47
|
"redux-persist": "^6.0.0",
|
|
48
48
|
"robbyson-library-v2": "^0.3.2",
|
|
49
|
-
"socket.io-client": "^4.7.4"
|
|
49
|
+
"socket.io-client": "^4.7.4",
|
|
50
|
+
"to-words": "^4.1.0"
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './line-chart.interface';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
|
+
|
|
3
|
+
export interface ILineChartProps<T> extends IBaseComponentProp {
|
|
4
|
+
data: {
|
|
5
|
+
labels: string[];
|
|
6
|
+
datasets: T[];
|
|
7
|
+
};
|
|
8
|
+
datasets: {
|
|
9
|
+
label: string;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
borderWidth: number;
|
|
13
|
+
data: number[];
|
|
14
|
+
}[];
|
|
15
|
+
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/LineChart" {
|
|
5
|
+
import { ILineChartProps } from "robbyson-frontend-library";
|
|
6
|
+
const LineChart: React.ComponentType<ILineChartProps>;
|
|
7
|
+
|
|
8
|
+
export default LineChart;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pie-chart.interface';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
|
+
|
|
3
|
+
export interface IPieChartProps<T> extends IBaseComponentProp {
|
|
4
|
+
data: {
|
|
5
|
+
labels: string[];
|
|
6
|
+
datasets: T[];
|
|
7
|
+
};
|
|
8
|
+
datasets: {
|
|
9
|
+
label: string;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
borderWidth: number;
|
|
13
|
+
data: number[];
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/PieChart" {
|
|
5
|
+
import { IPieChartProps } from "robbyson-frontend-library";
|
|
6
|
+
const PieChart: React.ComponentType<IPieChartProps>;
|
|
7
|
+
|
|
8
|
+
export default PieChart;
|
|
9
|
+
}
|
|
@@ -3,6 +3,7 @@ import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
|
3
3
|
|
|
4
4
|
export interface IPrimaryTagState {
|
|
5
5
|
show: boolean;
|
|
6
|
+
removeTagbuttonLabel?: string;
|
|
6
7
|
}
|
|
7
8
|
export interface IPrimaryTagProps<T>
|
|
8
9
|
extends IBaseComponentProp,
|
|
@@ -18,4 +19,5 @@ export interface IPrimaryTagProps<T>
|
|
|
18
19
|
iconColor?: string;
|
|
19
20
|
customIcon?: React.ReactNode;
|
|
20
21
|
textClassName?: string;
|
|
22
|
+
tagRemoveButtonLabel?: string;
|
|
21
23
|
}
|
|
@@ -20,10 +20,12 @@ export interface IResultChartProps extends IBaseComponentProp {
|
|
|
20
20
|
isInitialPosition?: boolean;
|
|
21
21
|
tabIndex?: number;
|
|
22
22
|
node_id?: string;
|
|
23
|
+
dailyAriaLabel?: string;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export interface IResultChartState {
|
|
26
27
|
active: boolean;
|
|
28
|
+
isLoadingDays?: boolean;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
type ChartDataResults = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./simple-table.interface";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module 'styleguide/SimpleTable' {
|
|
5
|
+
import { ISimpleTableProps } from "robbyson-frontend-library";
|
|
6
|
+
const SimpleTable: React.ComponentType<ISimpleTableProps>;
|
|
7
|
+
|
|
8
|
+
export default SimpleTable;
|
|
9
|
+
}
|
|
@@ -3,10 +3,7 @@ import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
|
3
3
|
|
|
4
4
|
export interface ISortProps extends IBaseComponentProp {
|
|
5
5
|
titleLocaleHandle?: string;
|
|
6
|
-
options:
|
|
7
|
-
nameLocaleHandle: string;
|
|
8
|
-
value: string | number;
|
|
9
|
-
}>;
|
|
6
|
+
options: ISortOptions[];
|
|
10
7
|
defaultOption?: string | number;
|
|
11
8
|
selectedKeys?: string[];
|
|
12
9
|
icon: IconHandle;
|
|
@@ -26,3 +23,8 @@ export interface ISortState {
|
|
|
26
23
|
showSort: boolean;
|
|
27
24
|
sortValue?: string | number;
|
|
28
25
|
}
|
|
26
|
+
|
|
27
|
+
export interface ISortOptions {
|
|
28
|
+
nameLocaleHandle: string;
|
|
29
|
+
value: string | number;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './staked-chart.interface';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
|
+
|
|
3
|
+
export interface StakedChartProps<T> extends IBaseComponentProp {
|
|
4
|
+
data: {
|
|
5
|
+
labels: string[];
|
|
6
|
+
datasets: T[];
|
|
7
|
+
};
|
|
8
|
+
datasets: {
|
|
9
|
+
label: string;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
borderWidth: number;
|
|
13
|
+
data: number[];
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export interface StakedChartState {
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/StakedChart" {
|
|
5
|
+
import { IStakedChartProps } from "robbyson-frontend-library";
|
|
6
|
+
const StakedChart: React.ComponentType<IStakedChartProps>;
|
|
7
|
+
|
|
8
|
+
export default StakedChart;
|
|
9
|
+
}
|
|
@@ -8,6 +8,7 @@ export interface ITimePickerProps extends IBaseComponentProp {
|
|
|
8
8
|
onClickTime(hour: string, minutes: string): void;
|
|
9
9
|
timerPickerValue: string;
|
|
10
10
|
inputProps?: Omit<ITextFieldProps, "value" | "dataTestId">;
|
|
11
|
+
ariaLabel?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export interface ITimePickerState {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vertical-bar-chart.interface';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
|
+
|
|
3
|
+
export interface VerticalBarChartProps<T> extends IBaseComponentProp {
|
|
4
|
+
data: {
|
|
5
|
+
labels: string[];
|
|
6
|
+
datasets: T[];
|
|
7
|
+
};
|
|
8
|
+
datasets: {
|
|
9
|
+
label: string;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
borderWidth: number;
|
|
13
|
+
data: number[];
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export interface VerticalBarChartState {
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/VerticalBarChart" {
|
|
5
|
+
import { IVerticalBarChartProps } from "robbyson-frontend-library";
|
|
6
|
+
const VerticalBarChart: React.ComponentType<IVerticalBarChartProps>;
|
|
7
|
+
|
|
8
|
+
export default VerticalBarChart;
|
|
9
|
+
}
|
|
@@ -42,9 +42,40 @@ export class NotificationModel extends BaseRepositoryModel {
|
|
|
42
42
|
tags: [{ _id: false; text: string }];
|
|
43
43
|
context: [{ _id: false; flag: string; url: string }];
|
|
44
44
|
targetSystems: [number];
|
|
45
|
-
payloadTemplate:
|
|
45
|
+
payloadTemplate: Template[];
|
|
46
46
|
previewContent?: Blob | MediaSource;
|
|
47
47
|
imageContent?: Blob | MediaSource;
|
|
48
48
|
pdfUrl?: string;
|
|
49
49
|
videoContent?: Blob | MediaSource;
|
|
50
50
|
}
|
|
51
|
+
export type Template = {
|
|
52
|
+
type: 'text' | 'button' | 'table' | 'image' | 'video' | 'user' | 'list' | 'link' | 'chart' | 'open_chat' | '';
|
|
53
|
+
createdAt: string;
|
|
54
|
+
title: string;
|
|
55
|
+
footer: string;
|
|
56
|
+
voiceDescription: string;
|
|
57
|
+
payload: {
|
|
58
|
+
header: [{
|
|
59
|
+
value: string;
|
|
60
|
+
requestPayload: any;
|
|
61
|
+
color?: string;
|
|
62
|
+
style?: string;
|
|
63
|
+
tag?: string;
|
|
64
|
+
tooltip?: string;
|
|
65
|
+
}];
|
|
66
|
+
content: [{
|
|
67
|
+
subtype?: any;
|
|
68
|
+
value: any;
|
|
69
|
+
requestPayload: any;
|
|
70
|
+
color?: {
|
|
71
|
+
background: string;
|
|
72
|
+
text: string;
|
|
73
|
+
};
|
|
74
|
+
style?: string;
|
|
75
|
+
tag?: string;
|
|
76
|
+
tooltip?: string;
|
|
77
|
+
child?: any[];
|
|
78
|
+
// customization?: Partial<TemplateCustomization>;
|
|
79
|
+
}]
|
|
80
|
+
},
|
|
81
|
+
}
|
package/src/utils/index.ts
CHANGED