@flightctl/ui-components 0.5.1 → 0.6.0-rc2
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/src/components/DetailsPage/DetailsPage.d.ts +3 -2
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPage.js +2 -2
- package/dist/src/components/DetailsPage/DetailsPage.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +5 -3
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js +4 -5
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.js +110 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +7 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +9 -6
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js +3 -3
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.js +3 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +34 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +35 -30
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +11 -2
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +14 -11
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +9 -2
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js +21 -6
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js +11 -4
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +6 -5
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +123 -10
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js +19 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js +49 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +52 -19
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +13 -16
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js +5 -5
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +16 -16
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js +58 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +17 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts +2 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +29 -3
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.js +8 -7
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.d.ts.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.js.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts +1 -4
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +5 -5
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts +2 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +19 -11
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +5 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts +2 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js +8 -4
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +2 -2
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js +8 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts +19 -2
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js +53 -18
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js +1 -2
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js +22 -9
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js +4 -4
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js +5 -5
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.css +3 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js +127 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js +13 -4
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.js +8 -12
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js.map +1 -1
- package/dist/src/components/ListPage/ListPage.d.ts +1 -0
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -1
- package/dist/src/components/ListPage/ListPage.js +3 -3
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts +4 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts.map +1 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.js +90 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.js.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesModal.d.ts.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesModal.js.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesProvider.d.ts.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesProvider.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +3 -3
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/{ToDo/ToDoCard.js → Tasks/TasksCard.js} +4 -4
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.js.map +1 -0
- package/dist/src/components/OverviewPage/Overview.js +2 -2
- package/dist/src/components/OverviewPage/Overview.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +6 -5
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +3 -3
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.js +4 -1
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryList.js +3 -11
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +3 -6
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/Status/DeviceResourceStatus.js +3 -3
- package/dist/src/components/Status/utils.d.ts.map +1 -1
- package/dist/src/components/Status/utils.js +3 -3
- package/dist/src/components/Status/utils.js.map +1 -1
- package/dist/src/components/Table/Table.d.ts +2 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/Table.js +9 -5
- package/dist/src/components/Table/Table.js.map +1 -1
- package/dist/src/components/Table/TablePagination.d.ts.map +1 -1
- package/dist/src/components/Table/TablePagination.js +1 -1
- package/dist/src/components/Table/TablePagination.js.map +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -1
- package/dist/src/components/Terminal/Terminal.js +10 -3
- package/dist/src/components/Terminal/Terminal.js.map +1 -1
- package/dist/src/components/charts/DonutChart.js +1 -1
- package/dist/src/components/charts/DonutChart.js.map +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/WithHelperText.d.ts +10 -5
- package/dist/src/components/common/WithHelperText.d.ts.map +1 -1
- package/dist/src/components/common/WithHelperText.js +13 -8
- package/dist/src/components/common/WithHelperText.js.map +1 -1
- package/dist/src/components/form/CheckboxField.d.ts +6 -3
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -1
- package/dist/src/components/form/CheckboxField.js +20 -1
- package/dist/src/components/form/CheckboxField.js.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.d.ts +3 -3
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.js +43 -53
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -1
- package/dist/src/components/form/RichValidationTextField.js +8 -4
- package/dist/src/components/form/RichValidationTextField.js.map +1 -1
- package/dist/src/components/form/validations.d.ts +44 -4
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +148 -25
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js +5 -3
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +3 -2
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +7 -12
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -1
- package/dist/src/hooks/timeZones.d.ts +3 -0
- package/dist/src/hooks/timeZones.d.ts.map +1 -0
- package/dist/src/hooks/timeZones.js +607 -0
- package/dist/src/hooks/timeZones.js.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +14 -8
- package/dist/src/hooks/useAppContext.d.ts.map +1 -1
- package/dist/src/hooks/useAppContext.js +13 -6
- package/dist/src/hooks/useAppContext.js.map +1 -1
- package/dist/src/hooks/useFetch.d.ts +3 -5
- package/dist/src/hooks/useFetch.d.ts.map +1 -1
- package/dist/src/hooks/useFetch.js +3 -2
- package/dist/src/hooks/useFetch.js.map +1 -1
- package/dist/src/hooks/useNavigate.d.ts +2 -1
- package/dist/src/hooks/useNavigate.d.ts.map +1 -1
- package/dist/src/hooks/useNavigate.js +1 -0
- package/dist/src/hooks/useNavigate.js.map +1 -1
- package/dist/src/hooks/useTimeZones.d.ts +4 -0
- package/dist/src/hooks/useTimeZones.d.ts.map +1 -0
- package/dist/src/hooks/useTimeZones.js +22 -0
- package/dist/src/hooks/useTimeZones.js.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +6 -2
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/src/hooks/useWebSocket.js +22 -7
- package/dist/src/hooks/useWebSocket.js.map +1 -1
- package/dist/src/links.d.ts +3 -0
- package/dist/src/links.d.ts.map +1 -1
- package/dist/src/links.js +10 -3
- package/dist/src/links.js.map +1 -1
- package/dist/src/types/deviceSpec.d.ts +93 -5
- package/dist/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/src/types/deviceSpec.js +28 -2
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +19 -1
- package/dist/src/types/extraTypes.d.ts.map +1 -1
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/utils/labels.d.ts +1 -0
- package/dist/src/utils/labels.d.ts.map +1 -1
- package/dist/src/utils/labels.js +9 -2
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/patch.d.ts +13 -5
- package/dist/src/utils/patch.d.ts.map +1 -1
- package/dist/src/utils/patch.js +115 -71
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/query.d.ts +1 -0
- package/dist/src/utils/query.d.ts.map +1 -1
- package/dist/src/utils/query.js +10 -3
- package/dist/src/utils/query.js.map +1 -1
- package/dist/src/utils/search.d.ts +6 -0
- package/dist/src/utils/search.d.ts.map +1 -1
- package/dist/src/utils/search.js +9 -1
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/time.d.ts +31 -0
- package/dist/src/utils/time.d.ts.map +1 -0
- package/dist/src/utils/time.js +134 -0
- package/dist/src/utils/time.js.map +1 -0
- package/package.json +1 -4
- package/src/components/DetailsPage/DetailsPage.tsx +6 -4
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +6 -3
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +4 -13
- package/src/components/Device/DeviceDetails/DeviceAliasEdit.tsx +180 -0
- package/src/components/Device/DeviceDetails/DeviceApplications.tsx +8 -1
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +21 -5
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +3 -4
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsx +7 -10
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsx +3 -3
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +43 -5
- package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +2 -1
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +66 -38
- package/src/components/Device/DevicesPage/DevicesPage.tsx +11 -2
- package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +16 -11
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +11 -2
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.tsx +22 -6
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +15 -2
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +147 -14
- package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +28 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +94 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +81 -50
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +23 -28
- package/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx +1 -2
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +18 -39
- package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +8 -14
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +26 -39
- package/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.tsx +88 -0
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +18 -19
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +3 -3
- package/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx +2 -2
- package/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.tsx +2 -1
- package/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/utils.ts +16 -9
- package/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.tsx +7 -6
- package/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.tsx +1 -5
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +7 -9
- package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +30 -17
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +5 -1
- package/src/components/EnrollmentRequest/useEnrollmentRequests.ts +12 -4
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +4 -3
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +9 -2
- package/src/components/Fleet/CreateFleet/fleetSpecUtils.ts +51 -17
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +1 -1
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +2 -13
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +3 -3
- package/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.tsx +10 -1
- package/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.tsx +49 -16
- package/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx +18 -33
- package/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx +14 -24
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.css +3 -0
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx +246 -0
- package/src/components/Fleet/CreateFleet/utils.ts +23 -7
- package/src/components/Fleet/FleetsPage.tsx +15 -17
- package/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.tsx +1 -1
- package/src/components/ListPage/ListPage.tsx +7 -4
- package/src/components/Masthead/CommandLineToolsPage.tsx +179 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +6 -6
- package/src/components/OverviewPage/Cards/{ToDo/ToDoCard.tsx → Tasks/TasksCard.tsx} +3 -3
- package/src/components/OverviewPage/Overview.tsx +2 -2
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +11 -26
- package/src/components/Repository/CreateRepository/CreateResourceSyncsForm.tsx +8 -17
- package/src/components/Repository/CreateRepository/utils.ts +4 -1
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +3 -4
- package/src/components/Repository/RepositoryList.tsx +9 -16
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +7 -11
- package/src/components/Status/DeviceResourceStatus.tsx +4 -4
- package/src/components/Status/utils.ts +3 -5
- package/src/components/Table/Table.tsx +32 -9
- package/src/components/Table/TablePagination.tsx +0 -1
- package/src/components/Terminal/Terminal.tsx +10 -4
- package/src/components/charts/DonutChart.tsx +2 -2
- package/src/components/common/LeaveFormConfirmation.tsx +2 -2
- package/src/components/common/WithHelperText.tsx +53 -21
- package/src/components/form/CheckboxField.tsx +28 -3
- package/src/components/form/FormSelectTypeahead.tsx +53 -80
- package/src/components/form/RichValidationTextField.tsx +73 -62
- package/src/components/form/validations.ts +207 -28
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx +5 -5
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +3 -2
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +9 -20
- package/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +2 -2
- package/src/hooks/timeZones.ts +606 -0
- package/src/hooks/useAppContext.tsx +20 -10
- package/src/hooks/useFetch.ts +3 -2
- package/src/hooks/useNavigate.tsx +1 -0
- package/src/hooks/useTimeZones.ts +26 -0
- package/src/hooks/useWebSocket.ts +29 -7
- package/src/links.ts +13 -4
- package/src/types/deviceSpec.ts +118 -2
- package/src/types/extraTypes.ts +33 -1
- package/src/utils/labels.ts +7 -1
- package/src/utils/patch.ts +126 -72
- package/src/utils/query.ts +13 -4
- package/src/utils/search.ts +8 -0
- package/src/utils/time.ts +147 -0
- package/dist/jest.config.d.ts +0 -12
- package/dist/jest.config.d.ts.map +0 -1
- package/dist/jest.config.js +0 -24
- package/dist/jest.config.js.map +0 -1
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts +0 -2
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts.map +0 -1
- package/dist/src/components/DetailsPage/DetailsPage.spec.js +0 -81
- package/dist/src/components/DetailsPage/DetailsPage.spec.js.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +0 -23
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/types.js +0 -3
- package/dist/src/components/Device/EditDeviceWizard/types.js.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +0 -29
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/types.js +0 -9
- package/dist/src/components/Fleet/CreateFleet/types.js.map +0 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts +0 -4
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +0 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesModal.js.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesProvider.js.map +0 -1
- package/dist/src/setupTests.d.ts +0 -2
- package/dist/src/setupTests.d.ts.map +0 -1
- package/dist/src/setupTests.js +0 -24
- package/dist/src/setupTests.js.map +0 -1
- package/dist/src/tests/test-utils.d.ts +0 -7
- package/dist/src/tests/test-utils.d.ts.map +0 -1
- package/dist/src/tests/test-utils.js +0 -21
- package/dist/src/tests/test-utils.js.map +0 -1
- package/src/components/DetailsPage/DetailsPage.spec.tsx +0 -128
- package/src/components/Device/EditDeviceWizard/types.ts +0 -22
- package/src/components/Fleet/CreateFleet/types.ts +0 -33
- package/src/setupTests.ts +0 -21
- package/src/tests/test-utils.tsx +0 -21
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesModal.d.ts +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesModal.js +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.d.ts +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.js +0 -0
- /package/src/components/{UserPreferences → Masthead}/UserPreferencesModal.tsx +0 -0
- /package/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.tsx +0 -0
package/src/utils/query.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlightCtlLabel } from '../types/extraTypes';
|
|
2
|
-
import { labelToExactApiMatchString } from './labels';
|
|
2
|
+
import { labelToExactApiMatchString, textToPartialApiMatchString } from './labels';
|
|
3
3
|
|
|
4
4
|
const addQueryConditions = (fieldSelectors: string[], fieldSelector: string, values?: string[]) => {
|
|
5
5
|
if (values?.length === 1) {
|
|
@@ -32,12 +32,9 @@ type CommonQueryOptions = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const commonQueries = {
|
|
35
|
-
// We can't specify a sorting, as every entity has a default sorting which is always applied implicitly.
|
|
36
35
|
getDevicesWithExactLabelMatching: (labels: FlightCtlLabel[], options?: CommonQueryOptions) => {
|
|
37
36
|
const searchParams = new URLSearchParams();
|
|
38
37
|
|
|
39
|
-
// By default (without the "equal" sign), the API returns a partial match, but only on the label keys
|
|
40
|
-
// To prevent this confusing behaviour, we query for exact matches in all cases (for both keys and values)
|
|
41
38
|
const exactLabelsMatch = labels.map(labelToExactApiMatchString).join(',');
|
|
42
39
|
searchParams.set('labelSelector', exactLabelsMatch);
|
|
43
40
|
|
|
@@ -46,6 +43,18 @@ export const commonQueries = {
|
|
|
46
43
|
}
|
|
47
44
|
return `devices?${searchParams.toString()}`;
|
|
48
45
|
},
|
|
46
|
+
getDevicesWithPartialLabelMatching: (text: string, options?: CommonQueryOptions) => {
|
|
47
|
+
const searchParams = new URLSearchParams({
|
|
48
|
+
kind: 'Device',
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
searchParams.set('fieldSelector', textToPartialApiMatchString(text));
|
|
52
|
+
|
|
53
|
+
if (options?.limit) {
|
|
54
|
+
searchParams.set('limit', `${options.limit}`);
|
|
55
|
+
}
|
|
56
|
+
return `labels?${searchParams.toString()}`;
|
|
57
|
+
},
|
|
49
58
|
getFleetsWithNameMatching: (matchName: string, options?: CommonQueryOptions) => {
|
|
50
59
|
const searchParams = new URLSearchParams();
|
|
51
60
|
searchParams.set('fieldSelector', `metadata.name contains ${matchName}`);
|
package/src/utils/search.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fuzzy from 'fuzzysearch';
|
|
2
|
+
import { API_VERSION } from '../constants';
|
|
2
3
|
|
|
3
4
|
// Must be an even number for "getSearchResultsCount" to work
|
|
4
5
|
export const MAX_TOTAL_SEARCH_RESULTS = 10;
|
|
@@ -23,3 +24,10 @@ export const getSearchResultsCount = (labelCount: number, fleetCount: number) =>
|
|
|
23
24
|
const rest = MAX_TOTAL_SEARCH_RESULTS - min;
|
|
24
25
|
return labelCount === min ? [labelCount, rest] : [rest, fleetCount];
|
|
25
26
|
};
|
|
27
|
+
|
|
28
|
+
export const getEmptyFleetSearch = () => ({
|
|
29
|
+
apiVersion: API_VERSION,
|
|
30
|
+
kind: 'Fleet',
|
|
31
|
+
metadata: {},
|
|
32
|
+
items: [],
|
|
33
|
+
});
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Duration } from '@flightctl/types';
|
|
2
|
+
|
|
3
|
+
export const formatTimePart = (val: number | string) => val.toString().padStart(2, '0');
|
|
4
|
+
|
|
5
|
+
export const getSelectableTimes = () => {
|
|
6
|
+
const times = {};
|
|
7
|
+
for (let hour = 0; hour < 24; hour++) {
|
|
8
|
+
for (let minute = 0; minute < 60; minute += 15) {
|
|
9
|
+
const timeString = `${formatTimePart(hour)}:${formatTimePart(minute)}`;
|
|
10
|
+
times[timeString] = timeString;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return times;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const valid24HourClockRegExp = /^([01]?[0-9]|2[0-3]):?([0-5][0-9])$/;
|
|
17
|
+
export const formatted24HourClockRegExp = /^([01][0-9]|2[0-3]):([0-5][0-9])$/;
|
|
18
|
+
export const defaultStartTime = '00:00';
|
|
19
|
+
export const defaultEndTime = '23:59';
|
|
20
|
+
export const localDeviceTimezone = 'Local'; // matches the API's default value
|
|
21
|
+
const defaultUpdateDuration = '30m';
|
|
22
|
+
|
|
23
|
+
export enum UpdateScheduleMode {
|
|
24
|
+
Weekly = 'weekly',
|
|
25
|
+
Daily = 'daily',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum Weekday {
|
|
29
|
+
Sunday = 0,
|
|
30
|
+
Monday,
|
|
31
|
+
Tuesday,
|
|
32
|
+
Wednesday,
|
|
33
|
+
Thursday,
|
|
34
|
+
Friday,
|
|
35
|
+
Saturday,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
enum CronParts {
|
|
39
|
+
Minutes = 0,
|
|
40
|
+
Hours = 1,
|
|
41
|
+
Days = 2,
|
|
42
|
+
Months = 3,
|
|
43
|
+
WeekDays = 4,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const durationToMinutes = (duration: Duration) => {
|
|
47
|
+
const timeoutVal = Number(duration.replace(/[shm]/, ''));
|
|
48
|
+
if (!timeoutVal) {
|
|
49
|
+
return 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (duration.includes('s')) {
|
|
53
|
+
return Math.round(timeoutVal / 60);
|
|
54
|
+
}
|
|
55
|
+
if (duration.includes('h')) {
|
|
56
|
+
return Math.round(timeoutVal * 60);
|
|
57
|
+
}
|
|
58
|
+
return timeoutVal;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const getEndTime = (startTime: string, duration?: Duration) => {
|
|
62
|
+
if (startTime === defaultStartTime && !duration) {
|
|
63
|
+
return defaultEndTime;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const [hours, minutes] = startTime.split(':').map(Number);
|
|
67
|
+
const durationMinutes = durationToMinutes(duration || defaultUpdateDuration);
|
|
68
|
+
|
|
69
|
+
const totalMinutes = hours * 60 + minutes + durationMinutes;
|
|
70
|
+
const newHours = Math.floor(totalMinutes / 60) % 24;
|
|
71
|
+
const newMinutes = totalMinutes % 60;
|
|
72
|
+
|
|
73
|
+
return `${formatTimePart(newHours)}:${formatTimePart(newMinutes)}`;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// Cron expression example: "0 4 * * 2,5"
|
|
77
|
+
export const getTime = (cronExp?: string) => {
|
|
78
|
+
const tokens = (cronExp || '').split(' ').filter(Boolean);
|
|
79
|
+
|
|
80
|
+
if (tokens.length !== 5) {
|
|
81
|
+
return defaultStartTime;
|
|
82
|
+
}
|
|
83
|
+
const hours = tokens[CronParts.Hours];
|
|
84
|
+
const minutes = tokens[CronParts.Minutes];
|
|
85
|
+
|
|
86
|
+
// Ensure hours and minutes are valid numbers (eg. fails when specifying ranges or steps)
|
|
87
|
+
if (Number.isNaN(Number(hours)) || Number.isNaN(Number(minutes))) {
|
|
88
|
+
return defaultStartTime;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return `${formatTimePart(hours)}:${formatTimePart(minutes)}`;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const getMinuteDifference = (timeA: string, timeB: string) => {
|
|
95
|
+
const [aHours, aMinutes] = timeA.split(':').map(Number);
|
|
96
|
+
const [bHours, bMinutes] = timeB.split(':').map(Number);
|
|
97
|
+
|
|
98
|
+
const totalMinutesA = aHours * 60 + aMinutes;
|
|
99
|
+
const totalMinutesB = bHours * 60 + bMinutes;
|
|
100
|
+
|
|
101
|
+
let difference = totalMinutesB - totalMinutesA;
|
|
102
|
+
|
|
103
|
+
// Adjust for crossing midnight by adding 24 hours if A is after B
|
|
104
|
+
if (difference < 0) {
|
|
105
|
+
difference += 24 * 60;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return difference;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const getWeekDays = (cronExp?: string): { allSelected: boolean; selectedDays: boolean[] } => {
|
|
112
|
+
const defaultDays = [true, true, true, true, true, true, true];
|
|
113
|
+
|
|
114
|
+
let selectedDays = defaultDays;
|
|
115
|
+
if (cronExp) {
|
|
116
|
+
const weekDayExp = cronExp.split(' ')[CronParts.WeekDays];
|
|
117
|
+
if (weekDayExp !== '*') {
|
|
118
|
+
const days = weekDayExp.split(',').map(Number);
|
|
119
|
+
selectedDays = defaultDays.map((_, index) => {
|
|
120
|
+
return days.includes(index);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
allSelected: selectedDays.every(Boolean),
|
|
127
|
+
selectedDays,
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export const getUpdateCronExpression = (startTime: string, scheduleMode: UpdateScheduleMode, weekDays: boolean[]) => {
|
|
132
|
+
const [hours, minutes] = startTime.split(':').map(Number);
|
|
133
|
+
|
|
134
|
+
const weekDayVals = weekDays
|
|
135
|
+
.map((isActive, index) => {
|
|
136
|
+
return isActive || scheduleMode === UpdateScheduleMode.Daily ? index : null;
|
|
137
|
+
})
|
|
138
|
+
.filter((num) => num !== null);
|
|
139
|
+
return `${minutes} ${hours} * * ${weekDayVals.join(',')}`;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const getStartGraceDuration = (startTime: string, endTime: string) => {
|
|
143
|
+
if (startTime && startTime === endTime) {
|
|
144
|
+
return '24h';
|
|
145
|
+
}
|
|
146
|
+
return `${getMinuteDifference(startTime, endTime)}m`;
|
|
147
|
+
};
|
package/dist/jest.config.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export let clearMocks: boolean;
|
|
2
|
-
export let collectCoverage: boolean;
|
|
3
|
-
export let coverageDirectory: string;
|
|
4
|
-
export let moduleDirectories: string[];
|
|
5
|
-
export let setupFilesAfterEnv: string[];
|
|
6
|
-
export let moduleNameMapper: {
|
|
7
|
-
'\\.(css|less)$': string;
|
|
8
|
-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': string;
|
|
9
|
-
};
|
|
10
|
-
export let preset: string;
|
|
11
|
-
export let testEnvironment: string;
|
|
12
|
-
//# sourceMappingURL=jest.config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.js"],"names":[],"mappings":""}
|
package/dist/jest.config.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// For a detailed explanation regarding each configuration property, visit:
|
|
3
|
-
// https://jestjs.io/docs/en/configuration.html
|
|
4
|
-
module.exports = {
|
|
5
|
-
// Automatically clear mock calls and instances between every test
|
|
6
|
-
clearMocks: true,
|
|
7
|
-
// Indicates whether the coverage information should be collected while executing the test
|
|
8
|
-
collectCoverage: false,
|
|
9
|
-
// The directory where Jest should output its coverage files
|
|
10
|
-
coverageDirectory: 'coverage',
|
|
11
|
-
// An array of directory names to be searched recursively up from the requiring module's location
|
|
12
|
-
moduleDirectories: ['node_modules', '<rootDir>/src'],
|
|
13
|
-
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
|
|
14
|
-
// A map from regular expressions to module names that allow to stub out resources with a single module
|
|
15
|
-
moduleNameMapper: {
|
|
16
|
-
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
|
|
17
|
-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
|
|
18
|
-
},
|
|
19
|
-
// A preset that is used as a base for Jest's configuration
|
|
20
|
-
preset: 'ts-jest/presets/js-with-ts',
|
|
21
|
-
// The test environment that will be used for testing.
|
|
22
|
-
testEnvironment: 'jest-environment-jsdom',
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=jest.config.js.map
|
package/dist/jest.config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.js"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,+CAA+C;AAE/C,MAAM,CAAC,OAAO,GAAG;IACf,kEAAkE;IAClE,UAAU,EAAE,IAAI;IAEhB,0FAA0F;IAC1F,eAAe,EAAE,KAAK;IAEtB,4DAA4D;IAC5D,iBAAiB,EAAE,UAAU;IAE7B,iGAAiG;IACjG,iBAAiB,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;IAEpD,kBAAkB,EAAE,CAAC,6BAA6B,CAAC;IAEnD,uGAAuG;IACvG,gBAAgB,EAAE;QAChB,gBAAgB,EAAE,kCAAkC;QACpD,qFAAqF,EACnF,iCAAiC;KACpC;IAED,2DAA2D;IAC3D,MAAM,EAAE,4BAA4B;IAEpC,sDAAsD;IACtD,eAAe,EAAE,wBAAwB;CAC1C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsPage.spec.d.ts","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsPage.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const React = tslib_1.__importStar(require("react"));
|
|
5
|
-
const test_utils_1 = require("../../tests/test-utils");
|
|
6
|
-
const DetailsPage_1 = tslib_1.__importDefault(require("./DetailsPage"));
|
|
7
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
8
|
-
const useNavigate_1 = require("../../hooks/useNavigate");
|
|
9
|
-
const baseProps = {
|
|
10
|
-
id: 'device-id',
|
|
11
|
-
title: 'MyTitle',
|
|
12
|
-
children: null,
|
|
13
|
-
error: null,
|
|
14
|
-
loading: false,
|
|
15
|
-
resourceLink: useNavigate_1.ROUTE.DEVICES,
|
|
16
|
-
resourceType: 'Devices',
|
|
17
|
-
resourceTypeLabel: 'Devices',
|
|
18
|
-
actions: undefined,
|
|
19
|
-
nav: undefined,
|
|
20
|
-
};
|
|
21
|
-
describe('Details page', () => {
|
|
22
|
-
it('is accessible', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
-
const { container } = (0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps), "Content"));
|
|
24
|
-
yield (0, test_utils_1.checkAccessibility)(container);
|
|
25
|
-
}));
|
|
26
|
-
describe('loading state', () => {
|
|
27
|
-
it('Shows a spinner and not the content when data is loading', () => {
|
|
28
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { loading: true }), "Content"));
|
|
29
|
-
expect(test_utils_1.screen.getByRole('progressbar')).toBeInTheDocument();
|
|
30
|
-
expect(test_utils_1.screen.queryByText('Content')).not.toBeInTheDocument();
|
|
31
|
-
});
|
|
32
|
-
it('Shows the content and not the spinner when it is not loading', () => {
|
|
33
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps), "Content"));
|
|
34
|
-
expect(test_utils_1.screen.queryByRole('progressbar')).not.toBeInTheDocument();
|
|
35
|
-
expect(test_utils_1.screen.getByText('Content')).toBeInTheDocument();
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
describe('when in error state', () => {
|
|
39
|
-
const error = new Error('something bad happened');
|
|
40
|
-
it('shows the error message', () => {
|
|
41
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { error: error }), "Content"));
|
|
42
|
-
expect(test_utils_1.screen.getByText('Failed to retrieve resource details')).toBeInTheDocument();
|
|
43
|
-
expect(test_utils_1.screen.getByText('something bad happened')).toBeInTheDocument();
|
|
44
|
-
});
|
|
45
|
-
it('does not show the content', () => {
|
|
46
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { error: error }), "Content"));
|
|
47
|
-
expect(test_utils_1.screen.getByText('something bad happened')).toBeInTheDocument();
|
|
48
|
-
expect(test_utils_1.screen.queryByText('Content')).not.toBeInTheDocument();
|
|
49
|
-
});
|
|
50
|
-
it('shows PageNotFound if error is 404', () => {
|
|
51
|
-
const error404 = new Error('Error 404: Not Found');
|
|
52
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { error: error404 }), "Content"));
|
|
53
|
-
expect(test_utils_1.screen.getByText('Device not found')).toBeInTheDocument();
|
|
54
|
-
expect(test_utils_1.screen.queryByText('Content')).not.toBeInTheDocument();
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe('Content', () => {
|
|
58
|
-
it('shows a link to the parent section', () => {
|
|
59
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps), "Content"));
|
|
60
|
-
expect(test_utils_1.screen.getByRole('link')).toHaveTextContent('Devices');
|
|
61
|
-
expect(test_utils_1.screen.getByRole('link')).toHaveAttribute('href', '/devicemanagement/devices');
|
|
62
|
-
});
|
|
63
|
-
it('shows the title over the id', () => {
|
|
64
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { title: "MyTitle", id: "device-id" }), "Content"));
|
|
65
|
-
expect(test_utils_1.screen.getByRole('heading')).toHaveTextContent('MyTitle');
|
|
66
|
-
expect(test_utils_1.screen.queryByText('device-id')).not.toBeInTheDocument();
|
|
67
|
-
});
|
|
68
|
-
it('shows the id when the title is missing', () => {
|
|
69
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { title: "", id: "device-id" }), "Content"));
|
|
70
|
-
expect(test_utils_1.screen.getByRole('heading')).toHaveTextContent('device-id');
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
describe('Actions', () => {
|
|
74
|
-
it('shows the actions', () => {
|
|
75
|
-
const action = React.createElement(react_core_1.Button, { variant: "primary" }, "Some action");
|
|
76
|
-
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { actions: action }), "Content"));
|
|
77
|
-
expect(test_utils_1.screen.getByText('Some action')).toBeInTheDocument();
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
//# sourceMappingURL=DetailsPage.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsPage.spec.js","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsPage.spec.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,uDAA4E;AAE5E,wEAAmE;AACnE,uDAAgD;AAChD,yDAAgD;AAEhD,MAAM,SAAS,GAAqB;IAClC,EAAE,EAAE,WAAW;IACf,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,mBAAK,CAAC,OAAO;IAC3B,YAAY,EAAE,SAAS;IACvB,iBAAiB,EAAE,SAAS;IAC5B,OAAO,EA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AS,CAAC,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ApplicationSpec } from '@flightctl/types';
|
|
2
|
-
import { FlightCtlLabel } from '../../../types/extraTypes';
|
|
3
|
-
import { SpecConfigTemplate } from '../../../types/deviceSpec';
|
|
4
|
-
import { SystemdUnitFormValue } from '../SystemdUnitsModal/TrackSystemdUnitsForm';
|
|
5
|
-
export type ApplicationFormSpec = Omit<ApplicationSpec, 'envVars'> & {
|
|
6
|
-
variables: {
|
|
7
|
-
name: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
export type DeviceSpecConfigFormValues = {
|
|
12
|
-
osImage?: string;
|
|
13
|
-
configTemplates: SpecConfigTemplate[];
|
|
14
|
-
applications: ApplicationFormSpec[];
|
|
15
|
-
systemdUnits: SystemdUnitFormValue[];
|
|
16
|
-
registerMicroShift: boolean;
|
|
17
|
-
};
|
|
18
|
-
export type EditDeviceFormValues = DeviceSpecConfigFormValues & {
|
|
19
|
-
deviceAlias: string;
|
|
20
|
-
labels: FlightCtlLabel[];
|
|
21
|
-
fleetMatch: string;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAElF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACnE,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { DisruptionBudget } from '@flightctl/types';
|
|
2
|
-
import { FlightCtlLabel } from '../../../types/extraTypes';
|
|
3
|
-
import { DeviceSpecConfigFormValues } from '../../Device/EditDeviceWizard/types';
|
|
4
|
-
export declare enum BatchLimitType {
|
|
5
|
-
BatchLimitPercent = "percent",
|
|
6
|
-
BatchLimitAbsoluteNumber = "value"
|
|
7
|
-
}
|
|
8
|
-
export type BatchForm = {
|
|
9
|
-
selector: FlightCtlLabel[];
|
|
10
|
-
limit?: number;
|
|
11
|
-
limitType: BatchLimitType;
|
|
12
|
-
successThreshold?: number;
|
|
13
|
-
};
|
|
14
|
-
export type RolloutPolicyForm = {
|
|
15
|
-
isAdvanced: boolean;
|
|
16
|
-
updateTimeout: number;
|
|
17
|
-
batches: BatchForm[];
|
|
18
|
-
};
|
|
19
|
-
export type DisruptionBudgetForm = DisruptionBudget & {
|
|
20
|
-
isAdvanced: boolean;
|
|
21
|
-
};
|
|
22
|
-
export type FleetFormValues = DeviceSpecConfigFormValues & {
|
|
23
|
-
name: string;
|
|
24
|
-
fleetLabels: FlightCtlLabel[];
|
|
25
|
-
labels: FlightCtlLabel[];
|
|
26
|
-
rolloutPolicy: RolloutPolicyForm;
|
|
27
|
-
disruptionBudget: DisruptionBudgetForm;
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/CreateFleet/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEjF,oBAAY,cAAc;IACxB,iBAAiB,YAAY;IAC7B,wBAAwB,UAAU;CACnC;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,0BAA0B,GAAG;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,aAAa,EAAE,iBAAiB,CAAC;IACjC,gBAAgB,EAAE,oBAAoB,CAAC;CACxC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BatchLimitType = void 0;
|
|
4
|
-
var BatchLimitType;
|
|
5
|
-
(function (BatchLimitType) {
|
|
6
|
-
BatchLimitType["BatchLimitPercent"] = "percent";
|
|
7
|
-
BatchLimitType["BatchLimitAbsoluteNumber"] = "value";
|
|
8
|
-
})(BatchLimitType || (exports.BatchLimitType = BatchLimitType = {}));
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/Fleet/CreateFleet/types.ts"],"names":[],"mappings":";;;AAIA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+CAA6B,CAAA;IAC7B,oDAAkC,CAAA;AACpC,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToDoCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OverviewPage/Cards/ToDo/ToDoCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,QAAA,MAAM,QAAQ,yBA6Cb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToDoCard.js","sourceRoot":"","sources":["../../../../../../src/components/OverviewPage/Cards/ToDo/ToDoCard.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAagC;AAChC,qEAAkE;AAClE,2GAAwG;AACxG,+DAA4D;AAC5D,wFAAwD;AAExD,MAAM,QAAQ,GAAG,GAAG,EAAE;IACpB,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,CAAC,cAAc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ourceRoot":"","sources":["../../../../src/components/UserPreferences/UserPreferencesModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,KAAK,yBAAyB,GAAG;IAC/B,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoD7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesModal.js","sourceRoot":"","sources":["../../../../src/components/UserPreferences/UserPreferencesModal.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,uDAUgC;AAGhC,+DAA4D;AAC5D,gGAAgE;AAChE,kFAAkD;AAClD,uEAAmE;AAEnE,MAAM,cAAc,GAAG,CAAC,CAAY,EAA8B,EAAE,CAAC,CAAC;IACpE,MAAM,EAAE,CAAC,CAAC,gBAAgB,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;CAChB,CAAC,CAAC;AAMH,MAAM,oBAAoB,GAAwC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IAChF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,gDAAsB,CAAC,CAAC;IAErE,MAAM,WAAW,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAEtC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChE,OAAO,CACL,oBAAC,kBAAK,IAAC,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAAE,MAAM,QAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO;QAC1E,oBAAC,kBAAK,IAAC,SAAS;YACd,oBAAC,sBAAS;gBACR,oBAAC,uBAAa;oBACZ,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC;wBAC1B,oBAAC,mBAAM,IACL,MAAM,EAAE,CAAC,SAAuC,EAAE,EAAE,CAAC,CACnD,oBAAC,uBAAU,IACT,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,EACrC,UAAU,EAAE,aAAa,IAExB,WAAW,CAAC,KAAK,CAAC,CACR,CACd,EACD,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;gCACrB,QAAQ,CAAC,KAAc,CAAC,CAAC;gCACzB,gBAAgB,CAAC,KAAK,CAAC,CAAC;4BAC1B,CAAC,gBACU,OAAO,EAClB,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,gBAAgB,IAE7B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACvC,oBAAC,yBAAY,IAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IACnC,WAAW,CAAC,KAAK,CAAC,CACN,CAChB,CAAC,CACK,CACC,CACE,CACN;YACZ,oBAAC,sBAAS;gBACR,oBAAC,8BAAoB;oBACnB,oBAAC,mBAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,IACzC,CAAC,CAAC,OAAO,CAAC,CACJ,CACY,CACb,CACN,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/UserPreferences/UserPreferencesProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAuB,MAAM,iCAAiC,CAAC;AAE7E,eAAO,MAAM,sBAAsB;WAC1B,KAAK;sBACM,KAAK,KAAK,IAAI;EAIhC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAa1E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserPreferencesProvider.js","sourceRoot":"","sources":["../../../../src/components/UserPreferences/UserPreferencesProvider.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,yEAA6E;AAEhE,QAAA,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAGtD;IACD,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;CACnB,CAAC,CAAC;AAMI,MAAM,uBAAuB,GAA2C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9F,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAA,yCAAmB,GAAE,CAAC;IAElD,OAAO,CACL,oBAAC,8BAAsB,CAAC,QAAQ,IAC9B,KAAK,EAAE;YACL,KAAK;YACL,QAAQ;SACT,IAEA,QAAQ,CACuB,CACnC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,uBAAuB,2BAalC"}
|
package/dist/src/setupTests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":""}
|
package/dist/src/setupTests.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const i18next_1 = tslib_1.__importDefault(require("i18next"));
|
|
5
|
-
const react_i18next_1 = require("react-i18next");
|
|
6
|
-
i18next_1.default
|
|
7
|
-
// pass the i18n instance to react-i18next
|
|
8
|
-
.use(react_i18next_1.initReactI18next)
|
|
9
|
-
// init i18next
|
|
10
|
-
.init({
|
|
11
|
-
fallbackLng: 'en',
|
|
12
|
-
interpolation: {
|
|
13
|
-
escapeValue: false, // not needed for react as it escapes by default
|
|
14
|
-
},
|
|
15
|
-
lng: 'en',
|
|
16
|
-
ns: 'translation',
|
|
17
|
-
resources: {
|
|
18
|
-
en: {
|
|
19
|
-
// eslint-disable-next-line
|
|
20
|
-
translation: require('../../i18n/locales/en/translation.json'),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=setupTests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":";;;AAAA,8DAA2B;AAC3B,iDAAiD;AAEjD,iBAAI;IACF,0CAA0C;KACzC,GAAG,CAAC,gCAAgB,CAAC;IACtB,eAAe;KACd,IAAI,CAAC;IACJ,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE;QACb,WAAW,EAAE,KAAK,EAAE,gDAAgD;KACrE;IACD,GAAG,EAAE,IAAI;IACT,EAAE,EAAE,aAAa;IACjB,SAAS,EAAE;QACT,EAAE,EAAE;YACF,2BAA2B;YAC3B,WAAW,EAAE,OAAO,CAAC,wCAAwC,CAAC;SAC/D;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RenderResult } from '@testing-library/react';
|
|
2
|
-
import '@testing-library/jest-dom';
|
|
3
|
-
declare const customRender: (ui: React.ReactNode, options?: object) => RenderResult;
|
|
4
|
-
export declare const checkAccessibility: (container: HTMLElement | string, options?: object) => Promise<void>;
|
|
5
|
-
export * from '@testing-library/react';
|
|
6
|
-
export { customRender as render };
|
|
7
|
-
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../../src/tests/test-utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,MAAM,wBAAwB,CAAC;AAG9D,OAAO,2BAA2B,CAAC;AAInC,QAAA,MAAM,YAAY,OAAQ,MAAM,SAAS,YAAY,MAAM,KAAG,YAEH,CAAC;AAE5D,eAAO,MAAM,kBAAkB,cAAqB,WAAW,GAAG,MAAM,YAAY,MAAM,kBAGzF,CAAC;AAGF,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.render = exports.checkAccessibility = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = require("@testing-library/react");
|
|
6
|
-
const react_router_dom_1 = require("react-router-dom");
|
|
7
|
-
const jest_axe_1 = require("jest-axe");
|
|
8
|
-
require("@testing-library/jest-dom");
|
|
9
|
-
expect.extend(jest_axe_1.toHaveNoViolations);
|
|
10
|
-
const customRender = (ui, options) =>
|
|
11
|
-
// eslint-disable-next-line
|
|
12
|
-
(0, react_1.render)(ui, Object.assign({ wrapper: react_router_dom_1.BrowserRouter }, options));
|
|
13
|
-
exports.render = customRender;
|
|
14
|
-
const checkAccessibility = (container, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
const results = yield (0, jest_axe_1.axe)(container, options);
|
|
16
|
-
expect(results).toHaveNoViolations();
|
|
17
|
-
});
|
|
18
|
-
exports.checkAccessibility = checkAccessibility;
|
|
19
|
-
// re-export everything
|
|
20
|
-
tslib_1.__exportStar(require("@testing-library/react"), exports);
|
|
21
|
-
//# sourceMappingURL=test-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../../../src/tests/test-utils.tsx"],"names":[],"mappings":";;;;AAAA,kDAA8D;AAC9D,uDAAiD;AACjD,uCAAmD;AACnD,qCAAmC;AAEnC,MAAM,CAAC,MAAM,CAAC,6BAAkB,CAAC,CAAC;AAElC,MAAM,YAAY,GAAG,CAAC,EAAmB,EAAE,OAAgB,EAAgB,EAAE;AAC3E,2BAA2B;AAC3B,IAAA,cAAM,EAAC,EAAS,kBAAI,OAAO,EAAE,gCAAa,IAAK,OAAO,EAAG,CAAC;AAWnC,8BAAM;AATxB,MAAM,kBAAkB,GAAG,CAAO,SAA+B,EAAE,OAAgB,EAAE,EAAE;IAC5F,MAAM,OAAO,GAAG,MAAM,IAAA,cAAG,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,CAAC;AACvC,CAAC,CAAA,CAAC;AAHW,QAAA,kBAAkB,sBAG7B;AAEF,uBAAuB;AACvB,iEAAuC"}
|