katoikia-app/web-ui/web-react/node_modules/primereact/steps/steps.min.js

2 lines
4.0 KiB
JavaScript

this.primereact=this.primereact||{},this.primereact.steps=function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}function c(e){return c="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},c(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return u(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var d,y,b,h=function(e){s(y,e);var t,n,a,c,u,d=(t=y,n=m(),function(){var e,r=f(t);if(n){var o=f(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p(this,e)});function y(){return l(this,y),d.apply(this,arguments)}return a=y,(c=[{key:"itemClick",value:function(e,t,r){this.props.readOnly||t.disabled?e.preventDefault():(this.props.onSelect&&this.props.onSelect({originalEvent:e,item:t,index:r}),t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t,index:r}))}},{key:"renderItem",value:function(e,t){var n=this,l=t===this.props.activeIndex,i=e.disabled||t!==this.props.activeIndex&&this.props.readOnly,a=r.classNames("p-steps-item",e.className,{"p-highlight p-steps-current":l,"p-disabled":i}),s=e.label&&o.default.createElement("span",{className:"p-steps-title"},e.label),c=i?-1:"",u=o.default.createElement("a",{href:e.url||"#",className:"p-menuitem-link",role:"presentation",target:e.target,onClick:function(r){return n.itemClick(r,e,t)},tabIndex:c,"aria-disabled":i},o.default.createElement("span",{className:"p-steps-number"},t+1),s);return e.template&&(u=r.ObjectUtils.getJSXElement(e.template,e,{onClick:function(r){return n.itemClick(r,e,t)},className:"p-menuitem-link",labelClassName:"p-steps-title",numberClassName:"p-steps-number",element:u,props:this.props,tabIndex:c,active:l,disabled:i})),o.default.createElement("li",{key:e.label+"_"+t,className:a,style:e.style,role:"tab","aria-selected":l,"aria-expanded":l},u)}},{key:"renderItems",value:function(){var e=this;if(this.props.model){var t=this.props.model.map((function(t,r){return e.renderItem(t,r)}));return o.default.createElement("ul",{role:"tablist"},t)}return null}},{key:"render",value:function(){var e=r.classNames("p-steps p-component",this.props.className,{"p-readonly":this.props.readOnly}),t=this.renderItems();return o.default.createElement("div",{id:this.props.id,className:e,style:this.props.style},t)}}])&&i(a.prototype,c),u&&i(a,u),Object.defineProperty(a,"prototype",{writable:!1}),y}(t.Component);return b={id:null,model:null,activeIndex:0,readOnly:!0,style:null,className:null,onSelect:null},(y="defaultProps")in(d=h)?Object.defineProperty(d,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):d[y]=b,e.Steps=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);