sccoreui 6.2.17 → 6.2.19
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/dist/App.scss +4 -0
- package/dist/components/ag-grid/AgGrid.js +1 -1
- package/dist/components/ag-grid/advancedFeature/column-group.js +100 -45
- package/dist/components/ag-grid/advancedFeature/hide-column.js +2 -2
- package/dist/components/ag-grid/context-provider.js +6 -3
- package/dist/components/ag-grid/helper.js +147 -70
- package/dist/components/ag-grid/parent-for-grid.js +54 -57
- package/dist/components/ag-grid/utilComponents.js +7 -1
- package/dist/components/formula-template/FormulaCoponent.js +2 -2
- package/dist/components/multi-select-dropdown/multi-select-dropdown.js +4 -2
- package/dist/types/components/ag-grid/Types.d.ts +3 -0
- package/dist/types/components/ag-grid/context-provider.d.ts +2 -0
- package/dist/types/components/ag-grid/helper.d.ts +4 -3
- package/dist/types/components/ag-grid/utilComponents.d.ts +1 -0
- package/package.json +1 -1
- package/dist/pages/aggrid/AgGrid.js +0 -606
- package/dist/pages/aggrid/BulkAction.js +0 -7
- package/dist/pages/aggrid/RowGroupTrail.js +0 -114
- package/dist/pages/aggrid/fakeServer.js +0 -95
- package/dist/pages/aggrid/id-cell.js +0 -9
- package/dist/pages/aggrid/interface.js +0 -2
- package/dist/pages/avatar/avatar.js +0 -338
- package/dist/pages/badges/badge.js +0 -73
- package/dist/pages/breadcrumb/breadcrumb.js +0 -14
- package/dist/pages/button/button.js +0 -10
- package/dist/pages/button-group/button-group.js +0 -10
- package/dist/pages/chart/chart.js +0 -257
- package/dist/pages/checkbox/checkbox.js +0 -26
- package/dist/pages/checkbox-group/checkbox-group-component.js +0 -21
- package/dist/pages/color-picker/color-picker.js +0 -13
- package/dist/pages/content-dividers/content-dividers.js +0 -11
- package/dist/pages/custom-color-picker/custom-color-picker.js +0 -12
- package/dist/pages/custom-multiselect/CustomMultiSelect.js +0 -37
- package/dist/pages/date-picker/date-picker.js +0 -20
- package/dist/pages/dropdown/dropdown-component.js +0 -39
- package/dist/pages/file-upload/file-upload.js +0 -34
- package/dist/pages/flex.js +0 -15
- package/dist/pages/formulaTemplate/formulaTemplate.js +0 -154
- package/dist/pages/frolaTextEditor/froala-text-editor.js +0 -12
- package/dist/pages/home.js +0 -49
- package/dist/pages/input/input-text.js +0 -112
- package/dist/pages/list-box-dropdown/listboxdropdown.js +0 -55
- package/dist/pages/loader-indicator/loader-indicator.js +0 -10
- package/dist/pages/mega-mennu/mega-menu.js +0 -84
- package/dist/pages/multi-select-dropdown/multi-select-dropdown.js +0 -51
- package/dist/pages/not-found/not-found.js +0 -10
- package/dist/pages/paginator/pagination.js +0 -122
- package/dist/pages/progress-bar/progress-bar.js +0 -27
- package/dist/pages/progress-steps/progress-steps.js +0 -24
- package/dist/pages/radio-button/radio-button-component.js +0 -11
- package/dist/pages/shadows/shadows.js +0 -7
- package/dist/pages/slideout-menus/slideout-menus.js +0 -104
- package/dist/pages/sliders/slider.js +0 -39
- package/dist/pages/tabels/table-data.js +0 -2193
- package/dist/pages/tabels/table.js +0 -98
- package/dist/pages/tabs/tabs.js +0 -9
- package/dist/pages/tags/tags.js +0 -70
- package/dist/pages/toast/toast.js +0 -47
- package/dist/pages/toggle/toggle.js +0 -10
- package/dist/pages/tooltip/tooltip.js +0 -13
- package/dist/pages/treeDropdownSelect/treedropdowselect.js +0 -34
- package/dist/pages/types/type.js +0 -2
- package/dist/types/pages/aggrid/AgGrid.d.ts +0 -2
- package/dist/types/pages/aggrid/BulkAction.d.ts +0 -2
- package/dist/types/pages/aggrid/RowGroupTrail.d.ts +0 -4
- package/dist/types/pages/aggrid/fakeServer.d.ts +0 -7
- package/dist/types/pages/aggrid/id-cell.d.ts +0 -2
- package/dist/types/pages/aggrid/interface.d.ts +0 -12
- package/dist/types/pages/avatar/avatar.d.ts +0 -2
- package/dist/types/pages/badges/badge.d.ts +0 -3
- package/dist/types/pages/breadcrumb/breadcrumb.d.ts +0 -2
- package/dist/types/pages/button/button.d.ts +0 -2
- package/dist/types/pages/button-group/button-group.d.ts +0 -2
- package/dist/types/pages/chart/chart.d.ts +0 -2
- package/dist/types/pages/checkbox/checkbox.d.ts +0 -2
- package/dist/types/pages/checkbox-group/checkbox-group-component.d.ts +0 -3
- package/dist/types/pages/color-picker/color-picker.d.ts +0 -2
- package/dist/types/pages/content-dividers/content-dividers.d.ts +0 -2
- package/dist/types/pages/custom-color-picker/custom-color-picker.d.ts +0 -2
- package/dist/types/pages/custom-multiselect/CustomMultiSelect.d.ts +0 -2
- package/dist/types/pages/date-picker/date-picker.d.ts +0 -2
- package/dist/types/pages/dropdown/dropdown-component.d.ts +0 -2
- package/dist/types/pages/file-upload/file-upload.d.ts +0 -3
- package/dist/types/pages/flex.d.ts +0 -2
- package/dist/types/pages/formulaTemplate/formulaTemplate.d.ts +0 -2
- package/dist/types/pages/frolaTextEditor/froala-text-editor.d.ts +0 -2
- package/dist/types/pages/home.d.ts +0 -2
- package/dist/types/pages/input/input-text.d.ts +0 -3
- package/dist/types/pages/list-box-dropdown/listboxdropdown.d.ts +0 -2
- package/dist/types/pages/loader-indicator/loader-indicator.d.ts +0 -3
- package/dist/types/pages/mega-mennu/mega-menu.d.ts +0 -2
- package/dist/types/pages/multi-select-dropdown/multi-select-dropdown.d.ts +0 -2
- package/dist/types/pages/not-found/not-found.d.ts +0 -2
- package/dist/types/pages/paginator/pagination.d.ts +0 -2
- package/dist/types/pages/progress-bar/progress-bar.d.ts +0 -3
- package/dist/types/pages/progress-steps/progress-steps.d.ts +0 -2
- package/dist/types/pages/radio-button/radio-button-component.d.ts +0 -2
- package/dist/types/pages/shadows/shadows.d.ts +0 -2
- package/dist/types/pages/slideout-menus/slideout-menus.d.ts +0 -2
- package/dist/types/pages/sliders/slider.d.ts +0 -1
- package/dist/types/pages/tabels/table-data.d.ts +0 -3
- package/dist/types/pages/tabels/table.d.ts +0 -2
- package/dist/types/pages/tabs/tabs.d.ts +0 -3
- package/dist/types/pages/tags/tags.d.ts +0 -3
- package/dist/types/pages/toast/toast.d.ts +0 -2
- package/dist/types/pages/toggle/toggle.d.ts +0 -2
- package/dist/types/pages/tooltip/tooltip.d.ts +0 -2
- package/dist/types/pages/treeDropdownSelect/treedropdowselect.d.ts +0 -2
- package/dist/types/pages/types/type.d.ts +0 -64
|
@@ -14,16 +14,17 @@ const context_provider_1 = tslib_1.__importDefault(require("./context-provider")
|
|
|
14
14
|
const group_checkbox_1 = tslib_1.__importDefault(require("./group-checkbox"));
|
|
15
15
|
const utilComponents_1 = require("./utilComponents");
|
|
16
16
|
function ParentForGrid(props) {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
18
|
const [gridData, setGridData] = (0, react_1.useState)({
|
|
19
19
|
rowData: [],
|
|
20
20
|
columnData: (0, helper_1.sortColumns)(props === null || props === void 0 ? void 0 : props.columnData),
|
|
21
21
|
});
|
|
22
22
|
let maxLength = 0;
|
|
23
|
-
const [style] =
|
|
23
|
+
// const [style] = useState<Style>(props.style);
|
|
24
24
|
const [api, setApi] = (0, react_1.useState)(null);
|
|
25
25
|
const [totalRecords, setTotalRecords] = (0, react_1.useState)(0);
|
|
26
26
|
const [gridReadyEvent, setGridReadyEvent] = (0, react_1.useState)();
|
|
27
|
+
const [intialColumns, setIntialColumns] = (0, react_1.useState)(null);
|
|
27
28
|
const [defaultFilters, setDefaultFilters] = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.defaultFilters) || []);
|
|
28
29
|
const [selectedGroup, setSelectedGroup] = (0, react_1.useState)([]);
|
|
29
30
|
const [emptyResponse] = (0, react_1.useState)({
|
|
@@ -74,6 +75,7 @@ function ParentForGrid(props) {
|
|
|
74
75
|
sortable: false,
|
|
75
76
|
};
|
|
76
77
|
}, []);
|
|
78
|
+
// console.log("propsssssssss", props)
|
|
77
79
|
// Function to handle header checkbox click event
|
|
78
80
|
const handleHeaderCheckbox = (props) => {
|
|
79
81
|
// get the group and subgroupids
|
|
@@ -140,33 +142,34 @@ function ParentForGrid(props) {
|
|
|
140
142
|
});
|
|
141
143
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
142
144
|
const onGridReady = (params, updatedFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
var _r, _s;
|
|
143
146
|
setApi(params.api);
|
|
144
147
|
setGridReadyEvent(params);
|
|
145
148
|
let currentFeatures = updatedFeatures;
|
|
146
149
|
if (!updatedFeatures) {
|
|
147
150
|
currentFeatures = featureDetails;
|
|
148
151
|
}
|
|
149
|
-
if (props.rowModelType === constants_1.ROWMODELTYPE.CLIENT_SIDE) {
|
|
150
|
-
params.api.setGridOption("rowData", []);
|
|
152
|
+
if ((props === null || props === void 0 ? void 0 : props.rowModelType) === (constants_1.ROWMODELTYPE === null || constants_1.ROWMODELTYPE === void 0 ? void 0 : constants_1.ROWMODELTYPE.CLIENT_SIDE)) {
|
|
153
|
+
params === null || params === void 0 ? void 0 : params.api.setGridOption("rowData", []);
|
|
151
154
|
const result = yield getData(0, 0, currentFeatures);
|
|
152
155
|
if (result.rowData) {
|
|
153
156
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: result.rowData }));
|
|
154
157
|
gridRef.current.api.hideOverlay();
|
|
155
|
-
params.api.applyTransaction({ add: result.rowData });
|
|
158
|
+
(_r = params === null || params === void 0 ? void 0 : params.api) === null || _r === void 0 ? void 0 : _r.applyTransaction({ add: result.rowData });
|
|
156
159
|
}
|
|
157
160
|
else {
|
|
158
|
-
params.api.applyTransaction({ add: [] });
|
|
161
|
+
(_s = params === null || params === void 0 ? void 0 : params.api) === null || _s === void 0 ? void 0 : _s.applyTransaction({ add: [] });
|
|
159
162
|
}
|
|
160
163
|
}
|
|
161
164
|
else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
162
165
|
const dataSource = {
|
|
163
166
|
getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
164
|
-
var
|
|
167
|
+
var _t, _u, _v;
|
|
165
168
|
const startRow = params.request.startRow;
|
|
166
169
|
const endRow = params.request.endRow;
|
|
167
170
|
// Scroll should not exit MAX_RECORDS_TO_LOAD
|
|
168
171
|
if (endRow > maxLength && maxLength > 0) {
|
|
169
|
-
gridRef.current.api.hideOverlay();
|
|
172
|
+
(_t = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current.api) === null || _t === void 0 ? void 0 : _t.hideOverlay();
|
|
170
173
|
// supply rows for requested block to grid
|
|
171
174
|
params.success({
|
|
172
175
|
rowData: gridData.rowData,
|
|
@@ -177,7 +180,7 @@ function ParentForGrid(props) {
|
|
|
177
180
|
// get data for request from our fake server
|
|
178
181
|
const response = yield getData(startRow, endRow, currentFeatures, params);
|
|
179
182
|
// simulating real server call with a 500ms delay
|
|
180
|
-
if (((
|
|
183
|
+
if (((_u = response.rowData) === null || _u === void 0 ? void 0 : _u.length) > 0) {
|
|
181
184
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
|
|
182
185
|
gridRef.current.api.hideOverlay();
|
|
183
186
|
// supply rows for requested block to grid
|
|
@@ -187,14 +190,14 @@ function ParentForGrid(props) {
|
|
|
187
190
|
else {
|
|
188
191
|
// params.fail();
|
|
189
192
|
const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
|
|
190
|
-
if (!((
|
|
193
|
+
if (!((_v = params === null || params === void 0 ? void 0 : params.parentNode) === null || _v === void 0 ? void 0 : _v.id))
|
|
191
194
|
gridRef.current.api.showNoRowsOverlay();
|
|
192
195
|
params.success({ rowData: gridRows });
|
|
193
196
|
return;
|
|
194
197
|
}
|
|
195
198
|
}),
|
|
196
199
|
};
|
|
197
|
-
params.api.setGridOption("serverSideDatasource", dataSource);
|
|
200
|
+
params === null || params === void 0 ? void 0 : params.api.setGridOption("serverSideDatasource", dataSource);
|
|
198
201
|
}
|
|
199
202
|
});
|
|
200
203
|
// Specify unique id for every row for grid
|
|
@@ -217,7 +220,7 @@ function ParentForGrid(props) {
|
|
|
217
220
|
var _a;
|
|
218
221
|
// Custom component for specific group header/parent
|
|
219
222
|
const GroupHeaderRenderer = (params) => {
|
|
220
|
-
var _a, _b, _c, _d
|
|
223
|
+
var _a, _b, _c, _d;
|
|
221
224
|
const Wrapper = () => {
|
|
222
225
|
return (0, jsx_runtime_1.jsx)(utilComponents_1.GroupHeader, { params: params });
|
|
223
226
|
};
|
|
@@ -231,18 +234,27 @@ function ParentForGrid(props) {
|
|
|
231
234
|
(0, helper_1.handleUncheckedState)(params, featureDetails, gridData, setFeatureDetails, setSelectedGroup, groupingColumns);
|
|
232
235
|
}
|
|
233
236
|
};
|
|
237
|
+
const HeaderComponent = props === null || props === void 0 ? void 0 : props.rowGroupHeaderComponent;
|
|
234
238
|
// To display checkbox
|
|
235
239
|
if ((_a = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _a === void 0 ? void 0 : _a.displayCheckboxForGroups) {
|
|
236
240
|
// To display checkbox on right
|
|
237
241
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between" }, { children: [(0, jsx_runtime_1.jsx)(group_checkbox_1.default, { checked: (selectedGroup === null || selectedGroup === void 0 ? void 0 : selectedGroup.includes((_b = params === null || params === void 0 ? void 0 : params.node) === null || _b === void 0 ? void 0 : _b.id)) ||
|
|
238
242
|
(((_c = featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.checkBoxSelection) === null || _c === void 0 ? void 0 : _c.allBoxChecked) &&
|
|
239
|
-
!((_d = featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.checkBoxSelection) === null || _d === void 0 ? void 0 : _d.isIndeterminate)), onChange: (e) => onChange(e, params), isIndeterminate: false, shouldRenderOnRight: false }),
|
|
243
|
+
!((_d = featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.checkBoxSelection) === null || _d === void 0 ? void 0 : _d.isIndeterminate)), onChange: (e) => onChange(e, params), isIndeterminate: false, shouldRenderOnRight: false }), props.rowGroupHeaderComponent ?
|
|
244
|
+
(0, jsx_runtime_1.jsx)(HeaderComponent, { params: params }) : params.node.field] })));
|
|
240
245
|
}
|
|
241
246
|
return (0, jsx_runtime_1.jsx)(Wrapper, {});
|
|
242
247
|
};
|
|
248
|
+
const GridHeaderComponent = () => {
|
|
249
|
+
if (props === null || props === void 0 ? void 0 : props.GroupHeaderComponent) {
|
|
250
|
+
const CustomComponent = props === null || props === void 0 ? void 0 : props.GroupHeaderComponent;
|
|
251
|
+
return (0, jsx_runtime_1.jsx)(CustomComponent, {});
|
|
252
|
+
}
|
|
253
|
+
return (0, jsx_runtime_1.jsx)("span", { children: "Group " });
|
|
254
|
+
};
|
|
243
255
|
// Cell renderer with checkbox
|
|
244
256
|
const cellRendererConditionally = (params) => {
|
|
245
|
-
var _a, _b;
|
|
257
|
+
var _a, _b, _c;
|
|
246
258
|
if ((_a = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _a === void 0 ? void 0 : _a.displayCheckboxForGroupChild) {
|
|
247
259
|
if (!(props === null || props === void 0 ? void 0 : props.ChildComponentForGroup)) {
|
|
248
260
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between" }, { children: [cellCheckBoxRenderer(params), (0, jsx_runtime_1.jsx)("p", { children: params === null || params === void 0 ? void 0 : params.data[props === null || props === void 0 ? void 0 : props.groupField] })] })));
|
|
@@ -250,7 +262,7 @@ function ParentForGrid(props) {
|
|
|
250
262
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: ((_b = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _b === void 0 ? void 0 : _b.displayCheckboxOnRight) ? ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between" }, { children: [props === null || props === void 0 ? void 0 : props.ChildComponentForGroup(params), cellCheckBoxRenderer(params)] }))) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center justify-content-between" }, { children: [cellCheckBoxRenderer(params), props === null || props === void 0 ? void 0 : props.ChildComponentForGroup(params)] }))) }));
|
|
251
263
|
}
|
|
252
264
|
else {
|
|
253
|
-
return (0, jsx_runtime_1.
|
|
265
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(props === null || props === void 0 ? void 0 : props.ChildComponentForGroup) ? props === null || props === void 0 ? void 0 : props.ChildComponentForGroup(params) : (0, jsx_runtime_1.jsx)("span", { children: params === null || params === void 0 ? void 0 : params.data[(_c = params === null || params === void 0 ? void 0 : params.colDef) === null || _c === void 0 ? void 0 : _c.field] }), " "] });
|
|
254
266
|
}
|
|
255
267
|
};
|
|
256
268
|
// Group default values
|
|
@@ -259,24 +271,32 @@ function ParentForGrid(props) {
|
|
|
259
271
|
return (0, helper_1.autoGroupColumnDef)((props === null || props === void 0 ? void 0 : props.enableTree) ? true : false, // If tree enable
|
|
260
272
|
props === null || props === void 0 ? void 0 : props.treeHeaderName, // Tree header name
|
|
261
273
|
props === null || props === void 0 ? void 0 : props.groupField, // Group field
|
|
262
|
-
|
|
274
|
+
GridHeaderComponent, // Header component
|
|
263
275
|
headerCheckBoxRenderer, //
|
|
264
|
-
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount,
|
|
265
|
-
);
|
|
276
|
+
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount, parseInt(props === null || props === void 0 ? void 0 : props.rowGroupColumnWidth), // for grouped column width
|
|
277
|
+
cellRendererConditionally, GroupHeaderRenderer);
|
|
266
278
|
}
|
|
267
279
|
else {
|
|
268
280
|
return (0, helper_1.autoGroupColumnDef)((props === null || props === void 0 ? void 0 : props.enableTree) ? true : false, // If tree enable
|
|
269
281
|
props === null || props === void 0 ? void 0 : props.treeHeaderName, // Tree header name
|
|
270
282
|
props === null || props === void 0 ? void 0 : props.groupField, // Group field
|
|
271
|
-
|
|
283
|
+
GridHeaderComponent, // Header component
|
|
272
284
|
headerCheckBoxRenderer, //
|
|
273
|
-
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount,
|
|
274
|
-
);
|
|
285
|
+
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount, parseInt(props === null || props === void 0 ? void 0 : props.rowGroupColumnWidth), // for grouped column width
|
|
286
|
+
GroupHeaderRenderer);
|
|
275
287
|
}
|
|
276
288
|
};
|
|
289
|
+
(0, react_1.useEffect)(() => {
|
|
290
|
+
// Initialize `intialColumns` only if it hasn't been set yet
|
|
291
|
+
if (!intialColumns) {
|
|
292
|
+
// Perform a deep copy of the columns array using `JSON.parse(JSON.stringify())`
|
|
293
|
+
const deepCopyOfColumns = (0, helper_1.deepClone)(gridData === null || gridData === void 0 ? void 0 : gridData.columnData);
|
|
294
|
+
setIntialColumns(deepCopyOfColumns);
|
|
295
|
+
}
|
|
296
|
+
}, [intialColumns]);
|
|
297
|
+
const gridStyle = Object.assign({ width: (_c = props === null || props === void 0 ? void 0 : props.style) === null || _c === void 0 ? void 0 : _c.width }, ((totalRecords > 6 || !((_d = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _d === void 0 ? void 0 : _d.isGridAutoHeight)) ? { height: (_e = props === null || props === void 0 ? void 0 : props.style) === null || _e === void 0 ? void 0 : _e.height } : null));
|
|
277
298
|
// Options that grid should have
|
|
278
|
-
const gridOptions = {
|
|
279
|
-
columnDefs: (_c = gridData === null || gridData === void 0 ? void 0 : gridData.columnData) === null || _c === void 0 ? void 0 : _c.map((column) => {
|
|
299
|
+
const gridOptions = Object.assign({ columnDefs: (_f = gridData === null || gridData === void 0 ? void 0 : gridData.columnData) === null || _f === void 0 ? void 0 : _f.map((column) => {
|
|
280
300
|
var _a, _b;
|
|
281
301
|
if ((column === null || column === void 0 ? void 0 : column.enableChildCheckbox) && (column === null || column === void 0 ? void 0 : column.enableHeaderCheckbox)) {
|
|
282
302
|
return Object.assign(Object.assign({}, column), { headerComponent: (params) => headerCheckBoxRenderer(params === null || params === void 0 ? void 0 : params.displayName, (column === null || column === void 0 ? void 0 : column.headerComponent) && ""), cellRenderer: (params) => (0, utilComponents_1.dataCellRenderer)(params, column, props), cellRendererParams: {
|
|
@@ -287,33 +307,8 @@ function ParentForGrid(props) {
|
|
|
287
307
|
else {
|
|
288
308
|
return Object.assign(Object.assign({}, column), { headerName: (_b = column === null || column === void 0 ? void 0 : column.headerName) === null || _b === void 0 ? void 0 : _b.toUpperCase() });
|
|
289
309
|
}
|
|
290
|
-
}),
|
|
291
|
-
|
|
292
|
-
treeData: (props === null || props === void 0 ? void 0 : props.enableTree) ? props === null || props === void 0 ? void 0 : props.enableTree : false,
|
|
293
|
-
getDataPath: (props === null || props === void 0 ? void 0 : props.enableTree) ? getDataPath : null,
|
|
294
|
-
defaultColDef: defaultColDef,
|
|
295
|
-
suppressMenuHide: false,
|
|
296
|
-
rowSelection: "multiple",
|
|
297
|
-
suppressRowClickSelection: true,
|
|
298
|
-
headerHeight: props === null || props === void 0 ? void 0 : props.columnHeaderHeight,
|
|
299
|
-
rowHeight: constants_1.ROW_HEIGHT,
|
|
300
|
-
rowModelType: props.rowModelType,
|
|
301
|
-
pinnedTopRowData: props === null || props === void 0 ? void 0 : props.pinnedTopRowData,
|
|
302
|
-
cacheBlockSize: constants_1.BLOCK_SIZE,
|
|
303
|
-
maxBlocksInCache: constants_1.MAX_BLOCKS,
|
|
304
|
-
blockLoadDebounceMillis: constants_1.DEBOUNCE_INTERVAL,
|
|
305
|
-
noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent,
|
|
306
|
-
loadingOverlayComponent: loading_component_1.default,
|
|
307
|
-
suppressCellFocus: true,
|
|
308
|
-
suppressPropertyNamesCheck: true,
|
|
309
|
-
suppressServerSideFullWidthLoadingRow: true,
|
|
310
|
-
enableRangeSelection: (_d = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _d === void 0 ? void 0 : _d.enableFillHandle,
|
|
311
|
-
enableFillHandle: (_e = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _e === void 0 ? void 0 : _e.enableFillHandle,
|
|
312
|
-
onFillEnd: wrapperToFillOpertation,
|
|
313
|
-
fillOperation: myOpertaion,
|
|
314
|
-
getRowId: getRowId,
|
|
315
|
-
fillHandleDirection: "y",
|
|
316
|
-
};
|
|
310
|
+
}), autoGroupColumnDef: manageColumnGrouping(), treeData: (props === null || props === void 0 ? void 0 : props.enableTree) ? props === null || props === void 0 ? void 0 : props.enableTree : false, getDataPath: (props === null || props === void 0 ? void 0 : props.enableTree) ? getDataPath : null, defaultColDef: defaultColDef, suppressMenuHide: false, rowSelection: "multiple", suppressRowClickSelection: true, headerHeight: props === null || props === void 0 ? void 0 : props.columnHeaderHeight, rowHeight: constants_1.ROW_HEIGHT, rowModelType: props.rowModelType, pinnedTopRowData: props === null || props === void 0 ? void 0 : props.pinnedTopRowData, cacheBlockSize: constants_1.BLOCK_SIZE, maxBlocksInCache: constants_1.MAX_BLOCKS, blockLoadDebounceMillis: constants_1.DEBOUNCE_INTERVAL, noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent, loadingOverlayComponent: loading_component_1.default, suppressCellFocus: true, suppressPropertyNamesCheck: true, suppressServerSideFullWidthLoadingRow: true, enableRangeSelection: (_g = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _g === void 0 ? void 0 : _g.enableFillHandle, enableFillHandle: (_h = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _h === void 0 ? void 0 : _h.enableFillHandle, onFillEnd: wrapperToFillOpertation, fillOperation: myOpertaion, getRowId: getRowId, fillHandleDirection: "y" }, ((totalRecords < 6 && ((_j = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _j === void 0 ? void 0 : _j.isGridAutoHeight)) ? { domLayout: 'autoHeight' } : { domLayout: undefined }) // for auto height based on table content and isGridAutoHeight set to true
|
|
311
|
+
);
|
|
317
312
|
// Fucntion to call the grid
|
|
318
313
|
const callGrid = (featureDetails) => {
|
|
319
314
|
onGridReady(gridReadyEvent, featureDetails);
|
|
@@ -371,7 +366,7 @@ function ParentForGrid(props) {
|
|
|
371
366
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { checkBoxSelection: initialCheckBoxData }));
|
|
372
367
|
}
|
|
373
368
|
}, [props === null || props === void 0 ? void 0 : props.emptyCheckboxStatus]);
|
|
374
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(error_ui_1.default, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { height:
|
|
369
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(error_ui_1.default, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ style: { height: gridStyle === null || gridStyle === void 0 ? void 0 : gridStyle.height, width: gridStyle === null || gridStyle === void 0 ? void 0 : gridStyle.width }, className: "ag-grid-container" }, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(context_provider_1.default, Object.assign({ value: {
|
|
375
370
|
featureDetails,
|
|
376
371
|
setFeatureDetails,
|
|
377
372
|
gridData,
|
|
@@ -380,11 +375,11 @@ function ParentForGrid(props) {
|
|
|
380
375
|
initialFeature,
|
|
381
376
|
defaultFilters,
|
|
382
377
|
createView: props === null || props === void 0 ? void 0 : props.createView,
|
|
383
|
-
enableViewCreate: (
|
|
384
|
-
filterModelText: (
|
|
385
|
-
sortModelText: (
|
|
386
|
-
recordDetailModelText: (
|
|
387
|
-
sidePanelText: (
|
|
378
|
+
enableViewCreate: (_k = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _k === void 0 ? void 0 : _k.enableViewCreate,
|
|
379
|
+
filterModelText: (_l = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _l === void 0 ? void 0 : _l.filterModelText,
|
|
380
|
+
sortModelText: (_m = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _m === void 0 ? void 0 : _m.sortModelText,
|
|
381
|
+
recordDetailModelText: (_o = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _o === void 0 ? void 0 : _o.recordDetailModelText,
|
|
382
|
+
sidePanelText: (_p = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _p === void 0 ? void 0 : _p.sidePanelText,
|
|
388
383
|
sortOptions: (props === null || props === void 0 ? void 0 : props.sortOptions)
|
|
389
384
|
? props.sortOptions
|
|
390
385
|
: constants_1.COLUMN_SORT_OPTIONS,
|
|
@@ -398,6 +393,8 @@ function ParentForGrid(props) {
|
|
|
398
393
|
selectedGroup: selectedGroup,
|
|
399
394
|
setSelectedGroup: setSelectedGroup,
|
|
400
395
|
initialCheckBoxData: initialCheckBoxData,
|
|
401
|
-
|
|
396
|
+
intialColumns,
|
|
397
|
+
setIntialColumns
|
|
398
|
+
} }, { children: ((_q = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _q === void 0 ? void 0 : _q.displayFeaturesHeader) && ((0, jsx_runtime_1.jsx)(advanced_feature_1.default, { props: props })) })), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: gridStyle, gridOptions: gridOptions, onGridReady: onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
402
399
|
}
|
|
403
400
|
exports.default = ParentForGrid;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GroupHeader = exports.dataCellRenderer = void 0;
|
|
3
|
+
exports.GridHeaderComponent = exports.GroupHeader = exports.dataCellRenderer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
// import Checkbox from "./grid-checkbox";
|
|
6
6
|
// Render checkbox as well as initial component/data from props
|
|
@@ -16,3 +16,9 @@ const GroupHeader = (params) => {
|
|
|
16
16
|
return (0, jsx_runtime_1.jsx)("p", { children: "My Custom Group" });
|
|
17
17
|
};
|
|
18
18
|
exports.GroupHeader = GroupHeader;
|
|
19
|
+
const GridHeaderComponent = (props) => {
|
|
20
|
+
if (props === null || props === void 0 ? void 0 : props.GroupHeaderComponent)
|
|
21
|
+
return props === null || props === void 0 ? void 0 : props.GroupHeaderComponent;
|
|
22
|
+
return (0, jsx_runtime_1.jsx)("span", { children: "Group" });
|
|
23
|
+
};
|
|
24
|
+
exports.GridHeaderComponent = GridHeaderComponent;
|
|
@@ -274,8 +274,8 @@ const FormulaComponent = (props) => {
|
|
|
274
274
|
const onFilter = (e) => {
|
|
275
275
|
if (e.target.value) {
|
|
276
276
|
let opts = props === null || props === void 0 ? void 0 : props.fieldOptions.filter((x) => {
|
|
277
|
-
var _a, _b;
|
|
278
|
-
return (_b = (_a = x === null || x === void 0 ? void 0 : x[props === null || props === void 0 ? void 0 : props.fieldFilterOption]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(e.target.value.toLowerCase());
|
|
277
|
+
var _a, _b, _c, _d;
|
|
278
|
+
return (_b = (_a = x === null || x === void 0 ? void 0 : x[props === null || props === void 0 ? void 0 : props.fieldFilterOption]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes((_d = (_c = e === null || e === void 0 ? void 0 : e.target) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.toLowerCase());
|
|
279
279
|
});
|
|
280
280
|
setFieldOptions(opts);
|
|
281
281
|
}
|
|
@@ -13,7 +13,8 @@ const MultiSelectDropDown = (props) => {
|
|
|
13
13
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.dropdownType === "status" ?
|
|
14
14
|
(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'select_status_prv absolute left_section_item z-5' }, { children: items.length > 0 ?
|
|
15
15
|
(0, jsx_runtime_1.jsx)("ul", Object.assign({ className: 'p-0 m-0 list-none' }, { children: items.map((status, i) => {
|
|
16
|
-
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return (0, jsx_runtime_1.jsx)("li", { style: { background: status.color }, className: `${(_b = (_a = status === null || status === void 0 ? void 0 : status.name) === null || _a === void 0 ? void 0 : _a.replaceAll(' ', '')) === null || _b === void 0 ? void 0 : _b.toLowerCase()}` }, i);
|
|
17
18
|
}) }))
|
|
18
19
|
:
|
|
19
20
|
(0, jsx_runtime_1.jsx)("ul", Object.assign({ className: 'p-0 m-0 list-none' }, { children: (0, jsx_runtime_1.jsx)("li", { className: 'all' }) })) }))
|
|
@@ -43,7 +44,8 @@ const MultiSelectDropDown = (props) => {
|
|
|
43
44
|
setItems(props.value);
|
|
44
45
|
}, [props.value]);
|
|
45
46
|
const itemTemplate = (option) => {
|
|
46
|
-
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `status_dropdown_item pl-6 ${(_b = (_a = option === null || option === void 0 ? void 0 : option.name) === null || _a === void 0 ? void 0 : _a.replaceAll(' ', '')) === null || _b === void 0 ? void 0 : _b.toLowerCase()}` }, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'status_dot', style: { background: option.color } }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'otption_name mr-8' }, { children: option.name }))] })) }));
|
|
47
49
|
};
|
|
48
50
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.dropdownType === 'withIcon' &&
|
|
49
51
|
(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `sc_custom_multiselect flex align-items-center relative ${props.className} ${isMoreThanOne ? `selected_multile ${`selected_num_` + items.length}` : ''}` }, { children: [(0, jsx_runtime_1.jsx)(LeftSection, {}), (0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { panelClassName: `Multi_select_dropdown_panel panel_${props.dropdownType} ${props.panelClassName} ${props.hidePanelHeader !== undefined ? 'hidePanelHeader' : ''}`, value: items, onChange: (e) => onChange(e), options: props.options, optionLabel: "name", filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, style: { minWidth: props.dropdownWidth ? props.dropdownWidth + 'px' : '', maxWidth: props.dropdownWidth ? props.dropdownWidth + 'px' : '' }, className: `w-full md:w-20rem ${props.maxWidth ? `${'optionBodyMaxWidth_' + props.maxWidth}` : ''}`, panelStyle: { width: props.panelWidth ? props.panelWidth + 'px' : '' } }), items.length > 0 &&
|
|
@@ -103,6 +103,7 @@ export interface ConditionsToDisplay {
|
|
|
103
103
|
displayCheckboxForGroups?: boolean;
|
|
104
104
|
displayGroupCount?: boolean;
|
|
105
105
|
displayRowGroupingElement?: boolean;
|
|
106
|
+
isGridAutoHeight?: boolean;
|
|
106
107
|
}
|
|
107
108
|
export interface PropsFromProduct {
|
|
108
109
|
columnData: ColumnDef[];
|
|
@@ -142,6 +143,8 @@ export interface PropsFromProduct {
|
|
|
142
143
|
columnHeaderHeight?: number;
|
|
143
144
|
AdvancedFilter?: React.FC;
|
|
144
145
|
removeCallBack?: (featureDetails: Features) => void;
|
|
146
|
+
rowGroupHeaderComponent: React.FC;
|
|
147
|
+
rowGroupColumnWidth: string | number;
|
|
145
148
|
}
|
|
146
149
|
export interface ResoponseFromCallback {
|
|
147
150
|
totalRecords: number;
|
|
@@ -27,6 +27,8 @@ interface MyProviderProps {
|
|
|
27
27
|
setSelectedGroup: (group: string[]) => void;
|
|
28
28
|
selectedGroup: string[];
|
|
29
29
|
initialCheckBoxData: CheckBoxSelection;
|
|
30
|
+
intialColumns: ColumnDef[];
|
|
31
|
+
setIntialColumns: React.Dispatch<React.SetStateAction<any>>;
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
declare function MyProvider({ children, value }: MyProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ export declare const sortColumns: (columns: any) => any;
|
|
|
7
7
|
export declare const getCheckedStatus: (row: any, featureDetails: any, GRID_CHECKBOX_STATUS: any, setFeatureDetails: any) => any;
|
|
8
8
|
export declare const updateCells: (updatedRowData: any, setUpdateRowData: any, api: any) => void;
|
|
9
9
|
export declare const fillOperation: (params: any, api: any, editedRecords: any, setEditedRecords: any) => Promise<void>;
|
|
10
|
-
export declare const autoGroupColumnDef: (isTreeEnable: boolean, headerName: string, groupField: string, GroupHeaderComponent: React.FC, headerCheckboxRenderer: React.FC, enableCheckboxForGroupHeader: boolean, displayGroupCount: boolean, ChildRendererForGroup?: React.FC, HeaderRendererForGroup?: React.FC) => {
|
|
10
|
+
export declare const autoGroupColumnDef: (isTreeEnable: boolean, headerName: string, groupField: string, GroupHeaderComponent: React.FC, headerCheckboxRenderer: React.FC, enableCheckboxForGroupHeader: boolean, displayGroupCount: boolean, rowGroupColumnWidth: number, ChildRendererForGroup?: React.FC, HeaderRendererForGroup?: React.FC) => {
|
|
11
11
|
headerName: string;
|
|
12
12
|
minWidth: number;
|
|
13
13
|
cellRendererParams: {
|
|
@@ -20,6 +20,7 @@ export declare const autoGroupColumnDef: (isTreeEnable: boolean, headerName: str
|
|
|
20
20
|
field: string;
|
|
21
21
|
headerComponent: React.FC<{}> | (() => React.ReactElement<any, any>);
|
|
22
22
|
cellRenderer: string;
|
|
23
|
+
minWidth: number;
|
|
23
24
|
cellRendererParams: (params: any) => {
|
|
24
25
|
suppressCount: boolean;
|
|
25
26
|
innerRenderer: React.FC<{}>;
|
|
@@ -34,10 +35,9 @@ export declare const autoGroupColumnDef: (isTreeEnable: boolean, headerName: str
|
|
|
34
35
|
checkbox?: undefined;
|
|
35
36
|
};
|
|
36
37
|
headerName?: undefined;
|
|
37
|
-
minWidth?: undefined;
|
|
38
38
|
};
|
|
39
39
|
export declare const updateRecords: (rowData: any, featureDetails: any, gridData: any) => any;
|
|
40
|
-
export declare const determineConditions: (isChecked: any, allBoxChecked: any, isEveryParentGroupInclude: any,
|
|
40
|
+
export declare const determineConditions: (isChecked: any, allBoxChecked: any, isEveryParentGroupInclude: any, isEverySuperParentGroupInclude: any, isSomeParentGroupExcluded: any, isSomeSuperParentGroupExcluded: any) => {
|
|
41
41
|
addParent: any;
|
|
42
42
|
addSuperParent: any;
|
|
43
43
|
removeParent: any;
|
|
@@ -51,3 +51,4 @@ export declare const getGroupIds: (gridRef: any) => {
|
|
|
51
51
|
secondGroupIds: string[];
|
|
52
52
|
};
|
|
53
53
|
export declare const handleCheckboxClick: (e: any, params: any, featureDetails: any, gridData: any, setFeatureDetails: any, groupingColumns: any, setSelectedGroup: any) => void;
|
|
54
|
+
export declare const deepClone: (obj: any) => any;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const dataCellRenderer: (cellRendererParams: any, column: any, props: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export declare const GroupHeader: (params: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const GridHeaderComponent: (props: any) => any;
|