@admin-layout/tailwind-design-pro 12.0.16-alpha.5 → 12.0.16-alpha.51
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 +30 -0
- package/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/es/menu.json +2 -1
- package/lib/cdm-locales/index.d.ts +2 -0
- package/lib/cdm-locales/index.d.ts.map +1 -0
- package/lib/cdm-locales/index.ts +1 -0
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +83 -17
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +2 -0
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +12 -9
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +4 -2
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +31 -8
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Logo.js +1 -12
- package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +2 -2
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +21 -13
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -0
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +73 -6
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +2 -4
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +69 -7
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/{Sidebar.js → MainSidebar.js} +28 -7
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +4 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +294 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +5 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +195 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +342 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +35 -8
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/Layout/util.js +1 -1
- package/lib/components/Layout/util.js.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +28 -3
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/InvitationSettings.js +19 -5
- package/lib/components/SettingDrawer/InvitationSettings.js.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.js +53 -15
- package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/MenuVisibilitySettings.d.ts +20 -0
- package/lib/components/SettingDrawer/MenuVisibilitySettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/MenuVisibilitySettings.js +120 -0
- package/lib/components/SettingDrawer/MenuVisibilitySettings.js.map +1 -0
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.js +140 -14
- package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +73 -176
- package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +297 -43
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.js +28 -3
- package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/types.d.ts +6 -0
- package/lib/components/SettingDrawer/types.d.ts.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +8 -5
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +240 -4
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/typings.d.ts +11 -6
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +10 -2
- package/lib/compute.js.map +1 -1
- package/lib/config/analytics-config.js +9 -0
- package/lib/config/analytics-config.js.map +1 -0
- package/lib/config/constants.js.map +1 -1
- package/lib/config/env-config.d.ts +3 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +10 -0
- package/lib/config/env-config.js.map +1 -1
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -3
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useMediaQuery.js.map +1 -1
- package/lib/hooks/useScrollThreshold.js.map +1 -1
- package/lib/hooks/useTailwindTheme.js.map +1 -1
- package/lib/icons.d.ts +2 -0
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +4 -2
- package/lib/icons.js.map +1 -1
- package/lib/index.d.ts +1 -0
- 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 +0 -1
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +145 -143
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/machines/types.d.ts +71 -2
- package/lib/machines/types.d.ts.map +1 -1
- package/lib/machines/types.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/redux/searchReducer.js.map +1 -1
- package/lib/routes.json +9 -1
- package/lib/tailwindConfig.js.map +1 -1
- package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
- package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
- package/lib/utils/configOverrides.d.ts +213 -0
- package/lib/utils/configOverrides.d.ts.map +1 -0
- package/lib/utils/configOverrides.js +355 -0
- package/lib/utils/configOverrides.js.map +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -1
- package/lib/utils/settingsUtils.d.ts +70 -0
- package/lib/utils/settingsUtils.d.ts.map +1 -0
- package/lib/utils/utils/index.js.map +1 -1
- package/package.json +6 -16
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -176
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
- package/lib/components/UI/CardList.d.ts +0 -61
- package/lib/components/UI/CardList.d.ts.map +0 -1
- package/lib/components/UI/CardList.js +0 -43
- package/lib/components/UI/CardList.js.map +0 -1
- package/lib/components/UI/CategoriesTypeList.d.ts +0 -29
- package/lib/components/UI/CategoriesTypeList.d.ts.map +0 -1
- package/lib/components/UI/CategoriesTypeList.js +0 -139
- package/lib/components/UI/CategoriesTypeList.js.map +0 -1
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +0 -83
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +0 -1
- package/lib/components/UI/LazyLoadingGoogleMarker.js +0 -107
- package/lib/components/UI/LazyLoadingGoogleMarker.js.map +0 -1
- package/lib/components/UI/Pagination.d.ts +0 -6
- package/lib/components/UI/Pagination.d.ts.map +0 -1
- package/lib/components/UI/Pagination.js +0 -56
- package/lib/components/UI/Pagination.js.map +0 -1
- package/lib/components/UI/ParamSearchResultContainer.d.ts +0 -99
- package/lib/components/UI/ParamSearchResultContainer.d.ts.map +0 -1
- package/lib/components/UI/ParamSearchResultContainer.js +0 -120
- package/lib/components/UI/ParamSearchResultContainer.js.map +0 -1
- package/lib/components/UI/PropertyCard.d.ts +0 -24
- package/lib/components/UI/PropertyCard.d.ts.map +0 -1
- package/lib/components/UI/PropertyCard.js +0 -420
- package/lib/components/UI/PropertyCard.js.map +0 -1
- package/lib/components/UI/PropertyCardOnMap.d.ts +0 -10
- package/lib/components/UI/PropertyCardOnMap.d.ts.map +0 -1
- package/lib/components/UI/PropertyCardOnMap.js +0 -108
- package/lib/components/UI/PropertyCardOnMap.js.map +0 -1
- package/lib/components/UI/VehicleCard/PricePopover.d.ts +0 -8
- package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/PricePopover.js +0 -98
- package/lib/components/UI/VehicleCard/PricePopover.js.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +0 -7
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +0 -9
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleFeature.js +0 -22
- package/lib/components/UI/VehicleCard/VehicleFeature.js.map +0 -1
- package/lib/components/UI/VehicleCard/types.d.ts +0 -59
- package/lib/components/UI/VehicleCard/types.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard.d.ts +0 -15
- package/lib/components/UI/VehicleCard.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard.js +0 -166
- package/lib/components/UI/VehicleCard.js.map +0 -1
- package/lib/components/UI/VehicleCardList.d.ts +0 -14
- package/lib/components/UI/VehicleCardList.d.ts.map +0 -1
- package/lib/components/UI/VehicleCardList.js +0 -38
- package/lib/components/UI/VehicleCardList.js.map +0 -1
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +0 -90
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +0 -1
- package/lib/components/UI/icons/LocationIcon.d.ts +0 -7
- package/lib/components/UI/icons/LocationIcon.d.ts.map +0 -1
- package/lib/components/UI/icons/LocationIcon.js +0 -18
- package/lib/components/UI/icons/LocationIcon.js.map +0 -1
- package/lib/components/UI/icons/index.d.ts +0 -2
- package/lib/components/UI/icons/index.d.ts.map +0 -1
- package/lib/components/UI/index.d.ts +0 -10
- package/lib/components/UI/index.d.ts.map +0 -1
- package/lib/components/typings.js +0 -6
- package/lib/components/typings.js.map +0 -1
- package/lib/hooks/use-get-current-lat-long.d.ts +0 -18
- package/lib/hooks/use-get-current-lat-long.d.ts.map +0 -1
- package/lib/hooks/use-get-current-lat-long.js +0 -29
- package/lib/hooks/use-get-current-lat-long.js.map +0 -1
- package/lib/hooks/useWindowSize.d.ts +0 -6
- package/lib/hooks/useWindowSize.d.ts.map +0 -1
- package/lib/hooks/useWindowSize.js +0 -20
- package/lib/hooks/useWindowSize.js.map +0 -1
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +0 -6
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts +0 -6
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +0 -1
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +0 -7
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/datasourcesMiddleware.d.ts +0 -6
- package/lib/middlewares/datasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +0 -7
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +0 -1
|
@@ -1,19 +1,17 @@
|
|
|
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/
|
|
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 {useMediaQuery}from'../../hooks/useMediaQuery.js';import {getConfigValue,getNestedValue}from'../../utils/configOverrides.js';function RegionalSettings(props) {
|
|
2
2
|
const {
|
|
3
3
|
t
|
|
4
4
|
} = useTranslation('settings');
|
|
5
5
|
const {
|
|
6
6
|
settings,
|
|
7
7
|
changeSetting,
|
|
8
|
-
location
|
|
8
|
+
location,
|
|
9
|
+
applyToAllRoutes = false
|
|
9
10
|
} = props;
|
|
10
11
|
const {
|
|
11
12
|
navTheme
|
|
12
13
|
} = settings || {};
|
|
13
14
|
const currentRoute = location?.pathname || '/';
|
|
14
|
-
const {
|
|
15
|
-
regions = {}
|
|
16
|
-
} = settings?.routeSettings?.[currentRoute] || {};
|
|
17
15
|
const [isHeaderExpanded, setIsHeaderExpanded] = React.useState(false);
|
|
18
16
|
const [isBackgroundExpanded, setIsBackgroundExpanded] = React.useState(true);
|
|
19
17
|
const [activeBackgroundTab, setActiveBackgroundTab] = React.useState('desktop');
|
|
@@ -23,36 +21,76 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
23
21
|
} = useMediaQuery();
|
|
24
22
|
const scrollThresholdConfig = JSON.parse(config.SCROLL_THRESHOLD);
|
|
25
23
|
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
26
|
-
|
|
24
|
+
// Helper to get config value with overrides applied
|
|
25
|
+
const getConfigValue$1 = (configKey, defaultValue, useActiveTab = true) => {
|
|
26
|
+
const device = useActiveTab ? activeBackgroundTab || activeHeaderTab : deviceType;
|
|
27
|
+
// If applyToAllRoutes is true, treat as regular settings (no overrides, no device context)
|
|
28
|
+
if (applyToAllRoutes) {
|
|
29
|
+
return getConfigValue(settings, configKey, {}, defaultValue);
|
|
30
|
+
}
|
|
31
|
+
// Otherwise, check for route-specific overrides
|
|
32
|
+
if (settings?.uiSettings?.overrides) {
|
|
33
|
+
const contextKey = `[${currentRoute}][${device}]`;
|
|
34
|
+
const overrideSettings = settings.uiSettings.overrides[contextKey];
|
|
35
|
+
if (overrideSettings) {
|
|
36
|
+
// Handle the uilayout wrapper in override structure
|
|
37
|
+
const overrideData = overrideSettings.uilayout || overrideSettings;
|
|
38
|
+
const value = getNestedValue(overrideData, configKey);
|
|
39
|
+
if (value !== undefined) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// Fallback to regular settings
|
|
45
|
+
return getConfigValue(settings, configKey, {
|
|
46
|
+
route: currentRoute,
|
|
47
|
+
device
|
|
48
|
+
}, defaultValue);
|
|
49
|
+
};
|
|
50
|
+
// Helper to set config value with override
|
|
51
|
+
const setConfigValue = (configKey, value, useActiveTab = true) => {
|
|
27
52
|
if (!changeSetting) return;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
53
|
+
// Pass simple key - handleSettingChange in SettingDrawer will decide if it's global or route-specific
|
|
54
|
+
// based on the applyToAllRoutes flag
|
|
55
|
+
changeSetting(configKey, value);
|
|
56
|
+
};
|
|
57
|
+
const handleRegionChange = (key, value) => {
|
|
58
|
+
setConfigValue(`header.${key}`, value, false);
|
|
32
59
|
};
|
|
33
60
|
const handleRegionFooterChange = (key, value) => {
|
|
34
|
-
|
|
35
|
-
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.footer`, {
|
|
36
|
-
...regions[deviceType]?.footer,
|
|
37
|
-
[key]: value
|
|
38
|
-
});
|
|
61
|
+
setConfigValue(`footer.${key}`, value, false);
|
|
39
62
|
};
|
|
40
63
|
const handleBackgroundChange = (property, value) => {
|
|
41
|
-
|
|
42
|
-
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.background`, {
|
|
43
|
-
...regions[deviceType].background,
|
|
44
|
-
[property]: value
|
|
45
|
-
});
|
|
64
|
+
setConfigValue(`background.${property}`, value, true);
|
|
46
65
|
};
|
|
47
66
|
const handleHeaderChange = (element, value) => {
|
|
48
|
-
|
|
49
|
-
changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.header`, {
|
|
50
|
-
...regions[deviceType]?.header,
|
|
51
|
-
[element]: value
|
|
52
|
-
});
|
|
67
|
+
setConfigValue(`header.${element}`, value, true);
|
|
53
68
|
};
|
|
54
|
-
|
|
55
|
-
const
|
|
69
|
+
// Get current values using the override-aware getter with active header tab
|
|
70
|
+
const header = React.useMemo(() => ({
|
|
71
|
+
showLogo: getConfigValue$1('header.showLogo', true, true),
|
|
72
|
+
showSearchSlot: getConfigValue$1('header.showSearchSlot', true, true),
|
|
73
|
+
showRightContent: getConfigValue$1('header.showRightContent', true, true),
|
|
74
|
+
showMenuToggle: getConfigValue$1('header.showMenuToggle', true, true),
|
|
75
|
+
showBackButton: getConfigValue$1('header.showBackButton', true, true),
|
|
76
|
+
showPageTitle: getConfigValue$1('header.showPageTitle', true, true),
|
|
77
|
+
showActionButtons: getConfigValue$1('header.showActionButtons', true, true),
|
|
78
|
+
fixedHeader: getConfigValue$1('header.fixedHeader', true, true),
|
|
79
|
+
showHeader: getConfigValue$1('header.showHeader', true, true),
|
|
80
|
+
showMenu: getConfigValue$1('header.showMenu', true, true),
|
|
81
|
+
menuHeaderRender: getConfigValue$1('header.menuHeaderRender', true, true),
|
|
82
|
+
searchBarRender: getConfigValue$1('header.searchBarRender', true, true),
|
|
83
|
+
searchBarBehavior: getConfigValue$1('header.searchBarBehavior', SearchBarBehavior.PERMANENT, true),
|
|
84
|
+
searchBarOverlay: getConfigValue$1('header.searchBarOverlay', true, true),
|
|
85
|
+
scrollThreshold: getConfigValue$1('header.scrollThreshold', scrollThresholdConfig.DEFAULT, true)
|
|
86
|
+
}), [activeHeaderTab, currentRoute, settings]);
|
|
87
|
+
const background = React.useMemo(() => ({
|
|
88
|
+
type: getConfigValue$1('background.type', 'color', true),
|
|
89
|
+
color: getConfigValue$1('background.color', 'inherit', true),
|
|
90
|
+
image: getConfigValue$1('background.image', '', true),
|
|
91
|
+
video: getConfigValue$1('background.video', '', true),
|
|
92
|
+
videoThumbnail: getConfigValue$1('background.videoThumbnail', '', true)
|
|
93
|
+
}), [activeBackgroundTab, currentRoute, settings]);
|
|
56
94
|
// Helper function to render background settings based on current active tab
|
|
57
95
|
const renderBackgroundSettings = () => {
|
|
58
96
|
return jsxs(Fragment, {
|
|
@@ -263,7 +301,6 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
263
301
|
};
|
|
264
302
|
// Helper function to render header settings based on current active tab
|
|
265
303
|
const renderHeaderSettings = () => {
|
|
266
|
-
const isDesktop = activeHeaderTab === 'desktop';
|
|
267
304
|
return jsxs("div", {
|
|
268
305
|
className: "space-y-2",
|
|
269
306
|
children: [jsxs("div", {
|
|
@@ -276,7 +313,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
276
313
|
}), jsx("div", {
|
|
277
314
|
className: "flex-grow"
|
|
278
315
|
}), jsx(Switch, {
|
|
279
|
-
value:
|
|
316
|
+
value: header?.showHeader ?? true,
|
|
280
317
|
onChange: checked => handleHeaderChange('showHeader', checked)
|
|
281
318
|
})]
|
|
282
319
|
}), jsxs("div", {
|
|
@@ -498,82 +535,12 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
498
535
|
className: `grid transition-all duration-300 ease-in-out ${isBackgroundExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
|
|
499
536
|
children: jsx("div", {
|
|
500
537
|
className: "overflow-hidden",
|
|
501
|
-
children:
|
|
538
|
+
children: jsx("div", {
|
|
502
539
|
className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
|
|
503
|
-
children:
|
|
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", {
|
|
540
|
+
children: jsx("div", {
|
|
574
541
|
className: "mb-4",
|
|
575
542
|
children: renderBackgroundSettings()
|
|
576
|
-
})
|
|
543
|
+
})
|
|
577
544
|
})
|
|
578
545
|
})
|
|
579
546
|
})]
|
|
@@ -607,77 +574,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
607
574
|
className: "overflow-hidden",
|
|
608
575
|
children: jsxs("div", {
|
|
609
576
|
className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
|
|
610
|
-
children: [
|
|
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", {
|
|
577
|
+
children: [jsx("div", {
|
|
681
578
|
className: "mb-4",
|
|
682
579
|
children: renderHeaderSettings()
|
|
683
580
|
}), jsxs("div", {
|
|
@@ -706,7 +603,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
706
603
|
}), jsx("div", {
|
|
707
604
|
className: "flex-grow"
|
|
708
605
|
}), jsx(Switch, {
|
|
709
|
-
value:
|
|
606
|
+
value: getConfigValue$1('footer.showFooter', true),
|
|
710
607
|
onChange: checked => handleRegionFooterChange('showFooter', checked)
|
|
711
608
|
})]
|
|
712
609
|
}), jsxs("div", {
|
|
@@ -719,7 +616,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
719
616
|
}), jsx("div", {
|
|
720
617
|
className: "flex-grow"
|
|
721
618
|
}), jsx(Switch, {
|
|
722
|
-
value:
|
|
619
|
+
value: getConfigValue$1('header.showMenu', true),
|
|
723
620
|
onChange: checked => handleRegionChange('showMenu', checked)
|
|
724
621
|
})]
|
|
725
622
|
}), jsxs("div", {
|
|
@@ -732,7 +629,7 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
732
629
|
}), jsx("div", {
|
|
733
630
|
className: "flex-grow"
|
|
734
631
|
}), jsx(Switch, {
|
|
735
|
-
value:
|
|
632
|
+
value: getConfigValue$1('header.menuHeaderRender', true),
|
|
736
633
|
onChange: checked => handleRegionChange('menuHeaderRender', checked)
|
|
737
634
|
})]
|
|
738
635
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionalSettings.js","sources":["../../../src/components/SettingDrawer/RegionalSettings.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"RegionalSettings.js","sources":["../../../src/components/SettingDrawer/RegionalSettings.tsx"],"sourcesContent":[null],"names":["getConfigValueUtil","getConfigValue","_jsxs"],"mappings":"meASc,SAAU,gBAAgB,CAAC,KAA6B,EAAA;QAClE;AACA,IAAA;AACA,GAAA,GAAA,cAAgB,CAAA,UAAK,CAAA;AACrB,EAAA,MAAA;AACA,IAAA,QAAO;AACP,IAAA,aAAO;AACP,IAAA,QAAO;AACP,IAAA,gBAAO,GAAA;AACP,GAAA,GAAA;QACA;IACA;MAEA,QAAA,IAAA,EAAA;QACA,YAAM,GAAA,QAAkB,EAAA;AACpB,EAAA,MAAA,CAAA,gBAAe,EAAA,mBAAe,CAAA,GAAA,KAAA,C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EAAA,cAAK;AAwDb,gBAAE,WAAA,EAAA,GAAA;gBAGE,aAAA,EAAA,OAEI;AA2GZ,gBAAC,cAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/SettingDrawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/SettingDrawer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAsB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA2UjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,GAAG,GAAG,CAijB5D,CAAC"}
|