@aplus-frontend/ui 7.9.0 → 7.9.1

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.
@@ -173,9 +173,9 @@ const Fe = /* @__PURE__ */ M({
173
173
  }), m.value = [];
174
174
  }
175
175
  function u(e) {
176
- l.value = e;
176
+ l.value = [...e];
177
177
  const a = se(e, o.rowKey);
178
- s?.setFieldValue(o.name, e), s?.setFieldValue(i, a);
178
+ s?.setFieldValue(o.name, [...e]), s?.setFieldValue(i, a);
179
179
  }
180
180
  function c(e, a) {
181
181
  const n = e === "end" ? l.value.length - 1 : e;
@@ -1,5 +1,5 @@
1
- import { genComponentStyleHook as n } from "../../utils/cssinjs/index.mjs";
2
- const e = (t) => ({
1
+ import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
2
+ const n = (t) => ({
3
3
  [t.componentCls]: {
4
4
  "&-compact": {
5
5
  ".ant-select": {
@@ -44,6 +44,10 @@ const e = (t) => ({
44
44
  ".ant-form-item-control-input-content > .ant-input-group > :first-child, .ant-select-selector": {
45
45
  borderStartStartRadius: 0,
46
46
  borderEndStartRadius: 0
47
+ },
48
+ ".ant-form-item-control-input-content .ant-input-group > :first-child, .ant-select-selector": {
49
+ borderStartStartRadius: 0,
50
+ borderEndStartRadius: 0
47
51
  }
48
52
  },
49
53
  ".ant-form-item:not(:first-child):not(:last-child)": {
@@ -62,8 +66,8 @@ const e = (t) => ({
62
66
  ".ant-form-vertical .ant-input-group.ant-input-group-compact > *": {
63
67
  verticalAlign: "bottom"
64
68
  }
65
- }), o = n("ApForm.ItemTextGroup", (t) => [e(t)]);
69
+ }), o = r("ApForm.ItemTextGroup", (t) => [n(t)]);
66
70
  export {
67
71
  o as default,
68
- e as genFormItemTextGroupStyle
72
+ n as genFormItemTextGroupStyle
69
73
  };
@@ -1,2 +1,2 @@
1
- declare const _default: "7.9.0";
1
+ declare const _default: "7.9.1";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "7.9.0";
1
+ const e = "7.9.1";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../ap-form/index.js"),s=require("lodash-unified");require("../../config-provider/index.js");const M=require("../hooks/use-editable-columns.js");require("../index.vue2.js");const P=require("../hooks/use-editable-form-item-api.js"),k=require("../../ap-form/context.js"),H=require("../../ap-form/utils/get.js"),L=require("../utils.js"),O=require("../../ap-form/hooks/use-watch.js"),z=require("./utils.js"),G=require("../style/editable.js"),K=require("../../config-provider/hooks/use-namespace.js"),W=require("../../config-provider/hooks/use-global-config.js"),U=require("../index.vue.js"),$=e.defineComponent({name:"EditableGrid",__name:"form-item",props:{dropdownPrefixCls:{},bordered:{type:Boolean},locale:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{},showSorterTooltip:{type:[Boolean,Object]},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{},title:{},id:{},showHeader:{type:Boolean},components:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean]},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean},indentSize:{},expandIconColumnIndex:{},showExpandColumn:{type:Boolean},expandedRowClassName:{},childrenColumnName:{},rowExpandable:{},transformCellText:{},rowHoverable:{type:Boolean},rowSelection:{type:[Boolean,Object]},onLoadingChange:{},onShownColumnsChange:{},pagination:{type:[Boolean,Object],default:!1},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},tableStyle:{},adaptive:{type:Boolean},columnResizable:{type:Boolean,default:!1},loading:{type:Boolean,default:void 0},summary:{},rowHeight:{default:66},getRowHeight:{},advanceRenderer:{type:Boolean},browserTooltips:{type:Boolean},virtual:{type:[Boolean,Object],default:void 0},onRowClicked:{},onScrollEnd:{},rowClassName:{},rowClassRules:{},autoHeight:{type:Boolean},onUpdate:{},customRow:{},theme:{},columns:{},defaultValue:{},onChange:{},maxLength:{},onFieldChange:{},label:{},name:{},formItem:{}},setup(w,{expose:h}){const y=e.useSlots(),t=w,{b}=K.useNamespace("editable-aggrid"),C=G.default("editable-aggrid"),r=e.ref(),{internalInstance:u,model:R}=k.useInjectForm(),i=L.getShadowName(t.name);let c;e.onMounted(()=>{const o=t.formItem?.initialValue??H.getModelValue(e.unref(R),t.name);c=s.cloneDeep(o),S(o,"suffix",!0)});const l=e.ref([]),v=O.useWatch(t.name);e.watch(()=>v.value,o=>{s.isEqual(o,l.value)||m(o??c)},{deep:!0});const x=W.useGlobalConfig("valueTypeMap"),B=M.useGetEditableColumns(t,x,i),{add:_,addMultiple:q,__addMultiple:S,remove:I,removeByKey:E,getRowData:F,getRowsData:N,setRowData:T,clear:V,refreshRowIds:d}=P.useEditableFormItemApi(t,u,l,i);function j(){const o=r.value?._internalGridApi;if(!d.value?.length||!o)return;const a=d.value.map(n=>o.getRowNode(n)).filter(n=>!!n);o.refreshCells({rowNodes:a,force:!0}),d.value=[]}function m(o){l.value=o;const a=z.arrayToObject(o,t.rowKey);u?.setFieldValue(t.name,o),u?.setFieldValue(i,a)}function p(o,a){const n=o==="end"?l.value.length-1:o;r.value?.scrollToRow(n,a)}function A(o,a){r.value?.scrollToColumn(o,a)}return h({add:_,addMultiple:q,remove:I,removeByKey:E,getRowData:F,getRowsData:N,setRowData:T,clear:V,setTableData:m,scrollTo:p,scrollToRow:p,scrollToColumn:A}),(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(g.ApForm).FormItem,{hidden:"",name:o.name},null,8,["name"]),e.createVNode(e.unref(g.ApForm).FormItem,e.mergeProps(e.unref(s.omit)(o.formItem,"initialValue"),{label:o.label}),{default:e.withCtx(()=>[e.createVNode(U.default,e.mergeProps(e.unref(s.omit)(t,["name","maxLength","onChange","defaultValue","formItem"]),{ref_key:"tableRef",ref:r,class:[e.unref(b)(),e.unref(C)],size:"mini",columns:e.unref(B),"data-source":l.value,"search-form":!1,onUpdate:j}),e.createSlots({_:2},[e.renderList(y,(n,f)=>({name:f,fn:e.withCtx(D=>[e.renderSlot(o.$slots,f,e.normalizeProps(e.guardReactiveProps(D||{})))])}))]),1040,["class","columns","data-source"])]),_:3},16,["label"])],64))}});exports.default=$;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../ap-form/index.js"),s=require("lodash-unified");require("../../config-provider/index.js");const M=require("../hooks/use-editable-columns.js");require("../index.vue2.js");const P=require("../hooks/use-editable-form-item-api.js"),k=require("../../ap-form/context.js"),H=require("../../ap-form/utils/get.js"),L=require("../utils.js"),O=require("../../ap-form/hooks/use-watch.js"),z=require("./utils.js"),G=require("../style/editable.js"),K=require("../../config-provider/hooks/use-namespace.js"),W=require("../../config-provider/hooks/use-global-config.js"),U=require("../index.vue.js"),$=e.defineComponent({name:"EditableGrid",__name:"form-item",props:{dropdownPrefixCls:{},bordered:{type:Boolean},locale:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{},showSorterTooltip:{type:[Boolean,Object]},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{},title:{},id:{},showHeader:{type:Boolean},components:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean]},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean},indentSize:{},expandIconColumnIndex:{},showExpandColumn:{type:Boolean},expandedRowClassName:{},childrenColumnName:{},rowExpandable:{},transformCellText:{},rowHoverable:{type:Boolean},rowSelection:{type:[Boolean,Object]},onLoadingChange:{},onShownColumnsChange:{},pagination:{type:[Boolean,Object],default:!1},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},tableStyle:{},adaptive:{type:Boolean},columnResizable:{type:Boolean,default:!1},loading:{type:Boolean,default:void 0},summary:{},rowHeight:{default:66},getRowHeight:{},advanceRenderer:{type:Boolean},browserTooltips:{type:Boolean},virtual:{type:[Boolean,Object],default:void 0},onRowClicked:{},onScrollEnd:{},rowClassName:{},rowClassRules:{},autoHeight:{type:Boolean},onUpdate:{},customRow:{},theme:{},columns:{},defaultValue:{},onChange:{},maxLength:{},onFieldChange:{},label:{},name:{},formItem:{}},setup(w,{expose:h}){const y=e.useSlots(),t=w,{b}=K.useNamespace("editable-aggrid"),C=G.default("editable-aggrid"),r=e.ref(),{internalInstance:u,model:R}=k.useInjectForm(),i=L.getShadowName(t.name);let c;e.onMounted(()=>{const o=t.formItem?.initialValue??H.getModelValue(e.unref(R),t.name);c=s.cloneDeep(o),S(o,"suffix",!0)});const l=e.ref([]),v=O.useWatch(t.name);e.watch(()=>v.value,o=>{s.isEqual(o,l.value)||m(o??c)},{deep:!0});const x=W.useGlobalConfig("valueTypeMap"),B=M.useGetEditableColumns(t,x,i),{add:_,addMultiple:q,__addMultiple:S,remove:I,removeByKey:E,getRowData:F,getRowsData:N,setRowData:T,clear:V,refreshRowIds:d}=P.useEditableFormItemApi(t,u,l,i);function j(){const o=r.value?._internalGridApi;if(!d.value?.length||!o)return;const a=d.value.map(n=>o.getRowNode(n)).filter(n=>!!n);o.refreshCells({rowNodes:a,force:!0}),d.value=[]}function m(o){l.value=[...o];const a=z.arrayToObject(o,t.rowKey);u?.setFieldValue(t.name,[...o]),u?.setFieldValue(i,a)}function p(o,a){const n=o==="end"?l.value.length-1:o;r.value?.scrollToRow(n,a)}function A(o,a){r.value?.scrollToColumn(o,a)}return h({add:_,addMultiple:q,remove:I,removeByKey:E,getRowData:F,getRowsData:N,setRowData:T,clear:V,setTableData:m,scrollTo:p,scrollToRow:p,scrollToColumn:A}),(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(g.ApForm).FormItem,{hidden:"",name:o.name},null,8,["name"]),e.createVNode(e.unref(g.ApForm).FormItem,e.mergeProps(e.unref(s.omit)(o.formItem,"initialValue"),{label:o.label}),{default:e.withCtx(()=>[e.createVNode(U.default,e.mergeProps(e.unref(s.omit)(t,["name","maxLength","onChange","defaultValue","formItem"]),{ref_key:"tableRef",ref:r,class:[e.unref(b)(),e.unref(C)],size:"mini",columns:e.unref(B),"data-source":l.value,"search-form":!1,onUpdate:j}),e.createSlots({_:2},[e.renderList(y,(n,f)=>({name:f,fn:e.withCtx(D=>[e.renderSlot(o.$slots,f,e.normalizeProps(e.guardReactiveProps(D||{})))])}))]),1040,["class","columns","data-source"])]),_:3},16,["label"])],64))}});exports.default=$;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../../utils/cssinjs/index.js"),e=t=>({[t.componentCls]:{"&-compact":{".ant-select":{"&-focused":{zIndex:1},"&:hover":{zIndex:1}},".ant-picker":{"&-focused":{zIndex:1},"&:hover":{zIndex:1}},".ant-input-number":{"&-focused":{zIndex:1},"&:hover":{zIndex:1}},".ant-form-item:first-child":{".ant-form-item-control-input-content > :first-child, .ant-select-selector":{borderStartEndRadius:0,borderEndEndRadius:0},".ant-form-item-control-input-content > .ant-input-group > :last-child, .ant-select-selector":{borderStartEndRadius:0,borderEndEndRadius:0}},".ant-form-item:last-child":{".ant-form-item-control-input-content > :first-child, .ant-select-selector":{borderStartStartRadius:0,borderEndStartRadius:0},".ant-form-item-control-input-content > .ant-input-group > :first-child, .ant-select-selector":{borderStartStartRadius:0,borderEndStartRadius:0}},".ant-form-item:not(:first-child):not(:last-child)":{".ant-form-item-control-input-content > :first-child, .ant-select-selector":{borderRadius:0},".ant-form-item-control-input-content > .ant-input-group > *, .ant-select-selector":{borderRadius:0}},".ant-input-group-addon:first-child":{borderRadius:0}}},".ant-form-vertical .ant-input-group.ant-input-group-compact > *":{verticalAlign:"bottom"}}),r=n.genComponentStyleHook("ApForm.ItemTextGroup",t=>[e(t)]);exports.default=r;exports.genFormItemTextGroupStyle=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../utils/cssinjs/index.js"),e=t=>({[t.componentCls]:{"&-compact":{".ant-select":{"&-focused":{zIndex:1},"&:hover":{zIndex:1}},".ant-picker":{"&-focused":{zIndex:1},"&:hover":{zIndex:1}},".ant-input-number":{"&-focused":{zIndex:1},"&:hover":{zIndex:1}},".ant-form-item:first-child":{".ant-form-item-control-input-content > :first-child, .ant-select-selector":{borderStartEndRadius:0,borderEndEndRadius:0},".ant-form-item-control-input-content > .ant-input-group > :last-child, .ant-select-selector":{borderStartEndRadius:0,borderEndEndRadius:0}},".ant-form-item:last-child":{".ant-form-item-control-input-content > :first-child, .ant-select-selector":{borderStartStartRadius:0,borderEndStartRadius:0},".ant-form-item-control-input-content > .ant-input-group > :first-child, .ant-select-selector":{borderStartStartRadius:0,borderEndStartRadius:0},".ant-form-item-control-input-content .ant-input-group > :first-child, .ant-select-selector":{borderStartStartRadius:0,borderEndStartRadius:0}},".ant-form-item:not(:first-child):not(:last-child)":{".ant-form-item-control-input-content > :first-child, .ant-select-selector":{borderRadius:0},".ant-form-item-control-input-content > .ant-input-group > *, .ant-select-selector":{borderRadius:0}},".ant-input-group-addon:first-child":{borderRadius:0}}},".ant-form-vertical .ant-input-group.ant-input-group-compact > *":{verticalAlign:"bottom"}}),n=r.genComponentStyleHook("ApForm.ItemTextGroup",t=>[e(t)]);exports.default=n;exports.genFormItemTextGroupStyle=e;
@@ -1,2 +1,2 @@
1
- declare const _default: "7.9.0";
1
+ declare const _default: "7.9.1";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.9.0";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.9.1";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "7.9.0",
3
+ "version": "7.9.1",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [