@griddo/ax 12.5.0 → 12.5.2-rc.0
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/README.md +1 -2
- package/config/__tests__/ModulePathInMessagesPlugin.test.js +93 -0
- package/config/__tests__/webpack5-migration.test.js +2 -2
- package/config/webpack/ModulePathInMessagesPlugin.js +47 -0
- package/config/webpack.config.js +5 -0
- package/package.json +21 -19
- package/src/GlobalStore.tsx +3 -3
- package/src/__mocks__/reducers/structuredData.tsx +1 -1
- package/src/__tests__/components/ActionMenu/ActionMenu.test.tsx +1 -1
- package/src/__tests__/components/Breadcrumb/Breadcrumb.test.tsx +1 -1
- package/src/__tests__/components/Browser/Browser.test.tsx +4 -0
- package/src/__tests__/components/CategoryCell/CategoryCell.test.tsx +1 -1
- package/src/__tests__/components/ConfigPanel/Form/Form.test.tsx +5 -5
- package/src/__tests__/components/ConfigPanel/Header/Header.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/NavigationForm/Field/Field.test.tsx +5 -1
- package/src/__tests__/components/ConfigPanel/NavigationForm/NavigationForm.test.tsx +1 -1
- package/src/__tests__/components/ConfigPanel/PreviewForm/PreviewForm.test.tsx +1 -1
- package/src/__tests__/components/DragAndDrop/DragAndDrop.test.tsx +1 -1
- package/src/__tests__/components/ElementsTooltip/ElementsTooltip.test.tsx +1 -1
- package/src/__tests__/components/EmptyState/EmptyState.test.tsx +1 -1
- package/src/__tests__/components/ErrorCenter/ErrorCenter.test.tsx +2 -2
- package/src/__tests__/components/ErrorToast/ErrorToast.test.tsx +1 -1
- package/src/__tests__/components/FieldContainer/FieldContainer.test.tsx +1 -1
- package/src/__tests__/components/Fields/AsyncSelect/AsyncSelect.test.tsx +2 -2
- package/src/__tests__/components/Fields/ColorPicker/ColorPicker.test.tsx +1 -1
- package/src/__tests__/components/Fields/ComponentArray/ComponentArray.test.tsx +3 -3
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/MixableComponentArray.test.tsx +2 -2
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/PasteModuleButton/PasteModuleButton.test.tsx +2 -2
- package/src/__tests__/components/Fields/ComponentArray/SameComponentArray/SameComponentArray.test.tsx +4 -2
- package/src/__tests__/components/Fields/ComponentContainer/ComponentContainer.test.tsx +1 -1
- package/src/__tests__/components/Fields/DateField/DateField.test.tsx +1 -1
- package/src/__tests__/components/Fields/FileField/FileField.test.tsx +1 -1
- package/src/__tests__/components/Fields/HiddenField/HiddenField.test.tsx +1 -1
- package/src/__tests__/components/Fields/ImageField/ImageField.test.tsx +1 -1
- package/src/__tests__/components/Fields/IntegrationsField/IntegrationsField.test.tsx +1 -1
- package/src/__tests__/components/Fields/MultiCheckSelect/MultiCheckSelect.test.tsx +1 -1
- package/src/__tests__/components/Fields/MultiCheckSelectGroup/MultiCheckSelectGroup.test.tsx +1 -1
- package/src/__tests__/components/Fields/NoteField/NoteField.test.tsx +1 -1
- package/src/__tests__/components/Fields/NumberField/NumberField.test.tsx +1 -1
- package/src/__tests__/components/Fields/RadioField/RadioField.test.tsx +1 -1
- package/src/__tests__/components/Fields/ReferenceField/ReferenceField.test.tsx +1 -1
- package/src/__tests__/components/Fields/RichText/RichText.test.tsx +1 -1
- package/src/__tests__/components/Fields/Select/Select.test.tsx +1 -1
- package/src/__tests__/components/Fields/SliderField/SliderField.test.tsx +1 -1
- package/src/__tests__/components/Fields/SummaryButton/SummaryButton.test.tsx +1 -1
- package/src/__tests__/components/Fields/ToggleField/ToggleField.test.tsx +1 -1
- package/src/__tests__/components/Fields/Tooltip/Tooltip.test.tsx +1 -1
- package/src/__tests__/components/Fields/TranslateButton/TranslateButton.test.tsx +1 -1
- package/src/__tests__/components/Fields/UrlField/UrlField.test.tsx +1 -1
- package/src/__tests__/components/Fields/VisualUniqueSelection/ImageSelection/ImageSelection.test.tsx +1 -1
- package/src/__tests__/components/Fields/VisualUniqueSelection/ScrollableSelection/ScrollableSelection.test.tsx +1 -1
- package/src/__tests__/components/Fields/VisualUniqueSelection/VisualUniqueSelection.test.tsx +2 -2
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.atoms.test.tsx +1 -5
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.test.tsx +7 -31
- package/src/__tests__/components/Flag/Flag.test.tsx +1 -1
- package/src/__tests__/components/FloatingPanel/FloatingPanel.test.tsx +1 -1
- package/src/__tests__/components/GuardModal/GuardModal.test.tsx +1 -1
- package/src/__tests__/components/HeadingsPreviewModal/HeadingsPreviewModal.test.tsx +1 -1
- package/src/__tests__/components/HeadingsPreviewModal/HeadingsPreviewModal.utils.test.tsx +5 -1
- package/src/__tests__/components/Icon/Icon.test.tsx +1 -1
- package/src/__tests__/components/IconAction/IconAction.test.tsx +1 -1
- package/src/__tests__/components/InformativeMenu/InformativeMenu.test.tsx +1 -1
- package/src/__tests__/components/KeywordsPreviewModal/KeywordsPreviewModal.test.tsx +1 -1
- package/src/__tests__/components/KeywordsPreviewModal/atoms.test.tsx +1 -1
- package/src/__tests__/components/Lists/Lists.test.tsx +1 -1
- package/src/__tests__/components/Loader/Loader.test.tsx +1 -1
- package/src/__tests__/components/Login/Login.test.tsx +1 -1
- package/src/__tests__/components/Login/RecoveryModal/RecoveryModal.test.tsx +1 -1
- package/src/__tests__/components/MainWrapper/AppBar/AppBar.test.tsx +1 -1
- package/src/__tests__/components/MainWrapper/MainWrapper.test.tsx +1 -1
- package/src/__tests__/components/MenuItem/MenuItem.test.tsx +1 -1
- package/src/__tests__/components/Modal/Modal.test.tsx +1 -1
- package/src/__tests__/components/Nav/Nav.test.tsx +1 -1
- package/src/__tests__/components/Notification/Notification.test.tsx +1 -1
- package/src/__tests__/components/Notification/SubNotification/Subnotification.test.tsx +1 -1
- package/src/__tests__/components/Pagination/Pagination.test.tsx +0 -1
- package/src/__tests__/components/ProgressBar/ProgressBar.test.tsx +1 -1
- package/src/__tests__/components/ReorderArrows/ReorderArrows.test.tsx +1 -1
- package/src/__tests__/components/ResizePanel/ResizePanel.test.tsx +1 -0
- package/src/__tests__/components/RestrictionsModal/UsersList/UsersList.test.tsx +96 -9
- package/src/__tests__/components/SearchField/SearchField.test.tsx +1 -1
- package/src/__tests__/components/SubNav/SubNav.test.tsx +1 -1
- package/src/__tests__/components/TableCounter/TableCounter.test.tsx +1 -1
- package/src/__tests__/components/TableFilters/CategoryFilter/CategoryFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/CustomizeFilters/CustomizeFilters.test.tsx +2 -2
- package/src/__tests__/components/TableFilters/DateFilter/DateFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/LiveFilter/LiveFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/NameFilter/NameFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/RoleFilter/RoleFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/SiteFilter/SiteFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/StatusFilter/StatusFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/TranslationsFilter/TranslationsFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/TypeFilter/TypeFilter.test.tsx +3 -3
- package/src/__tests__/components/TableFilters/UsersFilter/UsersFilter.test.tsx +3 -3
- package/src/__tests__/components/TableList/TableList.test.tsx +1 -1
- package/src/__tests__/components/Tabs/Tabs.test.tsx +1 -1
- package/src/__tests__/components/Tag/Tag.test.tsx +1 -1
- package/src/__tests__/components/Toast/Toast.test.tsx +1 -1
- package/src/__tests__/hooks/users.test.tsx +12 -4
- package/src/__tests__/modules/Settings/Integrations/Integrations.test.tsx +1 -1
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/FinalStep/FinalStep.test.tsx +9 -1
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/ImageStep.test.tsx +2 -0
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/UploadView/UploadView.test.tsx +1 -0
- package/src/__tests__/modules/Users/Roles/BulkHeader/BulkHeader.test.tsx +2 -2
- package/src/__tests__/modules/Users/Roles/Roles.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RoleItem/RoleItem.test.tsx +3 -1
- package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RolesModal.test.tsx +1 -1
- package/src/__tests__/modules/Users/UserCreate/SiteItem/SiteItem.test.tsx +1 -1
- package/src/__tests__/modules/Users/UserCreate/UserCreate.test.tsx +2 -2
- package/src/api/analytics.tsx +3 -3
- package/src/api/dataPack.tsx +1 -1
- package/src/api/domains.tsx +2 -2
- package/src/api/files.tsx +2 -2
- package/src/api/folders.tsx +1 -1
- package/src/api/forms.tsx +2 -2
- package/src/api/global.tsx +2 -2
- package/src/api/images.tsx +2 -2
- package/src/api/integrations.tsx +3 -3
- package/src/api/languages.tsx +1 -1
- package/src/api/logs.tsx +3 -3
- package/src/api/menus.tsx +1 -1
- package/src/api/navigation.tsx +1 -1
- package/src/api/redirects.tsx +1 -1
- package/src/api/roles.tsx +3 -3
- package/src/api/social.tsx +1 -1
- package/src/api/users.tsx +1 -1
- package/src/api/utils.tsx +1 -1
- package/src/components/Avatar/index.tsx +1 -1
- package/src/components/Breadcrumb/index.tsx +1 -1
- package/src/components/Button/index.tsx +1 -1
- package/src/components/ConfigPanel/Form/ConnectedField/PageConnectedField/TemplateManager/index.tsx +1 -1
- package/src/components/ConfigPanel/NavigationForm/Field/index.tsx +1 -1
- package/src/components/ConfigPanel/NavigationForm/index.tsx +1 -1
- package/src/components/ConfigPanel/PreviewForm/index.tsx +1 -1
- package/src/components/DragAndDrop/index.tsx +2 -1
- package/src/components/EmptyState/index.tsx +1 -1
- package/src/components/ErrorCenter/index.tsx +1 -1
- package/src/components/FieldContainer/index.tsx +1 -1
- package/src/components/Fields/AIReferenceField/AIConfigPanel/index.tsx +1 -1
- package/src/components/Fields/AIReferenceField/index.tsx +1 -1
- package/src/components/Fields/ArrayFieldGroup/helpers.ts +1 -7
- package/src/components/Fields/CheckGroup/index.tsx +2 -2
- package/src/components/Fields/ColorPicker/Picker/index.tsx +2 -1
- package/src/components/Fields/ColorPicker/index.tsx +2 -1
- package/src/components/Fields/ComponentContainer/style.tsx +1 -1
- package/src/components/Fields/ConditionalField/index.tsx +1 -3
- package/src/components/Fields/FormCategorySelect/index.tsx +2 -2
- package/src/components/Fields/FormContainer/FormModal/index.tsx +2 -2
- package/src/components/Fields/FormContainer/index.tsx +1 -1
- package/src/components/Fields/FormFieldArray/index.tsx +1 -1
- package/src/components/Fields/IntegrationsField/IntegrationItem/CustomPanel/index.tsx +1 -1
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/helpers.ts +1 -1
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/index.tsx +1 -1
- package/src/components/Fields/IntegrationsField/SideModal/SideModalOption/index.tsx +1 -1
- package/src/components/Fields/LinkField/index.tsx +1 -1
- package/src/components/Fields/RadioGroup/index.tsx +2 -2
- package/src/components/Fields/SliderField/index.tsx +2 -1
- package/src/components/Fields/TimeField/HourInput/index.tsx +2 -1
- package/src/components/Fields/UrlField/utils.tsx +1 -1
- package/src/components/Fields/VisualOption/index.tsx +1 -1
- package/src/components/Fields/Wysiwyg/atoms.tsx +13 -2
- package/src/components/Fields/Wysiwyg/helpers.tsx +10 -2
- package/src/components/FileGallery/FolderItem/index.tsx +1 -1
- package/src/components/FileGallery/GridItem/index.tsx +1 -1
- package/src/components/FloatingButton/index.tsx +1 -1
- package/src/components/Gallery/FolderItem/index.tsx +1 -1
- package/src/components/HeadingsPreviewModal/index.tsx +11 -2
- package/src/components/HeadingsPreviewModal/utils.tsx +8 -1
- package/src/components/Icon/components/Party.jsx +6 -12
- package/src/components/Icon/components/Republish.jsx +12 -18
- package/src/components/Icon/components/Sync.jsx +6 -12
- package/src/components/KeywordsPreviewModal/index.tsx +7 -1
- package/src/components/Lists/index.tsx +1 -1
- package/src/components/Nav/index.tsx +1 -1
- package/src/components/TableFilters/CustomizeFilters/index.tsx +1 -1
- package/src/components/TableFilters/DateFilter/index.tsx +1 -1
- package/src/components/TableFilters/LastAccessFilter/index.tsx +1 -1
- package/src/components/TableFilters/NameFilter/index.tsx +1 -1
- package/src/components/TableFilters/PermissionsFilter/index.tsx +1 -1
- package/src/components/TableFilters/StateFilter/index.tsx +1 -1
- package/src/components/TableFilters/StatusFilter/index.tsx +1 -1
- package/src/components/TableFilters/TypeFilter/index.tsx +1 -1
- package/src/components/TableFilters/UsersFilter/index.tsx +1 -1
- package/src/components/Tag/index.tsx +15 -2
- package/src/containers/ActivityLog/actions.tsx +4 -5
- package/src/containers/ActivityLog/interfaces.tsx +2 -2
- package/src/containers/ActivityLog/reducer.tsx +1 -2
- package/src/containers/Analytics/actions.tsx +3 -3
- package/src/containers/Analytics/interfaces.tsx +2 -2
- package/src/containers/Analytics/reducer.tsx +2 -2
- package/src/containers/Domains/actions.tsx +2 -2
- package/src/containers/Domains/interfaces.tsx +2 -2
- package/src/containers/Domains/reducer.tsx +2 -2
- package/src/containers/FileDrive/actions.tsx +3 -3
- package/src/containers/FileDrive/interfaces.tsx +2 -2
- package/src/containers/FileDrive/reducer.tsx +1 -1
- package/src/containers/Gallery/interfaces.tsx +3 -3
- package/src/containers/Gallery/reducer.tsx +2 -2
- package/src/containers/Integrations/actions.tsx +3 -3
- package/src/containers/Integrations/interfaces.tsx +2 -2
- package/src/containers/Integrations/reducer.tsx +2 -2
- package/src/containers/Navigation/Defaults/actions.tsx +3 -3
- package/src/containers/Navigation/Defaults/interfaces.tsx +2 -2
- package/src/containers/Navigation/Menu/actions.tsx +3 -3
- package/src/containers/Navigation/Menu/interfaces.tsx +3 -3
- package/src/containers/Navigation/Menu/reducer.tsx +2 -2
- package/src/containers/PageEditor/utils.tsx +2 -2
- package/src/containers/Redirects/actions.tsx +1 -1
- package/src/containers/Redirects/interfaces.tsx +1 -1
- package/src/containers/Redirects/reducer.tsx +2 -2
- package/src/containers/Settings/DataPacks/interfaces.tsx +1 -1
- package/src/containers/Settings/DataPacks/reducer.tsx +1 -1
- package/src/containers/Settings/Languages/actions.tsx +2 -2
- package/src/containers/Settings/Social/actions.tsx +2 -2
- package/src/containers/Settings/Social/interfaces.tsx +2 -2
- package/src/containers/Settings/Social/reducer.tsx +2 -2
- package/src/containers/Sites/interfaces.tsx +2 -2
- package/src/containers/Users/interfaces.tsx +2 -2
- package/src/forms/validators.tsx +1 -1
- package/src/guards/error/index.tsx +1 -1
- package/src/helpers/customColumns.tsx +1 -1
- package/src/helpers/dates.tsx +3 -3
- package/src/helpers/files.tsx +1 -1
- package/src/helpers/parseTheme.js +2 -2
- package/src/helpers/strings.tsx +1 -1
- package/src/hooks/content.tsx +1 -1
- package/src/hooks/index.tsx +7 -1
- package/src/hooks/users.tsx +1 -3
- package/src/modules/ActivityLog/DetailModal/index.tsx +3 -3
- package/src/modules/ActivityLog/DownloadModal/index.tsx +3 -3
- package/src/modules/ActivityLog/ItemLog/index.tsx +1 -1
- package/src/modules/ActivityLog/LogFilters/ContentFilter/index.tsx +1 -1
- package/src/modules/ActivityLog/LogFilters/EventFilter/index.tsx +1 -1
- package/src/modules/ActivityLog/TableHeader/index.tsx +1 -1
- package/src/modules/ActivityLog/hooks.tsx +1 -1
- package/src/modules/ActivityLog/index.tsx +2 -2
- package/src/modules/ActivityLog/utils.tsx +1 -1
- package/src/modules/Analytics/DimensionPanel/index.tsx +1 -1
- package/src/modules/Analytics/index.tsx +1 -1
- package/src/modules/App/Routing/NavMenu/NavItem/NavSubItem/index.tsx +1 -1
- package/src/modules/App/Routing/PrivateRoute/index.tsx +1 -1
- package/src/modules/App/index.tsx +1 -1
- package/src/modules/Categories/CategoriesList/CategoryNav/NavItem/index.tsx +1 -1
- package/src/modules/Categories/CategoriesList/CategoryNav/index.tsx +1 -1
- package/src/modules/Categories/CategoriesList/CategoryPanel/Form/index.tsx +1 -1
- package/src/modules/Categories/CategoriesList/atoms.tsx +1 -8
- package/src/modules/Categories/CategoriesList/helpers.tsx +1 -1
- package/src/modules/Categories/CategoriesList/hooks.tsx +1 -1
- package/src/modules/Content/BulkHeader/TableHeader/index.tsx +1 -1
- package/src/modules/Content/ContentFilters/utils.tsx +1 -1
- package/src/modules/Content/hooks.tsx +1 -1
- package/src/modules/FileDrive/Breadcrumb/index.tsx +1 -1
- package/src/modules/FileDrive/FileFilters/SortBy/index.tsx +1 -1
- package/src/modules/FileDrive/FileFilters/Type/index.tsx +1 -1
- package/src/modules/FileDrive/FileModal/DetailPanel/UsageContent/ItemGroup/index.tsx +3 -2
- package/src/modules/FileDrive/FileModal/DetailPanel/UsageContent/index.tsx +2 -2
- package/src/modules/FileDrive/FolderTree/MenuItem/index.tsx +3 -2
- package/src/modules/FileDrive/FolderTree/MenuList/index.tsx +1 -1
- package/src/modules/FileDrive/FolderTree/index.tsx +1 -1
- package/src/modules/FileDrive/hooks.tsx +1 -1
- package/src/modules/Forms/FormCategoriesList/CategoryItem/style.tsx +1 -1
- package/src/modules/Forms/FormCategoriesList/CategoryPanel/Form/index.tsx +1 -1
- package/src/modules/Forms/FormCategoriesList/CategoryPanel/index.tsx +1 -1
- package/src/modules/Forms/FormCategoriesList/hooks.tsx +1 -1
- package/src/modules/Forms/FormEditor/Editor/FormConfigPanel/Form/ConnectedField/Field/index.tsx +1 -1
- package/src/modules/Forms/FormEditor/Editor/FormConfigPanel/Form/ConnectedField/TemplateManager/index.tsx +1 -1
- package/src/modules/Forms/FormEditor/Editor/FormConfigPanel/Header/index.tsx +3 -2
- package/src/modules/Forms/FormEditor/Editor/FormConfigPanel/index.tsx +1 -1
- package/src/modules/Forms/FormEditor/Editor/index.tsx +3 -2
- package/src/modules/Forms/FormList/BulkHeader/TableHeader/index.tsx +1 -1
- package/src/modules/Forms/FormList/FormItem/index.tsx +7 -1
- package/src/modules/Forms/FormList/Summary/index.tsx +1 -1
- package/src/modules/Forms/FormList/TemplateModal/index.tsx +3 -2
- package/src/modules/Forms/FormList/hooks.tsx +1 -1
- package/src/modules/Forms/FormUseModal/utils.tsx +1 -1
- package/src/modules/Forms/FormsMenu/index.tsx +1 -1
- package/src/modules/Forms/atoms.tsx +5 -1
- package/src/modules/Forms/utils.tsx +1 -1
- package/src/modules/FramePreview/HeadingsOverlay/index.tsx +3 -4
- package/src/modules/GlobalSettings/Robots/Item/index.tsx +1 -1
- package/src/modules/MediaGallery/Breadcrumb/index.tsx +1 -1
- package/src/modules/MediaGallery/FolderTree/MenuItem/index.tsx +3 -2
- package/src/modules/MediaGallery/FolderTree/MenuList/index.tsx +1 -1
- package/src/modules/MediaGallery/FolderTree/index.tsx +1 -1
- package/src/modules/MediaGallery/GridItem/index.tsx +6 -1
- package/src/modules/MediaGallery/ImageFilters/Orientation/index.tsx +1 -1
- package/src/modules/MediaGallery/ImageFilters/SortBy/index.tsx +1 -1
- package/src/modules/MediaGallery/ImageFilters/Type/index.tsx +1 -1
- package/src/modules/MediaGallery/ImageFilters/Usage/index.tsx +1 -1
- package/src/modules/MediaGallery/ImageModal/DetailPanel/UsageContent/ItemGroup/index.tsx +3 -2
- package/src/modules/MediaGallery/ImageModal/DetailPanel/UsageContent/index.tsx +2 -2
- package/src/modules/MediaGallery/hooks.tsx +1 -1
- package/src/modules/Navigation/Defaults/DefaultsEditor/Editor/DefaultsBrowser/index.tsx +2 -2
- package/src/modules/Navigation/Defaults/DefaultsEditor/Editor/index.tsx +2 -2
- package/src/modules/Navigation/Defaults/ReplaceNavModal/index.tsx +1 -1
- package/src/modules/Navigation/Menus/List/Nav/index.tsx +1 -1
- package/src/modules/Navigation/Menus/List/Table/Header/index.tsx +1 -1
- package/src/modules/Navigation/Menus/List/Table/Item/index.tsx +6 -1
- package/src/modules/Navigation/Menus/List/Table/Item/style.tsx +1 -1
- package/src/modules/Navigation/Menus/List/Table/helpers.tsx +1 -1
- package/src/modules/PublicPreview/index.tsx +5 -13
- package/src/modules/Redirects/BulkHeader/TableHeader/index.tsx +1 -1
- package/src/modules/Redirects/BulkHeader/index.tsx +1 -1
- package/src/modules/Redirects/RedirectPanel/index.tsx +1 -1
- package/src/modules/Redirects/hooks.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/AddModal/Filter/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/AddModal/SidePanel/DetailPanel/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/AddModal/SidePanel/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/AddModal/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/IntegrationsField/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/TemplateBrowser/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/index.tsx +1 -1
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/index.tsx +2 -2
- package/src/modules/Settings/ContentTypes/DataPacks/Item/index.tsx +3 -2
- package/src/modules/Settings/ContentTypes/DataPacks/List/index.tsx +2 -2
- package/src/modules/Settings/ContentTypes/DataPacks/Nav/index.tsx +1 -1
- package/src/modules/Settings/Globals/NavigationModules/SideModal/index.tsx +1 -1
- package/src/modules/Settings/Globals/NavigationModules/index.tsx +1 -1
- package/src/modules/Settings/Globals/constants.tsx +1 -1
- package/src/modules/Settings/Integrations/BulkHeader/TableHeader/index.tsx +1 -1
- package/src/modules/Settings/Integrations/IntegrationForm/VariableItem/index.tsx +1 -1
- package/src/modules/Settings/Integrations/IntegrationForm/VariablePanel/index.tsx +1 -1
- package/src/modules/Settings/Integrations/IntegrationForm/index.tsx +2 -2
- package/src/modules/Settings/Integrations/IntegrationItem/style.tsx +1 -1
- package/src/modules/Settings/Integrations/hooks.tsx +1 -1
- package/src/modules/Settings/Integrations/index.tsx +0 -1
- package/src/modules/Settings/Integrations/utils.tsx +1 -1
- package/src/modules/Settings/Languages/LanguagePanel/Form/ConnectedField/index.tsx +1 -1
- package/src/modules/Settings/Languages/LanguagePanel/Form/index.tsx +1 -1
- package/src/modules/Settings/Languages/LanguagePanel/index.tsx +1 -1
- package/src/modules/Settings/Languages/Table/Header/index.tsx +1 -1
- package/src/modules/Settings/Languages/Table/Item/index.tsx +1 -1
- package/src/modules/Settings/Languages/Table/index.tsx +1 -1
- package/src/modules/Settings/Languages/index.tsx +1 -1
- package/src/modules/Settings/SeoAnalyticsSettings/Analytics/atoms.tsx +2 -2
- package/src/modules/Settings/index.tsx +1 -1
- package/src/modules/Sites/SitesList/ListView/ListSiteItem/index.tsx +7 -1
- package/src/modules/StructuredData/StructuredDataList/ContentFilters/utils.tsx +1 -1
- package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/index.tsx +6 -1
- package/src/modules/StructuredData/StructuredDataList/GlobalPageItem/utils.tsx +1 -1
- package/src/modules/StructuredData/StructuredDataList/StructuredDataItem/index.tsx +16 -2
- package/src/modules/StructuredData/StructuredDataList/hooks.tsx +1 -1
- package/src/modules/Users/Roles/BulkHeader/TableHeader/index.tsx +1 -1
- package/src/modules/Users/Roles/SideModal/index.tsx +1 -1
- package/src/modules/Users/Roles/hooks.tsx +1 -1
- package/src/modules/Users/UserCreate/OptionItem/index.tsx +1 -1
- package/src/modules/Users/UserCreate/SiteItem/RolesModal/index.tsx +1 -1
- package/src/modules/Users/UserCreate/SiteItem/style.tsx +13 -1
- package/src/modules/Users/UserList/UserItem/index.tsx +10 -1
- package/src/modules/Users/UserList/hooks.tsx +1 -1
- package/tsconfig.json +11 -4
- package/tsconfig.paths.json +19 -20
|
@@ -12,9 +12,36 @@ import { render, cleanup, screen, fireEvent } from "../../../../../config/tests/
|
|
|
12
12
|
|
|
13
13
|
vi.mock("@ax/components/RestrictionsModal/utils", () => ({
|
|
14
14
|
fetchUsers: vi.fn().mockResolvedValue([
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
{
|
|
16
|
+
id: 1,
|
|
17
|
+
username: "john",
|
|
18
|
+
name: "John Doe",
|
|
19
|
+
email: "john@example.com",
|
|
20
|
+
failed: 0,
|
|
21
|
+
roles: [],
|
|
22
|
+
isSuperAdmin: false,
|
|
23
|
+
pagePermissions: [],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 2,
|
|
27
|
+
username: "jane",
|
|
28
|
+
name: "Jane Smith",
|
|
29
|
+
email: "jane@example.com",
|
|
30
|
+
failed: 0,
|
|
31
|
+
roles: [],
|
|
32
|
+
isSuperAdmin: false,
|
|
33
|
+
pagePermissions: [],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 3,
|
|
37
|
+
username: "bob",
|
|
38
|
+
name: "Bob Wilson",
|
|
39
|
+
email: "bob@example.com",
|
|
40
|
+
failed: 0,
|
|
41
|
+
roles: [],
|
|
42
|
+
isSuperAdmin: false,
|
|
43
|
+
pagePermissions: [],
|
|
44
|
+
},
|
|
18
45
|
]),
|
|
19
46
|
}));
|
|
20
47
|
|
|
@@ -27,7 +54,16 @@ const mockStore = configureStore();
|
|
|
27
54
|
|
|
28
55
|
const initialState = {
|
|
29
56
|
users: {
|
|
30
|
-
currentUser: {
|
|
57
|
+
currentUser: {
|
|
58
|
+
id: 1,
|
|
59
|
+
username: "john",
|
|
60
|
+
name: "John Doe",
|
|
61
|
+
email: "john@example.com",
|
|
62
|
+
failed: 0,
|
|
63
|
+
roles: [],
|
|
64
|
+
isSuperAdmin: false,
|
|
65
|
+
pagePermissions: [],
|
|
66
|
+
},
|
|
31
67
|
},
|
|
32
68
|
sites: {
|
|
33
69
|
currentSiteInfo: { id: 1 },
|
|
@@ -48,8 +84,26 @@ const defaultProps: {
|
|
|
48
84
|
isSaving: false,
|
|
49
85
|
onResetAccess: vi.fn(),
|
|
50
86
|
users: [
|
|
51
|
-
{
|
|
52
|
-
|
|
87
|
+
{
|
|
88
|
+
id: 1,
|
|
89
|
+
username: "john",
|
|
90
|
+
name: "John Doe",
|
|
91
|
+
email: "john@example.com",
|
|
92
|
+
failed: 0,
|
|
93
|
+
roles: [],
|
|
94
|
+
isSuperAdmin: false,
|
|
95
|
+
pagePermissions: [],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: 2,
|
|
99
|
+
username: "jane",
|
|
100
|
+
name: "Jane Smith",
|
|
101
|
+
email: "jane@example.com",
|
|
102
|
+
failed: 0,
|
|
103
|
+
roles: [],
|
|
104
|
+
isSuperAdmin: false,
|
|
105
|
+
pagePermissions: [],
|
|
106
|
+
},
|
|
53
107
|
],
|
|
54
108
|
};
|
|
55
109
|
|
|
@@ -119,7 +173,18 @@ describe("UsersList component rendering", () => {
|
|
|
119
173
|
await act(async () => {
|
|
120
174
|
renderComponent({
|
|
121
175
|
...defaultProps,
|
|
122
|
-
users: [
|
|
176
|
+
users: [
|
|
177
|
+
{
|
|
178
|
+
id: 2,
|
|
179
|
+
username: "jane",
|
|
180
|
+
name: "Jane Smith",
|
|
181
|
+
email: "jane@example.com",
|
|
182
|
+
failed: 0,
|
|
183
|
+
roles: [],
|
|
184
|
+
isSuperAdmin: false,
|
|
185
|
+
pagePermissions: [],
|
|
186
|
+
},
|
|
187
|
+
],
|
|
123
188
|
});
|
|
124
189
|
});
|
|
125
190
|
|
|
@@ -210,7 +275,18 @@ describe("UsersList component user selection", () => {
|
|
|
210
275
|
|
|
211
276
|
renderComponent({
|
|
212
277
|
...defaultProps,
|
|
213
|
-
users: [
|
|
278
|
+
users: [
|
|
279
|
+
{
|
|
280
|
+
id: 2,
|
|
281
|
+
username: "jane",
|
|
282
|
+
name: "Jane Smith",
|
|
283
|
+
email: "jane@example.com",
|
|
284
|
+
failed: 0,
|
|
285
|
+
roles: [],
|
|
286
|
+
isSuperAdmin: false,
|
|
287
|
+
pagePermissions: [],
|
|
288
|
+
},
|
|
289
|
+
],
|
|
214
290
|
onApply: onApplyMock,
|
|
215
291
|
});
|
|
216
292
|
|
|
@@ -275,7 +351,18 @@ describe("UsersList component actions", () => {
|
|
|
275
351
|
|
|
276
352
|
renderComponent({
|
|
277
353
|
...defaultProps,
|
|
278
|
-
users: [
|
|
354
|
+
users: [
|
|
355
|
+
{
|
|
356
|
+
id: 2,
|
|
357
|
+
username: "jane",
|
|
358
|
+
name: "Jane Smith",
|
|
359
|
+
email: "jane@example.com",
|
|
360
|
+
failed: 0,
|
|
361
|
+
roles: [],
|
|
362
|
+
isSuperAdmin: false,
|
|
363
|
+
pagePermissions: [],
|
|
364
|
+
},
|
|
365
|
+
],
|
|
279
366
|
onApply: onApplyMock,
|
|
280
367
|
});
|
|
281
368
|
|
|
@@ -6,7 +6,7 @@ import { parseTheme } from "@ax/helpers";
|
|
|
6
6
|
import "@testing-library/jest-dom";
|
|
7
7
|
import userEvent from "@testing-library/user-event";
|
|
8
8
|
|
|
9
|
-
import SearchField, { ISearchFieldProps } from "@ax/components/SearchField";
|
|
9
|
+
import SearchField, { type ISearchFieldProps } from "@ax/components/SearchField";
|
|
10
10
|
import globalTheme from "@ax/themes/theme.json";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
@@ -5,7 +5,7 @@ import { mock } from "vitest-mock-extended";
|
|
|
5
5
|
import { render, screen, cleanup } from "@testing-library/react";
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
7
|
|
|
8
|
-
import SubNav, { ISubNavProps } from "@ax/components/SubNav";
|
|
8
|
+
import SubNav, { type ISubNavProps } from "@ax/components/SubNav";
|
|
9
9
|
import globalTheme from "@ax/themes/theme.json";
|
|
10
10
|
|
|
11
11
|
afterEach(cleanup);
|
|
@@ -5,7 +5,7 @@ import { render, screen, cleanup } from "@testing-library/react";
|
|
|
5
5
|
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
|
-
import TableCounter, { ITableCounter } from "@ax/components/TableCounter";
|
|
8
|
+
import TableCounter, { type ITableCounter } from "@ax/components/TableCounter";
|
|
9
9
|
|
|
10
10
|
afterEach(cleanup);
|
|
11
11
|
|
|
@@ -3,13 +3,13 @@ import * as React from "react";
|
|
|
3
3
|
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import { ThemeProvider } from "styled-components";
|
|
6
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
6
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
7
|
|
|
8
8
|
import { render, screen, cleanup, fireEvent, act } from "@testing-library/react";
|
|
9
9
|
import { parseTheme } from "@ax/helpers";
|
|
10
|
-
import CategoryFilter, { ICategoryFilterProps } from "@ax/components/TableFilters/CategoryFilter";
|
|
10
|
+
import CategoryFilter, { type ICategoryFilterProps } from "@ax/components/TableFilters/CategoryFilter";
|
|
11
11
|
import globalTheme from "@ax/themes/theme.json";
|
|
12
|
-
import { IQueryValue } from "@ax/types";
|
|
12
|
+
import type { IQueryValue } from "@ax/types";
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
15
15
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
6
6
|
|
|
7
7
|
import { parseTheme } from "@ax/helpers";
|
|
8
8
|
|
|
9
|
-
import CustomizeFilters, { ICustomizeFiltersProps } from "@ax/components/TableFilters/CustomizeFilters";
|
|
9
|
+
import CustomizeFilters, { type ICustomizeFiltersProps } from "@ax/components/TableFilters/CustomizeFilters";
|
|
10
10
|
import globalTheme from "@ax/themes/theme.json";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
|
|
6
6
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
|
|
10
10
|
import globalTheme from "@ax/themes/theme.json";
|
|
11
|
-
import DateFilter, { IDateFilterProps } from "@ax/components/TableFilters/DateFilter";
|
|
12
|
-
import { IQueryValue } from "@ax/types";
|
|
11
|
+
import DateFilter, { type IDateFilterProps } from "@ax/components/TableFilters/DateFilter";
|
|
12
|
+
import type { IQueryValue } from "@ax/types";
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
15
15
|
const defaultProps = mock<IDateFilterProps>();
|
|
@@ -3,13 +3,13 @@ import * as React from "react";
|
|
|
3
3
|
|
|
4
4
|
import axios from "axios";
|
|
5
5
|
import { ThemeProvider } from "styled-components";
|
|
6
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
6
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
7
|
import { render, screen, cleanup, act, fireEvent } from "@testing-library/react";
|
|
8
8
|
|
|
9
9
|
import { parseTheme } from "@ax/helpers";
|
|
10
10
|
import globalTheme from "@ax/themes/theme.json";
|
|
11
|
-
import LiveFilter, { ILiveFilterProps } from "@ax/components/TableFilters/LiveFilter";
|
|
12
|
-
import { IQueryValue } from "@ax/types";
|
|
11
|
+
import LiveFilter, { type ILiveFilterProps } from "@ax/components/TableFilters/LiveFilter";
|
|
12
|
+
import type { IQueryValue } from "@ax/types";
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
15
15
|
vi.mock("axios");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
|
|
6
6
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
import globalTheme from "@ax/themes/theme.json";
|
|
10
|
-
import NameFilter, { INameFilterProps } from "@ax/components/TableFilters/NameFilter";
|
|
11
|
-
import { IQueryValue } from "@ax/types";
|
|
10
|
+
import NameFilter, { type INameFilterProps } from "@ax/components/TableFilters/NameFilter";
|
|
11
|
+
import type { IQueryValue } from "@ax/types";
|
|
12
12
|
|
|
13
13
|
afterEach(cleanup);
|
|
14
14
|
const defaultProps = mock<INameFilterProps>();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
6
6
|
|
|
7
|
-
import RoleFilter, { IRoleFilterProps } from "@ax/components/TableFilters/RoleFilter";
|
|
7
|
+
import RoleFilter, { type IRoleFilterProps } from "@ax/components/TableFilters/RoleFilter";
|
|
8
8
|
import globalTheme from "@ax/themes/theme.json";
|
|
9
9
|
import { parseTheme } from "@ax/helpers";
|
|
10
|
-
import { IQueryValue } from "@ax/types";
|
|
10
|
+
import type { IQueryValue } from "@ax/types";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
13
13
|
|
|
@@ -3,13 +3,13 @@ import * as React from "react";
|
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
|
|
5
5
|
import { ThemeProvider } from "styled-components";
|
|
6
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
6
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
7
|
import { render, screen, cleanup, act, fireEvent } from "@testing-library/react";
|
|
8
8
|
|
|
9
9
|
import { parseTheme } from "@ax/helpers";
|
|
10
|
-
import SiteFilter, { ISiteFilterProps } from "@ax/components/TableFilters/SiteFilter";
|
|
10
|
+
import SiteFilter, { type ISiteFilterProps } from "@ax/components/TableFilters/SiteFilter";
|
|
11
11
|
import globalTheme from "@ax/themes/theme.json";
|
|
12
|
-
import { IQueryValue } from "@ax/types";
|
|
12
|
+
import type { IQueryValue } from "@ax/types";
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
15
15
|
vi.mock("axios");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
6
6
|
|
|
7
7
|
import { parseTheme } from "@ax/helpers";
|
|
8
8
|
import globalTheme from "@ax/themes/theme.json";
|
|
9
|
-
import StatusFilter, { IStatusFilterProps } from "@ax/components/TableFilters/StatusFilter";
|
|
10
|
-
import { IQueryValue } from "@ax/types";
|
|
9
|
+
import StatusFilter, { type IStatusFilterProps } from "@ax/components/TableFilters/StatusFilter";
|
|
10
|
+
import type { IQueryValue } from "@ax/types";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
13
13
|
const makeProps = (overrides: Partial<IStatusFilterProps> = {}): IStatusFilterProps =>
|
package/src/__tests__/components/TableFilters/TranslationsFilter/TranslationsFilter.test.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
|
|
6
6
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
|
|
10
10
|
import globalTheme from "@ax/themes/theme.json";
|
|
11
|
-
import TranslationsFilter, { ITranslationsFilterProps } from "@ax/components/TableFilters/TranslationsFilter";
|
|
12
|
-
import { IQueryValue } from "@ax/types";
|
|
11
|
+
import TranslationsFilter, { type ITranslationsFilterProps } from "@ax/components/TableFilters/TranslationsFilter";
|
|
12
|
+
import type { IQueryValue } from "@ax/types";
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
15
15
|
const defaultProps = mock<ITranslationsFilterProps>();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
6
6
|
|
|
7
|
-
import TypeFilter, { ITypeFilterProps } from "@ax/components/TableFilters/TypeFilter";
|
|
7
|
+
import TypeFilter, { type ITypeFilterProps } from "@ax/components/TableFilters/TypeFilter";
|
|
8
8
|
import globalTheme from "@ax/themes/theme.json";
|
|
9
9
|
import { parseTheme } from "@ax/helpers";
|
|
10
|
-
import { IQueryValue } from "@ax/types";
|
|
10
|
+
import type { IQueryValue } from "@ax/types";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
13
13
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
4
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
5
5
|
|
|
6
6
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
import globalTheme from "@ax/themes/theme.json";
|
|
10
|
-
import UsersFilter, { IUsersFilterProps } from "@ax/components/TableFilters/UsersFilter";
|
|
11
|
-
import { IQueryValue } from "@ax/types";
|
|
10
|
+
import UsersFilter, { type IUsersFilterProps } from "@ax/components/TableFilters/UsersFilter";
|
|
11
|
+
import type { IQueryValue } from "@ax/types";
|
|
12
12
|
|
|
13
13
|
afterEach(cleanup);
|
|
14
14
|
const defaultProps = mock<IUsersFilterProps>();
|
|
@@ -5,7 +5,7 @@ import { mock } from "vitest-mock-extended";
|
|
|
5
5
|
import configureStore from "redux-mock-store";
|
|
6
6
|
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
|
-
import TableList, { ITableListProps } from "@ax/components/TableList";
|
|
8
|
+
import TableList, { type ITableListProps } from "@ax/components/TableList";
|
|
9
9
|
import { render, cleanup, screen } from "../../../../config/tests/test-utils";
|
|
10
10
|
|
|
11
11
|
afterEach(() => {
|
|
@@ -7,7 +7,7 @@ import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
import globalTheme from "@ax/themes/theme.json";
|
|
10
|
-
import Tabs, { ITabsProps } from "@ax/components/Tabs";
|
|
10
|
+
import Tabs, { type ITabsProps } from "@ax/components/Tabs";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
|
7
7
|
import { parseTheme } from "@ax/helpers";
|
|
8
8
|
|
|
9
9
|
import globalTheme from "@ax/themes/theme.json";
|
|
10
|
-
import Tag, { ITagProps } from "@ax/components/Tag";
|
|
10
|
+
import Tag, { type ITagProps } from "@ax/components/Tag";
|
|
11
11
|
|
|
12
12
|
afterEach(cleanup);
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@ import { mock } from "vitest-mock-extended";
|
|
|
5
5
|
import { render, screen, cleanup, fireEvent } from "@testing-library/react";
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
7
|
|
|
8
|
-
import Toast, { IToastProps } from "@ax/components/Toast";
|
|
8
|
+
import Toast, { type IToastProps } from "@ax/components/Toast";
|
|
9
9
|
import globalTheme from "@ax/themes/theme.json";
|
|
10
10
|
|
|
11
11
|
afterEach(cleanup);
|
|
@@ -310,7 +310,9 @@ describe("usePermissionsForPage hook", () => {
|
|
|
310
310
|
setupMockState({ users: { currentUser: userWithPagePerms, roles: [mockRole] } });
|
|
311
311
|
|
|
312
312
|
// User has access to pageId 100 (English), should also have access to 200 (Spanish)
|
|
313
|
-
const { result } = renderHook(() =>
|
|
313
|
+
const { result } = renderHook(() =>
|
|
314
|
+
usePermissionsForPage(1, 200, { edit: "edit_page" }, undefined, pageLanguages),
|
|
315
|
+
);
|
|
314
316
|
|
|
315
317
|
expect(result.current.edit).toBe(true);
|
|
316
318
|
});
|
|
@@ -328,7 +330,9 @@ describe("usePermissionsForPage hook", () => {
|
|
|
328
330
|
setupMockState({ users: { currentUser: userWithPagePerms, roles: [mockRole] } });
|
|
329
331
|
|
|
330
332
|
// User has no access to any translation in the group
|
|
331
|
-
const { result } = renderHook(() =>
|
|
333
|
+
const { result } = renderHook(() =>
|
|
334
|
+
usePermissionsForPage(1, 200, { edit: "edit_page" }, undefined, pageLanguages),
|
|
335
|
+
);
|
|
332
336
|
|
|
333
337
|
expect(result.current.edit).toBe(false);
|
|
334
338
|
});
|
|
@@ -358,7 +362,9 @@ describe("usePermissionsForPage hook", () => {
|
|
|
358
362
|
setupMockState({ users: { currentUser: userWithPagePerms, roles: [mockRole] } });
|
|
359
363
|
|
|
360
364
|
// User not in translation group perms but is in accessGrants
|
|
361
|
-
const { result } = renderHook(() =>
|
|
365
|
+
const { result } = renderHook(() =>
|
|
366
|
+
usePermissionsForPage(1, 200, { edit: "edit_page" }, accessGrants, pageLanguages),
|
|
367
|
+
);
|
|
362
368
|
|
|
363
369
|
expect(result.current.edit).toBe(true);
|
|
364
370
|
});
|
|
@@ -375,7 +381,9 @@ describe("usePermissionsForPage hook", () => {
|
|
|
375
381
|
setupMockState({ users: { currentUser: userWithPagePerms, roles: [mockRole] } });
|
|
376
382
|
|
|
377
383
|
// pageId 999 is not in pageLanguages, so treat it as a regular page
|
|
378
|
-
const { result } = renderHook(() =>
|
|
384
|
+
const { result } = renderHook(() =>
|
|
385
|
+
usePermissionsForPage(1, 999, { edit: "edit_page" }, undefined, pageLanguages),
|
|
386
|
+
);
|
|
379
387
|
|
|
380
388
|
expect(result.current.edit).toBe(false);
|
|
381
389
|
});
|
|
@@ -8,7 +8,7 @@ import { Router } from "react-router-dom";
|
|
|
8
8
|
|
|
9
9
|
import history from "@ax/routes/history";
|
|
10
10
|
import globalTheme from "@ax/themes/theme.json";
|
|
11
|
-
import Integrations, { IIntegrationsProps } from "@ax/modules/Settings/Integrations";
|
|
11
|
+
import Integrations, { type IIntegrationsProps } from "@ax/modules/Settings/Integrations";
|
|
12
12
|
import { render, cleanup, screen, act } from "../../../../../config/tests/test-utils";
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
@@ -111,7 +111,15 @@ describe("FinalStep learn items", () => {
|
|
|
111
111
|
// Create a role that has no matching LEARN_ITEMS (id=99)
|
|
112
112
|
const rolesWithUnmapped = [
|
|
113
113
|
...mockRoles,
|
|
114
|
-
{
|
|
114
|
+
{
|
|
115
|
+
id: 99,
|
|
116
|
+
name: "UnmappedRole",
|
|
117
|
+
hex: "#ffffff",
|
|
118
|
+
description: "",
|
|
119
|
+
permissions: {} as any,
|
|
120
|
+
active: true,
|
|
121
|
+
users: [],
|
|
122
|
+
},
|
|
115
123
|
];
|
|
116
124
|
renderFinalStep({
|
|
117
125
|
isSuperAdmin: false,
|
|
@@ -31,6 +31,7 @@ describe("ImageStep rendering", () => {
|
|
|
31
31
|
this.onload({ target: { result: mockResult } });
|
|
32
32
|
}),
|
|
33
33
|
};
|
|
34
|
+
// biome-ignore lint/complexity/useArrowFunction: mock is invoked with `new`; an arrow function is not a constructor
|
|
34
35
|
vi.spyOn(global, "FileReader" as any).mockImplementation(function () {
|
|
35
36
|
return mockFileReader;
|
|
36
37
|
});
|
|
@@ -56,6 +57,7 @@ describe("ImageStep rendering", () => {
|
|
|
56
57
|
this.onload({ target: { result: mockResult } });
|
|
57
58
|
}),
|
|
58
59
|
};
|
|
60
|
+
// biome-ignore lint/complexity/useArrowFunction: mock is invoked with `new`; an arrow function is not a constructor
|
|
59
61
|
vi.spyOn(global, "FileReader" as any).mockImplementation(function () {
|
|
60
62
|
return mockFileReader;
|
|
61
63
|
});
|
package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/UploadView/UploadView.test.tsx
CHANGED
|
@@ -63,6 +63,7 @@ describe("UploadView events", () => {
|
|
|
63
63
|
this.onload({ target: { result: mockResult } });
|
|
64
64
|
}),
|
|
65
65
|
};
|
|
66
|
+
// biome-ignore lint/complexity/useArrowFunction: mock is invoked with `new`; an arrow function is not a constructor
|
|
66
67
|
vi.spyOn(global, "FileReader" as any).mockImplementation(function () {
|
|
67
68
|
return mockFileReader;
|
|
68
69
|
});
|
|
@@ -3,11 +3,11 @@ import React from "react";
|
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
4
|
import { render, screen, cleanup, act, fireEvent } from "@testing-library/react";
|
|
5
5
|
import "@testing-library/jest-dom";
|
|
6
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
6
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
|
|
10
|
-
import BulkHeader, { IBulkHeaderProps } from "@ax/modules/Users/Roles/BulkHeader";
|
|
10
|
+
import BulkHeader, { type IBulkHeaderProps } from "@ax/modules/Users/Roles/BulkHeader";
|
|
11
11
|
|
|
12
12
|
import globalTheme from "@ax/themes/theme.json";
|
|
13
13
|
|
|
@@ -4,15 +4,15 @@ import axios from "axios";
|
|
|
4
4
|
|
|
5
5
|
import { ThemeProvider } from "styled-components";
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
|
-
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
|
+
import { type CalledWithMock, mock } from "vitest-mock-extended";
|
|
8
8
|
import configureStore from "redux-mock-store";
|
|
9
9
|
import thunk from "redux-thunk";
|
|
10
10
|
import { Router } from "react-router-dom";
|
|
11
11
|
|
|
12
|
-
import { IActivateRole, IGetRoles } from "@ax/types";
|
|
12
|
+
import type { IActivateRole, IGetRoles } from "@ax/types";
|
|
13
13
|
import { history } from "@ax/routes";
|
|
14
14
|
import globalTheme from "@ax/themes/theme.json";
|
|
15
|
-
import Roles, { IRolesProps } from "@ax/modules/Users/Roles";
|
|
15
|
+
import Roles, { type IRolesProps } from "@ax/modules/Users/Roles";
|
|
16
16
|
|
|
17
17
|
import { render, cleanup, screen, act, fireEvent } from "./../../../../../config/tests/test-utils";
|
|
18
18
|
import { rolesDataMock, usersDataMock } from "./../../../../__mocks__/store/Roles";
|
package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RoleItem/RoleItem.test.tsx
CHANGED
|
@@ -5,7 +5,9 @@ import "@testing-library/jest-dom";
|
|
|
5
5
|
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
|
-
import RoleItem, {
|
|
8
|
+
import RoleItem, {
|
|
9
|
+
type IRoleItemProps,
|
|
10
|
+
} from "./../../../../../../../modules/Users/UserCreate/SiteItem/RolesModal/RoleItem";
|
|
9
11
|
|
|
10
12
|
const onClickMock = vi.fn();
|
|
11
13
|
const onChangeMock = vi.fn();
|
|
@@ -5,7 +5,7 @@ import "@testing-library/jest-dom";
|
|
|
5
5
|
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
|
-
import RolesModal, { IRolesModalProps } from "./../../../../../../modules/Users/UserCreate/SiteItem/RolesModal";
|
|
8
|
+
import RolesModal, { type IRolesModalProps } from "./../../../../../../modules/Users/UserCreate/SiteItem/RolesModal";
|
|
9
9
|
|
|
10
10
|
const addRolesMock = vi.fn();
|
|
11
11
|
const toggleModalMock = vi.fn();
|
|
@@ -5,7 +5,7 @@ import "@testing-library/jest-dom";
|
|
|
5
5
|
|
|
6
6
|
import { parseTheme } from "@ax/helpers";
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
|
-
import SiteItem, { ISiteItemProps } from "./../../../../../modules/Users/UserCreate/SiteItem";
|
|
8
|
+
import SiteItem, { type ISiteItemProps } from "./../../../../../modules/Users/UserCreate/SiteItem";
|
|
9
9
|
|
|
10
10
|
const itemOnChangeMock = vi.fn();
|
|
11
11
|
const addRolesMock = vi.fn();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MockedFunction } from "vitest";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import axios, { AxiosResponse } from "axios";
|
|
3
|
+
import axios, { type AxiosResponse } from "axios";
|
|
4
4
|
import { ThemeProvider } from "styled-components";
|
|
5
5
|
import configureStore from "redux-mock-store";
|
|
6
6
|
import thunk from "redux-thunk";
|
|
@@ -13,7 +13,7 @@ import { createMemoryHistory } from "history";
|
|
|
13
13
|
|
|
14
14
|
import { parseTheme } from "@ax/helpers";
|
|
15
15
|
import globalTheme from "@ax/themes/theme.json";
|
|
16
|
-
import UserCreate, { IUserCreateProps } from "./../../../../modules/Users/UserCreate";
|
|
16
|
+
import UserCreate, { type IUserCreateProps } from "./../../../../modules/Users/UserCreate";
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
usersStoreMock,
|
package/src/api/analytics.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDimension, IDimensionsGroup } from "@ax/types";
|
|
2
|
-
import { AxiosResponse } from "axios";
|
|
1
|
+
import type { IDimension, IDimensionsGroup } from "@ax/types";
|
|
2
|
+
import type { AxiosResponse } from "axios";
|
|
3
3
|
import { template } from "./config";
|
|
4
|
-
import { IServiceConfig, sendRequest } from "./utils";
|
|
4
|
+
import { type IServiceConfig, sendRequest } from "./utils";
|
|
5
5
|
|
|
6
6
|
const SERVICES: { [key: string]: IServiceConfig } = {
|
|
7
7
|
GET_ANALYTICS: {
|
package/src/api/dataPack.tsx
CHANGED
package/src/api/domains.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IDomainRobot } from "@ax/types";
|
|
1
|
+
import type { IDomainRobot } from "@ax/types";
|
|
2
2
|
import { template } from "./config";
|
|
3
|
-
import { IServiceConfig, sendRequest } from "./utils";
|
|
3
|
+
import { type IServiceConfig, sendRequest } from "./utils";
|
|
4
4
|
|
|
5
5
|
const SERVICES: { [key: string]: IServiceConfig } = {
|
|
6
6
|
GET_ROBOTS: {
|
package/src/api/files.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IGetFolderParams } from "@ax/types";
|
|
1
|
+
import type { IGetFolderParams } from "@ax/types";
|
|
2
2
|
import { encodeData } from "@ax/helpers";
|
|
3
3
|
import { template } from "./config";
|
|
4
|
-
import { IServiceConfig, sendRequest, sendUploadRequest } from "./utils";
|
|
4
|
+
import { type IServiceConfig, sendRequest, sendUploadRequest } from "./utils";
|
|
5
5
|
|
|
6
6
|
const SERVICES: { [key: string]: IServiceConfig } = {
|
|
7
7
|
UPLOAD_FILE: {
|