@sqrzro/admin 1.0.0-beta.7 → 2.0.0
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/.eslintrc +5 -1
- package/.storybook/main.js +6 -34
- package/.storybook/preview-head.html +3 -0
- package/.storybook/preview.js +1 -11
- package/.turbo/turbo-docs.log +0 -0
- package/.turbo/turbo-lint.log +112 -0
- package/.turbo/turbo-prettier.log +215 -0
- package/.turbo/turbo-test.log +6 -0
- package/LICENSE +1 -1
- package/dist/{types/components → components}/Alert/index.d.ts +4 -4
- package/dist/components/Alert/index.js +15 -0
- package/dist/{types/components → components}/Allow/index.d.ts +20 -13
- package/dist/components/Allow/index.js +29 -0
- package/dist/components/AppLayout/AppLayout.stories.d.ts +5 -0
- package/dist/components/AppLayout/AppLayout.stories.js +11 -0
- package/dist/components/AppLayout/index.d.ts +6 -0
- package/dist/components/AppLayout/index.js +18 -0
- package/dist/{types/components → components}/AutoSuggest/index.d.ts +74 -60
- package/dist/components/AutoSuggest/index.js +143 -0
- package/dist/components/Button/Button.stories.d.ts +11 -0
- package/{src/components/Button/Button.story.tsx → dist/components/Button/Button.stories.js} +16 -14
- package/dist/{types/components → components}/Button/index.d.ts +49 -36
- package/dist/components/Button/index.js +50 -0
- package/dist/components/CalendarInput/index.d.ts +24 -0
- package/dist/components/CalendarInput/index.js +54 -0
- package/dist/{types/components → components}/CheckboxList/index.d.ts +17 -17
- package/dist/components/CheckboxList/index.js +25 -0
- package/dist/components/CodeInput/index.d.ts +9 -0
- package/dist/components/CodeInput/index.js +51 -0
- package/dist/{types/components → components}/ConnectedDropdown/index.d.ts +14 -14
- package/dist/components/ConnectedDropdown/index.js +36 -0
- package/dist/{types/components → components}/ConnectedList/index.d.ts +5 -5
- package/dist/components/ConnectedList/index.js +7 -0
- package/dist/{types/components → components}/ConnectedTable/index.d.ts +5 -5
- package/dist/components/ConnectedTable/index.js +7 -0
- package/dist/{types/components → components}/ContentBlock/index.d.ts +16 -16
- package/dist/components/ContentBlock/index.js +13 -0
- package/dist/components/DataPanel/index.d.ts +8 -0
- package/dist/components/DataPanel/index.js +8 -0
- package/dist/components/DateInput/index.d.ts +18 -0
- package/dist/components/DateInput/index.js +81 -0
- package/dist/{types/components → components}/Dropdown/index.d.ts +36 -36
- package/dist/components/Dropdown/index.js +122 -0
- package/dist/components/ErrorMessage/index.d.ts +16 -0
- package/dist/components/ErrorMessage/index.js +17 -0
- package/dist/components/Fieldset/index.d.ts +18 -0
- package/dist/components/Fieldset/index.js +19 -0
- package/dist/{types/components → components}/FileInput/index.d.ts +10 -10
- package/dist/components/FileInput/index.js +26 -0
- package/dist/components/FilterLink/index.d.ts +14 -0
- package/dist/components/FilterLink/index.js +15 -0
- package/dist/components/Form/index.d.ts +14 -0
- package/dist/components/Form/index.js +15 -0
- package/dist/components/FormActions/index.d.ts +18 -0
- package/dist/components/FormActions/index.js +14 -0
- package/dist/{types/components → components}/FormField/index.d.ts +14 -14
- package/dist/components/FormField/index.js +40 -0
- package/dist/components/FormRepeater/index.d.ts +18 -0
- package/dist/components/FormRepeater/index.js +65 -0
- package/dist/{types/components → components}/ImageInput/index.d.ts +13 -13
- package/dist/components/ImageInput/index.js +45 -0
- package/dist/components/InfoPanel/index.d.ts +14 -0
- package/dist/components/InfoPanel/index.js +11 -0
- package/dist/{types/components → components}/Link/__mocks__/index.d.ts +6 -6
- package/dist/components/Link/__mocks__/index.js +12 -0
- package/dist/components/Link/index.d.ts +23 -0
- package/dist/components/Link/index.js +21 -0
- package/dist/{types/components → components}/List/index.d.ts +36 -36
- package/dist/components/List/index.js +46 -0
- package/dist/components/ListActions/index.d.ts +18 -0
- package/dist/components/ListActions/index.js +14 -0
- package/dist/components/LoginForm/index.d.ts +3 -0
- package/dist/components/LoginForm/index.js +47 -0
- package/dist/components/Message/index.d.ts +14 -0
- package/dist/components/Message/index.js +14 -0
- package/dist/{types/components → components}/Modal/index.d.ts +4 -4
- package/dist/components/Modal/index.js +18 -0
- package/dist/components/ModalActions/index.d.ts +21 -0
- package/dist/components/ModalActions/index.js +18 -0
- package/dist/{types/components → components}/MoneyInput/index.d.ts +10 -10
- package/dist/components/MoneyInput/index.js +13 -0
- package/dist/components/PasswordForm/index.d.ts +35 -0
- package/dist/components/PasswordForm/index.js +21 -0
- package/dist/components/PasswordInput/index.d.ts +4 -0
- package/dist/components/PasswordInput/index.js +12 -0
- package/dist/{types/components → components}/RadioList/index.d.ts +9 -9
- package/dist/components/RadioList/index.js +7 -0
- package/dist/components/RootLayout/index.d.ts +6 -0
- package/dist/components/RootLayout/index.js +7 -0
- package/dist/components/SummaryList/index.d.ts +18 -0
- package/dist/components/SummaryList/index.js +15 -0
- package/dist/components/Switch/index.d.ts +21 -0
- package/dist/components/Switch/index.js +31 -0
- package/dist/{types/components → components}/Table/index.d.ts +28 -28
- package/dist/components/Table/index.js +55 -0
- package/dist/components/Tag/index.d.ts +15 -0
- package/dist/components/Tag/index.js +13 -0
- package/dist/components/TextArea/index.d.ts +18 -0
- package/dist/components/TextArea/index.js +26 -0
- package/dist/{types/components → components}/TextInput/index.d.ts +14 -14
- package/dist/components/TextInput/index.js +27 -0
- package/dist/{types/components → components}/WebsiteInput/index.d.ts +10 -10
- package/dist/components/WebsiteInput/index.js +13 -0
- package/dist/components/WeekCalendar/index.d.ts +24 -0
- package/dist/components/WeekCalendar/index.js +48 -0
- package/dist/{types/core → core}/AlertComponent/index.d.ts +26 -26
- package/dist/core/AlertComponent/index.js +35 -0
- package/dist/{types/core → core}/AppHeader/index.d.ts +3 -3
- package/dist/core/AppHeader/index.js +17 -0
- package/dist/core/AppLogo/index.d.ts +12 -0
- package/dist/core/AppLogo/index.js +16 -0
- package/dist/{types/core → core}/AppLogoImage/index.d.ts +3 -3
- package/dist/core/AppLogoImage/index.js +11 -0
- package/dist/{types/core → core}/AppLogoPlaceholder/index.d.ts +3 -3
- package/dist/core/AppLogoPlaceholder/index.js +10 -0
- package/dist/core/Assistive/index.d.ts +12 -0
- package/dist/core/Assistive/index.js +9 -0
- package/dist/core/AuthForm/index.d.ts +10 -0
- package/dist/core/AuthForm/index.js +13 -0
- package/dist/{types/core → core}/Banner/index.d.ts +3 -3
- package/dist/core/Banner/index.js +14 -0
- package/dist/core/Calendar/index.d.ts +21 -0
- package/dist/core/Calendar/index.js +69 -0
- package/dist/core/CalendarDay/index.d.ts +30 -0
- package/dist/core/CalendarDay/index.js +30 -0
- package/dist/core/CalendarMonth/index.d.ts +23 -0
- package/dist/core/CalendarMonth/index.js +45 -0
- package/dist/core/CalendarNavigation/index.d.ts +17 -0
- package/dist/core/CalendarNavigation/index.js +24 -0
- package/dist/core/CalendarWeek/index.d.ts +28 -0
- package/dist/core/CalendarWeek/index.js +46 -0
- package/dist/core/ChkRad/index.d.ts +26 -0
- package/dist/core/ChkRad/index.js +33 -0
- package/dist/core/ChkRadIcon/index.d.ts +14 -0
- package/dist/core/ChkRadIcon/index.js +12 -0
- package/dist/{types/core → core}/ChkRadList/index.d.ts +32 -32
- package/dist/core/ChkRadList/index.js +37 -0
- package/dist/core/CloseButton/index.d.ts +17 -0
- package/dist/core/CloseButton/index.js +12 -0
- package/dist/{types/core → core}/ConfirmModal/index.d.ts +3 -3
- package/dist/core/ConfirmModal/index.js +38 -0
- package/dist/{types/core → core}/ConnectedRepeater/index.d.ts +50 -50
- package/dist/core/ConnectedRepeater/index.js +154 -0
- package/dist/{types/core → core}/ConnectedRepeaterComponent/index.d.ts +24 -24
- package/dist/core/ConnectedRepeaterComponent/index.js +25 -0
- package/dist/core/Container/index.d.ts +14 -0
- package/dist/core/Container/index.js +12 -0
- package/dist/core/DataPanelItem/index.d.ts +8 -0
- package/dist/core/DataPanelItem/index.js +7 -0
- package/dist/core/DropdownPanel/index.d.ts +31 -0
- package/dist/core/DropdownPanel/index.js +32 -0
- package/dist/{types/core → core}/EmptyMessage/index.d.ts +21 -14
- package/dist/core/EmptyMessage/index.js +21 -0
- package/dist/core/FilterItem/index.d.ts +25 -0
- package/dist/core/FilterItem/index.js +82 -0
- package/dist/core/Filters/index.d.ts +31 -0
- package/dist/core/Filters/index.js +85 -0
- package/dist/{types/core → core}/FixedActions/index.d.ts +24 -24
- package/dist/core/FixedActions/index.js +22 -0
- package/dist/core/FormError/index.d.ts +12 -0
- package/dist/core/FormError/index.js +9 -0
- package/dist/core/FormLabel/index.d.ts +16 -0
- package/dist/core/FormLabel/index.js +13 -0
- package/dist/core/FormLegend/index.d.ts +12 -0
- package/dist/core/FormLegend/index.js +9 -0
- package/dist/core/Header/Header.stories.d.ts +5 -0
- package/dist/core/Header/Header.stories.js +11 -0
- package/dist/core/Header/index.d.ts +14 -0
- package/dist/core/Header/index.js +12 -0
- package/dist/core/Icon/index.d.ts +14 -0
- package/dist/core/Icon/index.js +32 -0
- package/dist/core/IconButton/index.d.ts +22 -0
- package/dist/core/IconButton/index.js +20 -0
- package/dist/core/InputPanel/index.d.ts +16 -0
- package/dist/core/InputPanel/index.js +11 -0
- package/dist/{types/core → core}/ListItem/index.d.ts +39 -38
- package/dist/core/ListItem/index.js +44 -0
- package/dist/core/ListItemAction/index.d.ts +11 -0
- package/dist/core/ListItemAction/index.js +13 -0
- package/dist/{types/core → core}/ListItemActions/index.d.ts +8 -8
- package/dist/core/ListItemActions/index.js +16 -0
- package/dist/core/ListItemMetaItem/index.d.ts +19 -0
- package/dist/core/ListItemMetaItem/index.js +29 -0
- package/dist/core/ListItemTitle/index.d.ts +19 -0
- package/dist/core/ListItemTitle/index.js +44 -0
- package/dist/core/Loader/index.d.ts +15 -0
- package/dist/core/Loader/index.js +16 -0
- package/dist/core/MeActions/index.d.ts +3 -0
- package/dist/core/MeActions/index.js +48 -0
- package/dist/{types/core → core}/MePanel/index.d.ts +19 -19
- package/dist/core/MePanel/index.js +29 -0
- package/dist/core/ModalComponent/index.d.ts +22 -0
- package/dist/core/ModalComponent/index.js +29 -0
- package/dist/{types/core → core}/Navigation/index.d.ts +3 -3
- package/dist/core/Navigation/index.js +33 -0
- package/dist/{types/core → core}/NavigationDivider/index.d.ts +3 -3
- package/dist/core/NavigationDivider/index.js +8 -0
- package/dist/core/NavigationItem/index.d.ts +16 -0
- package/dist/core/NavigationItem/index.js +21 -0
- package/dist/core/Pagination/index.d.ts +15 -0
- package/{src/core/Pagination/index.tsx → dist/core/Pagination/index.js} +10 -46
- package/dist/core/PaginationItem/index.d.ts +10 -0
- package/dist/core/PaginationItem/index.js +17 -0
- package/dist/core/Panel/index.d.ts +17 -0
- package/dist/core/Panel/index.js +13 -0
- package/dist/{types/core → core}/PasswordForgotForm/index.d.ts +7 -7
- package/dist/core/PasswordForgotForm/index.js +40 -0
- package/dist/{types/core → core}/PasswordResetForm/index.d.ts +7 -7
- package/dist/core/PasswordResetForm/index.js +34 -0
- package/dist/core/RadialProgress/index.d.ts +16 -0
- package/dist/core/RadialProgress/index.js +23 -0
- package/dist/core/SettingsForm/index.d.ts +3 -0
- package/dist/core/SettingsForm/index.js +14 -0
- package/dist/core/StaticTextInput/index.d.ts +29 -0
- package/dist/core/StaticTextInput/index.js +39 -0
- package/dist/{types/core → core}/Styled/index.d.ts +6 -6
- package/{src/core/Styled/index.tsx → dist/core/Styled/index.js} +7 -30
- package/dist/core/SummaryListItem/index.d.ts +23 -0
- package/dist/core/SummaryListItem/index.js +31 -0
- package/dist/core/TabItem/index.d.ts +4 -0
- package/dist/core/TabItem/index.js +13 -0
- package/dist/{types/core → core}/TableActionsCell/index.d.ts +8 -8
- package/dist/core/TableActionsCell/index.js +8 -0
- package/dist/core/TableCell/index.d.ts +15 -0
- package/dist/core/TableCell/index.js +20 -0
- package/dist/core/TableHead/index.d.ts +18 -0
- package/dist/core/TableHead/index.js +18 -0
- package/dist/{types/core → core}/TableRow/index.d.ts +13 -13
- package/dist/core/TableRow/index.js +18 -0
- package/dist/core/Tabs/index.d.ts +7 -0
- package/dist/core/Tabs/index.js +13 -0
- package/dist/core/TextInputAncillary/index.d.ts +29 -0
- package/dist/core/TextInputAncillary/index.js +31 -0
- package/dist/{types/core → core}/Toast/index.d.ts +3 -3
- package/dist/core/Toast/index.js +47 -0
- package/dist/core/TwoFactor/index.d.ts +13 -0
- package/dist/core/TwoFactor/index.js +49 -0
- package/dist/{types/core/LoginFormAuthenticator → core/TwoFactorAuthenticator}/index.d.ts +10 -10
- package/dist/core/TwoFactorAuthenticator/index.js +9 -0
- package/dist/core/TwoFactorMethodList/index.d.ts +10 -0
- package/dist/core/TwoFactorMethodList/index.js +22 -0
- package/dist/core/TwoFactorSetup/index.d.ts +12 -0
- package/dist/core/TwoFactorSetup/index.js +43 -0
- package/dist/core/TwoFactorSetupAuthenticator/index.d.ts +20 -0
- package/dist/core/TwoFactorSetupAuthenticator/index.js +42 -0
- package/dist/core/TwoFactorSetupYubikey/index.d.ts +16 -0
- package/dist/core/TwoFactorSetupYubikey/index.js +14 -0
- package/dist/{types/core/LoginFormYubikey → core/TwoFactorYubikey}/index.d.ts +9 -9
- package/dist/core/TwoFactorYubikey/index.js +14 -0
- package/dist/core/WeekCalendarDay/index.d.ts +27 -0
- package/dist/core/WeekCalendarDay/index.js +35 -0
- package/dist/core/YubikeyInput/index.d.ts +4 -0
- package/dist/core/YubikeyInput/index.js +14 -0
- package/dist/filters/BooleanFilter/index.d.ts +14 -0
- package/dist/filters/BooleanFilter/index.js +35 -0
- package/dist/filters/DateFilter/index.d.ts +5 -0
- package/dist/filters/DateFilter/index.js +24 -0
- package/dist/filters/DropdownFilter/index.d.ts +17 -0
- package/dist/filters/DropdownFilter/index.js +32 -0
- package/dist/filters/QuickDateFilter/index.d.ts +13 -0
- package/dist/filters/QuickDateFilter/index.js +40 -0
- package/dist/{types/filters → filters}/interfaces.d.ts +35 -35
- package/dist/filters/interfaces.js +1 -0
- package/dist/{types/hooks → hooks}/useAlert.d.ts +12 -12
- package/dist/hooks/useAlert.js +18 -0
- package/dist/hooks/useAppConfig.d.ts +3 -0
- package/dist/hooks/useAppConfig.js +5 -0
- package/dist/{types/hooks → hooks}/useConnectedList.d.ts +7 -7
- package/dist/hooks/useConnectedList.js +6 -0
- package/dist/{types/hooks → hooks}/useConnectedRepeater.d.ts +7 -7
- package/dist/hooks/useConnectedRepeater.js +14 -0
- package/dist/{types/hooks → hooks}/useConnectedTable.d.ts +7 -7
- package/dist/hooks/useConnectedTable.js +6 -0
- package/dist/hooks/useFilters.d.ts +9 -0
- package/dist/hooks/useFilters.js +24 -0
- package/dist/{types/hooks → hooks}/useLayout.d.ts +7 -7
- package/dist/hooks/useLayout.js +10 -0
- package/dist/hooks/useLayout.spec.d.ts +1 -0
- package/dist/hooks/useLayout.spec.js +24 -0
- package/dist/{types/hooks → hooks}/useModal.d.ts +12 -12
- package/dist/hooks/useModal.js +39 -0
- package/dist/hooks/useModalOffset.d.ts +2 -0
- package/dist/hooks/useModalOffset.js +16 -0
- package/dist/hooks/useModalOffset.spec.d.ts +1 -0
- package/dist/hooks/useModalOffset.spec.js +19 -0
- package/dist/hooks/useNavigation.d.ts +7 -0
- package/dist/hooks/useNavigation.js +113 -0
- package/dist/hooks/useRemote.d.ts +7 -0
- package/dist/hooks/useRemote.js +29 -0
- package/dist/hooks/useVariant.d.ts +9 -0
- package/dist/hooks/useVariant.js +14 -0
- package/dist/{types/index.d.ts → index.d.ts} +209 -203
- package/dist/index.js +213 -5459
- package/dist/{types/scenes → scenes}/Error404Scene.d.ts +3 -3
- package/dist/scenes/Error404Scene.js +5 -0
- package/dist/services/AppService.d.ts +5 -0
- package/dist/services/AppService.js +11 -0
- package/dist/services/ConfigService.d.ts +42 -0
- package/dist/services/ConfigService.js +52 -0
- package/dist/{types/services → services}/ConfirmService.d.ts +12 -12
- package/dist/services/ConfirmService.js +10 -0
- package/dist/services/DateService.d.ts +26 -0
- package/dist/services/DateService.js +132 -0
- package/dist/services/DateService.spec.d.ts +1 -0
- package/dist/services/DateService.spec.js +83 -0
- package/dist/services/DownloadService.d.ts +7 -0
- package/dist/services/DownloadService.js +16 -0
- package/dist/services/DownloadService.spec.d.ts +1 -0
- package/dist/services/DownloadService.spec.js +18 -0
- package/dist/{types/services → services}/FilterComponentService.d.ts +25 -25
- package/dist/services/FilterComponentService.js +54 -0
- package/dist/services/FilterService.d.ts +34 -0
- package/dist/services/FilterService.js +58 -0
- package/dist/services/FilterService.spec.d.ts +1 -0
- package/dist/services/FilterService.spec.js +67 -0
- package/dist/services/FormatService.d.ts +11 -0
- package/dist/services/FormatService.js +45 -0
- package/dist/services/FormatService.spec.d.ts +1 -0
- package/dist/services/FormatService.spec.js +66 -0
- package/dist/services/ToastService.d.ts +7 -0
- package/dist/services/ToastService.js +17 -0
- package/dist/services/ToastService.spec.d.ts +1 -0
- package/dist/services/ToastService.spec.js +34 -0
- package/dist/styles.css +984 -0
- package/dist/utility/MockRouter/index.d.ts +2 -0
- package/dist/utility/MockRouter/index.js +37 -0
- package/dist/utility/StorybookPanel/index.d.ts +14 -0
- package/dist/utility/StorybookPanel/index.js +12 -0
- package/dist/utility/TestChangeHandler/index.d.ts +15 -0
- package/dist/utility/TestChangeHandler/index.js +30 -0
- package/dist/utility/icons.d.ts +3 -0
- package/dist/utility/icons.js +12 -0
- package/dist/{types/utility → utility}/interfaces.d.ts +79 -69
- package/dist/utility/interfaces.js +18 -0
- package/dist/utility/middleware.d.ts +4 -0
- package/dist/utility/middleware.js +9 -0
- package/dist/{types/utility → utility}/prop-types.d.ts +57 -55
- package/dist/utility/prop-types.js +77 -0
- package/dist/utility/register.d.ts +3 -0
- package/dist/utility/register.js +9 -0
- package/package.json +53 -88
- package/postcss.config.js +1 -1
- package/prettier.config.js +1 -0
- package/src/components/Alert/index.tsx +103 -13
- package/src/components/Allow/Allow.spec.tsx +2 -2
- package/src/components/Allow/index.tsx +8 -8
- package/src/components/AppLayout/AppLayout.stories.tsx +20 -0
- package/src/components/AppLayout/index.tsx +22 -0
- package/src/components/AutoSuggest/AutoSuggest.spec.tsx +38 -18
- package/src/components/AutoSuggest/AutoSuggest.story.tsx +8 -6
- package/src/components/AutoSuggest/index.tsx +30 -30
- package/src/components/Button/Button.spec.tsx +8 -0
- package/src/components/Button/Button.stories.tsx +62 -0
- package/src/components/Button/index.tsx +9 -93
- package/src/components/CalendarInput/CalendarInput.spec.tsx +38 -22
- package/src/components/CalendarInput/CalendarInput.story.tsx +2 -2
- package/src/components/CalendarInput/index.tsx +23 -19
- package/src/components/CheckboxList/CheckboxList.spec.tsx +20 -10
- package/src/components/CheckboxList/index.tsx +9 -12
- package/src/components/ConnectedDropdown/index.tsx +7 -5
- package/src/components/ConnectedList/index.tsx +13 -11
- package/src/components/ConnectedTable/index.tsx +15 -13
- package/src/components/ContentBlock/index.tsx +10 -8
- package/src/components/DataPanel/index.tsx +25 -0
- package/src/components/DateInput/DateInput.spec.tsx +10 -6
- package/src/components/DateInput/index.tsx +11 -12
- package/src/components/ErrorMessage/index.tsx +18 -20
- package/src/components/Fieldset/Fieldset.story.tsx +17 -13
- package/src/components/Fieldset/index.tsx +12 -10
- package/src/components/FileInput/FileInput.spec.tsx +9 -5
- package/src/components/FileInput/FileInput.story.tsx +3 -1
- package/src/components/FileInput/index.tsx +12 -10
- package/src/components/FilterLink/FilterLink.spec.tsx +18 -4
- package/src/components/FilterLink/index.tsx +19 -14
- package/src/components/Form/Form.spec.tsx +7 -5
- package/src/components/Form/index.tsx +5 -3
- package/src/components/FormActions/FormActions.story.tsx +19 -15
- package/src/components/FormActions/index.tsx +11 -7
- package/src/components/FormField/FormField.spec.tsx +28 -39
- package/src/components/FormField/FormField.stories.tsx +44 -0
- package/src/components/FormField/index.tsx +8 -103
- package/src/components/FormRepeater/FormRepeater.spec.tsx +26 -14
- package/src/components/FormRepeater/index.tsx +9 -7
- package/src/components/ImageInput/ImageInput.spec.tsx +3 -1
- package/src/components/ImageInput/ImageInput.story.tsx +3 -1
- package/src/components/ImageInput/index.tsx +16 -14
- package/src/components/InfoPanel/index.tsx +7 -7
- package/src/components/Link/Link.spec.tsx +4 -2
- package/src/components/Link/__mocks__/index.tsx +3 -3
- package/src/components/Link/index.tsx +6 -6
- package/src/components/List/List.spec.tsx +57 -20
- package/src/components/List/List.story.tsx +21 -2
- package/src/components/List/index.tsx +13 -13
- package/src/components/ListActions/ListActions.story.tsx +3 -1
- package/src/components/ListActions/index.tsx +10 -11
- package/src/components/LoginForm/LoginForm.spec.tsx +19 -7
- package/src/components/LoginForm/LoginForm.story.tsx +25 -0
- package/src/components/LoginForm/index.tsx +72 -171
- package/src/components/Message/index.tsx +12 -10
- package/src/components/Modal/index.tsx +18 -12
- package/src/components/ModalActions/ModalActions.spec.tsx +4 -2
- package/src/components/ModalActions/ModalActions.story.tsx +3 -1
- package/src/components/ModalActions/index.tsx +22 -18
- package/src/components/MoneyInput/MoneyInput.story.tsx +3 -1
- package/src/components/MoneyInput/index.tsx +7 -5
- package/src/components/PasswordForm/index.tsx +12 -24
- package/src/components/RadioList/RadioList.spec.tsx +4 -2
- package/src/components/RadioList/index.tsx +8 -6
- package/src/components/RootLayout/index.tsx +45 -0
- package/src/components/SummaryList/SummaryList.module.css +19 -4
- package/src/components/SummaryList/SummaryList.spec.tsx +14 -2
- package/src/components/SummaryList/SummaryList.story.tsx +3 -1
- package/src/components/SummaryList/index.tsx +16 -14
- package/src/components/Switch/Switch.spec.tsx +8 -4
- package/src/components/Switch/index.tsx +16 -14
- package/src/components/Table/Table.spec.tsx +11 -7
- package/src/components/Table/Table.story.tsx +3 -3
- package/src/components/Table/index.tsx +20 -22
- package/src/components/TextArea/TextArea.spec.tsx +12 -6
- package/src/components/TextArea/index.tsx +10 -8
- package/src/components/TextInput/TextInput.module.css +1 -0
- package/src/components/TextInput/TextInput.spec.tsx +12 -6
- package/src/components/TextInput/TextInput.stories.tsx +46 -0
- package/src/components/TextInput/index.tsx +6 -99
- package/src/components/WebsiteInput/index.tsx +7 -5
- package/src/components/WeekCalendar/index.tsx +8 -8
- package/src/core/AlertComponent/AlertComponent.spec.tsx +17 -4
- package/src/core/AlertComponent/AlertComponent.story.tsx +19 -15
- package/src/core/AlertComponent/index.tsx +30 -25
- package/src/core/AppHeader/index.tsx +5 -3
- package/src/core/AppLogo/index.tsx +9 -7
- package/src/core/AppLogoImage/index.tsx +6 -6
- package/src/core/AppLogoPlaceholder/index.tsx +28 -22
- package/src/core/Assistive/index.tsx +1 -18
- package/src/{components/LoginForm/LoginForm.module.css → core/AuthForm/AuthForm.module.css} +4 -0
- package/src/core/AuthForm/AuthForm.spec.tsx +72 -0
- package/src/core/AuthForm/index.tsx +63 -0
- package/src/core/Banner/index.tsx +11 -11
- package/src/core/Calendar/index.tsx +9 -7
- package/src/core/CalendarDay/index.tsx +12 -12
- package/src/core/CalendarMonth/index.tsx +14 -12
- package/src/core/CalendarNavigation/index.tsx +14 -14
- package/src/core/CalendarWeek/index.tsx +21 -19
- package/src/core/ChkRadList/index.tsx +25 -23
- package/src/core/CloseButton/CloseButton.spec.tsx +4 -2
- package/src/core/CloseButton/index.tsx +10 -8
- package/src/core/ConfirmModal/ConfirmModal.spec.tsx +10 -4
- package/src/core/ConfirmModal/index.tsx +9 -7
- package/src/core/ConnectedRepeater/index.tsx +46 -19
- package/src/core/ConnectedRepeaterComponent/index.tsx +13 -9
- package/src/core/Container/index.tsx +6 -12
- package/src/core/DataPanelItem/index.tsx +19 -0
- package/src/core/EmptyMessage/EmptyMessage.stories.tsx +33 -0
- package/src/core/EmptyMessage/index.tsx +9 -42
- package/src/core/FilterItem/index.tsx +41 -33
- package/src/core/Filters/Filters.spec.tsx +103 -69
- package/src/core/Filters/index.tsx +39 -31
- package/src/core/FixedActions/FixedActions.module.css +6 -0
- package/src/core/FixedActions/FixedActions.spec.tsx +8 -3
- package/src/core/FixedActions/index.tsx +9 -9
- package/src/core/FormLegend/index.tsx +4 -4
- package/src/core/Header/Header.stories.tsx +20 -0
- package/src/core/Header/index.tsx +8 -13
- package/src/core/Icon/Icon.spec.tsx +1 -3
- package/src/core/Icon/index.tsx +14 -10
- package/src/core/IconButton/index.tsx +18 -20
- package/src/core/ListItem/ListItem.story.tsx +23 -19
- package/src/core/ListItem/index.tsx +46 -37
- package/src/core/ListItemAction/index.tsx +7 -14
- package/src/core/ListItemActions/index.tsx +13 -12
- package/src/core/ListItemMetaItem/index.tsx +8 -8
- package/src/core/ListItemTitle/ListItemTitle.module.css +9 -1
- package/src/core/ListItemTitle/ListItemTitle.spec.tsx +24 -2
- package/src/core/ListItemTitle/index.tsx +20 -10
- package/src/core/Loader/Loader.module.css +3 -3
- package/src/core/Loader/Loader.stories.tsx +22 -0
- package/src/core/Loader/index.tsx +2 -27
- package/src/core/MeActions/index.tsx +28 -18
- package/src/core/MePanel/index.tsx +10 -10
- package/src/core/ModalComponent/ModalComponent.spec.tsx +8 -4
- package/src/core/ModalComponent/index.tsx +13 -13
- package/src/core/Navigation/Navigation.spec.tsx +47 -36
- package/src/core/Navigation/index.tsx +18 -58
- package/src/core/NavigationDivider/index.tsx +6 -6
- package/src/core/NavigationItem/index.tsx +12 -21
- package/src/core/Panel/Panel.module.css +11 -0
- package/src/core/Panel/Panel.spec.tsx +16 -0
- package/src/core/Panel/index.tsx +17 -13
- package/src/core/PasswordForgotForm/index.tsx +15 -12
- package/src/core/PasswordResetForm/index.tsx +15 -12
- package/src/core/RadialProgress/index.tsx +11 -14
- package/src/core/SettingsForm/index.tsx +9 -8
- package/src/core/SummaryListItem/SummaryListItem.module.css +3 -11
- package/src/core/SummaryListItem/index.tsx +19 -14
- package/src/core/TabItem/TabItem.module.css +28 -0
- package/src/core/TabItem/index.tsx +42 -0
- package/src/core/Tabs/Tabs.module.css +0 -24
- package/src/core/Tabs/Tabs.spec.tsx +30 -0
- package/src/core/Tabs/index.tsx +18 -76
- package/src/core/Toast/Toast.spec.tsx +4 -2
- package/src/core/Toast/index.tsx +16 -18
- package/src/core/TwoFactor/TwoFactor.spec.tsx +183 -0
- package/src/core/TwoFactor/index.tsx +102 -0
- package/src/core/TwoFactorAuthenticator/index.tsx +39 -0
- package/src/core/{LoginFormTwoFactor/LoginFormTwoFactor.module.css → TwoFactorMethodList/TwoFactorMethodList.module.css} +1 -1
- package/src/core/TwoFactorMethodList/index.tsx +49 -0
- package/src/core/TwoFactorSetup/index.tsx +91 -0
- package/src/core/TwoFactorSetupAuthenticator/TwoFactorSetupAuthenticator.module.css +6 -0
- package/src/core/TwoFactorSetupAuthenticator/index.tsx +100 -0
- package/src/core/TwoFactorSetupYubikey/index.tsx +49 -0
- package/src/core/TwoFactorYubikey/index.tsx +41 -0
- package/src/core/WeekCalendarDay/index.tsx +7 -7
- package/src/core/{LoginFormYubikey/LoginFormYubikey.module.css → YubikeyInput/YubikeyInput.module.css} +5 -0
- package/src/core/YubikeyInput/YubikeyInput.spec.tsx +77 -0
- package/src/core/YubikeyInput/index.tsx +76 -0
- package/src/filters/BooleanFilter/index.tsx +13 -12
- package/src/filters/DateFilter/index.tsx +8 -8
- package/src/filters/DropdownFilter/index.tsx +19 -17
- package/src/filters/QuickDateFilter/index.tsx +12 -12
- package/src/filters/interfaces.ts +2 -2
- package/src/hooks/useAlert.spec.tsx +72 -0
- package/src/hooks/useAlert.ts +7 -5
- package/src/hooks/useConfig.ts +31 -0
- package/src/hooks/useConnectedList.ts +4 -4
- package/src/hooks/useConnectedRepeater.ts +8 -6
- package/src/hooks/useConnectedTable.ts +4 -4
- package/src/hooks/useFilters.ts +21 -13
- package/src/hooks/useLayout.spec.ts +3 -11
- package/src/hooks/useLayout.ts +8 -7
- package/src/hooks/useModal.spec.tsx +23 -15
- package/src/hooks/useModal.ts +17 -17
- package/src/hooks/useModalOffset.ts +4 -2
- package/src/hooks/useNavigation.ts +160 -0
- package/src/hooks/useRemote.ts +43 -0
- package/src/index.ts +31 -26
- package/src/scenes/Error404Scene.tsx +3 -1
- package/src/services/AppService.ts +16 -0
- package/src/services/ConfigService.ts +93 -0
- package/src/services/ConfirmService.ts +7 -2
- package/src/services/DateService.ts +48 -32
- package/src/services/DownloadService.spec.ts +4 -10
- package/src/services/DownloadService.ts +16 -9
- package/src/services/FilterComponentService.tsx +9 -5
- package/src/services/FilterService.spec.ts +57 -39
- package/src/services/FilterService.ts +62 -40
- package/src/services/FormatService.spec.ts +2 -0
- package/src/services/FormatService.ts +13 -8
- package/src/services/ToastService.ts +9 -4
- package/src/styles/tailwind.css +57 -0
- package/src/typings.d.ts +2 -2
- package/src/utility/MockRouter/index.ts +1 -0
- package/src/utility/icons.tsx +46 -30
- package/src/utility/interfaces.ts +39 -21
- package/src/utility/middleware.ts +10 -0
- package/src/utility/prop-types.ts +6 -2
- package/src/utility/register.tsx +11 -0
- package/tailwind.config.js +11 -0
- package/tsconfig.eslint.json +4 -0
- package/tsconfig.json +7 -15
- package/.gitattributes +0 -1
- package/.github/workflows/development.yml +0 -47
- package/.prettierrc +0 -9
- package/.storybook/manager.js +0 -4
- package/.storybook/postcss.config.js +0 -3
- package/.storybook/theme.js +0 -7
- package/.stylelintrc +0 -9
- package/__mocks__/@sqrzro/utility.ts +0 -43
- package/assets/logo-horizontal-dark.svg +0 -21
- package/assets/logo-horizontal-white.svg +0 -21
- package/assets/logo-vertical-dark.svg +0 -21
- package/assets/logo-vertical-white.svg +0 -21
- package/dist/index.css +0 -3812
- package/dist/index.js.map +0 -1
- package/dist/types/components/App/index.d.ts +0 -18
- package/dist/types/components/CalendarInput/index.d.ts +0 -10
- package/dist/types/components/CodeInput/index.d.ts +0 -9
- package/dist/types/components/ConnectedListScene/index.d.ts +0 -7
- package/dist/types/components/ConnectedScene/index.d.ts +0 -11
- package/dist/types/components/DateInput/index.d.ts +0 -7
- package/dist/types/components/Document/index.d.ts +0 -3
- package/dist/types/components/ErrorMessage/index.d.ts +0 -8
- package/dist/types/components/Fieldset/index.d.ts +0 -11
- package/dist/types/components/FilterLink/index.d.ts +0 -7
- package/dist/types/components/Form/index.d.ts +0 -14
- package/dist/types/components/FormActions/index.d.ts +0 -9
- package/dist/types/components/FormRepeater/index.d.ts +0 -9
- package/dist/types/components/InfoPanel/index.d.ts +0 -8
- package/dist/types/components/Link/index.d.ts +0 -13
- package/dist/types/components/ListActions/index.d.ts +0 -9
- package/dist/types/components/LoginForm/index.d.ts +0 -3
- package/dist/types/components/Message/index.d.ts +0 -7
- package/dist/types/components/ModalActions/index.d.ts +0 -11
- package/dist/types/components/PasswordForm/index.d.ts +0 -3
- package/dist/types/components/PasswordInput/index.d.ts +0 -4
- package/dist/types/components/Scene/index.d.ts +0 -10
- package/dist/types/components/SummaryList/index.d.ts +0 -8
- package/dist/types/components/Switch/index.d.ts +0 -9
- package/dist/types/components/Tag/index.d.ts +0 -8
- package/dist/types/components/TextArea/index.d.ts +0 -4
- package/dist/types/components/WeekCalendar/index.d.ts +0 -12
- package/dist/types/core/App/index.d.ts +0 -19
- package/dist/types/core/AppLogo/index.d.ts +0 -6
- package/dist/types/core/Assistive/index.d.ts +0 -6
- package/dist/types/core/BuildModal/index.d.ts +0 -3
- package/dist/types/core/Calendar/index.d.ts +0 -11
- package/dist/types/core/CalendarDay/index.d.ts +0 -16
- package/dist/types/core/CalendarMonth/index.d.ts +0 -12
- package/dist/types/core/CalendarNavigation/index.d.ts +0 -9
- package/dist/types/core/CalendarWeek/index.d.ts +0 -14
- package/dist/types/core/ChkRad/index.d.ts +0 -13
- package/dist/types/core/ChkRadIcon/index.d.ts +0 -7
- package/dist/types/core/CloseButton/index.d.ts +0 -9
- package/dist/types/core/ConnectedList/index.d.ts +0 -4
- package/dist/types/core/ConnectedTable/index.d.ts +0 -4
- package/dist/types/core/Container/index.d.ts +0 -7
- package/dist/types/core/DropdownPanel/index.d.ts +0 -18
- package/dist/types/core/ErrorBoundary/index.d.ts +0 -15
- package/dist/types/core/ErrorMessage/index.d.ts +0 -8
- package/dist/types/core/FilterItem/index.d.ts +0 -10
- package/dist/types/core/Filters/index.d.ts +0 -15
- package/dist/types/core/Form/index.d.ts +0 -12
- package/dist/types/core/FormError/index.d.ts +0 -6
- package/dist/types/core/FormLabel/index.d.ts +0 -8
- package/dist/types/core/FormLegend/index.d.ts +0 -6
- package/dist/types/core/Header/index.d.ts +0 -8
- package/dist/types/core/Icon/index.d.ts +0 -7
- package/dist/types/core/IconButton/Icon/index.d.ts +0 -7
- package/dist/types/core/IconButton/index.d.ts +0 -11
- package/dist/types/core/InputPanel/index.d.ts +0 -8
- package/dist/types/core/ListItemAction/index.d.ts +0 -4
- package/dist/types/core/ListItemMetaItem/index.d.ts +0 -10
- package/dist/types/core/ListItemTitle/index.d.ts +0 -9
- package/dist/types/core/Loader/index.d.ts +0 -6
- package/dist/types/core/LoginFormTwoFactor/index.d.ts +0 -13
- package/dist/types/core/MeActions/index.d.ts +0 -3
- package/dist/types/core/Modal/index.d.ts +0 -12
- package/dist/types/core/ModalComponent/index.d.ts +0 -12
- package/dist/types/core/NavigationItem/index.d.ts +0 -7
- package/dist/types/core/Pagination/index.d.ts +0 -7
- package/dist/types/core/PaginationItem/index.d.ts +0 -7
- package/dist/types/core/Panel/index.d.ts +0 -8
- package/dist/types/core/RadialProgress/index.d.ts +0 -8
- package/dist/types/core/SettingsForm/index.d.ts +0 -3
- package/dist/types/core/StaticTextInput/index.d.ts +0 -13
- package/dist/types/core/SummaryListItem/index.d.ts +0 -15
- package/dist/types/core/TableCell/index.d.ts +0 -8
- package/dist/types/core/TableHead/index.d.ts +0 -8
- package/dist/types/core/Tabs/index.d.ts +0 -11
- package/dist/types/core/TextInputAncillary/index.d.ts +0 -12
- package/dist/types/core/WeekCalendarDay/index.d.ts +0 -14
- package/dist/types/filters/BooleanFilter/index.d.ts +0 -5
- package/dist/types/filters/DateFilter/index.d.ts +0 -5
- package/dist/types/filters/DropdownFilter/index.d.ts +0 -17
- package/dist/types/filters/QuickDateFilter/index.d.ts +0 -5
- package/dist/types/hooks/useAccessiblePanel.d.ts +0 -13
- package/dist/types/hooks/useAppContext.d.ts +0 -55
- package/dist/types/hooks/useClickOutside.d.ts +0 -3
- package/dist/types/hooks/useComponentId.d.ts +0 -2
- package/dist/types/hooks/useFilters.d.ts +0 -3
- package/dist/types/hooks/useForm.d.ts +0 -41
- package/dist/types/hooks/useFormData.d.ts +0 -12
- package/dist/types/hooks/useModalOffset.d.ts +0 -2
- package/dist/types/hooks/useVariant.d.ts +0 -6
- package/dist/types/services/BuildService.d.ts +0 -5
- package/dist/types/services/DateService.d.ts +0 -17
- package/dist/types/services/DownloadService.d.ts +0 -5
- package/dist/types/services/FilterService.d.ts +0 -13
- package/dist/types/services/FormatService.d.ts +0 -7
- package/dist/types/services/OLD_ApiService.d.ts +0 -19
- package/dist/types/services/ToastService.d.ts +0 -5
- package/dist/types/utility/MockRouter/index.d.ts +0 -2
- package/dist/types/utility/StorybookPanel/index.d.ts +0 -7
- package/dist/types/utility/TestChangeHandler/index.d.ts +0 -15
- package/dist/types/utility/create-app.d.ts +0 -4
- package/dist/types/utility/icons.d.ts +0 -3
- package/docs/guides/01-installation.story.mdx +0 -33
- package/docs/guides/02-configuration.story.mdx +0 -80
- package/docs/guides/03-pages.story.mdx +0 -18
- package/docs/guides/04-integration.story.mdx +0 -33
- package/docs/guides/a11y.story.mdx +0 -7
- package/docs/guides/theming.story.mdx +0 -7
- package/docs/introduction.story.mdx +0 -17
- package/jest.config.js +0 -19
- package/rollup.config.js +0 -36
- package/scripts/create-exports.js +0 -74
- package/scripts/update-license.js +0 -8
- package/squarezero.config.js +0 -5
- package/src/components/Button/Button.module.css +0 -100
- package/src/components/CodeInput/CodeInput.module.css +0 -33
- package/src/components/CodeInput/CodeInput.spec.tsx +0 -180
- package/src/components/CodeInput/index.tsx +0 -138
- package/src/components/ConnectedScene/index.tsx +0 -96
- package/src/components/Document/index.tsx +0 -14
- package/src/components/Dropdown/Dropdown.module.css +0 -8
- package/src/components/Dropdown/Dropdown.spec.tsx +0 -304
- package/src/components/Dropdown/Dropdown.story.tsx +0 -53
- package/src/components/Dropdown/index.tsx +0 -228
- package/src/components/FormField/FormField.story.tsx +0 -29
- package/src/components/PasswordForm/PasswordForm.module.css +0 -21
- package/src/components/PasswordInput/PasswordInput.module.css +0 -23
- package/src/components/PasswordInput/PasswordInput.spec.tsx +0 -28
- package/src/components/PasswordInput/PasswordInput.story.tsx +0 -16
- package/src/components/PasswordInput/index.tsx +0 -23
- package/src/components/Scene/Scene.spec.tsx +0 -123
- package/src/components/Scene/Scene.story.tsx +0 -6
- package/src/components/Scene/index.tsx +0 -58
- package/src/components/Tag/Tag.module.css +0 -37
- package/src/components/Tag/Tag.spec.tsx +0 -10
- package/src/components/Tag/Tag.story.tsx +0 -55
- package/src/components/Tag/index.tsx +0 -27
- package/src/components/TextInput/TextInput.story.tsx +0 -24
- package/src/core/App/App.module.css +0 -24
- package/src/core/App/App.spec.tsx +0 -265
- package/src/core/App/index.tsx +0 -115
- package/src/core/Assistive/Assistive.module.css +0 -10
- package/src/core/ChkRad/ChkRad.module.css +0 -31
- package/src/core/ChkRad/ChkRad.spec.tsx +0 -79
- package/src/core/ChkRad/index.tsx +0 -75
- package/src/core/ChkRadIcon/ChkRadIcon.module.css +0 -29
- package/src/core/ChkRadIcon/index.tsx +0 -33
- package/src/core/DropdownPanel/DropdownPanel.module.css +0 -68
- package/src/core/DropdownPanel/index.tsx +0 -93
- package/src/core/ErrorBoundary/ErrorBoundary.spec.tsx +0 -33
- package/src/core/ErrorBoundary/index.tsx +0 -42
- package/src/core/FormError/FormError.module.css +0 -7
- package/src/core/FormError/index.tsx +0 -18
- package/src/core/FormLabel/FormLabel.module.css +0 -15
- package/src/core/FormLabel/index.tsx +0 -25
- package/src/core/Header/Header.module.css +0 -28
- package/src/core/InputPanel/InputPanel.module.css +0 -70
- package/src/core/InputPanel/index.tsx +0 -28
- package/src/core/Loader/Loader.story.tsx +0 -8
- package/src/core/LoginFormAuthenticator/index.tsx +0 -36
- package/src/core/LoginFormTwoFactor/index.tsx +0 -133
- package/src/core/LoginFormYubikey/index.tsx +0 -59
- package/src/core/Pagination/Pagination.module.css +0 -15
- package/src/core/PaginationItem/PaginationItem.module.css +0 -33
- package/src/core/PaginationItem/index.tsx +0 -46
- package/src/core/StaticTextInput/StaticTextInput.module.css +0 -79
- package/src/core/StaticTextInput/StaticTextInput.spec.tsx +0 -126
- package/src/core/StaticTextInput/index.tsx +0 -112
- package/src/core/Styled/Styled.spec.tsx +0 -32
- package/src/core/Styled/Styled.story.tsx +0 -10
- package/src/core/TableActionsCell/TableActionsCell.module.css +0 -3
- package/src/core/TableActionsCell/index.tsx +0 -26
- package/src/core/TableCell/TableCell.module.css +0 -16
- package/src/core/TableCell/index.tsx +0 -39
- package/src/core/TableHead/TableHead.module.css +0 -12
- package/src/core/TableHead/index.tsx +0 -48
- package/src/core/TableRow/index.tsx +0 -49
- package/src/core/TextInputAncillary/TextInputAncillary.module.css +0 -69
- package/src/core/TextInputAncillary/index.tsx +0 -84
- package/src/hooks/useAccessiblePanel.spec.tsx +0 -88
- package/src/hooks/useAccessiblePanel.ts +0 -74
- package/src/hooks/useAppContext.spec.ts +0 -38
- package/src/hooks/useAppContext.ts +0 -110
- package/src/hooks/useClickOutside.ts +0 -49
- package/src/hooks/useComponentId.spec.ts +0 -19
- package/src/hooks/useComponentId.ts +0 -16
- package/src/hooks/useForm.spec.ts +0 -251
- package/src/hooks/useForm.ts +0 -179
- package/src/hooks/useVariant.spec.ts +0 -14
- package/src/hooks/useVariant.ts +0 -34
- package/src/styles/layout.css +0 -64
- package/src/styles/variables.css +0 -85
- package/src/utility/StorybookPanel/StorybookPanel.module.css +0 -9
- package/src/utility/StorybookPanel/index.tsx +0 -25
- package/src/utility/TestChangeHandler/TestChangeHandler.module.css +0 -7
- package/src/utility/TestChangeHandler/TestChangeHandler.spec.tsx +0 -24
- package/src/utility/TestChangeHandler/index.tsx +0 -51
- package/src/utility/create-app.tsx +0 -28
- package/tests/setupFilesAfterEnv.js +0 -16
- package/tsconfig.types.json +0 -9
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ListItemTitleProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
isPreload?: boolean;
|
|
5
|
-
onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLHeadingElement>;
|
|
6
|
-
to?: string | null;
|
|
7
|
-
}
|
|
8
|
-
declare const ListItemTitle: React.FunctionComponent<ListItemTitleProps>;
|
|
9
|
-
export default ListItemTitle;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface LoginFormTwoFactorFields {
|
|
3
|
-
provider: string;
|
|
4
|
-
twofactor_code: string;
|
|
5
|
-
}
|
|
6
|
-
interface LoginFormTwoFactorProps<T = LoginFormTwoFactorFields> {
|
|
7
|
-
formData: T;
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
onSubmit: (event?: React.FormEvent<HTMLFormElement>) => void;
|
|
10
|
-
setFormData: (key: keyof T, value: T[keyof T]) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const LoginFormTwoFactor: ({ formData, isLoading, onSubmit, setFormData, }: LoginFormTwoFactorProps) => React.ReactElement;
|
|
13
|
-
export default LoginFormTwoFactor;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleVariant } from '../../utility/interfaces';
|
|
3
|
-
export interface ModalProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
title?: string;
|
|
7
|
-
variant?: StyleVariant;
|
|
8
|
-
width?: string;
|
|
9
|
-
onClose?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
|
-
}
|
|
11
|
-
declare const Modal: React.FunctionComponent<ModalProps>;
|
|
12
|
-
export default Modal;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleVariant } from '../../utility/interfaces';
|
|
3
|
-
export interface ModalComponentProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
onClose?: React.MouseEventHandler<HTMLButtonElement>;
|
|
7
|
-
title?: string;
|
|
8
|
-
variant?: StyleVariant;
|
|
9
|
-
width?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const ModalComponent: React.FunctionComponent<ModalComponentProps>;
|
|
12
|
-
export default ModalComponent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { NavigationObject } from '../../utility/interfaces';
|
|
3
|
-
interface NavigationItemProps extends NavigationObject {
|
|
4
|
-
isActive?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const NavigationItem: React.FunctionComponent<NavigationItemProps>;
|
|
7
|
-
export default NavigationItem;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PaginationObject } from '../../utility/interfaces';
|
|
3
|
-
interface PaginationProps extends PaginationObject {
|
|
4
|
-
isDisabled?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const Pagination: React.FunctionComponent<PaginationProps>;
|
|
7
|
-
export default Pagination;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { InputEvent, InputProps, InputValue } from '../../utility/interfaces';
|
|
3
|
-
interface StaticTextInputProps extends Omit<InputProps<InputValue, InputValue, HTMLButtonElement>, 'onChange'> {
|
|
4
|
-
icon?: string;
|
|
5
|
-
isOpen?: boolean;
|
|
6
|
-
isOptional?: boolean;
|
|
7
|
-
label?: string | null;
|
|
8
|
-
onChange?: (event: InputEvent<string>) => void;
|
|
9
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const StaticTextInput: React.FunctionComponent<StaticTextInputProps>;
|
|
13
|
-
export default StaticTextInput;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface SummaryListItemDefinition {
|
|
3
|
-
key?: string;
|
|
4
|
-
label?: string;
|
|
5
|
-
render?: (key: string) => React.ReactNode;
|
|
6
|
-
to?: string | null;
|
|
7
|
-
type?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare type SummaryListValue = SummaryListItemDefinition | number | string;
|
|
10
|
-
export interface SummaryListObject {
|
|
11
|
-
label: string;
|
|
12
|
-
value: SummaryListValue;
|
|
13
|
-
}
|
|
14
|
-
declare const SummaryListItem: React.FunctionComponent<SummaryListObject>;
|
|
15
|
-
export default SummaryListItem;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type Columns = Record<string, string | [string, boolean?]>;
|
|
3
|
-
interface TableCellProps {
|
|
4
|
-
value?: React.ReactElement | string;
|
|
5
|
-
isRightAligned?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const TableCell: React.FunctionComponent<TableCellProps>;
|
|
8
|
-
export default TableCell;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { TransformedColumn } from '../TableRow';
|
|
3
|
-
interface TableHeadProps {
|
|
4
|
-
hasActions?: boolean;
|
|
5
|
-
columns: TransformedColumn[];
|
|
6
|
-
}
|
|
7
|
-
declare const TableHead: React.FunctionComponent<TableHeadProps>;
|
|
8
|
-
export default TableHead;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface TabItem {
|
|
3
|
-
label: string;
|
|
4
|
-
route: string;
|
|
5
|
-
isDisabled?: boolean | ((item: TabItem, sceneData: Record<string, unknown>) => boolean) | null;
|
|
6
|
-
}
|
|
7
|
-
interface TabsProps {
|
|
8
|
-
data: TabItem[];
|
|
9
|
-
}
|
|
10
|
-
export declare const Tabs: React.FunctionComponent<TabsProps>;
|
|
11
|
-
export default Tabs;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface TextInputAncillaryProps {
|
|
3
|
-
hasError?: boolean;
|
|
4
|
-
isClearable?: boolean;
|
|
5
|
-
isLoading?: boolean;
|
|
6
|
-
onClear: () => void;
|
|
7
|
-
prefix?: string | null;
|
|
8
|
-
suffix?: string | null;
|
|
9
|
-
value: string;
|
|
10
|
-
}
|
|
11
|
-
declare const TextInputAncillary: React.FunctionComponent<TextInputAncillaryProps>;
|
|
12
|
-
export default TextInputAncillary;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface DataItem {
|
|
3
|
-
id: number;
|
|
4
|
-
datetime: string;
|
|
5
|
-
patient: {
|
|
6
|
-
name: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
interface WeekCalendarDayProps {
|
|
10
|
-
data?: DataItem[] | null;
|
|
11
|
-
date: Date;
|
|
12
|
-
}
|
|
13
|
-
declare const WeekCalendarDay: React.FunctionComponent<WeekCalendarDayProps>;
|
|
14
|
-
export default WeekCalendarDay;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FilterFieldProps, RenderSummaryArgs } from '../interfaces';
|
|
3
|
-
declare const BooleanFilter: React.FunctionComponent<FilterFieldProps>;
|
|
4
|
-
export declare const renderSummary: ({ data, value }: RenderSummaryArgs) => string;
|
|
5
|
-
export default BooleanFilter;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FilterFieldProps, RenderSummaryArgs } from '../interfaces';
|
|
3
|
-
declare const DateFilter: ({ value, ...props }: FilterFieldProps) => React.ReactElement;
|
|
4
|
-
export declare const renderSummary: ({ value }: RenderSummaryArgs) => string;
|
|
5
|
-
export default DateFilter;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type { FilterFieldProps, RenderSummaryArgs } from '../interfaces';
|
|
4
|
-
declare const DropdownFilter: {
|
|
5
|
-
({ data, extraProps, ...props }: FilterFieldProps): React.ReactElement;
|
|
6
|
-
propTypes: {
|
|
7
|
-
data: PropTypes.Requireable<string[] | PropTypes.InferProps<{
|
|
8
|
-
id: PropTypes.Validator<string | number>;
|
|
9
|
-
name: PropTypes.Validator<string>;
|
|
10
|
-
}>[]>;
|
|
11
|
-
extraProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
-
isMultiple: PropTypes.Requireable<boolean>;
|
|
13
|
-
}>>;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const renderSummary: ({ data, value }: RenderSummaryArgs) => string;
|
|
17
|
-
export default DropdownFilter;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FilterFieldProps, RenderSummaryArgs } from '../interfaces';
|
|
3
|
-
export declare const renderSummary: ({ value }: RenderSummaryArgs) => string;
|
|
4
|
-
declare const QuickDateFilter: React.FunctionComponent<FilterFieldProps>;
|
|
5
|
-
export default QuickDateFilter;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { KeyboardEventHandler } from 'react';
|
|
2
|
-
import type { InputEvent, StrictSimpleObject } from '../utility/interfaces';
|
|
3
|
-
interface UseAccessiblePanelArgs {
|
|
4
|
-
data?: StrictSimpleObject[];
|
|
5
|
-
name: string;
|
|
6
|
-
onChange?: (event: InputEvent<string>) => void;
|
|
7
|
-
value?: (number | string)[] | number | string;
|
|
8
|
-
}
|
|
9
|
-
interface UseAccessiblePanelReturn<T> {
|
|
10
|
-
handleKeyboard: KeyboardEventHandler<T>;
|
|
11
|
-
}
|
|
12
|
-
declare const useAccessiblePanel: <E = HTMLInputElement | HTMLButtonElement>({ data, name, onChange, value, }: UseAccessiblePanelArgs) => UseAccessiblePanelReturn<E>;
|
|
13
|
-
export default useAccessiblePanel;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { NavigationObject } from '../utility/interfaces';
|
|
3
|
-
export interface Me {
|
|
4
|
-
name: string;
|
|
5
|
-
permissions?: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare enum AppLayout {
|
|
8
|
-
sidebar = "sidebar",
|
|
9
|
-
topbar = "topbar"
|
|
10
|
-
}
|
|
11
|
-
export declare enum AuthIdentifier {
|
|
12
|
-
email = "email",
|
|
13
|
-
username = "username"
|
|
14
|
-
}
|
|
15
|
-
export interface AuthObject {
|
|
16
|
-
identifier: AuthIdentifier;
|
|
17
|
-
identifierLabel: string;
|
|
18
|
-
loginUrl: string;
|
|
19
|
-
meUrl: string;
|
|
20
|
-
passwordUrl: string;
|
|
21
|
-
tfa: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface AppContextObject {
|
|
24
|
-
auth: AuthObject;
|
|
25
|
-
Logo?: React.ComponentType;
|
|
26
|
-
me?: Me;
|
|
27
|
-
name: string;
|
|
28
|
-
navigation: (NavigationObject | string)[];
|
|
29
|
-
paths: {
|
|
30
|
-
api: string;
|
|
31
|
-
};
|
|
32
|
-
style: {
|
|
33
|
-
brand?: string;
|
|
34
|
-
isDarkMode?: boolean;
|
|
35
|
-
layout: AppLayout;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export interface Config {
|
|
39
|
-
auth?: Partial<AppContextObject['auth']>;
|
|
40
|
-
Logo?: AppContextObject['Logo'];
|
|
41
|
-
me?: AppContextObject['me'];
|
|
42
|
-
name: string;
|
|
43
|
-
navigation?: AppContextObject['navigation'];
|
|
44
|
-
paths?: Partial<AppContextObject['paths']>;
|
|
45
|
-
style?: Partial<AppContextObject['style']>;
|
|
46
|
-
}
|
|
47
|
-
export declare const defaultAppContext: AppContextObject;
|
|
48
|
-
export declare const getAppContextFromConfig: (config: Config) => AppContextObject;
|
|
49
|
-
interface AppContextProviderProps {
|
|
50
|
-
children: React.ReactNode;
|
|
51
|
-
value: AppContextObject;
|
|
52
|
-
}
|
|
53
|
-
export declare const AppContextProvider: ({ children, value, }: AppContextProviderProps) => React.ReactElement;
|
|
54
|
-
declare const useAppContext: () => AppContextObject;
|
|
55
|
-
export default useAppContext;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ApiMethod, ApiResponse, ApiUrl } from '@sqrzro/utility';
|
|
3
|
-
import type { InputEvent } from '../utility/interfaces';
|
|
4
|
-
interface FormProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
onSubmit: (event?: React.FormEvent<HTMLFormElement>) => void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Why the `$` before `onChange`. To enable fields to have additional `onChange` behaviour, but
|
|
10
|
-
* still let `useForm` handle the basics of changing the `formData`. This behaviour is handled in
|
|
11
|
-
* the `FormField` component.
|
|
12
|
-
*/
|
|
13
|
-
interface FieldPropsReturn<T, K extends keyof T = keyof T> {
|
|
14
|
-
error?: string;
|
|
15
|
-
name: string;
|
|
16
|
-
$onChange: (event: InputEvent) => void;
|
|
17
|
-
value: T[K];
|
|
18
|
-
}
|
|
19
|
-
interface UseFormArgs<T, R> {
|
|
20
|
-
defaults?: T;
|
|
21
|
-
errorMessage?: string | false;
|
|
22
|
-
hasFieldErrors?: boolean;
|
|
23
|
-
method?: ApiMethod;
|
|
24
|
-
onSubmitError?: (error: unknown, formData?: T, setFormData?: (key: keyof T, value: T[keyof T]) => void) => void;
|
|
25
|
-
onSubmitSuccess?: (response: ApiResponse<R>, formData?: T, setFormData?: (key: keyof T, value: T[keyof T]) => void) => void;
|
|
26
|
-
successMessage?: string | false;
|
|
27
|
-
transformErrors?: (errors: Record<string, string>) => Record<string, string>;
|
|
28
|
-
transformRequest?: (data: T) => Record<string, unknown>;
|
|
29
|
-
url?: ApiUrl;
|
|
30
|
-
}
|
|
31
|
-
export interface UseFormReturn<T> {
|
|
32
|
-
errors: Record<string, string>;
|
|
33
|
-
fieldProps: <K extends keyof T>(name: K) => FieldPropsReturn<T, K>;
|
|
34
|
-
formData: T;
|
|
35
|
-
formProps: Omit<FormProps, 'children'>;
|
|
36
|
-
handleSubmit: (event?: React.FormEvent<HTMLFormElement>) => void;
|
|
37
|
-
isLoading: boolean;
|
|
38
|
-
setFormData: (key: keyof T, value: T[keyof T]) => void;
|
|
39
|
-
}
|
|
40
|
-
declare const useForm: <T extends object, R = T>({ defaults, errorMessage, hasFieldErrors, method, onSubmitError, onSubmitSuccess, successMessage, transformErrors, transformRequest, url, }: UseFormArgs<T, R>) => UseFormReturn<T>;
|
|
41
|
-
export default useForm;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { InputValue } from '../utility/interfaces';
|
|
2
|
-
export interface FormDataArgs {
|
|
3
|
-
data?: Record<string, InputValue>;
|
|
4
|
-
defaults?: Record<string, InputValue>;
|
|
5
|
-
fields?: string[];
|
|
6
|
-
}
|
|
7
|
-
export interface FormDataObject {
|
|
8
|
-
data: Record<string, InputValue>;
|
|
9
|
-
setData: (key: string, value: InputValue) => void;
|
|
10
|
-
}
|
|
11
|
-
declare const useFormData: ({ data, defaults, fields }: FormDataArgs) => FormDataObject;
|
|
12
|
-
export default useFormData;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { StyleVariant } from '../utility/interfaces';
|
|
2
|
-
interface UseVariantReturn {
|
|
3
|
-
applyVariantClassName: (styles: Record<string, string>, prefix?: string) => string | null;
|
|
4
|
-
}
|
|
5
|
-
declare const useVariant: <T = StyleVariant>(variant?: T | T[] | undefined) => UseVariantReturn;
|
|
6
|
-
export default useVariant;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { StrictSimpleObject } from '../utility/interfaces';
|
|
2
|
-
interface DateItem {
|
|
3
|
-
id: number;
|
|
4
|
-
name: string | null;
|
|
5
|
-
}
|
|
6
|
-
declare const DateService: {
|
|
7
|
-
addMonths: (date: string, amount: number) => string;
|
|
8
|
-
getDaysInMonth: (date: string) => number;
|
|
9
|
-
getDayOfWeek: (date: string) => number;
|
|
10
|
-
getDays: () => DateItem[];
|
|
11
|
-
getMonths: () => DateItem[];
|
|
12
|
-
getQuickDates: () => StrictSimpleObject[];
|
|
13
|
-
getYears: (startYear?: number, endYear?: number) => DateItem[];
|
|
14
|
-
isToday: (date: string) => boolean;
|
|
15
|
-
subMonths: (date: string, amount: number) => string;
|
|
16
|
-
};
|
|
17
|
-
export default DateService;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface Query {
|
|
2
|
-
[key: string]: Query | Query[] | string[] | string;
|
|
3
|
-
}
|
|
4
|
-
export declare type FilterMap = Map<string, string[] | string>;
|
|
5
|
-
export interface FilterOptions {
|
|
6
|
-
shouldFilterPage?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: {
|
|
9
|
-
getUrlForFilters: (data?: Query | undefined, includePathname?: boolean) => string;
|
|
10
|
-
makeUrl: (data: FilterMap, includePathname?: boolean) => string;
|
|
11
|
-
parseQuery: (query?: Query | undefined, options?: FilterOptions | undefined) => FilterMap;
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface ApiResponse<T> {
|
|
2
|
-
data: T;
|
|
3
|
-
headers: Headers;
|
|
4
|
-
ok: boolean;
|
|
5
|
-
originalResponse: Response;
|
|
6
|
-
redirected: boolean;
|
|
7
|
-
status: number;
|
|
8
|
-
statusText: string;
|
|
9
|
-
type: string;
|
|
10
|
-
url: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ApiValidationErrorResponse {
|
|
13
|
-
}
|
|
14
|
-
declare const ApiService: {
|
|
15
|
-
get: <T>(url: string) => Promise<ApiResponse<T>>;
|
|
16
|
-
getErrorsFromResponse: (error: Error) => Record<string, string>;
|
|
17
|
-
request: <T_1 = Record<string, unknown>>(method: string, url: string) => Promise<ApiResponse<T_1>>;
|
|
18
|
-
};
|
|
19
|
-
export default ApiService;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type { InputValue } from '../interfaces';
|
|
4
|
-
interface TestChangeHandlerProps<T> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
defaultValue?: T;
|
|
7
|
-
}
|
|
8
|
-
declare const TestChangeHandler: {
|
|
9
|
-
<T extends InputValue>({ children, defaultValue, }: TestChangeHandlerProps<T>): React.ReactElement;
|
|
10
|
-
propTypes: {
|
|
11
|
-
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
12
|
-
defaultValue: PropTypes.Requireable<string | boolean | (string | boolean)[]>;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export default TestChangeHandler;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
-
|
|
3
|
-
<Meta title="Guides/Installation" />
|
|
4
|
-
|
|
5
|
-
# Installation
|
|
6
|
-
|
|
7
|
-
The easiest way to get started is to use Square Zero with the following command:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
npx squarezero new example-project —template=admin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Square Zero is a command line tool for quickly generating React and Next.js projects of all shapes and sizes. [You can find out more about Square Zero here](https://sqrzro.com). Handily, it comes with a default template for Square Zero Admin.
|
|
14
|
-
|
|
15
|
-
Running the above command will create a directory named ‘example-project’, and install a basic admin framework into it, including all dependencies.
|
|
16
|
-
|
|
17
|
-
Now you’ll need to update the config file to define certain variables, such as the URL for your backend API, navigation links, general look and feel of the admin, and so on. [You can find a full list of configuration options here](/story/guides-configuration--page), and more [information specifically about the navigation options here](/story/guides-pages-routing--page). The config file is located at `src/config/index.js`. You will find some predefined values there. Feel free to edit those, and add others, to get the admin panel how you would like it.
|
|
18
|
-
|
|
19
|
-
### A note about API paths
|
|
20
|
-
|
|
21
|
-
As you can see from the config file, by default the API path is set to read from an ‘env.js’ file included in the root. This file is excluded from git, and allows you to define different backend URLs for the same admin panel in different environments. I.e. local, staging, and production versions can all point to different backend URLs.
|
|
22
|
-
|
|
23
|
-
Now that your admin panel is installed and your config updated, you should be able to run the following in the root directory:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
yarn start
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
This will start an instance of the admin system at http://localhost:8080, which you can visit in a browser. At the moment, there will simply be a login screen and a blank Dashboard page. For more information about [integrating your backend to enable authentication, click here](/story/guides-integration-with-api--page). If you’ve got that all set up and you’d like to start [adding your own pages, you can head over to here](/story/guides-pages-routing--page).
|
|
30
|
-
|
|
31
|
-
## Manual Installation
|
|
32
|
-
|
|
33
|
-
Although it is strongly advised that you install Square Zero Admin via the method above, there are potentially a few cases where you would want to install it manually. Full documentation for this is coming soon.
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
-
|
|
3
|
-
<Meta title="Guides/Configuration" />
|
|
4
|
-
|
|
5
|
-
# Configuration
|
|
6
|
-
|
|
7
|
-
The config file is located at `src/config/index.js`. Below is a full list of every configuration option available:
|
|
8
|
-
|
|
9
|
-
## auth
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
auth: {
|
|
13
|
-
identifier?: string;
|
|
14
|
-
identifierLabel?: string;
|
|
15
|
-
tfa?: boolean;
|
|
16
|
-
} | null;
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
By default, the login form uses a field name of `username` for the identifier. However, there might be situations where you would want to use `email` or something else. In that instance, you can set `auth.identifier` (the field name) and `auth.identifierLabel` (the field label) to set an alternative.
|
|
20
|
-
|
|
21
|
-
`tfa` (set to false by default) defines whether or not your backend API supports two-factor authentication.
|
|
22
|
-
|
|
23
|
-
## Logo
|
|
24
|
-
|
|
25
|
-
```jsx
|
|
26
|
-
Logo: React.ComponentType | null;
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
If not null, `Logo` is a React component that returns an image. The logo sits on top of the colour defined in the `style.brand` configuration option.
|
|
30
|
-
|
|
31
|
-
## name
|
|
32
|
-
|
|
33
|
-
```jsx
|
|
34
|
-
name: string;
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
The name of the site. This is the only config option that is required, and is used in the page titles.
|
|
38
|
-
|
|
39
|
-
## navigation
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
navigation: (NavigationObject | string)[];
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
An array of items that will be in the primary navigation of the site. The item can either be a ‘-’, in which case a divider will be rendered, or a `NavigationObject` which is defined as:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
NavigationObject {
|
|
49
|
-
label: string;
|
|
50
|
-
to?: string | null;
|
|
51
|
-
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
|
|
52
|
-
permission?: string;
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Technically the only thing a `NavigationObject` requires is a `label`, which will be the text that is displayed on the link. The object will then need one of two things - a `to` value, which will point to the URL you would like the link to go, or a `onClick` value, which will define what function is triggered when the link is clicked. It is entirely possible to include both of these options.
|
|
57
|
-
|
|
58
|
-
`permission` controls which admin user can or can’t see the particular object. Permissions are explained in more detail on the [API Integration page](/story/guides-integration-with-api--page).
|
|
59
|
-
|
|
60
|
-
## paths
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
paths: { api?: string; app?: string };
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
The `paths.api` defines where your backend API is located. As you can see from the config file, by default the API path is set to read from an ‘env.js’ file included in the root. This file is excluded from git, and allows you to define different backend URLs for the same admin panel in different environments. I.e. local, staging, and production versions can all point to different backend URLs.
|
|
67
|
-
|
|
68
|
-
The `paths.app` defines where your application itself is located, assuming it is not at the root of a domain. This can usually be omitted but if, for example, you would like your application to be hosted at https://example.com/admin/, you would define `paths.app` as `admin`. This would ensure all links and redirects within the app go to the right place.
|
|
69
|
-
|
|
70
|
-
## style
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
style: { brand?: string; layout?: string } | null;
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The `style.brand` value is simply a hexcode which defines the background colour for the logos throughout the site.
|
|
77
|
-
|
|
78
|
-
`style.layout` can either be omitted, or be defined as ‘topbar’. If omitted, the layout of the application will appear in a traditional dashboard way - with the navigation running vertically along the left hand side of the page, and the content to the right. If, however, it is defined as ‘topbar’, the navigation runs horizontally across the top of the page.
|
|
79
|
-
|
|
80
|
-
More style options may be added in future versions. However, it is an important tenet of Square Zero Admin that it does not offer too much customisation, in order to allow developers to focus on building pages rather than concerning themselves with style decisions.
|