New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@teambit/ui-foundation.ui.react-router.slot-router

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/ui-foundation.ui.react-router.slot-router - npm Package Compare versions

Comparing version 0.0.506 to 0.0.507

@@ -1,1 +0,2 @@

export { SlotRouter, SlotRouterProps, RouteSlot, NavigationSlot } from './slot-router';
export { SlotRouter } from './slot-router';
export type { SlotRouterProps, RouteSlot, NavigationSlot } from './slot-router';

@@ -1,6 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SlotRouter = void 0;
var slot_router_1 = require("./slot-router");
Object.defineProperty(exports, "SlotRouter", { enumerable: true, get: function () { return slot_router_1.SlotRouter; } });
export { SlotRouter } from './slot-router';
//# sourceMappingURL=index.js.map

@@ -5,5 +5,5 @@ import { PropsWithChildren } from 'react';

import type { LinkProps } from '@teambit/base-react.navigation.link';
export declare type RouteSlot = SlotRegistry<RouteProps | RouteProps[]>;
export declare type NavigationSlot = SlotRegistry<LinkProps>;
export declare type SlotRouterProps = PropsWithChildren<{
export type RouteSlot = SlotRegistry<RouteProps | RouteProps[]>;
export type NavigationSlot = SlotRegistry<LinkProps>;
export type SlotRouterProps = PropsWithChildren<{
/**

@@ -10,0 +10,0 @@ * @deprecated

@@ -1,26 +0,4 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SlotRouter = void 0;
const react_1 = __importDefault(require("react"));
const react_router_dom_1 = require("react-router-dom");
const lodash_1 = require("lodash");
function SlotRouter({ routes: routesFromProps, slot, rootRoutes, children, parentPath }) {
const routes = routesFromProps || (slot && (0, lodash_1.flatten)(slot.values())) || [];
const withRoot = routes.concat(rootRoutes || []);
const jsxRoutes = withRoot.map((route) => react_1.default.createElement(react_router_dom_1.Route, Object.assign({ key: toKey(route) }, route)));
if (parentPath) {
return (react_1.default.createElement(react_router_dom_1.Routes, null,
react_1.default.createElement(react_router_dom_1.Route, { path: parentPath },
jsxRoutes,
children)));
}
return (react_1.default.createElement(react_router_dom_1.Routes, null,
react_1.default.createElement(react_router_dom_1.Route, { path: parentPath },
jsxRoutes,
children)));
}
exports.SlotRouter = SlotRouter;
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Routes, Route } from 'react-router-dom';
import { flatten } from 'lodash';
function toKey(route) {

@@ -33,2 +11,11 @@ if (route.path)

}
export function SlotRouter({ routes: routesFromProps, slot, rootRoutes, children, parentPath }) {
const routes = routesFromProps || (slot && flatten(slot.values())) || [];
const withRoot = routes.concat(rootRoutes || []);
const jsxRoutes = withRoot.map((route) => _jsx(Route, { ...route }, toKey(route)));
if (parentPath) {
return (_jsx(Routes, { children: _jsxs(Route, { path: parentPath, children: [jsxRoutes, children] }) }));
}
return (_jsx(Routes, { children: _jsxs(Route, { path: parentPath, children: [jsxRoutes, children] }) }));
}
//# sourceMappingURL=slot-router.js.map
{
"compilerOptions": {
"lib": [
"es2019",
"DOM",
"ES6",
"DOM.Iterable"
"esnext",
"dom",
"dom.Iterable"
],
"target": "es2015",
"module": "CommonJS",
"jsx": "react",
"allowJs": true,
"composite": true,
"target": "es2020",
"module": "es2020",
"jsx": "react-jsx",
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"outDir": "dist",
"moduleResolution": "node",
"esModuleInterop": true,
"rootDir": ".",
"resolveJsonModule": true
"resolveJsonModule": true,
"allowJs": true,
"outDir": "dist",
"strict": true,
"emitDecoratorMetadata": true,
"preserveConstEnums": true,
"strictPropertyInitialization": false,
"noImplicitAny": false
},
"exclude": [
"artifacts",
"public",
"dist",
"package.json"
"node_modules",
"package.json",
"**/*.cjs",
"./dist"
],

@@ -28,0 +35,0 @@ "include": [

@@ -1,1 +0,2 @@

export { SlotRouter, SlotRouterProps, RouteSlot, NavigationSlot } from './slot-router';
export { SlotRouter } from './slot-router';
export type { SlotRouterProps, RouteSlot, NavigationSlot } from './slot-router';
{
"name": "@teambit/ui-foundation.ui.react-router.slot-router",
"version": "0.0.506",
"version": "0.0.507",
"homepage": "https://bit.cloud/teambit/ui-foundation/ui/react-router/slot-router",

@@ -9,8 +9,6 @@ "main": "dist/index.js",

"name": "ui/react-router/slot-router",
"version": "0.0.506"
"version": "0.0.507"
},
"dependencies": {
"lodash": "4.17.21",
"core-js": "^3.0.0",
"@teambit/base-react.navigation.link": "2.0.27",
"@teambit/harmony": "0.4.6"

@@ -20,16 +18,14 @@ },

"@types/lodash": "4.14.165",
"@types/react": "^17.0.8",
"@types/mocha": "9.1.0",
"@types/node": "12.20.4",
"@types/react-dom": "^17.0.5",
"@types/jest": "^26.0.0",
"@babel/runtime": "7.20.0",
"@types/testing-library__jest-dom": "5.9.5"
"@teambit/react.v17.react-env": "1.1.6"
},
"peerDependencies": {
"react-router-dom": "^6.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react-router-dom": "^6.16.0",
"@types/react": "^17.0.0",
"@teambit/base-react.navigation.link": "2.0.27"
},
"license": "Apache-2.0",
"optionalDependencies": {},
"peerDependenciesMeta": {},
"private": false,

@@ -53,2 +49,2 @@ "engines": {

]
}
}
{
"compilerOptions": {
"lib": [
"es2019",
"DOM",
"ES6",
"DOM.Iterable"
"esnext",
"dom",
"dom.Iterable"
],
"target": "es2015",
"module": "CommonJS",
"jsx": "react",
"allowJs": true,
"composite": true,
"target": "es2020",
"module": "es2020",
"jsx": "react-jsx",
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"outDir": "dist",
"moduleResolution": "node",
"esModuleInterop": true,
"rootDir": ".",
"resolveJsonModule": true
"resolveJsonModule": true,
"allowJs": true,
"outDir": "dist",
"strict": true,
"emitDecoratorMetadata": true,
"preserveConstEnums": true,
"strictPropertyInitialization": false,
"noImplicitAny": false
},
"exclude": [
"artifacts",
"public",
"dist",
"package.json"
"node_modules",
"package.json",
"**/*.cjs",
"./dist"
],

@@ -28,0 +35,0 @@ "include": [

@@ -8,8 +8,8 @@ declare module '*.png' {

export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
export const ReactComponent: FunctionComponent<
SVGProps<SVGSVGElement> & { title?: string }
>;
const src: string;
export default src;
}
// @TODO Gilad
declare module '*.jpg' {

@@ -31,1 +31,13 @@ const value: any;

}
declare module '*.otf' {
const value: any;
export = value;
}
declare module '*.woff' {
const value: any;
export = value;
}
declare module '*.woff2' {
const value: any;
export = value;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet