bkui-vue 0.0.2-beta.10 → 0.0.2-beta.11
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/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/lib/steps/index.js +1 -1
- package/package.json +1 -1
package/lib/steps/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../icon"],e);else{var r="object"==typeof exports?e(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../icon")):e(t["../shared"],t.vue,t["vue-types"],t["../config-provider"],t["../icon"]);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,((t,e,r,n,o)=>(()=>{var i={2717:t=>{"use strict";t.exports=n},6870:t=>{"use strict";t.exports=o},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:t=>{"use strict";t.exports=r},7609:(t,e,r)=>{var n=r(7425).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),c=new O(n||[]);return a(i,"_invoke",{value:j(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var v={};function d(){}function y(){}function m(){}var g={};p(g,s,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==r&&i.call(x,s)&&(g=x);var w=m.prototype=d.prototype=Object.create(g);function N(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,c,s){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(p).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return y.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:y,configurable:!0}),y.displayName=p(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},N(S.prototype),p(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(w),p(w,l,"Generator"),p(w,s,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},7425:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2841:(t,e,r)=>{var n=r(7609)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},a={};function c(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return i[t](r,r.exports,c),r.exports}c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{"use strict";c.r(s),c.d(s,{default:()=>d});var t=c(4212);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var n=c(748),o=c(2841),i=c.n(o);function a(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var u,l=c(210),p=c(2717),f=c(6870);!function(t){t.UNKNOWN="",t.ERROR="error",t.LOADING="loading"}(u||(u={}));var h={theme:t.PropTypes.theme().def(t.ThemeEnum.PRIMARY),size:t.PropTypes.size(),curStep:t.PropTypes.number.def(1),controllable:t.PropTypes.bool.def(!1),direction:(0,t.directionType)(),status:(0,l.toType)("status",{}).def(u.UNKNOWN),lineType:(0,t.lineStyleType)(),text:t.PropTypes.bool,extCls:t.PropTypes.string,steps:t.PropTypes.array.def([]),beforeChange:t.PropTypes.func};const v=(0,n.defineComponent)({name:"Steps",props:h,emits:["update:curStep","click"],setup:function(t,e){var r=this,o=e.emit,c=(0,p.useLocale)("steps"),s=(0,p.useLocale)("lang"),u=(0,n.ref)([]),l=function(t){var e,r=[];t.forEach((function(t){var e;"string"==typeof t?r.push(t):r.push({title:t.title,icon:t.icon,description:t.description,status:t.status,border:null===(e=t.border)||void 0===e||e})})),(e=u.value).splice.apply(e,[0,u.value.length].concat(r))},f=function(){var e,r;(e=u.value).splice.apply(e,[0,u.value.length].concat([{title:c.value.step1,icon:1},{title:c.value.step2,icon:2},{title:c.value.step3,icon:3}])),(null===(r=t.steps)||void 0===r?void 0:r.length)&&l(t.steps)};(0,n.watch)((function(){return s.value}),(function(){f()})),(0,n.onMounted)(f),(0,n.watch)((function(){return t.steps}),(function(){l(t.steps)}),{deep:!0}),(0,n.watch)((function(){return t.curStep}),(function(){var e;e=t.curStep,h.curStep=e}),{deep:!0});var v=(0,p.usePrefix)().resolveClassName;return{defaultSteps:u,jumpTo:function(e){return a(r,void 0,void 0,i().mark((function r(){var n=this;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!t.controllable||e===t.curStep){r.next=7;break}if("function"!=typeof t.beforeChange){r.next=5;break}return r.next=5,new Promise((function(r,o){return a(n,void 0,void 0,i().mark((function n(){var a;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.beforeChange(e);case 2:(a=n.sent)?r(a):o(a);case 4:case"end":return n.stop()}}),n)})))}));case 5:o("update:curStep",e),o("click",e);case 7:r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),console.warn(r.t0);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})))},resolveClassName:v}},render:function(){var e,o=this,i=this.resolveClassName("steps"),a=this.theme?"".concat(i,"-").concat(this.theme):"",c=this.size?"".concat(i,"-").concat(this.size):"",s=(0,t.classes)((r(e={},"".concat(this.extCls),!!this.extCls),r(e,"".concat(this.resolveClassName("steps-".concat(this.direction))),this.direction),r(e,"".concat(this.resolveClassName("steps-".concat(this.lineType))),this.lineType),e),"".concat(a," ").concat(i," ").concat(c)),u=function(t){return o.curStep>t+1||"done"===o.defaultSteps[t].status},l=function(t){return o.curStep===t+1},p=function(t){var e=t.icon;return e?"[object Object]"===Object.prototype.toString.call(e):"string"==typeof t},h=function(t,e){return e.icon||(e.icon=t),!isNaN(e.icon)},v=function(t,e){return l(t)&&"loading"===o.status||function(t){return"loading"===t.status}(e)?(0,n.createVNode)(f.Circle,{class:"".concat(o.resolveClassName("icon")," ").concat(o.resolveClassName("steps-icon")," icon-loading")},null):l(t)&&"error"===o.status||function(t){return"error"===t.status}(e)?(0,n.createVNode)(f.Error,{class:"".concat(o.resolveClassName("steps-icon"))},null):u(t)?(0,n.createVNode)(f.Done,{class:"".concat(o.resolveClassName("steps-icon"))},null):(0,n.createVNode)("span",null,[h(t,e)?t+1:(0,n.createVNode)(e.icon,null,null)])};return(0,n.createVNode)("div",{class:s},[this.defaultSteps.map((function(t,e){var r,i,a;return(0,n.createVNode)("div",{class:[o.resolveClassName("steps"),t.title?"":o.resolveClassName("step-no-content"),u(e)?"done":"",l(e)?"current":"",l(e)&&"error"===o.status?"isError":"",t.status&&l(e)?["".concat(o.resolveClassName("step-".concat(t.status)))]:""]},[(0,n.createVNode)("span",{class:["".concat(o.resolveClassName("step-indicator")),"".concat(o.resolveClassName("step-".concat(p(t)?"icon":"number"))),"".concat(o.resolveClassName("step-icon".concat(t.status)))],style:{cursor:o.controllable?"pointer":""},onClick:function(){o.jumpTo(e+1)}},[null!==(a=null===(i=(r=o.$slots)[e+1])||void 0===i?void 0:i.call(r))&&void 0!==a?a:v(e,t)]),t.title?(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-content"))},[(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-title")),style:{cursor:o.controllable?"pointer":""},onClick:function(){o.jumpTo(e+1)}},[t.title]),t.description&&(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-description")),title:t.description},[t.description])]):""])}))])}}),d=(0,t.withInstall)(v)})(),s})()));
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../icon"],e);else{var r="object"==typeof exports?e(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../icon")):e(t["../shared"],t.vue,t["vue-types"],t["../config-provider"],t["../icon"]);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,((t,e,r,n,o)=>(()=>{var i={2717:t=>{"use strict";t.exports=n},6870:t=>{"use strict";t.exports=o},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:t=>{"use strict";t.exports=r},7609:(t,e,r)=>{var n=r(7425).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),c=new O(n||[]);return a(i,"_invoke",{value:j(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var v={};function d(){}function y(){}function m(){}var g={};p(g,s,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(T([])));x&&x!==r&&i.call(x,s)&&(g=x);var w=m.prototype=d.prototype=Object.create(g);function N(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,c,s){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(p).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return y.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:y,configurable:!0}),y.displayName=p(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},N(S.prototype),p(S.prototype,u,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(w),p(w,l,"Generator"),p(w,s,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},7425:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2841:(t,e,r)=>{var n=r(7609)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},a={};function c(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return i[t](r,r.exports,c),r.exports}c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{"use strict";c.r(s),c.d(s,{default:()=>d});var t=c(4212);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var n=c(748),o=c(2841),i=c.n(o);function a(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function c(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}s((n=n.apply(t,e||[])).next())}))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var u,l=c(210),p=c(2717),f=c(6870);!function(t){t.UNKNOWN="",t.ERROR="error",t.LOADING="loading"}(u||(u={}));var h={theme:t.PropTypes.theme().def(t.ThemeEnum.PRIMARY),size:t.PropTypes.size(),curStep:t.PropTypes.number.def(1),controllable:t.PropTypes.bool.def(!1),direction:(0,t.directionType)(),status:(0,l.toType)("status",{}).def(u.UNKNOWN),lineType:(0,t.lineStyleType)(),text:t.PropTypes.bool,extCls:t.PropTypes.string,steps:t.PropTypes.array.def([]),beforeChange:t.PropTypes.func};const v=(0,n.defineComponent)({name:"Steps",props:h,emits:["update:curStep","click"],setup:function(t,e){var r=this,o=e.emit,c=(0,p.useLocale)("steps"),s=(0,p.useLocale)("lang"),u=(0,n.ref)([]),l=function(t){var e,r=[];t.forEach((function(t){var e;"string"==typeof t?r.push(t):r.push({title:t.title,icon:t.icon,description:t.description,status:t.status,border:null===(e=t.border)||void 0===e||e})})),(e=u.value).splice.apply(e,[0,u.value.length].concat(r))},f=function(){var e,r;(e=u.value).splice.apply(e,[0,u.value.length].concat([{title:c.value.step1,icon:1},{title:c.value.step2,icon:2},{title:c.value.step3,icon:3}])),(null===(r=t.steps)||void 0===r?void 0:r.length)&&l(t.steps)};(0,n.watch)((function(){return s.value}),(function(){f()})),(0,n.onMounted)(f),(0,n.watch)((function(){return t.steps}),(function(){l(t.steps)}),{deep:!0}),(0,n.watch)((function(){return t.curStep}),(function(){var e;e=t.curStep,h.curStep=e}),{deep:!0});var v=(0,p.usePrefix)().resolveClassName;return{defaultSteps:u,jumpTo:function(e){return a(r,void 0,void 0,i().mark((function r(){var n=this;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!t.controllable||e===t.curStep){r.next=7;break}if("function"!=typeof t.beforeChange){r.next=5;break}return r.next=5,new Promise((function(r,o){return a(n,void 0,void 0,i().mark((function n(){var a;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.beforeChange(e);case 2:(a=n.sent)?r(a):o(a);case 4:case"end":return n.stop()}}),n)})))}));case 5:o("update:curStep",e),o("click",e);case 7:r.next=12;break;case 9:r.prev=9,r.t0=r.catch(0),console.warn(r.t0);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})))},resolveClassName:v}},render:function(){var e,o=this,i=this.resolveClassName("steps"),a=this.theme?"".concat(i,"-").concat(this.theme):"",c=this.size?"".concat(i,"-").concat(this.size):"",s=(0,t.classes)((r(e={},"".concat(this.extCls),!!this.extCls),r(e,"".concat(this.resolveClassName("steps-".concat(this.direction))),this.direction),r(e,"".concat(this.resolveClassName("steps-".concat(this.lineType))),this.lineType),e),"".concat(a," ").concat(i," ").concat(c)),u=function(t){return o.curStep>t+1||"done"===o.defaultSteps[t].status},l=function(t){return o.curStep===t+1},p=function(t){var e=t.icon;return e?"[object Object]"===Object.prototype.toString.call(e):"string"==typeof t},h=function(t,e){return e.icon||(e.icon=t),!isNaN(e.icon)},v=function(t,e){return l(t)&&"loading"===o.status||function(t){return"loading"===t.status}(e)?(0,n.createVNode)(f.Circle,{class:"".concat(o.resolveClassName("icon")," ").concat(o.resolveClassName("steps-icon")," icon-loading")},null):l(t)&&"error"===o.status||function(t){return"error"===t.status}(e)?(0,n.createVNode)(f.Error,{class:"".concat(o.resolveClassName("steps-icon"))},null):u(t)?(0,n.createVNode)(f.Done,{class:"".concat(o.resolveClassName("steps-icon"))},null):(0,n.createVNode)("span",null,[h(t,e)?t+1:(0,n.createVNode)(e.icon,null,null)])};return(0,n.createVNode)("div",{class:s},[this.defaultSteps.map((function(t,e){var r,i,a;return(0,n.createVNode)("div",{class:[o.resolveClassName("step"),t.title?"":o.resolveClassName("step-no-content"),u(e)?"done":"",l(e)?"current":"",l(e)&&"error"===o.status?"isError":"",t.status&&l(e)?["".concat(o.resolveClassName("step-".concat(t.status)))]:""]},[(0,n.createVNode)("span",{class:["".concat(o.resolveClassName("step-indicator")),"".concat(o.resolveClassName("step-".concat(p(t)?"icon":"number"))),"".concat(o.resolveClassName("step-icon".concat(t.status)))],style:{cursor:o.controllable?"pointer":""},onClick:function(){o.jumpTo(e+1)}},[null!==(a=null===(i=(r=o.$slots)[e+1])||void 0===i?void 0:i.call(r))&&void 0!==a?a:v(e,t)]),t.title?(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-content"))},[(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-title")),style:{cursor:o.controllable?"pointer":""},onClick:function(){o.jumpTo(e+1)}},[t.title]),t.description&&(0,n.createVNode)("div",{class:"".concat(o.resolveClassName("step-description")),title:t.description},[t.description])]):""])}))])}}),d=(0,t.withInstall)(v)})(),s})()));
|