@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.87 → 0.0.1-alpha.89
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 +72 -9
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +72 -9
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ParsedText/utils.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/StatusText/utils.d.ts +13 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +6 -2
- package/dist/types/localTypes/bff/table.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8679,7 +8679,7 @@ const findMatchingItems = ({
|
|
|
8679
8679
|
const currentPath = [...parents, node.key ? node.key : String(node.key)];
|
|
8680
8680
|
const cleanNodeInternalMetaLink = node.internalMetaLink?.startsWith("/") ? node.internalMetaLink.slice(1) : node.internalMetaLink;
|
|
8681
8681
|
const cleanPathname = pathname.startsWith("/") ? pathname.slice(1) : pathname;
|
|
8682
|
-
const matched = cleanNodeInternalMetaLink === cleanPathname
|
|
8682
|
+
const matched = cleanNodeInternalMetaLink === cleanPathname ? currentPath : [];
|
|
8683
8683
|
const tagsToMatch = tags && tags.keysAndTags && node.key ? tags.keysAndTags[typeof node.key === "string" ? node.key : String(node.key)] : void 0;
|
|
8684
8684
|
const matchedByTags = tags && tags.currentTags && tagsToMatch && tagsToMatch.some((tag) => tags.currentTags?.includes(tag)) ? currentPath : [];
|
|
8685
8685
|
let childrenResults = [];
|
|
@@ -26410,6 +26410,7 @@ const EnrichedTable$1 = ({
|
|
|
26410
26410
|
pathToNavigate,
|
|
26411
26411
|
recordKeysForNavigation,
|
|
26412
26412
|
recordKeysForNavigationSecond,
|
|
26413
|
+
recordKeysForNavigationThird,
|
|
26413
26414
|
additionalPrinterColumnsUndefinedValues,
|
|
26414
26415
|
additionalPrinterColumnsTrimLengths,
|
|
26415
26416
|
additionalPrinterColumnsColWidths,
|
|
@@ -26484,9 +26485,11 @@ const EnrichedTable$1 = ({
|
|
|
26484
26485
|
if (pathToNavigate && recordKeysForNavigation) {
|
|
26485
26486
|
const recordValueRaw = lodashExports.get(record, recordKeysForNavigation);
|
|
26486
26487
|
const recordValueRawSecond = recordKeysForNavigationSecond ? lodashExports.get(record, recordKeysForNavigationSecond) : "no-second-record-keys";
|
|
26488
|
+
const recordValueRawThird = recordKeysForNavigationThird ? lodashExports.get(record, recordKeysForNavigationThird) : "no-second-record-keys";
|
|
26487
26489
|
const recordValue = typeof recordValueRaw === "string" ? recordValueRaw : JSON.stringify(recordValueRaw);
|
|
26488
26490
|
const recordValueSecond = typeof recordValueRawSecond === "string" ? recordValueRawSecond : JSON.stringify(recordValueRawSecond);
|
|
26489
|
-
const
|
|
26491
|
+
const recordValueThird = typeof recordValueRawThird === "string" ? recordValueRawThird : JSON.stringify(recordValueRawThird);
|
|
26492
|
+
const newPath = pathToNavigate.replaceAll("~recordValue~", recordValue).replaceAll("~recordValueSecond~", recordValueSecond).replaceAll("~recordValueThird~", recordValueThird);
|
|
26490
26493
|
navigate(newPath);
|
|
26491
26494
|
}
|
|
26492
26495
|
}
|
|
@@ -33469,6 +33472,7 @@ const EnrichedTableProvider = ({
|
|
|
33469
33472
|
pathToNavigate: preparedProps.pathToNavigate,
|
|
33470
33473
|
recordKeysForNavigation: preparedProps.recordKeysForNavigation,
|
|
33471
33474
|
recordKeysForNavigationSecond: preparedProps.recordKeysForNavigationSecond,
|
|
33475
|
+
recordKeysForNavigationThird: preparedProps.recordKeysForNavigationThird,
|
|
33472
33476
|
additionalPrinterColumnsUndefinedValues: preparedProps.additionalPrinterColumnsUndefinedValues,
|
|
33473
33477
|
additionalPrinterColumnsTrimLengths: preparedProps.additionalPrinterColumnsTrimLengths,
|
|
33474
33478
|
additionalPrinterColumnsColWidths: preparedProps.additionalPrinterColumnsColWidths,
|
|
@@ -46041,6 +46045,21 @@ const MultiQuery = ({ data }) => {
|
|
|
46041
46045
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: preparedText });
|
|
46042
46046
|
};
|
|
46043
46047
|
|
|
46048
|
+
const formatLocalDate = (iso) => {
|
|
46049
|
+
const date = new Date(iso);
|
|
46050
|
+
return date.toLocaleString(void 0, {
|
|
46051
|
+
year: "numeric",
|
|
46052
|
+
month: "long",
|
|
46053
|
+
day: "numeric",
|
|
46054
|
+
hour: "2-digit",
|
|
46055
|
+
minute: "2-digit",
|
|
46056
|
+
second: "2-digit",
|
|
46057
|
+
hour12: false
|
|
46058
|
+
// set to true for 12-hour clock with AM/PM
|
|
46059
|
+
// timeZoneName: 'short', // e.g. “CEST”
|
|
46060
|
+
});
|
|
46061
|
+
};
|
|
46062
|
+
|
|
46044
46063
|
const ParsedText = ({ data }) => {
|
|
46045
46064
|
const { data: multiQueryData, isLoading, isError, errors } = useMultiQuery();
|
|
46046
46065
|
const partsOfUrl = usePartsOfUrl();
|
|
@@ -46057,8 +46076,9 @@ const ParsedText = ({ data }) => {
|
|
|
46057
46076
|
acc[index.toString()] = value;
|
|
46058
46077
|
return acc;
|
|
46059
46078
|
}, {});
|
|
46060
|
-
const
|
|
46061
|
-
|
|
46079
|
+
const parsedText = parseAll({ text: data.text, replaceValues, multiQueryData });
|
|
46080
|
+
const formattedText = data.formatter ? formatLocalDate(parsedText) : parsedText;
|
|
46081
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: data.style, children: formattedText });
|
|
46062
46082
|
};
|
|
46063
46083
|
|
|
46064
46084
|
const ProjectInfoCard = ({
|
|
@@ -46135,12 +46155,44 @@ const DefaultDiv = ({
|
|
|
46135
46155
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...props, children });
|
|
46136
46156
|
};
|
|
46137
46157
|
|
|
46158
|
+
const getResult = ({
|
|
46159
|
+
valuePrepared,
|
|
46160
|
+
criteriaSuccess,
|
|
46161
|
+
criteriaError,
|
|
46162
|
+
valueToCompareSuccess,
|
|
46163
|
+
valueToCompareError,
|
|
46164
|
+
successText,
|
|
46165
|
+
errorText,
|
|
46166
|
+
fallbackText
|
|
46167
|
+
}) => {
|
|
46168
|
+
const success = criteriaSuccess === "equals" ? valueToCompareSuccess.includes(valuePrepared) : !valueToCompareSuccess.includes(valuePrepared);
|
|
46169
|
+
if (success) {
|
|
46170
|
+
return { type: "success", text: successText };
|
|
46171
|
+
}
|
|
46172
|
+
const error = criteriaError === "equals" ? valueToCompareError.includes(valuePrepared) : !valueToCompareError.includes(valuePrepared);
|
|
46173
|
+
if (error) {
|
|
46174
|
+
return { type: "danger", text: errorText };
|
|
46175
|
+
}
|
|
46176
|
+
return { type: "warning", text: fallbackText };
|
|
46177
|
+
};
|
|
46178
|
+
|
|
46138
46179
|
const StatusText = ({
|
|
46139
46180
|
data,
|
|
46140
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46141
46181
|
children
|
|
46142
46182
|
}) => {
|
|
46143
|
-
const {
|
|
46183
|
+
const {
|
|
46184
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46185
|
+
id,
|
|
46186
|
+
value,
|
|
46187
|
+
criteriaSuccess,
|
|
46188
|
+
criteriaError,
|
|
46189
|
+
valueToCompareSuccess,
|
|
46190
|
+
valueToCompareError,
|
|
46191
|
+
successText,
|
|
46192
|
+
errorText,
|
|
46193
|
+
fallbackText,
|
|
46194
|
+
...props
|
|
46195
|
+
} = data;
|
|
46144
46196
|
const { data: multiQueryData, isLoading: isMultiqueryLoading, isError, errors } = useMultiQuery();
|
|
46145
46197
|
const partsOfUrl = usePartsOfUrl();
|
|
46146
46198
|
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value2, index) => {
|
|
@@ -46149,8 +46201,8 @@ const StatusText = ({
|
|
|
46149
46201
|
}, {});
|
|
46150
46202
|
const successTextPrepared = parseAll({ text: successText, replaceValues, multiQueryData });
|
|
46151
46203
|
const errorTextPrepared = parseAll({ text: errorText, replaceValues, multiQueryData });
|
|
46204
|
+
const fallbackTextPrepared = parseAll({ text: fallbackText, replaceValues, multiQueryData });
|
|
46152
46205
|
const valuePrepared = parseAll({ text: value, replaceValues, multiQueryData });
|
|
46153
|
-
const result = criteria === "equals" ? valueToCompare === valuePrepared : valueToCompare !== valuePrepared;
|
|
46154
46206
|
if (isMultiqueryLoading) {
|
|
46155
46207
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading multiquery" });
|
|
46156
46208
|
}
|
|
@@ -46160,8 +46212,18 @@ const StatusText = ({
|
|
|
46160
46212
|
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: e.message }, i)) })
|
|
46161
46213
|
] });
|
|
46162
46214
|
}
|
|
46163
|
-
|
|
46164
|
-
|
|
46215
|
+
const { type, text } = getResult({
|
|
46216
|
+
valuePrepared,
|
|
46217
|
+
criteriaSuccess,
|
|
46218
|
+
criteriaError,
|
|
46219
|
+
valueToCompareSuccess,
|
|
46220
|
+
valueToCompareError,
|
|
46221
|
+
successText: successTextPrepared,
|
|
46222
|
+
errorText: errorTextPrepared,
|
|
46223
|
+
fallbackText: fallbackTextPrepared
|
|
46224
|
+
});
|
|
46225
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { type, ...props, children: [
|
|
46226
|
+
text,
|
|
46165
46227
|
children
|
|
46166
46228
|
] });
|
|
46167
46229
|
};
|
|
@@ -46622,6 +46684,7 @@ const parseArrayOfAny = (value) => {
|
|
|
46622
46684
|
|
|
46623
46685
|
const ArrayOfObjectsToKeyValues = ({ data, children }) => {
|
|
46624
46686
|
const {
|
|
46687
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46625
46688
|
id,
|
|
46626
46689
|
reqIndex,
|
|
46627
46690
|
jsonPathToArray,
|