cnhis-design-vue 3.1.52-release.3 → 3.1.52-release.4
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/es/components/button-print/src/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +45 -41
- package/es/components/classification/index.d.ts +0 -2
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +0 -2
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -2
- package/es/components/classification/src/index.vue.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +74 -74
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -37
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +37 -37
- package/es/components/form-render/index.d.ts +37 -37
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +37 -37
- package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/iho-table/index.d.ts +8 -4
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -4
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/copyPastePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +15 -11
- package/es/components/index.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +75 -75
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +38 -38
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +37 -37
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +37 -37
- package/es/components/table-filter/index.d.ts +2 -0
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{format as s}from"date-fns";import{useFieldNormalize as l}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(f){const{createValidatorSchema:x}=c(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},h=e=>{var o,t,r,s,l,a,p;const c=_(e);e.urlConfig?u(c,e):e.autograph&&m(c,e);const d=!!e.__multiple,f="1"===e.allowModify,x=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(c["x-component-props"],{multiple:d,options:(null==(r=e.componentProps)?void 0:r.options)||e.option,allowModify:f,allowCreate:"1"===e.free_entry||!!c["x-component-props"].allowCreate||f,shouldSave:"1"===e.save_free_entry,showField:null!=(l=e.show_key)?l:null==(s=e.componentProps)?void 0:s.showField,maxTagCount:null!=(p=i(e.multi_select_value))?p:null==(a=c["x-component-props"])?void 0:a.maxTagCount,selectAll:"1"===x||!0===x,...n(e,["lazyRequest","requestCache"])}),d&&(c.type="array"),c},g=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical}),e.urlConfig?u(o,e):e.autograph&&m(o,e),o},y=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},b=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),v=new Map([["LINEBAR",b],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==i||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",h],["REMOTE_SEARCH",h],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=s(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?A(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),w=e=>{if(e.suffixConfig)return C(e);return(v.get(e.html_type)||y)(e)},C=o=>{if(!o.suffixConfig&&!o.prefixConfig)return w(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=_(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:A(n)}),i},{FieldNormalizeWaterfallHook:O,FieldListNormalizeWaterfallHook:j}=l();function A(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,l)=>{var a;const p=null==(a=(o=O.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(b(o),l),i=e[s(o)].properties={}):i?i[s(o)]=r(w(o),l):(i=null,e[s(o)]=r(w(o),l)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:A}}export{f as useFieldListAdaptor};
|
|
@@ -2,7 +2,6 @@ import { AnyObject, ArrayAble, BindEventSettingItem } from '../../../../../es/sh
|
|
|
2
2
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
|
-
export * from '@formily/core';
|
|
6
5
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
6
|
declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
8
7
|
declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
|
|
@@ -181,3 +180,4 @@ export declare type FieldItem = {
|
|
|
181
180
|
reactions: ArrayAble<ReactionType>;
|
|
182
181
|
[key: string]: any;
|
|
183
182
|
}>;
|
|
183
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1880,6 +1880,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -1880,6 +1880,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1880
1880
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
1881
1881
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
1882
1882
|
}) => boolean) | undefined;
|
|
1883
|
+
forceArrowKey?: boolean | undefined;
|
|
1883
1884
|
} | undefined;
|
|
1884
1885
|
clipConfig?: {
|
|
1885
1886
|
isCopy?: boolean | undefined;
|
|
@@ -2121,10 +2122,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2121
2122
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2122
2123
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2123
2124
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2124
|
-
|
|
2125
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2126
|
+
rowDraggable?: boolean | undefined;
|
|
2125
2127
|
showSeq?: boolean | undefined;
|
|
2126
2128
|
forceClearable?: boolean | undefined;
|
|
2127
|
-
|
|
2129
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2128
2130
|
rowGroupSetting?: {
|
|
2129
2131
|
firstRowGroup?: {
|
|
2130
2132
|
groupName?: string | undefined;
|
|
@@ -4381,6 +4383,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4381
4383
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4382
4384
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4383
4385
|
}) => boolean) | undefined;
|
|
4386
|
+
forceArrowKey?: boolean | undefined;
|
|
4384
4387
|
} | undefined;
|
|
4385
4388
|
clipConfig?: {
|
|
4386
4389
|
isCopy?: boolean | undefined;
|
|
@@ -4562,10 +4565,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4562
4565
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4563
4566
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4564
4567
|
isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4565
|
-
|
|
4568
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4569
|
+
rowDraggable?: boolean | undefined;
|
|
4566
4570
|
showSeq?: boolean | undefined;
|
|
4567
4571
|
forceClearable?: boolean | undefined;
|
|
4568
|
-
|
|
4572
|
+
hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4569
4573
|
rowGroupSetting?: {
|
|
4570
4574
|
firstRowGroup?: {
|
|
4571
4575
|
groupName?: string | undefined;
|
|
@@ -27,7 +27,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
|
|
|
27
27
|
readonly treeConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.TreeConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
28
28
|
readonly mouseConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MouseConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
29
29
|
readonly menuConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.MenuConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
30
|
-
readonly keyboardConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.KeyboardConfig
|
|
30
|
+
readonly keyboardConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.KeyboardConfig & Partial<import("vxe-table").VxeTablePropTypes.KeyboardConfig & {
|
|
31
|
+
forceArrowKey: boolean;
|
|
32
|
+
}>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
31
33
|
readonly scrollY: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollY | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
32
34
|
readonly scrollX: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.ScrollX | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
33
35
|
readonly editRules: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.EditRules | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyPastePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unref as e}from"vue";import"../../index.js";import{useSessionStorage as t}from"@vueuse/core";import{selectOptionsMap as n}from"./rendererPlugins/editableWidgets/hooks/useSelectOption.js";import{isInvalidDate as o,isInvalidTime as l,IhoTableUtils as i}from"../utils/index.js";import{EDITABLE_WIDGET_TYPE as r}from"../constants/index.js";import{isString as u,trim as d,isEmpty as s,isEqual as a,isFunction as f}from"lodash-es";import{defineTablePlugin as p}from"../hooks/useTablePlugin.js";function c(){const c="copyPastePlugin",m=t("ihoTableClipData","");return p({name:c,apply(t){function p(t,p,c,g,E){var C,b;if(!(null==(C=null==c?void 0:c.keyboardConfig)?void 0:C.isClip))return;if("paste"===t&&!p.getSelectedCell())return;const{row:T,column:x}=p.getSelectedCell()||p.getEditRecord()||{};if(!T||!x||!v(x,r.SELECT)&&e(m)===T[x.field])return;const R=c.uuid&&v(x,r.SELECT)&&n.get(c.uuid)[x.field],y=T[x.field];if("copy"===t){const e=(null==(b=(R||[]).filter((e=>y.includes(e.value))))?void 0:b.map((e=>e.label)).join(","))||y;m.value=e}else{if(u(e(m))&&(m.value=d(e(m)||"")),!e(m)||!function(e){var t;const n=null==(t=e.editRender)?void 0:t.props;return n&&Object.keys(r).includes(i.getCellType(n))}(x)||T.$__SEPARATE||!function(e,t,n,o){var l,i;const{beforeEditMethod:r}=t.editConfig||{},u={rowIndex:null!=(l=e.getRowIndex(n))?l:0,columnIndex:null!=(i=e.getColumnIndex(o))?i:0};return!r||f(r)&&r({row:n,column:o,...u,$table:e,$grid:void 0})}(p,c,T,x))return;if(v(x,r.DATE)&&o(x,T,m))return;if(v(x,r.NUMBER)&&!/^-?\d*\.?\d+$/.test((e(m)||"").toString()))return;if(v(x,r.TIME)&&l(x,m))return;let t=e(m)||"";if(R&&!s(R)){const e=R.filter((e=>t.split(",").includes(e.label))).map((e=>e.value));if(s(e))return;if(function(e){var t,n;const o=null==(t=e.editRender)?void 0:t.props;return v(e,r.SELECT)&&(null==(n=o.componentProps)?void 0:n.multiple)}(x)){if(a(y,e))return;t=e}else{if(e.includes(y))return;t=e[0]}}T[x.field]=t,g("formChange",{column:x,row:T,oldValue:y,value:t,index:p.getRowIndex(T)}),v(x,r.SEPARATE)&&(null==E||E())}}function v(e,t){var n;const o=null==(n=e.editRender)?void 0:n.props;return o&&i.getCellType(o)===t}t.eventHooks.onCopy.tap(c,(({$table:e},t,{emits:n})=>p("copy",e,t,n))),t.eventHooks.onPaste.tap(c,(({$table:e},t,{emits:n,updateTableDataRef:o})=>p("paste",e,t,n,o)))}})}export{c as copyPastePlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function forceArrowKeyPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../index.js";import{EDITABLE_WIDGET_TYPE as e}from"../constants/index.js";import{promiseTimeout as r}from"@vueuse/shared";import{identity as o}from"lodash-es";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function n(){const n="forceArrowKeyPlugin",i=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function s({keyboardConfig:e={}}){return e.isArrow&&e.forceArrowKey}return t({name:n,apply(t){t.eventHooks.onKeydown.tap(n,(async({$event:e,$table:o},t)=>{const n=e;if(!s(t)||!i.includes(n.key))return;const d=o.getEditRecord()||{};if(d.row&&d.column){e.preventDefault();const r="ArrowLeft"===n.key,t="ArrowUp"===n.key,i="ArrowRight"===n.key,s="ArrowDown"===n.key;o.moveSelected(d,r,t,i,s,n)}await r(0);const{row:p,column:l}=o.getSelectedCell()||{};p&&l&&await o.setEditCell(p,l)}));const d={[e.NUMBER]:e=>{var r;return e.editRender.props={...e.editRender.props,componentProps:{keyboard:{ArrowUp:!1,ArrowDown:!1},...null==(r=e.editRender.props)?void 0:r.componentProps}},e}};t.fieldHooks.field.tap(n,((e,r,t)=>{var n;if(!s(t))return e;return(d[null==(n=e.editRender)?void 0:n.name]||o)(e)}))}})}export{n as forceArrowKeyPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./defaultConfigPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./copyPastePlugin.js";import*as n from"./defaultConfigPlugin/index.js";import*as s from"./defaultValuePlugin.js";import*as t from"./filterDaterangeRenderPlugin/index.js";import*as d from"./filterRenderPlugin/index.js";import*as l from"./filterVisibleEventPlugin.js";import*as g from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as o from"./highLightSetPlugin.js";import*as a from"./keyboardEventPlugin/index.js";import*as P from"./lowCodeFieldAdaptorPlugin/index.js";import*as m from"./maxCheckSizePlugin.js";import*as x from"./operationalFormPlugin/index.js";import*as f from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as j from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as b from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as w from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as c from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as h from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as W from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as v from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as k from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as C from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as S from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as y from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as E from"./rowClickPlugin/index.js";import*as A from"./rowDragPlugin/index.js";import*as D from"./rowGroupSettingPlugin/index.js";import*as F from"./varialbleHeightPlugin/index.js";import*as V from"./virtualTreePlugin/index.js";import{separateMetaModule as q}from"../../../../shared/utils/index.js";var z=q(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./copyPastePlugin.ts":i,"./defaultConfigPlugin/index.ts":n,"./defaultValuePlugin.ts":s,"./filterDaterangeRenderPlugin/index.tsx":t,"./filterRenderPlugin/index.tsx":d,"./filterVisibleEventPlugin.ts":l,"./forceArrowKeyPlugin.ts":g,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":o,"./keyboardEventPlugin/index.ts":a,"./lowCodeFieldAdaptorPlugin/index.tsx":P,"./maxCheckSizePlugin.ts":m,"./operationalFormPlugin/index.ts":x,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":f,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":p,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":R,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":b,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":c,"./rendererPlugins/widgets/checkRendererPlugin.tsx":h,"./rendererPlugins/widgets/colorRendererPlugin.tsx":W,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":v,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":k,"./rendererPlugins/widgets/labelRendererPlugin.tsx":C,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":S,"./rendererPlugins/widgets/seqRendererPlugin.tsx":y,"./rowClickPlugin/index.ts":E,"./rowDragPlugin/index.ts":A,"./rowGroupSettingPlugin/index.ts":D,"./varialbleHeightPlugin/index.tsx":F,"./virtualTreePlugin/index.ts":V}));export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:a,column:i}=t.getSelectedCell()||t.getEditRecord()||{};if(!a||!i)return;r("keyboard",{$table:t,key:o.key,index:t.getRowIndex(a),value:a[i.field],row:a,column:i})}))}})}export{t as keyboardEventPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as o}from"vue";import{format as
|
|
1
|
+
import{createVNode as e,mergeProps as o}from"vue";import{format as n}from"date-fns";import{isFunction as t}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as i,IhoTableRenderHelper as d,isInvalidDate as l,getLowCodeFieldFromField as a}from"../../../../utils/index.js";import m from"./editDate.vue.js";import{defineTablePlugin as u}from"../../../../hooks/useTablePlugin.js";function s(){const s="dateRendererPlugin";return u({name:s,vxe(n){n.interceptor.add("event.clearActived",i(r.DATE,(e=>e.classList.contains("n-date-panel")))),n.renderer.add(r.DATE,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:n,emitFormClick:t,row:r,column:i,$rowIndex:d})=>[e(m,o({value:r[i.field],"onUpdate:value":e=>r[i.field]=e,isStartDate:n.isStartDate,isEndDate:n.isEndDate,connectField:n.connectField,valueFormat:n.valueFormat},n.componentProps,{column:i,row:r,"row-index":d,onClick:t}),null)]))})},apply(e){e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:d,$rowIndex:m},u,{$table:s,emits:c})=>{var f,p,v,x;if((null==(f=o.editRender)?void 0:f.name)!==r.DATE||e[o.field])return;if(t(null==(p=u.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=u.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:d,$table:s,$grid:s})))return}const w=new Date;if(l(o,e,w))return;const D=e[o.field];e[o.field]=n(w,(null==(x=a(o))?void 0:x.valueFormat)||"yyyy-MM-dd HH:mm:ss"),c("formChange",{oldValue:D,index:d>-1?d:m,value:e[o.field],row:e,column:o,$table:s})}))}})}export{s as dateRendererPlugin};
|
|
@@ -141,9 +141,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
141
|
valueField: string;
|
|
142
142
|
placeholder: string;
|
|
143
143
|
deletable: boolean;
|
|
144
|
+
selectAll: boolean;
|
|
144
145
|
shouldSave: boolean;
|
|
145
146
|
consistentMenuWidth: boolean;
|
|
146
147
|
allowCreate: boolean;
|
|
147
|
-
selectAll: boolean;
|
|
148
148
|
}>;
|
|
149
149
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as l,ref as t,computed as o,onBeforeUnmount as n,watch as a,nextTick as u,createVNode as i,toRaw as r,Fragment as d,createTextVNode as s}from"vue";import{keywordMatcher as c,arrayed as p}from"../../../../../../../shared/utils/index.js";import{NSelect as v,NTooltip as f,NIcon as m,NTag as y,NButton as h}from"naive-ui";import{HelpCircleSharp as b}from"@vicons/ionicons5";import{InjectionIhoTableUUID as w}from"../../../../constants/index.js";import{getSelectOptions as F,selectOptionsMap as g}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as S}from"../../../../utils/index.js";import{useDebounceFn as q}from"@vueuse/core";import{isEmpty as O,isFunction as $,isArray as x,isObject as C,omit as B,cloneDeep as _}from"lodash-es";var
|
|
1
|
+
import{defineComponent as e,inject as l,ref as t,computed as o,onBeforeUnmount as n,watch as a,nextTick as u,createVNode as i,toRaw as r,Fragment as d,createTextVNode as s}from"vue";import{keywordMatcher as c,arrayed as p}from"../../../../../../../shared/utils/index.js";import{NSelect as v,NTooltip as f,NIcon as m,NTag as y,NButton as h}from"naive-ui";import{HelpCircleSharp as b}from"@vicons/ionicons5";import{InjectionIhoTableUUID as w}from"../../../../constants/index.js";import{getSelectOptions as F,selectOptionsMap as g}from"../hooks/useSelectOption.js";import{useIhoTableFormEvent as S}from"../../../../utils/index.js";import{useDebounceFn as q}from"@vueuse/core";import{isEmpty as O,isFunction as $,isArray as x,isObject as C,omit as B,cloneDeep as _,xor as j,uniq as k}from"lodash-es";var P=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowCreate:{type:Boolean,default:!1},shouldSave:{type:Boolean,default:!1},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean,default:!1},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:P}){const M=l("$xetable"),W=t(null);function A(e){W.value=e}const D=t(!1),{emitFormChangeWithParams:E}=S({...e,$table:M}),R=t("");function T(){return z()}const I=t([]),U=o((()=>{let l=O(I.value)?e.options:I.value;return R.value?(l=l.filter((l=>l[e.labelField]&&l[e.labelField].includes(R.value)||c(R.value,l.keyword))),!e.allowCreate||l.some((l=>l[e.labelField]===R.value))?l:[...l,{[e.labelField]:R.value,[e.valueField]:R.value,created:!0,shouldSave:e.shouldSave}]):l})),V=t(!1),z=q((async function(l=""){R.value=l;try{if(V.value=!0,!$(e.queryOptions)||!O(e.options))return;I.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{V.value=!1}}),400),K=l(w);function N(l=!1){e.multiple&&u((()=>{var t,o,n;const{refTableLeftBody:a,refTableBody:u}=M.getRefMaps(),i=null==(t=null==a?void 0:a.value)?void 0:t.$el;if(!i)return;const r=null==(o=null==u?void 0:u.value)?void 0:o.$el,d=M.getRowid(e.row),s=null==(n=r.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:n.clientHeight,c=i.querySelector(`.vxe-body--row[rowid="${d}"]`),p=l?"unset":s+"px";c.style.height=p}))}function H(l,t){var o,n;const a=e.value;P("update:value",l);const u=F(K,e.column.field,e.row,M);K&&x(u)&&p(t).forEach((e=>{if(!C(e))return;const l=e;l.created&&l.shouldSave&&u.push(B(r(l),["created","shouldSave"]))}));const i=null==(o=e.column.editRender)?void 0:o.props;if(K&&(null==i?void 0:i.connectField)){const t=null==(n=i.connectField)?void 0:n.split(","),o=g.get(K);t.forEach((async t=>{var n;const{tableColumn:a}=M.reactData,u=a.find((e=>e.field===t)),i=null==(n=null==u?void 0:u.editRender)?void 0:n.props;if(null==i?void 0:i.queryOptions){const n=l?`${t}__${e.column.field}-${l}`:t;if(o[n])return;const a=await i.queryOptions({row:e.row,column:u,isFullData:!0,connectColumn:e.column});o[n]=a}}))}E({oldValue:a,option:_(t)}),N()}function L(e){var l,t;"Tab"===e.key&&W.value&&(null==(t=(l=W.value).handleKeydown)||t.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function G(l){const t=l?U.value.map((l=>l[e.valueField])):[],o=x(e.value)?e.value:[],n=j(t,o),a=l?k(o.concat(n)):[];if(o.length===a.length)return;P("update:value",a);const u=F(K,e.column.field,e.row,M);E({oldValue:o,option:l?u.filter((l=>a.includes(l[e.valueField]))):[]})}function J({node:e,option:l}){return l.desc?i("div",{class:"iho-table__selectOptionWrapper"},[[e,i(f,null,{trigger:()=>i(m,{component:b},null),default:()=>l.desc})]]):e}function Q({option:l,handleClose:t}){var o;const n=null!=(o=e.aliasField&&l[e.aliasField])?o:l[e.labelField];return x(e.value)?e.deletable?i(y,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>n}):`${n} ;`:i(d,null,[n])}function X(){return i(d,null,[i(h,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>G(!0)},{default:()=>[s("全选")]}),i(h,{quaternary:!0,type:"primary",size:"tiny",onClick:()=>G(!1)},{default:()=>[s("清空")]})])}n((()=>{N(!0)})),a((()=>D.value),(e=>{N()}),{immediate:!0});const Y=()=>({class:"iho-table__selectOption"}),Z=o((()=>{var l,t;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(t=null==(l=e.menuProps)?void 0:l.class)?t:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=X),i(v,{ref:A,show:D.value,"onUpdate:show":e=>D.value=e,consistentMenuWidth:e.consistentMenuWidth,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:V.value,options:U.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,nodeProps:Y,menuProps:Z.value,renderTag:Q,renderOption:J,onUpdateShow:T,onUpdateValue:H,onKeydown:L},l)}}});export{P as default};
|
|
@@ -4,7 +4,6 @@ import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
formattedValue: {
|
|
6
6
|
type: StringConstructor;
|
|
7
|
-
default: undefined;
|
|
8
7
|
};
|
|
9
8
|
column: {
|
|
10
9
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -23,7 +22,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
22
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
24
23
|
formattedValue: {
|
|
25
24
|
type: StringConstructor;
|
|
26
|
-
default: undefined;
|
|
27
25
|
};
|
|
28
26
|
column: {
|
|
29
27
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -49,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
47
|
timePickerRef: import("vue").Ref<any>;
|
|
50
48
|
inputValue: import("vue").Ref<any>;
|
|
51
49
|
__formattedValue: import("vue").Ref<any>;
|
|
52
|
-
oldValue:
|
|
50
|
+
oldValue: any;
|
|
53
51
|
placeholder: any;
|
|
54
52
|
valueFormat: any;
|
|
55
53
|
shortcutOptions: any;
|
|
@@ -76,7 +74,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
76
74
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:formattedValue")[], "click" | "update:formattedValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
77
75
|
formattedValue: {
|
|
78
76
|
type: StringConstructor;
|
|
79
|
-
default: undefined;
|
|
80
77
|
};
|
|
81
78
|
column: {
|
|
82
79
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -93,7 +90,5 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
90
|
}>> & {
|
|
94
91
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
95
92
|
"onUpdate:formattedValue"?: ((...args: any[]) => any) | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
formattedValue: string;
|
|
98
|
-
}>;
|
|
93
|
+
}, {}>;
|
|
99
94
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,
|
|
1
|
+
import{defineComponent as e,useAttrs as l,inject as t,ref as a,watch as r,nextTick as o,openBlock as u,createBlock as i,unref as n,withCtx as m,createVNode as c,mergeProps as v,createElementBlock as d,Fragment as f,renderList as s,createTextVNode as p,toDisplayString as k,createCommentVNode as y}from"vue";import{NPopover as _,NInput as h,NSpace as w,NScrollbar as b,NButton as g}from"naive-ui";import{useIhoTableFormEvent as V}from"../../../../utils/index.js";import C from"../../../../../../time-picker/index.js";import{parse as F,isValid as q,format as x}from"date-fns";var j=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:j}){const $=e,I=l(),O=t("$xetable"),{emitFormChangeWithParams:P}=V({...$,$table:O}),R=a(null),S=a(!1),A=a(),E=a(),H=a();let U=$.formattedValue;const{placeholder:z="请选择",valueFormat:D="HH:mm",shortcutOptions:K=[]}=I,M={placeholder:z,valueFormat:D,format:D};function N(e){if(H.value=e,U===e)return;const l=e||null;j("update:formattedValue",l),P({oldValue:U}),U=l}function T(){[M.valueFormat.replace(/:/,""),M.valueFormat].some((e=>{const l=F(E.value,e,new Date);if(!E.value||q(l)){return N(E.value?x(l,M.valueFormat):""),!0}return!1}))}function W(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=R.value)||l.blur(),S.value=!1)}return r((()=>$.formattedValue),(e=>{E.value=e,H.value=e}),{immediate:!0}),r((()=>S.value),(async e=>{var l,t,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(t=null==(l=A.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(e,l)=>(u(),i(n(_),{show:S.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:l[3]||(l[3]=()=>S.value=!1)},{trigger:m((()=>[c(n(h),{ref_key:"formRef",ref:R,clearable:"",value:E.value,"onUpdate:value":l[0]||(l[0]=e=>E.value=e),valueModifiers:{trim:!0},onClick:l[1]||(l[1]=()=>S.value=!0),onChange:T,onKeydown:W},null,8,["value"])])),default:m((()=>[c(n(w),null,{default:m((()=>[c(n(C),v({ref_key:"timePickerRef",ref:A,show:"","formatted-value":H.value},n(M),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":N,onConfirm:l[2]||(l[2]=()=>S.value=!1)}),null,16,["formatted-value"]),c(n(b),{class:"iho-table__scrollbar"},{default:m((()=>[n(K).length?(u(),i(n(w),{key:0,vertical:"",wrap:!1},{default:m((()=>[(u(!0),d(f,null,s(n(K),(e=>(u(),i(n(g),{size:"tiny",key:e,onClick:l=>function(e){N(e),S.value=!1}(e)},{default:m((()=>[p(k(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):y("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as r}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as l,IhoTableRenderHelper as d,getLowCodeFieldFromField as m,isInvalidTime as u}from"../../../../utils/index.js";import a from"./editTime.vue.js";import{defineTablePlugin as f}from"../../../../hooks/useTablePlugin.js";function s(){const s="timeRendererPlugin";return f({name:s,vxe(t){t.interceptor.add("event.clearActived",l(n.TIME,(e=>e.classList.contains("n-popover")))),t.renderer.add(n.TIME,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(a,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l,valueFormat:t.valueFormat},t.componentProps,{onClick:r}),null)]))})},apply(e){i(e).bindAutoFocusConfig(s,n.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)}),e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:l},
|
|
1
|
+
import{createVNode as e,mergeProps as o}from"vue";import{format as t}from"date-fns";import{isFunction as r}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../../constants/index.js";import{useAutoFocus as i}from"../hooks/useAutoFocus.js";import{createIhoTableClearActivedInterceptor as l,IhoTableRenderHelper as d,getLowCodeFieldFromField as m,isInvalidTime as u}from"../../../../utils/index.js";import a from"./editTime.vue.js";import{defineTablePlugin as f}from"../../../../hooks/useTablePlugin.js";function s(){const s="timeRendererPlugin";return f({name:s,vxe(t){t.interceptor.add("event.clearActived",l(n.TIME,(e=>e.classList.contains("n-popover")))),t.renderer.add(n.TIME,{renderCell:d.createDefaultRenderCell(),renderEdit:d.createRenderEdit((({fieldItem:t,emitFormClick:r,row:n,column:i,$rowIndex:l})=>[e(a,o({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e,column:i,row:n,"row-index":l,valueFormat:t.valueFormat},t.componentProps,{onClick:r}),null)]))})},apply(e){i(e).bindAutoFocusConfig(s,n.TIME,".n-input__input-el",{after:e=>(Reflect.set(e.editRender,"autoselect",!0),e)}),e.eventHooks.onCellDblclick.tap(s,(({row:e,column:o,columnIndex:i,rowIndex:l,$rowIndex:d},a,{$table:f,emits:s})=>{var c,p,v,x;if((null==(c=o.editRender)?void 0:c.name)!==n.TIME||e[o.field])return;if(r(null==(p=a.editConfig)?void 0:p.beforeEditMethod)){if(!(null==(v=a.editConfig)?void 0:v.beforeEditMethod({row:e,column:o,columnIndex:i,rowIndex:l,$table:f,$grid:f})))return}const w=t(new Date,(null==(x=m(o))?void 0:x.valueFormat)||"HH:mm");if(u(o,w))return;const I=e[o.field];e[o.field]=w,s("formChange",{oldValue:I,index:l>-1?l:d,value:e[o.field],row:e,column:o,$table:f})}))}})}export{s as timeRendererPlugin};
|
|
@@ -18,36 +18,40 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
18
18
|
isTree: MaybeString<0 | 1 | 2 | 3>;
|
|
19
19
|
isBatchSelect: MaybeString<0 | 1>;
|
|
20
20
|
isSingleSelect: MaybeString<0 | 1>;
|
|
21
|
-
|
|
21
|
+
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
22
|
+
rowDraggable: boolean;
|
|
22
23
|
showSeq: boolean;
|
|
23
24
|
forceClearable: boolean;
|
|
24
|
-
|
|
25
|
+
hideSettingBtn: MaybeString<0 | 1>;
|
|
25
26
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
26
27
|
anchorList: Array<{
|
|
27
28
|
name?: string;
|
|
28
29
|
field: string;
|
|
29
30
|
} | string>;
|
|
30
|
-
rowConfig: Partial<VxeTableProps['rowConfig'] & {
|
|
31
|
-
clickToCancel: boolean;
|
|
32
|
-
}>;
|
|
33
31
|
columnConfig: {
|
|
34
32
|
seqSlotFn: VxeColumnPropTypes.Slots['default'];
|
|
35
33
|
};
|
|
34
|
+
sortableConfig: Partial<{
|
|
35
|
+
enable: boolean;
|
|
36
|
+
usePreset: boolean;
|
|
37
|
+
[K: string]: any;
|
|
38
|
+
}>;
|
|
39
|
+
operationForm: FormOperationalConfig[];
|
|
36
40
|
checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
|
|
37
41
|
slots: VxeColumnPropTypes.Slots;
|
|
38
42
|
maxCheckSize: number;
|
|
39
43
|
disableHeader: boolean;
|
|
40
44
|
useNCheckbox: boolean;
|
|
41
45
|
}>;
|
|
46
|
+
rowConfig: Partial<VxeTableProps['rowConfig'] & {
|
|
47
|
+
clickToCancel: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
keyboardConfig: Partial<VxeTableProps['keyboardConfig'] & {
|
|
50
|
+
forceArrowKey: boolean;
|
|
51
|
+
}>;
|
|
42
52
|
radioConfig: Partial<VxeTableProps['radioConfig'] & {
|
|
43
53
|
slots: VxeColumnPropTypes.Slots;
|
|
44
54
|
}>;
|
|
45
|
-
sortableConfig: Partial<{
|
|
46
|
-
enable: boolean;
|
|
47
|
-
usePreset: boolean;
|
|
48
|
-
[K: string]: any;
|
|
49
|
-
}>;
|
|
50
|
-
operationForm: FormOperationalConfig[];
|
|
51
55
|
[K: string]: unknown;
|
|
52
56
|
}>;
|
|
53
57
|
export declare type IhoTableFieldItem = {
|
package/es/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as m,CRadio as f,CCheckbox as l,CSelect as p,CDatetime as c}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import u from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import x from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import C from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import j from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import h from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import b from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import k from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import
|
|
1
|
+
import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as m,CRadio as f,CCheckbox as l,CSelect as p,CDatetime as c}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import u from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import x from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import C from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import j from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import h from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import b from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import k from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import g from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import S from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import F from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import P from"./shortcut-provider/index.js";export{default as CShortcutProvider}from"./shortcut-provider/index.js";import y from"./shortcut-setter/index.js";export{default as CShortcutSetter}from"./shortcut-setter/index.js";import D from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import T from"./iho-table/index.js";export{default as CIhoTable,useIhoTablePresetPlugins}from"./iho-table/index.js";import v from"./keyboard/index.js";export{default as CKeyboard}from"./keyboard/index.js";import B from"./search-cascader/index.js";export{default as CSearchCascader}from"./search-cascader/index.js";import R from"./recommend-search/index.js";export{default as CRecommendSearch}from"./recommend-search/index.js";import I from"./date-picker/index.js";export{default as CDatePicker}from"./date-picker/index.js";import A from"./time-picker/index.js";export{default as CTimePicker}from"./time-picker/index.js";import V from"./config-provider/index.js";export{default as CConfigProvider}from"./config-provider/index.js";import w from"./picture-clipper/index.js";export{default as CPictureClipper}from"./picture-clipper/index.js";import E from"./table-export-field/index.js";export{default as CTableExportField}from"./table-export-field/index.js";import L from"./expand-field/index.js";export{default as CExpandField}from"./expand-field/index.js";import K from"./multi-chat/index.js";export{default as CMultiChat}from"./multi-chat/index.js";import O from"./callback/index.js";export{default as CCallback}from"./callback/index.js";import H from"./slider-tree/index.js";export{default as CSliderTree}from"./slider-tree/index.js";import M from"./body-select/index.js";export{default as CBodySelect}from"./body-select/index.js";export{default as CInsuranceSDK}from"./card-reader-sdk/src/insuranceSDK.js";export{default as CCardReaderSDK}from"./card-reader-sdk/src/cardReaderSDK.js";export{formatDateRangeInfo,presetValToDateRangestr,presetValToTimestamp}from"./table-filter/src/components/render-widget/helpers/presetValToTimestamp.js";export{DatePresetValEnums,DateRangeInnerValEnums,DateRangeOutDefEnums}from"./table-filter/src/components/render-widget/enums.js";export{vFlexibleResize}from"../shared/directive/flexibleResize.js";export{useGuide}from"./guide/src/useGuide.js";export{useFieldListAdaptor}from"./form-render/src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./form-render/src/hooks/useFormRequest.js";export{useCommonLog}from"./form-render/src/hooks/useCommonLog.js";export{useFormField}from"./form-render/src/hooks/useFormField.js";export{useFormAsyncQueue}from"./form-render/src/hooks/useFormAsyncQueue.js";export{useFieldVisitor}from"./form-render/src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./form-render/src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./form-render/src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./form-render/src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./form-render/src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./form-render/src/hooks/useFormItemDeps.js";export{useAnchor}from"./form-render/src/hooks/useAnchor.js";export{useFormContext}from"./form-render/src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./form-render/src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./form-render/src/hooks/useFormRenderOptions.js";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./form-render/src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./form-render/src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./form-render/src/utils/schema.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,renderDescOption,splitExtendKey,validateMessageParser}from"./form-render/src/utils/index.js";export{GlobalShortcutProvider,ShortcutManager,useShortcuts}from"./shortcut-provider/src/hooks/useShortcuts.js";export{useShortcutSignature}from"./shortcut-provider/src/hooks/useShortcutSignature.js";export{defineTablePlugin,useTablePlugin}from"./iho-table/src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./iho-table/src/hooks/useColumnConfigAdaptor.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./iho-table/src/types/pluginType.js";export{Print}from"./button-print/src/utils/print.js";export{getFileUrl,isIReport,useBrowserPrint}from"./button-print/src/utils/browserPrint.js";export{transformOriginToTree}from"./slider-tree/src/utils/index.js";const q={CGrid:e,CBigTable:r,CFieldSet:o,CButtonPrint:t,CSelectPerson:s,CSelectLabel:i,CLabelFormContent:a,CScaleView:m,CMap:d,CVodChunkUpload:n,CRadio:f,CCheckbox:l,CSelect:p,CDatetime:c,CInfoHeader:u,CTimeLine:x,CBaseSearch:C,CQuickSearch:j,CClassification:h,CBpmnWorkflow:b,CStepsWheel:k,CEditor:g,CFormRender:S,CFabricChart:F,CShortcutProvider:P,CShortcutSetter:y,CFormConfig:D,CIhoTable:T,CKeyboard:v,CSearchCascader:B,CRecommendSearch:R,CDatePicker:I,CTimePicker:A,CConfigProvider:V,CPictureClipper:w,CTableExportField:E,CExpandField:L,CMultiChat:K,CCallback:O,CSliderTree:H,CBodySelect:M};var N={install:function(e){Object.values(q).forEach((r=>{r.install(e)}))},...q};export{N as default};
|