@pie-lib/config-ui 11.26.6-esmbeta.0 → 11.27.0
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 +32 -0
- package/lib/layout/config-layout.js +11 -2
- package/lib/layout/config-layout.js.map +1 -1
- package/package.json +5 -12
- package/src/layout/config-layout.jsx +28 -17
- package/esm/index.js +0 -78747
- package/esm/index.js.map +0 -1
- package/esm/package.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
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
|
+
# [11.27.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.0...@pie-lib/config-ui@11.27.0) (2025-10-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-lib/config-ui
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [11.26.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.0...@pie-lib/config-ui@11.26.0) (2025-10-16)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-lib/config-ui
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [11.25.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.1...@pie-lib/config-ui@11.25.2) (2025-10-14)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-lib/config-ui
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [11.25.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.0...@pie-lib/config-ui@11.25.1) (2025-10-09)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-lib/config-ui
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
# [11.25.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.9.24...@pie-lib/config-ui@11.25.0) (2025-09-25)
|
|
7
39
|
|
|
8
40
|
|
|
@@ -50,6 +50,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
50
50
|
var styles = {
|
|
51
51
|
extraCSSRules: {}
|
|
52
52
|
};
|
|
53
|
+
var theme = (0, _styles.createMuiTheme)({
|
|
54
|
+
typography: {
|
|
55
|
+
// In MUI v3, this opts into the h1–h6 variants; otherwise use display1/headline/etc.
|
|
56
|
+
useNextVariants: true,
|
|
57
|
+
fontFamily: 'inherit'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
53
60
|
|
|
54
61
|
var MeasuredConfigLayout = /*#__PURE__*/function (_AppendCSSRules) {
|
|
55
62
|
(0, _inherits2["default"])(MeasuredConfigLayout, _AppendCSSRules);
|
|
@@ -92,7 +99,9 @@ var MeasuredConfigLayout = /*#__PURE__*/function (_AppendCSSRules) {
|
|
|
92
99
|
value: function render() {
|
|
93
100
|
var _this2 = this;
|
|
94
101
|
|
|
95
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
102
|
+
return /*#__PURE__*/_react["default"].createElement(_styles.MuiThemeProvider, {
|
|
103
|
+
theme: theme
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactMeasure["default"], {
|
|
96
105
|
bounds: true,
|
|
97
106
|
onResize: this.onResize
|
|
98
107
|
}, function (_ref2) {
|
|
@@ -117,7 +126,7 @@ var MeasuredConfigLayout = /*#__PURE__*/function (_AppendCSSRules) {
|
|
|
117
126
|
secondary: secondaryContent,
|
|
118
127
|
dimensions: dimensions
|
|
119
128
|
}, children));
|
|
120
|
-
});
|
|
129
|
+
}));
|
|
121
130
|
}
|
|
122
131
|
}]);
|
|
123
132
|
return MeasuredConfigLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/config-layout.jsx"],"names":["styles","extraCSSRules","MeasuredConfigLayout","props","contentRect","bounds","sidePanelMinWidth","dimensions","maxWidth","layoutMode","width","setState","state","undefined","onResize","measureRef","children","settings","hideSettings","classes","settingsPanel","secondaryContent","finalClass","AppendCSSRules","PropTypes","oneOfType","string","arrayOf","element","className","object","number","bool","ConfigLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;
|
|
1
|
+
{"version":3,"sources":["../../src/layout/config-layout.jsx"],"names":["styles","extraCSSRules","theme","typography","useNextVariants","fontFamily","MeasuredConfigLayout","props","contentRect","bounds","sidePanelMinWidth","dimensions","maxWidth","layoutMode","width","setState","state","undefined","onResize","measureRef","children","settings","hideSettings","classes","settingsPanel","secondaryContent","finalClass","AppendCSSRules","PropTypes","oneOfType","string","arrayOf","element","className","object","number","bool","ConfigLayout"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG;AACbC,EAAAA,aAAa,EAAE;AADF,CAAf;AAIA,IAAMC,KAAK,GAAG,4BAAe;AAC3BC,EAAAA,UAAU,EAAE;AACV;AACAC,IAAAA,eAAe,EAAE,IAFP;AAGVC,IAAAA,UAAU,EAAE;AAHF;AADe,CAAf,CAAd;;IAQMC,oB;;;;;AAiBJ,kCAAsB;AAAA;;AAAA;;AAAA,sCAAPC,KAAO;AAAPA,MAAAA,KAAO;AAAA;;AACpB,oDAASA,KAAT;AADoB,iGAKX,UAACC,WAAD,EAAiB;AAC1B,UAAQC,MAAR,GAAmBD,WAAnB,CAAQC,MAAR;AACA,wBAA0C,MAAKF,KAA/C;AAAA,UAAQG,iBAAR,eAAQA,iBAAR;AAAA,UAA2BC,UAA3B,eAA2BA,UAA3B;;AACA,iBAAqBA,UAAU,IAAI,EAAnC;AAAA,UAAQC,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AAkC,UAAA,SAAS,EAAEY,gBAA7C;AAA+D,UAAA,UAAU,EAAEd;AAA3E,WACGS,QADH,CADF,CADF;AAOD,OAjBH,CADF,CADF;AAuBD;;;EAzDgCO,wB;;iCAA7BrB,oB,eACe;AACjBc,EAAAA,QAAQ,EAAEQ,sBAAUC,SAAV,CAAoB,CAACD,sBAAUE,MAAX,EAAmBF,sBAAUG,OAAV,CAAkBH,sBAAUI,OAA5B,CAAnB,EAAyDJ,sBAAUI,OAAnE,CAApB,CADO;AAEjBC,EAAAA,SAAS,EAAEL,sBAAUE,MAFJ;AAGjBP,EAAAA,OAAO,EAAEK,sBAAUM,MAHF;AAIjBvB,EAAAA,UAAU,EAAEiB,sBAAUM,MAJL;AAKjBb,EAAAA,QAAQ,EAAEO,sBAAUI,OALH;AAMjBtB,EAAAA,iBAAiB,EAAEkB,sBAAUO,MANZ;AAOjBb,EAAAA,YAAY,EAAEM,sBAAUQ;AAPP,C;iCADf9B,oB,kBAWkB;AACpBI,EAAAA,iBAAiB,EAAE,IADC;AAEpBY,EAAAA,YAAY,EAAE,KAFM;AAGpBX,EAAAA,UAAU,EAAE;AAHQ,C;AAiDxB,IAAM0B,YAAY,GAAG,wBAAWrC,MAAX,EAAmB,mCAAgB,QAAhB,EAA0BM,oBAA1B,CAAnB,CAArB;eAEe+B,Y","sourcesContent":["import React from 'react';\nimport Measure from 'react-measure';\nimport { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';\nimport { withContentRect } from 'react-measure';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport LayoutContents from './layout-contents';\nimport SettingsBox from './settings-box';\nimport { AppendCSSRules } from '@pie-lib/render-ui';\n\nconst styles = {\n extraCSSRules: {},\n};\n\nconst theme = createMuiTheme({\n typography: {\n // In MUI v3, this opts into the h1–h6 variants; otherwise use display1/headline/etc.\n useNextVariants: true,\n fontFamily: 'inherit',\n },\n});\n\nclass MeasuredConfigLayout extends AppendCSSRules {\n static propTypes = {\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.element), PropTypes.element]),\n className: PropTypes.string,\n classes: PropTypes.object,\n dimensions: PropTypes.object,\n settings: PropTypes.element,\n sidePanelMinWidth: PropTypes.number,\n hideSettings: PropTypes.bool,\n };\n\n static defaultProps = {\n sidePanelMinWidth: 1135,\n hideSettings: false,\n dimensions: {},\n };\n\n constructor(...props) {\n super(...props);\n this.state = { layoutMode: undefined };\n }\n\n onResize = (contentRect) => {\n const { bounds } = contentRect;\n const { sidePanelMinWidth, dimensions } = this.props;\n const { maxWidth } = dimensions || {};\n\n const layoutMode =\n bounds.width > sidePanelMinWidth && (maxWidth ? maxWidth > sidePanelMinWidth : true) ? 'inline' : 'tabbed';\n\n this.setState({ layoutMode });\n };\n\n render() {\n return (\n <MuiThemeProvider theme={theme}>\n <Measure bounds onResize={this.onResize}>\n {({ measureRef }) => {\n const { children, settings, hideSettings, dimensions, classes } = this.props;\n const { layoutMode } = this.state;\n\n const settingsPanel =\n layoutMode === 'inline' ? <SettingsBox className=\"settings-box\">{settings}</SettingsBox> : settings;\n const secondaryContent = hideSettings ? null : settingsPanel;\n const finalClass = classNames('main-container', classes.extraCSSRules);\n\n return (\n <div ref={measureRef} className={finalClass}>\n <LayoutContents mode={layoutMode} secondary={secondaryContent} dimensions={dimensions}>\n {children}\n </LayoutContents>\n </div>\n );\n }}\n </Measure>\n </MuiThemeProvider>\n );\n }\n}\n\nconst ConfigLayout = withStyles(styles)(withContentRect('bounds')(MeasuredConfigLayout));\n\nexport default ConfigLayout;\n"],"file":"config-layout.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/config-ui",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.27.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@material-ui/core": "^3.8.3",
|
|
12
12
|
"@material-ui/icons": "^3.0.2",
|
|
13
|
-
"@pie-lib/editable-html": "^11.
|
|
14
|
-
"@pie-lib/icons": "^2.
|
|
15
|
-
"@pie-lib/render-ui": "^4.
|
|
13
|
+
"@pie-lib/editable-html": "^11.19.0",
|
|
14
|
+
"@pie-lib/icons": "^2.23.0",
|
|
15
|
+
"@pie-lib/render-ui": "^4.33.0",
|
|
16
16
|
"assert": "^1.4.1",
|
|
17
17
|
"classnames": "^2.2.6",
|
|
18
18
|
"complex.js": "2.1.1",
|
|
@@ -29,12 +29,5 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^16.8.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
33
|
-
"exports": {
|
|
34
|
-
".": {
|
|
35
|
-
"import": "./esm/index.js",
|
|
36
|
-
"require": "./lib/index.js",
|
|
37
|
-
"default": "./esm/index.js"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
32
|
+
"gitHead": "e65a495136968b1a07642bde2efd887f46548d25"
|
|
40
33
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Measure from 'react-measure';
|
|
3
|
+
import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
|
|
3
4
|
import { withContentRect } from 'react-measure';
|
|
4
5
|
import { withStyles } from '@material-ui/core/styles';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
@@ -12,6 +13,14 @@ const styles = {
|
|
|
12
13
|
extraCSSRules: {},
|
|
13
14
|
};
|
|
14
15
|
|
|
16
|
+
const theme = createMuiTheme({
|
|
17
|
+
typography: {
|
|
18
|
+
// In MUI v3, this opts into the h1–h6 variants; otherwise use display1/headline/etc.
|
|
19
|
+
useNextVariants: true,
|
|
20
|
+
fontFamily: 'inherit',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
15
24
|
class MeasuredConfigLayout extends AppendCSSRules {
|
|
16
25
|
static propTypes = {
|
|
17
26
|
children: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.element), PropTypes.element]),
|
|
@@ -47,25 +56,27 @@ class MeasuredConfigLayout extends AppendCSSRules {
|
|
|
47
56
|
|
|
48
57
|
render() {
|
|
49
58
|
return (
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
<MuiThemeProvider theme={theme}>
|
|
60
|
+
<Measure bounds onResize={this.onResize}>
|
|
61
|
+
{({ measureRef }) => {
|
|
62
|
+
const { children, settings, hideSettings, dimensions, classes } = this.props;
|
|
63
|
+
const { layoutMode } = this.state;
|
|
54
64
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
const settingsPanel =
|
|
66
|
+
layoutMode === 'inline' ? <SettingsBox className="settings-box">{settings}</SettingsBox> : settings;
|
|
67
|
+
const secondaryContent = hideSettings ? null : settingsPanel;
|
|
68
|
+
const finalClass = classNames('main-container', classes.extraCSSRules);
|
|
59
69
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
return (
|
|
71
|
+
<div ref={measureRef} className={finalClass}>
|
|
72
|
+
<LayoutContents mode={layoutMode} secondary={secondaryContent} dimensions={dimensions}>
|
|
73
|
+
{children}
|
|
74
|
+
</LayoutContents>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}}
|
|
78
|
+
</Measure>
|
|
79
|
+
</MuiThemeProvider>
|
|
69
80
|
);
|
|
70
81
|
}
|
|
71
82
|
}
|