@polyv/product-ui 1.1.0-rc-20250703.1 → 1.2.0-rc-20250724.2
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/address-edit.cjs.js +7 -3
- package/address-edit.es.js +1175 -1137
- package/address-edit.umd.js +7 -3
- package/address-item.cjs.js +1 -1
- package/address-item.es.js +2 -2
- package/address-item.umd.js +3 -2
- package/address-list.cjs.js +2 -2
- package/address-list.es.js +8 -2
- package/address-list.umd.js +2 -2
- package/big-card-popup.cjs.js +5 -3
- package/big-card-popup.es.js +334 -297
- package/big-card-popup.umd.js +5 -3
- package/index.cjs.js +7 -3
- package/index.es.js +1230 -1159
- package/index.umd.js +7 -3
- package/mobile-product-pendant.cjs.js +2 -2
- package/mobile-product-pendant.es.js +3 -3
- package/mobile-product-pendant.umd.js +2 -2
- package/order-confirm.cjs.js +5 -3
- package/order-confirm.es.js +284 -278
- package/order-confirm.umd.js +5 -3
- package/order-detail.cjs.js +5 -3
- package/order-detail.es.js +284 -278
- package/order-detail.umd.js +5 -3
- package/order-item.cjs.js +1 -1
- package/order-item.es.js +8 -2
- package/order-item.umd.js +3 -2
- package/order-list-popup.cjs.js +5 -3
- package/order-list-popup.es.js +292 -281
- package/order-list-popup.umd.js +5 -3
- package/order-list.cjs.js +2 -2
- package/order-list.es.js +8 -2
- package/order-list.umd.js +2 -2
- package/order-popup.cjs.js +7 -3
- package/order-popup.es.js +1178 -1140
- package/order-popup.umd.js +7 -3
- package/package.json +2 -2
- package/pc-product-pendant.cjs.js +2 -2
- package/pc-product-pendant.es.js +8 -2
- package/pc-product-pendant.umd.js +2 -2
- package/product-button.cjs.js +3 -3
- package/product-button.es.js +23 -9
- package/product-button.umd.js +3 -3
- package/product-detail-popup.cjs.js +5 -3
- package/product-detail-popup.es.js +319 -290
- package/product-detail-popup.umd.js +5 -3
- package/product-detail.cjs.js +5 -3
- package/product-detail.es.js +319 -290
- package/product-detail.umd.js +5 -3
- package/product-iframe-link-popup.cjs.js +5 -3
- package/product-iframe-link-popup.es.js +286 -281
- package/product-iframe-link-popup.umd.js +5 -3
- package/product-item.cjs.js +5 -3
- package/product-item.es.js +327 -294
- package/product-item.umd.js +5 -3
- package/product-list-popup.cjs.js +5 -3
- package/product-list-popup.es.js +337 -297
- package/product-list-popup.umd.js +5 -3
- package/product-list.cjs.js +5 -3
- package/product-list.es.js +337 -297
- package/product-list.umd.js +5 -3
- package/small-card.cjs.js +5 -3
- package/small-card.es.js +324 -291
- package/small-card.umd.js +5 -3
package/address-item.cjs.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
7
7
|
* Released under the MIT License.
|
|
8
|
-
*/function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function i(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}const s={silent:!1,logLevel:"warn"},a=["validator"],u=Object.prototype,l=u.toString,c=u.hasOwnProperty,d=/^\s*function (\w+)/;function f(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(d);return e?e[1]:""}return""}const p=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))};function y(){}let v=y;if("production"!=={}.NODE_ENV){const e="undefined"!=typeof console;v=e?function(e,t=s.logLevel){!1===s.silent&&console[t](`[VueTypes warn]: ${e}`)}:y}const b=(e,t)=>c.call(e,t),h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},g=Array.isArray||function(e){return"[object Array]"===l.call(e)},m=e=>"[object Function]"===l.call(e),O=(e,t)=>p(e)&&b(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),_=e=>p(e)&&(b(e,"type")||["_vueTypes_name","validator","default","required"].some((t=>b(e,t))));function j(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function T(e,t,r=!1){let n,o=!0,i="";n=p(e)?e:{type:e};const s=O(n)?n._vueTypes_name+" - ":"";if(_(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return o;if(!n.required&&null==t)return o;g(n.type)?(o=n.type.some((e=>!0===T(e,t,!0))),i=n.type.map((e=>f(e))).join(" or ")):(i=f(n),o="Array"===i?g(t):"Object"===i?p(t):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(e){if(null==e)return"";const t=e.constructor.toString().match(d);return t?t[1].replace(/^Async/,""):""}(t)===i:t instanceof n.type)}if(!o){const e=`${s}value "${t}" should be of type "${i}"`;return!1===r?(v(e),!1):e}if(b(n,"validator")&&m(n.validator)){const e=v,i=[];if(v=e=>{i.push(e)},o=n.validator(t),v=e,!o){const e=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===r?(v(e),o):e}}return o}function w(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(b(this,"default")&&delete this.default,this):m(e)||!0===T(this,e,!0)?(this.default=g(e)?()=>[...e]:p(e)?()=>Object.assign({},e):e,this):(v(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:n}=r;return m(n)&&(r.validator=j(n,r)),r}function $(e,t){const r=w(e,t);return Object.defineProperty(r,"validate",{value(e){return m(this.validator)&&v(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=j(e,this),this}})}function x(e,t,r){const n=function(e){const t={};return Object.getOwnPropertyNames(e).forEach((r=>{t[r]=Object.getOwnPropertyDescriptor(e,r)})),Object.defineProperties({},t)}(t);if(n._vueTypes_name=e,!p(r))return n;const{validator:o}=r,s=i(r,a);if(m(o)){let{validator:e}=n;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),n.validator=j(e?function(t){return e.call(this,t)&&o.call(this,t)}:o,n)}var u,l;return Object.assign(n,s)}function P(e){return e.replace(/^(?!\s*$)/gm," ")}const A=()=>$("any",{}),C=()=>$("function",{type:Function}),k=()=>$("boolean",{type:Boolean}),E=()=>$("string",{type:String}),S=()=>$("number",{type:Number}),q=()=>$("array",{type:Array}),N=()=>$("object",{type:Object});function V(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return w(e.name||"<<anonymous function>>",{type:null,validator(r){const n=e(r);return n||v(`${this._vueTypes_name} - ${t}`),n}})}function F(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map((e=>"symbol"==typeof e?e.toString():e)).join('", "')}".`,r={validator(r){const n=-1!==e.indexOf(r);return n||v(t),n}};if(-1===e.indexOf(null)){const t=e.reduce(((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r)}return e}),[]);t.length>0&&(r.type=t)}return w("oneOf",r)}function I(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,r=!1,n=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(_(o)){if(m(o.validator)&&(t=!0),O(o,"oneOf")&&o.type){n=n.concat(o.type);continue}if(O(o,"nullable")){r=!0;continue}if(!0===o.type||!o.type){v('oneOfType - invalid usage of "true" and "null" as types.');continue}n=n.concat(o.type)}else n.push(o)}n=n.filter(((e,t)=>n.indexOf(e)===t));const o=!1===r&&n.length>0?n:null;return w("oneOfType",t?{type:o,validator(t){const r=[],n=e.some((e=>{const n=T(e,t,!0);return"string"==typeof n&&r.push(n),!0===n}));return n||v(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\n${P(r.join("\n"))}`),n}}:{type:o})}function B(e){return w("arrayOf",{type:Array,validator(t){let r="";const n=t.every((t=>(r=T(e,t,!0),!0===r)));return n||v(`arrayOf - value validation error:\n${P(r)}`),n}})}function D(e){return w("instanceOf",{type:e})}function L(e){return w("objectOf",{type:Object,validator(t){let r="";const n=Object.keys(t).every((n=>(r=T(e,t[n],!0),!0===r)));return n||v(`objectOf - value validation error:\n${P(r)}`),n}})}function R(e){const t=Object.keys(e),r=t.filter((t=>{var r;return!(null===(r=e[t])||void 0===r||!r.required)})),n=w("shape",{type:Object,validator(n){if(!p(n))return!1;const o=Object.keys(n);if(r.length>0&&r.some((e=>-1===o.indexOf(e)))){const e=r.filter((e=>-1===o.indexOf(e)));return v(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return o.every((r=>{if(-1===t.indexOf(r))return!0===this._vueTypes_isLoose||(v(`shape - shape definition does not include a "${r}" property. Allowed keys: "${t.join('", "')}".`),!1);const o=T(e[r],n[r],!0);return"string"==typeof o&&v(`shape - "${r}" property validation error:\n ${P(o)}`),!0===o}))}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),n}const Y=["name","validate","getter"],M=(e=>((e=class{static get any(){return A()}static get func(){return C().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?k():k().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return S().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return N().def(this.defaults.object)}static get integer(){return w("integer",{type:Number,validator(e){const t=h(e);return!1===t&&v(`integer - "${e}" is not an integer`),t}}).def(this.defaults.integer)}static get symbol(){return w("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&v(`symbol - invalid value "${e}"`),t}})}static get nullable(){return Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&v("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})}static extend(e){if(v("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),g(e))return e.forEach((e=>this.extend(e))),this;const{name:t,validate:r=!1,getter:n=!1}=e,o=i(e,Y);if(b(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:s}=o;if(O(s))return delete o.type,Object.defineProperty(this,t,n?{get:()=>x(t,s,o)}:{value(...e){const r=x(t,s,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let a;return a=n?{get(){const e=Object.assign({},o);return r?$(t,e):w(t,e)},enumerable:!0}:{value(...e){const n=Object.assign({},o);let i;return i=r?$(t,n):w(t,n),n.validator&&(i.validator=n.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,a)}}).defaults={},e.sensibleDefaults=void 0,e.config=s,e.custom=V,e.oneOf=F,e.instanceOf=D,e.oneOfType=I,e.arrayOf=B,e.objectOf=L,e.shape=R,e.utils={validate:(e,t)=>!0===T(t,e,!0),toType:(e,t,r=!1)=>r?$(e,t):w(e,t)},e))();!function(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;(t=class extends M{static get sensibleDefaults(){return o({},this.defaults)}static set sensibleDefaults(t){this.defaults=!1!==t?o({},!0!==t?t:e):{}}}).defaults=o({},e)}();class J{static get string(){return E().def("")}static get looseString(){return E()}static get number(){return S().def(0)}static get looseNumber(){return S()}static get bool(){return k().def(!0)}static get looseBool(){return I([]).def(void 0)}static get looseElement(){return I([]).def(void 0)}}t(J,"objectType",N),t(J,"array",(()=>q().def([]))),t(J,"object",N),t(J,"func",C),t(J,"oneOf",F),t(J,"oneOfType",I),t(J,"enum",E),t(J,"any",A);const U=[""","'","&","<",">"," "],z=Object.create(null),G=Object.create(null);function H(e,t){var r,n,o;t=t||{};const i=e.length,s=null!==(r=t.start)&&void 0!==r?r:0,a=null!==(n=t.end)&&void 0!==n?n:i-1,u=null!==(o=t.maskChar)&&void 0!==o?o:"*";if(s>=0&&a>=0&&s<=a&&a<i){let t=e.substring(0,s);return t+=new Array(a-s+2).join(u),a<i-1&&(t+=e.substring(a+1)),t}if(s>=0)return s>=i?e:e.substring(0,s)+new Array(i-s+1).join(u);if(a>=0){let t=new Array(Math.min(a,i)+2).join(u);return a<i-1&&(t+=e.substring(a+1)),t}return e}['"',"'","&","<",">"," "].forEach(((e,t)=>{z[e]=U[t],G[U[t]]=e}));function K(e,t,r,n,o,i,s,a){var u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),{exports:e,options:u}}const Q=K(r.defineComponent({__name:"address-item",props:{addressInfo:J.object().isRequired},emits:{"choose-address":()=>!0},setup(e,{emit:t}){const r=e;return{__sfc:!0,props:r,emit:t,onClick:function(){t("choose-address",r.addressInfo)},maskChars:H}}}),(function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"plv-product-address-item",on:{click:r.onClick}},[t("div",{staticClass:"plv-product-address-item__top"},[t("div",{staticClass:"plv-product-address-item__content"},[t("div",{staticClass:"plv-product-address-item__header"},[t("span",[e._v(e._s(e.addressInfo.name))]),t("span",{staticClass:"plv-product-address-item__header-phone"},[e._v(e._s(r.maskChars(e.addressInfo.mobile,{start:3,end:6})))])]),t("div",{staticClass:"plv-product-address-item__address"},[e._v(" "+e._s(e.addressInfo.address)+" ")])]),e.$slots.icon?t("div",{staticClass:"plv-product-address-item__icon-wrapper"},[e._t("icon")],2):e._e()]),e._t("action")],2)}),[]).exports;module.exports=Q,console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: address-item]","[version: 1.1.0-rc-20250703.1]","[buildTime: 2025-07-03 01:48:56]");
|
|
8
|
+
*/function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}function i(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}const s={silent:!1,logLevel:"warn"},a=["validator"],u=Object.prototype,l=u.toString,c=u.hasOwnProperty,d=/^\s*function (\w+)/;function f(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(d);return e?e[1]:""}return""}const p=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))};function y(){}let v=y;if("production"!=={}.NODE_ENV){const e="undefined"!=typeof console;v=e?function(e,t=s.logLevel){!1===s.silent&&console[t](`[VueTypes warn]: ${e}`)}:y}const b=(e,t)=>c.call(e,t),h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},g=Array.isArray||function(e){return"[object Array]"===l.call(e)},m=e=>"[object Function]"===l.call(e),O=(e,t)=>p(e)&&b(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),_=e=>p(e)&&(b(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>b(e,t)));function j(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function T(e,t,r=!1){let n,o=!0,i="";n=p(e)?e:{type:e};const s=O(n)?n._vueTypes_name+" - ":"";if(_(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return o;if(!n.required&&null==t)return o;g(n.type)?(o=n.type.some(e=>!0===T(e,t,!0)),i=n.type.map(e=>f(e)).join(" or ")):(i=f(n),o="Array"===i?g(t):"Object"===i?p(t):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(e){if(null==e)return"";const t=e.constructor.toString().match(d);return t?t[1].replace(/^Async/,""):""}(t)===i:t instanceof n.type)}if(!o){const e=`${s}value "${t}" should be of type "${i}"`;return!1===r?(v(e),!1):e}if(b(n,"validator")&&m(n.validator)){const e=v,i=[];if(v=e=>{i.push(e)},o=n.validator(t),v=e,!o){const e=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===r?(v(e),o):e}}return o}function w(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(b(this,"default")&&delete this.default,this):m(e)||!0===T(this,e,!0)?(this.default=g(e)?()=>[...e]:p(e)?()=>Object.assign({},e):e,this):(v(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:n}=r;return m(n)&&(r.validator=j(n,r)),r}function $(e,t){const r=w(e,t);return Object.defineProperty(r,"validate",{value(e){return m(this.validator)&&v(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=j(e,this),this}})}function x(e,t,r){const n=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=Object.getOwnPropertyDescriptor(e,r)}),Object.defineProperties({},t)}(t);if(n._vueTypes_name=e,!p(r))return n;const{validator:o}=r,s=i(r,a);if(m(o)){let{validator:e}=n;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),n.validator=j(e?function(t){return e.call(this,t)&&o.call(this,t)}:o,n)}var u,l;return Object.assign(n,s)}function P(e){return e.replace(/^(?!\s*$)/gm," ")}const A=()=>$("any",{}),C=()=>$("function",{type:Function}),k=()=>$("boolean",{type:Boolean}),E=()=>$("string",{type:String}),S=()=>$("number",{type:Number}),q=()=>$("array",{type:Array}),N=()=>$("object",{type:Object});function V(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return w(e.name||"<<anonymous function>>",{type:null,validator(r){const n=e(r);return n||v(`${this._vueTypes_name} - ${t}`),n}})}function F(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(e=>"symbol"==typeof e?e.toString():e).join('", "')}".`,r={validator(r){const n=-1!==e.indexOf(r);return n||v(t),n}};if(-1===e.indexOf(null)){const t=e.reduce((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r)}return e},[]);t.length>0&&(r.type=t)}return w("oneOf",r)}function I(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,r=!1,n=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(_(o)){if(m(o.validator)&&(t=!0),O(o,"oneOf")&&o.type){n=n.concat(o.type);continue}if(O(o,"nullable")){r=!0;continue}if(!0===o.type||!o.type){v('oneOfType - invalid usage of "true" and "null" as types.');continue}n=n.concat(o.type)}else n.push(o)}n=n.filter((e,t)=>n.indexOf(e)===t);const o=!1===r&&n.length>0?n:null;return w("oneOfType",t?{type:o,validator(t){const r=[],n=e.some(e=>{const n=T(e,t,!0);return"string"==typeof n&&r.push(n),!0===n});return n||v(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\n${P(r.join("\n"))}`),n}}:{type:o})}function B(e){return w("arrayOf",{type:Array,validator(t){let r="";const n=t.every(t=>(r=T(e,t,!0),!0===r));return n||v(`arrayOf - value validation error:\n${P(r)}`),n}})}function D(e){return w("instanceOf",{type:e})}function L(e){return w("objectOf",{type:Object,validator(t){let r="";const n=Object.keys(t).every(n=>(r=T(e,t[n],!0),!0===r));return n||v(`objectOf - value validation error:\n${P(r)}`),n}})}function R(e){const t=Object.keys(e),r=t.filter(t=>{var r;return!(null===(r=e[t])||void 0===r||!r.required)}),n=w("shape",{type:Object,validator(n){if(!p(n))return!1;const o=Object.keys(n);if(r.length>0&&r.some(e=>-1===o.indexOf(e))){const e=r.filter(e=>-1===o.indexOf(e));return v(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return o.every(r=>{if(-1===t.indexOf(r))return!0===this._vueTypes_isLoose||(v(`shape - shape definition does not include a "${r}" property. Allowed keys: "${t.join('", "')}".`),!1);const o=T(e[r],n[r],!0);return"string"==typeof o&&v(`shape - "${r}" property validation error:\n ${P(o)}`),!0===o})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),n}const Y=["name","validate","getter"],M=(e=>((e=class{static get any(){return A()}static get func(){return C().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?k():k().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return S().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return N().def(this.defaults.object)}static get integer(){return w("integer",{type:Number,validator(e){const t=h(e);return!1===t&&v(`integer - "${e}" is not an integer`),t}}).def(this.defaults.integer)}static get symbol(){return w("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&v(`symbol - invalid value "${e}"`),t}})}static get nullable(){return Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&v("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})}static extend(e){if(v("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),g(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:r=!1,getter:n=!1}=e,o=i(e,Y);if(b(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:s}=o;if(O(s))return delete o.type,Object.defineProperty(this,t,n?{get:()=>x(t,s,o)}:{value(...e){const r=x(t,s,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let a;return a=n?{get(){const e=Object.assign({},o);return r?$(t,e):w(t,e)},enumerable:!0}:{value(...e){const n=Object.assign({},o);let i;return i=r?$(t,n):w(t,n),n.validator&&(i.validator=n.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,a)}}).defaults={},e.sensibleDefaults=void 0,e.config=s,e.custom=V,e.oneOf=F,e.instanceOf=D,e.oneOfType=I,e.arrayOf=B,e.objectOf=L,e.shape=R,e.utils={validate:(e,t)=>!0===T(t,e,!0),toType:(e,t,r=!1)=>r?$(e,t):w(e,t)},e))();!function(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;(t=class extends M{static get sensibleDefaults(){return o({},this.defaults)}static set sensibleDefaults(t){this.defaults=!1!==t?o({},!0!==t?t:e):{}}}).defaults=o({},e)}();class J{static get string(){return E().def("")}static get looseString(){return E()}static get number(){return S().def(0)}static get looseNumber(){return S()}static get bool(){return k().def(!0)}static get looseBool(){return I([]).def(void 0)}static get looseElement(){return I([]).def(void 0)}}t(J,"objectType",N),t(J,"array",()=>q().def([])),t(J,"object",N),t(J,"func",C),t(J,"oneOf",F),t(J,"oneOfType",I),t(J,"enum",E),t(J,"any",A);const U=[""","'","&","<",">"," "],z=Object.create(null),G=Object.create(null);function H(e,t){var r,n,o;t=t||{};const i=e.length,s=null!==(r=t.start)&&void 0!==r?r:0,a=null!==(n=t.end)&&void 0!==n?n:i-1,u=null!==(o=t.maskChar)&&void 0!==o?o:"*";if(s>=0&&a>=0&&s<=a&&a<i){let t=e.substring(0,s);return t+=new Array(a-s+2).join(u),a<i-1&&(t+=e.substring(a+1)),t}if(s>=0)return s>=i?e:e.substring(0,s)+new Array(i-s+1).join(u);if(a>=0){let t=new Array(Math.min(a,i)+2).join(u);return a<i-1&&(t+=e.substring(a+1)),t}return e}['"',"'","&","<",">"," "].forEach((e,t)=>{z[e]=U[t],G[U[t]]=e});function K(e,t,r,n,o,i,s,a){var u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),{exports:e,options:u}}const Q=K(r.defineComponent({__name:"address-item",props:{addressInfo:J.object().isRequired},emits:{"choose-address":()=>!0},setup(e,{emit:t}){const r=e;return{__sfc:!0,props:r,emit:t,onClick:function(){t("choose-address",r.addressInfo)},maskChars:H}}}),function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"plv-product-address-item",on:{click:r.onClick}},[t("div",{staticClass:"plv-product-address-item__top"},[t("div",{staticClass:"plv-product-address-item__content"},[t("div",{staticClass:"plv-product-address-item__header"},[t("span",[e._v(e._s(e.addressInfo.name))]),t("span",{staticClass:"plv-product-address-item__header-phone"},[e._v(e._s(r.maskChars(e.addressInfo.mobile,{start:3,end:6})))])]),t("div",{staticClass:"plv-product-address-item__address"},[e._v(" "+e._s(e.addressInfo.address)+" ")])]),e.$slots.icon?t("div",{staticClass:"plv-product-address-item__icon-wrapper"},[e._t("icon")],2):e._e()]),e._t("action")],2)},[]).exports;module.exports=Q,console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: address-item]","[version: 1.2.0-rc-20250724.2]","[buildTime: 2025-07-24 03:57:54]");
|
package/address-item.es.js
CHANGED
|
@@ -417,8 +417,8 @@ console.log(
|
|
|
417
417
|
"%c@polyv/product-ui",
|
|
418
418
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
419
419
|
"[component: address-item]",
|
|
420
|
-
"[version: 1.
|
|
421
|
-
"[buildTime: 2025-07-03
|
|
420
|
+
"[version: 1.2.0-rc-20250724.2]",
|
|
421
|
+
"[buildTime: 2025-07-24 03:57:54]"
|
|
422
422
|
);
|
|
423
423
|
export {
|
|
424
424
|
addressItem as default
|
package/address-item.umd.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".plv-product-address-item{box-sizing:border-box;padding:12px 16px;border-radius:8px;background:#fff}.plv-product-address-item__top{display:flex;justify-content:space-between;align-items:center}.plv-product-address-item__content{flex:1;min-width:0}.plv-product-address-item__header{color:#000c;font-size:14px}.plv-product-address-item__header-phone{margin-left:4px}.plv-product-address-item__address{margin-top:4px;color:#0006;font-size:14px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.plv-product-address-item__icon-wrapper{display:flex;flex-shrink:0;align-items:center;margin-left:40px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).PolyvProductUIAddressItem=t(e.Vue2Module||e.Vue)}(this,
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).PolyvProductUIAddressItem=t(e.Vue2Module||e.Vue)}(this,function(e){"use strict";var t=Object.defineProperty,n=(e,n,r)=>((e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r)(e,"symbol"!=typeof n?n+"":n,r);
|
|
3
3
|
/*!
|
|
4
4
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
7
7
|
* Released under the MIT License.
|
|
8
|
-
*/;function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const s={silent:!1,logLevel:"warn"},a=["validator"],u=Object.prototype,l=u.toString,c=u.hasOwnProperty,d=/^\s*function (\w+)/;function f(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(d);return e?e[1]:""}return""}const p=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))};function y(){}let v=y;if("production"!=={}.NODE_ENV){const e="undefined"!=typeof console;v=e?function(e,t=s.logLevel){!1===s.silent&&console[t](`[VueTypes warn]: ${e}`)}:y}const b=(e,t)=>c.call(e,t),h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},g=Array.isArray||function(e){return"[object Array]"===l.call(e)},m=e=>"[object Function]"===l.call(e),O=(e,t)=>p(e)&&b(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),_=e=>p(e)&&(b(e,"type")||["_vueTypes_name","validator","default","required"].some((t=>b(e,t))));function j(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function T(e,t,n=!1){let r,o=!0,i="";r=p(e)?e:{type:e};const s=O(r)?r._vueTypes_name+" - ":"";if(_(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return o;if(!r.required&&null==t)return o;g(r.type)?(o=r.type.some((e=>!0===T(e,t,!0))),i=r.type.map((e=>f(e))).join(" or ")):(i=f(r),o="Array"===i?g(t):"Object"===i?p(t):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(e){if(null==e)return"";const t=e.constructor.toString().match(d);return t?t[1].replace(/^Async/,""):""}(t)===i:t instanceof r.type)}if(!o){const e=`${s}value "${t}" should be of type "${i}"`;return!1===n?(v(e),!1):e}if(b(r,"validator")&&m(r.validator)){const e=v,i=[];if(v=e=>{i.push(e)},o=r.validator(t),v=e,!o){const e=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===n?(v(e),o):e}}return o}function w(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(b(this,"default")&&delete this.default,this):m(e)||!0===T(this,e,!0)?(this.default=g(e)?()=>[...e]:p(e)?()=>Object.assign({},e):e,this):(v(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:r}=n;return m(r)&&(n.validator=j(r,n)),n}function $(e,t){const n=w(e,t);return Object.defineProperty(n,"validate",{value(e){return m(this.validator)&&v(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=j(e,this),this}})}function x(e,t,n){const r=function(e){const t={};return Object.getOwnPropertyNames(e).forEach((n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)})),Object.defineProperties({},t)}(t);if(r._vueTypes_name=e,!p(n))return r;const{validator:o}=n,s=i(n,a);if(m(o)){let{validator:e}=r;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),r.validator=j(e?function(t){return e.call(this,t)&&o.call(this,t)}:o,r)}var u,l;return Object.assign(r,s)}function P(e){return e.replace(/^(?!\s*$)/gm," ")}const A=()=>$("any",{}),C=()=>$("function",{type:Function}),k=()=>$("boolean",{type:Boolean}),E=()=>$("string",{type:String}),S=()=>$("number",{type:Number}),q=()=>$("array",{type:Array}),V=()=>$("object",{type:Object});function N(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return w(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||v(`${this._vueTypes_name} - ${t}`),r}})}function I(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map((e=>"symbol"==typeof e?e.toString():e)).join('", "')}".`,n={validator(n){const r=-1!==e.indexOf(n);return r||v(t),r}};if(-1===e.indexOf(null)){const t=e.reduce(((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e}),[]);t.length>0&&(n.type=t)}return w("oneOf",n)}function F(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(_(o)){if(m(o.validator)&&(t=!0),O(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(O(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){v('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter(((e,t)=>r.indexOf(e)===t));const o=!1===n&&r.length>0?r:null;return w("oneOfType",t?{type:o,validator(t){const n=[],r=e.some((e=>{const r=T(e,t,!0);return"string"==typeof r&&n.push(r),!0===r}));return r||v(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${P(n.join("\n"))}`),r}}:{type:o})}function B(e){return w("arrayOf",{type:Array,validator(t){let n="";const r=t.every((t=>(n=T(e,t,!0),!0===n)));return r||v(`arrayOf - value validation error:\n${P(n)}`),r}})}function D(e){return w("instanceOf",{type:e})}function L(e){return w("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every((r=>(n=T(e,t[r],!0),!0===n)));return r||v(`objectOf - value validation error:\n${P(n)}`),r}})}function M(e){const t=Object.keys(e),n=t.filter((t=>{var n;return!(null===(n=e[t])||void 0===n||!n.required)})),r=w("shape",{type:Object,validator(r){if(!p(r))return!1;const o=Object.keys(r);if(n.length>0&&n.some((e=>-1===o.indexOf(e)))){const e=n.filter((e=>-1===o.indexOf(e)));return v(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return o.every((n=>{if(-1===t.indexOf(n))return!0===this._vueTypes_isLoose||(v(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const o=T(e[n],r[n],!0);return"string"==typeof o&&v(`shape - "${n}" property validation error:\n ${P(o)}`),!0===o}))}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const R=["name","validate","getter"],Y=(e=>((e=class{static get any(){return A()}static get func(){return C().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?k():k().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return S().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return V().def(this.defaults.object)}static get integer(){return w("integer",{type:Number,validator(e){const t=h(e);return!1===t&&v(`integer - "${e}" is not an integer`),t}}).def(this.defaults.integer)}static get symbol(){return w("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&v(`symbol - invalid value "${e}"`),t}})}static get nullable(){return Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&v("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})}static extend(e){if(v("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),g(e))return e.forEach((e=>this.extend(e))),this;const{name:t,validate:n=!1,getter:r=!1}=e,o=i(e,R);if(b(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:s}=o;if(O(s))return delete o.type,Object.defineProperty(this,t,r?{get:()=>x(t,s,o)}:{value(...e){const n=x(t,s,o);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let a;return a=r?{get(){const e=Object.assign({},o);return n?$(t,e):w(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?$(t,r):w(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,a)}}).defaults={},e.sensibleDefaults=void 0,e.config=s,e.custom=N,e.oneOf=I,e.instanceOf=D,e.oneOfType=F,e.arrayOf=B,e.objectOf=L,e.shape=M,e.utils={validate:(e,t)=>!0===T(t,e,!0),toType:(e,t,n=!1)=>n?$(e,t):w(e,t)},e))();!function(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;(t=class extends Y{static get sensibleDefaults(){return o({},this.defaults)}static set sensibleDefaults(t){this.defaults=!1!==t?o({},!0!==t?t:e):{}}}).defaults=o({},e)}();class U{static get string(){return E().def("")}static get looseString(){return E()}static get number(){return S().def(0)}static get looseNumber(){return S()}static get bool(){return k().def(!0)}static get looseBool(){return F([]).def(void 0)}static get looseElement(){return F([]).def(void 0)}}n(U,"objectType",V),n(U,"array",(()=>q().def([]))),n(U,"object",V),n(U,"func",C),n(U,"oneOf",I),n(U,"oneOfType",F),n(U,"enum",E),n(U,"any",A);const J=[""","'","&","<",">"," "],z=Object.create(null),G=Object.create(null);function H(e,t){var n,r,o;t=t||{};const i=e.length,s=null!==(n=t.start)&&void 0!==n?n:0,a=null!==(r=t.end)&&void 0!==r?r:i-1,u=null!==(o=t.maskChar)&&void 0!==o?o:"*";if(s>=0&&a>=0&&s<=a&&a<i){let t=e.substring(0,s);return t+=new Array(a-s+2).join(u),a<i-1&&(t+=e.substring(a+1)),t}if(s>=0)return s>=i?e:e.substring(0,s)+new Array(i-s+1).join(u);if(a>=0){let t=new Array(Math.min(a,i)+2).join(u);return a<i-1&&(t+=e.substring(a+1)),t}return e}['"',"'","&","<",">"," "].forEach(((e,t)=>{z[e]=J[t],G[J[t]]=e}));function K(e,t,n,r,o,i,s,a){var u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),{exports:e,options:u}}return K(e.defineComponent({__name:"address-item",props:{addressInfo:U.object().isRequired},emits:{"choose-address":()=>!0},setup(e,{emit:t}){const n=e;return{__sfc:!0,props:n,emit:t,onClick:function(){t("choose-address",n.addressInfo)},maskChars:H}}}),(function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"plv-product-address-item",on:{click:n.onClick}},[t("div",{staticClass:"plv-product-address-item__top"},[t("div",{staticClass:"plv-product-address-item__content"},[t("div",{staticClass:"plv-product-address-item__header"},[t("span",[e._v(e._s(e.addressInfo.name))]),t("span",{staticClass:"plv-product-address-item__header-phone"},[e._v(e._s(n.maskChars(e.addressInfo.mobile,{start:3,end:6})))])]),t("div",{staticClass:"plv-product-address-item__address"},[e._v(" "+e._s(e.addressInfo.address)+" ")])]),e.$slots.icon?t("div",{staticClass:"plv-product-address-item__icon-wrapper"},[e._t("icon")],2):e._e()]),e._t("action")],2)}),[]).exports})),console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: address-item]","[version: 1.1.0-rc-20250703.1]","[buildTime: 2025-07-03 01:48:55]");
|
|
8
|
+
*/
|
|
9
|
+
function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const s={silent:!1,logLevel:"warn"},a=["validator"],u=Object.prototype,l=u.toString,c=u.hasOwnProperty,d=/^\s*function (\w+)/;function f(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(d);return e?e[1]:""}return""}const p=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))};function y(){}let v=y;if("production"!=={}.NODE_ENV){const e="undefined"!=typeof console;v=e?function(e,t=s.logLevel){!1===s.silent&&console[t](`[VueTypes warn]: ${e}`)}:y}const b=(e,t)=>c.call(e,t),h=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},g=Array.isArray||function(e){return"[object Array]"===l.call(e)},m=e=>"[object Function]"===l.call(e),O=(e,t)=>p(e)&&b(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),_=e=>p(e)&&(b(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>b(e,t)));function j(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function T(e,t,n=!1){let r,o=!0,i="";r=p(e)?e:{type:e};const s=O(r)?r._vueTypes_name+" - ":"";if(_(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return o;if(!r.required&&null==t)return o;g(r.type)?(o=r.type.some(e=>!0===T(e,t,!0)),i=r.type.map(e=>f(e)).join(" or ")):(i=f(r),o="Array"===i?g(t):"Object"===i?p(t):"String"===i||"Number"===i||"Boolean"===i||"Function"===i?function(e){if(null==e)return"";const t=e.constructor.toString().match(d);return t?t[1].replace(/^Async/,""):""}(t)===i:t instanceof r.type)}if(!o){const e=`${s}value "${t}" should be of type "${i}"`;return!1===n?(v(e),!1):e}if(b(r,"validator")&&m(r.validator)){const e=v,i=[];if(v=e=>{i.push(e)},o=r.validator(t),v=e,!o){const e=(i.length>1?"* ":"")+i.join("\n* ");return i.length=0,!1===n?(v(e),o):e}}return o}function w(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(b(this,"default")&&delete this.default,this):m(e)||!0===T(this,e,!0)?(this.default=g(e)?()=>[...e]:p(e)?()=>Object.assign({},e):e,this):(v(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:r}=n;return m(r)&&(n.validator=j(r,n)),n}function $(e,t){const n=w(e,t);return Object.defineProperty(n,"validate",{value(e){return m(this.validator)&&v(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=j(e,this),this}})}function x(e,t,n){const r=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)}),Object.defineProperties({},t)}(t);if(r._vueTypes_name=e,!p(n))return r;const{validator:o}=n,s=i(n,a);if(m(o)){let{validator:e}=r;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),r.validator=j(e?function(t){return e.call(this,t)&&o.call(this,t)}:o,r)}var u,l;return Object.assign(r,s)}function P(e){return e.replace(/^(?!\s*$)/gm," ")}const A=()=>$("any",{}),C=()=>$("function",{type:Function}),k=()=>$("boolean",{type:Boolean}),E=()=>$("string",{type:String}),S=()=>$("number",{type:Number}),q=()=>$("array",{type:Array}),V=()=>$("object",{type:Object});function N(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return w(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||v(`${this._vueTypes_name} - ${t}`),r}})}function I(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(e=>"symbol"==typeof e?e.toString():e).join('", "')}".`,n={validator(n){const r=-1!==e.indexOf(n);return r||v(t),r}};if(-1===e.indexOf(null)){const t=e.reduce((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);t.length>0&&(n.type=t)}return w("oneOf",n)}function F(e){if(!g(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(_(o)){if(m(o.validator)&&(t=!0),O(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(O(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){v('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter((e,t)=>r.indexOf(e)===t);const o=!1===n&&r.length>0?r:null;return w("oneOfType",t?{type:o,validator(t){const n=[],r=e.some(e=>{const r=T(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||v(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${P(n.join("\n"))}`),r}}:{type:o})}function B(e){return w("arrayOf",{type:Array,validator(t){let n="";const r=t.every(t=>(n=T(e,t,!0),!0===n));return r||v(`arrayOf - value validation error:\n${P(n)}`),r}})}function D(e){return w("instanceOf",{type:e})}function L(e){return w("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(r=>(n=T(e,t[r],!0),!0===n));return r||v(`objectOf - value validation error:\n${P(n)}`),r}})}function M(e){const t=Object.keys(e),n=t.filter(t=>{var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=w("shape",{type:Object,validator(r){if(!p(r))return!1;const o=Object.keys(r);if(n.length>0&&n.some(e=>-1===o.indexOf(e))){const e=n.filter(e=>-1===o.indexOf(e));return v(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return o.every(n=>{if(-1===t.indexOf(n))return!0===this._vueTypes_isLoose||(v(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const o=T(e[n],r[n],!0);return"string"==typeof o&&v(`shape - "${n}" property validation error:\n ${P(o)}`),!0===o})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const R=["name","validate","getter"],Y=(e=>((e=class{static get any(){return A()}static get func(){return C().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?k():k().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return S().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return V().def(this.defaults.object)}static get integer(){return w("integer",{type:Number,validator(e){const t=h(e);return!1===t&&v(`integer - "${e}" is not an integer`),t}}).def(this.defaults.integer)}static get symbol(){return w("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&v(`symbol - invalid value "${e}"`),t}})}static get nullable(){return Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&v("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})}static extend(e){if(v("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),g(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:n=!1,getter:r=!1}=e,o=i(e,R);if(b(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:s}=o;if(O(s))return delete o.type,Object.defineProperty(this,t,r?{get:()=>x(t,s,o)}:{value(...e){const n=x(t,s,o);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let a;return a=r?{get(){const e=Object.assign({},o);return n?$(t,e):w(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?$(t,r):w(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,a)}}).defaults={},e.sensibleDefaults=void 0,e.config=s,e.custom=N,e.oneOf=I,e.instanceOf=D,e.oneOfType=F,e.arrayOf=B,e.objectOf=L,e.shape=M,e.utils={validate:(e,t)=>!0===T(t,e,!0),toType:(e,t,n=!1)=>n?$(e,t):w(e,t)},e))();!function(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;(t=class extends Y{static get sensibleDefaults(){return o({},this.defaults)}static set sensibleDefaults(t){this.defaults=!1!==t?o({},!0!==t?t:e):{}}}).defaults=o({},e)}();class U{static get string(){return E().def("")}static get looseString(){return E()}static get number(){return S().def(0)}static get looseNumber(){return S()}static get bool(){return k().def(!0)}static get looseBool(){return F([]).def(void 0)}static get looseElement(){return F([]).def(void 0)}}n(U,"objectType",V),n(U,"array",()=>q().def([])),n(U,"object",V),n(U,"func",C),n(U,"oneOf",I),n(U,"oneOfType",F),n(U,"enum",E),n(U,"any",A);const J=[""","'","&","<",">"," "],z=Object.create(null),G=Object.create(null);function H(e,t){var n,r,o;t=t||{};const i=e.length,s=null!==(n=t.start)&&void 0!==n?n:0,a=null!==(r=t.end)&&void 0!==r?r:i-1,u=null!==(o=t.maskChar)&&void 0!==o?o:"*";if(s>=0&&a>=0&&s<=a&&a<i){let t=e.substring(0,s);return t+=new Array(a-s+2).join(u),a<i-1&&(t+=e.substring(a+1)),t}if(s>=0)return s>=i?e:e.substring(0,s)+new Array(i-s+1).join(u);if(a>=0){let t=new Array(Math.min(a,i)+2).join(u);return a<i-1&&(t+=e.substring(a+1)),t}return e}['"',"'","&","<",">"," "].forEach((e,t)=>{z[e]=J[t],G[J[t]]=e});function K(e,t,n,r,o,i,s,a){var u="function"==typeof e?e.options:e;return t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),{exports:e,options:u}}return K(e.defineComponent({__name:"address-item",props:{addressInfo:U.object().isRequired},emits:{"choose-address":()=>!0},setup(e,{emit:t}){const n=e;return{__sfc:!0,props:n,emit:t,onClick:function(){t("choose-address",n.addressInfo)},maskChars:H}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"plv-product-address-item",on:{click:n.onClick}},[t("div",{staticClass:"plv-product-address-item__top"},[t("div",{staticClass:"plv-product-address-item__content"},[t("div",{staticClass:"plv-product-address-item__header"},[t("span",[e._v(e._s(e.addressInfo.name))]),t("span",{staticClass:"plv-product-address-item__header-phone"},[e._v(e._s(n.maskChars(e.addressInfo.mobile,{start:3,end:6})))])]),t("div",{staticClass:"plv-product-address-item__address"},[e._v(" "+e._s(e.addressInfo.address)+" ")])]),e.$slots.icon?t("div",{staticClass:"plv-product-address-item__icon-wrapper"},[e._t("icon")],2):e._e()]),e._t("action")],2)},[]).exports}),console.log("%c@polyv/product-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[component: address-item]","[version: 1.2.0-rc-20250724.2]","[buildTime: 2025-07-24 03:57:54]");
|