Plugin Directory

Changeset 2353937


Ignore:
Timestamp:
08/06/2020 01:01:54 PM (6 years ago)
Author:
fbiberger
Message:

Adding version 1.0.1

Location:
fria-single-value-chart/trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • fria-single-value-chart/trunk/dist/blocks.build.js

    r2344819 r2353937  
    1 !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports=React},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(0),o=n.n(r),a=n(11),l=n(12),c=n(13),i=n(14),u=(n.n(i),{thin:{component:l.a,label:Object(i.__)("Thin"),key:"thin"},simple:{component:a.a,label:Object(i.__)("Simple"),key:"simple"},trendline:{component:c.a,label:Object(i.__)("Trendline"),key:"trendline"}}),s=function(e){var t=e.type,n=void 0===t?"simple":t,r=e.rotation,a=e.color;return o.a.createElement(u[n].component,{rotation:r,color:a})};t.b=s},function(e,t){e.exports=wp.components},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var r="#333333",o=function(e){return 7===e.length?[e[1]+e[2],e[3]+e[4],e[5]+e[6]].reduce(function(e,t){return e+parseInt(t,16)},0)>396?r:"#eeeeee":r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(5)},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(6),a=(n.n(o),n(7)),l=(n.n(a),n(8)),c=n(15),i=n(16),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},__=wp.i18n.__,s=wp.editor.withColors;(0,wp.blocks.registerBlockType)("fria/indicator",{title:__("FRI\u2027A Indicator"),icon:"arrow-up-alt",category:"common",keywords:[__("FRI\u2027A Indicator"),__("Metric"),__("KPI")],attributes:{config:{type:"object"},backgroundColor:{type:"string",default:"inherit"}},edit:s("backgroundColor")(function(e){var t=e.className,n=e.attributes,o=e.setAttributes,a=e.backgroundColor,c=e.setBackgroundColor,s=function(e){return function(t){o({config:Object.assign({},n.config,r({},e,t))})}};return wp.element.createElement("div",{className:t},wp.element.createElement(l.a,u({onChange:s},n.config,{background:a.color})),wp.element.createElement(i.a,{backgroundColor:a,setBackgroundColor:c,config:n.config,onChange:s}))}),save:function(e){var t=e.attributes,n=e.className;return wp.element.createElement("div",{className:n},wp.element.createElement(c.a,t.config))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";n(9);throw new Error('Cannot find module "./EditableParagraph"')},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(10)),a=n(1),l=function(e){var t=e.rotation,n=void 0===t?0:t,r=e.onChange,l=e.color,c=e.arrowType,i=function(){r((n+45)%360)};return wp.element.createElement("div",null,wp.element.createElement(a.b,{type:c,rotation:n,color:l}),wp.element.createElement(o.a,{onClick:i,color:l}))};t.a=l},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),function(e){var t=e.onClick,n=e.color,r=void 0===n?"#ffffff":n;return wp.element.createElement("button",{onClick:t,style:{color:r},className:"rotateIndicatorArrow"},wp.element.createElement("span",{className:"dashicons dashicons-image-rotate"}))});t.a=o},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(2)),a=(n.n(o),function(e){var t=e.color,n=e.rotation;return wp.element.createElement(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement(o.G,{"data-name":"Layer 2"},wp.element.createElement(o.Path,{fill:t,transform:"rotate("+(n+45)+" 12 12)",d:"M18 7.05a1 1 0 0 0-1-1L9 6a1 1 0 0 0 0 2h5.56l-8.27 8.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0L16 9.42V15a1 1 0 0 0 1 1 1 1 0 0 0 1-1z"})))});t.a=a},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(2)),a=(n.n(o),function(e){var t=e.color,n=e.rotation;return wp.element.createElement(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},wp.element.createElement(o.G,{"data-name":"Layer 2"},wp.element.createElement(o.Path,{fill:t,transform:"rotate("+n+" 10 10)",d:"M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0 l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109 c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483 c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788 S1.293,9.212,1.729,9.212z"})))});t.a=a},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(2)),a=(n.n(o),function(e){var t=e.color,n=e.rotation;return wp.element.createElement(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement(o.G,{"data-name":"Layer 2"},wp.element.createElement(o.Path,{fill:t,transform:"rotate("+(n+45)+" 12 12)",d:"M21 7a.78.78 0 0 0 0-.21.64.64 0 0 0-.05-.17 1.1 1.1 0 0 0-.09-.14.75.75 0 0 0-.14-.17l-.12-.07a.69.69 0 0 0-.19-.1h-.2A.7.7 0 0 0 20 6h-5a1 1 0 0 0 0 2h2.83l-4 4.71-4.32-2.57a1 1 0 0 0-1.28.22l-5 6a1 1 0 0 0 .13 1.41A1 1 0 0 0 4 18a1 1 0 0 0 .77-.36l4.45-5.34 4.27 2.56a1 1 0 0 0 1.27-.21L19 9.7V12a1 1 0 0 0 2 0V7z"})))});t.a=a},function(e,t){e.exports=wp.i18n},function(e,t,n){"use strict";var r=n(1),o=n(3),a=function(e){var t=e.title,n=e.subtitle,a=e.rotation,l=e.backgroundColor,c=void 0===l?"#000000":l,i=e.borderRadius,u=e.font,s=e.arrowType,m=Object(o.b)(c),p={backgroundColor:c,borderRadius:i,maxHeight:"6em",color:m};return wp.element.createElement("div",{className:"indicator",style:p},wp.element.createElement("div",{className:"left"},wp.element.createElement("div",{className:"metric",style:{fontFamily:u}}," ",t," "),wp.element.createElement("div",{className:"subtitle",style:{fontFamily:u}},n)),wp.element.createElement("div",{className:"right"},wp.element.createElement(r.b,{type:s,rotation:a,color:m})))};t.a=a},function(e,t,n){"use strict";var r=n(1),o=wp.blockEditor,a=o.InspectorControls,l=o.PanelColorSettings,c=wp.components,i=c.TextControl,u=c.PanelBody,s=c.SelectControl,__=wp.i18n.__,m=function(e){var t=e.backgroundColor,n=e.setBackgroundColor,o=e.onChange,c=e.config;return wp.element.createElement(a,null,wp.element.createElement(u,{title:__("Configure FRI\u2027A Indicator")},wp.element.createElement(l,{title:__("Color Settings"),colorSettings:[{value:t.color,onChange:function(e){o("backgroundColor")(e),n(e)},label:__("Background Color")}]}),wp.element.createElement("h4",null," ",__("Font Settings")," "),wp.element.createElement(i,{value:c?c.font:"inherit",label:__("Set font (default is inherit)"),onChange:o("font")}),wp.element.createElement("h4",null," ",__("Arrow Type")),wp.element.createElement(s,{label:__("Select Arrow Type"),value:c?c.arrowType:"simple",options:Object.values(r.a).map(function(e){return{label:e.label,value:e.key}}),onChange:o("arrowType")})))};t.a=m}]);
     1!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports=React},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(0),o=n.n(r),a=n(11),l=n(12),c=n(13),i=n(14),u=(n.n(i),{thin:{component:l.a,label:Object(i.__)("Thin"),key:"thin"},simple:{component:a.a,label:Object(i.__)("Simple"),key:"simple"},trendline:{component:c.a,label:Object(i.__)("Trendline"),key:"trendline"}}),s=function(e){var t=e.type,n=void 0===t?"simple":t,r=e.rotation,a=e.color;return o.a.createElement(u[n].component,{rotation:r,color:a})};t.b=s},function(e,t){e.exports=wp.components},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var r="#333333",o=function(e){return 7===e.length?[e[1]+e[2],e[3]+e[4],e[5]+e[6]].reduce(function(e,t){return e+parseInt(t,16)},0)>396?r:"#eeeeee":r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(5)},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(6),a=(n.n(o),n(7)),l=(n.n(a),n(8)),c=n(15),i=n(16),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},__=wp.i18n.__,s=wp.editor.withColors;(0,wp.blocks.registerBlockType)("fria/single-value-chart",{title:__("FRI\u2027A Single Value Chart"),icon:"arrow-up-alt",category:"common",keywords:[__("FRI\u2027A Single Value Chart"),__("Metric"),__("KPI"),__("Chart"),__("Single Value")],attributes:{config:{type:"object"},backgroundColor:{type:"string",default:"inherit"}},edit:s("backgroundColor")(function(e){var t=e.className,n=e.attributes,o=e.setAttributes,a=e.backgroundColor,c=e.setBackgroundColor,s=function(e){return function(t){o({config:Object.assign({},n.config,r({},e,t))})}};return wp.element.createElement("div",{className:t},wp.element.createElement(l.a,u({onChange:s},n.config,{background:a.color})),wp.element.createElement(i.a,{backgroundColor:a,setBackgroundColor:c,config:n.config,onChange:s}))}),save:function(e){var t=e.attributes,n=e.className;return wp.element.createElement("div",{className:n},wp.element.createElement(c.a,t.config))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";n(9);throw new Error('Cannot find module "./EditableParagraph"')},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(10)),a=n(1),l=function(e){var t=e.rotation,n=void 0===t?0:t,l=e.onChange,c=e.color,i=e.arrowType,u=function(){l((n+45)%360)};return wp.element.createElement(r.Fragment,null,wp.element.createElement(a.b,{type:i,rotation:n,color:c}),wp.element.createElement(o.a,{onClick:u,color:c}))};t.a=l},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),function(e){var t=e.onClick,n=e.color,r=void 0===n?"#ffffff":n;return wp.element.createElement("button",{onClick:t,style:{color:r},className:"rotateIndicatorArrow"},wp.element.createElement("span",{className:"dashicons dashicons-image-rotate"}))});t.a=o},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(2)),a=(n.n(o),function(e){var t=e.color,n=e.rotation;return wp.element.createElement(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement(o.G,{"data-name":"Layer 2"},wp.element.createElement(o.Path,{fill:t,transform:"rotate("+(n+45)+" 12 12)",d:"M18 7.05a1 1 0 0 0-1-1L9 6a1 1 0 0 0 0 2h5.56l-8.27 8.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0L16 9.42V15a1 1 0 0 0 1 1 1 1 0 0 0 1-1z"})))});t.a=a},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(2)),a=(n.n(o),function(e){var t=e.color,n=e.rotation;return wp.element.createElement(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},wp.element.createElement(o.G,{"data-name":"Layer 2"},wp.element.createElement(o.Path,{fill:t,transform:"rotate("+n+" 10 10)",d:"M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0 l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109 c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483 c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788 S1.293,9.212,1.729,9.212z"})))});t.a=a},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(2)),a=(n.n(o),function(e){var t=e.color,n=e.rotation;return wp.element.createElement(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement(o.G,{"data-name":"Layer 2"},wp.element.createElement(o.Path,{fill:t,transform:"rotate("+(n+45)+" 12 12)",d:"M21 7a.78.78 0 0 0 0-.21.64.64 0 0 0-.05-.17 1.1 1.1 0 0 0-.09-.14.75.75 0 0 0-.14-.17l-.12-.07a.69.69 0 0 0-.19-.1h-.2A.7.7 0 0 0 20 6h-5a1 1 0 0 0 0 2h2.83l-4 4.71-4.32-2.57a1 1 0 0 0-1.28.22l-5 6a1 1 0 0 0 .13 1.41A1 1 0 0 0 4 18a1 1 0 0 0 .77-.36l4.45-5.34 4.27 2.56a1 1 0 0 0 1.27-.21L19 9.7V12a1 1 0 0 0 2 0V7z"})))});t.a=a},function(e,t){e.exports=wp.i18n},function(e,t,n){"use strict";var r=n(1),o=n(3),a=function(e){var t=e.title,n=e.subtitle,a=e.rotation,l=e.backgroundColor,c=void 0===l?"#000000":l,i=e.borderRadius,u=e.font,s=e.arrowType,m=Object(o.b)(c),p={backgroundColor:c,borderRadius:i,maxHeight:"6em",color:m};return wp.element.createElement("div",{className:"indicator",style:p},wp.element.createElement("div",{className:"left"},wp.element.createElement("div",{className:"metric",style:{fontFamily:u}}," ",t," "),wp.element.createElement("div",{className:"subtitle",style:{fontFamily:u}},n)),wp.element.createElement("div",{className:"right"},wp.element.createElement(r.b,{type:s,rotation:a,color:m})))};t.a=a},function(e,t,n){"use strict";var r=n(1),o=wp.blockEditor,a=o.InspectorControls,l=o.PanelColorSettings,c=wp.components,i=c.TextControl,u=c.PanelBody,s=c.SelectControl,__=wp.i18n.__,m=function(e){var t=e.backgroundColor,n=e.setBackgroundColor,o=e.onChange,c=e.config;return wp.element.createElement(a,null,wp.element.createElement(u,{title:__("Configure FRI\u2027A Indicator")},wp.element.createElement(l,{title:__("Color Settings"),colorSettings:[{value:t.color,onChange:function(e){o("backgroundColor")(e),n(e)},label:__("Background Color")}]}),wp.element.createElement("h4",null," ",__("Font Settings")," "),wp.element.createElement(i,{value:c?c.font:"inherit",label:__("Set font (default is inherit)"),onChange:o("font")}),wp.element.createElement("h4",null," ",__("Arrow Type")),wp.element.createElement(s,{label:__("Select Arrow Type"),value:c?c.arrowType:"simple",options:Object.values(r.a).map(function(e){return{label:e.label,value:e.key}}),onChange:o("arrowType")})))};t.a=m}]);
  • fria-single-value-chart/trunk/dist/blocks.editor.build.css

    r2344819 r2353937  
    1 .wp-block-cgb-block-wp-fria-metrics-indicator{color:#292929;margin:0 auto;max-width:740px;padding:2rem}
     1.wp-block-fria-single-value-chart{color:#292929;margin:0 auto;max-width:740px;padding:2rem}
  • fria-single-value-chart/trunk/dist/blocks.style.build.css

    r2344819 r2353937  
    1 .wp-block-fria-indicator .indicator{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border-radius:10px;background-color:teal;-webkit-box-shadow:1px 1px 3px 0px rgba(0,0,0,0.6);box-shadow:1px 1px 3px 0px rgba(0,0,0,0.6);max-width:400px}.wp-block-fria-indicator .indicator div.left{min-width:70%;max-width:70%;min-height:90px;padding-left:1em}.wp-block-fria-indicator .indicator div.left input[type=text]{display:-ms-flexbox;display:flex;min-height:1.8em;word-wrap:break-word;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;overflow:hidden;background-color:transparent;border-color:transparent;width:100%}.wp-block-fria-indicator .indicator div.left input[type=text].dark::-webkit-input-placeholder{color:#000}.wp-block-fria-indicator .indicator div.left input[type=text].dark::-moz-placeholder{color:#000}.wp-block-fria-indicator .indicator div.left input[type=text].dark::-ms-input-placeholder{color:#000}.wp-block-fria-indicator .indicator div.left input[type=text].dark::placeholder{color:#000}.wp-block-fria-indicator .indicator div.left input[type=text].light::-webkit-input-placeholder{color:#fff}.wp-block-fria-indicator .indicator div.left input[type=text].light::-moz-placeholder{color:#fff}.wp-block-fria-indicator .indicator div.left input[type=text].light::-ms-input-placeholder{color:#fff}.wp-block-fria-indicator .indicator div.left input[type=text].light::placeholder{color:#fff}.wp-block-fria-indicator .indicator div.left .metric{font-size:36px;font-weight:700;line-height:36px;margin-top:10px}.wp-block-fria-indicator .indicator div.left .subtitle{margin-bottom:5px}.wp-block-fria-indicator .indicator div.right{max-width:30%;padding-right:1em}.wp-block-fria-indicator .indicator div.right svg{max-height:100%}.rotateIndicatorArrow{position:absolute;bottom:5px;right:5px;background:transparent;border:none;cursor:pointer;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);color:#fff}
     1.wp-block-fria-single-value-chart .indicator{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;border-radius:10px;background-color:teal;-webkit-box-shadow:1px 1px 3px 0px rgba(0,0,0,0.6);box-shadow:1px 1px 3px 0px rgba(0,0,0,0.6);max-width:400px}.wp-block-fria-single-value-chart .indicator div.left{min-width:70%;max-width:70%;min-height:90px;padding-left:1em}.wp-block-fria-single-value-chart .indicator div.left input[type=text]{display:-ms-flexbox;display:flex;min-height:1.8em;word-wrap:break-word;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;overflow:hidden;background-color:transparent;border-color:transparent;width:100%}.wp-block-fria-single-value-chart .indicator div.left input[type=text].dark::-webkit-input-placeholder{color:#000}.wp-block-fria-single-value-chart .indicator div.left input[type=text].dark::-moz-placeholder{color:#000}.wp-block-fria-single-value-chart .indicator div.left input[type=text].dark::-ms-input-placeholder{color:#000}.wp-block-fria-single-value-chart .indicator div.left input[type=text].dark::placeholder{color:#000}.wp-block-fria-single-value-chart .indicator div.left input[type=text].light::-webkit-input-placeholder{color:#fff}.wp-block-fria-single-value-chart .indicator div.left input[type=text].light::-moz-placeholder{color:#fff}.wp-block-fria-single-value-chart .indicator div.left input[type=text].light::-ms-input-placeholder{color:#fff}.wp-block-fria-single-value-chart .indicator div.left input[type=text].light::placeholder{color:#fff}.wp-block-fria-single-value-chart .indicator div.left .metric{font-size:36px;font-weight:700;line-height:36px;margin-top:10px}.wp-block-fria-single-value-chart .indicator div.left .subtitle{margin-bottom:5px}.wp-block-fria-single-value-chart .indicator div.right{max-width:30%;padding-right:1em;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.wp-block-fria-single-value-chart .indicator div.right svg{-ms-flex-positive:5;flex-grow:5}.wp-block-fria-single-value-chart .indicator div.right .rotateIndicatorArrow{-ms-flex-positive:1;flex-grow:1;background:transparent;border:none;cursor:pointer;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);margin:0 auto;justify-self:flex-end;color:#fff}
  • fria-single-value-chart/trunk/package-lock.json

    r2344819 r2353937  
    11{
    2   "name": "wp-fria-metrics-indicator-cgb-guten-block",
     2  "name": "wp-fria-single-value-chart",
    33  "version": "1.0.0",
    44  "lockfileVersion": 1,
  • fria-single-value-chart/trunk/package.json

    r2344819 r2353937  
    11{
    2   "name": "wp-fria-metrics-indicator-cgb-guten-block",
     2  "name": "wp-fria-single-value-chart",
    33  "version": "1.0.0",
    44  "private": true,
  • fria-single-value-chart/trunk/plugin.php

    r2345372 r2353937  
    66 * Author: Fabian Biberger
    77 * Author URI: https://fbiberger.de/
    8  * Version: 1.0.0.4
     8 * Version: 1.0.1
    99 * License: GPL2+
    1010 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
  • fria-single-value-chart/trunk/readme.md

    r2344819 r2353937  
    11## What does this plugin do?
    2 This plugin is a Gutenberg-Block that displays a basic indicator for a KPI or metric. It is very basic and has the following features at the moment:
     2This plugin is a Gutenberg-Block that displays a basic single value chart for a KPI or metric. It is very basic and has the following features at the moment:
    33- Change Metric and Subtitle
    4 - Change rotation for the Arrow Indicator
     4- Change rotation for the Arrow
    55- Change background color (foreground color is adjusted automatically)
    6 - Change font for the indicator
     6- Change font for the chart
    77- Select one of three different arrow types
    88
     
    1515- Adjust font sizes
    1616- Adjust sizing
    17 - Choose your own arrow indicators
     17- Add your own arrow-images
    1818- Adjust background shadow
    1919- Adjust foreground colors
     
    2727### Development
    2828- Clone this repository into the plugin folder of your wordpress installation
    29 - `cd {your-installation-path}/wp-content/plugins/fria-indicator`
     29- `cd {your-installation-path}/wp-content/plugins/fria-single-value-chart`
    3030- `npm install`
    3131
  • fria-single-value-chart/trunk/readme.txt

    r2344819 r2353937  
    33Tags: charts, gutenberg, block, single value, arrow
    44Requires at least: 5.3
    5 Tested up to: 5.4
     5Tested up to: 5.5
    66Requires PHP: 7.3
    77License: GPL2+
     
    1818
    1919== Installation ==
    20 1. Visit \"Plugins > Add New\"
    21 2. Search for \"FRIA Single Value Chart\"
    22 3. Install \"FRIA Single Value Chart\" once it appears
    23 4. Activate \"FRIA Single Value Chart\" from your Plugins page.
     201. Visit "Plugins > Add New"
     212. Search for "FRIA Single Value Chart"
     223. Install "FRIA Single Value Chart" once it appears
     234. Activate "FRIA Single Value Chart" from your Plugins page.
    2424
    2525=Manually=
    26261. Upload the fria-single-value-chart folder to the /wp-content/plugins/ directory
    27 2. Activate \"FRIA Single Value Chart\" from your Plugins page.
     272. Activate "FRIA Single Value Chart" from your Plugins page.
    2828
    2929=After activation=
     
    3939
    4040== Changelog ==
     41=Version 1.0.1=
     42* Renamed the blocks - sorry for that, but the directory did not show them correctly
     43* Fixed the case where the rotation UI was not shown and repositioned it
     44
    4145=Version 1.0=
    4246* Change arrowType and orientation orientation
  • fria-single-value-chart/trunk/src/block/block.js

    r2344819 r2353937  
    11/**
    2  * BLOCK: wp-fria-metrics-indicator
     2 * BLOCK: wp-fria-single-value-chart
    33 *
    44 * Registering a basic block with Gutenberg.
     
    1616const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
    1717
    18 registerBlockType( 'fria/indicator', {
    19     title: __( 'FRI‧A Indicator' ),
     18registerBlockType( 'fria/single-value-chart', {
     19    title: __( 'FRI‧A Single Value Chart' ),
    2020    icon: 'arrow-up-alt',
    2121    category: 'common',
    2222    keywords: [
    23         __( 'FRI‧A Indicator' ),
     23        __( 'FRI‧A Single Value Chart' ),
    2424        __( 'Metric' ),
    2525        __( 'KPI' ),
     26        __( 'Chart' ),
     27        __( 'Single Value' ),
    2628    ],
    2729    attributes: {
  • fria-single-value-chart/trunk/src/block/editor.scss

    r2344819 r2353937  
    66 */
    77
    8 .wp-block-cgb-block-wp-fria-metrics-indicator  {
     8.wp-block-fria-single-value-chart  {
    99  color: $black;
    1010  margin: 0 auto;
  • fria-single-value-chart/trunk/src/block/style.scss

    r2344819 r2353937  
    55 */
    66
    7 .wp-block-fria-indicator  {
     7.wp-block-fria-single-value-chart  {
    88
    99  .indicator {
     
    5656      max-width: 30%;
    5757      padding-right: 1em;
     58      display: flex;
     59      flex-direction: column;
     60
    5861      svg {
    59         max-height: 100%;
     62        flex-grow: 5;
     63      }
     64
     65      .rotateIndicatorArrow {
     66        flex-grow: 1;
     67        background: transparent;
     68        border: none;
     69        cursor: pointer;
     70        transform: rotateY(180deg);
     71        margin: 0 auto;
     72        justify-self: flex-end;
     73       
     74        color: #fff;
    6075      }
    6176    }
    6277  }
    6378}
    64 
    65 .rotateIndicatorArrow {
    66   position: absolute;
    67   bottom: 5px;
    68   right: 5px;
    69   background: transparent;
    70   border: none;
    71   cursor: pointer;
    72   transform: rotateY(180deg);
    73  
    74   color: #fff;
    75 }
  • fria-single-value-chart/trunk/src/components/EditableIndicatorArrow.js

    r2344819 r2353937  
    1 import React from 'react';
     1import React, { Fragment } from 'react';
    22import RotatableIndicatorArrow from './RotatableIndicatorArrow';
    33import Arrow from './arrows/genericArrow';
     
    1010
    1111    return (
    12         <div>
     12        <Fragment>
    1313            <Arrow type={ arrowType } rotation={ rotation } color={ color } />
    1414            <RotatableIndicatorArrow onClick={ handleClick } color={ color } />
    15         </div>
     15        </Fragment>
    1616    );
    1717};
  • fria-single-value-chart/trunk/src/components/RenderIndicator.js

    r2344819 r2353937  
    1818            <Arrow type={ arrowType } rotation={ rotation } color={ color } />
    1919        </div>
    20     </div>;
     20    </div>; 
    2121};
    2222
  • fria-single-value-chart/trunk/src/init.php

    r2344819 r2353937  
    7878     */
    7979    register_block_type(
    80         'cgb/block-wp-fria-metrics-indicator',
     80        'fria/single-value-chart',
    8181        array(
    8282            // Enqueue blocks.style.build.css on both frontend & backend.
     
    8888        )
    8989    );
    90 
    91     // register_post_meta('post', 'wp-fria-indicator-config', array(
    92     //  'show_in_rest' => array(
    93     //      'schema' => array(
    94     //          'type'       => 'object',
    95     //          'properties' => array(
    96     //              'title' => array(
    97     //                  'type' => 'string',
    98     //              ),
    99     //              'subtitle'  => array(
    100     //                  'type' => 'string',
    101     //              ),
    102     //              'indicator'  => array(
    103     //                  'type' => 'string',
    104     //              ),
    105     //              'background'  => array(
    106     //                  'type' => 'string',
    107     //              ),
    108     //              'borderRadius'  => array(
    109     //                  'type' => 'string',
    110     //              ),
    111     //          ),
    112     //      )
    113     //  ),
    114     //  'single' => true,
    115     //  'type' => 'object'
    116     // ));
    11790}
    11891
  • fria-single-value-chart/trunk/tests/editableIndicatorArrow.test.js

    r2344819 r2353937  
    1111
    1212    const tree = renderedComponent.toJSON();
    13     tree.children.filter( child => ( child.type === 'button' ) )[ 0 ].props.onClick();
     13    tree.filter( child => ( child.type === 'button' ) )[ 0 ].props.onClick();
    1414
    1515    expect( mockHandleClick ).toHaveBeenCalledWith( 45 );
Note: See TracChangeset for help on using the changeset viewer.