antd-management-fast-framework 1.12.52 → 1.12.55

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.
@@ -70,7 +70,7 @@ export function buildDropdown({ key, tooltip: tooltipSource, type: typeSource, p
70
70
  confirm?: boolean | undefined;
71
71
  processing?: boolean | undefined;
72
72
  iconProcessing?: JSX.Element | undefined;
73
- }): JSX.Element | null;
73
+ }, ...args: any[]): JSX.Element | null;
74
74
  export function buildMenu({ handleData: r, handleMenuClick, menuItems, }: {
75
75
  handleData: any;
76
76
  handleMenuClick?: (() => void) | undefined;
@@ -599,23 +599,7 @@ function buildDropdown(_ref4) {
599
599
 
600
600
  if (confirmAdjust) {
601
601
  if ((0, _tools.isBoolean)(confirmAdjust)) {
602
- (0, _tools.recordObject)({
603
- key: key,
604
- type: type,
605
- size: size,
606
- icon: icon,
607
- text: text,
608
- danger: danger,
609
- disabled: disabled,
610
- hidden: hidden,
611
- confirm: confirm,
612
- handleData: handleData,
613
- handleClick: handleClick,
614
- processing: processing,
615
- iconProcessing: iconProcessing,
616
- style: style,
617
- showIcon: showIcon
618
- });
602
+ (0, _tools.recordObject)(arguments[0]);
619
603
  throw new Error('buildMenu : confirm property in menu Items not allow bool when check confirm is true.');
620
604
  }
621
605
 
@@ -847,94 +831,95 @@ function buildMenu(_ref5) {
847
831
  return d;
848
832
  });
849
833
  return /*#__PURE__*/_react.default.createElement(_menu.default, {
850
- onClick: function onClick(e) {
851
- var key = e.key;
852
- handleMenuClick({
853
- key: key,
854
- handleData: r
855
- });
856
- }
857
- }, listMenuItem.map(function (o) {
858
- var type = o.type,
859
- key = o.key,
860
- icon = o.icon,
861
- text = o.text,
862
- disabled = o.disabled,
863
- hidden = o.hidden,
864
- confirm = o.confirm;
834
+ items: listMenuItem.map(function (o) {
835
+ var type = o.type,
836
+ key = o.key,
837
+ icon = o.icon,
838
+ text = o.text,
839
+ disabled = o.disabled,
840
+ hidden = o.hidden,
841
+ confirm = o.confirm;
842
+
843
+ if ((0, _tools.stringIsNullOrWhiteSpace)(key)) {
844
+ (0, _tools.showErrorMessage)({
845
+ message: 'key is not allow empty'
846
+ });
847
+ }
865
848
 
866
- if ((0, _tools.stringIsNullOrWhiteSpace)(key)) {
867
- (0, _tools.showErrorMessage)({
868
- message: 'key is not allow empty'
869
- });
870
- }
849
+ if (hidden) {
850
+ return null;
851
+ }
871
852
 
872
- if (hidden) {
873
- return null;
874
- }
853
+ if (type === _constants.menuType.menu) {
854
+ if (confirm) {
855
+ var placement = confirm.placement,
856
+ title = confirm.title,
857
+ handleConfirm = confirm.handleConfirm,
858
+ okText = confirm.okText,
859
+ cancelText = confirm.cancelText;
860
+ return /*#__PURE__*/_react.default.createElement(_popconfirm.default, {
861
+ key: key,
862
+ placement: placement,
863
+ title: title,
864
+ onConfirm: function onConfirm() {
865
+ return handleConfirm({
866
+ key: key,
867
+ handleData: r
868
+ });
869
+ },
870
+ okText: okText,
871
+ cancelText: cancelText,
872
+ disabled: disabled,
873
+ overlayStyle: {
874
+ zIndex: 1060
875
+ }
876
+ }, /*#__PURE__*/_react.default.createElement("li", {
877
+ className: _index.default.menuItemCustom,
878
+ style: {
879
+ display: 'inherit',
880
+ height: '32px'
881
+ }
882
+ }, /*#__PURE__*/_react.default.createElement(_button.default, {
883
+ className: _index.default.menuItemCustomButton,
884
+ type: "text",
885
+ style: {
886
+ padding: '5px 12px',
887
+ border: 0,
888
+ height: '32px'
889
+ },
890
+ size: "small",
891
+ disabled: disabled
892
+ }, /*#__PURE__*/_react.default.createElement(_IconInfo.default, {
893
+ icon: icon || /*#__PURE__*/_react.default.createElement(_icons.EditOutlined, null),
894
+ text: text
895
+ }))));
896
+ }
875
897
 
876
- if (type === _constants.menuType.menu) {
877
- if (confirm) {
878
- var placement = confirm.placement,
879
- title = confirm.title,
880
- handleConfirm = confirm.handleConfirm,
881
- okText = confirm.okText,
882
- cancelText = confirm.cancelText;
883
- return /*#__PURE__*/_react.default.createElement(_popconfirm.default, {
898
+ return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
884
899
  key: key,
885
- placement: placement,
886
- title: title,
887
- onConfirm: function onConfirm() {
888
- return handleConfirm({
889
- key: key,
890
- handleData: r
891
- });
892
- },
893
- okText: okText,
894
- cancelText: cancelText,
895
- disabled: disabled,
896
- overlayStyle: {
897
- zIndex: 1060
898
- }
899
- }, /*#__PURE__*/_react.default.createElement("li", {
900
- className: _index.default.menuItemCustom,
901
- style: {
902
- display: 'inherit',
903
- height: '32px'
904
- }
905
- }, /*#__PURE__*/_react.default.createElement(_button.default, {
906
- className: _index.default.menuItemCustomButton,
907
- type: "text",
908
- style: {
909
- padding: '5px 12px',
910
- border: 0,
911
- height: '32px'
912
- },
913
- size: "small",
914
900
  disabled: disabled
915
901
  }, /*#__PURE__*/_react.default.createElement(_IconInfo.default, {
916
902
  icon: icon || /*#__PURE__*/_react.default.createElement(_icons.EditOutlined, null),
917
903
  text: text
918
- }))));
904
+ }));
919
905
  }
920
906
 
921
- return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
922
- key: key,
923
- disabled: disabled
924
- }, /*#__PURE__*/_react.default.createElement(_IconInfo.default, {
925
- icon: icon || /*#__PURE__*/_react.default.createElement(_icons.EditOutlined, null),
926
- text: text
927
- }));
928
- }
907
+ if (type === _constants.menuType.divider) {
908
+ return /*#__PURE__*/_react.default.createElement(_menu.default.Divider, {
909
+ key: key
910
+ });
911
+ }
929
912
 
930
- if (type === _constants.menuType.divider) {
931
- return /*#__PURE__*/_react.default.createElement(_menu.default.Divider, {
932
- key: key
913
+ return null;
914
+ }),
915
+ onClick: function onClick(e) {
916
+ var key = e.key;
917
+ handleMenuClick({
918
+ key: key,
919
+ handleData: r
933
920
  });
934
921
  }
935
-
936
- return null;
937
- }));
922
+ });
938
923
  }
939
924
 
940
925
  function buildTree(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.12.52",
3
+ "version": "1.12.55",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -217,7 +217,7 @@
217
217
  "src/framework",
218
218
  "src/utils"
219
219
  ],
220
- "gitHead": "26df7155577e757965825d90b6ca833b3a1d9651",
220
+ "gitHead": "431b390f0b7c844674b27d8750702478ecb14b7f",
221
221
  "gitHooks": {
222
222
  "pre-commit": "lint-staged"
223
223
  }