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

2 lines
3.3 KiB
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
import e,{Component as t}from"react";import{ObjectUtils as n,classNames as r}from"primereact/utils";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function c(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&&l(e,t)}function a(e){return a="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},a(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"===a(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 s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(){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=function(l){c(h,t);var a,u,m,v,b,d=(a=h,u=y(),function(){var e,t=s(a);if(u){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return p(this,e)});function h(){return o(this,h),d.apply(this,arguments)}return m=h,(v=[{key:"getKey",value:function(e,t){return this.props.dataKey?n.resolveFieldData(e,this.props.dataKey):"pr_id__".concat(t)}},{key:"renderEvents",value:function(){var t=this;return this.props.value&&this.props.value.map((function(r,o){var i=n.getJSXElement(t.props.opposite,r,o),l=n.getJSXElement(t.props.marker,r,o)||e.createElement("div",{className:"p-timeline-event-marker"}),c=o!==t.props.value.length-1&&e.createElement("div",{className:"p-timeline-event-connector"}),a=n.getJSXElement(t.props.content,r,o);return e.createElement("div",{key:t.getKey(r,o),className:"p-timeline-event"},e.createElement("div",{className:"p-timeline-event-opposite"},i),e.createElement("div",{className:"p-timeline-event-separator"},l,c),e.createElement("div",{className:"p-timeline-event-content"},a))}))}},{key:"render",value:function(){var t,n=r("p-timeline p-component",(f(t={},"p-timeline-".concat(this.props.align),!0),f(t,"p-timeline-".concat(this.props.layout),!0),t),this.props.className),o=this.renderEvents();return e.createElement("div",{id:this.props.id,className:n,style:this.props.style},o)}}])&&i(m.prototype,v),b&&i(m,b),Object.defineProperty(m,"prototype",{writable:!1}),h}();f(m,"defaultProps",{id:null,value:null,align:"left",layout:"vertical",dataKey:null,className:null,style:null,opposite:null,marker:null,content:null});export{m as Timeline};