sccoreui 6.2.79 → 6.2.80

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 CHANGED
@@ -97,23 +97,23 @@
97
97
  .p-button {
98
98
  border: 0 !important;
99
99
  &.btn-primary {
100
- background-color: var(--_primary-500);
100
+ background-color: var(--primary-500);
101
101
  color: var(--_base-white);
102
102
  padding: 8px 14px;
103
103
  &:hover {
104
- background-color: var(--_primary-700);
104
+ background-color: var(--primary-700);
105
105
  }
106
106
  &:focus {
107
- background-color: var(--_primary-700);
107
+ background-color: var(--primary-700);
108
108
  }
109
109
  &:disabled {
110
- background-color: var(--_primary-200);
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(--bg-white);
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(--_primary-50);
151
- color: var(--_primary-500);
150
+ background-color: var(--primary-50);
151
+ color: var(--primary-500);
152
152
  padding: 8px 14px;
153
153
  &:hover {
154
- background-color: var(--_primary-100) !important;
155
- color: var(--_primary-800) !important;
154
+ background-color: var(--primary-100) !important;
155
+ color: var(--primary-800) !important;
156
156
  }
157
157
  &:focus {
158
- background-color: var(--_primary-100);
158
+ background-color: var(--primary-100);
159
159
  }
160
160
  &:disabled {
161
- background-color: var(--_primary-50);
162
- color: var(--_gray-300);
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(--_gray-600);
168
+ color: var(--gray-600);
169
169
  padding: 8px 14px;
170
170
  border: 0 !important;
171
171
  &:hover {
172
- background-color: var(--_gray-50) !important;
173
- color: var(--_gray-700) !important;
172
+ background-color: var(--gray-50) !important;
173
+ color: var(--gray-700) !important;
174
174
  }
175
175
  &:focus {
176
- background-color: var(--_gray-50);
177
- color: var(--_gray-700);
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(--_primary-50) !important;
182
- color: var(--_gray-300);
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(--_primary-400);
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(--_primary-25) !important;
195
- color: var(--_primary-600) !important;
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(--_primary-25) !important;
204
- color: var(--_primary-600) !important;
203
+ background-color: var(--primary-25) !important;
204
+ color: var(--primary-600) !important;
205
205
  }
206
206
  &:disabled {
207
- color: var(--_gray-300);
207
+ color: var(--gray-300);
208
208
  }
209
209
 
210
210
  svg {
@@ -26,10 +26,11 @@ core_1.ModuleRegistry.registerModules([
26
26
  set_filter_1.SetFilterModule,
27
27
  advanced_filter_1.AdvancedFilterModule,
28
28
  menu_1.MenuModule,
29
- column_tool_panel_1.ColumnsToolPanelModule
29
+ column_tool_panel_1.ColumnsToolPanelModule,
30
30
  ]);
31
31
  core_2.LicenseManager.setLicenseKey(LicenceKey_1.LICENSEKEY);
32
- const AgGrid = ({ style, gridOptions, onGridReady, gridRef }) => {
33
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-quartz ", style: { height: style === null || style === void 0 ? void 0 : style.height, width: style === null || style === void 0 ? void 0 : style.width } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, Object.assign({ ref: gridRef }, (onGridReady ? { onGridReady: onGridReady } : {}), { reactiveCustomComponents: true }, gridOptions)) })) }));
32
+ const AgGrid = ({ gridOptions, onGridReady, gridRef }) => {
33
+ // console.log(style, "style");
34
+ 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
35
  };
35
36
  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, _r;
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 _s, _t;
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
- (_t = (_s = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _s === void 0 ? void 0 : _s.api) === null || _t === void 0 ? void 0 : _t.showLoadingOverlay();
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,7 +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;
148
+ var _t, _u;
149
149
  params.api.setGridOption("rowSelection", "multiple");
150
150
  params && setApi(params === null || params === void 0 ? void 0 : params.api);
151
151
  setGridReadyEvent(params);
@@ -159,21 +159,21 @@ function ParentForGrid(props) {
159
159
  if (result.rowData) {
160
160
  setGridData(Object.assign(Object.assign({}, gridData), { rowData: result.rowData }));
161
161
  gridRef.current.api.hideOverlay();
162
- (_u = params === null || params === void 0 ? void 0 : params.api) === null || _u === void 0 ? void 0 : _u.applyTransaction({ add: result.rowData });
162
+ (_t = params === null || params === void 0 ? void 0 : params.api) === null || _t === void 0 ? void 0 : _t.applyTransaction({ add: result.rowData });
163
163
  }
164
164
  else {
165
- (_v = params === null || params === void 0 ? void 0 : params.api) === null || _v === void 0 ? void 0 : _v.applyTransaction({ add: [] });
165
+ (_u = params === null || params === void 0 ? void 0 : params.api) === null || _u === void 0 ? void 0 : _u.applyTransaction({ add: [] });
166
166
  }
167
167
  }
168
168
  else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
169
169
  const dataSource = {
170
170
  getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
171
- var _w, _x, _y;
171
+ var _v, _w, _x;
172
172
  const startRow = params.request.startRow;
173
173
  const endRow = params.request.endRow;
174
174
  // Scroll should not exit MAX_RECORDS_TO_LOAD
175
175
  if (endRow > maxLength && maxLength > 0) {
176
- (_w = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current.api) === null || _w === void 0 ? void 0 : _w.hideOverlay();
176
+ (_v = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current.api) === null || _v === void 0 ? void 0 : _v.hideOverlay();
177
177
  // supply rows for requested block to grid
178
178
  params.success({
179
179
  rowData: gridData.rowData,
@@ -185,7 +185,7 @@ function ParentForGrid(props) {
185
185
  const response = yield getData(startRow, endRow, currentFeatures, params);
186
186
  console.log(response, "response");
187
187
  // simulating real server call with a 500ms delay
188
- if (((_x = response.rowData) === null || _x === void 0 ? void 0 : _x.length) > 0) {
188
+ if (((_w = response.rowData) === null || _w === void 0 ? void 0 : _w.length) > 0) {
189
189
  setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
190
190
  gridRef.current.api.hideOverlay();
191
191
  // supply rows for requested block to grid
@@ -195,7 +195,7 @@ function ParentForGrid(props) {
195
195
  else {
196
196
  // params.fail();
197
197
  const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
198
- if (!((_y = params === null || params === void 0 ? void 0 : params.parentNode) === null || _y === void 0 ? void 0 : _y.id))
198
+ if (!((_x = params === null || params === void 0 ? void 0 : params.parentNode) === null || _x === void 0 ? void 0 : _x.id))
199
199
  gridRef.current.api.showNoRowsOverlay();
200
200
  params.success({ rowData: gridRows });
201
201
  return;
@@ -412,7 +412,7 @@ function ParentForGrid(props) {
412
412
  setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { checkBoxSelection: initialCheckBoxData }));
413
413
  }
414
414
  }, [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,
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 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
416
  setFeatureDetails,
417
417
  gridData,
418
418
  callGrid,
@@ -421,9 +421,24 @@ function ParentForGrid(props) {
421
421
  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
422
  ? props.sortOptions
423
423
  : 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, { style: Object.assign(Object.assign({}, gridStyle), { height: ((_r = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _r === void 0 ? void 0 : _r.displayFeaturesHeader) &&
425
- gridStyle.height
426
- ? gridStyle.height - constants_1.ROW_HEIGHT
427
- : gridStyle.height }), gridOptions: gridOptions, onGridReady: (props === null || props === void 0 ? void 0 : props.rowData) ? undefined : onGridReady, gridRef: gridRef })] }) })) }) }));
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
+ // style={{
426
+ // ...gridStyle,
427
+ // height:
428
+ // props?.conditionsToDisplay?.displayFeaturesHeader &&
429
+ // gridStyle.height
430
+ // ? `calc(${gridStyle.height} - ${ROW_HEIGHT}px)`
431
+ // : gridStyle.height,
432
+ // }}
433
+ , {
434
+ // style={{
435
+ // ...gridStyle,
436
+ // height:
437
+ // props?.conditionsToDisplay?.displayFeaturesHeader &&
438
+ // gridStyle.height
439
+ // ? `calc(${gridStyle.height} - ${ROW_HEIGHT}px)`
440
+ // : gridStyle.height,
441
+ // }}
442
+ gridOptions: gridOptions, onGridReady: (props === null || props === void 0 ? void 0 : props.rowData) ? undefined : onGridReady, gridRef: gridRef })] }) })) }) }));
428
443
  }
429
444
  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: ({ style, gridOptions, onGridReady, gridRef }: {
5
- style: any;
4
+ declare const AgGrid: ({ gridOptions, onGridReady, gridRef }: {
6
5
  gridOptions: any;
7
6
  onGridReady: any;
8
7
  gridRef: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.2.79",
3
+ "version": "6.2.80",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",