oa-componentbook 1.0.1-stage.449 → 1.0.1-stage.450
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/build/components/oa-component-table-with-search-and-filter/TableWithSearchAndFilter.js
CHANGED
|
@@ -289,6 +289,7 @@ function TableWithSearchAndFilter(_ref) {
|
|
|
289
289
|
return /*#__PURE__*/_react.default.createElement(_CustomDatePicker.default, {
|
|
290
290
|
placeholder: placeholder || 'Select date',
|
|
291
291
|
value: fieldValue,
|
|
292
|
+
containerSize: "small",
|
|
292
293
|
onChange: date => handleFilterChange(fieldKey, date, 'change')
|
|
293
294
|
});
|
|
294
295
|
};
|
|
@@ -337,6 +338,18 @@ function TableWithSearchAndFilter(_ref) {
|
|
|
337
338
|
};
|
|
338
339
|
const displayData = dataSource;
|
|
339
340
|
const totalRecords = total !== null && total !== void 0 ? total : displayData.length;
|
|
341
|
+
|
|
342
|
+
// Button configuration for filter drawer footer
|
|
343
|
+
const filterDrawerButtonConfig = [{
|
|
344
|
+
callback: handleClearFilters,
|
|
345
|
+
label: 'Clear All',
|
|
346
|
+
type: 'secondary'
|
|
347
|
+
}, {
|
|
348
|
+
callback: handleApplyFilters,
|
|
349
|
+
label: 'Apply Filter',
|
|
350
|
+
type: 'primary',
|
|
351
|
+
disabled: !areAllRequiredFieldsFilled
|
|
352
|
+
}];
|
|
340
353
|
return /*#__PURE__*/_react.default.createElement(_styles.TableWithSearchAndFilterContainer, {
|
|
341
354
|
className: className
|
|
342
355
|
}, (showSearch || showFilters) && /*#__PURE__*/_react.default.createElement(_styles.Toolbar, null, showSearch && /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
@@ -375,21 +388,11 @@ function TableWithSearchAndFilter(_ref) {
|
|
|
375
388
|
open: isFilterDrawerVisible,
|
|
376
389
|
visible: isFilterDrawerVisible,
|
|
377
390
|
closable: false,
|
|
378
|
-
width: 400
|
|
391
|
+
width: 400,
|
|
392
|
+
buttonConfig: filterDrawerButtonConfig
|
|
379
393
|
}, /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerContent, null, /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerBody, null, filterConfig.length > 0 ? filterConfig.map(filter => /*#__PURE__*/_react.default.createElement(_styles.FilterSection, {
|
|
380
394
|
key: filter.key
|
|
381
|
-
}, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, filter.label, filter.required && /*#__PURE__*/_react.default.createElement(_styles.RequiredMark, null, "*")), renderFilterInput(filter))) : /*#__PURE__*/_react.default.createElement(_styles.FilterSection, null, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, "No filters configured"))), /*#__PURE__*/_react.default.createElement(
|
|
382
|
-
label: "Clear All",
|
|
383
|
-
onClick: handleClearFilters,
|
|
384
|
-
type: "secondary",
|
|
385
|
-
size: "medium"
|
|
386
|
-
}), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
387
|
-
label: "Apply Filter",
|
|
388
|
-
onClick: handleApplyFilters,
|
|
389
|
-
type: "primary",
|
|
390
|
-
size: "medium",
|
|
391
|
-
disabled: !areAllRequiredFieldsFilled
|
|
392
|
-
})))), /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
|
|
395
|
+
}, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, filter.label, filter.required && /*#__PURE__*/_react.default.createElement(_styles.RequiredMark, null, "*")), renderFilterInput(filter))) : /*#__PURE__*/_react.default.createElement(_styles.FilterSection, null, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, "No filters configured"))))), /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
|
|
393
396
|
rowKey: rowKey,
|
|
394
397
|
dataSource: displayData,
|
|
395
398
|
columns: columns,
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Toolbar = exports.TableWithSearchAndFilterContainer = exports.RequiredMark = exports.PaginationContainer = exports.FilterSubLabelText = exports.FilterSubLabel = exports.FilterSubField = exports.FilterSection = exports.FilterLabel = exports.FilterGroup = exports.
|
|
6
|
+
exports.Toolbar = exports.TableWithSearchAndFilterContainer = exports.RequiredMark = exports.PaginationContainer = exports.FilterSubLabelText = exports.FilterSubLabel = exports.FilterSubField = exports.FilterSection = exports.FilterLabel = exports.FilterGroup = exports.FilterDrawerContent = exports.FilterDrawerBody = exports.DateRangeContainer = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
11
|
const TableWithSearchAndFilterContainer = exports.TableWithSearchAndFilterContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n"])));
|
|
@@ -16,9 +16,8 @@ const RequiredMark = exports.RequiredMark = _styledComponents.default.span(_temp
|
|
|
16
16
|
const PaginationContainer = exports.PaginationContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-top: 16px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n"])));
|
|
17
17
|
const FilterDrawerContent = exports.FilterDrawerContent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: calc(100vh - 150px);\n"])));
|
|
18
18
|
const FilterDrawerBody = exports.FilterDrawerBody = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n flex: 1;\n overflow-y: auto;\n \n /* Make radio buttons horizontal */\n .ant-radio-group {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n }\n \n /* Ensure radio wrapper is visible - override line-height: 0 */\n .ant-radio-wrapper {\n display: inline-flex !important;\n align-items: center !important;\n margin-right: 0 !important;\n line-height: 1.5 !important;\n }\n \n /* Ensure radio label text is visible */\n .ant-radio-wrapper span:not(.ant-radio) {\n line-height: 1.5 !important;\n }\n \n .ant-radio-wrapper p {\n margin: 0;\n line-height: 1.5 !important;\n }\n"])));
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const DateRangeContainer = exports.DateRangeContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
|
|
19
|
+
const FilterGroup = exports.FilterGroup = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
|
|
20
|
+
const FilterSubField = exports.FilterSubField = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
|
|
21
|
+
const FilterSubLabel = exports.FilterSubLabel = _styledComponents.default.label(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 14px;\n color: var(--color-primary-content, #212121);\n"])));
|
|
22
|
+
const FilterSubLabelText = exports.FilterSubLabelText = _styledComponents.default.span(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: var(--color-primary-content, #212121);\n"])));
|
|
23
|
+
const DateRangeContainer = exports.DateRangeContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
|