@steroidsjs/core 2.0.0-rc.7 → 2.0.1-beta.113
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/LICENSE +1 -1
- package/actions/auth.ts +55 -0
- package/actions/fields.ts +5 -0
- package/actions/list.ts +303 -0
- package/actions/modal.ts +33 -0
- package/actions/notifications.ts +37 -0
- package/actions/router.ts +111 -0
- package/actions/screen.ts +28 -0
- package/base/Enum.ts +28 -0
- package/build/docs-autogen-result.json +33256 -0
- package/build/docs-autogen.js +124 -0
- package/build/helpers.js +276 -0
- package/components/ClientStorageComponent.ts +117 -0
- package/components/HtmlComponent.ts +77 -0
- package/components/HttpComponent.tsx +300 -0
- package/components/LocaleComponent.tsx +136 -0
- package/components/MetaComponent.ts +226 -0
- package/components/ResourceComponent.ts +140 -0
- package/components/SocialComponent.ts +39 -0
- package/components/StoreComponent.ts +169 -0
- package/components/UiComponent.ts +107 -0
- package/components/WebSocketComponent.ts +222 -0
- package/components/index.ts +19 -0
- package/components/social/FacebookProvider.ts +55 -0
- package/components/social/GoogleProvider.ts +47 -0
- package/components/social/SteamProvider.ts +69 -0
- package/components/social/VkProvider.ts +70 -0
- package/components/social/index.ts +10 -0
- package/hoc/application.tsx +103 -0
- package/hoc/bem.tsx +55 -0
- package/hoc/components.tsx +67 -0
- package/hoc/connect.ts +16 -0
- package/hoc/dataProvider.tsx +521 -0
- package/hoc/fetch.tsx +175 -0
- package/hoc/field.tsx +285 -0
- package/hoc/file.tsx +322 -0
- package/hoc/form.tsx +88 -0
- package/hoc/formSubmit.tsx +158 -0
- package/hoc/http.tsx +112 -0
- package/hoc/index.ts +37 -0
- package/hoc/layout.tsx +205 -0
- package/hoc/list.tsx +549 -0
- package/hoc/normalize.tsx +60 -0
- package/hoc/props.tsx +27 -0
- package/hoc/screen.tsx +66 -0
- package/hoc/theme.tsx +56 -0
- package/index.d.ts +80 -89
- package/package.json +18 -58
- package/reducers/auth.ts +57 -0
- package/reducers/fields.ts +44 -0
- package/reducers/index.ts +23 -0
- package/reducers/list.ts +191 -0
- package/reducers/modal.ts +79 -0
- package/reducers/notifications.ts +39 -0
- package/reducers/router.ts +322 -0
- package/reducers/screen.ts +43 -0
- package/tsconfig.json +7 -0
- package/ui/crud/Crud/Crud.tsx +454 -0
- package/ui/crud/Crud/CrudDetail.tsx +17 -0
- package/ui/crud/Crud/CrudForm.tsx +33 -0
- package/ui/crud/Crud/CrudGrid.tsx +25 -0
- package/ui/crud/Crud/demo/default.tsx +58 -0
- package/ui/crud/Crud/{index.d.ts → index.ts} +0 -0
- package/ui/crud/index.ts +31 -0
- package/ui/form/AutoCompleteField/AutoCompleteField.story.js +9 -0
- package/ui/form/AutoCompleteField/AutoCompleteField.tsx +161 -0
- package/ui/form/AutoCompleteField/demo/basic.tsx +19 -0
- package/ui/form/AutoCompleteField/{index.d.ts → index.ts} +0 -0
- package/ui/form/BlankField/BlankField.tsx +23 -0
- package/ui/form/BlankField/{index.d.ts → index.ts} +0 -0
- package/ui/form/Button/Button.story.js +17 -0
- package/ui/form/Button/Button.tsx +383 -0
- package/ui/form/Button/demo/block.tsx +17 -0
- package/ui/form/Button/demo/colors.tsx +40 -0
- package/ui/form/Button/demo/disabled.tsx +16 -0
- package/ui/form/Button/demo/link.tsx +19 -0
- package/ui/form/Button/demo/sizes.tsx +28 -0
- package/ui/form/Button/index.ts +2 -0
- package/ui/form/CheckboxField/CheckboxField.story.js +15 -0
- package/ui/form/CheckboxField/CheckboxField.tsx +80 -0
- package/ui/form/CheckboxField/demo/basic.tsx +14 -0
- package/ui/form/CheckboxField/demo/disabled.tsx +15 -0
- package/ui/form/CheckboxField/demo/errors.tsx +15 -0
- package/ui/form/CheckboxField/demo/required.tsx +15 -0
- package/ui/form/CheckboxField/{index.d.ts → index.ts} +0 -0
- package/ui/form/CheckboxListField/CheckboxListField.tsx +81 -0
- package/ui/form/CheckboxListField/{index.d.ts → index.ts} +0 -0
- package/ui/form/DateField/DateField.story.js +19 -0
- package/ui/form/DateField/DateField.tsx +165 -0
- package/ui/form/DateField/demo/disabled.tsx +11 -0
- package/ui/form/DateField/demo/errors.tsx +10 -0
- package/ui/form/DateField/demo/icon.tsx +13 -0
- package/ui/form/DateField/demo/placeholder.tsx +10 -0
- package/ui/form/DateField/demo/required.tsx +10 -0
- package/ui/form/DateField/demo/sizes.tsx +20 -0
- package/ui/form/DateField/{index.d.ts → index.ts} +0 -0
- package/ui/form/DateTimeField/DateTimeField.story.js +15 -0
- package/ui/form/DateTimeField/DateTimeField.tsx +153 -0
- package/ui/form/DateTimeField/demo/disabled.tsx +10 -0
- package/ui/form/DateTimeField/demo/errors.tsx +10 -0
- package/ui/form/DateTimeField/demo/required.tsx +10 -0
- package/ui/form/DateTimeField/demo/sizes.tsx +20 -0
- package/ui/form/DateTimeField/{index.d.ts → index.ts} +0 -0
- package/ui/form/DropDownField/DropDownField.story.js +23 -0
- package/ui/form/DropDownField/DropDownField.tsx +146 -0
- package/ui/form/DropDownField/demo/auto-complete.tsx +31 -0
- package/ui/form/DropDownField/demo/disabled.tsx +13 -0
- package/ui/form/DropDownField/demo/errors.tsx +13 -0
- package/ui/form/DropDownField/demo/multiple.tsx +13 -0
- package/ui/form/DropDownField/demo/no-border.tsx +16 -0
- package/ui/form/DropDownField/demo/placeholder.tsx +14 -0
- package/ui/form/DropDownField/demo/required.tsx +13 -0
- package/ui/form/DropDownField/demo/show-reset.tsx +13 -0
- package/ui/form/DropDownField/{index.d.ts → index.ts} +0 -0
- package/ui/form/Field/Field.tsx +34 -0
- package/ui/form/Field/{index.d.ts → index.ts} +0 -0
- package/ui/form/FieldLayout/FieldLayout.story.js +13 -0
- package/ui/form/FieldLayout/FieldLayout.tsx +73 -0
- package/ui/form/FieldLayout/demo/default.tsx +8 -0
- package/ui/form/FieldLayout/demo/horizontal.tsx +8 -0
- package/ui/form/FieldLayout/demo/inline.tsx +9 -0
- package/ui/form/FieldLayout/{index.d.ts → index.ts} +0 -0
- package/ui/form/FieldList/FieldList.story.js +9 -0
- package/ui/form/FieldList/FieldList.tsx +204 -0
- package/ui/form/FieldList/demo/basic.tsx +29 -0
- package/ui/form/FieldList/{index.d.ts → index.ts} +0 -0
- package/ui/form/FieldList/tableNavigationHandler.ts +41 -0
- package/ui/form/FieldSet/FieldSet.tsx +69 -0
- package/ui/form/FieldSet/{index.d.ts → index.ts} +0 -0
- package/ui/form/FileField/FileField.story.js +9 -0
- package/ui/form/FileField/FileField.tsx +204 -0
- package/ui/form/FileField/demo/basic.tsx +12 -0
- package/ui/form/FileField/{index.d.ts → index.ts} +0 -0
- package/ui/form/Form/AutoSaveHelper.ts +23 -0
- package/ui/form/Form/Form.story.js +9 -0
- package/ui/form/Form/Form.tsx +274 -0
- package/ui/form/Form/SyncAddressBarHelper.ts +82 -0
- package/ui/form/Form/demo/basic.tsx +42 -0
- package/ui/form/Form/{index.d.ts → index.ts} +0 -0
- package/ui/form/HtmlField/HtmlField.tsx +291 -0
- package/ui/form/HtmlField/demo/basic.tsx +41 -0
- package/ui/form/HtmlField/{index.d.ts → index.ts} +0 -0
- package/ui/form/InputField/InputField.story.js +27 -0
- package/ui/form/InputField/InputField.tsx +180 -0
- package/ui/form/InputField/demo/addons.tsx +14 -0
- package/ui/form/InputField/demo/basic.tsx +14 -0
- package/ui/form/InputField/demo/disabled.tsx +14 -0
- package/ui/form/InputField/demo/errors.tsx +14 -0
- package/ui/form/InputField/demo/mask.tsx +19 -0
- package/ui/form/InputField/demo/placeholder.tsx +14 -0
- package/ui/form/InputField/demo/required.tsx +14 -0
- package/ui/form/InputField/demo/sizes.tsx +24 -0
- package/ui/form/InputField/demo/textAddons.tsx +14 -0
- package/ui/form/InputField/demo/types.tsx +26 -0
- package/ui/form/InputField/{index.d.ts → index.ts} +0 -0
- package/ui/form/NavField/NavField.tsx +36 -0
- package/ui/form/NavField/{index.d.ts → index.ts} +0 -0
- package/ui/form/NumberField/NumberField.story.js +19 -0
- package/ui/form/NumberField/NumberField.tsx +90 -0
- package/ui/form/NumberField/demo/basic.tsx +14 -0
- package/ui/form/NumberField/demo/disabled.tsx +14 -0
- package/ui/form/NumberField/demo/errors.tsx +14 -0
- package/ui/form/NumberField/demo/placeholder.tsx +14 -0
- package/ui/form/NumberField/demo/required.tsx +14 -0
- package/ui/form/NumberField/demo/sizes.tsx +24 -0
- package/ui/form/NumberField/{index.d.ts → index.ts} +0 -0
- package/ui/form/PasswordField/PasswordField.story.js +21 -0
- package/ui/form/PasswordField/PasswordField.tsx +127 -0
- package/ui/form/PasswordField/demo/basic.tsx +14 -0
- package/ui/form/PasswordField/demo/disabled.tsx +14 -0
- package/ui/form/PasswordField/demo/errors.tsx +14 -0
- package/ui/form/PasswordField/demo/placeholder.tsx +14 -0
- package/ui/form/PasswordField/demo/required.tsx +14 -0
- package/ui/form/PasswordField/demo/security.tsx +14 -0
- package/ui/form/PasswordField/demo/sizes.tsx +24 -0
- package/ui/form/PasswordField/{index.d.ts → index.ts} +0 -0
- package/ui/form/RadioListField/RadioListField.story.js +13 -0
- package/ui/form/RadioListField/RadioListField.tsx +70 -0
- package/ui/form/RadioListField/demo/disabled.tsx +31 -0
- package/ui/form/RadioListField/demo/errors.tsx +13 -0
- package/ui/form/RadioListField/demo/required.tsx +13 -0
- package/ui/form/RadioListField/{index.d.ts → index.ts} +0 -0
- package/ui/form/RangeField/RangeField.story.js +19 -0
- package/ui/form/RangeField/RangeField.tsx +173 -0
- package/ui/form/RangeField/demo/date.tsx +11 -0
- package/ui/form/RangeField/demo/disabled.tsx +8 -0
- package/ui/form/RangeField/demo/errors.tsx +11 -0
- package/ui/form/RangeField/demo/placeholders.tsx +12 -0
- package/ui/form/RangeField/demo/required.tsx +8 -0
- package/ui/form/RangeField/demo/sizes.tsx +18 -0
- package/ui/form/RangeField/demo/types.tsx +17 -0
- package/ui/form/RangeField/index.ts +2 -0
- package/ui/form/ReCaptchaField/ReCaptchaField.tsx +40 -0
- package/ui/form/ReCaptchaField/{index.d.ts → index.ts} +0 -0
- package/ui/form/SliderField/SliderField.tsx +80 -0
- package/ui/form/SliderField/{index.d.ts → index.ts} +0 -0
- package/ui/form/SwitcherField/SwitcherField.tsx +60 -0
- package/ui/form/SwitcherField/{index.d.ts → index.ts} +0 -0
- package/ui/form/TextField/TextField.story.js +19 -0
- package/ui/form/TextField/TextField.tsx +93 -0
- package/ui/form/TextField/demo/disabled.tsx +8 -0
- package/ui/form/TextField/demo/errors.tsx +8 -0
- package/ui/form/TextField/demo/placeholder.tsx +8 -0
- package/ui/form/TextField/demo/required.tsx +8 -0
- package/ui/form/TextField/demo/sizes.tsx +18 -0
- package/ui/form/TextField/demo/submit.tsx +8 -0
- package/ui/form/TextField/{index.d.ts → index.ts} +0 -0
- package/ui/form/TimeField/TimeField.story.js +17 -0
- package/ui/form/TimeField/TimeField.tsx +107 -0
- package/ui/form/TimeField/demo/disabled.tsx +8 -0
- package/ui/form/TimeField/demo/errors.tsx +8 -0
- package/ui/form/TimeField/demo/placeholder.tsx +8 -0
- package/ui/form/TimeField/demo/required.tsx +8 -0
- package/ui/form/TimeField/demo/sizes.tsx +18 -0
- package/ui/form/TimeField/{index.d.ts → index.ts} +0 -0
- package/ui/form/index.ts +84 -0
- package/ui/form/validate.ts +90 -0
- package/ui/format/BooleanFormatter/BooleanFormatter.tsx +23 -0
- package/ui/format/BooleanFormatter/{index.d.ts → index.ts} +0 -0
- package/ui/format/DateFormatter/DateFormatter.tsx +40 -0
- package/ui/format/DateFormatter/demo/basic.tsx +11 -0
- package/ui/format/DateFormatter/{index.d.ts → index.ts} +0 -0
- package/ui/format/DateTimeFormatter/DateTimeFormatter.tsx +52 -0
- package/ui/format/DateTimeFormatter/demo/basic.tsx +11 -0
- package/ui/format/DateTimeFormatter/{index.d.ts → index.ts} +0 -0
- package/ui/format/EnumFormatter/EnumFormatter.tsx +62 -0
- package/ui/format/EnumFormatter/{index.d.ts → index.ts} +0 -0
- package/ui/format/FileSize/FileSize.tsx +60 -0
- package/ui/format/FileSize/{index.d.ts → index.ts} +0 -0
- package/ui/format/Format/Format.tsx +80 -0
- package/ui/format/Format/{index.d.ts → index.ts} +0 -0
- package/ui/format/MoneyFormatter/MoneyFormatter.tsx +67 -0
- package/ui/format/MoneyFormatter/{index.d.ts → index.ts} +0 -0
- package/ui/format/PhotosFormatter/PhotosFormatter.tsx +63 -0
- package/ui/format/PhotosFormatter/index.ts +2 -0
- package/ui/format/index.ts +27 -0
- package/ui/icon/Icon/Icon.tsx +98 -0
- package/ui/icon/Icon/demo/icon.tsx +70 -0
- package/ui/icon/Icon/index.ts +2 -0
- package/ui/layout/Header/Header.tsx +40 -0
- package/ui/layout/Header/{index.d.ts → index.ts} +0 -0
- package/ui/layout/Loader/Loader.tsx +23 -0
- package/ui/layout/Loader/{index.d.ts → index.ts} +0 -0
- package/ui/layout/Notifications/Notifications.tsx +145 -0
- package/ui/layout/Notifications/demo/basic.tsx +48 -0
- package/ui/layout/Notifications/{index.d.ts → index.ts} +0 -0
- package/ui/layout/Portal.tsx +31 -0
- package/ui/layout/Tooltip/Tooltip.tsx +500 -0
- package/ui/layout/Tooltip/TooltipPortalInner.tsx +18 -0
- package/ui/layout/Tooltip/demo/basic.tsx +23 -0
- package/ui/layout/Tooltip/{index.d.ts → index.tsx} +0 -0
- package/ui/layout/index.ts +10 -0
- package/ui/list/Accordion/Accordion.tsx +146 -0
- package/ui/list/Accordion/index.ts +2 -0
- package/ui/list/CheckboxColumn/CheckboxColumn.tsx +82 -0
- package/ui/list/CheckboxColumn/{index.d.ts → index.ts} +0 -0
- package/ui/list/ControlsColumn/ControlsColumn.tsx +49 -0
- package/ui/list/ControlsColumn/{index.d.ts → index.ts} +0 -0
- package/ui/list/Detail/Detail.tsx +116 -0
- package/ui/list/Detail/index.ts +2 -0
- package/ui/list/Empty/Empty.tsx +28 -0
- package/ui/list/Empty/demo/basic.tsx +11 -0
- package/ui/list/Empty/{index.d.ts → index.ts} +0 -0
- package/ui/list/Grid/Grid.tsx +169 -0
- package/ui/list/Grid/demo/load-more.tsx +71 -0
- package/ui/list/Grid/demo/pagination.tsx +40 -0
- package/ui/list/Grid/demo/visible.tsx +36 -0
- package/ui/list/Grid/{index.d.ts → index.ts} +0 -0
- package/ui/list/List/List.tsx +75 -0
- package/ui/list/List/demo/basic.tsx +42 -0
- package/ui/list/List/demo/empty.tsx +16 -0
- package/ui/list/List/demo/pagination-layout.tsx +36 -0
- package/ui/list/List/demo/pagination-more-size.tsx +28 -0
- package/ui/list/List/demo/pagination-pages.tsx +28 -0
- package/ui/list/List/demo/pagination-search.tsx +42 -0
- package/ui/list/List/{index.d.ts → index.ts} +0 -0
- package/ui/list/Pagination/Pagination.tsx +125 -0
- package/ui/list/Pagination/demo/basic.tsx +49 -0
- package/ui/list/Pagination/demo/load-more.tsx +18 -0
- package/ui/list/Pagination/demo/sizes.tsx +28 -0
- package/ui/list/Pagination/{index.d.ts → index.ts} +0 -0
- package/ui/list/PaginationSize/PaginationSize.tsx +76 -0
- package/ui/list/PaginationSize/demo/basic.tsx +31 -0
- package/ui/list/PaginationSize/{index.d.ts → index.ts} +0 -0
- package/ui/list/index.ts +7 -0
- package/ui/modal/Modal/Modal.tsx +55 -0
- package/ui/modal/Modal/demo/basic.tsx +50 -0
- package/ui/modal/Modal/{index.d.ts → index.ts} +0 -0
- package/ui/modal/ModalPortal/ModalPortal.tsx +75 -0
- package/ui/modal/ModalPortal/{index.d.ts → index.ts} +0 -0
- package/ui/modal/TwoFactorModal/TwoFactorModal.tsx +80 -0
- package/ui/modal/TwoFactorModal/{index.d.ts → index.ts} +0 -0
- package/ui/modal/index.ts +6 -0
- package/ui/nav/Breadcrumbs/Breadcrumbs.tsx +40 -0
- package/ui/nav/Breadcrumbs/{index.d.ts → index.ts} +0 -0
- package/ui/nav/Controls/Controls.tsx +87 -0
- package/ui/nav/Controls/{index.d.ts → index.ts} +0 -0
- package/ui/nav/Link/Link.tsx +25 -0
- package/ui/nav/Link/{index.d.ts → index.ts} +0 -0
- package/ui/nav/Nav/Nav.tsx +147 -0
- package/ui/nav/Nav/demo/buttons.tsx +48 -0
- package/ui/nav/Nav/demo/links.tsx +13 -0
- package/ui/nav/Nav/demo/navbar.tsx +34 -0
- package/ui/nav/Nav/demo/tabs.tsx +13 -0
- package/ui/nav/Nav/{index.d.ts → index.ts} +0 -0
- package/ui/nav/Router/Router.tsx +235 -0
- package/ui/nav/Router/SsrProvider.tsx +32 -0
- package/ui/nav/Router/{index.d.ts → index.ts} +0 -0
- package/ui/nav/Router/navigationHoc.tsx +135 -0
- package/ui/nav/Tree/Tree.tsx +279 -0
- package/ui/nav/Tree/demo/level-tree-routes.tsx +10 -0
- package/ui/nav/Tree/demo/level-tree.tsx +44 -0
- package/ui/nav/Tree/{index.d.ts → index.ts} +0 -0
- package/ui/nav/{index.d.ts → index.ts} +0 -0
- package/utils/collection.ts +13 -0
- package/utils/data.ts +120 -0
- package/utils/query.ts +147 -0
- package/utils/text.ts +82 -0
- package/actions/auth.d.ts +0 -24
- package/actions/auth.js +0 -65
- package/actions/fields.d.ts +0 -5
- package/actions/fields.js +0 -9
- package/actions/form.d.ts +0 -59
- package/actions/form.js +0 -68
- package/actions/list.d.ts +0 -103
- package/actions/list.js +0 -293
- package/actions/modal.d.ts +0 -20
- package/actions/modal.js +0 -44
- package/actions/notifications.d.ts +0 -13
- package/actions/notifications.js +0 -50
- package/actions/router.d.ts +0 -15
- package/actions/router.js +0 -51
- package/actions/screen.d.ts +0 -7
- package/actions/screen.js +0 -33
- package/base/Enum.d.ts +0 -11
- package/base/Enum.js +0 -32
- package/components/ClientStorageComponent.d.ts +0 -33
- package/components/ClientStorageComponent.js +0 -129
- package/components/HtmlComponent.d.ts +0 -15
- package/components/HtmlComponent.js +0 -93
- package/components/HttpComponent.d.ts +0 -49
- package/components/HttpComponent.js +0 -333
- package/components/LocaleComponent.d.ts +0 -30
- package/components/LocaleComponent.js +0 -156
- package/components/MetaComponent.d.ts +0 -136
- package/components/MetaComponent.js +0 -175
- package/components/MetricsComponent.d.ts +0 -39
- package/components/MetricsComponent.js +0 -156
- package/components/ResourceComponent.d.ts +0 -22
- package/components/ResourceComponent.js +0 -144
- package/components/SocialComponent.d.ts +0 -12
- package/components/SocialComponent.js +0 -41
- package/components/StoreComponent.d.ts +0 -29
- package/components/StoreComponent.js +0 -146
- package/components/UiComponent.d.ts +0 -37
- package/components/UiComponent.js +0 -173
- package/components/WebSocketComponent.d.ts +0 -31
- package/components/WebSocketComponent.js +0 -234
- package/components/social/FacebookProvider.d.ts +0 -8
- package/components/social/FacebookProvider.js +0 -93
- package/components/social/GoogleProvider.d.ts +0 -9
- package/components/social/GoogleProvider.js +0 -98
- package/components/social/SteamProvider.d.ts +0 -7
- package/components/social/SteamProvider.js +0 -126
- package/components/social/VkProvider.d.ts +0 -8
- package/components/social/VkProvider.js +0 -128
- package/components/social/index.d.ts +0 -11
- package/components/social/index.js +0 -15
- package/hoc/application.d.ts +0 -8
- package/hoc/application.js +0 -46
- package/hoc/bem.d.ts +0 -14
- package/hoc/bem.js +0 -38
- package/hoc/components.d.ts +0 -11
- package/hoc/components.js +0 -58
- package/hoc/connect.d.ts +0 -6
- package/hoc/connect.js +0 -3
- package/hoc/fetch.d.ts +0 -13
- package/hoc/fetch.js +0 -56
- package/hoc/file.d.ts +0 -23
- package/hoc/file.js +0 -41
- package/hoc/http.d.ts +0 -7
- package/hoc/http.js +0 -49
- package/hoc/index.d.ts +0 -8
- package/hoc/index.js +0 -20
- package/hoc/layout.d.ts +0 -31
- package/hoc/layout.js +0 -44
- package/hooks/index.d.ts +0 -7
- package/hooks/index.js +0 -18
- package/hooks/useAddressBar.d.ts +0 -23
- package/hooks/useAddressBar.js +0 -127
- package/hooks/useApplication.d.ts +0 -33
- package/hooks/useApplication.js +0 -119
- package/hooks/useBem.d.ts +0 -10
- package/hooks/useBem.js +0 -14
- package/hooks/useComponents.d.ts +0 -14
- package/hooks/useComponents.js +0 -12
- package/hooks/useDataProvider.d.ts +0 -92
- package/hooks/useDataProvider.js +0 -144
- package/hooks/useDataSelect.d.ts +0 -42
- package/hooks/useDataSelect.js +0 -155
- package/hooks/useDispatch.d.ts +0 -1
- package/hooks/useDispatch.js +0 -7
- package/hooks/useFetch.d.ts +0 -30
- package/hooks/useFetch.js +0 -147
- package/hooks/useFile.d.ts +0 -2
- package/hooks/useFile.js +0 -194
- package/hooks/useForm.d.ts +0 -8
- package/hooks/useForm.js +0 -18
- package/hooks/useInitial.d.ts +0 -1
- package/hooks/useInitial.js +0 -11
- package/hooks/useLayout.d.ts +0 -12
- package/hooks/useLayout.js +0 -127
- package/hooks/useList.d.ts +0 -155
- package/hooks/useList.js +0 -238
- package/hooks/useModel.d.ts +0 -2
- package/hooks/useModel.js +0 -16
- package/hooks/useSelector.d.ts +0 -1
- package/hooks/useSelector.js +0 -7
- package/hooks/useUniqueId.d.ts +0 -1
- package/hooks/useUniqueId.js +0 -15
- package/reducers/auth.d.ts +0 -21
- package/reducers/auth.js +0 -61
- package/reducers/fields.d.ts +0 -11
- package/reducers/fields.js +0 -55
- package/reducers/form.d.ts +0 -9
- package/reducers/form.js +0 -66
- package/reducers/index.d.ts +0 -13
- package/reducers/index.js +0 -41
- package/reducers/list.d.ts +0 -12
- package/reducers/list.js +0 -143
- package/reducers/modal.d.ts +0 -12
- package/reducers/modal.js +0 -78
- package/reducers/notifications.d.ts +0 -10
- package/reducers/notifications.js +0 -44
- package/reducers/router.d.ts +0 -62
- package/reducers/router.js +0 -221
- package/reducers/screen.d.ts +0 -26
- package/reducers/screen.js +0 -54
- package/ui/crud/Crud/Crud.d.ts +0 -85
- package/ui/crud/Crud/Crud.js +0 -359
- package/ui/crud/Crud/CrudDetail.d.ts +0 -2
- package/ui/crud/Crud/CrudDetail.js +0 -14
- package/ui/crud/Crud/CrudForm.d.ts +0 -3
- package/ui/crud/Crud/CrudForm.js +0 -49
- package/ui/crud/Crud/CrudGrid.d.ts +0 -3
- package/ui/crud/Crud/CrudGrid.js +0 -46
- package/ui/crud/Crud/demo/default.d.ts +0 -8
- package/ui/crud/Crud/demo/default.js +0 -72
- package/ui/crud/Crud/index.js +0 -7
- package/ui/crud/index.d.ts +0 -31
- package/ui/crud/index.js +0 -29
- package/ui/form/AutoCompleteField/AutoCompleteField.d.ts +0 -44
- package/ui/form/AutoCompleteField/AutoCompleteField.js +0 -109
- package/ui/form/AutoCompleteField/demo/basic.d.ts +0 -12
- package/ui/form/AutoCompleteField/demo/basic.js +0 -48
- package/ui/form/AutoCompleteField/demo/disabled.d.ts +0 -8
- package/ui/form/AutoCompleteField/demo/disabled.js +0 -34
- package/ui/form/AutoCompleteField/demo/errors.d.ts +0 -3
- package/ui/form/AutoCompleteField/demo/errors.js +0 -29
- package/ui/form/AutoCompleteField/demo/placeholder.d.ts +0 -8
- package/ui/form/AutoCompleteField/demo/placeholder.js +0 -34
- package/ui/form/AutoCompleteField/demo/required.d.ts +0 -8
- package/ui/form/AutoCompleteField/demo/required.js +0 -34
- package/ui/form/AutoCompleteField/demo/sizes.d.ts +0 -8
- package/ui/form/AutoCompleteField/demo/sizes.js +0 -39
- package/ui/form/AutoCompleteField/index.js +0 -7
- package/ui/form/BlankField/BlankField.d.ts +0 -8
- package/ui/form/BlankField/BlankField.js +0 -30
- package/ui/form/BlankField/index.js +0 -7
- package/ui/form/Button/Button.d.ts +0 -190
- package/ui/form/Button/Button.js +0 -146
- package/ui/form/Button/demo/badge.d.ts +0 -8
- package/ui/form/Button/demo/badge.js +0 -33
- package/ui/form/Button/demo/block.d.ts +0 -8
- package/ui/form/Button/demo/block.js +0 -33
- package/ui/form/Button/demo/colors.d.ts +0 -8
- package/ui/form/Button/demo/colors.js +0 -45
- package/ui/form/Button/demo/disabled.d.ts +0 -8
- package/ui/form/Button/demo/disabled.js +0 -33
- package/ui/form/Button/demo/icon.d.ts +0 -8
- package/ui/form/Button/demo/icon.js +0 -33
- package/ui/form/Button/demo/link.d.ts +0 -8
- package/ui/form/Button/demo/link.js +0 -33
- package/ui/form/Button/demo/sizes.d.ts +0 -8
- package/ui/form/Button/demo/sizes.js +0 -37
- package/ui/form/Button/demo/tags.d.ts +0 -8
- package/ui/form/Button/demo/tags.js +0 -34
- package/ui/form/Button/index.d.ts +0 -1
- package/ui/form/Button/index.js +0 -12
- package/ui/form/CheckboxField/CheckboxField.d.ts +0 -39
- package/ui/form/CheckboxField/CheckboxField.js +0 -37
- package/ui/form/CheckboxField/demo/basic.d.ts +0 -8
- package/ui/form/CheckboxField/demo/basic.js +0 -33
- package/ui/form/CheckboxField/demo/disabled.d.ts +0 -8
- package/ui/form/CheckboxField/demo/disabled.js +0 -33
- package/ui/form/CheckboxField/demo/errors.d.ts +0 -8
- package/ui/form/CheckboxField/demo/errors.js +0 -33
- package/ui/form/CheckboxField/demo/required.d.ts +0 -8
- package/ui/form/CheckboxField/demo/required.js +0 -33
- package/ui/form/CheckboxField/index.js +0 -7
- package/ui/form/CheckboxListField/CheckboxListField.d.ts +0 -49
- package/ui/form/CheckboxListField/CheckboxListField.js +0 -57
- package/ui/form/CheckboxListField/demo/basic.d.ts +0 -9
- package/ui/form/CheckboxListField/demo/basic.js +0 -39
- package/ui/form/CheckboxListField/demo/disabled.d.ts +0 -8
- package/ui/form/CheckboxListField/demo/disabled.js +0 -34
- package/ui/form/CheckboxListField/demo/errors.d.ts +0 -3
- package/ui/form/CheckboxListField/demo/errors.js +0 -29
- package/ui/form/CheckboxListField/demo/required.d.ts +0 -3
- package/ui/form/CheckboxListField/demo/required.js +0 -29
- package/ui/form/CheckboxListField/index.js +0 -7
- package/ui/form/DateField/DateField.d.ts +0 -61
- package/ui/form/DateField/DateField.js +0 -84
- package/ui/form/DateField/demo/basic.d.ts +0 -3
- package/ui/form/DateField/demo/basic.js +0 -28
- package/ui/form/DateField/demo/disabled.d.ts +0 -3
- package/ui/form/DateField/demo/disabled.js +0 -28
- package/ui/form/DateField/demo/errors.d.ts +0 -3
- package/ui/form/DateField/demo/errors.js +0 -28
- package/ui/form/DateField/demo/icon.d.ts +0 -3
- package/ui/form/DateField/demo/icon.js +0 -30
- package/ui/form/DateField/demo/placeholder.d.ts +0 -3
- package/ui/form/DateField/demo/placeholder.js +0 -28
- package/ui/form/DateField/demo/required.d.ts +0 -3
- package/ui/form/DateField/demo/required.js +0 -28
- package/ui/form/DateField/demo/sizes.d.ts +0 -3
- package/ui/form/DateField/demo/sizes.js +0 -34
- package/ui/form/DateField/index.js +0 -7
- package/ui/form/DateTimeField/DateTimeField.d.ts +0 -59
- package/ui/form/DateTimeField/DateTimeField.js +0 -103
- package/ui/form/DateTimeField/demo/basic.d.ts +0 -3
- package/ui/form/DateTimeField/demo/basic.js +0 -28
- package/ui/form/DateTimeField/demo/disabled.d.ts +0 -3
- package/ui/form/DateTimeField/demo/disabled.js +0 -29
- package/ui/form/DateTimeField/demo/errors.d.ts +0 -3
- package/ui/form/DateTimeField/demo/errors.js +0 -28
- package/ui/form/DateTimeField/demo/icon.d.ts +0 -3
- package/ui/form/DateTimeField/demo/icon.js +0 -30
- package/ui/form/DateTimeField/demo/placeholder.d.ts +0 -3
- package/ui/form/DateTimeField/demo/placeholder.js +0 -32
- package/ui/form/DateTimeField/demo/required.d.ts +0 -3
- package/ui/form/DateTimeField/demo/required.js +0 -28
- package/ui/form/DateTimeField/demo/sizes.d.ts +0 -3
- package/ui/form/DateTimeField/demo/sizes.js +0 -34
- package/ui/form/DateTimeField/index.js +0 -7
- package/ui/form/DropDownField/DropDownField.d.ts +0 -73
- package/ui/form/DropDownField/DropDownField.js +0 -108
- package/ui/form/DropDownField/demo/auto-complete.d.ts +0 -3
- package/ui/form/DropDownField/demo/auto-complete.js +0 -29
- package/ui/form/DropDownField/demo/basic.d.ts +0 -7
- package/ui/form/DropDownField/demo/basic.js +0 -47
- package/ui/form/DropDownField/demo/disabled.d.ts +0 -3
- package/ui/form/DropDownField/demo/disabled.js +0 -29
- package/ui/form/DropDownField/demo/errors.d.ts +0 -3
- package/ui/form/DropDownField/demo/errors.js +0 -29
- package/ui/form/DropDownField/demo/multiple.d.ts +0 -3
- package/ui/form/DropDownField/demo/multiple.js +0 -29
- package/ui/form/DropDownField/demo/no-border.d.ts +0 -3
- package/ui/form/DropDownField/demo/no-border.js +0 -29
- package/ui/form/DropDownField/demo/placeholder.d.ts +0 -3
- package/ui/form/DropDownField/demo/placeholder.js +0 -29
- package/ui/form/DropDownField/demo/required.d.ts +0 -3
- package/ui/form/DropDownField/demo/required.js +0 -29
- package/ui/form/DropDownField/demo/show-reset.d.ts +0 -3
- package/ui/form/DropDownField/demo/show-reset.js +0 -29
- package/ui/form/DropDownField/demo/size.d.ts +0 -3
- package/ui/form/DropDownField/demo/size.js +0 -36
- package/ui/form/DropDownField/index.js +0 -7
- package/ui/form/Field/Field.d.ts +0 -27
- package/ui/form/Field/Field.js +0 -66
- package/ui/form/Field/fieldWrapper.d.ts +0 -81
- package/ui/form/Field/fieldWrapper.js +0 -106
- package/ui/form/Field/index.js +0 -7
- package/ui/form/FieldLayout/FieldLayout.d.ts +0 -56
- package/ui/form/FieldLayout/FieldLayout.js +0 -57
- package/ui/form/FieldLayout/demo/default.d.ts +0 -3
- package/ui/form/FieldLayout/demo/default.js +0 -28
- package/ui/form/FieldLayout/demo/errors.d.ts +0 -3
- package/ui/form/FieldLayout/demo/errors.js +0 -28
- package/ui/form/FieldLayout/demo/hint.d.ts +0 -3
- package/ui/form/FieldLayout/demo/hint.js +0 -28
- package/ui/form/FieldLayout/demo/horizontal.d.ts +0 -3
- package/ui/form/FieldLayout/demo/horizontal.js +0 -28
- package/ui/form/FieldLayout/demo/inline.d.ts +0 -3
- package/ui/form/FieldLayout/demo/inline.js +0 -29
- package/ui/form/FieldLayout/demo/required.d.ts +0 -3
- package/ui/form/FieldLayout/demo/required.js +0 -28
- package/ui/form/FieldLayout/index.js +0 -7
- package/ui/form/FieldList/FieldList.d.ts +0 -127
- package/ui/form/FieldList/FieldList.js +0 -112
- package/ui/form/FieldList/demo/basic.d.ts +0 -3
- package/ui/form/FieldList/demo/basic.js +0 -53
- package/ui/form/FieldList/index.js +0 -7
- package/ui/form/FieldList/tableNavigationHandler.d.ts +0 -3
- package/ui/form/FieldList/tableNavigationHandler.js +0 -48
- package/ui/form/FieldSet/FieldSet.d.ts +0 -37
- package/ui/form/FieldSet/FieldSet.js +0 -88
- package/ui/form/FieldSet/demo/basic.d.ts +0 -3
- package/ui/form/FieldSet/demo/basic.js +0 -44
- package/ui/form/FieldSet/index.js +0 -7
- package/ui/form/FileField/FileField.d.ts +0 -96
- package/ui/form/FileField/FileField.js +0 -108
- package/ui/form/FileField/index.js +0 -7
- package/ui/form/Form/AutoSaveHelper.d.ts +0 -6
- package/ui/form/Form/AutoSaveHelper.js +0 -37
- package/ui/form/Form/Form.d.ts +0 -173
- package/ui/form/Form/Form.js +0 -273
- package/ui/form/Form/SyncAddressBarHelper.d.ts +0 -13
- package/ui/form/Form/SyncAddressBarHelper.js +0 -119
- package/ui/form/Form/demo/basic.d.ts +0 -3
- package/ui/form/Form/demo/basic.js +0 -53
- package/ui/form/Form/index.js +0 -7
- package/ui/form/HtmlField/HtmlField.d.ts +0 -52
- package/ui/form/HtmlField/HtmlField.js +0 -57
- package/ui/form/HtmlField/demo/basic.d.ts +0 -3
- package/ui/form/HtmlField/demo/basic.js +0 -28
- package/ui/form/HtmlField/index.js +0 -7
- package/ui/form/InputField/InputField.d.ts +0 -95
- package/ui/form/InputField/InputField.js +0 -64
- package/ui/form/InputField/demo/addons.d.ts +0 -8
- package/ui/form/InputField/demo/addons.js +0 -33
- package/ui/form/InputField/demo/basic.d.ts +0 -8
- package/ui/form/InputField/demo/basic.js +0 -33
- package/ui/form/InputField/demo/disabled.d.ts +0 -8
- package/ui/form/InputField/demo/disabled.js +0 -33
- package/ui/form/InputField/demo/errors.d.ts +0 -8
- package/ui/form/InputField/demo/errors.js +0 -33
- package/ui/form/InputField/demo/mask.d.ts +0 -8
- package/ui/form/InputField/demo/mask.js +0 -35
- package/ui/form/InputField/demo/placeholder.d.ts +0 -8
- package/ui/form/InputField/demo/placeholder.js +0 -33
- package/ui/form/InputField/demo/required.d.ts +0 -8
- package/ui/form/InputField/demo/required.js +0 -33
- package/ui/form/InputField/demo/sizes.d.ts +0 -8
- package/ui/form/InputField/demo/sizes.js +0 -38
- package/ui/form/InputField/demo/textAddons.d.ts +0 -8
- package/ui/form/InputField/demo/textAddons.js +0 -33
- package/ui/form/InputField/demo/types.d.ts +0 -8
- package/ui/form/InputField/demo/types.js +0 -40
- package/ui/form/InputField/index.js +0 -7
- package/ui/form/NavField/NavField.d.ts +0 -21
- package/ui/form/NavField/NavField.js +0 -48
- package/ui/form/NavField/demo/basic.d.ts +0 -7
- package/ui/form/NavField/demo/basic.js +0 -47
- package/ui/form/NavField/demo/disabled.d.ts +0 -3
- package/ui/form/NavField/demo/disabled.js +0 -29
- package/ui/form/NavField/demo/errors.d.ts +0 -3
- package/ui/form/NavField/demo/errors.js +0 -29
- package/ui/form/NavField/demo/required.d.ts +0 -3
- package/ui/form/NavField/demo/required.js +0 -29
- package/ui/form/NavField/index.js +0 -7
- package/ui/form/NumberField/NumberField.d.ts +0 -45
- package/ui/form/NumberField/NumberField.js +0 -35
- package/ui/form/NumberField/demo/basic.d.ts +0 -8
- package/ui/form/NumberField/demo/basic.js +0 -33
- package/ui/form/NumberField/demo/disabled.d.ts +0 -8
- package/ui/form/NumberField/demo/disabled.js +0 -33
- package/ui/form/NumberField/demo/errors.d.ts +0 -8
- package/ui/form/NumberField/demo/errors.js +0 -33
- package/ui/form/NumberField/demo/placeholder.d.ts +0 -8
- package/ui/form/NumberField/demo/placeholder.js +0 -33
- package/ui/form/NumberField/demo/required.d.ts +0 -8
- package/ui/form/NumberField/demo/required.js +0 -33
- package/ui/form/NumberField/demo/sizes.d.ts +0 -8
- package/ui/form/NumberField/demo/sizes.js +0 -38
- package/ui/form/NumberField/index.js +0 -7
- package/ui/form/PasswordField/PasswordField.d.ts +0 -39
- package/ui/form/PasswordField/PasswordField.js +0 -66
- package/ui/form/PasswordField/demo/basic.d.ts +0 -8
- package/ui/form/PasswordField/demo/basic.js +0 -33
- package/ui/form/PasswordField/demo/disabled.d.ts +0 -8
- package/ui/form/PasswordField/demo/disabled.js +0 -33
- package/ui/form/PasswordField/demo/errors.d.ts +0 -8
- package/ui/form/PasswordField/demo/errors.js +0 -33
- package/ui/form/PasswordField/demo/placeholder.d.ts +0 -8
- package/ui/form/PasswordField/demo/placeholder.js +0 -33
- package/ui/form/PasswordField/demo/required.d.ts +0 -8
- package/ui/form/PasswordField/demo/required.js +0 -33
- package/ui/form/PasswordField/demo/security.d.ts +0 -8
- package/ui/form/PasswordField/demo/security.js +0 -33
- package/ui/form/PasswordField/demo/sizes.d.ts +0 -8
- package/ui/form/PasswordField/demo/sizes.js +0 -38
- package/ui/form/PasswordField/index.js +0 -7
- package/ui/form/RadioListField/RadioListField.d.ts +0 -47
- package/ui/form/RadioListField/RadioListField.js +0 -50
- package/ui/form/RadioListField/demo/basic.d.ts +0 -7
- package/ui/form/RadioListField/demo/basic.js +0 -47
- package/ui/form/RadioListField/demo/disabled.d.ts +0 -3
- package/ui/form/RadioListField/demo/disabled.js +0 -29
- package/ui/form/RadioListField/demo/errors.d.ts +0 -3
- package/ui/form/RadioListField/demo/errors.js +0 -29
- package/ui/form/RadioListField/demo/required.d.ts +0 -3
- package/ui/form/RadioListField/demo/required.js +0 -29
- package/ui/form/RadioListField/index.js +0 -7
- package/ui/form/RateField/RateField.d.ts +0 -32
- package/ui/form/RateField/RateField.js +0 -50
- package/ui/form/RateField/demo/base.d.ts +0 -3
- package/ui/form/RateField/demo/base.js +0 -28
- package/ui/form/RateField/index.d.ts +0 -2
- package/ui/form/RateField/index.js +0 -7
- package/ui/form/ReCaptchaField/ReCaptchaField.d.ts +0 -20
- package/ui/form/ReCaptchaField/ReCaptchaField.js +0 -31
- package/ui/form/ReCaptchaField/index.js +0 -7
- package/ui/form/SliderField/SliderField.d.ts +0 -48
- package/ui/form/SliderField/SliderField.js +0 -45
- package/ui/form/SliderField/demo/basic.d.ts +0 -3
- package/ui/form/SliderField/demo/basic.js +0 -28
- package/ui/form/SliderField/demo/disabled.d.ts +0 -3
- package/ui/form/SliderField/demo/disabled.js +0 -28
- package/ui/form/SliderField/demo/errors.d.ts +0 -3
- package/ui/form/SliderField/demo/errors.js +0 -28
- package/ui/form/SliderField/demo/required.d.ts +0 -3
- package/ui/form/SliderField/demo/required.js +0 -28
- package/ui/form/SliderField/demo/size.d.ts +0 -3
- package/ui/form/SliderField/demo/size.js +0 -33
- package/ui/form/SliderField/index.js +0 -7
- package/ui/form/SwitcherField/SwitcherField.d.ts +0 -38
- package/ui/form/SwitcherField/SwitcherField.js +0 -62
- package/ui/form/SwitcherField/demo/basic.d.ts +0 -7
- package/ui/form/SwitcherField/demo/basic.js +0 -47
- package/ui/form/SwitcherField/demo/disabled.d.ts +0 -3
- package/ui/form/SwitcherField/demo/disabled.js +0 -29
- package/ui/form/SwitcherField/demo/errors.d.ts +0 -3
- package/ui/form/SwitcherField/demo/errors.js +0 -29
- package/ui/form/SwitcherField/demo/required.d.ts +0 -3
- package/ui/form/SwitcherField/demo/required.js +0 -29
- package/ui/form/SwitcherField/demo/sizes.d.ts +0 -3
- package/ui/form/SwitcherField/demo/sizes.js +0 -35
- package/ui/form/SwitcherField/index.js +0 -7
- package/ui/form/TextField/TextField.d.ts +0 -50
- package/ui/form/TextField/TextField.js +0 -48
- package/ui/form/TextField/demo/basic.d.ts +0 -3
- package/ui/form/TextField/demo/basic.js +0 -28
- package/ui/form/TextField/demo/disabled.d.ts +0 -3
- package/ui/form/TextField/demo/disabled.js +0 -28
- package/ui/form/TextField/demo/errors.d.ts +0 -3
- package/ui/form/TextField/demo/errors.js +0 -28
- package/ui/form/TextField/demo/placeholder.d.ts +0 -3
- package/ui/form/TextField/demo/placeholder.js +0 -28
- package/ui/form/TextField/demo/required.d.ts +0 -3
- package/ui/form/TextField/demo/required.js +0 -28
- package/ui/form/TextField/demo/sizes.d.ts +0 -3
- package/ui/form/TextField/demo/sizes.js +0 -33
- package/ui/form/TextField/demo/submit.d.ts +0 -3
- package/ui/form/TextField/demo/submit.js +0 -28
- package/ui/form/TextField/index.js +0 -7
- package/ui/form/TimeField/TimeField.d.ts +0 -70
- package/ui/form/TimeField/TimeField.js +0 -123
- package/ui/form/TimeField/demo/basic.d.ts +0 -3
- package/ui/form/TimeField/demo/basic.js +0 -28
- package/ui/form/TimeField/demo/disabled.d.ts +0 -3
- package/ui/form/TimeField/demo/disabled.js +0 -28
- package/ui/form/TimeField/demo/errors.d.ts +0 -3
- package/ui/form/TimeField/demo/errors.js +0 -28
- package/ui/form/TimeField/demo/placeholder.d.ts +0 -3
- package/ui/form/TimeField/demo/placeholder.js +0 -28
- package/ui/form/TimeField/demo/required.d.ts +0 -3
- package/ui/form/TimeField/demo/required.js +0 -28
- package/ui/form/TimeField/demo/sizes.d.ts +0 -3
- package/ui/form/TimeField/demo/sizes.js +0 -33
- package/ui/form/TimeField/index.js +0 -7
- package/ui/form/index.d.ts +0 -84
- package/ui/form/index.js +0 -74
- package/ui/form/validate.d.ts +0 -5
- package/ui/form/validate.js +0 -97
- package/ui/format/BooleanFormatter/BooleanFormatter.d.ts +0 -11
- package/ui/format/BooleanFormatter/BooleanFormatter.js +0 -9
- package/ui/format/BooleanFormatter/index.js +0 -7
- package/ui/format/DateFormatter/DateFormatter.d.ts +0 -15
- package/ui/format/DateFormatter/DateFormatter.js +0 -16
- package/ui/format/DateFormatter/demo/basic.d.ts +0 -3
- package/ui/format/DateFormatter/demo/basic.js +0 -28
- package/ui/format/DateFormatter/index.js +0 -7
- package/ui/format/DateTimeFormatter/DateTimeFormatter.d.ts +0 -27
- package/ui/format/DateTimeFormatter/DateTimeFormatter.js +0 -23
- package/ui/format/DateTimeFormatter/demo/basic.d.ts +0 -3
- package/ui/format/DateTimeFormatter/demo/basic.js +0 -28
- package/ui/format/DateTimeFormatter/index.js +0 -7
- package/ui/format/EnumFormatter/EnumFormatter.d.ts +0 -23
- package/ui/format/EnumFormatter/EnumFormatter.js +0 -36
- package/ui/format/EnumFormatter/index.js +0 -7
- package/ui/format/FileSize/FileSize.d.ts +0 -17
- package/ui/format/FileSize/FileSize.js +0 -36
- package/ui/format/FileSize/index.js +0 -7
- package/ui/format/Format/Format.d.ts +0 -12
- package/ui/format/Format/Format.js +0 -49
- package/ui/format/Format/index.js +0 -7
- package/ui/format/MoneyFormatter/MoneyFormatter.d.ts +0 -29
- package/ui/format/MoneyFormatter/MoneyFormatter.js +0 -33
- package/ui/format/MoneyFormatter/index.js +0 -7
- package/ui/format/index.d.ts +0 -16
- package/ui/format/index.js +0 -26
- package/ui/icon/Icon/Icon.d.ts +0 -46
- package/ui/icon/Icon/Icon.js +0 -47
- package/ui/icon/Icon/index.d.ts +0 -2
- package/ui/icon/Icon/index.js +0 -7
- package/ui/layout/Header/Header.d.ts +0 -23
- package/ui/layout/Header/Header.js +0 -7
- package/ui/layout/Header/index.js +0 -7
- package/ui/layout/Loader/Loader.d.ts +0 -5
- package/ui/layout/Loader/Loader.js +0 -7
- package/ui/layout/Loader/index.js +0 -7
- package/ui/layout/Notifications/Notifications.d.ts +0 -45
- package/ui/layout/Notifications/Notifications.js +0 -86
- package/ui/layout/Notifications/index.js +0 -7
- package/ui/layout/Portal.d.ts +0 -1
- package/ui/layout/Portal.js +0 -26
- package/ui/layout/Tooltip/Tooltip.d.ts +0 -63
- package/ui/layout/Tooltip/Tooltip.js +0 -114
- package/ui/layout/Tooltip/TooltipPortalInner.d.ts +0 -6
- package/ui/layout/Tooltip/TooltipPortalInner.js +0 -64
- package/ui/layout/Tooltip/calculate.d.ts +0 -6
- package/ui/layout/Tooltip/calculate.js +0 -162
- package/ui/layout/Tooltip/demo/basic.d.ts +0 -3
- package/ui/layout/Tooltip/demo/basic.js +0 -41
- package/ui/layout/Tooltip/index.js +0 -7
- package/ui/layout/index.d.ts +0 -5
- package/ui/layout/index.js +0 -14
- package/ui/list/CheckboxColumn/CheckboxColumn.d.ts +0 -36
- package/ui/list/CheckboxColumn/CheckboxColumn.js +0 -34
- package/ui/list/CheckboxColumn/demo/basic.d.ts +0 -8
- package/ui/list/CheckboxColumn/demo/basic.js +0 -43
- package/ui/list/CheckboxColumn/index.js +0 -7
- package/ui/list/ControlsColumn/ControlsColumn.d.ts +0 -37
- package/ui/list/ControlsColumn/ControlsColumn.js +0 -30
- package/ui/list/ControlsColumn/demo/basic.d.ts +0 -8
- package/ui/list/ControlsColumn/demo/basic.js +0 -36
- package/ui/list/ControlsColumn/index.js +0 -7
- package/ui/list/Empty/Empty.d.ts +0 -38
- package/ui/list/Empty/Empty.js +0 -54
- package/ui/list/Empty/demo/basic.d.ts +0 -3
- package/ui/list/Empty/demo/basic.js +0 -28
- package/ui/list/Empty/demo/custom-text.d.ts +0 -3
- package/ui/list/Empty/demo/custom-text.js +0 -28
- package/ui/list/Empty/index.js +0 -7
- package/ui/list/Grid/Grid.d.ts +0 -108
- package/ui/list/Grid/Grid.js +0 -123
- package/ui/list/Grid/demo/basic.d.ts +0 -18
- package/ui/list/Grid/demo/basic.js +0 -68
- package/ui/list/Grid/demo/controls.d.ts +0 -8
- package/ui/list/Grid/demo/controls.js +0 -40
- package/ui/list/Grid/demo/empty.d.ts +0 -8
- package/ui/list/Grid/demo/empty.js +0 -34
- package/ui/list/Grid/demo/formatter.d.ts +0 -8
- package/ui/list/Grid/demo/formatter.js +0 -63
- package/ui/list/Grid/demo/indexing.d.ts +0 -8
- package/ui/list/Grid/demo/indexing.js +0 -48
- package/ui/list/Grid/demo/inner-search-form.d.ts +0 -21
- package/ui/list/Grid/demo/inner-search-form.js +0 -56
- package/ui/list/Grid/demo/load-more.d.ts +0 -8
- package/ui/list/Grid/demo/load-more.js +0 -39
- package/ui/list/Grid/demo/pagination.d.ts +0 -8
- package/ui/list/Grid/demo/pagination.js +0 -37
- package/ui/list/Grid/demo/search-form.d.ts +0 -8
- package/ui/list/Grid/demo/search-form.js +0 -46
- package/ui/list/Grid/demo/sort.d.ts +0 -8
- package/ui/list/Grid/demo/sort.js +0 -44
- package/ui/list/Grid/demo/visible.d.ts +0 -8
- package/ui/list/Grid/demo/visible.js +0 -48
- package/ui/list/Grid/index.js +0 -7
- package/ui/list/LayoutNames/LayoutNames.d.ts +0 -58
- package/ui/list/LayoutNames/LayoutNames.js +0 -68
- package/ui/list/LayoutNames/demo/basic.d.ts +0 -7
- package/ui/list/LayoutNames/demo/basic.js +0 -12
- package/ui/list/LayoutNames/index.d.ts +0 -2
- package/ui/list/LayoutNames/index.js +0 -7
- package/ui/list/List/List.d.ts +0 -47
- package/ui/list/List/List.js +0 -82
- package/ui/list/List/demo/basic.d.ts +0 -12
- package/ui/list/List/demo/basic.js +0 -57
- package/ui/list/List/demo/condition.d.ts +0 -8
- package/ui/list/List/demo/condition.js +0 -86
- package/ui/list/List/demo/empty.d.ts +0 -8
- package/ui/list/List/demo/empty.js +0 -32
- package/ui/list/List/demo/layout.d.ts +0 -8
- package/ui/list/List/demo/layout.js +0 -45
- package/ui/list/List/demo/load-more.d.ts +0 -8
- package/ui/list/List/demo/load-more.js +0 -41
- package/ui/list/List/demo/pagination.d.ts +0 -8
- package/ui/list/List/demo/pagination.js +0 -41
- package/ui/list/List/demo/search-form.d.ts +0 -30
- package/ui/list/List/demo/search-form.js +0 -103
- package/ui/list/List/demo/sort.d.ts +0 -17
- package/ui/list/List/demo/sort.js +0 -88
- package/ui/list/List/index.js +0 -7
- package/ui/list/Pagination/Pagination.d.ts +0 -86
- package/ui/list/Pagination/Pagination.js +0 -120
- package/ui/list/Pagination/demo/basic.d.ts +0 -3
- package/ui/list/Pagination/demo/basic.js +0 -36
- package/ui/list/Pagination/demo/load-more.d.ts +0 -3
- package/ui/list/Pagination/demo/load-more.js +0 -33
- package/ui/list/Pagination/demo/sizes.d.ts +0 -3
- package/ui/list/Pagination/demo/sizes.js +0 -38
- package/ui/list/Pagination/index.js +0 -7
- package/ui/list/PaginationSize/PaginationSize.d.ts +0 -69
- package/ui/list/PaginationSize/PaginationSize.js +0 -76
- package/ui/list/PaginationSize/demo/basic.d.ts +0 -3
- package/ui/list/PaginationSize/demo/basic.js +0 -32
- package/ui/list/PaginationSize/demo/size.d.ts +0 -3
- package/ui/list/PaginationSize/demo/size.js +0 -40
- package/ui/list/PaginationSize/index.js +0 -7
- package/ui/list/SearchForm/SearchForm.d.ts +0 -13
- package/ui/list/SearchForm/SearchForm.js +0 -55
- package/ui/list/SearchForm/demo/basic.d.ts +0 -8
- package/ui/list/SearchForm/demo/basic.js +0 -35
- package/ui/list/SearchForm/index.d.ts +0 -2
- package/ui/list/SearchForm/index.js +0 -7
- package/ui/modal/Modal/Modal.d.ts +0 -74
- package/ui/modal/Modal/Modal.js +0 -44
- package/ui/modal/Modal/demo/basic.d.ts +0 -8
- package/ui/modal/Modal/demo/basic.js +0 -60
- package/ui/modal/Modal/index.js +0 -7
- package/ui/modal/ModalPortal/ModalPortal.d.ts +0 -12
- package/ui/modal/ModalPortal/ModalPortal.js +0 -77
- package/ui/modal/ModalPortal/index.js +0 -7
- package/ui/modal/TwoFactorModal/TwoFactorModal.d.ts +0 -22
- package/ui/modal/TwoFactorModal/TwoFactorModal.js +0 -56
- package/ui/modal/TwoFactorModal/index.js +0 -7
- package/ui/nav/Breadcrumbs/Breadcrumbs.d.ts +0 -9
- package/ui/nav/Breadcrumbs/Breadcrumbs.js +0 -22
- package/ui/nav/Breadcrumbs/index.js +0 -7
- package/ui/nav/Controls/Controls.d.ts +0 -38
- package/ui/nav/Controls/Controls.js +0 -55
- package/ui/nav/Controls/index.js +0 -7
- package/ui/nav/Link/Link.d.ts +0 -7
- package/ui/nav/Link/Link.js +0 -41
- package/ui/nav/Link/index.js +0 -7
- package/ui/nav/Nav/Nav.d.ts +0 -106
- package/ui/nav/Nav/Nav.js +0 -104
- package/ui/nav/Nav/demo/basic.d.ts +0 -3
- package/ui/nav/Nav/demo/basic.js +0 -29
- package/ui/nav/Nav/demo/buttons.d.ts +0 -8
- package/ui/nav/Nav/demo/buttons.js +0 -50
- package/ui/nav/Nav/demo/links.d.ts +0 -3
- package/ui/nav/Nav/demo/links.js +0 -30
- package/ui/nav/Nav/demo/navbar.d.ts +0 -3
- package/ui/nav/Nav/demo/navbar.js +0 -46
- package/ui/nav/Nav/demo/tabs.d.ts +0 -3
- package/ui/nav/Nav/demo/tabs.js +0 -30
- package/ui/nav/Nav/index.js +0 -7
- package/ui/nav/Router/ConnectedRouter.d.ts +0 -14
- package/ui/nav/Router/ConnectedRouter.js +0 -103
- package/ui/nav/Router/Router.d.ts +0 -49
- package/ui/nav/Router/Router.js +0 -224
- package/ui/nav/Router/SsrProvider.d.ts +0 -15
- package/ui/nav/Router/SsrProvider.js +0 -55
- package/ui/nav/Router/index.js +0 -7
- package/ui/nav/Tree/Tree.d.ts +0 -43
- package/ui/nav/Tree/Tree.js +0 -168
- package/ui/nav/Tree/demo/level-tree-routes.d.ts +0 -3
- package/ui/nav/Tree/demo/level-tree-routes.js +0 -28
- package/ui/nav/Tree/demo/level-tree.d.ts +0 -3
- package/ui/nav/Tree/demo/level-tree.js +0 -61
- package/ui/nav/Tree/index.js +0 -7
- package/ui/nav/index.js +0 -14
- package/utils/collection.d.ts +0 -1
- package/utils/collection.js +0 -19
- package/utils/data.d.ts +0 -9
- package/utils/data.js +0 -159
- package/utils/form.d.ts +0 -39
- package/utils/form.js +0 -172
- package/utils/query.d.ts +0 -1
- package/utils/query.js +0 -46
- package/utils/text.d.ts +0 -1
- package/utils/text.js +0 -85
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const typedocModule = require('typedoc');
|
|
3
|
+
const _ = require('lodash');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const {getInfo, getProperty, typeToObject, typeToString} = require('./helpers');
|
|
6
|
+
|
|
7
|
+
const app = new typedocModule.Application();
|
|
8
|
+
const {inputFiles} = app.bootstrap({
|
|
9
|
+
ignoreCompilerErrors: true,
|
|
10
|
+
includeDeclarations: true,
|
|
11
|
+
excludeExternals: true,
|
|
12
|
+
inputFiles: [
|
|
13
|
+
path.resolve(__dirname, '../hoc'),
|
|
14
|
+
path.resolve(__dirname, '../ui'),
|
|
15
|
+
path.resolve(__dirname, '..'),
|
|
16
|
+
],
|
|
17
|
+
tsconfig: path.resolve(__dirname, '../tsconfig.json'),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const src = app.expandInputFiles(inputFiles);
|
|
21
|
+
//src.push(path.resolve(__dirname, '../index.d.ts'));filesMap
|
|
22
|
+
//console.log(src);
|
|
23
|
+
const project = app.convert(src);
|
|
24
|
+
const filesMap = {};
|
|
25
|
+
project.files.forEach(file => {
|
|
26
|
+
filesMap[file.fileName] = file.fullFileName;
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const json = project ? app.serializer.projectToObject(project) : null;
|
|
30
|
+
if (!json || app.logger.hasErrors()) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
fs.writeFileSync(path.resolve(__dirname, 'docs-autogen-raw.json'), JSON.stringify(json, null, ' '));
|
|
34
|
+
//const json = JSON.parse(require('fs').readFileSync(__dirname + '/docs-autogen-raw.json'));
|
|
35
|
+
|
|
36
|
+
// Store components by file path
|
|
37
|
+
const components = {};
|
|
38
|
+
json.children.forEach(moduleItem => {
|
|
39
|
+
if (moduleItem.kindString === 'Module' && moduleItem.flags && moduleItem.flags.isExported === true) {
|
|
40
|
+
(moduleItem.children || []).forEach(item => {
|
|
41
|
+
const moduleName = JSON.parse(moduleItem.name);
|
|
42
|
+
if (item.kindString === 'Class' && moduleItem.flags && moduleItem.flags.isExported === true) {
|
|
43
|
+
components[moduleName] = getInfo(filesMap, moduleItem, item);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Store docs
|
|
50
|
+
const docs = {
|
|
51
|
+
interfaces: {},
|
|
52
|
+
declarations: {},
|
|
53
|
+
demos: {},
|
|
54
|
+
components,
|
|
55
|
+
};
|
|
56
|
+
json.children.forEach(file => {
|
|
57
|
+
(file.children || []).forEach(item => {
|
|
58
|
+
if (item.flags && item.flags.isExported === true) {
|
|
59
|
+
if (item.kindString === 'Interface') {
|
|
60
|
+
docs.interfaces[item.name] = getInfo(filesMap, file, item);
|
|
61
|
+
}
|
|
62
|
+
if (item.kindString === 'Type alias') {
|
|
63
|
+
docs.declarations[item.name] = getProperty(item);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const demoMatch = file.name.match(/ui\/(.+)\/demo\/([^\/]+)\"$/);
|
|
69
|
+
if (demoMatch) {
|
|
70
|
+
const path = demoMatch[1].split('\/');
|
|
71
|
+
const name = demoMatch[2];
|
|
72
|
+
|
|
73
|
+
if (!file.children) {
|
|
74
|
+
let order = 0;
|
|
75
|
+
let col = null;
|
|
76
|
+
let description = null;
|
|
77
|
+
let title = null;
|
|
78
|
+
|
|
79
|
+
const fileContents = fs.readFileSync(file.originalName).toString();
|
|
80
|
+
|
|
81
|
+
const matchOrderTagPattern = /@order\s(.*)$/gmi;
|
|
82
|
+
const matchColTagPattern = /@col\s(.*)$/gmi;
|
|
83
|
+
const matchCommentPattern = /[^import]\s\*\s[^@](.*)/gmi;
|
|
84
|
+
|
|
85
|
+
const tagMatch = fileContents.match(matchOrderTagPattern);
|
|
86
|
+
if (tagMatch) {
|
|
87
|
+
order = tagMatch[0].replace('@order', '').trim();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const colMatch = fileContents.match(matchColTagPattern);
|
|
91
|
+
if (colMatch) {
|
|
92
|
+
col = colMatch[0].replace('@col', '').trim();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const commentMatch = fileContents.match(matchCommentPattern);
|
|
96
|
+
if (commentMatch) {
|
|
97
|
+
description = commentMatch.map(cm => cm.replace('*', '').trim()).join('\n')
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Store, if not empty
|
|
101
|
+
if (order > 0 || title || description) {
|
|
102
|
+
_.set(docs.demos, path.concat(name), {
|
|
103
|
+
order,
|
|
104
|
+
col,
|
|
105
|
+
title,
|
|
106
|
+
description,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Store title, ..
|
|
112
|
+
/*const {title, description, tags} = findClassDocs(file.children);
|
|
113
|
+
if (title || description) {
|
|
114
|
+
_.set(docs.demos, path.concat(name), {
|
|
115
|
+
order: _.toInteger(tags['order']),
|
|
116
|
+
col: _.toInteger(tags['col']),
|
|
117
|
+
title,
|
|
118
|
+
description,
|
|
119
|
+
});
|
|
120
|
+
}*/
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
fs.writeFileSync(path.resolve(__dirname, 'docs-autogen-result.json'), JSON.stringify(docs, null, ' '));
|
package/build/helpers.js
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const typedocModule = require('typedoc');
|
|
3
|
+
const _ = require('lodash');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
const typeToString = (type) => {
|
|
7
|
+
if (!type) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
switch (type.type) {
|
|
12
|
+
case 'intrinsic':
|
|
13
|
+
case 'reference':
|
|
14
|
+
case 'typeParameter':
|
|
15
|
+
case 'unknown':
|
|
16
|
+
return type.name;
|
|
17
|
+
|
|
18
|
+
case 'stringLiteral':
|
|
19
|
+
return JSON.stringify(type.value);
|
|
20
|
+
|
|
21
|
+
case 'array':
|
|
22
|
+
return typeToString(type.elementType) + '[]';
|
|
23
|
+
|
|
24
|
+
case 'tuple':
|
|
25
|
+
return (type.types || type.elements).map(subType => typeToString(subType)).join(', ');
|
|
26
|
+
|
|
27
|
+
case 'union':
|
|
28
|
+
return type.types.map(subType => typeToString(subType)).join(' | ');
|
|
29
|
+
|
|
30
|
+
case 'intersection':
|
|
31
|
+
if (type.types[0].name === 'Omit') {
|
|
32
|
+
return type.types[0].typeArguments[0].name;
|
|
33
|
+
}
|
|
34
|
+
return type.types.map(subType => typeToString(subType)).join(' & ');
|
|
35
|
+
|
|
36
|
+
case 'reflection':
|
|
37
|
+
return '{' + (type.declaration.children || []).map(d => d.name + ': ' + typeToString(d.type)).join(', ') + '}';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
throw new Error('Unknown type on convert to string: ' + JSON.stringify(type));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const typeToObject = type => {
|
|
44
|
+
if (!type) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
switch (type.kindString) {
|
|
49
|
+
case 'Property':
|
|
50
|
+
return typeToObject(type.type.declaration);
|
|
51
|
+
|
|
52
|
+
case 'Function':
|
|
53
|
+
return type.name + '()';
|
|
54
|
+
|
|
55
|
+
case 'Variable':
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(type.defaultValue);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
return type.defaultValue;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
case 'Type literal':
|
|
63
|
+
case 'Object literal':
|
|
64
|
+
const obj = {};
|
|
65
|
+
(type.children || []).forEach(item => {
|
|
66
|
+
obj[item.name] = typeToObject(item);
|
|
67
|
+
});
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
throw new Error('Unknown type on convert to object: ' + JSON.stringify(type));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const getComment = item => {
|
|
75
|
+
return typeof item.comment === 'string'
|
|
76
|
+
? item.comment
|
|
77
|
+
: [
|
|
78
|
+
_.get(item, 'comment.shortText'),
|
|
79
|
+
_.get(item, 'comment.text'),
|
|
80
|
+
].filter(Boolean).join('\n\n');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const getTags = item => {
|
|
84
|
+
let tags = {};
|
|
85
|
+
_.get(item, 'comment.tags', []).forEach(tag => {
|
|
86
|
+
tags[tag.tag] = tag.text.trim();
|
|
87
|
+
});
|
|
88
|
+
return tags;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/*const findClassDocs = (children) => {
|
|
92
|
+
let title = null;
|
|
93
|
+
let description = null;
|
|
94
|
+
let tags = {};
|
|
95
|
+
|
|
96
|
+
(children || []).forEach(item => {
|
|
97
|
+
if (item.kindString === 'Class') {
|
|
98
|
+
// Get title and description
|
|
99
|
+
const commentLines = _.get(item, 'comment.shortText', '').split('\n');
|
|
100
|
+
title = commentLines.length > 0 ? commentLines.shift() : demoMatch[2];
|
|
101
|
+
description = commentLines.join('\n');
|
|
102
|
+
|
|
103
|
+
// Find order and col tags
|
|
104
|
+
let order = 0;
|
|
105
|
+
let col = null;
|
|
106
|
+
_.get(item, 'comment.tags', []).forEach(tag => {
|
|
107
|
+
tags[tag.tag] = tag.text.trim();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
return {title, description, tags};
|
|
113
|
+
};*/
|
|
114
|
+
|
|
115
|
+
const getProperty = property => ({
|
|
116
|
+
name: property.name,
|
|
117
|
+
decorators: (property.decorators || []).map(decorator => decorator.name),
|
|
118
|
+
description: getComment(property),
|
|
119
|
+
required: !property.flags.isOptional,
|
|
120
|
+
type: typeToString(property.type),
|
|
121
|
+
example: getTags(property).example || null,
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
const getInfo = (filesMap, moduleItem, item) => {
|
|
125
|
+
if (!['Class', 'Interface', 'Type alias'].includes(item.kindString)) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const moduleName = JSON.parse(moduleItem.name);
|
|
130
|
+
const commentLines = getComment(item).split('\n');
|
|
131
|
+
const info = {
|
|
132
|
+
name: item.name,
|
|
133
|
+
moduleName,
|
|
134
|
+
title: commentLines.length > 0 ? commentLines.shift() : demoMatch[2],
|
|
135
|
+
description: commentLines.join('\n'),
|
|
136
|
+
tags: getTags(item),
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// Find default props for React Components
|
|
140
|
+
if (item.kindString === 'Interface') {
|
|
141
|
+
info.defaultProps = null;
|
|
142
|
+
(item.children || []).forEach(property => {
|
|
143
|
+
if (property.name === 'defaultProps' && property.flags && property.flags.isExported === true) {
|
|
144
|
+
info.defaultProps = typeToObject(property);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
(moduleItem.children || []).forEach(item => {
|
|
148
|
+
if (item.kindString === 'Object literal' && item.name === 'defaultProps' && item.flags && item.flags.isConst === true) {
|
|
149
|
+
info.defaultProps = {
|
|
150
|
+
...info.defaultProps,
|
|
151
|
+
...typeToObject(item),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
info.extends = null;
|
|
157
|
+
if (filesMap[item.sources[0].fileName]) {
|
|
158
|
+
const source = fs.readFileSync(filesMap[item.sources[0].fileName]);
|
|
159
|
+
const extendsMatch = String(source).match(new RegExp(`interface\\s+${item.name}\\s+extends([^{]+)`));
|
|
160
|
+
info.extends = extendsMatch ? extendsMatch[1].split(',').map(name => name.trim()) : [];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Get properties
|
|
165
|
+
if (['Class', 'Interface'].includes(item.kindString)) {
|
|
166
|
+
info.properties = (item.children || [])
|
|
167
|
+
.map(property => {
|
|
168
|
+
// Check is property
|
|
169
|
+
if (property.kindString !== 'Property') {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const propertyInfo = getProperty(property);
|
|
174
|
+
|
|
175
|
+
// Skip props without jsoc for components
|
|
176
|
+
if (!propertyInfo.description && moduleName.match(/^components\//)) {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return propertyInfo;
|
|
181
|
+
})
|
|
182
|
+
.filter(Boolean);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Get methods
|
|
186
|
+
if (item.kindString === 'Class') {
|
|
187
|
+
info.methods = (item.children || [])
|
|
188
|
+
.map(method => {
|
|
189
|
+
// Check is property
|
|
190
|
+
if (method.kindString !== 'Method') {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/*
|
|
195
|
+
"signatures": [
|
|
196
|
+
{
|
|
197
|
+
"id": 7631,
|
|
198
|
+
"name": "moment",
|
|
199
|
+
"kind": 4096,
|
|
200
|
+
"kindString": "Call signature",
|
|
201
|
+
"flags": {
|
|
202
|
+
"isExported": true
|
|
203
|
+
},
|
|
204
|
+
"comment": {
|
|
205
|
+
"shortText": "Получение экземпляра `moment` с учетом временной зоны бекенда"
|
|
206
|
+
},
|
|
207
|
+
"parameters": [
|
|
208
|
+
{
|
|
209
|
+
"id": 7632,
|
|
210
|
+
"name": "date",
|
|
211
|
+
"kind": 32768,
|
|
212
|
+
"kindString": "Parameter",
|
|
213
|
+
"flags": {
|
|
214
|
+
"isExported": true
|
|
215
|
+
},
|
|
216
|
+
"comment": {},
|
|
217
|
+
"type": {
|
|
218
|
+
"type": "intrinsic",
|
|
219
|
+
"name": "any"
|
|
220
|
+
},
|
|
221
|
+
"defaultValue": "undefined"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"id": 7633,
|
|
225
|
+
"name": "format",
|
|
226
|
+
"kind": 32768,
|
|
227
|
+
"kindString": "Parameter",
|
|
228
|
+
"flags": {
|
|
229
|
+
"isExported": true
|
|
230
|
+
},
|
|
231
|
+
"comment": {
|
|
232
|
+
"text": "\n"
|
|
233
|
+
},
|
|
234
|
+
"type": {
|
|
235
|
+
"type": "intrinsic",
|
|
236
|
+
"name": "any"
|
|
237
|
+
},
|
|
238
|
+
"defaultValue": "undefined"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"type": {
|
|
242
|
+
"type": "intrinsic",
|
|
243
|
+
"name": "any"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
if (!method.signatures || method.signatures.length === 0) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const methodInfo = getProperty(method.signatures[0]);
|
|
254
|
+
|
|
255
|
+
// Skip props without jsoc for components
|
|
256
|
+
if (!methodInfo.description && moduleName.match(/^components\//)) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return {
|
|
261
|
+
...methodInfo,
|
|
262
|
+
parameters: (method.signatures[0].parameters || []).map(param => getProperty(param)),
|
|
263
|
+
};
|
|
264
|
+
})
|
|
265
|
+
.filter(Boolean);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return info;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
module.exports = {
|
|
272
|
+
getInfo,
|
|
273
|
+
getProperty,
|
|
274
|
+
typeToObject,
|
|
275
|
+
typeToString,
|
|
276
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as cookie from 'js-cookie';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Client Storage Component
|
|
5
|
+
* Слой хранения данных в браузере (cookie, local/session storage) или ReactNative
|
|
6
|
+
*/
|
|
7
|
+
export default class ClientStorageComponent {
|
|
8
|
+
STORAGE_COOKIE: string;
|
|
9
|
+
STORAGE_LOCAL: any;
|
|
10
|
+
STORAGE_SESSION: any;
|
|
11
|
+
cookieAvailable: any;
|
|
12
|
+
localStorageAvailable: boolean;
|
|
13
|
+
sessionStorageAvailable: boolean;
|
|
14
|
+
|
|
15
|
+
constructor(components) {
|
|
16
|
+
this.localStorageAvailable = !process.env.IS_SSR;
|
|
17
|
+
this.sessionStorageAvailable = !process.env.IS_SSR;
|
|
18
|
+
this.cookieAvailable = !process.env.IS_SSR;
|
|
19
|
+
this.STORAGE_SESSION = 'session';
|
|
20
|
+
this.STORAGE_LOCAL = 'local';
|
|
21
|
+
this.STORAGE_COOKIE = 'cookie';
|
|
22
|
+
if (this.localStorageAvailable) {
|
|
23
|
+
try {
|
|
24
|
+
window.localStorage.setItem('localStorageAvailable', '1');
|
|
25
|
+
this.localStorageAvailable = window.localStorage.getItem('localStorageAvailable') === '1';
|
|
26
|
+
window.localStorage.removeItem('localStorageAvailable');
|
|
27
|
+
} catch (e) {
|
|
28
|
+
this.localStorageAvailable = false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (this.sessionStorageAvailable) {
|
|
32
|
+
try {
|
|
33
|
+
window.sessionStorage.setItem('sessionStorageAvailable', '1');
|
|
34
|
+
this.sessionStorageAvailable = window.localStorage.getItem('sessionStorageAvailable') === '1';
|
|
35
|
+
window.sessionStorage.removeItem('sessionStorageAvailable');
|
|
36
|
+
} catch (e) {
|
|
37
|
+
this.sessionStorageAvailable = false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} name
|
|
44
|
+
* @param {string} [storageName]
|
|
45
|
+
* @returns {*}
|
|
46
|
+
*/
|
|
47
|
+
get(name, storageName) {
|
|
48
|
+
storageName = storageName || this.STORAGE_LOCAL;
|
|
49
|
+
if (this.localStorageAvailable && storageName === this.STORAGE_LOCAL) {
|
|
50
|
+
return window.localStorage.getItem(name);
|
|
51
|
+
} else if (
|
|
52
|
+
this.sessionStorageAvailable &&
|
|
53
|
+
storageName === this.STORAGE_SESSION
|
|
54
|
+
) {
|
|
55
|
+
return window.sessionStorage.getItem(name);
|
|
56
|
+
} else if (this.cookieAvailable) {
|
|
57
|
+
return cookie.get(name);
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @param {string} name
|
|
64
|
+
* @param {*} value
|
|
65
|
+
* @param {string} [storageName]
|
|
66
|
+
* @param {number|null} [expires]
|
|
67
|
+
*/
|
|
68
|
+
set(name, value, storageName, expires = null) {
|
|
69
|
+
storageName = storageName || this.STORAGE_LOCAL;
|
|
70
|
+
if (this.localStorageAvailable && storageName === this.STORAGE_LOCAL) {
|
|
71
|
+
window.localStorage.setItem(name, value);
|
|
72
|
+
} else if (
|
|
73
|
+
this.sessionStorageAvailable &&
|
|
74
|
+
storageName === this.STORAGE_SESSION
|
|
75
|
+
) {
|
|
76
|
+
window.sessionStorage.setItem(name, value);
|
|
77
|
+
} else if (this.cookieAvailable) {
|
|
78
|
+
cookie.set(name, value, {
|
|
79
|
+
expires,
|
|
80
|
+
domain: this._getDomain()
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @param {string} name
|
|
88
|
+
* @param {string} [storageName]
|
|
89
|
+
*/
|
|
90
|
+
remove(name, storageName) {
|
|
91
|
+
storageName = storageName || this.STORAGE_LOCAL;
|
|
92
|
+
if (this.localStorageAvailable && storageName === this.STORAGE_LOCAL) {
|
|
93
|
+
window.localStorage.removeItem(name);
|
|
94
|
+
} else if (
|
|
95
|
+
this.sessionStorageAvailable &&
|
|
96
|
+
storageName === this.STORAGE_SESSION
|
|
97
|
+
) {
|
|
98
|
+
window.sessionStorage.removeItem(name);
|
|
99
|
+
} else if (this.cookieAvailable) {
|
|
100
|
+
cookie.remove(name, {
|
|
101
|
+
domain: this._getDomain()
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
_getDomain() {
|
|
107
|
+
const host = (typeof location !== 'undefined' && location.hostname) || '';
|
|
108
|
+
return (
|
|
109
|
+
(!/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/.test(host) &&
|
|
110
|
+
host
|
|
111
|
+
.split('.')
|
|
112
|
+
.slice(-2)
|
|
113
|
+
.join('.')) ||
|
|
114
|
+
host
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import _isString from 'lodash-es/isString';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Html Component
|
|
5
|
+
* Хелпер для работы с БЭМ классами и DOM элементами
|
|
6
|
+
*/
|
|
7
|
+
export default class HtmlComponent {
|
|
8
|
+
namespace = '';
|
|
9
|
+
|
|
10
|
+
constructor(components) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
bem(blockName) {
|
|
14
|
+
const bem = (...names) => this.classNames(...names);
|
|
15
|
+
bem.block = modifiers => this._applyModifiers(blockName, modifiers);
|
|
16
|
+
bem.element = (elementName, modifiers) => this._applyModifiers(blockName + '__' + elementName, modifiers);
|
|
17
|
+
return bem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
classNames(...names) {
|
|
21
|
+
return Array.prototype.slice
|
|
22
|
+
.call(names)
|
|
23
|
+
.filter(v => v)
|
|
24
|
+
.join(' ');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
addClass(node, className) {
|
|
28
|
+
if (node && _isString(node.className)) {
|
|
29
|
+
const classes = node.className.split(' ');
|
|
30
|
+
if (classes.indexOf(className) === -1) {
|
|
31
|
+
classes.push(className);
|
|
32
|
+
node.className = classes.join(' ');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
removeClass(node, className) {
|
|
38
|
+
if (node && _isString(node.className)) {
|
|
39
|
+
const classes = node.className.split(' ');
|
|
40
|
+
const index = classes.indexOf(className);
|
|
41
|
+
if (index !== -1) {
|
|
42
|
+
classes.splice(index, 1);
|
|
43
|
+
node.className = classes.join(' ');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
closest(element, className) {
|
|
49
|
+
while ((element = element.parentElement)
|
|
50
|
+
&& !element.classList.contains(className)) {
|
|
51
|
+
} // eslint-disable-line no-empty
|
|
52
|
+
return element;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_applyModifiers(entity, modifiers) {
|
|
56
|
+
let result = [];
|
|
57
|
+
result.push(entity);
|
|
58
|
+
if (typeof modifiers === 'string') {
|
|
59
|
+
result.push(entity + (modifiers ? '_' + modifiers : ''));
|
|
60
|
+
} else if (modifiers) {
|
|
61
|
+
Object.keys(modifiers).forEach(key => {
|
|
62
|
+
const value = modifiers[key];
|
|
63
|
+
if (!value) {
|
|
64
|
+
// Skip
|
|
65
|
+
} else if (value === true) {
|
|
66
|
+
result.push(entity + '_' + key);
|
|
67
|
+
} else {
|
|
68
|
+
result.push(entity + '_' + key + '_' + value);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Append namespace
|
|
74
|
+
result = result.map(cl => this.namespace + cl);
|
|
75
|
+
return result.join(' ');
|
|
76
|
+
}
|
|
77
|
+
}
|