sccoreui 6.2.16 → 6.2.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/dist/App.scss +23 -11
- package/dist/assets/svg/svg.js +38 -163
- package/dist/components/ag-grid/AgGrid.js +1 -1
- package/dist/components/ag-grid/advancedFeature/column-group.js +45 -100
- package/dist/components/ag-grid/advancedFeature/hide-column.js +2 -2
- package/dist/components/ag-grid/context-provider.js +3 -6
- package/dist/components/ag-grid/helper.js +70 -147
- package/dist/components/ag-grid/parent-for-grid.js +57 -54
- package/dist/components/ag-grid/utilComponents.js +1 -7
- package/dist/components/formula-template/FormulaCoponent.js +2 -2
- package/dist/components/multi-select-dropdown/multi-select-dropdown.js +2 -4
- package/dist/pages/aggrid/AgGrid.js +606 -0
- package/dist/pages/aggrid/BulkAction.js +7 -0
- package/dist/pages/aggrid/RowGroupTrail.js +114 -0
- package/dist/pages/aggrid/fakeServer.js +95 -0
- package/dist/pages/aggrid/id-cell.js +9 -0
- package/dist/pages/aggrid/interface.js +2 -0
- package/dist/pages/avatar/avatar.js +338 -0
- package/dist/pages/badges/badge.js +73 -0
- package/dist/pages/breadcrumb/breadcrumb.js +14 -0
- package/dist/pages/button/button.js +10 -0
- package/dist/pages/button-group/button-group.js +10 -0
- package/dist/pages/chart/chart.js +257 -0
- package/dist/pages/checkbox/checkbox.js +26 -0
- package/dist/pages/checkbox-group/checkbox-group-component.js +21 -0
- package/dist/pages/color-picker/color-picker.js +13 -0
- package/dist/pages/content-dividers/content-dividers.js +11 -0
- package/dist/pages/custom-color-picker/custom-color-picker.js +12 -0
- package/dist/pages/custom-multiselect/CustomMultiSelect.js +37 -0
- package/dist/pages/date-picker/date-picker.js +20 -0
- package/dist/pages/dropdown/dropdown-component.js +39 -0
- package/dist/pages/file-upload/file-upload.js +34 -0
- package/dist/pages/flex.js +15 -0
- package/dist/pages/formulaTemplate/formulaTemplate.js +154 -0
- package/dist/pages/frolaTextEditor/froala-text-editor.js +12 -0
- package/dist/pages/home.js +49 -0
- package/dist/pages/input/input-text.js +112 -0
- package/dist/pages/list-box-dropdown/listboxdropdown.js +55 -0
- package/dist/pages/loader-indicator/loader-indicator.js +10 -0
- package/dist/pages/mega-mennu/mega-menu.js +84 -0
- package/dist/pages/multi-select-dropdown/multi-select-dropdown.js +51 -0
- package/dist/pages/not-found/not-found.js +10 -0
- package/dist/pages/paginator/pagination.js +122 -0
- package/dist/pages/progress-bar/progress-bar.js +27 -0
- package/dist/pages/progress-steps/progress-steps.js +24 -0
- package/dist/pages/radio-button/radio-button-component.js +11 -0
- package/dist/pages/shadows/shadows.js +7 -0
- package/dist/pages/slideout-menus/slideout-menus.js +104 -0
- package/dist/pages/sliders/slider.js +39 -0
- package/dist/pages/tabels/table-data.js +2193 -0
- package/dist/pages/tabels/table.js +98 -0
- package/dist/pages/tabs/tabs.js +9 -0
- package/dist/pages/tags/tags.js +70 -0
- package/dist/pages/toast/toast.js +47 -0
- package/dist/pages/toggle/toggle.js +10 -0
- package/dist/pages/tooltip/tooltip.js +13 -0
- package/dist/pages/treeDropdownSelect/treedropdowselect.js +34 -0
- package/dist/pages/types/type.js +2 -0
- package/dist/types/components/ag-grid/Types.d.ts +0 -3
- package/dist/types/components/ag-grid/context-provider.d.ts +0 -2
- package/dist/types/components/ag-grid/helper.d.ts +3 -4
- package/dist/types/components/ag-grid/utilComponents.d.ts +0 -1
- package/dist/types/pages/aggrid/AgGrid.d.ts +2 -0
- package/dist/types/pages/aggrid/BulkAction.d.ts +2 -0
- package/dist/types/pages/aggrid/RowGroupTrail.d.ts +4 -0
- package/dist/types/pages/aggrid/fakeServer.d.ts +7 -0
- package/dist/types/pages/aggrid/id-cell.d.ts +2 -0
- package/dist/types/pages/aggrid/interface.d.ts +12 -0
- package/dist/types/pages/avatar/avatar.d.ts +2 -0
- package/dist/types/pages/badges/badge.d.ts +3 -0
- package/dist/types/pages/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/types/pages/button/button.d.ts +2 -0
- package/dist/types/pages/button-group/button-group.d.ts +2 -0
- package/dist/types/pages/chart/chart.d.ts +2 -0
- package/dist/types/pages/checkbox/checkbox.d.ts +2 -0
- package/dist/types/pages/checkbox-group/checkbox-group-component.d.ts +3 -0
- package/dist/types/pages/color-picker/color-picker.d.ts +2 -0
- package/dist/types/pages/content-dividers/content-dividers.d.ts +2 -0
- package/dist/types/pages/custom-color-picker/custom-color-picker.d.ts +2 -0
- package/dist/types/pages/custom-multiselect/CustomMultiSelect.d.ts +2 -0
- package/dist/types/pages/date-picker/date-picker.d.ts +2 -0
- package/dist/types/pages/dropdown/dropdown-component.d.ts +2 -0
- package/dist/types/pages/file-upload/file-upload.d.ts +3 -0
- package/dist/types/pages/flex.d.ts +2 -0
- package/dist/types/pages/formulaTemplate/formulaTemplate.d.ts +2 -0
- package/dist/types/pages/frolaTextEditor/froala-text-editor.d.ts +2 -0
- package/dist/types/pages/home.d.ts +2 -0
- package/dist/types/pages/input/input-text.d.ts +3 -0
- package/dist/types/pages/list-box-dropdown/listboxdropdown.d.ts +2 -0
- package/dist/types/pages/loader-indicator/loader-indicator.d.ts +3 -0
- package/dist/types/pages/mega-mennu/mega-menu.d.ts +2 -0
- package/dist/types/pages/multi-select-dropdown/multi-select-dropdown.d.ts +2 -0
- package/dist/types/pages/not-found/not-found.d.ts +2 -0
- package/dist/types/pages/paginator/pagination.d.ts +2 -0
- package/dist/types/pages/progress-bar/progress-bar.d.ts +3 -0
- package/dist/types/pages/progress-steps/progress-steps.d.ts +2 -0
- package/dist/types/pages/radio-button/radio-button-component.d.ts +2 -0
- package/dist/types/pages/shadows/shadows.d.ts +2 -0
- package/dist/types/pages/slideout-menus/slideout-menus.d.ts +2 -0
- package/dist/types/pages/sliders/slider.d.ts +1 -0
- package/dist/types/pages/tabels/table-data.d.ts +3 -0
- package/dist/types/pages/tabels/table.d.ts +2 -0
- package/dist/types/pages/tabs/tabs.d.ts +3 -0
- package/dist/types/pages/tags/tags.d.ts +3 -0
- package/dist/types/pages/toast/toast.d.ts +2 -0
- package/dist/types/pages/toggle/toggle.d.ts +2 -0
- package/dist/types/pages/tooltip/tooltip.d.ts +2 -0
- package/dist/types/pages/treeDropdownSelect/treedropdowselect.d.ts +2 -0
- package/dist/types/pages/types/type.d.ts +64 -0
- package/package.json +1 -1
|
@@ -14,17 +14,16 @@ 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;
|
|
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
|
-
|
|
23
|
+
const [style] = (0, react_1.useState)(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);
|
|
28
27
|
const [defaultFilters, setDefaultFilters] = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.defaultFilters) || []);
|
|
29
28
|
const [selectedGroup, setSelectedGroup] = (0, react_1.useState)([]);
|
|
30
29
|
const [emptyResponse] = (0, react_1.useState)({
|
|
@@ -75,7 +74,6 @@ function ParentForGrid(props) {
|
|
|
75
74
|
sortable: false,
|
|
76
75
|
};
|
|
77
76
|
}, []);
|
|
78
|
-
// console.log("propsssssssss", props)
|
|
79
77
|
// Function to handle header checkbox click event
|
|
80
78
|
const handleHeaderCheckbox = (props) => {
|
|
81
79
|
// get the group and subgroupids
|
|
@@ -142,34 +140,33 @@ function ParentForGrid(props) {
|
|
|
142
140
|
});
|
|
143
141
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
144
142
|
const onGridReady = (params, updatedFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
var _r, _s;
|
|
146
143
|
setApi(params.api);
|
|
147
144
|
setGridReadyEvent(params);
|
|
148
145
|
let currentFeatures = updatedFeatures;
|
|
149
146
|
if (!updatedFeatures) {
|
|
150
147
|
currentFeatures = featureDetails;
|
|
151
148
|
}
|
|
152
|
-
if (
|
|
153
|
-
params
|
|
149
|
+
if (props.rowModelType === constants_1.ROWMODELTYPE.CLIENT_SIDE) {
|
|
150
|
+
params.api.setGridOption("rowData", []);
|
|
154
151
|
const result = yield getData(0, 0, currentFeatures);
|
|
155
152
|
if (result.rowData) {
|
|
156
153
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: result.rowData }));
|
|
157
154
|
gridRef.current.api.hideOverlay();
|
|
158
|
-
|
|
155
|
+
params.api.applyTransaction({ add: result.rowData });
|
|
159
156
|
}
|
|
160
157
|
else {
|
|
161
|
-
|
|
158
|
+
params.api.applyTransaction({ add: [] });
|
|
162
159
|
}
|
|
163
160
|
}
|
|
164
161
|
else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
165
162
|
const dataSource = {
|
|
166
163
|
getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
var
|
|
164
|
+
var _m, _o;
|
|
168
165
|
const startRow = params.request.startRow;
|
|
169
166
|
const endRow = params.request.endRow;
|
|
170
167
|
// Scroll should not exit MAX_RECORDS_TO_LOAD
|
|
171
168
|
if (endRow > maxLength && maxLength > 0) {
|
|
172
|
-
|
|
169
|
+
gridRef.current.api.hideOverlay();
|
|
173
170
|
// supply rows for requested block to grid
|
|
174
171
|
params.success({
|
|
175
172
|
rowData: gridData.rowData,
|
|
@@ -180,7 +177,7 @@ function ParentForGrid(props) {
|
|
|
180
177
|
// get data for request from our fake server
|
|
181
178
|
const response = yield getData(startRow, endRow, currentFeatures, params);
|
|
182
179
|
// simulating real server call with a 500ms delay
|
|
183
|
-
if (((
|
|
180
|
+
if (((_m = response.rowData) === null || _m === void 0 ? void 0 : _m.length) > 0) {
|
|
184
181
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
|
|
185
182
|
gridRef.current.api.hideOverlay();
|
|
186
183
|
// supply rows for requested block to grid
|
|
@@ -190,14 +187,14 @@ function ParentForGrid(props) {
|
|
|
190
187
|
else {
|
|
191
188
|
// params.fail();
|
|
192
189
|
const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
|
|
193
|
-
if (!((
|
|
190
|
+
if (!((_o = params === null || params === void 0 ? void 0 : params.parentNode) === null || _o === void 0 ? void 0 : _o.id))
|
|
194
191
|
gridRef.current.api.showNoRowsOverlay();
|
|
195
192
|
params.success({ rowData: gridRows });
|
|
196
193
|
return;
|
|
197
194
|
}
|
|
198
195
|
}),
|
|
199
196
|
};
|
|
200
|
-
params
|
|
197
|
+
params.api.setGridOption("serverSideDatasource", dataSource);
|
|
201
198
|
}
|
|
202
199
|
});
|
|
203
200
|
// Specify unique id for every row for grid
|
|
@@ -220,7 +217,7 @@ function ParentForGrid(props) {
|
|
|
220
217
|
var _a;
|
|
221
218
|
// Custom component for specific group header/parent
|
|
222
219
|
const GroupHeaderRenderer = (params) => {
|
|
223
|
-
var _a, _b, _c, _d;
|
|
220
|
+
var _a, _b, _c, _d, _e;
|
|
224
221
|
const Wrapper = () => {
|
|
225
222
|
return (0, jsx_runtime_1.jsx)(utilComponents_1.GroupHeader, { params: params });
|
|
226
223
|
};
|
|
@@ -234,27 +231,18 @@ function ParentForGrid(props) {
|
|
|
234
231
|
(0, helper_1.handleUncheckedState)(params, featureDetails, gridData, setFeatureDetails, setSelectedGroup, groupingColumns);
|
|
235
232
|
}
|
|
236
233
|
};
|
|
237
|
-
const HeaderComponent = props === null || props === void 0 ? void 0 : props.rowGroupHeaderComponent;
|
|
238
234
|
// To display checkbox
|
|
239
235
|
if ((_a = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _a === void 0 ? void 0 : _a.displayCheckboxForGroups) {
|
|
240
236
|
// To display checkbox on right
|
|
241
237
|
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)) ||
|
|
242
238
|
(((_c = featureDetails === null || featureDetails === void 0 ? void 0 : featureDetails.checkBoxSelection) === null || _c === void 0 ? void 0 : _c.allBoxChecked) &&
|
|
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 }),
|
|
244
|
-
(0, jsx_runtime_1.jsx)(HeaderComponent, { params: params }) : params.node.field] })));
|
|
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 }), (0, jsx_runtime_1.jsx)("span", { children: (_e = params === null || params === void 0 ? void 0 : params.node) === null || _e === void 0 ? void 0 : _e.id })] })));
|
|
245
240
|
}
|
|
246
241
|
return (0, jsx_runtime_1.jsx)(Wrapper, {});
|
|
247
242
|
};
|
|
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
|
-
};
|
|
255
243
|
// Cell renderer with checkbox
|
|
256
244
|
const cellRendererConditionally = (params) => {
|
|
257
|
-
var _a, _b
|
|
245
|
+
var _a, _b;
|
|
258
246
|
if ((_a = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _a === void 0 ? void 0 : _a.displayCheckboxForGroupChild) {
|
|
259
247
|
if (!(props === null || props === void 0 ? void 0 : props.ChildComponentForGroup)) {
|
|
260
248
|
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] })] })));
|
|
@@ -262,7 +250,7 @@ function ParentForGrid(props) {
|
|
|
262
250
|
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)] }))) }));
|
|
263
251
|
}
|
|
264
252
|
else {
|
|
265
|
-
return (0, jsx_runtime_1.
|
|
253
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props === null || props === void 0 ? void 0 : props.ChildComponentForGroup(params) });
|
|
266
254
|
}
|
|
267
255
|
};
|
|
268
256
|
// Group default values
|
|
@@ -271,32 +259,24 @@ function ParentForGrid(props) {
|
|
|
271
259
|
return (0, helper_1.autoGroupColumnDef)((props === null || props === void 0 ? void 0 : props.enableTree) ? true : false, // If tree enable
|
|
272
260
|
props === null || props === void 0 ? void 0 : props.treeHeaderName, // Tree header name
|
|
273
261
|
props === null || props === void 0 ? void 0 : props.groupField, // Group field
|
|
274
|
-
|
|
262
|
+
props === null || props === void 0 ? void 0 : props.GroupHeaderComponent, // Header component
|
|
275
263
|
headerCheckBoxRenderer, //
|
|
276
|
-
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount,
|
|
277
|
-
|
|
264
|
+
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount, cellRendererConditionally, GroupHeaderRenderer // Custom component for group header
|
|
265
|
+
);
|
|
278
266
|
}
|
|
279
267
|
else {
|
|
280
268
|
return (0, helper_1.autoGroupColumnDef)((props === null || props === void 0 ? void 0 : props.enableTree) ? true : false, // If tree enable
|
|
281
269
|
props === null || props === void 0 ? void 0 : props.treeHeaderName, // Tree header name
|
|
282
270
|
props === null || props === void 0 ? void 0 : props.groupField, // Group field
|
|
283
|
-
|
|
271
|
+
props === null || props === void 0 ? void 0 : props.GroupHeaderComponent, // Header component
|
|
284
272
|
headerCheckBoxRenderer, //
|
|
285
|
-
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount,
|
|
286
|
-
|
|
273
|
+
props === null || props === void 0 ? void 0 : props.enableCheckboxForGroupHeader, props.conditionsToDisplay.displayGroupCount, GroupHeaderRenderer // Custom component for group header
|
|
274
|
+
);
|
|
287
275
|
}
|
|
288
276
|
};
|
|
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));
|
|
298
277
|
// Options that grid should have
|
|
299
|
-
const gridOptions =
|
|
278
|
+
const gridOptions = {
|
|
279
|
+
columnDefs: (_c = gridData === null || gridData === void 0 ? void 0 : gridData.columnData) === null || _c === void 0 ? void 0 : _c.map((column) => {
|
|
300
280
|
var _a, _b;
|
|
301
281
|
if ((column === null || column === void 0 ? void 0 : column.enableChildCheckbox) && (column === null || column === void 0 ? void 0 : column.enableHeaderCheckbox)) {
|
|
302
282
|
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: {
|
|
@@ -307,8 +287,33 @@ function ParentForGrid(props) {
|
|
|
307
287
|
else {
|
|
308
288
|
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() });
|
|
309
289
|
}
|
|
310
|
-
}),
|
|
311
|
-
|
|
290
|
+
}),
|
|
291
|
+
autoGroupColumnDef: manageColumnGrouping(),
|
|
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
|
+
};
|
|
312
317
|
// Fucntion to call the grid
|
|
313
318
|
const callGrid = (featureDetails) => {
|
|
314
319
|
onGridReady(gridReadyEvent, featureDetails);
|
|
@@ -366,7 +371,7 @@ function ParentForGrid(props) {
|
|
|
366
371
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { checkBoxSelection: initialCheckBoxData }));
|
|
367
372
|
}
|
|
368
373
|
}, [props === null || props === void 0 ? void 0 : props.emptyCheckboxStatus]);
|
|
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:
|
|
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: style.height, width: style.width }, className: "ag-grid-container border-1 border-gray-200 border-round" }, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(context_provider_1.default, Object.assign({ value: {
|
|
370
375
|
featureDetails,
|
|
371
376
|
setFeatureDetails,
|
|
372
377
|
gridData,
|
|
@@ -375,11 +380,11 @@ function ParentForGrid(props) {
|
|
|
375
380
|
initialFeature,
|
|
376
381
|
defaultFilters,
|
|
377
382
|
createView: props === null || props === void 0 ? void 0 : props.createView,
|
|
378
|
-
enableViewCreate: (
|
|
379
|
-
filterModelText: (
|
|
380
|
-
sortModelText: (
|
|
381
|
-
recordDetailModelText: (
|
|
382
|
-
sidePanelText: (
|
|
383
|
+
enableViewCreate: (_f = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _f === void 0 ? void 0 : _f.enableViewCreate,
|
|
384
|
+
filterModelText: (_g = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _g === void 0 ? void 0 : _g.filterModelText,
|
|
385
|
+
sortModelText: (_h = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _h === void 0 ? void 0 : _h.sortModelText,
|
|
386
|
+
recordDetailModelText: (_j = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _j === void 0 ? void 0 : _j.recordDetailModelText,
|
|
387
|
+
sidePanelText: (_k = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _k === void 0 ? void 0 : _k.sidePanelText,
|
|
383
388
|
sortOptions: (props === null || props === void 0 ? void 0 : props.sortOptions)
|
|
384
389
|
? props.sortOptions
|
|
385
390
|
: constants_1.COLUMN_SORT_OPTIONS,
|
|
@@ -393,8 +398,6 @@ function ParentForGrid(props) {
|
|
|
393
398
|
selectedGroup: selectedGroup,
|
|
394
399
|
setSelectedGroup: setSelectedGroup,
|
|
395
400
|
initialCheckBoxData: initialCheckBoxData,
|
|
396
|
-
|
|
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 })] }) })) }) }));
|
|
401
|
+
} }, { children: ((_l = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _l === void 0 ? void 0 : _l.displayFeaturesHeader) && ((0, jsx_runtime_1.jsx)(advanced_feature_1.default, { props: props })) })), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
399
402
|
}
|
|
400
403
|
exports.default = ParentForGrid;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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,9 +16,3 @@ 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(
|
|
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());
|
|
279
279
|
});
|
|
280
280
|
setFieldOptions(opts);
|
|
281
281
|
}
|
|
@@ -13,8 +13,7 @@ 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
|
-
|
|
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);
|
|
16
|
+
return (0, jsx_runtime_1.jsx)("li", { style: { background: status.color }, className: `${status.name.replaceAll(' ', '').toLowerCase()}` }, i);
|
|
18
17
|
}) }))
|
|
19
18
|
:
|
|
20
19
|
(0, jsx_runtime_1.jsx)("ul", Object.assign({ className: 'p-0 m-0 list-none' }, { children: (0, jsx_runtime_1.jsx)("li", { className: 'all' }) })) }))
|
|
@@ -44,8 +43,7 @@ const MultiSelectDropDown = (props) => {
|
|
|
44
43
|
setItems(props.value);
|
|
45
44
|
}, [props.value]);
|
|
46
45
|
const itemTemplate = (option) => {
|
|
47
|
-
|
|
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 }))] })) }));
|
|
46
|
+
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 ${option.name.replaceAll(' ', '').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 }))] })) }));
|
|
49
47
|
};
|
|
50
48
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.dropdownType === 'withIcon' &&
|
|
51
49
|
(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 &&
|