@licklist/design 0.78.5-dev.35 → 0.78.5-dev.37
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/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +15 -11
- package/dist/index.js +1 -1
- package/dist/v2/components/NPSScore/NPSScore.d.ts +18 -0
- package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -0
- package/dist/v2/components/NPSScore/index.d.ts +3 -0
- package/dist/v2/components/NPSScore/index.d.ts.map +1 -0
- package/dist/v2/components/UserPanel/UserPanel.js +168 -0
- package/dist/v2/components/UserPanel/UserPanel.scss.js +6 -0
- package/dist/v2/index.d.ts +4 -0
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +8 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +8 -2
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +20 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +66 -65
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +5 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/TopNavigation.js +16 -1
- package/dist/v2/navigation/DashboardLayout/index.d.ts +1 -1
- package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/auth/Authorizer.tsx +23 -19
- package/src/v2/components/NPSScore/NPSScore.scss +330 -0
- package/src/v2/components/NPSScore/NPSScore.stories.tsx +29 -0
- package/src/v2/components/NPSScore/NPSScore.tsx +209 -0
- package/src/v2/components/NPSScore/index.ts +2 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +34 -0
- package/src/v2/index.ts +32 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +1 -1
- package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +37 -12
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +41 -23
- package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +27 -1
- package/src/v2/navigation/DashboardLayout/index.ts +15 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorizer.d.ts","sourceRoot":"","sources":["../../src/auth/Authorizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAA;AASnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CACnC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Authorizer.d.ts","sourceRoot":"","sources":["../../src/auth/Authorizer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAA;AASnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CACnC;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CAqFzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/auth/Authorizer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useCallback, useEffect } from 'react';
|
|
3
|
-
import { useLocation, matchPath } from 'react-router-dom';
|
|
3
|
+
import { useLocation, useNavigate, matchPath } from 'react-router-dom';
|
|
4
4
|
import useUser from '@licklist/plugins/dist/context/user/hooks/useUser';
|
|
5
5
|
import { MATCH_ROUTE_PATTERNS, ROUTES } from '@licklist/core/dist/Config';
|
|
6
6
|
import useAuthApi from '@licklist/plugins/dist/hooks/Api/useAuthApi';
|
|
@@ -72,6 +72,7 @@ function Authorizer(props) {
|
|
|
72
72
|
var user = useUser();
|
|
73
73
|
var useProfile = useAuthApi().useProfile;
|
|
74
74
|
var pathname = useLocation().pathname;
|
|
75
|
+
var navigate = useNavigate();
|
|
75
76
|
// This will re-fetch user's profile
|
|
76
77
|
var profile = useProfile();
|
|
77
78
|
var _useState = _sliced_to_array(useState(false), 2), isValidated = _useState[0], setIsValidated = _useState[1];
|
|
@@ -94,7 +95,7 @@ function Authorizer(props) {
|
|
|
94
95
|
});
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
97
|
-
|
|
98
|
+
var publicRoutes = [
|
|
98
99
|
ROUTES.LOGIN_PAGE,
|
|
99
100
|
ROUTES.REGISTER_PAGE,
|
|
100
101
|
ROUTES.PRIVACY_PAGE,
|
|
@@ -104,26 +105,29 @@ function Authorizer(props) {
|
|
|
104
105
|
ROUTES.FORGOT_PASSWORD,
|
|
105
106
|
ROUTES.SSO_LOGIN,
|
|
106
107
|
ROUTES.MAINTENANCE_PAGE
|
|
107
|
-
].concat(_to_consumable_array(matchedPathPatternUrls()))
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
].concat(_to_consumable_array(matchedPathPatternUrls()));
|
|
109
|
+
// If we're on a public route (e.g. /login), mark as validated and never redirect
|
|
110
|
+
if (publicRoutes.includes(pathname)) {
|
|
111
|
+
setIsValidated(true);
|
|
111
112
|
return;
|
|
112
113
|
}
|
|
113
114
|
var route = RouteService.getCurrentRoute();
|
|
114
|
-
|
|
115
|
-
ROUTES.
|
|
115
|
+
navigate([
|
|
116
|
+
ROUTES.LOGIN_PAGE,
|
|
116
117
|
"returnUrl=".concat(escape(route))
|
|
117
|
-
].join('?')
|
|
118
|
+
].join('?'), {
|
|
119
|
+
replace: true
|
|
120
|
+
});
|
|
118
121
|
}, [
|
|
119
122
|
auth.secrets,
|
|
120
123
|
user.profile,
|
|
121
124
|
profile.data,
|
|
122
|
-
matchedPathPatternUrls,
|
|
123
125
|
profile.isError,
|
|
124
126
|
profile.isLoading,
|
|
125
127
|
profile.isFetching,
|
|
126
|
-
pathname
|
|
128
|
+
pathname,
|
|
129
|
+
matchedPathPatternUrls,
|
|
130
|
+
navigate
|
|
127
131
|
]);
|
|
128
132
|
if (profile.isFetching || profile.isLoading || !isValidated) return /*#__PURE__*/ jsx(BlockLoader, {});
|
|
129
133
|
return /*#__PURE__*/ jsx(Fragment, {
|
package/dist/index.js
CHANGED
|
@@ -215,7 +215,7 @@ export { Chart } from './v2/dashboard-analytics/chart/Chart.js';
|
|
|
215
215
|
export { Dashboard } from './v2/dashboard-analytics/dashboard/Dashboard.js';
|
|
216
216
|
export { Blog } from './v2/dashboard-analytics/blog-posts/Blog.js';
|
|
217
217
|
export { DashboardLayout } from './v2/navigation/DashboardLayout/DashboardLayout.js';
|
|
218
|
-
export { ProviderSidebar } from './v2/navigation/DashboardLayout/ProviderSidebar.js';
|
|
218
|
+
export { AnalyticsIcon, CustomersIcon, FlowsIcon, HomeIcon, InventoryIcon, LoyaltyIcon, MarketingIcon, ProviderSidebar, ReportsIcon, SettingsIcon, WaiversIcon } from './v2/navigation/DashboardLayout/ProviderSidebar.js';
|
|
219
219
|
export { AdminSidebar } from './v2/navigation/DashboardLayout/AdminSidebar.js';
|
|
220
220
|
export { TopNavigation } from './v2/navigation/DashboardLayout/TopNavigation.js';
|
|
221
221
|
export { DashboardFooter } from './v2/navigation/DashboardLayout/DashboardFooter.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './NPSScore.scss';
|
|
3
|
+
export interface NPSScoreProps {
|
|
4
|
+
/** User's first name for personalized greeting */
|
|
5
|
+
firstName?: string;
|
|
6
|
+
/** Callback when NPS is submitted */
|
|
7
|
+
onSubmit?: (data: NPSSubmitData) => void;
|
|
8
|
+
/** Callback when dismissed */
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface NPSSubmitData {
|
|
12
|
+
score: number;
|
|
13
|
+
role: string;
|
|
14
|
+
reason?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const NPSScore: React.FC<NPSScoreProps>;
|
|
17
|
+
export default NPSScore;
|
|
18
|
+
//# sourceMappingURL=NPSScore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NPSScore.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/NPSScore/NPSScore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,iBAAiB,CAAA;AAExB,MAAM,WAAW,aAAa;IAC1B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB;AAwBD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsK5C,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/NPSScore/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import './UserPanel.scss.js';
|
|
4
|
+
|
|
5
|
+
// Icons as inline SVGs
|
|
6
|
+
var CloseIcon = function() {
|
|
7
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
8
|
+
width: "20",
|
|
9
|
+
height: "20",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
fill: "none",
|
|
12
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
13
|
+
d: "M12 10.586L16.95 5.636L18.364 7.05L13.414 12L18.364 16.95L16.95 18.364L12 13.414L7.05 18.364L5.636 16.95L10.586 12L5.636 7.05L7.05 5.636L12 10.586Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var UserIcon = function() {
|
|
19
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
20
|
+
width: "20",
|
|
21
|
+
height: "20",
|
|
22
|
+
viewBox: "0 0 24 24",
|
|
23
|
+
fill: "none",
|
|
24
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
25
|
+
d: "M4.5 19.5C4.5 16.1863 7.18629 13.5 10.5 13.5C13.8137 13.5 16.5 16.1863 16.5 19.5H15C15 17.0147 12.9853 15 10.5 15C8.01472 15 6 17.0147 6 19.5H4.5ZM10.5 12.75C8.01375 12.75 6 10.7362 6 8.25C6 5.76375 8.01375 3.75 10.5 3.75C12.9862 3.75 15 5.76375 15 8.25C15 10.7362 12.9862 12.75 10.5 12.75ZM10.5 11.25C12.1575 11.25 13.5 9.9075 13.5 8.25C13.5 6.5925 12.1575 5.25 10.5 5.25C8.8425 5.25 7.5 6.5925 7.5 8.25C7.5 9.9075 8.8425 11.25 10.5 11.25Z",
|
|
26
|
+
fill: "currentColor"
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var LogoutIcon = function() {
|
|
31
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
32
|
+
width: "20",
|
|
33
|
+
height: "20",
|
|
34
|
+
viewBox: "0 0 24 24",
|
|
35
|
+
fill: "none",
|
|
36
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
37
|
+
d: "M5 22C4.44772 22 4 21.5523 4 21V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V6H18V4H6V20H18V18H20V21C20 21.5523 19.5523 22 19 22H5ZM18 16V13H11V11H18V8L23 12L18 16Z",
|
|
38
|
+
fill: "currentColor"
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var UserPanel = function(param) {
|
|
43
|
+
var isOpen = param.isOpen, onClose = param.onClose, userName = param.userName, firstName = param.firstName, email = param.email, initials = param.initials, avatarUrl = param.avatarUrl, userNumber = param.userNumber, userRole = param.userRole, onProfileClick = param.onProfileClick, onLogoutClick = param.onLogoutClick;
|
|
44
|
+
var displayFirstName = firstName || (userName === null || userName === void 0 ? void 0 : userName.split(' ')[0]) || 'User';
|
|
45
|
+
var displayInitials = initials || (userName === null || userName === void 0 ? void 0 : userName.split(' ').map(function(n) {
|
|
46
|
+
return n[0];
|
|
47
|
+
}).join('').toUpperCase().slice(0, 2)) || 'U';
|
|
48
|
+
if (!isOpen) return null;
|
|
49
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ jsx("div", {
|
|
52
|
+
className: "user-panel__overlay",
|
|
53
|
+
onClick: onClose
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ jsxs("div", {
|
|
56
|
+
className: "user-panel",
|
|
57
|
+
onClick: function(e) {
|
|
58
|
+
return e.stopPropagation();
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ jsxs("div", {
|
|
62
|
+
className: "user-panel__header",
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ jsxs("div", {
|
|
65
|
+
className: "user-panel__user-info",
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ jsx("div", {
|
|
68
|
+
className: "user-panel__avatar",
|
|
69
|
+
children: avatarUrl ? /*#__PURE__*/ jsx("img", {
|
|
70
|
+
src: avatarUrl,
|
|
71
|
+
alt: "Profile"
|
|
72
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ jsx("svg", {
|
|
75
|
+
width: "32",
|
|
76
|
+
height: "32",
|
|
77
|
+
viewBox: "0 0 32 32",
|
|
78
|
+
fill: "none",
|
|
79
|
+
className: "user-panel__avatar-bg",
|
|
80
|
+
children: /*#__PURE__*/ jsx("circle", {
|
|
81
|
+
cx: "16",
|
|
82
|
+
cy: "16",
|
|
83
|
+
r: "15",
|
|
84
|
+
fill: "var(--fills-main-fill-secondary, #626A90)",
|
|
85
|
+
fillOpacity: "0.2",
|
|
86
|
+
stroke: "var(--fills-main-fill-secondary, #626A90)",
|
|
87
|
+
strokeWidth: "2"
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ jsx("span", {
|
|
91
|
+
className: "user-panel__avatar-initials",
|
|
92
|
+
children: displayInitials
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
})
|
|
96
|
+
}),
|
|
97
|
+
/*#__PURE__*/ jsxs("div", {
|
|
98
|
+
className: "user-panel__user-details",
|
|
99
|
+
children: [
|
|
100
|
+
/*#__PURE__*/ jsxs("h2", {
|
|
101
|
+
className: "user-panel__greeting",
|
|
102
|
+
children: [
|
|
103
|
+
"Hey ",
|
|
104
|
+
displayFirstName
|
|
105
|
+
]
|
|
106
|
+
}),
|
|
107
|
+
email && /*#__PURE__*/ jsx("span", {
|
|
108
|
+
className: "user-panel__email",
|
|
109
|
+
children: email
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ jsx("button", {
|
|
116
|
+
onClick: onClose,
|
|
117
|
+
className: "user-panel__close-btn",
|
|
118
|
+
"aria-label": "Close user menu",
|
|
119
|
+
children: /*#__PURE__*/ jsx(CloseIcon, {})
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ jsx("div", {
|
|
124
|
+
className: "user-panel__menu",
|
|
125
|
+
children: /*#__PURE__*/ jsxs("button", {
|
|
126
|
+
onClick: onProfileClick,
|
|
127
|
+
className: "user-panel__menu-item",
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ jsx(UserIcon, {}),
|
|
130
|
+
/*#__PURE__*/ jsx("span", {
|
|
131
|
+
children: "Profile"
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ jsx("div", {
|
|
137
|
+
className: "user-panel__logout-section",
|
|
138
|
+
children: /*#__PURE__*/ jsxs("button", {
|
|
139
|
+
onClick: onLogoutClick,
|
|
140
|
+
className: "user-panel__menu-item",
|
|
141
|
+
children: [
|
|
142
|
+
/*#__PURE__*/ jsx(LogoutIcon, {}),
|
|
143
|
+
/*#__PURE__*/ jsx("span", {
|
|
144
|
+
children: "Log out"
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
})
|
|
148
|
+
}),
|
|
149
|
+
/*#__PURE__*/ jsx("div", {
|
|
150
|
+
className: "user-panel__footer",
|
|
151
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
152
|
+
className: "user-panel__user-badge",
|
|
153
|
+
children: /*#__PURE__*/ jsxs("span", {
|
|
154
|
+
children: [
|
|
155
|
+
"User: ",
|
|
156
|
+
userNumber ? String(userNumber).padStart(2, '0') : 'N/A',
|
|
157
|
+
userRole ? " - ".concat(userRole) : ''
|
|
158
|
+
]
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export { UserPanel };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import styleInject from '/opt/atlassian/pipelines/agent/build/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".user-panel__overlay{animation:fadeIn .2s ease;background:#0003;inset:0;position:fixed;z-index:40}.user-panel{animation:slideInRight .3s ease;background:var(--surfaces-main-surface-primary,#fff);box-shadow:-4px 0 24px #0000001a;display:flex;flex-direction:column;height:100vh;max-width:320px;position:fixed;right:0;top:0;width:100%;z-index:50}@media (max-width:640px){.user-panel{max-width:100%}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideInRight{0%{transform:translateX(100%)}to{transform:translateX(0)}}.user-panel__header{align-items:center;border-bottom:1px solid var(--borders-main-border-primary,#e8e9ef);display:flex;justify-content:space-between;padding:16px}.user-panel__user-info{align-items:center;display:flex;gap:8px}.user-panel__avatar{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:32px;justify-content:center;overflow:hidden;position:relative;width:32px}.user-panel__avatar img{height:100%;object-fit:cover;width:100%}.user-panel__avatar-bg{position:absolute}.user-panel__avatar-initials{color:var(--labels-main-label-secondary,#626a90);font-family:var(--font-family-sans);font-size:10px;font-weight:800;line-height:8px;margin-top:2px;position:relative}.user-panel__user-details{display:flex;flex-direction:column;gap:2px}.user-panel__greeting{color:var(--labels-main-label-primary,#121e52);font-family:var(--font-family-sans);font-size:14px;font-weight:600;line-height:18px;margin:0}.user-panel__email{color:var(--labels-main-label-secondary,#626a90);font-family:var(--font-family-sans);font-size:12px;line-height:14px}.user-panel__close-btn{align-items:center;background:#0000;border:none;border-radius:8px;color:var(--fills-main-fill-primary,#14215a);cursor:pointer;display:flex;flex-shrink:0;justify-content:center;padding:8px;transition:background .2s ease}.user-panel__close-btn:hover{background:var(--surfaces-main-surface-primary-hover,#f8f8fa)}.user-panel__menu{display:flex;flex:1;flex-direction:column;gap:4px;padding:8px}.user-panel__menu-item{align-items:center;background:#0000;border:none;border-radius:8px;color:var(--labels-main-label-primary,#121e52);cursor:pointer;display:flex;gap:8px;outline:none;padding:8px;text-align:left;transition:background .2s ease;width:100%}.user-panel__menu-item:hover{background:var(--surfaces-main-surface-primary-hover,#f8f8fa)}.user-panel__menu-item:active{background:var(--surfaces-main-surface-primary-pressed,#f0f0f4)}.user-panel__menu-item span{font-family:var(--font-family-sans);font-size:13px;font-weight:500;line-height:16px}.user-panel__menu-item svg{flex-shrink:0}.user-panel__logout-section{padding:4px 8px 8px}.user-panel__footer{border-top:1px solid var(--borders-main-border-primary,#e8e9ef);margin-top:auto;padding:16px}.user-panel__user-badge{align-items:center;background:var(--surfaces-main-surface-tertiary,#e8e9ef);border-radius:8px;display:inline-flex;justify-content:center;padding:4px 8px;width:fit-content}.user-panel__user-badge span{color:var(--labels-main-label-secondary,#626a90);font-family:var(--font-family-mono);font-size:10px;font-weight:600;line-height:12px;white-space:nowrap}";
|
|
4
|
+
styleInject(css_248z);
|
|
5
|
+
|
|
6
|
+
export { css_248z as default };
|
package/dist/v2/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { EntityHeader } from './components/EntityHeader';
|
|
|
16
16
|
export type { EntityHeaderProps } from './components/EntityHeader';
|
|
17
17
|
export { Tooltip } from './components/Tooltip';
|
|
18
18
|
export type { TooltipProps } from './components/Tooltip';
|
|
19
|
+
export { NPSScore } from './components/NPSScore';
|
|
20
|
+
export type { NPSScoreProps, NPSSubmitData } from './components/NPSScore';
|
|
19
21
|
export { UserPanel } from './components/UserPanel';
|
|
20
22
|
export type { UserPanelProps } from './components/UserPanel';
|
|
21
23
|
export { Navigation } from './navigation/Navigation';
|
|
@@ -38,6 +40,8 @@ export { SidebarUserElement } from './navigation/SidebarUserElement';
|
|
|
38
40
|
export type { SidebarUserElementProps } from './navigation/SidebarUserElement';
|
|
39
41
|
export { SidebarWithAuth } from './navigation/SidebarWithAuth';
|
|
40
42
|
export type { SidebarWithAuthProps } from './navigation/SidebarWithAuth';
|
|
43
|
+
export { DashboardLayout, ProviderSidebar, AdminSidebar, TopNavigation, DashboardFooter, HomeIcon, FlowsIcon, InventoryIcon, LoyaltyIcon, CustomersIcon, ReportsIcon, AnalyticsIcon, MarketingIcon, WaiversIcon, SettingsIcon, } from './navigation/DashboardLayout';
|
|
44
|
+
export type { DashboardLayoutProps, DestinationType, ProviderSidebarProps, NavItem, AdminSidebarProps, TopNavigationProps, DashboardFooterProps } from './navigation/DashboardLayout';
|
|
41
45
|
export { NAVIGATION_ITEMS } from './navigation/config';
|
|
42
46
|
export * from './navigation/icons';
|
|
43
47
|
export { useAuth, useCanAccess } from './hooks/useAuth';
|
package/dist/v2/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAGlE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGlE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAGlE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAGzE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAO5D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAG9D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAG5E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAG9E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAGxE,OAAO,EACH,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EAEf,QAAQ,EACR,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,GACf,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACR,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACvB,MAAM,8BAA8B,CAAA;AAGrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,cAAc,oBAAoB,CAAA;AAMlC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAMvD,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAMzD;;;;;;;;;;;;GAYG"}
|
|
@@ -3,7 +3,7 @@ import 'react';
|
|
|
3
3
|
import './DashboardFooter.scss.js';
|
|
4
4
|
|
|
5
5
|
var DashboardFooter = function(param) {
|
|
6
|
-
var
|
|
6
|
+
var version = param.version;
|
|
7
7
|
var currentYear = new Date().getFullYear();
|
|
8
8
|
return /*#__PURE__*/ jsx("footer", {
|
|
9
9
|
className: "dashboard-footer",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { NavItem } from './ProviderSidebar';
|
|
2
3
|
import './DashboardLayout.scss';
|
|
3
4
|
export type DestinationType = 'admin' | 'provider' | 'company';
|
|
4
5
|
export interface DashboardLayoutProps {
|
|
@@ -14,6 +15,9 @@ export interface DashboardLayoutProps {
|
|
|
14
15
|
companyImage?: string;
|
|
15
16
|
userInitials?: string;
|
|
16
17
|
userName?: string;
|
|
18
|
+
userEmail?: string;
|
|
19
|
+
userId?: number;
|
|
20
|
+
userRole?: string;
|
|
17
21
|
inboxCount?: number;
|
|
18
22
|
bellCount?: number;
|
|
19
23
|
activePath?: string;
|
|
@@ -22,12 +26,16 @@ export interface DashboardLayoutProps {
|
|
|
22
26
|
onInboxClick?: () => void;
|
|
23
27
|
onBellClick?: () => void;
|
|
24
28
|
onHelpClick?: () => void;
|
|
29
|
+
onProfileClick?: () => void;
|
|
30
|
+
onLogoutClick?: () => void;
|
|
25
31
|
hasAdminAccess?: boolean;
|
|
26
32
|
children?: React.ReactNode;
|
|
27
33
|
isMobile?: boolean;
|
|
28
34
|
version?: string;
|
|
29
35
|
showFooter?: boolean;
|
|
30
36
|
userPanelOpen?: boolean;
|
|
37
|
+
/** Custom navigation items for provider sidebar */
|
|
38
|
+
navItems?: NavItem[];
|
|
31
39
|
}
|
|
32
40
|
export declare const DashboardLayout: React.FC<DashboardLayoutProps>;
|
|
33
41
|
export default DashboardLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/DashboardLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/DashboardLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAmB,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG5D,OAAO,wBAAwB,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9D,MAAM,WAAW,oBAAoB;IAEjC,WAAW,EAAE,eAAe,CAAA;IAE5B,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAE5B,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,YAAY,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IAEnC,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAErC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IAExB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IAEzB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IAExB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IAExB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAE3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAE1B,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;CACvB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuI1D,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -53,7 +53,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
53
53
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
54
54
|
}
|
|
55
55
|
var DashboardLayout = function(param) {
|
|
56
|
-
var
|
|
56
|
+
var destination = param.destination, sidebarExpanded = param.sidebarExpanded, onSidebarToggle = param.onSidebarToggle, providerName = param.providerName, providerId = param.providerId, providerImage = param.providerImage, _param_providerType = param.providerType, providerType = _param_providerType === void 0 ? 'venue' : _param_providerType, companyName = param.companyName, companyId = param.companyId, companyImage = param.companyImage, userInitials = param.userInitials, userName = param.userName, userEmail = param.userEmail, userId = param.userId, userRole = param.userRole, _param_inboxCount = param.inboxCount, inboxCount = _param_inboxCount === void 0 ? 0 : _param_inboxCount, _param_bellCount = param.bellCount, bellCount = _param_bellCount === void 0 ? 0 : _param_bellCount, _param_activePath = param.activePath, activePath = _param_activePath === void 0 ? '/home' : _param_activePath, onNavigation = param.onNavigation, onUserClick = param.onUserClick, onInboxClick = param.onInboxClick, onBellClick = param.onBellClick, onHelpClick = param.onHelpClick, onProfileClick = param.onProfileClick, onLogoutClick = param.onLogoutClick, _param_hasAdminAccess = param.hasAdminAccess, hasAdminAccess = _param_hasAdminAccess === void 0 ? false : _param_hasAdminAccess, children = param.children, _param_isMobile = param.isMobile, isMobile = _param_isMobile === void 0 ? false : _param_isMobile, version = param.version, _param_showFooter = param.showFooter, showFooter = _param_showFooter === void 0 ? true : _param_showFooter, _param_userPanelOpen = param.userPanelOpen, userPanelOpen = _param_userPanelOpen === void 0 ? false : _param_userPanelOpen, navItems = param.navItems;
|
|
57
57
|
var _useState = _sliced_to_array(useState(false), 2), mobileMenuOpen = _useState[0], setMobileMenuOpen = _useState[1];
|
|
58
58
|
var handleSidebarToggle = function() {
|
|
59
59
|
if (isMobile) {
|
|
@@ -81,7 +81,8 @@ var DashboardLayout = function(param) {
|
|
|
81
81
|
showBackToAdmin: hasAdminAccess && destination !== 'admin',
|
|
82
82
|
onBackToAdmin: function() {
|
|
83
83
|
return onNavigation === null || onNavigation === void 0 ? void 0 : onNavigation('/admin');
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
|
+
navItems: navItems
|
|
85
86
|
});
|
|
86
87
|
};
|
|
87
88
|
var sidebarWidth = sidebarExpanded ? 268 : 72;
|
|
@@ -94,12 +95,17 @@ var DashboardLayout = function(param) {
|
|
|
94
95
|
onSidebarToggle: handleSidebarToggle,
|
|
95
96
|
userInitials: userInitials,
|
|
96
97
|
userName: userName,
|
|
98
|
+
userEmail: userEmail,
|
|
99
|
+
userId: userId,
|
|
100
|
+
userRole: userRole,
|
|
97
101
|
inboxCount: inboxCount,
|
|
98
102
|
notificationCount: bellCount,
|
|
99
103
|
onUserClick: onUserClick,
|
|
100
104
|
onInboxClick: onInboxClick,
|
|
101
105
|
onNotificationClick: onBellClick,
|
|
102
106
|
onHelpClick: onHelpClick,
|
|
107
|
+
onProfileClick: onProfileClick,
|
|
108
|
+
onLogoutClick: onLogoutClick,
|
|
103
109
|
mobileMenuOpen: mobileMenuOpen,
|
|
104
110
|
onMobileMenuToggle: function() {
|
|
105
111
|
return setMobileMenuOpen(!mobileMenuOpen);
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './ProviderSidebar.scss';
|
|
3
|
+
export interface NavItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
path: string;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
end?: boolean;
|
|
9
|
+
}
|
|
3
10
|
export interface ProviderSidebarProps {
|
|
4
11
|
expanded?: boolean;
|
|
5
12
|
providerName?: string;
|
|
@@ -10,6 +17,19 @@ export interface ProviderSidebarProps {
|
|
|
10
17
|
activePath?: string;
|
|
11
18
|
showBackToAdmin?: boolean;
|
|
12
19
|
onBackToAdmin?: () => void;
|
|
20
|
+
/** Custom navigation items - if not provided, uses default items */
|
|
21
|
+
navItems?: NavItem[];
|
|
13
22
|
}
|
|
23
|
+
declare const HomeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare const FlowsIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare const InventoryIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const LoyaltyIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare const CustomersIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare const ReportsIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare const AnalyticsIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare const MarketingIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare const WaiversIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare const SettingsIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export { HomeIcon, FlowsIcon, InventoryIcon, LoyaltyIcon, CustomersIcon, ReportsIcon, AnalyticsIcon, MarketingIcon, WaiversIcon, SettingsIcon, };
|
|
14
34
|
export declare const ProviderSidebar: React.FC<ProviderSidebarProps>;
|
|
15
35
|
//# sourceMappingURL=ProviderSidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderSidebar.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/ProviderSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,wBAAwB,CAAA;AAI/B,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IACnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"ProviderSidebar.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/ProviderSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,wBAAwB,CAAA;AAI/B,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,GAAG,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IACnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;CACvB;AAGD,QAAA,MAAM,QAAQ,+CAIb,CAAA;AAED,QAAA,MAAM,SAAS,+CAId,CAAA;AAED,QAAA,MAAM,aAAa,+CAIlB,CAAA;AAED,QAAA,MAAM,WAAW,+CAIhB,CAAA;AAED,QAAA,MAAM,aAAa,+CAIlB,CAAA;AAED,QAAA,MAAM,WAAW,+CAIhB,CAAA;AAED,QAAA,MAAM,aAAa,+CAIlB,CAAA;AAED,QAAA,MAAM,aAAa,+CAIlB,CAAA;AAED,QAAA,MAAM,WAAW,+CAIhB,CAAA;AAED,QAAA,MAAM,YAAY,+CAIjB,CAAA;AAeD,OAAO,EACH,QAAQ,EACR,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,GACf,CAAA;AAgBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2H1D,CAAA"}
|
|
@@ -150,71 +150,72 @@ var BackArrowIcon = function() {
|
|
|
150
150
|
})
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
+
// Default navigation items
|
|
154
|
+
var defaultNavItems = [
|
|
155
|
+
{
|
|
156
|
+
id: 'home',
|
|
157
|
+
label: 'Home',
|
|
158
|
+
path: '/home',
|
|
159
|
+
icon: /*#__PURE__*/ jsx(HomeIcon, {}),
|
|
160
|
+
end: true
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
id: 'flows',
|
|
164
|
+
label: 'Flows',
|
|
165
|
+
path: '/flows',
|
|
166
|
+
icon: /*#__PURE__*/ jsx(FlowsIcon, {})
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 'inventory',
|
|
170
|
+
label: 'Inventory',
|
|
171
|
+
path: '/inventory',
|
|
172
|
+
icon: /*#__PURE__*/ jsx(InventoryIcon, {})
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 'loyalty',
|
|
176
|
+
label: 'Loyalty',
|
|
177
|
+
path: '/loyalty',
|
|
178
|
+
icon: /*#__PURE__*/ jsx(LoyaltyIcon, {})
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'customers',
|
|
182
|
+
label: 'Customers',
|
|
183
|
+
path: '/customers',
|
|
184
|
+
icon: /*#__PURE__*/ jsx(CustomersIcon, {})
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 'reports',
|
|
188
|
+
label: 'Reports',
|
|
189
|
+
path: '/reports',
|
|
190
|
+
icon: /*#__PURE__*/ jsx(ReportsIcon, {})
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: 'analytics',
|
|
194
|
+
label: 'Analytics',
|
|
195
|
+
path: '/analytics',
|
|
196
|
+
icon: /*#__PURE__*/ jsx(AnalyticsIcon, {})
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'marketing',
|
|
200
|
+
label: 'Marketing',
|
|
201
|
+
path: '/marketing',
|
|
202
|
+
icon: /*#__PURE__*/ jsx(MarketingIcon, {})
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'waivers',
|
|
206
|
+
label: 'Waivers',
|
|
207
|
+
path: '/waivers',
|
|
208
|
+
icon: /*#__PURE__*/ jsx(WaiversIcon, {})
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: 'settings',
|
|
212
|
+
label: 'Settings',
|
|
213
|
+
path: '/settings',
|
|
214
|
+
icon: /*#__PURE__*/ jsx(SettingsIcon, {})
|
|
215
|
+
}
|
|
216
|
+
];
|
|
153
217
|
var ProviderSidebar = function(param) {
|
|
154
|
-
var _param_expanded = param.expanded, expanded = _param_expanded === void 0 ? true : _param_expanded,
|
|
155
|
-
var navItems = [
|
|
156
|
-
{
|
|
157
|
-
id: 'home',
|
|
158
|
-
label: 'Home',
|
|
159
|
-
path: '/home',
|
|
160
|
-
icon: /*#__PURE__*/ jsx(HomeIcon, {}),
|
|
161
|
-
end: true
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
id: 'flows',
|
|
165
|
-
label: 'Flows',
|
|
166
|
-
path: '/flows',
|
|
167
|
-
icon: /*#__PURE__*/ jsx(FlowsIcon, {})
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
id: 'inventory',
|
|
171
|
-
label: 'Inventory',
|
|
172
|
-
path: '/inventory',
|
|
173
|
-
icon: /*#__PURE__*/ jsx(InventoryIcon, {})
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
id: 'loyalty',
|
|
177
|
-
label: 'Loyalty',
|
|
178
|
-
path: '/loyalty',
|
|
179
|
-
icon: /*#__PURE__*/ jsx(LoyaltyIcon, {})
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
id: 'customers',
|
|
183
|
-
label: 'Customers',
|
|
184
|
-
path: '/customers',
|
|
185
|
-
icon: /*#__PURE__*/ jsx(CustomersIcon, {})
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
id: 'reports',
|
|
189
|
-
label: 'Reports',
|
|
190
|
-
path: '/reports',
|
|
191
|
-
icon: /*#__PURE__*/ jsx(ReportsIcon, {})
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
id: 'analytics',
|
|
195
|
-
label: 'Analytics',
|
|
196
|
-
path: '/analytics',
|
|
197
|
-
icon: /*#__PURE__*/ jsx(AnalyticsIcon, {})
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
id: 'marketing',
|
|
201
|
-
label: 'Marketing',
|
|
202
|
-
path: '/marketing',
|
|
203
|
-
icon: /*#__PURE__*/ jsx(MarketingIcon, {})
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: 'waivers',
|
|
207
|
-
label: 'Waivers',
|
|
208
|
-
path: '/waivers',
|
|
209
|
-
icon: /*#__PURE__*/ jsx(WaiversIcon, {})
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
id: 'settings',
|
|
213
|
-
label: 'Settings',
|
|
214
|
-
path: '/settings',
|
|
215
|
-
icon: /*#__PURE__*/ jsx(SettingsIcon, {})
|
|
216
|
-
}
|
|
217
|
-
];
|
|
218
|
+
var _param_expanded = param.expanded, expanded = _param_expanded === void 0 ? true : _param_expanded, providerName = param.providerName, providerId = param.providerId, providerImage = param.providerImage, _param_providerType = param.providerType, providerType = _param_providerType === void 0 ? 'venue' : _param_providerType, onNavigation = param.onNavigation, _param_activePath = param.activePath, activePath = _param_activePath === void 0 ? '/home' : _param_activePath, _param_showBackToAdmin = param.showBackToAdmin, showBackToAdmin = _param_showBackToAdmin === void 0 ? false : _param_showBackToAdmin, onBackToAdmin = param.onBackToAdmin, _param_navItems = param.navItems, navItems = _param_navItems === void 0 ? defaultNavItems : _param_navItems;
|
|
218
219
|
var isActive = function(item) {
|
|
219
220
|
if (item.end) {
|
|
220
221
|
return activePath === item.path || activePath === item.path + '/';
|
|
@@ -340,4 +341,4 @@ var ProviderSidebar = function(param) {
|
|
|
340
341
|
});
|
|
341
342
|
};
|
|
342
343
|
|
|
343
|
-
export { ProviderSidebar };
|
|
344
|
+
export { AnalyticsIcon, CustomersIcon, FlowsIcon, HomeIcon, InventoryIcon, LoyaltyIcon, MarketingIcon, ProviderSidebar, ReportsIcon, SettingsIcon, WaiversIcon };
|
|
@@ -5,13 +5,18 @@ export interface TopNavigationProps {
|
|
|
5
5
|
onSidebarToggle?: () => void;
|
|
6
6
|
userInitials?: string;
|
|
7
7
|
userName?: string;
|
|
8
|
+
userEmail?: string;
|
|
8
9
|
userAvatarUrl?: string;
|
|
10
|
+
userId?: number;
|
|
11
|
+
userRole?: string;
|
|
9
12
|
inboxCount?: number;
|
|
10
13
|
notificationCount?: number;
|
|
11
14
|
onUserClick?: () => void;
|
|
12
15
|
onInboxClick?: () => void;
|
|
13
16
|
onNotificationClick?: () => void;
|
|
14
17
|
onHelpClick?: () => void;
|
|
18
|
+
onProfileClick?: () => void;
|
|
19
|
+
onLogoutClick?: () => void;
|
|
15
20
|
mobileMenuOpen?: boolean;
|
|
16
21
|
onMobileMenuToggle?: () => void;
|
|
17
22
|
sidebarToggleDisabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigation.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/TopNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"TopNavigation.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/TopNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,sBAAsB,CAAA;AAM7B,MAAM,WAAW,kBAAkB;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B;AAoGD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6ItD,CAAA"}
|