@spaziodati/atoka-design-system 2.2.49 → 2.2.50
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/AddableItems/index.js +1 -1
- package/Alert/index.js +1 -1
- package/Badge/index.js +1 -1
- package/Bs4V3Wrapper/index.js +1 -1
- package/BubbleChart/index.js +1 -2
- package/Button/index.js +1 -1
- package/ButtonDropdown/index.js +1 -1
- package/CardsPage/index.js +1 -1
- package/CursorPagination/index.js +1 -1
- package/DatePicker/index.js +1 -1
- package/DetailPage/index.js +1 -1
- package/Dropdown/index.js +1 -1
- package/EditableString/index.js +1 -1
- package/EllipsableContent/index.js +1 -1
- package/EmptyState/index.js +1 -1
- package/Facet/index.js +1 -1
- package/FacetSection/index.js +1 -1
- package/FadeAnimation/index.js +1 -1
- package/FeedbackButton/index.js +1 -1
- package/Form/index.js +1 -1
- package/Funnel/index.js +1 -2
- package/Gauge/index.js +1 -2
- package/GridCard/index.js +1 -1
- package/HighlightableText/index.js +1 -1
- package/Histogram/index.js +1 -1
- package/InlineStringEditor/index.js +1 -1
- package/InputGroup/index.js +1 -1
- package/Jumbotron/index.js +1 -1
- package/Map/index.js +1 -2
- package/Modal/index.js +1 -1
- package/MultiModeDatePicker/index.js +1 -1
- package/Navbar/index.js +1 -1
- package/Pagination/index.js +1 -1
- package/PieChart/index.js +1 -1
- package/PublicFooter/index.js +1 -1
- package/PublicNavbar/index.js +1 -1
- package/RecordBit/index.js +1 -1
- package/ResultItemCard/index.js +1 -1
- package/RowCard/index.js +1 -1
- package/SelectDropdown/index.js +1 -1
- package/Spinner/index.js +1 -1
- package/StatisticsItemCard/index.js +1 -1
- package/StatisticsItemNumeric/index.js +1 -1
- package/StatisticsLegend/index.js +1 -1
- package/StatisticsTooltip/index.js +1 -1
- package/Suggester/index.js +1 -1
- package/SunBurst/index.js +1 -1
- package/TabSwitcher/index.js +1 -1
- package/Title/index.js +1 -1
- package/Toast/index.js +1 -1
- package/ToggleButtonGroup/index.js +1 -1
- package/Tooltip/index.js +1 -1
- package/Utils/index.js +1 -2
- package/index.js +1 -2
- package/package.json +1 -7
- package/BubbleChart/index.js.LICENSE.txt +0 -1
- package/Funnel/index.js.LICENSE.txt +0 -1
- package/Gauge/index.js.LICENSE.txt +0 -1
- package/Map/index.js.LICENSE.txt +0 -1
- package/Utils/index.js.LICENSE.txt +0 -1
- package/index.js.LICENSE.txt +0 -1
- /package/{atoka-design-system-2.2.49.min.css → atoka-design-system-2.2.50.min.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/pro-solid-svg-icons/faCircle"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Col"),require("react-bootstrap/Container"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-bootstrap/OverlayTrigger"),require("react-bootstrap/Row")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/pro-solid-svg-icons/faCircle","@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Col","react-bootstrap/Container","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText","react-bootstrap/OverlayTrigger","react-bootstrap/Row"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/pro-solid-svg-icons/faCircle"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Col"),require("react-bootstrap/Container"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-bootstrap/OverlayTrigger"),require("react-bootstrap/Row")):e["atoka-design-system"]=t(e["@fortawesome/pro-solid-svg-icons/faCircle"],e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Col"],e["react-bootstrap/Container"],e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"],e["react-bootstrap/OverlayTrigger"],e["react-bootstrap/Row"])}(self,(function(e,t,r,o,n,a,l,i,c,s,p){return(()=>{"use strict";var u,d={6627:(e,t,r)=>{r.d(t,{ZP:()=>i});var o=r(4329);function n(e){return n="function"==typeof Symbol&&"symbol"===(0,o.Z)(Symbol.iterator)?function(e){return(0,o.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,o.Z)(e)},n(e)}function a(e,t,r){var o=r.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(o)));var a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var r=o.bind(this);return a=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){o=e,delete this[t]}}),a=!1,r},set:function(e){o=e}}}function l(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var r=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof r.value&&Object.defineProperty(e.prototype,t,a(e,t,r))}})),e}function i(){return 1===arguments.length?l.apply(void 0,arguments):a.apply(void 0,arguments)}},7045:(e,t,r)=>{r.d(t,{G:()=>y});var o,n=r(8310),a=r.n(n),l=r(8156),i=r.n(l),c=r(4603),s=r(4915),p=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),u=function(){return u=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},u.apply(this,arguments)},d=function(e){return i().createElement("div",{className:"ellipsable-content-prepend"},e.children)};d.displayName="EllipsableContent.Prepend";var f=function(e){return i().createElement("div",{className:"ellipsable-content-append"},e.children)};f.displayName="EllipsableContent.Append";var m=function(e){var t=i().createElement("div",{className:"ellipsable-content-content"},e.children);return null==e.tooltip?t:i().createElement(c.Tooltip,u({},e.tooltipProps,{content:e.tooltip}),t)};m.displayName="EllipsableContent.Content";var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.renderFullContent=function(){var e=(0,s.z8)(this.props.children,t.Prepend),r=(0,s.z8)(this.props.children,t.Content),o=(0,s.z8)(this.props.children,t.Append);return null!=r||null==e&&null==o?(null==r&&(r=i().createElement(t.Content,null,this.props.children)),null!=this.props.tooltip&&(r=i().createElement(r.type,u({},r.props,{tooltip:this.props.tooltip,tooltipProps:this.props.tooltipProps}))),i().createElement(i().Fragment,null,e,r,o)):(console.error("You must set a .Content alongside the .Append or .Prepend"),null)},t.prototype.render=function(){var e=a()("ellipsable-content-container align-items-center",this.props.className,{"ellipsable-with-tooltip":null!=this.props.tooltip}),t=this.renderFullContent();return null==t?null:i().createElement("div",{className:e,style:this.props.style},t)},t.displayName="EllipsableContent",t.Prepend=d,t.Append=f,t.Content=m,t}(i().PureComponent)},9319:(e,t,r)=>{r.d(t,{EllipsableContent:()=>o.G});var o=r(7045)},3642:(e,t,r)=>{var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(8721),c=r.n(i),s=r(7269),p=r(2380),u=r(5145),d=r(8672),f=r(2722),m=function(){return m=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},m.apply(this,arguments)},y=function(e){var t=l()(null==e?void 0:e.className,"atoka-form");return n().createElement(c(),m({},e,{className:t}),e.children)};y.displayName="Form",y.Control=p.N,y.Label=s.l,y.Checkbox=u.z,y.Radio=d.w,y.File=c().File,y.Switch=c().Switch,y.Help=f.y,y.Group=c().Group},5145:(e,t,r)=>{r.d(t,{z:()=>p});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(8721),c=r.n(i),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},p=function(e){var t,r=l()("atoka-form-checkbox",null==e?void 0:e.className);return n().createElement(c().Check,s({type:"checkbox"},e,{custom:!0,className:r,label:null!==(t=e.label)&&void 0!==t?t:""}))};p.displayName="FormCheckbox"},2380:(e,t,r)=>{r.d(t,{N:()=>d});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(1082),c=r.n(i),s=r(7605),p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},u=n().forwardRef((function(e,t){var r=e.size,o=void 0===r?"md":r,a=p(e,["size"]),i=l()("atoka-form-control",null==a?void 0:a.className,{"atoka-shadow":a.withShadow,disabled:a.disabled});return n().createElement(c(),{as:a.as,rows:a.rows,cols:a.cols,placeholder:a.placeholder,className:i,disabled:a.disabled,readOnly:a.readOnly,value:a.value,onChange:a.onChange,onKeyPress:a.onKeyPress,onKeyDown:a.onKeyDown,defaultValue:a.defaultValue,size:"md"===o?void 0:o,type:a.type,id:a.id,isValid:a.isValid,isInvalid:a.isInvalid,ref:t,autoComplete:"off"},a.children)}));u.displayName="FormControlComponent";var d=u;d.FeedBack=s.t,d.displayName="FormControl"},7605:(e,t,r)=>{r.d(t,{t:()=>p});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(1082),c=r.n(i),s=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},p=n().memo((function(e){var t=e.show,r=void 0===t||t,o=s(e,["show"]),a=l()(null==o?void 0:o.className,"atoka-form-control-feedback",{"d-block":r});return n().createElement(c().Feedback,{type:o.type,className:a},o.children)}));p.displayName="FormControlFeedBack"},2722:(e,t,r)=>{r.d(t,{y:()=>p});var o=r(8763),n=r.n(o),a=r(8156),l=r.n(a),i=r(8310),c=r.n(i),s=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},p=l().memo((function(e){var t=e.children,r=s(e,["children"]),o=c()("d-block",null==r?void 0:r.className);return l().createElement(n(),{bsPrefix:"atoka-form-help",className:o},t)}));p.displayName="FormHelp"},7269:(e,t,r)=>{r.d(t,{l:()=>s});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(8721),c=r.n(i),s=n().memo((function(e){var t=l()(null==e?void 0:e.className,"atoka-form-label");return n().createElement(c().Label,{className:t},e.children)}));s.displayName="FormLabel"},8672:(e,t,r)=>{r.d(t,{w:()=>p});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(8721),c=r.n(i),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},p=function(e){var t,r=l()(null==e?void 0:e.className,"atoka-form-radio");return n().createElement(c().Check,s({type:"radio"},e,{custom:!0,className:r,label:null!==(t=e.label)&&void 0!==t?t:""}))};p.displayName="FormRadio"},1358:(e,t,r)=>{r.r(t),r.d(t,{StatisticsLegend:()=>P,StatisticsLegendProps:()=>o.StatisticsLegendProps,StatisticsSVGLegend:()=>F,getRenderStatisticsLegend:()=>E});var o={};r.r(o),r.d(o,{B:()=>P});var n,a=r(8156),l=r.n(a),i=r(4394),c=r.n(i),s=r(3915),p=r.n(s),u=r(8310),d=r.n(u),f=r(5315),m=r.n(f),y=r(1326),b=r(5692),v=r(9319),h=r(2394),g=r(5909),O=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.renderRightBlock=function(){var e=[this.renderValue(),this.renderPercentage()].filter((function(e){return null!=e}));return null==e.length?null:l().createElement(v.EllipsableContent.Append,null,e)},t.prototype.renderValue=function(){var e=this.props,t=e.legendDataValueKey,r=e.numberToStringFormatter,o=e.data;if(null==t||null==o[t])return null;var n=o[t],a=r?r(n):String(n);return l().createElement("div",{key:"value-container",className:"value-container font-weight-bold text-nowrap"},a)},t.prototype.renderPercentage=function(){var e=this.props,t=e.legendDataPercentageKey,r=e.data;if(null==t||null==r[t])return null;var o=(0,g.Ow)(r[t]);return l().createElement("div",{key:"percentage-container",className:"percentage-container ml-1"},o)},t.prototype.renderOtherLabel=function(e){var t;return(0,h.Wq)(e.label)?String(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:""):e.label},t.prototype.renderLabel=function(){var e=this.props,t=e.legendDataLabelKey,r=e.data,o=e.otherId;return r.id===o?this.renderOtherLabel(r):null==t?null:null==r?void 0:r[t]},t.prototype.render=function(){var e=this.props,t=e.columnNumber,r=e.color,o=e.data,n=d()("legend-item px-1",{"flex-basis-0":"horizontal"===this.props.layout});return l().createElement(m(),{sm:24/t,className:n,key:"legend-item-".concat(o.id)},l().createElement(v.EllipsableContent,{className:"label-container w-100 justify-content-between"},l().createElement(v.EllipsableContent.Content,null,l().createElement(b.FontAwesomeIcon,{icon:y.faCircle,color:r,className:"mr-1"}),this.renderLabel()),this.renderRightBlock()))},t.displayName="StatisticsLegendItem",t}(l().PureComponent),P=l().memo((function(e){var t=e.data,r=e.otherId,o=e.colors,n=e.layout,a=void 0===n?"vertical":n,i=e.columnNumber,s=void 0===i?2:i,u=e.numberToStringFormatter,d=e.legendDataLabelKey,f=e.legendDataValueKey,m=e.legendDataPercentageKey;function y(e,t){var n=e.id,i=n===r?null==o?void 0:o[o.length-1]:null==o?void 0:o[t];return l().createElement(w,{data:e,numberToStringFormatter:u,legendDataValueKey:f,legendDataLabelKey:d,legendDataPercentageKey:m,color:i,otherId:r,key:n+i,columnNumber:s,layout:a})}var b=t.filter((function(e){return 0!==e.value||e.id!==r}));return"horizontal"===a?l().createElement("div",{className:"legend-container"},b.map(y)):l().createElement(c(),{className:"legend-container"},l().createElement(p(),{className:"w-100"},b.map(y)))}));P.displayName="StatisticsLegend";var E=function(e){var t=e.legendDataLabelKey,r=e.legendDataValueKey,o=e.legendDataPercentageKey,n=e.layout,a=e.columnsNumber;return function(e){var i=e.data,c=e.otherId,s=e.colors,p=e.numberToStringFormatter;return l().createElement(P,{layout:n,data:i,otherId:c,colors:s,columnNumber:a,numberToStringFormatter:p,legendDataLabelKey:t,legendDataValueKey:r,legendDataPercentageKey:o})}},x=r(6627),N=r(3654),S=r(7540),j=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),C=function(e,t,r,o){var n,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(l=(a<3?n(l):a>3?n(t,r,l):n(t,r))||l);return a>3&&l&&Object.defineProperty(t,r,l),l},k=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var r,o,n,a;return j(t,e),t.prototype.renderSVGDataInfoBit=function(e,t){var r,o,n,a,i,c,s,p,u=null!==(r=e.label)&&void 0!==r?r:"",d=this.renderPercentage(e),f=this.renderCircle(null===(o=this.props.colors)||void 0===o?void 0:o[t]);return l().createElement(l().Fragment,{key:"".concat(e.label,"-legend-data")},f,l().createElement("text",{x:this.props.x,y:this.props.y,fill:S.de,fontSize:this.props.fontSize,key:"".concat(e.label,"-legend-data")},l().createElement("tspan",{dx:null==f?0:10},null!==(i=null===(a=(n=this.props).labelFormat)||void 0===a?void 0:a.call(n,u))&&void 0!==i?i:u),l().createElement("tspan",{x:this.getRightElementX(),dx:5,fill:"black",fontWeight:"bold",textAnchor:"end"},null!==(p=null===(s=(c=this.props).valueFormat)||void 0===s?void 0:s.call(c,e.value))&&void 0!==p?p:e.value),d))},t.prototype.renderSVGDataInfoBitMoreItems=function(e,t){var r,o,n,a,i,c,s,p,u=null!==(r=e.label)&&void 0!==r?r:"",d=this.renderPercentage(e),f=this.renderCircle(null===(o=this.props.colors)||void 0===o?void 0:o[t]);return l().createElement(l().Fragment,{key:"".concat(e.label,"-legend-data-items")},f,l().createElement("tspan",{dx:0===t||null!=f?0:10,fill:S.de},null!==(i=null===(a=(n=this.props).labelFormat)||void 0===a?void 0:a.call(n,u))&&void 0!==i?i:u),l().createElement("tspan",{dx:5,fill:"black",fontWeight:"bold"},null!==(p=null===(s=(c=this.props).valueFormat)||void 0===s?void 0:s.call(c,e.value))&&void 0!==p?p:e.value),d)},t.prototype.renderCircle=function(e){return null==e?null:l().createElement("circle",{cx:this.props.x,cy:this.props.y-3,r:"5",fill:e})},t.prototype.renderPercentage=function(e){var t,r=null!=e.percentage?(0,g.Ow)(e.percentage):null;return null==r?null:l().createElement("tspan",{x:this.getRightElementX(),dx:5,fill:null===(t=this.props.colors)||void 0===t?void 0:t[0]},r)},t.prototype.getRightElementX=function(){var e=this.props.width;if(null!=e)return(0===this.props.x?e/2:e)-18},t.prototype.removeItemIfNoValue=function(e){return e.filter((function(e){return null!==e.value}))},t.prototype.render=function(){var e=this.removeItemIfNoValue(this.props.data);return(null==e?void 0:e.length)>1?l().createElement("g",null,l().createElement("text",{x:this.props.x,y:this.props.y,dy:this.props.dy,fill:S.de,fontSize:this.props.fontSize,key:"legend-data-bit",className:"legend-data-bit"},e.map(this.renderSVGDataInfoBitMoreItems))):l().createElement("g",null,e.map(this.renderSVGDataInfoBit))},t.displayName="StatisticsSVGLegend",t.defaultProps={dy:0,fontSize:11,colors:[]},C([x.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(r=void 0!==N.hz&&N.hz)?r:Object,Number]),k("design:returntype","function"==typeof(o=void 0!==l()&&l().ReactNode)?o:Object)],t.prototype,"renderSVGDataInfoBit",null),C([x.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(n=void 0!==N.hz&&N.hz)?n:Object,Number]),k("design:returntype","function"==typeof(a=void 0!==l()&&l().ReactNode)?a:Object)],t.prototype,"renderSVGDataInfoBitMoreItems",null),t}(l().PureComponent)},4603:(e,t,r)=>{r.d(t,{Tooltip:()=>u});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),i=r(6043),c=r.n(i),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},u=n().memo((function(e){var t,r=document.querySelector(".bs4-v3-external-container"),o=null!==(t=e.placement)&&void 0!==t?t:"top",a=l()("tooltip atoka-tooltip",e.className,{"top bs-tooltip-top":0===o.indexOf("top"),"right bs-tooltip-right":0===o.indexOf("right"),"bottom bs-tooltip-bottom":0===o.indexOf("bottom"),"left bs-tooltip-left":0===o.indexOf("left")}),i=e.content,u=p(e,["content"]);return n().createElement(c(),s({},u,{container:r,overlay:function(e){var t=e.arrowProps,r=p(e,["arrowProps"]),o=(r.show,p(r,["show"]));return n().createElement("div",s({},o,{className:a,role:"tooltip"}),n().createElement("div",{className:"tooltip-inner"},n().createElement("div",s({className:"arrow arrow-back"},t)),i,n().createElement("div",s({className:"arrow arrow-front"},t))))}}),e.children)}));u.displayName="Tooltip"},3654:()=>{},5909:(e,t,r)=>{r.d(t,{Ow:()=>o});r(4915);function o(e){var t;return"".concat(parseInt(null===(t=null==e?void 0:e.toFixed)||void 0===t?void 0:t.call(e,0),10),"%")}},7540:(e,t,r)=>{r.d(t,{de:()=>o});var o="#717171"},2394:(e,t,r)=>{r.d(t,{Wq:()=>o});function o(e){return null==e||null!==e.match(/^\s*$/)}},4915:(e,t,r)=>{r.d(t,{z8:()=>a});r(5692);var o=r(8156),n=r.n(o);r(3642);function a(e,t){var r,o;return null!==(o=null===(r=function(e,t){var r=[];return n().Children.forEach(e,(function(e){(null==e?void 0:e.type)===t&&r.push(e)})),r}(e,t))||void 0===r?void 0:r[0])&&void 0!==o?o:null}},1326:t=>{t.exports=e},5692:e=>{e.exports=t},8310:e=>{e.exports=r},8156:e=>{e.exports=o},5315:e=>{e.exports=n},4394:e=>{e.exports=a},8721:e=>{e.exports=l},1082:e=>{e.exports=i},8763:e=>{e.exports=c},6043:e=>{e.exports=s},3915:e=>{e.exports=p},4329:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}r.d(t,{Z:()=>o})}},f={};function m(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return d[e](r,r.exports,m),r.exports}m.m=d,u=[],m.O=(e,t,r,o)=>{if(!t){var n=1/0;for(c=0;c<u.length;c++){for(var[t,r,o]=u[c],a=!0,l=0;l<t.length;l++)(!1&o||n>=o)&&Object.keys(m.O).every((e=>m.O[e](t[l])))?t.splice(l--,1):(a=!1,o<n&&(n=o));if(a){u.splice(c--,1);var i=r();void 0!==i&&(e=i)}}return e}o=o||0;for(var c=u.length;c>0&&u[c-1][2]>o;c--)u[c]=u[c-1];u[c]=[t,r,o]},m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var r in t)m.o(t,r)&&!m.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1338:0,3099:0,2823:0,8172:0};m.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[a,l,i]=r,c=0;if(a.some((t=>0!==e[t]))){for(o in l)m.o(l,o)&&(m.m[o]=l[o]);if(i)var s=i(m)}for(t&&t(r);c<a.length;c++)n=a[c],m.o(e,n)&&e[n]&&e[n][0](),e[a[c]]=0;return m.O(s)},r=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var y=m.O(void 0,[8172],(()=>m(1358)));return y=m.O(y)})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/pro-solid-svg-icons/faCircle"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Col"),require("react-bootstrap/Container"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-bootstrap/OverlayTrigger"),require("react-bootstrap/Row")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/pro-solid-svg-icons/faCircle","@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Col","react-bootstrap/Container","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText","react-bootstrap/OverlayTrigger","react-bootstrap/Row"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/pro-solid-svg-icons/faCircle"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Col"),require("react-bootstrap/Container"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-bootstrap/OverlayTrigger"),require("react-bootstrap/Row")):e["atoka-design-system"]=t(e["@fortawesome/pro-solid-svg-icons/faCircle"],e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Col"],e["react-bootstrap/Container"],e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"],e["react-bootstrap/OverlayTrigger"],e["react-bootstrap/Row"])}(self,(function(e,t,r,o,n,a,l,s,i,c,p){return(()=>{"use strict";var d,m={8572:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function n(e,t,r){var n=r.value;if("function"!=typeof n)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(o(n)));var a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof n)return n;var r=n.bind(this);return a=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){n=e,delete this[t]}}),a=!1,r},set:function(e){n=e}}}function a(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var r=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof r.value&&Object.defineProperty(e.prototype,t,n(e,t,r))}})),e}function l(){return 1===arguments.length?a.apply(void 0,arguments):n.apply(void 0,arguments)}r.d(t,{ZP:()=>l})},7045:(e,t,r)=>{r.d(t,{G:()=>EllipsableContent});var o=r(8310),n=r.n(o),a=r(8156),l=r.n(a),s=r(4603),i=r(4915);const c=e=>l().createElement("div",{className:"ellipsable-content-prepend"},e.children);c.displayName="EllipsableContent.Prepend";const p=e=>l().createElement("div",{className:"ellipsable-content-append"},e.children);p.displayName="EllipsableContent.Append";const d=e=>{const t=l().createElement("div",{className:"ellipsable-content-content"},e.children);return null==e.tooltip?t:l().createElement(s.Tooltip,{...e.tooltipProps,content:e.tooltip},t)};d.displayName="EllipsableContent.Content";class EllipsableContent extends l().PureComponent{static displayName="EllipsableContent";static Prepend=c;static Append=p;static Content=d;renderFullContent(){let e=(0,i.z8)(this.props.children,EllipsableContent.Prepend),t=(0,i.z8)(this.props.children,EllipsableContent.Content),r=(0,i.z8)(this.props.children,EllipsableContent.Append);return null!=t||null==e&&null==r?(null==t&&(t=l().createElement(EllipsableContent.Content,null,this.props.children)),null!=this.props.tooltip&&(t=l().createElement(t.type,{...t.props,tooltip:this.props.tooltip,tooltipProps:this.props.tooltipProps})),l().createElement(l().Fragment,null,e,t,r)):(console.error("You must set a .Content alongside the .Append or .Prepend"),null)}render(){let e=n()("ellipsable-content-container align-items-center",this.props.className,{"ellipsable-with-tooltip":null!=this.props.tooltip}),t=this.renderFullContent();return null==t?null:l().createElement("div",{className:e,style:this.props.style},t)}}},9319:(e,t,r)=>{r.d(t,{EllipsableContent:()=>o.G});var o=r(7045)},3642:(e,t,r)=>{var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(8721),i=r.n(s),c=r(7269),p=r(2380),d=r(5145),m=r(8672),u=r(2722);const f=e=>{const t=l()(e?.className,"atoka-form");return n().createElement(i(),{...e,className:t},e.children)};f.displayName="Form",f.Control=p.N,f.Label=c.l,f.Checkbox=d.z,f.Radio=m.w,f.File=i().File,f.Switch=i().Switch,f.Help=u.y,f.Group=i().Group},5145:(e,t,r)=>{r.d(t,{z:()=>c});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(8721),i=r.n(s);const c=e=>{const t=l()("atoka-form-checkbox",e?.className);return n().createElement(i().Check,{type:"checkbox",...e,custom:!0,className:t,label:e.label??""})};c.displayName="FormCheckbox"},2380:(e,t,r)=>{r.d(t,{N:()=>d});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(1082),i=r.n(s),c=r(7605);const p=n().forwardRef((({size:e="md",...t},r)=>{const o=l()("atoka-form-control",t?.className,{"atoka-shadow":t.withShadow,disabled:t.disabled});return n().createElement(i(),{as:t.as,rows:t.rows,cols:t.cols,placeholder:t.placeholder,className:o,disabled:t.disabled,readOnly:t.readOnly,value:t.value,onChange:t.onChange,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,defaultValue:t.defaultValue,size:"md"===e?void 0:e,type:t.type,id:t.id,isValid:t.isValid,isInvalid:t.isInvalid,ref:r,autoComplete:"off"},t.children)}));p.displayName="FormControlComponent";const d=p;d.FeedBack=c.t,d.displayName="FormControl"},7605:(e,t,r)=>{r.d(t,{t:()=>c});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(1082),i=r.n(s);const c=n().memo((({show:e=!0,...t})=>{const r=l()(t?.className,"atoka-form-control-feedback",{"d-block":e});return n().createElement(i().Feedback,{type:t.type,className:r},t.children)}));c.displayName="FormControlFeedBack"},2722:(e,t,r)=>{r.d(t,{y:()=>c});var o=r(8763),n=r.n(o),a=r(8156),l=r.n(a),s=r(8310),i=r.n(s);const c=l().memo((({children:e,...t})=>{const r=i()("d-block",t?.className);return l().createElement(n(),{bsPrefix:"atoka-form-help",className:r},e)}));c.displayName="FormHelp"},7269:(e,t,r)=>{r.d(t,{l:()=>c});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(8721),i=r.n(s);const c=n().memo((e=>{const t=l()(e?.className,"atoka-form-label");return n().createElement(i().Label,{className:t},e.children)}));c.displayName="FormLabel"},8672:(e,t,r)=>{r.d(t,{w:()=>c});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(8721),i=r.n(s);const c=e=>{const t=l()(e?.className,"atoka-form-radio");return n().createElement(i().Check,{type:"radio",...e,custom:!0,className:t,label:e.label??""})};c.displayName="FormRadio"},1358:(e,t,r)=>{r.r(t),r.d(t,{StatisticsLegend:()=>v,StatisticsLegendProps:()=>o.StatisticsLegendProps,StatisticsSVGLegend:()=>StatisticsSVGLegend,getRenderStatisticsLegend:()=>E});var o={};r.r(o),r.d(o,{B:()=>v});var n=r(8156),a=r.n(n),l=r(4394),s=r.n(l),i=r(3915),c=r.n(i),p=r(8310),d=r.n(p),m=r(5315),u=r.n(m),f=r(1326),b=r(5692),y=r(9319),h=r(2394),g=r(5909);class StatisticsLegendItem extends a().PureComponent{static displayName="StatisticsLegendItem";renderRightBlock(){let e=[this.renderValue(),this.renderPercentage()].filter((e=>null!=e));return null==e.length?null:a().createElement(y.EllipsableContent.Append,null,e)}renderValue(){let{legendDataValueKey:e,numberToStringFormatter:t,data:r}=this.props;if(null==e||null==r[e])return null;let o=r[e],n=t?t(o):String(o);return a().createElement("div",{key:"value-container",className:"value-container font-weight-bold text-nowrap"},n)}renderPercentage(){let{legendDataPercentageKey:e,data:t}=this.props;if(null==e||null==t[e])return null;const r=(0,g.Ow)(t[e]);return a().createElement("div",{key:"percentage-container",className:"percentage-container ml-1"},r)}renderOtherLabel(e){return(0,h.Wq)(e.label)?String(e?.id??""):e.label}renderLabel(){let{legendDataLabelKey:e,data:t,otherId:r}=this.props;return t.id===r?this.renderOtherLabel(t):null==e?null:t?.[e]}render(){let{columnNumber:e,color:t,data:r}=this.props,o=d()("legend-item px-1",{"flex-basis-0":"horizontal"===this.props.layout});return a().createElement(u(),{sm:24/e,className:o,key:`legend-item-${r.id}`},a().createElement(y.EllipsableContent,{className:"label-container w-100 justify-content-between"},a().createElement(y.EllipsableContent.Content,null,a().createElement(b.FontAwesomeIcon,{icon:f.faCircle,color:t,className:"mr-1"}),this.renderLabel()),this.renderRightBlock()))}}const v=a().memo((({data:e,otherId:t,colors:r,layout:o="vertical",columnNumber:n=2,numberToStringFormatter:l,legendDataLabelKey:i,legendDataValueKey:p,legendDataPercentageKey:d})=>{function m(e,s){let{id:c}=e,m=c===t?r?.[r.length-1]:r?.[s];return a().createElement(StatisticsLegendItem,{data:e,numberToStringFormatter:l,legendDataValueKey:p,legendDataLabelKey:i,legendDataPercentageKey:d,color:m,otherId:t,key:c+m,columnNumber:n,layout:o})}let u=e.filter((e=>0!==e.value||e.id!==t));return"horizontal"===o?a().createElement("div",{className:"legend-container"},u.map(m)):a().createElement(s(),{className:"legend-container"},a().createElement(c(),{className:"w-100"},u.map(m)))}));v.displayName="StatisticsLegend";const E=({legendDataLabelKey:e,legendDataValueKey:t,legendDataPercentageKey:r,layout:o,columnsNumber:n})=>({data:l,otherId:s,colors:i,numberToStringFormatter:c})=>a().createElement(v,{layout:o,data:l,otherId:s,colors:i,columnNumber:n,numberToStringFormatter:c,legendDataLabelKey:e,legendDataValueKey:t,legendDataPercentageKey:r});var N,C,w,x,S=r(8572),O=r(3654),k=r(7540),F=function(e,t,r,o){var n,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(l=(a<3?n(l):a>3?n(t,r,l):n(t,r))||l);return a>3&&l&&Object.defineProperty(t,r,l),l},P=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class StatisticsSVGLegend extends a().PureComponent{static displayName="StatisticsSVGLegend";static defaultProps={dy:0,fontSize:11,colors:[]};renderSVGDataInfoBit(e,t){let r=e.label??"",o=this.renderPercentage(e),n=this.renderCircle(this.props.colors?.[t]);return a().createElement(a().Fragment,{key:`${e.label}-legend-data`},n,a().createElement("text",{x:this.props.x,y:this.props.y,fill:k.de,fontSize:this.props.fontSize,key:`${e.label}-legend-data`},a().createElement("tspan",{dx:null==n?0:10},this.props.labelFormat?.(r)??r),a().createElement("tspan",{x:this.getRightElementX(),dx:5,fill:"black",fontWeight:"bold",textAnchor:"end"},this.props.valueFormat?.(e.value)??e.value),o))}renderSVGDataInfoBitMoreItems(e,t){let r=e.label??"",o=this.renderPercentage(e),n=this.renderCircle(this.props.colors?.[t]);return a().createElement(a().Fragment,{key:`${e.label}-legend-data-items`},n,a().createElement("tspan",{dx:0===t||null!=n?0:10,fill:k.de},this.props.labelFormat?.(r)??r),a().createElement("tspan",{dx:5,fill:"black",fontWeight:"bold"},this.props.valueFormat?.(e.value)??e.value),o)}renderCircle(e){return null==e?null:a().createElement("circle",{cx:this.props.x,cy:this.props.y-3,r:"5",fill:e})}renderPercentage(e){let t=null!=e.percentage?(0,g.Ow)(e.percentage):null;return null==t?null:a().createElement("tspan",{x:this.getRightElementX(),dx:5,fill:this.props.colors?.[0]},t)}getRightElementX(){let e=this.props.width;if(null!=e)return(0===this.props.x?e/2:e)-18}removeItemIfNoValue(e){return e.filter((e=>null!==e.value))}render(){let e=this.removeItemIfNoValue(this.props.data);return e?.length>1?a().createElement("g",null,a().createElement("text",{x:this.props.x,y:this.props.y,dy:this.props.dy,fill:k.de,fontSize:this.props.fontSize,key:"legend-data-bit",className:"legend-data-bit"},e.map(this.renderSVGDataInfoBitMoreItems))):a().createElement("g",null,e.map(this.renderSVGDataInfoBit))}}F([S.ZP,P("design:type",Function),P("design:paramtypes",["function"==typeof(N=void 0!==O.hz&&O.hz)?N:Object,Number]),P("design:returntype","function"==typeof(C=void 0!==a()&&a().ReactNode)?C:Object)],StatisticsSVGLegend.prototype,"renderSVGDataInfoBit",null),F([S.ZP,P("design:type",Function),P("design:paramtypes",["function"==typeof(w=void 0!==O.hz&&O.hz)?w:Object,Number]),P("design:returntype","function"==typeof(x=void 0!==a()&&a().ReactNode)?x:Object)],StatisticsSVGLegend.prototype,"renderSVGDataInfoBitMoreItems",null)},4603:(e,t,r)=>{r.d(t,{Tooltip:()=>c});var o=r(8156),n=r.n(o),a=r(8310),l=r.n(a),s=r(6043),i=r.n(s);const c=n().memo((e=>{let t=document.querySelector(".bs4-v3-external-container"),r=e.placement??"top",o=l()("tooltip atoka-tooltip",e.className,{"top bs-tooltip-top":0===r.indexOf("top"),"right bs-tooltip-right":0===r.indexOf("right"),"bottom bs-tooltip-bottom":0===r.indexOf("bottom"),"left bs-tooltip-left":0===r.indexOf("left")});const{content:a,...s}=e;return n().createElement(i(),{...s,container:t,overlay:({arrowProps:e,...t})=>{const{show:r,...l}=t;return n().createElement("div",{...l,className:o,role:"tooltip"},n().createElement("div",{className:"tooltip-inner"},n().createElement("div",{className:"arrow arrow-back",...e}),a,n().createElement("div",{className:"arrow arrow-front",...e})))}},e.children)}));c.displayName="Tooltip"},3654:()=>{},5909:(e,t,r)=>{r.d(t,{Ow:()=>o});r(4915);function o(e){return`${parseInt(e?.toFixed?.(0),10)}%`}},7540:(e,t,r)=>{r.d(t,{de:()=>o});let o="#717171"},2394:(e,t,r)=>{function o(e){return null==e||null!==e.match(/^\s*$/)}r.d(t,{Wq:()=>o})},4915:(e,t,r)=>{r.d(t,{z8:()=>a});r(5692);var o=r(8156),n=r.n(o);r(3642);function a(e,t){return function(e,t){let r=[];return n().Children.forEach(e,(e=>{e?.type===t&&r.push(e)})),r}(e,t)?.[0]??null}},1326:t=>{t.exports=e},5692:e=>{e.exports=t},8310:e=>{e.exports=r},8156:e=>{e.exports=o},5315:e=>{e.exports=n},4394:e=>{e.exports=a},8721:e=>{e.exports=l},1082:e=>{e.exports=s},8763:e=>{e.exports=i},6043:e=>{e.exports=c},3915:e=>{e.exports=p}},u={};function f(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return m[e](r,r.exports,f),r.exports}f.m=m,d=[],f.O=(e,t,r,o)=>{if(!t){var n=1/0;for(i=0;i<d.length;i++){for(var[t,r,o]=d[i],a=!0,l=0;l<t.length;l++)(!1&o||n>=o)&&Object.keys(f.O).every((e=>f.O[e](t[l])))?t.splice(l--,1):(a=!1,o<n&&(n=o));if(a){d.splice(i--,1);var s=r();void 0!==s&&(e=s)}}return e}o=o||0;for(var i=d.length;i>0&&d[i-1][2]>o;i--)d[i]=d[i-1];d[i]=[t,r,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={1338:0,3099:0,2823:0,76:0};f.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[a,l,s]=r,i=0;if(a.some((t=>0!==e[t]))){for(o in l)f.o(l,o)&&(f.m[o]=l[o]);if(s)var c=s(f)}for(t&&t(r);i<a.length;i++)n=a[i],f.o(e,n)&&e[n]&&e[n][0](),e[a[i]]=0;return f.O(c)},r=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var b=f.O(void 0,[76],(()=>f(1358)));return b=f.O(b)})()}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,a,o,r,l){return(()=>{"use strict";var n,s={3642:(e,t,a)=>{var o=a(8156),r=a.n(o),l=a(8310),n=a.n(l),s=a(8721),c=a.n(s),i=a(7269),m=a(2380),d=a(5145),u=a(8672),p=a(2722);const f=e=>{const t=n()(e?.className,"atoka-form");return r().createElement(c(),{...e,className:t},e.children)};f.displayName="Form",f.Control=m.N,f.Label=i.l,f.Checkbox=d.z,f.Radio=u.w,f.File=c().File,f.Switch=c().Switch,f.Help=p.y,f.Group=c().Group},5145:(e,t,a)=>{a.d(t,{z:()=>i});var o=a(8156),r=a.n(o),l=a(8310),n=a.n(l),s=a(8721),c=a.n(s);const i=e=>{const t=n()("atoka-form-checkbox",e?.className);return r().createElement(c().Check,{type:"checkbox",...e,custom:!0,className:t,label:e.label??""})};i.displayName="FormCheckbox"},2380:(e,t,a)=>{a.d(t,{N:()=>d});var o=a(8156),r=a.n(o),l=a(8310),n=a.n(l),s=a(1082),c=a.n(s),i=a(7605);const m=r().forwardRef((({size:e="md",...t},a)=>{const o=n()("atoka-form-control",t?.className,{"atoka-shadow":t.withShadow,disabled:t.disabled});return r().createElement(c(),{as:t.as,rows:t.rows,cols:t.cols,placeholder:t.placeholder,className:o,disabled:t.disabled,readOnly:t.readOnly,value:t.value,onChange:t.onChange,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,defaultValue:t.defaultValue,size:"md"===e?void 0:e,type:t.type,id:t.id,isValid:t.isValid,isInvalid:t.isInvalid,ref:a,autoComplete:"off"},t.children)}));m.displayName="FormControlComponent";const d=m;d.FeedBack=i.t,d.displayName="FormControl"},7605:(e,t,a)=>{a.d(t,{t:()=>i});var o=a(8156),r=a.n(o),l=a(8310),n=a.n(l),s=a(1082),c=a.n(s);const i=r().memo((({show:e=!0,...t})=>{const a=n()(t?.className,"atoka-form-control-feedback",{"d-block":e});return r().createElement(c().Feedback,{type:t.type,className:a},t.children)}));i.displayName="FormControlFeedBack"},2722:(e,t,a)=>{a.d(t,{y:()=>i});var o=a(8763),r=a.n(o),l=a(8156),n=a.n(l),s=a(8310),c=a.n(s);const i=n().memo((({children:e,...t})=>{const a=c()("d-block",t?.className);return n().createElement(r(),{bsPrefix:"atoka-form-help",className:a},e)}));i.displayName="FormHelp"},7269:(e,t,a)=>{a.d(t,{l:()=>i});var o=a(8156),r=a.n(o),l=a(8310),n=a.n(l),s=a(8721),c=a.n(s);const i=r().memo((e=>{const t=n()(e?.className,"atoka-form-label");return r().createElement(c().Label,{className:t},e.children)}));i.displayName="FormLabel"},8672:(e,t,a)=>{a.d(t,{w:()=>i});var o=a(8156),r=a.n(o),l=a(8310),n=a.n(l),s=a(8721),c=a.n(s);const i=e=>{const t=n()(e?.className,"atoka-form-radio");return r().createElement(c().Check,{type:"radio",...e,custom:!0,className:t,label:e.label??""})};i.displayName="FormRadio"},9274:(e,t,a)=>{a.r(t),a.d(t,{GetRenderStatisticsTooltipType:()=>o.GetRenderStatisticsTooltipType,StatisticsTooltip:()=>i,getRenderStatisticsTooltip:()=>m});var o={};a.r(o),a.d(o,{q:()=>m});var r=a(8156),l=a.n(r),n=a(8310),s=a.n(n),c=a(5909);const i=l().memo((e=>{function t(){let{tooltipDataLabelKey:t,numberToStringFormatter:a,data:r}=e,l=o(t,r);if(null!=l)return null==a?String(l):"string"==typeof l?l:a(l)}function a(){let{tooltipDataValueKey:t,data:a}=e,r=o(t,a);if(null!=r)return"number"==typeof r?(0,c.Ow)(r):r}function o(e,t){return null==e?void 0:t?.[e]}let r=s()("statistics-tooltip",e?.className),n=null==e.color?null:l().createElement("span",{className:"tooltip-rectangle",style:{background:e.color}});return l().createElement("div",{className:r},l().createElement("div",{className:"d-flex align-items-center"},n,l().createElement("span",{className:"text-left"},function(){let{tooltipDataTitleKey:t,data:a,otherId:r,otherLabel:l}=e,n=o(t,a);return n===r?l??r:n?String(n):void 0}())),function(){let o=[{value:t(),key:e.tooltipDataLabelKey,className:"label"},{value:a(),key:e.tooltipDataValueKey,className:"value"}].filter((e=>null!=e.value)).map((e=>l().createElement("span",{key:e.key,className:e.className},e.value)));return 0===o.length?null:l().createElement("div",{className:"d-flex justify-content-between"},o)}(),e.children)}));function m({tooltipDataLabelKey:e,tooltipDataValueKey:t,tooltipDataTitleKey:a,otherId:o,otherLabel:r,numberToStringFormatter:n,withColor:s,className:c="tooltip-background"}){return m=>{let d={...m.data,value:m.data?.value,label:m.data?.label,id:m.data?.id,percentage:m.data?.percentage};return l().createElement(i,{otherId:o,otherLabel:r,numberToStringFormatter:n,data:d,tooltipDataLabelKey:e,tooltipDataTitleKey:a,tooltipDataValueKey:t,className:c??"",color:s?m.color:void 0})}}i.displayName="StatisticsTooltip"},5909:(e,t,a)=>{a.d(t,{Ow:()=>o});a(4915);function o(e){return`${parseInt(e?.toFixed?.(0),10)}%`}},4915:(e,t,a)=>{a(5692),a(8156),a(3642)},5692:t=>{t.exports=e},8310:e=>{e.exports=t},8156:e=>{e.exports=a},8721:e=>{e.exports=o},1082:e=>{e.exports=r},8763:e=>{e.exports=l}},c={};function i(e){var t=c[e];if(void 0!==t)return t.exports;var a=c[e]={exports:{}};return s[e](a,a.exports,i),a.exports}i.m=s,n=[],i.O=(e,t,a,o)=>{if(!t){var r=1/0;for(m=0;m<n.length;m++){for(var[t,a,o]=n[m],l=!0,s=0;s<t.length;s++)(!1&o||r>=o)&&Object.keys(i.O).every((e=>i.O[e](t[s])))?t.splice(s--,1):(l=!1,o<r&&(r=o));if(l){n.splice(m--,1);var c=a();void 0!==c&&(e=c)}}return e}o=o||0;for(var m=n.length;m>0&&n[m-1][2]>o;m--)n[m]=n[m-1];n[m]=[t,a,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={9811:0,76:0};i.O.j=t=>0===e[t];var t=(t,a)=>{var o,r,[l,n,s]=a,c=0;if(l.some((t=>0!==e[t]))){for(o in n)i.o(n,o)&&(i.m[o]=n[o]);if(s)var m=s(i)}for(t&&t(a);c<l.length;c++)r=l[c],i.o(e,r)&&e[r]&&e[r][0](),e[l[c]]=0;return i.O(m)},a=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var m=i.O(void 0,[76],(()=>i(9274)));return m=i.O(m)})()}));
|
package/Suggester/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/pro-light-svg-icons/faSearch"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-select"),require("react-select/async")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/pro-light-svg-icons/faSearch","@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText","react-select","react-select/async"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/pro-light-svg-icons/faSearch"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-select"),require("react-select/async")):e["atoka-design-system"]=t(e["@fortawesome/pro-light-svg-icons/faSearch"],e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"],e["react-select"],e["react-select/async"])}(self,(function(e,t,n,r,o,i,a,l,s){return(()=>{"use strict";var p,u={6627:(e,t,n)=>{n.d(t,{MR:()=>i,ZP:()=>l});var r=n(4329);function o(e){return o="function"==typeof Symbol&&"symbol"===(0,r.Z)(Symbol.iterator)?function(e){return(0,r.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,r.Z)(e)},o(e)}function i(e,t,n){var r=n.value;if("function"!=typeof r)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(o(r)));var i=!1;return{configurable:!0,get:function(){if(i||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof r)return r;var n=r.bind(this);return i=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return n},set:function(e){r=e,delete this[t]}}),i=!1,n},set:function(e){r=e}}}function a(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,i(e,t,n))}})),e}function l(){return 1===arguments.length?a.apply(void 0,arguments):i.apply(void 0,arguments)}},3642:(e,t,n)=>{var r=n(8156),o=n.n(r),i=n(8310),a=n.n(i),l=n(8721),s=n.n(l),p=n(7269),u=n(2380),c=n(5145),f=n(8672),d=n(2722),y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},y.apply(this,arguments)},h=function(e){var t=a()(null==e?void 0:e.className,"atoka-form");return o().createElement(s(),y({},e,{className:t}),e.children)};h.displayName="Form",h.Control=u.N,h.Label=p.l,h.Checkbox=c.z,h.Radio=f.w,h.File=s().File,h.Switch=s().Switch,h.Help=d.y,h.Group=s().Group},5145:(e,t,n)=>{n.d(t,{z:()=>u});var r=n(8156),o=n.n(r),i=n(8310),a=n.n(i),l=n(8721),s=n.n(l),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},u=function(e){var t,n=a()("atoka-form-checkbox",null==e?void 0:e.className);return o().createElement(s().Check,p({type:"checkbox"},e,{custom:!0,className:n,label:null!==(t=e.label)&&void 0!==t?t:""}))};u.displayName="FormCheckbox"},2380:(e,t,n)=>{n.d(t,{N:()=>f});var r=n(8156),o=n.n(r),i=n(8310),a=n.n(i),l=n(1082),s=n.n(l),p=n(7605),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},c=o().forwardRef((function(e,t){var n=e.size,r=void 0===n?"md":n,i=u(e,["size"]),l=a()("atoka-form-control",null==i?void 0:i.className,{"atoka-shadow":i.withShadow,disabled:i.disabled});return o().createElement(s(),{as:i.as,rows:i.rows,cols:i.cols,placeholder:i.placeholder,className:l,disabled:i.disabled,readOnly:i.readOnly,value:i.value,onChange:i.onChange,onKeyPress:i.onKeyPress,onKeyDown:i.onKeyDown,defaultValue:i.defaultValue,size:"md"===r?void 0:r,type:i.type,id:i.id,isValid:i.isValid,isInvalid:i.isInvalid,ref:t,autoComplete:"off"},i.children)}));c.displayName="FormControlComponent";var f=c;f.FeedBack=p.t,f.displayName="FormControl"},7605:(e,t,n)=>{n.d(t,{t:()=>u});var r=n(8156),o=n.n(r),i=n(8310),a=n.n(i),l=n(1082),s=n.n(l),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},u=o().memo((function(e){var t=e.show,n=void 0===t||t,r=p(e,["show"]),i=a()(null==r?void 0:r.className,"atoka-form-control-feedback",{"d-block":n});return o().createElement(s().Feedback,{type:r.type,className:i},r.children)}));u.displayName="FormControlFeedBack"},2722:(e,t,n)=>{n.d(t,{y:()=>u});var r=n(8763),o=n.n(r),i=n(8156),a=n.n(i),l=n(8310),s=n.n(l),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},u=a().memo((function(e){var t=e.children,n=p(e,["children"]),r=s()("d-block",null==n?void 0:n.className);return a().createElement(o(),{bsPrefix:"atoka-form-help",className:r},t)}));u.displayName="FormHelp"},7269:(e,t,n)=>{n.d(t,{l:()=>p});var r=n(8156),o=n.n(r),i=n(8310),a=n.n(i),l=n(8721),s=n.n(l),p=o().memo((function(e){var t=a()(null==e?void 0:e.className,"atoka-form-label");return o().createElement(s().Label,{className:t},e.children)}));p.displayName="FormLabel"},8672:(e,t,n)=>{n.d(t,{w:()=>u});var r=n(8156),o=n.n(r),i=n(8310),a=n.n(i),l=n(8721),s=n.n(l),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},u=function(e){var t,n=a()(null==e?void 0:e.className,"atoka-form-radio");return o().createElement(s().Check,p({type:"radio"},e,{custom:!0,className:n,label:null!==(t=e.label)&&void 0!==t?t:""}))};u.displayName="FormRadio"},8265:(e,t,n)=>{n.d(t,{HighlightableText:()=>d});var r,o=n(6627),i=n(8310),a=n.n(i),l=n(8156),s=n.n(l),p=n(2394),u=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},f=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n;return u(t,e),t.prototype.needToHighlight=function(){return!(0,p.Wq)(this.props.highlighted)},t.prototype.getParts=function(){if("string"!=typeof this.props.children)throw Error("In this component, children have to be a string");return(0,p.ho)(this.props.highlighted,this.props.children)},t.prototype.renderPart=function(e,t){var n,r=(0,p.OH)(e,this.props.highlighted),o=a()("atoka-highlightable-text",this.props.size,((n={"text-muted":!0===this.props.isDisabled,bold:this.props.isBold,"selected-text":r})[this.props.highlightColor]=r,n)),i=e;return r&&(i=s().createElement("strong",null,e)),s().createElement("span",{key:"".concat(e,"-").concat(t),className:o},i)},t.prototype.highlightedText=function(){var e=this.getParts();return null==e?null:s().createElement("span",{className:this.props.className},e.map(this.renderPart))},t.prototype.render=function(){var e=this.props.children,t=a()("atoka-highlightable-text",this.props.highlightColor,this.props.size,this.props.className,{"text-muted":!0===this.props.isDisabled,bold:this.props.isBold});return"string"!=typeof e?s().createElement("span",{className:t},e):this.needToHighlight()?this.highlightedText():s().createElement("span",{className:t},e)},t.displayName="HighlightableText",t.defaultProps={size:"md",highlightColor:"orange"},c([o.MR,f("design:type",Function),f("design:paramtypes",[String,Number]),f("design:returntype","function"==typeof(n=void 0!==s()&&s().ReactNode)?n:Object)],t.prototype,"renderPart",null),t}(s().PureComponent)},2656:(e,t,n)=>{n.r(t),n.d(t,{CustomOptionProps:()=>r.CustomOptionProps,RenderMultiValueContainer:()=>o.RenderMultiValueContainer,Suggester:()=>Z,SuggesterProps:()=>o.SuggesterProps,getRenderCustomMultiValueWithIcon:()=>S});var r={};n.r(r),n.d(r,{W:()=>d});var o={};n.r(o),n.d(o,{_:()=>Z});var i=n(8156),a=n.n(i),l=n(6627),s=n(4589),p=n(8310),u=n.n(p),c=n(8265),f=n(2394),d=function(e){var t=e.item,n=e.optionDataValueKey,r=e.optionDataLabelKey,o=e.optionDataCustomValueKey,i=e.children,l=e.selectedText,s=e.className;function p(e){return(0,f.Wq)(l)?t[e]:a().createElement(c.HighlightableText,{highlighted:l},t[e])}var d,y,h="",m=null;n&&null!=t[n]&&(h=p(n)),r&&null!=t[r]&&(y=r,h=""===(d=h)?a().createElement("span",{className:"label"},p(y)):a().createElement(a().Fragment,null,a().createElement("span",{className:"label mr-1"},d,":"),p(y))),o&&null!=t[o]&&(m=a().createElement("span",{className:"custom-value ml-2"},t[o]));var g=u()("option-data-item overflow-hidden",s);return a().createElement("span",{className:g},h,m,i)};d.displayName="CustomOption";var y=n(1738),h=n.n(y),m=n(1553),g=n.n(m),v=n(8427),b=n(5692),O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},O.apply(this,arguments)},w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},P=function(e){var t=e.children,n=e.icon,r=w(e,["children","icon"]);return null==y.components.ValueContainer?null:a().createElement(y.components.ValueContainer,O({},r,{className:"input-value-container"}),null==t||null==n?null:a().createElement(b.FontAwesomeIcon,{icon:n}),t)};P.displayName="InputValueContainer";var j,C=function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)},S=function(e,t){return void 0===t&&(t="blue300"),function(n){var r=u()("custom-multi-value-with-icon",n.className,t),o=u()({"ml-1":null!=e,"ml-2":null==e});return a().createElement(y.components.MultiValue,C({},n,{className:r}),null==e?null:a().createElement("div",{className:"icon-container"},a().createElement(b.FontAwesomeIcon,{icon:e})),a().createElement("span",{className:o},n.data.label))}},x=(j=function(e,t){return j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},j(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}j(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),N=function(){return N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},N.apply(this,arguments)},E=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},M=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},F=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},R=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},k=function(e,t){return a().createElement(Z.CustomOption,{item:e,optionDataValueKey:"label",selectedText:t})},T=S(),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var n,r,o,i,p,c,f,d,m;return x(t,e),Object.defineProperty(t.prototype,"hasError",{get:function(){return!!this.props.hasError&&!(0,s.isStringEmpty)(this.props.insertedText)},enumerable:!1,configurable:!0}),t.prototype.getNoResultsText=function(){var e,t,n;return this.hasError?null!==(t=null===(e=this.props)||void 0===e?void 0:e.errorMessage)&&void 0!==t?t:"":(0,s.isStringEmpty)(this.props.insertedText)?null!==(n=this.props.emptyMessage)&&void 0!==n?n:"":this.props.noResultsMessage},t.prototype.renderNoOptionsMessage=function(e){var t=u()({invalid:this.hasError});return a().createElement(y.components.NoOptionsMessage,N({},e,{className:t}),this.getNoResultsText())},t.prototype.renderLoadingMessage=function(e){return a().createElement(y.components.LoadingMessage,N({},e),this.props.children)},t.prototype.renderOptionContainer=function(e){var t,n,r=[e.data];return this.props.withHighlight&&r.push(this.props.insertedText),a().createElement(y.components.Option,N({},e),null===(n=(t=this.props).renderSuggestedOption)||void 0===n?void 0:n.call.apply(n,R([t],F(r),!1)))},t.prototype.renderValueContainer=function(e){return a().createElement(P,N({icon:this.props.icon},e),e.children)},t.prototype.isOptionDisabled=function(e){var t,n;return null!=(null===(t=this.props)||void 0===t?void 0:t.selectedOption)&&(null==e?void 0:e.value)===(null===(n=this.props.selectedOption)||void 0===n?void 0:n.value)},t.prototype.loadOptions=function(e,t){var n,r;null===(r=null===(n=this.props)||void 0===n?void 0:n.loadOptions)||void 0===r||r.call(n,e,t)},t.prototype.getOptionsAsync=function(e,t){var n,r,o=this;null==this.props.debouncer&&this.loadOptions(e,t),null===(r=null===(n=this.props)||void 0===n?void 0:n.debouncer)||void 0===r||r.call(n,(function(){return o.loadOptions(e,t)}))},t.prototype.getComponentsConfig=function(){return{Option:this.renderOptionContainer,ValueContainer:this.renderValueContainer,IndicatorsContainer:function(){return null},NoOptionsMessage:this.renderNoOptionsMessage,LoadingMessage:this.renderLoadingMessage,MultiValue:this.props.renderMultiValueContainer}},t.prototype.render=function(){var e,t,n,r=u()("atoka-suggester",this.props.className,{"atoka-shadow":!0===this.props.withShadow,"with-icon":null!=this.props.icon}),o={value:null===(e=this.props)||void 0===e?void 0:e.value,isClearable:!1,components:this.getComponentsConfig(),classNamePrefix:"suggester",placeholder:this.props.placeholder,isOptionDisabled:this.isOptionDisabled,filterOption:this.props.filterOption,onInputChange:this.props.onInputChange,inputValue:this.props.insertedText,isMulti:this.props.isMulti,isDisabled:this.props.isDisabled,onChange:this.props.onChange,onMenuOpen:this.props.onMenuOpen,onMenuClose:this.props.onMenuClose};return this.props.isAsync?a().createElement("div",{className:r},a().createElement(g(),N({},o,{value:this.props.value,loadOptions:this.getOptionsAsync,defaultOptions:this.props.options}))):a().createElement("div",{className:r},a().createElement(h(),N({},o,{menuPosition:this.props.isFixed?"fixed":void 0,defaultValue:null===(t=this.props)||void 0===t?void 0:t.selectedOption,options:null!==(n=this.props.options)&&void 0!==n?n:[]})))},t.displayName="SuggesterUI",t.defaultProps={withShadow:!1,withHighlight:!1,isAsync:!1,isMulti:!1,hasError:!1,renderSuggestedOption:k,errorMessage:"Error!",emptyMessage:"",noResultsMessage:"",icon:v.faSearch,renderMultiValueContainer:T},E([l.ZP,M("design:type",Function),M("design:paramtypes",[]),M("design:returntype",String)],t.prototype,"getNoResultsText",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",["function"==typeof(n=void 0!==y.OptionProps&&y.OptionProps)?n:Object]),M("design:returntype","function"==typeof(r="undefined"!=typeof JSX&&JSX.Element)?r:Object)],t.prototype,"renderNoOptionsMessage",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",["function"==typeof(o=void 0!==y.OptionProps&&y.OptionProps)?o:Object]),M("design:returntype","function"==typeof(i="undefined"!=typeof JSX&&JSX.Element)?i:Object)],t.prototype,"renderLoadingMessage",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",["function"==typeof(p=void 0!==y.OptionProps&&y.OptionProps)?p:Object]),M("design:returntype","function"==typeof(c="undefined"!=typeof JSX&&JSX.Element)?c:Object)],t.prototype,"renderOptionContainer",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",["function"==typeof(f=void 0!==y.ValueContainerProps&&y.ValueContainerProps)?f:Object]),M("design:returntype","function"==typeof(d="undefined"!=typeof JSX&&JSX.Element)?d:Object)],t.prototype,"renderValueContainer",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",["function"==typeof(m=void 0!==s.OptionData&&s.OptionData)?m:Object]),M("design:returntype",Boolean)],t.prototype,"isOptionDisabled",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",[String,Function]),M("design:returntype",void 0)],t.prototype,"loadOptions",null),E([l.ZP,M("design:type",Function),M("design:paramtypes",[String,Function]),M("design:returntype",void 0)],t.prototype,"getOptionsAsync",null),t}(a().Component),V=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),q=function(){return q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},q.apply(this,arguments)},D=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},I=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Z=function(e){function t(t){var n=e.call(this,t)||this,r=t.isMulti?null:t.value;return n.state={value:r,insertedText:""},n}return V(t,e),t.prototype.componentDidUpdate=function(e){this.props.isMulti||this.props.value===e.value||this.setState({value:this.props.value})},t.prototype.handleOnInputChange=function(e){var t,n;return(0,s.isStringEmpty)(e)&&(null===(n=(t=this.props).onReset)||void 0===n||n.call(t)),this.setState({insertedText:e}),e},t.prototype.getNewItem=function(e){return null==e?[]:Array.isArray(e)?e:[e]},t.prototype.handleChange=function(e){var t,n,r={insertedText:""};this.setState({insertedText:""});var o=this.getNewItem(e);null===(n=null===(t=this.props)||void 0===t?void 0:t.onChange)||void 0===n||n.call(t,o,this.state.insertedText),this.props.isMulti||(r.value=0===o.length?null:o),this.setState(r)},t.prototype.handleOnMenuOpen=function(){this.props.isMulti||null==this.state.value||this.setState({value:null})},t.prototype.handleOnMenuClose=function(){var e,t;null===(t=null===(e=this.props)||void 0===e?void 0:e.onReset)||void 0===t||t.call(e),this.props.isMulti||this.setState({value:this.props.value})},t.prototype.render=function(){return a().createElement(_,q({},this.props,{value:this.props.isMulti?this.props.value:this.state.value,insertedText:this.state.insertedText,onChange:this.handleChange,onInputChange:this.handleOnInputChange,onMenuOpen:this.handleOnMenuOpen,onMenuClose:this.handleOnMenuClose}))},t.displayName="Suggester",t.CustomOption=d,D([l.ZP,I("design:type",Function),I("design:paramtypes",[String]),I("design:returntype",String)],t.prototype,"handleOnInputChange",null),D([l.ZP,I("design:type",Function),I("design:paramtypes",[Object]),I("design:returntype",void 0)],t.prototype,"handleChange",null),D([l.ZP,I("design:type",Function),I("design:paramtypes",[]),I("design:returntype",void 0)],t.prototype,"handleOnMenuOpen",null),D([l.ZP,I("design:type",Function),I("design:paramtypes",[]),I("design:returntype",void 0)],t.prototype,"handleOnMenuClose",null),t}(a().Component)},3654:()=>{},5909:(e,t,n)=>{n(4915)},2394:(e,t,n)=>{n.d(t,{Wq:()=>a,OH:()=>s,ho:()=>p});var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function a(e){return null==e||null!==e.match(/^\s*$/)}function l(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function s(e,t){var n,o;if(null==e||null==t)return!1;if(e=e.toLowerCase(),null===(t=t.toLowerCase()).match(" "))return null!==e.match(l(t));var i=t.split(" ").filter((function(e){return!a(e)})).sort((function(e,t){return t.length-e.length}));try{for(var s=r(i),p=s.next();!p.done;p=s.next()){if(e===p.value)return!0}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return!1}function p(e,t){var n,p;if(null==t)return[];if(null===(e=l(e)).match(" ")){var u=new RegExp("("+e+")","gi");return t.split(u)}var c=e.split(" ").filter((function(e){return!a(e)})).sort((function(e,t){return t.length-e.length})),f=[t];try{for(var d=r(c),y=d.next();!y.done;y=d.next())for(var h=y.value,m=(u=new RegExp("("+h+")","gi"),0);m<f.length;m++){var g=f[m];if(!s(g,e)){var v=g.split(u).filter((function(e){return""!==e}));f.splice.apply(f,i([m,1],o(v),!1))}}}catch(e){n={error:e}}finally{try{y&&!y.done&&(p=d.return)&&p.call(d)}finally{if(n)throw n.error}}return f}},4915:(e,t,n)=>{n(5692),n(8156),n(3642)},4589:(e,t,n)=>{n.d(t,{OptionData:()=>r.nJ,isStringEmpty:()=>o.Wq});var r=n(3654),o=(n(5909),n(4915),n(2394))},8427:t=>{t.exports=e},5692:e=>{e.exports=t},8310:e=>{e.exports=n},8156:e=>{e.exports=r},8721:e=>{e.exports=o},1082:e=>{e.exports=i},8763:e=>{e.exports=a},1738:e=>{e.exports=l},1553:e=>{e.exports=s},4329:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:()=>r})}},c={};function f(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return u[e](n,n.exports,f),n.exports}f.m=u,p=[],f.O=(e,t,n,r)=>{if(!t){var o=1/0;for(s=0;s<p.length;s++){for(var[t,n,r]=p[s],i=!0,a=0;a<t.length;a++)(!1&r||o>=r)&&Object.keys(f.O).every((e=>f.O[e](t[a])))?t.splice(a--,1):(i=!1,r<o&&(o=r));if(i){p.splice(s--,1);var l=n();void 0!==l&&(e=l)}}return e}r=r||0;for(var s=p.length;s>0&&p[s-1][2]>r;s--)p[s]=p[s-1];p[s]=[t,n,r]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={4659:0,4953:0,8172:0};f.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,a,l]=n,s=0;if(i.some((t=>0!==e[t]))){for(r in a)f.o(a,r)&&(f.m[r]=a[r]);if(l)var p=l(f)}for(t&&t(n);s<i.length;s++)o=i[s],f.o(e,o)&&e[o]&&e[o][0](),e[i[s]]=0;return f.O(p)},n=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var d=f.O(void 0,[8172],(()=>f(2656)));return d=f.O(d)})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/pro-light-svg-icons/faSearch"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-select"),require("react-select/async")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/pro-light-svg-icons/faSearch","@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText","react-select","react-select/async"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/pro-light-svg-icons/faSearch"),require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText"),require("react-select"),require("react-select/async")):e["atoka-design-system"]=t(e["@fortawesome/pro-light-svg-icons/faSearch"],e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"],e["react-select"],e["react-select/async"])}(self,(function(e,t,n,o,r,s,a,i,l){return(()=>{"use strict";var p,c={8572:(e,t,n)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e,t,n){var r=n.value;if("function"!=typeof r)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(o(r)));var s=!1;return{configurable:!0,get:function(){if(s||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof r)return r;var n=r.bind(this);return s=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return n},set:function(e){r=e,delete this[t]}}),s=!1,n},set:function(e){r=e}}}function s(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,r(e,t,n))}})),e}function a(){return 1===arguments.length?s.apply(void 0,arguments):r.apply(void 0,arguments)}n.d(t,{MR:()=>r,ZP:()=>a})},3642:(e,t,n)=>{var o=n(8156),r=n.n(o),s=n(8310),a=n.n(s),i=n(8721),l=n.n(i),p=n(7269),c=n(2380),u=n(5145),d=n(8672),h=n(2722);const g=e=>{const t=a()(e?.className,"atoka-form");return r().createElement(l(),{...e,className:t},e.children)};g.displayName="Form",g.Control=c.N,g.Label=p.l,g.Checkbox=u.z,g.Radio=d.w,g.File=l().File,g.Switch=l().Switch,g.Help=h.y,g.Group=l().Group},5145:(e,t,n)=>{n.d(t,{z:()=>p});var o=n(8156),r=n.n(o),s=n(8310),a=n.n(s),i=n(8721),l=n.n(i);const p=e=>{const t=a()("atoka-form-checkbox",e?.className);return r().createElement(l().Check,{type:"checkbox",...e,custom:!0,className:t,label:e.label??""})};p.displayName="FormCheckbox"},2380:(e,t,n)=>{n.d(t,{N:()=>u});var o=n(8156),r=n.n(o),s=n(8310),a=n.n(s),i=n(1082),l=n.n(i),p=n(7605);const c=r().forwardRef((({size:e="md",...t},n)=>{const o=a()("atoka-form-control",t?.className,{"atoka-shadow":t.withShadow,disabled:t.disabled});return r().createElement(l(),{as:t.as,rows:t.rows,cols:t.cols,placeholder:t.placeholder,className:o,disabled:t.disabled,readOnly:t.readOnly,value:t.value,onChange:t.onChange,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,defaultValue:t.defaultValue,size:"md"===e?void 0:e,type:t.type,id:t.id,isValid:t.isValid,isInvalid:t.isInvalid,ref:n,autoComplete:"off"},t.children)}));c.displayName="FormControlComponent";const u=c;u.FeedBack=p.t,u.displayName="FormControl"},7605:(e,t,n)=>{n.d(t,{t:()=>p});var o=n(8156),r=n.n(o),s=n(8310),a=n.n(s),i=n(1082),l=n.n(i);const p=r().memo((({show:e=!0,...t})=>{const n=a()(t?.className,"atoka-form-control-feedback",{"d-block":e});return r().createElement(l().Feedback,{type:t.type,className:n},t.children)}));p.displayName="FormControlFeedBack"},2722:(e,t,n)=>{n.d(t,{y:()=>p});var o=n(8763),r=n.n(o),s=n(8156),a=n.n(s),i=n(8310),l=n.n(i);const p=a().memo((({children:e,...t})=>{const n=l()("d-block",t?.className);return a().createElement(r(),{bsPrefix:"atoka-form-help",className:n},e)}));p.displayName="FormHelp"},7269:(e,t,n)=>{n.d(t,{l:()=>p});var o=n(8156),r=n.n(o),s=n(8310),a=n.n(s),i=n(8721),l=n.n(i);const p=r().memo((e=>{const t=a()(e?.className,"atoka-form-label");return r().createElement(l().Label,{className:t},e.children)}));p.displayName="FormLabel"},8672:(e,t,n)=>{n.d(t,{w:()=>p});var o=n(8156),r=n.n(o),s=n(8310),a=n.n(s),i=n(8721),l=n.n(i);const p=e=>{const t=a()(e?.className,"atoka-form-radio");return r().createElement(l().Check,{type:"radio",...e,custom:!0,className:t,label:e.label??""})};p.displayName="FormRadio"},8265:(e,t,n)=>{n.d(t,{HighlightableText:()=>HighlightableText});var o,r=n(8572),s=n(8310),a=n.n(s),i=n(8156),l=n.n(i),p=n(2394),c=function(e,t,n,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(a=(s<3?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},u=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class HighlightableText extends l().PureComponent{static displayName="HighlightableText";static defaultProps={size:"md",highlightColor:"orange"};needToHighlight(){return!(0,p.Wq)(this.props.highlighted)}getParts(){if("string"!=typeof this.props.children)throw Error("In this component, children have to be a string");return(0,p.ho)(this.props.highlighted,this.props.children)}renderPart(e,t){let n=(0,p.OH)(e,this.props.highlighted),o=a()("atoka-highlightable-text",this.props.size,{"text-muted":!0===this.props.isDisabled,bold:this.props.isBold,"selected-text":n,[this.props.highlightColor]:n}),r=e;return n&&(r=l().createElement("strong",null,e)),l().createElement("span",{key:`${e}-${t}`,className:o},r)}highlightedText(){let e=this.getParts();return null==e?null:l().createElement("span",{className:this.props.className},e.map(this.renderPart))}render(){let e=this.props.children,t=a()("atoka-highlightable-text",this.props.highlightColor,this.props.size,this.props.className,{"text-muted":!0===this.props.isDisabled,bold:this.props.isBold});return"string"!=typeof e?l().createElement("span",{className:t},e):this.needToHighlight()?this.highlightedText():l().createElement("span",{className:t},e)}}c([r.MR,u("design:type",Function),u("design:paramtypes",[String,Number]),u("design:returntype","function"==typeof(o=void 0!==l()&&l().ReactNode)?o:Object)],HighlightableText.prototype,"renderPart",null)},2656:(e,t,n)=>{n.r(t),n.d(t,{CustomOptionProps:()=>o.CustomOptionProps,RenderMultiValueContainer:()=>r.RenderMultiValueContainer,Suggester:()=>Suggester,SuggesterProps:()=>r.SuggesterProps,getRenderCustomMultiValueWithIcon:()=>C});var o={};n.r(o),n.d(o,{W:()=>h});var r={};n.r(r),n.d(r,{_:()=>Suggester});var s=n(8156),a=n.n(s),i=n(8572),l=n(4589),p=n(8310),c=n.n(p),u=n(8265),d=n(2394);const h=({item:e,optionDataValueKey:t,optionDataLabelKey:n,optionDataCustomValueKey:o,children:r,selectedText:s,className:i})=>{function l(t){return(0,d.Wq)(s)?e[t]:a().createElement(u.HighlightableText,{highlighted:s},e[t])}let p="",h=null;var g,m;t&&null!=e[t]&&(p=l(t)),n&&null!=e[n]&&(m=n,p=""===(g=p)?a().createElement("span",{className:"label"},l(m)):a().createElement(a().Fragment,null,a().createElement("span",{className:"label mr-1"},g,":"),l(m))),o&&null!=e[o]&&(h=a().createElement("span",{className:"custom-value ml-2"},e[o]));const f=c()("option-data-item overflow-hidden",i);return a().createElement("span",{className:f},p,h,r)};h.displayName="CustomOption";var g=n(1738),m=n.n(g),f=n(1553),y=n.n(f),b=n(8427),O=n(5692);const v=({children:e,icon:t,...n})=>null==g.components.ValueContainer?null:a().createElement(g.components.ValueContainer,{...n,className:"input-value-container"},null==e||null==t?null:a().createElement(O.FontAwesomeIcon,{icon:t}),e);v.displayName="InputValueContainer";const C=(e,t="blue300")=>n=>{let o=c()("custom-multi-value-with-icon",n.className,t),r=c()({"ml-1":null!=e,"ml-2":null==e});return a().createElement(g.components.MultiValue,{...n,className:o},null==e?null:a().createElement("div",{className:"icon-container"},a().createElement(O.FontAwesomeIcon,{icon:e})),a().createElement("span",{className:r},n.data.label))};var S,x,N,w,P,E,M,F,R,j=function(e,t,n,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(a=(s<3?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},k=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};const T=(e,t)=>a().createElement(Suggester.CustomOption,{item:e,optionDataValueKey:"label",selectedText:t}),I=C();class SuggesterUI extends a().Component{static displayName="SuggesterUI";static defaultProps={withShadow:!1,withHighlight:!1,isAsync:!1,isMulti:!1,hasError:!1,renderSuggestedOption:T,errorMessage:"Error!",emptyMessage:"",noResultsMessage:"",icon:b.faSearch,renderMultiValueContainer:I};get hasError(){return!!this.props.hasError&&!(0,l.isStringEmpty)(this.props.insertedText)}getNoResultsText(){return this.hasError?this.props?.errorMessage??"":(0,l.isStringEmpty)(this.props.insertedText)?this.props.emptyMessage??"":this.props.noResultsMessage}renderNoOptionsMessage(e){const t=c()({invalid:this.hasError});return a().createElement(g.components.NoOptionsMessage,{...e,className:t},this.getNoResultsText())}renderLoadingMessage(e){return a().createElement(g.components.LoadingMessage,{...e},this.props.children)}renderOptionContainer(e){let t=[e.data];return this.props.withHighlight&&t.push(this.props.insertedText),a().createElement(g.components.Option,{...e},this.props.renderSuggestedOption?.(...t))}renderValueContainer(e){return a().createElement(v,{icon:this.props.icon,...e},e.children)}isOptionDisabled(e){return null!=this.props?.selectedOption&&e?.value===this.props.selectedOption?.value}loadOptions(e,t){this.props?.loadOptions?.(e,t)}getOptionsAsync(e,t){null==this.props.debouncer&&this.loadOptions(e,t),this.props?.debouncer?.((()=>this.loadOptions(e,t)))}getComponentsConfig(){return{Option:this.renderOptionContainer,ValueContainer:this.renderValueContainer,IndicatorsContainer:()=>null,NoOptionsMessage:this.renderNoOptionsMessage,LoadingMessage:this.renderLoadingMessage,MultiValue:this.props.renderMultiValueContainer}}render(){const e=c()("atoka-suggester",this.props.className,{"atoka-shadow":!0===this.props.withShadow,"with-icon":null!=this.props.icon}),t={value:this.props?.value,isClearable:!1,components:this.getComponentsConfig(),classNamePrefix:"suggester",placeholder:this.props.placeholder,isOptionDisabled:this.isOptionDisabled,filterOption:this.props.filterOption,onInputChange:this.props.onInputChange,inputValue:this.props.insertedText,isMulti:this.props.isMulti,isDisabled:this.props.isDisabled,onChange:this.props.onChange,onMenuOpen:this.props.onMenuOpen,onMenuClose:this.props.onMenuClose};return this.props.isAsync?a().createElement("div",{className:e},a().createElement(y(),{...t,value:this.props.value,loadOptions:this.getOptionsAsync,defaultOptions:this.props.options})):a().createElement("div",{className:e},a().createElement(m(),{...t,menuPosition:this.props.isFixed?"fixed":void 0,defaultValue:this.props?.selectedOption,options:this.props.options??[]}))}}j([i.ZP,k("design:type",Function),k("design:paramtypes",[]),k("design:returntype",String)],SuggesterUI.prototype,"getNoResultsText",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(S=void 0!==g.OptionProps&&g.OptionProps)?S:Object]),k("design:returntype","function"==typeof(x="undefined"!=typeof JSX&&JSX.Element)?x:Object)],SuggesterUI.prototype,"renderNoOptionsMessage",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(N=void 0!==g.OptionProps&&g.OptionProps)?N:Object]),k("design:returntype","function"==typeof(w="undefined"!=typeof JSX&&JSX.Element)?w:Object)],SuggesterUI.prototype,"renderLoadingMessage",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(P=void 0!==g.OptionProps&&g.OptionProps)?P:Object]),k("design:returntype","function"==typeof(E="undefined"!=typeof JSX&&JSX.Element)?E:Object)],SuggesterUI.prototype,"renderOptionContainer",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(M=void 0!==g.ValueContainerProps&&g.ValueContainerProps)?M:Object]),k("design:returntype","function"==typeof(F="undefined"!=typeof JSX&&JSX.Element)?F:Object)],SuggesterUI.prototype,"renderValueContainer",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",["function"==typeof(R=void 0!==l.OptionData&&l.OptionData)?R:Object]),k("design:returntype",Boolean)],SuggesterUI.prototype,"isOptionDisabled",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",[String,Function]),k("design:returntype",void 0)],SuggesterUI.prototype,"loadOptions",null),j([i.ZP,k("design:type",Function),k("design:paramtypes",[String,Function]),k("design:returntype",void 0)],SuggesterUI.prototype,"getOptionsAsync",null);var V=function(e,t,n,o){var r,s=arguments.length,a=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(a=(s<3?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a},q=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Suggester extends a().Component{static displayName="Suggester";static CustomOption=h;constructor(e){super(e);const t=e.isMulti?null:e.value;this.state={value:t,insertedText:""}}componentDidUpdate(e){this.props.isMulti||this.props.value===e.value||this.setState({value:this.props.value})}handleOnInputChange(e){return(0,l.isStringEmpty)(e)&&this.props.onReset?.(),this.setState({insertedText:e}),e}getNewItem(e){return null==e?[]:Array.isArray(e)?e:[e]}handleChange(e){const t={insertedText:""};this.setState({insertedText:""});const n=this.getNewItem(e);this.props?.onChange?.(n,this.state.insertedText),this.props.isMulti||(t.value=0===n.length?null:n),this.setState(t)}handleOnMenuOpen(){this.props.isMulti||null==this.state.value||this.setState({value:null})}handleOnMenuClose(){this.props?.onReset?.(),this.props.isMulti||this.setState({value:this.props.value})}render(){return a().createElement(SuggesterUI,{...this.props,value:this.props.isMulti?this.props.value:this.state.value,insertedText:this.state.insertedText,onChange:this.handleChange,onInputChange:this.handleOnInputChange,onMenuOpen:this.handleOnMenuOpen,onMenuClose:this.handleOnMenuClose})}}V([i.ZP,q("design:type",Function),q("design:paramtypes",[String]),q("design:returntype",String)],Suggester.prototype,"handleOnInputChange",null),V([i.ZP,q("design:type",Function),q("design:paramtypes",[Object]),q("design:returntype",void 0)],Suggester.prototype,"handleChange",null),V([i.ZP,q("design:type",Function),q("design:paramtypes",[]),q("design:returntype",void 0)],Suggester.prototype,"handleOnMenuOpen",null),V([i.ZP,q("design:type",Function),q("design:paramtypes",[]),q("design:returntype",void 0)],Suggester.prototype,"handleOnMenuClose",null)},3654:()=>{},5909:(e,t,n)=>{n(4915)},2394:(e,t,n)=>{function o(e){return null==e||null!==e.match(/^\s*$/)}function r(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function s(e,t){if(null==e||null==t)return!1;if(e=e.toLowerCase(),null===(t=t.toLowerCase()).match(" "))return null!==e.match(r(t));let n=t.split(" ").filter((e=>!o(e))).sort(((e,t)=>t.length-e.length));for(let t of n)if(e===t)return!0;return!1}function a(e,t){if(null==t)return[];if(null===(e=r(e)).match(" ")){let n=new RegExp("("+e+")","gi");return t.split(n)}let n=e.split(" ").filter((e=>!o(e))).sort(((e,t)=>t.length-e.length)),a=[t];for(let t of n){let n=new RegExp("("+t+")","gi");for(let t=0;t<a.length;t++){let o=a[t];if(s(o,e))continue;let r=o.split(n).filter((e=>""!==e));a.splice(t,1,...r)}}return a}n.d(t,{Wq:()=>o,OH:()=>s,ho:()=>a})},4915:(e,t,n)=>{n(5692),n(8156),n(3642)},4589:(e,t,n)=>{n.d(t,{OptionData:()=>o.nJ,isStringEmpty:()=>r.Wq});var o=n(3654),r=(n(5909),n(4915),n(2394))},8427:t=>{t.exports=e},5692:e=>{e.exports=t},8310:e=>{e.exports=n},8156:e=>{e.exports=o},8721:e=>{e.exports=r},1082:e=>{e.exports=s},8763:e=>{e.exports=a},1738:e=>{e.exports=i},1553:e=>{e.exports=l}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.m=c,p=[],d.O=(e,t,n,o)=>{if(!t){var r=1/0;for(l=0;l<p.length;l++){for(var[t,n,o]=p[l],s=!0,a=0;a<t.length;a++)(!1&o||r>=o)&&Object.keys(d.O).every((e=>d.O[e](t[a])))?t.splice(a--,1):(s=!1,o<r&&(r=o));if(s){p.splice(l--,1);var i=n();void 0!==i&&(e=i)}}return e}o=o||0;for(var l=p.length;l>0&&p[l-1][2]>o;l--)p[l]=p[l-1];p[l]=[t,n,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={4659:0,4953:0,76:0};d.O.j=t=>0===e[t];var t=(t,n)=>{var o,r,[s,a,i]=n,l=0;if(s.some((t=>0!==e[t]))){for(o in a)d.o(a,o)&&(d.m[o]=a[o]);if(i)var p=i(d)}for(t&&t(n);l<s.length;l++)r=s[l],d.o(e,r)&&e[r]&&e[r][0](),e[s[l]]=0;return d.O(p)},n=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var h=d.O(void 0,[76],(()=>d(2656)));return h=d.O(h)})()}));
|
package/SunBurst/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("@nivo/sunburst"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","@nivo/sunburst","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("@nivo/sunburst"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e["@nivo/sunburst"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,o,r,n,a,l){return(()=>{"use strict";var i,u={6627:(e,t,o)=>{o.d(t,{MR:()=>a});var r=o(4329);function n(e){return n="function"==typeof Symbol&&"symbol"===(0,r.Z)(Symbol.iterator)?function(e){return(0,r.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,r.Z)(e)},n(e)}function a(e,t,o){var r=o.value;if("function"!=typeof r)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(r)));var a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof r)return r;var o=r.bind(this);return a=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return o},set:function(e){r=e,delete this[t]}}),a=!1,o},set:function(e){r=e}}}},3642:(e,t,o)=>{var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(8721),u=o.n(i),s=o(7269),c=o(2380),p=o(5145),d=o(8672),f=o(2722),m=function(){return m=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},m.apply(this,arguments)},v=function(e){var t=l()(null==e?void 0:e.className,"atoka-form");return n().createElement(u(),m({},e,{className:t}),e.children)};v.displayName="Form",v.Control=c.N,v.Label=s.l,v.Checkbox=p.z,v.Radio=d.w,v.File=u().File,v.Switch=u().Switch,v.Help=f.y,v.Group=u().Group},5145:(e,t,o)=>{o.d(t,{z:()=>c});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(8721),u=o.n(i),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},c=function(e){var t,o=l()("atoka-form-checkbox",null==e?void 0:e.className);return n().createElement(u().Check,s({type:"checkbox"},e,{custom:!0,className:o,label:null!==(t=e.label)&&void 0!==t?t:""}))};c.displayName="FormCheckbox"},2380:(e,t,o)=>{o.d(t,{N:()=>d});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(1082),u=o.n(i),s=o(7605),c=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},p=n().forwardRef((function(e,t){var o=e.size,r=void 0===o?"md":o,a=c(e,["size"]),i=l()("atoka-form-control",null==a?void 0:a.className,{"atoka-shadow":a.withShadow,disabled:a.disabled});return n().createElement(u(),{as:a.as,rows:a.rows,cols:a.cols,placeholder:a.placeholder,className:i,disabled:a.disabled,readOnly:a.readOnly,value:a.value,onChange:a.onChange,onKeyPress:a.onKeyPress,onKeyDown:a.onKeyDown,defaultValue:a.defaultValue,size:"md"===r?void 0:r,type:a.type,id:a.id,isValid:a.isValid,isInvalid:a.isInvalid,ref:t,autoComplete:"off"},a.children)}));p.displayName="FormControlComponent";var d=p;d.FeedBack=s.t,d.displayName="FormControl"},7605:(e,t,o)=>{o.d(t,{t:()=>c});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(1082),u=o.n(i),s=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},c=n().memo((function(e){var t=e.show,o=void 0===t||t,r=s(e,["show"]),a=l()(null==r?void 0:r.className,"atoka-form-control-feedback",{"d-block":o});return n().createElement(u().Feedback,{type:r.type,className:a},r.children)}));c.displayName="FormControlFeedBack"},2722:(e,t,o)=>{o.d(t,{y:()=>c});var r=o(8763),n=o.n(r),a=o(8156),l=o.n(a),i=o(8310),u=o.n(i),s=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o},c=l().memo((function(e){var t=e.children,o=s(e,["children"]),r=u()("d-block",null==o?void 0:o.className);return l().createElement(n(),{bsPrefix:"atoka-form-help",className:r},t)}));c.displayName="FormHelp"},7269:(e,t,o)=>{o.d(t,{l:()=>s});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(8721),u=o.n(i),s=n().memo((function(e){var t=l()(null==e?void 0:e.className,"atoka-form-label");return n().createElement(u().Label,{className:t},e.children)}));s.displayName="FormLabel"},8672:(e,t,o)=>{o.d(t,{w:()=>c});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(8721),u=o.n(i),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},c=function(e){var t,o=l()(null==e?void 0:e.className,"atoka-form-radio");return n().createElement(u().Check,s({type:"radio"},e,{custom:!0,className:o,label:null!==(t=e.label)&&void 0!==t?t:""}))};c.displayName="FormRadio"},9274:(e,t,o)=>{o.d(t,{StatisticsTooltip:()=>u,getRenderStatisticsTooltip:()=>c});var r=o(8156),n=o.n(r),a=o(8310),l=o.n(a),i=o(5909),u=n().memo((function(e){function t(){var t=e.tooltipDataLabelKey,o=e.numberToStringFormatter,n=r(t,e.data);if(null!=n)return null==o?String(n):"string"==typeof n?n:o(n)}function o(){var t=r(e.tooltipDataValueKey,e.data);if(null!=t)return"number"==typeof t?(0,i.Ow)(t):t}function r(e,t){return null==e||null==t?void 0:t[e]}var a,u,s,c,p,d,f=l()("statistics-tooltip",null==e?void 0:e.className),m=null==e.color?null:n().createElement("span",{className:"tooltip-rectangle",style:{background:e.color}});return n().createElement("div",{className:f},n().createElement("div",{className:"d-flex align-items-center"},m,n().createElement("span",{className:"text-left"},(u=e.tooltipDataTitleKey,s=e.data,c=e.otherId,p=e.otherLabel,(d=r(u,s))===c?null!=p?p:c:d?String(d):void 0))),0===(a=[{value:t(),key:e.tooltipDataLabelKey,className:"label"},{value:o(),key:e.tooltipDataValueKey,className:"value"}].filter((function(e){return null!=e.value})).map((function(e){return n().createElement("span",{key:e.key,className:e.className},e.value)}))).length?null:n().createElement("div",{className:"d-flex justify-content-between"},a),e.children)}));u.displayName="StatisticsTooltip";var s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};function c(e){var t=e.tooltipDataLabelKey,o=e.tooltipDataValueKey,r=e.tooltipDataTitleKey,a=e.otherId,l=e.otherLabel,i=e.numberToStringFormatter,c=e.withColor,p=e.className,d=void 0===p?"tooltip-background":p;return function(e){var p,f,m,v,y=s(s({},e.data),{value:null===(p=e.data)||void 0===p?void 0:p.value,label:null===(f=e.data)||void 0===f?void 0:f.label,id:null===(m=e.data)||void 0===m?void 0:m.id,percentage:null===(v=e.data)||void 0===v?void 0:v.percentage});return n().createElement(u,{otherId:a,otherLabel:l,numberToStringFormatter:i,data:y,tooltipDataLabelKey:t,tooltipDataTitleKey:r,tooltipDataValueKey:o,className:null!=d?d:"",color:c?e.color:void 0})}}},3292:(e,t,o)=>{o.r(t),o.d(t,{ComputedDatum:()=>u.ComputedDatum,SunBurst:()=>g,SunBurstItemData:()=>r.SunBurstItemData,SunBurstProps:()=>r.SunBurstProps});var r={};o.r(r),o.d(r,{X:()=>g});var n,a=o(8156),l=o.n(a),i=o(6627),u=o(9503),s=o(8310),c=o.n(s),p=o(4915),d=o(7540),f=o(5909),m=o(9274),v=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),y=function(){return y=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},y.apply(this,arguments)},b=function(e,t,o,r){var n,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(l=(a<3?n(l):a>3?n(t,o,l):n(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l},h=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={data:{id:"",children:[],label:""}},t}var o,r,n;return v(t,e),t.prototype.componentDidUpdate=function(e){(0,p.vZ)(e,this.props)||this.setupComponent()},t.prototype.componentDidMount=function(){this.setupComponent()},t.prototype.setupComponent=function(){var e,t,o,r,n,a,l,i,u,s,c,p=this,d=this.props,v=d.colors,b=d.maxSlicesNumber;if(null==v)throw Error("What are the odds a developer voluntarily chooses to give the colors a null value with a default prop defined? Congrats!");if(b&&b+1!==v.length)throw Error("With a maxSliceNumber prop, maxSlicesNumber + 1 must be of the same length as the colors.length prop");var h=(0,f.xG)(null!==(t=null===(e=this.props)||void 0===e?void 0:e.data)&&void 0!==t?t:[],null===(o=this.props)||void 0===o?void 0:o.otherId,null===(r=this.props)||void 0===r?void 0:r.otherLabel,null!==(a=null===(n=this.props)||void 0===n?void 0:n.maxSlicesNumber)&&void 0!==a?a:1/0,null===(l=this.props)||void 0===l?void 0:l.total);this.renderTooltip=(0,m.getRenderStatisticsTooltip)({tooltipDataLabelKey:"value",tooltipDataValueKey:"percentage",tooltipDataTitleKey:"label",otherId:this.props.otherId,withColor:!0,numberToStringFormatter:null!==(i=this.props.tooltipValueFormat)&&void 0!==i?i:this.props.numberToStringFormatter}),this.setState({data:{id:null===(u=this.props)||void 0===u?void 0:u.id,label:null===(s=this.props)||void 0===s?void 0:s.id,children:null===(c=null!=h?h:[])||void 0===c?void 0:c.map((function(e,t){var o,r;return y(y({},e),{color:null===(r=null===(o=p.props)||void 0===o?void 0:o.colors)||void 0===r?void 0:r[t]})}))}})},t.prototype.getRenderTooltip=function(e){var t,o,r,n=null!==(t=this.props.renderTooltip)&&void 0!==t?t:this.renderTooltip,a=(null===(o=e.data)||void 0===o?void 0:o.value)||(null===(r=e.data)||void 0===r?void 0:r.initialValue)||0;return n(y(y({},e),{data:y(y({},e.data),{value:a})}))},t.prototype.renderCenteredMetric=function(e){var t,o,r,n=e.nodes,a=e.centerX,i=e.centerY,u=n.reduce((function(e,t){return e+t.value}),0);return l().createElement("text",{x:a,y:i,textAnchor:"middle",fontSize:"42px",fontWeight:"600",dominantBaseline:"central",className:"cursor-default"},null!==(r=null===(o=null===(t=this.props)||void 0===t?void 0:t.numberToStringFormatter)||void 0===o?void 0:o.call(t,u))&&void 0!==r?r:u)},t.prototype.render=function(){var e=this.props,t=e.height,o=e.withNumber,r=c()("sunburst-container",this.props.className);return l().createElement("div",{id:this.props.id,style:{height:t,width:t},ref:this.props.chartRef,className:r},l().createElement(u.ResponsiveSunburst,{tooltip:this.getRenderTooltip,data:this.state.data,margin:{top:10,right:10,bottom:10,left:10},cornerRadius:0,borderColor:"#ffff",childColor:{from:"color",modifiers:[["brighter",.5]]},enableArcLabels:!1,isInteractive:!0,layers:o?["arcs","arcLabels",this.renderCenteredMetric]:void 0,animate:this.props.animate,id:"id",colors:{datum:"data.color"}}))},t.displayName="SunBurst",t.defaultProps={colors:[d.qi,d.jk,d.Ef,d.u$,d.sf,d.kr,d.de],otherId:"other",height:"100%",animate:!0},b([i.MR,h("design:type",Function),h("design:paramtypes",["function"==typeof(o=void 0!==u.ComputedDatum&&u.ComputedDatum)?o:Object]),h("design:returntype","function"==typeof(r="undefined"!=typeof JSX&&JSX.Element)?r:Object)],t.prototype,"getRenderTooltip",null),b([i.MR,h("design:type",Function),h("design:paramtypes",["function"==typeof(n=void 0!==u.SunburstCustomLayerProps&&u.SunburstCustomLayerProps)?n:Object]),h("design:returntype",void 0)],t.prototype,"renderCenteredMetric",null),t}(l().Component)},5909:(e,t,o)=>{o.d(t,{xG:()=>a,Ow:()=>i});var r=o(4915),n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],r=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function a(e,t,o,n,a,i){var u,s;void 0===n&&(n=0),void 0===i&&(i="value");var c=0,p=null!=t?t:"other",d=null!=n?n:0,f=[],m=null==e?void 0:e.sort((0,r.kV)(i));null==m||m.forEach((function(e,o){var n;if(o<d&&e.id!==t)f.push(function(e){if(null==e.children)return e;var t=(0,r.d9)(e);return l(t),t}(e));else{var a=null!==(n=Number(null==e?void 0:e.value))&&void 0!==n?n:0;c+=a}}));var v={};return v.id=p,v.value=parseFloat(c.toFixed(2)),v.initialValue=parseFloat(c.toFixed(2)),v.label=null!==(u=null!=o?o:p)&&void 0!==u?u:"",null!=(null===(s=null==e?void 0:e[0])||void 0===s?void 0:s.percentage)&&null!=a&&(v.percentage=c/a*100),n===1/0&&0===c||f.push(v),f}function l(e){var t,o,r,a=null!==(r=null==e?void 0:e.children)&&void 0!==r?r:[];e.initialValue=e.value,a.length>0&&delete e.value;try{for(var i=n(a),u=i.next();!u.done;u=i.next()){l(u.value)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}}function i(e){var t;return"".concat(parseInt(null===(t=null==e?void 0:e.toFixed)||void 0===t?void 0:t.call(e,0),10),"%")}},7540:(e,t,o)=>{o.d(t,{qi:()=>r,de:()=>n,jk:()=>a,Ef:()=>l,sf:()=>u,u$:()=>i,kr:()=>s});var r="#578EA8",n="#717171",a="#63619F",l="#965DA3",i="#C55795",u="#E85778",s="#F86752"},4915:(e,t,o)=>{o.d(t,{kV:()=>r,d9:()=>n,vZ:()=>l});o(5692),o(8156),o(3642);function r(e){return function(t,o){var r=0,n=0;return null!=(null==t?void 0:t[e])&&(r=null==t?void 0:t[e]),null!=(null==o?void 0:o[e])&&(n=null==o?void 0:o[e]),r>n?-1:1}}function n(e){return JSON.parse(JSON.stringify(e))}function a(e){return"object"==typeof e&&null!=e}function l(e,t){if(e===t)return!0;if(a(e)&&a(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!l(e[o],t[o]))return!1;return!0}return!1}},5692:t=>{t.exports=e},9503:e=>{e.exports=t},8310:e=>{e.exports=o},8156:e=>{e.exports=r},8721:e=>{e.exports=n},1082:e=>{e.exports=a},8763:e=>{e.exports=l},4329:(e,t,o)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}o.d(t,{Z:()=>r})}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={exports:{}};return u[e](o,o.exports,c),o.exports}c.m=u,i=[],c.O=(e,t,o,r)=>{if(!t){var n=1/0;for(s=0;s<i.length;s++){for(var[t,o,r]=i[s],a=!0,l=0;l<t.length;l++)(!1&r||n>=r)&&Object.keys(c.O).every((e=>c.O[e](t[l])))?t.splice(l--,1):(a=!1,r<n&&(n=r));if(a){i.splice(s--,1);var u=o();void 0!==u&&(e=u)}}return e}r=r||0;for(var s=i.length;s>0&&i[s-1][2]>r;s--)i[s]=i[s-1];i[s]=[t,o,r]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6074:0,9811:0,8172:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,n,[a,l,i]=o,u=0;if(a.some((t=>0!==e[t]))){for(r in l)c.o(l,r)&&(c.m[r]=l[r]);if(i)var s=i(c)}for(t&&t(o);u<a.length;u++)n=a[u],c.o(e,n)&&e[n]&&e[n][0](),e[a[u]]=0;return c.O(s)},o=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var p=c.O(void 0,[8172],(()=>c(3292)));return p=c.O(p)})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("@nivo/sunburst"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","@nivo/sunburst","classnames","react","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("@nivo/sunburst"),require("classnames"),require("react"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e["@nivo/sunburst"],e.classnames,e.react,e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,r,o,a,n,l){return(()=>{"use strict";var s,i={8572:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,r){var a=r.value;if("function"!=typeof a)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(o(a)));var n=!1;return{configurable:!0,get:function(){if(n||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof a)return a;var r=a.bind(this);return n=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){a=e,delete this[t]}}),n=!1,r},set:function(e){a=e}}}r.d(t,{MR:()=>a})},3642:(e,t,r)=>{var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(8721),i=r.n(s),u=r(7269),c=r(2380),p=r(5145),d=r(8672),m=r(2722);const f=e=>{const t=l()(e?.className,"atoka-form");return a().createElement(i(),{...e,className:t},e.children)};f.displayName="Form",f.Control=c.N,f.Label=u.l,f.Checkbox=p.z,f.Radio=d.w,f.File=i().File,f.Switch=i().Switch,f.Help=m.y,f.Group=i().Group},5145:(e,t,r)=>{r.d(t,{z:()=>u});var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(8721),i=r.n(s);const u=e=>{const t=l()("atoka-form-checkbox",e?.className);return a().createElement(i().Check,{type:"checkbox",...e,custom:!0,className:t,label:e.label??""})};u.displayName="FormCheckbox"},2380:(e,t,r)=>{r.d(t,{N:()=>p});var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(1082),i=r.n(s),u=r(7605);const c=a().forwardRef((({size:e="md",...t},r)=>{const o=l()("atoka-form-control",t?.className,{"atoka-shadow":t.withShadow,disabled:t.disabled});return a().createElement(i(),{as:t.as,rows:t.rows,cols:t.cols,placeholder:t.placeholder,className:o,disabled:t.disabled,readOnly:t.readOnly,value:t.value,onChange:t.onChange,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,defaultValue:t.defaultValue,size:"md"===e?void 0:e,type:t.type,id:t.id,isValid:t.isValid,isInvalid:t.isInvalid,ref:r,autoComplete:"off"},t.children)}));c.displayName="FormControlComponent";const p=c;p.FeedBack=u.t,p.displayName="FormControl"},7605:(e,t,r)=>{r.d(t,{t:()=>u});var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(1082),i=r.n(s);const u=a().memo((({show:e=!0,...t})=>{const r=l()(t?.className,"atoka-form-control-feedback",{"d-block":e});return a().createElement(i().Feedback,{type:t.type,className:r},t.children)}));u.displayName="FormControlFeedBack"},2722:(e,t,r)=>{r.d(t,{y:()=>u});var o=r(8763),a=r.n(o),n=r(8156),l=r.n(n),s=r(8310),i=r.n(s);const u=l().memo((({children:e,...t})=>{const r=i()("d-block",t?.className);return l().createElement(a(),{bsPrefix:"atoka-form-help",className:r},e)}));u.displayName="FormHelp"},7269:(e,t,r)=>{r.d(t,{l:()=>u});var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(8721),i=r.n(s);const u=a().memo((e=>{const t=l()(e?.className,"atoka-form-label");return a().createElement(i().Label,{className:t},e.children)}));u.displayName="FormLabel"},8672:(e,t,r)=>{r.d(t,{w:()=>u});var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(8721),i=r.n(s);const u=e=>{const t=l()(e?.className,"atoka-form-radio");return a().createElement(i().Check,{type:"radio",...e,custom:!0,className:t,label:e.label??""})};u.displayName="FormRadio"},9274:(e,t,r)=>{r.d(t,{StatisticsTooltip:()=>i,getRenderStatisticsTooltip:()=>u});var o=r(8156),a=r.n(o),n=r(8310),l=r.n(n),s=r(5909);const i=a().memo((e=>{function t(){let{tooltipDataLabelKey:t,numberToStringFormatter:r,data:a}=e,n=o(t,a);if(null!=n)return null==r?String(n):"string"==typeof n?n:r(n)}function r(){let{tooltipDataValueKey:t,data:r}=e,a=o(t,r);if(null!=a)return"number"==typeof a?(0,s.Ow)(a):a}function o(e,t){return null==e?void 0:t?.[e]}let n=l()("statistics-tooltip",e?.className),i=null==e.color?null:a().createElement("span",{className:"tooltip-rectangle",style:{background:e.color}});return a().createElement("div",{className:n},a().createElement("div",{className:"d-flex align-items-center"},i,a().createElement("span",{className:"text-left"},function(){let{tooltipDataTitleKey:t,data:r,otherId:a,otherLabel:n}=e,l=o(t,r);return l===a?n??a:l?String(l):void 0}())),function(){let o=[{value:t(),key:e.tooltipDataLabelKey,className:"label"},{value:r(),key:e.tooltipDataValueKey,className:"value"}].filter((e=>null!=e.value)).map((e=>a().createElement("span",{key:e.key,className:e.className},e.value)));return 0===o.length?null:a().createElement("div",{className:"d-flex justify-content-between"},o)}(),e.children)}));function u({tooltipDataLabelKey:e,tooltipDataValueKey:t,tooltipDataTitleKey:r,otherId:o,otherLabel:n,numberToStringFormatter:l,withColor:s,className:u="tooltip-background"}){return c=>{let p={...c.data,value:c.data?.value,label:c.data?.label,id:c.data?.id,percentage:c.data?.percentage};return a().createElement(i,{otherId:o,otherLabel:n,numberToStringFormatter:l,data:p,tooltipDataLabelKey:e,tooltipDataTitleKey:r,tooltipDataValueKey:t,className:u??"",color:s?c.color:void 0})}}i.displayName="StatisticsTooltip"},3292:(e,t,r)=>{r.r(t),r.d(t,{ComputedDatum:()=>c.ComputedDatum,SunBurst:()=>SunBurst,SunBurstItemData:()=>o.SunBurstItemData,SunBurstProps:()=>o.SunBurstProps});var o={};r.r(o),r.d(o,{X:()=>SunBurst});var a,n,l,s=r(8156),i=r.n(s),u=r(8572),c=r(9503),p=r(8310),d=r.n(p),m=r(4915),f=r(7540),h=r(5909),b=r(9274),y=function(e,t,r,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(l=(n<3?a(l):n>3?a(t,r,l):a(t,r))||l);return n>3&&l&&Object.defineProperty(t,r,l),l},v=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class SunBurst extends i().Component{static displayName="SunBurst";renderTooltip;static defaultProps={colors:[f.qi,f.jk,f.Ef,f.u$,f.sf,f.kr,f.de],otherId:"other",height:"100%",animate:!0};state={data:{id:"",children:[],label:""}};componentDidUpdate(e){(0,m.vZ)(e,this.props)||this.setupComponent()}componentDidMount(){this.setupComponent()}setupComponent(){let{colors:e,maxSlicesNumber:t}=this.props;if(null==e)throw Error("What are the odds a developer voluntarily chooses to give the colors a null value with a default prop defined? Congrats!");if(t&&t+1!==e.length)throw Error("With a maxSliceNumber prop, maxSlicesNumber + 1 must be of the same length as the colors.length prop");let r=(0,h.xG)(this.props?.data??[],this.props?.otherId,this.props?.otherLabel,this.props?.maxSlicesNumber??1/0,this.props?.total);this.renderTooltip=(0,b.getRenderStatisticsTooltip)({tooltipDataLabelKey:"value",tooltipDataValueKey:"percentage",tooltipDataTitleKey:"label",otherId:this.props.otherId,withColor:!0,numberToStringFormatter:this.props.tooltipValueFormat??this.props.numberToStringFormatter}),this.setState({data:{id:this.props?.id,label:this.props?.id,children:(r??[])?.map(((e,t)=>({...e,color:this.props?.colors?.[t]})))}})}getRenderTooltip(e){const t=this.props.renderTooltip??this.renderTooltip,r=e.data?.value||e.data?.initialValue||0;return t({...e,data:{...e.data,value:r}})}renderCenteredMetric({nodes:e,centerX:t,centerY:r}){const o=e.reduce(((e,t)=>e+t.value),0);return i().createElement("text",{x:t,y:r,textAnchor:"middle",fontSize:"42px",fontWeight:"600",dominantBaseline:"central",className:"cursor-default"},this.props?.numberToStringFormatter?.(o)??o)}render(){const{height:e,withNumber:t}=this.props,r=d()("sunburst-container",this.props.className);return i().createElement("div",{id:this.props.id,style:{height:e,width:e},ref:this.props.chartRef,className:r},i().createElement(c.ResponsiveSunburst,{tooltip:this.getRenderTooltip,data:this.state.data,margin:{top:10,right:10,bottom:10,left:10},cornerRadius:0,borderColor:"#ffff",childColor:{from:"color",modifiers:[["brighter",.5]]},enableArcLabels:!1,isInteractive:!0,layers:t?["arcs","arcLabels",this.renderCenteredMetric]:void 0,animate:this.props.animate,id:"id",colors:{datum:"data.color"}}))}}y([u.MR,v("design:type",Function),v("design:paramtypes",["function"==typeof(a=void 0!==c.ComputedDatum&&c.ComputedDatum)?a:Object]),v("design:returntype","function"==typeof(n="undefined"!=typeof JSX&&JSX.Element)?n:Object)],SunBurst.prototype,"getRenderTooltip",null),y([u.MR,v("design:type",Function),v("design:paramtypes",["function"==typeof(l=void 0!==c.SunburstCustomLayerProps&&c.SunburstCustomLayerProps)?l:Object]),v("design:returntype",void 0)],SunBurst.prototype,"renderCenteredMetric",null)},5909:(e,t,r)=>{r.d(t,{xG:()=>a,Ow:()=>l});var o=r(4915);function a(e,t,r,a=0,l,s="value"){let i=0,u=t??"other",c=a??0,p=[],d=e?.sort((0,o.kV)(s));d?.forEach(((e,r)=>{if(r<c&&e.id!==t)p.push(function(e){if(null==e.children)return e;let t=(0,o.d9)(e);return n(t),t}(e));else{let t=Number(e?.value)??0;i+=t}}));let m={};return m.id=u,m.value=parseFloat(i.toFixed(2)),m.initialValue=parseFloat(i.toFixed(2)),m.label=r??u??"",null!=e?.[0]?.percentage&&null!=l&&(m.percentage=i/l*100),a===1/0&&0===i||p.push(m),p}function n(e){let t=e?.children??[];e.initialValue=e.value,t.length>0&&delete e.value;for(let e of t)n(e)}function l(e){return`${parseInt(e?.toFixed?.(0),10)}%`}},7540:(e,t,r)=>{r.d(t,{qi:()=>o,de:()=>a,jk:()=>n,Ef:()=>l,sf:()=>i,u$:()=>s,kr:()=>u});let o="#578EA8",a="#717171",n="#63619F",l="#965DA3",s="#C55795",i="#E85778",u="#F86752"},4915:(e,t,r)=>{r.d(t,{kV:()=>o,d9:()=>a,vZ:()=>l});r(5692),r(8156),r(3642);function o(e){return function(t,r){let o=0,a=0;return null!=t?.[e]&&(o=t?.[e]),null!=r?.[e]&&(a=r?.[e]),o>a?-1:1}}function a(e){return JSON.parse(JSON.stringify(e))}function n(e){return"object"==typeof e&&null!=e}function l(e,t){if(e===t)return!0;if(n(e)&&n(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(!l(e[r],t[r]))return!1;return!0}return!1}},5692:t=>{t.exports=e},9503:e=>{e.exports=t},8310:e=>{e.exports=r},8156:e=>{e.exports=o},8721:e=>{e.exports=a},1082:e=>{e.exports=n},8763:e=>{e.exports=l}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return i[e](r,r.exports,c),r.exports}c.m=i,s=[],c.O=(e,t,r,o)=>{if(!t){var a=1/0;for(u=0;u<s.length;u++){for(var[t,r,o]=s[u],n=!0,l=0;l<t.length;l++)(!1&o||a>=o)&&Object.keys(c.O).every((e=>c.O[e](t[l])))?t.splice(l--,1):(n=!1,o<a&&(a=o));if(n){s.splice(u--,1);var i=r();void 0!==i&&(e=i)}}return e}o=o||0;for(var u=s.length;u>0&&s[u-1][2]>o;u--)s[u]=s[u-1];s[u]=[t,r,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6074:0,9811:0,76:0};c.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,[n,l,s]=r,i=0;if(n.some((t=>0!==e[t]))){for(o in l)c.o(l,o)&&(c.m[o]=l[o]);if(s)var u=s(c)}for(t&&t(r);i<n.length;i++)a=n[i],c.o(e,a)&&e[a]&&e[a][0](),e[n[i]]=0;return c.O(u)},r=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var p=c.O(void 0,[76],(()=>c(3292)));return p=c.O(p)})()}));
|
package/TabSwitcher/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Badge"),require("react-bootstrap/ButtonGroup"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Badge","react-bootstrap/ButtonGroup","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Badge"),require("react-bootstrap/ButtonGroup"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Badge"],e["react-bootstrap/ButtonGroup"],e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,r,o,n,a,i,c){return(()=>{"use strict";var l,s={6627:(e,t,r)=>{r.d(t,{MR:()=>a});var o=r(4329);function n(e){return n="function"==typeof Symbol&&"symbol"===(0,o.Z)(Symbol.iterator)?function(e){return(0,o.Z)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":(0,o.Z)(e)},n(e)}function a(e,t,r){var o=r.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(o)));var a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var r=o.bind(this);return a=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){o=e,delete this[t]}}),a=!1,r},set:function(e){o=e}}}},595:(e,t,r)=>{r.d(t,{Badge:()=>u});var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(6997),l=r.n(c),s=r(5692),p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},u=n().memo((function(e){var t=e.size,r=void 0===t?"sm":t,o=p(e,["size"]),a=i()(null==o?void 0:o.className,"atoka-badge","variant-".concat(o.variant,"-").concat(o.color),r),c=i()({"mr-2":null!=o.children}),u=null==o.icon?null:n().createElement(s.FontAwesomeIcon,{icon:o.icon,className:c});return n().createElement(l(),{className:a},u,o.children)}));u.displayName="Badge"},3642:(e,t,r)=>{var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(8721),l=r.n(c),s=r(7269),p=r(2380),u=r(5145),f=r(8672),d=r(2722),y=function(){return y=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},y.apply(this,arguments)},m=function(e){var t=i()(null==e?void 0:e.className,"atoka-form");return n().createElement(l(),y({},e,{className:t}),e.children)};m.displayName="Form",m.Control=p.N,m.Label=s.l,m.Checkbox=u.z,m.Radio=f.w,m.File=l().File,m.Switch=l().Switch,m.Help=d.y,m.Group=l().Group},5145:(e,t,r)=>{r.d(t,{z:()=>p});var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(8721),l=r.n(c),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},p=function(e){var t,r=i()("atoka-form-checkbox",null==e?void 0:e.className);return n().createElement(l().Check,s({type:"checkbox"},e,{custom:!0,className:r,label:null!==(t=e.label)&&void 0!==t?t:""}))};p.displayName="FormCheckbox"},2380:(e,t,r)=>{r.d(t,{N:()=>f});var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(1082),l=r.n(c),s=r(7605),p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},u=n().forwardRef((function(e,t){var r=e.size,o=void 0===r?"md":r,a=p(e,["size"]),c=i()("atoka-form-control",null==a?void 0:a.className,{"atoka-shadow":a.withShadow,disabled:a.disabled});return n().createElement(l(),{as:a.as,rows:a.rows,cols:a.cols,placeholder:a.placeholder,className:c,disabled:a.disabled,readOnly:a.readOnly,value:a.value,onChange:a.onChange,onKeyPress:a.onKeyPress,onKeyDown:a.onKeyDown,defaultValue:a.defaultValue,size:"md"===o?void 0:o,type:a.type,id:a.id,isValid:a.isValid,isInvalid:a.isInvalid,ref:t,autoComplete:"off"},a.children)}));u.displayName="FormControlComponent";var f=u;f.FeedBack=s.t,f.displayName="FormControl"},7605:(e,t,r)=>{r.d(t,{t:()=>p});var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(1082),l=r.n(c),s=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},p=n().memo((function(e){var t=e.show,r=void 0===t||t,o=s(e,["show"]),a=i()(null==o?void 0:o.className,"atoka-form-control-feedback",{"d-block":r});return n().createElement(l().Feedback,{type:o.type,className:a},o.children)}));p.displayName="FormControlFeedBack"},2722:(e,t,r)=>{r.d(t,{y:()=>p});var o=r(8763),n=r.n(o),a=r(8156),i=r.n(a),c=r(8310),l=r.n(c),s=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r},p=i().memo((function(e){var t=e.children,r=s(e,["children"]),o=l()("d-block",null==r?void 0:r.className);return i().createElement(n(),{bsPrefix:"atoka-form-help",className:o},t)}));p.displayName="FormHelp"},7269:(e,t,r)=>{r.d(t,{l:()=>s});var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(8721),l=r.n(c),s=n().memo((function(e){var t=i()(null==e?void 0:e.className,"atoka-form-label");return n().createElement(l().Label,{className:t},e.children)}));s.displayName="FormLabel"},8672:(e,t,r)=>{r.d(t,{w:()=>p});var o=r(8156),n=r.n(o),a=r(8310),i=r.n(a),c=r(8721),l=r.n(c),s=function(){return s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)},p=function(e){var t,r=i()(null==e?void 0:e.className,"atoka-form-radio");return n().createElement(l().Check,s({type:"radio"},e,{custom:!0,className:r,label:null!==(t=e.label)&&void 0!==t?t:""}))};p.displayName="FormRadio"},994:(e,t,r)=>{r.d(t,{r:()=>w});var o,n=r(8156),a=r.n(n),i=r(8310),c=r.n(i),l=r(5901),s=r.n(l),p=r(4915),u=r(6627),f=r(4589),d=r(595),y=r(3932),m=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),h=function(e,t,r,o){var n,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(i=(a<3?n(i):a>3?n(t,r,i):n(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},b=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={width:null},t.containerRef=a().createRef(),t}var r;return m(t,e),t.prototype.componentDidMount=function(){null!=this.containerRef.current&&this.setState({width:this.containerRef.current.getBoundingClientRect().width+48})},t.prototype.renderTitle=function(){if("number"==typeof this.props.value)return a().createElement(a().Fragment,null,this.props.title,this.renderPillPresence(this.props.value,this.props.isActive));if((0,f.isStringEmpty)(this.props.value))return this.props.title;var e=this.props.isActive?"blue300":"gray300";return a().createElement(a().Fragment,null,this.props.title," ",a().createElement(d.Badge,{variant:"primary",color:e,className:"ml-2"},this.props.value))},t.prototype.renderPillPresence=function(e,t){var r=0!==e,o=c()("pill-presence ml-1",{"is-active-color":r&&t,"is-disabled-color":r&&!t,"is-invisible":!r});return a().createElement("div",{className:o})},t.prototype.render=function(){var e=c()({active:!0===this.props.isActive,"tab-switcher-choice":!0}),t=null==this.state.width?{}:{width:this.state.width};return a().createElement("div",{className:e,onClick:this.props.onClick,ref:this.containerRef,style:t},a().createElement(y.Title,{size:"xs",icon:this.props.icon,style:{paddingLeft:0,paddingRight:0}},this.renderTitle()))},t.displayName="TabSwitcherChoice",h([u.MR,b("design:type",Function),b("design:paramtypes",[]),b("design:returntype","function"==typeof(r=void 0!==a()&&a().ReactNode)?r:Object)],t.prototype,"renderTitle",null),t}(a().PureComponent),O=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={indicatorLeft:0,indicatorWidth:0},t.refObjects=[],t}return O(t,e),t.prototype.componentDidMount=function(){var e=this;setTimeout((function(){return e.calculateIndicatorPosition()}),10)},t.prototype.componentDidUpdate=function(e){(0,p.vZ)(e,this.props)||this.calculateIndicatorPosition()},t.prototype.calculateIndicatorPosition=function(){var e=this;a().Children.forEach(this.props.children,(function(t,r){var o;if((null==t?void 0:t.type)===v&&!1!==t.props.isActive){var n=null===(o=e.refObjects[r])||void 0===o?void 0:o.current;null!=n&&e.setState({indicatorLeft:n.offsetLeft,indicatorWidth:n.offsetWidth})}}))},t.prototype.renderIndicator=function(){var e={transform:"translate(".concat(this.state.indicatorLeft,"px, 0)"),width:this.state.indicatorWidth};return a().createElement("span",{className:"indicator",style:e})},t.prototype.renderChildren=function(){var e=this,t=[];return a().Children.forEach(this.props.children,(function(r,o){null==e.refObjects[o]&&(e.refObjects[o]=a().createRef()),(null==r?void 0:r.type)===v&&t.push(a().createElement("span",{ref:e.refObjects[o],key:o},r))})),t},t.prototype.renderTabSwitcherRest=function(){return this.props.fullWidth?a().createElement("span",{className:"tab-switcher-rest"}):null},t.prototype.render=function(){var e=c()("tab-switcher-container",this.props.className,{"w-100":this.props.fullWidth});return a().createElement(s(),{style:{position:"relative"},className:e},this.renderIndicator(),this.renderChildren(),this.renderTabSwitcherRest())},t.displayName="TabSwitcher",t.Choice=v,t.defaultProps={fullWidth:!1},t}(a().PureComponent)},7154:(e,t,r)=>{r.r(t),r.d(t,{TabSwitcher:()=>o.r});var o=r(994)},38:(e,t,r)=>{r.d(t,{D:()=>u});var o,n=r(8156),a=r.n(n),i=r(5692),c=r(8310),l=r.n(c),s=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),p=function(){return p=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},p.apply(this,arguments)},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.renderIcon=function(){if(null==this.props.icon)return null;var e=l()({"mr-2":""!==this.props.children&&null!=this.props.children});return a().createElement(i.FontAwesomeIcon,{icon:this.props.icon,className:e,fixedWidth:!0})},t.prototype.renderContent=function(){return a().createElement(a().Fragment,null,this.renderIcon(),this.props.children)},t.prototype.render=function(){var e={className:this.props.className,style:this.props.style};switch(this.props.size){case"xs":return a().createElement("h6",p({},e),this.renderContent());case"sm":return a().createElement("h5",p({},e),this.renderContent());case"md":return a().createElement("h4",p({},e),this.renderContent());case"lg":return a().createElement("h3",p({},e),this.renderContent());case"xl":return a().createElement("h2",p({},e),this.renderContent());default:return a().createElement("h1",p({},e),this.renderContent())}},t.displayName="Title",t.defaultProps={size:"xxl"},t}(a().PureComponent)},3932:(e,t,r)=>{r.d(t,{Title:()=>o.D});var o=r(38)},5909:(e,t,r)=>{r(4915)},2394:(e,t,r)=>{r.d(t,{Wq:()=>o});function o(e){return null==e||null!==e.match(/^\s*$/)}},4915:(e,t,r)=>{r.d(t,{vZ:()=>n});r(5692),r(8156),r(3642);function o(e){return"object"==typeof e&&null!=e}function n(e,t){if(e===t)return!0;if(o(e)&&o(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(!n(e[r],t[r]))return!1;return!0}return!1}},4589:(e,t,r)=>{r.d(t,{isStringEmpty:()=>o.Wq});r(5909),r(4915);var o=r(2394)},5692:t=>{t.exports=e},8310:e=>{e.exports=t},8156:e=>{e.exports=r},6997:e=>{e.exports=o},5901:e=>{e.exports=n},8721:e=>{e.exports=a},1082:e=>{e.exports=i},8763:e=>{e.exports=c},4329:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}r.d(t,{Z:()=>o})}},p={};function u(e){var t=p[e];if(void 0!==t)return t.exports;var r=p[e]={exports:{}};return s[e](r,r.exports,u),r.exports}u.m=s,l=[],u.O=(e,t,r,o)=>{if(!t){var n=1/0;for(s=0;s<l.length;s++){for(var[t,r,o]=l[s],a=!0,i=0;i<t.length;i++)(!1&o||n>=o)&&Object.keys(u.O).every((e=>u.O[e](t[i])))?t.splice(i--,1):(a=!1,o<n&&(n=o));if(a){l.splice(s--,1);var c=r();void 0!==c&&(e=c)}}return e}o=o||0;for(var s=l.length;s>0&&l[s-1][2]>o;s--)l[s]=l[s-1];l[s]=[t,r,o]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={2197:0,54:0,7564:0,8172:0};u.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[a,i,c]=r,l=0;if(a.some((t=>0!==e[t]))){for(o in i)u.o(i,o)&&(u.m[o]=i[o]);if(c)var s=c(u)}for(t&&t(r);l<a.length;l++)n=a[l],u.o(e,n)&&e[n]&&e[n][0](),e[a[l]]=0;return u.O(s)},r=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var f=u.O(void 0,[8172],(()=>u(7154)));return f=u.O(f)})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Badge"),require("react-bootstrap/ButtonGroup"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","classnames","react","react-bootstrap/Badge","react-bootstrap/ButtonGroup","react-bootstrap/Form","react-bootstrap/FormControl","react-bootstrap/FormText"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react"),require("react-bootstrap/Badge"),require("react-bootstrap/ButtonGroup"),require("react-bootstrap/Form"),require("react-bootstrap/FormControl"),require("react-bootstrap/FormText")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e.classnames,e.react,e["react-bootstrap/Badge"],e["react-bootstrap/ButtonGroup"],e["react-bootstrap/Form"],e["react-bootstrap/FormControl"],e["react-bootstrap/FormText"])}(self,(function(e,t,r,o,n,a,s,i){return(()=>{"use strict";var c,l={8572:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function n(e,t,r){var n=r.value;if("function"!=typeof n)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(o(n)));var a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof n)return n;var r=n.bind(this);return a=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){n=e,delete this[t]}}),a=!1,r},set:function(e){n=e}}}r.d(t,{MR:()=>n})},595:(e,t,r)=>{r.d(t,{Badge:()=>d});var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(6997),c=r.n(i),l=r(5692);const d=n().memo((({size:e="sm",...t})=>{const r=s()(t?.className,"atoka-badge",`variant-${t.variant}-${t.color}`,e),o=s()({"mr-2":null!=t.children}),a=null==t.icon?null:n().createElement(l.FontAwesomeIcon,{icon:t.icon,className:o});return n().createElement(c(),{className:r},a,t.children)}));d.displayName="Badge"},3642:(e,t,r)=>{var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(8721),c=r.n(i),l=r(7269),d=r(2380),p=r(5145),u=r(8672),m=r(2722);const h=e=>{const t=s()(e?.className,"atoka-form");return n().createElement(c(),{...e,className:t},e.children)};h.displayName="Form",h.Control=d.N,h.Label=l.l,h.Checkbox=p.z,h.Radio=u.w,h.File=c().File,h.Switch=c().Switch,h.Help=m.y,h.Group=c().Group},5145:(e,t,r)=>{r.d(t,{z:()=>l});var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(8721),c=r.n(i);const l=e=>{const t=s()("atoka-form-checkbox",e?.className);return n().createElement(c().Check,{type:"checkbox",...e,custom:!0,className:t,label:e.label??""})};l.displayName="FormCheckbox"},2380:(e,t,r)=>{r.d(t,{N:()=>p});var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(1082),c=r.n(i),l=r(7605);const d=n().forwardRef((({size:e="md",...t},r)=>{const o=s()("atoka-form-control",t?.className,{"atoka-shadow":t.withShadow,disabled:t.disabled});return n().createElement(c(),{as:t.as,rows:t.rows,cols:t.cols,placeholder:t.placeholder,className:o,disabled:t.disabled,readOnly:t.readOnly,value:t.value,onChange:t.onChange,onKeyPress:t.onKeyPress,onKeyDown:t.onKeyDown,defaultValue:t.defaultValue,size:"md"===e?void 0:e,type:t.type,id:t.id,isValid:t.isValid,isInvalid:t.isInvalid,ref:r,autoComplete:"off"},t.children)}));d.displayName="FormControlComponent";const p=d;p.FeedBack=l.t,p.displayName="FormControl"},7605:(e,t,r)=>{r.d(t,{t:()=>l});var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(1082),c=r.n(i);const l=n().memo((({show:e=!0,...t})=>{const r=s()(t?.className,"atoka-form-control-feedback",{"d-block":e});return n().createElement(c().Feedback,{type:t.type,className:r},t.children)}));l.displayName="FormControlFeedBack"},2722:(e,t,r)=>{r.d(t,{y:()=>l});var o=r(8763),n=r.n(o),a=r(8156),s=r.n(a),i=r(8310),c=r.n(i);const l=s().memo((({children:e,...t})=>{const r=c()("d-block",t?.className);return s().createElement(n(),{bsPrefix:"atoka-form-help",className:r},e)}));l.displayName="FormHelp"},7269:(e,t,r)=>{r.d(t,{l:()=>l});var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(8721),c=r.n(i);const l=n().memo((e=>{const t=s()(e?.className,"atoka-form-label");return n().createElement(c().Label,{className:t},e.children)}));l.displayName="FormLabel"},8672:(e,t,r)=>{r.d(t,{w:()=>l});var o=r(8156),n=r.n(o),a=r(8310),s=r.n(a),i=r(8721),c=r.n(i);const l=e=>{const t=s()(e?.className,"atoka-form-radio");return n().createElement(c().Check,{type:"radio",...e,custom:!0,className:t,label:e.label??""})};l.displayName="FormRadio"},994:(e,t,r)=>{r.d(t,{r:()=>TabSwitcher});var o,n=r(8156),a=r.n(n),s=r(8310),i=r.n(s),c=r(5901),l=r.n(c),d=r(4915),p=r(8572),u=r(4589),m=r(595),h=r(3932),f=function(e,t,r,o){var n,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(s=(a<3?n(s):a>3?n(t,r,s):n(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s},b=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class TabSwitcherChoice extends a().PureComponent{static displayName="TabSwitcherChoice";state={width:null};containerRef=a().createRef();componentDidMount(){null!=this.containerRef.current&&this.setState({width:this.containerRef.current.getBoundingClientRect().width+48})}renderTitle(){if("number"==typeof this.props.value)return a().createElement(a().Fragment,null,this.props.title,this.renderPillPresence(this.props.value,this.props.isActive));if((0,u.isStringEmpty)(this.props.value))return this.props.title;const e=this.props.isActive?"blue300":"gray300";return a().createElement(a().Fragment,null,this.props.title," ",a().createElement(m.Badge,{variant:"primary",color:e,className:"ml-2"},this.props.value))}renderPillPresence(e,t){const r=0!==e,o=i()("pill-presence ml-1",{"is-active-color":r&&t,"is-disabled-color":r&&!t,"is-invisible":!r});return a().createElement("div",{className:o})}render(){let e=i()({active:!0===this.props.isActive,"tab-switcher-choice":!0}),t=null==this.state.width?{}:{width:this.state.width};return a().createElement("div",{className:e,onClick:this.props.onClick,ref:this.containerRef,style:t},a().createElement(h.Title,{size:"xs",icon:this.props.icon,style:{paddingLeft:0,paddingRight:0}},this.renderTitle()))}}f([p.MR,b("design:type",Function),b("design:paramtypes",[]),b("design:returntype","function"==typeof(o=void 0!==a()&&a().ReactNode)?o:Object)],TabSwitcherChoice.prototype,"renderTitle",null);class TabSwitcher extends a().PureComponent{static displayName="TabSwitcher";static Choice=TabSwitcherChoice;static defaultProps={fullWidth:!1};state={indicatorLeft:0,indicatorWidth:0};refObjects=[];componentDidMount(){setTimeout((()=>this.calculateIndicatorPosition()),10)}componentDidUpdate(e){(0,d.vZ)(e,this.props)||this.calculateIndicatorPosition()}calculateIndicatorPosition(){a().Children.forEach(this.props.children,((e,t)=>{if(e?.type!==TabSwitcherChoice)return;if(!1===e.props.isActive)return;let r=this.refObjects[t]?.current;null!=r&&this.setState({indicatorLeft:r.offsetLeft,indicatorWidth:r.offsetWidth})}))}renderIndicator(){let e={transform:`translate(${this.state.indicatorLeft}px, 0)`,width:this.state.indicatorWidth};return a().createElement("span",{className:"indicator",style:e})}renderChildren(){let e=[];return a().Children.forEach(this.props.children,((t,r)=>{null==this.refObjects[r]&&(this.refObjects[r]=a().createRef()),t?.type===TabSwitcherChoice&&e.push(a().createElement("span",{ref:this.refObjects[r],key:r},t))})),e}renderTabSwitcherRest(){return this.props.fullWidth?a().createElement("span",{className:"tab-switcher-rest"}):null}render(){let e=i()("tab-switcher-container",this.props.className,{"w-100":this.props.fullWidth});return a().createElement(l(),{style:{position:"relative"},className:e},this.renderIndicator(),this.renderChildren(),this.renderTabSwitcherRest())}}},7154:(e,t,r)=>{r.r(t),r.d(t,{TabSwitcher:()=>o.r});var o=r(994)},38:(e,t,r)=>{r.d(t,{D:()=>Title});var o=r(8156),n=r.n(o),a=r(5692),s=r(8310),i=r.n(s);class Title extends n().PureComponent{static displayName="Title";static defaultProps={size:"xxl"};renderIcon(){if(null==this.props.icon)return null;let e=i()({"mr-2":""!==this.props.children&&null!=this.props.children});return n().createElement(a.FontAwesomeIcon,{icon:this.props.icon,className:e,fixedWidth:!0})}renderContent(){return n().createElement(n().Fragment,null,this.renderIcon(),this.props.children)}render(){let e={className:this.props.className,style:this.props.style};switch(this.props.size){case"xs":return n().createElement("h6",{...e},this.renderContent());case"sm":return n().createElement("h5",{...e},this.renderContent());case"md":return n().createElement("h4",{...e},this.renderContent());case"lg":return n().createElement("h3",{...e},this.renderContent());case"xl":return n().createElement("h2",{...e},this.renderContent());default:return n().createElement("h1",{...e},this.renderContent())}}}},3932:(e,t,r)=>{r.d(t,{Title:()=>o.D});var o=r(38)},5909:(e,t,r)=>{r(4915)},2394:(e,t,r)=>{function o(e){return null==e||null!==e.match(/^\s*$/)}r.d(t,{Wq:()=>o})},4915:(e,t,r)=>{r.d(t,{vZ:()=>n});r(5692),r(8156),r(3642);function o(e){return"object"==typeof e&&null!=e}function n(e,t){if(e===t)return!0;if(o(e)&&o(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(!n(e[r],t[r]))return!1;return!0}return!1}},4589:(e,t,r)=>{r.d(t,{isStringEmpty:()=>o.Wq});r(5909),r(4915);var o=r(2394)},5692:t=>{t.exports=e},8310:e=>{e.exports=t},8156:e=>{e.exports=r},6997:e=>{e.exports=o},5901:e=>{e.exports=n},8721:e=>{e.exports=a},1082:e=>{e.exports=s},8763:e=>{e.exports=i}},d={};function p(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={exports:{}};return l[e](r,r.exports,p),r.exports}p.m=l,c=[],p.O=(e,t,r,o)=>{if(!t){var n=1/0;for(l=0;l<c.length;l++){for(var[t,r,o]=c[l],a=!0,s=0;s<t.length;s++)(!1&o||n>=o)&&Object.keys(p.O).every((e=>p.O[e](t[s])))?t.splice(s--,1):(a=!1,o<n&&(n=o));if(a){c.splice(l--,1);var i=r();void 0!==i&&(e=i)}}return e}o=o||0;for(var l=c.length;l>0&&c[l-1][2]>o;l--)c[l]=c[l-1];c[l]=[t,r,o]},p.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return p.d(t,{a:t}),t},p.d=(e,t)=>{for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={2197:0,54:0,7564:0,76:0};p.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[a,s,i]=r,c=0;if(a.some((t=>0!==e[t]))){for(o in s)p.o(s,o)&&(p.m[o]=s[o]);if(i)var l=i(p)}for(t&&t(r);c<a.length;c++)n=a[c],p.o(e,n)&&e[n]&&e[n][0](),e[a[c]]=0;return p.O(l)},r=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var u=p.O(void 0,[76],(()=>p(7154)));return u=p.O(u)})()}));
|
package/Title/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","classnames","react"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e.classnames,e.react)}(self,(function(e,t,r){return(()=>{"use strict";var n,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react")):"function"==typeof define&&define.amd?define("atoka-design-system",["@fortawesome/react-fontawesome","classnames","react"],t):"object"==typeof exports?exports["atoka-design-system"]=t(require("@fortawesome/react-fontawesome"),require("classnames"),require("react")):e["atoka-design-system"]=t(e["@fortawesome/react-fontawesome"],e.classnames,e.react)}(self,(function(e,t,r){return(()=>{"use strict";var n,s={38:(e,t,r)=>{r.d(t,{D:()=>Title});var n=r(8156),s=r.n(n),o=r(5692),a=r(8310),i=r.n(a);class Title extends s().PureComponent{static displayName="Title";static defaultProps={size:"xxl"};renderIcon(){if(null==this.props.icon)return null;let e=i()({"mr-2":""!==this.props.children&&null!=this.props.children});return s().createElement(o.FontAwesomeIcon,{icon:this.props.icon,className:e,fixedWidth:!0})}renderContent(){return s().createElement(s().Fragment,null,this.renderIcon(),this.props.children)}render(){let e={className:this.props.className,style:this.props.style};switch(this.props.size){case"xs":return s().createElement("h6",{...e},this.renderContent());case"sm":return s().createElement("h5",{...e},this.renderContent());case"md":return s().createElement("h4",{...e},this.renderContent());case"lg":return s().createElement("h3",{...e},this.renderContent());case"xl":return s().createElement("h2",{...e},this.renderContent());default:return s().createElement("h1",{...e},this.renderContent())}}}},3932:(e,t,r)=>{r.r(t),r.d(t,{Title:()=>n.D});var n=r(38)},5692:t=>{t.exports=e},8310:e=>{e.exports=t},8156:e=>{e.exports=r}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return s[e](r,r.exports,a),r.exports}a.m=s,n=[],a.O=(e,t,r,s)=>{if(!t){var o=1/0;for(d=0;d<n.length;d++){for(var[t,r,s]=n[d],i=!0,l=0;l<t.length;l++)(!1&s||o>=s)&&Object.keys(a.O).every((e=>a.O[e](t[l])))?t.splice(l--,1):(i=!1,s<o&&(o=s));if(i){n.splice(d--,1);var c=r();void 0!==c&&(e=c)}}return e}s=s||0;for(var d=n.length;d>0&&n[d-1][2]>s;d--)n[d]=n[d-1];n[d]=[t,r,s]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={7564:0,76:0};a.O.j=t=>0===e[t];var t=(t,r)=>{var n,s,[o,i,l]=r,c=0;if(o.some((t=>0!==e[t]))){for(n in i)a.o(i,n)&&(a.m[n]=i[n]);if(l)var d=l(a)}for(t&&t(r);c<o.length;c++)s=o[c],a.o(e,s)&&e[s]&&e[s][0](),e[o[c]]=0;return a.O(d)},r=self.webpackChunkatoka_design_system=self.webpackChunkatoka_design_system||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i=a.O(void 0,[76],(()=>a(3932)));return i=a.O(i)})()}));
|