aio-table 14.0.2 → 14.1.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 (3) hide show
  1. package/index.css +2 -2
  2. package/index.js +8 -12
  3. package/package.json +1 -1
package/index.css CHANGED
@@ -177,8 +177,8 @@
177
177
  }
178
178
 
179
179
  .aio-table-toolbar-button {
180
- width:3em;
181
- height: 3em;
180
+ width:2.6em;
181
+ height: 2.6em;
182
182
  display: flex;
183
183
  align-items: center;
184
184
  justify-content: center;
package/index.js CHANGED
@@ -284,20 +284,18 @@ const TableRows = () => {
284
284
  };
285
285
  const TableToolbar = ({ filterHook }) => {
286
286
  let { exportToExcel, search, rootProps, excelColumns, toggleColumns, sortHook, columns } = useProvider();
287
- let { toolbarAttrs, toolbar, onSearch, value, onChangeColumns, fa, filter, inlineSort } = rootProps;
287
+ let { toolbarAttrs, toolbar, onSearch, onChangeColumns, fa, filter, inlineSort } = rootProps;
288
288
  const columnsRef = useRef(columns);
289
289
  columnsRef.current = columns;
290
290
  toolbarAttrs = UT.AddToAttrs(toolbarAttrs, { className: 'aio-table-toolbar' });
291
291
  if (!toolbar && !onSearch && !sortHook.sorts.length && !excelColumns.length && !toggleColumns.length && !filter) {
292
292
  return null;
293
293
  }
294
- function getAddText() {
295
- let { addText } = rootProps;
296
- if (!rootProps.addText) {
297
- return new UT.GetSvg('em').getIcon('mdiPlusThick', 0.8);
298
- }
299
- return typeof addText === 'function' ? addText(value) : addText;
300
- }
294
+ // function getAddText() {
295
+ // let { addText } = rootProps;
296
+ // if (!rootProps.addText) { return new UT.GetSvg('em').getIcon('mdiPlusThick', 0.8) }
297
+ // return typeof addText === 'function' ? addText(value) : addText
298
+ // }
301
299
  return (_jsxs("div", Object.assign({}, toolbarAttrs, { children: [toolbar && _jsx("div", { className: 'aio-table-toolbar-content', children: typeof toolbar === 'function' ? toolbar() : toolbar }), !!filter && filterHook.renderButton(), !!onSearch && _jsx(AIOInput, { type: 'text', className: 'aio-table-search', onChange: (value) => search(value), after: new UT.GetSvg('em').getIcon('mdiMagnify', 0.7) }), !!sortHook.sorts.length && !inlineSort && sortHook.renderSortButton({ className: 'aio-table-toolbar-button aio-table-sort-button' }), !!excelColumns.length && _jsx("div", { className: 'aio-table-toolbar-button aio-table-excel-button', onClick: () => exportToExcel(), children: new UT.GetSvg('em').getIcon('mdiFileExcel', 0.8) }), !!toggleColumns.length &&
302
300
  _jsx(AISelect, { popover: {
303
301
  header: { title: fa ? 'نمایش ستون ها' : 'Show Columns', onClose: false },
@@ -344,7 +342,7 @@ const TableRow = (props) => {
344
342
  const { rowDetail } = props;
345
343
  const { row, rowIndex } = rowDetail;
346
344
  const rowId = row._id;
347
- let { rootProps, tableHook, columns } = useProvider();
345
+ let { tableHook, columns } = useProvider();
348
346
  function getCells() {
349
347
  return columns.map((column) => {
350
348
  const { show = true } = column;
@@ -772,8 +770,6 @@ const FilterContextProvider = (props) => _jsx(FilterContext.Provider, { value: p
772
770
  const useFilterContext = () => useContext(FilterContext);
773
771
  const useFilter = () => {
774
772
  const { rootProps } = useProvider();
775
- const { filter } = rootProps;
776
- const { onChange } = filter || {};
777
773
  const trans = (key) => {
778
774
  const { fa } = rootProps;
779
775
  const dic = {
@@ -1038,7 +1034,7 @@ const FilterRemoveIcon = () => new UT.GetSvg('em').getIcon('mdiClose', 0.6);
1038
1034
  const FilterActiveIcon = () => new UT.GetSvg('em').getIcon('mdiCheckBold', 0.6);
1039
1035
  const FilterAddIcon = () => new UT.GetSvg('em').getIcon('mdiPlusThick', 0.7);
1040
1036
  const useFilterData = (popup, trans) => {
1041
- const [activeName, setActiveName] = useState();
1037
+ const [activeName] = useState();
1042
1038
  const { filterColumns, rootProps } = useProvider();
1043
1039
  const { filter = {} } = rootProps;
1044
1040
  const [saves, setSaves] = useState([]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-table",
3
- "version": "14.0.2",
3
+ "version": "14.1.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
  "types": "index.d.ts",