@admin-layout/client 1.0.3-alpha.138 → 1.0.3-alpha.140

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.
@@ -1,3 +1,4 @@
1
1
  export * from './generated';
2
2
  export * from './default-settings';
3
3
  export * from './pure-settings';
4
+ export * from './typings';
@@ -0,0 +1,72 @@
1
+ import * as H from 'history';
2
+ import { RouteComponentProps as BasicRouteProps, match } from 'react-router';
3
+ import * as React from 'react';
4
+ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
5
+ to: H.LocationDescriptor;
6
+ replace?: boolean;
7
+ innerRef?: React.Ref<HTMLAnchorElement>;
8
+ }
9
+ export interface MenuDataItem {
10
+ /**
11
+ * @name Submenu
12
+ */
13
+ children?: MenuDataItem[];
14
+ /**
15
+ * @name Hidden subtots in the menu
16
+ */
17
+ hideChildrenInMenu?: boolean;
18
+ /**
19
+ * @name Hide you and child nodes in the menu
20
+ */
21
+ hideInMenu?: boolean;
22
+ /**
23
+ * @name Icon
24
+ */
25
+ icon?: React.ReactNode;
26
+ /**
27
+ * @name Custom menu International KEY
28
+ */
29
+ locale?: string | false;
30
+ /**
31
+ * @name Name of the menu
32
+ */
33
+ name?: string;
34
+ /**
35
+ * @name Used to calibrate the selected value, the default is `path`
36
+ */
37
+ key?: string;
38
+ /**
39
+ * @name disable menu option
40
+ */
41
+ disabled?: boolean;
42
+ /**
43
+ * @name 路径
44
+ */
45
+ path?: string;
46
+ /**
47
+ * @name Custom parent node
48
+ * @description When this node is selected, the node of ParentKeys will be selected.
49
+ */
50
+ parentKeys?: string[];
51
+ /**
52
+ * @name Hide yourself and upgrade the child node to your own
53
+ */
54
+ flatMenu?: boolean;
55
+ [key: string]: any;
56
+ }
57
+ export interface Route extends MenuDataItem {
58
+ routes?: Route[];
59
+ }
60
+ export declare type WithFalse<T> = T | false;
61
+ export interface RouterTypes<P> extends Omit<BasicRouteProps, 'location'> {
62
+ computedMatch?: match<P>;
63
+ route?: Route;
64
+ location: BasicRouteProps['location'] | {
65
+ pathname?: string;
66
+ };
67
+ }
68
+ export interface MessageDescriptor {
69
+ id: any;
70
+ description?: string;
71
+ defaultMessage?: string;
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/client",
3
- "version": "1.0.3-alpha.138",
3
+ "version": "1.0.3-alpha.140",
4
4
  "description": "Sample client for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -19,7 +19,10 @@
19
19
  "watch": "yarn build:lib:watch"
20
20
  },
21
21
  "peerDependencies": {
22
- "envalid": "*"
22
+ "envalid": "*",
23
+ "history": "*",
24
+ "react": "*",
25
+ "react-router": "*"
23
26
  },
24
27
  "publishConfig": {
25
28
  "access": "public"
@@ -27,5 +30,5 @@
27
30
  "typescript": {
28
31
  "definition": "lib/index.d.ts"
29
32
  },
30
- "gitHead": "0dd59d02d236fd1d556bcc5f7451314addd030a5"
33
+ "gitHead": "3ab961eee4cb8e6f59a35f6617a27771e3d634ff"
31
34
  }