cnhis-design-vue 3.1.46 → 3.1.47-beta.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,provide as o,ref as t,computed as
|
|
1
|
+
import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as l,normalizeStyle as n,unref as s,createElementVNode as m,createVNode as f,mergeProps as u,withCtx as c,createBlock as d,isRef as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as x,isFunction as y}from"lodash-es";import{uuidGenerator as C,traverse as j}from"../../../shared/utils/index.js";import L from"../../../shared/components/VueDraggable/src/vuedraggable.js";import k from"./components/FormConfigCreator.vue.js";import F from"./components/FormConfigDragDisplay.vue.js";import b from"./components/FormConfigEdit.vue.js";import M from"./components/FormConfigMaterialItem.js";import{useDataNormalize as V}from"./hooks/useDataNormalize.js";import{InjectionFormConfigEmit as E,InjectionFieldList as I,InjectionMaterialList as D,InjectionActiveFieldItem as R,FORM_CONFIG_GROUP as H}from"./constants/index.js";import"@vicons/ionicons5";import{NSelect as N}from"naive-ui";import"./utils/index.js";import{useSortableConfig as O}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const A=["id"],S={class:"form-config__material"},T=m("header",{class:"form-config__materialHeader"},"物料区",-1),U={class:"form-config__displayWrapper"},w={class:"form-config__displayHeader"},B={class:"form-config__config"},z=m("header",{class:"form-config__configHeader"},"配置区",-1),W={class:"form-config__configContent"};var q=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]}},emits:["addItem","removeItem"],setup(e,{expose:q,emit:G}){const J=e;o(E,G);const K=C(),P=h(),{getCommonConfig:Q}=O(),X=t([]);o(I,X);const Y=t([]);function Z(e){X.value.some((o=>o.key===e.key))||X.value.push(e)}o(D,Y);const $=(e,o)=>y(J.textFormatter)?J.textFormatter(e,o):o,ee=t();o(R,ee);const oe=t(),{transform:te,inverseTransform:re}=V(J),ae=r({get:()=>null,set(e){if(!e)return;const o=le.value.find((o=>o.key===e));o&&(o.__extra=!0,Y.value.push(o),G("addItem",o))}}),ie=t([]),le=r((()=>{if(!_(ie.value))return[];const e=[];return j([...Y.value,...X.value],(o=>e.push(o.key))),ie.value.filter((o=>!e.find((e=>e===o.key))))}));async function ne(){J.extraMaterialList&&!ie.value.length&&(ie.value=y(J.extraMaterialList)?await J.extraMaterialList():J.extraMaterialList)}return q({loadData({fieldList:e}){let o=[],t=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?t.push(e):o.push(e),"COMBINATION"===e.type&&_(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(x(a(e))))),X.value=te(o),Y.value=t,ee.value=void 0},validate(){var e;return null==(e=oe.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:re(x(a(X.value)),e),materialList:re(x(a(Y.value)),e)}),clearExtraList(){ie.value=[]}}),(o,t)=>(i(),l("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...s(P)}),id:s(K)},[m("section",S,[T,f(s(L),u(s(Q)(),{class:"form-config__materialContent",modelValue:Y.value,"onUpdate:modelValue":t[0]||(t[0]=e=>Y.value=e)}),{item:c((({element:e})=>[f(s(M),{"form-config-item":e,"text-formatter":$,"material-List":Y.value},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),d(s(N),{key:0,class:"form-config__materialExtraList",filterable:"",value:s(ae),"onUpdate:value":t[1]||(t[1]=e=>p(ae)?ae.value=e:null),placeholder:"请选择额外物料",options:s(le),"label-field":"name","value-field":"key",onFocus:ne},null,8,["value","options"])):v("v-if",!0)]),m("section",U,[m("header",w,[g(" 布局区 "),f(k,{onSubmit:Z})]),f(F,{class:"form-config__displayContent",group:s(H),"text-formatter":$,modelValue:X.value,"onUpdate:modelValue":t[2]||(t[2]=e=>X.value=e)},null,8,["group","modelValue"])]),m("section",B,[z,m("section",W,[f(b,{ref_key:"formConfigEditRef",ref:oe,uuid:s(K),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,A))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,useAttrs as t,createVNode as l,isVNode as o}from"vue";import{connect as a,mapProps as r}from"@formily/vue";import{promiseTimeout as i}from"@vueuse/shared";import{NSpace as u,NRadio as n,NRadioGroup as p,NCheckbox as d,NCheckboxGroup as s}from"naive-ui";import"../../../index.js";import{useComplexOptions as c}from"../../hooks/useComplexOptions.js";import"../../utils/index.js";import{useAutographOptions as v}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as f,createVisitedSetter as y}from"../../utils/schema.js";import{useFormField as b}from"../../hooks/useFormField.js";function j(a,r,n){return e({name:a,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},clearable:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:a}){const{field:d}=b(),{renderComplexOption:s,valueRef:f}=c(e,a),{labelKey:j,valueKey:h,fullOptions:g}=v(e,f),{injectValueBindKey:k,injectValueValidate:S}=m();S(f);const F=k(f),C=t();return()=>l(r,{key:F.value,value:f.value,"onUpdate:value":e=>f.value=e,onClick:y(d)},{default:()=>[l(u,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var t;return[null==(t=g.value)?void 0:t.map((t=>{let a;return l(n,{key:t[h.value],value:t[h.value],disabled:t.disabled,onClick:()=>async function(t){if(null==C?void 0:C.disabled)return;if(r!==p||!e.clearable)return;const l=f.value;await i(0),l===t[h.value]&&(f.value=null)}(t)},"function"==typeof(u=a=s({value:f.value,option:t,valueKey:h.value,labelKey:j.value,childFieldStrategy:e.childFieldStrategy}))||"[object Object]"===Object.prototype.toString.call(u)&&!o(u)?a:{default:()=>[a]});var u}))]}})]})}})}const h=a(j("FormRadio",p,n),r({dataSource:"options"},f)),g=a(j("FormCheckbox",s,d),r({dataSource:"options"},f));export{g as CHECKBOX,h as RADIO};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.47-beta.0",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.47-beta.0",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.47-beta.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "cc0876b85f6476f2fdf02e349e48d83d05c1606a"
|
|
65
65
|
}
|