@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 12.0.16-alpha.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/README.md +401 -1
- package/lib/cdm-locales/en/settings.json +40 -1
- package/lib/cdm-locales/es/settings.json +42 -3
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +8 -18
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -8
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +140 -64
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +1 -14
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -14
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +78 -53
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Logo.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/Logo.js +141 -0
- package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +6 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js +228 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +4 -4
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +2 -16
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +23 -0
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js +274 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js +118 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +7 -3
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts +1 -31
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js +51 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -11
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +117 -78
- package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +132 -45
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +34 -14
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.d.ts +1 -16
- package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
- package/lib/components/Layout/getPageTitle.js +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +4 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
- package/lib/components/Layout/slot-fill/Footer.d.ts +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +6 -6
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +3 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +3 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts +3 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.js +6 -0
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +4 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.d.ts.map +1 -1
- package/lib/components/Layout/util.js +12 -0
- package/lib/components/Layout/util.js.map +1 -0
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/InvitationSettings.d.ts +3 -0
- package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/InvitationSettings.js +79 -0
- package/lib/components/SettingDrawer/InvitationSettings.js.map +1 -0
- package/lib/components/SettingDrawer/LayoutChange.d.ts +2 -6
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.js +84 -30
- package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/NavigationsModes.js +289 -0
- package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +696 -51
- package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -25
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +249 -113
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.js +17 -34
- package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.js +3 -0
- package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
- package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/WebFontsSelector.js +24 -0
- package/lib/components/SettingDrawer/WebFontsSelector.js.map +1 -0
- package/lib/components/SettingDrawer/types.d.ts +91 -0
- package/lib/components/SettingDrawer/types.d.ts.map +1 -0
- package/lib/components/UI/CardList.d.ts +61 -0
- package/lib/components/UI/CardList.d.ts.map +1 -0
- package/lib/components/UI/CardList.js +43 -0
- package/lib/components/UI/CardList.js.map +1 -0
- package/lib/components/UI/CategoriesTypeList.d.ts +29 -0
- package/lib/components/UI/CategoriesTypeList.d.ts.map +1 -0
- package/lib/components/UI/CategoriesTypeList.js +140 -0
- package/lib/components/UI/CategoriesTypeList.js.map +1 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +83 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +1 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.js +107 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.js.map +1 -0
- package/lib/components/UI/Pagination.d.ts +6 -0
- package/lib/components/UI/Pagination.d.ts.map +1 -0
- package/lib/components/UI/Pagination.js +59 -0
- package/lib/components/UI/Pagination.js.map +1 -0
- package/lib/components/UI/ParamSearchResultContainer.d.ts +99 -0
- package/lib/components/UI/ParamSearchResultContainer.d.ts.map +1 -0
- package/lib/components/UI/ParamSearchResultContainer.js +120 -0
- package/lib/components/UI/ParamSearchResultContainer.js.map +1 -0
- package/lib/components/UI/PropertyCard.d.ts +24 -0
- package/lib/components/UI/PropertyCard.d.ts.map +1 -0
- package/lib/components/UI/PropertyCard.js +417 -0
- package/lib/components/UI/PropertyCard.js.map +1 -0
- package/lib/components/UI/PropertyCardOnMap.d.ts +10 -0
- package/lib/components/UI/PropertyCardOnMap.d.ts.map +1 -0
- package/lib/components/UI/PropertyCardOnMap.js +108 -0
- package/lib/components/UI/PropertyCardOnMap.js.map +1 -0
- package/lib/components/UI/VehicleCard/PricePopover.d.ts +8 -0
- package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/PricePopover.js +98 -0
- package/lib/components/UI/VehicleCard/PricePopover.js.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +7 -0
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +9 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.js +23 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.js.map +1 -0
- package/lib/components/UI/VehicleCard/types.d.ts +59 -0
- package/lib/components/UI/VehicleCard/types.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard.d.ts +15 -0
- package/lib/components/UI/VehicleCard.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard.js +166 -0
- package/lib/components/UI/VehicleCard.js.map +1 -0
- package/lib/components/UI/VehicleCardList.d.ts +14 -0
- package/lib/components/UI/VehicleCardList.d.ts.map +1 -0
- package/lib/components/UI/VehicleCardList.js +38 -0
- package/lib/components/UI/VehicleCardList.js.map +1 -0
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +90 -0
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +1 -0
- package/lib/components/UI/icons/LocationIcon.d.ts +7 -0
- package/lib/components/UI/icons/LocationIcon.d.ts.map +1 -0
- package/lib/components/UI/icons/LocationIcon.js +18 -0
- package/lib/components/UI/icons/LocationIcon.js.map +1 -0
- package/lib/components/UI/icons/index.d.ts +2 -0
- package/lib/components/UI/icons/index.d.ts.map +1 -0
- package/lib/components/UI/index.d.ts +10 -0
- package/lib/components/UI/index.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +11 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/typings.d.ts +139 -49
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/components/typings.js +6 -0
- package/lib/components/typings.js.map +1 -0
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +6 -4
- package/lib/compute.js.map +1 -1
- package/lib/config/analytics-config.d.ts +59 -0
- package/lib/config/analytics-config.d.ts.map +1 -0
- package/lib/config/constants.d.ts +8 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +32 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/config/env-config.d.ts +18 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +76 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/helpers/DynamicIcon.d.ts +7 -4
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +51 -0
- package/lib/helpers/DynamicIcon.js.map +1 -0
- package/lib/hooks/index.d.ts +6 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/use-get-current-lat-long.d.ts +18 -0
- package/lib/hooks/use-get-current-lat-long.d.ts.map +1 -0
- package/lib/hooks/use-get-current-lat-long.js +29 -0
- package/lib/hooks/use-get-current-lat-long.js.map +1 -0
- package/lib/hooks/useMediaQuery.d.ts +14 -0
- package/lib/hooks/useMediaQuery.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.js +48 -0
- package/lib/hooks/useMediaQuery.js.map +1 -0
- package/lib/hooks/useScrollThreshold.d.ts +12 -0
- package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
- package/lib/hooks/useScrollThreshold.js +60 -0
- package/lib/hooks/useScrollThreshold.js.map +1 -0
- package/lib/hooks/useTailwindTheme.d.ts +34 -0
- package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
- package/lib/hooks/useTailwindTheme.js +82 -0
- package/lib/hooks/useTailwindTheme.js.map +1 -0
- package/lib/hooks/useWindowSize.d.ts +6 -0
- package/lib/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/hooks/useWindowSize.js +20 -0
- package/lib/hooks/useWindowSize.js.map +1 -0
- package/lib/icons.d.ts +16 -0
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +12 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts +6 -0
- package/lib/machines/settingsMachine.d.ts.map +1 -0
- package/lib/machines/settingsMachine.js +206 -0
- package/lib/machines/settingsMachine.js.map +1 -0
- package/lib/machines/types.d.ts +174 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/machines/types.js +5 -0
- package/lib/machines/types.js.map +1 -0
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +6 -0
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts +6 -0
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +1 -0
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +7 -0
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/datasourcesMiddleware.d.ts +6 -0
- package/lib/middlewares/datasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +7 -0
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/module.d.ts +0 -1
- package/lib/module.d.ts.map +1 -1
- package/lib/module.js +14 -15
- package/lib/module.js.map +1 -1
- package/lib/redux/index.d.ts +2 -0
- package/lib/redux/index.d.ts.map +1 -0
- package/lib/redux/searchReducer.d.ts +42 -0
- package/lib/redux/searchReducer.d.ts.map +1 -0
- package/lib/redux/searchReducer.js +64 -0
- package/lib/redux/searchReducer.js.map +1 -0
- package/lib/routes.json +1 -0
- package/lib/styles/index-bk.css +443 -0
- package/lib/styles/index.css +667 -45
- package/lib/tailwindConfig.d.ts +100 -0
- package/lib/tailwindConfig.d.ts.map +1 -0
- package/lib/tailwindConfig.js +101 -0
- package/lib/tailwindConfig.js.map +1 -0
- package/lib/utils/analytics-utils.d.ts +43 -0
- package/lib/utils/analytics-utils.d.ts.map +1 -0
- package/lib/utils/analytics.d.ts +48 -0
- package/lib/utils/analytics.d.ts.map +1 -0
- package/lib/utils/formateCarData.d.ts +2 -0
- package/lib/utils/formateCarData.d.ts.map +1 -0
- package/lib/utils/menu.d.ts.map +1 -1
- package/lib/utils/test-utils.d.ts.map +1 -1
- package/lib/utils/utils/index.d.ts.map +1 -1
- package/package.json +7 -5
- package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
- package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
- package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
- package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
- package/lib/components/defaultSettings.d.ts +0 -4
- package/lib/components/defaultSettings.d.ts.map +0 -1
- package/lib/components/defaultSettings.js +0 -14
- package/lib/components/defaultSettings.js.map +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -13
- package/lib/utils/index.js.map +0 -1
|
@@ -1,94 +1,739 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';function RegionalSettings(props) {
|
|
2
|
-
const {
|
|
3
|
-
settings,
|
|
4
|
-
changeSetting
|
|
5
|
-
} = props;
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import {SearchBarBehavior}from'../../machines/types.js';import {config}from'../../config/env-config.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import'../../hooks/use-get-current-lat-long.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';function RegionalSettings(props) {
|
|
6
2
|
const {
|
|
7
3
|
t
|
|
8
4
|
} = useTranslation('settings');
|
|
9
5
|
const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
settings,
|
|
7
|
+
changeSetting,
|
|
8
|
+
location
|
|
9
|
+
} = props;
|
|
10
|
+
const {
|
|
15
11
|
navTheme
|
|
16
|
-
} = settings;
|
|
12
|
+
} = settings || {};
|
|
13
|
+
const currentRoute = location?.pathname || '/';
|
|
14
|
+
const {
|
|
15
|
+
regions = {}
|
|
16
|
+
} = settings?.routeSettings?.[currentRoute] || {};
|
|
17
|
+
const [isHeaderExpanded, setIsHeaderExpanded] = React.useState(false);
|
|
18
|
+
const [isBackgroundExpanded, setIsBackgroundExpanded] = React.useState(true);
|
|
19
|
+
const [activeBackgroundTab, setActiveBackgroundTab] = React.useState('desktop');
|
|
20
|
+
const [activeHeaderTab, setActiveHeaderTab] = React.useState('desktop');
|
|
21
|
+
const {
|
|
22
|
+
isMobile
|
|
23
|
+
} = useMediaQuery();
|
|
24
|
+
const scrollThresholdConfig = JSON.parse(config.SCROLL_THRESHOLD);
|
|
25
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
26
|
+
const handleRegionChange = (key, value) => {
|
|
27
|
+
if (!changeSetting) return;
|
|
28
|
+
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.header`, {
|
|
29
|
+
...regions[deviceType]?.header,
|
|
30
|
+
[key]: value
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
const handleRegionFooterChange = (key, value) => {
|
|
34
|
+
if (!changeSetting) return;
|
|
35
|
+
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.footer`, {
|
|
36
|
+
...regions[deviceType]?.footer,
|
|
37
|
+
[key]: value
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const handleBackgroundChange = (property, value) => {
|
|
41
|
+
if (!changeSetting) return;
|
|
42
|
+
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.background`, {
|
|
43
|
+
...regions[deviceType].background,
|
|
44
|
+
[property]: value
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const handleHeaderChange = (element, value) => {
|
|
48
|
+
if (!changeSetting) return;
|
|
49
|
+
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.header`, {
|
|
50
|
+
...regions[deviceType]?.header,
|
|
51
|
+
[element]: value
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const header = regions[deviceType]?.header;
|
|
55
|
+
const background = regions[deviceType]?.background;
|
|
56
|
+
// Helper function to render background settings based on current active tab
|
|
57
|
+
const renderBackgroundSettings = () => {
|
|
58
|
+
return jsxs(Fragment, {
|
|
59
|
+
children: [jsxs("div", {
|
|
60
|
+
className: "mb-4",
|
|
61
|
+
children: [jsx("p", {
|
|
62
|
+
className: "font-medium mb-2",
|
|
63
|
+
style: {
|
|
64
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
65
|
+
},
|
|
66
|
+
children: t('background_type')
|
|
67
|
+
}), jsxs("div", {
|
|
68
|
+
className: "flex mb-3 rounded-lg overflow-hidden border border-gray-200 divide-x divide-gray-200 bg-gray-50",
|
|
69
|
+
children: [jsxs("button", {
|
|
70
|
+
className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background?.type === 'color' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
|
|
71
|
+
onClick: () => handleBackgroundChange('type', 'color'),
|
|
72
|
+
children: [jsx("span", {
|
|
73
|
+
className: "mr-1",
|
|
74
|
+
children: jsxs("svg", {
|
|
75
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
76
|
+
width: "16",
|
|
77
|
+
height: "16",
|
|
78
|
+
viewBox: "0 0 24 24",
|
|
79
|
+
fill: "none",
|
|
80
|
+
stroke: "currentColor",
|
|
81
|
+
strokeWidth: "2",
|
|
82
|
+
strokeLinecap: "round",
|
|
83
|
+
strokeLinejoin: "round",
|
|
84
|
+
children: [jsx("circle", {
|
|
85
|
+
cx: "12",
|
|
86
|
+
cy: "12",
|
|
87
|
+
r: "10"
|
|
88
|
+
}), jsx("path", {
|
|
89
|
+
d: "M12 8v8M8 12h8"
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
}), t('color')]
|
|
93
|
+
}), jsxs("button", {
|
|
94
|
+
className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background?.type === 'image' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
|
|
95
|
+
onClick: () => handleBackgroundChange('type', 'image'),
|
|
96
|
+
children: [jsx("span", {
|
|
97
|
+
className: "mr-1",
|
|
98
|
+
children: jsxs("svg", {
|
|
99
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
100
|
+
width: "16",
|
|
101
|
+
height: "16",
|
|
102
|
+
viewBox: "0 0 24 24",
|
|
103
|
+
fill: "none",
|
|
104
|
+
stroke: "currentColor",
|
|
105
|
+
strokeWidth: "2",
|
|
106
|
+
strokeLinecap: "round",
|
|
107
|
+
strokeLinejoin: "round",
|
|
108
|
+
children: [jsx("rect", {
|
|
109
|
+
x: "3",
|
|
110
|
+
y: "3",
|
|
111
|
+
width: "18",
|
|
112
|
+
height: "18",
|
|
113
|
+
rx: "2",
|
|
114
|
+
ry: "2"
|
|
115
|
+
}), jsx("circle", {
|
|
116
|
+
cx: "8.5",
|
|
117
|
+
cy: "8.5",
|
|
118
|
+
r: "1.5"
|
|
119
|
+
}), jsx("polyline", {
|
|
120
|
+
points: "21 15 16 10 5 21"
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
}), t('image')]
|
|
124
|
+
}), jsxs("button", {
|
|
125
|
+
className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background?.type === 'video' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
|
|
126
|
+
onClick: () => handleBackgroundChange('type', 'video'),
|
|
127
|
+
children: [jsx("span", {
|
|
128
|
+
className: "mr-1",
|
|
129
|
+
children: jsxs("svg", {
|
|
130
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
131
|
+
width: "16",
|
|
132
|
+
height: "16",
|
|
133
|
+
viewBox: "0 0 24 24",
|
|
134
|
+
fill: "none",
|
|
135
|
+
stroke: "currentColor",
|
|
136
|
+
strokeWidth: "2",
|
|
137
|
+
strokeLinecap: "round",
|
|
138
|
+
strokeLinejoin: "round",
|
|
139
|
+
children: [jsx("polygon", {
|
|
140
|
+
points: "23 7 16 12 23 17 23 7"
|
|
141
|
+
}), jsx("rect", {
|
|
142
|
+
x: "1",
|
|
143
|
+
y: "5",
|
|
144
|
+
width: "15",
|
|
145
|
+
height: "14",
|
|
146
|
+
rx: "2",
|
|
147
|
+
ry: "2"
|
|
148
|
+
})]
|
|
149
|
+
})
|
|
150
|
+
}), t('video')]
|
|
151
|
+
})]
|
|
152
|
+
})]
|
|
153
|
+
}), background?.type === 'color' && jsxs("div", {
|
|
154
|
+
className: "mb-4",
|
|
155
|
+
children: [jsx("p", {
|
|
156
|
+
className: "mb-2",
|
|
157
|
+
style: {
|
|
158
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
159
|
+
},
|
|
160
|
+
children: t('background_color')
|
|
161
|
+
}), jsxs("div", {
|
|
162
|
+
className: "flex items-center",
|
|
163
|
+
children: [jsx("div", {
|
|
164
|
+
className: "w-12 h-12 rounded-lg border border-gray-300 mr-3 flex-shrink-0 shadow-sm",
|
|
165
|
+
style: {
|
|
166
|
+
backgroundColor: background?.color === 'inherit' ? '#ffffff' : background?.color || '#ffffff'
|
|
167
|
+
}
|
|
168
|
+
}), jsx("div", {
|
|
169
|
+
className: "flex-grow",
|
|
170
|
+
children: jsx("input", {
|
|
171
|
+
type: "color",
|
|
172
|
+
value: background?.color === 'inherit' ? '#ffffff' : background?.color || '#ffffff',
|
|
173
|
+
onChange: e => handleBackgroundChange('color', e.target.value),
|
|
174
|
+
className: "w-full h-10 rounded cursor-pointer"
|
|
175
|
+
})
|
|
176
|
+
})]
|
|
177
|
+
}), jsx("div", {
|
|
178
|
+
className: "flex flex-wrap gap-2 mt-3",
|
|
179
|
+
children: ['#ffffff', '#f2f2f2', '#e6e6e6', '#1890ff', '#52c41a', '#faad14', '#f5222d', '#722ed1'].map(color => jsx("button", {
|
|
180
|
+
className: `w-8 h-8 rounded-full border ${color === (background?.color || '#ffffff') ? 'border-blue-500 border-2' : 'border-gray-300'}`,
|
|
181
|
+
style: {
|
|
182
|
+
backgroundColor: color
|
|
183
|
+
},
|
|
184
|
+
onClick: () => handleBackgroundChange('color', color),
|
|
185
|
+
"aria-label": `Select color ${color}`
|
|
186
|
+
}, color))
|
|
187
|
+
})]
|
|
188
|
+
}), background?.type === 'image' && jsxs("div", {
|
|
189
|
+
className: "mb-2",
|
|
190
|
+
children: [jsx("div", {
|
|
191
|
+
className: "flex items-center mb-1",
|
|
192
|
+
children: jsx("p", {
|
|
193
|
+
style: {
|
|
194
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
195
|
+
},
|
|
196
|
+
children: t('image_url')
|
|
197
|
+
})
|
|
198
|
+
}), jsx("input", {
|
|
199
|
+
type: "text",
|
|
200
|
+
placeholder: t('image_url'),
|
|
201
|
+
value: background?.image || '',
|
|
202
|
+
onChange: e => handleBackgroundChange('image', e.target.value),
|
|
203
|
+
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
204
|
+
}), background?.image && jsx("div", {
|
|
205
|
+
className: "mt-2 p-1 border border-gray-300 rounded",
|
|
206
|
+
children: jsx("img", {
|
|
207
|
+
src: background?.image,
|
|
208
|
+
alt: "Background preview",
|
|
209
|
+
className: "w-full h-24 object-cover",
|
|
210
|
+
onError: e => {
|
|
211
|
+
const target = e.target;
|
|
212
|
+
target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGNpcmNsZSBjeD0iOC41IiBjeT0iOC41IiByPSIxLjUiPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjIxIDEzLjg1IDE2IDEwLjk4IDgiIDE1Ij48L3BvbHlsaW5lPjwvc3ZnPg==';
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
})]
|
|
216
|
+
}), background?.type === 'video' && jsxs("div", {
|
|
217
|
+
className: "mb-2",
|
|
218
|
+
children: [jsx("div", {
|
|
219
|
+
className: "flex items-center mb-1",
|
|
220
|
+
children: jsx("p", {
|
|
221
|
+
style: {
|
|
222
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
223
|
+
},
|
|
224
|
+
children: t('video_url')
|
|
225
|
+
})
|
|
226
|
+
}), jsx("input", {
|
|
227
|
+
type: "text",
|
|
228
|
+
placeholder: t('video_url'),
|
|
229
|
+
value: background?.video || '',
|
|
230
|
+
onChange: e => handleBackgroundChange('video', e.target.value),
|
|
231
|
+
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
232
|
+
}), jsx("div", {
|
|
233
|
+
className: "flex items-center mt-3 mb-1",
|
|
234
|
+
children: jsx("p", {
|
|
235
|
+
style: {
|
|
236
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
237
|
+
},
|
|
238
|
+
children: t('video_thumbnail')
|
|
239
|
+
})
|
|
240
|
+
}), jsx("input", {
|
|
241
|
+
type: "text",
|
|
242
|
+
placeholder: t('video_thumbnail'),
|
|
243
|
+
value: background?.videoThumbnail || '',
|
|
244
|
+
onChange: e => handleBackgroundChange('videoThumbnail', e.target.value),
|
|
245
|
+
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
246
|
+
}), jsx("div", {
|
|
247
|
+
className: "flex flex-wrap gap-2 mt-3",
|
|
248
|
+
children: !background?.video && background?.videoThumbnail && jsx("div", {
|
|
249
|
+
className: "mt-2 p-1 border border-gray-300 rounded w-full",
|
|
250
|
+
children: jsx("img", {
|
|
251
|
+
src: background?.videoThumbnail,
|
|
252
|
+
alt: "Video thumbnail preview",
|
|
253
|
+
className: "w-full h-24 object-cover",
|
|
254
|
+
onError: e => {
|
|
255
|
+
const target = e.target;
|
|
256
|
+
target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwb2x5Z29uIHBvaW50cz0iMjMgNyAxNiAxMiAyMyAxNyAyMyA3Ij48L3BvbHlnb24+PHJlY3QgeD0iMSIgeT0iNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE0IiByeD0iMiIgcnk9IjIiPjwvcmVjdD48L3N2Zz4=';
|
|
257
|
+
}
|
|
258
|
+
})
|
|
259
|
+
})
|
|
260
|
+
})]
|
|
261
|
+
})]
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
// Helper function to render header settings based on current active tab
|
|
265
|
+
const renderHeaderSettings = () => {
|
|
266
|
+
const isDesktop = activeHeaderTab === 'desktop';
|
|
267
|
+
return jsxs("div", {
|
|
268
|
+
className: "space-y-2",
|
|
269
|
+
children: [jsxs("div", {
|
|
270
|
+
className: "flex items-center",
|
|
271
|
+
children: [jsx("p", {
|
|
272
|
+
style: {
|
|
273
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
274
|
+
},
|
|
275
|
+
children: t('show_header')
|
|
276
|
+
}), jsx("div", {
|
|
277
|
+
className: "flex-grow"
|
|
278
|
+
}), jsx(Switch, {
|
|
279
|
+
value: isDesktop ? regions.desktop?.header?.showHeader ?? true : regions.mobile?.header?.showHeader ?? true,
|
|
280
|
+
onChange: checked => handleHeaderChange('showHeader', checked)
|
|
281
|
+
})]
|
|
282
|
+
}), jsxs("div", {
|
|
283
|
+
className: "flex items-center",
|
|
284
|
+
children: [jsx("p", {
|
|
285
|
+
style: {
|
|
286
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
287
|
+
},
|
|
288
|
+
children: t('fixed_header')
|
|
289
|
+
}), jsx("div", {
|
|
290
|
+
className: "flex-grow"
|
|
291
|
+
}), jsx(Switch, {
|
|
292
|
+
value: header?.fixedHeader,
|
|
293
|
+
onChange: checked => handleHeaderChange('fixedHeader', checked)
|
|
294
|
+
})]
|
|
295
|
+
}), jsxs("div", {
|
|
296
|
+
className: "flex items-center",
|
|
297
|
+
children: [jsx("p", {
|
|
298
|
+
style: {
|
|
299
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
300
|
+
},
|
|
301
|
+
children: t('show_logo')
|
|
302
|
+
}), jsx("div", {
|
|
303
|
+
className: "flex-grow"
|
|
304
|
+
}), jsx(Switch, {
|
|
305
|
+
value: header?.showLogo,
|
|
306
|
+
onChange: checked => handleHeaderChange('showLogo', checked)
|
|
307
|
+
})]
|
|
308
|
+
}), jsxs("div", {
|
|
309
|
+
className: "flex items-center",
|
|
310
|
+
children: [jsx("p", {
|
|
311
|
+
style: {
|
|
312
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
313
|
+
},
|
|
314
|
+
children: t('show_search_slot')
|
|
315
|
+
}), jsx("div", {
|
|
316
|
+
className: "flex-grow"
|
|
317
|
+
}), jsx(Switch, {
|
|
318
|
+
value: header?.showSearchSlot,
|
|
319
|
+
onChange: checked => handleHeaderChange('showSearchSlot', checked)
|
|
320
|
+
})]
|
|
321
|
+
}), jsxs("div", {
|
|
322
|
+
className: "flex items-center",
|
|
323
|
+
children: [jsx("p", {
|
|
324
|
+
style: {
|
|
325
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
326
|
+
},
|
|
327
|
+
children: t('show_right_content')
|
|
328
|
+
}), jsx("div", {
|
|
329
|
+
className: "flex-grow"
|
|
330
|
+
}), jsx(Switch, {
|
|
331
|
+
value: header?.showRightContent,
|
|
332
|
+
onChange: checked => handleHeaderChange('showRightContent', checked)
|
|
333
|
+
})]
|
|
334
|
+
}), jsxs("div", {
|
|
335
|
+
className: "flex items-center",
|
|
336
|
+
children: [jsx("p", {
|
|
337
|
+
style: {
|
|
338
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
339
|
+
},
|
|
340
|
+
children: t('show_menu_toggle')
|
|
341
|
+
}), jsx("div", {
|
|
342
|
+
className: "flex-grow"
|
|
343
|
+
}), jsx(Switch, {
|
|
344
|
+
value: header?.showMenuToggle,
|
|
345
|
+
onChange: checked => handleHeaderChange('showMenuToggle', checked)
|
|
346
|
+
})]
|
|
347
|
+
}), jsxs("div", {
|
|
348
|
+
className: "flex items-center",
|
|
349
|
+
children: [jsx("p", {
|
|
350
|
+
style: {
|
|
351
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
352
|
+
},
|
|
353
|
+
children: t('show_back_button')
|
|
354
|
+
}), jsx("div", {
|
|
355
|
+
className: "flex-grow"
|
|
356
|
+
}), jsx(Switch, {
|
|
357
|
+
value: header?.showBackButton,
|
|
358
|
+
onChange: checked => handleHeaderChange('showBackButton', checked)
|
|
359
|
+
})]
|
|
360
|
+
}), jsxs("div", {
|
|
361
|
+
className: "flex items-center",
|
|
362
|
+
children: [jsx("p", {
|
|
363
|
+
style: {
|
|
364
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
365
|
+
},
|
|
366
|
+
children: t('show_page_title')
|
|
367
|
+
}), jsx("div", {
|
|
368
|
+
className: "flex-grow"
|
|
369
|
+
}), jsx(Switch, {
|
|
370
|
+
value: header?.showPageTitle,
|
|
371
|
+
onChange: checked => handleHeaderChange('showPageTitle', checked)
|
|
372
|
+
})]
|
|
373
|
+
}), jsxs("div", {
|
|
374
|
+
className: "flex items-center",
|
|
375
|
+
children: [jsx("p", {
|
|
376
|
+
style: {
|
|
377
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
378
|
+
},
|
|
379
|
+
children: t('show_action_buttons')
|
|
380
|
+
}), jsx("div", {
|
|
381
|
+
className: "flex-grow"
|
|
382
|
+
}), jsx(Switch, {
|
|
383
|
+
value: header?.showActionButtons,
|
|
384
|
+
onChange: checked => handleHeaderChange('showActionButtons', checked)
|
|
385
|
+
})]
|
|
386
|
+
})]
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
// Helper function to render search bar settings based on current active tab
|
|
390
|
+
const renderSearchBarSettings = () => {
|
|
391
|
+
return jsxs("div", {
|
|
392
|
+
className: "space-y-2",
|
|
393
|
+
children: [jsxs("div", {
|
|
394
|
+
className: "flex items-center",
|
|
395
|
+
children: [jsx("p", {
|
|
396
|
+
style: {
|
|
397
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
398
|
+
},
|
|
399
|
+
children: t('search_bar')
|
|
400
|
+
}), jsx("div", {
|
|
401
|
+
className: "flex-grow"
|
|
402
|
+
}), jsx(Switch, {
|
|
403
|
+
value: header?.searchBarRender,
|
|
404
|
+
onChange: checked => handleHeaderChange('searchBarRender', checked)
|
|
405
|
+
})]
|
|
406
|
+
}), jsxs("div", {
|
|
407
|
+
className: "flex items-center",
|
|
408
|
+
children: [jsx("p", {
|
|
409
|
+
style: {
|
|
410
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
411
|
+
},
|
|
412
|
+
children: t('search_bar_on_scroll')
|
|
413
|
+
}), jsx("div", {
|
|
414
|
+
className: "flex-grow"
|
|
415
|
+
}), jsx(Switch, {
|
|
416
|
+
value: header?.searchBarBehavior === SearchBarBehavior.ON_SCROLL,
|
|
417
|
+
onChange: checked => handleHeaderChange('searchBarBehavior', checked ? SearchBarBehavior.ON_SCROLL : SearchBarBehavior.PERMANENT)
|
|
418
|
+
})]
|
|
419
|
+
}), jsxs("div", {
|
|
420
|
+
className: "flex items-center",
|
|
421
|
+
children: [jsx("p", {
|
|
422
|
+
style: {
|
|
423
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
424
|
+
},
|
|
425
|
+
children: t('search_bar_overlay')
|
|
426
|
+
}), jsx("div", {
|
|
427
|
+
className: "flex-grow"
|
|
428
|
+
}), jsx(Switch, {
|
|
429
|
+
value: header?.searchBarOverlay,
|
|
430
|
+
onChange: checked => handleHeaderChange('searchBarOverlay', checked)
|
|
431
|
+
})]
|
|
432
|
+
}), jsxs("div", {
|
|
433
|
+
className: "mb-4",
|
|
434
|
+
children: [jsxs("div", {
|
|
435
|
+
className: "flex items-center justify-between mb-2",
|
|
436
|
+
children: [jsx("p", {
|
|
437
|
+
style: {
|
|
438
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
439
|
+
},
|
|
440
|
+
children: t('scroll_threshold')
|
|
441
|
+
}), jsxs("span", {
|
|
442
|
+
className: "text-sm",
|
|
443
|
+
style: {
|
|
444
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
445
|
+
},
|
|
446
|
+
children: [header?.scrollThreshold || scrollThresholdConfig.DEFAULT, "px"]
|
|
447
|
+
})]
|
|
448
|
+
}), jsxs("div", {
|
|
449
|
+
className: "relative",
|
|
450
|
+
children: [jsx("input", {
|
|
451
|
+
type: "range",
|
|
452
|
+
min: scrollThresholdConfig.MIN,
|
|
453
|
+
max: scrollThresholdConfig.MAX,
|
|
454
|
+
step: scrollThresholdConfig.STEP,
|
|
455
|
+
value: header?.scrollThreshold || scrollThresholdConfig.DEFAULT,
|
|
456
|
+
onChange: e => handleHeaderChange('scrollThreshold', parseInt(e.target.value)),
|
|
457
|
+
className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
|
|
458
|
+
}), jsxs("div", {
|
|
459
|
+
className: "flex justify-between text-xs mt-2",
|
|
460
|
+
children: [jsxs("span", {
|
|
461
|
+
children: [scrollThresholdConfig.MIN, "px"]
|
|
462
|
+
}), jsxs("span", {
|
|
463
|
+
children: [scrollThresholdConfig.MAX / 2, "px"]
|
|
464
|
+
}), jsxs("span", {
|
|
465
|
+
children: [scrollThresholdConfig.MAX, "px"]
|
|
466
|
+
})]
|
|
467
|
+
})]
|
|
468
|
+
})]
|
|
469
|
+
})]
|
|
470
|
+
});
|
|
471
|
+
};
|
|
17
472
|
return jsxs("div", {
|
|
18
473
|
children: [jsxs("div", {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
474
|
+
children: [jsx("div", {
|
|
475
|
+
className: "flex items-center mb-2",
|
|
476
|
+
children: jsxs("button", {
|
|
477
|
+
onClick: () => setIsBackgroundExpanded(!isBackgroundExpanded),
|
|
478
|
+
className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
|
|
479
|
+
children: [jsx("svg", {
|
|
480
|
+
className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isBackgroundExpanded ? 'rotate-180' : ''}`,
|
|
481
|
+
fill: "none",
|
|
482
|
+
stroke: "currentColor",
|
|
483
|
+
viewBox: "0 0 24 24",
|
|
484
|
+
children: jsx("path", {
|
|
485
|
+
strokeLinecap: "round",
|
|
486
|
+
strokeLinejoin: "round",
|
|
487
|
+
strokeWidth: 2,
|
|
488
|
+
d: "M19 9l-7 7-7-7"
|
|
489
|
+
})
|
|
490
|
+
}), jsx("p", {
|
|
491
|
+
style: {
|
|
492
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
493
|
+
},
|
|
494
|
+
children: t('background')
|
|
495
|
+
})]
|
|
496
|
+
})
|
|
25
497
|
}), jsx("div", {
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
498
|
+
className: `grid transition-all duration-300 ease-in-out ${isBackgroundExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
|
|
499
|
+
children: jsx("div", {
|
|
500
|
+
className: "overflow-hidden",
|
|
501
|
+
children: jsxs("div", {
|
|
502
|
+
className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
|
|
503
|
+
children: [jsxs("div", {
|
|
504
|
+
className: "flex mb-4 mt-1",
|
|
505
|
+
children: [jsx("button", {
|
|
506
|
+
className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeBackgroundTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
|
|
507
|
+
onClick: () => setActiveBackgroundTab('desktop'),
|
|
508
|
+
children: jsxs("span", {
|
|
509
|
+
className: "flex items-center justify-center",
|
|
510
|
+
children: [jsxs("svg", {
|
|
511
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
512
|
+
width: "16",
|
|
513
|
+
height: "16",
|
|
514
|
+
viewBox: "0 0 24 24",
|
|
515
|
+
fill: "none",
|
|
516
|
+
stroke: "currentColor",
|
|
517
|
+
strokeWidth: "2",
|
|
518
|
+
strokeLinecap: "round",
|
|
519
|
+
strokeLinejoin: "round",
|
|
520
|
+
className: "mr-1",
|
|
521
|
+
children: [jsx("rect", {
|
|
522
|
+
x: "2",
|
|
523
|
+
y: "3",
|
|
524
|
+
width: "20",
|
|
525
|
+
height: "14",
|
|
526
|
+
rx: "2",
|
|
527
|
+
ry: "2"
|
|
528
|
+
}), jsx("line", {
|
|
529
|
+
x1: "8",
|
|
530
|
+
y1: "21",
|
|
531
|
+
x2: "16",
|
|
532
|
+
y2: "21"
|
|
533
|
+
}), jsx("line", {
|
|
534
|
+
x1: "12",
|
|
535
|
+
y1: "17",
|
|
536
|
+
x2: "12",
|
|
537
|
+
y2: "21"
|
|
538
|
+
})]
|
|
539
|
+
}), t('desktop_tab')]
|
|
540
|
+
})
|
|
541
|
+
}), jsx("button", {
|
|
542
|
+
className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeBackgroundTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
|
|
543
|
+
onClick: () => setActiveBackgroundTab('mobile'),
|
|
544
|
+
children: jsxs("span", {
|
|
545
|
+
className: "flex items-center justify-center",
|
|
546
|
+
children: [jsxs("svg", {
|
|
547
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
548
|
+
width: "16",
|
|
549
|
+
height: "16",
|
|
550
|
+
viewBox: "0 0 24 24",
|
|
551
|
+
fill: "none",
|
|
552
|
+
stroke: "currentColor",
|
|
553
|
+
strokeWidth: "2",
|
|
554
|
+
strokeLinecap: "round",
|
|
555
|
+
strokeLinejoin: "round",
|
|
556
|
+
className: "mr-1",
|
|
557
|
+
children: [jsx("rect", {
|
|
558
|
+
x: "5",
|
|
559
|
+
y: "2",
|
|
560
|
+
width: "14",
|
|
561
|
+
height: "20",
|
|
562
|
+
rx: "2",
|
|
563
|
+
ry: "2"
|
|
564
|
+
}), jsx("line", {
|
|
565
|
+
x1: "12",
|
|
566
|
+
y1: "18",
|
|
567
|
+
x2: "12",
|
|
568
|
+
y2: "18"
|
|
569
|
+
})]
|
|
570
|
+
}), t('mobile_tab')]
|
|
571
|
+
})
|
|
572
|
+
})]
|
|
573
|
+
}), jsx("div", {
|
|
574
|
+
className: "mb-4",
|
|
575
|
+
children: renderBackgroundSettings()
|
|
576
|
+
})]
|
|
577
|
+
})
|
|
578
|
+
})
|
|
32
579
|
})]
|
|
33
580
|
}), jsxs("div", {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
581
|
+
children: [jsx("div", {
|
|
582
|
+
className: "flex items-center mb-2",
|
|
583
|
+
children: jsxs("button", {
|
|
584
|
+
onClick: () => setIsHeaderExpanded(!isHeaderExpanded),
|
|
585
|
+
className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
|
|
586
|
+
children: [jsx("svg", {
|
|
587
|
+
className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isHeaderExpanded ? 'rotate-180' : ''}`,
|
|
588
|
+
fill: "none",
|
|
589
|
+
stroke: "currentColor",
|
|
590
|
+
viewBox: "0 0 24 24",
|
|
591
|
+
children: jsx("path", {
|
|
592
|
+
strokeLinecap: "round",
|
|
593
|
+
strokeLinejoin: "round",
|
|
594
|
+
strokeWidth: 2,
|
|
595
|
+
d: "M19 9l-7 7-7-7"
|
|
596
|
+
})
|
|
597
|
+
}), jsx("p", {
|
|
598
|
+
style: {
|
|
599
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
600
|
+
},
|
|
601
|
+
children: t('header')
|
|
602
|
+
})]
|
|
603
|
+
})
|
|
40
604
|
}), jsx("div", {
|
|
41
|
-
className:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
605
|
+
className: `grid transition-all duration-300 ease-in-out ${isHeaderExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
|
|
606
|
+
children: jsx("div", {
|
|
607
|
+
className: "overflow-hidden",
|
|
608
|
+
children: jsxs("div", {
|
|
609
|
+
className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
|
|
610
|
+
children: [jsxs("div", {
|
|
611
|
+
className: "flex mb-4 mt-1",
|
|
612
|
+
children: [jsx("button", {
|
|
613
|
+
className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeHeaderTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
|
|
614
|
+
onClick: () => setActiveHeaderTab('desktop'),
|
|
615
|
+
children: jsxs("span", {
|
|
616
|
+
className: "flex items-center justify-center",
|
|
617
|
+
children: [jsxs("svg", {
|
|
618
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
619
|
+
width: "16",
|
|
620
|
+
height: "16",
|
|
621
|
+
viewBox: "0 0 24 24",
|
|
622
|
+
fill: "none",
|
|
623
|
+
stroke: "currentColor",
|
|
624
|
+
strokeWidth: "2",
|
|
625
|
+
strokeLinecap: "round",
|
|
626
|
+
strokeLinejoin: "round",
|
|
627
|
+
className: "mr-1",
|
|
628
|
+
children: [jsx("rect", {
|
|
629
|
+
x: "2",
|
|
630
|
+
y: "3",
|
|
631
|
+
width: "20",
|
|
632
|
+
height: "14",
|
|
633
|
+
rx: "2",
|
|
634
|
+
ry: "2"
|
|
635
|
+
}), jsx("line", {
|
|
636
|
+
x1: "8",
|
|
637
|
+
y1: "21",
|
|
638
|
+
x2: "16",
|
|
639
|
+
y2: "21"
|
|
640
|
+
}), jsx("line", {
|
|
641
|
+
x1: "12",
|
|
642
|
+
y1: "17",
|
|
643
|
+
x2: "12",
|
|
644
|
+
y2: "21"
|
|
645
|
+
})]
|
|
646
|
+
}), t('desktop_tab')]
|
|
647
|
+
})
|
|
648
|
+
}), jsx("button", {
|
|
649
|
+
className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeHeaderTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
|
|
650
|
+
onClick: () => setActiveHeaderTab('mobile'),
|
|
651
|
+
children: jsxs("span", {
|
|
652
|
+
className: "flex items-center justify-center",
|
|
653
|
+
children: [jsxs("svg", {
|
|
654
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
655
|
+
width: "16",
|
|
656
|
+
height: "16",
|
|
657
|
+
viewBox: "0 0 24 24",
|
|
658
|
+
fill: "none",
|
|
659
|
+
stroke: "currentColor",
|
|
660
|
+
strokeWidth: "2",
|
|
661
|
+
strokeLinecap: "round",
|
|
662
|
+
strokeLinejoin: "round",
|
|
663
|
+
className: "mr-1",
|
|
664
|
+
children: [jsx("rect", {
|
|
665
|
+
x: "5",
|
|
666
|
+
y: "2",
|
|
667
|
+
width: "14",
|
|
668
|
+
height: "20",
|
|
669
|
+
rx: "2",
|
|
670
|
+
ry: "2"
|
|
671
|
+
}), jsx("line", {
|
|
672
|
+
x1: "12",
|
|
673
|
+
y1: "18",
|
|
674
|
+
x2: "12",
|
|
675
|
+
y2: "18"
|
|
676
|
+
})]
|
|
677
|
+
}), t('mobile_tab')]
|
|
678
|
+
})
|
|
679
|
+
})]
|
|
680
|
+
}), jsx("div", {
|
|
681
|
+
className: "mb-4",
|
|
682
|
+
children: renderHeaderSettings()
|
|
683
|
+
}), jsxs("div", {
|
|
684
|
+
className: "mt-6 mb-4",
|
|
685
|
+
children: [jsx("p", {
|
|
686
|
+
className: "font-medium mb-2",
|
|
687
|
+
style: {
|
|
688
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
689
|
+
},
|
|
690
|
+
children: t('search_bar')
|
|
691
|
+
}), jsx("div", {
|
|
692
|
+
className: "pl-4 space-y-2",
|
|
693
|
+
children: renderSearchBarSettings()
|
|
694
|
+
})]
|
|
695
|
+
})]
|
|
696
|
+
})
|
|
697
|
+
})
|
|
47
698
|
})]
|
|
48
699
|
}), jsxs("div", {
|
|
49
700
|
className: "flex items-center mb-2",
|
|
50
701
|
children: [jsx("p", {
|
|
51
702
|
style: {
|
|
52
|
-
color: navTheme
|
|
703
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
53
704
|
},
|
|
54
|
-
children: t('
|
|
705
|
+
children: t('footer')
|
|
55
706
|
}), jsx("div", {
|
|
56
707
|
className: "flex-grow"
|
|
57
708
|
}), jsx(Switch, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
changeSetting: changeSetting,
|
|
61
|
-
settingKey: "searchBarRender"
|
|
709
|
+
value: regions[deviceType]?.footer?.showFooter,
|
|
710
|
+
onChange: checked => handleRegionFooterChange('showFooter', checked)
|
|
62
711
|
})]
|
|
63
712
|
}), jsxs("div", {
|
|
64
713
|
className: "flex items-center mb-2",
|
|
65
714
|
children: [jsx("p", {
|
|
66
715
|
style: {
|
|
67
|
-
color: navTheme
|
|
716
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
68
717
|
},
|
|
69
718
|
children: t('menu')
|
|
70
719
|
}), jsx("div", {
|
|
71
720
|
className: "flex-grow"
|
|
72
721
|
}), jsx(Switch, {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
changeSetting: changeSetting,
|
|
76
|
-
settingKey: "showMenu"
|
|
722
|
+
value: regions[deviceType]?.header?.showMenu,
|
|
723
|
+
onChange: checked => handleRegionChange('showMenu', checked)
|
|
77
724
|
})]
|
|
78
725
|
}), jsxs("div", {
|
|
79
726
|
className: "flex items-center mb-2",
|
|
80
727
|
children: [jsx("p", {
|
|
81
728
|
style: {
|
|
82
|
-
color: navTheme
|
|
729
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
83
730
|
},
|
|
84
731
|
children: t('menu_header')
|
|
85
732
|
}), jsx("div", {
|
|
86
733
|
className: "flex-grow"
|
|
87
734
|
}), jsx(Switch, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
changeSetting: changeSetting,
|
|
91
|
-
settingKey: "menuHeaderRender"
|
|
735
|
+
value: regions[deviceType]?.header?.menuHeaderRender,
|
|
736
|
+
onChange: checked => handleRegionChange('menuHeaderRender', checked)
|
|
92
737
|
})]
|
|
93
738
|
})]
|
|
94
739
|
});
|