@pie-lib/config-ui 11.9.22-next.16 → 11.9.22
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,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
|
+
## [11.9.22](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.9.21...@pie-lib/config-ui@11.9.22) (2023-10-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **config-ui:** pd-3018 avoid scrolling for math editor ([843ba90](https://github.com/pie-framework/pie-lib/commit/843ba9099d75ec6a281985360b7d76c76e5e910d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [11.9.21](https://github.com/pie-framework/pie-lib/compare/@pie-lib/config-ui@11.9.20...@pie-lib/config-ui@11.9.21) (2023-10-03)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @pie-lib/config-ui
|
|
@@ -171,8 +171,7 @@ var styles = function styles(theme) {
|
|
|
171
171
|
container: {
|
|
172
172
|
display: 'flex',
|
|
173
173
|
flexDirection: 'column',
|
|
174
|
-
position: 'relative'
|
|
175
|
-
overflow: 'auto'
|
|
174
|
+
position: 'relative'
|
|
176
175
|
},
|
|
177
176
|
contentContainer: {
|
|
178
177
|
padding: "".concat(theme.spacing.unit * 2, "px 0")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/layout-contents.jsx"],"names":["RawLayoutContents","secondary","props","configuration","children","undefined","mode","classes","dimensions","minHeight","minWidth","maxHeight","maxWidth","getConfiguration","hasSettingsPanel","Object","entries","some","obj","settings","JSON","stringify","match","length","e","console","log","toString","container","flow","contentContainer","configContainer","settingsContainer","onTabsChange","React","Component","PropTypes","oneOf","oneOfType","arrayOf","node","object","styles","theme","display","justifyContent","flexDirection","position","
|
|
1
|
+
{"version":3,"sources":["../../src/layout/layout-contents.jsx"],"names":["RawLayoutContents","secondary","props","configuration","children","undefined","mode","classes","dimensions","minHeight","minWidth","maxHeight","maxWidth","getConfiguration","hasSettingsPanel","Object","entries","some","obj","settings","JSON","stringify","match","length","e","console","log","toString","container","flow","contentContainer","configContainer","settingsContainer","onTabsChange","React","Component","PropTypes","oneOf","oneOfType","arrayOf","node","object","styles","theme","display","justifyContent","flexDirection","position","padding","spacing","unit","flex","marginLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;IAGMA,iB;;;;;;;;;;;;;;;yGASe,YAAM;AAAA;;AACvB,UAAQC,SAAR,GAAsB,MAAKC,KAA3B,CAAQD,SAAR,CADuB,CAEvB;;AAEA,aAAO,CAAAA,SAAS,SAAT,IAAAA,SAAS,WAAT,gCAAAA,SAAS,CAAEC,KAAX,sEAAkBC,aAAlB,MAAmCF,SAAnC,aAAmCA,SAAnC,4CAAmCA,SAAS,CAAEC,KAA9C,+EAAmC,kBAAkBE,QAArD,oFAAmC,sBAA4BF,KAA/D,2DAAmC,uBAAmCC,aAAtE,KAAuFE,SAA9F;AACD,K;;;;;;WAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,sBAAS;AACP,wBAA2D,KAAKH,KAAhE;AAAA,UAAQI,IAAR,eAAQA,IAAR;AAAA,UAAcL,SAAd,eAAcA,SAAd;AAAA,UAAyBG,QAAzB,eAAyBA,QAAzB;AAAA,UAAmCG,OAAnC,eAAmCA,OAAnC;AAAA,UAA4CC,UAA5C,eAA4CA,UAA5C;;AACA,iBAAqDA,UAAU,IAAI,EAAnE;AAAA,UAAQC,SAAR,QAAQA,SAAR;AAA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AAFZ,KADmB;AAKzBjB,IAAAA,SAAS,EAAE;AACTgB,MAAAA,OAAO,EAAE,MADA;AAETE,MAAAA,aAAa,EAAE,QAFN;AAGTC,MAAAA,QAAQ,EAAE;AAHD,KALc;AAUzBjB,IAAAA,gBAAgB,EAAE;AAChBkB,MAAAA,OAAO,YAAKL,KAAK,CAACM,OAAN,CAAcC,IAAd,GAAqB,CAA1B;AADS,KAVO;AAazBnB,IAAAA,eAAe,EAAE;AACfoB,MAAAA,IAAI,EAAE;AADS,KAbQ;AAgBzBnB,IAAAA,iBAAiB,EAAE;AACjBoB,MAAAA,UAAU,EAAET,KAAK,CAACM,OAAN,CAAcC,IAAd,GAAqB;AADhB;AAhBM,GAAZ;AAAA,CAAf;;eAqBe,sBAAWR,MAAX,EAAmB1C,iBAAnB,C","sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core';\nimport Tabs from '../tabs';\nimport classNames from 'classnames';\n\nclass RawLayoutContents extends React.Component {\n static propTypes = {\n mode: PropTypes.oneOf(['tabbed', 'inline']),\n secondary: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n classes: PropTypes.object,\n dimensions: PropTypes.object,\n };\n\n getConfiguration = () => {\n const { secondary } = this.props;\n // in config-layout, secondary can be: <SettingsBox>{settings}</SettingsBox>, settings, null\n\n return secondary?.props?.configuration || secondary?.props?.children?.props?.configuration || undefined;\n };\n\n // // eslint-disable-next-line no-unused-vars\n // componentDidUpdate(prevProps, prevState, snapshot) {\n // const configuration = this.getConfiguration();\n // const { mode } = this.props;\n //\n // // promptHolder class is used to wrap up inputs:\n // // we don't want inputs to fill the entire scrollable container,\n // // but instead we want inputs to fit in the first view,\n // // so we calculate the maximum space inputs need\n // try {\n // if (\n // configuration?.maxWidth &&\n // getComputedStyle(document.documentElement).getPropertyValue('--pie-prompt-holder-max-width') !==\n // configuration?.maxWidth\n // ) {\n // document.documentElement.style.setProperty(\n // '--pie-prompt-holder-max-width',\n // mode === 'inline' ? `calc(${configuration.maxWidth} - 340px)` : configuration.maxWidth,\n // );\n // }\n // } catch (e) {\n // console.log(e.toString());\n // }\n // }\n\n render() {\n const { mode, secondary, children, classes, dimensions } = this.props;\n const { minHeight, minWidth, maxHeight, maxWidth } = dimensions || {};\n const configuration = this.getConfiguration();\n\n let hasSettingsPanel = Object.entries(configuration || {}).some(([, obj]) => !!obj?.settings);\n // ebsr has configuration.partA and configuration.partB\n // because we might have nested configuration for other item types as well, let's add this simple regex to check values for settings\n\n if (!hasSettingsPanel) {\n try {\n hasSettingsPanel = JSON.stringify(configuration)?.match(/settings\":true/)?.length;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.log(e.toString());\n }\n }\n\n return (\n <div className={classes.container} style={{ minHeight, minWidth, maxHeight, maxWidth }}>\n {mode === 'inline' && (\n <div className={classnames(classes.flow, classes.contentContainer)}>\n <div className={classnames(classes.configContainer, 'design-container')}>{children}</div>\n {hasSettingsPanel && (\n <div className={classnames(classes.settingsContainer, 'settings-container')}>{secondary}</div>\n )}\n </div>\n )}\n\n {mode === 'tabbed' && hasSettingsPanel && (\n <Tabs onChange={this.onTabsChange} contentClassName={classes.contentContainer} indicatorColor=\"primary\">\n <div title=\"Design\" className=\"design-container\">\n {children}\n </div>\n <div title=\"Settings\" className=\"settings-container\">\n {secondary}\n </div>\n </Tabs>\n )}\n\n {mode === 'tabbed' && !hasSettingsPanel && (\n <div className={classNames(classes.contentContainer, 'design-container')}>{children}</div>\n )}\n </div>\n );\n }\n}\n\nconst styles = (theme) => ({\n flow: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n container: {\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n },\n contentContainer: {\n padding: `${theme.spacing.unit * 2}px 0`,\n },\n configContainer: {\n flex: '1',\n },\n settingsContainer: {\n marginLeft: theme.spacing.unit * 2,\n },\n});\n\nexport default withStyles(styles)(RawLayoutContents);\n"],"file":"layout-contents.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/config-ui",
|
|
3
|
-
"version": "11.9.22
|
|
3
|
+
"version": "11.9.22",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,7 +10,7 @@
|
|
|
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.0.9
|
|
13
|
+
"@pie-lib/editable-html": "^11.0.9",
|
|
14
14
|
"@pie-lib/icons": "^2.4.43",
|
|
15
15
|
"@pie-lib/render-ui": "^4.15.9",
|
|
16
16
|
"classnames": "^2.2.6",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^16.8.1"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "cda593dd0aedaadb7e1fd85f12d72ca3bb03d375"
|
|
30
30
|
}
|