@griddo/ax 12.3.0-beta.0 → 12.4.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/config/__tests__/webpack5-migration.test.js +442 -0
- package/config/{jest/componentsMock.js → tests/componentsMock.cjs} +4 -1
- package/config/tests/reactEasyCropMock.js +15 -0
- package/config/tests/reactTimezoneMock.js +14 -0
- package/config/tests/setup.ts +41 -0
- package/config/webpack.config.js +183 -189
- package/config/webpackDevServer.config.js +63 -93
- package/config/webpackSchemas.config.js +6 -1
- package/package.json +33 -53
- package/public/img/icons/markdown.svg +6 -0
- package/scripts/build.js +4 -0
- package/scripts/start.js +38 -9
- package/src/__tests__/components/ActionMenu/ActionMenu.test.tsx +12 -12
- package/src/__tests__/components/Breadcrumb/Breadcrumb.test.tsx +2 -2
- package/src/__tests__/components/Browser/Browser.test.tsx +17 -25
- package/src/__tests__/components/BulkSelectionOptions/BulkSelectionOptions.test.tsx +3 -3
- package/src/__tests__/components/CategoryCell/CategoryCell.test.tsx +3 -2
- package/src/__tests__/components/ConfigPanel/ConfigPanel.test.tsx +4 -4
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/ConnectedField.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/NavConnectedField/NavConnectedField.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/Field/Field.test.tsx +3 -3
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/PageConnectedField.test.tsx +17 -14
- package/src/__tests__/components/ConfigPanel/Form/ConnectedField/PageConnectedField/TemplateManager/TemplateManager.test.tsx +4 -4
- package/src/__tests__/components/ConfigPanel/Form/Form.test.tsx +7 -6
- package/src/__tests__/components/ConfigPanel/GlobalPageForm/GlobalPageForm.test.tsx +11 -11
- package/src/__tests__/components/ConfigPanel/Header/Header.test.tsx +11 -10
- package/src/__tests__/components/ConfigPanel/NavigationForm/Field/Field.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/NavigationForm/NavigationForm.test.tsx +2 -2
- package/src/__tests__/components/ConfigPanel/PreviewForm/PreviewForm.test.tsx +4 -3
- package/src/__tests__/components/ContextMenu/ContextMenu.test.tsx +24 -24
- package/src/__tests__/components/DragAndDrop/DragAndDrop.test.tsx +6 -5
- package/src/__tests__/components/ElementsTooltip/ElementsTooltip.test.tsx +1 -1
- package/src/__tests__/components/EmptyState/EmptyState.test.tsx +2 -2
- package/src/__tests__/components/ErrorCenter/ErrorCenter.test.tsx +11 -11
- package/src/__tests__/components/FieldContainer/FieldContainer.test.tsx +4 -4
- package/src/__tests__/components/Fields/AnalyticsField/AnalyticsField.test.tsx +3 -3
- package/src/__tests__/components/Fields/AnalyticsField/PageAnalytics/PageAnalytics.test.tsx +4 -4
- package/src/__tests__/components/Fields/AnalyticsField/StructuredDataAnalytics/StructuredDataAnalytics.test.tsx +3 -3
- package/src/__tests__/components/Fields/ArrayFieldGroup/ArrayFieldGroup.test.tsx +6 -5
- package/src/__tests__/components/Fields/AsyncCheckGroup/AsyncCheckGroup.test.tsx +19 -18
- package/src/__tests__/components/Fields/AsyncSelect/AsyncSelect.test.tsx +4 -3
- package/src/__tests__/components/Fields/Button/Button.test.tsx +4 -3
- package/src/__tests__/components/Fields/CheckField/CheckField.test.tsx +5 -5
- package/src/__tests__/components/Fields/CheckGroup/CheckGroup.test.tsx +10 -10
- package/src/__tests__/components/Fields/ColorPicker/ColorPicker.test.tsx +7 -6
- package/src/__tests__/components/Fields/ComponentArray/ComponentArray.test.tsx +3 -3
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/MixableComponentArray.test.tsx +45 -45
- package/src/__tests__/components/Fields/ComponentArray/MixableComponentArray/PasteModuleButton/PasteModuleButton.test.tsx +7 -6
- package/src/__tests__/components/Fields/ComponentArray/SameComponentArray/SameComponentArray.test.tsx +7 -7
- package/src/__tests__/components/Fields/ComponentContainer/ComponentContainer.test.tsx +55 -55
- package/src/__tests__/components/Fields/ConditionalField/ConditionalField.test.tsx +1 -1
- package/src/__tests__/components/Fields/DateField/DateField.test.tsx +6 -5
- package/src/__tests__/components/Fields/FieldGroup/FieldGroup.test.tsx +2 -2
- package/src/__tests__/components/Fields/FileField/FileField.test.tsx +4 -4
- package/src/__tests__/components/Fields/HeadingField/HeadingField.test.tsx +2 -2
- package/src/__tests__/components/Fields/HiddenField/HiddenField.test.tsx +3 -3
- package/src/__tests__/components/Fields/ImageField/ImageField.test.tsx +8 -7
- package/src/__tests__/components/Fields/IntegrationsField/IntegrationsField.test.tsx +9 -8
- package/src/__tests__/components/Fields/MultiCheckSelect/MultiCheckSelect.test.tsx +1 -1
- package/src/__tests__/components/Fields/MultiCheckSelectGroup/MultiCheckSelectGroup.test.tsx +7 -6
- package/src/__tests__/components/Fields/NoteField/NoteField.test.tsx +1 -1
- package/src/__tests__/components/Fields/NumberField/NumberField.test.tsx +8 -8
- package/src/__tests__/components/Fields/RadioField/RadioField.test.tsx +2 -2
- package/src/__tests__/components/Fields/ReferenceField/ReferenceField.test.tsx +17 -16
- 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 +5 -4
- package/src/__tests__/components/Fields/SummaryButton/SummaryButton.test.tsx +2 -2
- package/src/__tests__/components/Fields/TagField/TagField.test.tsx +9 -9
- package/src/__tests__/components/Fields/TextArea/TextArea.test.tsx +13 -9
- package/src/__tests__/components/Fields/TextField/TextField.test.tsx +8 -8
- package/src/__tests__/components/Fields/TimeField/HourInput/HourInput.test.tsx +7 -6
- package/src/__tests__/components/Fields/TimeField/TimeField.test.tsx +4 -3
- package/src/__tests__/components/Fields/ToggleField/ToggleField.test.tsx +2 -2
- package/src/__tests__/components/Fields/Tooltip/Tooltip.test.tsx +6 -6
- package/src/__tests__/components/Fields/TranslateButton/TranslateButton.test.tsx +13 -13
- package/src/__tests__/components/Fields/UniqueCheck/UniqueCheck.test.tsx +1 -1
- package/src/__tests__/components/Fields/UrlField/UrlField.test.tsx +20 -19
- package/src/__tests__/components/Fields/VisualUniqueSelection/ImageSelection/ImageSelection.test.tsx +3 -2
- package/src/__tests__/components/Fields/VisualUniqueSelection/ScrollableSelection/ScrollableSelection.test.tsx +4 -3
- package/src/__tests__/components/Fields/VisualUniqueSelection/VisualUniqueSelection.test.tsx +1 -1
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.atoms.test.tsx +11 -11
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.helpers.test.tsx +13 -14
- package/src/__tests__/components/Fields/Wysiwyg/Wysiwyg.test.tsx +28 -28
- package/src/__tests__/components/FieldsBehavior/FieldsBehavior.test.tsx +15 -14
- package/src/__tests__/components/FloatingMenu/FloatingMenu.test.tsx +36 -35
- package/src/__tests__/components/FloatingPanel/FloatingPanel.test.tsx +10 -10
- package/src/__tests__/components/GuardModal/GuardModal.test.tsx +1 -1
- package/src/__tests__/components/HeadingsPreviewModal/ErrorsBanner/ErrorItem/ErrorItem.test.tsx +11 -11
- package/src/__tests__/components/HeadingsPreviewModal/ErrorsBanner/ErrorsBanner.test.tsx +4 -4
- package/src/__tests__/components/HeadingsPreviewModal/HeadingsPreviewModal.test.tsx +15 -14
- package/src/__tests__/components/IconAction/IconAction.test.tsx +2 -2
- package/src/__tests__/components/ImageDragAndDrop/CropStep/CropStep.test.tsx +3 -3
- package/src/__tests__/components/ImageDragAndDrop/ImageDragAndDrop.test.tsx +7 -7
- package/src/__tests__/components/KeywordsPreviewModal/KeywordItem/KeywordItem.test.tsx +5 -5
- package/src/__tests__/components/KeywordsPreviewModal/KeywordsPreviewModal.test.tsx +14 -13
- package/src/__tests__/components/KeywordsPreviewModal/atoms.test.tsx +13 -13
- package/src/__tests__/components/LanguageMenu/LanguageMenu.test.tsx +6 -6
- 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 +32 -32
- package/src/__tests__/components/Login/RecoveryModal/RecoveryModal.test.tsx +10 -9
- package/src/__tests__/components/MainWrapper/AppBar/AppBar.test.tsx +21 -21
- package/src/__tests__/components/MenuItem/MenuItem.test.tsx +5 -5
- package/src/__tests__/components/Modal/Modal.test.tsx +20 -20
- package/src/__tests__/components/Nav/Nav.test.tsx +2 -2
- package/src/__tests__/components/Notification/Notification.test.tsx +2 -2
- package/src/__tests__/components/Pagination/Pagination.test.tsx +13 -14
- package/src/__tests__/components/ProfileImage/ProfileImage.test.tsx +6 -7
- package/src/__tests__/components/ReorderArrows/ReorderArrows.test.tsx +4 -3
- package/src/__tests__/components/ResizePanel/ResizePanel.test.tsx +10 -11
- package/src/__tests__/components/RestrictionsModal/CurrentAccessList/CurrentAccessList.test.tsx +7 -6
- package/src/__tests__/components/RestrictionsModal/OptionsStep/OptionsStep.test.tsx +12 -11
- package/src/__tests__/components/RestrictionsModal/RestrictionsModal.test.tsx +11 -10
- package/src/__tests__/components/RestrictionsModal/RolesList/RolesList.test.tsx +8 -8
- package/src/__tests__/components/RestrictionsModal/UsersList/UsersList.test.tsx +16 -15
- package/src/__tests__/components/SearchField/SearchField.test.tsx +13 -13
- package/src/__tests__/components/SideModal/SideModal.test.tsx +25 -23
- package/src/__tests__/components/SubNav/SubNav.test.tsx +1 -1
- package/src/__tests__/components/TableFilters/CategoryFilter/CategoryFilter.test.tsx +9 -8
- package/src/__tests__/components/TableFilters/CustomizeFilters/CustomizeFilters.test.tsx +5 -5
- package/src/__tests__/components/TableFilters/DateFilter/DateFilter.test.tsx +8 -8
- package/src/__tests__/components/TableFilters/LiveFilter/LiveFilter.test.tsx +11 -10
- package/src/__tests__/components/TableFilters/NameFilter/NameFilter.test.tsx +10 -10
- package/src/__tests__/components/TableFilters/RoleFilter/RoleFilter.test.tsx +5 -5
- package/src/__tests__/components/TableFilters/SiteFilter/SiteFilter.test.tsx +10 -9
- package/src/__tests__/components/TableFilters/StatusFilter/StatusFilter.test.tsx +9 -9
- package/src/__tests__/components/TableFilters/TranslationsFilter/TranslationsFilter.test.tsx +8 -8
- package/src/__tests__/components/TableFilters/TypeFilter/TypeFilter.test.tsx +5 -5
- package/src/__tests__/components/TableFilters/UsersFilter/UsersFilter.test.tsx +8 -8
- package/src/__tests__/components/TableList/TableList.test.tsx +4 -4
- package/src/__tests__/components/Tabs/Tabs.test.tsx +8 -9
- package/src/__tests__/components/Tag/Tag.test.tsx +3 -3
- package/src/__tests__/components/Toast/Toast.test.tsx +6 -6
- package/src/__tests__/gainup-trace.test.ts +67 -0
- package/src/__tests__/hooks/modals.test.tsx +4 -4
- package/src/__tests__/hooks/users.test.tsx +6 -5
- package/src/__tests__/modules/FileDrive/MarkdownFormat.test.tsx +58 -0
- package/src/__tests__/modules/FramePreview/FramePreview.test.tsx +40 -39
- package/src/__tests__/modules/FramePreview/HeadingsOverlay/HeadingsOverlay.test.tsx +11 -11
- package/src/__tests__/modules/Settings/Integrations/Integrations.test.tsx +2 -2
- package/src/__tests__/modules/Settings/Social/Social.test.tsx +4 -3
- package/src/__tests__/modules/Sites/Sites.test.tsx +5 -4
- package/src/__tests__/modules/Sites/SitesList/ListView/BulkHeader/BulkHeader.test.tsx +2 -2
- package/src/__tests__/modules/Sites/SitesList/SitesList.test.tsx +7 -6
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/DataStep/DataStep.test.tsx +6 -6
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/FinalStep/FinalStep.test.tsx +4 -4
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/CropView/CropView.test.tsx +3 -3
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/ImageStep.test.tsx +9 -5
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/ImageStep/UploadView/UploadView.test.tsx +8 -6
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/TimezoneStep/TimezoneStep.test.tsx +7 -7
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/WelcomeModal.test.tsx +1 -1
- package/src/__tests__/modules/Sites/SitesList/WelcomeModal/WelcomeStep/WelcomeStep.test.tsx +3 -3
- package/src/__tests__/modules/Users/Roles/BulkHeader/BulkHeader.test.tsx +3 -3
- package/src/__tests__/modules/Users/Roles/Roles.test.tsx +11 -10
- package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RoleItem/RoleItem.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RolesModal.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/SiteItem/SiteItem.test.tsx +3 -3
- package/src/__tests__/modules/Users/UserCreate/UserCreate.test.tsx +6 -5
- package/src/__tests__/modules/Users/UserList/UserItem/UserItem.test.tsx +9 -9
- package/src/__tests__/modules/Users/UserList/UserList.test.tsx +4 -4
- package/src/components/Flag/components/index.ts +30 -0
- package/src/components/Flag/index.tsx +3 -5
- package/src/components/Icon/components/index.ts +229 -0
- package/src/components/Icon/index.tsx +3 -7
- package/src/constants/index.ts +1 -1
- package/src/helpers/files.tsx +2 -0
- package/src/modules/App/Routing/NavMenu/index.tsx +4 -2
- package/src/modules/FileDrive/FileFilters/Type/index.tsx +1 -0
- package/tsconfig.json +1 -1
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileMock.js +0 -1
- package/config/jest/fileTransform.js +0 -40
- package/config/jest/reactEasyCropMock.js +0 -15
- package/config/jest/reactTimezoneMock.js +0 -13
- package/config/jest/setup.js +0 -31
- package/config/jest/styleMock.js +0 -1
- package/config/pnpTs.js +0 -15
- package/src/__tests__/aiup-trace.test.ts +0 -23
- /package/config/{jest/test-utils.js → tests/test-utils.jsx} +0 -0
- /package/src/components/Flag/components/{Ca_ES.js → Ca_ES.jsx} +0 -0
- /package/src/components/Flag/components/{De_DE.js → De_DE.jsx} +0 -0
- /package/src/components/Flag/components/{En_GB.js → En_GB.jsx} +0 -0
- /package/src/components/Flag/components/{Es_ES.js → Es_ES.jsx} +0 -0
- /package/src/components/Flag/components/{Eu_ES.js → Eu_ES.jsx} +0 -0
- /package/src/components/Flag/components/{Fr_FR.js → Fr_FR.jsx} +0 -0
- /package/src/components/Flag/components/{It_IT.js → It_IT.jsx} +0 -0
- /package/src/components/Flag/components/{Pt_PT.js → Pt_PT.jsx} +0 -0
- /package/src/components/Icon/components/{Active.js → Active.jsx} +0 -0
- /package/src/components/Icon/components/{Add.js → Add.jsx} +0 -0
- /package/src/components/Icon/components/{AddCircle.js → AddCircle.jsx} +0 -0
- /package/src/components/Icon/components/{Alert.js → Alert.jsx} +0 -0
- /package/src/components/Icon/components/{AlignLeft.js → AlignLeft.jsx} +0 -0
- /package/src/components/Icon/components/{Back.js → Back.jsx} +0 -0
- /package/src/components/Icon/components/{BulletList.js → BulletList.jsx} +0 -0
- /package/src/components/Icon/components/{Button.js → Button.jsx} +0 -0
- /package/src/components/Icon/components/{Calendar.js → Calendar.jsx} +0 -0
- /package/src/components/Icon/components/{CancelEvent.js → CancelEvent.jsx} +0 -0
- /package/src/components/Icon/components/{Category.js → Category.jsx} +0 -0
- /package/src/components/Icon/components/{Change.js → Change.jsx} +0 -0
- /package/src/components/Icon/components/{Close.js → Close.jsx} +0 -0
- /package/src/components/Icon/components/{ClosePanel.js → ClosePanel.jsx} +0 -0
- /package/src/components/Icon/components/{CodeBody.js → CodeBody.jsx} +0 -0
- /package/src/components/Icon/components/{CodeHead.js → CodeHead.jsx} +0 -0
- /package/src/components/Icon/components/{CodeHeadBody.js → CodeHeadBody.jsx} +0 -0
- /package/src/components/Icon/components/{Collapsed.js → Collapsed.jsx} +0 -0
- /package/src/components/Icon/components/{ColorPicker.js → ColorPicker.jsx} +0 -0
- /package/src/components/Icon/components/{Compose.js → Compose.jsx} +0 -0
- /package/src/components/Icon/components/{Copy.js → Copy.jsx} +0 -0
- /package/src/components/Icon/components/{Copy2.js → Copy2.jsx} +0 -0
- /package/src/components/Icon/components/{Data.js → Data.jsx} +0 -0
- /package/src/components/Icon/components/{DataAdd.js → DataAdd.jsx} +0 -0
- /package/src/components/Icon/components/{Deactivate.js → Deactivate.jsx} +0 -0
- /package/src/components/Icon/components/{Delete.js → Delete.jsx} +0 -0
- /package/src/components/Icon/components/{Desktop.js → Desktop.jsx} +0 -0
- /package/src/components/Icon/components/{Disabled.js → Disabled.jsx} +0 -0
- /package/src/components/Icon/components/{Done.js → Done.jsx} +0 -0
- /package/src/components/Icon/components/{DownArrow.js → DownArrow.jsx} +0 -0
- /package/src/components/Icon/components/{Download.js → Download.jsx} +0 -0
- /package/src/components/Icon/components/{Drag.js → Drag.jsx} +0 -0
- /package/src/components/Icon/components/{Duplicate.js → Duplicate.jsx} +0 -0
- /package/src/components/Icon/components/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/Icon/components/{Empty.js → Empty.jsx} +0 -0
- /package/src/components/Icon/components/{EmptyCheck.js → EmptyCheck.jsx} +0 -0
- /package/src/components/Icon/components/{Extend.js → Extend.jsx} +0 -0
- /package/src/components/Icon/components/{File.js → File.jsx} +0 -0
- /package/src/components/Icon/components/{Filter.js → Filter.jsx} +0 -0
- /package/src/components/Icon/components/{Form.js → Form.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowDown.js → FullArrowDown.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowLeft.js → FullArrowLeft.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowRight.js → FullArrowRight.jsx} +0 -0
- /package/src/components/Icon/components/{FullArrowUp.js → FullArrowUp.jsx} +0 -0
- /package/src/components/Icon/components/{Grid.js → Grid.jsx} +0 -0
- /package/src/components/Icon/components/{Grid2.js → Grid2.jsx} +0 -0
- /package/src/components/Icon/components/{GriddoLogo.js → GriddoLogo.jsx} +0 -0
- /package/src/components/Icon/components/{HeroCard.js → HeroCard.jsx} +0 -0
- /package/src/components/Icon/components/{Hide.js → Hide.jsx} +0 -0
- /package/src/components/Icon/components/{History.js → History.jsx} +0 -0
- /package/src/components/Icon/components/{Home.js → Home.jsx} +0 -0
- /package/src/components/Icon/components/{Ia.js → Ia.jsx} +0 -0
- /package/src/components/Icon/components/{Image.js → Image.jsx} +0 -0
- /package/src/components/Icon/components/{Info.js → Info.jsx} +0 -0
- /package/src/components/Icon/components/{Laptop.js → Laptop.jsx} +0 -0
- /package/src/components/Icon/components/{LeftArrow.js → LeftArrow.jsx} +0 -0
- /package/src/components/Icon/components/{Link.js → Link.jsx} +0 -0
- /package/src/components/Icon/components/{Lock.js → Lock.jsx} +0 -0
- /package/src/components/Icon/components/{Log.js → Log.jsx} +0 -0
- /package/src/components/Icon/components/{Map.js → Map.jsx} +0 -0
- /package/src/components/Icon/components/{Menu.js → Menu.jsx} +0 -0
- /package/src/components/Icon/components/{Microsoft.js → Microsoft.jsx} +0 -0
- /package/src/components/Icon/components/{Modified.js → Modified.jsx} +0 -0
- /package/src/components/Icon/components/{Modules.js → Modules.jsx} +0 -0
- /package/src/components/Icon/components/{More.js → More.jsx} +0 -0
- /package/src/components/Icon/components/{NewFolder.js → NewFolder.jsx} +0 -0
- /package/src/components/Icon/components/{Offline.js → Offline.jsx} +0 -0
- /package/src/components/Icon/components/{OfflinePending.js → OfflinePending.jsx} +0 -0
- /package/src/components/Icon/components/{OpenOutside.js → OpenOutside.jsx} +0 -0
- /package/src/components/Icon/components/{OpenPanel.js → OpenPanel.jsx} +0 -0
- /package/src/components/Icon/components/{OutOfSection.js → OutOfSection.jsx} +0 -0
- /package/src/components/Icon/components/{Page.js → Page.jsx} +0 -0
- /package/src/components/Icon/components/{Party.js → Party.jsx} +0 -0
- /package/src/components/Icon/components/{Paste.js → Paste.jsx} +0 -0
- /package/src/components/Icon/components/{Phone.js → Phone.jsx} +0 -0
- /package/src/components/Icon/components/{PhotoLibrary.js → PhotoLibrary.jsx} +0 -0
- /package/src/components/Icon/components/{Power.js → Power.jsx} +0 -0
- /package/src/components/Icon/components/{Preview.js → Preview.jsx} +0 -0
- /package/src/components/Icon/components/{Project.js → Project.jsx} +0 -0
- /package/src/components/Icon/components/{QrCode.js → QrCode.jsx} +0 -0
- /package/src/components/Icon/components/{Question.js → Question.jsx} +0 -0
- /package/src/components/Icon/components/{Refresh.js → Refresh.jsx} +0 -0
- /package/src/components/Icon/components/{Republish.js → Republish.jsx} +0 -0
- /package/src/components/Icon/components/{RightArrow.js → RightArrow.jsx} +0 -0
- /package/src/components/Icon/components/{Scheduled.js → Scheduled.jsx} +0 -0
- /package/src/components/Icon/components/{Search.js → Search.jsx} +0 -0
- /package/src/components/Icon/components/{SendEmail.js → SendEmail.jsx} +0 -0
- /package/src/components/Icon/components/{Settings.js → Settings.jsx} +0 -0
- /package/src/components/Icon/components/{Share.js → Share.jsx} +0 -0
- /package/src/components/Icon/components/{Subsection.js → Subsection.jsx} +0 -0
- /package/src/components/Icon/components/{Success.js → Success.jsx} +0 -0
- /package/src/components/Icon/components/{SuccessSolid.js → SuccessSolid.jsx} +0 -0
- /package/src/components/Icon/components/{Sync.js → Sync.jsx} +0 -0
- /package/src/components/Icon/components/{Tablet.js → Tablet.jsx} +0 -0
- /package/src/components/Icon/components/{Translate.js → Translate.jsx} +0 -0
- /package/src/components/Icon/components/{Unlink.js → Unlink.jsx} +0 -0
- /package/src/components/Icon/components/{UpArrow.js → UpArrow.jsx} +0 -0
- /package/src/components/Icon/components/{UploadFile.js → UploadFile.jsx} +0 -0
- /package/src/components/Icon/components/{UploadPending.js → UploadPending.jsx} +0 -0
- /package/src/components/Icon/components/{UrlLink.js → UrlLink.jsx} +0 -0
- /package/src/components/Icon/components/{User.js → User.jsx} +0 -0
- /package/src/components/Icon/components/{Users.js → Users.jsx} +0 -0
- /package/src/components/Icon/components/{Video.js → Video.jsx} +0 -0
- /package/src/components/Icon/components/{View.js → View.jsx} +0 -0
- /package/src/components/Icon/components/{Warning.js → Warning.jsx} +0 -0
- /package/src/components/Icon/components/{Web.js → Web.jsx} +0 -0
- /package/src/components/Icon/components/{Working.js → Working.jsx} +0 -0
- /package/src/components/Loader/components/{Circle.js → Circle.jsx} +0 -0
- /package/src/components/Loader/components/{Dots.js → Dots.jsx} +0 -0
- /package/src/components/Loader/components/{SmallCircle.js → SmallCircle.jsx} +0 -0
package/src/__tests__/modules/Sites/SitesList/WelcomeModal/TimezoneStep/TimezoneStep.test.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import globalTheme from "@ax/themes/theme.json";
|
|
|
8
8
|
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
|
|
9
9
|
import { ThemeProvider } from "styled-components";
|
|
10
10
|
|
|
11
|
-
// react-timezone-map-select is mocked globally via
|
|
11
|
+
// react-timezone-map-select is mocked globally via the alias in vitest.config.ts
|
|
12
12
|
|
|
13
13
|
const defaultForm: IUserFormState = {
|
|
14
14
|
name: "John Doe",
|
|
@@ -23,9 +23,9 @@ const renderTimezoneStep = (props = {}) =>
|
|
|
23
23
|
<ThemeProvider theme={parseTheme(globalTheme)}>
|
|
24
24
|
<TimezoneStep
|
|
25
25
|
form={defaultForm}
|
|
26
|
-
setForm={
|
|
27
|
-
onClickNext={
|
|
28
|
-
onClickBack={
|
|
26
|
+
setForm={vi.fn()}
|
|
27
|
+
onClickNext={vi.fn()}
|
|
28
|
+
onClickBack={vi.fn()}
|
|
29
29
|
isSaving={false}
|
|
30
30
|
{...props}
|
|
31
31
|
/>
|
|
@@ -71,21 +71,21 @@ describe("TimezoneStep rendering", () => {
|
|
|
71
71
|
|
|
72
72
|
describe("TimezoneStep events", () => {
|
|
73
73
|
it("should call onClickBack when Back button is clicked", () => {
|
|
74
|
-
const onClickBack =
|
|
74
|
+
const onClickBack = vi.fn();
|
|
75
75
|
renderTimezoneStep({ onClickBack });
|
|
76
76
|
fireEvent.click(screen.getByText("Back"));
|
|
77
77
|
expect(onClickBack).toHaveBeenCalledTimes(1);
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
it("should call onClickNext when Save profile button is clicked", () => {
|
|
81
|
-
const onClickNext =
|
|
81
|
+
const onClickNext = vi.fn();
|
|
82
82
|
renderTimezoneStep({ onClickNext });
|
|
83
83
|
fireEvent.click(screen.getByText("Save profile"));
|
|
84
84
|
expect(onClickNext).toHaveBeenCalledTimes(1);
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
it("should not call onClickNext when isSaving is true", () => {
|
|
88
|
-
const onClickNext =
|
|
88
|
+
const onClickNext = vi.fn();
|
|
89
89
|
renderTimezoneStep({ onClickNext, isSaving: true });
|
|
90
90
|
const saveButton = screen.getByText("Saving...").closest("button");
|
|
91
91
|
saveButton && fireEvent.click(saveButton);
|
|
@@ -25,7 +25,7 @@ const renderWelcomeModal = (props = {}, storeData = initialStore) => {
|
|
|
25
25
|
return render(
|
|
26
26
|
<Provider store={store}>
|
|
27
27
|
<ThemeProvider theme={parseTheme(globalTheme)}>
|
|
28
|
-
<WelcomeModal isOpen={true} toggleModal={
|
|
28
|
+
<WelcomeModal isOpen={true} toggleModal={vi.fn()} {...props} />
|
|
29
29
|
</ThemeProvider>
|
|
30
30
|
</Provider>,
|
|
31
31
|
);
|
|
@@ -10,7 +10,7 @@ afterEach(cleanup);
|
|
|
10
10
|
const renderWelcomeStep = (props = {}) =>
|
|
11
11
|
render(
|
|
12
12
|
<ThemeProvider theme={parseTheme(globalTheme)}>
|
|
13
|
-
<WelcomeStep onSkip={
|
|
13
|
+
<WelcomeStep onSkip={vi.fn()} onClickNext={vi.fn()} {...props} />
|
|
14
14
|
</ThemeProvider>,
|
|
15
15
|
);
|
|
16
16
|
|
|
@@ -24,14 +24,14 @@ describe("WelcomeStep rendering", () => {
|
|
|
24
24
|
|
|
25
25
|
describe("WelcomeStep events", () => {
|
|
26
26
|
it("should call onSkip when skip button is clicked", () => {
|
|
27
|
-
const onSkip =
|
|
27
|
+
const onSkip = vi.fn();
|
|
28
28
|
renderWelcomeStep({ onSkip });
|
|
29
29
|
fireEvent.click(screen.getByText("Skip, I\u2019ll do it later"));
|
|
30
30
|
expect(onSkip).toHaveBeenCalledTimes(1);
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it("should call onClickNext when complete profile button is clicked", () => {
|
|
34
|
-
const onClickNext =
|
|
34
|
+
const onClickNext = vi.fn();
|
|
35
35
|
renderWelcomeStep({ onClickNext });
|
|
36
36
|
fireEvent.click(screen.getByText("Complete profile"));
|
|
37
37
|
expect(onClickNext).toHaveBeenCalledTimes(1);
|
|
@@ -3,7 +3,7 @@ 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 "
|
|
6
|
+
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
7
|
|
|
8
8
|
import { parseTheme } from "@ax/helpers";
|
|
9
9
|
|
|
@@ -117,7 +117,7 @@ describe("BulkHeader module events", () => {
|
|
|
117
117
|
defaultProps.showBulk = true;
|
|
118
118
|
defaultProps.isSiteView = false;
|
|
119
119
|
defaultProps.checkState.isAllSelected = true;
|
|
120
|
-
const activateRolesMock =
|
|
120
|
+
const activateRolesMock = vi.fn();
|
|
121
121
|
|
|
122
122
|
defaultProps.activateRoles = activateRolesMock as CalledWithMock<void, [active: boolean]> &
|
|
123
123
|
((active: boolean) => void);
|
|
@@ -138,7 +138,7 @@ describe("BulkHeader module events", () => {
|
|
|
138
138
|
it("should call activate role on click option", async () => {
|
|
139
139
|
defaultProps.showBulk = true;
|
|
140
140
|
defaultProps.checkState.isAllSelected = true;
|
|
141
|
-
const activateRolesMock =
|
|
141
|
+
const activateRolesMock = vi.fn();
|
|
142
142
|
|
|
143
143
|
defaultProps.activateRoles = activateRolesMock as CalledWithMock<void, [active: boolean]> &
|
|
144
144
|
((active: boolean) => void);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { MockedFunction } from "vitest";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import axios from "axios";
|
|
3
4
|
|
|
4
5
|
import { ThemeProvider } from "styled-components";
|
|
5
6
|
import { parseTheme } from "@ax/helpers";
|
|
6
|
-
import { CalledWithMock, mock } from "
|
|
7
|
+
import { CalledWithMock, mock } from "vitest-mock-extended";
|
|
7
8
|
import configureStore from "redux-mock-store";
|
|
8
9
|
import thunk from "redux-thunk";
|
|
9
10
|
import { Router } from "react-router-dom";
|
|
@@ -13,20 +14,20 @@ import { history } from "@ax/routes";
|
|
|
13
14
|
import globalTheme from "@ax/themes/theme.json";
|
|
14
15
|
import Roles, { IRolesProps } from "@ax/modules/Users/Roles";
|
|
15
16
|
|
|
16
|
-
import { render, cleanup, screen, act, fireEvent } from "./../../../../../config/
|
|
17
|
+
import { render, cleanup, screen, act, fireEvent } from "./../../../../../config/tests/test-utils";
|
|
17
18
|
import { rolesDataMock, usersDataMock } from "./../../../../__mocks__/store/Roles";
|
|
18
19
|
import { rolesDataResponse } from "./../../../../__mocks__/axios/Roles";
|
|
19
20
|
|
|
20
21
|
afterEach(cleanup);
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
const mockedAxios = axios as
|
|
23
|
+
vi.mock("axios");
|
|
24
|
+
const mockedAxios = axios as MockedFunction<typeof axios>;
|
|
24
25
|
const defaultProps = mock<IRolesProps>();
|
|
25
26
|
|
|
26
27
|
describe("Roles module rendering", () => {
|
|
27
28
|
it("should render component", async () => {
|
|
28
29
|
mockedAxios.mockResolvedValue(rolesDataResponse);
|
|
29
|
-
window.HTMLElement.prototype.scrollIntoView =
|
|
30
|
+
window.HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
30
31
|
const initialStore = {
|
|
31
32
|
app: { isLoading: false },
|
|
32
33
|
users: { roles: rolesDataMock },
|
|
@@ -60,7 +61,7 @@ describe("Roles module rendering", () => {
|
|
|
60
61
|
|
|
61
62
|
it("should render role items", async () => {
|
|
62
63
|
mockedAxios.mockResolvedValue(rolesDataResponse);
|
|
63
|
-
window.HTMLElement.prototype.scrollIntoView =
|
|
64
|
+
window.HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
64
65
|
const initialStore = {
|
|
65
66
|
app: { isLoading: false },
|
|
66
67
|
users: { roles: rolesDataMock },
|
|
@@ -92,7 +93,7 @@ describe("Roles module rendering", () => {
|
|
|
92
93
|
|
|
93
94
|
it("should render tag colors", async () => {
|
|
94
95
|
mockedAxios.mockResolvedValue(rolesDataResponse);
|
|
95
|
-
window.HTMLElement.prototype.scrollIntoView =
|
|
96
|
+
window.HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
96
97
|
const initialStore = {
|
|
97
98
|
app: { isLoading: false },
|
|
98
99
|
users: { roles: rolesDataMock },
|
|
@@ -426,9 +427,9 @@ describe("Roles module events", () => {
|
|
|
426
427
|
|
|
427
428
|
it("should render FullArrowDown icon if is filtered by descending name", async () => {
|
|
428
429
|
mockedAxios.mockResolvedValue(rolesDataResponse);
|
|
429
|
-
window.HTMLElement.prototype.scrollIntoView =
|
|
430
|
-
const getRolesMock =
|
|
431
|
-
const activateRolesMock =
|
|
430
|
+
window.HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
431
|
+
const getRolesMock = vi.fn();
|
|
432
|
+
const activateRolesMock = vi.fn();
|
|
432
433
|
defaultProps.getRoles = getRolesMock as CalledWithMock<Promise<void>, [params?: IGetRoles | undefined]>;
|
|
433
434
|
defaultProps.activateRoles = activateRolesMock as CalledWithMock<Promise<boolean>, [params: IActivateRole]> &
|
|
434
435
|
((params: IActivateRole) => Promise<boolean>);
|
package/src/__tests__/modules/Users/UserCreate/SiteItem/RolesModal/RoleItem/RoleItem.test.tsx
CHANGED
|
@@ -7,8 +7,8 @@ import { parseTheme } from "@ax/helpers";
|
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
8
|
import RoleItem, { IRoleItemProps } from "./../../../../../../../modules/Users/UserCreate/SiteItem/RolesModal/RoleItem";
|
|
9
9
|
|
|
10
|
-
const onClickMock =
|
|
11
|
-
const onChangeMock =
|
|
10
|
+
const onClickMock = vi.fn();
|
|
11
|
+
const onChangeMock = vi.fn();
|
|
12
12
|
const defaultProps: IRoleItemProps = {
|
|
13
13
|
role: {
|
|
14
14
|
id: 1,
|
|
@@ -25,7 +25,7 @@ const defaultProps: IRoleItemProps = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
afterEach(() => {
|
|
28
|
-
|
|
28
|
+
vi.clearAllMocks();
|
|
29
29
|
cleanup();
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -7,8 +7,8 @@ import { parseTheme } from "@ax/helpers";
|
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
8
|
import RolesModal, { IRolesModalProps } from "./../../../../../../modules/Users/UserCreate/SiteItem/RolesModal";
|
|
9
9
|
|
|
10
|
-
const addRolesMock =
|
|
11
|
-
const toggleModalMock =
|
|
10
|
+
const addRolesMock = vi.fn();
|
|
11
|
+
const toggleModalMock = vi.fn();
|
|
12
12
|
const defaultProps: IRolesModalProps = {
|
|
13
13
|
roles: [
|
|
14
14
|
{
|
|
@@ -47,7 +47,7 @@ const defaultProps: IRolesModalProps = {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
afterEach(() => {
|
|
50
|
-
|
|
50
|
+
vi.clearAllMocks();
|
|
51
51
|
cleanup();
|
|
52
52
|
});
|
|
53
53
|
|
|
@@ -7,8 +7,8 @@ import { parseTheme } from "@ax/helpers";
|
|
|
7
7
|
import globalTheme from "@ax/themes/theme.json";
|
|
8
8
|
import SiteItem, { ISiteItemProps } from "./../../../../../modules/Users/UserCreate/SiteItem";
|
|
9
9
|
|
|
10
|
-
const itemOnChangeMock =
|
|
11
|
-
const addRolesMock =
|
|
10
|
+
const itemOnChangeMock = vi.fn();
|
|
11
|
+
const addRolesMock = vi.fn();
|
|
12
12
|
const defaultProps: ISiteItemProps = {
|
|
13
13
|
item: { id: 1, name: "Site 1", onChange: itemOnChangeMock },
|
|
14
14
|
sites: [1, 2, 3],
|
|
@@ -38,7 +38,7 @@ const defaultProps: ISiteItemProps = {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
afterEach(() => {
|
|
41
|
-
|
|
41
|
+
vi.clearAllMocks();
|
|
42
42
|
cleanup();
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { MockedFunction } from "vitest";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import axios, { AxiosResponse } from "axios";
|
|
3
4
|
import { ThemeProvider } from "styled-components";
|
|
4
5
|
import configureStore from "redux-mock-store";
|
|
5
6
|
import thunk from "redux-thunk";
|
|
6
7
|
import { Router } from "react-router-dom";
|
|
7
|
-
import { mock } from "
|
|
8
|
+
import { mock } from "vitest-mock-extended";
|
|
8
9
|
import "@testing-library/jest-dom";
|
|
9
|
-
import { render, cleanup, screen, act } from "./../../../../../config/
|
|
10
|
+
import { render, cleanup, screen, act } from "./../../../../../config/tests/test-utils";
|
|
10
11
|
import userEvent from "@testing-library/user-event";
|
|
11
12
|
import { createMemoryHistory } from "history";
|
|
12
13
|
|
|
@@ -21,8 +22,8 @@ import {
|
|
|
21
22
|
appStoreMock,
|
|
22
23
|
} from "../../../../__mocks__/store/UsersCreate";
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
const mockedAxios = axios as
|
|
25
|
+
vi.mock("axios");
|
|
26
|
+
const mockedAxios = axios as MockedFunction<typeof axios>;
|
|
26
27
|
|
|
27
28
|
const middlewares: any = [thunk];
|
|
28
29
|
const mockStore = configureStore(middlewares);
|
|
@@ -35,7 +36,7 @@ const history = createMemoryHistory();
|
|
|
35
36
|
|
|
36
37
|
afterEach(() => {
|
|
37
38
|
cleanup();
|
|
38
|
-
|
|
39
|
+
vi.clearAllMocks();
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
describe("UserCreate module rendering", () => {
|
|
@@ -14,7 +14,7 @@ import configureStore from "redux-mock-store";
|
|
|
14
14
|
import thunk from "redux-thunk";
|
|
15
15
|
import { ThemeProvider } from "styled-components";
|
|
16
16
|
|
|
17
|
-
import { act, cleanup, render, screen, waitFor } from "./../../../../../../config/
|
|
17
|
+
import { act, cleanup, render, screen, waitFor } from "./../../../../../../config/tests/test-utils";
|
|
18
18
|
import { defaultStore } from "./../../../../../__mocks__/store/GenericStore";
|
|
19
19
|
import {
|
|
20
20
|
appStoreMock,
|
|
@@ -33,13 +33,13 @@ const history = createMemoryHistory();
|
|
|
33
33
|
|
|
34
34
|
let mockedAxios: MockAdapter;
|
|
35
35
|
|
|
36
|
-
const onChangeMock =
|
|
37
|
-
const onClickMock =
|
|
38
|
-
const deleteUserMock =
|
|
39
|
-
const resendInvitationMock =
|
|
40
|
-
const getUsersMock =
|
|
41
|
-
const removeUserFromSiteMock =
|
|
42
|
-
const toggleDeleteToastMock =
|
|
36
|
+
const onChangeMock = vi.fn();
|
|
37
|
+
const onClickMock = vi.fn();
|
|
38
|
+
const deleteUserMock = vi.fn();
|
|
39
|
+
const resendInvitationMock = vi.fn();
|
|
40
|
+
const getUsersMock = vi.fn();
|
|
41
|
+
const removeUserFromSiteMock = vi.fn();
|
|
42
|
+
const toggleDeleteToastMock = vi.fn();
|
|
43
43
|
const defaultProps: IUserItemProps = {
|
|
44
44
|
user: {
|
|
45
45
|
id: 171,
|
|
@@ -186,7 +186,7 @@ beforeAll(() => {
|
|
|
186
186
|
|
|
187
187
|
afterEach(() => {
|
|
188
188
|
cleanup();
|
|
189
|
-
|
|
189
|
+
vi.clearAllMocks();
|
|
190
190
|
});
|
|
191
191
|
|
|
192
192
|
describe("UserItem module rendering", () => {
|
|
@@ -9,13 +9,13 @@ import userEvent from "@testing-library/user-event";
|
|
|
9
9
|
import axios from "axios";
|
|
10
10
|
import MockAdapter from "axios-mock-adapter";
|
|
11
11
|
import { createMemoryHistory } from "history";
|
|
12
|
-
import { mock } from "
|
|
12
|
+
import { mock } from "vitest-mock-extended";
|
|
13
13
|
import type { Middleware } from "redux";
|
|
14
14
|
import configureStore from "redux-mock-store";
|
|
15
15
|
import thunk from "redux-thunk";
|
|
16
16
|
import { ThemeProvider } from "styled-components";
|
|
17
17
|
|
|
18
|
-
import { act, cleanup, fireEvent, render, screen } from "./../../../../../config/
|
|
18
|
+
import { act, cleanup, fireEvent, render, screen } from "./../../../../../config/tests/test-utils";
|
|
19
19
|
import {
|
|
20
20
|
deletedUserResponse,
|
|
21
21
|
removeUserSiteResponse,
|
|
@@ -46,12 +46,12 @@ let mockedAxios: MockAdapter;
|
|
|
46
46
|
|
|
47
47
|
beforeAll(() => {
|
|
48
48
|
mockedAxios = new MockAdapter(axios);
|
|
49
|
-
window.HTMLElement.prototype.scrollIntoView =
|
|
49
|
+
window.HTMLElement.prototype.scrollIntoView = vi.fn();
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
afterEach(() => {
|
|
53
53
|
cleanup();
|
|
54
|
-
|
|
54
|
+
vi.clearAllMocks();
|
|
55
55
|
mockedAxios.reset();
|
|
56
56
|
});
|
|
57
57
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
|
|
3
|
+
import Ca_ES from "./Ca_ES";
|
|
4
|
+
import De_DE from "./De_DE";
|
|
5
|
+
import En_GB from "./En_GB";
|
|
6
|
+
import Es_ES from "./Es_ES";
|
|
7
|
+
import Eu_ES from "./Eu_ES";
|
|
8
|
+
import Fr_FR from "./Fr_FR";
|
|
9
|
+
import It_IT from "./It_IT";
|
|
10
|
+
import Pt_PT from "./Pt_PT";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Static registry of every flag. Replaces the dynamic `require()` this
|
|
14
|
+
* component used to do: a template-literal require only resolves through
|
|
15
|
+
* webpack's CommonJS context modules, so it breaks under ESM.
|
|
16
|
+
*
|
|
17
|
+
* When adding a flag, import it above and register it here.
|
|
18
|
+
*/
|
|
19
|
+
const flags: Record<string, ComponentType<any>> = {
|
|
20
|
+
Ca_ES,
|
|
21
|
+
De_DE,
|
|
22
|
+
En_GB,
|
|
23
|
+
Es_ES,
|
|
24
|
+
Eu_ES,
|
|
25
|
+
Fr_FR,
|
|
26
|
+
It_IT,
|
|
27
|
+
Pt_PT,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default flags;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
+
import flags from "./components";
|
|
4
|
+
|
|
3
5
|
const getImage = (name: string) => {
|
|
4
6
|
const simpleIcons: any = {
|
|
5
7
|
es: "Es_ES",
|
|
@@ -11,11 +13,7 @@ const getImage = (name: string) => {
|
|
|
11
13
|
};
|
|
12
14
|
const filename = simpleIcons[name?.toLowerCase()] || name;
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
return require(`./components/${filename}`).default;
|
|
16
|
-
} catch (err) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
16
|
+
return flags[filename] ?? null;
|
|
19
17
|
};
|
|
20
18
|
const Flag = (props: IProps) => {
|
|
21
19
|
const name = props.name.charAt(0).toUpperCase() + props.name.slice(1);
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
|
|
3
|
+
import Active from "./Active";
|
|
4
|
+
import Add from "./Add";
|
|
5
|
+
import AddCircle from "./AddCircle";
|
|
6
|
+
import Alert from "./Alert";
|
|
7
|
+
import AlignLeft from "./AlignLeft";
|
|
8
|
+
import Back from "./Back";
|
|
9
|
+
import BulletList from "./BulletList";
|
|
10
|
+
import Button from "./Button";
|
|
11
|
+
import Calendar from "./Calendar";
|
|
12
|
+
import CancelEvent from "./CancelEvent";
|
|
13
|
+
import Category from "./Category";
|
|
14
|
+
import Change from "./Change";
|
|
15
|
+
import Close from "./Close";
|
|
16
|
+
import ClosePanel from "./ClosePanel";
|
|
17
|
+
import CodeBody from "./CodeBody";
|
|
18
|
+
import CodeHead from "./CodeHead";
|
|
19
|
+
import CodeHeadBody from "./CodeHeadBody";
|
|
20
|
+
import Collapsed from "./Collapsed";
|
|
21
|
+
import ColorPicker from "./ColorPicker";
|
|
22
|
+
import Compose from "./Compose";
|
|
23
|
+
import Copy from "./Copy";
|
|
24
|
+
import Copy2 from "./Copy2";
|
|
25
|
+
import Data from "./Data";
|
|
26
|
+
import DataAdd from "./DataAdd";
|
|
27
|
+
import Deactivate from "./Deactivate";
|
|
28
|
+
import Delete from "./Delete";
|
|
29
|
+
import Desktop from "./Desktop";
|
|
30
|
+
import Disabled from "./Disabled";
|
|
31
|
+
import Done from "./Done";
|
|
32
|
+
import DownArrow from "./DownArrow";
|
|
33
|
+
import Download from "./Download";
|
|
34
|
+
import Drag from "./Drag";
|
|
35
|
+
import Duplicate from "./Duplicate";
|
|
36
|
+
import Edit from "./Edit";
|
|
37
|
+
import Empty from "./Empty";
|
|
38
|
+
import EmptyCheck from "./EmptyCheck";
|
|
39
|
+
import Extend from "./Extend";
|
|
40
|
+
import File from "./File";
|
|
41
|
+
import Filter from "./Filter";
|
|
42
|
+
import Form from "./Form";
|
|
43
|
+
import FullArrowDown from "./FullArrowDown";
|
|
44
|
+
import FullArrowLeft from "./FullArrowLeft";
|
|
45
|
+
import FullArrowRight from "./FullArrowRight";
|
|
46
|
+
import FullArrowUp from "./FullArrowUp";
|
|
47
|
+
import Grid from "./Grid";
|
|
48
|
+
import Grid2 from "./Grid2";
|
|
49
|
+
import GriddoLogo from "./GriddoLogo";
|
|
50
|
+
import HeroCard from "./HeroCard";
|
|
51
|
+
import Hide from "./Hide";
|
|
52
|
+
import History from "./History";
|
|
53
|
+
import Home from "./Home";
|
|
54
|
+
import Ia from "./Ia";
|
|
55
|
+
import Image from "./Image";
|
|
56
|
+
import Info from "./Info";
|
|
57
|
+
import Laptop from "./Laptop";
|
|
58
|
+
import LeftArrow from "./LeftArrow";
|
|
59
|
+
import Link from "./Link";
|
|
60
|
+
import Lock from "./Lock";
|
|
61
|
+
import Log from "./Log";
|
|
62
|
+
// Aliased: a binding named `Map` would shadow the global.
|
|
63
|
+
import MapIcon from "./Map";
|
|
64
|
+
import Menu from "./Menu";
|
|
65
|
+
import Microsoft from "./Microsoft";
|
|
66
|
+
import Modified from "./Modified";
|
|
67
|
+
import Modules from "./Modules";
|
|
68
|
+
import More from "./More";
|
|
69
|
+
import NewFolder from "./NewFolder";
|
|
70
|
+
import Offline from "./Offline";
|
|
71
|
+
import OfflinePending from "./OfflinePending";
|
|
72
|
+
import OpenOutside from "./OpenOutside";
|
|
73
|
+
import OpenPanel from "./OpenPanel";
|
|
74
|
+
import OutOfSection from "./OutOfSection";
|
|
75
|
+
import Page from "./Page";
|
|
76
|
+
import Party from "./Party";
|
|
77
|
+
import Paste from "./Paste";
|
|
78
|
+
import Phone from "./Phone";
|
|
79
|
+
import PhotoLibrary from "./PhotoLibrary";
|
|
80
|
+
import Power from "./Power";
|
|
81
|
+
import Preview from "./Preview";
|
|
82
|
+
import Project from "./Project";
|
|
83
|
+
import QrCode from "./QrCode";
|
|
84
|
+
import Question from "./Question";
|
|
85
|
+
import Refresh from "./Refresh";
|
|
86
|
+
import Republish from "./Republish";
|
|
87
|
+
import RightArrow from "./RightArrow";
|
|
88
|
+
import Scheduled from "./Scheduled";
|
|
89
|
+
import Search from "./Search";
|
|
90
|
+
import SendEmail from "./SendEmail";
|
|
91
|
+
import Settings from "./Settings";
|
|
92
|
+
import Share from "./Share";
|
|
93
|
+
import Subsection from "./Subsection";
|
|
94
|
+
import Success from "./Success";
|
|
95
|
+
import SuccessSolid from "./SuccessSolid";
|
|
96
|
+
import Sync from "./Sync";
|
|
97
|
+
import Tablet from "./Tablet";
|
|
98
|
+
import Translate from "./Translate";
|
|
99
|
+
import Unlink from "./Unlink";
|
|
100
|
+
import UpArrow from "./UpArrow";
|
|
101
|
+
import UploadFile from "./UploadFile";
|
|
102
|
+
import UploadPending from "./UploadPending";
|
|
103
|
+
import UrlLink from "./UrlLink";
|
|
104
|
+
import User from "./User";
|
|
105
|
+
import Users from "./Users";
|
|
106
|
+
import Video from "./Video";
|
|
107
|
+
import View from "./View";
|
|
108
|
+
import Warning from "./Warning";
|
|
109
|
+
import Web from "./Web";
|
|
110
|
+
import Working from "./Working";
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Static registry of every icon. Replaces the dynamic `require()` this
|
|
114
|
+
* component used to do: a template-literal require only resolves through
|
|
115
|
+
* webpack's CommonJS context modules, so it breaks under ESM.
|
|
116
|
+
*
|
|
117
|
+
* When adding an icon, import it above and register it here.
|
|
118
|
+
*/
|
|
119
|
+
const icons: Record<string, ComponentType<any>> = {
|
|
120
|
+
Active,
|
|
121
|
+
Add,
|
|
122
|
+
AddCircle,
|
|
123
|
+
Alert,
|
|
124
|
+
AlignLeft,
|
|
125
|
+
Back,
|
|
126
|
+
BulletList,
|
|
127
|
+
Button,
|
|
128
|
+
Calendar,
|
|
129
|
+
CancelEvent,
|
|
130
|
+
Category,
|
|
131
|
+
Change,
|
|
132
|
+
Close,
|
|
133
|
+
ClosePanel,
|
|
134
|
+
CodeBody,
|
|
135
|
+
CodeHead,
|
|
136
|
+
CodeHeadBody,
|
|
137
|
+
Collapsed,
|
|
138
|
+
ColorPicker,
|
|
139
|
+
Compose,
|
|
140
|
+
Copy,
|
|
141
|
+
Copy2,
|
|
142
|
+
Data,
|
|
143
|
+
DataAdd,
|
|
144
|
+
Deactivate,
|
|
145
|
+
Delete,
|
|
146
|
+
Desktop,
|
|
147
|
+
Disabled,
|
|
148
|
+
Done,
|
|
149
|
+
DownArrow,
|
|
150
|
+
Download,
|
|
151
|
+
Drag,
|
|
152
|
+
Duplicate,
|
|
153
|
+
Edit,
|
|
154
|
+
Empty,
|
|
155
|
+
EmptyCheck,
|
|
156
|
+
Extend,
|
|
157
|
+
File,
|
|
158
|
+
Filter,
|
|
159
|
+
Form,
|
|
160
|
+
FullArrowDown,
|
|
161
|
+
FullArrowLeft,
|
|
162
|
+
FullArrowRight,
|
|
163
|
+
FullArrowUp,
|
|
164
|
+
Grid,
|
|
165
|
+
Grid2,
|
|
166
|
+
GriddoLogo,
|
|
167
|
+
HeroCard,
|
|
168
|
+
Hide,
|
|
169
|
+
History,
|
|
170
|
+
Home,
|
|
171
|
+
Ia,
|
|
172
|
+
Image,
|
|
173
|
+
Info,
|
|
174
|
+
Laptop,
|
|
175
|
+
LeftArrow,
|
|
176
|
+
Link,
|
|
177
|
+
Lock,
|
|
178
|
+
Log,
|
|
179
|
+
Map: MapIcon,
|
|
180
|
+
Menu,
|
|
181
|
+
Microsoft,
|
|
182
|
+
Modified,
|
|
183
|
+
Modules,
|
|
184
|
+
More,
|
|
185
|
+
NewFolder,
|
|
186
|
+
Offline,
|
|
187
|
+
OfflinePending,
|
|
188
|
+
OpenOutside,
|
|
189
|
+
OpenPanel,
|
|
190
|
+
OutOfSection,
|
|
191
|
+
Page,
|
|
192
|
+
Party,
|
|
193
|
+
Paste,
|
|
194
|
+
Phone,
|
|
195
|
+
PhotoLibrary,
|
|
196
|
+
Power,
|
|
197
|
+
Preview,
|
|
198
|
+
Project,
|
|
199
|
+
QrCode,
|
|
200
|
+
Question,
|
|
201
|
+
Refresh,
|
|
202
|
+
Republish,
|
|
203
|
+
RightArrow,
|
|
204
|
+
Scheduled,
|
|
205
|
+
Search,
|
|
206
|
+
SendEmail,
|
|
207
|
+
Settings,
|
|
208
|
+
Share,
|
|
209
|
+
Subsection,
|
|
210
|
+
Success,
|
|
211
|
+
SuccessSolid,
|
|
212
|
+
Sync,
|
|
213
|
+
Tablet,
|
|
214
|
+
Translate,
|
|
215
|
+
Unlink,
|
|
216
|
+
UpArrow,
|
|
217
|
+
UploadFile,
|
|
218
|
+
UploadPending,
|
|
219
|
+
UrlLink,
|
|
220
|
+
User,
|
|
221
|
+
Users,
|
|
222
|
+
Video,
|
|
223
|
+
View,
|
|
224
|
+
Warning,
|
|
225
|
+
Web,
|
|
226
|
+
Working,
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export default icons;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} catch (_err) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
};
|
|
1
|
+
import icons from "./components";
|
|
2
|
+
|
|
3
|
+
const getImage = (name: string) => icons[name] ?? null;
|
|
8
4
|
|
|
9
5
|
const Icon = (props: IProps) => {
|
|
10
6
|
const name = props.name
|
package/src/constants/index.ts
CHANGED
|
@@ -25,7 +25,7 @@ const itemLabel = {
|
|
|
25
25
|
type ItemLabel = ValueOf<typeof itemLabel>;
|
|
26
26
|
|
|
27
27
|
const VALID_IMAGE_FORMATS = ["jpeg", "jpg", "png", "svg", "gif", "webp"];
|
|
28
|
-
const VALID_DOCUMENT_FORMATS = ["pdf", "doc", "docx", "xls", "xlsx", "zip", "csv", "txt"];
|
|
28
|
+
const VALID_DOCUMENT_FORMATS = ["pdf", "doc", "docx", "xls", "xlsx", "zip", "csv", "txt", "md"];
|
|
29
29
|
const VALID_VIDEO_FORMATS = ["mov", "mp4", "wmv", "avi", "webm", "mkv"];
|
|
30
30
|
const VALID_FILE_FORMATS = [...VALID_DOCUMENT_FORMATS, ...VALID_VIDEO_FORMATS];
|
|
31
31
|
|