oa-componentbook 1.0.1-stage.455 → 1.0.1-stage.456
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.
|
@@ -53,7 +53,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
53
53
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
54
54
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
|
|
55
55
|
function GenricLayOut(_ref) {
|
|
56
|
-
var _state$misc30, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _infoData$iconConfig, _infoData$iconConfig2, _infoData$iconConfig3, _infoData$iconConfig4, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list,
|
|
56
|
+
var _state$misc30, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _infoData$iconConfig, _infoData$iconConfig2, _infoData$iconConfig3, _infoData$iconConfig4, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _ref7, _tabs$extraAction$che2, _tabs$extraAction$pro, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables5, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination19, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
|
|
57
57
|
let {
|
|
58
58
|
config,
|
|
59
59
|
getInitialData,
|
|
@@ -1223,7 +1223,9 @@ function GenricLayOut(_ref) {
|
|
|
1223
1223
|
* @returns {void}
|
|
1224
1224
|
*/
|
|
1225
1225
|
const onTabClick = async key => {
|
|
1226
|
-
var _tables$filter5, _tables$columns2, _staticFilter$data$fi2;
|
|
1226
|
+
var _ref4, _tabs$extraAction$che, _tabs$extraAction, _tabs$extraAction2, _tables$filter5, _tables$columns2, _staticFilter$data$fi2;
|
|
1227
|
+
// Store the checked value before resetting
|
|
1228
|
+
const extraActionChecked = (_ref4 = (_tabs$extraAction$che = tabs === null || tabs === void 0 || (_tabs$extraAction = tabs.extraAction) === null || _tabs$extraAction === void 0 ? void 0 : _tabs$extraAction.checked) !== null && _tabs$extraAction$che !== void 0 ? _tabs$extraAction$che : tabs === null || tabs === void 0 || (_tabs$extraAction2 = tabs.extraAction) === null || _tabs$extraAction2 === void 0 || (_tabs$extraAction2 = _tabs$extraAction2.props) === null || _tabs$extraAction2 === void 0 ? void 0 : _tabs$extraAction2.defaultChecked) !== null && _ref4 !== void 0 ? _ref4 : false;
|
|
1227
1229
|
resetTabsExtraActionSwitch();
|
|
1228
1230
|
dispatch({
|
|
1229
1231
|
type: _layoutReducer.actionTypes.TAB_CLICK,
|
|
@@ -1300,6 +1302,8 @@ function GenricLayOut(_ref) {
|
|
|
1300
1302
|
subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading18 = header.subHeading) === null || _header$subHeading18 === void 0 || (_header$subHeading18 = _header$subHeading18.jsxConfig) === null || _header$subHeading18 === void 0 ? void 0 : _header$subHeading18.value
|
|
1301
1303
|
} : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {}), {}, {
|
|
1302
1304
|
multiSelectValue: (_state$staticFilter$m6 = state === null || state === void 0 || (_state$staticFilter6 = state.staticFilter) === null || _state$staticFilter6 === void 0 ? void 0 : _state$staticFilter6.multiSelectValue) !== null && _state$staticFilter$m6 !== void 0 ? _state$staticFilter$m6 : []
|
|
1305
|
+
}, (tabs === null || tabs === void 0 ? void 0 : tabs.extraAction) && extraActionChecked && {
|
|
1306
|
+
checked: extraActionChecked
|
|
1303
1307
|
}));
|
|
1304
1308
|
if (error) {
|
|
1305
1309
|
showErrorNotification(error);
|
|
@@ -1562,7 +1566,7 @@ function GenricLayOut(_ref) {
|
|
|
1562
1566
|
|
|
1563
1567
|
// Only process filter data if this is actually a filter drawer
|
|
1564
1568
|
if (formData.type === "FILTER-SUBMIT") {
|
|
1565
|
-
var _state$dropdownSearch7, _state$inputSearch7,
|
|
1569
|
+
var _state$dropdownSearch7, _state$inputSearch7, _ref5, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$misc21, _state$staticFilter$m9, _state$staticFilter9;
|
|
1566
1570
|
const appliedFilters = {};
|
|
1567
1571
|
Object.keys(formData).forEach(key => {
|
|
1568
1572
|
const value = formData[key];
|
|
@@ -1585,7 +1589,7 @@ function GenricLayOut(_ref) {
|
|
|
1585
1589
|
}), (state === null || state === void 0 || (_state$inputSearch7 = state.inputSearch) === null || _state$inputSearch7 === void 0 || (_state$inputSearch7 = _state$inputSearch7.value) === null || _state$inputSearch7 === void 0 ? void 0 : _state$inputSearch7.trim()) && {
|
|
1586
1590
|
searchedValue: state.inputSearch.value
|
|
1587
1591
|
}), appliedFilters), {}, {
|
|
1588
|
-
filterOn: (
|
|
1592
|
+
filterOn: (_ref5 = (_appliedFilters$filte = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.filterBy) !== null && _appliedFilters$filte !== void 0 ? _appliedFilters$filte : customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.defaultAppliedFilter) !== null && _ref5 !== void 0 ? _ref5 : "",
|
|
1589
1593
|
fromDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.fromDate,
|
|
1590
1594
|
toDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toDate,
|
|
1591
1595
|
selectedTab: state === null || state === void 0 || (_state$tabs13 = state.tabs) === null || _state$tabs13 === void 0 ? void 0 : _state$tabs13.active,
|
|
@@ -2100,11 +2104,11 @@ function GenricLayOut(_ref) {
|
|
|
2100
2104
|
});
|
|
2101
2105
|
}
|
|
2102
2106
|
};
|
|
2103
|
-
const onMobilePageChange = async
|
|
2107
|
+
const onMobilePageChange = async _ref6 => {
|
|
2104
2108
|
let {
|
|
2105
2109
|
current,
|
|
2106
2110
|
pageSize
|
|
2107
|
-
} =
|
|
2111
|
+
} = _ref6;
|
|
2108
2112
|
resetTabsExtraActionSwitch();
|
|
2109
2113
|
dispatch({
|
|
2110
2114
|
type: _layoutReducer.actionTypes.SET_PAGINATION,
|
|
@@ -2356,7 +2360,7 @@ function GenricLayOut(_ref) {
|
|
|
2356
2360
|
onTabClick: onTabClick,
|
|
2357
2361
|
extraAction: tabs !== null && tabs !== void 0 && tabs.extraAction ? _objectSpread(_objectSpread({}, tabs.extraAction), {}, {
|
|
2358
2362
|
props: _objectSpread(_objectSpread({}, tabs.extraAction.props), {}, {
|
|
2359
|
-
checked: (
|
|
2363
|
+
checked: (_ref7 = (_tabs$extraAction$che2 = tabs.extraAction.checked) !== null && _tabs$extraAction$che2 !== void 0 ? _tabs$extraAction$che2 : (_tabs$extraAction$pro = tabs.extraAction.props) === null || _tabs$extraAction$pro === void 0 ? void 0 : _tabs$extraAction$pro.defaultChecked) !== null && _ref7 !== void 0 ? _ref7 : false,
|
|
2360
2364
|
onChange: async checked => {
|
|
2361
2365
|
var _tabs$extraAction$pro2;
|
|
2362
2366
|
// Update switch state immediately
|