@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,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Tree from '../Tree'
|
|
3
|
+
|
|
4
|
+
export default () => (
|
|
5
|
+
<>
|
|
6
|
+
<Tree
|
|
7
|
+
level={3}
|
|
8
|
+
items={[
|
|
9
|
+
{
|
|
10
|
+
id: 1,
|
|
11
|
+
label: 'label 1',
|
|
12
|
+
items: [
|
|
13
|
+
{
|
|
14
|
+
id: 2,
|
|
15
|
+
label: 'label 2.1',
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
id: 3,
|
|
19
|
+
label: 'label 3',
|
|
20
|
+
items: [
|
|
21
|
+
{
|
|
22
|
+
id: 4,
|
|
23
|
+
label: 'label 4',
|
|
24
|
+
items: [
|
|
25
|
+
{
|
|
26
|
+
id: 5,
|
|
27
|
+
label: 'label 5'
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 2.2,
|
|
37
|
+
label: 'label 2.2',
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
]}
|
|
42
|
+
/>
|
|
43
|
+
</>
|
|
44
|
+
);
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _isArray from 'lodash-es/isArray';
|
|
2
|
+
|
|
3
|
+
export const indexBy = (collection, key) => {
|
|
4
|
+
if (!_isArray(collection)) {
|
|
5
|
+
return collection;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const result = {};
|
|
9
|
+
(collection || []).forEach(item => {
|
|
10
|
+
result[item[key]] = item;
|
|
11
|
+
});
|
|
12
|
+
return result;
|
|
13
|
+
}
|
package/utils/data.ts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import _uniqBy from 'lodash-es/uniqBy';
|
|
2
|
+
import _isString from 'lodash-es/isString';
|
|
3
|
+
import _isArray from 'lodash-es/isArray';
|
|
4
|
+
import _some from 'lodash-es/some';
|
|
5
|
+
import _has from 'lodash-es/has';
|
|
6
|
+
import _isObject from 'lodash-es/isObject';
|
|
7
|
+
import _isInteger from 'lodash-es/isInteger';
|
|
8
|
+
import _isFunction from 'lodash-es/isFunction';
|
|
9
|
+
import _every from 'lodash-es/every';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Normalize items for save to state. Support enum class or normal items list.
|
|
13
|
+
* @param {array|object} items
|
|
14
|
+
* @returns {*}
|
|
15
|
+
*/
|
|
16
|
+
export const normalizeItems = (items) => {
|
|
17
|
+
// Array
|
|
18
|
+
if (_isArray(items)) {
|
|
19
|
+
// List of strings/numbers
|
|
20
|
+
if (_some(items, item => _isString(item) || _isInteger(item))) {
|
|
21
|
+
return items.map(item => {
|
|
22
|
+
if (_isString(item) || _isInteger(item)) {
|
|
23
|
+
return {
|
|
24
|
+
id: item,
|
|
25
|
+
label: item
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return item;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Labels as ids
|
|
32
|
+
if (_some(items, item => !_has(item, 'id'))) {
|
|
33
|
+
return _uniqBy(
|
|
34
|
+
items.map(item => {
|
|
35
|
+
return {
|
|
36
|
+
id: item.label,
|
|
37
|
+
...item
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
'label'
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return items;
|
|
44
|
+
}
|
|
45
|
+
// Enum
|
|
46
|
+
if (_isObject(items) && _isFunction(items.getLabels)) {
|
|
47
|
+
const labels = items.getLabels();
|
|
48
|
+
return Object.keys(labels).map(id => ({
|
|
49
|
+
id,
|
|
50
|
+
label: labels[id]
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
return [];
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const filterItems = (items: Array<any>, condition: any) => {
|
|
57
|
+
return items.filter(item => checkCondition(item, condition));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const checkCondition = (item, condition) => {
|
|
61
|
+
if (_isObject(condition) && !_isArray(condition)) {
|
|
62
|
+
return _every(Object.keys(condition), key => {
|
|
63
|
+
const value = condition[key];
|
|
64
|
+
const operator = _isString(value) ? 'like' : '=';
|
|
65
|
+
return checkCondition(item, [operator, key, value]);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
if (_isArray(condition) && condition.length > 1) {
|
|
69
|
+
const operator = condition[0].toLowerCase();
|
|
70
|
+
|
|
71
|
+
// ['not', {role: 'admin'}]
|
|
72
|
+
if (operator.indexOf('not') === 0) {
|
|
73
|
+
const newOperator = operator.replace(/^not\s+/, '');
|
|
74
|
+
return !checkCondition(item, [newOperator].concat(condition.slice(1)));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const key = condition[1];
|
|
78
|
+
const value = condition[2];
|
|
79
|
+
switch (operator) {
|
|
80
|
+
case '=': // ['=', 'age', 18]
|
|
81
|
+
return item[key] === value;
|
|
82
|
+
|
|
83
|
+
case '>': // ['>', 'age', 18]
|
|
84
|
+
return item[key] > value;
|
|
85
|
+
|
|
86
|
+
case '>=': // ['>=', 'age', 18]
|
|
87
|
+
case '=>':
|
|
88
|
+
return item[key] >= value;
|
|
89
|
+
|
|
90
|
+
case '<': // ['<', 'age', 18]
|
|
91
|
+
return item[key] < value;
|
|
92
|
+
|
|
93
|
+
case '<=': // ['<=', 'age', 18]
|
|
94
|
+
case '=<':
|
|
95
|
+
return item[key] <= value;
|
|
96
|
+
|
|
97
|
+
case 'and': // ['and', {isActive: true}, ['=', 'name', 'Ivan']]
|
|
98
|
+
case '&&':
|
|
99
|
+
return _every(condition.slice(1), subCondition => checkCondition(item, subCondition));
|
|
100
|
+
|
|
101
|
+
case 'or': // ['or', {isAdmin: true}, ['=', 'name', 'Ivan']]
|
|
102
|
+
case '||':
|
|
103
|
+
return _some(condition.slice(1), subCondition => checkCondition(item, subCondition));
|
|
104
|
+
|
|
105
|
+
case 'like': // ['like', 'name', 'alex']
|
|
106
|
+
return _isString(item[key]) && item[key].toLowerCase().indexOf(value.toLowerCase()) !== -1;
|
|
107
|
+
|
|
108
|
+
case 'between': // ['between', 'size', 5, 10]
|
|
109
|
+
return condition[2] <= value && value <= condition[3];
|
|
110
|
+
|
|
111
|
+
case 'in': // ['in', 'ids', [5, 6, 10]]
|
|
112
|
+
return _isArray(item[key]) && item[key].includes(value);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (_isFunction(condition)) {
|
|
116
|
+
return !!condition(item);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return true;
|
|
120
|
+
}
|
package/utils/query.ts
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import queryString from 'query-string';
|
|
2
|
+
import _get from 'lodash-es/get';
|
|
3
|
+
import _isObject from 'lodash-es/isObject';
|
|
4
|
+
import _isString from 'lodash-es/isString';
|
|
5
|
+
import _toInteger from 'lodash-es/toInteger';
|
|
6
|
+
import _groupBy from 'lodash-es/groupBy';
|
|
7
|
+
import _cloneDeep from 'lodash-es/cloneDeep';
|
|
8
|
+
import {replace} from 'connected-react-router';
|
|
9
|
+
import {Model} from '../components/MetaComponent';
|
|
10
|
+
|
|
11
|
+
export const queryConfig = (config, defaultConfig = null) => {
|
|
12
|
+
config = _isObject(config) ? config : {};
|
|
13
|
+
defaultConfig = defaultConfig ? queryConfig(defaultConfig) : {};
|
|
14
|
+
|
|
15
|
+
config = _cloneDeep({
|
|
16
|
+
useHash: false,
|
|
17
|
+
attributes: [],
|
|
18
|
+
...config,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const defaults = _groupBy(defaultConfig.attributes, 'attribute');
|
|
22
|
+
Object.keys(defaults).forEach(attribute => {
|
|
23
|
+
if (!config.attributes.find(item => item === attribute || item.attribute === attribute)) {
|
|
24
|
+
config.attributes.push(attribute);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Normalize attributes
|
|
29
|
+
config.attributes = config.attributes
|
|
30
|
+
.map(item => {
|
|
31
|
+
if (_isString(item)) {
|
|
32
|
+
item = {attribute: item};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
item = {
|
|
36
|
+
type: 'string', // string, string[], number, number[], boolean, boolean[]
|
|
37
|
+
attribute: null,
|
|
38
|
+
defaultValue: null,
|
|
39
|
+
toFormConverter: null,
|
|
40
|
+
toQueryConverter: null,
|
|
41
|
+
..._get(defaults, [item.attribute, 0]),
|
|
42
|
+
...item,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return item;
|
|
46
|
+
})
|
|
47
|
+
.filter(item => !!item.attribute);
|
|
48
|
+
|
|
49
|
+
return config;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const defaultFromStringConverter = (value, type, item) => {
|
|
53
|
+
type = type || '';
|
|
54
|
+
|
|
55
|
+
// Array
|
|
56
|
+
if (type.substr(-2) === '[]') {
|
|
57
|
+
const subType = type.substr(0, type.length - 2);
|
|
58
|
+
return value
|
|
59
|
+
? value.split(',').map(v => defaultFromStringConverter(v, subType, item))
|
|
60
|
+
: null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Single
|
|
64
|
+
switch (type) {
|
|
65
|
+
case 'number':
|
|
66
|
+
return value || String(value) === '0' ? _toInteger(value) : null;
|
|
67
|
+
|
|
68
|
+
case 'boolean':
|
|
69
|
+
return ['1', 't', 'y'].includes(String(value).substr(0, 1)) || null;
|
|
70
|
+
|
|
71
|
+
default:
|
|
72
|
+
case 'string':
|
|
73
|
+
return value ? String(value) : null;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const defaultToStringConverter = (value, type, item) => {
|
|
78
|
+
type = type || '';
|
|
79
|
+
|
|
80
|
+
// Array
|
|
81
|
+
if (type.substr(-2) === '[]') {
|
|
82
|
+
return value
|
|
83
|
+
? value.join(',')
|
|
84
|
+
: null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Single
|
|
88
|
+
switch (type) {
|
|
89
|
+
case 'boolean':
|
|
90
|
+
return value ? '1' : null;
|
|
91
|
+
|
|
92
|
+
default:
|
|
93
|
+
case 'string':
|
|
94
|
+
case 'number':
|
|
95
|
+
return value ? String(value) : null;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const queryRestore = (model: Model, location, useHash) => {
|
|
100
|
+
const values = queryString.parse(useHash ? location.hash : location.search);
|
|
101
|
+
const result = {};
|
|
102
|
+
|
|
103
|
+
model.attributes.forEach(item => {
|
|
104
|
+
if (typeof item !== 'string') {
|
|
105
|
+
const converter = item.fromStringConverter || defaultFromStringConverter;
|
|
106
|
+
const value = converter(String(values[item.attribute]), item.type, item);
|
|
107
|
+
if (value !== null || item.defaultValue !== null) {
|
|
108
|
+
result[item.attribute] = value !== null ? value : item.defaultValue;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
return result;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* WARNING
|
|
118
|
+
* Method incorrectly saves nested objects (e.g. {foo: [{bar: 1}]}
|
|
119
|
+
* // @todo use 'qs' library instead of 'query-string'
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
export const queryReplace = (model: Model, location, values, useHash) => {
|
|
123
|
+
const result = {};
|
|
124
|
+
model.attributes.forEach(item => {
|
|
125
|
+
if (typeof item !== 'string' && values[item.attribute] !== item.defaultValue) {
|
|
126
|
+
const converter = item.toStringConverter || defaultToStringConverter;
|
|
127
|
+
const value = converter(values[item.attribute], item.type, item);
|
|
128
|
+
if (value !== null) {
|
|
129
|
+
result[item.attribute] = value;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
let query = queryString.stringify(result);
|
|
135
|
+
if (useHash) {
|
|
136
|
+
query = '#' + query;
|
|
137
|
+
if (location.hash !== query) {
|
|
138
|
+
location.hash = query;
|
|
139
|
+
}
|
|
140
|
+
return [];
|
|
141
|
+
} else {
|
|
142
|
+
query = '?' + query
|
|
143
|
+
if (location.search !== query) {
|
|
144
|
+
return replace(location.pathname + query);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
package/utils/text.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import _orderBy from 'lodash-es/orderBy';
|
|
2
|
+
|
|
3
|
+
const stringToWords = str => {
|
|
4
|
+
let words = [];
|
|
5
|
+
String(str).split(' ').forEach(strItem => {
|
|
6
|
+
words = words.concat(strItem.match(/^[^\p{Lu}]+/u));
|
|
7
|
+
words = words.concat(strItem.match(/[\p{Lu}][^\p{Lu}]*/gu));
|
|
8
|
+
words.push(' ');
|
|
9
|
+
});
|
|
10
|
+
words.pop();
|
|
11
|
+
return words.filter(Boolean);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const smartSearch = (query, sourceItems) => {
|
|
15
|
+
if (!query) {
|
|
16
|
+
return sourceItems;
|
|
17
|
+
}
|
|
18
|
+
const queryCharacters = query.split('');
|
|
19
|
+
// Match
|
|
20
|
+
let items = sourceItems.filter(item => {
|
|
21
|
+
const id = item.id;
|
|
22
|
+
const words = stringToWords(item.label || '');
|
|
23
|
+
if (words.length === 0 || !id) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
let word = null;
|
|
27
|
+
let highlighted = [['', false]];
|
|
28
|
+
let index = 0;
|
|
29
|
+
let wordIndex = 0;
|
|
30
|
+
let wordChar = null;
|
|
31
|
+
let wordCharIndex = 0;
|
|
32
|
+
while (true) {
|
|
33
|
+
const char = queryCharacters[index];
|
|
34
|
+
if (!char) {
|
|
35
|
+
highlighted.push([
|
|
36
|
+
word.substr(wordCharIndex) + words.slice(wordIndex + 1).join(''),
|
|
37
|
+
false
|
|
38
|
+
]);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
word = words[wordIndex];
|
|
42
|
+
wordChar = (word && word.split('')[wordCharIndex]) || '';
|
|
43
|
+
if (!word) {
|
|
44
|
+
highlighted = [];
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
const isMatch = !char.match(/[\p{Lu}]/u)
|
|
48
|
+
? wordChar.toLowerCase() === char.toLowerCase()
|
|
49
|
+
: wordChar === char;
|
|
50
|
+
if (isMatch) {
|
|
51
|
+
index++;
|
|
52
|
+
wordCharIndex++;
|
|
53
|
+
highlighted[highlighted.length - 1][0] += wordChar;
|
|
54
|
+
highlighted[highlighted.length - 1][1] = true;
|
|
55
|
+
} else {
|
|
56
|
+
highlighted.push([word.substr(wordCharIndex), false]);
|
|
57
|
+
highlighted.push(['', false]);
|
|
58
|
+
wordIndex++;
|
|
59
|
+
wordCharIndex = 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
highlighted = highlighted.filter(item => !!item[0]);
|
|
63
|
+
if (highlighted.findIndex(item => item[1]) !== -1) {
|
|
64
|
+
item.labelHighlighted = highlighted;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
});
|
|
69
|
+
items = _orderBy(
|
|
70
|
+
items,
|
|
71
|
+
item => {
|
|
72
|
+
// Fined first word is priority
|
|
73
|
+
if (item.labelHighlighted) {
|
|
74
|
+
return item.labelHighlighted.findIndex(i => i[1]);
|
|
75
|
+
}
|
|
76
|
+
return Infinity;
|
|
77
|
+
},
|
|
78
|
+
'asc'
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
return items;
|
|
82
|
+
};
|
package/actions/auth.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const AUTH_INIT = "AUTH_INIT";
|
|
2
|
-
export declare const AUTH_INIT_USER = "AUTH_INIT_USER";
|
|
3
|
-
export declare const AUTH_SET_DATA = "AUTH_SET_DATA";
|
|
4
|
-
export declare const AUTH_ADD_SOCIAL = "AUTH_ADD_SOCIAL";
|
|
5
|
-
export declare const init: (skipInitialized?: boolean) => (dispatch: any, getState: any) => any;
|
|
6
|
-
export declare const reInit: () => (dispatch: any, getState: any) => any;
|
|
7
|
-
export declare const login: (token: any, redirectPageId?: string | boolean) => (dispatch: any, getState: any, { http }: {
|
|
8
|
-
http: any;
|
|
9
|
-
}) => any;
|
|
10
|
-
export declare const addSocial: (social: any) => {
|
|
11
|
-
type: string;
|
|
12
|
-
social: any;
|
|
13
|
-
};
|
|
14
|
-
export declare const setUser: (user: any) => {
|
|
15
|
-
type: string;
|
|
16
|
-
user: any;
|
|
17
|
-
};
|
|
18
|
-
export declare const setData: (data: any) => {
|
|
19
|
-
type: string;
|
|
20
|
-
data: any;
|
|
21
|
-
};
|
|
22
|
-
export declare const logout: (routeId?: string | boolean, routeParams?: any) => (dispatch: any, getState: any, { http }: {
|
|
23
|
-
http: any;
|
|
24
|
-
}) => any;
|
package/actions/auth.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.logout = exports.setData = exports.setUser = exports.addSocial = exports.login = exports.reInit = exports.init = exports.AUTH_ADD_SOCIAL = exports.AUTH_SET_DATA = exports.AUTH_INIT_USER = exports.AUTH_INIT = void 0;
|
|
4
|
-
var router_1 = require("./router");
|
|
5
|
-
exports.AUTH_INIT = 'AUTH_INIT';
|
|
6
|
-
exports.AUTH_INIT_USER = 'AUTH_INIT_USER';
|
|
7
|
-
exports.AUTH_SET_DATA = 'AUTH_SET_DATA';
|
|
8
|
-
exports.AUTH_ADD_SOCIAL = 'AUTH_ADD_SOCIAL';
|
|
9
|
-
var init = function (skipInitialized) {
|
|
10
|
-
if (skipInitialized === void 0) { skipInitialized = false; }
|
|
11
|
-
return function (dispatch, getState) {
|
|
12
|
-
if (skipInitialized) {
|
|
13
|
-
var state = getState();
|
|
14
|
-
if (state.auth && state.auth.isInitialized) {
|
|
15
|
-
return [];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return dispatch({
|
|
19
|
-
type: exports.AUTH_INIT
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.init = init;
|
|
24
|
-
var reInit = function () { return exports.init(); };
|
|
25
|
-
exports.reInit = reInit;
|
|
26
|
-
var login = function (token, redirectPageId) {
|
|
27
|
-
if (redirectPageId === void 0) { redirectPageId = 'root'; }
|
|
28
|
-
return function (dispatch, getState, _a) {
|
|
29
|
-
var http = _a.http;
|
|
30
|
-
http.setAccessToken(token);
|
|
31
|
-
return dispatch({
|
|
32
|
-
type: exports.AUTH_INIT,
|
|
33
|
-
redirectPageId: redirectPageId || null
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
exports.login = login;
|
|
38
|
-
var addSocial = function (social) { return ({
|
|
39
|
-
type: exports.AUTH_ADD_SOCIAL,
|
|
40
|
-
social: social
|
|
41
|
-
}); };
|
|
42
|
-
exports.addSocial = addSocial;
|
|
43
|
-
var setUser = function (user) { return ({
|
|
44
|
-
type: exports.AUTH_INIT_USER,
|
|
45
|
-
user: user || null
|
|
46
|
-
}); };
|
|
47
|
-
exports.setUser = setUser;
|
|
48
|
-
var setData = function (data) { return ({
|
|
49
|
-
type: exports.AUTH_SET_DATA,
|
|
50
|
-
data: data
|
|
51
|
-
}); };
|
|
52
|
-
exports.setData = setData;
|
|
53
|
-
var logout = function (routeId, routeParams) {
|
|
54
|
-
if (routeId === void 0) { routeId = 'root'; }
|
|
55
|
-
if (routeParams === void 0) { routeParams = null; }
|
|
56
|
-
return function (dispatch, getState, _a) {
|
|
57
|
-
var http = _a.http;
|
|
58
|
-
http.removeAccessToken();
|
|
59
|
-
return dispatch([
|
|
60
|
-
exports.setUser(null),
|
|
61
|
-
routeId && router_1.goToRoute(routeId, routeParams),
|
|
62
|
-
].filter(Boolean));
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
exports.logout = logout;
|
package/actions/fields.d.ts
DELETED
package/actions/fields.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.setMeta = exports.FIELDS_SET_META = void 0;
|
|
4
|
-
exports.FIELDS_SET_META = 'FIELDS_SET_META';
|
|
5
|
-
var setMeta = function (meta) { return ({
|
|
6
|
-
type: exports.FIELDS_SET_META,
|
|
7
|
-
meta: meta
|
|
8
|
-
}); };
|
|
9
|
-
exports.setMeta = setMeta;
|
package/actions/form.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export declare const FORM_INITIALIZE = "@form/initialize";
|
|
2
|
-
export declare const FORM_CHANGE = "@form/change";
|
|
3
|
-
export declare const FORM_RESET = "@form/reset";
|
|
4
|
-
export declare const FORM_SET_ERRORS = "@form/set_errors";
|
|
5
|
-
export declare const FORM_ARRAY_ADD = "@form/array_add";
|
|
6
|
-
export declare const FORM_ARRAY_REMOVE = "@form/array_remove";
|
|
7
|
-
/**
|
|
8
|
-
* Инициализация формы, сохранение первоначальных данных
|
|
9
|
-
* @param formId
|
|
10
|
-
* @param values
|
|
11
|
-
*/
|
|
12
|
-
export declare const formInitialize: (formId: any, values: any) => {
|
|
13
|
-
type: string;
|
|
14
|
-
formId: any;
|
|
15
|
-
values: any;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Изменение значения поля
|
|
19
|
-
* @param formId
|
|
20
|
-
* @param name
|
|
21
|
-
* @param value
|
|
22
|
-
*/
|
|
23
|
-
export declare const formChange: (formId: any, name: any, value: any) => {
|
|
24
|
-
type: string;
|
|
25
|
-
formId: any;
|
|
26
|
-
name: any;
|
|
27
|
-
value: any;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Задать ошибки
|
|
31
|
-
* @param formId
|
|
32
|
-
* @param errors
|
|
33
|
-
*/
|
|
34
|
-
export declare const formSetErrors: (formId: any, errors: any) => {
|
|
35
|
-
type: string;
|
|
36
|
-
formId: any;
|
|
37
|
-
errors: any;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Сброс данных формы к первоначальному состоянию (к initialValues)
|
|
41
|
-
* @param formId
|
|
42
|
-
*/
|
|
43
|
-
export declare const formReset: (formId: any) => {
|
|
44
|
-
type: string;
|
|
45
|
-
formId: any;
|
|
46
|
-
};
|
|
47
|
-
export declare const formArrayAdd: (formId: any, name: any, rowsCount: any, initialValues: any) => {
|
|
48
|
-
type: string;
|
|
49
|
-
formId: any;
|
|
50
|
-
name: any;
|
|
51
|
-
rowsCount: any;
|
|
52
|
-
initialValues: any;
|
|
53
|
-
};
|
|
54
|
-
export declare const formArrayRemove: (formId: any, name: any, index: any) => {
|
|
55
|
-
type: string;
|
|
56
|
-
formId: any;
|
|
57
|
-
name: any;
|
|
58
|
-
index: any;
|
|
59
|
-
};
|
package/actions/form.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.formArrayRemove = exports.formArrayAdd = exports.formReset = exports.formSetErrors = exports.formChange = exports.formInitialize = exports.FORM_ARRAY_REMOVE = exports.FORM_ARRAY_ADD = exports.FORM_SET_ERRORS = exports.FORM_RESET = exports.FORM_CHANGE = exports.FORM_INITIALIZE = void 0;
|
|
4
|
-
exports.FORM_INITIALIZE = '@form/initialize';
|
|
5
|
-
exports.FORM_CHANGE = '@form/change';
|
|
6
|
-
exports.FORM_RESET = '@form/reset';
|
|
7
|
-
exports.FORM_SET_ERRORS = '@form/set_errors';
|
|
8
|
-
exports.FORM_ARRAY_ADD = '@form/array_add';
|
|
9
|
-
exports.FORM_ARRAY_REMOVE = '@form/array_remove';
|
|
10
|
-
/**
|
|
11
|
-
* Инициализация формы, сохранение первоначальных данных
|
|
12
|
-
* @param formId
|
|
13
|
-
* @param values
|
|
14
|
-
*/
|
|
15
|
-
var formInitialize = function (formId, values) { return ({
|
|
16
|
-
type: exports.FORM_INITIALIZE,
|
|
17
|
-
formId: formId,
|
|
18
|
-
values: values
|
|
19
|
-
}); };
|
|
20
|
-
exports.formInitialize = formInitialize;
|
|
21
|
-
/**
|
|
22
|
-
* Изменение значения поля
|
|
23
|
-
* @param formId
|
|
24
|
-
* @param name
|
|
25
|
-
* @param value
|
|
26
|
-
*/
|
|
27
|
-
var formChange = function (formId, name, value) { return ({
|
|
28
|
-
type: exports.FORM_CHANGE,
|
|
29
|
-
formId: formId,
|
|
30
|
-
name: name,
|
|
31
|
-
value: value
|
|
32
|
-
}); };
|
|
33
|
-
exports.formChange = formChange;
|
|
34
|
-
/**
|
|
35
|
-
* Задать ошибки
|
|
36
|
-
* @param formId
|
|
37
|
-
* @param errors
|
|
38
|
-
*/
|
|
39
|
-
var formSetErrors = function (formId, errors) { return ({
|
|
40
|
-
type: exports.FORM_SET_ERRORS,
|
|
41
|
-
formId: formId,
|
|
42
|
-
errors: errors
|
|
43
|
-
}); };
|
|
44
|
-
exports.formSetErrors = formSetErrors;
|
|
45
|
-
/**
|
|
46
|
-
* Сброс данных формы к первоначальному состоянию (к initialValues)
|
|
47
|
-
* @param formId
|
|
48
|
-
*/
|
|
49
|
-
var formReset = function (formId) { return ({
|
|
50
|
-
type: exports.FORM_RESET,
|
|
51
|
-
formId: formId
|
|
52
|
-
}); };
|
|
53
|
-
exports.formReset = formReset;
|
|
54
|
-
var formArrayAdd = function (formId, name, rowsCount, initialValues) { return ({
|
|
55
|
-
type: exports.FORM_ARRAY_ADD,
|
|
56
|
-
formId: formId,
|
|
57
|
-
name: name,
|
|
58
|
-
rowsCount: rowsCount,
|
|
59
|
-
initialValues: initialValues
|
|
60
|
-
}); };
|
|
61
|
-
exports.formArrayAdd = formArrayAdd;
|
|
62
|
-
var formArrayRemove = function (formId, name, index) { return ({
|
|
63
|
-
type: exports.FORM_ARRAY_REMOVE,
|
|
64
|
-
formId: formId,
|
|
65
|
-
name: name,
|
|
66
|
-
index: index
|
|
67
|
-
}); };
|
|
68
|
-
exports.formArrayRemove = formArrayRemove;
|