@omniumretail/component-library 1.2.71 → 1.2.73
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/package.json +6 -3
- package/NPMPUBLISH.md +0 -29
- package/bitbucket-pipelines.yml +0 -95
- package/dist/components/AnalyticsBar/AnalyticsBar.stories.d.ts +0 -5
- package/dist/components/BellNotifications/BellNotifications.stories.d.ts +0 -5
- package/dist/components/Button/Button.stories.d.ts +0 -6
- package/dist/components/Category/Category.stories.d.ts +0 -3
- package/dist/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +0 -3
- package/dist/components/CategoryResponse/CategoryResponse.stories.d.ts +0 -3
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -5
- package/dist/components/DatePickerTag/DatePickerTag.stories.d.ts +0 -5
- package/dist/components/DropdownButton/DropdownButton.stories.d.ts +0 -5
- package/dist/components/ExportTableData/ExportTableData.stories.d.ts +0 -3
- package/dist/components/Footer/Footer.stories.d.ts +0 -5
- package/dist/components/Footer2/Footer.stories.d.ts +0 -6
- package/dist/components/Header/Header.stories.d.ts +0 -5
- package/dist/components/Input/Input.stories.d.ts +0 -5
- package/dist/components/InputCountryCode/inputCountryCode.stories.d.ts +0 -5
- package/dist/components/Label/Label.stories.d.ts +0 -6
- package/dist/components/Link/Link.stories.d.ts +0 -7
- package/dist/components/Menu/Menu.stories.d.ts +0 -5
- package/dist/components/MobileTable/MobileTable.stories.d.ts +0 -5
- package/dist/components/ModalConfirmation/ModalConfirmation.stories.d.ts +0 -5
- package/dist/components/ModalWithTable/ModalWithTable.stories.d.ts +0 -5
- package/dist/components/Navigation/Navigation.stories.d.ts +0 -5
- package/dist/components/Notification/Notification.stories.d.ts +0 -5
- package/dist/components/Questions/Questions.stories.d.ts +0 -3
- package/dist/components/Radio/Radio.stories.d.ts +0 -5
- package/dist/components/ResponseType/ResponseType.stories.d.ts +0 -3
- package/dist/components/ResponsiveTable/ResponsiveTable.stories.d.ts +0 -9
- package/dist/components/Select/Select.stories.d.ts +0 -6
- package/dist/components/Separator/Separator.stories.d.ts +0 -6
- package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -6
- package/dist/components/Switch/Switch.stories.d.ts +0 -5
- package/dist/components/Table/Table.stories.d.ts +0 -9
- package/dist/components/Tag/Tag.stories.d.ts +0 -5
- package/dist/components/Upload/Upload.stories.d.ts +0 -3
- package/dist/components/UserInfo/UserInfo.stories.d.ts +0 -3
- package/dist/components/WebCam/WebCam.stories.d.ts +0 -3
- package/dist/types/index.d.ts +0 -2
- package/public/index.ts +0 -0
- package/src/assets/code-brackets.svg +0 -1
- package/src/assets/colors.svg +0 -1
- package/src/assets/comments.svg +0 -1
- package/src/assets/direction.svg +0 -1
- package/src/assets/flow.svg +0 -1
- package/src/assets/fonts/Silka-Bold.woff2 +0 -0
- package/src/assets/fonts/Silka-Regular.woff2 +0 -0
- package/src/assets/images/A2AI-logo.png +0 -0
- package/src/assets/images/omnium-retail-logo-white.png +0 -0
- package/src/assets/images/omnium-retail-logo.png +0 -0
- package/src/assets/images/omnium-retail_icon.png +0 -0
- package/src/assets/plugin.svg +0 -1
- package/src/assets/repo.svg +0 -1
- package/src/assets/scss/_combinations.scss +0 -0
- package/src/assets/scss/_global.scss +0 -89
- package/src/assets/scss/index.scss +0 -2
- package/src/assets/stackalt.svg +0 -1
- package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +0 -236
- package/src/components/AnalyticsBar/helpers/codeMutation.tsx +0 -19
- package/src/components/AnalyticsBar/index.tsx +0 -76
- package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +0 -13
- package/src/components/AnalyticsBar/styles.module.scss +0 -137
- package/src/components/BellNotifications/BellNotifications.stories.tsx +0 -200
- package/src/components/BellNotifications/index.tsx +0 -154
- package/src/components/BellNotifications/styles.module.scss +0 -239
- package/src/components/Button/Button.stories.tsx +0 -26
- package/src/components/Button/index.tsx +0 -24
- package/src/components/Button/styles.module.scss +0 -70
- package/src/components/Category/Category.stories.tsx +0 -371
- package/src/components/Category/CategoryContent/index.tsx +0 -255
- package/src/components/Category/CategoryContent/styles.module.scss +0 -69
- package/src/components/Category/CategorySidebar/index.tsx +0 -344
- package/src/components/Category/CategorySidebar/styles.module.scss +0 -28
- package/src/components/Category/index.tsx +0 -58
- package/src/components/Category/styles.module.scss +0 -13
- package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +0 -274
- package/src/components/CategoryReadOnly/evaluationOptions.tsx +0 -81
- package/src/components/CategoryReadOnly/index.tsx +0 -328
- package/src/components/CategoryReadOnly/styles.module.scss +0 -214
- package/src/components/CategoryResponse/CategoryResponse.stories.tsx +0 -311
- package/src/components/CategoryResponse/evaluationOptions.tsx +0 -81
- package/src/components/CategoryResponse/index.tsx +0 -502
- package/src/components/CategoryResponse/styles.module.scss +0 -365
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -16
- package/src/components/DatePicker/index.tsx +0 -38
- package/src/components/DatePicker/styles.module.scss +0 -3
- package/src/components/DatePickerTag/DatePickerTag.stories.tsx +0 -19
- package/src/components/DatePickerTag/index.tsx +0 -91
- package/src/components/DatePickerTag/styles.module.scss +0 -32
- package/src/components/DropdownButton/DropdownButton.stories.tsx +0 -24
- package/src/components/DropdownButton/index.tsx +0 -36
- package/src/components/DropdownButton/styles.module.scss +0 -9
- package/src/components/ExportTableData/ExportTableData.stories.tsx +0 -43
- package/src/components/ExportTableData/index.tsx +0 -37
- package/src/components/ExportTableData/styles.module.scss +0 -4
- package/src/components/Footer/Footer.stories.tsx +0 -15
- package/src/components/Footer/index.tsx +0 -45
- package/src/components/Footer/styles.module.scss +0 -38
- package/src/components/Footer2/Footer.stories.tsx +0 -184
- package/src/components/Footer2/index.tsx +0 -322
- package/src/components/Footer2/styles.module.scss +0 -292
- package/src/components/Header/Header.data.ts +0 -26
- package/src/components/Header/Header.stories.tsx +0 -236
- package/src/components/Header/Header.types.ts +0 -32
- package/src/components/Header/README.md +0 -38
- package/src/components/Header/index.tsx +0 -200
- package/src/components/Header/styles.module.scss +0 -216
- package/src/components/Input/Input.stories.tsx +0 -13
- package/src/components/Input/index.tsx +0 -31
- package/src/components/Input/styles.module.scss +0 -8
- package/src/components/InputCountryCode/index.tsx +0 -79
- package/src/components/InputCountryCode/inputCountryCode.stories.tsx +0 -55
- package/src/components/InputCountryCode/styles.module.scss +0 -3
- package/src/components/Label/Label.stories.tsx +0 -21
- package/src/components/Label/index.tsx +0 -19
- package/src/components/Label/styles.module.scss +0 -17
- package/src/components/Link/Link.stories.tsx +0 -30
- package/src/components/Link/index.tsx +0 -21
- package/src/components/Link/styles.module.scss +0 -24
- package/src/components/Menu/Menu.stories.tsx +0 -178
- package/src/components/Menu/helpers/codeMutation.tsx +0 -19
- package/src/components/Menu/index.tsx +0 -24
- package/src/components/Menu/styles.module.scss +0 -0
- package/src/components/MobileTable/MobileTable.stories.tsx +0 -27
- package/src/components/MobileTable/index.tsx +0 -102
- package/src/components/MobileTable/styles.module.scss +0 -75
- package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +0 -40
- package/src/components/ModalConfirmation/ModalStatusList.tsx +0 -5
- package/src/components/ModalConfirmation/index.tsx +0 -71
- package/src/components/ModalConfirmation/styles.module.scss +0 -62
- package/src/components/ModalWithTable/ModalWithTable.stories.tsx +0 -99
- package/src/components/ModalWithTable/index.tsx +0 -238
- package/src/components/ModalWithTable/styles.module.scss +0 -77
- package/src/components/Navigation/Navigation.stories.tsx +0 -21
- package/src/components/Navigation/index.tsx +0 -91
- package/src/components/Navigation/styles.module.scss +0 -91
- package/src/components/Notification/Notification.stories.tsx +0 -32
- package/src/components/Notification/index.tsx +0 -28
- package/src/components/Questions/Questions.stories.tsx +0 -37
- package/src/components/Questions/SingleQuestion/index.tsx +0 -337
- package/src/components/Questions/SingleQuestion/styles.module.scss +0 -142
- package/src/components/Questions/index.tsx +0 -124
- package/src/components/Questions/styles.modules.scss +0 -0
- package/src/components/Radio/Radio.stories.tsx +0 -43
- package/src/components/Radio/index.tsx +0 -26
- package/src/components/Radio/styles.module.scss +0 -24
- package/src/components/ResponseType/ResponseType.stories.tsx +0 -393
- package/src/components/ResponseType/index.tsx +0 -100
- package/src/components/ResponseType/styles.module.scss +0 -31
- package/src/components/ResponsiveTable/ResponsiveTable.stories.tsx +0 -386
- package/src/components/ResponsiveTable/index.tsx +0 -389
- package/src/components/ResponsiveTable/styles.module.scss +0 -153
- package/src/components/Select/Select.stories.tsx +0 -39
- package/src/components/Select/index.tsx +0 -27
- package/src/components/Select/styles.module.scss +0 -19
- package/src/components/Separator/Separator.stories.tsx +0 -22
- package/src/components/Separator/index.tsx +0 -27
- package/src/components/Separator/styles.module.scss +0 -25
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -85
- package/src/components/Sidebar/index.tsx +0 -127
- package/src/components/Sidebar/styles.module.scss +0 -141
- package/src/components/Switch/Switch.stories.tsx +0 -14
- package/src/components/Switch/index.tsx +0 -18
- package/src/components/Switch/styles.module.scss +0 -7
- package/src/components/Table/Table.stories.tsx +0 -337
- package/src/components/Table/index.tsx +0 -313
- package/src/components/Table/styles.module.scss +0 -97
- package/src/components/Tag/Tag.stories.tsx +0 -32
- package/src/components/Tag/index.tsx +0 -295
- package/src/components/Tag/styles.module.scss +0 -104
- package/src/components/Upload/Upload.stories.tsx +0 -45
- package/src/components/Upload/index.tsx +0 -112
- package/src/components/Upload/styles.module.scss +0 -29
- package/src/components/UserInfo/UserInfo.stories.tsx +0 -38
- package/src/components/UserInfo/index.tsx +0 -77
- package/src/components/UserInfo/styles.module.scss +0 -35
- package/src/components/WebCam/WebCam.stories.tsx +0 -24
- package/src/components/WebCam/index.tsx +0 -73
- package/src/components/WebCam/styles.module.scss +0 -37
- package/src/components/index.tsx +0 -34
- package/src/constants/i18n.ts +0 -25
- package/src/constants/logoCompanyHelper.ts +0 -52
- package/src/constants/translationHelper.ts +0 -7
- package/src/index.ts +0 -3
- package/src/locales/en.json +0 -142
- package/src/locales/es.json +0 -142
- package/src/locales/pt.json +0 -142
- package/src/types/Global.d.ts +0 -4
- package/tsconfig.json +0 -24
- package/vite.config.js +0 -51
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
|
-
import { AnalyticsBar } from '.';
|
|
3
|
-
import { AnalyticsBarProps } from './interfaces/analyticsBar';
|
|
4
|
-
import { getItem } from './helpers/codeMutation';
|
|
5
|
-
import { useMemo, useState } from "react";
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'AnalyticsBar',
|
|
9
|
-
component: AnalyticsBar,
|
|
10
|
-
} as Meta;
|
|
11
|
-
|
|
12
|
-
const Template: StoryFn<AnalyticsBarProps> = (args: any) => {
|
|
13
|
-
const [sortedBy, setSortedBy] = useState<any>('');
|
|
14
|
-
const [optionInUse, setOptionInUse] = useState<any>();
|
|
15
|
-
const [activeListItem, setActiveListItem] = useState<any>();
|
|
16
|
-
|
|
17
|
-
const data = [
|
|
18
|
-
{
|
|
19
|
-
"Label": "PeriodOfExperimentation",
|
|
20
|
-
"Items": [
|
|
21
|
-
{
|
|
22
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
23
|
-
"Name": "Teste1",
|
|
24
|
-
"Categories": {
|
|
25
|
-
"Category": {
|
|
26
|
-
"Name": "Category Name Here",
|
|
27
|
-
"Questions": [
|
|
28
|
-
{
|
|
29
|
-
"Name": "Name11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222",
|
|
30
|
-
"Id": "abc133"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"Name": "Name11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222",
|
|
34
|
-
"Id": "abc122"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"Label": "PeriodOfExperimentation",
|
|
44
|
-
"Items": [
|
|
45
|
-
{
|
|
46
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
47
|
-
"Name": "Name11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222"
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"Label": "PeriodOfExperimentation",
|
|
53
|
-
"Items": [
|
|
54
|
-
{
|
|
55
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
56
|
-
"Name": "Name"
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"Label": "PeriodOfExperimentation",
|
|
62
|
-
"Items": [
|
|
63
|
-
{
|
|
64
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
65
|
-
"Name": "Name"
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"Label": "PeriodOfExperimentation",
|
|
71
|
-
"Items": [
|
|
72
|
-
{
|
|
73
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
74
|
-
"Name": "Name"
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"Label": "PeriodOfExperimentation",
|
|
80
|
-
"Items": [
|
|
81
|
-
{
|
|
82
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
83
|
-
"Name": "Name"
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"Label": "PeriodOfExperimentation",
|
|
89
|
-
"Items": [
|
|
90
|
-
{
|
|
91
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
92
|
-
"Name": "Name"
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"Label": "PeriodOfExperimentation",
|
|
98
|
-
"Items": [
|
|
99
|
-
{
|
|
100
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
101
|
-
"Name": "Name"
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"Label": "PeriodOfExperimentation",
|
|
107
|
-
"Items": [
|
|
108
|
-
{
|
|
109
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
110
|
-
"Name": "Name"
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"Label": "PeriodOfExperimentation",
|
|
116
|
-
"Items": [
|
|
117
|
-
{
|
|
118
|
-
"Id": "C446FFA9-329C-4AF3-A81A-080931C6B978",
|
|
119
|
-
"Name": "Name"
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"Label": "Permanent",
|
|
125
|
-
"Items": [
|
|
126
|
-
{
|
|
127
|
-
"Id": "A3FE0C73-E771-40BB-B87D-1E40597841A6",
|
|
128
|
-
"Name": "Evaluation Cycle"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"Id": "05A411CC-4350-4779-93C4-B8A511CBBCCD",
|
|
132
|
-
"Name": "Evaluation Cycle 2"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"Id": "D5A77A3B-1163-4590-9C98-2E6D62442F62",
|
|
136
|
-
"Name": "EV2"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"Id": "42A6EFDD-6D74-4905-94AE-5B5588967BE6",
|
|
140
|
-
"Name": "EV2"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"Id": "E39FE86D-6CE1-400A-8BA2-AE31A8E9D9BE",
|
|
144
|
-
"Name": "Suuuup"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"Id": "7FC59CF0-9478-4705-B1E0-C1B709FFB81B",
|
|
148
|
-
"Name": "CicloParaRespostas1"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"Id": "767DF403-C33D-4074-B7CA-FE3F4E4B41DD",
|
|
152
|
-
"Name": "XPTO"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"Id": "DB821A00-D516-467C-8F22-710EA18BFD23",
|
|
156
|
-
"Name": "EvaluationCycle for Notifications"
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
];
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// const items = useMemo(() => data.map((el: any, index: any) => {
|
|
164
|
-
// return (
|
|
165
|
-
// getItem(
|
|
166
|
-
// el.Label,
|
|
167
|
-
// index,
|
|
168
|
-
// null,
|
|
169
|
-
// el.Items?.map((item: any, subIndex: any) => {
|
|
170
|
-
// return getItem(item.Name, item.Id);
|
|
171
|
-
// })
|
|
172
|
-
// )
|
|
173
|
-
// )
|
|
174
|
-
// }), [data]);
|
|
175
|
-
|
|
176
|
-
const items = useMemo(() => {
|
|
177
|
-
const createQuestionItems = (questionsData: any[]): any[] => {
|
|
178
|
-
return questionsData.map((question: any) => {
|
|
179
|
-
return getItem(question.Name, question.Id);
|
|
180
|
-
});
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
const createCategoryItems = (categoryData: any): any[] => {
|
|
184
|
-
if (categoryData) {
|
|
185
|
-
return [
|
|
186
|
-
getItem(
|
|
187
|
-
categoryData.Name,
|
|
188
|
-
categoryData.Name,
|
|
189
|
-
null,
|
|
190
|
-
createQuestionItems(categoryData.Questions)
|
|
191
|
-
),
|
|
192
|
-
];
|
|
193
|
-
}
|
|
194
|
-
return [];
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
return data.map((el: any, index: any) => {
|
|
198
|
-
return getItem(
|
|
199
|
-
el.Label,
|
|
200
|
-
index,
|
|
201
|
-
null,
|
|
202
|
-
el.Items?.map((item: any) => {
|
|
203
|
-
const categoryItems = createCategoryItems(item.Categories?.Category);
|
|
204
|
-
return getItem(
|
|
205
|
-
item.Name,
|
|
206
|
-
item.Id,
|
|
207
|
-
null,
|
|
208
|
-
categoryItems.length ? categoryItems : undefined
|
|
209
|
-
);
|
|
210
|
-
})
|
|
211
|
-
);
|
|
212
|
-
});
|
|
213
|
-
}, [data]);
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const selectOptions = [
|
|
217
|
-
{
|
|
218
|
-
value: 'ano',
|
|
219
|
-
label: 'ANO',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
value: 'tipo_de_ciclo',
|
|
223
|
-
label: 'TIPO DE CICLO',
|
|
224
|
-
},
|
|
225
|
-
];
|
|
226
|
-
|
|
227
|
-
// console.log('stories:', sortedBy, optionInUse, activeListItem);
|
|
228
|
-
|
|
229
|
-
return <div style={{height: '500px'}}>
|
|
230
|
-
<AnalyticsBar {...args} data={items} selectOptions={selectOptions} selectDefault={selectOptions[0]} sortedBy={setSortedBy} selectUserOption={setOptionInUse} activeListItem={setActiveListItem}></AnalyticsBar>
|
|
231
|
-
</div>;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export const Primary = Template.bind({});
|
|
235
|
-
Primary.args = {
|
|
236
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { MenuProps } from 'antd';
|
|
2
|
-
|
|
3
|
-
export type MenuItem = Required<MenuProps>['items'][number];
|
|
4
|
-
|
|
5
|
-
export function getItem(
|
|
6
|
-
label: React.ReactNode,
|
|
7
|
-
key: React.Key,
|
|
8
|
-
icon?: React.ReactNode,
|
|
9
|
-
children?: MenuItem[],
|
|
10
|
-
type?: 'group',
|
|
11
|
-
): MenuItem {
|
|
12
|
-
return {
|
|
13
|
-
key,
|
|
14
|
-
icon,
|
|
15
|
-
children,
|
|
16
|
-
label,
|
|
17
|
-
type,
|
|
18
|
-
} as MenuItem;
|
|
19
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import styles from './styles.module.scss';
|
|
2
|
-
import { MinusOutlined, PlusOutlined, SortAscendingOutlined, SortDescendingOutlined } from '@ant-design/icons';
|
|
3
|
-
import { Select } from '../Select';
|
|
4
|
-
import type { MenuProps } from 'antd';
|
|
5
|
-
import { Menu, Tooltip } from 'antd';
|
|
6
|
-
import { AnalyticsBarProps, sortBy } from './interfaces/analyticsBar';
|
|
7
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
8
|
-
import { t } from 'i18next';
|
|
9
|
-
|
|
10
|
-
export const AnalyticsBar = (props: AnalyticsBarProps) => {
|
|
11
|
-
const {
|
|
12
|
-
data: items = [],
|
|
13
|
-
selectOptions,
|
|
14
|
-
selectDefault,
|
|
15
|
-
selectUserOption,
|
|
16
|
-
sortedBy,
|
|
17
|
-
activeListItem
|
|
18
|
-
} = props;
|
|
19
|
-
|
|
20
|
-
const [selectedKeys, setSelectedKeys] = useState<string[]>([]);
|
|
21
|
-
const [sortInfo, setSortInfo] = useState<any>(sortBy.desc);
|
|
22
|
-
|
|
23
|
-
const selectOnChange = useCallback((value: any) => {
|
|
24
|
-
selectUserOption(value);
|
|
25
|
-
}, [selectUserOption]);
|
|
26
|
-
|
|
27
|
-
const setSorter = useCallback(() => {
|
|
28
|
-
sortInfo === sortBy.desc
|
|
29
|
-
? setSortInfo(sortBy.asc)
|
|
30
|
-
: setSortInfo(sortBy.desc);
|
|
31
|
-
|
|
32
|
-
sortedBy(sortInfo);
|
|
33
|
-
}, [sortInfo]);
|
|
34
|
-
|
|
35
|
-
const onClick: MenuProps['onClick'] = (e: any) => {
|
|
36
|
-
const { key } = e;
|
|
37
|
-
if (selectedKeys.includes(key)) {
|
|
38
|
-
setSelectedKeys([]);
|
|
39
|
-
} else {
|
|
40
|
-
setSelectedKeys([key]);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
activeListItem(key);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<div className={styles.analyticsbar}>
|
|
48
|
-
<div className={styles.header}>
|
|
49
|
-
<Select
|
|
50
|
-
options={selectOptions}
|
|
51
|
-
customClass={styles.select}
|
|
52
|
-
onChange={selectOnChange}
|
|
53
|
-
defaultActiveFirstOption
|
|
54
|
-
defaultValue={selectDefault}
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<div className={styles.sorterWrapper} onClick={() => setSorter()}>
|
|
58
|
-
{sortInfo === sortBy.desc
|
|
59
|
-
? <>{t('components.analyticsBar.desc')}<SortDescendingOutlined /></>
|
|
60
|
-
: <>{t('components.analyticsBar.asc')}<SortAscendingOutlined /></>
|
|
61
|
-
}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div className={styles.content}>
|
|
66
|
-
<Menu
|
|
67
|
-
selectedKeys={selectedKeys}
|
|
68
|
-
onClick={onClick}
|
|
69
|
-
mode="inline"
|
|
70
|
-
items={items}
|
|
71
|
-
expandIcon={({ isOpen }) => (isOpen ? <MinusOutlined /> : <PlusOutlined />)}
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
.select {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.analyticsbar {
|
|
6
|
-
background: #2C2D2E0D;
|
|
7
|
-
height: 100%;
|
|
8
|
-
position: relative;
|
|
9
|
-
|
|
10
|
-
:global {
|
|
11
|
-
.ant-menu-light {
|
|
12
|
-
background-color: transparent !important;
|
|
13
|
-
border-inline-end: none !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ant-menu-title-content {
|
|
17
|
-
font-size: 17px;
|
|
18
|
-
line-height: 20px;
|
|
19
|
-
font-weight: var(--font-weight-semibold);
|
|
20
|
-
|
|
21
|
-
&:hover {
|
|
22
|
-
color: var(--color-orange);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.ant-menu-sub {
|
|
27
|
-
.ant-menu-title-content {
|
|
28
|
-
font-size: 15px;
|
|
29
|
-
line-height: 18px;
|
|
30
|
-
font-weight: var(--font-weight-medium);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ant-menu-item {
|
|
34
|
-
height: 30px;
|
|
35
|
-
line-height: 30px;
|
|
36
|
-
margin-bottom: 16px;
|
|
37
|
-
|
|
38
|
-
&:first-child {
|
|
39
|
-
margin-top: -10px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.ant-menu-submenu {
|
|
45
|
-
border-top: 1px solid var(--color-orange);
|
|
46
|
-
border-radius: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.ant-menu-item {
|
|
50
|
-
&:hover {
|
|
51
|
-
background-color: initial !important;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.ant-menu-item-selected,
|
|
56
|
-
.ant-menu-submenu-selected>.ant-menu-submenu-title {
|
|
57
|
-
color: var(--color-orange);
|
|
58
|
-
background-color: initial;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.ant-menu-inline .ant-menu-sub.ant-menu-inline {
|
|
62
|
-
background: initial;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.ant-menu-submenu-title {
|
|
66
|
-
height: 50px !important;
|
|
67
|
-
line-height: 50px !important;
|
|
68
|
-
|
|
69
|
-
&:hover {
|
|
70
|
-
background-color: initial !important;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.anticon {
|
|
74
|
-
color: var(--color-orange);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.ant-menu-inline.ant-menu-root .ant-menu-item>.ant-menu-title-content {
|
|
79
|
-
overflow-x: auto;
|
|
80
|
-
text-overflow: unset;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.header {
|
|
86
|
-
position: absolute;
|
|
87
|
-
top: 24px;
|
|
88
|
-
left: 24px;
|
|
89
|
-
right: 24px;
|
|
90
|
-
height: 144px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.sorterWrapper {
|
|
94
|
-
font-size: var(--font-size-body-2);
|
|
95
|
-
line-height: 14px;
|
|
96
|
-
font-weight: var(--font-weight-light);
|
|
97
|
-
display: inline-block;
|
|
98
|
-
padding: 12px;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
position: absolute;
|
|
101
|
-
right: 0;
|
|
102
|
-
top: 60px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.content {
|
|
106
|
-
position: absolute;
|
|
107
|
-
top: 144px;
|
|
108
|
-
left: 24px;
|
|
109
|
-
right: 24px;
|
|
110
|
-
bottom: 0;
|
|
111
|
-
overflow-y: auto;
|
|
112
|
-
overflow-x: hidden;
|
|
113
|
-
padding-bottom: 24px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
::-webkit-scrollbar {
|
|
117
|
-
width: 6px;
|
|
118
|
-
height: 6px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
::-webkit-scrollbar-track {
|
|
122
|
-
border-radius: 10px;
|
|
123
|
-
background: rgba(0, 0, 0, 0.1);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
::-webkit-scrollbar-thumb {
|
|
127
|
-
border-radius: 10px;
|
|
128
|
-
background: rgba(0, 0, 0, 0.2);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
::-webkit-scrollbar-thumb:hover {
|
|
132
|
-
background: rgba(0, 0, 0, 0.4);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
::-webkit-scrollbar-thumb:active {
|
|
136
|
-
background: rgba(0, 0, 0, .9);
|
|
137
|
-
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
|
-
import { BellNotifications, BellNotificationsProps } from '.';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'BellNotifications',
|
|
6
|
-
component: BellNotifications,
|
|
7
|
-
} as Meta;
|
|
8
|
-
|
|
9
|
-
const Template: StoryFn<BellNotificationsProps> = (args: any) => <BellNotifications {...args}></BellNotifications>;
|
|
10
|
-
|
|
11
|
-
const notifications = [
|
|
12
|
-
{
|
|
13
|
-
"Id": "662C390B-A38F-45AB-B97C-2D00F0A8ACAD",
|
|
14
|
-
"Title": "Creation of an Evaluation Cycle",
|
|
15
|
-
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
16
|
-
"RedirectURL": "https://www.google.pt",
|
|
17
|
-
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
18
|
-
"ExpirationDate": 1736899200,
|
|
19
|
-
"Criticality": {
|
|
20
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
21
|
-
"Name": "High",
|
|
22
|
-
"ColorHex": "#E05151"
|
|
23
|
-
},
|
|
24
|
-
"IsRead": true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"Id": "0AF18720-1C94-48CD-8DF3-D254077E8363",
|
|
28
|
-
"Title": "Creation of an Evaluation Cycle",
|
|
29
|
-
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
30
|
-
"RedirectURL": "https://www.google.pt",
|
|
31
|
-
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
32
|
-
"ExpirationDate": 1736899200,
|
|
33
|
-
"Criticality": {
|
|
34
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
35
|
-
"Name": "High",
|
|
36
|
-
"ColorHex": "#E05151"
|
|
37
|
-
},
|
|
38
|
-
"IsRead": true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"Id": "0419654F-66FE-41EA-BBA4-D8BB6E3D6B33",
|
|
42
|
-
"Title": "Creation of an Evaluation Cycle",
|
|
43
|
-
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
44
|
-
"RedirectURL": "https://www.google.pt",
|
|
45
|
-
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
46
|
-
"ExpirationDate": 1736899200,
|
|
47
|
-
"Criticality": {
|
|
48
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
49
|
-
"Name": "High",
|
|
50
|
-
"ColorHex": "#E05151"
|
|
51
|
-
},
|
|
52
|
-
"IsRead": true
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"Id": "CC98EDA1-0461-4D08-982E-8424EF4AFB3B",
|
|
56
|
-
"Title": "Creation of an Evaluation Cycle",
|
|
57
|
-
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
58
|
-
"RedirectURL": "https://www.google.pt",
|
|
59
|
-
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
60
|
-
"ExpirationDate": 1736899200,
|
|
61
|
-
"Criticality": {
|
|
62
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
63
|
-
"Name": "High",
|
|
64
|
-
"ColorHex": "#E05151"
|
|
65
|
-
},
|
|
66
|
-
"IsRead": false
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"Id": "3DB9310A-4BF8-4B90-8D5A-7583473664BB",
|
|
70
|
-
"Title": "Creation of an Evaluation Cycle",
|
|
71
|
-
"Description": "A new evaluation cycle was created. You must answer it.",
|
|
72
|
-
"RedirectURL": "https://www.google.pt",
|
|
73
|
-
"Icon": "https://omniumfont.s3.eu-west-1.amazonaws.com/Assets/images/aacp-image.png",
|
|
74
|
-
"ExpirationDate": 1736899200,
|
|
75
|
-
"Criticality": {
|
|
76
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
77
|
-
"Name": "High",
|
|
78
|
-
"ColorHex": "#E05151"
|
|
79
|
-
},
|
|
80
|
-
"IsRead": false
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"Id": "D6FB93EE-3255-42B2-8EC1-27E7AC3F5249",
|
|
84
|
-
"Title": "Creation of a new user",
|
|
85
|
-
"Description": "A new user was created in the platform with the mecanographic number 8111.",
|
|
86
|
-
"RedirectURL": "https://www.google.pt",
|
|
87
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
88
|
-
"ExpirationDate": 1736985600,
|
|
89
|
-
"Criticality": {
|
|
90
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
91
|
-
"Name": "High",
|
|
92
|
-
"ColorHex": "#E05151"
|
|
93
|
-
},
|
|
94
|
-
"IsRead": false
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"Id": "D6FB96EE-3255-42B2-8EC1-27E7AC3F5249",
|
|
98
|
-
"Title": "Creation of a new action of inspection",
|
|
99
|
-
"Description": "A new inspection action was created.",
|
|
100
|
-
"RedirectURL": "https://www.google.pt",
|
|
101
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
102
|
-
"ExpirationDate": 1736985600,
|
|
103
|
-
"Criticality": {
|
|
104
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
105
|
-
"Name": "High",
|
|
106
|
-
"ColorHex": "#E05151"
|
|
107
|
-
},
|
|
108
|
-
"IsRead": false
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"Id": "D6FB96EE-3655-42B2-8EC1-27E7AC3F5249",
|
|
112
|
-
"Title": "Creation of a new action of inspection",
|
|
113
|
-
"Description": "A new inspection action was created.",
|
|
114
|
-
"RedirectURL": "https://www.google.pt",
|
|
115
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
116
|
-
"ExpirationDate": 1736985600,
|
|
117
|
-
"Criticality": {
|
|
118
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
119
|
-
"Name": "High",
|
|
120
|
-
"ColorHex": "#E05151"
|
|
121
|
-
},
|
|
122
|
-
"IsRead": false
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"Id": "D6FB96EE-3255-46B2-8EC1-27E7AC3F5249",
|
|
126
|
-
"Title": "Creation of a new action of inspection",
|
|
127
|
-
"Description": "A new inspection action was created.",
|
|
128
|
-
"RedirectURL": "https://www.google.pt",
|
|
129
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
130
|
-
"ExpirationDate": 1736985600,
|
|
131
|
-
"Criticality": {
|
|
132
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
133
|
-
"Name": "High",
|
|
134
|
-
"ColorHex": "#E05151"
|
|
135
|
-
},
|
|
136
|
-
"IsRead": false
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"Id": "D9FB96EE-3255-42B2-8EC1-27E7AC3F5249",
|
|
140
|
-
"Title": "Creation of a new action of inspection",
|
|
141
|
-
"Description": "A new inspection action was created.",
|
|
142
|
-
"RedirectURL": "https://www.google.pt",
|
|
143
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
144
|
-
"ExpirationDate": 1736985600,
|
|
145
|
-
"Criticality": {
|
|
146
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
147
|
-
"Name": "High",
|
|
148
|
-
"ColorHex": "#E05151"
|
|
149
|
-
},
|
|
150
|
-
"IsRead": false
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"Id": "D6FB96EE-5955-42B2-8EC1-27E7AC3F5249",
|
|
154
|
-
"Title": "Creation of a new action of inspection",
|
|
155
|
-
"Description": "A new inspection action was created.",
|
|
156
|
-
"RedirectURL": "https://www.google.pt",
|
|
157
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
158
|
-
"ExpirationDate": 1736985600,
|
|
159
|
-
"Criticality": {
|
|
160
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
161
|
-
"Name": "High",
|
|
162
|
-
"ColorHex": "#E05151"
|
|
163
|
-
},
|
|
164
|
-
"IsRead": false
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"Id": "D6FB96EE-3255-42B7-8EC1-27E7AC3F5249",
|
|
168
|
-
"Title": "Creation of a new action of inspection",
|
|
169
|
-
"Description": "A new inspection action was created.",
|
|
170
|
-
"RedirectURL": "https://www.google.pt",
|
|
171
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
172
|
-
"ExpirationDate": 1736985600,
|
|
173
|
-
"Criticality": {
|
|
174
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
175
|
-
"Name": "High",
|
|
176
|
-
"ColorHex": "#E05151"
|
|
177
|
-
},
|
|
178
|
-
"IsRead": false
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"Id": "D6FB96EE-3255-42B7-8EC1-27E7AC3F5249",
|
|
182
|
-
"Title": "Creation of a new action of inspection",
|
|
183
|
-
"Description": "A new inspection action was created.",
|
|
184
|
-
"RedirectURL": "https://www.google.pt",
|
|
185
|
-
"Icon": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/omniumretail-bigwingame-logotipo-vermelho.svg",
|
|
186
|
-
"ExpirationDate": 1736985600,
|
|
187
|
-
"Criticality": {
|
|
188
|
-
"Id": "F133ED4C-6C72-4CDC-86A1-27A76E6BDE7F",
|
|
189
|
-
"Name": "High",
|
|
190
|
-
"ColorHex": "#E05151"
|
|
191
|
-
},
|
|
192
|
-
"IsRead": false
|
|
193
|
-
}
|
|
194
|
-
];
|
|
195
|
-
|
|
196
|
-
export const Primary = Template.bind({});
|
|
197
|
-
Primary.args = {
|
|
198
|
-
notifications: notifications
|
|
199
|
-
};
|
|
200
|
-
|