@farris/ui-vue 1.3.5 → 1.3.6
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/components/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(S,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],u):(S=typeof globalThis<"u"?globalThis:S||self,u(S.nav={},S.Vue,S.LodashES))})(this,function(S,u,
|
|
1
|
+
(function(S,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],u):(S=typeof globalThis<"u"?globalThis:S||self,u(S.nav={},S.Vue,S.LodashES))})(this,function(S,u,E){"use strict";var O=function(t,e){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},O(t,e)};function B(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");O(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function L(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],c;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(f){c={error:f}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function M(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;function N(t){return typeof t=="function"}function I(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var A=I(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
2
2
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function U(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var A=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,i,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=L(c),v=f.next();!v.done;v=f.next()){var l=v.value;l.remove(this)}}catch(b){e={error:b}}finally{try{v&&!v.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}else c.remove(this);var a=this.initialTeardown;if(N(a))try{a()}catch(b){o=b instanceof k?b.errors:[b]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var d=L(s),p=d.next();!p.done;p=d.next()){var h=p.value;try{H(h)}catch(b){o=o??[],b instanceof k?o=M(M([],j(o)),j(b.errors)):o.push(b)}}}catch(b){n={error:b}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(o)throw new k(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)H(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&U(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&U(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();A.EMPTY;function z(t){return t instanceof A||t&&"closed"in t&&N(t.remove)&&N(t.add)&&N(t.unsubscribe)}function H(t){N(t)?t():t.unsubscribe()}var W={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ee={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,M([t,e],j(r)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function te(t){ee.setTimeout(function(){throw t})}function Y(){}function re(t){t()}var G=function(t){q(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,z(r)&&r.add(n)):n.destination=ae,n}return e.create=function(r,n,i){return new R(r,n,i)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(A),ne=Function.prototype.bind;function V(t,e){return ne.call(t,e)}var ie=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){E(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){E(n)}else E(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){E(r)}},t}(),R=function(t){q(e,t);function e(r,n,i){var o=t.call(this)||this,c;if(N(r)||!r)c={next:r??void 0,error:n??void 0,complete:i??void 0};else{var f;o&&W.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return o.unsubscribe()},c={next:r.next&&V(r.next,f),error:r.error&&V(r.error,f),complete:r.complete&&V(r.complete,f)}):c=r}return o.destination=new ie(c),o}return e}(G);function E(t){te(t)}function oe(t){throw t}var ae={closed:!0,next:Y,error:oe,complete:Y},se=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ce(t){return t}function ue(t){return t.length===0?ce:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var le=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,o=pe(e)?e:new R(e,r,n);return re(function(){var c=i,f=c.operator,v=c.source;o.add(f?f.call(o,v):v?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=J(r),new r(function(i,o){var c=new R({next:function(f){try{e(f)}catch(v){o(v),c.unsubscribe()}},error:o,complete:i});n.subscribe(c)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[se]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return ue(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=J(e),new e(function(n,i){var o;r.subscribe(function(c){return o=c},function(c){return i(c)},function(){return n(o)})})},t.create=function(e){return new t(e)},t}();function J(t){var e;return(e=t??W.Promise)!==null&&e!==void 0?e:Promise}function fe(t){return t&&N(t.next)&&N(t.error)&&N(t.complete)}function pe(t){return t&&t instanceof G||fe(t)&&z(t)}const Q={},X={};function $(t){const{properties:e,title:r,ignore:n}=t,i=n&&Array.isArray(n),o=Object.keys(e).reduce((c,f)=>((!i||!n.find(v=>v===f))&&(c[f]=e[f].type==="object"&&e[f].properties?$(e[f]):O.cloneDeep(e[f].default)),c),{});if(r&&(!i||!n.find(c=>c==="id"))){const c=r.toLowerCase().replace(/-/g,"_");o.id=`${c}_${Math.random().toString().slice(2,6)}`}return o}function Z(t,e={},r){const n=Q[t];if(n){let i=$(n);const o=X[t];return i=o?o({getSchemaByType:Z},i,e,r):i,i}return null}function de(t,e){const r=$(e);return Object.keys(r).reduce((n,i)=>(n[i]&&O.isPlainObject(n[i])&&O.isPlainObject(t[i]||!t[i])?Object.assign(n[i],t[i]||{}):n[i]=t[i],n),r),r}function ve(t,e){return Object.keys(t).filter(n=>t[n]!=null).reduce((n,i)=>{if(e.has(i)){const o=e.get(i);if(typeof o=="string")n[o]=t[i];else{const c=o(i,t[i],t);Object.assign(n,c)}}else n[i]=t[i];return n},{})}function he(t,e,r=new Map){const n=de(t,e);return ve(n,r)}function ye(t={}){function e(l,a,s,d){if(typeof s=="number")return d[l].length===s;if(typeof s=="object"){const p=Object.keys(s)[0],h=s[p];if(p==="not")return Number(d[l].length)!==Number(h);if(p==="moreThan")return Number(d[l].length)>=Number(h);if(p==="lessThan")return Number(d[l].length)<=Number(h)}return!1}function r(l,a,s,d){return d[l]&&d[l].propertyValue&&String(d[l].propertyValue.value)===String(s)}const n=new Map([["length",e],["getProperty",r]]);Object.keys(t).reduce((l,a)=>(l.set(a,t[a]),l),n);function i(l,a){const s=l;return typeof a=="number"?[{target:s,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:s,operator:"getProperty",param:l,value:!!a}]:typeof a=="object"?Object.keys(a).map(d=>{if(d==="length")return{target:s,operator:"length",param:null,value:a[d]};const p=d,h=a[d];return{target:s,operator:"getProperty",param:p,value:h}}):[]}function o(l){return Object.keys(l).reduce((s,d)=>{const p=i(d,l[d]);return s.push(...p),s},[])}function c(l,a){if(n.has(l.operator)){const s=n.get(l.operator);return s&&s(l.target,l.param,l.value,a)||!1}return!1}function f(l,a){return o(l).reduce((p,h)=>p&&c(h,a),!0)}function v(l,a){const s=Object.keys(l),d=s.includes("allOf"),p=s.includes("anyOf"),h=d||p,D=(h?l[h?d?"allOf":"anyOf":"allOf"]:[l]).map(B=>f(B,a));return d?!D.includes(!1):D.includes(!0)}return{parseValueSchema:v}}const be={},me={};ye();function ge(t,e,r=new Map,n=(c,f,v,l)=>f,i={},o=c=>c){return Q[e.title]=e,X[e.title]=n,be[e.title]=i,me[e.title]=o,(c={})=>{const f=he(c,e,r),v=Object.keys(t).reduce((l,a)=>(l[a]=t[a].default,l),{});return Object.assign(v,f)}}function Se(t,e){return{customClass:e.class,customStyle:e.style}}const Ne=new Map([["appearance",Se]]),Pe={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/nav.schema.json",title:"nav",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a nav",type:"string"},type:{description:"The type string of nav component",type:"string",default:"nav"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function Ee(t,e,r){return e}const Te={title:"nav",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeholder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中"},{value:"right",name:"右对齐"}]}}}}}},T={maxNum:{Type:Number,default:99},navData:{Type:Array,default:[{id:"1",text:"全部"},{id:"2",text:"已回复",disable:!0},{id:"3",text:"待回复",num:200},{id:"4",text:"@我",num:33}]},horizontal:{Type:Boolean,default:!0},activeNavId:{Type:String,default:"1"},navPicking:{Type:Function,default:t=>le}},F=ge(T,Pe,Ne,Ee,Te),_=u.defineComponent({name:"FNav",props:T,emits:["nav","update:activeNavId"],setup(t,e){const r=u.ref(t.activeNavId),n=u.ref(t.navData),i=u.ref(t.horizontal);u.ref(t.navPicking),u.watch(()=>t.activeNavId,(a,s)=>{a!==s&&(r.value=a)});const o=u.computed({get(){return n.value},set(a){n.value=a,v()}}),c=u.computed({get(){return r.value},set(a){if(r.value=a,r.value&&o&&o.value.length){const s=o.value.find(d=>d.id===r.value);s&&e.emit("nav",s)}}}),f=u.computed({set(a){i.value=a},get(){return i.value}});function v(){if(o.value&&o.value.length&&!r.value){const a=o.value.find(s=>!s.disable);a&&(r.value=a.id)}}function l(a){a.disable||a.id===r.value||(r.value=a.id,e.emit("update:activeNavId",a.id),e.emit("nav",a))}return()=>{var a;return u.createVNode("div",{class:["farris-nav",{"farris-nav-vertical":!f.value}]},[(a=o.value)==null?void 0:a.map(s=>u.createVNode("div",{class:["farris-nav-item",{active:s.id===c.value},{disabled:s.disable}],onClick:()=>l(s)},[u.createVNode("div",{class:"farris-nav-item-link"},[u.createVNode("span",{class:"farris-nav-item-link-text"},[typeof s.text=="function"?s.text():s.text,s.num&&u.createVNode("div",{class:"farris-nav-item-tag"},[s.num<=t.maxNum&&u.createVNode("span",{class:"tag-text"},[s.num]),s.num>t.maxNum&&u.createVNode("span",{class:"tag-text"},[t.maxNum,u.createTextVNode("+")])])])])]))])}}});function _e(t,e,r){var C;const n="",i="",o=u.ref();function c(){return(e==null?void 0:e.schema.componentType)!=="frame"}function f(){return!1}function v(){return(e==null?void 0:e.schema.componentType)!=="frame"}function l(){return(e==null?void 0:e.schema.componentType)==="frame"}function a(y){if(!y||!y.value)return null;if(y.value.schema&&y.value.schema.type==="component")return y.value;const g=u.ref(y==null?void 0:y.value.parent),m=a(g);return m||null}function s(y=e){const{componentInstance:g,designerItemElementRef:m}=y;return!g||!g.value?null:g.value.canMove?m:s(y.parent)}function d(y){return!!r}function p(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function h(){}function b(y,g){}function x(y,g){const{componentType:m}=y;let P=Z(m,y,g);const we=m.toLowerCase().replace(/-/g,"_");return P&&!P.id&&P.type===m&&(P.id=`${we}_${Math.random().toString().slice(2,6)}`),P}function D(y){}function K(...y){}function B(){e!=null&&e.schema.contents&&e.schema.contents.map(y=>{var P;let g=y.id;y.type==="component-ref"&&(g=y.component);const m=t.value.querySelector(`#${g}-design-item`);(P=m==null?void 0:m.componentInstance)!=null&&P.value.onRemoveComponent&&m.componentInstance.value.onRemoveComponent()})}return o.value={canMove:c(),canSelectParent:f(),canDelete:v(),canNested:!l(),contents:e==null?void 0:e.schema.contents,elementRef:t,parent:(C=e==null?void 0:e.parent)==null?void 0:C.componentInstance,schema:e==null?void 0:e.schema,styles:n,designerClass:i,canAccepts:d,getBelongedComponentInstance:a,getDraggableDesignItemElement:s,getDraggingDisplayText:p,getPropConfig:K,getDragScopeElement:h,onAcceptMovedChildElement:b,onChildElementMovedOut:D,addNewChildComponentSchema:x,triggerBelongedComponentToMoveWhenMoved:u.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:u.ref(!1),onRemoveComponent:B},o}const De=u.defineComponent({name:"FNavDesign",props:T,emits:["nav"],setup(t,e){const r=u.ref(t.activeNavId),n=u.ref(t.navData),i=u.ref(t.horizontal);u.ref(t.navPicking);const o=u.ref(),c=u.inject("design-item-context"),f=_e(o,c);u.onMounted(()=>{o.value.componentInstance=f}),e.expose(f.value);const v=u.computed({get(){return n.value},set(p){n.value=p,s()}}),l=u.computed({get(){return r.value},set(p){if(r.value=p,r.value&&v&&v.value.length){const h=v.value.find(b=>b.id===r.value);h&&e.emit("nav",h)}}}),a=u.computed({set(p){i.value=p},get(){return i.value}});function s(){if(v.value&&v.value.length&&!r.value){const p=v.value.find(h=>!h.disable);p&&(r.value=p.id)}}function d(p){p.disable||p.id===r.value||(r.value=p.id,e.emit("nav",p))}return()=>{var p;return u.createVNode("div",{ref:o,class:["farris-nav",{"farris-nav-vertical":!a.value}]},[(p=v.value)==null?void 0:p.map(h=>u.createVNode("div",{class:["farris-nav-item",{active:h.id===l.value},{disabled:h.disable}],onClick:()=>d(h)},[u.createVNode("div",{class:"farris-nav-item-link"},[u.createVNode("span",{class:"farris-nav-item-link-text"},[h.text,h.num&&u.createVNode("div",{class:"farris-nav-item-tag"},[h.num<=t.maxNum&&u.createVNode("span",{class:"tag-text"},[h.num]),h.num>t.maxNum&&u.createVNode("span",{class:"tag-text"},[t.maxNum,u.createTextVNode("+")])])])])]))])}}}),Oe={install(t){t.component(_.name,_)},register(t,e,r,n){t.nav=_,e.nav=F},registerDesigner(t,e,r){t.nav=De,e.nav=F}};S.FNav=_,S.default=Oe,S.navProps=T,S.propsResolver=F,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function U(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var k=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,i,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=L(c),v=f.next();!v.done;v=f.next()){var l=v.value;l.remove(this)}}catch(b){e={error:b}}finally{try{v&&!v.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}else c.remove(this);var a=this.initialTeardown;if(N(a))try{a()}catch(b){o=b instanceof A?b.errors:[b]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var d=L(s),p=d.next();!p.done;p=d.next()){var h=p.value;try{H(h)}catch(b){o=o??[],b instanceof A?o=M(M([],j(o)),j(b.errors)):o.push(b)}}}catch(b){n={error:b}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(o)throw new A(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)H(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&U(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&U(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();k.EMPTY;function z(t){return t instanceof k||t&&"closed"in t&&N(t.remove)&&N(t.add)&&N(t.unsubscribe)}function H(t){N(t)?t():t.unsubscribe()}var W={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ee={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,M([t,e],j(r)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function te(t){ee.setTimeout(function(){throw t})}function Y(){}function re(t){t()}var G=function(t){B(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,z(r)&&r.add(n)):n.destination=ae,n}return e.create=function(r,n,i){return new $(r,n,i)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(k),ne=Function.prototype.bind;function V(t,e){return ne.call(t,e)}var ie=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){T(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){T(n)}else T(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){T(r)}},t}(),$=function(t){B(e,t);function e(r,n,i){var o=t.call(this)||this,c;if(N(r)||!r)c={next:r??void 0,error:n??void 0,complete:i??void 0};else{var f;o&&W.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return o.unsubscribe()},c={next:r.next&&V(r.next,f),error:r.error&&V(r.error,f),complete:r.complete&&V(r.complete,f)}):c=r}return o.destination=new ie(c),o}return e}(G);function T(t){te(t)}function oe(t){throw t}var ae={closed:!0,next:Y,error:oe,complete:Y},ce=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function se(t){return t}function ue(t){return t.length===0?se:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var le=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,o=pe(e)?e:new $(e,r,n);return re(function(){var c=i,f=c.operator,v=c.source;o.add(f?f.call(o,v):v?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=J(r),new r(function(i,o){var c=new $({next:function(f){try{e(f)}catch(v){o(v),c.unsubscribe()}},error:o,complete:i});n.subscribe(c)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[ce]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return ue(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=J(e),new e(function(n,i){var o;r.subscribe(function(c){return o=c},function(c){return i(c)},function(){return n(o)})})},t.create=function(e){return new t(e)},t}();function J(t){var e;return(e=t??W.Promise)!==null&&e!==void 0?e:Promise}function fe(t){return t&&N(t.next)&&N(t.error)&&N(t.complete)}function pe(t){return t&&t instanceof G||fe(t)&&z(t)}const Q={},X={};function R(t){const{properties:e,title:r,ignore:n}=t,i=n&&Array.isArray(n),o=Object.keys(e).reduce((c,f)=>((!i||!n.find(v=>v===f))&&(c[f]=e[f].type==="object"&&e[f].properties?R(e[f]):E.cloneDeep(e[f].default)),c),{});if(r&&(!i||!n.find(c=>c==="id"))){const c=r.toLowerCase().replace(/-/g,"_");o.id=`${c}_${Math.random().toString().slice(2,6)}`}return o}function de(t){const{properties:e,title:r,required:n}=t;if(n&&Array.isArray(n)){const i=n.reduce((o,c)=>(o[c]=e[c].type==="object"&&e[c].properties?R(e[c]):E.cloneDeep(e[c].default),o),{});if(r&&n.find(o=>o==="id")){const o=r.toLowerCase().replace(/-/g,"_");i.id=`${o}_${Math.random().toString().slice(2,6)}`}return i}return{type:r}}function Z(t,e={},r){const n=Q[t];if(n){let i=de(n);const o=X[t];return i=o?o({getSchemaByType:Z},i,e,r):i,i}return null}function ve(t,e){const r=R(e);return Object.keys(r).reduce((n,i)=>(Object.prototype.hasOwnProperty.call(t,i)&&(n[i]&&E.isPlainObject(n[i])&&E.isPlainObject(t[i]||!t[i])?Object.assign(n[i],t[i]||{}):n[i]=t[i]),n),r),r}function he(t,e){return Object.keys(t).filter(n=>t[n]!=null).reduce((n,i)=>{if(e.has(i)){const o=e.get(i);if(typeof o=="string")n[o]=t[i];else{const c=o(i,t[i],t);Object.assign(n,c)}}else n[i]=t[i];return n},{})}function ye(t,e,r=new Map){const n=ve(t,e);return he(n,r)}function be(t={}){function e(l,a,s,d){if(typeof s=="number")return d[l].length===s;if(typeof s=="object"){const p=Object.keys(s)[0],h=s[p];if(p==="not")return Number(d[l].length)!==Number(h);if(p==="moreThan")return Number(d[l].length)>=Number(h);if(p==="lessThan")return Number(d[l].length)<=Number(h)}return!1}function r(l,a,s,d){return d[l]&&d[l].propertyValue&&String(d[l].propertyValue.value)===String(s)}const n=new Map([["length",e],["getProperty",r]]);Object.keys(t).reduce((l,a)=>(l.set(a,t[a]),l),n);function i(l,a){const s=l;return typeof a=="number"?[{target:s,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:s,operator:"getProperty",param:l,value:!!a}]:typeof a=="object"?Object.keys(a).map(d=>{if(d==="length")return{target:s,operator:"length",param:null,value:a[d]};const p=d,h=a[d];return{target:s,operator:"getProperty",param:p,value:h}}):[]}function o(l){return Object.keys(l).reduce((s,d)=>{const p=i(d,l[d]);return s.push(...p),s},[])}function c(l,a){if(n.has(l.operator)){const s=n.get(l.operator);return s&&s(l.target,l.param,l.value,a)||!1}return!1}function f(l,a){return o(l).reduce((p,h)=>p&&c(h,a),!0)}function v(l,a){const s=Object.keys(l),d=s.includes("allOf"),p=s.includes("anyOf"),h=d||p,w=(h?l[h?d?"allOf":"anyOf":"allOf"]:[l]).map(q=>f(q,a));return d?!w.includes(!1):w.includes(!0)}return{parseValueSchema:v}}const me={},ge={};be();function Se(t,e,r=new Map,n=(c,f,v,l)=>f,i={},o=c=>c){return Q[e.title]=e,X[e.title]=n,me[e.title]=i,ge[e.title]=o,(c={})=>{const f=ye(c,e,r),v=Object.keys(t).reduce((l,a)=>(l[a]=t[a].default,l),{});return Object.assign(v,f)}}function Ne(t,e){return{customClass:e.class,customStyle:e.style}}const Pe=new Map([["appearance",Ne]]),Ee={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/nav.schema.json",title:"nav",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a nav",type:"string"},type:{description:"The type string of nav component",type:"string",default:"nav"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function Te(t,e,r){return e}const _e={title:"nav",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeholder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中"},{value:"right",name:"右对齐"}]}}}}}},_={maxNum:{Type:Number,default:99},navData:{Type:Array,default:[{id:"1",text:"全部"},{id:"2",text:"已回复",disable:!0},{id:"3",text:"待回复",num:200},{id:"4",text:"@我",num:33}]},horizontal:{Type:Boolean,default:!0},activeNavId:{Type:String,default:"1"},navPicking:{Type:Function,default:t=>le}},F=Se(_,Ee,Pe,Te,_e),D=u.defineComponent({name:"FNav",props:_,emits:["nav","update:activeNavId"],setup(t,e){const r=u.ref(t.activeNavId),n=u.ref(t.navData),i=u.ref(t.horizontal);u.ref(t.navPicking),u.watch(()=>t.activeNavId,(a,s)=>{a!==s&&(r.value=a)});const o=u.computed({get(){return n.value},set(a){n.value=a,v()}}),c=u.computed({get(){return r.value},set(a){if(r.value=a,r.value&&o&&o.value.length){const s=o.value.find(d=>d.id===r.value);s&&e.emit("nav",s)}}}),f=u.computed({set(a){i.value=a},get(){return i.value}});function v(){if(o.value&&o.value.length&&!r.value){const a=o.value.find(s=>!s.disable);a&&(r.value=a.id)}}function l(a){a.disable||a.id===r.value||(r.value=a.id,e.emit("update:activeNavId",a.id),e.emit("nav",a))}return()=>{var a;return u.createVNode("div",{class:["farris-nav",{"farris-nav-vertical":!f.value}]},[(a=o.value)==null?void 0:a.map(s=>u.createVNode("div",{class:["farris-nav-item",{active:s.id===c.value},{disabled:s.disable}],onClick:()=>l(s)},[u.createVNode("div",{class:"farris-nav-item-link"},[u.createVNode("span",{class:"farris-nav-item-link-text"},[typeof s.text=="function"?s.text():s.text,s.num&&u.createVNode("div",{class:"farris-nav-item-tag"},[s.num<=t.maxNum&&u.createVNode("span",{class:"tag-text"},[s.num]),s.num>t.maxNum&&u.createVNode("span",{class:"tag-text"},[t.maxNum,u.createTextVNode("+")])])])])]))])}}});function De(t,e,r){var K;const n="",i="",o=u.ref();function c(){return(e==null?void 0:e.schema.componentType)!=="frame"}function f(){return!1}function v(){return(e==null?void 0:e.schema.componentType)!=="frame"}function l(){return(e==null?void 0:e.schema.componentType)==="frame"}function a(y){if(!y||!y.value)return null;if(y.value.schema&&y.value.schema.type==="component")return y.value;const g=u.ref(y==null?void 0:y.value.parent),m=a(g);return m||null}function s(y=e){const{componentInstance:g,designerItemElementRef:m}=y;return!g||!g.value?null:g.value.canMove?m:s(y.parent)}function d(y){return!!r}function p(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function h(){}function b(y,g){}function x(y,g){const{componentType:m}=y;let P=Z(m,y,g);const je=m.toLowerCase().replace(/-/g,"_");return P&&!P.id&&P.type===m&&(P.id=`${je}_${Math.random().toString().slice(2,6)}`),P}function w(y){}function C(...y){}function q(){e!=null&&e.schema.contents&&e.schema.contents.map(y=>{var P;let g=y.id;y.type==="component-ref"&&(g=y.component);const m=t.value.querySelector(`#${g}-design-item`);(P=m==null?void 0:m.componentInstance)!=null&&P.value.onRemoveComponent&&m.componentInstance.value.onRemoveComponent()})}return o.value={canMove:c(),canSelectParent:f(),canDelete:v(),canNested:!l(),contents:e==null?void 0:e.schema.contents,elementRef:t,parent:(K=e==null?void 0:e.parent)==null?void 0:K.componentInstance,schema:e==null?void 0:e.schema,styles:n,designerClass:i,canAccepts:d,getBelongedComponentInstance:a,getDraggableDesignItemElement:s,getDraggingDisplayText:p,getPropConfig:C,getDragScopeElement:h,onAcceptMovedChildElement:b,onChildElementMovedOut:w,addNewChildComponentSchema:x,triggerBelongedComponentToMoveWhenMoved:u.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:u.ref(!1),onRemoveComponent:q},o}const we=u.defineComponent({name:"FNavDesign",props:_,emits:["nav"],setup(t,e){const r=u.ref(t.activeNavId),n=u.ref(t.navData),i=u.ref(t.horizontal);u.ref(t.navPicking);const o=u.ref(),c=u.inject("design-item-context"),f=De(o,c);u.onMounted(()=>{o.value.componentInstance=f}),e.expose(f.value);const v=u.computed({get(){return n.value},set(p){n.value=p,s()}}),l=u.computed({get(){return r.value},set(p){if(r.value=p,r.value&&v&&v.value.length){const h=v.value.find(b=>b.id===r.value);h&&e.emit("nav",h)}}}),a=u.computed({set(p){i.value=p},get(){return i.value}});function s(){if(v.value&&v.value.length&&!r.value){const p=v.value.find(h=>!h.disable);p&&(r.value=p.id)}}function d(p){p.disable||p.id===r.value||(r.value=p.id,e.emit("nav",p))}return()=>{var p;return u.createVNode("div",{ref:o,class:["farris-nav",{"farris-nav-vertical":!a.value}]},[(p=v.value)==null?void 0:p.map(h=>u.createVNode("div",{class:["farris-nav-item",{active:h.id===l.value},{disabled:h.disable}],onClick:()=>d(h)},[u.createVNode("div",{class:"farris-nav-item-link"},[u.createVNode("span",{class:"farris-nav-item-link-text"},[h.text,h.num&&u.createVNode("div",{class:"farris-nav-item-tag"},[h.num<=t.maxNum&&u.createVNode("span",{class:"tag-text"},[h.num]),h.num>t.maxNum&&u.createVNode("span",{class:"tag-text"},[t.maxNum,u.createTextVNode("+")])])])])]))])}}}),Oe={install(t){t.component(D.name,D)},register(t,e,r,n){t.nav=D,e.nav=F},registerDesigner(t,e,r){t.nav=we,e.nav=F}};S.FNav=D,S.default=Oe,S.navProps=_,S.propsResolver=F,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|