@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.7 → 1.2.0-alpha.8
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.
|
@@ -47071,9 +47071,9 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47071
47071
|
}
|
|
47072
47072
|
return columns.map((el, colIndex) => {
|
|
47073
47073
|
const possibleAdditionalPrinterColumnsCustomSortersAndFiltersType = additionalPrinterColumnsCustomSortersAndFilters?.find(({ key }) => key === el.key)?.type;
|
|
47074
|
-
const
|
|
47075
|
-
const
|
|
47076
|
-
const
|
|
47074
|
+
const isSortersAndFiltersDisabled = possibleAdditionalPrinterColumnsCustomSortersAndFiltersType === "disabled";
|
|
47075
|
+
const isSortersAndFiltersCPU = possibleAdditionalPrinterColumnsCustomSortersAndFiltersType === "cpu";
|
|
47076
|
+
const isSortersAndFiltersMemory = possibleAdditionalPrinterColumnsCustomSortersAndFiltersType === "memory";
|
|
47077
47077
|
const possibleUndefinedValue = additionalPrinterColumnsUndefinedValues?.find(({ key }) => key === el.key)?.value;
|
|
47078
47078
|
const possibleTrimLength = additionalPrinterColumnsTrimLengths?.find(({ key }) => key === el.key)?.value;
|
|
47079
47079
|
const possibleColWidth = additionalPrinterColumnsColWidths?.find(({ key }) => key === el.key)?.value;
|
|
@@ -47087,36 +47087,25 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47087
47087
|
if (!cell) return "";
|
|
47088
47088
|
return (cell.innerText || cell.textContent || "").trim().toLowerCase();
|
|
47089
47089
|
};
|
|
47090
|
-
const getEntry = (record) => {
|
|
47091
|
-
const { dataIndex } = el;
|
|
47092
|
-
return Array.isArray(dataIndex) ? lodashExports.get(record, dataIndex) : record[dataIndex];
|
|
47093
|
-
};
|
|
47094
|
-
const getTextForNumericUnitSort = (record) => {
|
|
47095
|
-
if (useFactorySearch) {
|
|
47096
|
-
const textFromDom = getCellTextFromDOM(record);
|
|
47097
|
-
if (textFromDom) return textFromDom;
|
|
47098
|
-
}
|
|
47099
|
-
const raw = getEntry(record);
|
|
47100
|
-
if (raw == null) return null;
|
|
47101
|
-
return String(raw);
|
|
47102
|
-
};
|
|
47103
47090
|
const getMemoryInBytes = (record) => {
|
|
47104
|
-
const text =
|
|
47105
|
-
if (!text) return
|
|
47091
|
+
const text = getCellTextFromDOM(record);
|
|
47092
|
+
if (!text) return 0;
|
|
47106
47093
|
const parsed = parseValueWithUnit(text);
|
|
47107
|
-
if (!parsed) return
|
|
47094
|
+
if (!parsed) return 0;
|
|
47108
47095
|
if (parsed.unit) {
|
|
47109
|
-
|
|
47096
|
+
const bytes = toBytes(parsed.value, parsed.unit);
|
|
47097
|
+
return bytes >= 0 ? bytes : 0;
|
|
47110
47098
|
}
|
|
47111
47099
|
return parsed.value;
|
|
47112
47100
|
};
|
|
47113
47101
|
const getCpuInCores = (record) => {
|
|
47114
|
-
const text =
|
|
47115
|
-
if (!text) return
|
|
47102
|
+
const text = getCellTextFromDOM(record);
|
|
47103
|
+
if (!text) return 0;
|
|
47116
47104
|
const parsed = parseCoresWithUnit(text);
|
|
47117
|
-
if (!parsed) return
|
|
47105
|
+
if (!parsed) return 0;
|
|
47118
47106
|
if (parsed.unit) {
|
|
47119
|
-
|
|
47107
|
+
const cores = toCores(parsed.value, parsed.unit);
|
|
47108
|
+
return cores >= 0 ? cores : 0;
|
|
47120
47109
|
}
|
|
47121
47110
|
return parsed.value;
|
|
47122
47111
|
};
|
|
@@ -47148,7 +47137,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47148
47137
|
};
|
|
47149
47138
|
},
|
|
47150
47139
|
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => {
|
|
47151
|
-
if (
|
|
47140
|
+
if (isSortersAndFiltersDisabled || isSortersAndFiltersMemory || isSortersAndFiltersCPU) {
|
|
47152
47141
|
return null;
|
|
47153
47142
|
}
|
|
47154
47143
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -47163,13 +47152,13 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47163
47152
|
);
|
|
47164
47153
|
},
|
|
47165
47154
|
filterIcon: (filtered) => {
|
|
47166
|
-
if (
|
|
47155
|
+
if (isSortersAndFiltersDisabled || isSortersAndFiltersMemory || isSortersAndFiltersCPU) {
|
|
47167
47156
|
return null;
|
|
47168
47157
|
}
|
|
47169
47158
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(icons.SearchOutlined, { style: { color: filtered ? "#1677ff" : void 0 } });
|
|
47170
47159
|
},
|
|
47171
47160
|
onFilter: (value, record) => {
|
|
47172
|
-
if (
|
|
47161
|
+
if (isSortersAndFiltersDisabled || isSortersAndFiltersMemory || isSortersAndFiltersCPU) {
|
|
47173
47162
|
return false;
|
|
47174
47163
|
}
|
|
47175
47164
|
if (useFactorySearch) {
|
|
@@ -47196,22 +47185,22 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47196
47185
|
}
|
|
47197
47186
|
return false;
|
|
47198
47187
|
},
|
|
47199
|
-
sorter:
|
|
47200
|
-
if (
|
|
47201
|
-
const aText = getCellTextFromDOM(a);
|
|
47202
|
-
const bText = getCellTextFromDOM(b);
|
|
47203
|
-
return aText.localeCompare(bText);
|
|
47204
|
-
}
|
|
47205
|
-
if (isSortersAndFitlersMemory) {
|
|
47188
|
+
sorter: isSortersAndFiltersDisabled ? false : (a, b) => {
|
|
47189
|
+
if (isSortersAndFiltersMemory) {
|
|
47206
47190
|
const aBytes = getMemoryInBytes(a);
|
|
47207
47191
|
const bBytes = getMemoryInBytes(b);
|
|
47208
47192
|
return safeNumericCompare(aBytes, bBytes);
|
|
47209
47193
|
}
|
|
47210
|
-
if (
|
|
47194
|
+
if (isSortersAndFiltersCPU) {
|
|
47211
47195
|
const aCores = getCpuInCores(a);
|
|
47212
47196
|
const bCores = getCpuInCores(b);
|
|
47213
47197
|
return safeNumericCompare(aCores, bCores);
|
|
47214
47198
|
}
|
|
47199
|
+
if (useFactorySearch) {
|
|
47200
|
+
const aText = getCellTextFromDOM(a);
|
|
47201
|
+
const bText = getCellTextFromDOM(b);
|
|
47202
|
+
return aText.localeCompare(bText);
|
|
47203
|
+
}
|
|
47215
47204
|
const { dataIndex } = el;
|
|
47216
47205
|
const aEntry = Array.isArray(dataIndex) ? lodashExports.get(a, dataIndex) : a[dataIndex];
|
|
47217
47206
|
const bEntry = Array.isArray(dataIndex) ? lodashExports.get(b, dataIndex) : b[dataIndex];
|