@omniumretail/component-library 1.2.69 → 1.2.71
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/component-library.umd.js +1154 -0
- package/dist/components/AnalyticsBar/AnalyticsBar.stories.d.ts +5 -0
- package/dist/{types/components → components}/AnalyticsBar/helpers/codeMutation.d.ts +2 -2
- package/dist/{types/components → components}/AnalyticsBar/index.d.ts +2 -1
- package/dist/components/BellNotifications/BellNotifications.stories.d.ts +5 -0
- package/dist/components/Button/Button.stories.d.ts +6 -0
- package/dist/{types/components → components}/Button/index.d.ts +2 -1
- package/dist/components/Category/Category.stories.d.ts +3 -0
- package/dist/{types/components → components}/Category/index.d.ts +2 -1
- package/dist/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +3 -0
- package/dist/{types/components → components}/CategoryReadOnly/index.d.ts +2 -1
- package/dist/components/CategoryResponse/CategoryResponse.stories.d.ts +3 -0
- package/dist/{types/components → components}/CategoryResponse/index.d.ts +3 -2
- package/dist/components/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/{types/components → components}/DatePicker/index.d.ts +2 -1
- package/dist/components/DatePickerTag/DatePickerTag.stories.d.ts +5 -0
- package/dist/{types/components → components}/DatePickerTag/index.d.ts +2 -1
- package/dist/components/DropdownButton/DropdownButton.stories.d.ts +5 -0
- package/dist/{types/components → components}/DropdownButton/index.d.ts +3 -2
- package/dist/components/ExportTableData/ExportTableData.stories.d.ts +3 -0
- package/dist/components/Footer/Footer.stories.d.ts +5 -0
- package/dist/components/Footer2/Footer.stories.d.ts +6 -0
- package/dist/{types/components → components}/Footer2/index.d.ts +2 -1
- package/dist/{types/components → components}/Header/Header.data.d.ts +2 -1
- package/dist/components/Header/Header.stories.d.ts +5 -0
- package/dist/{types/components → components}/Header/Header.types.d.ts +2 -1
- package/dist/{types/components → components}/Header/index.d.ts +2 -1
- package/dist/components/Input/Input.stories.d.ts +5 -0
- package/dist/{types/components → components}/Input/index.d.ts +2 -1
- package/dist/{types/components → components}/InputCountryCode/index.d.ts +2 -1
- package/dist/components/InputCountryCode/inputCountryCode.stories.d.ts +5 -0
- package/dist/components/Label/Label.stories.d.ts +6 -0
- package/dist/components/Link/Link.stories.d.ts +7 -0
- package/dist/{types/components → components}/Link/index.d.ts +2 -1
- package/dist/components/Menu/Menu.stories.d.ts +5 -0
- package/dist/{types/components → components}/Menu/helpers/codeMutation.d.ts +2 -2
- package/dist/{types/components → components}/Menu/index.d.ts +2 -1
- package/dist/components/MobileTable/MobileTable.stories.d.ts +5 -0
- package/dist/{types/components → components}/MobileTable/index.d.ts +2 -1
- package/dist/components/ModalConfirmation/ModalConfirmation.stories.d.ts +5 -0
- package/dist/components/ModalWithTable/ModalWithTable.stories.d.ts +5 -0
- package/dist/{types/components → components}/ModalWithTable/index.d.ts +2 -1
- package/dist/components/Navigation/Navigation.stories.d.ts +5 -0
- package/dist/components/Notification/Notification.stories.d.ts +5 -0
- package/dist/{types/components → components}/Notification/index.d.ts +2 -1
- package/dist/components/Questions/Questions.stories.d.ts +3 -0
- package/dist/components/Radio/Radio.stories.d.ts +5 -0
- package/dist/{types/components → components}/Radio/index.d.ts +3 -2
- package/dist/components/ResponseType/ResponseType.stories.d.ts +3 -0
- package/dist/components/ResponsiveTable/ResponsiveTable.stories.d.ts +9 -0
- package/dist/{types/components → components}/ResponsiveTable/index.d.ts +2 -1
- package/dist/components/Select/Select.stories.d.ts +6 -0
- package/dist/{types/components → components}/Select/index.d.ts +2 -1
- package/dist/components/Separator/Separator.stories.d.ts +6 -0
- package/dist/components/Sidebar/Sidebar.stories.d.ts +6 -0
- package/dist/components/Switch/Switch.stories.d.ts +5 -0
- package/dist/{types/components → components}/Switch/index.d.ts +2 -1
- package/dist/components/Table/Table.stories.d.ts +9 -0
- package/dist/{types/components → components}/Table/index.d.ts +2 -1
- package/dist/components/Tag/Tag.stories.d.ts +5 -0
- package/dist/{types/components → components}/Tag/index.d.ts +3 -2
- package/dist/components/Upload/Upload.stories.d.ts +3 -0
- package/dist/{types/components → components}/Upload/index.d.ts +3 -2
- package/dist/components/UserInfo/UserInfo.stories.d.ts +3 -0
- package/dist/components/WebCam/WebCam.stories.d.ts +3 -0
- package/dist/{types/components → components}/WebCam/index.d.ts +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.ts +0 -0
- package/dist/locales/en.json.d.ts +144 -0
- package/dist/locales/es.json.d.ts +144 -0
- package/dist/locales/pt.json.d.ts +145 -0
- package/dist/types/index.d.ts +2 -3
- package/package.json +24 -120
- package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +2 -2
- package/src/components/BellNotifications/BellNotifications.stories.tsx +2 -2
- package/src/components/Button/Button.stories.tsx +2 -2
- package/src/components/Category/Category.stories.tsx +2 -2
- package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +3 -3
- package/src/components/CategoryResponse/CategoryResponse.stories.tsx +4 -5
- package/src/components/DatePicker/DatePicker.stories.tsx +2 -2
- package/src/components/DatePickerTag/DatePickerTag.stories.tsx +2 -2
- package/src/components/DatePickerTag/index.tsx +3 -3
- package/src/components/DropdownButton/DropdownButton.stories.tsx +2 -2
- package/src/components/ExportTableData/ExportTableData.stories.tsx +2 -2
- package/src/components/Footer/Footer.stories.tsx +2 -2
- package/src/components/Footer/index.tsx +6 -6
- package/src/components/Footer2/Footer.stories.tsx +4 -4
- package/src/components/Footer2/index.tsx +6 -6
- package/src/components/Header/Header.stories.tsx +2 -2
- package/src/components/Header/Header.types.ts +1 -1
- package/src/components/Input/Input.stories.tsx +2 -2
- package/src/components/InputCountryCode/inputCountryCode.stories.tsx +2 -2
- package/src/components/Label/Label.stories.tsx +2 -2
- package/src/components/Link/Link.stories.tsx +2 -2
- package/src/components/Menu/Menu.stories.tsx +2 -2
- package/src/components/MobileTable/MobileTable.stories.tsx +2 -2
- package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +2 -2
- package/src/components/ModalWithTable/ModalWithTable.stories.tsx +2 -2
- package/src/components/Navigation/Navigation.stories.tsx +2 -2
- package/src/components/Notification/Notification.stories.tsx +3 -3
- package/src/components/Questions/Questions.stories.tsx +2 -2
- package/src/components/Questions/index.tsx +1 -1
- package/src/components/Radio/Radio.stories.tsx +2 -2
- package/src/components/ResponseType/ResponseType.stories.tsx +2 -2
- package/src/components/ResponsiveTable/ResponsiveTable.stories.tsx +2 -2
- package/src/components/Select/Select.stories.tsx +2 -2
- package/src/components/Separator/Separator.stories.tsx +2 -2
- package/src/components/Sidebar/Sidebar.stories.tsx +2 -2
- package/src/components/Switch/Switch.stories.tsx +2 -2
- package/src/components/Table/Table.stories.tsx +2 -2
- package/src/components/Tag/Tag.stories.tsx +2 -2
- package/src/components/Upload/Upload.stories.tsx +3 -3
- package/src/components/UserInfo/UserInfo.stories.tsx +2 -2
- package/src/components/WebCam/WebCam.stories.tsx +2 -2
- package/src/constants/i18n.ts +1 -1
- package/tsconfig.json +11 -16
- package/vite.config.js +51 -0
- package/dist/780.bundle.js +0 -1
- package/dist/838.bundle.js +0 -2
- package/dist/838.bundle.js.LICENSE.txt +0 -1
- package/dist/bundle.js +0 -2
- package/dist/bundle.js.LICENSE.txt +0 -461
- package/dist/main.css +0 -36
- package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +0 -5
- package/dist/types/components/BellNotifications/BellNotifications.stories.d.ts +0 -5
- package/dist/types/components/Button/Button.stories.d.ts +0 -6
- package/dist/types/components/Category/Category.stories.d.ts +0 -4
- package/dist/types/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +0 -4
- package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +0 -4
- package/dist/types/components/DatePicker/DatePicker.stories.d.ts +0 -5
- package/dist/types/components/DatePickerTag/DatePickerTag.stories.d.ts +0 -5
- package/dist/types/components/DropdownButton/DropdownButton.stories.d.ts +0 -5
- package/dist/types/components/ExportTableData/ExportTableData.stories.d.ts +0 -4
- package/dist/types/components/Footer/Footer.stories.d.ts +0 -5
- package/dist/types/components/Footer2/Footer.stories.d.ts +0 -6
- package/dist/types/components/Header/Header.stories.d.ts +0 -5
- package/dist/types/components/Input/Input.stories.d.ts +0 -5
- package/dist/types/components/InputCountryCode/inputCountryCode.stories.d.ts +0 -5
- package/dist/types/components/Label/Label.stories.d.ts +0 -6
- package/dist/types/components/Link/Link.stories.d.ts +0 -7
- package/dist/types/components/Menu/Menu.stories.d.ts +0 -5
- package/dist/types/components/MobileTable/MobileTable.stories.d.ts +0 -5
- package/dist/types/components/MobileTable/UserInfoTable/index.d.ts +0 -21
- package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +0 -5
- package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +0 -5
- package/dist/types/components/Navigation/Navigation.stories.d.ts +0 -5
- package/dist/types/components/Notification/Notification.stories.d.ts +0 -5
- package/dist/types/components/Questions/Questions.stories.d.ts +0 -4
- package/dist/types/components/Radio/Radio.stories.d.ts +0 -5
- package/dist/types/components/ResponseType/Category.stories.d.ts +0 -4
- package/dist/types/components/ResponseType/ResponseType.stories.d.ts +0 -4
- package/dist/types/components/ResponsiveTable/ResponsiveTable.stories.d.ts +0 -9
- package/dist/types/components/Select/Select.stories.d.ts +0 -6
- package/dist/types/components/Separator/Separator.stories.d.ts +0 -6
- package/dist/types/components/Sidebar/Sidebar.stories.d.ts +0 -6
- package/dist/types/components/Switch/Switch.stories.d.ts +0 -5
- package/dist/types/components/Table/Table.stories.d.ts +0 -9
- package/dist/types/components/Tag/Tag.stories.d.ts +0 -5
- package/dist/types/components/Upload/Upload.stories.d.ts +0 -4
- package/dist/types/components/UserInfo/UserInfo.stories.d.ts +0 -4
- package/dist/types/components/WebCam/WebCam.stories.d.ts +0 -4
- package/webpack.config.js +0 -51
- /package/dist/{types/components → components}/AnalyticsBar/interfaces/analyticsBar.d.ts +0 -0
- /package/dist/{types/components → components}/BellNotifications/index.d.ts +0 -0
- /package/dist/{types/components → components}/Category/CategoryContent/index.d.ts +0 -0
- /package/dist/{types/components → components}/Category/CategorySidebar/index.d.ts +0 -0
- /package/dist/{types/components → components}/CategoryReadOnly/evaluationOptions.d.ts +0 -0
- /package/dist/{types/components → components}/CategoryResponse/evaluationOptions.d.ts +0 -0
- /package/dist/{types/components → components}/ExportTableData/index.d.ts +0 -0
- /package/dist/{types/components → components}/Footer/index.d.ts +0 -0
- /package/dist/{types/components → components}/Label/index.d.ts +0 -0
- /package/dist/{types/components → components}/ModalConfirmation/ModalStatusList.d.ts +0 -0
- /package/dist/{types/components → components}/ModalConfirmation/index.d.ts +0 -0
- /package/dist/{types/components → components}/Navigation/index.d.ts +0 -0
- /package/dist/{types/components → components}/Questions/SingleQuestion/index.d.ts +0 -0
- /package/dist/{types/components → components}/Questions/index.d.ts +0 -0
- /package/dist/{types/components → components}/ResponseType/index.d.ts +0 -0
- /package/dist/{types/components → components}/Separator/index.d.ts +0 -0
- /package/dist/{types/components → components}/Sidebar/index.d.ts +0 -0
- /package/dist/{types/components → components}/UserInfo/index.d.ts +0 -0
- /package/dist/{types/components → components}/index.d.ts +0 -0
- /package/dist/{types/constants → constants}/i18n.d.ts +0 -0
- /package/dist/{types/constants → constants}/logoCompanyHelper.d.ts +0 -0
- /package/dist/{types/constants → constants}/translationHelper.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Button, CustomButtonProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: Button,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<CustomButtonProps> = (args: any) => <Button {...args}>ola</Button>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Category } from '.';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: Category,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<any> = (args: any) => {
|
|
11
11
|
const [serverData, setServerData] = useState<any>();
|
|
12
12
|
|
|
13
13
|
useEffect(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Meta,
|
|
2
|
-
import { Button } from "
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
|
+
import { Button } from "../Button";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { CategoryReadOnly } from '.';
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: CategoryReadOnly,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const Template:
|
|
11
|
+
const Template: StoryFn<any> = (args: any) => {
|
|
12
12
|
const [serverData, setServerData] = useState<any>();
|
|
13
13
|
const categoryResponseRef = useRef(null);
|
|
14
14
|
const [hasNext, setHasNext] = useState(true);
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { Meta,
|
|
2
|
-
import { Button } from "
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
|
+
import { Button } from "../Button";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { CategoryResponse } from '.';
|
|
5
5
|
import { UploadFile } from "antd";
|
|
6
|
-
import moment from "moment";
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
8
|
title: 'CategoryResponse',
|
|
10
9
|
component: CategoryResponse,
|
|
11
10
|
} as Meta;
|
|
12
11
|
|
|
13
|
-
const Template:
|
|
12
|
+
const Template: StoryFn<any> = (args: any) => {
|
|
14
13
|
const [serverData, setServerData] = useState<any>();
|
|
15
14
|
const categoryResponseRef = useRef(null);
|
|
16
15
|
const [hasNext, setHasNext] = useState(true);
|
|
@@ -143,7 +142,7 @@ Primary.args = {
|
|
|
143
142
|
"Grade": "0",
|
|
144
143
|
"Note": "asasas",
|
|
145
144
|
"Disabled": true,
|
|
146
|
-
"Answer":
|
|
145
|
+
"Answer": [],
|
|
147
146
|
"IsDate": true
|
|
148
147
|
},
|
|
149
148
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { CustomDatePicker, CustomDatePickerProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: CustomDatePicker,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<CustomDatePickerProps> = (args: any) => <CustomDatePicker {...args}></CustomDatePicker>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { DatePickerTag } from '.';
|
|
3
3
|
import { TagProps } from 'antd';
|
|
4
4
|
import { useState } from "react";
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: DatePickerTag,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const Template:
|
|
11
|
+
const Template: StoryFn<TagProps> = (args: any) => {
|
|
12
12
|
const [tagsInfo, setTagsInfo] = useState<any>({});
|
|
13
13
|
|
|
14
14
|
return <DatePickerTag {...args} tagsInfo={setTagsInfo}></DatePickerTag>;
|
|
@@ -4,14 +4,14 @@ import { DatePicker, Tag, TagProps } from 'antd';
|
|
|
4
4
|
import { TweenOneGroup } from 'rc-tween-one';
|
|
5
5
|
import styles from './styles.module.scss';
|
|
6
6
|
import { t } from 'i18next';
|
|
7
|
-
import
|
|
7
|
+
import dayjs from "dayjs";
|
|
8
8
|
import locale from 'antd/es/date-picker/locale/pt_BR';
|
|
9
9
|
|
|
10
10
|
export interface DatePickerTagProps extends TagProps {
|
|
11
11
|
customTags?: any,
|
|
12
12
|
tagsInfo?: any;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
type DateValue = Dayjs | null;
|
|
16
16
|
|
|
17
17
|
export const DatePickerTag = (props: DatePickerTagProps) => {
|
|
@@ -59,7 +59,7 @@ export const DatePickerTag = (props: DatePickerTagProps) => {
|
|
|
59
59
|
return (
|
|
60
60
|
<div className={styles.tagfield}>
|
|
61
61
|
<DatePicker
|
|
62
|
-
disabledDate={(current) => current && current <
|
|
62
|
+
disabledDate={(current) => current && current < dayjs().endOf("day")}
|
|
63
63
|
value={dateValue}
|
|
64
64
|
onChange={handleChange as any}
|
|
65
65
|
className={styles.picker}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Meta,
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
3
3
|
import { DropdownButton, DropdownButtonProps } from '.';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -11,7 +11,7 @@ const onLeft = () => {
|
|
|
11
11
|
console.log(9);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
const Template:
|
|
14
|
+
const Template: StoryFn<DropdownButtonProps> = (args: any) => <DropdownButton {...args} />;
|
|
15
15
|
|
|
16
16
|
export const BasicDropdown = Template.bind({});
|
|
17
17
|
BasicDropdown.args = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Meta,
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
3
3
|
import { TableExportButton } from './index';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -14,7 +14,7 @@ const columnTranslations = {
|
|
|
14
14
|
occupation: 'Ocupação'
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const Template:
|
|
17
|
+
const Template: StoryFn<any> = (args: any) => <TableExportButton {...args} />;
|
|
18
18
|
|
|
19
19
|
export const ExportButton = Template.bind({});
|
|
20
20
|
ExportButton.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Footer, FooterProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: Footer,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<FooterProps> = (args: any) => <Footer {...args}></Footer>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import moment from 'moment';
|
|
3
2
|
import styles from './styles.module.scss';
|
|
4
3
|
import omniumLogo from '../../assets/images/omnium-retail-logo-white.png';
|
|
5
4
|
import omniumIcon from '../../assets/images/omnium-retail_icon.png';
|
|
5
|
+
import dayjs from "dayjs";
|
|
6
6
|
|
|
7
7
|
export interface FooterProps {
|
|
8
8
|
storeName: string;
|
|
@@ -10,16 +10,16 @@ export interface FooterProps {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const Footer = (props: FooterProps) => {
|
|
13
|
-
|
|
13
|
+
const [date, setDate] = useState(dayjs());
|
|
14
14
|
const { storeName = 'Missing Store Name' } = props;
|
|
15
15
|
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
const time = (function updateDate() {
|
|
18
|
-
|
|
18
|
+
const nextMinute = dayjs().add(1, "minute");
|
|
19
19
|
return setTimeout(() => {
|
|
20
|
-
|
|
20
|
+
setDate(dayjs());
|
|
21
21
|
updateDate();
|
|
22
|
-
}, nextMinute.valueOf() -
|
|
22
|
+
}, nextMinute.valueOf() - dayjs().valueOf());
|
|
23
23
|
}());
|
|
24
24
|
|
|
25
25
|
return () => clearTimeout(time);
|
|
@@ -29,7 +29,7 @@ export const Footer = (props: FooterProps) => {
|
|
|
29
29
|
<div className={styles.footer}>
|
|
30
30
|
<div className={styles.content}>
|
|
31
31
|
<div className={styles.brand}>{storeName}</div>
|
|
32
|
-
<div className={styles.date}>{date.format('DD/MM/
|
|
32
|
+
<div className={styles.date}>{date.format('DD/MM/YYYY')}</div>
|
|
33
33
|
<div className={styles.time}>{date.format('HH:mm')}</div>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Footer2, Footer2Props, ActionType } from '.';
|
|
3
3
|
import {
|
|
4
4
|
SettingOutlined,
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
component: Footer2,
|
|
18
18
|
} as Meta;
|
|
19
19
|
|
|
20
|
-
const Template:
|
|
20
|
+
const Template: StoryFn<Footer2Props> = (args: any) => <Footer2 {...args}></Footer2>;
|
|
21
21
|
|
|
22
22
|
const notifications = [
|
|
23
23
|
{
|
|
@@ -157,8 +157,8 @@ Primary.args = {
|
|
|
157
157
|
companyName: 'a2ai',
|
|
158
158
|
footerName: 'Minha Aplicação',
|
|
159
159
|
onBackClick: () => console.log('Voltar'),
|
|
160
|
-
onFilterChange: (filter) => console.log('Filtro:', filter),
|
|
161
|
-
onNotificationClick: (id, url) => console.log('Notificação:', id, url),
|
|
160
|
+
onFilterChange: (filter: any) => console.log('Filtro:', filter),
|
|
161
|
+
onNotificationClick: (id: any, url: any) => console.log('Notificação:', id, url),
|
|
162
162
|
handleMarkAllAsRead: () => console.log('Marcar todas como lidas'),
|
|
163
163
|
};
|
|
164
164
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
RightOutlined,
|
|
12
12
|
LeftCircleOutlined
|
|
13
13
|
} from '@ant-design/icons';
|
|
14
|
-
import
|
|
14
|
+
import dayjs from "dayjs";
|
|
15
15
|
import React, { useEffect, useRef, useState } from 'react';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import { getCompanyLogos } from '../../constants/logoCompanyHelper';
|
|
@@ -96,7 +96,7 @@ export const Footer2 = (props: Footer2Props) => {
|
|
|
96
96
|
companyName = 'omnium',
|
|
97
97
|
} = props;
|
|
98
98
|
|
|
99
|
-
const [date, setDate] = useState(
|
|
99
|
+
const [date, setDate] = useState(dayjs());
|
|
100
100
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
101
101
|
const [currentSubmenu, setCurrentSubmenu] = useState<string | null>(null);
|
|
102
102
|
const menuRef = useRef<HTMLDivElement>(null);
|
|
@@ -116,11 +116,11 @@ export const Footer2 = (props: Footer2Props) => {
|
|
|
116
116
|
|
|
117
117
|
useEffect(() => {
|
|
118
118
|
const time = (function updateDate() {
|
|
119
|
-
const nextMinute =
|
|
119
|
+
const nextMinute = dayjs().add(1, "minute");
|
|
120
120
|
return setTimeout(() => {
|
|
121
|
-
setDate(
|
|
121
|
+
setDate(dayjs());
|
|
122
122
|
updateDate();
|
|
123
|
-
}, nextMinute.valueOf() -
|
|
123
|
+
}, nextMinute.valueOf() - dayjs().valueOf());
|
|
124
124
|
}());
|
|
125
125
|
|
|
126
126
|
return () => clearTimeout(time);
|
|
@@ -234,7 +234,7 @@ export const Footer2 = (props: Footer2Props) => {
|
|
|
234
234
|
{!isMobile &&
|
|
235
235
|
<div className={styles.content}>
|
|
236
236
|
<div className={styles.brand}>{footerName}</div>
|
|
237
|
-
<div className={styles.date}>{date.format('DD/MM/
|
|
237
|
+
<div className={styles.date}>{date.format('DD/MM/YYYY')}</div>
|
|
238
238
|
<div className={styles.time}>{date.format('HH:mm')}</div>
|
|
239
239
|
</div>
|
|
240
240
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Header } from '.';
|
|
3
3
|
import { HeaderProps } from './Header.types';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: Header,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<HeaderProps> = (args: any) => <Header {...args}></Header>;
|
|
11
11
|
|
|
12
12
|
const mockAction = () => {
|
|
13
13
|
console.log('action');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { FormInputField, FormInputFieldProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: FormInputField,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<FormInputFieldProps> = (args: any) => <FormInputField {...args}></FormInputField>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Form, Button } from 'antd';
|
|
2
|
-
import { Meta,
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
3
3
|
import { InputCountryCode, FormInputCountryCodeProps } from '.';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: InputCountryCode,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<FormInputCountryCodeProps> = (args: any) => {
|
|
11
11
|
return (
|
|
12
12
|
<Form>
|
|
13
13
|
<InputCountryCode {...args}></InputCountryCode>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Label, LabelProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: Label,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<LabelProps> = (args: any) => <Label {...args}></Label>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Link, CustomLinkProps } from '.';
|
|
3
3
|
import { SearchOutlined } from '@ant-design/icons';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: Link,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<CustomLinkProps> = (args: any) => <Link {...args}> this is a link </Link>;
|
|
11
11
|
|
|
12
12
|
export const Primary = Template.bind({});
|
|
13
13
|
Primary.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Menu } from '.';
|
|
3
3
|
import { MenuProps } from 'antd';
|
|
4
4
|
import { getItem } from './helpers/codeMutation';
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: Menu,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const Template:
|
|
11
|
+
const Template: StoryFn<MenuProps> = (args: any) => {
|
|
12
12
|
const data = [
|
|
13
13
|
{
|
|
14
14
|
"Year": 2023,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { MobileTable, MobileTableProps } from '.';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: MobileTable,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<MobileTableProps> = (args: any) => {
|
|
11
11
|
const [modalData, setModalData] = useState<any>({});
|
|
12
12
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
|
13
13
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { ModalConfirmation, ModalConfirmationProps } from '.';
|
|
4
4
|
import { ModalStatus } from './ModalStatusList';
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: ModalConfirmation,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const Template:
|
|
11
|
+
const Template: StoryFn<ModalConfirmationProps> = (args: any) => {
|
|
12
12
|
const [modalData, setModalData] = useState<any>({});
|
|
13
13
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
|
14
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { ModalWithTable, ModalWithTableProps } from '.';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: ModalWithTable,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<ModalWithTableProps> = (args: any) => {
|
|
11
11
|
const [modalData, setModalData] = useState<any>({});
|
|
12
12
|
const [isFetching, setIsFetching] = useState<boolean>(false);
|
|
13
13
|
const [tagsData, setTagsData] = useState<any>({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Navigation, NavigationProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: Navigation,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<NavigationProps> = (args: any) => <Navigation {...args}></Navigation>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Notification, ErrorNotificationProps } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Notification',
|
|
6
6
|
component: Notification,
|
|
7
|
-
} as
|
|
7
|
+
} as any;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<ErrorNotificationProps> = (args: any) => {
|
|
10
10
|
|
|
11
11
|
const { openNotificationWithIcon } = Notification({
|
|
12
12
|
message: args.message,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Questions } from '.';
|
|
3
3
|
import { SearchOutlined } from '@ant-design/icons';
|
|
4
4
|
import { Button, Form, Input } from "antd";
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
component: Questions,
|
|
10
10
|
} as Meta;
|
|
11
11
|
|
|
12
|
-
const Template:
|
|
12
|
+
const Template: StoryFn<any> = (args: any) => {
|
|
13
13
|
const [form] = useForm();
|
|
14
14
|
|
|
15
15
|
const onFinish = (values: any) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlusOutlined } from '@ant-design/icons';
|
|
2
2
|
import { Form } from 'antd';
|
|
3
|
-
import { DragDropContext, Droppable, Draggable } from
|
|
3
|
+
import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd';
|
|
4
4
|
import { SingleQuestion } from "./SingleQuestion";
|
|
5
5
|
import { Link } from '../Link';
|
|
6
6
|
import { t } from 'i18next';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Radio as RadioAntd, RadioChangeEvent, RadioProps } from "antd";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { Radio, RadioGroup } from '.';
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: Radio,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const Template:
|
|
11
|
+
const Template: StoryFn<RadioProps> = (args: any) => {
|
|
12
12
|
const [value, setValue] = useState();
|
|
13
13
|
|
|
14
14
|
const onChange = (e: RadioChangeEvent) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { ResponseType } from '.';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: ResponseType,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<any> = (args: any) => {
|
|
11
11
|
const [categoryContentInfo, setCategoryContentInfo] = useState<any>();
|
|
12
12
|
|
|
13
13
|
const getAnswer = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { ResponsiveTable, ResponsiveTableCustomProps } from '.';
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
component: ResponsiveTable,
|
|
10
10
|
} as Meta;
|
|
11
11
|
|
|
12
|
-
const Template:
|
|
12
|
+
const Template: StoryFn<ResponsiveTableCustomProps> = (args: any) => {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const [pageInfo, setPageInfo] = useState<any>({});
|
|
15
15
|
const [rowSelectionInfo, setRowSelectionInfo] = useState<any>({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Select } from '.';
|
|
3
3
|
import { SelectProps } from 'antd';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: Select,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<SelectProps> = (args: any) => <Select {...args}></Select>;
|
|
11
11
|
|
|
12
12
|
export const Primary = Template.bind({});
|
|
13
13
|
Primary.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Separator, SeparatorProps, Spaces } from '.';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
component: Separator,
|
|
7
7
|
} as Meta;
|
|
8
8
|
|
|
9
|
-
const Template:
|
|
9
|
+
const Template: StoryFn<SeparatorProps> = (args: any) => <Separator {...args}></Separator>;
|
|
10
10
|
|
|
11
11
|
export const Primary = Template.bind({});
|
|
12
12
|
Primary.args = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RightCircleOutlined } from "@ant-design/icons";
|
|
2
|
-
import { Meta,
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
3
3
|
import { Sidebar, SidebarProps } from '.';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: Sidebar,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<SidebarProps> = (args: any) => {
|
|
11
11
|
const navigate = (targetRoute: string) => {
|
|
12
12
|
console.log(targetRoute);
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Switch } from '.';
|
|
3
3
|
import { SwitchProps } from 'antd';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
component: Switch,
|
|
8
8
|
} as Meta;
|
|
9
9
|
|
|
10
|
-
const Template:
|
|
10
|
+
const Template: StoryFn<SwitchProps> = (args: any) => <Switch {...args}></Switch>;
|
|
11
11
|
|
|
12
12
|
export const Primary = Template.bind({});
|
|
13
13
|
Primary.args = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { Table, TableCustomProps } from '.';
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: Table,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const Template:
|
|
11
|
+
const Template: StoryFn<TableCustomProps> = (args: any) => {
|
|
12
12
|
const { t } = useTranslation();
|
|
13
13
|
const [pageInfo, setPageInfo] = useState<any>({});
|
|
14
14
|
const [rowSelectionInfo, setRowSelectionInfo] = useState<any>({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, StoryFn } from "@storybook/react-vite";
|
|
2
2
|
import { TagField } from '.';
|
|
3
3
|
import { TagProps } from 'antd';
|
|
4
4
|
import { useState } from "react";
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
component: TagField,
|
|
10
10
|
} as Meta;
|
|
11
11
|
|
|
12
|
-
const Template:
|
|
12
|
+
const Template: StoryFn<TagProps> = (args: any) => {
|
|
13
13
|
const [tagsInfo, setTagsInfo] = useState<any>({});
|
|
14
14
|
const [advancedTagsInfo, setAdvancedTagsInfo] = useState<any>({});
|
|
15
15
|
const advancedsFilters = [{ display: t('components.tag.State'), value: "State" }, { display: t('components.tag.1'), value: "Olaaaaaa" }];
|