@pie-lib/config-ui 11.37.0-mui-update.0 → 11.39.0-mui-update.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 CHANGED
@@ -3,7 +3,7 @@
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.37.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.36.1-mui-update.0...@pie-lib/config-ui@11.37.0-mui-update.0) (2025-11-26)
6
+ # [11.39.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.38.0-mui-update.0...@pie-lib/config-ui@11.39.0-mui-update.0) (2025-12-11)
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/config-ui
9
9
 
@@ -11,51 +11,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [11.36.1-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.36.0-mui-update.0...@pie-lib/config-ui@11.36.1-mui-update.0) (2025-11-20)
14
+ # [11.38.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.37.0-mui-update.0...@pie-lib/config-ui@11.38.0-mui-update.0) (2025-12-02)
15
15
 
16
16
 
17
- ### Bug Fixes
18
-
19
- * remove carets from [@pie-lib](https://github.com/pie-lib) dependencies and configure lerna to use exact versions ([c9cd800](https://github.com/pie-framework/pie-lib/commit/c9cd800844abca09e7acf1fd35b2ddf51a6d86df))
20
-
21
-
22
-
23
-
24
-
25
- # [11.36.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.35.0-mui-update.0...@pie-lib/config-ui@11.36.0-mui-update.0) (2025-11-20)
26
-
27
-
28
- ### Bug Fixes
29
-
30
- * remove carret, point to specific libs version ([09939a5](https://github.com/pie-framework/pie-lib/commit/09939a5aca19d7dda03d62c93d4d524f98dd69da))
31
-
32
-
33
-
34
-
35
-
36
- # [11.35.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.34.0-mui-update.0...@pie-lib/config-ui@11.35.0-mui-update.0) (2025-11-20)
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * fix some popper components, fix some math toolbar color ([ed1df55](https://github.com/pie-framework/pie-lib/commit/ed1df558e272686a712767e347df49434790f334))
42
-
43
-
44
-
45
-
46
-
47
- # [11.34.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.33.0-mui-update.0...@pie-lib/config-ui@11.34.0-mui-update.0) (2025-11-19)
48
-
49
-
50
- ### Bug Fixes
17
+ ### Features
51
18
 
52
- * use fixed lib deps ([de7c64d](https://github.com/pie-framework/pie-lib/commit/de7c64d14f13259fe44d47405e4421baef21e24e))
19
+ * sync latest changes from dev ([c936e9c](https://github.com/pie-framework/pie-lib/commit/c936e9c7f9e095e7d9b9805ac2bf72bd271e05f1))
53
20
 
54
21
 
55
22
 
56
23
 
57
24
 
58
- # [11.33.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.32.0-mui-update.0...@pie-lib/config-ui@11.33.0-mui-update.0) (2025-11-18)
25
+ ## [11.30.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.30.1...@pie-lib/config-ui@11.30.2) (2025-11-27)
59
26
 
60
27
  **Note:** Version bump only for package @pie-lib/config-ui
61
28
 
@@ -63,48 +30,26 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
63
30
 
64
31
 
65
32
 
66
- # [11.32.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.31.0-mui-update.0...@pie-lib/config-ui@11.32.0-mui-update.0) (2025-11-18)
33
+ ## [11.30.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.2...@pie-lib/config-ui@11.30.1) (2025-10-22)
67
34
 
68
35
 
69
36
  ### Bug Fixes
70
37
 
71
- * **config-ui:** use the styled components for both tabs case as for the others ([81b8c23](https://github.com/pie-framework/pie-lib/commit/81b8c231c3e469e7a07a3e9d9321093dba8d0bcb))
72
-
73
-
74
-
38
+ * avoid redundant re-renders by guarding layoutMode setState ([3f4aecd](https://github.com/pie-framework/pie-lib/commit/3f4aecd1c862b94a9faf3e058086da30995ae60d))
75
39
 
76
40
 
77
- # [11.31.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.30.0-mui-update.0...@pie-lib/config-ui@11.31.0-mui-update.0) (2025-11-17)
78
41
 
79
42
 
80
- ### Bug Fixes
81
-
82
- * **config-ui, mask-markup:** replace deprecated props, externd AlerDialog with new props ([6e7a163](https://github.com/pie-framework/pie-lib/commit/6e7a16314944745154801010aa4973a03aa15dcc))
83
- * fix feedback menu, adjust choiceconfig style ([f5ea380](https://github.com/pie-framework/pie-lib/commit/f5ea380a108c0da9358c4e9028baa7068f4c5e91))
84
- * select in settings panel ([89d3f93](https://github.com/pie-framework/pie-lib/commit/89d3f935ebf9e13c6d1f538e6b3d76ff5612b5f6))
85
-
86
-
87
- ### Features
88
-
89
- * add MuiButton style overrides for consistent theming ([8fc184e](https://github.com/pie-framework/pie-lib/commit/8fc184e0eca3425cc76f1f76d8f1f24eb56c0779))
90
43
 
44
+ # [11.29.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.28.0...@pie-lib/config-ui@11.29.0) (2025-10-16)
91
45
 
92
-
93
-
94
-
95
- # [11.30.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.29.0-mui-update.0...@pie-lib/config-ui@11.30.0-mui-update.0) (2025-11-05)
96
-
97
-
98
- ### Bug Fixes
99
-
100
- * label positioning in input render-ui ([8012817](https://github.com/pie-framework/pie-lib/commit/80128173dc596181de296633e9413bba8b79db81))
101
- * remove parantheses ([07c8d13](https://github.com/pie-framework/pie-lib/commit/07c8d1366d768b1e22e31fb930a7d41a2a31d5ca))
46
+ **Note:** Version bump only for package @pie-lib/config-ui
102
47
 
103
48
 
104
49
 
105
50
 
106
51
 
107
- # [11.29.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.28.0-mui-update.0...@pie-lib/config-ui@11.29.0-mui-update.0) (2025-11-03)
52
+ # [11.28.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.0...@pie-lib/config-ui@11.28.0) (2025-10-16)
108
53
 
109
54
  **Note:** Version bump only for package @pie-lib/config-ui
110
55
 
@@ -112,7 +57,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
112
57
 
113
58
 
114
59
 
115
- # [11.28.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.26.0-mui-update.0...@pie-lib/config-ui@11.28.0-mui-update.0) (2025-11-03)
60
+ # [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)
116
61
 
117
62
  **Note:** Version bump only for package @pie-lib/config-ui
118
63
 
@@ -120,13 +65,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
120
65
 
121
66
 
122
67
 
123
- # [11.26.0-mui-update.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.25.2...@pie-lib/config-ui@11.26.0-mui-update.0) (2025-10-31)
124
-
68
+ # [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)
125
69
 
126
- ### Features
127
-
128
- * **config-ui:** migrate to material v5 PD-5258 ([3ea0799](https://github.com/pie-framework/pie-lib/commit/3ea0799ce78ca20c938c7765b7af5a47194c39d1))
129
- * bump react and react-dom ([01dc19e](https://github.com/pie-framework/pie-lib/commit/01dc19e88bbc8d372c561d1511df1a82937d45af))
70
+ **Note:** Version bump only for package @pie-lib/config-ui
130
71
 
131
72
 
132
73
 
@@ -56,9 +56,13 @@ var MeasuredConfigLayout = /*#__PURE__*/function (_AppendCSSRules) {
56
56
  var _ref = dimensions || {},
57
57
  maxWidth = _ref.maxWidth;
58
58
  var layoutMode = bounds.width > sidePanelMinWidth && (maxWidth ? maxWidth > sidePanelMinWidth : true) ? 'inline' : 'tabbed';
59
- _this.setState({
60
- layoutMode: layoutMode
61
- });
59
+
60
+ // Only update state (and cause a re-render) if the computed layoutMode changed.
61
+ if (layoutMode !== _this.state.layoutMode) {
62
+ _this.setState({
63
+ layoutMode: layoutMode
64
+ });
65
+ }
62
66
  });
63
67
  _this.state = {
64
68
  layoutMode: undefined
@@ -70,35 +74,40 @@ var MeasuredConfigLayout = /*#__PURE__*/function (_AppendCSSRules) {
70
74
  key: "render",
71
75
  value: function render() {
72
76
  var _this2 = this;
73
- return /*#__PURE__*/_react["default"].createElement(_styles.StyledEngineProvider, {
74
- injectFirst: true
75
- }, /*#__PURE__*/_react["default"].createElement(_styles.ThemeProvider, {
76
- theme: theme
77
- }, /*#__PURE__*/_react["default"].createElement(_reactMeasure["default"], {
78
- bounds: true,
79
- onResize: this.onResize
80
- }, function (_ref2) {
81
- var measureRef = _ref2.measureRef;
82
- var _this2$props = _this2.props,
83
- children = _this2$props.children,
84
- settings = _this2$props.settings,
85
- hideSettings = _this2$props.hideSettings,
86
- dimensions = _this2$props.dimensions;
87
- var layoutMode = _this2.state.layoutMode;
88
- var settingsPanel = layoutMode === 'inline' ? /*#__PURE__*/_react["default"].createElement(_settingsBox["default"], {
89
- className: "settings-box"
90
- }, settings) : settings;
91
- var secondaryContent = hideSettings ? null : settingsPanel;
92
- var finalClass = 'main-container';
93
- return /*#__PURE__*/_react["default"].createElement("div", {
94
- ref: measureRef,
95
- className: finalClass
96
- }, /*#__PURE__*/_react["default"].createElement(_layoutContents["default"], {
97
- mode: layoutMode,
98
- secondary: secondaryContent,
99
- dimensions: dimensions
100
- }, children));
101
- })));
77
+ return (
78
+ /*#__PURE__*/
79
+ // TODO: REVIEW MuiThemeProvider usage
80
+ // Different theme object identities will force theme consumers to re-render.
81
+ _react["default"].createElement(_styles.StyledEngineProvider, {
82
+ injectFirst: true
83
+ }, /*#__PURE__*/_react["default"].createElement(_styles.ThemeProvider, {
84
+ theme: theme
85
+ }, /*#__PURE__*/_react["default"].createElement(_reactMeasure["default"], {
86
+ bounds: true,
87
+ onResize: this.onResize
88
+ }, function (_ref2) {
89
+ var measureRef = _ref2.measureRef;
90
+ var _this2$props = _this2.props,
91
+ children = _this2$props.children,
92
+ settings = _this2$props.settings,
93
+ hideSettings = _this2$props.hideSettings,
94
+ dimensions = _this2$props.dimensions;
95
+ var layoutMode = _this2.state.layoutMode;
96
+ var settingsPanel = layoutMode === 'inline' ? /*#__PURE__*/_react["default"].createElement(_settingsBox["default"], {
97
+ className: "settings-box"
98
+ }, settings) : settings;
99
+ var secondaryContent = hideSettings ? null : settingsPanel;
100
+ var finalClass = 'main-container';
101
+ return /*#__PURE__*/_react["default"].createElement("div", {
102
+ ref: measureRef,
103
+ className: finalClass
104
+ }, /*#__PURE__*/_react["default"].createElement(_layoutContents["default"], {
105
+ mode: layoutMode,
106
+ secondary: secondaryContent,
107
+ dimensions: dimensions
108
+ }, children));
109
+ })))
110
+ );
102
111
  }
103
112
  }]);
104
113
  }(_renderUi.AppendCSSRules);
@@ -1 +1 @@
1
- {"version":3,"file":"config-layout.js","names":["_react","_interopRequireDefault","require","_reactMeasure","_interopRequireWildcard","_styles","_propTypes","_layoutContents","_settingsBox","_renderUi","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","theme","createTheme","typography","fontFamily","components","MuiButton","styleOverrides","contained","backgroundColor","color","MeasuredConfigLayout","_AppendCSSRules","_this","_classCallCheck2","_len","arguments","length","props","Array","_key","concat","_defineProperty2","contentRect","bounds","_this$props","sidePanelMinWidth","dimensions","_ref","maxWidth","layoutMode","width","setState","state","undefined","_inherits2","_createClass2","key","value","render","_this2","createElement","StyledEngineProvider","injectFirst","ThemeProvider","onResize","_ref2","measureRef","_this2$props","children","settings","hideSettings","settingsPanel","className","secondaryContent","finalClass","ref","mode","secondary","AppendCSSRules","PropTypes","oneOfType","string","arrayOf","element","object","number","bool","ConfigLayout","withContentRect","_default","exports"],"sources":["../../src/layout/config-layout.jsx"],"sourcesContent":["import React from 'react';\nimport Measure from 'react-measure';\nimport { createTheme, ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { withContentRect } from 'react-measure';\nimport PropTypes from 'prop-types';\nimport LayoutContents from './layout-contents';\nimport SettingsBox from './settings-box';\nimport { AppendCSSRules } from '@pie-lib/render-ui';\n\nconst theme = createTheme({\n typography: {\n fontFamily: 'inherit',\n },\n components: {\n MuiButton: {\n styleOverrides: {\n contained: {\n backgroundColor: '#e0e0e0',\n color: '#000000',\n '&:hover': {\n backgroundColor: '#bdbdbd',\n },\n },\n },\n },\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 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 <StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <Measure bounds onResize={this.onResize}>\n {({ measureRef }) => {\n const { children, settings, hideSettings, dimensions } = 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 = 'main-container';\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 </ThemeProvider>\n </StyledEngineProvider>\n );\n }\n}\n\nconst ConfigLayout = withContentRect('bounds')(MeasuredConfigLayout);\n\nexport default ConfigLayout;\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAAoD,SAAAE,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,wBAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAA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A,IAAArC,gBAAA,aAA3CX,oBAAoB,eACL;EACjBsC,QAAQ,EAAEW,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,OAAO,CAACH,qBAAS,CAACI,OAAO,CAAC,EAAEJ,qBAAS,CAACI,OAAO,CAAC,CAAC;EAC1GX,SAAS,EAAEO,qBAAS,CAACE,MAAM;EAC3BnC,UAAU,EAAEiC,qBAAS,CAACK,MAAM;EAC5Bf,QAAQ,EAAEU,qBAAS,CAACI,OAAO;EAC3BtC,iBAAiB,EAAEkC,qBAAS,CAACM,MAAM;EACnCf,YAAY,EAAES,qBAAS,CAACO;AAC1B,CAAC;AAAA,IAAA7C,gBAAA,aARGX,oBAAoB,kBAUF;EACpBe,iBAAiB,EAAE,IAAI;EACvByB,YAAY,EAAE,KAAK;EACnBxB,UAAU,EAAE,CAAC;AACf,CAAC;AA+CH,IAAMyC,YAAY,GAAG,IAAAC,6BAAe,EAAC,QAAQ,CAAC,CAAC1D,oBAAoB,CAAC;AAAC,IAAA2D,QAAA,GAAAC,OAAA,cAEtDH,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"config-layout.js","names":["_react","_interopRequireDefault","require","_reactMeasure","_interopRequireWildcard","_styles","_propTypes","_layoutContents","_settingsBox","_renderUi","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","theme","createTheme","typography","fontFamily","components","MuiButton","styleOverrides","contained","backgroundColor","color","MeasuredConfigLayout","_AppendCSSRules","_this","_classCallCheck2","_len","arguments","length","props","Array","_key","concat","_defineProperty2","contentRect","bounds","_this$props","sidePanelMinWidth","dimensions","_ref","maxWidth","layoutMode","width","state","setState","undefined","_inherits2","_createClass2","key","value","render","_this2","createElement","StyledEngineProvider","injectFirst","ThemeProvider","onResize","_ref2","measureRef","_this2$props","children","settings","hideSettings","settingsPanel","className","secondaryContent","finalClass","ref","mode","secondary","AppendCSSRules","PropTypes","oneOfType","string","arrayOf","element","object","number","bool","ConfigLayout","withContentRect","_default","exports"],"sources":["../../src/layout/config-layout.jsx"],"sourcesContent":["import React from 'react';\nimport Measure from 'react-measure';\nimport { createTheme, ThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport { withContentRect } from 'react-measure';\nimport PropTypes from 'prop-types';\nimport LayoutContents from './layout-contents';\nimport SettingsBox from './settings-box';\nimport { AppendCSSRules } from '@pie-lib/render-ui';\n\nconst theme = createTheme({\n typography: {\n fontFamily: 'inherit',\n },\n components: {\n MuiButton: {\n styleOverrides: {\n contained: {\n backgroundColor: '#e0e0e0',\n color: '#000000',\n '&:hover': {\n backgroundColor: '#bdbdbd',\n },\n },\n },\n },\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 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 // Only update state (and cause a re-render) if the computed layoutMode changed.\n if (layoutMode !== this.state.layoutMode) {\n this.setState({ layoutMode });\n }\n };\n\n render() {\n return (\n // TODO: REVIEW MuiThemeProvider usage\n // Different theme object identities will force theme consumers to re-render.\n <StyledEngineProvider injectFirst>\n <ThemeProvider theme={theme}>\n <Measure bounds onResize={this.onResize}>\n {({ measureRef }) => {\n const { children, settings, hideSettings, dimensions } = 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 = 'main-container';\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 </ThemeProvider>\n </StyledEngineProvider>\n );\n }\n}\n\nconst ConfigLayout = withContentRect('bounds')(MeasuredConfigLayout);\n\nexport default ConfigLayout;\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAAoD,SAAAE,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,wBAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA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AAC;QAEV,CACO,CACI,CACK;MAAC;IAE3B;EAAC;AAAA,EA/DgCU,wBAAc;AAAA,IAAArC,gBAAA,aAA3CX,oBAAoB,eACL;EACjBsC,QAAQ,EAAEW,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,OAAO,CAACH,qBAAS,CAACI,OAAO,CAAC,EAAEJ,qBAAS,CAACI,OAAO,CAAC,CAAC;EAC1GX,SAAS,EAAEO,qBAAS,CAACE,MAAM;EAC3BnC,UAAU,EAAEiC,qBAAS,CAACK,MAAM;EAC5Bf,QAAQ,EAAEU,qBAAS,CAACI,OAAO;EAC3BtC,iBAAiB,EAAEkC,qBAAS,CAACM,MAAM;EACnCf,YAAY,EAAES,qBAAS,CAACO;AAC1B,CAAC;AAAA,IAAA7C,gBAAA,aARGX,oBAAoB,kBAUF;EACpBe,iBAAiB,EAAE,IAAI;EACvByB,YAAY,EAAE,KAAK;EACnBxB,UAAU,EAAE,CAAC;AACf,CAAC;AAoDH,IAAMyC,YAAY,GAAG,IAAAC,6BAAe,EAAC,QAAQ,CAAC,CAAC1D,oBAAoB,CAAC;AAAC,IAAA2D,QAAA,GAAAC,OAAA,cAEtDH,YAAY","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/config-ui",
3
- "version": "11.37.0-mui-update.0",
3
+ "version": "11.39.0-mui-update.0",
4
4
  "main": "lib/index.js",
5
5
  "module": "src/index.js",
6
6
  "publishConfig": {
@@ -12,9 +12,9 @@
12
12
  "@emotion/style": "^0.8.0",
13
13
  "@mui/icons-material": "^7.3.4",
14
14
  "@mui/material": "^7.3.4",
15
- "@pie-lib/editable-html": "11.29.0-mui-update.0",
16
- "@pie-lib/icons": "2.32.0-mui-update.0",
17
- "@pie-lib/render-ui": "4.43.0-mui-update.0",
15
+ "@pie-lib/editable-html": "11.31.0-mui-update.0",
16
+ "@pie-lib/icons": "2.34.0-mui-update.0",
17
+ "@pie-lib/render-ui": "4.45.0-mui-update.0",
18
18
  "assert": "^1.4.1",
19
19
  "classnames": "^2.2.6",
20
20
  "complex.js": "2.1.1",
@@ -31,5 +31,5 @@
31
31
  "peerDependencies": {
32
32
  "react": "^18.2.0"
33
33
  },
34
- "gitHead": "094026045c44d3d7e558beb7e6986f2652661f75"
34
+ "gitHead": "52e6f74168f4129f23dced55b91f5d7f155aaeb6"
35
35
  }
@@ -55,11 +55,16 @@ class MeasuredConfigLayout extends AppendCSSRules {
55
55
  const layoutMode =
56
56
  bounds.width > sidePanelMinWidth && (maxWidth ? maxWidth > sidePanelMinWidth : true) ? 'inline' : 'tabbed';
57
57
 
58
- this.setState({ layoutMode });
58
+ // Only update state (and cause a re-render) if the computed layoutMode changed.
59
+ if (layoutMode !== this.state.layoutMode) {
60
+ this.setState({ layoutMode });
61
+ }
59
62
  };
60
63
 
61
64
  render() {
62
65
  return (
66
+ // TODO: REVIEW MuiThemeProvider usage
67
+ // Different theme object identities will force theme consumers to re-render.
63
68
  <StyledEngineProvider injectFirst>
64
69
  <ThemeProvider theme={theme}>
65
70
  <Measure bounds onResize={this.onResize}>