sccoreui 6.2.70 → 6.2.71
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
|
@@ -117,11 +117,12 @@ function ParentForGrid(props) {
|
|
|
117
117
|
};
|
|
118
118
|
// Callback to products for getting data
|
|
119
119
|
const getData = (startRow, endRow, currentFeatures, params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
var _r, _s;
|
|
120
121
|
if (!(props === null || props === void 0 ? void 0 : props.getRowData)) {
|
|
121
122
|
return emptyResponse; // If callback function to get row data is not provided
|
|
122
123
|
}
|
|
123
124
|
if (props.rowModelType !== constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
124
|
-
gridRef.current.api.showLoadingOverlay();
|
|
125
|
+
(_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();
|
|
125
126
|
}
|
|
126
127
|
const response = yield (props === null || props === void 0 ? void 0 : props.getRowData(startRow, endRow, currentFeatures, params));
|
|
127
128
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: [] }));
|
|
@@ -143,7 +144,7 @@ function ParentForGrid(props) {
|
|
|
143
144
|
});
|
|
144
145
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
145
146
|
const onGridReady = (params, updatedFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
var
|
|
147
|
+
var _t, _u;
|
|
147
148
|
params && setApi(params === null || params === void 0 ? void 0 : params.api);
|
|
148
149
|
setGridReadyEvent(params);
|
|
149
150
|
let currentFeatures = updatedFeatures;
|
|
@@ -156,21 +157,21 @@ function ParentForGrid(props) {
|
|
|
156
157
|
if (result.rowData) {
|
|
157
158
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: result.rowData }));
|
|
158
159
|
gridRef.current.api.hideOverlay();
|
|
159
|
-
(
|
|
160
|
+
(_t = params === null || params === void 0 ? void 0 : params.api) === null || _t === void 0 ? void 0 : _t.applyTransaction({ add: result.rowData });
|
|
160
161
|
}
|
|
161
162
|
else {
|
|
162
|
-
(
|
|
163
|
+
(_u = params === null || params === void 0 ? void 0 : params.api) === null || _u === void 0 ? void 0 : _u.applyTransaction({ add: [] });
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
else if (props.rowModelType === constants_1.ROWMODELTYPE.SERVER_SIDE) {
|
|
166
167
|
const dataSource = {
|
|
167
168
|
getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
var
|
|
169
|
+
var _v, _w, _x;
|
|
169
170
|
const startRow = params.request.startRow;
|
|
170
171
|
const endRow = params.request.endRow;
|
|
171
172
|
// Scroll should not exit MAX_RECORDS_TO_LOAD
|
|
172
173
|
if (endRow > maxLength && maxLength > 0) {
|
|
173
|
-
(
|
|
174
|
+
(_v = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current.api) === null || _v === void 0 ? void 0 : _v.hideOverlay();
|
|
174
175
|
// supply rows for requested block to grid
|
|
175
176
|
params.success({
|
|
176
177
|
rowData: gridData.rowData,
|
|
@@ -181,7 +182,7 @@ function ParentForGrid(props) {
|
|
|
181
182
|
// get data for request from our fake server
|
|
182
183
|
const response = yield getData(startRow, endRow, currentFeatures, params);
|
|
183
184
|
// simulating real server call with a 500ms delay
|
|
184
|
-
if (((
|
|
185
|
+
if (((_w = response.rowData) === null || _w === void 0 ? void 0 : _w.length) > 0) {
|
|
185
186
|
setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
|
|
186
187
|
gridRef.current.api.hideOverlay();
|
|
187
188
|
// supply rows for requested block to grid
|
|
@@ -191,7 +192,7 @@ function ParentForGrid(props) {
|
|
|
191
192
|
else {
|
|
192
193
|
// params.fail();
|
|
193
194
|
const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
|
|
194
|
-
if (!((
|
|
195
|
+
if (!((_x = params === null || params === void 0 ? void 0 : params.parentNode) === null || _x === void 0 ? void 0 : _x.id))
|
|
195
196
|
gridRef.current.api.showNoRowsOverlay();
|
|
196
197
|
params.success({ rowData: gridRows });
|
|
197
198
|
return;
|
|
@@ -113,7 +113,7 @@ onChange, footeTemplate, headerTemplate, labelIcon, labelIconPos, label, labelIc
|
|
|
113
113
|
},
|
|
114
114
|
] }), !showChips ? ((0, jsx_runtime_1.jsx)(button_1.Button, { type: "button", className: `list_box_button focus:shadow-none p-0 h-max h-auto p-0 mx-2 ${buttonClassName}`, link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event) })) : ((0, jsx_runtime_1.jsxs)("ul", Object.assign({ className: `pl-0 grid row-gap-2 list_box_chips ${chipsParentClassName}` }, { children: [(0, jsx_runtime_1.jsx)("li", Object.assign({ className: `cursor-pointer min-w-max mx-2 max-w-max ${buttonClassName}` }, { children: (0, jsx_runtime_1.jsx)(button_1.Button, { type: "button",
|
|
115
115
|
// className={`list_box_button focus:shadow-none p-0 h-max h-auto mx-2`}
|
|
116
|
-
link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event), "aria-controls": "popup_menu_right", "aria-haspopup": true, ref: buttonRef }) })), selectedItems &&
|
|
116
|
+
link: link ? true : false, icon: labelIcon ? labelIcon : "", size: labelIconSize ? labelIconSize : "", iconPos: labelIconPos ? labelIconPos : "", label: label, onClick: (event) => optionsMenuRef.current.toggle(event), "aria-controls": "popup_menu_right", "aria-haspopup": true, ref: buttonRef, className: "btn-text-primary" }) })), selectedItems &&
|
|
117
117
|
(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.map((item, index) => {
|
|
118
118
|
var _a, _b;
|
|
119
119
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isDraggable !== undefined ? ((0, jsx_runtime_1.jsx)("li", Object.assign({ draggable: isDraggable, onDragStart: (e) => handleDragStart(e, index), onDragOver: (e) => handleDragOver(e), onDrop: (e) => handleDrop(e, index), className: `${chipClassName ? chipClassName : ""} cursor-pointer min-w-max mx-2 max-w-max p-1 flex align-items-center bg-gray-50 text-gray-700 text-base border-1 border-gray-300 border-round-lg ${showRemoveIcon ? "pr-6 relative" : ""}` }, { children: chipTemplate ? (chipTemplate(item)) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { children: [" ", typeof item === "object"
|
|
@@ -9080,6 +9080,15 @@ exports.iconList = [
|
|
|
9080
9080
|
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
|
|
9081
9081
|
<path d="M11.1654 3.375L5.4362 9.10417L2.83203 6.5" stroke="white" stroke-width="2.08333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9082
9082
|
</svg>`,
|
|
9083
|
+
},
|
|
9084
|
+
{
|
|
9085
|
+
name: "verified-check-circle",
|
|
9086
|
+
svg: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9087
|
+
<rect x="0.625" y="0.625" width="18.75" height="18.75" rx="9.375" fill="#132067"/>
|
|
9088
|
+
<rect x="0.625" y="0.625" width="18.75" height="18.75" rx="9.375" stroke="#132067" stroke-width="1.25"/>
|
|
9089
|
+
<path d="M14.1615 6.875L8.43229 12.6042L5.82812 10" stroke="white" stroke-width="2.08333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9090
|
+
</svg>
|
|
9091
|
+
`,
|
|
9083
9092
|
},
|
|
9084
9093
|
{
|
|
9085
9094
|
name: "drag-and-drop",
|