ar-design 0.2.57 → 0.2.59
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.
|
@@ -187,17 +187,43 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.ar-table > .content > table > tbody > tr.subrow-item {
|
|
190
|
-
background-color: rgba(var(--warning-rgb), 0.1);
|
|
191
|
-
border-bottom: solid 1px rgba(var(--warning-rgb), 0.35);
|
|
190
|
+
/* background-color: rgba(var(--warning-rgb), 0.1); */
|
|
191
|
+
/* border-bottom: solid 1px rgba(var(--warning-rgb), 0.35); */
|
|
192
192
|
}
|
|
193
193
|
.ar-table > .content > table > tbody > tr.subrow-item:last-child {
|
|
194
|
-
background-color: rgba(var(--warning-rgb), 0.1);
|
|
195
|
-
border-bottom: none;
|
|
194
|
+
/* background-color: rgba(var(--warning-rgb), 0.1); */
|
|
195
|
+
/* border-bottom: none; */
|
|
196
|
+
}
|
|
197
|
+
.ar-table > .content > table > tbody > tr.subrow-item > td > .table-cell {
|
|
198
|
+
/* position: relative; */
|
|
199
|
+
}
|
|
200
|
+
.ar-table > .content > table > tbody > tr.subrow-item > td > .table-cell > .before {
|
|
201
|
+
position: absolute;
|
|
202
|
+
top: 0px;
|
|
203
|
+
content: "";
|
|
204
|
+
background-color: var(--gray-600);
|
|
205
|
+
width: 2px;
|
|
206
|
+
height: 100%;
|
|
207
|
+
margin-left: -17.5px;
|
|
196
208
|
}
|
|
197
|
-
.ar-table > .content > table > tbody > tr.subrow-item
|
|
209
|
+
.ar-table > .content > table > tbody > tr.subrow-item:last-child > td > .table-cell > .before {
|
|
210
|
+
height: 50%;
|
|
211
|
+
}
|
|
212
|
+
.ar-table > .content > table > tbody > tr.subrow-item > td > .table-cell > .after {
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: 50%;
|
|
215
|
+
transform: translateY(-50%);
|
|
216
|
+
content: "";
|
|
217
|
+
background-color: var(--gray-600);
|
|
218
|
+
width: 15px;
|
|
219
|
+
height: 2px;
|
|
220
|
+
margin-left: -17.5px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* .ar-table > .content > table > tbody > tr.subrow-item.type-a > td:nth-child(1)::before {
|
|
198
224
|
position: absolute;
|
|
199
225
|
top: 0;
|
|
200
|
-
left:
|
|
226
|
+
left: 1rem;
|
|
201
227
|
content: "";
|
|
202
228
|
background-color: rgba(var(--warning-rgb), 0.35);
|
|
203
229
|
width: 2px;
|
|
@@ -211,9 +237,9 @@
|
|
|
211
237
|
background-color: rgba(var(--warning-rgb), 0.35);
|
|
212
238
|
width: 25px;
|
|
213
239
|
height: 2px;
|
|
214
|
-
}
|
|
240
|
+
} */
|
|
215
241
|
|
|
216
|
-
.ar-table > .content > table > tbody > tr.subrow-item.type-b > td:nth-child(2)::before {
|
|
242
|
+
/* .ar-table > .content > table > tbody > tr.subrow-item.type-b > td:nth-child(2)::before {
|
|
217
243
|
position: absolute;
|
|
218
244
|
top: 0;
|
|
219
245
|
left: 0;
|
|
@@ -230,7 +256,7 @@
|
|
|
230
256
|
background-color: rgba(var(--warning-rgb), 0.35);
|
|
231
257
|
width: 25px;
|
|
232
258
|
height: 2px;
|
|
233
|
-
}
|
|
259
|
+
} */
|
|
234
260
|
|
|
235
261
|
@import url("./scroll.css");
|
|
236
262
|
@import url("./filter-popup.css");
|
|
@@ -44,7 +44,7 @@ interface IProps<T> extends IChildren {
|
|
|
44
44
|
};
|
|
45
45
|
selections?: (selectionItems: T[]) => void;
|
|
46
46
|
previousSelections?: T[];
|
|
47
|
-
searchedParams?: (params: SearchedParam | null, query: string) => void;
|
|
47
|
+
searchedParams?: (params: SearchedParam | null, query: string, operator: FilterOperator) => void;
|
|
48
48
|
pagination?: {
|
|
49
49
|
totalRecords: number;
|
|
50
50
|
perPage: number;
|
|
@@ -388,7 +388,10 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
|
|
|
388
388
|
if (c.config?.textWrap)
|
|
389
389
|
_className.push(`text-${c.config.textWrap}`);
|
|
390
390
|
return (React.createElement("td", { key: `cell-${index}-${cIndex}`, className: _className.join(" "), style: c.config?.width ? { minWidth: c.config.width, maxWidth: c.config.width } : {}, "data-sticky-position": c.config?.sticky },
|
|
391
|
-
React.createElement("div", { style: { paddingLeft: `${depth == 0 ? 1 : depth}rem` }, className: "table-cell" },
|
|
391
|
+
React.createElement("div", { style: { paddingLeft: `${depth == 0 ? 1 : depth}rem` }, className: "table-cell" },
|
|
392
|
+
cIndex === 0 && React.createElement("div", { className: "before" }),
|
|
393
|
+
React.isValidElement(render) ? render : String(render),
|
|
394
|
+
cIndex === 0 && React.createElement("div", { className: "after" }))));
|
|
392
395
|
};
|
|
393
396
|
const SubitemList = ({ items, columns, index, depth }) => {
|
|
394
397
|
return items.map((subitem, subindex) => {
|
|
@@ -407,7 +410,7 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
|
|
|
407
410
|
[`${index}.${subindex}`]: !prev[`${index}.${subindex}`],
|
|
408
411
|
}));
|
|
409
412
|
} })))) : isHasSubitems && _subrowButton ? (React.createElement("td", { style: { width: 0, minWidth: 0 } })) : null,
|
|
410
|
-
columns.map((c, cIndex) => renderCell(subitem, c, cIndex, subindex, depth * 1.
|
|
413
|
+
columns.map((c, cIndex) => renderCell(subitem, c, cIndex, subindex, depth * 1.75))),
|
|
411
414
|
showSubitems[`${index}.${subindex}`] && _subitem && (React.createElement(SubitemList, { key: `subitem-${index}-${subindex}-${Math.random()}`, items: _subitem, columns: columns, index: subindex, depth: depth * 1.5 }))));
|
|
412
415
|
});
|
|
413
416
|
};
|
|
@@ -443,7 +446,7 @@ const Table = forwardRef(({ children, title, description, data, columns, actions
|
|
|
443
446
|
query.delete(column.key);
|
|
444
447
|
}
|
|
445
448
|
});
|
|
446
|
-
searchedParams(_searchedParams, query.toString());
|
|
449
|
+
searchedParams(_searchedParams, query.toString(), filterPopupOption?.option?.value);
|
|
447
450
|
}
|
|
448
451
|
}, [_searchedParams]);
|
|
449
452
|
useEffect(() => {
|
|
@@ -253,7 +253,12 @@ const Select = ({ variant = "outlined", status, border = { radius: "sm" }, optio
|
|
|
253
253
|
}, [navigationIndex]);
|
|
254
254
|
return (React.createElement("div", { ref: _arSelect, className: "ar-select-wrapper" },
|
|
255
255
|
React.createElement("div", { ref: _multipleInput, className: "ar-select" },
|
|
256
|
-
multiple ? (React.createElement("div", { className: _selectionClassName.map((c) => c).join(" "), onClick: () =>
|
|
256
|
+
multiple ? (React.createElement("div", { className: _selectionClassName.map((c) => c).join(" "), onClick: () => {
|
|
257
|
+
onClick && onClick();
|
|
258
|
+
(() => {
|
|
259
|
+
setOptionsOpen((prev) => !prev);
|
|
260
|
+
})();
|
|
261
|
+
} },
|
|
257
262
|
React.createElement("div", { className: "items" }, value.length > 0 ? (value.map((_value, index) => (React.createElement(Chip, { key: index, variant: status?.selected?.variant || "filled", status: status?.selected?.color || status?.color, text: _value.text })))) : (React.createElement("span", { className: "placeholder" },
|
|
258
263
|
validation ? "* " : "",
|
|
259
264
|
placeholder))))) : (React.createElement(Input, { ref: _singleInput, variant: variant, status: !Utils.IsNullOrEmpty(validation?.text) ? "danger" : status, border: { radius: border.radius }, value: singleInputText, onClick: () => {
|