@pie-lib/config-ui 11.1.1-next.0 → 11.1.1-next.4

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.
@@ -48,14 +48,17 @@ var RawLayoutContents = /*#__PURE__*/function (_React$Component) {
48
48
  (0, _createClass2["default"])(RawLayoutContents, [{
49
49
  key: "render",
50
50
  value: function render() {
51
- var _secondary$props;
51
+ var _secondary$props, _secondary$props2, _secondary$props2$chi, _secondary$props2$chi2;
52
52
 
53
53
  var _this$props = this.props,
54
54
  mode = _this$props.mode,
55
55
  secondary = _this$props.secondary,
56
56
  children = _this$props.children,
57
- classes = _this$props.classes;
58
- var hasSettingsPanel = Object.entries((secondary === null || secondary === void 0 ? void 0 : (_secondary$props = secondary.props) === null || _secondary$props === void 0 ? void 0 : _secondary$props.configuration) || {}).some(function (_ref) {
57
+ classes = _this$props.classes; // in config-layout, layout content gets called like this:
58
+ // <LayoutContents secondary={layoutMode === 'inline' ? <SettingsBox>{settings}</SettingsBox> : settings}>
59
+
60
+ var configuration = (secondary === null || secondary === void 0 ? void 0 : (_secondary$props = secondary.props) === null || _secondary$props === void 0 ? void 0 : _secondary$props.configuration) || (secondary === null || secondary === void 0 ? void 0 : (_secondary$props2 = secondary.props) === null || _secondary$props2 === void 0 ? void 0 : (_secondary$props2$chi = _secondary$props2.children) === null || _secondary$props2$chi === void 0 ? void 0 : (_secondary$props2$chi2 = _secondary$props2$chi.props) === null || _secondary$props2$chi2 === void 0 ? void 0 : _secondary$props2$chi2.configuration) || undefined;
61
+ var hasSettingsPanel = Object.entries(configuration || {}).some(function (_ref) {
59
62
  var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
60
63
  propName = _ref2[0],
61
64
  obj = _ref2[1];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/layout-contents.jsx"],"names":["RawLayoutContents","props","mode","secondary","children","classes","hasSettingsPanel","Object","entries","configuration","some","propName","obj","settings","container","flow","configContainer","onTabsChange","contentContainer","React","Component","PropTypes","oneOf","oneOfType","arrayOf","node","object","styles","display","justifyContent","flexDirection","position","padding","flex","marginRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEMA,iB;;;;;;;;;;;;WAQJ,kBAAS;AAAA;;AACP,wBAA+C,KAAKC,KAApD;AAAA,UAAQC,IAAR,eAAQA,IAAR;AAAA,UAAcC,SAAd,eAAcA,SAAd;AAAA,UAAyBC,QAAzB,eAAyBA,QAAzB;AAAA,UAAmCC,OAAnC,eAAmCA,OAAnC;AACA,UAAMC,gBAAgB,GAAGC,MAAM,CAACC,OAAP,CAAe,CAAAL,SAAS,SAAT,IAAAA,SAAS,WAAT,gCAAAA,SAAS,CAAEF,KAAX,sEAAkBQ,aAAlB,KAAmC,EAAlD,EAAsDC,IAAtD,CACvB;AAAA;AAAA,YAAEC,QAAF;AAAA,YAAYC,GAAZ;;AAAA,eAAqB,CAAC,EAACA,GAAD,aAACA,GAAD,eAACA,GAAG,CAAEC,QAAN,CAAtB;AAAA,OADuB,CAAzB;AAIA,0BACE;AAAK,QAAA,SAAS,EAAE,4BAAWR,OAAO,CAACS,SAAnB;AAAhB,SACGZ,IAAI,KAAK,QAAT,iBACC;AAAK,QAAA,SAAS,EAAEG,OAAO,CAACU;AAAxB,sBACE;AAAK,QAAA,SAAS,EAAEV,OAAO,CAACW;AAAxB,SAA0CZ,QAA1C,CADF,EAEGE,gBAAgB,iBAAI,6CAAMH,SAAN,CAFvB,CAFJ,EAOGD,IAAI,KAAK,QAAT,IAAqBI,gBAArB,iBACC,gCAAC,gBAAD;AAAM,QAAA,QAAQ,EAAE,KAAKW,YAArB;AAAmC,QAAA,gBAAgB,EAAEZ,OAAO,CAACa,gBAA7D;AAA+E,QAAA,cAAc,EAAC;AAA9F,sBACE;AAAK,QAAA,KAAK,EAAC;AAAX,SAAqBd,QAArB,CADF,eAEE;AAAK,QAAA,KAAK,EAAC;AAAX,SAAuBD,SAAvB,CAFF,CARJ,EAaGD,IAAI,KAAK,QAAT,IAAqB,CAACI,gBAAtB,iBAA0C,6CAAMF,QAAN,CAb7C,CADF;AAiBD;;;EA/B6Be,kBAAMC,S;;iCAAhCpB,iB,eACe;AACjBE,EAAAA,IAAI,EAAEmB,sBAAUC,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CADW;AAEjBnB,EAAAA,SAAS,EAAEkB,sBAAUE,SAAV,CAAoB,CAACF,sBAAUG,OAAV,CAAkBH,sBAAUI,IAA5B,CAAD,EAAoCJ,sBAAUI,IAA9C,CAApB,CAFM;AAGjBrB,EAAAA,QAAQ,EAAEiB,sBAAUE,SAAV,CAAoB,CAACF,sBAAUG,OAAV,CAAkBH,sBAAUI,IAA5B,CAAD,EAAoCJ,sBAAUI,IAA9C,CAApB,CAHO;AAIjBpB,EAAAA,OAAO,EAAEgB,sBAAUK;AAJF,C;;AAiCrB,IAAMC,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBZ,IAAAA,IAAI,EAAE;AACJa,MAAAA,OAAO,EAAE,MADL;AAEJC,MAAAA,cAAc,EAAE;AAFZ,KADc;AAKpBf,IAAAA,SAAS,EAAE;AACTc,MAAAA,OAAO,EAAE,MADA;AAETE,MAAAA,aAAa,EAAE,QAFN;AAGTC,MAAAA,QAAQ,EAAE;AAHD,KALS;AAUpBb,IAAAA,gBAAgB,EAAE;AAChBc,MAAAA,OAAO,EAAE;AADO,KAVE;AAapBhB,IAAAA,eAAe,EAAE;AACfiB,MAAAA,IAAI,EAAE,GADS;AAEfC,MAAAA,WAAW,EAAE;AAFE;AAbG,GAAP;AAAA,CAAf;;eAmBe,sBAAWP,MAAX,EAAmB3B,iBAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core';\nimport Tabs from '../tabs';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\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 };\n\n render() {\n const { mode, secondary, children, classes } = this.props;\n const hasSettingsPanel = Object.entries(secondary?.props?.configuration || {}).some(\n ([propName, obj]) => !!obj?.settings,\n );\n\n return (\n <div className={classnames(classes.container)}>\n {mode === 'inline' && (\n <div className={classes.flow}>\n <div className={classes.configContainer}>{children}</div>\n {hasSettingsPanel && <div>{secondary}</div>}\n </div>\n )}\n {mode === 'tabbed' && hasSettingsPanel && (\n <Tabs onChange={this.onTabsChange} contentClassName={classes.contentContainer} indicatorColor=\"primary\">\n <div title=\"Design\">{children}</div>\n <div title=\"settings\">{secondary}</div>\n </Tabs>\n )}\n {mode === 'tabbed' && !hasSettingsPanel && <div>{children}</div>}\n </div>\n );\n }\n}\n\nconst styles = () => ({\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: '32px 16px 0 16px',\n },\n configContainer: {\n flex: '1',\n marginRight: '20px',\n },\n});\n\nexport default withStyles(styles)(RawLayoutContents);\n"],"file":"layout-contents.js"}
1
+ {"version":3,"sources":["../../src/layout/layout-contents.jsx"],"names":["RawLayoutContents","props","mode","secondary","children","classes","configuration","undefined","hasSettingsPanel","Object","entries","some","propName","obj","settings","container","flow","configContainer","onTabsChange","contentContainer","React","Component","PropTypes","oneOf","oneOfType","arrayOf","node","object","styles","display","justifyContent","flexDirection","position","padding","flex","marginRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEMA,iB;;;;;;;;;;;;WAQJ,kBAAS;AAAA;;AACP,wBAA+C,KAAKC,KAApD;AAAA,UAAQC,IAAR,eAAQA,IAAR;AAAA,UAAcC,SAAd,eAAcA,SAAd;AAAA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ADF;AAiBD;;;EAjC6BgB,kBAAMC,S;;iCAAhCrB,iB,eACe;AACjBE,EAAAA,IAAI,EAAEoB,sBAAUC,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,CADW;AAEjBpB,EAAAA,SAAS,EAAEmB,sBAAUE,SAAV,CAAoB,CAACF,sBAAUG,OAAV,CAAkBH,sBAAUI,IAA5B,CAAD,EAAoCJ,sBAAUI,IAA9C,CAApB,CAFM;AAGjBtB,EAAAA,QAAQ,EAAEkB,sBAAUE,SAAV,CAAoB,CAACF,sBAAUG,OAAV,CAAkBH,sBAAUI,IAA5B,CAAD,EAAoCJ,sBAAUI,IAA9C,CAApB,CAHO;AAIjBrB,EAAAA,OAAO,EAAEiB,sBAAUK;AAJF,C;;AAmCrB,IAAMC,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBZ,IAAAA,IAAI,EAAE;AACJa,MAAAA,OAAO,EAAE,MADL;AAEJC,MAAAA,cAAc,EAAE;AAFZ,KADc;AAKpBf,IAAAA,SAAS,EAAE;AACTc,MAAAA,OAAO,EAAE,MADA;AAETE,MAAAA,aAAa,EAAE,QAFN;AAGTC,MAAAA,QAAQ,EAAE;AAHD,KALS;AAUpBb,IAAAA,gBAAgB,EAAE;AAChBc,MAAAA,OAAO,EAAE;AADO,KAVE;AAapBhB,IAAAA,eAAe,EAAE;AACfiB,MAAAA,IAAI,EAAE,GADS;AAEfC,MAAAA,WAAW,EAAE;AAFE;AAbG,GAAP;AAAA,CAAf;;eAmBe,sBAAWP,MAAX,EAAmB5B,iBAAnB,C","sourcesContent":["import React from 'react';\nimport { withStyles } from '@material-ui/core';\nimport Tabs from '../tabs';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\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 };\n\n render() {\n const { mode, secondary, children, classes } = this.props;\n // in config-layout, layout content gets called like this:\n // <LayoutContents secondary={layoutMode === 'inline' ? <SettingsBox>{settings}</SettingsBox> : settings}>\n const configuration =\n secondary?.props?.configuration || secondary?.props?.children?.props?.configuration || undefined;\n const hasSettingsPanel = Object.entries(configuration || {}).some(([propName, obj]) => !!obj?.settings);\n\n return (\n <div className={classnames(classes.container)}>\n {mode === 'inline' && (\n <div className={classes.flow}>\n <div className={classes.configContainer}>{children}</div>\n {hasSettingsPanel && <div>{secondary}</div>}\n </div>\n )}\n {mode === 'tabbed' && hasSettingsPanel && (\n <Tabs onChange={this.onTabsChange} contentClassName={classes.contentContainer} indicatorColor=\"primary\">\n <div title=\"Design\">{children}</div>\n <div title=\"settings\">{secondary}</div>\n </Tabs>\n )}\n {mode === 'tabbed' && !hasSettingsPanel && <div>{children}</div>}\n </div>\n );\n }\n}\n\nconst styles = () => ({\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: '32px 16px 0 16px',\n },\n configContainer: {\n flex: '1',\n marginRight: '20px',\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.1.1-next.0+c3857194",
3
+ "version": "11.1.1-next.4+8e430d41",
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": "^9.2.10-next.0+c3857194",
13
+ "@pie-lib/editable-html": "^9.2.9",
14
14
  "@pie-lib/icons": "^2.4.26",
15
15
  "@pie-lib/render-ui": "^4.13.7",
16
16
  "classnames": "^2.2.6",
@@ -26,5 +26,5 @@
26
26
  "peerDependencies": {
27
27
  "react": "^16.8.1"
28
28
  },
29
- "gitHead": "c385719468d14f38009e4617bc0957de4731bba0"
29
+ "gitHead": "8e430d4199740f53178fc807e9a4b3d309543122"
30
30
  }
@@ -14,9 +14,11 @@ class RawLayoutContents extends React.Component {
14
14
 
15
15
  render() {
16
16
  const { mode, secondary, children, classes } = this.props;
17
- const hasSettingsPanel = Object.entries(secondary?.props?.configuration || {}).some(
18
- ([propName, obj]) => !!obj?.settings,
19
- );
17
+ // in config-layout, layout content gets called like this:
18
+ // <LayoutContents secondary={layoutMode === 'inline' ? <SettingsBox>{settings}</SettingsBox> : settings}>
19
+ const configuration =
20
+ secondary?.props?.configuration || secondary?.props?.children?.props?.configuration || undefined;
21
+ const hasSettingsPanel = Object.entries(configuration || {}).some(([propName, obj]) => !!obj?.settings);
20
22
 
21
23
  return (
22
24
  <div className={classnames(classes.container)}>