@autobusal/common 0.0.41 → 1.0.1
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/ApiDetails/ApiDetails.tsx +1 -1
- package/ApiDetails/Content.tsx +9 -5
- package/ApiDetails/Devpos.tsx +26 -26
- package/ApiDetails/services.ts +4 -3
- package/Autocomplete/Autocomplete.tsx +3 -3
- package/Avatar.tsx +2 -2
- package/{BackTo.tsx → Back/BackTo.tsx} +3 -26
- package/Back/BackWithTitle.tsx +30 -0
- package/Button/Button.tsx +4 -2
- package/Calendar/Calendar.tsx +2 -2
- package/{BrowseCompanyItem/BrowseCompanyItem.tsx → CompanyItem/CompanyItem.tsx} +2 -2
- package/CookieNotification/CookieNotification.tsx +2 -2
- package/File/File.tsx +4 -4
- package/IpLogs/IpLogs.tsx +3 -3
- package/IpLogs/View.tsx +5 -5
- package/IpLogs/services.ts +2 -2
- package/Loading/Loading.tsx +19 -29
- package/Loading/Paragraph.tsx +62 -0
- package/Loading/styles.ts +35 -5
- package/Meta.tsx +1 -1
- package/Modal/Modal.tsx +2 -3
- package/Pagination/Pagination.tsx +1 -1
- package/Passengers/Passengers.tsx +6 -5
- package/Passengers/Persons.tsx +7 -7
- package/Passengers/{utilities/getText.ts → utilities.ts} +3 -5
- package/Password/Password.tsx +2 -2
- package/Password/styles.ts +1 -1
- package/Policy/services.ts +1 -3
- package/Report/Send.tsx +5 -8
- package/Report/services.ts +3 -2
- package/Report/types.ts +3 -0
- package/RouteItem/styles.ts +0 -1
- package/Seats/ChooseSeat.tsx +2 -2
- package/Seats/Preview.tsx +1 -1
- package/Table/Header/Header.tsx +1 -1
- package/Table/Header/Sort.tsx +2 -2
- package/Table/Paginate.tsx +2 -2
- package/Table/Row.tsx +5 -3
- package/Table/Rows/Loading.tsx +1 -1
- package/Table/Rows/Rows.tsx +5 -4
- package/Table/Rows/styles.ts +6 -0
- package/Table/Table.tsx +5 -3
- package/Table/browseUrl.ts +2 -2
- package/Viewer/Actions.tsx +4 -4
- package/Viewer/Data.tsx +15 -14
- package/Viewer/Item.tsx +2 -2
- package/Viewer/Items/CheckboxList.tsx +1 -1
- package/Viewer/Items/DatePicker.tsx +2 -2
- package/Viewer/Items/Dropdown.tsx +5 -9
- package/Viewer/Items/TextareaHtml.tsx +3 -3
- package/Viewer/Items/styles.ts +1 -1
- package/Viewer/Viewer.tsx +4 -4
- package/Viewer/types.ts +1 -1
- package/index.ts +15 -9
- package/package.json +1 -1
- /package/{BrowseCompanyItem → CompanyItem}/styles.ts +0 -0
|
@@ -3,7 +3,7 @@ import { TFunction } from 'i18next';
|
|
|
3
3
|
import { UseFormRegister, UseFormSetValue } from 'react-hook-form';
|
|
4
4
|
import { Editor } from '@tinymce/tinymce-react';
|
|
5
5
|
import { Editor as TinyMceEditor } from 'tinymce';
|
|
6
|
-
import {
|
|
6
|
+
import { Validate } from '@autobusal/utilities/form';
|
|
7
7
|
import { Textarea } from './styles';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
@@ -25,7 +25,7 @@ const TextareaHtml = ({ name, value, validation, t, refs, onUpdate }: Props): JS
|
|
|
25
25
|
return (
|
|
26
26
|
<div className="row-data">
|
|
27
27
|
<Editor
|
|
28
|
-
onInit={ (
|
|
28
|
+
onInit={ (_event, editor) => editorRef.current = editor }
|
|
29
29
|
onEditorChange={ onChange }
|
|
30
30
|
initialValue={ value ?? '' }
|
|
31
31
|
tinymceScriptSrc="/tinymce/tinymce.min.js"
|
|
@@ -48,7 +48,7 @@ const TextareaHtml = ({ name, value, validation, t, refs, onUpdate }: Props): JS
|
|
|
48
48
|
}}
|
|
49
49
|
/>
|
|
50
50
|
|
|
51
|
-
<Textarea defaultValue={ value ?? '' } { ...refs(name,
|
|
51
|
+
<Textarea defaultValue={ value ?? '' } { ...refs(name, Validate(String(validation), t)) }></Textarea>
|
|
52
52
|
</div>
|
|
53
53
|
);
|
|
54
54
|
};
|
package/Viewer/Items/styles.ts
CHANGED
package/Viewer/Viewer.tsx
CHANGED
|
@@ -9,14 +9,14 @@ interface Props {
|
|
|
9
9
|
id: number
|
|
10
10
|
type?: 'simple'
|
|
11
11
|
data: ViewData[]
|
|
12
|
-
|
|
12
|
+
pending?: boolean
|
|
13
13
|
actions?: string[]
|
|
14
14
|
t: TFunction<'common'>
|
|
15
15
|
onSave?: (data: any) => void
|
|
16
|
-
onDelete?: () => void
|
|
16
|
+
onDelete?: (data?: any) => void
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const Viewer = ({ id, type, data,
|
|
19
|
+
const Viewer = ({ id, type, data, pending, actions, t, onSave, onDelete }: Props): JSX.Element => {
|
|
20
20
|
const { register, handleSubmit, formState: { errors }, setValue } = useForm<any>();
|
|
21
21
|
|
|
22
22
|
const items = data.map((item, index) => (
|
|
@@ -58,7 +58,7 @@ const Viewer = ({ id, type, data, loading, actions, t, onSave, onDelete }: Props
|
|
|
58
58
|
<Actions
|
|
59
59
|
id={ id }
|
|
60
60
|
available={ actions }
|
|
61
|
-
|
|
61
|
+
pending={ pending }
|
|
62
62
|
t={ t }
|
|
63
63
|
onDelete={ onDelete }
|
|
64
64
|
/>
|
package/Viewer/types.ts
CHANGED
package/index.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import ApiDetails from './ApiDetails/ApiDetails';
|
|
2
2
|
import Autocomplete from './Autocomplete/Autocomplete';
|
|
3
3
|
import Avatar from './Avatar';
|
|
4
|
-
import
|
|
4
|
+
import BackTo from './Back/BackTo';
|
|
5
|
+
import BackWithTitle from './Back/BackWithTitle';
|
|
5
6
|
import BlogItem from './BlogItem/BlogItem';
|
|
6
|
-
import
|
|
7
|
+
import Button from './Button/Button';
|
|
7
8
|
import Calendar from './Calendar/Calendar';
|
|
8
|
-
import ContactInfo from './ContactInfo/ContactInfo';
|
|
9
|
-
import CookieNotification from './CookieNotification/CookieNotification';
|
|
10
9
|
import ChangeLanguage from './ChangeLanguage/ChangeLanguage';
|
|
11
10
|
import ChooseSeat from './Seats/ChooseSeat';
|
|
12
|
-
import
|
|
11
|
+
import CompanyItem from './CompanyItem/CompanyItem';
|
|
12
|
+
import ContactInfo from './ContactInfo/ContactInfo';
|
|
13
|
+
import CookieNotification from './CookieNotification/CookieNotification';
|
|
14
|
+
import File from './File/File';
|
|
13
15
|
import Gender from './Gender';
|
|
14
|
-
import { General, Inline,
|
|
16
|
+
import { General, Inline, Box, BoxMiddle, GeneralFull } from './Loading/Loading';
|
|
15
17
|
import IpLogs from './IpLogs/IpLogs';
|
|
16
|
-
import Modal from './Modal/Modal';
|
|
17
18
|
import Meta from './Meta';
|
|
19
|
+
import Modal from './Modal/Modal';
|
|
18
20
|
import Pagination from './Pagination/Pagination';
|
|
21
|
+
import Paragraph from './Loading/Paragraph';
|
|
19
22
|
import Passengers from './Passengers/Passengers';
|
|
20
23
|
import Password from './Password/Password';
|
|
21
24
|
import Policy from './Policy/Policy';
|
|
@@ -34,15 +37,18 @@ export {
|
|
|
34
37
|
BackWithTitle,
|
|
35
38
|
BlogItem,
|
|
36
39
|
Box,
|
|
37
|
-
|
|
40
|
+
BoxMiddle,
|
|
38
41
|
Button,
|
|
39
42
|
Calendar,
|
|
40
|
-
CookieNotification,
|
|
41
43
|
ChangeLanguage,
|
|
42
44
|
ChooseSeat,
|
|
45
|
+
CompanyItem,
|
|
43
46
|
ContactInfo,
|
|
47
|
+
CookieNotification,
|
|
48
|
+
File,
|
|
44
49
|
Gender,
|
|
45
50
|
General,
|
|
51
|
+
GeneralFull,
|
|
46
52
|
Inline,
|
|
47
53
|
IpLogs,
|
|
48
54
|
Meta,
|
package/package.json
CHANGED
|
File without changes
|