1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00
foris-js/src/index.js

103 lines
3.3 KiB
JavaScript
Raw Permalink Normal View History

2019-09-26 12:23:22 +02:00
/*
2024-06-06 16:57:08 +02:00
* Copyright (C) 2019-2024 CZ.NIC z.s.p.o. (https://www.nic.cz/)
2019-09-26 12:23:22 +02:00
*
* This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information.
*/
2019-08-27 16:09:18 +02:00
// API
export {
2019-11-15 12:54:12 +01:00
useAPIGet,
useAPIPost,
useAPIPatch,
useAPIPut,
useAPIDelete,
useAPIPolling,
2019-12-26 23:34:59 +01:00
} from "./api/hooks";
export { API_STATE } from "./api/utils";
2019-08-23 15:20:22 +02:00
2019-08-27 11:54:57 +02:00
// Bootstrap
2024-06-06 16:57:08 +02:00
export { default as Alert, ALERT_TYPES } from "./bootstrap/Alert";
export { default as Button } from "./bootstrap/Button";
export { default as CheckBox } from "./bootstrap/CheckBox";
export { default as CopyInput } from "./bootstrap/CopyInput";
export { default as DownloadButton } from "./bootstrap/DownloadButton";
export { default as DataTimeInput } from "./bootstrap/DataTimeInput";
export { default as EmailInput } from "./bootstrap/EmailInput";
export { default as FileInput } from "./bootstrap/FileInput";
export { default as Input } from "./bootstrap/Input";
export { default as NumberInput } from "./bootstrap/NumberInput";
export { default as PasswordInput } from "./bootstrap/PasswordInput";
export { default as RadioSet, Radio } from "./bootstrap/RadioSet";
export { default as Select } from "./bootstrap/Select";
export { default as TextInput } from "./bootstrap/TextInput";
export { formFieldsSize, buttonFormFieldsSize } from "./bootstrap/constants";
2024-06-06 16:57:08 +02:00
export { default as Switch } from "./bootstrap/Switch";
2019-08-27 17:46:45 +02:00
2020-08-18 10:13:57 +02:00
export { Spinner, SpinnerElement } from "./bootstrap/Spinner";
export { Modal, ModalBody, ModalFooter, ModalHeader } from "./bootstrap/Modal";
2019-08-27 16:09:18 +02:00
// Common
2024-06-06 16:57:08 +02:00
export { default as RebootButton } from "./common/RebootButton";
export { default as WiFiSettings } from "./common/WiFiSettings/WiFiSettings";
export { default as ResetWiFiSettings } from "./common/WiFiSettings/ResetWiFiSettings";
2019-08-27 11:54:57 +02:00
// Form
2024-06-06 16:57:08 +02:00
export { default as ForisForm } from "./form/components/ForisForm";
2020-08-18 10:13:57 +02:00
export {
SubmitButton,
STATES as SUBMIT_BUTTON_STATES,
} from "./form/components/SubmitButton";
2019-12-26 23:34:59 +01:00
export { useForisModule, useForm } from "./form/hooks";
2019-08-27 16:09:18 +02:00
2019-08-27 11:54:57 +02:00
// WebSockets
2024-06-06 16:57:08 +02:00
export { default as useWSForisModule } from "./webSockets/hooks";
export { default as WebSockets } from "./webSockets/WebSockets";
2019-08-27 11:54:57 +02:00
// Utils
2024-06-06 16:57:08 +02:00
export { default as Portal } from "./utils/Portal";
2019-11-07 18:21:14 +01:00
export {
2020-08-18 10:13:57 +02:00
undefinedIfEmpty,
withoutUndefinedKeys,
onlySpecifiedKeys,
} from "./utils/objectHelpers";
export {
withEither,
withSpinner,
withSending,
withSpinnerOnSending,
withError,
withErrorMessage,
2019-12-26 23:34:59 +01:00
} from "./utils/conditionalHOCs";
2024-06-06 16:57:08 +02:00
export { default as ErrorMessage } from "./utils/ErrorMessage";
2024-04-30 13:37:25 +02:00
export { useClickOutside } from "./utils/hooks";
2024-06-06 16:57:08 +02:00
export { default as toLocaleDateString } from "./utils/datetime";
export { default as displayCard } from "./utils/displayCard";
export { default as isPluginInstalled } from "./utils/isPluginInstalled";
2019-08-27 11:54:57 +02:00
// Foris URL
export { ForisURLs, REFORIS_URL_PREFIX } from "./utils/forisUrls";
2019-08-27 16:09:18 +02:00
2019-08-27 11:54:57 +02:00
// Validation
2019-08-23 15:20:22 +02:00
export {
2019-08-27 11:54:57 +02:00
validateIPv4Address,
validateIPv6Address,
validateIPv6Prefix,
validateDomain,
validateHostname,
2019-08-27 11:54:57 +02:00
validateDUID,
validateMAC,
validateMultipleEmails,
} from "./utils/validations";
// Alert context
2022-12-22 15:14:32 +01:00
export {
AlertContextProvider,
useAlert,
} from "./context/alertContext/AlertContext";
// Customization context
export {
CustomizationContextProvider,
useCustomizationContext,
2022-12-22 15:14:32 +01:00
} from "./context/customizationContext/CustomizationContext";