@admin-layout/client 11.0.4-alpha.4 → 12.0.16-alpha.2
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/lib/{antd-themes/colors.d.ts → colors/colorsList.d.ts} +1 -1
- package/lib/colors/colorsList.d.ts.map +1 -0
- package/lib/{antd-themes/colors.js → colors/colorsList.js} +1 -1
- package/lib/colors/colorsList.js.map +1 -0
- package/lib/colors/index.d.ts +1 -0
- package/lib/colors/index.d.ts.map +1 -1
- package/lib/colors/presets/brinkPink.js +11 -0
- package/lib/colors/presets/brinkPink.js.map +1 -0
- package/lib/colors/presets/cyan.js +11 -0
- package/lib/colors/presets/cyan.js.map +1 -0
- package/lib/colors/presets/lime.js +11 -0
- package/lib/colors/presets/lime.js.map +1 -0
- package/lib/colors/presets/pink.js +11 -0
- package/lib/colors/presets/pink.js.map +1 -0
- package/lib/colors/presets/purple.js +11 -0
- package/lib/colors/presets/purple.js.map +1 -0
- package/lib/colors/presets/skyBlue.js +11 -0
- package/lib/colors/presets/skyBlue.js.map +1 -0
- package/lib/colors/presets/turquoise.js +11 -0
- package/lib/colors/presets/turquoise.js.map +1 -0
- package/lib/components/ApplicationErrorFillWrapper.d.ts.map +1 -1
- package/lib/components/ApplicationErrorHandlerCommon.d.ts.map +1 -1
- package/lib/components/LayoutCookieProvider.d.ts.map +1 -1
- package/lib/components/LayoutCookieProvider.js +15 -9
- package/lib/components/LayoutCookieProvider.js.map +1 -1
- package/lib/components/UpdateSettings/SettingsConfigurationModel.test.d.ts +2 -0
- package/lib/components/UpdateSettings/SettingsConfigurationModel.test.d.ts.map +1 -0
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts +24 -0
- package/lib/components/UpdateSettings/UpdateSettings.server.d.ts.map +1 -0
- package/lib/components/UpdateSettings/UpdateSettings.server.js +121 -28
- package/lib/components/UpdateSettings/UpdateSettings.server.js.map +1 -1
- package/lib/config/defaultSettings.d.ts +108 -1
- package/lib/config/defaultSettings.d.ts.map +1 -1
- package/lib/config/defaultSettings.js +160 -15
- package/lib/config/defaultSettings.js.map +1 -1
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +11 -4
- package/lib/config/env-config.js.map +1 -1
- package/lib/graphql/link/error-link.d.ts.map +1 -1
- package/lib/graphql/link/error-link.js.map +1 -1
- package/lib/hooks/Client-only.d.ts +28 -0
- package/lib/hooks/Client-only.d.ts.map +1 -0
- package/lib/hooks/Client-only.js +18 -0
- package/lib/hooks/Client-only.js.map +1 -0
- package/lib/hooks/hooks.d.ts +4 -0
- package/lib/hooks/hooks.d.ts.map +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/use-hydrated.d.ts +19 -0
- package/lib/hooks/use-hydrated.d.ts.map +1 -0
- package/lib/hooks/use-hydrated.js +24 -0
- package/lib/hooks/use-hydrated.js.map +1 -0
- package/lib/hooks/useLayoutSettings.d.ts +1 -0
- package/lib/hooks/useLayoutSettings.d.ts.map +1 -1
- package/lib/hooks/useLayoutSettings.js +21 -26
- package/lib/hooks/useLayoutSettings.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.native.js +1 -1
- package/lib/interfaces/default-settings.d.ts +1 -0
- package/lib/interfaces/default-settings.d.ts.map +1 -1
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.d.ts.map +1 -1
- package/lib/interfaces/pure-settings.d.ts +9 -1
- package/lib/interfaces/pure-settings.d.ts.map +1 -1
- package/lib/interfaces/searchbar-settings.d.ts +61 -0
- package/lib/interfaces/searchbar-settings.d.ts.map +1 -0
- package/lib/interfaces/settings.d.ts +166 -0
- package/lib/interfaces/settings.d.ts.map +1 -0
- package/lib/interfaces/settings.js +5 -0
- package/lib/interfaces/settings.js.map +1 -0
- package/lib/redux/actions/error-actions.d.ts.map +1 -1
- package/lib/redux/reducers/settings.d.ts.map +1 -1
- package/lib/redux/reducers/settings.js +3 -7
- package/lib/redux/reducers/settings.js.map +1 -1
- package/lib/redux/store.js +1 -1
- package/lib/themes/templates/darkLayoutTheme.d.ts +1 -1
- package/lib/themes/templates/darkLayoutTheme.d.ts.map +1 -1
- package/lib/utils/assignDefaults.d.ts +11 -0
- package/lib/utils/assignDefaults.d.ts.map +1 -0
- package/lib/utils/assignDefaults.js +166 -0
- package/lib/utils/assignDefaults.js.map +1 -0
- package/lib/utils/assignDefaults.test.d.ts +2 -0
- package/lib/utils/assignDefaults.test.d.ts.map +1 -0
- package/lib/utils/generateMenuLink.d.ts.map +1 -1
- package/lib/utils/generateMenuLink.js +13 -1
- package/lib/utils/generateMenuLink.js.map +1 -1
- package/lib/utils/generateMenuLink.test.d.ts +2 -0
- package/lib/utils/generateMenuLink.test.d.ts.map +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/matchMenuKeys.d.ts.map +1 -1
- package/lib/utils/matchMenuKeys.js.map +1 -1
- package/lib/utils/menuUtils.d.ts.map +1 -1
- package/lib/utils/menuUtils.js.map +1 -1
- package/lib/utils/parentRoute.d.ts.map +1 -1
- package/lib/utils/settingsDiff.test.d.ts +2 -0
- package/lib/utils/settingsDiff.test.d.ts.map +1 -0
- package/lib/utils/settingsDifference.d.ts +5 -0
- package/lib/utils/settingsDifference.d.ts.map +1 -0
- package/lib/utils/settingsDifference.js +207 -0
- package/lib/utils/settingsDifference.js.map +1 -0
- package/lib/utils/settingsDifference.test.d.ts +2 -0
- package/lib/utils/settingsDifference.test.d.ts.map +1 -0
- package/package.json +5 -4
- package/lib/antd-themes/ThemeProvider.d.ts +0 -10
- package/lib/antd-themes/ThemeProvider.d.ts.map +0 -1
- package/lib/antd-themes/ThemeProvider.js +0 -34
- package/lib/antd-themes/ThemeProvider.js.map +0 -1
- package/lib/antd-themes/airbnb-dark-theme.d.ts +0 -2
- package/lib/antd-themes/airbnb-dark-theme.d.ts.map +0 -1
- package/lib/antd-themes/airbnb-dark-theme.js +0 -168
- package/lib/antd-themes/airbnb-dark-theme.js.map +0 -1
- package/lib/antd-themes/airbnb-light-theme.d.ts +0 -230
- package/lib/antd-themes/airbnb-light-theme.d.ts.map +0 -1
- package/lib/antd-themes/airbnb-light-theme.js +0 -168
- package/lib/antd-themes/airbnb-light-theme.js.map +0 -1
- package/lib/antd-themes/colors.d.ts.map +0 -1
- package/lib/antd-themes/colors.js.map +0 -1
- package/lib/antd-themes/default-dark-theme.d.ts +0 -2
- package/lib/antd-themes/default-dark-theme.d.ts.map +0 -1
- package/lib/antd-themes/default-dark-theme.js +0 -136
- package/lib/antd-themes/default-dark-theme.js.map +0 -1
- package/lib/antd-themes/default-light-theme.d.ts +0 -199
- package/lib/antd-themes/default-light-theme.d.ts.map +0 -1
- package/lib/antd-themes/default-light-theme.js +0 -136
- package/lib/antd-themes/default-light-theme.js.map +0 -1
- package/lib/antd-themes/github-dark-theme.d.ts +0 -2
- package/lib/antd-themes/github-dark-theme.d.ts.map +0 -1
- package/lib/antd-themes/github-dark-theme.js +0 -168
- package/lib/antd-themes/github-dark-theme.js.map +0 -1
- package/lib/antd-themes/github-light-theme.d.ts +0 -230
- package/lib/antd-themes/github-light-theme.d.ts.map +0 -1
- package/lib/antd-themes/github-light-theme.js +0 -168
- package/lib/antd-themes/github-light-theme.js.map +0 -1
- package/lib/antd-themes/index.d.ts +0 -14
- package/lib/antd-themes/index.d.ts.map +0 -1
- package/lib/antd-themes/slack-dark-theme.d.ts +0 -2
- package/lib/antd-themes/slack-dark-theme.d.ts.map +0 -1
- package/lib/antd-themes/slack-dark-theme.js +0 -167
- package/lib/antd-themes/slack-dark-theme.js.map +0 -1
- package/lib/antd-themes/slack-light-theme.d.ts +0 -229
- package/lib/antd-themes/slack-light-theme.d.ts.map +0 -1
- package/lib/antd-themes/slack-light-theme.js +0 -167
- package/lib/antd-themes/slack-light-theme.js.map +0 -1
- package/lib/antd-themes/spotify-dark-theme.d.ts +0 -2
- package/lib/antd-themes/spotify-dark-theme.d.ts.map +0 -1
- package/lib/antd-themes/spotify-dark-theme.js +0 -168
- package/lib/antd-themes/spotify-dark-theme.js.map +0 -1
- package/lib/antd-themes/spotify-light-theme.d.ts +0 -230
- package/lib/antd-themes/spotify-light-theme.d.ts.map +0 -1
- package/lib/antd-themes/spotify-light-theme.js +0 -168
- package/lib/antd-themes/spotify-light-theme.js.map +0 -1
- package/lib/antd-themes/themeRegistry.d.ts +0 -2
- package/lib/antd-themes/themeRegistry.d.ts.map +0 -1
- package/lib/antd-themes/themeRegistry.js +0 -12
- package/lib/antd-themes/themeRegistry.js.map +0 -1
- package/lib/utils/getAntdLocale.d.ts +0 -3
- package/lib/utils/getAntdLocale.d.ts.map +0 -1
- package/lib/utils/getAntdLocale.js +0 -18
- package/lib/utils/getAntdLocale.js.map +0 -1
|
@@ -1,14 +1,85 @@
|
|
|
1
|
+
import {SearchBarBehavior}from'../interfaces/settings.js';// import { ContentWidth, SearchBarBehavior, NavigationMode, SideMenuType } from '@admin-layout/tailwind-design-pro/src/machines/types';
|
|
2
|
+
// Constants for common values
|
|
3
|
+
const DEFAULT_LAYOUT = {
|
|
4
|
+
contentWidth: 'Fluid',
|
|
5
|
+
fixedHeader: true,
|
|
6
|
+
fixedSidebar: true,
|
|
7
|
+
splitMenus: false,
|
|
8
|
+
};
|
|
9
|
+
const DEFAULT_HEADER = {
|
|
10
|
+
showLogo: true,
|
|
11
|
+
showRightContent: true,
|
|
12
|
+
showMenuToggle: true,
|
|
13
|
+
showBackButton: true,
|
|
14
|
+
showPageTitle: true,
|
|
15
|
+
showActionButtons: true,
|
|
16
|
+
position: 'fixed',
|
|
17
|
+
backgroundColor: 'inherit',
|
|
18
|
+
elevation: 2,
|
|
19
|
+
showHeader: true,
|
|
20
|
+
showMenu: true,
|
|
21
|
+
menuHeaderRender: true,
|
|
22
|
+
searchBarRender: true,
|
|
23
|
+
searchBarBehavior: SearchBarBehavior.PERMANENT,
|
|
24
|
+
searchBarOverlay: true,
|
|
25
|
+
scrollThreshold: 50,
|
|
26
|
+
};
|
|
27
|
+
const SEARCH_TYPES = {
|
|
28
|
+
HOTELS: 'HOTELS',
|
|
29
|
+
FLIGHTS: 'FLIGHTS',
|
|
30
|
+
CARS: 'CARS',
|
|
31
|
+
};
|
|
32
|
+
const AMENITIES = [
|
|
33
|
+
'WiFi',
|
|
34
|
+
'Pool',
|
|
35
|
+
'Parking',
|
|
36
|
+
'Air Conditioning',
|
|
37
|
+
'Kitchen',
|
|
38
|
+
'Washer',
|
|
39
|
+
'Dryer',
|
|
40
|
+
'TV',
|
|
41
|
+
'Gym',
|
|
42
|
+
'Elevator',
|
|
43
|
+
'Hot Tub',
|
|
44
|
+
'Breakfast',
|
|
45
|
+
];
|
|
46
|
+
// Shared view configuration
|
|
47
|
+
const SHARED_VIEW_CONFIG = {
|
|
48
|
+
layout: {
|
|
49
|
+
...DEFAULT_LAYOUT,
|
|
50
|
+
navigationMode: 'mixed',
|
|
51
|
+
sideMenuType: 'expanded',
|
|
52
|
+
upperMenuDividerName: 'Navigation',
|
|
53
|
+
middleMenuDividerName: 'Dashboard',
|
|
54
|
+
lowerMenuDividerName: 'Admin',
|
|
55
|
+
},
|
|
56
|
+
regions: {
|
|
57
|
+
header: {
|
|
58
|
+
...DEFAULT_HEADER,
|
|
59
|
+
showSearchSlot: true,
|
|
60
|
+
height: '64px',
|
|
61
|
+
},
|
|
62
|
+
background: {
|
|
63
|
+
type: 'color',
|
|
64
|
+
color: 'inherit',
|
|
65
|
+
image: '',
|
|
66
|
+
video: '',
|
|
67
|
+
videoThumbnail: '',
|
|
68
|
+
},
|
|
69
|
+
footer: { showFooter: true },
|
|
70
|
+
},
|
|
71
|
+
};
|
|
1
72
|
const defaultSettings = {
|
|
2
73
|
logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
|
|
3
|
-
themeType: 'light',
|
|
74
|
+
themeType: 'light',
|
|
4
75
|
theme: 'default',
|
|
5
|
-
primaryColor: '#1890ff',
|
|
6
|
-
colorPrimary: '#1677FF',
|
|
76
|
+
primaryColor: '#1890ff',
|
|
77
|
+
colorPrimary: '#1677FF',
|
|
78
|
+
secondaryColor: '#4A5568',
|
|
7
79
|
layout: 'mix',
|
|
8
|
-
contentWidth:
|
|
9
|
-
fixedHeader:
|
|
10
|
-
fixSiderbar:
|
|
11
|
-
searchBarRender: true,
|
|
80
|
+
contentWidth: DEFAULT_LAYOUT.contentWidth,
|
|
81
|
+
fixedHeader: DEFAULT_LAYOUT.fixedHeader,
|
|
82
|
+
fixSiderbar: DEFAULT_LAYOUT.fixedSidebar,
|
|
12
83
|
colorWeak: false,
|
|
13
84
|
title: 'CDMBase LLC',
|
|
14
85
|
iconfontUrl: '',
|
|
@@ -20,15 +91,89 @@ const defaultSettings = {
|
|
|
20
91
|
titleHeight: '30px',
|
|
21
92
|
titleFontSize: '1.8rem',
|
|
22
93
|
letterSpacings: '1px',
|
|
23
|
-
showHeader: true,
|
|
24
|
-
showFooter: true,
|
|
25
|
-
showMenu: false,
|
|
26
|
-
// menuRender: true,
|
|
27
94
|
headerTheme: undefined,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
95
|
+
loginThemeColor: 'blue',
|
|
96
|
+
loginFormPosition: 'center',
|
|
97
|
+
loginSocials: '{"Google":true,"Apple":true,"Facebook":true}',
|
|
98
|
+
loginBackgroundImage: null,
|
|
99
|
+
verifyFormLayout: 'center',
|
|
100
|
+
verifyFormImageUrl: '',
|
|
101
|
+
verifyFormBackgroundStyle: 'color',
|
|
102
|
+
verifyFormVisibleFields: '["firstName","lastName","username","companyName","workEmail","phoneNumber","dateOfBirth"]',
|
|
103
|
+
verifyFormShowSkipButton: false,
|
|
104
|
+
currentRoute: '/',
|
|
105
|
+
routeSettings: {
|
|
106
|
+
'/': {
|
|
107
|
+
layout: {
|
|
108
|
+
desktop: SHARED_VIEW_CONFIG.layout,
|
|
109
|
+
mobile: SHARED_VIEW_CONFIG.layout,
|
|
110
|
+
},
|
|
111
|
+
regions: {
|
|
112
|
+
desktop: SHARED_VIEW_CONFIG.regions,
|
|
113
|
+
mobile: SHARED_VIEW_CONFIG.regions,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
components: [],
|
|
118
|
+
activeComponent: null,
|
|
119
|
+
searchbarSettings: {
|
|
120
|
+
enabledSearchBars: {
|
|
121
|
+
[SEARCH_TYPES.HOTELS]: true,
|
|
122
|
+
[SEARCH_TYPES.FLIGHTS]: true,
|
|
123
|
+
[SEARCH_TYPES.CARS]: true,
|
|
124
|
+
},
|
|
125
|
+
fieldsConfig: {
|
|
126
|
+
[SEARCH_TYPES.HOTELS]: {
|
|
127
|
+
location: true,
|
|
128
|
+
dates: true,
|
|
129
|
+
guests: true,
|
|
130
|
+
},
|
|
131
|
+
[SEARCH_TYPES.FLIGHTS]: {
|
|
132
|
+
fromLocation: true,
|
|
133
|
+
toLocation: true,
|
|
134
|
+
dates: true,
|
|
135
|
+
returnFlight: true,
|
|
136
|
+
},
|
|
137
|
+
[SEARCH_TYPES.CARS]: {
|
|
138
|
+
pickupLocation: true,
|
|
139
|
+
dropoffLocation: true,
|
|
140
|
+
dates: true,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
datePickerConfig: {
|
|
144
|
+
[SEARCH_TYPES.HOTELS]: {
|
|
145
|
+
enableSingleDayMode: true,
|
|
146
|
+
enableTimeSelection: true,
|
|
147
|
+
defaultToSingleDay: false,
|
|
148
|
+
},
|
|
149
|
+
[SEARCH_TYPES.FLIGHTS]: {
|
|
150
|
+
enableSingleDayMode: false,
|
|
151
|
+
enableTimeSelection: false,
|
|
152
|
+
defaultToSingleDay: false,
|
|
153
|
+
},
|
|
154
|
+
[SEARCH_TYPES.CARS]: {
|
|
155
|
+
enableSingleDayMode: false,
|
|
156
|
+
enableTimeSelection: true,
|
|
157
|
+
defaultToSingleDay: false,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
advanceFilterConfig: {
|
|
161
|
+
enabled: true,
|
|
162
|
+
fields: {
|
|
163
|
+
distance: true,
|
|
164
|
+
price: true,
|
|
165
|
+
petsAllowed: true,
|
|
166
|
+
instantBooking: true,
|
|
167
|
+
amenities: true,
|
|
168
|
+
datasources: true,
|
|
169
|
+
},
|
|
170
|
+
amenitiesList: AMENITIES.map((name) => ({ name })),
|
|
171
|
+
},
|
|
172
|
+
showTypeSelector: true,
|
|
173
|
+
isSettingsPanelOpen: false,
|
|
174
|
+
showTravelPlanner: false,
|
|
175
|
+
showAIAgent: true,
|
|
176
|
+
},
|
|
32
177
|
siderBgColor: '#000000',
|
|
33
178
|
headerBgColor: '#000000',
|
|
34
179
|
textColor: '#a19c9c',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"0DACA;AACA;AA8EA,MAAM,cAAM,GAAY;IACpB,YAAY,EAAC,OAAA;IACb,WAAgB,EAAA,IAAA;IAChB,YAAc,EAAA;IACd,UAAU,EAAE;;MAEF,iBAAS;IACnB,QAAe,EAAA,IAAA;IACf,sBAAoB;IACpB,cAAa;IACb,cAAc,EAAE;IAChB,aAAY;IACZ,uBAAsB;IACtB,QAAS,EAAA,OAAQ;IACjB,eAAc,EAAA,SAAA;IACd,SAAS,EAAE;IACX,UAAe,EAAA,IAAA;IACf,QAAiB,EAAA,IAAA;IACjB,sBAAqB;IACrB,eAAoB,EAAA,IAAA;IACpB,iBAAgB,mBAAS,CAAA,SAAA;IACzB,gBAAkB,EAAA;IAClB,eAAyB,EAAA,EAAA;;MAED,YAAA,GAAA;IACxB,MAAiB,EAAA,QAAA;IACjB,OAAY,EAAA;AACZ,IAAA,IAAA,EAAA,MAAA;AAGQ,CAAA;AACI,MAAA,SAAA,GAAA;;;;sBAIe;;;;;;cAMb;AACF,IAAA,SAAA;;;;wBAIe,GAAA;;yBAED;sBACU,EAAA,OAAA;oBACC,EAAA,UAAA;4BACD,EAAA;6BACtB,EAAA,WAAA;4BACJ,EAAA,OAAA;AACF,KAAA;AACI,IAAA,OAAA,EAAA;AACI,QAAA,MAAA,EAAA;6BACY;0BACM,EAAA,IAAA;oBACd,MAAgB;;oBAEhB;yBACa;4BACI;qBACT;qBACF;0BACS,EAAA,EAAA;;4BAEL,EAAA;;;qBAGK,GAAA;6EACsB;sBACrB;oBAChB;kBACF,SAAA;AACF,IAAA,YAAA,EAAA,SAAY;oBACR;;iCAEa,YAAC;2CACA;+BACA,CAAA,YAAS;oBACzB;AACF,IAAA,KAAA,EAAA,aAAQ;;oBAEN,EAAA,IAAA;cACJ,EAAA,SAAA;AACF,IAAA,QAAA,EAAA,OAAQ;AACJ,IAAA,UAAA,EAAA,qBAAQ;qBACI,KAAA;uBACM;2BACE;oBAChB,KAAc;0BACA;qBACD,MAAA;qBACI,EAAA,QAAA;gEACA;wBACX,EAAA;oBACN,EAAe,QAAA;sBACN,EAAA,EAAA;6BACC,EAAA;2BACF,EAAA,2FAAU;4BACF,EAAA,KAAA;qBACD;;;oBAGf;uBACF,EAAA,kBAAA,CAAA,MAAA;AACF,gBAAA,MAAA,EAAA,kBAAY,CAAA,MAAA;;qBAEH;uBACA,EAAA,kBAAS,CAAA,OAAA;sBACT,EAAA,kBAAS,CAAA,OAAA;;AAElB,SAAA;;kBAEE;mBACJ,EAAA,IAAA;qBACJ,EAAA;AACL,QACH,iBAAA,EAAA;YACQ,CAAA,YAAQ,CAAA,MAAA,GAAA,IAAA;AAClB,YAAA,CAAA,YAAiB,CAAA,OAAS,GAAK,IAAA;YACjC,CAAA,YAAA,CAAA,IAAA,GAAA,IAAA;AAEF,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../src/config/env-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../src/config/env-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAOhD,QAAA,MAAM,SAAS;;;gCAKb,CAAC;AACH,QAAA,IAAI,MAAM,EAAS,OAAO,SAAS,CAAC;AAepC,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/lib/config/env-config.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import*as envalid from'envalid';import {getEnvironment}from'@common-stack/core';import {defaultSettings}from'./defaultSettings.js';const { json } = envalid;
|
|
1
|
+
import*as envalid from'envalid';import {getEnvironment}from'@common-stack/core';import {defaultSettings}from'./defaultSettings.js';import {merge}from'lodash-es';const { json } = envalid;
|
|
2
2
|
const env = getEnvironment();
|
|
3
3
|
const preConfig = envalid.cleanEnv(env, {
|
|
4
4
|
LAYOUT_SETTINGS: json({
|
|
5
|
-
default: JSON.stringify(defaultSettings),
|
|
5
|
+
default: JSON.stringify({ ...defaultSettings, extensionName: 'account' }),
|
|
6
6
|
}),
|
|
7
7
|
APP_DOMAIN: envalid.str({ default: 'cdebase.dev' }),
|
|
8
8
|
});
|
|
9
9
|
let config = {};
|
|
10
|
-
//
|
|
10
|
+
// Parse the LAYOUT_SETTINGS if it exists in the environment
|
|
11
11
|
if (env.LAYOUT_SETTINGS) {
|
|
12
|
-
|
|
12
|
+
try {
|
|
13
|
+
const parsedLayoutSettings = JSON.parse(env.LAYOUT_SETTINGS);
|
|
14
|
+
config = { ...preConfig, LAYOUT_SETTINGS: merge({}, defaultSettings, parsedLayoutSettings) };
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.error('Error parsing LAYOUT_SETTINGS:', error);
|
|
18
|
+
config = preConfig;
|
|
19
|
+
}
|
|
13
20
|
}
|
|
14
21
|
else {
|
|
15
22
|
config = preConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAeA,MAAA,SAAI,GAAM,OAAS,CAAA,YAAiB,EAAA;AAepC,IAAO,eAAW,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-link.d.ts","sourceRoot":"","sources":["../../../src/graphql/link/error-link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAe,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAMvC,KAAK,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,UAAU,CAAC;AACrE,UAAU,UAAU;IAChB,YAAY,EAAE,aAAa,CAAC;CAC/B;AAED,qBAAa,SAAU,YAAW,UAAU;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,KAAK,KAAA;IAoB1D,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS;CAoB/C;AAED,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"error-link.d.ts","sourceRoot":"","sources":["../../../src/graphql/link/error-link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAe,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAMvC,KAAK,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,UAAU,CAAC;AACrE,UAAU,UAAU;IAChB,YAAY,EAAE,aAAa,CAAC;CAC/B;AAED,qBAAa,SAAU,YAAW,UAAU;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,KAAK,KAAA;IAoB1D,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS;CAoB/C;AAED,eAAO,MAAM,cAAc,GAAI,WAAW,UAAU,CAAC,SAAS,eAE7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-link.js","sources":["../../../src/graphql/link/error-link.ts"],"sourcesContent":[null],"names":[],"mappings":"qOAUgB,MAAA;AACf,IAAA,OAAA;AAED,IAAa,mBAAA,CAAA,kBAAqB;QACvB,IAAA,SAAS,CAAA,OAAA,CAAA,WAAA,CAAA,UAAA,CAAA,EAAA;YAEG,MAAA,sBAAY,CAAA,GAAA,CAAU,WAAU,CAAE,UAAK,CAAA;AAoB1D,YAAA,IAAY,MAAC,GAAA;AAoBhB,gBAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,UAAA;AAED,
|
|
1
|
+
{"version":3,"file":"error-link.js","sources":["../../../src/graphql/link/error-link.ts"],"sourcesContent":[null],"names":[],"mappings":"qOAUgB,MAAA;AACf,IAAA,OAAA;AAED,IAAa,mBAAA,CAAA,kBAAqB;QACvB,IAAA,SAAS,CAAA,OAAA,CAAA,WAAA,CAAA,UAAA,CAAA,EAAA;YAEG,MAAA,sBAAY,CAAA,GAAA,CAAU,WAAU,CAAE,UAAK,CAAA;AAoB1D,YAAA,IAAY,MAAC,GAAA;AAoBhB,gBAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,UAAA;AAED,gBAAO,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* You are encouraged to add a fallback that is the same dimensions
|
|
5
|
+
* as the client rendered children. This will avoid content layout
|
|
6
|
+
* shift which is disgusting
|
|
7
|
+
*/
|
|
8
|
+
children(): React.ReactNode;
|
|
9
|
+
fallback?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Render the children only after the JS has loaded client-side. Use an optional
|
|
13
|
+
* fallback component if the JS is not yet loaded.
|
|
14
|
+
*
|
|
15
|
+
* Example: Render a Chart component if JS loads, renders a simple FakeChart
|
|
16
|
+
* component server-side or if there is no JS. The FakeChart can have only the
|
|
17
|
+
* UI without the behavior or be a loading spinner or skeleton.
|
|
18
|
+
* ```tsx
|
|
19
|
+
* return (
|
|
20
|
+
* <ClientOnly fallback={<FakeChart />}>
|
|
21
|
+
* {() => <Chart />}
|
|
22
|
+
* </ClientOnly>
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function ClientOnly({ children, fallback }: Props): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Client-only.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Client-only.d.ts","sourceRoot":"","sources":["../../src/hooks/Client-only.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,KAAK,GAAG;IACT;;;;OAIG;IACH,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,KAAK,2CAE9D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {jsx,Fragment}from'react/jsx-runtime';import {useHydrated}from'./use-hydrated.js';/**
|
|
2
|
+
* Render the children only after the JS has loaded client-side. Use an optional
|
|
3
|
+
* fallback component if the JS is not yet loaded.
|
|
4
|
+
*
|
|
5
|
+
* Example: Render a Chart component if JS loads, renders a simple FakeChart
|
|
6
|
+
* component server-side or if there is no JS. The FakeChart can have only the
|
|
7
|
+
* UI without the behavior or be a loading spinner or skeleton.
|
|
8
|
+
* ```tsx
|
|
9
|
+
* return (
|
|
10
|
+
* <ClientOnly fallback={<FakeChart />}>
|
|
11
|
+
* {() => <Chart />}
|
|
12
|
+
* </ClientOnly>
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
function ClientOnly({ children, fallback = null }) {
|
|
17
|
+
return useHydrated() ? jsx(Fragment, { children: children() }) : jsx(Fragment, { children: fallback });
|
|
18
|
+
}export{ClientOnly};//# sourceMappingURL=Client-only.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Client-only.js","sources":["../../src/hooks/Client-only.tsx"],"sourcesContent":[null],"names":[],"mappings":"yFAII;;;;AAIG;AACH;AACA;;AAGJ;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/hooks/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAExG,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,sBAAsB,EAAE,CAAC;AACjE,cAAc,eAAe,CAAC"}
|
package/lib/hooks/index.d.ts
CHANGED
package/lib/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return a boolean indicating if the JS has been hydrated already.
|
|
3
|
+
* When doing Server-Side Rendering, the result will always be false.
|
|
4
|
+
* When doing Client-Side Rendering, the result will always be false on the
|
|
5
|
+
* first render and true from then on. Even if a new component renders it will
|
|
6
|
+
* always start with true.
|
|
7
|
+
*
|
|
8
|
+
* Example: Disable a button that needs JS to work.
|
|
9
|
+
* ```tsx
|
|
10
|
+
* let hydrated = useHydrated();
|
|
11
|
+
* return (
|
|
12
|
+
* <button type="button" disabled={!hydrated} onClick={doSomethingCustom}>
|
|
13
|
+
* Click me
|
|
14
|
+
* </button>
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useHydrated(): boolean;
|
|
19
|
+
//# sourceMappingURL=use-hydrated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hydrated.d.ts","sourceRoot":"","sources":["../../src/hooks/use-hydrated.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,YAM1B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {useSyncExternalStore}from'react';function subscribe() {
|
|
2
|
+
// biome-ignore lint/suspicious/noEmptyBlockStatements: Mock function
|
|
3
|
+
return () => { };
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Return a boolean indicating if the JS has been hydrated already.
|
|
7
|
+
* When doing Server-Side Rendering, the result will always be false.
|
|
8
|
+
* When doing Client-Side Rendering, the result will always be false on the
|
|
9
|
+
* first render and true from then on. Even if a new component renders it will
|
|
10
|
+
* always start with true.
|
|
11
|
+
*
|
|
12
|
+
* Example: Disable a button that needs JS to work.
|
|
13
|
+
* ```tsx
|
|
14
|
+
* let hydrated = useHydrated();
|
|
15
|
+
* return (
|
|
16
|
+
* <button type="button" disabled={!hydrated} onClick={doSomethingCustom}>
|
|
17
|
+
* Click me
|
|
18
|
+
* </button>
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function useHydrated() {
|
|
23
|
+
return useSyncExternalStore(subscribe, () => true, () => false);
|
|
24
|
+
}export{useHydrated};//# sourceMappingURL=use-hydrated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-hydrated.js","sources":["../../src/hooks/use-hydrated.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAuBG;AACH;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB;;0BAoCP,GAAG;;CA+CzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {useCallback}from'react';import {useDispatch,useSelector,shallowEqual}from'react-redux';import {merge}from'lodash-es';import {defaultSettings}from'../config/defaultSettings.js';import {CHANGE_SETTINGS_ACTION}from'../constants/constants.js';import {compareAndSaveSettingsDifferences}from'../utils/settingsDifference.js';import {useParams}from'react-router';const updateColorWeak = (colorWeak) => {
|
|
2
2
|
// @sri to avoid breaking during SSR, split into to checks
|
|
3
3
|
if (typeof window !== 'undefined') {
|
|
4
4
|
const root = document.getElementById('root');
|
|
@@ -9,72 +9,67 @@ import {useEffect,useCallback}from'react';import {useDispatch,useSelector}from'r
|
|
|
9
9
|
};
|
|
10
10
|
const useLayoutSettings = () => {
|
|
11
11
|
const dispatch = useDispatch();
|
|
12
|
-
const settings = useSelector((state) => state.settings);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
dispatch({
|
|
18
|
-
type: CHANGE_SETTINGS_ACTION,
|
|
19
|
-
payload: settingsData,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}, [dispatch, settings]);
|
|
12
|
+
const settings = useSelector((state) => state.settings, shallowEqual);
|
|
13
|
+
const { orgName: orgNameFromParams } = useSelector((state) => ({
|
|
14
|
+
orgName: state.platform.orgName,
|
|
15
|
+
}), shallowEqual);
|
|
16
|
+
const { orgName: orgNameFromUrl } = useParams();
|
|
25
17
|
const getSettings = useCallback(async () => {
|
|
26
18
|
try {
|
|
27
19
|
const response = await fetch('/resources/settings', {
|
|
28
20
|
method: 'GET',
|
|
29
21
|
headers: {
|
|
30
22
|
'Content-Type': 'application/json',
|
|
23
|
+
orgName: orgNameFromParams || orgNameFromUrl || '',
|
|
31
24
|
},
|
|
32
25
|
});
|
|
33
26
|
if (!response.ok) {
|
|
34
27
|
throw new Error('Failed to fetch settings');
|
|
35
28
|
}
|
|
36
|
-
const
|
|
37
|
-
return
|
|
29
|
+
const diffSettings = await response.json();
|
|
30
|
+
return diffSettings.settings;
|
|
38
31
|
}
|
|
39
32
|
catch (error) {
|
|
40
33
|
console.error(error);
|
|
41
|
-
|
|
34
|
+
// Return default settings if there's an error
|
|
35
|
+
return defaultSettings;
|
|
42
36
|
}
|
|
43
37
|
}, []);
|
|
44
38
|
const setSettings = useCallback(async (config) => {
|
|
45
39
|
const { colorWeak, contentWidth } = config;
|
|
46
40
|
try {
|
|
47
|
-
//
|
|
41
|
+
// Handle UI updates for special settings
|
|
48
42
|
if (settings.contentWidth !== contentWidth) {
|
|
49
43
|
if (typeof window !== 'undefined') {
|
|
50
44
|
window.dispatchEvent(new Event('resize'));
|
|
51
45
|
}
|
|
52
46
|
}
|
|
53
47
|
updateColorWeak(!!colorWeak);
|
|
48
|
+
const cleanDiffSettings = compareAndSaveSettingsDifferences(config, defaultSettings);
|
|
54
49
|
const response = await fetch('/resources/settings', {
|
|
55
50
|
method: 'POST',
|
|
56
51
|
headers: {
|
|
57
52
|
'Content-Type': 'application/json',
|
|
53
|
+
orgName: orgNameFromParams || orgNameFromUrl || '',
|
|
58
54
|
},
|
|
59
|
-
body: JSON.stringify({ config }),
|
|
55
|
+
body: JSON.stringify({ config: cleanDiffSettings }),
|
|
60
56
|
});
|
|
61
57
|
if (!response.ok) {
|
|
62
58
|
throw new Error('Failed to update settings');
|
|
63
59
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
60
|
+
const result = await response.json();
|
|
61
|
+
const pageDefaultSettings = result || defaultSettings;
|
|
62
|
+
// Merge the full config with default settings before updating the store
|
|
63
|
+
const mergedSettings = merge({}, pageDefaultSettings, config);
|
|
68
64
|
dispatch({
|
|
69
65
|
type: CHANGE_SETTINGS_ACTION,
|
|
70
|
-
payload:
|
|
66
|
+
payload: mergedSettings,
|
|
71
67
|
});
|
|
72
|
-
return await response.json();
|
|
73
68
|
}
|
|
74
69
|
catch (error) {
|
|
75
70
|
console.error(error);
|
|
76
71
|
return null;
|
|
77
72
|
}
|
|
78
73
|
}, [dispatch, settings]);
|
|
79
|
-
return { settings, setSettings };
|
|
74
|
+
return { settings, setSettings, getSettings };
|
|
80
75
|
};export{useLayoutSettings};//# sourceMappingURL=useLayoutSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayoutSettings.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLayoutSettings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{
|
|
1
|
+
export{SearchBarBehavior}from'./interfaces/settings.js';export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';export{config}from'./config/env-config.js';export{defaultSettings}from'./config/defaultSettings.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';export{blue}from'./colors/presets/blue.js';export{brinkPink}from'./colors/presets/brinkPink.js';export{cyan}from'./colors/presets/cyan.js';export{green}from'./colors/presets/green.js';export{lime}from'./colors/presets/lime.js';export{orange}from'./colors/presets/orange.js';export{pink}from'./colors/presets/pink.js';export{purple}from'./colors/presets/purple.js';export{red}from'./colors/presets/red.js';export{skyBlue}from'./colors/presets/skyBlue.js';export{turquoise}from'./colors/presets/turquoise.js';export{yellow}from'./colors/presets/yellow.js';export{white}from'./colors/presets/white.js';export{black}from'./colors/presets/black.js';export{colorList,getThemeColors}from'./colors/colorsList.js';//# sourceMappingURL=index.js.map
|
package/lib/index.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{
|
|
1
|
+
export{SearchBarBehavior}from'./interfaces/settings.js';export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';export{config}from'./config/env-config.js';export{defaultSettings}from'./config/defaultSettings.js';//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/default-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"default-settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/default-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export type ContentWidth = 'Fluid' | 'Fixed';
|
|
2
3
|
export type MenuTheme = 'light' | 'dark';
|
|
3
4
|
export interface RenderSetting {
|
|
@@ -9,6 +10,7 @@ export interface RenderSetting {
|
|
|
9
10
|
showMenu?: boolean | any;
|
|
10
11
|
menuRender?: false | any;
|
|
11
12
|
menuHeaderRender?: false | any;
|
|
13
|
+
scrollThreshold?: number;
|
|
12
14
|
}
|
|
13
15
|
export interface PureSettings {
|
|
14
16
|
/**
|
|
@@ -52,6 +54,10 @@ export interface PureSettings {
|
|
|
52
54
|
* @description Set to false, only pageName is displayed in the layout, not pageName-title
|
|
53
55
|
*/
|
|
54
56
|
title: string | false;
|
|
57
|
+
/**
|
|
58
|
+
* @name Logo URL for the header
|
|
59
|
+
*/
|
|
60
|
+
logo?: string | React.ReactNode;
|
|
55
61
|
/**
|
|
56
62
|
* Your custom iconfont Symbol script Url
|
|
57
63
|
* eg://at.alicdn.com/t/font_1039637_btcrd5co4w.js
|
|
@@ -74,6 +80,8 @@ export interface PureSettings {
|
|
|
74
80
|
*/
|
|
75
81
|
splitMenus?: boolean;
|
|
76
82
|
siderMenuType?: string;
|
|
83
|
+
currentRoute?: string;
|
|
84
|
+
routeSettings?: any;
|
|
77
85
|
}
|
|
78
|
-
export type ProSettings = PureSettings
|
|
86
|
+
export type ProSettings = PureSettings;
|
|
79
87
|
//# sourceMappingURL=pure-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure-settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/pure-settings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IACzB,gBAAgB,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"pure-settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/pure-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,aAAa;IAC1B,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IACzB,gBAAgB,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAE9C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzE;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,aAAa,CAAC,EAAE,GAAG,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC"}
|