@lanaco/lnc-react-ui 2.1.13 → 2.1.17
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.
- package/lib/index.esm.js +65 -240
- package/lib/index.js +65 -240
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -31313,7 +31313,9 @@ var Content$4 = newStyled.div(function (props) {
|
|
|
31313
31313
|
padding: "0.3125rem",
|
|
31314
31314
|
border: "0.065rem solid ".concat(props.theme.palette.gray[600]),
|
|
31315
31315
|
borderTop: props.basic ? "none" : "0.065rem solid ".concat(props.theme.palette.gray[600]),
|
|
31316
|
-
borderRadius: "0 0 0.2rem 0.2rem"
|
|
31316
|
+
borderRadius: "0 0 0.2rem 0.2rem",
|
|
31317
|
+
maxHeight: "calc(100vh - 220px)",
|
|
31318
|
+
overflowY: "auto"
|
|
31317
31319
|
};
|
|
31318
31320
|
});
|
|
31319
31321
|
|
|
@@ -49280,97 +49282,26 @@ var TableView = function TableView(props) {
|
|
|
49280
49282
|
OnHeaderClick = _props$Config$OnHeade === void 0 ? function () {} : _props$Config$OnHeade,
|
|
49281
49283
|
ReadOnly = _props$Config.ReadOnly,
|
|
49282
49284
|
_props$Config$IsLooku = _props$Config.IsLookup,
|
|
49283
|
-
IsLookup = _props$Config$IsLooku === void 0 ? false : _props$Config$IsLooku
|
|
49285
|
+
IsLookup = _props$Config$IsLooku === void 0 ? false : _props$Config$IsLooku,
|
|
49286
|
+
_props$Config$LookupT = _props$Config.LookupTakeItem,
|
|
49287
|
+
LookupTakeItem = _props$Config$LookupT === void 0 ? function () {} : _props$Config$LookupT;
|
|
49284
49288
|
var _props$Localization = props.Localization,
|
|
49285
49289
|
Localization = _props$Localization === void 0 ? {} : _props$Localization;
|
|
49286
49290
|
props.Export;
|
|
49287
49291
|
props.Icons;
|
|
49288
|
-
|
|
49289
|
-
// const [rowHoverIndex, setRowHoverIndex] = useState(-1);
|
|
49290
|
-
// const [rowSelectedIndices, setRowSelectedIndices] = useState([]);
|
|
49291
|
-
//======== FUNCTIONS ========
|
|
49292
|
+
//======== FUNCTIONS ========
|
|
49292
49293
|
|
|
49293
49294
|
function isFunction(functionToCheck) {
|
|
49294
49295
|
return functionToCheck && {}.toString.call(functionToCheck) === "[object Function]";
|
|
49295
49296
|
}
|
|
49296
49297
|
|
|
49297
49298
|
var handleOnSelection = function handleOnSelection(rowData, val) {
|
|
49298
|
-
// if (e.target.checked && rowIndex >= 0) {
|
|
49299
|
-
// if (SelectionType === TableSelectionType.MULTIPLE) {
|
|
49300
|
-
// let tmpArray = [...rowSelectedIndices];
|
|
49301
|
-
// tmpArray.push(rowIndex);
|
|
49302
|
-
// // setRowSelectedIndices(tmpArray);
|
|
49303
|
-
// } else if (SelectionType === TableSelectionType.SINGLE) {
|
|
49304
|
-
// // setRowSelectedIndices([rowIndex]);
|
|
49305
|
-
// }
|
|
49306
|
-
// } else if (!e.target.checked && rowIndex >= 0) {
|
|
49307
|
-
// if (SelectionType === TableSelectionType.MULTIPLE) {
|
|
49308
|
-
// let tmpArray = rowSelectedIndices.map((x) => x !== rowIndex);
|
|
49309
|
-
// // setRowSelectedIndices(tmpArray);
|
|
49310
|
-
// } else if (SelectionType === TableSelectionType.SINGLE) {
|
|
49311
|
-
// // setRowSelectedIndices([]);
|
|
49312
|
-
// }
|
|
49313
|
-
// }
|
|
49314
49299
|
OnSelection(rowData, val, SelectionType);
|
|
49315
49300
|
};
|
|
49316
49301
|
|
|
49317
49302
|
var handleSelectAll = function handleSelectAll(val) {
|
|
49318
49303
|
OnSelectAll(val);
|
|
49319
49304
|
}; //======== RENDER ========
|
|
49320
|
-
// const renderSelectionHeader = () => {
|
|
49321
|
-
// if (!EnableSelection || ReadOnly) return null;
|
|
49322
|
-
// if (props.accentColor) {
|
|
49323
|
-
// const style = {
|
|
49324
|
-
// backgroundColor: props.accentColor,
|
|
49325
|
-
// color: props.color
|
|
49326
|
-
// ? props.color
|
|
49327
|
-
// : isColorDark(props.accentColor)
|
|
49328
|
-
// ? "white"
|
|
49329
|
-
// : "black",
|
|
49330
|
-
// };
|
|
49331
|
-
// const styleForHover = {
|
|
49332
|
-
// backgroundColor: getDarkerColor(props.accentColor, 0.2),
|
|
49333
|
-
// color: props.color
|
|
49334
|
-
// ? props.color
|
|
49335
|
-
// : isColorDark(props.accentColor)
|
|
49336
|
-
// ? "white"
|
|
49337
|
-
// : "black",
|
|
49338
|
-
// };
|
|
49339
|
-
// return (
|
|
49340
|
-
// <th
|
|
49341
|
-
// className={mergeCSS([styles.header, styles.selectColumn])}
|
|
49342
|
-
// style={headerHoverIndex === 0 ? styleForHover : style}
|
|
49343
|
-
// onMouseEnter={() => setHeaderHoverIndex(0)}
|
|
49344
|
-
// onMouseLeave={() => setHeaderHoverIndex(-1)}
|
|
49345
|
-
// >
|
|
49346
|
-
// {renderSelectAll()}
|
|
49347
|
-
// </th>
|
|
49348
|
-
// );
|
|
49349
|
-
// }
|
|
49350
|
-
// return (
|
|
49351
|
-
// <th className={mergeCSS([styles.header, styles.selectColumn])}>
|
|
49352
|
-
// {renderSelectAll()}
|
|
49353
|
-
// </th>
|
|
49354
|
-
// );
|
|
49355
|
-
// };
|
|
49356
|
-
// const renderSelectAll = () => {
|
|
49357
|
-
// if (SelectionType === TableSelectionType.MULTIPLE) {
|
|
49358
|
-
// return (
|
|
49359
|
-
// <input
|
|
49360
|
-
// title={
|
|
49361
|
-
// SelectedEntirePage
|
|
49362
|
-
// ? Localization.DeselectAll
|
|
49363
|
-
// : Localization.SelectAll
|
|
49364
|
-
// }
|
|
49365
|
-
// type="checkbox"
|
|
49366
|
-
// checked={SelectedEntirePage}
|
|
49367
|
-
// onChange={(e) => OnSelectAll(e.target.checked)}
|
|
49368
|
-
// className={styles.pointer}
|
|
49369
|
-
// ></input>
|
|
49370
|
-
// );
|
|
49371
|
-
// }
|
|
49372
|
-
// return null;
|
|
49373
|
-
// };
|
|
49374
49305
|
|
|
49375
49306
|
|
|
49376
49307
|
var isItemInArray = function isItemInArray(item, array, byProp) {
|
|
@@ -49378,33 +49309,7 @@ var TableView = function TableView(props) {
|
|
|
49378
49309
|
return x[byProp] === item[byProp];
|
|
49379
49310
|
}));
|
|
49380
49311
|
return array.indexOf(item) > -1;
|
|
49381
|
-
};
|
|
49382
|
-
// if (EnableSelection && !ReadOnly) {
|
|
49383
|
-
// return (
|
|
49384
|
-
// <td
|
|
49385
|
-
// className={mergeCSS([styles.specialRenderCell, styles.selectColumn])}
|
|
49386
|
-
// >
|
|
49387
|
-
// <input
|
|
49388
|
-
// type="checkbox"
|
|
49389
|
-
// checked={isItemInArray(rowData, SelectedData, SelectionIndicator)}
|
|
49390
|
-
// onChange={(e) => handleOnSelection(rowData, e, rowIndex)}
|
|
49391
|
-
// className={styles.pointer}
|
|
49392
|
-
// ></input>
|
|
49393
|
-
// </td>
|
|
49394
|
-
// );
|
|
49395
|
-
// } else return <></>;
|
|
49396
|
-
// };
|
|
49397
|
-
// const renderHeader = () => {
|
|
49398
|
-
// return (
|
|
49399
|
-
// <tr>
|
|
49400
|
-
// {renderSelectionHeader()}
|
|
49401
|
-
// {Columns.filter((x) => x.hide !== true).map((def, i) =>
|
|
49402
|
-
// renderHeaderCell(def, i)
|
|
49403
|
-
// )}
|
|
49404
|
-
// </tr>
|
|
49405
|
-
// );
|
|
49406
|
-
// };
|
|
49407
|
-
|
|
49312
|
+
};
|
|
49408
49313
|
|
|
49409
49314
|
var renderBody = function renderBody() {
|
|
49410
49315
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, Data.map(function (dataItem, i) {
|
|
@@ -49425,42 +49330,24 @@ var TableView = function TableView(props) {
|
|
|
49425
49330
|
}).map(function (col, j) {
|
|
49426
49331
|
return renderBodyCell(dataItem, col, i, j);
|
|
49427
49332
|
})));
|
|
49428
|
-
};
|
|
49429
|
-
// let onClick = !isFunction(def.specialRender)
|
|
49430
|
-
// ? () => {
|
|
49431
|
-
// ChangeToFormView(rowData);
|
|
49432
|
-
// }
|
|
49433
|
-
// : () => {};
|
|
49434
|
-
// if (!EnableFormView) onClick = () => {};
|
|
49435
|
-
// if (!EnableFormView && EnableSelection) {
|
|
49436
|
-
// var checked = isItemInArray(rowData, SelectedData, SelectionIndicator);
|
|
49437
|
-
// onClick = () =>
|
|
49438
|
-
// handleOnSelection(rowData, { target: { checked: !checked } });
|
|
49439
|
-
// }
|
|
49440
|
-
// let cellData =
|
|
49441
|
-
// def.isObject === true
|
|
49442
|
-
// ? rowData[def.accessor][def.objectAccessor]
|
|
49443
|
-
// : rowData[def.accessor];
|
|
49444
|
-
// return (
|
|
49445
|
-
// <td key={key} className={styles.cell} onClick={onClick}>
|
|
49446
|
-
// {isFunction(def.specialRender) ? def.specialRender(rowData) : cellData}
|
|
49447
|
-
// </td>
|
|
49448
|
-
// );
|
|
49449
|
-
// };
|
|
49450
|
-
|
|
49333
|
+
};
|
|
49451
49334
|
|
|
49452
49335
|
var renderBodyCell = function renderBodyCell(dataItem, def, rowIndex, cellIndex) {
|
|
49453
49336
|
var tabIndex = rowIndex * Columns.length + cellIndex + 50;
|
|
49454
49337
|
var onClick = !isFunction(def.specialRender) ? function () {
|
|
49455
49338
|
ChangeToFormView(dataItem);
|
|
49456
49339
|
} : function () {};
|
|
49457
|
-
if (!EnableFormView) onClick = function onClick() {};
|
|
49458
|
-
|
|
49459
|
-
|
|
49460
|
-
|
|
49461
|
-
|
|
49340
|
+
if (!EnableFormView) onClick = function onClick() {};
|
|
49341
|
+
if (!EnableSelection || ReadOnly) onClick = function onClick() {};
|
|
49342
|
+
|
|
49343
|
+
if (IsLookup) {
|
|
49344
|
+
onClick = function onClick() {
|
|
49345
|
+
if (!IsLoading) {
|
|
49346
|
+
LookupTakeItem(dataItem);
|
|
49347
|
+
}
|
|
49348
|
+
};
|
|
49349
|
+
}
|
|
49462
49350
|
|
|
49463
|
-
if (!EnableSelection || ReadOnly || IsLookup && SelectionType === TableSelectionType.SINGLE) onClick = function onClick() {};
|
|
49464
49351
|
var cellData = def.isObject === true ? dataItem[def.accessor][def.objectAccessor] : dataItem[def.accessor];
|
|
49465
49352
|
return /*#__PURE__*/React__default.createElement(TableBodyCell$1, {
|
|
49466
49353
|
key: tabIndex,
|
|
@@ -49469,7 +49356,22 @@ var TableView = function TableView(props) {
|
|
|
49469
49356
|
};
|
|
49470
49357
|
|
|
49471
49358
|
var renderSelectionCell = function renderSelectionCell(dataItem, selected, rowIndex) {
|
|
49472
|
-
if (
|
|
49359
|
+
if (IsLookup) {
|
|
49360
|
+
return /*#__PURE__*/React__default.createElement(TableBodyCell$1, {
|
|
49361
|
+
selectionCell: true,
|
|
49362
|
+
key: -1
|
|
49363
|
+
}, /*#__PURE__*/React__default.createElement(Button$1, {
|
|
49364
|
+
inverted: true,
|
|
49365
|
+
onClick: function onClick() {
|
|
49366
|
+
if (!IsLoading) {
|
|
49367
|
+
LookupTakeItem(dataItem);
|
|
49368
|
+
}
|
|
49369
|
+
},
|
|
49370
|
+
icon: "arrow-right"
|
|
49371
|
+
}));
|
|
49372
|
+
}
|
|
49373
|
+
|
|
49374
|
+
if (!EnableSelection || ReadOnly || IsLookup) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
49473
49375
|
return /*#__PURE__*/React__default.createElement(TableBodyCell$1, {
|
|
49474
49376
|
selectionCell: true,
|
|
49475
49377
|
key: -1
|
|
@@ -49480,60 +49382,7 @@ var TableView = function TableView(props) {
|
|
|
49480
49382
|
},
|
|
49481
49383
|
id: rowIndex
|
|
49482
49384
|
}));
|
|
49483
|
-
};
|
|
49484
|
-
// let evenOddClass = key % 2 === 0 ? styles.tableRowEven : styles.tableRowOdd;
|
|
49485
|
-
// let selectionClass = isItemInArray(
|
|
49486
|
-
// rowData,
|
|
49487
|
-
// SelectedData,
|
|
49488
|
-
// SelectionIndicator
|
|
49489
|
-
// )
|
|
49490
|
-
// ? styles.checkedRow
|
|
49491
|
-
// : "";
|
|
49492
|
-
// if (props.accentColor) {
|
|
49493
|
-
// const style = {
|
|
49494
|
-
// border: "0px",
|
|
49495
|
-
// backgroundColor: key % 2 === 0 ? "white" : "whitesmoke",
|
|
49496
|
-
// borderLeft: "1px solid transparent",
|
|
49497
|
-
// borderRight: "1px solid transparent",
|
|
49498
|
-
// borderTop: "1px solid transparent",
|
|
49499
|
-
// };
|
|
49500
|
-
// const styleForHover = {
|
|
49501
|
-
// border: "1px solid " + getLighterColor(props.accentColor, 0.75),
|
|
49502
|
-
// backgroundColor: key % 2 === 0 ? "white" : "whitesmoke",
|
|
49503
|
-
// };
|
|
49504
|
-
// const styleForSelect = {
|
|
49505
|
-
// backgroundColor: getLighterColor(props.accentColor, 0.75),
|
|
49506
|
-
// };
|
|
49507
|
-
// return (
|
|
49508
|
-
// <tr
|
|
49509
|
-
// key={key}
|
|
49510
|
-
// style={
|
|
49511
|
-
// rowSelectedIndices.includes(key)
|
|
49512
|
-
// ? styleForSelect
|
|
49513
|
-
// : rowHoverIndex === key
|
|
49514
|
-
// ? styleForHover
|
|
49515
|
-
// : style
|
|
49516
|
-
// }
|
|
49517
|
-
// onMouseEnter={() => setRowHoverIndex(key)}
|
|
49518
|
-
// onMouseLeave={() => setRowHoverIndex(-1)}
|
|
49519
|
-
// >
|
|
49520
|
-
// {renderSelectionCheckbox(rowData, key)}
|
|
49521
|
-
// {Columns.filter((x) => x.hide !== true).map((def, i) =>
|
|
49522
|
-
// renderCell(rowData, def, i)
|
|
49523
|
-
// )}
|
|
49524
|
-
// </tr>
|
|
49525
|
-
// );
|
|
49526
|
-
// }
|
|
49527
|
-
// return (
|
|
49528
|
-
// <tr key={key} className={evenOddClass + " " + selectionClass}>
|
|
49529
|
-
// {renderSelectionCheckbox(rowData)}
|
|
49530
|
-
// {Columns.filter((x) => x.hide !== true).map((def, i) =>
|
|
49531
|
-
// renderCell(rowData, def, i)
|
|
49532
|
-
// )}
|
|
49533
|
-
// </tr>
|
|
49534
|
-
// );
|
|
49535
|
-
// };
|
|
49536
|
-
|
|
49385
|
+
};
|
|
49537
49386
|
|
|
49538
49387
|
var renderHeaderCell = function renderHeaderCell(def, i) {
|
|
49539
49388
|
var headerClick = function headerClick() {};
|
|
@@ -49569,6 +49418,10 @@ var TableView = function TableView(props) {
|
|
|
49569
49418
|
};
|
|
49570
49419
|
|
|
49571
49420
|
var renderSelectAllHeaderCell = function renderSelectAllHeaderCell() {
|
|
49421
|
+
if (IsLookup) return /*#__PURE__*/React__default.createElement(TableHeadCell$1, {
|
|
49422
|
+
selectionCell: true,
|
|
49423
|
+
key: -1
|
|
49424
|
+
});
|
|
49572
49425
|
if (!EnableSelection || ReadOnly || IsLookup && SelectionType === TableSelectionType.SINGLE) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
49573
49426
|
if (SelectedEntirePage && Localization.DeselectAll) ;
|
|
49574
49427
|
if (!SelectedEntirePage && Localization.SelectAll) ;
|
|
@@ -49590,17 +49443,7 @@ var TableView = function TableView(props) {
|
|
|
49590
49443
|
return x.hide !== true;
|
|
49591
49444
|
}).map(function (col, i) {
|
|
49592
49445
|
return renderHeaderCell(col, i);
|
|
49593
|
-
}))), /*#__PURE__*/React__default.createElement(TableBody$1, null, renderBody()))));
|
|
49594
|
-
// <div>
|
|
49595
|
-
// <div className={styles.tableDiv}>
|
|
49596
|
-
// <table className={styles.table}>
|
|
49597
|
-
// <thead>{renderHeader()}</thead>
|
|
49598
|
-
// <tbody>{renderBody()}</tbody>
|
|
49599
|
-
// </table>
|
|
49600
|
-
// </div>
|
|
49601
|
-
// <div>{renderPagination()}</div>
|
|
49602
|
-
// </div>
|
|
49603
|
-
// );
|
|
49446
|
+
}))), /*#__PURE__*/React__default.createElement(TableBody$1, null, renderBody()))));
|
|
49604
49447
|
};
|
|
49605
49448
|
|
|
49606
49449
|
var _templateObject$e, _templateObject2$a;
|
|
@@ -49686,7 +49529,7 @@ var Container$c = newStyled.div(_templateObject$d || (_templateObject$d = _tagge
|
|
|
49686
49529
|
});
|
|
49687
49530
|
var TableContainer$1 = newStyled.div(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteral(["\n font-family: var(--font-base-ubuntu);\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n"])));
|
|
49688
49531
|
var PaginationContainer$1 = newStyled.div(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteral(["\n border-top: 1px solid #80808025;\n"])));
|
|
49689
|
-
var FormContainer$2 = newStyled.div(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteral(["\n height: 100%;\n overflow-y: auto;\n max-height: calc(100vh - 120px);\n border-radius: 3px;\n\n ", "\n"])), function (props) {
|
|
49532
|
+
var FormContainer$2 = newStyled.div(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteral(["\n height: 100%;\n // overflow-y: auto;\n // max-height: calc(100vh - 120px);\n border-radius: 3px;\n\n ", "\n"])), function (props) {
|
|
49690
49533
|
return getBorderSyle$1(props.borderStyle, props.read, props.theme, props.color);
|
|
49691
49534
|
});
|
|
49692
49535
|
var HeaderContainer$1 = newStyled.div(_templateObject5$7 || (_templateObject5$7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: left;\n align-items: center;\n padding: 4px 0;\n border-radius: 3px;\n font-size: 12px;\n font-family: \"Ubuntu\";\n"])));
|
|
@@ -49746,12 +49589,10 @@ var DataView = function DataView(props) {
|
|
|
49746
49589
|
GoToAdd = _props$GoToAdd === void 0 ? emptyFunc : _props$GoToAdd;
|
|
49747
49590
|
props.GoToAddWithCopy;
|
|
49748
49591
|
var _props$DiscardEdited = props.DiscardEdited,
|
|
49749
|
-
DiscardEdited = _props$DiscardEdited === void 0 ? emptyFunc : _props$DiscardEdited
|
|
49750
|
-
|
|
49751
|
-
|
|
49752
|
-
_props$
|
|
49753
|
-
ClearSelectedData = _props$ClearSelectedD === void 0 ? emptyFunc : _props$ClearSelectedD,
|
|
49754
|
-
_props$Localization = props.Localization,
|
|
49592
|
+
DiscardEdited = _props$DiscardEdited === void 0 ? emptyFunc : _props$DiscardEdited;
|
|
49593
|
+
props.SetSelectedData;
|
|
49594
|
+
props.ClearSelectedData;
|
|
49595
|
+
var _props$Localization = props.Localization,
|
|
49755
49596
|
Localization = _props$Localization === void 0 ? {} : _props$Localization,
|
|
49756
49597
|
_props$Export = props.Export,
|
|
49757
49598
|
Export = _props$Export === void 0 ? function () {} : _props$Export,
|
|
@@ -49827,15 +49668,15 @@ var DataView = function DataView(props) {
|
|
|
49827
49668
|
size: size,
|
|
49828
49669
|
color: color
|
|
49829
49670
|
}; //======== LOOKUP ========
|
|
49830
|
-
|
|
49831
|
-
|
|
49832
|
-
|
|
49833
|
-
|
|
49834
|
-
|
|
49835
|
-
|
|
49836
|
-
|
|
49837
|
-
|
|
49838
|
-
|
|
49671
|
+
// useEffect(() => {
|
|
49672
|
+
// if (General.IsLookup) SetSelectedData(Lookup.SelectedData);
|
|
49673
|
+
// }, [Lookup.SelectedData]);
|
|
49674
|
+
// useEffect(() => {
|
|
49675
|
+
// return function cleanup() {
|
|
49676
|
+
// if (General.IsLookup) ClearSelectedData();
|
|
49677
|
+
// };
|
|
49678
|
+
// }, []);
|
|
49679
|
+
//======== CONFIGS ========
|
|
49839
49680
|
|
|
49840
49681
|
var formViewMovementConfig = {
|
|
49841
49682
|
Dirty: Form.Dirty,
|
|
@@ -49867,6 +49708,9 @@ var DataView = function DataView(props) {
|
|
|
49867
49708
|
SelectedData: Table.SelectedData,
|
|
49868
49709
|
ChangeToFormView: ChangeToFormView,
|
|
49869
49710
|
//---------------------------
|
|
49711
|
+
IsLookup: General.IsLookup,
|
|
49712
|
+
LookupTakeItem: Lookup.LookupTakeItem ? Lookup.LookupTakeItem : function () {},
|
|
49713
|
+
//---------------------------
|
|
49870
49714
|
EnableOrdering: Options.EnableOrdering,
|
|
49871
49715
|
Column: Ordering.Column,
|
|
49872
49716
|
Accessor: Ordering.Accessor,
|
|
@@ -49897,27 +49741,6 @@ var DataView = function DataView(props) {
|
|
|
49897
49741
|
if (Form.Mode === FormMode.ADD) return "add";
|
|
49898
49742
|
}; //======== RENDER ========
|
|
49899
49743
|
|
|
49900
|
-
|
|
49901
|
-
var renderLookupTakeValues = function renderLookupTakeValues() {
|
|
49902
|
-
if (General.IsLookup) {
|
|
49903
|
-
var loading = freezeLoading([Table.SelectedData.length === 0]);
|
|
49904
|
-
return /*#__PURE__*/React__default.createElement(FlexItem$1, null, /*#__PURE__*/React__default.createElement(Button$1, {
|
|
49905
|
-
tooltip: Localization.TakeValues,
|
|
49906
|
-
onClick: function onClick() {
|
|
49907
|
-
if (!loading) {
|
|
49908
|
-
Lookup.TakeValues(Table.SelectedData);
|
|
49909
|
-
if (ClearSelectedData) ClearSelectedData();
|
|
49910
|
-
}
|
|
49911
|
-
},
|
|
49912
|
-
disabled: Table.SelectedData.length === 0,
|
|
49913
|
-
icon: "arrow-circle-down",
|
|
49914
|
-
inverted: true
|
|
49915
|
-
}));
|
|
49916
|
-
}
|
|
49917
|
-
|
|
49918
|
-
return false;
|
|
49919
|
-
};
|
|
49920
|
-
|
|
49921
49744
|
var renderContextMenu = function renderContextMenu() {
|
|
49922
49745
|
if (Options.EnableActions && General.CurrentView === ViewType.TABLE_VIEW && Table.Actions && Table.Actions.length > 0) {
|
|
49923
49746
|
return /*#__PURE__*/React__default.createElement(FlexItem$1, null, /*#__PURE__*/React__default.createElement(DropdownMenu, {
|
|
@@ -50017,7 +49840,7 @@ var DataView = function DataView(props) {
|
|
|
50017
49840
|
|
|
50018
49841
|
var renderSpinner = function renderSpinner() {
|
|
50019
49842
|
if (!General.IsLoading) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
50020
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(LoaderContainer$1, null), /*#__PURE__*/React__default.createElement(LoaderContainerTransparent$1, null, /*#__PURE__*/React__default.createElement(Loader$1, null, Table.Data.length > 2 ? /*#__PURE__*/React__default.createElement(Spinner, null) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null))));
|
|
49843
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(LoaderContainer$1, null), /*#__PURE__*/React__default.createElement(LoaderContainerTransparent$1, null, /*#__PURE__*/React__default.createElement(Loader$1, null, Table.Data !== null && Table.Data.length > 2 ? /*#__PURE__*/React__default.createElement(Spinner, null) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null))));
|
|
50021
49844
|
};
|
|
50022
49845
|
|
|
50023
49846
|
var renderFiltering = function renderFiltering() {
|
|
@@ -50043,7 +49866,7 @@ var DataView = function DataView(props) {
|
|
|
50043
49866
|
var x6 = General.CurrentView !== "TableView" ? false : true;
|
|
50044
49867
|
var x7 = General.IsLookup && Table.SelectionType === "multiple" ? true : false;
|
|
50045
49868
|
var x8 = Options.EnableActions && General.CurrentView === ViewType.TABLE_VIEW && Table.Actions && Table.Actions.length > 0;
|
|
50046
|
-
if (x1 || x2 || x3 || x4 || x5 || x6 || x7 || x8) return /*#__PURE__*/React__default.createElement(HeaderContainer$1, null, renderChangeToTableView(), renderDeleteSelectedButton(), renderGoToAddButton(), renderFormViewMovement(), renderSwitchToEditModeButton(), renderRefreshButton(),
|
|
49869
|
+
if (x1 || x2 || x3 || x4 || x5 || x6 || x7 || x8) return /*#__PURE__*/React__default.createElement(HeaderContainer$1, null, renderChangeToTableView(), renderDeleteSelectedButton(), renderGoToAddButton(), renderFormViewMovement(), renderSwitchToEditModeButton(), renderRefreshButton(), renderContextMenu());
|
|
50047
49870
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
50048
49871
|
};
|
|
50049
49872
|
|
|
@@ -52902,9 +52725,11 @@ Alet.defaultProps = {
|
|
|
52902
52725
|
size: "small",
|
|
52903
52726
|
theme: theme,
|
|
52904
52727
|
color: "primary",
|
|
52905
|
-
hasContainer: true
|
|
52728
|
+
hasContainer: true,
|
|
52729
|
+
message: ""
|
|
52906
52730
|
};
|
|
52907
52731
|
Alet.propTypes = {
|
|
52732
|
+
message: PropTypes.string,
|
|
52908
52733
|
theme: PropTypes.object.isRequired,
|
|
52909
52734
|
className: PropTypes.string,
|
|
52910
52735
|
hasContainer: PropTypes.bool,
|
|
@@ -53047,7 +52872,7 @@ var Container$2 = newStyled.span(function (props) {
|
|
|
53047
52872
|
display: "none"
|
|
53048
52873
|
},
|
|
53049
52874
|
"& .react-datepicker-wrapper": {
|
|
53050
|
-
width: "
|
|
52875
|
+
width: "25%",
|
|
53051
52876
|
boxSizing: "border-box"
|
|
53052
52877
|
},
|
|
53053
52878
|
"& input": {
|
|
@@ -53189,7 +53014,7 @@ var PeriodSelector = function PeriodSelector(props) {
|
|
|
53189
53014
|
dateFormat: dateFormat ? dateFormat : "dd.MM.yyyy.",
|
|
53190
53015
|
disabled: disabled,
|
|
53191
53016
|
className: className
|
|
53192
|
-
}),
|
|
53017
|
+
}), " ", /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
53193
53018
|
selected: getEndDate(),
|
|
53194
53019
|
onChange: handleOnEndDateChange,
|
|
53195
53020
|
dateFormat: dateFormat ? dateFormat : "dd.MM.yyyy.",
|
package/lib/index.js
CHANGED
|
@@ -31354,7 +31354,9 @@ var Content$4 = newStyled.div(function (props) {
|
|
|
31354
31354
|
padding: "0.3125rem",
|
|
31355
31355
|
border: "0.065rem solid ".concat(props.theme.palette.gray[600]),
|
|
31356
31356
|
borderTop: props.basic ? "none" : "0.065rem solid ".concat(props.theme.palette.gray[600]),
|
|
31357
|
-
borderRadius: "0 0 0.2rem 0.2rem"
|
|
31357
|
+
borderRadius: "0 0 0.2rem 0.2rem",
|
|
31358
|
+
maxHeight: "calc(100vh - 220px)",
|
|
31359
|
+
overflowY: "auto"
|
|
31358
31360
|
};
|
|
31359
31361
|
});
|
|
31360
31362
|
|
|
@@ -49321,97 +49323,26 @@ var TableView = function TableView(props) {
|
|
|
49321
49323
|
OnHeaderClick = _props$Config$OnHeade === void 0 ? function () {} : _props$Config$OnHeade,
|
|
49322
49324
|
ReadOnly = _props$Config.ReadOnly,
|
|
49323
49325
|
_props$Config$IsLooku = _props$Config.IsLookup,
|
|
49324
|
-
IsLookup = _props$Config$IsLooku === void 0 ? false : _props$Config$IsLooku
|
|
49326
|
+
IsLookup = _props$Config$IsLooku === void 0 ? false : _props$Config$IsLooku,
|
|
49327
|
+
_props$Config$LookupT = _props$Config.LookupTakeItem,
|
|
49328
|
+
LookupTakeItem = _props$Config$LookupT === void 0 ? function () {} : _props$Config$LookupT;
|
|
49325
49329
|
var _props$Localization = props.Localization,
|
|
49326
49330
|
Localization = _props$Localization === void 0 ? {} : _props$Localization;
|
|
49327
49331
|
props.Export;
|
|
49328
49332
|
props.Icons;
|
|
49329
|
-
|
|
49330
|
-
// const [rowHoverIndex, setRowHoverIndex] = useState(-1);
|
|
49331
|
-
// const [rowSelectedIndices, setRowSelectedIndices] = useState([]);
|
|
49332
|
-
//======== FUNCTIONS ========
|
|
49333
|
+
//======== FUNCTIONS ========
|
|
49333
49334
|
|
|
49334
49335
|
function isFunction(functionToCheck) {
|
|
49335
49336
|
return functionToCheck && {}.toString.call(functionToCheck) === "[object Function]";
|
|
49336
49337
|
}
|
|
49337
49338
|
|
|
49338
49339
|
var handleOnSelection = function handleOnSelection(rowData, val) {
|
|
49339
|
-
// if (e.target.checked && rowIndex >= 0) {
|
|
49340
|
-
// if (SelectionType === TableSelectionType.MULTIPLE) {
|
|
49341
|
-
// let tmpArray = [...rowSelectedIndices];
|
|
49342
|
-
// tmpArray.push(rowIndex);
|
|
49343
|
-
// // setRowSelectedIndices(tmpArray);
|
|
49344
|
-
// } else if (SelectionType === TableSelectionType.SINGLE) {
|
|
49345
|
-
// // setRowSelectedIndices([rowIndex]);
|
|
49346
|
-
// }
|
|
49347
|
-
// } else if (!e.target.checked && rowIndex >= 0) {
|
|
49348
|
-
// if (SelectionType === TableSelectionType.MULTIPLE) {
|
|
49349
|
-
// let tmpArray = rowSelectedIndices.map((x) => x !== rowIndex);
|
|
49350
|
-
// // setRowSelectedIndices(tmpArray);
|
|
49351
|
-
// } else if (SelectionType === TableSelectionType.SINGLE) {
|
|
49352
|
-
// // setRowSelectedIndices([]);
|
|
49353
|
-
// }
|
|
49354
|
-
// }
|
|
49355
49340
|
OnSelection(rowData, val, SelectionType);
|
|
49356
49341
|
};
|
|
49357
49342
|
|
|
49358
49343
|
var handleSelectAll = function handleSelectAll(val) {
|
|
49359
49344
|
OnSelectAll(val);
|
|
49360
49345
|
}; //======== RENDER ========
|
|
49361
|
-
// const renderSelectionHeader = () => {
|
|
49362
|
-
// if (!EnableSelection || ReadOnly) return null;
|
|
49363
|
-
// if (props.accentColor) {
|
|
49364
|
-
// const style = {
|
|
49365
|
-
// backgroundColor: props.accentColor,
|
|
49366
|
-
// color: props.color
|
|
49367
|
-
// ? props.color
|
|
49368
|
-
// : isColorDark(props.accentColor)
|
|
49369
|
-
// ? "white"
|
|
49370
|
-
// : "black",
|
|
49371
|
-
// };
|
|
49372
|
-
// const styleForHover = {
|
|
49373
|
-
// backgroundColor: getDarkerColor(props.accentColor, 0.2),
|
|
49374
|
-
// color: props.color
|
|
49375
|
-
// ? props.color
|
|
49376
|
-
// : isColorDark(props.accentColor)
|
|
49377
|
-
// ? "white"
|
|
49378
|
-
// : "black",
|
|
49379
|
-
// };
|
|
49380
|
-
// return (
|
|
49381
|
-
// <th
|
|
49382
|
-
// className={mergeCSS([styles.header, styles.selectColumn])}
|
|
49383
|
-
// style={headerHoverIndex === 0 ? styleForHover : style}
|
|
49384
|
-
// onMouseEnter={() => setHeaderHoverIndex(0)}
|
|
49385
|
-
// onMouseLeave={() => setHeaderHoverIndex(-1)}
|
|
49386
|
-
// >
|
|
49387
|
-
// {renderSelectAll()}
|
|
49388
|
-
// </th>
|
|
49389
|
-
// );
|
|
49390
|
-
// }
|
|
49391
|
-
// return (
|
|
49392
|
-
// <th className={mergeCSS([styles.header, styles.selectColumn])}>
|
|
49393
|
-
// {renderSelectAll()}
|
|
49394
|
-
// </th>
|
|
49395
|
-
// );
|
|
49396
|
-
// };
|
|
49397
|
-
// const renderSelectAll = () => {
|
|
49398
|
-
// if (SelectionType === TableSelectionType.MULTIPLE) {
|
|
49399
|
-
// return (
|
|
49400
|
-
// <input
|
|
49401
|
-
// title={
|
|
49402
|
-
// SelectedEntirePage
|
|
49403
|
-
// ? Localization.DeselectAll
|
|
49404
|
-
// : Localization.SelectAll
|
|
49405
|
-
// }
|
|
49406
|
-
// type="checkbox"
|
|
49407
|
-
// checked={SelectedEntirePage}
|
|
49408
|
-
// onChange={(e) => OnSelectAll(e.target.checked)}
|
|
49409
|
-
// className={styles.pointer}
|
|
49410
|
-
// ></input>
|
|
49411
|
-
// );
|
|
49412
|
-
// }
|
|
49413
|
-
// return null;
|
|
49414
|
-
// };
|
|
49415
49346
|
|
|
49416
49347
|
|
|
49417
49348
|
var isItemInArray = function isItemInArray(item, array, byProp) {
|
|
@@ -49419,33 +49350,7 @@ var TableView = function TableView(props) {
|
|
|
49419
49350
|
return x[byProp] === item[byProp];
|
|
49420
49351
|
}));
|
|
49421
49352
|
return array.indexOf(item) > -1;
|
|
49422
|
-
};
|
|
49423
|
-
// if (EnableSelection && !ReadOnly) {
|
|
49424
|
-
// return (
|
|
49425
|
-
// <td
|
|
49426
|
-
// className={mergeCSS([styles.specialRenderCell, styles.selectColumn])}
|
|
49427
|
-
// >
|
|
49428
|
-
// <input
|
|
49429
|
-
// type="checkbox"
|
|
49430
|
-
// checked={isItemInArray(rowData, SelectedData, SelectionIndicator)}
|
|
49431
|
-
// onChange={(e) => handleOnSelection(rowData, e, rowIndex)}
|
|
49432
|
-
// className={styles.pointer}
|
|
49433
|
-
// ></input>
|
|
49434
|
-
// </td>
|
|
49435
|
-
// );
|
|
49436
|
-
// } else return <></>;
|
|
49437
|
-
// };
|
|
49438
|
-
// const renderHeader = () => {
|
|
49439
|
-
// return (
|
|
49440
|
-
// <tr>
|
|
49441
|
-
// {renderSelectionHeader()}
|
|
49442
|
-
// {Columns.filter((x) => x.hide !== true).map((def, i) =>
|
|
49443
|
-
// renderHeaderCell(def, i)
|
|
49444
|
-
// )}
|
|
49445
|
-
// </tr>
|
|
49446
|
-
// );
|
|
49447
|
-
// };
|
|
49448
|
-
|
|
49353
|
+
};
|
|
49449
49354
|
|
|
49450
49355
|
var renderBody = function renderBody() {
|
|
49451
49356
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, Data.map(function (dataItem, i) {
|
|
@@ -49466,42 +49371,24 @@ var TableView = function TableView(props) {
|
|
|
49466
49371
|
}).map(function (col, j) {
|
|
49467
49372
|
return renderBodyCell(dataItem, col, i, j);
|
|
49468
49373
|
})));
|
|
49469
|
-
};
|
|
49470
|
-
// let onClick = !isFunction(def.specialRender)
|
|
49471
|
-
// ? () => {
|
|
49472
|
-
// ChangeToFormView(rowData);
|
|
49473
|
-
// }
|
|
49474
|
-
// : () => {};
|
|
49475
|
-
// if (!EnableFormView) onClick = () => {};
|
|
49476
|
-
// if (!EnableFormView && EnableSelection) {
|
|
49477
|
-
// var checked = isItemInArray(rowData, SelectedData, SelectionIndicator);
|
|
49478
|
-
// onClick = () =>
|
|
49479
|
-
// handleOnSelection(rowData, { target: { checked: !checked } });
|
|
49480
|
-
// }
|
|
49481
|
-
// let cellData =
|
|
49482
|
-
// def.isObject === true
|
|
49483
|
-
// ? rowData[def.accessor][def.objectAccessor]
|
|
49484
|
-
// : rowData[def.accessor];
|
|
49485
|
-
// return (
|
|
49486
|
-
// <td key={key} className={styles.cell} onClick={onClick}>
|
|
49487
|
-
// {isFunction(def.specialRender) ? def.specialRender(rowData) : cellData}
|
|
49488
|
-
// </td>
|
|
49489
|
-
// );
|
|
49490
|
-
// };
|
|
49491
|
-
|
|
49374
|
+
};
|
|
49492
49375
|
|
|
49493
49376
|
var renderBodyCell = function renderBodyCell(dataItem, def, rowIndex, cellIndex) {
|
|
49494
49377
|
var tabIndex = rowIndex * Columns.length + cellIndex + 50;
|
|
49495
49378
|
var onClick = !isFunction(def.specialRender) ? function () {
|
|
49496
49379
|
ChangeToFormView(dataItem);
|
|
49497
49380
|
} : function () {};
|
|
49498
|
-
if (!EnableFormView) onClick = function onClick() {};
|
|
49499
|
-
|
|
49500
|
-
|
|
49501
|
-
|
|
49502
|
-
|
|
49381
|
+
if (!EnableFormView) onClick = function onClick() {};
|
|
49382
|
+
if (!EnableSelection || ReadOnly) onClick = function onClick() {};
|
|
49383
|
+
|
|
49384
|
+
if (IsLookup) {
|
|
49385
|
+
onClick = function onClick() {
|
|
49386
|
+
if (!IsLoading) {
|
|
49387
|
+
LookupTakeItem(dataItem);
|
|
49388
|
+
}
|
|
49389
|
+
};
|
|
49390
|
+
}
|
|
49503
49391
|
|
|
49504
|
-
if (!EnableSelection || ReadOnly || IsLookup && SelectionType === TableSelectionType.SINGLE) onClick = function onClick() {};
|
|
49505
49392
|
var cellData = def.isObject === true ? dataItem[def.accessor][def.objectAccessor] : dataItem[def.accessor];
|
|
49506
49393
|
return /*#__PURE__*/React__default['default'].createElement(TableBodyCell$1, {
|
|
49507
49394
|
key: tabIndex,
|
|
@@ -49510,7 +49397,22 @@ var TableView = function TableView(props) {
|
|
|
49510
49397
|
};
|
|
49511
49398
|
|
|
49512
49399
|
var renderSelectionCell = function renderSelectionCell(dataItem, selected, rowIndex) {
|
|
49513
|
-
if (
|
|
49400
|
+
if (IsLookup) {
|
|
49401
|
+
return /*#__PURE__*/React__default['default'].createElement(TableBodyCell$1, {
|
|
49402
|
+
selectionCell: true,
|
|
49403
|
+
key: -1
|
|
49404
|
+
}, /*#__PURE__*/React__default['default'].createElement(Button$1, {
|
|
49405
|
+
inverted: true,
|
|
49406
|
+
onClick: function onClick() {
|
|
49407
|
+
if (!IsLoading) {
|
|
49408
|
+
LookupTakeItem(dataItem);
|
|
49409
|
+
}
|
|
49410
|
+
},
|
|
49411
|
+
icon: "arrow-right"
|
|
49412
|
+
}));
|
|
49413
|
+
}
|
|
49414
|
+
|
|
49415
|
+
if (!EnableSelection || ReadOnly || IsLookup) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
49514
49416
|
return /*#__PURE__*/React__default['default'].createElement(TableBodyCell$1, {
|
|
49515
49417
|
selectionCell: true,
|
|
49516
49418
|
key: -1
|
|
@@ -49521,60 +49423,7 @@ var TableView = function TableView(props) {
|
|
|
49521
49423
|
},
|
|
49522
49424
|
id: rowIndex
|
|
49523
49425
|
}));
|
|
49524
|
-
};
|
|
49525
|
-
// let evenOddClass = key % 2 === 0 ? styles.tableRowEven : styles.tableRowOdd;
|
|
49526
|
-
// let selectionClass = isItemInArray(
|
|
49527
|
-
// rowData,
|
|
49528
|
-
// SelectedData,
|
|
49529
|
-
// SelectionIndicator
|
|
49530
|
-
// )
|
|
49531
|
-
// ? styles.checkedRow
|
|
49532
|
-
// : "";
|
|
49533
|
-
// if (props.accentColor) {
|
|
49534
|
-
// const style = {
|
|
49535
|
-
// border: "0px",
|
|
49536
|
-
// backgroundColor: key % 2 === 0 ? "white" : "whitesmoke",
|
|
49537
|
-
// borderLeft: "1px solid transparent",
|
|
49538
|
-
// borderRight: "1px solid transparent",
|
|
49539
|
-
// borderTop: "1px solid transparent",
|
|
49540
|
-
// };
|
|
49541
|
-
// const styleForHover = {
|
|
49542
|
-
// border: "1px solid " + getLighterColor(props.accentColor, 0.75),
|
|
49543
|
-
// backgroundColor: key % 2 === 0 ? "white" : "whitesmoke",
|
|
49544
|
-
// };
|
|
49545
|
-
// const styleForSelect = {
|
|
49546
|
-
// backgroundColor: getLighterColor(props.accentColor, 0.75),
|
|
49547
|
-
// };
|
|
49548
|
-
// return (
|
|
49549
|
-
// <tr
|
|
49550
|
-
// key={key}
|
|
49551
|
-
// style={
|
|
49552
|
-
// rowSelectedIndices.includes(key)
|
|
49553
|
-
// ? styleForSelect
|
|
49554
|
-
// : rowHoverIndex === key
|
|
49555
|
-
// ? styleForHover
|
|
49556
|
-
// : style
|
|
49557
|
-
// }
|
|
49558
|
-
// onMouseEnter={() => setRowHoverIndex(key)}
|
|
49559
|
-
// onMouseLeave={() => setRowHoverIndex(-1)}
|
|
49560
|
-
// >
|
|
49561
|
-
// {renderSelectionCheckbox(rowData, key)}
|
|
49562
|
-
// {Columns.filter((x) => x.hide !== true).map((def, i) =>
|
|
49563
|
-
// renderCell(rowData, def, i)
|
|
49564
|
-
// )}
|
|
49565
|
-
// </tr>
|
|
49566
|
-
// );
|
|
49567
|
-
// }
|
|
49568
|
-
// return (
|
|
49569
|
-
// <tr key={key} className={evenOddClass + " " + selectionClass}>
|
|
49570
|
-
// {renderSelectionCheckbox(rowData)}
|
|
49571
|
-
// {Columns.filter((x) => x.hide !== true).map((def, i) =>
|
|
49572
|
-
// renderCell(rowData, def, i)
|
|
49573
|
-
// )}
|
|
49574
|
-
// </tr>
|
|
49575
|
-
// );
|
|
49576
|
-
// };
|
|
49577
|
-
|
|
49426
|
+
};
|
|
49578
49427
|
|
|
49579
49428
|
var renderHeaderCell = function renderHeaderCell(def, i) {
|
|
49580
49429
|
var headerClick = function headerClick() {};
|
|
@@ -49610,6 +49459,10 @@ var TableView = function TableView(props) {
|
|
|
49610
49459
|
};
|
|
49611
49460
|
|
|
49612
49461
|
var renderSelectAllHeaderCell = function renderSelectAllHeaderCell() {
|
|
49462
|
+
if (IsLookup) return /*#__PURE__*/React__default['default'].createElement(TableHeadCell$1, {
|
|
49463
|
+
selectionCell: true,
|
|
49464
|
+
key: -1
|
|
49465
|
+
});
|
|
49613
49466
|
if (!EnableSelection || ReadOnly || IsLookup && SelectionType === TableSelectionType.SINGLE) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
49614
49467
|
if (SelectedEntirePage && Localization.DeselectAll) ;
|
|
49615
49468
|
if (!SelectedEntirePage && Localization.SelectAll) ;
|
|
@@ -49631,17 +49484,7 @@ var TableView = function TableView(props) {
|
|
|
49631
49484
|
return x.hide !== true;
|
|
49632
49485
|
}).map(function (col, i) {
|
|
49633
49486
|
return renderHeaderCell(col, i);
|
|
49634
|
-
}))), /*#__PURE__*/React__default['default'].createElement(TableBody$1, null, renderBody()))));
|
|
49635
|
-
// <div>
|
|
49636
|
-
// <div className={styles.tableDiv}>
|
|
49637
|
-
// <table className={styles.table}>
|
|
49638
|
-
// <thead>{renderHeader()}</thead>
|
|
49639
|
-
// <tbody>{renderBody()}</tbody>
|
|
49640
|
-
// </table>
|
|
49641
|
-
// </div>
|
|
49642
|
-
// <div>{renderPagination()}</div>
|
|
49643
|
-
// </div>
|
|
49644
|
-
// );
|
|
49487
|
+
}))), /*#__PURE__*/React__default['default'].createElement(TableBody$1, null, renderBody()))));
|
|
49645
49488
|
};
|
|
49646
49489
|
|
|
49647
49490
|
var _templateObject$e, _templateObject2$a;
|
|
@@ -49727,7 +49570,7 @@ var Container$c = newStyled.div(_templateObject$d || (_templateObject$d = _tagge
|
|
|
49727
49570
|
});
|
|
49728
49571
|
var TableContainer$1 = newStyled.div(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteral__default['default'](["\n font-family: var(--font-base-ubuntu);\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n"])));
|
|
49729
49572
|
var PaginationContainer$1 = newStyled.div(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteral__default['default'](["\n border-top: 1px solid #80808025;\n"])));
|
|
49730
|
-
var FormContainer$2 = newStyled.div(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteral__default['default'](["\n height: 100%;\n overflow-y: auto;\n max-height: calc(100vh - 120px);\n border-radius: 3px;\n\n ", "\n"])), function (props) {
|
|
49573
|
+
var FormContainer$2 = newStyled.div(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteral__default['default'](["\n height: 100%;\n // overflow-y: auto;\n // max-height: calc(100vh - 120px);\n border-radius: 3px;\n\n ", "\n"])), function (props) {
|
|
49731
49574
|
return getBorderSyle$1(props.borderStyle, props.read, props.theme, props.color);
|
|
49732
49575
|
});
|
|
49733
49576
|
var HeaderContainer$1 = newStyled.div(_templateObject5$7 || (_templateObject5$7 = _taggedTemplateLiteral__default['default'](["\n display: flex;\n flex-direction: row;\n justify-content: left;\n align-items: center;\n padding: 4px 0;\n border-radius: 3px;\n font-size: 12px;\n font-family: \"Ubuntu\";\n"])));
|
|
@@ -49787,12 +49630,10 @@ var DataView = function DataView(props) {
|
|
|
49787
49630
|
GoToAdd = _props$GoToAdd === void 0 ? emptyFunc : _props$GoToAdd;
|
|
49788
49631
|
props.GoToAddWithCopy;
|
|
49789
49632
|
var _props$DiscardEdited = props.DiscardEdited,
|
|
49790
|
-
DiscardEdited = _props$DiscardEdited === void 0 ? emptyFunc : _props$DiscardEdited
|
|
49791
|
-
|
|
49792
|
-
|
|
49793
|
-
_props$
|
|
49794
|
-
ClearSelectedData = _props$ClearSelectedD === void 0 ? emptyFunc : _props$ClearSelectedD,
|
|
49795
|
-
_props$Localization = props.Localization,
|
|
49633
|
+
DiscardEdited = _props$DiscardEdited === void 0 ? emptyFunc : _props$DiscardEdited;
|
|
49634
|
+
props.SetSelectedData;
|
|
49635
|
+
props.ClearSelectedData;
|
|
49636
|
+
var _props$Localization = props.Localization,
|
|
49796
49637
|
Localization = _props$Localization === void 0 ? {} : _props$Localization,
|
|
49797
49638
|
_props$Export = props.Export,
|
|
49798
49639
|
Export = _props$Export === void 0 ? function () {} : _props$Export,
|
|
@@ -49868,15 +49709,15 @@ var DataView = function DataView(props) {
|
|
|
49868
49709
|
size: size,
|
|
49869
49710
|
color: color
|
|
49870
49711
|
}; //======== LOOKUP ========
|
|
49871
|
-
|
|
49872
|
-
|
|
49873
|
-
|
|
49874
|
-
|
|
49875
|
-
|
|
49876
|
-
|
|
49877
|
-
|
|
49878
|
-
|
|
49879
|
-
|
|
49712
|
+
// useEffect(() => {
|
|
49713
|
+
// if (General.IsLookup) SetSelectedData(Lookup.SelectedData);
|
|
49714
|
+
// }, [Lookup.SelectedData]);
|
|
49715
|
+
// useEffect(() => {
|
|
49716
|
+
// return function cleanup() {
|
|
49717
|
+
// if (General.IsLookup) ClearSelectedData();
|
|
49718
|
+
// };
|
|
49719
|
+
// }, []);
|
|
49720
|
+
//======== CONFIGS ========
|
|
49880
49721
|
|
|
49881
49722
|
var formViewMovementConfig = {
|
|
49882
49723
|
Dirty: Form.Dirty,
|
|
@@ -49908,6 +49749,9 @@ var DataView = function DataView(props) {
|
|
|
49908
49749
|
SelectedData: Table.SelectedData,
|
|
49909
49750
|
ChangeToFormView: ChangeToFormView,
|
|
49910
49751
|
//---------------------------
|
|
49752
|
+
IsLookup: General.IsLookup,
|
|
49753
|
+
LookupTakeItem: Lookup.LookupTakeItem ? Lookup.LookupTakeItem : function () {},
|
|
49754
|
+
//---------------------------
|
|
49911
49755
|
EnableOrdering: Options.EnableOrdering,
|
|
49912
49756
|
Column: Ordering.Column,
|
|
49913
49757
|
Accessor: Ordering.Accessor,
|
|
@@ -49938,27 +49782,6 @@ var DataView = function DataView(props) {
|
|
|
49938
49782
|
if (Form.Mode === FormMode.ADD) return "add";
|
|
49939
49783
|
}; //======== RENDER ========
|
|
49940
49784
|
|
|
49941
|
-
|
|
49942
|
-
var renderLookupTakeValues = function renderLookupTakeValues() {
|
|
49943
|
-
if (General.IsLookup) {
|
|
49944
|
-
var loading = freezeLoading([Table.SelectedData.length === 0]);
|
|
49945
|
-
return /*#__PURE__*/React__default['default'].createElement(FlexItem$1, null, /*#__PURE__*/React__default['default'].createElement(Button$1, {
|
|
49946
|
-
tooltip: Localization.TakeValues,
|
|
49947
|
-
onClick: function onClick() {
|
|
49948
|
-
if (!loading) {
|
|
49949
|
-
Lookup.TakeValues(Table.SelectedData);
|
|
49950
|
-
if (ClearSelectedData) ClearSelectedData();
|
|
49951
|
-
}
|
|
49952
|
-
},
|
|
49953
|
-
disabled: Table.SelectedData.length === 0,
|
|
49954
|
-
icon: "arrow-circle-down",
|
|
49955
|
-
inverted: true
|
|
49956
|
-
}));
|
|
49957
|
-
}
|
|
49958
|
-
|
|
49959
|
-
return false;
|
|
49960
|
-
};
|
|
49961
|
-
|
|
49962
49785
|
var renderContextMenu = function renderContextMenu() {
|
|
49963
49786
|
if (Options.EnableActions && General.CurrentView === ViewType.TABLE_VIEW && Table.Actions && Table.Actions.length > 0) {
|
|
49964
49787
|
return /*#__PURE__*/React__default['default'].createElement(FlexItem$1, null, /*#__PURE__*/React__default['default'].createElement(DropdownMenu, {
|
|
@@ -50058,7 +49881,7 @@ var DataView = function DataView(props) {
|
|
|
50058
49881
|
|
|
50059
49882
|
var renderSpinner = function renderSpinner() {
|
|
50060
49883
|
if (!General.IsLoading) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
50061
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(LoaderContainer$1, null), /*#__PURE__*/React__default['default'].createElement(LoaderContainerTransparent$1, null, /*#__PURE__*/React__default['default'].createElement(Loader$1, null, Table.Data.length > 2 ? /*#__PURE__*/React__default['default'].createElement(Spinner, null) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null))));
|
|
49884
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(LoaderContainer$1, null), /*#__PURE__*/React__default['default'].createElement(LoaderContainerTransparent$1, null, /*#__PURE__*/React__default['default'].createElement(Loader$1, null, Table.Data !== null && Table.Data.length > 2 ? /*#__PURE__*/React__default['default'].createElement(Spinner, null) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null))));
|
|
50062
49885
|
};
|
|
50063
49886
|
|
|
50064
49887
|
var renderFiltering = function renderFiltering() {
|
|
@@ -50084,7 +49907,7 @@ var DataView = function DataView(props) {
|
|
|
50084
49907
|
var x6 = General.CurrentView !== "TableView" ? false : true;
|
|
50085
49908
|
var x7 = General.IsLookup && Table.SelectionType === "multiple" ? true : false;
|
|
50086
49909
|
var x8 = Options.EnableActions && General.CurrentView === ViewType.TABLE_VIEW && Table.Actions && Table.Actions.length > 0;
|
|
50087
|
-
if (x1 || x2 || x3 || x4 || x5 || x6 || x7 || x8) return /*#__PURE__*/React__default['default'].createElement(HeaderContainer$1, null, renderChangeToTableView(), renderDeleteSelectedButton(), renderGoToAddButton(), renderFormViewMovement(), renderSwitchToEditModeButton(), renderRefreshButton(),
|
|
49910
|
+
if (x1 || x2 || x3 || x4 || x5 || x6 || x7 || x8) return /*#__PURE__*/React__default['default'].createElement(HeaderContainer$1, null, renderChangeToTableView(), renderDeleteSelectedButton(), renderGoToAddButton(), renderFormViewMovement(), renderSwitchToEditModeButton(), renderRefreshButton(), renderContextMenu());
|
|
50088
49911
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
50089
49912
|
};
|
|
50090
49913
|
|
|
@@ -52943,9 +52766,11 @@ Alet.defaultProps = {
|
|
|
52943
52766
|
size: "small",
|
|
52944
52767
|
theme: theme,
|
|
52945
52768
|
color: "primary",
|
|
52946
|
-
hasContainer: true
|
|
52769
|
+
hasContainer: true,
|
|
52770
|
+
message: ""
|
|
52947
52771
|
};
|
|
52948
52772
|
Alet.propTypes = {
|
|
52773
|
+
message: PropTypes__default['default'].string,
|
|
52949
52774
|
theme: PropTypes__default['default'].object.isRequired,
|
|
52950
52775
|
className: PropTypes__default['default'].string,
|
|
52951
52776
|
hasContainer: PropTypes__default['default'].bool,
|
|
@@ -53088,7 +52913,7 @@ var Container$2 = newStyled.span(function (props) {
|
|
|
53088
52913
|
display: "none"
|
|
53089
52914
|
},
|
|
53090
52915
|
"& .react-datepicker-wrapper": {
|
|
53091
|
-
width: "
|
|
52916
|
+
width: "25%",
|
|
53092
52917
|
boxSizing: "border-box"
|
|
53093
52918
|
},
|
|
53094
52919
|
"& input": {
|
|
@@ -53230,7 +53055,7 @@ var PeriodSelector = function PeriodSelector(props) {
|
|
|
53230
53055
|
dateFormat: dateFormat ? dateFormat : "dd.MM.yyyy.",
|
|
53231
53056
|
disabled: disabled,
|
|
53232
53057
|
className: className
|
|
53233
|
-
}),
|
|
53058
|
+
}), " ", /*#__PURE__*/React__default['default'].createElement(DatePicker, {
|
|
53234
53059
|
selected: getEndDate(),
|
|
53235
53060
|
onChange: handleOnEndDateChange,
|
|
53236
53061
|
dateFormat: dateFormat ? dateFormat : "dd.MM.yyyy.",
|