@steroidsjs/core 3.0.96 → 3.1.3
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/actions/list.d.ts +6 -0
- package/actions/list.js +8 -1
- package/components/HtmlComponent.d.ts +3 -3
- package/components/HttpComponent.d.ts +18 -15
- package/components/HttpComponent.js +40 -18
- package/components/LocaleComponent.js +5 -28
- package/components/UiComponent.d.ts +0 -1
- package/components/UiComponent.js +2 -25
- package/docs-autogen-result.json +85 -59
- package/hooks/useAbsolutePositioning.d.ts +2 -2
- package/hooks/useApplication.js +6 -29
- package/hooks/useFetch.d.ts +1 -6
- package/hooks/useFetch.js +18 -12
- package/hooks/useList.js +24 -32
- package/hooks/useListField.js +3 -25
- package/hooks/useTree.d.ts +3 -3
- package/package.json +1 -1
- package/providers/ComponentsProvider.d.ts +1 -2
- package/providers/ComponentsProvider.js +14 -25
- package/providers/ScreenProvider.d.ts +1 -2
- package/providers/ScreenProvider.js +13 -25
- package/providers/SsrProvider.d.ts +1 -2
- package/providers/SsrProvider.js +13 -25
- package/providers/ThemeProvider.d.ts +4 -4
- package/providers/ThemeProvider.js +18 -29
- package/reducers/list.d.ts +0 -1
- package/reducers/list.js +5 -4
- package/ui/content/Accordion/Accordion.d.ts +5 -5
- package/ui/content/Accordion/Accordion.js +5 -28
- package/ui/content/Alert/Alert.d.ts +2 -2
- package/ui/content/Avatar/Avatar.d.ts +2 -2
- package/ui/content/Avatar/AvatarGroup.d.ts +2 -2
- package/ui/content/Avatar/AvatarGroup.js +3 -25
- package/ui/content/CalendarSystem/CalendarSystem.d.ts +5 -5
- package/ui/content/CalendarSystem/CalendarSystem.js +2 -2
- package/ui/content/CalendarSystem/hooks/useCalendarControls.d.ts +3 -3
- package/ui/content/CalendarSystem/hooks/useCalendarControls.js +2 -25
- package/ui/content/CalendarSystem/hooks/useCalendarSystem.d.ts +3 -3
- package/ui/content/CalendarSystem/hooks/useCalendarSystem.js +8 -31
- package/ui/content/CalendarSystem/hooks/useCalendarSystemEventGroupModals.d.ts +0 -1
- package/ui/content/CalendarSystem/hooks/useCalendarSystemEventGroupModals.js +4 -4
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.d.ts +2 -2
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.js +6 -6
- package/ui/content/CalendarSystem/hooks/useCalendarType.js +3 -3
- package/ui/content/CalendarSystem/hooks/useEventsFromDate.js +2 -2
- package/ui/content/CalendarSystem/hooks/useExpandClickAway.d.ts +3 -3
- package/ui/content/CalendarSystem/hooks/useExpandClickAway.js +3 -6
- package/ui/content/Card/Card.d.ts +3 -3
- package/ui/content/Chat/Chat.d.ts +3 -3
- package/ui/content/Chat/Chat.js +3 -25
- package/ui/content/CopyToClipboard/CopyToClipboard.d.ts +4 -4
- package/ui/content/Dashboard/Dashboard.d.ts +2 -2
- package/ui/content/Dashboard/Dashboard.js +4 -26
- package/ui/content/Detail/Detail.d.ts +3 -3
- package/ui/content/Detail/Detail.js +3 -26
- package/ui/content/Detail/DetailItem.d.ts +3 -3
- package/ui/content/DropDown/DropDown.d.ts +2 -2
- package/ui/content/DropDown/DropDown.js +5 -31
- package/ui/content/Kanban/Kanban.js +15 -26
- package/ui/content/Kanban/hooks/useKanban.js +7 -30
- package/ui/content/Menu/Menu.d.ts +3 -3
- package/ui/content/Slider/Slider.d.ts +2 -2
- package/ui/content/Slider/Slider.js +2 -5
- package/ui/crud/Crud/Crud.d.ts +4 -5
- package/ui/crud/Crud/Crud.js +2 -25
- package/ui/crud/Crud/CrudContent.js +8 -35
- package/ui/crud/Crud/CrudModal.js +2 -26
- package/ui/form/AutoCompleteField/AutoCompleteField.d.ts +2 -2
- package/ui/form/BlankField/BlankField.d.ts +3 -3
- package/ui/form/BlankField/BlankField.js +2 -25
- package/ui/form/Button/Button.d.ts +2 -2
- package/ui/form/Button/Button.js +2 -25
- package/ui/form/CheckboxField/CheckboxField.d.ts +2 -2
- package/ui/form/CheckboxField/CheckboxField.js +2 -25
- package/ui/form/CheckboxListField/CheckboxListField.d.ts +1 -1
- package/ui/form/CheckboxTreeField/CheckboxTreeField.js +3 -25
- package/ui/form/DateField/DateField.d.ts +2 -2
- package/ui/form/DateRangeField/DateRangeField.d.ts +3 -3
- package/ui/form/DateTimeField/DateTimeField.d.ts +2 -2
- package/ui/form/DropDownField/DropDownField.d.ts +3 -3
- package/ui/form/DropDownField/DropDownField.js +3 -26
- package/ui/form/EmailField/EmailField.js +3 -26
- package/ui/form/EmailField/hooks/useInputTypeEmail.d.ts +3 -3
- package/ui/form/EmailField/hooks/useInputTypeEmail.js +3 -6
- package/ui/form/Field/Field.d.ts +2 -2
- package/ui/form/Field/Field.js +3 -26
- package/ui/form/Field/fieldWrapper.js +2 -25
- package/ui/form/FieldLayout/FieldLayout.d.ts +3 -3
- package/ui/form/FieldLayout/FieldLayout.js +1 -25
- package/ui/form/FieldList/FieldList.d.ts +2 -2
- package/ui/form/FieldList/FieldList.js +17 -16
- package/ui/form/FieldSet/FieldSet.d.ts +2 -2
- package/ui/form/FieldSet/FieldSet.js +5 -30
- package/ui/form/FileField/FileField.js +5 -27
- package/ui/form/Form/Form.d.ts +7 -11
- package/ui/form/Form/Form.js +6 -32
- package/ui/form/ImageField/ImageField.js +2 -25
- package/ui/form/InputField/InputField.d.ts +5 -6
- package/ui/form/InputField/InputField.js +2 -26
- package/ui/form/MaskField/MaskField.js +2 -2
- package/ui/form/NavField/NavField.js +3 -25
- package/ui/form/NumberField/NumberField.d.ts +1 -1
- package/ui/form/NumberField/NumberField.js +2 -25
- package/ui/form/NumberField/hooks/useInputTypeNumber.d.ts +3 -3
- package/ui/form/NumberField/hooks/useInputTypeNumber.js +2 -5
- package/ui/form/RadioField/RadioField.js +2 -2
- package/ui/form/RadioListField/RadioListField.js +2 -2
- package/ui/form/SliderField/SliderField.d.ts +2 -2
- package/ui/form/SwitcherField/SwitcherField.js +2 -2
- package/ui/form/SwitcherListField/SwitcherListField.js +2 -2
- package/ui/form/TextField/TextField.d.ts +2 -2
- package/ui/form/WizardForm/WizardForm.d.ts +4 -4
- package/ui/form/WizardForm/WizardForm.js +3 -27
- package/ui/form/WizardForm/utils.d.ts +2 -2
- package/ui/format/BooleanFormatter/BooleanFormatter.d.ts +2 -2
- package/ui/layout/Header/Header.d.ts +3 -3
- package/ui/layout/Meta/Meta.js +6 -15
- package/ui/layout/Notifications/Notifications.d.ts +2 -2
- package/ui/layout/Notifications/Notifications.js +3 -25
- package/ui/layout/Portal.d.ts +3 -3
- package/ui/layout/ProgressBar/ProgressBar.d.ts +3 -3
- package/ui/layout/ProgressBar/ProgressBar.js +4 -26
- package/ui/layout/Sidebar/Sidebar.d.ts +3 -3
- package/ui/layout/Sidebar/Sidebar.js +2 -25
- package/ui/layout/Skeleton/Skeleton.d.ts +3 -3
- package/ui/layout/Tooltip/Tooltip.js +19 -34
- package/ui/layout/Tooltip/TooltipPortalInner.d.ts +3 -3
- package/ui/layout/Tooltip/TooltipPortalInner.js +2 -25
- package/ui/list/Empty/Empty.d.ts +3 -3
- package/ui/list/Empty/Empty.js +2 -25
- package/ui/list/FlexGrid/FlexGrid.d.ts +2 -2
- package/ui/list/Grid/Grid.d.ts +3 -3
- package/ui/list/Grid/Grid.js +5 -27
- package/ui/list/InfiniteScroll/InfiniteScroll.d.ts +2 -2
- package/ui/list/InfiniteScroll/InfiniteScroll.js +3 -25
- package/ui/list/LayoutNames/LayoutNames.d.ts +2 -2
- package/ui/list/LayoutNames/LayoutNames.js +2 -25
- package/ui/list/List/List.js +3 -26
- package/ui/list/Pagination/Pagination.d.ts +2 -2
- package/ui/list/Pagination/Pagination.js +4 -27
- package/ui/list/PaginationSize/PaginationSize.d.ts +2 -2
- package/ui/list/PaginationSize/PaginationSize.js +2 -25
- package/ui/list/SearchForm/SearchForm.d.ts +2 -2
- package/ui/list/SearchForm/SearchForm.js +3 -26
- package/ui/list/Steps/Steps.d.ts +4 -4
- package/ui/list/TreeTable/TreeTable.d.ts +3 -3
- package/ui/list/TreeTable/TreeTable.js +4 -27
- package/ui/modal/Modal/Modal.js +3 -25
- package/ui/modal/ModalPortal/ModalPortal.js +3 -25
- package/ui/modal/TwoFactorModal/TwoFactorModal.js +4 -5
- package/ui/nav/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/ui/nav/Link/Link.js +2 -25
- package/ui/nav/Nav/Nav.js +3 -25
- package/ui/nav/Router/Router.d.ts +3 -3
- package/ui/nav/Router/Router.js +9 -33
- package/ui/nav/Tree/Tree.d.ts +4 -4
- package/ui/typography/Text/Text.d.ts +2 -2
- package/ui/typography/Title/Title.d.ts +2 -2
- package/utils/createAxiosError.d.ts +9 -0
- package/utils/createAxiosError.js +39 -0
package/docs-autogen-result.json
CHANGED
|
@@ -636,9 +636,9 @@
|
|
|
636
636
|
"example": null
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
|
-
"name": "
|
|
639
|
+
"name": "body",
|
|
640
640
|
"decorators": [],
|
|
641
|
-
"description": "
|
|
641
|
+
"description": "Тело для запроса.",
|
|
642
642
|
"required": false,
|
|
643
643
|
"type": "Record",
|
|
644
644
|
"example": null
|
|
@@ -646,9 +646,9 @@
|
|
|
646
646
|
{
|
|
647
647
|
"name": "options",
|
|
648
648
|
"decorators": [],
|
|
649
|
-
"description": "Опции для HTTP-запроса,
|
|
649
|
+
"description": "Опции для HTTP-запроса, заголовки, query-параметры и т.д.\n",
|
|
650
650
|
"required": false,
|
|
651
|
-
"type": "
|
|
651
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
652
652
|
"example": null
|
|
653
653
|
}
|
|
654
654
|
]
|
|
@@ -680,9 +680,9 @@
|
|
|
680
680
|
{
|
|
681
681
|
"name": "options",
|
|
682
682
|
"decorators": [],
|
|
683
|
-
"description": "Опции для HTTP-запроса,
|
|
683
|
+
"description": "Опции для HTTP-запроса, заголовки, query-параметры и т.д.\n",
|
|
684
684
|
"required": false,
|
|
685
|
-
"type": "
|
|
685
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
686
686
|
"example": null
|
|
687
687
|
}
|
|
688
688
|
]
|
|
@@ -776,9 +776,9 @@
|
|
|
776
776
|
"example": null
|
|
777
777
|
},
|
|
778
778
|
{
|
|
779
|
-
"name": "
|
|
779
|
+
"name": "body",
|
|
780
780
|
"decorators": [],
|
|
781
|
-
"description": "
|
|
781
|
+
"description": "Тело запроса.",
|
|
782
782
|
"required": false,
|
|
783
783
|
"type": "Record",
|
|
784
784
|
"example": null
|
|
@@ -786,9 +786,9 @@
|
|
|
786
786
|
{
|
|
787
787
|
"name": "options",
|
|
788
788
|
"decorators": [],
|
|
789
|
-
"description": "Опции для HTTP-запроса,
|
|
789
|
+
"description": "Опции для HTTP-запроса, заголовки, query-параметры и т.д.\n",
|
|
790
790
|
"required": false,
|
|
791
|
-
"type": "
|
|
791
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
792
792
|
"example": null
|
|
793
793
|
}
|
|
794
794
|
]
|
|
@@ -836,9 +836,9 @@
|
|
|
836
836
|
"example": null
|
|
837
837
|
},
|
|
838
838
|
{
|
|
839
|
-
"name": "
|
|
839
|
+
"name": "body",
|
|
840
840
|
"decorators": [],
|
|
841
|
-
"description": "
|
|
841
|
+
"description": "Тело запроса.",
|
|
842
842
|
"required": false,
|
|
843
843
|
"type": "Record",
|
|
844
844
|
"example": null
|
|
@@ -846,9 +846,9 @@
|
|
|
846
846
|
{
|
|
847
847
|
"name": "options",
|
|
848
848
|
"decorators": [],
|
|
849
|
-
"description": "Опции для HTTP-запроса,
|
|
849
|
+
"description": "Опции для HTTP-запроса, заголовки, query-параметры и т.д.\n",
|
|
850
850
|
"required": false,
|
|
851
|
-
"type": "
|
|
851
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
852
852
|
"example": null
|
|
853
853
|
}
|
|
854
854
|
]
|
|
@@ -3654,8 +3654,8 @@
|
|
|
3654
3654
|
"name": "data",
|
|
3655
3655
|
"decorators": [],
|
|
3656
3656
|
"description": "",
|
|
3657
|
-
"required":
|
|
3658
|
-
"type": "T
|
|
3657
|
+
"required": true,
|
|
3658
|
+
"type": "T",
|
|
3659
3659
|
"example": null
|
|
3660
3660
|
},
|
|
3661
3661
|
{
|
|
@@ -5665,7 +5665,7 @@
|
|
|
5665
5665
|
"tags": {},
|
|
5666
5666
|
"defaultProps": null,
|
|
5667
5667
|
"extends": [
|
|
5668
|
-
"
|
|
5668
|
+
"PropsWithChildren<any>"
|
|
5669
5669
|
],
|
|
5670
5670
|
"properties": [
|
|
5671
5671
|
{
|
|
@@ -16394,7 +16394,7 @@
|
|
|
16394
16394
|
"decorators": [],
|
|
16395
16395
|
"description": "Кастомная иконка, заменяющая иконку раскрытия по умолчанию",
|
|
16396
16396
|
"required": false,
|
|
16397
|
-
"type": "string | ReactElement",
|
|
16397
|
+
"type": "string | React.ReactElement",
|
|
16398
16398
|
"example": null,
|
|
16399
16399
|
"defaultValue": null
|
|
16400
16400
|
},
|
|
@@ -16761,7 +16761,7 @@
|
|
|
16761
16761
|
"decorators": [],
|
|
16762
16762
|
"description": "Кастомная иконка, заменяющая иконку раскрытия по умолчанию",
|
|
16763
16763
|
"required": false,
|
|
16764
|
-
"type": "string | ReactElement",
|
|
16764
|
+
"type": "string | React.ReactElement",
|
|
16765
16765
|
"example": null
|
|
16766
16766
|
},
|
|
16767
16767
|
{
|
|
@@ -23546,15 +23546,6 @@
|
|
|
23546
23546
|
"example": "true",
|
|
23547
23547
|
"defaultValue": null
|
|
23548
23548
|
},
|
|
23549
|
-
{
|
|
23550
|
-
"name": "validator",
|
|
23551
|
-
"decorators": [],
|
|
23552
|
-
"description": "Колбэк для использования сторонних валидаторов, например yup",
|
|
23553
|
-
"required": false,
|
|
23554
|
-
"type": "any",
|
|
23555
|
-
"example": null,
|
|
23556
|
-
"defaultValue": null
|
|
23557
|
-
},
|
|
23558
23549
|
{
|
|
23559
23550
|
"name": "validators",
|
|
23560
23551
|
"decorators": [],
|
|
@@ -33043,7 +33034,7 @@
|
|
|
33043
33034
|
"decorators": [],
|
|
33044
33035
|
"description": "Свойства для логотипа.",
|
|
33045
33036
|
"required": false,
|
|
33046
|
-
"type": "{className: string, icon:
|
|
33037
|
+
"type": "{className: string, icon: CustomIcon, linkProps: ILinkProps, title: string}",
|
|
33047
33038
|
"example": null,
|
|
33048
33039
|
"defaultValue": null
|
|
33049
33040
|
},
|
|
@@ -33143,7 +33134,7 @@
|
|
|
33143
33134
|
"decorators": [],
|
|
33144
33135
|
"description": "Свойства для логотипа.",
|
|
33145
33136
|
"required": false,
|
|
33146
|
-
"type": "{className: string, icon:
|
|
33137
|
+
"type": "{className: string, icon: CustomIcon, linkProps: ILinkProps, title: string}",
|
|
33147
33138
|
"example": null
|
|
33148
33139
|
},
|
|
33149
33140
|
{
|
|
@@ -38088,15 +38079,6 @@
|
|
|
38088
38079
|
"example": "true",
|
|
38089
38080
|
"defaultValue": null
|
|
38090
38081
|
},
|
|
38091
|
-
{
|
|
38092
|
-
"name": "validator",
|
|
38093
|
-
"decorators": [],
|
|
38094
|
-
"description": "Колбэк для использования сторонних валидаторов, например yup",
|
|
38095
|
-
"required": false,
|
|
38096
|
-
"type": "any",
|
|
38097
|
-
"example": null,
|
|
38098
|
-
"defaultValue": null
|
|
38099
|
-
},
|
|
38100
38082
|
{
|
|
38101
38083
|
"name": "validators",
|
|
38102
38084
|
"decorators": [],
|
|
@@ -38616,7 +38598,7 @@
|
|
|
38616
38598
|
"decorators": [],
|
|
38617
38599
|
"description": "Кастомная иконка для сворачивания элементов",
|
|
38618
38600
|
"required": false,
|
|
38619
|
-
"type": "string | ReactElement",
|
|
38601
|
+
"type": "string | React.ReactElement",
|
|
38620
38602
|
"example": "'arrow'"
|
|
38621
38603
|
},
|
|
38622
38604
|
{
|
|
@@ -38834,7 +38816,7 @@
|
|
|
38834
38816
|
"decorators": [],
|
|
38835
38817
|
"description": "Кастомная иконка для сворачивания элементов",
|
|
38836
38818
|
"required": false,
|
|
38837
|
-
"type": "string | ReactElement",
|
|
38819
|
+
"type": "string | React.ReactElement",
|
|
38838
38820
|
"example": "'arrow'",
|
|
38839
38821
|
"defaultValue": null
|
|
38840
38822
|
},
|
|
@@ -39217,7 +39199,7 @@
|
|
|
39217
39199
|
"decorators": [],
|
|
39218
39200
|
"description": "Кастомная иконка, заменяющая первый роут",
|
|
39219
39201
|
"required": false,
|
|
39220
|
-
"type": "string | ReactElement",
|
|
39202
|
+
"type": "string | React.ReactElement",
|
|
39221
39203
|
"example": null,
|
|
39222
39204
|
"defaultValue": null
|
|
39223
39205
|
},
|
|
@@ -41020,7 +41002,7 @@
|
|
|
41020
41002
|
"decorators": [],
|
|
41021
41003
|
"description": "Кастомная иконка, заменяющая иконку раскрытия по умолчанию",
|
|
41022
41004
|
"required": false,
|
|
41023
|
-
"type": "string | ReactElement",
|
|
41005
|
+
"type": "string | React.ReactElement",
|
|
41024
41006
|
"example": null
|
|
41025
41007
|
},
|
|
41026
41008
|
{
|
|
@@ -41273,7 +41255,7 @@
|
|
|
41273
41255
|
"decorators": [],
|
|
41274
41256
|
"description": "Кастомная иконка, заменяющая иконку раскрытия по умолчанию",
|
|
41275
41257
|
"required": false,
|
|
41276
|
-
"type": "string | ReactElement",
|
|
41258
|
+
"type": "string | React.ReactElement",
|
|
41277
41259
|
"example": null,
|
|
41278
41260
|
"defaultValue": null
|
|
41279
41261
|
},
|
|
@@ -41506,7 +41488,7 @@
|
|
|
41506
41488
|
"decorators": [],
|
|
41507
41489
|
"description": "Кастомная иконка, заменяющая иконку раскрытия по умолчанию",
|
|
41508
41490
|
"required": false,
|
|
41509
|
-
"type": "string | ReactElement",
|
|
41491
|
+
"type": "string | React.ReactElement",
|
|
41510
41492
|
"example": null
|
|
41511
41493
|
},
|
|
41512
41494
|
{
|
|
@@ -41845,6 +41827,50 @@
|
|
|
41845
41827
|
}
|
|
41846
41828
|
],
|
|
41847
41829
|
"methods": []
|
|
41830
|
+
},
|
|
41831
|
+
"IApiErrorPayload": {
|
|
41832
|
+
"name": "IApiErrorPayload",
|
|
41833
|
+
"moduleName": "utils/createAxiosError",
|
|
41834
|
+
"title": "",
|
|
41835
|
+
"description": "",
|
|
41836
|
+
"tags": {},
|
|
41837
|
+
"defaultProps": null,
|
|
41838
|
+
"extends": [],
|
|
41839
|
+
"properties": [
|
|
41840
|
+
{
|
|
41841
|
+
"name": "error",
|
|
41842
|
+
"decorators": [],
|
|
41843
|
+
"description": "",
|
|
41844
|
+
"required": false,
|
|
41845
|
+
"type": "string",
|
|
41846
|
+
"example": null
|
|
41847
|
+
},
|
|
41848
|
+
{
|
|
41849
|
+
"name": "errors",
|
|
41850
|
+
"decorators": [],
|
|
41851
|
+
"description": "",
|
|
41852
|
+
"required": false,
|
|
41853
|
+
"type": "Record",
|
|
41854
|
+
"example": null
|
|
41855
|
+
},
|
|
41856
|
+
{
|
|
41857
|
+
"name": "message",
|
|
41858
|
+
"decorators": [],
|
|
41859
|
+
"description": "",
|
|
41860
|
+
"required": false,
|
|
41861
|
+
"type": "string",
|
|
41862
|
+
"example": null
|
|
41863
|
+
},
|
|
41864
|
+
{
|
|
41865
|
+
"name": "statusCode",
|
|
41866
|
+
"decorators": [],
|
|
41867
|
+
"description": "",
|
|
41868
|
+
"required": true,
|
|
41869
|
+
"type": "number",
|
|
41870
|
+
"example": null
|
|
41871
|
+
}
|
|
41872
|
+
],
|
|
41873
|
+
"methods": []
|
|
41848
41874
|
}
|
|
41849
41875
|
},
|
|
41850
41876
|
"declarations": {
|
|
@@ -42594,7 +42620,7 @@
|
|
|
42594
42620
|
"example": null
|
|
42595
42621
|
},
|
|
42596
42622
|
{
|
|
42597
|
-
"name": "
|
|
42623
|
+
"name": "body",
|
|
42598
42624
|
"decorators": [],
|
|
42599
42625
|
"description": "",
|
|
42600
42626
|
"required": true,
|
|
@@ -42606,7 +42632,7 @@
|
|
|
42606
42632
|
"decorators": [],
|
|
42607
42633
|
"description": "",
|
|
42608
42634
|
"required": true,
|
|
42609
|
-
"type": "
|
|
42635
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
42610
42636
|
"example": null
|
|
42611
42637
|
}
|
|
42612
42638
|
]
|
|
@@ -42640,7 +42666,7 @@
|
|
|
42640
42666
|
"decorators": [],
|
|
42641
42667
|
"description": "",
|
|
42642
42668
|
"required": true,
|
|
42643
|
-
"type": "
|
|
42669
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
42644
42670
|
"example": null
|
|
42645
42671
|
}
|
|
42646
42672
|
]
|
|
@@ -42734,7 +42760,7 @@
|
|
|
42734
42760
|
"example": null
|
|
42735
42761
|
},
|
|
42736
42762
|
{
|
|
42737
|
-
"name": "
|
|
42763
|
+
"name": "body",
|
|
42738
42764
|
"decorators": [],
|
|
42739
42765
|
"description": "",
|
|
42740
42766
|
"required": true,
|
|
@@ -42746,7 +42772,7 @@
|
|
|
42746
42772
|
"decorators": [],
|
|
42747
42773
|
"description": "",
|
|
42748
42774
|
"required": true,
|
|
42749
|
-
"type": "
|
|
42775
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
42750
42776
|
"example": null
|
|
42751
42777
|
}
|
|
42752
42778
|
]
|
|
@@ -42794,7 +42820,7 @@
|
|
|
42794
42820
|
"example": null
|
|
42795
42821
|
},
|
|
42796
42822
|
{
|
|
42797
|
-
"name": "
|
|
42823
|
+
"name": "body",
|
|
42798
42824
|
"decorators": [],
|
|
42799
42825
|
"description": "",
|
|
42800
42826
|
"required": true,
|
|
@@ -42806,7 +42832,7 @@
|
|
|
42806
42832
|
"decorators": [],
|
|
42807
42833
|
"description": "",
|
|
42808
42834
|
"required": true,
|
|
42809
|
-
"type": "
|
|
42835
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
42810
42836
|
"example": null
|
|
42811
42837
|
}
|
|
42812
42838
|
]
|
|
@@ -42957,7 +42983,7 @@
|
|
|
42957
42983
|
"example": null
|
|
42958
42984
|
},
|
|
42959
42985
|
{
|
|
42960
|
-
"name": "
|
|
42986
|
+
"name": "body",
|
|
42961
42987
|
"decorators": [],
|
|
42962
42988
|
"description": "",
|
|
42963
42989
|
"required": true,
|
|
@@ -42969,7 +42995,7 @@
|
|
|
42969
42995
|
"decorators": [],
|
|
42970
42996
|
"description": "",
|
|
42971
42997
|
"required": true,
|
|
42972
|
-
"type": "
|
|
42998
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
42973
42999
|
"example": null
|
|
42974
43000
|
}
|
|
42975
43001
|
]
|
|
@@ -43003,7 +43029,7 @@
|
|
|
43003
43029
|
"decorators": [],
|
|
43004
43030
|
"description": "",
|
|
43005
43031
|
"required": true,
|
|
43006
|
-
"type": "
|
|
43032
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
43007
43033
|
"example": null
|
|
43008
43034
|
}
|
|
43009
43035
|
]
|
|
@@ -43097,7 +43123,7 @@
|
|
|
43097
43123
|
"example": null
|
|
43098
43124
|
},
|
|
43099
43125
|
{
|
|
43100
|
-
"name": "
|
|
43126
|
+
"name": "body",
|
|
43101
43127
|
"decorators": [],
|
|
43102
43128
|
"description": "",
|
|
43103
43129
|
"required": true,
|
|
@@ -43109,7 +43135,7 @@
|
|
|
43109
43135
|
"decorators": [],
|
|
43110
43136
|
"description": "",
|
|
43111
43137
|
"required": true,
|
|
43112
|
-
"type": "
|
|
43138
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
43113
43139
|
"example": null
|
|
43114
43140
|
}
|
|
43115
43141
|
]
|
|
@@ -43157,7 +43183,7 @@
|
|
|
43157
43183
|
"example": null
|
|
43158
43184
|
},
|
|
43159
43185
|
{
|
|
43160
|
-
"name": "
|
|
43186
|
+
"name": "body",
|
|
43161
43187
|
"decorators": [],
|
|
43162
43188
|
"description": "",
|
|
43163
43189
|
"required": true,
|
|
@@ -43169,7 +43195,7 @@
|
|
|
43169
43195
|
"decorators": [],
|
|
43170
43196
|
"description": "",
|
|
43171
43197
|
"required": true,
|
|
43172
|
-
"type": "
|
|
43198
|
+
"type": "IHttpRequestOptionsWithQuery",
|
|
43173
43199
|
"example": null
|
|
43174
43200
|
}
|
|
43175
43201
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface IComponentStylePosition {
|
|
3
3
|
/**
|
|
4
4
|
* Позиция компонента слева
|
|
@@ -59,7 +59,7 @@ export interface IAbsolutePositioningInputProps {
|
|
|
59
59
|
/**
|
|
60
60
|
* Дочерние элементы
|
|
61
61
|
*/
|
|
62
|
-
children?:
|
|
62
|
+
children?: ReactNode;
|
|
63
63
|
/**
|
|
64
64
|
* Задержка перед размонтированием компонента, когда он должен быть скрыт.
|
|
65
65
|
* В этот момент удобно применять различные анимации ухода.
|
package/hooks/useApplication.js
CHANGED
|
@@ -10,29 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
14
|
var t = {};
|
|
38
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -49,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
26
|
};
|
|
50
27
|
exports.__esModule = true;
|
|
51
28
|
exports.defaultComponents = void 0;
|
|
29
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
30
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
53
31
|
var customParseFormat_1 = __importDefault(require("dayjs/plugin/customParseFormat"));
|
|
54
32
|
var isToday_1 = __importDefault(require("dayjs/plugin/isToday"));
|
|
@@ -57,7 +35,6 @@ var localizedFormat_1 = __importDefault(require("dayjs/plugin/localizedFormat"))
|
|
|
57
35
|
var relativeTime_1 = __importDefault(require("dayjs/plugin/relativeTime"));
|
|
58
36
|
var utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
59
37
|
var merge_1 = __importDefault(require("lodash-es/merge"));
|
|
60
|
-
var React = __importStar(require("react"));
|
|
61
38
|
var react_1 = require("react");
|
|
62
39
|
var react_redux_1 = require("react-redux");
|
|
63
40
|
var useComponents_1 = __importDefault(require("./useComponents"));
|
|
@@ -147,18 +124,18 @@ function useApplication(config) {
|
|
|
147
124
|
var content = children;
|
|
148
125
|
// Wrap in routes
|
|
149
126
|
if (config.routes) {
|
|
150
|
-
content = (
|
|
127
|
+
content = ((0, jsx_runtime_1.jsx)(Router_1["default"], __assign({ routes: config.routes(), wrapperView: config.layoutView(), wrapperProps: config.layoutProps }, config.routerProps)));
|
|
151
128
|
}
|
|
152
129
|
if (config.screen) {
|
|
153
|
-
content = (
|
|
130
|
+
content = ((0, jsx_runtime_1.jsx)(ScreenProvider_1["default"], __assign({}, config.screen, { children: content })));
|
|
154
131
|
}
|
|
155
132
|
if (config.theme) {
|
|
156
|
-
content = (
|
|
133
|
+
content = ((0, jsx_runtime_1.jsx)(ThemeProvider_1["default"], __assign({}, config.theme, { children: content })));
|
|
157
134
|
}
|
|
158
135
|
if (!(useGlobal || process.env.IS_SSR)) {
|
|
159
|
-
content = (
|
|
136
|
+
content = ((0, jsx_runtime_1.jsx)(ComponentsProvider_1["default"], __assign({ components: components }, { children: content })));
|
|
160
137
|
}
|
|
161
|
-
return (
|
|
138
|
+
return ((0, jsx_runtime_1.jsx)(react_redux_1.Provider, __assign({ store: components.store.store }, { children: content })));
|
|
162
139
|
}, [components, config, useGlobal]);
|
|
163
140
|
return {
|
|
164
141
|
renderApplication: renderApplication,
|
package/hooks/useFetch.d.ts
CHANGED
|
@@ -19,12 +19,7 @@ export interface IFetchConfig {
|
|
|
19
19
|
onFetch?: (config: IFetchConfig, components: IComponents, addCancelToken: (token: any) => any) => any;
|
|
20
20
|
}
|
|
21
21
|
export interface IFetchResult<T> {
|
|
22
|
-
data
|
|
23
|
-
statusCode: number;
|
|
24
|
-
error?: string;
|
|
25
|
-
message?: string;
|
|
26
|
-
errors?: Record<string, unknown>;
|
|
27
|
-
};
|
|
22
|
+
data: T | null;
|
|
28
23
|
isLoading: boolean;
|
|
29
24
|
fetch: (newParams?: Record<string, unknown>) => void;
|
|
30
25
|
axiosError: AxiosError | null;
|
package/hooks/useFetch.js
CHANGED
|
@@ -55,6 +55,7 @@ var axios_1 = __importDefault(require("axios"));
|
|
|
55
55
|
var trim_1 = __importDefault(require("lodash-es/trim"));
|
|
56
56
|
var react_1 = require("react");
|
|
57
57
|
var react_use_1 = require("react-use");
|
|
58
|
+
var createAxiosError_1 = __importDefault(require("../utils/createAxiosError"));
|
|
58
59
|
var index_1 = require("./index");
|
|
59
60
|
var normalizeConfig = function (config) { return (config
|
|
60
61
|
? __assign({ id: null, url: '', method: 'get', params: {}, options: null, onFetch: null }, config) : null); };
|
|
@@ -120,9 +121,9 @@ function useFetch(rawConfig) {
|
|
|
120
121
|
var fetch = (0, react_1.useCallback)(function (newConfig) {
|
|
121
122
|
if (newConfig === void 0) { newConfig = null; }
|
|
122
123
|
return __awaiter(_this, void 0, void 0, function () {
|
|
123
|
-
var
|
|
124
|
-
return __generator(this, function (
|
|
125
|
-
switch (
|
|
124
|
+
var responseData, error_1;
|
|
125
|
+
return __generator(this, function (_a) {
|
|
126
|
+
switch (_a.label) {
|
|
126
127
|
case 0:
|
|
127
128
|
if (newConfig) {
|
|
128
129
|
setConfig(__assign(__assign(__assign({}, config), newConfig), { params: __assign(__assign({}, config === null || config === void 0 ? void 0 : config.params), newConfig === null || newConfig === void 0 ? void 0 : newConfig.params) }));
|
|
@@ -131,23 +132,28 @@ function useFetch(rawConfig) {
|
|
|
131
132
|
setData(null);
|
|
132
133
|
if (!config) return [3 /*break*/, 5];
|
|
133
134
|
setIsLoading(true);
|
|
134
|
-
|
|
135
|
+
_a.label = 1;
|
|
135
136
|
case 1:
|
|
136
|
-
|
|
137
|
-
_a = setData;
|
|
137
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
138
138
|
return [4 /*yield*/, (0, exports.fetchData)(config, components, addCancelToken)];
|
|
139
139
|
case 2:
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
responseData = _a.sent();
|
|
141
|
+
if ((responseData === null || responseData === void 0 ? void 0 : responseData.statusCode) && responseData.statusCode >= 400) {
|
|
142
|
+
setAxiosError((0, createAxiosError_1["default"])(responseData, config));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
setData(responseData);
|
|
146
|
+
}
|
|
147
|
+
return [3 /*break*/, 5];
|
|
142
148
|
case 3:
|
|
143
|
-
error_1 =
|
|
144
|
-
if (error_1.isAxiosError) {
|
|
149
|
+
error_1 = _a.sent();
|
|
150
|
+
if (error_1 === null || error_1 === void 0 ? void 0 : error_1.isAxiosError) {
|
|
145
151
|
setAxiosError(error_1);
|
|
146
152
|
}
|
|
147
|
-
return [3 /*break*/,
|
|
153
|
+
return [3 /*break*/, 5];
|
|
148
154
|
case 4:
|
|
149
155
|
setIsLoading(false);
|
|
150
|
-
|
|
156
|
+
return [7 /*endfinally*/];
|
|
151
157
|
case 5: return [2 /*return*/];
|
|
152
158
|
}
|
|
153
159
|
});
|