@lanaco/lnc-react-ui 2.1.13 → 2.1.14
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 +7 -196
- package/lib/index.js +7 -196
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -49285,92 +49285,19 @@ var TableView = function TableView(props) {
|
|
|
49285
49285
|
Localization = _props$Localization === void 0 ? {} : _props$Localization;
|
|
49286
49286
|
props.Export;
|
|
49287
49287
|
props.Icons;
|
|
49288
|
-
|
|
49289
|
-
// const [rowHoverIndex, setRowHoverIndex] = useState(-1);
|
|
49290
|
-
// const [rowSelectedIndices, setRowSelectedIndices] = useState([]);
|
|
49291
|
-
//======== FUNCTIONS ========
|
|
49288
|
+
//======== FUNCTIONS ========
|
|
49292
49289
|
|
|
49293
49290
|
function isFunction(functionToCheck) {
|
|
49294
49291
|
return functionToCheck && {}.toString.call(functionToCheck) === "[object Function]";
|
|
49295
49292
|
}
|
|
49296
49293
|
|
|
49297
49294
|
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
49295
|
OnSelection(rowData, val, SelectionType);
|
|
49315
49296
|
};
|
|
49316
49297
|
|
|
49317
49298
|
var handleSelectAll = function handleSelectAll(val) {
|
|
49318
49299
|
OnSelectAll(val);
|
|
49319
49300
|
}; //======== 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
49301
|
|
|
49375
49302
|
|
|
49376
49303
|
var isItemInArray = function isItemInArray(item, array, byProp) {
|
|
@@ -49378,33 +49305,7 @@ var TableView = function TableView(props) {
|
|
|
49378
49305
|
return x[byProp] === item[byProp];
|
|
49379
49306
|
}));
|
|
49380
49307
|
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
|
-
|
|
49308
|
+
};
|
|
49408
49309
|
|
|
49409
49310
|
var renderBody = function renderBody() {
|
|
49410
49311
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, Data.map(function (dataItem, i) {
|
|
@@ -49425,41 +49326,14 @@ var TableView = function TableView(props) {
|
|
|
49425
49326
|
}).map(function (col, j) {
|
|
49426
49327
|
return renderBodyCell(dataItem, col, i, j);
|
|
49427
49328
|
})));
|
|
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
|
-
|
|
49329
|
+
};
|
|
49451
49330
|
|
|
49452
49331
|
var renderBodyCell = function renderBodyCell(dataItem, def, rowIndex, cellIndex) {
|
|
49453
49332
|
var tabIndex = rowIndex * Columns.length + cellIndex + 50;
|
|
49454
49333
|
var onClick = !isFunction(def.specialRender) ? function () {
|
|
49455
49334
|
ChangeToFormView(dataItem);
|
|
49456
49335
|
} : function () {};
|
|
49457
|
-
if (!EnableFormView) onClick = function onClick() {};
|
|
49458
|
-
// var checked = isItemInArray(dataItem, SelectedData, SelectionIndicator);
|
|
49459
|
-
// onClick = () =>
|
|
49460
|
-
// handleOnSelection(dataItem, { target: { checked: !checked } });
|
|
49461
|
-
// }
|
|
49462
|
-
|
|
49336
|
+
if (!EnableFormView) onClick = function onClick() {};
|
|
49463
49337
|
if (!EnableSelection || ReadOnly || IsLookup && SelectionType === TableSelectionType.SINGLE) onClick = function onClick() {};
|
|
49464
49338
|
var cellData = def.isObject === true ? dataItem[def.accessor][def.objectAccessor] : dataItem[def.accessor];
|
|
49465
49339
|
return /*#__PURE__*/React__default.createElement(TableBodyCell$1, {
|
|
@@ -49480,60 +49354,7 @@ var TableView = function TableView(props) {
|
|
|
49480
49354
|
},
|
|
49481
49355
|
id: rowIndex
|
|
49482
49356
|
}));
|
|
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
|
-
|
|
49357
|
+
};
|
|
49537
49358
|
|
|
49538
49359
|
var renderHeaderCell = function renderHeaderCell(def, i) {
|
|
49539
49360
|
var headerClick = function headerClick() {};
|
|
@@ -49590,17 +49411,7 @@ var TableView = function TableView(props) {
|
|
|
49590
49411
|
return x.hide !== true;
|
|
49591
49412
|
}).map(function (col, i) {
|
|
49592
49413
|
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
|
-
// );
|
|
49414
|
+
}))), /*#__PURE__*/React__default.createElement(TableBody$1, null, renderBody()))));
|
|
49604
49415
|
};
|
|
49605
49416
|
|
|
49606
49417
|
var _templateObject$e, _templateObject2$a;
|
|
@@ -49686,7 +49497,7 @@ var Container$c = newStyled.div(_templateObject$d || (_templateObject$d = _tagge
|
|
|
49686
49497
|
});
|
|
49687
49498
|
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
49499
|
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) {
|
|
49500
|
+
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
49501
|
return getBorderSyle$1(props.borderStyle, props.read, props.theme, props.color);
|
|
49691
49502
|
});
|
|
49692
49503
|
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"])));
|
package/lib/index.js
CHANGED
|
@@ -49326,92 +49326,19 @@ var TableView = function TableView(props) {
|
|
|
49326
49326
|
Localization = _props$Localization === void 0 ? {} : _props$Localization;
|
|
49327
49327
|
props.Export;
|
|
49328
49328
|
props.Icons;
|
|
49329
|
-
|
|
49330
|
-
// const [rowHoverIndex, setRowHoverIndex] = useState(-1);
|
|
49331
|
-
// const [rowSelectedIndices, setRowSelectedIndices] = useState([]);
|
|
49332
|
-
//======== FUNCTIONS ========
|
|
49329
|
+
//======== FUNCTIONS ========
|
|
49333
49330
|
|
|
49334
49331
|
function isFunction(functionToCheck) {
|
|
49335
49332
|
return functionToCheck && {}.toString.call(functionToCheck) === "[object Function]";
|
|
49336
49333
|
}
|
|
49337
49334
|
|
|
49338
49335
|
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
49336
|
OnSelection(rowData, val, SelectionType);
|
|
49356
49337
|
};
|
|
49357
49338
|
|
|
49358
49339
|
var handleSelectAll = function handleSelectAll(val) {
|
|
49359
49340
|
OnSelectAll(val);
|
|
49360
49341
|
}; //======== 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
49342
|
|
|
49416
49343
|
|
|
49417
49344
|
var isItemInArray = function isItemInArray(item, array, byProp) {
|
|
@@ -49419,33 +49346,7 @@ var TableView = function TableView(props) {
|
|
|
49419
49346
|
return x[byProp] === item[byProp];
|
|
49420
49347
|
}));
|
|
49421
49348
|
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
|
-
|
|
49349
|
+
};
|
|
49449
49350
|
|
|
49450
49351
|
var renderBody = function renderBody() {
|
|
49451
49352
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, Data.map(function (dataItem, i) {
|
|
@@ -49466,41 +49367,14 @@ var TableView = function TableView(props) {
|
|
|
49466
49367
|
}).map(function (col, j) {
|
|
49467
49368
|
return renderBodyCell(dataItem, col, i, j);
|
|
49468
49369
|
})));
|
|
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
|
-
|
|
49370
|
+
};
|
|
49492
49371
|
|
|
49493
49372
|
var renderBodyCell = function renderBodyCell(dataItem, def, rowIndex, cellIndex) {
|
|
49494
49373
|
var tabIndex = rowIndex * Columns.length + cellIndex + 50;
|
|
49495
49374
|
var onClick = !isFunction(def.specialRender) ? function () {
|
|
49496
49375
|
ChangeToFormView(dataItem);
|
|
49497
49376
|
} : function () {};
|
|
49498
|
-
if (!EnableFormView) onClick = function onClick() {};
|
|
49499
|
-
// var checked = isItemInArray(dataItem, SelectedData, SelectionIndicator);
|
|
49500
|
-
// onClick = () =>
|
|
49501
|
-
// handleOnSelection(dataItem, { target: { checked: !checked } });
|
|
49502
|
-
// }
|
|
49503
|
-
|
|
49377
|
+
if (!EnableFormView) onClick = function onClick() {};
|
|
49504
49378
|
if (!EnableSelection || ReadOnly || IsLookup && SelectionType === TableSelectionType.SINGLE) onClick = function onClick() {};
|
|
49505
49379
|
var cellData = def.isObject === true ? dataItem[def.accessor][def.objectAccessor] : dataItem[def.accessor];
|
|
49506
49380
|
return /*#__PURE__*/React__default['default'].createElement(TableBodyCell$1, {
|
|
@@ -49521,60 +49395,7 @@ var TableView = function TableView(props) {
|
|
|
49521
49395
|
},
|
|
49522
49396
|
id: rowIndex
|
|
49523
49397
|
}));
|
|
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
|
-
|
|
49398
|
+
};
|
|
49578
49399
|
|
|
49579
49400
|
var renderHeaderCell = function renderHeaderCell(def, i) {
|
|
49580
49401
|
var headerClick = function headerClick() {};
|
|
@@ -49631,17 +49452,7 @@ var TableView = function TableView(props) {
|
|
|
49631
49452
|
return x.hide !== true;
|
|
49632
49453
|
}).map(function (col, i) {
|
|
49633
49454
|
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
|
-
// );
|
|
49455
|
+
}))), /*#__PURE__*/React__default['default'].createElement(TableBody$1, null, renderBody()))));
|
|
49645
49456
|
};
|
|
49646
49457
|
|
|
49647
49458
|
var _templateObject$e, _templateObject2$a;
|
|
@@ -49727,7 +49538,7 @@ var Container$c = newStyled.div(_templateObject$d || (_templateObject$d = _tagge
|
|
|
49727
49538
|
});
|
|
49728
49539
|
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
49540
|
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) {
|
|
49541
|
+
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
49542
|
return getBorderSyle$1(props.borderStyle, props.read, props.theme, props.color);
|
|
49732
49543
|
});
|
|
49733
49544
|
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"])));
|