pge-front-common 14.1.37 → 14.1.38
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/components/HeaderPge/Header.d.ts +3 -1
- package/lib/components/HeaderPge/Header.stories.d.ts +1 -0
- package/lib/components/Table/table.stories.d.ts +5 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.esm.js +11 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +11 -3
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,10 +11,12 @@ export interface HeaderProps {
|
|
|
11
11
|
name: string;
|
|
12
12
|
userName: string;
|
|
13
13
|
handleLogout: () => void;
|
|
14
|
+
handleLogin?: () => void;
|
|
14
15
|
profile?: string;
|
|
15
16
|
fullName?: string;
|
|
16
17
|
firstName?: string;
|
|
17
18
|
brandLogos?: React.ReactNode;
|
|
19
|
+
showLoginButton?: boolean;
|
|
18
20
|
}
|
|
19
|
-
declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos }: HeaderProps) => React.JSX.Element;
|
|
21
|
+
declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, handleLogin, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos, showLoginButton, }: HeaderProps) => React.JSX.Element;
|
|
20
22
|
export default HeaderPge;
|
|
@@ -8,3 +8,8 @@ export declare const WithCustomCellRendering: Story;
|
|
|
8
8
|
export declare const WithActionColumn: Story;
|
|
9
9
|
export declare const EmptyState: Story;
|
|
10
10
|
export declare const LargeDataSet: Story;
|
|
11
|
+
export declare const WithCheckboxColumn: Story;
|
|
12
|
+
export declare const WithSwitchColumn: Story;
|
|
13
|
+
export declare const WithBasicSelectColumn: Story;
|
|
14
|
+
export declare const WithSelectColumn: Story;
|
|
15
|
+
export declare const WithMultiSelectColumn: Story;
|
package/lib/index.d.ts
CHANGED
|
@@ -620,12 +620,14 @@ interface HeaderProps {
|
|
|
620
620
|
name: string;
|
|
621
621
|
userName: string;
|
|
622
622
|
handleLogout: () => void;
|
|
623
|
+
handleLogin?: () => void;
|
|
623
624
|
profile?: string;
|
|
624
625
|
fullName?: string;
|
|
625
626
|
firstName?: string;
|
|
626
627
|
brandLogos?: React__default.ReactNode;
|
|
628
|
+
showLoginButton?: boolean;
|
|
627
629
|
}
|
|
628
|
-
declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos }: HeaderProps) => React__default.JSX.Element;
|
|
630
|
+
declare const HeaderPge: ({ isRHDigital, isCASC, isResponsiveCASC, optionSelection, options, name, userName, handleLogout, handleLogin, isPortalServidor, profile, hasGestor, fullName, firstName, brandLogos, showLoginButton, }: HeaderProps) => React__default.JSX.Element;
|
|
629
631
|
|
|
630
632
|
type TitleProps = {
|
|
631
633
|
title: string;
|
package/lib/index.esm.js
CHANGED
|
@@ -8782,7 +8782,16 @@ var styles$i = {"separator_background":"header-module__separator_background___Si
|
|
|
8782
8782
|
styleInject(css_248z$i);
|
|
8783
8783
|
|
|
8784
8784
|
var HeaderPge = function (_a) {
|
|
8785
|
-
var _b = _a.isRHDigital, isRHDigital = _b === void 0 ? false : _b, _c = _a.isCASC, isCASC = _c === void 0 ? false : _c, _d = _a.isResponsiveCASC, isResponsiveCASC = _d === void 0 ? false : _d, optionSelection = _a.optionSelection, options = _a.options, name = _a.name, userName = _a.userName, handleLogout = _a.handleLogout, isPortalServidor = _a.isPortalServidor, profile = _a.profile, _e = _a.hasGestor, hasGestor = _e === void 0 ? true : _e, fullName = _a.fullName, firstName = _a.firstName, brandLogos = _a.brandLogos;
|
|
8785
|
+
var _b = _a.isRHDigital, isRHDigital = _b === void 0 ? false : _b, _c = _a.isCASC, isCASC = _c === void 0 ? false : _c, _d = _a.isResponsiveCASC, isResponsiveCASC = _d === void 0 ? false : _d, optionSelection = _a.optionSelection, options = _a.options, name = _a.name, userName = _a.userName, handleLogout = _a.handleLogout, handleLogin = _a.handleLogin, isPortalServidor = _a.isPortalServidor, profile = _a.profile, _e = _a.hasGestor, hasGestor = _e === void 0 ? true : _e, fullName = _a.fullName, firstName = _a.firstName, brandLogos = _a.brandLogos, _f = _a.showLoginButton, showLoginButton = _f === void 0 ? false : _f;
|
|
8786
|
+
var renderUserArea = function () {
|
|
8787
|
+
if (showLoginButton) {
|
|
8788
|
+
return (React__default.createElement(PgeButton, { variant: "primary", title: "Login", onClick: handleLogin, leftIcon: React__default.createElement(IconProfile, { width: "14", height: "14" }) }));
|
|
8789
|
+
}
|
|
8790
|
+
if (!isCASC) {
|
|
8791
|
+
return (React__default.createElement(UserButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName }));
|
|
8792
|
+
}
|
|
8793
|
+
return (React__default.createElement(UserCascButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, isResponsiveCASC: true, isCASC: isCASC, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName }));
|
|
8794
|
+
};
|
|
8786
8795
|
return (React__default.createElement(React__default.Fragment, null,
|
|
8787
8796
|
React__default.createElement("div", { className: styles$i.separator_background }),
|
|
8788
8797
|
React__default.createElement("header", { className: "".concat(styles$i.containerHeaderIndex, " ").concat(isRHDigital || isCASC ? "" : styles$i.set_shadow, " ").concat(isResponsiveCASC && isCASC ? styles$i.responsiveCASC : "") },
|
|
@@ -8797,8 +8806,7 @@ var HeaderPge = function (_a) {
|
|
|
8797
8806
|
React__default.createElement(LogoPGERG, { className: "".concat(styles$i.iconLogo, " ").concat(styles$i.iconLogoPGE) }),
|
|
8798
8807
|
React__default.createElement("div", { className: styles$i.verticalDivider }),
|
|
8799
8808
|
React__default.createElement(LogoCASC, { className: "".concat(styles$i.iconLogoCASC) })))),
|
|
8800
|
-
|
|
8801
|
-
isCASC && (React__default.createElement(UserCascButton, { name: name, userName: userName, handleLogout: handleLogout, isPortalServidor: isPortalServidor, isResponsiveCASC: true, isCASC: isCASC, profile: profile, hasGestor: hasGestor, fullName: fullName, firstName: firstName })))))));
|
|
8809
|
+
renderUserArea())))));
|
|
8802
8810
|
};
|
|
8803
8811
|
|
|
8804
8812
|
var css_248z$h = ".styles-module__title__home___IHOVr {\r\n font-size: 24px;\r\n font-weight: 700;\r\n text-align: left;\r\n color: #005a92;\r\n\r\n @media (max-width: 764px) {\r\n font-size: 16px;\r\n }\r\n}\r\n";
|