@odigos/ui-kit 0.0.31 → 0.0.33
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/CHANGELOG.md +15 -0
- package/lib/components.js +10 -13
- package/lib/constants/strings/index.d.ts +1 -0
- package/lib/constants.js +3 -6
- package/lib/containers/data-stream-drawer/index.d.ts +1 -1
- package/lib/containers/data-stream-form/index.d.ts +1 -0
- package/lib/containers/destination-selection-form/destination-list/index.d.ts +2 -0
- package/lib/containers/instrumentation-rule-form/custom-fields/headers-collection.d.ts +5 -0
- package/lib/containers/setup-summary/index.d.ts +2 -0
- package/lib/containers.js +73 -76
- package/lib/functions/get-yaml-fields-for-destination/index.d.ts +2 -0
- package/lib/functions/index.d.ts +3 -0
- package/lib/functions/is-legal-k8s-label/index.d.ts +1 -0
- package/lib/functions/map-destination-fields-for-display/index.d.ts +6 -0
- package/lib/functions.js +8 -10
- package/lib/hooks/useInstrumentationRuleFormData.d.ts +1 -1
- package/lib/hooks.js +6 -9
- package/lib/icons/instrumentation-rules/headers-collection-icon/headers-collection-icon.stories.d.ts +8 -0
- package/lib/icons/instrumentation-rules/headers-collection-icon/index.d.ts +2 -0
- package/lib/icons/instrumentation-rules/index.d.ts +1 -0
- package/lib/icons.js +7 -8
- package/lib/{index-BbbCCewR.js → index-1N9wymEq.js} +1 -1
- package/lib/{index-CWbxXTof.js → index-BQQZyvRz.js} +1 -1
- package/lib/{index-CJs4RDHU.js → index-B_Gl6Qa6.js} +2 -3
- package/lib/{index-nltUpkWT.js → index-BedCNcwV.js} +7 -9
- package/lib/{index-B46Mcu9H.js → index-BjVl4-os.js} +5 -6
- package/lib/{index-BJxaoI0G.js → index-CNfdJ1X8.js} +1 -1
- package/lib/index-CVH8Q8Sl.js +1178 -0
- package/lib/{index-BGK1nMOD.js → index-CaAOgaiC.js} +2 -2
- package/lib/{index-7-KCQK-x.js → index-CnZlllYu.js} +10 -1
- package/lib/{index-IKusBlIE.js → index-Do3CYz7N.js} +1 -1
- package/lib/{index-DYNMhZMX.js → index-Iq7U_fzb.js} +42 -7
- package/lib/{index-CamnKrev.js → index-f8FRaVkE.js} +1 -1
- package/lib/index-mOgS3e5E.js +101 -0
- package/lib/snippets.js +10 -13
- package/lib/store.js +2 -2
- package/lib/theme.js +3 -233
- package/lib/types/instrumentation-rules/index.d.ts +26 -18
- package/lib/types.js +15 -9
- package/lib/{useSourceSelectionFormData-BWz8fTJr.js → useSourceSelectionFormData-DiwzViqL.js} +9 -5
- package/lib/{useTransition-B65KBqdK.js → useTransition-B0eagOib.js} +1 -2
- package/package.json +1 -1
- package/lib/index-CFnxjzaW.js +0 -37
- package/lib/index-DGel4E-Z.js +0 -67
- package/lib/index-DGuOxbBR.js +0 -227
- package/lib/index-DMXaEyAB.js +0 -720
- package/lib/{index-BZS1ijMm.js → index-BV85P9UP.js} +14 -14
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
// Sometimes we need to allow "zero" values, and a simple "!val" check would result in false positives.
|
|
2
|
-
// This function is a strict check for empty values, permitting values like "0" and "false".
|
|
3
|
-
const isEmpty = (val) => {
|
|
4
|
-
if (Array.isArray(val)) {
|
|
5
|
-
return !val?.length;
|
|
6
|
-
}
|
|
7
|
-
else if (typeof val === 'object') {
|
|
8
|
-
return !Object.keys(val || {}).length;
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return [undefined, null, ''].includes(val);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
1
|
function safeJsonParse(val, fallback) {
|
|
16
2
|
if (!val)
|
|
17
3
|
return fallback;
|
|
@@ -27,4 +13,18 @@ function safeJsonParse(val, fallback) {
|
|
|
27
13
|
}
|
|
28
14
|
}
|
|
29
15
|
|
|
16
|
+
// Sometimes we need to allow "zero" values, and a simple "!val" check would result in false positives.
|
|
17
|
+
// This function is a strict check for empty values, permitting values like "0" and "false".
|
|
18
|
+
const isEmpty = (val) => {
|
|
19
|
+
if (Array.isArray(val)) {
|
|
20
|
+
return !val?.length;
|
|
21
|
+
}
|
|
22
|
+
else if (typeof val === 'object') {
|
|
23
|
+
return !Object.keys(val || {}).length;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return [undefined, null, ''].includes(val);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
30
|
export { isEmpty as i, safeJsonParse as s };
|