@linzjs/lui 11.10.2 → 11.10.3
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/CHANGELOG.md +7 -0
- package/dist/components/lol/LOLCommonDrawerMenu.d.ts +1 -0
- package/dist/components/lol/LOLCommonDrawerMenu.test.d.ts +43 -0
- package/dist/components/lol/LOLComponents.stories.d.ts +1 -0
- package/dist/lui.cjs.development.js +26 -3
- package/dist/lui.cjs.development.js.map +1 -1
- package/dist/lui.cjs.production.min.js +1 -1
- package/dist/lui.cjs.production.min.js.map +1 -1
- package/dist/lui.esm.js +26 -3
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [11.10.3](https://github.com/linz/lui/compare/v11.10.2...v11.10.3) (2022-01-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add missing dependency to useEffect hook. ([#513](https://github.com/linz/lui/issues/513)) ([4e4998c](https://github.com/linz/lui/commit/4e4998c299f7cc1f8b215f70047874e1bc2ef13d))
|
|
7
|
+
|
|
1
8
|
## [11.10.2](https://github.com/linz/lui/compare/v11.10.1...v11.10.2) (2022-01-12)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -9,6 +9,7 @@ export declare type ILOLCommonDrawerMenuProps = Omit<ILOLAppLauncherMenuProps, '
|
|
|
9
9
|
appSpecificLinks?: ReactNode;
|
|
10
10
|
path: string;
|
|
11
11
|
hasStickyHeader?: boolean;
|
|
12
|
+
showRequestsLink?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export declare const LOLCommonDrawerMenu: (props: ILOLCommonDrawerMenuProps) => JSX.Element;
|
|
14
15
|
export declare const LOLCommonDrawerMenuAfterLinks: (props: {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { IFirm } from './contexts/LOLUserContext';
|
|
3
|
+
export declare const mockGetUserInfo: (firms: IFirm[]) => jest.Mock<import("msw/lib/types").AsyncResponseResolverReturnType<import("msw/lib/types").MockedResponse<{
|
|
4
|
+
user: {
|
|
5
|
+
id: string;
|
|
6
|
+
idHash: string;
|
|
7
|
+
email: string;
|
|
8
|
+
givenNames: string;
|
|
9
|
+
surname: string;
|
|
10
|
+
loginType: string;
|
|
11
|
+
preferredName: string;
|
|
12
|
+
firms: IFirm[];
|
|
13
|
+
passwordChangeRequired: boolean;
|
|
14
|
+
roles: never[];
|
|
15
|
+
lastLogin: string;
|
|
16
|
+
};
|
|
17
|
+
}>>, [import("msw/lib/types").MockedRequest<import("msw/lib/types/utils/handlers/requestHandler").DefaultRequestBodyType, import("msw/lib/types").RequestParams>, import("msw/lib/types").ResponseComposition<{
|
|
18
|
+
user: {
|
|
19
|
+
id: string;
|
|
20
|
+
idHash: string;
|
|
21
|
+
email: string;
|
|
22
|
+
givenNames: string;
|
|
23
|
+
surname: string;
|
|
24
|
+
loginType: string;
|
|
25
|
+
preferredName: string;
|
|
26
|
+
firms: IFirm[];
|
|
27
|
+
passwordChangeRequired: boolean;
|
|
28
|
+
roles: never[];
|
|
29
|
+
lastLogin: string;
|
|
30
|
+
};
|
|
31
|
+
}>, {
|
|
32
|
+
set: typeof import("msw/lib/types/context").set;
|
|
33
|
+
status: (statusCode: number, statusText?: string | undefined) => import("msw/lib/types").ResponseTransformer<any>;
|
|
34
|
+
cookie: (name: string, value: string, options?: import("cookie").CookieSerializeOptions | undefined) => import("msw/lib/types").ResponseTransformer<any>;
|
|
35
|
+
body: <BodyType extends string | Blob | ArrayBufferView | ArrayBuffer | ReadableStream<any> | FormData>(value: BodyType) => import("msw/lib/types").ResponseTransformer<BodyType>;
|
|
36
|
+
text: <BodyType_1 extends string>(body: BodyType_1) => import("msw/lib/types").ResponseTransformer<BodyType_1>;
|
|
37
|
+
json: <BodyTypeJSON>(body: BodyTypeJSON, { merge }?: {
|
|
38
|
+
merge?: boolean | undefined;
|
|
39
|
+
} | undefined) => import("msw/lib/types").ResponseTransformer<BodyTypeJSON>;
|
|
40
|
+
xml: <BodyType_2 extends string>(body: BodyType_2) => import("msw/lib/types").ResponseTransformer<BodyType_2>;
|
|
41
|
+
delay: (durationMs?: number | undefined) => import("msw/lib/types").ResponseTransformer<any>;
|
|
42
|
+
fetch: (input: string | import("msw/lib/types").MockedRequest<import("msw/lib/types/utils/handlers/requestHandler").DefaultRequestBodyType, import("msw/lib/types").RequestParams>, requestInit?: RequestInit | undefined) => any;
|
|
43
|
+
}]>;
|
|
@@ -46,6 +46,7 @@ interface CommonDrawerMenuTemplateProps {
|
|
|
46
46
|
smallHeader: boolean;
|
|
47
47
|
loginType: string;
|
|
48
48
|
stickyHeader: boolean;
|
|
49
|
+
showRequestsLink: boolean;
|
|
49
50
|
}
|
|
50
51
|
export declare const CommonDrawerMenu: Story<CommonDrawerMenuTemplateProps>;
|
|
51
52
|
interface DrawerMenuTemplateProps {
|
|
@@ -20274,7 +20274,7 @@ var LOLDrawerMenuFirmSwitcher = function LOLDrawerMenuFirmSwitcher(props) {
|
|
|
20274
20274
|
});
|
|
20275
20275
|
};
|
|
20276
20276
|
|
|
20277
|
-
var _excluded$5 = ["appSpecificLinks", "appSpecificSections", "path", "hasStickyHeader"];
|
|
20277
|
+
var _excluded$5 = ["appSpecificLinks", "appSpecificSections", "path", "hasStickyHeader", "showRequestsLink"];
|
|
20278
20278
|
var LOLDrawerMenu = function LOLDrawerMenu(props) {
|
|
20279
20279
|
return React__default.createElement(LuiDrawerMenu, {
|
|
20280
20280
|
hasStickyHeader: props.hasStickyHeader
|
|
@@ -20291,6 +20291,7 @@ var LOLCommonDrawerMenu = function LOLCommonDrawerMenu(props) {
|
|
|
20291
20291
|
appSpecificSections = props.appSpecificSections,
|
|
20292
20292
|
path = props.path,
|
|
20293
20293
|
hasStickyHeader = props.hasStickyHeader,
|
|
20294
|
+
showRequestsLink = props.showRequestsLink,
|
|
20294
20295
|
restOfProps = _objectWithoutPropertiesLoose(props, _excluded$5);
|
|
20295
20296
|
|
|
20296
20297
|
return React__default.createElement(LOLDrawerMenu, {
|
|
@@ -20299,7 +20300,7 @@ var LOLCommonDrawerMenu = function LOLCommonDrawerMenu(props) {
|
|
|
20299
20300
|
pathname: path
|
|
20300
20301
|
}, restOfProps)), React__default.createElement(LOLDrawerMenuFirmSwitcher, {
|
|
20301
20302
|
minimumFilterCount: 5
|
|
20302
|
-
}), appSpecificLinks && React__default.createElement(React__default.Fragment, null, React__default.createElement(LuiDrawerMenuDivider, null), appSpecificLinks), React__default.createElement(LuiDrawerMenuDivider, null), React__default.createElement(LOLCommonDrawerMenuAfterLinks, {
|
|
20303
|
+
}), showRequestsLink && React__default.createElement(React__default.Fragment, null, React__default.createElement(LuiDrawerMenuDivider, null), React__default.createElement(LOLCommonMenuRequestsLink, null)), appSpecificLinks && React__default.createElement(React__default.Fragment, null, React__default.createElement(LuiDrawerMenuDivider, null), appSpecificLinks), React__default.createElement(LuiDrawerMenuDivider, null), React__default.createElement(LOLCommonDrawerMenuAfterLinks, {
|
|
20303
20304
|
path: path
|
|
20304
20305
|
}));
|
|
20305
20306
|
};
|
|
@@ -20326,6 +20327,28 @@ var LOLCommonDrawerMenuAfterLinks = function LOLCommonDrawerMenuAfterLinks(props
|
|
|
20326
20327
|
}));
|
|
20327
20328
|
};
|
|
20328
20329
|
|
|
20330
|
+
var LOLCommonMenuRequestsLink = function LOLCommonMenuRequestsLink() {
|
|
20331
|
+
var openRequestsApp = function openRequestsApp() {
|
|
20332
|
+
window.open('/requests', '_blank');
|
|
20333
|
+
};
|
|
20334
|
+
|
|
20335
|
+
return React__default.createElement(LuiDrawerMenuOption, {
|
|
20336
|
+
label: 'Create request',
|
|
20337
|
+
onClick: function onClick() {
|
|
20338
|
+
openRequestsApp();
|
|
20339
|
+
},
|
|
20340
|
+
badge: React__default.createElement("img", {
|
|
20341
|
+
src: ExternalIcon,
|
|
20342
|
+
alt: "Link opens in a new tab",
|
|
20343
|
+
style: {
|
|
20344
|
+
width: '16px',
|
|
20345
|
+
height: '16px',
|
|
20346
|
+
marginTop: '4px'
|
|
20347
|
+
}
|
|
20348
|
+
})
|
|
20349
|
+
});
|
|
20350
|
+
};
|
|
20351
|
+
|
|
20329
20352
|
var id = 0;
|
|
20330
20353
|
|
|
20331
20354
|
var getKey = function getKey() {
|
|
@@ -20360,7 +20383,7 @@ var LuiTooltip = function LuiTooltip(props) {
|
|
|
20360
20383
|
|
|
20361
20384
|
(_document$getElementB = document.getElementById(id)) == null ? void 0 : (_document$getElementB2 = _document$getElementB._tippy) == null ? void 0 : _document$getElementB2.destroy();
|
|
20362
20385
|
};
|
|
20363
|
-
}, [id, message, placement, trigger]);
|
|
20386
|
+
}, [id, message, placement, trigger, animation]);
|
|
20364
20387
|
return React__default.createElement("span", {
|
|
20365
20388
|
id: id
|
|
20366
20389
|
}, children);
|