sccoreui 6.2.79 → 6.2.81
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.js
CHANGED
package/dist/App.scss
CHANGED
|
@@ -97,23 +97,23 @@
|
|
|
97
97
|
.p-button {
|
|
98
98
|
border: 0 !important;
|
|
99
99
|
&.btn-primary {
|
|
100
|
-
background-color: var(--
|
|
100
|
+
background-color: var(--primary-500);
|
|
101
101
|
color: var(--_base-white);
|
|
102
102
|
padding: 8px 14px;
|
|
103
103
|
&:hover {
|
|
104
|
-
background-color: var(--
|
|
104
|
+
background-color: var(--primary-700);
|
|
105
105
|
}
|
|
106
106
|
&:focus {
|
|
107
|
-
background-color: var(--
|
|
107
|
+
background-color: var(--primary-700);
|
|
108
108
|
}
|
|
109
109
|
&:disabled {
|
|
110
|
-
background-color: var(--
|
|
110
|
+
background-color: var(--primary-200);
|
|
111
111
|
color: var(--_base-white);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&.btn-text-outline {
|
|
116
|
-
background-color: var(--
|
|
116
|
+
background-color: var(--_bg-white);
|
|
117
117
|
color: var(--gray-700);
|
|
118
118
|
padding: 8px 14px;
|
|
119
119
|
border: 1px solid var(--gray-300) !important;
|
|
@@ -147,52 +147,52 @@
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
&.btn-secondary {
|
|
150
|
-
background-color: var(--
|
|
151
|
-
color: var(--
|
|
150
|
+
background-color: var(--primary-50);
|
|
151
|
+
color: var(--primary-500);
|
|
152
152
|
padding: 8px 14px;
|
|
153
153
|
&:hover {
|
|
154
|
-
background-color: var(--
|
|
155
|
-
color: var(--
|
|
154
|
+
background-color: var(--primary-100) !important;
|
|
155
|
+
color: var(--primary-800) !important;
|
|
156
156
|
}
|
|
157
157
|
&:focus {
|
|
158
|
-
background-color: var(--
|
|
158
|
+
background-color: var(--primary-100);
|
|
159
159
|
}
|
|
160
160
|
&:disabled {
|
|
161
|
-
background-color: var(--
|
|
162
|
-
color: var(--
|
|
161
|
+
background-color: var(--primary-50);
|
|
162
|
+
color: var(--gray-300);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
&.btn-text {
|
|
167
167
|
background-color: var(--_base-white);
|
|
168
|
-
color: var(--
|
|
168
|
+
color: var(--gray-600);
|
|
169
169
|
padding: 8px 14px;
|
|
170
170
|
border: 0 !important;
|
|
171
171
|
&:hover {
|
|
172
|
-
background-color: var(--
|
|
173
|
-
color: var(--
|
|
172
|
+
background-color: var(--gray-50) !important;
|
|
173
|
+
color: var(--gray-700) !important;
|
|
174
174
|
}
|
|
175
175
|
&:focus {
|
|
176
|
-
background-color: var(--
|
|
177
|
-
color: var(--
|
|
176
|
+
background-color: var(--gray-50);
|
|
177
|
+
color: var(--gray-700);
|
|
178
178
|
border: 0px !important;
|
|
179
179
|
}
|
|
180
180
|
&:disabled {
|
|
181
|
-
background-color: var(--
|
|
182
|
-
color: var(--
|
|
181
|
+
background-color: var(--primary-50) !important;
|
|
182
|
+
color: var(--gray-300);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
&.btn-text-primary {
|
|
186
186
|
background-color: var(--_base-white);
|
|
187
|
-
color: var(--
|
|
187
|
+
color: var(--primary-400);
|
|
188
188
|
padding: 8px 14px;
|
|
189
189
|
border: 0 !important;
|
|
190
190
|
display: flex;
|
|
191
191
|
gap: 4px;
|
|
192
192
|
align-items: center;
|
|
193
193
|
&:hover {
|
|
194
|
-
background-color: var(--
|
|
195
|
-
color: var(--
|
|
194
|
+
background-color: var(--primary-25) !important;
|
|
195
|
+
color: var(--primary-600) !important;
|
|
196
196
|
svg {
|
|
197
197
|
path {
|
|
198
198
|
stroke: var(--primary-600);
|
|
@@ -200,11 +200,11 @@
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
&:focus {
|
|
203
|
-
background-color: var(--
|
|
204
|
-
color: var(--
|
|
203
|
+
background-color: var(--primary-25) !important;
|
|
204
|
+
color: var(--primary-600) !important;
|
|
205
205
|
}
|
|
206
206
|
&:disabled {
|
|
207
|
-
color: var(--
|
|
207
|
+
color: var(--gray-300);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
svg {
|
|
@@ -17,6 +17,8 @@ const advanced_filter_1 = require("@ag-grid-enterprise/advanced-filter");
|
|
|
17
17
|
const LicenceKey_1 = require("./LicenceKey");
|
|
18
18
|
const menu_1 = require("@ag-grid-enterprise/menu");
|
|
19
19
|
const column_tool_panel_1 = require("@ag-grid-enterprise/column-tool-panel");
|
|
20
|
+
const csv_export_1 = require("@ag-grid-community/csv-export");
|
|
21
|
+
const excel_export_1 = require("@ag-grid-enterprise/excel-export");
|
|
20
22
|
core_1.ModuleRegistry.registerModules([
|
|
21
23
|
client_side_row_model_1.ClientSideRowModelModule,
|
|
22
24
|
range_selection_1.RangeSelectionModule,
|
|
@@ -26,10 +28,13 @@ core_1.ModuleRegistry.registerModules([
|
|
|
26
28
|
set_filter_1.SetFilterModule,
|
|
27
29
|
advanced_filter_1.AdvancedFilterModule,
|
|
28
30
|
menu_1.MenuModule,
|
|
29
|
-
column_tool_panel_1.ColumnsToolPanelModule
|
|
31
|
+
column_tool_panel_1.ColumnsToolPanelModule,
|
|
32
|
+
csv_export_1.CsvExportModule,
|
|
33
|
+
excel_export_1.ExcelExportModule
|
|
30
34
|
]);
|
|
31
35
|
core_2.LicenseManager.setLicenseKey(LicenceKey_1.LICENSEKEY);
|
|
32
|
-
const AgGrid = ({
|
|
33
|
-
|
|
36
|
+
const AgGrid = ({ gridOptions, onGridReady, gridRef }) => {
|
|
37
|
+
// console.log(style, "style");
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-quartz h-full ag-grid-div" }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, Object.assign({ ref: gridRef }, (onGridReady ? { onGridReady: onGridReady } : {}), { reactiveCustomComponents: true }, gridOptions)) })) }));
|
|
34
39
|
};
|
|
35
40
|
exports.default = AgGrid;
|
|
@@ -14,7 +14,7 @@ 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, _m, _o, _p, _q
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
18
|
const { gridProps = {} } = props;
|
|
19
19
|
const [gridData, setGridData] = (0, react_1.useState)({
|
|
20
20
|
rowData: [],
|
|
@@ -118,12 +118,12 @@ function ParentForGrid(props) {
|
|
|
118
118
|
};
|
|
119
119
|
// Callback to products for getting data
|
|
120
120
|
const getData = (startRow, endRow, currentFeatures, params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
var
|
|
121
|
+
var _r, _s;
|
|
122
122
|
if (!(props === null || props === void 0 ? void 0 : props.getRowData)) {
|
|
123
123
|
return emptyResponse; // If callback function to get row data is not provided
|
|
124
124
|
}
|
|
125
125
|
if (props.rowModelType !== constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
126
|
-
(
|
|
126
|
+
(_s = (_r = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _r === void 0 ? void 0 : _r.api) === null || _s === void 0 ? void 0 : _s.showLoadingOverlay();
|
|
127
127
|
}
|
|
128
128
|
const response = yield (props === null || props === void 0 ? void 0 : props.getRowData(startRow, endRow, currentFeatures, params));
|
|
129
129
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: [] }));
|
|
@@ -145,8 +145,7 @@ function ParentForGrid(props) {
|
|
|
145
145
|
});
|
|
146
146
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
147
147
|
const onGridReady = (params, updatedFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
var _u, _v;
|
|
149
|
-
params.api.setGridOption("rowSelection", "multiple");
|
|
148
|
+
var _t, _u, _v;
|
|
150
149
|
params && setApi(params === null || params === void 0 ? void 0 : params.api);
|
|
151
150
|
setGridReadyEvent(params);
|
|
152
151
|
let currentFeatures = updatedFeatures;
|
|
@@ -154,7 +153,7 @@ function ParentForGrid(props) {
|
|
|
154
153
|
currentFeatures = featureDetails;
|
|
155
154
|
}
|
|
156
155
|
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)) {
|
|
157
|
-
params === null || params === void 0 ? void 0 : params.api.setGridOption("rowData", []);
|
|
156
|
+
(_t = params === null || params === void 0 ? void 0 : params.api) === null || _t === void 0 ? void 0 : _t.setGridOption("rowData", []);
|
|
158
157
|
const result = yield getData(0, 0, currentFeatures);
|
|
159
158
|
if (result.rowData) {
|
|
160
159
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: result.rowData }));
|
|
@@ -325,7 +324,7 @@ function ParentForGrid(props) {
|
|
|
325
324
|
const hasPinnedRows = (api === null || api === void 0 ? void 0 : api.getPinnedTopRowCount()) > 0 || (api === null || api === void 0 ? void 0 : api.getPinnedBottomRowCount()) > 0;
|
|
326
325
|
const hasRowData = (api === null || api === void 0 ? void 0 : api.getDisplayedRowCount()) > 0;
|
|
327
326
|
if (hasPinnedRows || hasRowData) {
|
|
328
|
-
api.hideOverlay(); // Hide the noRowsOverlayComponent if pinned rows or row data exists
|
|
327
|
+
api === null || api === void 0 ? void 0 : api.hideOverlay(); // Hide the noRowsOverlayComponent if pinned rows or row data exists
|
|
329
328
|
}
|
|
330
329
|
else {
|
|
331
330
|
api === null || api === void 0 ? void 0 : api.showNoRowsOverlay(); // Show the noRowsOverlayComponent only if no rows or pinned rows are present
|
|
@@ -390,7 +389,7 @@ function ParentForGrid(props) {
|
|
|
390
389
|
}
|
|
391
390
|
}, [props.updateRowData]);
|
|
392
391
|
(0, react_1.useEffect)(() => {
|
|
393
|
-
var _a;
|
|
392
|
+
var _a, _b;
|
|
394
393
|
const existingColumns = (_a = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current.api) === null || _a === void 0 ? void 0 : _a.getColumnDefs();
|
|
395
394
|
if (!(props === null || props === void 0 ? void 0 : props.columnData) || !existingColumns)
|
|
396
395
|
return;
|
|
@@ -405,14 +404,14 @@ function ParentForGrid(props) {
|
|
|
405
404
|
return colDef;
|
|
406
405
|
});
|
|
407
406
|
const reOrderedColumns = updatedColumnDefs.sort((a, b) => a.seq - b.seq);
|
|
408
|
-
gridRef.current.api.setGridOption("columnDefs", reOrderedColumns);
|
|
407
|
+
(_b = gridRef.current.api) === null || _b === void 0 ? void 0 : _b.setGridOption("columnDefs", reOrderedColumns);
|
|
409
408
|
}, [props === null || props === void 0 ? void 0 : props.columnData]);
|
|
410
409
|
(0, react_1.useEffect)(() => {
|
|
411
410
|
if (props === null || props === void 0 ? void 0 : props.emptyCheckboxStatus) {
|
|
412
411
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { checkBoxSelection: initialCheckBoxData }));
|
|
413
412
|
}
|
|
414
413
|
}, [props === null || props === void 0 ? void 0 : props.emptyCheckboxStatus]);
|
|
415
|
-
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({ id: "wrapper", 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 ${(props === null || props === void 0 ? void 0 : props.enableAdvancedFilter) ? "hide-advance-filter" : ""}` }, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(context_provider_1.default, Object.assign({ value: Object.assign(Object.assign({ rowModelType: props.rowModelType, quickSearch: props === null || props === void 0 ? void 0 : props.quickSearch, featureDetails,
|
|
414
|
+
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({ id: "wrapper", 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 ag-grid-parent-div ${(props === null || props === void 0 ? void 0 : props.enableAdvancedFilter) ? "hide-advance-filter" : ""}` }, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(context_provider_1.default, Object.assign({ value: Object.assign(Object.assign({ rowModelType: props.rowModelType, quickSearch: props === null || props === void 0 ? void 0 : props.quickSearch, featureDetails,
|
|
416
415
|
setFeatureDetails,
|
|
417
416
|
gridData,
|
|
418
417
|
callGrid,
|
|
@@ -421,9 +420,24 @@ function ParentForGrid(props) {
|
|
|
421
420
|
defaultFilters, createView: props === null || props === void 0 ? void 0 : props.createView, enableViewCreate: (_k = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _k === void 0 ? void 0 : _k.enableViewCreate, filterModelText: (_l = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _l === void 0 ? void 0 : _l.filterModelText, sortModelText: (_m = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _m === void 0 ? void 0 : _m.sortModelText, recordDetailModelText: (_o = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _o === void 0 ? void 0 : _o.recordDetailModelText, sidePanelText: (_p = props === null || props === void 0 ? void 0 : props.dynamicText) === null || _p === void 0 ? void 0 : _p.sidePanelText, sortOptions: (props === null || props === void 0 ? void 0 : props.sortOptions)
|
|
422
421
|
? props.sortOptions
|
|
423
422
|
: constants_1.COLUMN_SORT_OPTIONS, filterConditions: props === null || props === void 0 ? void 0 : props.filterConditions, clearFilters: props === null || props === void 0 ? void 0 : props.clearFilters, setGridData, gridApi: gridRef, updateColumnsForGrid: props === null || props === void 0 ? void 0 : props.updateColumnsForGrid, enableManageColumnsCallback: props.enableManageColumnsCallback, columnToRender: gridData.columnData, selectedGroup: selectedGroup, setSelectedGroup: setSelectedGroup, initialCheckBoxData: initialCheckBoxData, intialColumns,
|
|
424
|
-
setIntialColumns, enableAdvancedFilter: props === null || props === void 0 ? void 0 : props.enableAdvancedFilter }, ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), { conditionsToDisplay: props === null || props === void 0 ? void 0 : props.conditionsToDisplay }) }, { 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
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
423
|
+
setIntialColumns, enableAdvancedFilter: props === null || props === void 0 ? void 0 : props.enableAdvancedFilter }, ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), { conditionsToDisplay: props === null || props === void 0 ? void 0 : props.conditionsToDisplay }) }, { 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
|
|
424
|
+
// style={{
|
|
425
|
+
// ...gridStyle,
|
|
426
|
+
// height:
|
|
427
|
+
// props?.conditionsToDisplay?.displayFeaturesHeader &&
|
|
428
|
+
// gridStyle.height
|
|
429
|
+
// ? `calc(${gridStyle.height} - ${ROW_HEIGHT}px)`
|
|
430
|
+
// : gridStyle.height,
|
|
431
|
+
// }}
|
|
432
|
+
, {
|
|
433
|
+
// style={{
|
|
434
|
+
// ...gridStyle,
|
|
435
|
+
// height:
|
|
436
|
+
// props?.conditionsToDisplay?.displayFeaturesHeader &&
|
|
437
|
+
// gridStyle.height
|
|
438
|
+
// ? `calc(${gridStyle.height} - ${ROW_HEIGHT}px)`
|
|
439
|
+
// : gridStyle.height,
|
|
440
|
+
// }}
|
|
441
|
+
gridOptions: gridOptions, onGridReady: (props === null || props === void 0 ? void 0 : props.rowData) ? undefined : onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
428
442
|
}
|
|
429
443
|
exports.default = ParentForGrid;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import "ag-grid-community/styles/ag-grid.css";
|
|
2
2
|
import "ag-grid-community/styles/ag-theme-quartz.css";
|
|
3
3
|
import "../../App.scss";
|
|
4
|
-
declare const AgGrid: ({
|
|
5
|
-
style: any;
|
|
4
|
+
declare const AgGrid: ({ gridOptions, onGridReady, gridRef }: {
|
|
6
5
|
gridOptions: any;
|
|
7
6
|
onGridReady: any;
|
|
8
7
|
gridRef: any;
|