@servicetitan/link-item 16.1.0 → 17.1.1
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.
|
@@ -6,11 +6,11 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_router_dom_1 = require("react-router-dom");
|
|
7
7
|
const design_system_1 = require("@servicetitan/design-system");
|
|
8
8
|
const SideNavLinkItemUnwrapped = ({ exact, pathname, className, children, history, }) => {
|
|
9
|
-
const href = react_1.useMemo(() => history.createHref({ pathname }), [history, pathname]);
|
|
10
|
-
const handleClick = react_1.useCallback(() => {
|
|
9
|
+
const href = (0, react_1.useMemo)(() => history.createHref({ pathname }), [history, pathname]);
|
|
10
|
+
const handleClick = (0, react_1.useCallback)(() => {
|
|
11
11
|
history.push(pathname);
|
|
12
12
|
}, [history, pathname]);
|
|
13
|
-
return (jsx_runtime_1.jsx(design_system_1.SideNav.Item, Object.assign({ href: href, active: !!react_router_dom_1.matchPath(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(design_system_1.SideNav.Item, Object.assign({ href: href, active: !!(0, react_router_dom_1.matchPath)(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
|
|
14
14
|
};
|
|
15
|
-
exports.SideNavLinkItem = react_router_dom_1.withRouter(SideNavLinkItemUnwrapped);
|
|
15
|
+
exports.SideNavLinkItem = (0, react_router_dom_1.withRouter)(SideNavLinkItemUnwrapped);
|
|
16
16
|
//# sourceMappingURL=sidenav-link-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav-link-item.js","sourceRoot":"","sources":["../src/sidenav-link-item.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,uDAA8E;AAE9E,+DAAsD;AAQtD,MAAM,wBAAwB,GAAmD,CAAC,EAC9E,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,eAAO,
|
|
1
|
+
{"version":3,"file":"sidenav-link-item.js","sourceRoot":"","sources":["../src/sidenav-link-item.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,uDAA8E;AAE9E,+DAAsD;AAQtD,MAAM,wBAAwB,GAAmD,CAAC,EAC9E,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAElF,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAExB,OAAO,CACH,uBAAC,uBAAO,CAAC,IAAI,kBACT,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,CAAC,IAAA,4BAAS,EAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,gBAEnB,QAAQ,YACE,CAClB,CAAC;AACN,CAAC,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,6BAAU,EAAC,wBAAwB,CAAC,CAAC"}
|
package/dist/tab-link-item.js
CHANGED
|
@@ -6,11 +6,11 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_router_dom_1 = require("react-router-dom");
|
|
7
7
|
const design_system_1 = require("@servicetitan/design-system");
|
|
8
8
|
const TabLinkItemUnwrapped = ({ exact, pathname, className, children, history, }) => {
|
|
9
|
-
const href = react_1.useMemo(() => history.createHref({ pathname }), [history, pathname]);
|
|
10
|
-
const handleClick = react_1.useCallback(() => {
|
|
9
|
+
const href = (0, react_1.useMemo)(() => history.createHref({ pathname }), [history, pathname]);
|
|
10
|
+
const handleClick = (0, react_1.useCallback)(() => {
|
|
11
11
|
history.push(pathname);
|
|
12
12
|
}, [history, pathname]);
|
|
13
|
-
return (jsx_runtime_1.jsx(design_system_1.Tab, Object.assign({ href: href, active: !!react_router_dom_1.matchPath(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(design_system_1.Tab, Object.assign({ href: href, active: !!(0, react_router_dom_1.matchPath)(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
|
|
14
14
|
};
|
|
15
|
-
exports.TabLinkItem = react_router_dom_1.withRouter(TabLinkItemUnwrapped);
|
|
15
|
+
exports.TabLinkItem = (0, react_router_dom_1.withRouter)(TabLinkItemUnwrapped);
|
|
16
16
|
//# sourceMappingURL=tab-link-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-link-item.js","sourceRoot":"","sources":["../src/tab-link-item.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,uDAA8E;AAE9E,+DAAkD;AAQlD,MAAM,oBAAoB,GAA+C,CAAC,EACtE,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,eAAO,
|
|
1
|
+
{"version":3,"file":"tab-link-item.js","sourceRoot":"","sources":["../src/tab-link-item.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,uDAA8E;AAE9E,+DAAkD;AAQlD,MAAM,oBAAoB,GAA+C,CAAC,EACtE,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAElF,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAExB,OAAO,CACH,uBAAC,mBAAG,kBACA,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,CAAC,IAAA,4BAAS,EAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,gBAEnB,QAAQ,YACP,CACT,CAAC;AACN,CAAC,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,6BAAU,EAAC,oBAAoB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/link-item",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/link-item",
|
|
6
6
|
"repository": {
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"src"
|
|
16
16
|
],
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@servicetitan/design-system": "~10.
|
|
18
|
+
"@servicetitan/design-system": "~10.3.3",
|
|
19
19
|
"@types/history": "~4.7.9",
|
|
20
|
-
"@types/react": "~17.0.
|
|
20
|
+
"@types/react": "~17.0.27",
|
|
21
21
|
"@types/react-router": "~5.1.16",
|
|
22
22
|
"react": "~17.0.2",
|
|
23
23
|
"react-router-dom": "~5.3.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@servicetitan/design-system": "~10.
|
|
26
|
+
"@servicetitan/design-system": "~10.3.3",
|
|
27
27
|
"react": "~17.0.2",
|
|
28
28
|
"react-router-dom": "~5.3.0"
|
|
29
29
|
},
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"cli": {
|
|
34
34
|
"webpack": false
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "01f27439e67c569dd6534738dfba79d6dbbb41a5"
|
|
37
37
|
}
|