@blaze-cms/plugin-data-ui 0.141.0-core-styles.5 → 0.141.0-core-styles.6

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,14 @@
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
+ # [0.141.0-core-styles.6](https://github.com/thebyte9/blaze/compare/v0.141.0-core-styles.5...v0.141.0-core-styles.6) (2024-03-25)
7
+
8
+ **Note:** Version bump only for package @blaze-cms/plugin-data-ui
9
+
10
+
11
+
12
+
13
+
6
14
  # [0.141.0-core-styles.5](https://github.com/thebyte9/blaze/compare/v0.141.0-core-styles.4...v0.141.0-core-styles.5) (2024-03-25)
7
15
 
8
16
 
@@ -21,7 +21,7 @@ function buildDynamicQuery(_ref) {
21
21
  }
22
22
  if (displayProperties.adminMainInfoProperty && Array.isArray(displayProperties.adminMainInfoProperty)) {
23
23
  var fields = displayProperties.adminMainInfoProperty.map(function (infoProperty) {
24
- return "".concat(infoProperty, " {\n label\n value\n }");
24
+ return "".concat(infoProperty, " {\n label\n value\n showLabel\n }");
25
25
  });
26
26
  return (0, _client.gql)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["query getInfoBoxData($id: String!){\n ", "( id: $id ) {\n id\n ", "\n __typename\n }\n }"])), schema.actions.get, fields.map(function (field) {
27
27
  return field;
@@ -1 +1 @@
1
- {"version":3,"file":"build-dynamic-query.js","names":["_client","require","_coreErrors","_templateObject","buildDynamicQuery","_ref","id","schema","displayProperties","actions","get","properties","BlazeError","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","concat","gql","_taggedTemplateLiteral2","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAErC,SAASC,iBAAiBA,CAAAC,IAAA,EAAoC;EAAA,IAAjCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;EACvE,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIC,sBAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEJ,iBAAiB,CAACK,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACP,iBAAiB,CAACK,qBAAqB,CAAC,EACtD;IACA,IAAMG,MAAM,GAAGR,iBAAiB,CAACK,qBAAqB,CAACI,GAAG,CACxD,UAAAC,YAAY;MAAA,UAAAC,MAAA,CACPD,YAAY;IAAA,CAInB,CAAC;IAED,WAAOE,WAAG,EAAAjB,eAAA,KAAAA,eAAA,OAAAkB,uBAAA,6IACNd,MAAM,CAACE,OAAO,CAACC,GAAG,EAEjBM,MAAM,CAACC,GAAG,CAAC,UAAAK,KAAK;MAAA,OAAIA,KAAK;IAAA,EAAC;EAIjC;EAEA,OAAO,IAAI;AACb"}
1
+ {"version":3,"file":"build-dynamic-query.js","names":["_client","require","_coreErrors","_templateObject","buildDynamicQuery","_ref","id","schema","displayProperties","actions","get","properties","BlazeError","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","concat","gql","_taggedTemplateLiteral2","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n showLabel\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAoD,IAAAE,eAAA;AAErC,SAASC,iBAAiBA,CAAAC,IAAA,EAAoC;EAAA,IAAjCC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;EACvE,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIC,sBAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEJ,iBAAiB,CAACK,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACP,iBAAiB,CAACK,qBAAqB,CAAC,EACtD;IACA,IAAMG,MAAM,GAAGR,iBAAiB,CAACK,qBAAqB,CAACI,GAAG,CACxD,UAAAC,YAAY;MAAA,UAAAC,MAAA,CACPD,YAAY;IAAA,CAKnB,CAAC;IAED,WAAOE,WAAG,EAAAjB,eAAA,KAAAA,eAAA,OAAAkB,uBAAA,6IACNd,MAAM,CAACE,OAAO,CAACC,GAAG,EAEjBM,MAAM,CAACC,GAAG,CAAC,UAAAK,KAAK;MAAA,OAAIA,KAAK;IAAA,EAAC;EAIjC;EAEA,OAAO,IAAI;AACb"}
@@ -20,12 +20,13 @@ var InfoBox = function InfoBox(_ref) {
20
20
  var infoBoxItems = items.map(function (item) {
21
21
  return Object.values(item).map(function (info) {
22
22
  if (!info.label || !info.value) return null;
23
+ var label = info.showLabel === false ? '' : "".concat(info.label, ": ");
23
24
  return /*#__PURE__*/_react["default"].createElement("div", {
24
25
  className: "info-box--item",
25
26
  key: "".concat(infoBoxKey, "-").concat(info.label.toLowerCase())
26
27
  }, /*#__PURE__*/_react["default"].createElement("div", {
27
28
  className: "info-box--label"
28
- }, info.label, ": "), /*#__PURE__*/_react["default"].createElement("div", {
29
+ }, label), /*#__PURE__*/_react["default"].createElement("div", {
29
30
  className: "info-box--value"
30
31
  }, info.value));
31
32
  }).filter(Boolean);
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBox.js","names":["_propTypes","_interopRequireDefault","require","_react","InfoBox","_ref","items","infoBoxKey","infoBoxItems","map","item","Object","values","info","label","value","createElement","className","key","concat","toLowerCase","filter","Boolean","_default","exports","propTypes","PropTypes","string","isRequired","array"],"sources":["../../../../src/components/InfoBoxes/presentational/InfoBox.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst InfoBox = ({ items, infoBoxKey }) => {\n if (!items) return null;\n\n const infoBoxItems = items.map(item =>\n Object.values(item)\n .map(info => {\n if (!info.label || !info.value) return null;\n\n return (\n <div className=\"info-box--item\" key={`${infoBoxKey}-${info.label.toLowerCase()}`}>\n <div className=\"info-box--label\">{info.label}: </div>\n <div className=\"info-box--value\">{info.value}</div>\n </div>\n );\n })\n .filter(Boolean)\n );\n\n return (\n <div className=\"info-box\" key={infoBoxKey}>\n <div className=\"info-box--container\">{infoBoxItems}</div>\n </div>\n );\n};\n\nexport default InfoBox;\n\nInfoBox.propTypes = {\n infoBoxKey: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAME,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAA8B;EAAA,IAAxBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU;EAClC,IAAI,CAACD,KAAK,EAAE,OAAO,IAAI;EAEvB,IAAME,YAAY,GAAGF,KAAK,CAACG,GAAG,CAAC,UAAAC,IAAI;IAAA,OACjCC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAChBD,GAAG,CAAC,UAAAI,IAAI,EAAI;MACX,IAAI,CAACA,IAAI,CAACC,KAAK,IAAI,CAACD,IAAI,CAACE,KAAK,EAAE,OAAO,IAAI;MAE3C,oBACEZ,MAAA,YAAAa,aAAA;QAAKC,SAAS,EAAC,gBAAgB;QAACC,GAAG,KAAAC,MAAA,CAAKZ,UAAU,OAAAY,MAAA,CAAIN,IAAI,CAACC,KAAK,CAACM,WAAW,CAAC,CAAC;MAAG,gBAC/EjB,MAAA,YAAAa,aAAA;QAAKC,SAAS,EAAC;MAAiB,GAAEJ,IAAI,CAACC,KAAK,EAAC,IAAO,CAAC,eACrDX,MAAA,YAAAa,aAAA;QAAKC,SAAS,EAAC;MAAiB,GAAEJ,IAAI,CAACE,KAAW,CAC/C,CAAC;IAEV,CAAC,CAAC,CACDM,MAAM,CAACC,OAAO,CAAC;EAAA,CACpB,CAAC;EAED,oBACEnB,MAAA,YAAAa,aAAA;IAAKC,SAAS,EAAC,UAAU;IAACC,GAAG,EAAEX;EAAW,gBACxCJ,MAAA,YAAAa,aAAA;IAAKC,SAAS,EAAC;EAAqB,GAAET,YAAkB,CACrD,CAAC;AAEV,CAAC;AAAC,IAAAe,QAAA,GAAAC,OAAA,cAEapB,OAAO;AAEtBA,OAAO,CAACqB,SAAS,GAAG;EAClBlB,UAAU,EAAEmB,qBAAS,CAACC,MAAM,CAACC,UAAU;EACvCtB,KAAK,EAAEoB,qBAAS,CAACG,KAAK,CAACD;AACzB,CAAC"}
1
+ {"version":3,"file":"InfoBox.js","names":["_propTypes","_interopRequireDefault","require","_react","InfoBox","_ref","items","infoBoxKey","infoBoxItems","map","item","Object","values","info","label","value","showLabel","concat","createElement","className","key","toLowerCase","filter","Boolean","_default","exports","propTypes","PropTypes","string","isRequired","array"],"sources":["../../../../src/components/InfoBoxes/presentational/InfoBox.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst InfoBox = ({ items, infoBoxKey }) => {\n if (!items) return null;\n\n const infoBoxItems = items.map(item =>\n Object.values(item)\n .map(info => {\n if (!info.label || !info.value) return null;\n const label = info.showLabel === false ? '' : `${info.label}: `;\n return (\n <div className=\"info-box--item\" key={`${infoBoxKey}-${info.label.toLowerCase()}`}>\n <div className=\"info-box--label\">{label}</div>\n <div className=\"info-box--value\">{info.value}</div>\n </div>\n );\n })\n .filter(Boolean)\n );\n\n return (\n <div className=\"info-box\" key={infoBoxKey}>\n <div className=\"info-box--container\">{infoBoxItems}</div>\n </div>\n );\n};\n\nexport default InfoBox;\n\nInfoBox.propTypes = {\n infoBoxKey: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAME,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAA8B;EAAA,IAAxBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU;EAClC,IAAI,CAACD,KAAK,EAAE,OAAO,IAAI;EAEvB,IAAME,YAAY,GAAGF,KAAK,CAACG,GAAG,CAAC,UAAAC,IAAI;IAAA,OACjCC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAChBD,GAAG,CAAC,UAAAI,IAAI,EAAI;MACX,IAAI,CAACA,IAAI,CAACC,KAAK,IAAI,CAACD,IAAI,CAACE,KAAK,EAAE,OAAO,IAAI;MAC3C,IAAMD,KAAK,GAAGD,IAAI,CAACG,SAAS,KAAK,KAAK,GAAG,EAAE,MAAAC,MAAA,CAAMJ,IAAI,CAACC,KAAK,OAAI;MAC/D,oBACEX,MAAA,YAAAe,aAAA;QAAKC,SAAS,EAAC,gBAAgB;QAACC,GAAG,KAAAH,MAAA,CAAKV,UAAU,OAAAU,MAAA,CAAIJ,IAAI,CAACC,KAAK,CAACO,WAAW,CAAC,CAAC;MAAG,gBAC/ElB,MAAA,YAAAe,aAAA;QAAKC,SAAS,EAAC;MAAiB,GAAEL,KAAW,CAAC,eAC9CX,MAAA,YAAAe,aAAA;QAAKC,SAAS,EAAC;MAAiB,GAAEN,IAAI,CAACE,KAAW,CAC/C,CAAC;IAEV,CAAC,CAAC,CACDO,MAAM,CAACC,OAAO,CAAC;EAAA,CACpB,CAAC;EAED,oBACEpB,MAAA,YAAAe,aAAA;IAAKC,SAAS,EAAC,UAAU;IAACC,GAAG,EAAEb;EAAW,gBACxCJ,MAAA,YAAAe,aAAA;IAAKC,SAAS,EAAC;EAAqB,GAAEX,YAAkB,CACrD,CAAC;AAEV,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,cAEarB,OAAO;AAEtBA,OAAO,CAACsB,SAAS,GAAG;EAClBnB,UAAU,EAAEoB,qBAAS,CAACC,MAAM,CAACC,UAAU;EACvCvB,KAAK,EAAEqB,qBAAS,CAACG,KAAK,CAACD;AACzB,CAAC"}
@@ -12,6 +12,7 @@ export default function buildDynamicQuery({
12
12
  const fields = displayProperties.adminMainInfoProperty.map(infoProperty => `${infoProperty} {
13
13
  label
14
14
  value
15
+ showLabel
15
16
  }`);
16
17
  return gql`query getInfoBoxData($id: String!){
17
18
  ${schema.actions.get}( id: $id ) {
@@ -1 +1 @@
1
- {"version":3,"file":"build-dynamic-query.js","names":["gql","BlazeError","buildDynamicQuery","id","schema","displayProperties","actions","get","properties","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,eAAe,SAASC,iBAAiBA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,EAAE;EAC3E,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIP,UAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEI,iBAAiB,CAACI,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACN,iBAAiB,CAACI,qBAAqB,CAAC,EACtD;IACA,MAAMG,MAAM,GAAGP,iBAAiB,CAACI,qBAAqB,CAACI,GAAG,CACxDC,YAAY,IACT,GAAEA,YAAa;AACxB;AACA;AACA,QACI,CAAC;IAED,OAAOd,GAAI;AACf,QAAQI,MAAM,CAACE,OAAO,CAACC,GAAI;AAC3B;AACA,SAASK,MAAM,CAACC,GAAG,CAACE,KAAK,IAAIA,KAAK,CAAE;AACpC;AACA;AACA,MAAM;EACJ;EAEA,OAAO,IAAI;AACb"}
1
+ {"version":3,"file":"build-dynamic-query.js","names":["gql","BlazeError","buildDynamicQuery","id","schema","displayProperties","actions","get","properties","adminMainInfoProperty","Array","isArray","fields","map","infoProperty","field"],"sources":["../../../../../../src/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { BlazeError } from '@blaze-cms/core-errors';\n\nexport default function buildDynamicQuery({ id, schema, displayProperties }) {\n if (!schema || !schema.actions || !schema.actions.get || !schema.properties) {\n throw new BlazeError(\n 'DataEntity query requires get action, properties and fields from entity schema'\n );\n }\n\n if (\n displayProperties.adminMainInfoProperty &&\n Array.isArray(displayProperties.adminMainInfoProperty)\n ) {\n const fields = displayProperties.adminMainInfoProperty.map(\n infoProperty =>\n `${infoProperty} {\n label\n value\n showLabel\n }`\n );\n\n return gql`query getInfoBoxData($id: String!){\n ${schema.actions.get}( id: $id ) {\n id\n ${fields.map(field => field)}\n __typename\n }\n }`;\n }\n\n return null;\n}\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,eAAe,SAASC,iBAAiBA,CAAC;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAkB,CAAC,EAAE;EAC3E,IAAI,CAACD,MAAM,IAAI,CAACA,MAAM,CAACE,OAAO,IAAI,CAACF,MAAM,CAACE,OAAO,CAACC,GAAG,IAAI,CAACH,MAAM,CAACI,UAAU,EAAE;IAC3E,MAAM,IAAIP,UAAU,CAClB,gFACF,CAAC;EACH;EAEA,IACEI,iBAAiB,CAACI,qBAAqB,IACvCC,KAAK,CAACC,OAAO,CAACN,iBAAiB,CAACI,qBAAqB,CAAC,EACtD;IACA,MAAMG,MAAM,GAAGP,iBAAiB,CAACI,qBAAqB,CAACI,GAAG,CACxDC,YAAY,IACT,GAAEA,YAAa;AACxB;AACA;AACA;AACA,QACI,CAAC;IAED,OAAOd,GAAI;AACf,QAAQI,MAAM,CAACE,OAAO,CAACC,GAAI;AAC3B;AACA,SAASK,MAAM,CAACC,GAAG,CAACE,KAAK,IAAIA,KAAK,CAAE;AACpC;AACA;AACA,MAAM;EACJ;EAEA,OAAO,IAAI;AACb"}
@@ -7,12 +7,13 @@ const InfoBox = ({
7
7
  if (!items) return null;
8
8
  const infoBoxItems = items.map(item => Object.values(item).map(info => {
9
9
  if (!info.label || !info.value) return null;
10
+ const label = info.showLabel === false ? '' : `${info.label}: `;
10
11
  return /*#__PURE__*/React.createElement("div", {
11
12
  className: "info-box--item",
12
13
  key: `${infoBoxKey}-${info.label.toLowerCase()}`
13
14
  }, /*#__PURE__*/React.createElement("div", {
14
15
  className: "info-box--label"
15
- }, info.label, ": "), /*#__PURE__*/React.createElement("div", {
16
+ }, label), /*#__PURE__*/React.createElement("div", {
16
17
  className: "info-box--value"
17
18
  }, info.value));
18
19
  }).filter(Boolean));
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBox.js","names":["PropTypes","React","InfoBox","items","infoBoxKey","infoBoxItems","map","item","Object","values","info","label","value","createElement","className","key","toLowerCase","filter","Boolean","propTypes","string","isRequired","array"],"sources":["../../../../src/components/InfoBoxes/presentational/InfoBox.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst InfoBox = ({ items, infoBoxKey }) => {\n if (!items) return null;\n\n const infoBoxItems = items.map(item =>\n Object.values(item)\n .map(info => {\n if (!info.label || !info.value) return null;\n\n return (\n <div className=\"info-box--item\" key={`${infoBoxKey}-${info.label.toLowerCase()}`}>\n <div className=\"info-box--label\">{info.label}: </div>\n <div className=\"info-box--value\">{info.value}</div>\n </div>\n );\n })\n .filter(Boolean)\n );\n\n return (\n <div className=\"info-box\" key={infoBoxKey}>\n <div className=\"info-box--container\">{infoBoxItems}</div>\n </div>\n );\n};\n\nexport default InfoBox;\n\nInfoBox.propTypes = {\n infoBoxKey: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,OAAO,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAW,CAAC,KAAK;EACzC,IAAI,CAACD,KAAK,EAAE,OAAO,IAAI;EAEvB,MAAME,YAAY,GAAGF,KAAK,CAACG,GAAG,CAACC,IAAI,IACjCC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAChBD,GAAG,CAACI,IAAI,IAAI;IACX,IAAI,CAACA,IAAI,CAACC,KAAK,IAAI,CAACD,IAAI,CAACE,KAAK,EAAE,OAAO,IAAI;IAE3C,oBACEX,KAAA,CAAAY,aAAA;MAAKC,SAAS,EAAC,gBAAgB;MAACC,GAAG,EAAG,GAAEX,UAAW,IAAGM,IAAI,CAACC,KAAK,CAACK,WAAW,CAAC,CAAE;IAAE,gBAC/Ef,KAAA,CAAAY,aAAA;MAAKC,SAAS,EAAC;IAAiB,GAAEJ,IAAI,CAACC,KAAK,EAAC,IAAO,CAAC,eACrDV,KAAA,CAAAY,aAAA;MAAKC,SAAS,EAAC;IAAiB,GAAEJ,IAAI,CAACE,KAAW,CAC/C,CAAC;EAEV,CAAC,CAAC,CACDK,MAAM,CAACC,OAAO,CACnB,CAAC;EAED,oBACEjB,KAAA,CAAAY,aAAA;IAAKC,SAAS,EAAC,UAAU;IAACC,GAAG,EAAEX;EAAW,gBACxCH,KAAA,CAAAY,aAAA;IAAKC,SAAS,EAAC;EAAqB,GAAET,YAAkB,CACrD,CAAC;AAEV,CAAC;AAED,eAAeH,OAAO;AAEtBA,OAAO,CAACiB,SAAS,GAAG;EAClBf,UAAU,EAAEJ,SAAS,CAACoB,MAAM,CAACC,UAAU;EACvClB,KAAK,EAAEH,SAAS,CAACsB,KAAK,CAACD;AACzB,CAAC"}
1
+ {"version":3,"file":"InfoBox.js","names":["PropTypes","React","InfoBox","items","infoBoxKey","infoBoxItems","map","item","Object","values","info","label","value","showLabel","createElement","className","key","toLowerCase","filter","Boolean","propTypes","string","isRequired","array"],"sources":["../../../../src/components/InfoBoxes/presentational/InfoBox.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst InfoBox = ({ items, infoBoxKey }) => {\n if (!items) return null;\n\n const infoBoxItems = items.map(item =>\n Object.values(item)\n .map(info => {\n if (!info.label || !info.value) return null;\n const label = info.showLabel === false ? '' : `${info.label}: `;\n return (\n <div className=\"info-box--item\" key={`${infoBoxKey}-${info.label.toLowerCase()}`}>\n <div className=\"info-box--label\">{label}</div>\n <div className=\"info-box--value\">{info.value}</div>\n </div>\n );\n })\n .filter(Boolean)\n );\n\n return (\n <div className=\"info-box\" key={infoBoxKey}>\n <div className=\"info-box--container\">{infoBoxItems}</div>\n </div>\n );\n};\n\nexport default InfoBox;\n\nInfoBox.propTypes = {\n infoBoxKey: PropTypes.string.isRequired,\n items: PropTypes.array.isRequired\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,OAAO,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAW,CAAC,KAAK;EACzC,IAAI,CAACD,KAAK,EAAE,OAAO,IAAI;EAEvB,MAAME,YAAY,GAAGF,KAAK,CAACG,GAAG,CAACC,IAAI,IACjCC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAChBD,GAAG,CAACI,IAAI,IAAI;IACX,IAAI,CAACA,IAAI,CAACC,KAAK,IAAI,CAACD,IAAI,CAACE,KAAK,EAAE,OAAO,IAAI;IAC3C,MAAMD,KAAK,GAAGD,IAAI,CAACG,SAAS,KAAK,KAAK,GAAG,EAAE,GAAI,GAAEH,IAAI,CAACC,KAAM,IAAG;IAC/D,oBACEV,KAAA,CAAAa,aAAA;MAAKC,SAAS,EAAC,gBAAgB;MAACC,GAAG,EAAG,GAAEZ,UAAW,IAAGM,IAAI,CAACC,KAAK,CAACM,WAAW,CAAC,CAAE;IAAE,gBAC/EhB,KAAA,CAAAa,aAAA;MAAKC,SAAS,EAAC;IAAiB,GAAEJ,KAAW,CAAC,eAC9CV,KAAA,CAAAa,aAAA;MAAKC,SAAS,EAAC;IAAiB,GAAEL,IAAI,CAACE,KAAW,CAC/C,CAAC;EAEV,CAAC,CAAC,CACDM,MAAM,CAACC,OAAO,CACnB,CAAC;EAED,oBACElB,KAAA,CAAAa,aAAA;IAAKC,SAAS,EAAC,UAAU;IAACC,GAAG,EAAEZ;EAAW,gBACxCH,KAAA,CAAAa,aAAA;IAAKC,SAAS,EAAC;EAAqB,GAAEV,YAAkB,CACrD,CAAC;AAEV,CAAC;AAED,eAAeH,OAAO;AAEtBA,OAAO,CAACkB,SAAS,GAAG;EAClBhB,UAAU,EAAEJ,SAAS,CAACqB,MAAM,CAACC,UAAU;EACvCnB,KAAK,EAAEH,SAAS,CAACuB,KAAK,CAACD;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/plugin-data-ui",
3
- "version": "0.141.0-core-styles.5",
3
+ "version": "0.141.0-core-styles.6",
4
4
  "description": "Blaze plugin data ui",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -30,7 +30,7 @@
30
30
  "@blaze-cms/admin-ui-utils": "0.141.0-core-styles.3",
31
31
  "@blaze-cms/core-errors": "0.140.2-core-styles.1",
32
32
  "@blaze-cms/plugin-render-hooks-ui": "0.140.2-core-styles.1",
33
- "@blaze-cms/react-form-builder": "0.141.0-core-styles.3",
33
+ "@blaze-cms/react-form-builder": "0.141.0-core-styles.6",
34
34
  "@blaze-cms/react-page-builder": "0.141.0-core-styles.3",
35
35
  "@blaze-cms/setup-ui": "0.140.2-core-styles.1",
36
36
  "@blaze-cms/versioning-ui": "0.140.2-core-styles.1",
@@ -67,5 +67,5 @@
67
67
  "lib/*",
68
68
  "lib-es/*"
69
69
  ],
70
- "gitHead": "11cbeb7641fdfaef8f6a0d0f9ec7a03f701e2962"
70
+ "gitHead": "f2609d93cbf00031ea7bcce7b648bcaec847c877"
71
71
  }
@@ -17,6 +17,7 @@ export default function buildDynamicQuery({ id, schema, displayProperties }) {
17
17
  `${infoProperty} {
18
18
  label
19
19
  value
20
+ showLabel
20
21
  }`
21
22
  );
22
23
 
@@ -8,10 +8,10 @@ const InfoBox = ({ items, infoBoxKey }) => {
8
8
  Object.values(item)
9
9
  .map(info => {
10
10
  if (!info.label || !info.value) return null;
11
-
11
+ const label = info.showLabel === false ? '' : `${info.label}: `;
12
12
  return (
13
13
  <div className="info-box--item" key={`${infoBoxKey}-${info.label.toLowerCase()}`}>
14
- <div className="info-box--label">{info.label}: </div>
14
+ <div className="info-box--label">{label}</div>
15
15
  <div className="info-box--value">{info.value}</div>
16
16
  </div>
17
17
  );