techsbcn-storybook 0.5.0 → 0.7.2
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/fields/SelectFieldComponent/SelectAsyncField.d.ts +22 -0
- package/dist/components/fields/SelectFieldComponent/SelectField.d.ts +21 -0
- package/dist/components/forms/ChangePasswordForm.d.ts +4 -4
- package/dist/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.d.ts +2 -0
- package/dist/components/layouts/Standard/AppSidebar/AppSidebar.d.ts +2 -0
- package/dist/components/navigation/components/UserInfo.d.ts +9 -3
- package/dist/components/tables/{SearchComponent.d.ts → SearchComponent/SearchComponent.d.ts} +4 -3
- package/dist/components/tables/TableComponent/TableComponent.d.ts +60 -0
- package/dist/components/wrappers/MainWrapperComponent/MainWrapperComponent.d.ts +11 -0
- package/dist/data/SelectMock.d.ts +9 -0
- package/dist/data/UserList.d.ts +16 -0
- package/dist/data/Values.d.ts +2 -0
- package/dist/data/_globalization/es.d.ts +114 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/interfaces/file/File.d.ts +7 -0
- package/dist/interfaces/index.d.ts +6 -0
- package/dist/interfaces/search/BasicEntity.d.ts +5 -0
- package/dist/interfaces/search/SearchFilters.d.ts +10 -0
- package/dist/interfaces/search/SearchResult.d.ts +4 -0
- package/dist/interfaces/search/SearchSimpleResult.d.ts +4 -0
- package/dist/interfaces/shared/ObjectKey.d.ts +3 -0
- package/dist/stories/Fields/Fields.stories.d.ts +5 -0
- package/dist/stories/Forms/Forms.stories.d.ts +6 -0
- package/dist/stories/MainWrapper/MainWrapper.stories.d.ts +4 -0
- package/dist/stories/Tables/Tables.stories.d.ts +4 -0
- package/dist/techsbcn-storybook.cjs.development.js +1564 -24
- package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
- package/dist/techsbcn-storybook.esm.js +1562 -28
- package/dist/techsbcn-storybook.esm.js.map +1 -1
- package/package.json +4 -1
- package/src/components/fields/ButtonComponent/ButtonComponent.scss +2 -0
- package/src/components/fields/SelectFieldComponent/SelectAsyncField.tsx +92 -0
- package/src/components/fields/SelectFieldComponent/SelectField.scss +82 -0
- package/src/components/fields/SelectFieldComponent/SelectField.tsx +59 -0
- package/src/components/fields/TextFieldComponent/TextFieldComponent.scss +14 -3
- package/src/components/fields/TextFieldComponent/TextFieldComponent.tsx +5 -0
- package/src/components/forms/ChangePasswordForm.tsx +11 -5
- package/src/components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar.tsx +19 -2
- package/src/components/layouts/Standard/AppHeader/AppHeader.scss +8 -0
- package/src/components/layouts/Standard/AppHeader/AppHeader.tsx +1 -1
- package/src/components/layouts/Standard/AppSidebar/AppSidebar.tsx +35 -3
- package/src/components/navigation/VerticalNav/VerticalNav.scss +3 -3
- package/src/components/navigation/VerticalNav/VerticalNavItem.tsx +8 -3
- package/src/components/navigation/components/UserInfo.scss +5 -0
- package/src/components/navigation/components/UserInfo.tsx +45 -5
- package/src/components/tables/SearchComponent/SearchComponent.scss +46 -0
- package/src/components/tables/{SearchComponent.tsx → SearchComponent/SearchComponent.tsx} +23 -16
- package/src/components/tables/TableComponent/TableComponent.scss +165 -0
- package/src/components/tables/TableComponent/TableComponent.tsx +422 -0
- package/src/components/wrappers/MainWrapperComponent/MainWrapperComponent.scss +33 -0
- package/src/components/wrappers/MainWrapperComponent/MainWrapperComponent.tsx +39 -0
- package/src/content/img/icon-logo-techsbcn.svg +1 -0
- package/src/content/img/logo.png +0 -0
- package/src/data/SelectMock.tsx +44 -0
- package/src/data/UserList.tsx +102 -0
- package/src/data/Values.tsx +98 -0
- package/src/data/_globalization/es.js +113 -0
- package/src/data/index.ts +3 -0
- package/src/i18n.tsx +24 -0
- package/src/index.tsx +6 -0
- package/src/interfaces/file/File.tsx +8 -0
- package/src/interfaces/index.tsx +6 -0
- package/src/interfaces/search/BasicEntity.tsx +6 -0
- package/src/interfaces/search/SearchFilters.tsx +11 -0
- package/src/interfaces/search/SearchResult.tsx +4 -0
- package/src/interfaces/search/SearchSimpleResult.tsx +4 -0
- package/src/interfaces/shared/ObjectKey.tsx +3 -0
- package/src/stories/Fields/Fields.stories.tsx +172 -0
- package/src/stories/Forms/Forms.stories.tsx +88 -0
- package/src/stories/Layouts/MainLayoutSimple.stories.tsx +54 -18
- package/src/stories/MainWrapper/MainWrapper.stories.tsx +71 -0
- package/src/stories/Modal/Modal.stories.tsx +1 -1
- package/src/stories/Tables/Tables.stories.tsx +118 -0
- package/src/styles/Globals.scss +44 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchFilters } from '../../../interfaces';
|
|
3
|
+
import './SelectField.scss';
|
|
4
|
+
interface SelectAsyncFieldProps {
|
|
5
|
+
name: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
defaultOptions?: any[];
|
|
8
|
+
isMulti?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onChange?: (value: number, name: string) => void;
|
|
12
|
+
onChangeValue?: (value: number) => void;
|
|
13
|
+
searchPromise: (filters: SearchFilters) => Promise<any>;
|
|
14
|
+
invalid?: boolean;
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
helperText?: string;
|
|
17
|
+
filters?: any;
|
|
18
|
+
inputRef?: React.Ref<any>;
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const SelectAsyncField: React.FunctionComponent<SelectAsyncFieldProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SelectField.scss';
|
|
3
|
+
interface SelectFieldProps {
|
|
4
|
+
name: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
options: any[];
|
|
7
|
+
defaultOptions?: any[];
|
|
8
|
+
isMulti?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onChange?: (value: number, name: string) => void;
|
|
12
|
+
onChangeValue?: (value: number) => void;
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
isClearable?: boolean;
|
|
15
|
+
helperText?: string;
|
|
16
|
+
isSearchable?: boolean;
|
|
17
|
+
inputRef?: React.Ref<any>;
|
|
18
|
+
label?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const SelectField: React.FunctionComponent<SelectFieldProps>;
|
|
21
|
+
export {};
|
|
@@ -10,10 +10,10 @@ interface ChangePasswordFormProps {
|
|
|
10
10
|
};
|
|
11
11
|
valuesText: {
|
|
12
12
|
buttonText: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
textPassword: string;
|
|
14
|
+
placeholderPassword?: string;
|
|
15
|
+
textSamePassword: string;
|
|
16
|
+
placeholderSamePassword?: string;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export declare const ChangePasswordForm: React.FC<ChangePasswordFormProps>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import './UserInfo.scss';
|
|
2
3
|
interface UserInfoProps {
|
|
3
|
-
|
|
4
|
+
displayName: string;
|
|
5
|
+
photoURL?: string;
|
|
6
|
+
menuActions?: {
|
|
7
|
+
action: () => void;
|
|
8
|
+
title: string;
|
|
9
|
+
}[];
|
|
4
10
|
}
|
|
5
|
-
declare const UserInfo: React.FC<UserInfoProps>;
|
|
6
|
-
export
|
|
11
|
+
export declare const UserInfo: React.FC<UserInfoProps>;
|
|
12
|
+
export {};
|
package/dist/components/tables/{SearchComponent.d.ts → SearchComponent/SearchComponent.d.ts}
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import './SearchComponent.scss';
|
|
3
|
+
export interface SearchComponentProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
title?: string;
|
|
5
6
|
searchBar?: React.ReactNode;
|
|
@@ -17,5 +18,5 @@ interface DoubleFilter {
|
|
|
17
18
|
secondFilter: any;
|
|
18
19
|
}
|
|
19
20
|
declare const DoubleFilter: (filters: DoubleFilter) => JSX.Element;
|
|
20
|
-
declare const SearchComponent: React.FC<SearchComponentProps>;
|
|
21
|
-
export
|
|
21
|
+
export declare const SearchComponent: React.FC<SearchComponentProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchFilters, ObjectKey } from '../../../interfaces';
|
|
3
|
+
import './TableComponent.scss';
|
|
4
|
+
interface TableComponentProps {
|
|
5
|
+
rows: any[];
|
|
6
|
+
values: ObjectKey;
|
|
7
|
+
columns: ColumnProps[];
|
|
8
|
+
totalCount: number;
|
|
9
|
+
showTotalCount?: boolean;
|
|
10
|
+
rowsColorColumn?: {
|
|
11
|
+
columnName: string;
|
|
12
|
+
columnValue: string;
|
|
13
|
+
};
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
baseFilters: SearchFilters;
|
|
16
|
+
onFiltersChange?: (filters: SearchFilters) => void;
|
|
17
|
+
onClickRow?: (id: number) => void;
|
|
18
|
+
isCheckTable?: {
|
|
19
|
+
rowsChecked?: number[];
|
|
20
|
+
onCheckedAction?: (ids: number[]) => void;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
interface ColumnProps {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
minWidth?: number;
|
|
27
|
+
maxWidth?: number;
|
|
28
|
+
align?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
|
|
29
|
+
alignCell?: 'inherit' | 'left' | 'center' | 'right' | 'justify';
|
|
30
|
+
action?: ActionProps[];
|
|
31
|
+
isUnique?: boolean;
|
|
32
|
+
isDate?: boolean;
|
|
33
|
+
enumColumn?: {
|
|
34
|
+
isEnum?: boolean;
|
|
35
|
+
enumType?: any;
|
|
36
|
+
hasColor?: boolean;
|
|
37
|
+
};
|
|
38
|
+
isCheck?: boolean;
|
|
39
|
+
noSort?: boolean;
|
|
40
|
+
isPrice?: boolean;
|
|
41
|
+
isImage?: {
|
|
42
|
+
isUrl?: boolean;
|
|
43
|
+
isGuid?: {
|
|
44
|
+
guid: boolean;
|
|
45
|
+
action: (guid: string) => string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
isActiveFunction?: {
|
|
49
|
+
activeIcon: any;
|
|
50
|
+
disabledIcon: any;
|
|
51
|
+
onClickId: (id: number) => void;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
interface ActionProps {
|
|
55
|
+
children: React.ReactNode;
|
|
56
|
+
onClick?: (row: any) => void;
|
|
57
|
+
onClickId?: (id: number) => void;
|
|
58
|
+
}
|
|
59
|
+
export declare const TableComponent: React.FunctionComponent<TableComponentProps>;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchComponentProps } from '../../tables/SearchComponent/SearchComponent';
|
|
3
|
+
import './MainWrapperComponent.scss';
|
|
4
|
+
interface MainWrapperComponentProps {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
loadingChildren?: boolean;
|
|
7
|
+
headerProps: SearchComponentProps;
|
|
8
|
+
divider?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const MainWrapperComponent: React.FC<MainWrapperComponentProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SearchFilters, SearchSimpleResult, SearchResult } from '../interfaces';
|
|
2
|
+
interface ColourOption {
|
|
3
|
+
readonly value: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const colourOptions: ColourOption[];
|
|
7
|
+
export declare const ResponseHandler: (response: any) => any;
|
|
8
|
+
export declare const SearchSimple: (filters: SearchFilters) => Promise<SearchResult<SearchSimpleResult>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BasicEntity } from '../interfaces';
|
|
2
|
+
interface UserList {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
image: string;
|
|
6
|
+
skills: string[];
|
|
7
|
+
information: string;
|
|
8
|
+
email: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
website: string;
|
|
11
|
+
charge: number;
|
|
12
|
+
topic: string;
|
|
13
|
+
extraInfo: BasicEntity;
|
|
14
|
+
}
|
|
15
|
+
export declare const UserList: UserList[];
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
declare var _default: {
|
|
2
|
+
dni: string;
|
|
3
|
+
email: string;
|
|
4
|
+
emailDot: string;
|
|
5
|
+
error: string;
|
|
6
|
+
error404: string;
|
|
7
|
+
error404Explain: string;
|
|
8
|
+
logout: string;
|
|
9
|
+
login: string;
|
|
10
|
+
name: string;
|
|
11
|
+
no: string;
|
|
12
|
+
password: string;
|
|
13
|
+
phone: string;
|
|
14
|
+
mobile: string;
|
|
15
|
+
postalCode: string;
|
|
16
|
+
price: string;
|
|
17
|
+
quantity: string;
|
|
18
|
+
results: string;
|
|
19
|
+
search: string;
|
|
20
|
+
select: string;
|
|
21
|
+
status: string;
|
|
22
|
+
surname: string;
|
|
23
|
+
surnames: string;
|
|
24
|
+
total: string;
|
|
25
|
+
totalAmount: string;
|
|
26
|
+
subtotal: string;
|
|
27
|
+
shippingCharges: string;
|
|
28
|
+
type: string;
|
|
29
|
+
user: string;
|
|
30
|
+
yes: string;
|
|
31
|
+
description: string;
|
|
32
|
+
city: string;
|
|
33
|
+
cancel: string;
|
|
34
|
+
amount: string;
|
|
35
|
+
add: string;
|
|
36
|
+
address: string;
|
|
37
|
+
addressSend: string;
|
|
38
|
+
addAddressSend: string;
|
|
39
|
+
noResultsFound: string;
|
|
40
|
+
buy: string;
|
|
41
|
+
loadingData: string;
|
|
42
|
+
resetPasswordSuccess: string;
|
|
43
|
+
createAccount: string;
|
|
44
|
+
forgotPasswordText: string;
|
|
45
|
+
newPassword: string;
|
|
46
|
+
repitePassword: string;
|
|
47
|
+
resetPassword: string;
|
|
48
|
+
requiredField: string;
|
|
49
|
+
requiredMail: string;
|
|
50
|
+
requiredPassword: string;
|
|
51
|
+
requiredSamePassword: string;
|
|
52
|
+
UserAlreadyExistsException: string;
|
|
53
|
+
EntityDoesNotExistException: string;
|
|
54
|
+
NotAuthorizedException: string;
|
|
55
|
+
InternalServerErrorException: string;
|
|
56
|
+
InvalidArgumentException: string;
|
|
57
|
+
InvalidCredentialException: string;
|
|
58
|
+
TemplateErrorException: string;
|
|
59
|
+
FailedToFetchException: string;
|
|
60
|
+
ForbiddenException: string;
|
|
61
|
+
FileNotFoundException: string;
|
|
62
|
+
FileUploadErrorException: string;
|
|
63
|
+
categories: string;
|
|
64
|
+
relevance: string;
|
|
65
|
+
priceAsc: string;
|
|
66
|
+
priceDesc: string;
|
|
67
|
+
totalProductsText: string;
|
|
68
|
+
cart: string;
|
|
69
|
+
endPurchase: string;
|
|
70
|
+
myProfile: string;
|
|
71
|
+
changePassword: string;
|
|
72
|
+
incidence: string;
|
|
73
|
+
myAddresses: string;
|
|
74
|
+
myOrders: string;
|
|
75
|
+
shops: string;
|
|
76
|
+
signup: string;
|
|
77
|
+
recoverPassword: string;
|
|
78
|
+
viewAll: string;
|
|
79
|
+
pending: string;
|
|
80
|
+
assigned: string;
|
|
81
|
+
delivered: string;
|
|
82
|
+
canceled: string;
|
|
83
|
+
date: string;
|
|
84
|
+
number: string;
|
|
85
|
+
logOut: string;
|
|
86
|
+
editProfile: string;
|
|
87
|
+
home: string;
|
|
88
|
+
office: string;
|
|
89
|
+
other: string;
|
|
90
|
+
addOther: string;
|
|
91
|
+
province: string;
|
|
92
|
+
deliveryNotes: string;
|
|
93
|
+
editAddress: string;
|
|
94
|
+
addAddress: string;
|
|
95
|
+
save: string;
|
|
96
|
+
gender: string;
|
|
97
|
+
female: string;
|
|
98
|
+
male: string;
|
|
99
|
+
reportIncidence: string;
|
|
100
|
+
showing: string;
|
|
101
|
+
tableLabelDisplay: string;
|
|
102
|
+
continue: string;
|
|
103
|
+
back: string;
|
|
104
|
+
pay: string;
|
|
105
|
+
sendTo: string;
|
|
106
|
+
continueShopping: string;
|
|
107
|
+
downloadApp: string;
|
|
108
|
+
android: string;
|
|
109
|
+
apple: string;
|
|
110
|
+
image: string;
|
|
111
|
+
skills: string;
|
|
112
|
+
information: string;
|
|
113
|
+
};
|
|
114
|
+
export default _default;
|
package/dist/i18n.d.ts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
export * from './components/wrappers/PublicFormWrapper/PublicFormWrapper';
|
|
2
|
+
export * from './components/wrappers/MainWrapperComponent/MainWrapperComponent';
|
|
3
|
+
export * from './components/tables/SearchComponent/SearchComponent';
|
|
4
|
+
export * from './components/tables/TableComponent/TableComponent';
|
|
2
5
|
export * from './components/layouts/MainLayoutSimple/MainLayoutSimple';
|
|
3
6
|
export * from './components/navigation/VerticalNav/VerticalNav';
|
|
7
|
+
export * from './components/navigation/components/UserInfo';
|
|
4
8
|
export * from './components/layouts/Standard/AppSidebar/AppSidebar';
|
|
5
9
|
export * from './components/layouts/DrawerLayout/DrawerSidebar/DrawerSidebar';
|
|
6
10
|
export * from './components/layouts/Standard/AppHeader/AppHeader';
|
|
7
11
|
export * from './components/fields/ButtonComponent/ButtonComponent';
|
|
8
12
|
export * from './components/fields/TextFieldComponent/TextFieldComponent';
|
|
13
|
+
export * from './components/fields/SelectFieldComponent/SelectField';
|
|
14
|
+
export * from './components/fields/SelectFieldComponent/SelectAsyncField';
|
|
9
15
|
export * from './components/forms/LoginForm';
|
|
10
16
|
export * from './components/forms/ChangePasswordForm';
|
|
11
17
|
export * from './components/forms/ResetPasswordForm';
|