aio-table 8.0.0 → 8.0.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.
Files changed (2) hide show
  1. package/index.js +31 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -112,7 +112,7 @@ class Table extends _react.Component {
112
112
  'Less Than': 'کوچکتر از',
113
113
  'and': 'و',
114
114
  'or': 'یا',
115
- 'add': 'افزودن',
115
+ 'Add': 'افزودن',
116
116
  'Inter Excel File Name': 'نام فایل اکسل را وارد کنید',
117
117
  'Sort By': 'مرتب سازی بر اساس',
118
118
  'Show Columns': 'نمایش ستون ها',
@@ -1039,6 +1039,7 @@ class TableUnit extends _react.Component {
1039
1039
  columns
1040
1040
  } = this.props;
1041
1041
  return /*#__PURE__*/_react.default.createElement(AIOTableFilterPopup, {
1042
+ title: column.title,
1042
1043
  translate: translate,
1043
1044
  type: type,
1044
1045
  items: items,
@@ -2011,6 +2012,17 @@ function FilterResult(items = [], booleanType = 'or', value, reverse) {
2011
2012
  return true;
2012
2013
  }
2013
2014
  class AIOTableFilterPopup extends _react.Component {
2015
+ title_layout() {
2016
+ let {
2017
+ title
2018
+ } = this.props;
2019
+ return {
2020
+ html: title,
2021
+ style: {
2022
+ padding: '0 6px'
2023
+ }
2024
+ };
2025
+ }
2014
2026
  items_layout() {
2015
2027
  let {
2016
2028
  items
@@ -2138,7 +2150,7 @@ class AIOTableFilterPopup extends _react.Component {
2138
2150
  style: {
2139
2151
  minWidth: 250
2140
2152
  },
2141
- column: [this.items_layout(), this.add_layout()]
2153
+ column: [this.title_layout(), this.items_layout(), this.add_layout()]
2142
2154
  }
2143
2155
  });
2144
2156
  }
@@ -2159,11 +2171,27 @@ class AIOfilterItem extends _react.Component {
2159
2171
  onChange,
2160
2172
  operator,
2161
2173
  operatorOptions,
2162
- add
2174
+ add,
2175
+ title
2163
2176
  } = this.props;
2164
2177
  if (add === false) {
2165
2178
  return false;
2166
2179
  }
2180
+ if (operatorOptions.filter(({
2181
+ show
2182
+ }) => show !== false).length === 1) {
2183
+ return {
2184
+ size: 90,
2185
+ html: /*#__PURE__*/_react.default.createElement(_aioButton.default, {
2186
+ style: {
2187
+ width: '100%'
2188
+ },
2189
+ type: "button",
2190
+ className: TableCLS.filterOperator,
2191
+ text: operator
2192
+ })
2193
+ };
2194
+ }
2167
2195
  return {
2168
2196
  size: 90,
2169
2197
  html: /*#__PURE__*/_react.default.createElement(_aioButton.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-table",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "all in one table. tree mode , simple mode , tree mode, gantt mode , groupby mode, freeze mode.",
5
5
  "main": "index.js",
6
6
  "scripts": {