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

2 lines
3.9 KiB
JavaScript

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