@balena/ui-shared-components 15.2.11-build-add-experimental-secure-boot-flag-e7fd4aa4ad3fc121ec9337ba1d2269cd8c769fb6-1 → 15.2.11-build-secureboot-only-for-non-esr-5c7916306951e79b0a3900c92ab939d96c37587b-1

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.
@@ -41,7 +41,7 @@ export const GENERIC_X86_SLUG = 'generic-amd64';
41
41
  export const GENERIC_X86_MINIMUM_SUPPORTED_SECUREBOOT_VERSION = '6.6.10';
42
42
  export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVersions, isInitialDefault, osType, osTypes, hasEsrVersions, model, formElement, downloadUrl, applicationId, authToken, onSelectedOsTypeChange, onChange, }) {
43
43
  var _a, _b;
44
- const { state: analyticsState } = useAnalyticsContext();
44
+ const { state } = useAnalyticsContext();
45
45
  const [showAdvancedSettings, setShowAdvancedSettings] = useState(false);
46
46
  const [showSecureBootConfirmationDialog, setShowSecureBootConfirmationDialog,] = useState(false);
47
47
  const [dontShowSecureBootWarningAgain, setDontShowSecureBootWarningAgain] = useState(false);
@@ -53,18 +53,17 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
53
53
  const versionSelectionOpts = useMemo(() => (showAllVersions ? selectionOpts : preferredSelectionOpts), [preferredSelectionOpts, selectionOpts, showAllVersions]);
54
54
  const showAllVersionsToggle = useMemo(() => preferredSelectionOpts.length < selectionOpts.length, [preferredSelectionOpts.length, selectionOpts.length]);
55
55
  const supportsSecureBoot = useMemo(() => {
56
- var _a, _b;
57
- return (((_b = (_a = analyticsState.featureFlags) === null || _a === void 0 ? void 0 : _a['toggle-secure-boot']) === null || _b === void 0 ? void 0 : _b.value) === 'on' &&
56
+ return (osType === 'default' &&
58
57
  model.deviceType.slug === GENERIC_X86_SLUG &&
59
58
  semver.gte(model.version, GENERIC_X86_MINIMUM_SUPPORTED_SECUREBOOT_VERSION));
60
- }, [analyticsState.featureFlags, model.deviceType.slug, model.version]);
59
+ }, [model.deviceType.slug, model.version, osType]);
61
60
  const secureBootDontShowAgainKey = `${model.deviceType.slug}_secureboot_warning_do_not_show_again`;
62
61
  const dismissSecureBootWarning = useCallback((accepted, dontShowAgain) => {
63
62
  var _a;
64
63
  setShowSecureBootConfirmationDialog(false);
65
- (_a = analyticsState.webTracker) === null || _a === void 0 ? void 0 : _a.track('Application Add Device Modal Hide Secure Boot Warning', { accepted, dontShowAgain });
64
+ (_a = state.webTracker) === null || _a === void 0 ? void 0 : _a.track('Application Add Device Modal Hide Secure Boot Warning', { accepted, dontShowAgain });
66
65
  setDontShowSecureBootWarningAgain(false);
67
- }, [analyticsState.webTracker]);
66
+ }, [state.webTracker]);
68
67
  const handleVariantChange = useCallback((newVariant) => {
69
68
  setVariant(newVariant);
70
69
  const newState = {
@@ -197,8 +196,8 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
197
196
  !getFromLocalStorage(secureBootDontShowAgainKey)) {
198
197
  event.preventDefault();
199
198
  setShowSecureBootConfirmationDialog(true);
200
- if (analyticsState.webTracker) {
201
- analyticsState.webTracker.track('Application Add Device Modal Show Secure Boot Warning');
199
+ if (state.webTracker) {
200
+ state.webTracker.track('Application Add Device Modal Show Secure Boot Warning');
202
201
  }
203
202
  }
204
203
  }, onChange: (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "15.2.11-build-add-experimental-secure-boot-flag-e7fd4aa4ad3fc121ec9337ba1d2269cd8c769fb6-1",
3
+ "version": "15.2.11-build-secureboot-only-for-non-esr-5c7916306951e79b0a3900c92ab939d96c37587b-1",
4
4
  "main": "./dist/index.js",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -135,7 +135,7 @@
135
135
  },
136
136
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
137
137
  "versionist": {
138
- "publishedAt": "2025-12-04T18:39:50.032Z"
138
+ "publishedAt": "2025-12-08T18:26:18.893Z"
139
139
  },
140
140
  "overrides": {
141
141
  "storybook": "$storybook",