cnhis-design-vue 3.3.1-beta.2 → 3.3.1-beta.3
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.
@@ -322,7 +322,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
322
322
|
extraOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
|
323
323
|
onFocus: () => Promise<void>;
|
324
324
|
useVersion: typeof import("../../shared/hooks").useVersion;
|
325
|
-
useFormConfigLocale:
|
325
|
+
useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
|
326
326
|
Draggable: import("vue").DefineComponent<{
|
327
327
|
list: {
|
328
328
|
type: ArrayConstructor;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { useVersion } from '../../../shared/hooks';
|
2
2
|
import { AnyFn, LowCodeTypes } from '../../../shared/types';
|
3
|
+
import { useFormConfigLocale } from '../../../components/form-config/src/hooks/useLocale';
|
3
4
|
import { PropType, Ref } from 'vue';
|
4
5
|
import { FormConfigItem, FormConfigTextFormatter, FormConfigVisitor } from '../../../components/form-config/src/types';
|
5
6
|
import { FormRenderExpose } from '../../../components/form-render';
|
@@ -324,7 +325,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
324
325
|
extraOptions: import("vue").ComputedRef<FormConfigItem[]>;
|
325
326
|
onFocus: () => Promise<void>;
|
326
327
|
useVersion: typeof useVersion;
|
327
|
-
useFormConfigLocale:
|
328
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
328
329
|
Draggable: import("vue").DefineComponent<{
|
329
330
|
list: {
|
330
331
|
type: ArrayConstructor;
|
@@ -412,7 +413,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
412
413
|
NButton: any;
|
413
414
|
NButtonGroup: any;
|
414
415
|
NPopconfirm: any;
|
415
|
-
useFormConfigLocale: typeof
|
416
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
416
417
|
CFormRender: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
417
418
|
formRenderRef: Ref<FormRenderExpose | undefined>;
|
418
419
|
key: Ref<number>;
|
@@ -2696,7 +2697,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2696
2697
|
}[]>;
|
2697
2698
|
onOptionModalCancel: () => void;
|
2698
2699
|
onOptionModalConfirm: () => void;
|
2699
|
-
useFormConfigLocale: typeof
|
2700
|
+
useFormConfigLocale: typeof useFormConfigLocale;
|
2700
2701
|
NModal: any;
|
2701
2702
|
NInput: any;
|
2702
2703
|
CFormRender: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,provide as o,ref as r,computed as t,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,toDisplayString as f,createVNode as u,isRef as d,withCtx as c,createBlock 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 y,isFunction as x}from"lodash-es";import"@vue/shared";import{uuidGenerator as j,traverse as k}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as L,NSpace as C}from"naive-ui";import{useVersion as F}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as b}from"
|
1
|
+
import{defineComponent as e,provide as o,ref as r,computed as t,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,toDisplayString as f,createVNode as u,isRef as d,withCtx as c,createBlock 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 y,isFunction as x}from"lodash-es";import"@vue/shared";import{uuidGenerator as j,traverse as k}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as L,NSpace as C}from"naive-ui";import{useVersion as F}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as b}from"./hooks/useLocale.js";import V from"../../../shared/components/VueDraggable/src/vuedraggable.js";import M from"./components/FormConfigCreator.vue.js";import R from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import D from"./components/FormConfigEventSetting.vue.js";import E from"./components/FormConfigMaterialItem.js";import{useDataNormalize as H}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as S,InjectionFormConfigEmit as A,InjectionFieldList as I,InjectionMaterialList as U,InjectionLowCodeReactions as O,InjectionActiveFieldItem as P,FORM_CONFIG_GROUP as T}from"./constants/index.js";import{fieldItemNormalize as z}from"./utils/index.js";import{useSortableConfig as B}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const N=["id"],W={class:"form-config__material"},q={class:"form-config__materialHeader"},G={class:"form-config__displayWrapper"},J={class:"form-config__displayHeader"},K={class:"form-config__config"},Q={class:"form-config__configHeader"},X={class:"form-config__configContent"};var Y=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},formProps:{type:Object},beforeMove:{type:Function},showLowCodeReactions:Boolean},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:Y,emit:Z}){const $=e;o(S,$),o(A,Z);const ee=j(),oe=h(),re=r([]);o(I,re);const te=r([]);o(U,te);const ae=r([]);function ie(e){re.value.some((o=>o.key===e.key))||re.value.push(e)}o(O,ae);const se=(e,o)=>x($.textFormatter)?$.textFormatter(e,o):o,le=r();o(P,le);const ne=r(),{transform:me,inverseTransform:fe}=H($),ue=t({get:()=>null,set(e){if(!e)return;const o=ce.value.find((o=>o.key===e));o&&(o.__extra=!0,z(o),te.value.push(o),Z("addItem",o))}}),de=r([]),ce=t((()=>{if(!_(de.value))return[];const e=[];return k([...te.value,...re.value],(o=>e.push(o.key))),de.value.filter((o=>!e.find((e=>e===o.key))))}));async function pe(){$.extraMaterialList&&!de.value.length&&(de.value=x($.extraMaterialList)?await $.extraMaterialList():$.extraMaterialList)}return Y({loadData({fieldList:e,lowCodeReactions:o=[]}){let r=[],t=[];e.forEach((e=>{return!1===(o=y(a(e))).show?t.push(o):r.push(o),void z(o);var o})),re.value=me(r),te.value=t,ae.value=o,le.value=void 0},validate(){var e;return null==(e=ne.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:fe(y(a(re.value)),e,{show:!0}),materialList:fe(y(a(te.value)),e,{show:!1}),lowCodeReactions:y(a(ae.value))}),clearExtraList(){de.value=[]}}),(o,r)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(oe)},id:n(ee)},n(F)()),[m("section",W,[m("header",q,f(n(b)("materialArea")),1),u(n(V),l(B({fieldList:re,materialList:te,hooks:{beforeMove:$.beforeMove}}),{class:"form-config__materialContent",modelValue:n(te),"onUpdate:modelValue":r[0]||(r[0]=e=>d(te)?te.value=e:null)}),{item:c((({element:e})=>[u(n(E),{"form-config-item":e,"text-formatter":se,"material-List":n(te)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),p(n(L),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(ue),"onUpdate:value":r[1]||(r[1]=e=>d(ue)?ue.value=e:null),placeholder:n(b)("materialArea.createMaterialPlaceholder"),options:n(ce),"label-field":"name","value-field":"key",onFocus:pe},null,8,["value","placeholder","options"])):v("v-if",!0)]),m("section",G,[m("header",J,[g(f(n(b)("layoutArea"))+" ",1),u(n(C),null,{default:c((()=>[e.showLowCodeReactions?(i(),p(D,{key:0,modelValue:ae.value,"onUpdate:modelValue":r[2]||(r[2]=e=>ae.value=e),"bind-form-render-ref":e.formRenderRef,onValidateFailure:r[3]||(r[3]=e=>Z("reactionsValidateFailure",e))},null,8,["modelValue","bind-form-render-ref"])):v("v-if",!0),u(M,{onSubmit:ie})])),_:1})]),u(R,{class:"form-config__displayContent",group:n(T),"text-formatter":se,modelValue:n(re),"onUpdate:modelValue":r[4]||(r[4]=e=>d(re)?re.value=e:null)},null,8,["group","modelValue"])]),m("section",K,[m("header",Q,f(n(b)("configArea")),1),m("section",X,[u(w,{ref_key:"formConfigEditRef",ref:ne,uuid:n(ee),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,N))}});export{Y as default};
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.3.1-beta.
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.3.1-beta.3",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.3.1-beta.3",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.3.1-beta.
|
3
|
+
"version": "3.3.1-beta.3",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"iOS 7",
|
73
73
|
"last 3 iOS versions"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "8a7e5c7b0eb313bd5398d790668c710ff81c417e"
|
76
76
|
}
|