Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

secullum-react-ui

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secullum-react-ui - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

dist/674f50d287a8c48dc19ba404d20fe713.eot

6

dist/bundle.js

@@ -1,6 +0,6 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.SecullumReactUI=t(require("react")):e.SecullumReactUI=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,a){n.apply(this,[e,t,a].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=t.Spinner=t.Button=t.DropDownList=t.TextBox=t.Table=t.FormRow=t.Form=t.Panel=void 0;var a=r(8);Object.defineProperty(t,"Panel",{enumerable:!0,get:function(){return n(a)["default"]}});var o=r(7);Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return n(o)["default"]}});var l=r(6);Object.defineProperty(t,"FormRow",{enumerable:!0,get:function(){return n(l)["default"]}});var s=r(10);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return n(s)["default"]}});var u=r(11);Object.defineProperty(t,"TextBox",{enumerable:!0,get:function(){return n(u)["default"]}});var i=r(5);Object.defineProperty(t,"DropDownList",{enumerable:!0,get:function(){return n(i)["default"]}});var c=r(4);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n(c)["default"]}});var p=r(9);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return n(p)["default"]}});var d=r(3);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return n(d)["default"]}}),r(12),r(21)},function(t,r){t.exports=e},function(e,t,r){var n,a;/*!
Copyright (c) 2016 Jed Watson.
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.SecullumReactUI=t(require("react")):e.SecullumReactUI=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Overlay=t.Spinner=t.Button=t.DropDownList=t.TextBox=t.List=t.Table=t.FormRow=t.Form=t.Panel=void 0;var o=r(9);Object.defineProperty(t,"Panel",{enumerable:!0,get:function(){return n(o).default}});var a=r(7);Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return n(a).default}});var s=r(6);Object.defineProperty(t,"FormRow",{enumerable:!0,get:function(){return n(s).default}});var l=r(11);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return n(l).default}});var u=r(8);Object.defineProperty(t,"List",{enumerable:!0,get:function(){return n(u).default}});var i=r(12);Object.defineProperty(t,"TextBox",{enumerable:!0,get:function(){return n(i).default}});var c=r(5);Object.defineProperty(t,"DropDownList",{enumerable:!0,get:function(){return n(c).default}});var p=r(4);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n(p).default}});var f=r(10);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return n(f).default}});var d=r(3);Object.defineProperty(t,"Overlay",{enumerable:!0,get:function(){return n(d).default}}),r(13),r(23)},function(t,r){t.exports=e},function(e,t,r){var n,o;/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n))e.push(r.apply(null,n));else if("object"===a)for(var l in n)o.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(n=[],a=function(){return r}.apply(t,n),!(void 0!==a&&(e.exports=a)))}()},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(2),s=n(l);r(16);var u=function(e){var t=e.className,r=e.style,n=e.children;return o["default"].createElement("div",{className:(0,s["default"])(t,"sec-ui-overlay"),style:r},n)};u.propTypes={className:a.PropTypes.string,style:a.PropTypes.object,children:a.PropTypes.any},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(2),s=n(l);r(13);var u=function(e){var t=e.id,r=e.children,n=e.type,a=e.title,l=e.form,u=e.className,i=e.style,c=e.disabled,p=e.primary,d=e.buttonRef,f=e.onClick;return o["default"].createElement("button",{id:t,type:n,title:a,form:l,className:(0,s["default"])(u,"sec-ui-button",{"sec-ui-button-disabled":c},{"sec-ui-button-primary":p}),style:i,disabled:c,ref:d,onClick:f},r)};u.defaultProps={type:"button",disabled:!1,primary:!1},u.propTypes={id:a.PropTypes.string,children:a.PropTypes.any,type:a.PropTypes.string.isRequired,title:a.PropTypes.string,form:a.PropTypes.string,className:a.PropTypes.string,style:a.PropTypes.object,disabled:a.PropTypes.bool.isRequired,primary:a.PropTypes.bool.isRequired,buttonRef:a.PropTypes.func,onClick:a.PropTypes.func},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(2),s=n(l);r(14);var u=function(e){var t=e.id,r=e.name,n=e.value,a=e.defaultValue,l=e.options,u=e.textKey,i=e.valueKey,c=e.className,p=e.style,d=e.error,f=e.onChange;return o["default"].createElement("select",{id:t,name:r,value:n,defaultValue:a,className:(0,s["default"])(c,"sec-ui-drop-down-list",{"sec-ui-drop-down-list-error":d}),style:p,onChange:f},l.map(function(e){return o["default"].createElement("option",{key:e[i],value:e[i]},e[u])}))};u.defaultProps={error:!1},u.propTypes={id:a.PropTypes.string,name:a.PropTypes.string,value:a.PropTypes.string,defaultValue:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number]),options:a.PropTypes.array.isRequired,textKey:a.PropTypes.string.isRequired,valueKey:a.PropTypes.string.isRequired,className:a.PropTypes.string,style:a.PropTypes.object,error:a.PropTypes.bool.isRequired,onChange:a.PropTypes.func},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(2),s=n(l);r(15);var u=function(e){var t=e.label,r=e.renderLabel,n=e.className,a=e.style,l=e.labelClassName,u=e.labelStyle,i=e.fieldClassName,c=e.fieldStyle,p=e.required,d=e.errorMessage,f=e.children;return o["default"].createElement("div",{className:(0,s["default"])(n,"sec-ui-form-row"),style:a},o["default"].createElement("div",{className:(0,s["default"])(l,"sec-ui-form-row-label"),style:u},r?r():o["default"].createElement("label",null,t)),o["default"].createElement("div",{className:(0,s["default"])(i,"sec-ui-form-row-field"),style:c},p&&o["default"].createElement("span",{className:"sec-ui-form-row-field-required"},"*"),f,d&&o["default"].createElement("span",{className:"sec-ui-form-row-error-message"},d)))};u.defaultProps={required:!1},u.propTypes={label:a.PropTypes.string,renderLabel:a.PropTypes.func,className:a.PropTypes.string,style:a.PropTypes.object,labelClassName:a.PropTypes.string,labelStyle:a.PropTypes.object,fieldClassName:a.PropTypes.string,fieldStyle:a.PropTypes.object,required:a.PropTypes.bool.isRequired,errorMessage:a.PropTypes.string,children:a.PropTypes.any},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(22),s=n(l),u=function(e){var t=e.id,r=e.className,n=e.style,a=e.formRef,l=e.children,u=e.onSubmit;return o["default"].createElement("form",{id:t,className:r,style:n,ref:a,onSubmit:function(e){e.preventDefault();var t=(0,s["default"])(e.target,{hash:!0,empty:!0});u(t)}},l)};u.propTypes={id:a.PropTypes.string,className:a.PropTypes.string,style:a.PropTypes.object,formRef:a.PropTypes.func,children:a.PropTypes.any,onSubmit:a.PropTypes.func},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(2),s=n(l);r(17);var u=function(e){var t=e.title,r=e.icon,n=e.iconImageSrc,a=e.className,l=e.style,u=e.renderButtons,i=e.children,c="sec-ui-panel-header-icon fa fa-"+r;return o["default"].createElement("div",{className:(0,s["default"])(a,"sec-ui-panel"),style:l},o["default"].createElement("div",{className:"sec-ui-panel-header"},r?o["default"].createElement("i",{className:c}):o["default"].createElement("img",{src:n,alt:"",className:"sec-ui-panel-header-icon"}),o["default"].createElement("h2",{className:"sec-ui-panel-header-title"},t)),o["default"].createElement("div",{className:"sec-ui-panel-body"},i),u&&o["default"].createElement("div",{className:"sec-ui-panel-footer"},u()))};u.propTypes={title:a.PropTypes.string.isRequired,icon:a.PropTypes.string,iconImageSrc:a.PropTypes.string,className:a.PropTypes.string,style:a.PropTypes.object,renderButtons:a.PropTypes.func,children:a.PropTypes.any},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(3),s=n(l);r(18);var u=function(){return o["default"].createElement(s["default"],null,o["default"].createElement("div",{className:"sec-ui-spinner-container"},o["default"].createElement("i",{className:"fa fa-spinner fa-spin sec-ui-spinner"})))};t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),c=n(i),p=r(2),d=n(p);r(19);var f=function(e){function t(){var e,r,n,s;o(this,t);for(var u=arguments.length,i=Array(u),c=0;c<u;c++)i[c]=arguments[c];return r=n=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={shouldRenderLastRowBorder:!1},n.checkRenderLastRowBorder=function(){var e=n.container.getBoundingClientRect(),t=n.table.getBoundingClientRect(),r=2;n.state.shouldRenderLastRowBorder&&r++;var a=e.height-r>t.height;n.state.shouldRenderLastRowBorder!==a&&n.setState({shouldRenderLastRowBorder:a})},n.handleSelectAllChange=function(e){var t=n.props,r=t.data,a=t.idAttribute,o=t.onSelectionChange,l=e.target.checked?r.map(function(e){return e[a]}):[];o(l)},n.handleSelectChange=function(e,t){var r=n.props,o=r.selection,l=r.idAttribute,s=r.onSelectionChange,u=e.target.checked?[].concat(a(o),[t[l]]):o.filter(function(e){return e!==t[l]});s(u)},s=r,l(n,s)}return s(t,e),u(t,[{key:"componentDidMount",value:function(){this.checkRenderLastRowBorder()}},{key:"componentDidUpdate",value:function(){this.checkRenderLastRowBorder()}},{key:"render",value:function(){var e=this,t=this.props,r=t.columns,n=t.data,a=t.idAttribute,o=t.selection,l=t.className,s=t.style,u=t.onRowClick;return c["default"].createElement("div",{className:(0,d["default"])(l,"sec-ui-table-container"),style:s,ref:function(t){return e.container=t}},c["default"].createElement("table",{className:(0,d["default"])("sec-ui-table",{"sec-ui-table-render-last-row-border":this.state.shouldRenderLastRowBorder}),ref:function(t){return e.table=t}},c["default"].createElement("thead",null,c["default"].createElement("tr",null,null!=o&&c["default"].createElement("th",{className:"sec-ui-table-selection-column"},c["default"].createElement("input",{type:"checkbox",onChange:this.handleSelectAllChange})),r.map(function(e){return c["default"].createElement("th",{key:e.key,style:{width:e.width}},e.title)}))),c["default"].createElement("tbody",null,n.map(function(t){return c["default"].createElement("tr",{key:t[a],className:(0,d["default"])({"sec-ui-table-row-clickable":null!=u}),onClick:null==u?void 0:function(){return u(t)}},null!=o&&c["default"].createElement("td",{className:"sec-ui-table-selection-column"},c["default"].createElement("input",{type:"checkbox",checked:o.some(function(e){return e===t[a]}),onChange:function(r){return e.handleSelectChange(r,t)}})),r.map(function(e){return c["default"].createElement("td",{key:e.key,style:{width:e.width}},t[e.key])}))}))))}}]),t}(i.Component);f.defaultProps={idAttribute:"id"},f.propTypes={columns:i.PropTypes.arrayOf(i.PropTypes.shape({key:i.PropTypes.string.isRequired,title:i.PropTypes.string.isRequired,width:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])})).isRequired,data:i.PropTypes.array.isRequired,idAttribute:i.PropTypes.string.isRequired,selection:i.PropTypes.array,className:i.PropTypes.string,style:i.PropTypes.object,onRowClick:i.PropTypes.func,onSelectionChange:i.PropTypes.func},t["default"]=f},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),o=n(a),l=r(2),s=n(l);r(20);var u=function(e){var t=e.id,r=e.name,n=e.value,a=e.defaultValue,l=e.type,u=e.className,i=e.style,c=e.maxLength,p=e.readOnly,d=e.error,f=e.inputRef,y=e.onChange,m=e.onBlur;return o["default"].createElement("input",{id:t,name:r,value:n,defaultValue:a,type:l,className:(0,s["default"])(u,"sec-ui-text-box",{"sec-ui-text-box-error":d},{"sec-ui-text-box-readonly":p}),style:i,maxLength:c,readOnly:p,ref:f,onChange:y,onBlur:m})};u.defaultProps={type:"text",error:!1,readOnly:!1},u.propTypes={id:a.PropTypes.string,name:a.PropTypes.string,value:a.PropTypes.string,defaultValue:a.PropTypes.string,type:a.PropTypes.string.isRequired,className:a.PropTypes.string,style:a.PropTypes.object,maxLength:a.PropTypes.number,readOnly:a.PropTypes.bool.isRequired,error:a.PropTypes.bool.isRequired,inputRef:a.PropTypes.func,onChange:a.PropTypes.func,onBlur:a.PropTypes.func},t["default"]=u},function(e,t){},12,12,12,12,12,12,12,12,12,function(e,t){function r(e,t){"object"!=typeof t?t={hash:!!t}:void 0===t.hash&&(t.hash=!0);for(var r=t.hash?{}:"",n=t.serializer||(t.hash?o:l),a=e&&e.elements?e.elements:[],i=Object.create(null),c=0;c<a.length;++c){var p=a[c];if((t.disabled||!p.disabled)&&p.name&&u.test(p.nodeName)&&!s.test(p.type)){var d=p.name,f=p.value;if("checkbox"!==p.type&&"radio"!==p.type||p.checked||(f=void 0),t.empty){if("checkbox"!==p.type||p.checked||(f=""),"radio"===p.type&&(i[p.name]||p.checked?p.checked&&(i[p.name]=!0):i[p.name]=!1),!f&&"radio"==p.type)continue}else if(!f)continue;if("select-multiple"!==p.type)r=n(r,d,f);else{f=[];for(var y=p.options,m=!1,b=0;b<y.length;++b){var h=y[b],v=t.empty&&!h.value,P=h.value||v;h.selected&&P&&(m=!0,r=t.hash&&"[]"!==d.slice(d.length-2)?n(r,d+"[]",h.value):n(r,d,h.value))}!m&&t.empty&&(r=n(r,d,""))}}}if(t.empty)for(var d in i)i[d]||(r=n(r,d,""));return r}function n(e){var t=[],r=/^([^\[\]]*)/,n=new RegExp(i),a=r.exec(e);for(a[1]&&t.push(a[1]);null!==(a=n.exec(e));)t.push(a[1]);return t}function a(e,t,r){if(0===t.length)return e=r;var n=t.shift(),o=n.match(/^\[(.+?)\]$/);if("[]"===n)return e=e||[],Array.isArray(e)?e.push(a(null,t,r)):(e._values=e._values||[],e._values.push(a(null,t,r))),e;if(o){var l=o[1],s=+l;isNaN(s)?(e=e||{},e[l]=a(e[l],t,r)):(e=e||[],e[s]=a(e[s],t,r))}else e[n]=a(e[n],t,r);return e}function o(e,t,r){var o=t.match(i);if(o){var l=n(t);a(e,l,r)}else{var s=e[t];s?(Array.isArray(s)||(e[t]=[s]),e[t].push(r)):e[t]=r}return e}function l(e,t,r){return r=r.replace(/(\r)?\n/g,"\r\n"),r=encodeURIComponent(r),r=r.replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+r}var s=/^(?:submit|button|image|reset|file)$/i,u=/^(?:input|select|textarea|keygen)/i,i=/(\[[^\[\]]*\])/g;e.exports=r}]))});
!function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var s=r.apply(null,n);s&&e.push(s)}else if("object"===o)for(var l in n)a.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?(r.default=r,e.exports=r):(n=[],o=function(){return r}.apply(t,n),!(void 0!==o&&(e.exports=o)))}()},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(2),l=n(s);r(18);var u=function(e){var t=e.className,r=e.style,n=e.children;return a.default.createElement("div",{className:(0,l.default)(t,"sec-ui-overlay"),style:r},n)};u.propTypes={className:o.PropTypes.string,style:o.PropTypes.object,children:o.PropTypes.any},t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(2),l=n(s);r(14);var u=function(e){var t=e.id,r=e.children,n=e.type,o=e.title,s=e.form,u=e.className,i=e.style,c=e.disabled,p=e.primary,f=e.buttonRef,d=e.onClick;return a.default.createElement("button",{id:t,type:n,title:o,form:s,className:(0,l.default)(u,"sec-ui-button",{"sec-ui-button-disabled":c},{"sec-ui-button-primary":p}),style:i,disabled:c,ref:f,onClick:d},r)};u.defaultProps={type:"button",disabled:!1,primary:!1},u.propTypes={id:o.PropTypes.string,children:o.PropTypes.any,type:o.PropTypes.string.isRequired,title:o.PropTypes.string,form:o.PropTypes.string,className:o.PropTypes.string,style:o.PropTypes.object,disabled:o.PropTypes.bool.isRequired,primary:o.PropTypes.bool.isRequired,buttonRef:o.PropTypes.func,onClick:o.PropTypes.func},t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(2),l=n(s);r(15);var u=function(e){var t=e.id,r=e.name,n=e.value,o=e.defaultValue,s=e.options,u=e.textKey,i=e.valueKey,c=e.className,p=e.disabled,f=e.style,d=e.error,y=e.onChange;return a.default.createElement("select",{id:t,name:r,value:n,defaultValue:o,disabled:p,className:(0,l.default)(c,"sec-ui-drop-down-list",{"sec-ui-drop-down-disabled":p},{"sec-ui-drop-down-list-error":d}),style:f,onChange:y},s.map(function(e){return a.default.createElement("option",{key:e[i],value:e[i]},e[u])}))};u.defaultProps={error:!1,disabled:!1},u.propTypes={id:o.PropTypes.string,name:o.PropTypes.string,value:o.PropTypes.string,defaultValue:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number]),options:o.PropTypes.array.isRequired,textKey:o.PropTypes.string.isRequired,valueKey:o.PropTypes.string.isRequired,className:o.PropTypes.string,style:o.PropTypes.object,error:o.PropTypes.bool.isRequired,onChange:o.PropTypes.func,disabled:o.PropTypes.bool.isRequired},t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(2),l=n(s);r(16);var u=function(e){var t=e.label,r=e.renderLabel,n=e.className,o=e.style,s=e.labelClassName,u=e.labelStyle,i=e.fieldClassName,c=e.fieldStyle,p=e.required,f=e.errorMessage,d=e.children;return a.default.createElement("div",{className:(0,l.default)(n,"sec-ui-form-row"),style:o},a.default.createElement("div",{className:(0,l.default)(s,"sec-ui-form-row-label"),style:u},r?r():a.default.createElement("label",null,t)),a.default.createElement("div",{className:(0,l.default)(i,"sec-ui-form-row-field"),style:c},p&&a.default.createElement("span",{className:"sec-ui-form-row-field-required"},"*"),d,f&&a.default.createElement("span",{className:"sec-ui-form-row-error-message"},f)))};u.defaultProps={required:!1},u.propTypes={label:o.PropTypes.string,renderLabel:o.PropTypes.func,className:o.PropTypes.string,style:o.PropTypes.object,labelClassName:o.PropTypes.string,labelStyle:o.PropTypes.object,fieldClassName:o.PropTypes.string,fieldStyle:o.PropTypes.object,required:o.PropTypes.bool.isRequired,errorMessage:o.PropTypes.string,children:o.PropTypes.any},t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(24),l=n(s),u=function(e){var t=e.id,r=e.className,n=e.style,o=e.formRef,s=e.children,u=e.onSubmit;return a.default.createElement("form",{id:t,className:r,style:n,ref:o,onSubmit:function(e){e.preventDefault();var t=(0,l.default)(e.target,{hash:!0,empty:!0});u(t)}},s)};u.propTypes={id:o.PropTypes.string,className:o.PropTypes.string,style:o.PropTypes.object,formRef:o.PropTypes.func,children:o.PropTypes.any,onSubmit:o.PropTypes.func},t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(1),i=n(u),c=r(2),p=n(c);r(17);var f=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleKeyDown=function(e){if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();var t=n.props,r=t.options,o=t.valueKey,a=t.value,s=r.findIndex(function(e){return e[o]===a});"ArrowUp"===e.key?s--:s++,s<0?s=0:s>=r.length&&(s=r.length-1),n.props.onChange(r[s][o])}},n.renderOption=function(e){var t=e[n.props.valueKey],r=e[n.props.descriptionKey];return i.default.createElement("div",{key:t,className:(0,p.default)("sec-ui-list-option",{"sec-ui-list-option-selected":t===n.props.value}),onClick:function(){n.props.onChange(t)},onDoubleClick:function(){n.props.onDoubleClick&&n.props.onDoubleClick(t)}},r)},s=r,a(n,s)}return s(t,e),l(t,[{key:"render",value:function(){return i.default.createElement("div",{className:(0,p.default)("sec-ui-list",this.props.className),tabIndex:"0",onKeyDown:this.handleKeyDown,style:this.props.style},this.props.options.map(this.renderOption))}}]),t}(u.Component);f.defaultProps={valueKey:"value",descriptionKey:"description"},f.propTypes={options:u.PropTypes.array.isRequired,value:u.PropTypes.oneOfType([u.PropTypes.number,u.PropTypes.string]),valueKey:u.PropTypes.string.isRequired,descriptionKey:u.PropTypes.string.isRequired,className:u.PropTypes.string,style:u.PropTypes.object,onChange:u.PropTypes.func.isRequired,onDoubleClick:u.PropTypes.func.isRequired},t.default=f},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(2),l=n(s);r(19);var u=function(e){var t=e.title,r=e.icon,n=e.iconImageSrc,o=e.className,s=e.style,u=e.renderButtons,i=e.children,c="sec-ui-panel-header-icon fa fa-"+r;return a.default.createElement("div",{className:(0,l.default)(o,"sec-ui-panel"),style:s},a.default.createElement("div",{className:"sec-ui-panel-header"},r?a.default.createElement("i",{className:c}):a.default.createElement("img",{src:n,alt:"",className:"sec-ui-panel-header-icon"}),a.default.createElement("h2",{className:"sec-ui-panel-header-title"},t)),a.default.createElement("div",{className:"sec-ui-panel-body"},i),u&&a.default.createElement("div",{className:"sec-ui-panel-footer"},u()))};u.propTypes={title:o.PropTypes.string.isRequired,icon:o.PropTypes.string,iconImageSrc:o.PropTypes.string,className:o.PropTypes.string,style:o.PropTypes.object,renderButtons:o.PropTypes.func,children:o.PropTypes.any},t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(3),l=n(s);r(20);var u=function(){return a.default.createElement(l.default,null,a.default.createElement("div",{className:"sec-ui-spinner-container"},a.default.createElement("i",{className:"fa fa-spinner fa-spin sec-ui-spinner"})))};t.default=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(1),c=n(i),p=r(2),f=n(p);r(21);var d=function(e){function t(){var e,r,n,l;a(this,t);for(var u=arguments.length,i=Array(u),c=0;c<u;c++)i[c]=arguments[c];return r=n=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={shouldRenderLastRowBorder:!1},n.checkRenderLastRowBorder=function(){var e=n.container.getBoundingClientRect(),t=n.table.getBoundingClientRect(),r=2;n.state.shouldRenderLastRowBorder&&r++;var o=e.height-r>t.height;n.state.shouldRenderLastRowBorder!==o&&n.setState({shouldRenderLastRowBorder:o})},n.handleSelectAllChange=function(e){var t=n.props,r=t.data,o=t.idAttribute,a=t.onSelectionChange,s=e.target.checked?r.map(function(e){return e[o]}):[];a(s)},n.handleSelectChange=function(e,t){var r=n.props,a=r.selection,s=r.idAttribute,l=r.onSelectionChange,u=e.target.checked?[].concat(o(a),[t[s]]):a.filter(function(e){return e!==t[s]});l(u)},l=r,s(n,l)}return l(t,e),u(t,[{key:"componentDidMount",value:function(){this.checkRenderLastRowBorder()}},{key:"componentDidUpdate",value:function(){this.checkRenderLastRowBorder()}},{key:"render",value:function(){var e=this,t=this.props,r=t.columns,n=t.data,o=t.idAttribute,a=t.selection,s=t.className,l=t.style,u=t.onRowClick;return c.default.createElement("div",{className:(0,f.default)(s,"sec-ui-table-container"),style:l,ref:function(t){return e.container=t}},c.default.createElement("table",{className:(0,f.default)("sec-ui-table",{"sec-ui-table-render-last-row-border":this.state.shouldRenderLastRowBorder}),ref:function(t){return e.table=t}},c.default.createElement("thead",null,c.default.createElement("tr",null,null!=a&&c.default.createElement("th",{className:"sec-ui-table-selection-column"},c.default.createElement("input",{type:"checkbox",onChange:this.handleSelectAllChange})),r.map(function(e){return c.default.createElement("th",{key:e.key,style:{width:e.width}},e.title)}))),c.default.createElement("tbody",null,n.map(function(t){return c.default.createElement("tr",{key:t[o],className:(0,f.default)({"sec-ui-table-row-clickable":null!=u}),onClick:null==u?void 0:function(){return u(t)}},null!=a&&c.default.createElement("td",{className:"sec-ui-table-selection-column"},c.default.createElement("input",{type:"checkbox",checked:a.some(function(e){return e===t[o]}),onChange:function(r){return e.handleSelectChange(r,t)}})),r.map(function(e){return c.default.createElement("td",{key:e.key,style:{width:e.width}},t[e.key])}))}))))}}]),t}(i.Component);d.defaultProps={idAttribute:"id"},d.propTypes={columns:i.PropTypes.arrayOf(i.PropTypes.shape({key:i.PropTypes.string.isRequired,title:i.PropTypes.string.isRequired,width:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])})).isRequired,data:i.PropTypes.array.isRequired,idAttribute:i.PropTypes.string.isRequired,selection:i.PropTypes.array,className:i.PropTypes.string,style:i.PropTypes.object,onRowClick:i.PropTypes.func,onSelectionChange:i.PropTypes.func},t.default=d},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o),s=r(2),l=n(s);r(22);var u=function(e){var t=e.id,r=e.name,n=e.value,o=e.defaultValue,s=e.type,u=e.className,i=e.style,c=e.maxLength,p=e.readOnly,f=e.error,d=e.inputRef,y=e.onChange,m=e.onBlur;return a.default.createElement("input",{id:t,name:r,value:n,defaultValue:o,type:s,className:(0,l.default)(u,"sec-ui-text-box",{"sec-ui-text-box-error":f},{"sec-ui-text-box-readonly":p}),style:i,maxLength:c,readOnly:p,ref:d,onChange:y,onBlur:m})};u.defaultProps={type:"text",error:!1,readOnly:!1},u.propTypes={id:o.PropTypes.string,name:o.PropTypes.string,value:o.PropTypes.string,defaultValue:o.PropTypes.string,type:o.PropTypes.string.isRequired,className:o.PropTypes.string,style:o.PropTypes.object,maxLength:o.PropTypes.number,readOnly:o.PropTypes.bool.isRequired,error:o.PropTypes.bool.isRequired,inputRef:o.PropTypes.func,onChange:o.PropTypes.func,onBlur:o.PropTypes.func},t.default=u},function(e,t){},13,13,13,13,13,13,13,13,13,13,function(e,t){function r(e,t){"object"!=typeof t?t={hash:!!t}:void 0===t.hash&&(t.hash=!0);for(var r=t.hash?{}:"",n=t.serializer||(t.hash?a:s),o=e&&e.elements?e.elements:[],i=Object.create(null),c=0;c<o.length;++c){var p=o[c];if((t.disabled||!p.disabled)&&p.name&&u.test(p.nodeName)&&!l.test(p.type)){var f=p.name,d=p.value;if("checkbox"!==p.type&&"radio"!==p.type||p.checked||(d=void 0),t.empty){if("checkbox"!==p.type||p.checked||(d=""),"radio"===p.type&&(i[p.name]||p.checked?p.checked&&(i[p.name]=!0):i[p.name]=!1),void 0==d&&"radio"==p.type)continue}else if(!d)continue;if("select-multiple"!==p.type)r=n(r,f,d);else{d=[];for(var y=p.options,m=!1,b=0;b<y.length;++b){var h=y[b],v=t.empty&&!h.value,P=h.value||v;h.selected&&P&&(m=!0,r=t.hash&&"[]"!==f.slice(f.length-2)?n(r,f+"[]",h.value):n(r,f,h.value))}!m&&t.empty&&(r=n(r,f,""))}}}if(t.empty)for(var f in i)i[f]||(r=n(r,f,""));return r}function n(e){var t=[],r=/^([^\[\]]*)/,n=new RegExp(i),o=r.exec(e);for(o[1]&&t.push(o[1]);null!==(o=n.exec(e));)t.push(o[1]);return t}function o(e,t,r){if(0===t.length)return e=r;var n=t.shift(),a=n.match(/^\[(.+?)\]$/);if("[]"===n)return e=e||[],Array.isArray(e)?e.push(o(null,t,r)):(e._values=e._values||[],e._values.push(o(null,t,r))),e;if(a){var s=a[1],l=+s;isNaN(l)?(e=e||{},e[s]=o(e[s],t,r)):(e=e||[],e[l]=o(e[l],t,r))}else e[n]=o(e[n],t,r);return e}function a(e,t,r){var a=t.match(i);if(a){var s=n(t);o(e,s,r)}else{var l=e[t];l?(Array.isArray(l)||(e[t]=[l]),e[t].push(r)):e[t]=r}return e}function s(e,t,r){return r=r.replace(/(\r)?\n/g,"\r\n"),r=encodeURIComponent(r),r=r.replace(/%20/g,"+"),e+(e?"&":"")+encodeURIComponent(t)+"="+r}var l=/^(?:submit|button|image|reset|file)$/i,u=/^(?:input|select|textarea|keygen)/i,i=/(\[[^\[\]]*\])/g;e.exports=r}]))});
{
"name": "secullum-react-ui",
"version": "0.0.4",
"version": "0.0.5",
"description": "Set of React components for building user interfaces",

@@ -36,7 +36,8 @@ "main": "dist/bundle.js",

"css-loader": "^0.24.0",
"eslint": "^2.13.1",
"eslint-config-airbnb": "^9.0.1",
"eslint-plugin-import": "^1.10.0",
"eslint-plugin-jsx-a11y": "^1.2.0",
"eslint-plugin-react": "^5.2.2",
"eslint": "^3.9.1",
"eslint-config-secullum": "^1.0.3",
"eslint-plugin-flowtype": "^2.25.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.1",
"eslint-plugin-react": "^6.5.0",
"extract-text-webpack-plugin": "^1.0.1",

@@ -43,0 +44,0 @@ "file-loader": "^0.9.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc