wargerm 0.4.35 → 0.4.38

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  interface IsliderTabs {
4
- tabs: Array<string>;
4
+ tabs?: Array<string>;
5
+ renderTab?: ReactNode;
5
6
  direction: 'left' | 'right';
6
7
  defaultValue?: number;
7
8
  className?: string;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { TreeSelectProps as Props } from 'antd/lib/tree-select';
3
+ import { ReactNode } from 'react';
3
4
  interface TreeSelectProps<T> extends Props<T> {
4
5
  treeNodeLabelProp?: string;
5
6
  treeNodeValueProp?: string;
@@ -7,6 +8,7 @@ interface TreeSelectProps<T> extends Props<T> {
7
8
  request?: () => Promise<any>;
8
9
  onLoad?: (options: Record<string, any>[]) => void;
9
10
  params?: Record<string, any>;
11
+ children?: ReactNode;
10
12
  }
11
13
  export declare type IndexComponent = React.FC<TreeSelectProps<any>> & {
12
14
  TreeNode?: React.FC<any>;
@@ -42,6 +42,7 @@ export interface Isearch {
42
42
  hideResetBtn?: boolean;
43
43
  submitText?: string;
44
44
  hideSubmit?: boolean;
45
+ searchButtonConfig?: Record<string, any>;
45
46
  transform?: (value: any) => any;
46
47
  optionDomReverse?: boolean;
47
48
  optionRender?: ((searchConfig: any, formProps: any, dom: any) => ReactNode[]) | false;
package/dist/index.css CHANGED
@@ -14619,6 +14619,45 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
14619
14619
  transform: translate(-124px, -63px);
14620
14620
  padding: 12px 6px;
14621
14621
  }
14622
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs {
14623
+ position: absolute;
14624
+ }
14625
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.left {
14626
+ right: -22px;
14627
+ top: 80px;
14628
+ }
14629
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right {
14630
+ left: -22px;
14631
+ top: 80px;
14632
+ }
14633
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right .tab::before {
14634
+ transform: skewy(-45deg);
14635
+ }
14636
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab {
14637
+ -ms-writing-mode: tb-lr;
14638
+ writing-mode: vertical-lr;
14639
+ position: relative;
14640
+ margin-bottom: 2px;
14641
+ cursor: pointer;
14642
+ padding: 10px 2px;
14643
+ }
14644
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab::before {
14645
+ content: '';
14646
+ position: absolute;
14647
+ width: 100%;
14648
+ height: 100%;
14649
+ transform: skewy(45deg);
14650
+ left: 0;
14651
+ top: 0;
14652
+ background: rgba(81, 190, 246, 0.28);
14653
+ border: 2px solid #51bef6;
14654
+ transition: background 0.3s ease;
14655
+ z-index: -1;
14656
+ }
14657
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab.active::before {
14658
+ background: #51bef6;
14659
+ border: none;
14660
+ }
14622
14661
  [data-prefers-color='light'] .card-container .container-in::before {
14623
14662
  content: '';
14624
14663
  position: absolute;
@@ -14619,6 +14619,45 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
14619
14619
  transform: translate(-124px, -63px);
14620
14620
  padding: 12px 6px;
14621
14621
  }
14622
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs {
14623
+ position: absolute;
14624
+ }
14625
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.left {
14626
+ right: -22px;
14627
+ top: 80px;
14628
+ }
14629
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right {
14630
+ left: -22px;
14631
+ top: 80px;
14632
+ }
14633
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs.right .tab::before {
14634
+ transform: skewy(-45deg);
14635
+ }
14636
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab {
14637
+ -ms-writing-mode: tb-lr;
14638
+ writing-mode: vertical-lr;
14639
+ position: relative;
14640
+ margin-bottom: 2px;
14641
+ cursor: pointer;
14642
+ padding: 10px 2px;
14643
+ }
14644
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab::before {
14645
+ content: '';
14646
+ position: absolute;
14647
+ width: 100%;
14648
+ height: 100%;
14649
+ transform: skewy(45deg);
14650
+ left: 0;
14651
+ top: 0;
14652
+ background: rgba(81, 190, 246, 0.28);
14653
+ border: 2px solid #51bef6;
14654
+ transition: background 0.3s ease;
14655
+ z-index: -1;
14656
+ }
14657
+ [data-prefers-color='light'] .card-container .container-in .sliderTabs .tab.active::before {
14658
+ background: #51bef6;
14659
+ border: none;
14660
+ }
14622
14661
  [data-prefers-color='light'] .card-container .container-in::before {
14623
14662
  content: '';
14624
14663
  position: absolute;
package/dist/index.esm.js CHANGED
@@ -712,11 +712,11 @@ var WSelect = function WSelect(props) {
712
712
  case 6:
713
713
  setResList(res);
714
714
  onLoad && onLoad(res);
715
- node = res.map(function (item) {
715
+ node = res === null || res === void 0 ? void 0 : res.map(function (item) {
716
716
  return /*#__PURE__*/React.createElement(_Select.Option, {
717
717
  key: item.value,
718
718
  value: item.value
719
- }, item.label);
719
+ }, item.label) || /*#__PURE__*/React.createElement(React.Fragment, null);
720
720
  });
721
721
  setChildrenNode(node);
722
722
 
@@ -7854,9 +7854,9 @@ var WForm = function WForm(props, ref) {
7854
7854
  setchangedValues(changedValues);
7855
7855
  },
7856
7856
  form: form
7857
- }, extraProps), /*#__PURE__*/React.createElement(_Row, null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React.createElement(_Col, {
7857
+ }, extraProps), /*#__PURE__*/React.createElement(_Row, null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React.createElement(_Col, _objectSpread2({
7858
7858
  className: "pl20 pr20"
7859
- }, /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement("div", {
7859
+ }, search ? search === null || search === void 0 ? void 0 : search.searchButtonConfig : {}), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement("div", {
7860
7860
  style: {
7861
7861
  display: 'flex'
7862
7862
  }
@@ -8336,7 +8336,7 @@ function Table(_ref) {
8336
8336
 
8337
8337
  var current = obj.current,
8338
8338
  pageSize = obj.pageSize;
8339
- setDataSource(tableList ? tableList.slice((current - 1) * pageSize, current * pageSize) : []);
8339
+ setDataSource(tableList ? (tableList === null || tableList === void 0 ? void 0 : tableList.slice((current - 1) * pageSize, current * pageSize)) || [] : []);
8340
8340
  return obj;
8341
8341
  });
8342
8342
 
@@ -9518,7 +9518,7 @@ var Index$b = function Index(_ref) {
9518
9518
  var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9519
9519
 
9520
9520
  var Index$c = function Index(_ref, ref) {
9521
- var _classNames, _sliderTabs$component;
9521
+ var _classNames, _sliderTabs$component, _sliderTabs$tabs;
9522
9522
 
9523
9523
  var title = _ref.title,
9524
9524
  _ref$className = _ref.className,
@@ -9555,7 +9555,7 @@ var Index$c = function Index(_ref, ref) {
9555
9555
  className: "body"
9556
9556
  }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$component = sliderTabs.components) === null || _sliderTabs$component === void 0 ? void 0 : _sliderTabs$component[activeTab]) || props.children)), sliderTabs && /*#__PURE__*/React.createElement("div", {
9557
9557
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
9558
- }, sliderTabs.tabs.map(function (item, index) {
9558
+ }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab) ? sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab : sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$tabs = sliderTabs.tabs) === null || _sliderTabs$tabs === void 0 ? void 0 : _sliderTabs$tabs.map(function (item, index) {
9559
9559
  return /*#__PURE__*/React.createElement("div", {
9560
9560
  className: "tab ".concat(index == activeTab ? 'active' : '', " ").concat(sliderTabs.tabClassName || '', " ").concat(sliderTabs.activeTabClassName || '')
9561
9561
  }, /*#__PURE__*/React.createElement("span", {
package/dist/index.js CHANGED
@@ -771,11 +771,11 @@ var WSelect = function WSelect(props) {
771
771
  case 6:
772
772
  setResList(res);
773
773
  onLoad && onLoad(res);
774
- node = res.map(function (item) {
774
+ node = res === null || res === void 0 ? void 0 : res.map(function (item) {
775
775
  return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'].Option, {
776
776
  key: item.value,
777
777
  value: item.value
778
- }, item.label);
778
+ }, item.label) || /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
779
779
  });
780
780
  setChildrenNode(node);
781
781
 
@@ -7913,9 +7913,9 @@ var WForm = function WForm(props, ref) {
7913
7913
  setchangedValues(changedValues);
7914
7914
  },
7915
7915
  form: form
7916
- }, extraProps), /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], {
7916
+ }, extraProps), /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], _objectSpread2({
7917
7917
  className: "pl20 pr20"
7918
- }, /*#__PURE__*/React__default['default'].createElement(_Form__default['default'].Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
7918
+ }, search ? search === null || search === void 0 ? void 0 : search.searchButtonConfig : {}), /*#__PURE__*/React__default['default'].createElement(_Form__default['default'].Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
7919
7919
  style: {
7920
7920
  display: 'flex'
7921
7921
  }
@@ -8395,7 +8395,7 @@ function Table(_ref) {
8395
8395
 
8396
8396
  var current = obj.current,
8397
8397
  pageSize = obj.pageSize;
8398
- setDataSource(tableList ? tableList.slice((current - 1) * pageSize, current * pageSize) : []);
8398
+ setDataSource(tableList ? (tableList === null || tableList === void 0 ? void 0 : tableList.slice((current - 1) * pageSize, current * pageSize)) || [] : []);
8399
8399
  return obj;
8400
8400
  });
8401
8401
 
@@ -9577,7 +9577,7 @@ var Index$b = function Index(_ref) {
9577
9577
  var _excluded$d = ["title", "className", "headerTail", "headerCenter", "sliderTabs"];
9578
9578
 
9579
9579
  var Index$c = function Index(_ref, ref) {
9580
- var _classNames, _sliderTabs$component;
9580
+ var _classNames, _sliderTabs$component, _sliderTabs$tabs;
9581
9581
 
9582
9582
  var title = _ref.title,
9583
9583
  _ref$className = _ref.className,
@@ -9614,7 +9614,7 @@ var Index$c = function Index(_ref, ref) {
9614
9614
  className: "body"
9615
9615
  }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$component = sliderTabs.components) === null || _sliderTabs$component === void 0 ? void 0 : _sliderTabs$component[activeTab]) || props.children)), sliderTabs && /*#__PURE__*/React__default['default'].createElement("div", {
9616
9616
  className: "sliderTabs ".concat(sliderTabs.direction == 'left' ? "left ".concat(sliderTabs.className || '') : "right ".concat(sliderTabs.className || ''))
9617
- }, sliderTabs.tabs.map(function (item, index) {
9617
+ }, (sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab) ? sliderTabs === null || sliderTabs === void 0 ? void 0 : sliderTabs.renderTab : sliderTabs === null || sliderTabs === void 0 ? void 0 : (_sliderTabs$tabs = sliderTabs.tabs) === null || _sliderTabs$tabs === void 0 ? void 0 : _sliderTabs$tabs.map(function (item, index) {
9618
9618
  return /*#__PURE__*/React__default['default'].createElement("div", {
9619
9619
  className: "tab ".concat(index == activeTab ? 'active' : '', " ").concat(sliderTabs.tabClassName || '', " ").concat(sliderTabs.activeTabClassName || '')
9620
9620
  }, /*#__PURE__*/React__default['default'].createElement("span", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.4.35",
4
+ "version": "0.4.38",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",