@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.4 → 1.2.0-alpha.5
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/openapi-k8s-toolkit.es.js +64 -14
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +64 -14
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +2 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.d.ts +4 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/MemoryChart.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/MemoryChartMulti.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/usePrometheusQueryRange.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/hooks/usePrometheusQueryRangeMulti.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/prometheus.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/prometheus.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/utils/prometheusAdapter.d.ts +21 -0
- package/dist/types/localTypes/bff/table.d.ts +2 -1
- package/dist/types/localTypes/richTable.d.ts +2 -0
- package/package.json +2 -1
|
@@ -47051,16 +47051,29 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47051
47051
|
additionalPrinterColumnsTrimLengths,
|
|
47052
47052
|
additionalPrinterColumnsColWidths,
|
|
47053
47053
|
additionalPrinterColumnsKeyTypeProps,
|
|
47054
|
-
|
|
47054
|
+
additionalPrinterColumnsDisableSortersAndFilters,
|
|
47055
|
+
theme,
|
|
47056
|
+
getRowKey
|
|
47057
|
+
// for factory search
|
|
47055
47058
|
}) => {
|
|
47056
47059
|
if (!columns) {
|
|
47057
47060
|
return void 0;
|
|
47058
47061
|
}
|
|
47059
|
-
return columns.map((el) => {
|
|
47062
|
+
return columns.map((el, colIndex) => {
|
|
47063
|
+
const isSortersAndFitlersDisabled = additionalPrinterColumnsDisableSortersAndFilters?.some((key) => key === el.key);
|
|
47060
47064
|
const possibleUndefinedValue = additionalPrinterColumnsUndefinedValues?.find(({ key }) => key === el.key)?.value;
|
|
47061
47065
|
const possibleTrimLength = additionalPrinterColumnsTrimLengths?.find(({ key }) => key === el.key)?.value;
|
|
47062
47066
|
const possibleColWidth = additionalPrinterColumnsColWidths?.find(({ key }) => key === el.key)?.value;
|
|
47063
47067
|
const possibleCustomTypeWithProps = additionalPrinterColumnsKeyTypeProps && el.key ? additionalPrinterColumnsKeyTypeProps[el.key.toString()] : void 0;
|
|
47068
|
+
const useFactorySearch = possibleCustomTypeWithProps?.type === "factory";
|
|
47069
|
+
const colKey = el.key != null && String(el.key) || (Array.isArray(el.dataIndex) ? el.dataIndex.join(".") : String(el.dataIndex ?? colIndex));
|
|
47070
|
+
const getCellTextFromDOM = (record) => {
|
|
47071
|
+
const rowKey = getRowKey(record);
|
|
47072
|
+
const selector = `td[data-rowkey="${String(rowKey)}"][data-colkey="${colKey}"]`;
|
|
47073
|
+
const cell = document.querySelector(selector);
|
|
47074
|
+
if (!cell) return "";
|
|
47075
|
+
return (cell.innerText || cell.textContent || "").trim().toLowerCase();
|
|
47076
|
+
};
|
|
47064
47077
|
return {
|
|
47065
47078
|
...el,
|
|
47066
47079
|
render: (value, record) => getCellRender({
|
|
@@ -47072,18 +47085,43 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47072
47085
|
theme
|
|
47073
47086
|
}),
|
|
47074
47087
|
width: possibleColWidth,
|
|
47075
|
-
|
|
47076
|
-
|
|
47077
|
-
|
|
47078
|
-
|
|
47079
|
-
|
|
47080
|
-
|
|
47081
|
-
|
|
47082
|
-
|
|
47088
|
+
// for factory search
|
|
47089
|
+
onCell: (record) => {
|
|
47090
|
+
const rowKey = getRowKey(record);
|
|
47091
|
+
return {
|
|
47092
|
+
"data-rowkey": String(rowKey),
|
|
47093
|
+
"data-colkey": String(colKey)
|
|
47094
|
+
};
|
|
47095
|
+
},
|
|
47096
|
+
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => {
|
|
47097
|
+
if (isSortersAndFitlersDisabled) {
|
|
47098
|
+
return null;
|
|
47083
47099
|
}
|
|
47084
|
-
|
|
47085
|
-
|
|
47100
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47101
|
+
FilterDropdown,
|
|
47102
|
+
{
|
|
47103
|
+
setSelectedKeys,
|
|
47104
|
+
selectedKeys,
|
|
47105
|
+
confirm,
|
|
47106
|
+
clearFilters,
|
|
47107
|
+
close
|
|
47108
|
+
}
|
|
47109
|
+
);
|
|
47110
|
+
},
|
|
47111
|
+
filterIcon: (filtered) => {
|
|
47112
|
+
if (isSortersAndFitlersDisabled) {
|
|
47113
|
+
return null;
|
|
47114
|
+
}
|
|
47115
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(icons.SearchOutlined, { style: { color: filtered ? "#1677ff" : void 0 } });
|
|
47116
|
+
},
|
|
47086
47117
|
onFilter: (value, record) => {
|
|
47118
|
+
if (isSortersAndFitlersDisabled) {
|
|
47119
|
+
return false;
|
|
47120
|
+
}
|
|
47121
|
+
if (useFactorySearch) {
|
|
47122
|
+
const text = getCellTextFromDOM(record);
|
|
47123
|
+
return text.includes(String(value).toLowerCase());
|
|
47124
|
+
}
|
|
47087
47125
|
const { dataIndex } = el;
|
|
47088
47126
|
const entry = Array.isArray(dataIndex) ? lodashExports.get(record, dataIndex) : record[dataIndex];
|
|
47089
47127
|
if (typeof entry === "object" && !Array.isArray(entry)) {
|
|
@@ -47104,7 +47142,12 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47104
47142
|
}
|
|
47105
47143
|
return false;
|
|
47106
47144
|
},
|
|
47107
|
-
sorter: (a, b) => {
|
|
47145
|
+
sorter: isSortersAndFitlersDisabled ? false : (a, b) => {
|
|
47146
|
+
if (useFactorySearch) {
|
|
47147
|
+
const aText = getCellTextFromDOM(a);
|
|
47148
|
+
const bText = getCellTextFromDOM(b);
|
|
47149
|
+
return aText.localeCompare(bText);
|
|
47150
|
+
}
|
|
47108
47151
|
const { dataIndex } = el;
|
|
47109
47152
|
const aEntry = Array.isArray(dataIndex) ? lodashExports.get(a, dataIndex) : a[dataIndex];
|
|
47110
47153
|
const bEntry = Array.isArray(dataIndex) ? lodashExports.get(b, dataIndex) : b[dataIndex];
|
|
@@ -47235,6 +47278,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47235
47278
|
additionalPrinterColumnsTrimLengths,
|
|
47236
47279
|
additionalPrinterColumnsColWidths,
|
|
47237
47280
|
additionalPrinterColumnsKeyTypeProps,
|
|
47281
|
+
additionalPrinterColumnsDisableSortersAndFilters,
|
|
47238
47282
|
selectData,
|
|
47239
47283
|
withoutControls = false,
|
|
47240
47284
|
tableProps
|
|
@@ -47243,13 +47287,17 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47243
47287
|
if (!columns) {
|
|
47244
47288
|
return null;
|
|
47245
47289
|
}
|
|
47290
|
+
const rowKey = (record) => record.key;
|
|
47246
47291
|
const enrichedColumns = getEnrichedColumns({
|
|
47247
47292
|
columns,
|
|
47248
47293
|
additionalPrinterColumnsUndefinedValues,
|
|
47249
47294
|
additionalPrinterColumnsTrimLengths,
|
|
47250
47295
|
additionalPrinterColumnsColWidths,
|
|
47251
47296
|
additionalPrinterColumnsKeyTypeProps,
|
|
47252
|
-
|
|
47297
|
+
additionalPrinterColumnsDisableSortersAndFilters,
|
|
47298
|
+
theme,
|
|
47299
|
+
getRowKey: rowKey
|
|
47300
|
+
// for factory search
|
|
47253
47301
|
});
|
|
47254
47302
|
if (!enrichedColumns) {
|
|
47255
47303
|
return null;
|
|
@@ -47275,6 +47323,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47275
47323
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableComponents.HideableControls, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47276
47324
|
antd.Table,
|
|
47277
47325
|
{
|
|
47326
|
+
rowKey,
|
|
47278
47327
|
dataSource,
|
|
47279
47328
|
columns: columnsWithControls,
|
|
47280
47329
|
pagination: tableProps?.disablePagination ? false : {
|
|
@@ -47616,6 +47665,7 @@ if (_IS_WORKLET) registerPaint("spoiler", SpoilerPainterWorklet);
|
|
|
47616
47665
|
additionalPrinterColumnsTrimLengths: preparedProps.additionalPrinterColumnsTrimLengths,
|
|
47617
47666
|
additionalPrinterColumnsColWidths: preparedProps.additionalPrinterColumnsColWidths,
|
|
47618
47667
|
additionalPrinterColumnsKeyTypeProps: preparedProps.additionalPrinterColumnsKeyTypeProps,
|
|
47668
|
+
additionalPrinterColumnsDisableSortersAndFilters: preparedProps.additionalPrinterColumnsDisableSortersAndFilters,
|
|
47619
47669
|
selectData,
|
|
47620
47670
|
tableProps,
|
|
47621
47671
|
withoutControls
|