@proteinjs/ui 1.0.5 → 1.0.7
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 +11 -0
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/src/container/PageContainer.d.ts.map +1 -1
- package/dist/src/container/PageContainer.js +1 -5
- package/dist/src/container/PageContainer.js.map +1 -1
- package/dist/src/router/Page.d.ts +2 -2
- package/dist/src/router/Page.d.ts.map +1 -1
- package/generated/index.ts +1 -1
- package/package.json +2 -2
- package/src/container/PageContainer.tsx +1 -5
- package/src/router/Page.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.6](https://github.com/proteinjs/ui/compare/@proteinjs/ui@1.0.5...@proteinjs/ui@1.0.6) (2024-04-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* use function as prop type for pageContainerSxProps ([7156880](https://github.com/proteinjs/ui/commit/71568808fb39db6c323b275273d9b8e5ba5cb1f5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 1.0.1 (2024-04-19)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @proteinjs/ui
|
package/dist/generated/index.js
CHANGED
|
@@ -30,7 +30,7 @@ require("react-router");
|
|
|
30
30
|
require("react-router-dom");
|
|
31
31
|
require("string");
|
|
32
32
|
/** Generate Source Graph */
|
|
33
|
-
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/ui/Page\",\"value\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/ui/packages/ui/src/router/Page.ts\",\"qualifiedName\":\"@proteinjs/ui/Page\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"path\",\"type\":{\"packageName\":\"\",\"name\":\"string|string[]\",\"filePath\":null,\"qualifiedName\":\"/string|string[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"component\",\"type\":{\"packageName\":\"\",\"name\":\"React.ComponentType<PageComponentProps>\",\"filePath\":null,\"qualifiedName\":\"/React.ComponentType<PageComponentProps>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"noPageContainer\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"pageContainerSxProps\",\"type\":{\"packageName\":\"
|
|
33
|
+
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/ui/Page\",\"value\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/ui/packages/ui/src/router/Page.ts\",\"qualifiedName\":\"@proteinjs/ui/Page\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"path\",\"type\":{\"packageName\":\"\",\"name\":\"string|string[]\",\"filePath\":null,\"qualifiedName\":\"/string|string[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"component\",\"type\":{\"packageName\":\"\",\"name\":\"React.ComponentType<PageComponentProps>\",\"filePath\":null,\"qualifiedName\":\"/React.ComponentType<PageComponentProps>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"noPageContainer\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"pageContainerSxProps\",\"type\":{\"packageName\":\"\",\"name\":\"(theme: Theme) => SxProps\",\"filePath\":null,\"qualifiedName\":\"/(theme: Theme) => SxProps\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"/string | React.ComponentType\"},{\"v\":\"/React.FC\"},{\"v\":\"/Partial\"},{\"v\":\"/React.Component\"}],\"edges\":[{\"v\":\"@proteinjs/ui/Page\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"}]}";
|
|
34
34
|
/** Generate Source Links */
|
|
35
35
|
var sourceLinks = {};
|
|
36
36
|
/** Load Source Graph and Links */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,0BAAwB;AACxB,2BAAyB;AACzB,+BAA6B;AAC7B,yBAAuB;AACvB,iCAA+B;AAC/B,2BAAyB;AACzB,mBAAiB;AACjB,kBAAgB;AAChB,wBAAsB;AACtB,iBAAe;AACf,qBAAmB;AACnB,wBAAsB;AACtB,4BAA0B;AAC1B,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,0BAAwB;AACxB,2BAAyB;AACzB,+BAA6B;AAC7B,yBAAuB;AACvB,iCAA+B;AAC/B,2BAAyB;AACzB,mBAAiB;AACjB,kBAAgB;AAChB,wBAAsB;AACtB,iBAAe;AACf,qBAAmB;AACnB,wBAAsB;AACtB,4BAA0B;AAC1B,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,4hHAA4hH,CAAC;AAGjjH,4BAA4B;AAG5B,IAAM,WAAW,GAAG,EACnB,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContainer.d.ts","sourceRoot":"","sources":["../../../src/container/PageContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAe,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAW,WAAW,EAAE,MAAM,WAAW,CAAC;AAG/D,MAAM,MAAM,kBAAkB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,IAAI,CAAC,EAAE;QACH,UAAU,EAAE,OAAO,CAAC;QACpB,WAAW,EAAE,CAAC,IAAI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,EAAE,YAAY,CAAA;KAAE,EAAE,CAAC;IAC5D,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAChC,CAAA;AAED,QAAA,MAAM,IAAI;UAAgF,kBAAkB,CAAC,MAAM,CAAC;UAAQ,kBAAkB,CAAC,MAAM,CAAC;cAAY,gBAAgB;kBAAgB,OAAO;oCAAkC,OAAO,KAAK,IAAI;+BAazP,CAAC;AAEH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAgEtD"}
|
|
@@ -43,11 +43,7 @@ function PageContainer(props) {
|
|
|
43
43
|
var defaultStyles = {};
|
|
44
44
|
if (!page.pageContainerSxProps)
|
|
45
45
|
return defaultStyles;
|
|
46
|
-
var resolvedStyles;
|
|
47
|
-
if (typeof page.pageContainerSxProps === 'function')
|
|
48
|
-
resolvedStyles = Object.assign(defaultStyles, page.pageContainerSxProps(theme));
|
|
49
|
-
else
|
|
50
|
-
resolvedStyles = Object.assign(defaultStyles, page.pageContainerSxProps);
|
|
46
|
+
var resolvedStyles = Object.assign({}, defaultStyles, page.pageContainerSxProps(theme));
|
|
51
47
|
return resolvedStyles;
|
|
52
48
|
} },
|
|
53
49
|
react_1.default.createElement(material_1.AppBar, { position: 'static' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContainer.js","sourceRoot":"","sources":["../../../src/container/PageContainer.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAA0B;AAC1B,0CAA6E;AAC7E,kEAAgD;AAChD,qDAAiE;AAEjE,6DAA4D;AAC5D,qCAA+D;AAC/D,yDAAwD;AAiBxD,IAAM,IAAI,GAAG,eAAK,CAAC,IAAI,CAAC,UAAC,EAAoO;QAAlO,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAA,EAAE,YAAY,kBAAA,EAAE,eAAe,qBAAA;IAC1E,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,IAAI,CAAC;QACvB,OAAO,8BA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@mui/material';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
3
|
import { Loadable } from '@proteinjs/reflection';
|
|
4
4
|
import { NavigateFunction } from 'react-router-dom';
|
|
5
5
|
export declare const getPages: () => Page[];
|
|
@@ -23,6 +23,6 @@ export interface Page extends Loadable {
|
|
|
23
23
|
/** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */
|
|
24
24
|
roles?: string[];
|
|
25
25
|
};
|
|
26
|
-
pageContainerSxProps?: SxProps;
|
|
26
|
+
pageContainerSxProps?: (theme: Theme) => SxProps;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=Page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/router/Page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/router/Page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAoB,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,eAAO,MAAM,QAAQ,cAAmE,CAAC;AAEzF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,SAAS,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;IACnC,QAAQ,EAAE,gBAAgB,CAAC;CAC9B,CAAA;AAED,MAAM,WAAW,IAAK,SAAQ,QAAQ;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACnD,8EAA8E;IAC9E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE;QACH,0HAA0H;QAC1H,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,iIAAiI;QACjI,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6HAA6H;QAC7H,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;CACpD"}
|
package/generated/index.ts
CHANGED
|
@@ -18,7 +18,7 @@ import 'string';
|
|
|
18
18
|
|
|
19
19
|
/** Generate Source Graph */
|
|
20
20
|
|
|
21
|
-
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/ui/Page\",\"value\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/ui/packages/ui/src/router/Page.ts\",\"qualifiedName\":\"@proteinjs/ui/Page\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"path\",\"type\":{\"packageName\":\"\",\"name\":\"string|string[]\",\"filePath\":null,\"qualifiedName\":\"/string|string[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"component\",\"type\":{\"packageName\":\"\",\"name\":\"React.ComponentType<PageComponentProps>\",\"filePath\":null,\"qualifiedName\":\"/React.ComponentType<PageComponentProps>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"noPageContainer\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"pageContainerSxProps\",\"type\":{\"packageName\":\"
|
|
21
|
+
const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/ui/Page\",\"value\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"Page\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/ui/packages/ui/src/router/Page.ts\",\"qualifiedName\":\"@proteinjs/ui/Page\",\"properties\":[{\"name\":\"name\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"path\",\"type\":{\"packageName\":\"\",\"name\":\"string|string[]\",\"filePath\":null,\"qualifiedName\":\"/string|string[]\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"component\",\"type\":{\"packageName\":\"\",\"name\":\"React.ComponentType<PageComponentProps>\",\"filePath\":null,\"qualifiedName\":\"/React.ComponentType<PageComponentProps>\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"noPageContainer\",\"type\":{\"packageName\":\"\",\"name\":\"boolean\",\"filePath\":null,\"qualifiedName\":\"/boolean\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"auth\",\"type\":{\"packageName\":\"@proteinjs/ui\",\"name\":\"{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/ui/{\\n /** If true, the user does not need to be logged in or have any roles to access this page. If blank, defaults to false. */\\n public?: boolean;\\n /** If true, the user does not need to have any roles to access this page, but must be logged in. If blank, defaults to false. */\\n allUsers?: boolean,\\n /** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */\\n roles?: string[];\\n }\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"pageContainerSxProps\",\"type\":{\"packageName\":\"\",\"name\":\"(theme: Theme) => SxProps\",\"filePath\":null,\"qualifiedName\":\"/(theme: Theme) => SxProps\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":true,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"/string | React.ComponentType\"},{\"v\":\"/React.FC\"},{\"v\":\"/Partial\"},{\"v\":\"/React.Component\"}],\"edges\":[{\"v\":\"@proteinjs/ui/Page\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"}]}";
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
/** Generate Source Links */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "UI libs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"string": "3.3.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@proteinjs/reflection-build": "1.0.
|
|
40
|
+
"@proteinjs/reflection-build": "1.0.13",
|
|
41
41
|
"@types/node": "14.0.13",
|
|
42
42
|
"@types/react": "18.2.23",
|
|
43
43
|
"@types/react-dom": "18.2.8",
|
|
@@ -62,11 +62,7 @@ export function PageContainer(props: PageContainerProps) {
|
|
|
62
62
|
if (!page.pageContainerSxProps)
|
|
63
63
|
return defaultStyles;
|
|
64
64
|
|
|
65
|
-
let resolvedStyles;
|
|
66
|
-
if (typeof page.pageContainerSxProps === 'function')
|
|
67
|
-
resolvedStyles = Object.assign(defaultStyles, page.pageContainerSxProps(theme));
|
|
68
|
-
else
|
|
69
|
-
resolvedStyles = Object.assign(defaultStyles, page.pageContainerSxProps);
|
|
65
|
+
let resolvedStyles = Object.assign({}, defaultStyles, page.pageContainerSxProps(theme));
|
|
70
66
|
|
|
71
67
|
return resolvedStyles;
|
|
72
68
|
}}>
|
package/src/router/Page.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SxProps } from '@mui/material';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
3
|
import { Loadable, SourceRepository } from '@proteinjs/reflection';
|
|
4
4
|
import { NavigateFunction } from 'react-router-dom';
|
|
5
5
|
|
|
@@ -24,5 +24,5 @@ export interface Page extends Loadable {
|
|
|
24
24
|
/** The user must be logged in and have these roles to access this page. If blank, defaults to requiring the 'admin' role. */
|
|
25
25
|
roles?: string[];
|
|
26
26
|
};
|
|
27
|
-
pageContainerSxProps?: SxProps;
|
|
27
|
+
pageContainerSxProps?: (theme: Theme) => SxProps;
|
|
28
28
|
}
|