piral-breadcrumbs 0.15.0-alpha.4041 → 0.15.0-alpha.4231
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/esm/types.d.ts +9 -1
- package/lib/Breadcrumbs.js +1 -1
- package/lib/Breadcrumbs.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +9 -1
- package/package.json +22 -9
- package/src/types.ts +11 -2
package/esm/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentType, ReactChild } from 'react';
|
|
1
|
+
import type { ComponentType, ReactChild, ReactNode } from 'react';
|
|
2
2
|
import type { Dict, BaseRegistration, RegistrationDisposer } from 'piral-core';
|
|
3
3
|
declare module 'piral-core/lib/types/custom' {
|
|
4
4
|
interface PiletCustomApi extends PiletBreadcrumbsApi {
|
|
@@ -36,12 +36,20 @@ declare module 'piral-core/lib/types/custom' {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export interface BreadcrumbsContainerProps {
|
|
39
|
+
/**
|
|
40
|
+
* The breadcrumbs to display.
|
|
41
|
+
*/
|
|
42
|
+
children?: ReactNode;
|
|
39
43
|
}
|
|
40
44
|
export interface BreadcrumbItemProps extends Omit<BreadcrumbSettings, 'title'> {
|
|
41
45
|
/**
|
|
42
46
|
* Determins if the breadcrumb is the current page.
|
|
43
47
|
*/
|
|
44
48
|
current: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The title of the breadcrumb to display.
|
|
51
|
+
*/
|
|
52
|
+
children?: ReactNode;
|
|
45
53
|
}
|
|
46
54
|
export interface PiralCustomBreadcrumbSettings {
|
|
47
55
|
}
|
package/lib/Breadcrumbs.js
CHANGED
|
@@ -14,7 +14,7 @@ const Breadcrumbs = () => {
|
|
|
14
14
|
const current = breadcrumbs[currentIndex];
|
|
15
15
|
const { params } = (0, react_router_1.useRouteMatch)((_a = current === null || current === void 0 ? void 0 : current.settings.path) !== null && _a !== void 0 ? _a : '/');
|
|
16
16
|
const children = breadcrumbs.map(({ settings }, i) => {
|
|
17
|
-
const { title, path } = settings, props =
|
|
17
|
+
const { title, path } = settings, props = tslib_1.__rest(settings, ["title", "path"]);
|
|
18
18
|
const key = `bc_${i}_${settings.path}`;
|
|
19
19
|
const current = i === currentIndex;
|
|
20
20
|
const computedPath = path.replace(/:([A-Za-z0-9_]+)/g, (s, id) => { var _a; return (_a = params[id]) !== null && _a !== void 0 ? _a : s; });
|
package/lib/Breadcrumbs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../src/Breadcrumbs.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,+CAA0D;AAC1D,6CAA8E;AAC9E,qDAAkD;AAE3C,MAAM,WAAW,GAAa,GAAG,EAAE;;IACxC,MAAM,QAAQ,GAAG,IAAA,0BAAW,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,4BAAa,EAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,IAAI,mCAAI,GAAG,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE;QACnD,MAAM,EAAE,KAAK,EAAE,IAAI,KAAe,QAAQ,EAAlB,KAAK,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sourceRoot":"","sources":["../src/Breadcrumbs.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,+CAA0D;A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AAW,eAqBtB;AACF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./Breadcrumbs"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./create"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./components"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./useBreadcrumbs"), exports);
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,mDAAyB;AACzB,uDAA6B;AAC7B,kDAAwB;AACxB,2DAAiC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentType, ReactChild } from 'react';
|
|
1
|
+
import type { ComponentType, ReactChild, ReactNode } from 'react';
|
|
2
2
|
import type { Dict, BaseRegistration, RegistrationDisposer } from 'piral-core';
|
|
3
3
|
declare module 'piral-core/lib/types/custom' {
|
|
4
4
|
interface PiletCustomApi extends PiletBreadcrumbsApi {
|
|
@@ -36,12 +36,20 @@ declare module 'piral-core/lib/types/custom' {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export interface BreadcrumbsContainerProps {
|
|
39
|
+
/**
|
|
40
|
+
* The breadcrumbs to display.
|
|
41
|
+
*/
|
|
42
|
+
children?: ReactNode;
|
|
39
43
|
}
|
|
40
44
|
export interface BreadcrumbItemProps extends Omit<BreadcrumbSettings, 'title'> {
|
|
41
45
|
/**
|
|
42
46
|
* Determins if the breadcrumb is the current page.
|
|
43
47
|
*/
|
|
44
48
|
current: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The title of the breadcrumb to display.
|
|
51
|
+
*/
|
|
52
|
+
children?: ReactNode;
|
|
45
53
|
}
|
|
46
54
|
export interface PiralCustomBreadcrumbSettings {
|
|
47
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-breadcrumbs",
|
|
3
|
-
"version": "0.15.0-alpha.
|
|
3
|
+
"version": "0.15.0-alpha.4231",
|
|
4
4
|
"description": "Plugin for creating a breadcrumb manager in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -20,6 +20,19 @@
|
|
|
20
20
|
"module": "esm/index.js",
|
|
21
21
|
"main": "lib/index.js",
|
|
22
22
|
"typings": "lib/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"import": "./esm/index.js",
|
|
26
|
+
"require": "./lib/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./esm/*": {
|
|
29
|
+
"import": "./esm/*"
|
|
30
|
+
},
|
|
31
|
+
"./lib/*": {
|
|
32
|
+
"require": "./lib/*"
|
|
33
|
+
},
|
|
34
|
+
"./package.json": "./package.json"
|
|
35
|
+
},
|
|
23
36
|
"sideEffects": false,
|
|
24
37
|
"files": [
|
|
25
38
|
"esm",
|
|
@@ -43,20 +56,20 @@
|
|
|
43
56
|
"typedoc": "typedoc --json ../../../docs/types/piral-breadcrumbs.json src --exclude \"src/**/*.test.*\"",
|
|
44
57
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
45
58
|
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"path-to-regexp": "^1.8.0"
|
|
61
|
+
},
|
|
46
62
|
"devDependencies": {
|
|
47
|
-
"@types/react": "^
|
|
63
|
+
"@types/react": "^18.0.0",
|
|
48
64
|
"@types/react-router": "^5.1.8",
|
|
49
|
-
"piral-core": "0.15.0-alpha.
|
|
50
|
-
"react": "^
|
|
65
|
+
"piral-core": "0.15.0-alpha.4231",
|
|
66
|
+
"react": "^18.0.0",
|
|
51
67
|
"react-router": "^5.2.0"
|
|
52
68
|
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"path-to-regexp": "^1.8.0"
|
|
55
|
-
},
|
|
56
69
|
"peerDependencies": {
|
|
57
|
-
"piral-core": "0.14.x",
|
|
70
|
+
"piral-core": "0.14.x || 0.15.x",
|
|
58
71
|
"react": ">=16.8.0",
|
|
59
72
|
"react-router": "5.x"
|
|
60
73
|
},
|
|
61
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "4e7f158bd276d82c5bf2c19d47ccfb3604f38e38"
|
|
62
75
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentType, ReactChild } from 'react';
|
|
1
|
+
import type { ComponentType, ReactChild, ReactNode } from 'react';
|
|
2
2
|
import type { Dict, BaseRegistration, RegistrationDisposer } from 'piral-core';
|
|
3
3
|
|
|
4
4
|
declare module 'piral-core/lib/types/custom' {
|
|
@@ -39,13 +39,22 @@ declare module 'piral-core/lib/types/custom' {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export interface BreadcrumbsContainerProps {
|
|
42
|
+
export interface BreadcrumbsContainerProps {
|
|
43
|
+
/**
|
|
44
|
+
* The breadcrumbs to display.
|
|
45
|
+
*/
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
}
|
|
43
48
|
|
|
44
49
|
export interface BreadcrumbItemProps extends Omit<BreadcrumbSettings, 'title'> {
|
|
45
50
|
/**
|
|
46
51
|
* Determins if the breadcrumb is the current page.
|
|
47
52
|
*/
|
|
48
53
|
current: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The title of the breadcrumb to display.
|
|
56
|
+
*/
|
|
57
|
+
children?: ReactNode;
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
export interface PiralCustomBreadcrumbSettings {}
|