diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..c1f56de865 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json @@ -0,0 +1,14 @@ +{ + "culture": "en-GB", + "texts": { + "Account": "ABP Account - Login & Register | ABP.IO", + "Welcome": "Welcome", + "UseOneOfTheFollowingLinksToContinue": "Use one of the following links to continue", + "FrameworkHomePage": "Framework home page", + "FrameworkDocumentation": "Framework documentation", + "OfficialBlog": "Official blog", + "CommercialHomePage": "Commercial home page", + "CommercialSupportWebSite": "Commercial support web site", + "CommunityWebSite": "ABP community web site" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..970e04d24e --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en-GB.json @@ -0,0 +1,202 @@ +{ + "culture": "en-GB", + "texts": { + "Permission:Organizations": "Organisations", + "Permission:Manage": "Manage Organisations", + "Permission:DiscountRequests": "Discount Requests", + "Permission:DiscountManage": "Manage Discount Requests", + "Permission:Disable": "Disable", + "Permission:Enable": "Enable", + "Permission:EnableSendEmail": "Enable Send Email", + "Permission:SendEmail": "Send Email", + "Permission:NpmPackages": "NPM Packages", + "Permission:NugetPackages": "Nuget Packages", + "Permission:Maintenance": "Maintenance", + "Permission:Maintain": "Maintain", + "Permission:ClearCaches": "Clear caches", + "Permission:Modules": "Modules", + "Permission:Packages": "Packages", + "Permission:Edit": "Edit", + "Permission:Delete": "Delete", + "Permission:Create": "Create", + "Permission:Accounting": "Accounting", + "Permission:Accounting:Quotation": "Quotation", + "Permission:Accounting:Invoice": "Invoice", + "Menu:Organizations": "Organisations", + "Menu:Accounting": "Accounting", + "Menu:Packages": "Packages", + "Menu:DiscountRequests": "Discount Requests", + "NpmPackageDeletionWarningMessage": "This NPM Package will be deleted. Please confirm this?", + "NugetPackageDeletionWarningMessage": "This Nuget Package will be deleted. Please confirm this?", + "ModuleDeletionWarningMessage": "This Module will be deleted. Please confirm this?", + "Name": "Name", + "DisplayName": "Display name", + "ShortDescription": "Short description", + "NameFilter": "Name", + "CreationTime": "Creation time", + "IsPro": "Is pro", + "ShowOnModuleList": "Show in module list", + "EfCoreConfigureMethodName": "Configure method name", + "IsProFilter": "Is pro", + "ApplicationType": "Application type", + "Target": "Target", + "TargetFilter": "Target", + "ModuleClass": "Module class", + "NugetPackageTarget.DomainShared": "Domain Shared", + "NugetPackageTarget.Domain": "Domain", + "NugetPackageTarget.Application": "Application", + "NugetPackageTarget.ApplicationContracts": "Application Contracts", + "NugetPackageTarget.HttpApi": "Http Api", + "NugetPackageTarget.HttpApiClient": "Http Api Client", + "NugetPackageTarget.Web": "Web", + "NugetPackageTarget.EntityFrameworkCore": "Delete Entity Framework Core", + "NugetPackageTarget.MongoDB": "MongoDB", + "Edit": "Edit", + "Delete": "Delete", + "Refresh": "Refresh", + "NpmPackages": "NPM Packages", + "NugetPackages": "Nuget Packages", + "NpmPackageCount": "NPM Package Count", + "NugetPackageCount": "Nuget Package Count", + "Module": "Modules", + "ModuleInfo": "Module info", + "CreateANpmPackage": "Create a NPM package", + "CreateAModule": "Create a module", + "CreateANugetPackage": "Create a Nuget package", + "AddNew": "Add new", + "PackageAlreadyExist{0}": "\"{0}\" package has already been added.", + "ModuleAlreadyExist{0}": "\"{0}\" module has already been added.", + "ClearCache": "Clear cache", + "SuccessfullyCleared": "Successfully cleared", + "Menu:NpmPackages": "NPM Packages", + "Menu:Modules": "Modules", + "Menu:Maintenance": "Maintenance", + "Menu:NugetPackages": "Nuget Packages", + "CreateAnOrganization": "Create an organisation", + "Organizations": "Organisations", + "LongName": "Long name", + "LicenseType": "License type", + "MissingLicenseTypeField": "The license type field is required!", + "LicenseStartTime": "License start time", + "LicenseEndTime": "License end time", + "AllowedDeveloperCount": "Allowed developer count", + "UserNameOrEmailAddress": "Username or email address", + "AddOwner": "Add owner", + "UserName": "Username", + "Email": "Email", + "Developers": "Developers", + "AddDeveloper": "Add developer", + "Create": "Create", + "UserNotFound": "User not found", + "{0}WillBeRemovedFromDevelopers": "{0} Will be removed from developers, please confirm?", + "{0}WillBeRemovedFromOwners": "{0} Will be removed from owners, please confirm?", + "Computers": "Computers", + "UniqueComputerId": "Unique computer id", + "LastSeenDate": "Last seen date", + "{0}Computer{1}WillBeRemovedFromRecords": "Computer of {0} ({1}) will be removed from records", + "OrganizationDeletionWarningMessage": "Organisation will be deleted", + "DeletingLastOwnerWarningMessage": "An organisation must have at least one owner, therefore you cannot remove this owner", + "This{0}AlreadyExistInThisOrganization": "{0} already exist in this organisation", + "AreYouSureYouWantToDeleteAllComputers": "Are you sure you want to delete all computers?", + "DeleteAll": "Delete all", + "DoYouWantToCreateNewUser": "Do you want to create new user?", + "MasterModules": "Master Modules", + "OrganizationName": "Organisation name", + "CreationDate": "Creation date", + "LicenseStartDate": "License start date", + "LicenseEndDate": "License end date", + "OrganizationNamePlaceholder": "Organisation name...", + "TotalQuestionCountPlaceholder": "Total question count...", + "RemainingQuestionCountPlaceholder": "Remaining question count...", + "LicenseTypePlaceholder": "License type...", + "CreationDatePlaceholder": "Creation date...", + "LicenseStartDatePlaceholder": "License start date...", + "LicenseEndDatePlaceholder": "License end date...", + "UsernameOrEmail": "Username or email", + "UsernameOrEmailPlaceholder": "Username or email...", + "Member": "Member", + "PurchaseOrderNo": "Purchase Order No.", + "QuotationDate": "Quotation date", + "CompanyName": "Company name", + "CompanyAddress": "Company address", + "Price": "Price", + "DiscountText": "Discount text", + "DiscountQuantity": "Discount quantity", + "DiscountPrice": "Discount price", + "Quotation": "Quotation", + "ExtraText": "Extra text", + "ExtraAmount": "Extra Amount", + "DownloadQuotation": "Download Quotation", + "Invoice": "Invoice", + "TaxNumber": "Tax No.", + "InvoiceNumber": "Invoice No.", + "InvoiceDate": "Invoice Date", + "InvoiceNote": "Invoice Note", + "Quantity": "Quantity", + "AddProduct": "Add Product", + "AddProductWarning": "You need to add a Product!", + "TotalPrice": "Total Price", + "Generate": "Generate", + "MissingQuantityField": "The Quantity field is required!", + "MissingPriceField": "The Price field is required!", + "CodeUsageStatus": "Status", + "Country": "Country", + "DeveloperCount": "Developer Count", + "RequestCode": "Request Code", + "WebSite": "Website", + "GithubUsername": "Github Username", + "PhoneNumber": "Phone Number", + "ProjectDescription": "Project Description", + "Referrer": "Referrer", + "DiscountRequests": "Discount Request", + "Copylink": "Copy Link", + "Disable": "Disable", + "Enable": "Enable", + "EnableSendEmail": "Enable Send Email", + "SendEmail": "Send Email", + "SuccessfullyDisabled": "Successfully disabled", + "SuccessfullyEnabled": "Successfully enabled", + "EmailSent": "Email sent", + "SuccessfullySent": "Successfully sent", + "SuccessfullyDeleted": "Successfully deleted", + "DiscountRequestDeletionWarningMessage": "Discount request will be deleted", + "BusinessType": "Business Type", + "TotalQuestionCount": "Total question count", + "RemainingQuestionCount": "Remaining question count", + "TotalQuestionMustBeGreaterWarningMessage": "TotalQuestionCount must be greater than RemainingQuestionCount!", + "QuestionCountsMustBeGreaterThanZero": "TotalQuestionCount and RemainingQuestionCount must be zero or greater than zero!", + "UnlimitedQuestionCount": "Unlimited question count", + "Notes": "Notes", + "Menu:Community": "Community", + "Menu:Articles": "Articles", + "Wait": "Wait", + "Approve": "Approve", + "Reject": "Reject", + "Details": "Details", + "Url": "Url", + "Title": "Title", + "ContentSource": "Content source", + "Status": "Status", + "ReadArticle": "Read article", + "ArticleHasBeenWaiting": "Article has been waiting", + "ArticleHasBeenApproved": "Article has been approved", + "ArticleHasBeenRejected": "Article has been rejected", + "Permission:Community": "Community", + "Permission:CommunityArticle": "Article", + "Link": "Link", + "Enum:ContentSource:0": "Github", + "Enum:ContentSource:1": "External", + "Enum:Status:0": "Waiting", + "Enum:Status:1": "Author name", + "Enum:Status:2": "Approved", + "Summary": "Summary", + "AuthorName": "Author", + "CoverImage": "Cover Image", + "RemoveCacheConfirmationMessage": "Are you sure you want remove the cache for \"{0}\" article?", + "SuccessfullyRemoved": "Successfully cleared", + "RemoveCache": "Remove Cache", + "Language": "Language", + "Optional": "Optional", + "CreateArticleLanguageInfo": "The language in which the article is written" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..235a7c61d0 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en-GB.json @@ -0,0 +1,35 @@ +{ + "culture": "en-GB", + "texts": { + "Volo.AbpIo.Domain:010004": "Maximum member count reached!", + "Volo.AbpIo.Domain:010005": "Maximum owner count reached!", + "Volo.AbpIo.Domain:010006": "This user is already an owner in this organisation!", + "Volo.AbpIo.Domain:010007": "This user is already a developer in this organisation!", + "Volo.AbpIo.Domain:010008": "Allowed Developer Count can not be less then current developer count!", + "Volo.AbpIo.Domain:010009": "Allowed Developer Count can not be less then 0!", + "Volo.AbpIo.Domain:010010": "Maximum mac address count has been exceeded!", + "Volo.AbpIo.Domain:010011": "Personal license can't have more than 1 developer!", + "Volo.AbpIo.Domain:010012": "License can't be extended one month after license expires!", + "Volo.AbpIo.Domain:020001": "Couldn't delete this NPM Package because \"{NugetPackages}\" Nuget Packages are dependent to this package.", + "Volo.AbpIo.Domain:020002": "Couldn't delete this NPM Package because \"{Modules}\" Modules are using this package.", + "Volo.AbpIo.Domain:020003": "Couldn't delete this NPM Package because \"{Modules}\" Modules are using this package and \"{NugetPackages}\" Nuget Packages are dependent to this package.", + "Volo.AbpIo.Domain:020004": "Couldn't delete this Nuget Package because \"{Modules}\" Modules are using this package.", + "WantToLearn?": "Want to learn?", + "ReadyToGetStarted?": "Ready to get started?", + "JoinOurCommunity": "Join our community", + "GetStartedUpper": "GET STARTED", + "ForkMeOnGitHub": "Fork me on GitHub", + "Features": "Features", + "GetStarted": "Get Started", + "Documents": "Documents", + "Community": "Community", + "ContributionGuide": "Contribution Guide", + "Blog": "Blog", + "Commercial": "Commercial", + "MyAccount": "My account", + "Permission:License": "License", + "Permission:UserInfo": "User info", + "SeeDocuments": "See Documents", + "Samples": "Samples" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..56f4ed934f --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en-GB.json @@ -0,0 +1,39 @@ +{ + "culture": "en-GB", + "texts": { + "OrganizationManagement": "Organisation Management", + "OrganizationList": "Organisation list", + "Volo.AbpIo.Commercial:010003": "You are not owner of this organisation!", + "OrganizationNotFoundMessage": "Organisation not found!", + "DeveloperCount": "Allocated / total developers", + "QuestionCount": "Remaining / total questions", + "Unlimited": "Unlimited", + "Owners": "Owners", + "AddMember": "Add member", + "AddOwner": "Add owner", + "AddDeveloper": "Add developer", + "UserName": "Username", + "Name": "Name", + "EmailAddress": "Email address", + "Developers": "Developers", + "LicenseType": "License type", + "Manage": "Manage", + "StartDate": "Start date", + "EndDate": "End date", + "Modules": "Modules", + "LicenseExtendMessage": "Your license end date is extended to {0}", + "LicenseUpgradeMessage": "Your license is upgraded to {0}", + "LicenseAddDeveloperMessage": "{0} developers added to your license", + "Volo.AbpIo.Commercial:010004": "Cannot find the specified user! The user must have already registered.", + "MyOrganizations": "My organisations", + "ApiKey": "API key", + "UserNameNotFound": "There is no user with username {0}", + "SuccessfullyAddedToNewsletter": "Thank you for subscribing to our newsletter!", + "MyProfile": "My Profile", + "EmailNotValid": "Please enter a valid email address.", + "JoinOurMarketingNewsletter": "Join our marketing newsletter", + "WouldLikeToReceiveMarketingMaterials": "I would like to receive marketing materials e.g. product deals & special offers.", + "StartUsingYourLicenseNow": "Start using your license now!", + "WelcomePage": "Welcome Page" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..652090d864 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en-GB.json @@ -0,0 +1,106 @@ +{ + "culture": "en-GB", + "texts": { + "Permission:CommunityArticle": "Community Article", + "Permission:Edit": "Edit", + "Waiting": "Waiting", + "Approved": "Approved", + "Rejected": "Rejected", + "Wait": "Wait", + "Approve": "Approve", + "Reject": "Reject", + "ReadArticle": "Read Article", + "Status": "Status", + "ContentSource": "Content Source", + "Details": "Details", + "Url": "Url", + "Title": "Title", + "CreationTime": "Creation time", + "Save": "Save", + "SameUrlAlreadyExist": "The Url already exists. If you want to add this article, you should change the url!", + "UrlIsNotValid": "Url is not valid.", + "UrlNotFound": "Url not found.", + "UrlContentNotFound": "Url content not found.", + "Summary": "Summary", + "MostRead": "Most Read", + "Latest": "Latest", + "ContributeAbpCommunity": "Contribute to the ABP Community", + "SubmitYourArticle": "Submit Your Article", + "ContributionGuide": "Contribution Guide", + "BugReport": "Bug Report", + "SeeAllArticles": "See All Articles", + "WelcomeToABPCommunity!": "Welcome to the ABP Community!", + "MyProfile": "My Profile", + "MyOrganizations": "My Organisations", + "EmailNotValid": "Please enter a valid email address.", + "FeatureRequest": "Feature Request", + "CreateArticleTitleInfo": "Title of the article to be shown on the article list.", + "CreateArticleUrlInfo": "Original GitHub/External URL of the article.", + "CreateArticleSummaryInfo": "A short summary of the article to be shown on the article list.", + "CreateArticleCoverInfo": "To create an effective article, add a cover photo and an upload 16:9 aspect ratio pictures for the best view (Maximum file size: 1MB)", + "ThisExtensionIsNotAllowed": "The extension is not allowed.", + "TheFileIsTooLarge": "The file is too large.", + "GoToTheArticle": "Go to the Article", + "Contribute": "Contribute", + "OverallProgress": "Overall Progress", + "Done": "Done", + "Open": "Open", + "Closed": "Closed", + "LatestQuestionOnThe": "Latest Question on the", + "Stackoverflow": "Stackoverflow", + "Votes": "votes", + "Answer": "Answer", + "Views": "views", + "Answered": "Answered", + "WaitingForYourAnswer": "Waiting for your answer", + "Asked": "asked", + "AllQuestions": "All Questions", + "NextVersion": "Next Version", + "MilestoneErrorMessage": "Couldn't get the current milestone details from Github.", + "QuestionItemErrorMessage": "Couldn't get the latest question details from Stackoverflow.", + "Oops": "Oops!", + "CreateArticleSuccessMessage": "The Article has been successfully submitted. It will be published once it has been reviewed by the site admin.", + "ChooseCoverImage": "Choose a cover image...", + "CoverImage": "Cover Image", + "ShareYourExperiencesWithTheABPFramework": "Share your experiences with the ABP Framework!", + "Optional": "Optional", + "UpdateUserWebSiteInfo": "Example: https://johndoe.com", + "UpdateUserTwitterInfo": "Example: johndoe", + "UpdateUserGithubInfo": "Example: johndoe", + "UpdateUserLinkedinInfo": "Example: https://www.linkedin.com/...", + "UpdateUserCompanyInfo": "Example: Volosoft", + "UpdateUserJobTitleInfo": "Example: Software Developer", + "UserName": "UserName", + "Company": "Company", + "PersonalWebsite": "Personal website", + "RegistrationDate": "Registration date", + "Social": "Social", + "Biography": "Biography", + "HasNoPublishedArticlesYet": "has no published articles yet", + "Author": "Author", + "LatestGithubAnnouncements": "Latest GitHub Announcements", + "SeeAllAnnouncements": "View all Announcements", + "LatestBlogPost": "Latest Blog Post", + "Edit": "Edit", + "ProfileImageChange": "Change the profile image", + "BlogItemErrorMessage": "Couldn't get the latest blog post details from ABP.", + "PlannedReleaseDate": "Planned release date", + "CommunityArticleRequestErrorMessage": "Couldn't get the latest article request from GitHub.", + "ArticleRequestFromGithubIssue": "There aren't any article requests at the moment.", + "LatestArticles": "Latest Articles", + "ArticleRequests": "Article Requests", + "AllArticleRequests": "See all Article requests", + "SubscribeToTheNewsletter": "Subscribe to the Newsletter", + "NewsletterEmailDefinition": "Receive information about what's happening in ABP; new releases, free sources, articles, and more.", + "NoThanks": "No thanks", + "MaybeLater": "Maybe later", + "JoinOurArticleNewsletter": "Join our article newsletter", + "Community": "Community", + "Marketing": "Marketing", + "CommunityPrivacyPolicyConfirmation": "I agree to the Terms & Conditions and Privacy Policy.", + "ArticleRequestMessageTitle": "Open an issue on the GitHub to request an article/tutorial you want to see on this web site.", + "ArticleRequestMessageBody": "Here is the list of the requested articles by the Community. Do you want to write a requested article? Please click on the request and join the discussion.", + "Language": "Language", + "CreateArticleLanguageInfo": "The language in which the article is written" + } +} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..2b8978af21 --- /dev/null +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json @@ -0,0 +1,197 @@ +{ + "culture": "en-GB", + "texts": { + "GetStarted": "Get Started - Startup Templates", + "Create": "Create", + "NewProject": "New Project", + "DirectDownload": "Direct Download", + "ProjectName": "Project name", + "ProjectType": "Project type", + "DatabaseProvider": "Database provider", + "NTier": "N-Tier", + "IncludeUserInterface": "Include user interface", + "CreateNow": "Create now", + "TheStartupProject": "The startup project", + "Tutorial": "Tutorial", + "UsingCLI": "Using CLI", + "SeeDetails": "See Details", + "AbpShortDescription": "ABP Framework is a complete infrastructure to create modern web applications by following the software development best practices and conventions.", + "SourceCodeUpper": "SOURCE CODE", + "LatestReleaseLogs": "Latest release logs", + "Infrastructure": "Infrastructure", + "Architecture": "Architecture", + "Modular": "Modular", + "DontRepeatYourself": "Don’t Repeat Yourself", + "DeveloperFocused": "Developer Focused", + "FullStackApplicationInfrastructure": "Full stack application infrastructure.", + "DomainDrivenDesign": "Domain Driven Design", + "DomainDrivenDesignExplanation": "Designed and developed based on DDD patterns and principles. Provides a layered model for your application.", + "Authorization": "Authorisation", + "AuthorizationExplanation": "Advanced authorisation with user, role and fine-grained permission system. Built on the Microsoft Identity library.", + "MultiTenancy": "Multi-Tenancy", + "MultiTenancyExplanationShort": "SaaS applications made easy! Integrated multi-tenancy from database to UI.", + "CrossCuttingConcerns": "Cross Cutting Concerns", + "CrossCuttingConcernsExplanationShort": "Complete infrastructure for authorization, validation, exception handling, caching, audit logging, transaction management and more.", + "BuiltInBundlingMinification": "Built-In Bundling & Minification", + "BuiltInBundlingMinificationExplanation": "No need to use external tools for bundling & minification. ABP offers a simpler, dynamic, powerful, modular and built-in way!", + "VirtualFileSystem": "Virtual File System", + "VirtualFileSystemExplanation": "Embed views, scripts, styles, images... into packages/libraries and reuse them in different applications.", + "Theming": "Theming", + "ThemingExplanationShort": "Use and customise the bootstrap-based standard UI theme or create your own.", + "BootstrapTagHelpersDynamicForms": "Bootstrap Tag Helpers & Dynamic Forms", + "BootstrapTagHelpersDynamicFormsExplanation": "Instead of manually writing bootstrap components, Use ABP's tag helpers to simplify and take advantage of intellisense. Quickly build UI forms based on a C# model using the dynamic form tag helper.", + "HTTPAPIsDynamicProxies": "HTTP APIs & Dynamic Proxies", + "HTTPAPIsDynamicProxiesExplanation": "Automatically expose application services as REST style HTTP APIs, and consume them with dynamic JavaScript and C# proxies.", + "CompleteArchitectureInfo": "Modern architecture to create maintainable software solutions.", + "DomainDrivenDesignBasedLayeringModelExplanation": "Helps you to implement a DDD based layered architecture and build a maintainable code base.", + "DomainDrivenDesignBasedLayeringModelExplanationCont": "Provides startup templates, abstractions, base classes, services, documentation and guides to help you to develop your application based on DDD patterns & principles.", + "MicroserviceCompatibleModelExplanation": "The core framework & pre-build modules are designed with microservice architecture in mind.", + "MicroserviceCompatibleModelExplanationCont": "Provides infrastructure, integrations, samples and documentation to implement microservice solutions easier, while it doesn’t bring additional complexity if you want a monolithic application.", + "ModularInfo": "ABP provides a module system that allows you to develop reusable application modules, tie into application lifecycle events, and express dependencies between core parts of your system.", + "PreBuiltModulesThemes": "Pre-Built Modules & Themes", + "PreBuiltModulesThemesExplanation": "Open source and commercial modules & themes are ready to use in your business application.", + "NuGetNPMPackages": "NuGet & NPM Packages", + "NuGetNPMPackagesExplanation": "Distributed as NuGet & NPM packages. Easy to install and upgrade.", + "ExtensibleReplaceable": "Extensible/Replaceable", + "ExtensibleReplaceableExplanation": "All services & modules are designed extensibility in mind. You can replace services, pages, styles and components.", + "CrossCuttingConcernsExplanation2": "Keep your codebase smaller so you can maintain focus on the code that’s specific to your business.", + "CrossCuttingConcernsExplanation3": "Don’t spend time implementing common application requirements on multiple projects.", + "AuthenticationAuthorization": "Authentication & Authorization", + "ExceptionHandling": "Exception Handling", + "Validation": "Validation", + "DatabaseConnection": "Database Connection", + "TransactionManagement": "Transaction management", + "AuditLogging": "Audit Logging", + "Caching": "Caching", + "Multitenancy": "Multitenancy", + "DataFiltering": "Data filtering", + "ConventionOverConfiguration": "Convention Over Configuration", + "ConventionOverConfigurationExplanation": "ABP implements common application conventions by default with a minimal or zero configuration.", + "ConventionOverConfigurationExplanationList1": "Auto registers known services to dependency injection.", + "ConventionOverConfigurationExplanationList2": "Exposes application services as HTTP APIs by naming conventions.", + "ConventionOverConfigurationExplanationList3": "Creates dynamic HTTP client proxies for C# and JavaScript.", + "ConventionOverConfigurationExplanationList4": "Provides default repositories for your entities.", + "ConventionOverConfigurationExplanationList5": "Manages Unit of Work per web request or application service method.", + "ConventionOverConfigurationExplanationList6": "Publishes create, update & delete events for your entities.", + "BaseClasses": "Base Classes", + "BaseClassesExplanation": "Pre-built base classes for common application patterns.", + "DeveloperFocusedExplanation": "ABP is for developers.", + "DeveloperFocusedExplanationCont": "It aims to simplify your daily software development while not restricting you from writing low level code.", + "SeeAllFeatures": "See All Features", + "CLI_CommandLineInterface": "CLI (Command Line Interface)", + "CLI_CommandLineInterfaceExplanation": "Includes a CLI to help you automate the creation of new projects and the addition of new modules.", + "StartupTemplates": "Startup Templates", + "StartupTemplatesExplanation": "Various startup templates provide a fully configured solution to jump start your development.", + "BasedOnFamiliarTools": "Based on Familiar Tools", + "BasedOnFamiliarToolsExplanation": "Built and integrated with popular tools you already know. Low learning curve, easy adaptation, comfortable development.", + "ORMIndependent": "ORM Independent", + "ORMIndependentExplanation": "The core framework is ORM/database independent and can work with any data source. Entity Framework Core and MongoDB providers are already available.", + "Features": "Explore the ABP Framework Features", + "ABPCLI": "ABP CLI", + "Modularity": "Modularity", + "BootstrapTagHelpers": "Bootstrap Tag Helpers", + "DynamicForms": "Dynamic Forms", + "BundlingMinification": "Bundling & Minification", + "BackgroundJobs": "Background Jobs", + "BackgroundJobsExplanation": "Define simple classes to execute jobs in the background as queued. Use the built-in job manager or integrate your own. Hangfire & RabbitMQ integrations are already available.", + "DDDInfrastructure": "DDD Infrastructure", + "DomainDrivenDesignInfrastructure": "Domain Driven Design Infrastructure", + "AutoRESTAPIs": "Auto REST APIs", + "DynamicClientProxies": "Dynamic Client Proxies", + "DistributedEventBus": "Distributed Event Bus", + "DistributedEventBusWithRabbitMQIntegration": "Distributed Event Bus with RabbitMQ Integration", + "TestInfrastructure": "Test Infrastructure", + "AuditLoggingEntityHistories": "Audit Logging & Entity Histories", + "ObjectToObjectMapping": "Object to Object Mapping", + "ObjectToObjectMappingExplanation": "Object to object mapping abstraction with AutoMapper integration.", + "EmailSMSAbstractions": "Email & SMS Abstractions", + "EmailSMSAbstractionsWithTemplatingSupport": "Email & SMS Abstractions with Templating Support", + "Localization": "Localization", + "SettingManagement": "Setting Management", + "ExtensionMethods": "Extension Methods", + "ExtensionMethodsHelpers": "Extension Methods & Helpers", + "AspectOrientedProgramming": "Aspect Oriented Programming", + "DependencyInjection": "Dependency Injection", + "DependencyInjectionByConventions": "Dependency Injection by Conventions", + "ABPCLIExplanation": "The ABP CLI (Command Line Interface) is a command line tool to perform common operations for ABP based solutions.", + "ModularityExplanation": "ABP provides a complete infrastructure to build your own application modules those may have entities, services, database integration, APIs, UI components and so on.", + "MultiTenancyExplanation": "ABP framework not only supports to develop multi-tenant applications, but also makes your code mostly unaware of the multi-tenancy.", + "MultiTenancyExplanation2": "Can automatically determine the current Tenant and isolate each Tenant's data from each other.", + "MultiTenancyExplanation3": "Supports single database, database per tenant and hybrid approaches.", + "MultiTenancyExplanation4": "You focus on your business code and let the framework to handle multi-tenancy on behalf of you.", + "BootstrapTagHelpersExplanation": "Instead of manually writing the repeating details of bootstrap components, use ABP's tag helpers to simplify and take advantage of intellisense. You can use Bootstrap whenever you need it.", + "DynamicFormsExplanation": "Dynamic form & input tag helpers can create the complete form from a C# class as the model.", + "AuthenticationAuthorizationExplanation": "Rich authentication & authorization options integrated to ASP.NET Core Identity & IdentityServer4. Provides an extensible & detailed permission system.", + "CrossCuttingConcernsExplanation": "Don't repeat yourself when implementing common features. Instead, focus on your business logic and let ABP automate by convention.", + "DatabaseConnectionTransactionManagement": "Database Connection & Transaction Management", + "CorrelationIdTracking": "Correlation-Id Tracking", + "BundlingMinificationExplanation": "ABP offers a simple, dynamic, powerful, modular and built-in bundling & minification system.", + "VirtualFileSystemnExplanation": "The Virtual File System makes it possible to manage files those do not physically exist on the file system (disk). It's mainly used to embed (js, css, image, cshtml...) files into assemblies and use them like physical files on runtime.", + "ThemingExplanation": "Theming system allows to develop your application & modules theme independent by defining a set of common base libraries and layouts, based on the latest Bootstrap framework.", + "DomainDrivenDesignInfrastructureExplanation": "A complete infrastructure to build layered applications based on the Domain Driven Design patterns & principles.", + "Specification": "Specification", + "Repository": "Repository", + "DomainService": "Domain Service", + "ValueObject": "Value Object", + "ApplicationService": "Application Service", + "DataTransferObject": "Data Transfer Object", + "AggregateRootEntity": "Aggregate Root, Entity", + "AutoRESTAPIsExplanation": "ABP can automagically configure your application services as API Controllers by convention.", + "DynamicClientProxiesExplanation": "Easily consume your APIs from JavaScript and C# clients.", + "DistributedEventBusWithRabbitMQIntegrationExplanation": "Easily publish & consume distributed events using built-in Distributed Event Bus with RabbitMQ integration available.", + "TestInfrastructureExplanation": "The framework has been developed unit & integration testing in mind. Provides you base classes to make it easier. Startup templates come with pre-configured for testing.", + "AuditLoggingEntityHistoriesExplanation": "Built-in audit logging for business-critical applications. Request, service, method level audit logging and entity histories with property-level details.", + "EmailSMSAbstractionsWithTemplatingSupportExplanation": "IEmailSender and ISmsSender abstractions decouples your application logic from the infrastructure. Advanced email template system allows to create & localize email templates and easily use whenever needed.", + "LocalizationExplanation": "Localization system allows to create resources in plain JSON files and use them to localize your UI. It supports advanced scenarios like inheritance, extensions and JavaScript integration while it is fully compatible with AspNet Core's localization system.", + "SettingManagementExplanation": "Define settings for your application and get values on runtime based on the current configuration, tenant and user.", + "ExtensionMethodsHelpersExplanation": "Don't repeat yourself even for trivial code parts. Extensions & helpers for standard types makes your code much cleaner and easy to write.", + "AspectOrientedProgrammingExplanation": "Provides a comfortable infrastructure to create dynamic proxies and implement Aspect Oriented Programming. Intercept any class and execute your code before & after every method execution.", + "DependencyInjectionByConventionsExplanation": "No need to register your classes to dependency injection manually. Automatically registers common service types by convention. For other type of services, you can use interfaces and attributes to make it easier and in-place.", + "DataFilteringExplanation": "Define and use data filters those are automatically applied when you query entities from database. Soft Delete & Multi-Tenant filters are provided out of the box when you implement simple interfaces.", + "PublishEvents": "Publish Events", + "HandleEvents": "Handle Events", + "AndMore": "and more...", + "Code": "Code", + "Result": "Result", + "SeeTheDocumentForMoreInformation": "See the {0} document for more information", + "IndexPageHeroSection": "open sourceWeb Application
Framework
for asp.net core", + "UiFramework": "UI Framework", + "EmailAddress": "Email address", + "Mobile": "Mobile", + "ReactNative": "React Native", + "Strong": "Strong", + "Complete": "Complete", + "BasedLayeringModel": "Based Layering Model", + "Microservice": "Microservice", + "Compatible": "Compatible", + "MeeTTheABPCommunityInfo": "Our mission is to create an environment where developers can help each other with articles, tutorials, case studies, etc. and meet like-minded people.", + "JoinTheABPCommunityInfo": "Get involved with a vibrant community and become a contributor to the ABP Framework!", + "AllArticles": "All Articles", + "SubmitYourArticle": "Submit Your Article", + "DynamicClientProxyDocument": "See the dynamic client proxy documentations for JavaScript & C#.", + "EmailSMSAbstractionsDocument": "See the emailing and SMS sending documents for more information.", + "CreateProjectWizard": "This wizard creates a new project from the startup template which is properly configured to jump start to your project.", + "TieredOption": "Creates a tiered solution where Web and Http API layers are physically separated. If not checked, creates a layered solution which is less complex and suitable for most scenarios.", + "SeparateIdentityServerOption": "Separates server side into two applications: First one is for the identity server and the second one is for your server side HTTP API.", + "UseslatestPreVersion": "Uses latest pre-release version", + "ReadTheDocumentation": "ReadThe Documentation", + "Documentation": "Documentation", + "GettingStartedTutorial": "Getting Started Tutorial", + "ApplicationDevelopmentTutorial": "Application Development Tutorial", + "TheStartupTemplate": "The Startup Template", + "InstallABPCLIInfo": "ABP CLI is the fastest way to start a new solution with the ABP framework. Install the ABP CLI using a command line window:", + "DifferentLevelOfNamespaces": "You can use different level of namespaces; e.g. BookStore, Acme.BookStore or Acme.Retail.BookStore.", + "ABPCLIExamplesInfo": "new command creates a layered MVC application with Entity Framework Core as the database provider. However, it has additional options. Examples:", + "SeeCliDocumentForMoreInformation": "See the ABP CLI document for more options or select the \"Direct Download\" tab above.", + "Optional": "Optional", + "LocalFrameworkRef": "Keep local project reference for the framework packages.", + "BlobStoring": "BLOB Storing", + "BlobStoringExplanation": "BLOB Storing system provides an abstraction to work with BLOBs. ABP provides some pre-built storage provider integrations (Azure, AWS, File System, Database, etc.) that you can easily use in your applications.", + "TextTemplating": "Text Templating", + "TextTemplatingExplanation": "Text templating is used to dynamically render contents based on a template and a model (a data object). For example, you can use it to create dynamic email contents with a pre-built template.", + "MultipleUIOptions": "Multiple UI Options", + "MultipleDBOptions": "Multiple Database Providers", + "MultipleUIOptionsExplanation": "The core framework is designed as UI independent and can work with any type of UI system, while there are multiple pre-built and integrated options are provided out of the box.", + "MultipleDBOptionsExplanation": "The framework can work with any data source, while the following providers are officially developed and supported:" + } +} \ No newline at end of file diff --git a/docs/en/Background-Workers.md b/docs/en/Background-Workers.md index 2e1b9d2a90..8225aac2a6 100644 --- a/docs/en/Background-Workers.md +++ b/docs/en/Background-Workers.md @@ -80,7 +80,7 @@ public class PassiveUserCheckerWorker : AsyncPeriodicBackgroundWorkerBase ## Register Background Worker -After creating a background worker class, you should to add it to the `IBackgroundWorkerManager`. The most common place is the `OnApplicationInitialization` method of your module class: +After creating a background worker class, you should add it to the `IBackgroundWorkerManager`. The most common place is the `OnApplicationInitialization` method of your module class: ````csharp [DependsOn(typeof(AbpBackgroundWorkersModule))] @@ -137,4 +137,4 @@ ABP Framework's background worker system is good to implement periodic tasks. Ho ## See Also * [Quartz Integration for the background workers](Background-Workers-Quartz.md) -* [Background Jobs](Background-Jobs.md) \ No newline at end of file +* [Background Jobs](Background-Jobs.md) diff --git a/docs/en/Blob-Storing-Aliyun.md b/docs/en/Blob-Storing-Aliyun.md index 62e57e58c7..6cdebb3acc 100644 --- a/docs/en/Blob-Storing-Aliyun.md +++ b/docs/en/Blob-Storing-Aliyun.md @@ -55,7 +55,7 @@ Configure(options => * **RoleSessionName** ([NotNull]string): Used to identify the temporary access credentials, it is recommended to use different application users to distinguish. * **Policy** (string): Additional permission restrictions. See the [document](https://help.aliyun.com/document_detail/100680.html) for details. * **DurationSeconds** (int): Validity period(s) of a temporary access certificate,minimum is 900 and the maximum is 3600. -* **ContainerName** (string): You can specify the container name in Aliyun. If this is not specified, it uses the name of the BLOB container defined with the `BlogContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)). Please note that Aliyun has some **rules for naming containers**. A container name must be a valid DNS name, conforming to the [following naming rules](https://help.aliyun.com/knowledge_detail/39668.html): +* **ContainerName** (string): You can specify the container name in Aliyun. If this is not specified, it uses the name of the BLOB container defined with the `BlobContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)). Please note that Aliyun has some **rules for naming containers**. A container name must be a valid DNS name, conforming to the [following naming rules](https://help.aliyun.com/knowledge_detail/39668.html): * Container names must start or end with a letter or number, and can contain only letters, numbers, and the dash (-) character. * Container names Must start and end with lowercase letters and numbers. * Container names must be from **3** through **63** characters long. diff --git a/docs/en/Blob-Storing-Aws.md b/docs/en/Blob-Storing-Aws.md index cfee5c3f57..05e3caa183 100644 --- a/docs/en/Blob-Storing-Aws.md +++ b/docs/en/Blob-Storing-Aws.md @@ -60,7 +60,7 @@ Configure(options => * **Region** (string): The system name of the service. * **Policy** (string): An IAM policy in JSON format that you want to use as an inline session policy. * **DurationSeconds** (int): Validity period(s) of a temporary access certificate,minimum is 900 and the maximum is 3600. **note**: Using subaccounts operated OSS,if the value is 0. -* **ContainerName** (string): You can specify the container name in Aws. If this is not specified, it uses the name of the BLOB container defined with the `BlogContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)). Please note that Aws has some **rules for naming containers**. A container name must be a valid DNS name, conforming to the [following naming rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html): +* **ContainerName** (string): You can specify the container name in Aws. If this is not specified, it uses the name of the BLOB container defined with the `BlobContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)). Please note that Aws has some **rules for naming containers**. A container name must be a valid DNS name, conforming to the [following naming rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html): * Bucket names must be between **3** and **63** characters long. * Bucket names can consist only of **lowercase** letters, numbers, dots (.), and hyphens (-). * Bucket names must begin and end with a letter or number. diff --git a/docs/en/Blob-Storing-Azure.md b/docs/en/Blob-Storing-Azure.md index 9d033013da..de6ed63152 100644 --- a/docs/en/Blob-Storing-Azure.md +++ b/docs/en/Blob-Storing-Azure.md @@ -40,7 +40,7 @@ Configure(options => ### Options * **ConnectionString** (string): A connection string includes the authorization information required for your application to access data in an Azure Storage account at runtime using Shared Key authorization. Please refer to Azure documentation: https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string -* **ContainerName** (string): You can specify the container name in azure. If this is not specified, it uses the name of the BLOB container defined with the `BlogContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)). Please note that Azure has some **rules for naming containers**. A container name must be a valid DNS name, conforming to the [following naming rules](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names): +* **ContainerName** (string): You can specify the container name in azure. If this is not specified, it uses the name of the BLOB container defined with the `BlobContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)). Please note that Azure has some **rules for naming containers**. A container name must be a valid DNS name, conforming to the [following naming rules](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names): * Container names must start or end with a letter or number, and can contain only letters, numbers, and the dash (-) character. * Every dash (-) character must be immediately preceded and followed by a letter or number; consecutive dashes are not permitted in container names. * All letters in a container name must be **lowercase**. diff --git a/docs/en/Blob-Storing-Minio.md b/docs/en/Blob-Storing-Minio.md index 505c6721b0..6e0d7626b7 100644 --- a/docs/en/Blob-Storing-Minio.md +++ b/docs/en/Blob-Storing-Minio.md @@ -43,7 +43,7 @@ Configure(options => * **EndPoint** (string): URL to object storage service. Please refer to MinIO Client SDK for .NET: https://docs.min.io/docs/dotnet-client-quickstart-guide.html * **AccessKey** (string): Access key is the user ID that uniquely identifies your account. * **SecretKey** (string): Secret key is the password to your account. -* **BucketName** (string): You can specify the bucket name in MinIO. If this is not specified, it uses the name of the BLOB container defined with the `BlogContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)).MinIO is the defacto standard for S3 compatibility, So MinIO has some **rules for naming bucket**. The [following rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html) apply for naming MinIO buckets: +* **BucketName** (string): You can specify the bucket name in MinIO. If this is not specified, it uses the name of the BLOB container defined with the `BlobContainerName` attribute (see the [BLOB storing document](Blob-Storing.md)).MinIO is the defacto standard for S3 compatibility, So MinIO has some **rules for naming bucket**. The [following rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html) apply for naming MinIO buckets: * Bucket names must be between **3** and **63** characters long. * Bucket names can consist only of **lowercase** letters, numbers, dots (.), and hyphens (-). * Bucket names must begin and end with a letter or number. diff --git a/docs/en/Blob-Storing.md b/docs/en/Blob-Storing.md index 63281a5ee6..a2d7a89e7a 100644 --- a/docs/en/Blob-Storing.md +++ b/docs/en/Blob-Storing.md @@ -21,7 +21,7 @@ The ABP Framework has already the following storage provider implementations; * [Azure](Blob-Storing-Azure.md): Stores BLOBs on the [Azure BLOB storage](https://azure.microsoft.com/en-us/services/storage/blobs/). * [Aliyun](Blob-Storing-Aliyun.md): Stores BLOBs on the [Aliyun Storage Service](https://help.aliyun.com/product/31815.html). * [Minio](Blob-Storing-Minio.md): Stores BLOBs on the [MinIO Object storage](https://min.io/). -* [Aws](Blob-Storing-Aws.md): Stores BLOBs on the[Amazon Simple Storage Service](https://aws.amazon.com/s3/). +* [Aws](Blob-Storing-Aws.md): Stores BLOBs on the [Amazon Simple Storage Service](https://aws.amazon.com/s3/). More providers will be implemented by the time. You can [request](https://github.com/abpframework/abp/issues/new) it for your favorite provider or [create it yourself](Blob-Storing-Custom-Provider.md) and [contribute](Contribution/Index.md) to the ABP Framework. diff --git a/docs/en/CLI.md b/docs/en/CLI.md index daf86025c4..fc76aa997b 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -105,7 +105,7 @@ abp new Acme.BookStore * `--preview`: Use latest preview version. * `--template-source` or `-ts`: Specifies a custom template source to use to build the project. Local and network sources can be used(Like `D:\local-template` or `https://.../my-template-file.zip`). * `--create-solution-folder` or `-csf`: Specifies if the project will be in a new folder in the output folder or directly the output folder. -* `--connection-string` or `-cs`: Overwrites the default connection strings in all `appsettings.json` files. The default connection string is `Server=localhost;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true` for EF Core and it is configured to use the SQL Server. If you want to use the EF Core, but need to change the DBMS, you can change it as [described here](Entity-Framework-Core-Other-DBMS.md) (after creating the solution). +* `--connection-string` or `-cs`: Overwrites the default connection strings in all `appsettings.json` files. The default connection string is `Server=localhost;Database=MyProjectName;Trusted_Connection=True` for EF Core and it is configured to use the SQL Server. If you want to use the EF Core, but need to change the DBMS, you can change it as [described here](Entity-Framework-Core-Other-DBMS.md) (after creating the solution). * `--database-management-system` or `-dbms`: Sets the database management system. Default is **SQL Server**. Supported DBMS's: * `SqlServer` * `MySQL` @@ -168,7 +168,7 @@ abp add-package Volo.Abp.MongoDB Adds a [multi-package application module](Modules/Index) to a solution by finding all packages of the module, finding related projects in the solution and adding each package to the corresponding project in the solution. -It can also create a new module for your solution and add it to your solution. See `--new-template` option. +It can also create a new module for your solution and add it to your solution. See `--new` option. > A business module generally consists of several packages (because of layering, different database provider options or other reasons). Using `add-module` command dramatically simplifies adding a module to a solution. However, each module may require some additional configurations which is generally indicated in the documentation of the related module. @@ -225,7 +225,7 @@ abp get-source Volo.Blogging --local-framework-ref --abp-path D:\GitHub\abp * `--output-folder` or `-o`: Specifies the directory that source code will be downloaded in. If not specified, current directory is used. * `--version` or `-v`: Specifies the version of the source code that will be downloaded. If not specified, latest version is used. * `--preview`: If no version option is specified, this option specifies if latest [preview version](Previews.md) will be used instead of latest stable version. -* `-- local-framework-ref --abp-path`: Path of [ABP Framework GitHub repository](https://github.com/abpframework/abp) in your computer. This will be used for converting project references to your local system. If this is not specified, project references will be converted to NuGet references. +* `--local-framework-ref --abp-path`: Path of [ABP Framework GitHub repository](https://github.com/abpframework/abp) in your computer. This will be used for converting project references to your local system. If this is not specified, project references will be converted to NuGet references. ### generate-proxy @@ -426,3 +426,4 @@ abp bundle [options] * ```--force``` or ```-f```: Forces to build project before generating references. `bundle` command reads the `appsettings.json` file inside the Blazor project for bundling options. For more details about managing style and script references in Blazor apps, see [Managing Global Scripts & Styles](UI/Blazor/Global-Scripts-Styles.md) + diff --git a/docs/en/Contribution/Index.md b/docs/en/Contribution/Index.md index 07dc73ab24..d2525ae191 100644 --- a/docs/en/Contribution/Index.md +++ b/docs/en/Contribution/Index.md @@ -10,7 +10,7 @@ If you want to write **articles** or **how to guides** related to the ABP Framew You can always send pull requests to the GitHub repository. -- Clone the [ABP repository](https://github.com/abpframework/abp/) from GitHub. +- [Fork](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo) the [ABP repository](https://github.com/abpframework/abp/) from GitHub. - Build the repository using the `/build/build-all.ps1 -f` for one time. - Make the necessary changes, including unit/integration tests. - Send a pull request. diff --git a/docs/en/Customizing-Application-Modules-Guide.md b/docs/en/Customizing-Application-Modules-Guide.md index d184d82906..56b94ae4fc 100644 --- a/docs/en/Customizing-Application-Modules-Guide.md +++ b/docs/en/Customizing-Application-Modules-Guide.md @@ -43,17 +43,59 @@ In any case, you can create a **separate solution** for the desired module and d #### Publishing the Customized Module as Packages -One alternative scenario could be re-packaging the module source code (as NuGet/NPM packages) and using as package references. You can use a local private NuGet/NPM server for your company. +One alternative scenario could be re-packaging the module source code (as NuGet/NPM packages) and using as package references. You can use a local private NuGet/NPM server for your company, for example. ## Module Customization / Extending Approaches -This section suggests some approaches if you decided to use pre-built application modules as NuGet/NPM package references. The following documents explain how to customize/extend existing modules in different ways: +This section suggests some approaches if you decided to use pre-built application modules as NuGet/NPM package references. The following documents explain how to customize/extend existing modules in different ways. + +### Module Entity Extension System + +> Module entity extension system is the **main and high level extension system** that allows you to **define new properties** for existing entities of the depended modules. It automatically **adds properties to the entity, database, HTTP API and the user interface** in a single point. + +See the [Module Entity Extensions document](Module-Entity-Extensions.md) to learn how to use it. + +### Extending Entities + +If you only need to get/set extra data on an existing entity, follow the [Extending Entities](Customizing-Application-Modules-Extending-Entities.md) document. + +### Overriding Services/Components + +In addition to the extensibility systems, you can partially or completely override any service or user interface page/component. -* [Extending Entities](Customizing-Application-Modules-Extending-Entities.md) * [Overriding Services](Customizing-Application-Modules-Overriding-Services.md) * [Overriding the User Interface](Customizing-Application-Modules-Overriding-User-Interface.md) -### See Also +### Additional UI Extensibility Points + +There are some low level systems that you can control entity actions, table columns and page toolbar of a page defined by a module. + +#### Entity Actions + +Entity action extension system allows you to add a new action to the action menu for an entity on the user interface; + +* [Entity Action Extensions for ASP.NET Core UI](UI/AspNetCore/Entity-Action-Extensions.md) +* [Entity Action Extensions for Angular](UI/Angular/Entity-Action-Extensions.md) + +#### Data Table Column Extensions + +Data table column extension system allows you to add a new column in the data table on the user interface; + +* [Data Table Column Extensions for ASP.NET Core UI](UI/AspNetCore/Data-Table-Column-Extensions.md) +* [Data Table Column Extensions for Angular](UI/Angular/Data-Table-Column-Extensions.md) + +#### Page Toolbar + +Page toolbar system allows you to add components to the toolbar of a page; + +* [Page Toolbar Extensions for ASP.NET Core UI](UI/AspNetCore/Page-Toolbar-Extensions.md) +* [Page Toolbar Extensions for Angular](UI/Angular/Page-Toolbar-Extensions.md) + +#### Others + +* [Dynamic Form Extensions for Angular](UI/Angular/Dynamic-Form-Extensions.md) + +## See Also Also, see the following documents: diff --git a/docs/en/Emailing.md b/docs/en/Emailing.md index aa341a3898..a98874165d 100644 --- a/docs/en/Emailing.md +++ b/docs/en/Emailing.md @@ -223,7 +223,7 @@ Pathes of the templates in the virtual file system are shown below: * `/Volo/Abp/Emailing/Templates/Layout.tpl` * `/Volo/Abp/Emailing/Templates/Message.tpl` -If you add files to the same localization in the virtual file system, your files will override them. +If you add files to the same location in the virtual file system, your files will override them. Templates are inline localized, that means you can take the power of the [localization system](Localization.md) to make your templates multi-cultural. @@ -247,4 +247,4 @@ So, don't confuse if you don't receive emails on DEBUG mode. Emails will be sent ## See Also -* [MailKit integration for sending emails](MailKit.md) \ No newline at end of file +* [MailKit integration for sending emails](MailKit.md) diff --git a/docs/en/Entity-Framework-Core-Migrations.md b/docs/en/Entity-Framework-Core-Migrations.md index a93ee217da..be5968a9af 100644 --- a/docs/en/Entity-Framework-Core-Migrations.md +++ b/docs/en/Entity-Framework-Core-Migrations.md @@ -586,7 +586,7 @@ First step is to change the connection string section inside all the `appsetting ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True" } ```` @@ -594,10 +594,10 @@ Change it as shown below: ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true", - "AbpPermissionManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True;MultipleActiveResultSets=true", - "AbpSettingManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True;MultipleActiveResultSets=true", - "AbpAuditLogging": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True", + "AbpPermissionManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True", + "AbpSettingManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True", + "AbpAuditLogging": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True" } ```` diff --git a/docs/en/Entity-Framework-Core-MySQL.md b/docs/en/Entity-Framework-Core-MySQL.md index a04d6073fc..14f419557e 100644 --- a/docs/en/Entity-Framework-Core-MySQL.md +++ b/docs/en/Entity-Framework-Core-MySQL.md @@ -12,10 +12,10 @@ Find ***YourProjectName*EntityFrameworkCoreModule** class inside the `.EntityFra ## UseMySQL() -Find `UseSqlServer()` calls in your solution, replace with `UseMySQL()`. Check the following files: +Find `UseSqlServer()` calls in your solution. Check the following files: -* *YourProjectName*EntityFrameworkCoreModule.cs inside the `.EntityFrameworkCore` project. -* *YourProjectName*MigrationsDbContextFactory.cs inside the `.EntityFrameworkCore.DbMigrations` project. +* *YourProjectName*EntityFrameworkCoreModule.cs inside the `.EntityFrameworkCore` project. Replace `UseSqlServer()` with `UseMySQL()`. +* *YourProjectName*MigrationsDbContextFactory.cs inside the `.EntityFrameworkCore.DbMigrations` project. Replace `UseSqlServer()` with `UseMySql()`. Then add a new parameter (`ServerVersion`) to `UseMySql()` method. Example: `.UseMySql(configuration.GetConnectionString("Default"), ServerVersion.FromString("8.0.21-mysql"))`. See [this issue](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/pull/1233) for more information about `ServerVersion`) > Depending on your solution structure, you may find more code files need to be changed. @@ -38,4 +38,4 @@ Run the `.DbMigrator` project to create the database and seed the initial data. ## Run the Application -It is ready. Just run the application and enjoy coding. \ No newline at end of file +It is ready. Just run the application and enjoy coding. diff --git a/docs/en/Modules/Docs.md b/docs/en/Modules/Docs.md index 5780b4b827..35478d9ce0 100644 --- a/docs/en/Modules/Docs.md +++ b/docs/en/Modules/Docs.md @@ -47,7 +47,7 @@ The database connection string is located in `appsettings.json` of your `Acme.My ```json { "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProject;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProject;Trusted_Connection=True" } } ``` diff --git a/docs/en/Samples/Microservice-Demo.md b/docs/en/Samples/Microservice-Demo.md index 492dfb203b..285c2b10a0 100644 --- a/docs/en/Samples/Microservice-Demo.md +++ b/docs/en/Samples/Microservice-Demo.md @@ -842,7 +842,7 @@ It has a dedicated MongoDB database (MsDemo_Blogging) to store blog and posts. I ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", + "Default": "Server=localhost;Database=MsDemo_Identity;Trusted_Connection=True", "Blogging": "mongodb://localhost/MsDemo_Blogging" } ```` @@ -968,8 +968,8 @@ There are two connection strings in the `appsettings.json` file: ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", - "ProductManagement": "Server=localhost;Database=MsDemo_ProductManagement;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=MsDemo_Identity;Trusted_Connection=True", + "ProductManagement": "Server=localhost;Database=MsDemo_ProductManagement;Trusted_Connection=True" } ```` diff --git a/docs/en/UI/Angular/Data-Table-Column-Extensions.md b/docs/en/UI/Angular/Data-Table-Column-Extensions.md new file mode 100644 index 0000000000..6f1367d934 --- /dev/null +++ b/docs/en/UI/Angular/Data-Table-Column-Extensions.md @@ -0,0 +1,320 @@ +# Data Table Column (or Entity Prop) Extensions for Angular UI + + +## Introduction + +Entity prop extension system allows you to add a new column to the data table for an entity or change/remove an already existing one. A "Name" column was added to the user management page below: + +Entity Prop Extension Example: 'Name' Column + +You will have access to the current entity in your code and display its value, make the column sortable, perform visibility checks, and more. You can also render custom HTML in table cells. + +## How to Set Up + +In this example, we will add a "Name" column and display the value of the `name` field in the user management page of the [Identity Module](../../Modules/Identity.md). + +### Step 1. Create Entity Prop Contributors + +The following code prepares a constant named `identityEntityPropContributors`, ready to be imported and used in your root module: + +```js +// src/app/entity-prop-contributors.ts + +import { + eIdentityComponents, + IdentityEntityPropContributors, + IdentityUserDto, +} from '@abp/ng.identity'; +import { EntityProp, EntityPropList, ePropType } from '@abp/ng.theme.shared/extensions'; + +const nameProp = new EntityProp({ + type: ePropType.String, + name: 'name', + displayName: 'AbpIdentity::Name', + sortable: true, + columnWidth: 250, +}); + +export function namePropContributor(propList: EntityPropList) { + propList.addAfter(nameProp, 'userName', (value, name) => value.name === name); +} + +export const identityEntityPropContributors: IdentityEntityPropContributors = { + // enum indicates the page to add contributors to + [eIdentityComponents.Users]: [ + namePropContributor, + // You can add more contributors here + ], +}; + +``` + +The list of props, conveniently named as `propList`, is a **doubly linked list**. That is why we have used the `addAfter` method, which adds a node with given value after the first node that has the previous value. You may find [all available methods here](../Common/Utils/Linked-List.md). + +### Step 2. Import and Use Entity Prop Contributors + +Import `identityEntityPropContributors` in your routing module and pass it to the static `forLazy` method of `IdentityModule` as seen below: + +```js +// src/app/app-routing.module.ts + +// other imports +import { identityEntityPropContributors } from './entity-prop-contributors'; + +const routes: Routes = [ + // other routes + + { + path: 'identity', + loadChildren: () => + import('@abp/ng.identity').then(m => + m.IdentityModule.forLazy({ + entityPropContributors: identityEntityPropContributors, + }) + ), + }, + + // other routes +]; +``` + +That is it, `nameProp` entity prop will be added, and you will see the "Name" column next to the usernames on the grid in the users page (`UsersComponent`) of the `IdentityModule`. + +## How to Render Custom HTML in Cells + +You can use the `valueResolver` to render an HTML string in the table. Imagine we want to show a red times icon (❌) next to unconfirmed emails and phones, instead of showing a green check icon next to confirmed emails and phones. The contributors below would do that for you. + +Entity Prop Extension Example: Custom Cell Render + +```js +// src/app/entity-prop-contributors.ts + +import { + eIdentityComponents, + IdentityEntityPropContributors, + IdentityUserDto, +} from '@abp/ng.identity'; +import { EntityProp, EntityPropList } from '@abp/ng.theme.shared/extensions'; +import { of } from 'rxjs'; + +export function emailPropContributor(propList: EntityPropList) { + const index = propList.indexOf('email', (value, name) => value.name === name); + const droppedNode = propList.dropByIndex(index); + const emailProp = new EntityProp({ + ...droppedNode.value, + valueResolver: data => { + const { email, emailConfirmed } = data.record; + const icon = email && !emailConfirmed ? `` : ''; + + return of((email || '') + icon); // should return an observable + }, + }); + + propList.addByIndex(emailProp, index); +} + +export function phonePropContributor(propList: EntityPropList) { + const index = propList.indexOf('phoneNumber', (value, name) => value.name === name); + const droppedNode = propList.dropByIndex(index); + const phoneProp = new EntityProp({ + ...droppedNode.value, + valueResolver: data => { + const { phoneNumber, phoneNumberConfirmed } = data.record; + const icon = + phoneNumber && !phoneNumberConfirmed ? `` : ''; + + return of((phoneNumber || '') + icon); // should return an observable + }, + }); + + propList.addByIndex(phoneProp, index); +} + +export const identityEntityPropContributors: IdentityEntityPropContributors = { + [eIdentityComponents.Users]: [emailPropContributor, phonePropContributor], +}; + +``` + +> The `valueResolver` method should return an observable. You can wrap your return values with `of` from RxJS for that. + +## Object Extensions + +Extra properties defined on an existing entity will be included in the table based on their configuration. The values will also be mapped to and from `extraProperties` automatically. They are available when defining custom contributors, so you can drop, modify, or reorder them. The `isExtra` identifier will be set to `true` for these properties and will define this automatic behavior. + +## API + +### PropData\ + +`PropData` is the shape of the parameter passed to all callbacks or predicates in an `EntityProp`. + +It has the following properties: + +- **record** is the row data, i.e. current value rendered in the table. + + ```js + { + type: ePropType.String, + name: 'name', + valueResolver: data => { + const name = data.record.name || ''; + return of(name.toUpperCase()); + }, + } + ``` + +- **index** is the table index where the record is at. + +- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `ExtensibleTableComponent`, including, but not limited to, its parent component. + + ```js + { + type: ePropType.String, + name: 'name', + valueResolver: data => { + const restService = data.getInjected(RestService); + const usersComponent = data.getInjected(UsersComponent); + + // Use restService and usersComponent public props and methods here + }, + } + ``` + +### PropCallback\ + +`PropCallback` is the type of the callback function that can be passed to an `EntityProp` as `prop` parameter. A prop callback gets a single parameter, the `PropData`. The return type may be anything, including `void`. Here is a simplified representation: + +```js +type PropCallback = (data?: PropData) => R; +``` + +### PropPredicate\ + +`PropPredicate` is the type of the predicate function that can be passed to an `EntityProp` as `visible` parameter. A prop predicate gets a single parameter, the `PropData`. The return type must be `boolean`. Here is a simplified representation: + +```js +type PropPredicate = (data?: PropData) => boolean; +``` + +### EntityPropOptions\ + +`EntityPropOptions` is the type that defines required and optional properties you have to pass in order to create an entity prop. + +Its type definition is as follows: + +```js +type EntityPropOptions = { + type: ePropType; + name: string; + displayName?: string; + valueResolver?: PropCallback>; + sortable?: boolean; + columnWidth?: number; + permission?: string; + visible?: PropPredicate; +}; +``` + +As you see, passing `type` and `name` is enough to create an entity prop. Here is what each property is good for: + +- **type** is the type of the prop value. It is used for custom rendering in the table. (_required_) +- **name** is the property name (or key) which will be used to read the value of the prop. (_required_) +- **displayName** is the name of the property which will be localized and shown as column header. (_default:_ `options.name`) +- **valueResolver** is a callback that is called when the cell is rendered. It must return an observable. (_default:_ `data => of(data.record[options.name])`) +- **sortable** defines if the table is sortable based on this entity prop. Sort icons are shown based on it. (_default:_ `false`) +- **columnWidth** defines a minimum width for the column. Good for horizontal scroll. (_default:_ `undefined`) +- **permission** is the permission context which will be used to decide if a column for this entity prop should be displayed to the user or not. (_default:_ `undefined`) +- **visible** is a predicate that will be used to decide if this entity prop should be displayed on the table or not. (_default:_ `() => true`) + +> Important Note: Do not use record in visibility predicates. First of all, the table header checks it too and the record will be `undefined`. Second, if some cells are displayed and others are not, the table will be broken. Use the `valueResolver` and render an empty cell when you need to hide a specific cell. + +You may find a full example below. + +### EntityProp\ + +`EntityProp` is the class that defines your entity props. It takes an `EntityPropOptions` and sets the default values to the properties, creating an entity prop that can be passed to an entity contributor. + +```js +const options: EntityPropOptions = { + type: ePropType.String, + name: 'email', + displayName: 'AbpIdentity::EmailAddress', + valueResolver: data => { + const { email, emailConfirmed } = data.record; + + return of( + (email || '') + (emailConfirmed ? `` : ''), + ); + }, + sortable: true, + columnWidth: 250, + permission: 'AbpIdentity.Users.ReadSensitiveData', // hypothetical + visible: data => { + const store = data.getInjected(Store); + const selectSensitiveDataVisibility = ConfigState.getSetting( + 'Abp.Identity.IsSensitiveDataVisible' // hypothetical + ); + + return store.selectSnapshot(selectSensitiveDataVisibility).toLowerCase() === 'true'; + } +}; + +const prop = new EntityProp(options); +``` + +It also has two static methods to create its instances: + +- **EntityProp.create\\(options: EntityPropOptions\\)** is used to create an instance of `EntityProp`. + ```js + const prop = EntityProp.create(options); + ``` +- **EntityProp.createMany\\(options: EntityPropOptions\\[\]\)** is used to create multiple instances of `EntityProp` with given array of `EntityPropOptions`. + ```js + const props = EntityProp.createMany(optionsArray); + ``` + +### EntityPropList\ + +`EntityPropList` is the list of props passed to every prop contributor callback as the first parameter named `propList`. It is a **doubly linked list**. You may find [all available methods here](../Common/Utils/Linked-List.md). + +The items in the list will be displayed according to the linked list order, i.e. from head to tail. If you want to re-order them, all you have to do is something like this: + +```js +export function reorderUserContributors( + propList: EntityPropList, +) { + // drop email node + const emailPropNode = propList.dropByValue( + 'AbpIdentity::EmailAddress', + (prop, text) => prop.text === text, + ); + + // add it back after phoneNumber + propList.addAfter( + emailPropNode.value, + 'phoneNumber', + (value, name) => value.name === name, + ); +} +``` + +### EntityPropContributorCallback\ + +`EntityPropContributorCallback` is the type that you can pass as entity prop contributor callbacks to static `forLazy` methods of the modules. + +```js +export function isLockedOutPropContributor( + propList: EntityPropList, +) { + // add isLockedOutProp as 2nd column + propList.add(isLockedOutProp).byIndex(1); +} + +export const identityEntityPropContributors = { + [eIdentityComponents.Users]: [isLockedOutPropContributor], +}; +``` + +## See Also + +- [Customizing Application Modules Guide](../../Customizing-Application-Modules-Guide.md) diff --git a/docs/en/UI/Angular/Dynamic-Form-Extensions.md b/docs/en/UI/Angular/Dynamic-Form-Extensions.md new file mode 100644 index 0000000000..d7780ceec0 --- /dev/null +++ b/docs/en/UI/Angular/Dynamic-Form-Extensions.md @@ -0,0 +1,315 @@ +# Dynamic Form (or Form Prop) Extensions for Angular UI + + +## Introduction + +Form prop extension system allows you to add a new field to the create and/or edit forms for a form or change/remove an already existing one. A "Date of Birth" field was added to the user management page below: + +Form Prop Extension Example: 'Date of Birth' Field + +You can validate the field, perform visibility checks, and do more. You will also have access to the current entity when creating a contibutor for an edit form. + +## How to Set Up + +In this example, we will add a "Date of Birth" field in the user management page of the [Identity Module](../../Modules/Identity.md) and validate it. + +### Step 1. Create Form Prop Contributors + +The following code prepares two constants named `identityCreateFormPropContributors` and `identityEditFormPropContributors`, ready to be imported and used in your root module: + +```js +// src/app/form-prop-contributors.ts + +import { + eIdentityComponents, + IdentityCreateFormPropContributors, + IdentityUserDto, +} from '@abp/ng.identity'; +import { ePropType, FormProp, FormPropList } from '@abp/ng.theme.shared/extensions'; +import { Validators } from '@angular/forms'; + +const birthdayProp = new FormProp({ + type: ePropType.Date, + name: 'birthday', + displayName: 'AbpIdentity::Birthday', + validators: () => [Validators.required], +}); + +export function birthdayPropContributor(propList: FormPropList) { + propList.addByIndex(birthdayProp, 4); +} + +export const identityCreateFormPropContributors: IdentityCreateFormPropContributors = { + // enum indicates the page to add contributors to + [eIdentityComponents.Users]: [ + birthdayPropContributor, + // You can add more contributors here + ], +}; + +export const identityEditFormPropContributors = identityCreateFormPropContributors; +// you may define different contributors for edit form if you like + +``` + + +The list of props, conveniently named as `propList`, is a **doubly linked list**. That is why we have used the `addByIndex` method, which adds the given value to the specified index of the list. You may find [all available methods here](../Common/Utils/Linked-List.md). + +### Step 2. Import and Use Form Prop Contributors + +Import `identityCreateFormPropContributors` and `identityEditFormPropContributors` in your routing module and pass it to the static `forLazy` method of `IdentityModule` as seen below: + +```js +// src/app/app-routing.module.ts + +// other imports +import { + identityCreateFormPropContributors, + identityEditFormPropContributors, +} from './form-prop-contributors'; + +const routes: Routes = [ + // other routes + + { + path: 'identity', + loadChildren: () => + import('@abp/ng.identity').then(m => + m.IdentityModule.forLazy({ + createFormPropContributors: identityCreateFormPropContributors, + editFormPropContributors: identityEditFormPropContributors, + }) + ), + }, + + // other routes +]; +``` + +That is it, `birthdayProp` form prop will be added, and you will see the datepicker for the "Date of Birth" field right before the "Email address" in the forms of the users page in the `IdentityModule`. + +## Object Extensions + +Extra properties defined on an existing entity will be included in the create and edit forms and validated based on their configuration. The form values will also be mapped to and from `extraProperties` automatically. They are available when defining custom contributors, so you can drop, modify, or reorder them. The `isExtra` identifier will be set to `true` for these properties and will define this automatic behavior. + +## API + +### PropData\ + +`PropData` is the shape of the parameter passed to all callbacks or predicates in a `FormProp`. + +It has the following properties: + +- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `ExtensibleFormPropComponent`, including, but not limited to, its parent components. + + ```js + { + type: ePropType.Enum, + name: 'myField', + options: data => { + const restService = data.getInjected(RestService); + const usersComponent = data.getInjected(UsersComponent); + + // Use restService and usersComponent public props and methods here + } + }, + ``` + +- **record** is the row data, i.e. current value of the selected item to edit. This property is _available only on edit forms_. + + ```js + { + type: ePropType.String, + name: 'myProp', + readonly: data => data.record.someOtherProp, + } + ``` + +### PropCallback\ + +`PropCallback` is the type of the callback function that can be passed to a `FormProp` as `prop` parameter. A prop callback gets a single parameter, the `PropData`. The return type may be anything, including `void`. Here is a simplified representation: + +```js +type PropCallback = (data?: PropData) => R; +``` + +### PropPredicate\ + +`PropPredicate` is the type of the predicate function that can be passed to a `FormProp` as `visible` parameter. A prop predicate gets a single parameter, the `PropData`. The return type must be `boolean`. Here is a simplified representation: + +```js +type PropPredicate = (data?: PropData) => boolean; +``` + +### FormPropOptions\ + +`FormPropOptions` is the type that defines required and optional properties you have to pass in order to create a form prop. + +Its type definition is as follows: + +```js +type FormPropOptions = { + type: ePropType; + name: string; + displayName?: string; + id?: string; + permission?: string; + visible?: PropPredicate; + readonly?: PropPredicate; + disabled?: PropPredicate; + validators?: PropCallback; + asyncValidators?: PropCallback; + defaultValue?: boolean | number | string | Date; + options?: PropCallback[]>>; + autocomplete?: string; + isExtra? boolean; +}; +``` + +As you see, passing `type` and `name` is enough to create a form prop. Here is what each property is good for: + +- **type** is the type of the prop value. It defines which input is rendered for the prop in the form. (_required_) +- **name** is the property name (or key) which will be used to read the value of the prop. (_required_) +- **displayName** is the name of the property which will be localized and shown as column header. (_default:_ `options.name`) +- **id** will be set as the `for` attribute of the label and the `id` attribute of the input for the field. (_default:_ `options.name`) +- **permission** is the permission context which will be used to decide if a column for this form prop should be displayed to the user or not. (_default:_ `undefined`) +- **visible** is a predicate that will be used to decide if this prop should be displayed on the form or not. (_default:_ `() => true`) +- **readonly** is a predicate that will be used to decide if this prop should be readonly or not. (_default:_ `() => false`) +- **disabled** is a predicate that will be used to decide if this prop should be disabled or not. (_default:_ `() => false`) +- **validators** is a callback that returns validators for the prop. (_default:_ `() => []`) +- **asyncValidators** is a callback that returns async validators for the prop. (_default:_ `() => []`) +- **defaultValue** is the initial value the field will have. (_default:_ `null`) +- **options** is a callback that is called when a dropdown is needed. It must return an observable. (_default:_ `undefined`) +- **autocomplete** will be set as the `autocomplete` attribute of the input for the field. Please check [possible values](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#Values). (_default:_ `'off'`) +- **isExtra** indicates this prop is an object extension. When `true`, the value of the field will be mapped from and to `extraProperties` of the entity. (_default:_ `undefined`) + +> Important Note: Do not use `record` property of `PropData` in create form predicates and callbacks, because it will be `undefined`. You can use it on edit form contributors though. + +You may find a full example below. + +### FormProp\ + +`FormProp` is the class that defines your form props. It takes a `FormPropOptions` and sets the default values to the properties, creating a form prop that can be passed to a form contributor. + +```js +const options: FormPropOptions = { + type: ePropType.Enum, + name: 'myProp', + displayName: 'Default::MyPropName', + id: 'my-prop', + permission: 'AbpIdentity.Users.ReadSensitiveData', // hypothetical + visible: data => { + const store = data.getInjected(Store); + const selectSensitiveDataVisibility = ConfigState.getSetting( + 'Abp.Identity.IsSensitiveDataVisible' // hypothetical + ); + + return store.selectSnapshot(selectSensitiveDataVisibility).toLowerCase() === 'true'; + }, + readonly: data => data.record.someProp, + disabled: data => data.record.someOtherProp, + validators: () => [Validators.required], + asyncValidators: data => { + const http = data.getInjected(HttpClient); + + function validate(control: AbstractControl): Observable { + if (control.pristine) return of(null); + + return http + .get('https://api.my-brand.io/hypothetical/endpoint/' + control.value) + .pipe(map(response => (response.valid ? null : { invalid: true }))); + } + + return [validate]; + }, + defaultValue: 0, + options: data => { + const service = data.getInjected(MyIdentityService); + + return service.getMyPropOptions() + .pipe( + map(({items}) => items.map( + item => ({key: item.name, value: item.id }) + )), + ); + }, + autocomplete: 'off', + isExtra: true, +}; + +const prop = new FormProp(options); +``` + +It also has two static methods to create its instances: + +- **FormProp.create\\(options: FormPropOptions\\)** is used to create an instance of `FormProp`. + ```js + const prop = FormProp.create(options); + ``` +- **FormProp.createMany\\(options: FormPropOptions\\[\]\)** is used to create multiple instances of `FormProp` with given array of `FormPropOptions`. + ```js + const props = FormProp.createMany(optionsArray); + ``` + +### FormPropList\ + +`FormPropList` is the list of props passed to every prop contributor callback as the first parameter named `propList`. It is a **doubly linked list**. You may find [all available methods here](../Common/Utils/Linked-List.md). + +The items in the list will be displayed according to the linked list order, i.e. from head to tail. If you want to re-order them, all you have to do is something like this: + +```js +export function reorderUserContributors( + propList: FormPropList, +) { + // drop email node + const emailPropNode = propList.dropByValue( + 'AbpIdentity::EmailAddress', + (prop, displayName) => prop.displayName === displayName, + ); + + // add it back after phoneNumber + propList.addAfter( + emailPropNode.value, + 'phoneNumber', + (value, name) => value.name === name, + ); +} +``` + +### CreateFormPropContributorCallback\ + +`CreateFormPropContributorCallback` is the type that you can pass as **create form** prop contributor callbacks to static `forLazy` methods of the modules. + +```js +export function myPropCreateContributor( + propList: FormPropList, +) { + // add myProp as 2nd field from the start + propList.add(myProp).byIndex(1); +} + +export const identityCreateFormPropContributors = { + [eIdentityComponents.Users]: [myPropCreateContributor], +}; +``` + +### EditFormPropContributorCallback\ + +`EditFormPropContributorCallback` is the type that you can pass as **edit form** prop contributor callbacks to static `forLazy` methods of the modules. + +```js +export function myPropEditContributor( + propList: FormPropList, +) { + // add myProp as 2nd field from the end + propList.add(myProp).byIndex(-1); +} + +export const identityEditFormPropContributors = { + [eIdentityComponents.Users]: [myPropEditContributor], +}; +``` + +## See Also + +- [Customizing Application Modules Guide](../../Customizing-Application-Modules-Guide.md) diff --git a/docs/en/UI/Angular/Entity-Action-Extensions.md b/docs/en/UI/Angular/Entity-Action-Extensions.md new file mode 100644 index 0000000000..fd22e293fd --- /dev/null +++ b/docs/en/UI/Angular/Entity-Action-Extensions.md @@ -0,0 +1,400 @@ +# Entity Action Extensions for Angular UI + +## Introduction + +Entity action extension system allows you to add a new action to the action menu for an entity. A "Click Me" action was added to the user management page below: + +Entity Action Extension Example: 'Click Me!' Action + +You can take any action (open a modal, make an HTTP API call, redirect to another page... etc) by writing your custom code. You can also access the current entity in your code. + +## How to Set Up + +In this example, we will add a "Click Me!" action and alert the current row's `userName` in the user management page of the [Identity Module](../../Modules/Identity.md). + +### Step 1. Create Entity Action Contributors + +The following code prepares a constant named `identityEntityActionContributors`, ready to be imported and used in your root module: + +```js +// src/app/entity-action-contributors.ts + +import { + eIdentityComponents, + IdentityEntityActionContributors, + IdentityUserDto, +} from '@abp/ng.identity'; +import { EntityAction, EntityActionList } from '@abp/ng.theme.shared/extensions'; + +const alertUserName = new EntityAction({ + text: 'Click Me!', + action: data => { + // Replace alert with your custom code + alert(data.record.userName); + }, + // See EntityActionOptions in API section for all options +}); + +export function alertUserNameContributor(actionList: EntityActionList) { + actionList.addTail(alertUserName); +} + +export const identityEntityActionContributors: IdentityEntityActionContributors = { + // enum indicates the page to add contributors to + [eIdentityComponents.Users]: [ + alertUserNameContributor, + // You can add more contributors here + ], +}; +``` + +The list of actions, conveniently named as `actionList`, is a **doubly linked list**. That is why we have used the `addTail` method, which adds the given value to the end of the list. You may find [all available methods here](../Common/Utils/Linked-List.md). + +### Step 2. Import and Use Entity Action Contributors + +Import `identityEntityActionContributors` in your routing module and pass it to the static `forLazy` method of `IdentityModule` as seen below: + +```js +// src/app/app-routing.module.ts + +// other imports +import { identityEntityActionContributors } from './entity-action-contributors'; + +const routes: Routes = [ + // other routes + + { + path: 'identity', + loadChildren: () => + import('@abp/ng.identity').then(m => + m.IdentityModule.forLazy({ + entityActionContributors: identityEntityActionContributors, + }) + ), + }, + + // other routes +]; +``` + +That is it, `alertUserName` entity action will be added as the last action on the grid dropdown in the "Users" page (`UsersComponent`) of the `IdentityModule`. + +## How to Place a Custom Modal and Trigger It by Entity Actions + +Let's employ dependency injection to extend the functionality of `IdentityModule` and add a quick view action for the User entity. We will take a lazy-loaded approach. + +Entity Action Extension Example: Custom Modal + +1. Create a folder at this path: `src/app/identity-extended` + +2. Add an entity action similar to this: + ```js + // src/app/identity-extended/entity-action-contributors.ts + + import { + eIdentityComponents, + IdentityEntityActionContributors, + IdentityUserDto, + } from '@abp/ng.identity'; + import { EntityAction, EntityActionList } from '@abp/ng.theme.shared/extensions'; + import { IdentityExtendedComponent } from './identity-extended.component'; + + const quickViewAction = new EntityAction({ + text: 'Quick View', + action: data => { + const component = data.getInjected(IdentityExtendedComponent); + component.openUserQuickView(data.record); + }, + }); + + export function customModalContributor(actionList: EntityActionList) { + actionList.addTail(quickViewAction); + } + + export const identityEntityActionContributors: IdentityEntityActionContributors = { + // enum indicates the page to add contributors to + [eIdentityComponents.Users]: [ + customModalContributor, + // You can add more contributors here + ], + }; + ``` + +3. Create a parent component to the identity module. + ```js + // src/app/identity-extended/identity-extended.component.ts + + import { IdentityUserDto } from '@abp/ng.identity'; + import { Component } from '@angular/core'; + + @Component({ + selector: 'app-identity-extended', + templateUrl: './identity-extended.component.html', + }) + export class IdentityExtendedComponent { + isUserQuickViewVisible: boolean; + + user: IdentityUserDto; + + openUserQuickView(record: IdentityUserDto) { + this.user = new Proxy(record, { + get: (target, prop) => target[prop] || '—', + }); + this.isUserQuickViewVisible = true; + } + } + ``` + +4. Add a router outlet and a modal to the parent component. + ```html + + + + + + +

{%{{{ user.userName }}}%}

+
+ + + + + + + + + + + + + + + + + + + + + +
{%{{{ 'AbpIdentity::DisplayName:Name' | abpLocalization }}}%}{%{{{ user.name }}}%}
{%{{{ 'AbpIdentity::DisplayName:Surname' | abpLocalization }}}%}{%{{{ user.surname }}}%}
{%{{{ 'AbpIdentity::EmailAddress' | abpLocalization }}}%}{%{{{ user.email }}}%}
{%{{{ 'AbpIdentity::PhoneNumber' | abpLocalization }}}%}{%{{{ user.phoneNumber }}}%}
+
+ + + + +
+ ``` + +5. Add a module for the component and load `IdentityModule` as seen below: + ```js + // src/app/identity-extended/identity-extended.module.ts + + import { CoreModule } from '@abp/ng.core'; + import { IdentityModule } from '@abp/ng.identity'; + import { ThemeSharedModule } from '@abp/ng.theme.shared'; + import { NgModule } from '@angular/core'; + import { RouterModule } from '@angular/router'; + import { identityEntityActionContributors } from './entity-action-contributors'; + import { IdentityExtendedComponent } from './identity-extended.component'; + + @NgModule({ + imports: [ + CoreModule, + ThemeSharedModule, + RouterModule.forChild([ + { + path: '', + component: IdentityExtendedComponent, + children: [ + { + path: '', + loadChildren: () => + IdentityModule.forLazy({ + entityActionContributors: identityEntityActionContributors, + }), + }, + ], + }, + ]), + ], + declarations: [IdentityExtendedComponent], + }) + export class IdentityExtendedModule {} + ``` + +6. Load `IdentityExtendedModule` instead of `IdentityModule` in your root routing module. + ```js + // src/app/app-routing.module.ts + + const routes: Routes = [ + // other routes + + { + path: 'identity', + loadChildren: () => + import('./identity-extended/identity-extended.module') + .then(m => m.IdentityExtendedModule), + }, + + // other routes + ]; + ``` + +That's it. As you see, we reached the `IdentityExtendedComponent` through dependency injection and called one of its methods in our action. The specific user was also available via `data.record`, so we were able to display a summary view. + +## API + +### ActionData\ + +`ActionData` is the shape of the parameter passed to all callbacks or predicates in an `EntityAction`. + +It has the following properties: + +- **record** is the row data, i.e. current value rendered in the table. + + ```js + { + text: 'Click Me!', + action: data => { + alert(data.record.userName); + }, + } + ``` + +- **index** is the table index where the record is at. + +- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `GridActionsComponent`, including, but not limited to, its parent component. + + ```js + { + text: 'Click Me!', + action: data => { + const restService = data.getInjected(RestService); + + // Use restService public props and methods here + }, + visible: data => { + const usersComponent = data.getInjected(UsersComponent); + + // Use usersComponent public props and methods here + }, + } + ``` + +### ActionCallback\ + +`ActionCallback` is the type of the callback function that can be passed to an `EntityAction` as `action` parameter. An action callback gets a single parameter, the `ActionData`. The return type may be anything, including `void`. Here is a simplified representation: + +```js +type ActionCallback = (data?: ActionData) => R; +``` + +### ActionPredicate\ + +`ActionPredicate` is the type of the predicate function that can be passed to an `EntityAction` as `visible` parameter. An action predicate gets a single parameter, the `ActionData`. The return type must be `boolean`. Here is a simplified representation: + +```js +type ActionPredicate = (data?: ActionData) => boolean; +``` + +### EntityActionOptions\ + +`EntityActionOptions` is the type that defines required and optional properties you have to pass in order to create an entity action. + +Its type definition is as follows: + +```js +type EntityActionOptions = { + action: ActionCallback, + text: string, + icon?: string, + permission?: string, + visible?: ActionPredicate, +}; +``` + +As you see, passing `action` and `text` is enough to create an entity action. Here is what each property is good for: + +- **action** is a callback that is called when the grid action is clicked. (_required_) +- **text** is the button text which will be localized. (_required_) +- **icon** is the classes that define an icon to be placed before the text. (_default:_ `''`) +- **permission** is the permission context which will be used to decide if this type of grid action should be displayed to the user or not. (_default:_ `undefined`) +- **visible** is a predicate that will be used to decide if the current record should have this grid action or not. (_default:_ `() => true`) + +You may find a full example below. + +### EntityAction\ + +`EntityAction` is the class that defines your entity actions. It takes an `EntityActionOptions` and sets the default values to the properties, creating an entity action that can be passed to an entity contributor. + +```js +const options: EntityActionOptions = { + action: data => { + const component = data.getInjected(IdentityExtendedComponent); + component.unlock(data.record.id); + }, + text: 'AbpIdentity::Unlock', + icon: 'fa fa-unlock', + permission: 'AbpIdentity.Users.Update', + visible: data => data.record.isLockedOut, +}; + +const action = new EntityAction(options); +``` + +It also has two static methods to create its instances: + +- **EntityAction.create\\(options: EntityActionOptions\\)** is used to create an instance of `EntityAction`. + ```js + const action = EntityAction.create(options); + ``` +- **EntityAction.createMany\\(options: EntityActionOptions\\[\]\)** is used to create multiple instances of `EntityAction` with given array of `EntityActionOptions`. + ```js + const actions = EntityAction.createMany(optionsArray); + ``` + +### EntityActionList\ + +`EntityActionList` is the list of actions passed to every action contributor callback as the first parameter named `actionList`. It is a **doubly linked list**. You may find [all available methods here](../Common/Utils/Linked-List.md). + +The items in the list will be displayed according to the linked list order, i.e. from head to tail. If you want to re-order them, all you have to do is something like this: + +```js +export function reorderUserContributors( + actionList: EntityActionList, +) { + // drop "Unlock" button + const unlockActionNode = actionList.dropByValue( + 'AbpIdentity::Unlock', + (action, text) => action.text === text, + ); + + // add it back to the head of the list + actionList.addHead(unlockActionNode.value); +} +``` + +### EntityActionContributorCallback\ + +`EntityActionContributorCallback` is the type that you can pass as entity action contributor callbacks to static `forLazy` methods of the modules. + +```js +// lockUserContributor should have EntityActionContributorCallback type + +export function lockUserContributor( + actionList: EntityActionList, +) { + // add lockUser as 3rd action + actionList.add(lockUser).byIndex(2); +} + +export const identityEntityActionContributors = { + [eIdentityComponents.Users]: [lockUserContributor], +}; +``` + +## See Also + +- [Customizing Application Modules Guide](../../Customizing-Application-Modules-Guide.md) diff --git a/docs/en/UI/Angular/Form-Validation.md b/docs/en/UI/Angular/Form-Validation.md index 38e7969eea..a178fa213c 100644 --- a/docs/en/UI/Angular/Form-Validation.md +++ b/docs/en/UI/Angular/Form-Validation.md @@ -6,23 +6,52 @@ Reactive forms in ABP Angular UI are validated by [ngx-validate](https://www.npm ## How to Add New Error Messages -You can add a new error message by providing the `VALIDATION_BLUEPRINTS` injection token from your root module. +You can add a new error message by passing validation options to the `ThemeSharedModule` in your root module. ```js import { VALIDATION_BLUEPRINTS } from "@ngx-validate/core"; +import { DEFAULT_VALIDATION_BLUEPRINTS } from "@abp/ng.theme.shared"; @NgModule({ + imports: [ + ThemeSharedModule.forRoot({ + validation: { + blueprints: { + uniqueUsername: "::AlreadyExists[{%{{{ username }}}%}]", + }, + }, + + // rest of theme shared config + }), + + // other imports + ], + // rest of the module metadata +}) +export class AppModule {} +``` + +Alternatively, you may provide the `VALIDATION_BLUEPRINTS` token directly in your root module. Please do not forget to spread `DEFAULT_VALIDATION_BLUEPRINTS`. Otherwise, built-in ABP validation messages will not work. +```js +import { VALIDATION_BLUEPRINTS } from "@ngx-validate/core"; +import { DEFAULT_VALIDATION_BLUEPRINTS } from "@abp/ng.theme.shared"; + +@NgModule({ providers: [ - // other providers { provide: VALIDATION_BLUEPRINTS, useValue: { + ...DEFAULT_VALIDATION_BLUEPRINTS, uniqueUsername: "::AlreadyExists[{%{{{ username }}}%}]", }, }, + + // other providers ], + + // rest of the module metadata }) export class AppModule {} ``` @@ -40,7 +69,7 @@ In this example; ## How to Change Existing Error Messages -You can overwrite an existing error message by providing `VALIDATION_BLUEPRINTS` injection token from your root module. Let's imagine you have a custom localization resource for required inputs. +You can overwrite an existing error message by passing validation options to the `ThemeSharedModule` in your root module. Let's imagine you have a custom localization resource for required inputs. ```json "RequiredInput": "Oops! We need this input." @@ -50,19 +79,48 @@ To use this instead of the built-in required input message, all you need to do i ```js import { VALIDATION_BLUEPRINTS } from "@ngx-validate/core"; +import { DEFAULT_VALIDATION_BLUEPRINTS } from "@abp/ng.theme.shared"; @NgModule({ + imports: [ + ThemeSharedModule.forRoot({ + validation: { + blueprints: { + required: "::RequiredInput", + }, + }, + + // rest of theme shared config + }), + + // other imports + ], + // rest of the module metadata +}) +export class AppModule {} +``` + +Alternatively, you may provide the `VALIDATION_BLUEPRINTS` token directly in your root module. Please do not forget to spread `DEFAULT_VALIDATION_BLUEPRINTS`. Otherwise, built-in ABP validation messages will not work. +```js +import { VALIDATION_BLUEPRINTS } from "@ngx-validate/core"; +import { DEFAULT_VALIDATION_BLUEPRINTS } from "@abp/ng.theme.shared"; + +@NgModule({ providers: [ - // other providers { provide: VALIDATION_BLUEPRINTS, useValue: { + ...DEFAULT_VALIDATION_BLUEPRINTS, required: "::RequiredInput", }, }, + + // other providers ], + + // rest of the module metadata }) export class AppModule {} ``` diff --git a/docs/en/UI/Angular/Page-Toolbar-Extensions.md b/docs/en/UI/Angular/Page-Toolbar-Extensions.md new file mode 100644 index 0000000000..7e63950224 --- /dev/null +++ b/docs/en/UI/Angular/Page-Toolbar-Extensions.md @@ -0,0 +1,402 @@ +# Page Toolbar Extensions for Angular UI + +## Introduction + +Page toolbar extension system allows you to add a new action to the toolbar of a page. A "Click Me" action was added to the user management page below: + +Page Toolbar Extension Example: 'Click Me!' Action + +You can take any action (open a modal, make an HTTP API call, redirect to another page... etc) by writing your custom code. You can also access to page data (the main record, usually an entity list) in your code. Additionally, you can pass in custom components instead of using the default button. + +## How to Add an Action to Page Toolbar + +In this example, we will add a "Click Me!" action and log `userName` of all users in the user management page of the [Identity Module](../../Modules/Identity.md) to the console. + +### Step 1. Create Toolbar Action Contributors + +The following code prepares a constant named `identityToolbarActionContributors`, ready to be imported and used in your root module: + +```js +// src/app/toolbar-action-contributors.ts + +import { + eIdentityComponents, + IdentityToolbarActionContributors, + IdentityUserDto, +} from '@abp/ng.identity'; +import { ToolbarAction, ToolbarActionList } from '@abp/ng.theme.shared/extensions'; + +const logUserNames = new ToolbarAction({ + text: 'Click Me!', + action: data => { + // Replace log with your custom code + data.record.forEach(user => console.log(user.userName)); + }, + // See ToolbarActionOptions in API section for all options +}); + +export function logUserNamesContributor(actionList: ToolbarActionList) { + actionList.addHead(logUserNames); +} + +export const identityToolbarActionContributors: IdentityToolbarActionContributors = { + // enum indicates the page to add contributors to + [eIdentityComponents.Users]: [ + logUserNamesContributor, + // You can add more contributors here + ], +}; + +``` + +The list of actions, conveniently named as `actionList`, is a **doubly linked list**. That is why we have used the `addHead` method, which adds the given value to the beginning of the list. You may find [all available methods here](../Common/Utils/Linked-List.md). + +### Step 2. Import and Use Toolbar Action Contributors + +Import `identityToolbarActionContributors` in your routing module and pass it to the static `forLazy` method of `IdentityModule` as seen below: + +```js +// src/app/app-routing.module.ts + +// other imports +import { identityToolbarActionContributors } from './toolbar-action-contributors'; + +const routes: Routes = [ + // other routes + + { + path: 'identity', + loadChildren: () => + import('@abp/ng.identity').then(m => + m.IdentityModule.forLazy({ + toolbarActionContributors: identityToolbarActionContributors, + }) + ), + }, + + // other routes +]; +``` + +That is it, `logUserNames` toolbar action will be added as the first action on the page toolbar in the users page (`UsersComponent`) of the `IdentityModule`. + +## How to Add a Custom Component to Page Toolbar + +In this example, we will add a custom "Click Me!" button and log `userName` of all users in the user management page of the [Identity Module](../../Modules/Identity.md) to the console. + +Page Toolbar Extension Example: Custom Component + +### Step 1. Create A Custom Component + +We need to have a component before we can pass it to the toolbar action contributors: + +```js +// src/app/click-me-button.component.ts + +import { IdentityUserDto } from '@abp/ng.identity'; +import { ActionData, EXTENSIONS_ACTION_DATA } from '@abp/ng.theme.shared/extensions'; +import { Component, Inject } from '@angular/core'; + +@Component({ + selector: 'app-click-me-button', + template: ``, +}) +export class ClickMeButtonComponent { + constructor( + @Inject(EXTENSIONS_ACTION_DATA) + private data: ActionData + ) {} + + handleClick() { + this.data.record.forEach(user => console.log(user.userName)); + } +} + +``` + +Here, `EXTENSIONS_ACTION_DATA` token provides us the context from the page toolbar. Therefore, we are able to reach the page data via `record`, which is an array of users, i.e. `IdentityUserDto[]`. + +> We could also import `EXTENSIONS_ACTION_CALLBACK` from **@abp/ng.theme.shared/extensions** package, which is a higher order function that triggers the predefined `action` when called. It passes `ActionData` as the first parameter, so you do not have to pass it explicitly. In other words, `EXTENSIONS_ACTION_CALLBACK` can be called without any parameters and it will not fail. + +### Step 2. Create Toolbar Action Contributors + +The following code prepares a constant named `identityToolbarActionContributors`, ready to be imported and used in your root module. When `ToolbarComponent` is used instead of `ToolbarAction`, we can pass a component in: + +```js +// src/app/toolbar-action-contributors.ts + +import { + eIdentityComponents, + IdentityToolbarActionContributors, + IdentityUserDto, +} from '@abp/ng.identity'; +import { ToolbarActionList, ToolbarComponent } from '@abp/ng.theme.shared/extensions'; +import { ClickMeButtonComponent } from './click-me-button.component'; + +const logUserNames = new ToolbarComponent({ + component: ClickMeButtonComponent, + // See ToolbarActionOptions in API section for all options +}); + +export function logUserNamesContributor(actionList: ToolbarActionList) { + actionList.addHead(logUserNames); +} + +export const identityToolbarActionContributors: IdentityToolbarActionContributors = { + // enum indicates the page to add contributors to + [eIdentityComponents.Users]: [ + logUserNamesContributor, + // You can add more contributors here + ], +}; + +``` + +The list of actions, conveniently named as `actionList`, is a **doubly linked list**. That is why we have used the `addHead` method, which adds the given value to the beginning of the list. You may find [all available methods here](../Common/Utils/Linked-List.md). + +### Step 3. Import and Use Toolbar Action Contributors + +Import `identityToolbarActionContributors` in your routing module and pass it to the static `forLazy` method of `IdentityModule` as seen below. + +```js +// src/app/app-routing.module.ts + +// other imports +import { identityToolbarActionContributors } from './toolbar-action-contributors'; + +const routes: Routes = [ + // other routes + + { + path: 'identity', + loadChildren: () => + import('@abp/ng.identity').then(m => + m.IdentityModule.forLazy({ + toolbarActionContributors: identityToolbarActionContributors, + }) + ), + }, + + // other routes +]; +``` + +That is it, `logUserNames` toolbar action will be added as the first action on the page toolbar in the users page (`UsersComponent`) of the `IdentityModule` and it will be triggered by a custom button, i.e. `ClickMeButtonComponent`. Please note that **component projection is not limited to buttons** and you may use other UI components. + +## How to Place a Custom Modal and Trigger It by Toolbar Actions + +Please check the same topic in [entity action extensions document](Entity-Action-Extensions.md) and replace entity action with a toolbar action. + +## API + +### ActionData\ + +`ActionData` is the shape of the parameter passed to all callbacks or predicates in a `ToolbarAction`. + +It has the following properties: + +- **record** is the page data, the main record on a page, usually an entity list (e.g. list of users). + + ```js + { + text: 'Click Me!', + action: data => { + data.record.forEach(user => { + console.lof(user.userName); + }); + }, + } + ``` + +- **getInjected** is the equivalent of [Injector.get](https://angular.io/api/core/Injector#get). You can use it to reach injected dependencies of `PageToolbarComponent`, including, but not limited to, its parent component. + + ```js + { + text: 'Click Me!', + action: data => { + const restService = data.getInjected(RestService); + + // Use restService public props and methods here + }, + visible: data => { + const usersComponent = data.getInjected(UsersComponent); + + // Use usersComponent public props and methods here + }, + } + ``` + +### ActionCallback\ + +`ActionCallback` is the type of the callback function that can be passed to a `ToolbarAction` as `action` parameter. An action callback gets a single parameter, the `ActionData`. The return type may be anything, including `void`. Here is a simplified representation: + +```js +type ActionCallback = (data?: ActionData) => R; +``` + +### ActionPredicate\ + +`ActionPredicate` is the type of the predicate function that can be passed to a `ToolbarAction` as `visible` parameter. An action predicate gets a single parameter, the `ActionData`. The return type must be `boolean`. Here is a simplified representation: + +```js +type ActionPredicate = (data?: ActionData) => boolean; +``` + +### ToolbarActionOptions\ + +`ToolbarActionOptions` is the type that defines required and optional properties you have to pass in order to create an toolbar action. + +Its type definition is as follows: + +```js +type ToolbarActionOptions = { + action: ActionCallback, + text: string, + icon?: string, + permission?: string, + visible?: ActionPredicate, +}; +``` + +As you see, passing `action` and `text` is enough to create an toolbar action. Here is what each property is good for: + +- **action** is a callback that is called when the toolbar action is clicked. (_required_) +- **text** is the button text which will be localized. (_required_) +- **icon** is the classes that define an icon to be placed before the text. (_default:_ `''`) +- **permission** is the permission context which will be used to decide if this toolbar action should be displayed to the user or not. (_default:_ `undefined`) +- **visible** is a predicate that will be used to decide if the page toolbar should have this action or not. (_default:_ `() => true`) + +You may find a full example below. + +### ToolbarAction\ + +`ToolbarAction` is the class that defines your toolbar actions. It takes an `ToolbarActionOptions` and sets the default values to the properties, creating an toolbar action that can be passed to an toolbar contributor. + +```js +const options: ToolbarActionOptions = { + action: data => { + const service = data.getInjected(MyCustomIdentityService); + const lockedUsers = data.record.filter(user => user.isLockedOut); + service.unlockAll(lockedUsers); + }, + text: 'MyProjectName::UnlockAll', + icon: 'fa fa-unlock', + permission: 'AbpIdentity.Users.Update', + visible: data => data.record.some(user => user.isLockedOut), +}; + +const action = new ToolbarAction(options); +``` + +It also has two static methods to create its instances: + +- **ToolbarAction.create\\(options: ToolbarActionOptions\\)** is used to create an instance of `ToolbarAction`. + ```js + const action = ToolbarAction.create(options); + ``` +- **ToolbarAction.createMany\\(options: ToolbarActionOptions\\[\]\)** is used to create multiple instances of `ToolbarAction` with given array of `ToolbarActionOptions`. + +### ToolbarComponentOptions\ + +`ToolbarComponentOptions` is the type that defines required and optional properties you have to pass in order to create an toolbar component. + +Its type definition is as follows: + +```js +type ToolbarComponentOptions = { + component: Type, + action?: ActionCallback, + permission?: string, + visible?: ActionPredicate, +}; +``` + +As you see, passing `action` and `text` is enough to create an toolbar action. Here is what each property is good for: + +- **component** is the constructor of the component to be projected. (_required_) +- **action** is a predefined callback that you can reach in your component via `EXTENSIONS_ACTION_CALLBACK` token and trigger. (_optional_) +- **permission** is the permission context which will be used to decide if this toolbar action should be displayed to the user or not. (_default:_ `undefined`) +- **visible** is a predicate that will be used to decide if the page toolbar should have this action or not. (_default:_ `() => true`) + +You may find a full example below. + +### ToolbarComponent\ + +`ToolbarComponent` is the class that defines toolbar actions which project a custom component. It takes an `ToolbarComponentOptions` and sets the default values to the properties, creating a toolbar action that can be passed to an toolbar contributor. + +```js +const options: ToolbarComponentOptions = { + component: UnlockAllButton, + action: data => { + const service = data.getInjected(MyCustomIdentityService); + const lockedUsers = data.record.filter(user => user.isLockedOut); + service.unlockAll(lockedUsers); + }, + permission: 'AbpIdentity.Users.Update', + visible: data => data.record.some(user => user.isLockedOut), +}; + +const action = new ToolbarComponent(options); +``` + +It also has two static methods to create its instances: + +- **ToolbarComponent.create\\(options: ToolbarComponentOptions\\)** is used to create an instance of `ToolbarComponent`. + ```js + const action = ToolbarComponent.create(options); + ``` +- **ToolbarComponent.createMany\\(options: ToolbarComponentOptions\\[\]\)** is used to create multiple instances of `ToolbarComponent` with given array of `ToolbarComponentOptions`. + ```js + const actions = ToolbarComponent.createMany(optionsArray); + ``` + +### ToolbarActionList\ + +`ToolbarActionList` is the list of actions passed to every action contributor callback as the first parameter named `actionList`. It is a **doubly linked list**. You may find [all available methods here](../Common/Utils/Linked-List.md). + +The items in the list will be displayed according to the linked list order, i.e. from head to tail. If you want to re-order them, all you have to do is something like this: + +```js +export function reorderUserContributors( + actionList: ToolbarActionList, +) { + // drop "New User" button + const newUserActionNode = actionList.dropByValue( + 'AbpIdentity::NewUser', + (action, text) => action['text'] === text, + ); + + // add it back to the head of the list + actionList.addHead(newUserActionNode.value); +} + +export const identityEntityActionContributors = { + [eIdentityComponents.Users]: [ + logUserNamesContributor, + reorderUserContributors, + ], +}; +``` + +### ToolbarActionContributorCallback\ + +`ToolbarActionContributorCallback` is the type that you can pass as toolbar action contributor callbacks to static `forLazy` methods of the modules. + +```js +// exportUsersContributor should have ToolbarActionContributorCallback type + +export function exportUsersContributor( + actionList: ToolbarActionList, +) { + // add exportUsers just before the last action + actionList.add(exportUsers).byIndex(-1); +} + +export const identityEntityActionContributors = { + [eIdentityComponents.Users]: [exportUsersContributor], +}; +``` + +## See Also + +- [Customizing Application Modules Guide](../../Customizing-Application-Modules-Guide.md) diff --git a/docs/en/UI/Angular/images/entity-action-extensions---click-me.gif b/docs/en/UI/Angular/images/entity-action-extensions---click-me.gif new file mode 100644 index 0000000000..6f5191874d Binary files /dev/null and b/docs/en/UI/Angular/images/entity-action-extensions---click-me.gif differ diff --git a/docs/en/UI/Angular/images/entity-action-extensions---custom-modal.gif b/docs/en/UI/Angular/images/entity-action-extensions---custom-modal.gif new file mode 100644 index 0000000000..0b1010e029 Binary files /dev/null and b/docs/en/UI/Angular/images/entity-action-extensions---custom-modal.gif differ diff --git a/docs/en/UI/Angular/images/entity-prop-extensions---custom-cell.gif b/docs/en/UI/Angular/images/entity-prop-extensions---custom-cell.gif new file mode 100644 index 0000000000..2f3d79f701 Binary files /dev/null and b/docs/en/UI/Angular/images/entity-prop-extensions---custom-cell.gif differ diff --git a/docs/en/UI/Angular/images/entity-prop-extensions---name-column.gif b/docs/en/UI/Angular/images/entity-prop-extensions---name-column.gif new file mode 100644 index 0000000000..7c8be58759 Binary files /dev/null and b/docs/en/UI/Angular/images/entity-prop-extensions---name-column.gif differ diff --git a/docs/en/UI/Angular/images/form-prop-extensions---birthday-field.gif b/docs/en/UI/Angular/images/form-prop-extensions---birthday-field.gif new file mode 100644 index 0000000000..dd19f834e0 Binary files /dev/null and b/docs/en/UI/Angular/images/form-prop-extensions---birthday-field.gif differ diff --git a/docs/en/UI/Angular/images/toolbar-action-extensions---click-me.gif b/docs/en/UI/Angular/images/toolbar-action-extensions---click-me.gif new file mode 100644 index 0000000000..b6585184f1 Binary files /dev/null and b/docs/en/UI/Angular/images/toolbar-action-extensions---click-me.gif differ diff --git a/docs/en/UI/Angular/images/toolbar-action-extensions---custom-component.gif b/docs/en/UI/Angular/images/toolbar-action-extensions---custom-component.gif new file mode 100644 index 0000000000..9775dbd1f0 Binary files /dev/null and b/docs/en/UI/Angular/images/toolbar-action-extensions---custom-component.gif differ diff --git a/docs/en/UI/Angular/images/user-action-extension-click-me-ng.png b/docs/en/UI/Angular/images/user-action-extension-click-me-ng.png new file mode 100644 index 0000000000..675f05217a Binary files /dev/null and b/docs/en/UI/Angular/images/user-action-extension-click-me-ng.png differ diff --git a/docs/en/UI/Angular/images/user-page-toolbar-extension-click-me-ng.png b/docs/en/UI/Angular/images/user-page-toolbar-extension-click-me-ng.png new file mode 100644 index 0000000000..fcd36e4a7b Binary files /dev/null and b/docs/en/UI/Angular/images/user-page-toolbar-extension-click-me-ng.png differ diff --git a/docs/en/UI/Angular/images/user-page-toolbar-extension-custom-click-me-ng.png b/docs/en/UI/Angular/images/user-page-toolbar-extension-custom-click-me-ng.png new file mode 100644 index 0000000000..d8fd054eda Binary files /dev/null and b/docs/en/UI/Angular/images/user-page-toolbar-extension-custom-click-me-ng.png differ diff --git a/docs/en/UI/Angular/images/user-prop-extension-date-of-birth-field-ng.png b/docs/en/UI/Angular/images/user-prop-extension-date-of-birth-field-ng.png new file mode 100644 index 0000000000..948c4a9fd5 Binary files /dev/null and b/docs/en/UI/Angular/images/user-prop-extension-date-of-birth-field-ng.png differ diff --git a/docs/en/UI/Angular/images/user-prop-extension-name-column-ng.png b/docs/en/UI/Angular/images/user-prop-extension-name-column-ng.png new file mode 100644 index 0000000000..82d72b40ec Binary files /dev/null and b/docs/en/UI/Angular/images/user-prop-extension-name-column-ng.png differ diff --git a/docs/en/UI/AspNetCore/Page-Toolbar-Extensions.md b/docs/en/UI/AspNetCore/Page-Toolbar-Extensions.md new file mode 100644 index 0000000000..db466bebdb --- /dev/null +++ b/docs/en/UI/AspNetCore/Page-Toolbar-Extensions.md @@ -0,0 +1,163 @@ +# Page Toolbar Extensions for ASP.NET Core UI + +Page toolbar system allows you to add components to the toolbar of any page. The page toolbar is the area right to the header of a page. A button ("Import users from excel") was added to the user management page below: + +![page-toolbar-button](../../images/page-toolbar-button.png) + +You can add any type of view component item to the page toolbar or modify existing items. + +## How to Set Up + +In this example, we will add an "Import users from excel" button and execute a JavaScript code for the user management page of the [Identity Module](../../Modules/Identity.md). + +### Add a New Button to the User Management Page + +Write the following code inside the `ConfigureServices` of your web module class: + +````csharp +Configure(options => +{ + options.Configure(toolbar => + { + toolbar.AddButton( + LocalizableString.Create("ImportFromExcel"), + icon: "file-import", + id: "ImportUsersFromExcel", + type: AbpButtonType.Secondary + ); + }); +}); +```` + +`AddButton` is a shortcut to simply add a button component. Note that you need to add the `ImportFromExcel` to your localization dictionary (json file) to localize the text. + +When you run the application, you will see the button added next to the current button list. There are some other parameters of the `AddButton` method (for example, use `order` to set the order of the button component relative to the other components). + +### Create a JavaScript File + +Now, we can go to the client side to handle click event of the new button. First, add a new JavaScript file to your solution. We added inside the `/Pages/Identity/Users` folder of the `.Web` project: + +![user-action-extension-on-solution](../../images/user-action-extension-on-solution.png) + +Here, the content of this JavaScript file: + +````js +$(function () { + $('#ImportUsersFromExcel').click(function (e) { + e.preventDefault(); + alert('TODO: import users from excel'); + }); +}); +```` + +In the `click` event, you can do anything you need to do. + +### Add the File to the User Management Page + +Then you need to add this JavaScript file to the user management page. You can take the power of the [Bundling & Minification system](Bundling-Minification.md). + +Write the following code inside the `ConfigureServices` of your module class: + +````csharp +Configure(options => +{ + options.ScriptBundles.Configure( + typeof(Volo.Abp.Identity.Web.Pages.Identity.Users.IndexModel).FullName, + bundleConfiguration => + { + bundleConfiguration.AddFiles( + "/Pages/Identity/Users/my-user-extensions.js" + ); + }); +}); +```` + +This configuration adds `my-user-extensions.js` to the user management page of the Identity Module. `typeof(Volo.Abp.Identity.Web.Pages.Identity.Users.IndexModel).FullName` is the name of the bundle in the user management page. This is a common convention used for all the ABP Commercial modules. + +## Advanced Use Cases + +While you typically want to add a button action to the page toolbar, it is possible to add any type of component. + +### Add View Component to a Page Toolbar + +First, create a new view component in your project: + +![page-toolbar-custom-component](../../images/page-toolbar-custom-component.png) + +For this example, we've created a `MyToolbarItem` view component under the `/Pages/Identity/Users/MyToolbarItem` folder. + +`MyToolbarItemViewComponent.cs` content: + +````csharp +public class MyToolbarItemViewComponent : AbpViewComponent +{ + public IViewComponentResult Invoke() + { + return View("~/Pages/Identity/Users/MyToolbarItem/Default.cshtml"); + } +} +```` + +`Default.cshtml` content: + +````xml + + + +```` + +* `.cshtml` file can contain any type of component(s). It is a typical view component. +* `MyToolbarItemViewComponent` can inject and use any service if you need. + +Then you can add the `MyToolbarItemViewComponent` to the user management page: + +````csharp +Configure(options => +{ + options.Configure( + toolbar => + { + toolbar.AddComponent(); + } + ); +}); +```` + +* If your component accepts arguments (in the `Invoke`/`InvokeAsync` method), you can pass them to the `AddComponent` method as an anonymous object. + +#### Permissions + +If your button/component should be available based on a [permission/policy](../../Authorization.md), you can pass the permission/policy name as the `requiredPolicyName` parameter to the `AddButton` and `AddComponent` methods. + +### Add a Page Toolbar Contributor + +If you perform advanced custom logic while adding an item to a page toolbar, you can create a class that implements the `IPageToolbarContributor` interface or inherits from the `PageToolbarContributor` class: + +````csharp +public class MyToolbarContributor : PageToolbarContributor +{ + public override Task ContributeAsync(PageToolbarContributionContext context) + { + context.Items.Insert(0, new PageToolbarItem(typeof(MyToolbarItemViewComponent))); + + return Task.CompletedTask; + } +} +```` + +* You can use `context.ServiceProvider` to resolve dependencies if you need. + +Then add your class to the `Contributors` list: + +````csharp +Configure(options => +{ + options.Configure( + toolbar => + { + toolbar.Contributors.Add(new MyToolbarContributor()); + } + ); +}); +```` + diff --git a/docs/en/UI/Blazor/Navigation-Menu.md b/docs/en/UI/Blazor/Navigation-Menu.md index 331de7a4cb..7f09a65dbb 100644 --- a/docs/en/UI/Blazor/Navigation-Menu.md +++ b/docs/en/UI/Blazor/Navigation-Menu.md @@ -137,7 +137,7 @@ var myService = context.ServiceProvider.GetRequiredService(); ### The Administration Menu -There is a special menu item in the menu menu that is added by the ABP Framework: The *Administration* menu. It is typically used by the pre-built admin [application modules](../../Modules/Index.md): +There is a special menu item in the menu that is added by the ABP Framework: The *Administration* menu. It is typically used by the pre-built admin [application modules](../../Modules/Index.md): ![nav-main-menu-administration](../../images/nav-main-menu-administration.png) diff --git a/docs/en/UI/Blazor/Page-Progress.md b/docs/en/UI/Blazor/Page-Progress.md new file mode 100644 index 0000000000..149c35293e --- /dev/null +++ b/docs/en/UI/Blazor/Page-Progress.md @@ -0,0 +1,3 @@ +# Blazor UI: Page Progress + +TODO \ No newline at end of file diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index edfebc9544..217467e666 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -353,22 +353,8 @@ "path": "PlugIn-Modules.md" }, { - "text": "Customizing the Application Modules", - "path": "Customizing-Application-Modules-Guide.md", - "items": [ - { - "text": "Extending Entities", - "path": "Customizing-Application-Modules-Extending-Entities.md" - }, - { - "text": "Overriding Services", - "path": "Customizing-Application-Modules-Overriding-Services.md" - }, - { - "text": "Overriding the User Interface", - "path": "Customizing-Application-Modules-Overriding-User-Interface.md" - } - ] + "text": "Customizing/Extending Modules", + "path": "Customizing-Application-Modules-Guide.md" }, { "text": "Best Practices", diff --git a/docs/en/images/page-toolbar-button.png b/docs/en/images/page-toolbar-button.png new file mode 100644 index 0000000000..05e3f9da11 Binary files /dev/null and b/docs/en/images/page-toolbar-button.png differ diff --git a/docs/en/images/page-toolbar-custom-component.png b/docs/en/images/page-toolbar-custom-component.png new file mode 100644 index 0000000000..a15ef4854c Binary files /dev/null and b/docs/en/images/page-toolbar-custom-component.png differ diff --git a/docs/zh-Hans/Blob-Storing-Aliyun.md b/docs/zh-Hans/Blob-Storing-Aliyun.md index ded28fbc93..c8a1e68bc7 100644 --- a/docs/zh-Hans/Blob-Storing-Aliyun.md +++ b/docs/zh-Hans/Blob-Storing-Aliyun.md @@ -55,7 +55,7 @@ Configure(options => * **RoleSessionName** ([NotNull]string): 用来标识临时访问凭证的名称,建议使用不同的应用程序用户来区分. * **Policy** (string): 在扮演角色的时候额外添加的权限限制. 请参见[基于RAM Policy的权限控制](https://help.aliyun.com/document_detail/100680.html). * **DurationSeconds** (int): 设置临时访问凭证的有效期,单位是s,最小为900,最大为3600. -* **ContainerName** (string): 你可以在aliyun中指定容器名称. 如果没有指定它将使用 `BlogContainerName` 属性定义的BLOB容器的名称(请参阅[BLOB存储文档](Blob-Storing.md)). 请注意Aliyun有一些**命名容器的规则**,容器名称必须是有效的DNS名称,[符合以下命名规则](https://help.aliyun.com/knowledge_detail/39668.html): +* **ContainerName** (string): 你可以在aliyun中指定容器名称. 如果没有指定它将使用 `BlobContainerName` 属性定义的BLOB容器的名称(请参阅[BLOB存储文档](Blob-Storing.md)). 请注意Aliyun有一些**命名容器的规则**,容器名称必须是有效的DNS名称,[符合以下命名规则](https://help.aliyun.com/knowledge_detail/39668.html): * 只能包含小写字母,数字和短横线(-) * 必须以小写字母和数字开头和结尾 * Bucket名称的长度限制在**3**到**63**个字符之间 diff --git a/docs/zh-Hans/Blob-Storing-Aws.md b/docs/zh-Hans/Blob-Storing-Aws.md index 0ecb59bbf5..7bfb998297 100644 --- a/docs/zh-Hans/Blob-Storing-Aws.md +++ b/docs/zh-Hans/Blob-Storing-Aws.md @@ -59,7 +59,7 @@ Configure(options => * **Region** (string): 服务的地区名称. * **Policy** (string): JSON格式的IAM策略. * **DurationSeconds** (int): 设置临时访问凭证的有效期,单位是s,最小为900,最大为129600. -* **ContainerName** (string): 你可以在Aws中指定容器名称. 如果没有指定它将使用 `BlogContainerName` 属性定义的BLOB容器的名称(请参阅[BLOB存储文档](Blob-Storing.md)). 请注意Aws有一些**命名容器的规则**,容器名称必须是有效的DNS名称,[符合以下命名规则](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html): +* **ContainerName** (string): 你可以在Aws中指定容器名称. 如果没有指定它将使用 `BlobContainerName` 属性定义的BLOB容器的名称(请参阅[BLOB存储文档](Blob-Storing.md)). 请注意Aws有一些**命名容器的规则**,容器名称必须是有效的DNS名称,[符合以下命名规则](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html): * Bucket名称必须介于 3 到 63 个字符之间. * Bucket名称只能由小写字母、数字、句点 (.) 和连字符 (-) 组成. * Bucket名称必须以字母或数字开头和结尾. diff --git a/docs/zh-Hans/Blob-Storing-Azure.md b/docs/zh-Hans/Blob-Storing-Azure.md index b6f54cd72c..8eecc1fde3 100644 --- a/docs/zh-Hans/Blob-Storing-Azure.md +++ b/docs/zh-Hans/Blob-Storing-Azure.md @@ -40,7 +40,7 @@ Configure(options => ### 选项 * **ConnectionString** (string): 连接字符串包括应用程序在运行时使用共享密钥授权访问Azure存储帐户中的数据所需的授权信息. 请参考[Azure文档](https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string). -* **ContainerName** (string): 你可以在azure中指定容器名称. 如果没有指定它将使用 `BlogContainerName` 属性定义的BLOB容器的名称(请参阅[BLOB存储文档](Blob-Storing.md)). 请注意Azure有一些**命名容器的规则**,容器名称必须是有效的DNS名称,[符合以下命名规则](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names): +* **ContainerName** (string): 你可以在azure中指定容器名称. 如果没有指定它将使用 `BlobContainerName` 属性定义的BLOB容器的名称(请参阅[BLOB存储文档](Blob-Storing.md)). 请注意Azure有一些**命名容器的规则**,容器名称必须是有效的DNS名称,[符合以下命名规则](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names): * 容器名称必须以字母或数字开头或结尾,并且只能包含字母,数字和破折号(-)字符. * 每个破折号(-)必须紧跟在字母或数字之后;容器名称中不允许使用连续的破折号. * 容器名称中的所有字母都必须**小写**. diff --git a/docs/zh-Hans/Blob-Storing-Minio.md b/docs/zh-Hans/Blob-Storing-Minio.md index 3c4bec721d..fb98281f02 100644 --- a/docs/zh-Hans/Blob-Storing-Minio.md +++ b/docs/zh-Hans/Blob-Storing-Minio.md @@ -43,7 +43,7 @@ Configure(options => * **EndPoint** (string): 你的Minio对象存储服务的URL, 查看文档:https://docs.min.io/docs/dotnet-client-quickstart-guide.html * **AccessKey** (string): Access key是唯一标识你的账户的用户ID, * **SecretKey** (string): Access key是唯一标识你的账户的用户ID -* **BucketName** (string):你可以指定bucket名称,如果没有指定,将使用 `BlogContainerName` 属性定义的BLOB容器的名称(查阅[BLOB storing document](Blob-Storing.md)),MinIO完全兼容S3标准,所以有一些 **bucket命名规则**,必须符合[规则](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html): +* **BucketName** (string):你可以指定bucket名称,如果没有指定,将使用 `BlobContainerName` 属性定义的BLOB容器的名称(查阅[BLOB storing document](Blob-Storing.md)),MinIO完全兼容S3标准,所以有一些 **bucket命名规则**,必须符合[规则](https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html): * Bucket名称必须介于 3 到 63 个字符之间. * Bucket名称只能由小写字母、数字、句点 (.) 和连字符 (-) 组成. * Bucket名称必须以字母或数字开头和结尾. diff --git a/docs/zh-Hans/Blob-Storing.md b/docs/zh-Hans/Blob-Storing.md index c233f3359e..9321c51cb9 100644 --- a/docs/zh-Hans/Blob-Storing.md +++ b/docs/zh-Hans/Blob-Storing.md @@ -10,7 +10,7 @@ ABP框架为BLOB提供了抽象,并提供了一些可以轻松集成到的预构 * 你可以**轻松的更改**BLOB存储,而不用改变你的应用程序代码. * 如果你想创建**可重用的应用程序模块**,无需假设BLOB的存储方式. -ABP BLOG存储系统兼容ABP框架其他功能,如[多租户](Multi-Tenancy.md). +ABP BLOB存储系统兼容ABP框架其他功能,如[多租户](Multi-Tenancy.md). ## BLOB 存储提供程序 @@ -18,9 +18,9 @@ ABP框架已经有以下存储提供程序的实现; * [File System](Blob-Storing-File-System.md):将BLOB作为标准文件存储在本地文件系统的文件夹中. * [Database](Blob-Storing-Database.md): 将BLOB存储在数据库中. -* [Azure](Blob-Storing-Azure.md): 将BLOG存储在 [Azure BLOB storage](https://azure.microsoft.com/en-us/services/storage/blobs/)中. +* [Azure](Blob-Storing-Azure.md): 将BLOB存储在 [Azure BLOB storage](https://azure.microsoft.com/en-us/services/storage/blobs/)中. * [Aliyun](Blob-Storing-Aliyun.md): 将BLOB存储在[Aliyun Storage Service](https://help.aliyun.com/product/31815.html)中. -* [Ninio](Blob-Storing-Minio.md): 将BLOB存储在[MinIO Object storage](https://min.io/)中. +* [Minio](Blob-Storing-Minio.md): 将BLOB存储在[MinIO Object storage](https://min.io/)中. * [Aws](Blob-Storing-Aws.md): 将BLOB存储在[Amazon Simple Storage Service](https://aws.amazon.com/s3/)中. 以后会实现更多的提供程序,你可以为自己喜欢的提供程序创建[请求](https://github.com/abpframework/abp/issues/new),或者你也可以[自己实现](Blob-Storing-Custom-Provider.md)它并[贡献](Contribution/Index.md)到ABP框架. @@ -95,9 +95,9 @@ namespace AbpDemo ### 读取/获取 BLOB * `GetAsync`: 返回给定BLOB名称可用于读取BLOB内容的 `Stream` 对象. 使用后始终要**dispose流**. 如果找不到具有给定名称的BLOB,则抛出异常. -* `GetOrNullAsync`: 与 `GetAsync` 方法相反,如果未找到给定名称的BLOG,则返回 `null`. +* `GetOrNullAsync`: 与 `GetAsync` 方法相反,如果未找到给定名称的BLOB,则返回 `null`. * `GetAllBytesAsync`: 返回 `byte[]` 而不是 `Stream`. 如果找不到具有给定名称的BLOB,则抛出异常. -* `GetAllBytesOrNullAsync`: 与 `GetAllBytesAsync` 方法相反,如果未找到给定名称的BLOG,则返回 `null`. +* `GetAllBytesOrNullAsync`: 与 `GetAllBytesAsync` 方法相反,如果未找到给定名称的BLOB,则返回 `null`. ### 删除 BLOB @@ -300,7 +300,7 @@ Configure(options => ## BLOB 存储 vs 文件管理系统 -注意BLOB存储不是一个文件管理系统. 它是一个用于保存,获取和删除命名BLOG的低级别系统. 它不提供目录那样的层次结构,这是典型文件系统所期望的. +注意BLOB存储不是一个文件管理系统. 它是一个用于保存,获取和删除命名BLOB的低级别系统. 它不提供目录那样的层次结构,这是典型文件系统所期望的. 如果你想创建文件夹并在文件夹之间移动文件,为文件分配权限并在用户之间共享文件,那么你需要在BLOB存储系统上实现你自己的应用程序. diff --git a/docs/zh-Hans/CLI.md b/docs/zh-Hans/CLI.md index 4c63dcd818..4a02b1c3c8 100644 --- a/docs/zh-Hans/CLI.md +++ b/docs/zh-Hans/CLI.md @@ -103,7 +103,7 @@ abp new Acme.BookStore * `--preview`: 使用最新的预览版本. * `--template-source` 或者 `-ts`: 指定自定义模板源用于生成项目,可以使用本地源和网络源(例如 `D:\local-templat` 或 `https://.../my-template-file.zip`). * `--create-solution-folder` 或者 `-csf`: 指定项目是在输出文件夹中的新文件夹中还是直接在输出文件夹中. -* `--connection-string` 或者 `-cs`: 重写所有 `appsettings.json` 文件的默认连接字符串. 默认连接字符串是 `Server=localhost;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true`. 默认的数据库提供程序是 `SQL Server`. 如果你使用EF Core但需要更改DBMS,可以按[这里所述](Entity-Framework-Core-Other-DBMS.md)进行更改(创建解决方案之后). +* `--connection-string` 或者 `-cs`: 重写所有 `appsettings.json` 文件的默认连接字符串. 默认连接字符串是 `Server=localhost;Database=MyProjectName;Trusted_Connection=True`. 默认的数据库提供程序是 `SQL Server`. 如果你使用EF Core但需要更改DBMS,可以按[这里所述](Entity-Framework-Core-Other-DBMS.md)进行更改(创建解决方案之后). * `--local-framework-ref --abp-path`: 使用对项目的本地引用,而不是替换为NuGet包引用. ### update diff --git a/docs/zh-Hans/Entity-Framework-Core-Migrations.md b/docs/zh-Hans/Entity-Framework-Core-Migrations.md index 266c0f46b0..8708516f76 100644 --- a/docs/zh-Hans/Entity-Framework-Core-Migrations.md +++ b/docs/zh-Hans/Entity-Framework-Core-Migrations.md @@ -588,7 +588,7 @@ public class IdentityRoleExtendingService : ITransientDependency ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True" } ```` @@ -596,10 +596,10 @@ public class IdentityRoleExtendingService : ITransientDependency ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true", - "AbpPermissionManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True;MultipleActiveResultSets=true", - "AbpSettingManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True;MultipleActiveResultSets=true", - "AbpAuditLogging": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True", + "AbpPermissionManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True", + "AbpSettingManagement": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True", + "AbpAuditLogging": "Server=localhost;Database=BookStore_SecondDb;Trusted_Connection=True" } ```` diff --git a/docs/zh-Hans/Modules/Docs.md b/docs/zh-Hans/Modules/Docs.md index acc956be1b..1d09552e50 100644 --- a/docs/zh-Hans/Modules/Docs.md +++ b/docs/zh-Hans/Modules/Docs.md @@ -47,7 +47,7 @@ ABP框架的[文档](docs.abp.io)也是使用的此模块. ```json { "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProject;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProject;Trusted_Connection=True" } } ``` diff --git a/docs/zh-Hans/Samples/Microservice-Demo.md b/docs/zh-Hans/Samples/Microservice-Demo.md index 59fa98e057..ca8b90a03f 100644 --- a/docs/zh-Hans/Samples/Microservice-Demo.md +++ b/docs/zh-Hans/Samples/Microservice-Demo.md @@ -843,7 +843,7 @@ Swagger UI已配置,是此服务的默认页面. 如果你导航到URL`http://lo ````json "ConnectionStrings": { - "Default": "Server=localhost;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", + "Default": "Server=localhost;Database=MsDemo_Identity;Trusted_Connection=True", "Blogging": "mongodb://localhost/MsDemo_Blogging" } ```` @@ -969,8 +969,8 @@ public class ProductServiceMigrationDbContext : AbpDbContext Task.CompletedTask); + + options.Events.OnAuthorizationCodeReceived = receivedContext => { - OnAuthorizationCodeReceived = receivedContext => - { - var tenantKey = receivedContext.HttpContext.RequestServices - .GetRequiredService>().Value.TenantKey; - - if (receivedContext.HttpContext.Request != null && - receivedContext.Request.Cookies.ContainsKey(tenantKey)) - { - receivedContext.TokenEndpointRequest.SetParameter(tenantKey, - receivedContext.Request.Cookies[tenantKey]); - } - - return Task.CompletedTask; - } + SetAbpTenantId(receivedContext); + return authorizationCodeReceived.Invoke(receivedContext); }; - - configureOptions?.Invoke(options); }); } + + private static void SetAbpTenantId(AuthorizationCodeReceivedContext receivedContext) + { + var tenantKey = receivedContext.HttpContext.RequestServices + .GetRequiredService>().Value.TenantKey; + + if (receivedContext.Request.Cookies.ContainsKey(tenantKey)) + { + receivedContext.TokenEndpointRequest.SetParameter(tenantKey, + receivedContext.Request.Cookies[tenantKey]); + } + } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/PagerModel.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/PagerModel.cs index 980aacee8a..3c4eb1b88e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/PagerModel.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/PagerModel.cs @@ -69,7 +69,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination } /// - /// Gets first two, previous & current & next, last two pages + /// Gets first two, previous, current, next, last two pages /// private List GetPagesWithGaps() { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/en-GB.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/en-GB.json new file mode 100644 index 0000000000..be5593fbd3 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/en-GB.json @@ -0,0 +1,12 @@ +{ + "culture": "en-GB", + "texts": { + "GivenTenantIsNotAvailable": "Given tenant is not available: {0}", + "Tenant": "Tenant", + "Switch": "switch", + "Name": "Name", + "SwitchTenantHint": "Leave the name field blank to switch to the host side.", + "SwitchTenant": "Switch tenant", + "NotSelected": "Not selected" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/ui-extensions.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/ui-extensions.js index eacfecc867..e6061219b0 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/ui-extensions.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/ui-extensions.js @@ -96,7 +96,7 @@ get: _get }; })(); - + function initializeObjectExtensions() { var getShortEnumTypeName = function (enumType) { @@ -149,7 +149,7 @@ return defaultValue; } - + function localizeEnumMember(property, enumMemberValue) { var enumType = property.config.type; var enumInfo = abp.objectExtensions.enums[enumType]; @@ -188,10 +188,28 @@ var propertyName = propertyNames[i]; var propertyConfig = objectConfig.properties[propertyName]; if (propertyConfig.ui.onTable.isVisible) { - tableProperties.push({ - name: propertyName, - config: propertyConfig - }); + if (propertyName.endsWith("_Text")) { + var lookupPropertyName = propertyName.replace("_Text", ""); + var lookupProperty = objectConfig.properties[lookupPropertyName]; + if (lookupProperty) { + tableProperties.push({ + name: propertyName, + config: propertyConfig, + lookupPropertyName: lookupPropertyName, + lookupPropertyDisplayName: lookupProperty.displayName + }); + } else { + tableProperties.push({ + name: propertyName, + config: propertyConfig, + }); + } + } else { + tableProperties.push({ + name: propertyName, + config: propertyConfig, + }); + } } } @@ -199,19 +217,23 @@ } function getValueFromRow(property, row) { - return row.extraProperties[property.name];; + return row.extraProperties[property.name]; } function convertPropertyToColumnConfig(property) { var columnConfig = { - title: localizeDisplayName(property.name, property.config.displayName), data: "extraProperties." + property.name, orderable: false }; + if (property.lookupPropertyName) { + columnConfig.title = localizeDisplayName(property.lookupPropertyName, property.lookupPropertyDisplayName); + } else { + columnConfig.title = localizeDisplayName(property.name, property.config.displayName); + } if (property.config.typeSimple === 'enum') { - columnConfig.render = function(data, type, row) { + columnConfig.render = function (data, type, row) { var value = getValueFromRow(property, row); return localizeEnumMember(property, value); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs index 552ce7e04e..43dedf916f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs @@ -46,7 +46,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow var options = CreateOptions(context, unitOfWorkAttr); //Trying to begin a reserved UOW by AbpUnitOfWorkMiddleware - if (_unitOfWorkManager.TryBeginReserved(AbpUnitOfWorkMiddleware.UnitOfWorkReservationName, options)) + if (_unitOfWorkManager.TryBeginReserved(UnitOfWork.UnitOfWorkReservationName, options)) { var result = await next(); if (!Succeed(result)) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs index bcef10ecd4..960c47b591 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs @@ -50,7 +50,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow var options = CreateOptions(context, unitOfWorkAttr); //Trying to begin a reserved UOW by AbpUnitOfWorkMiddleware - if (_unitOfWorkManager.TryBeginReserved(AbpUnitOfWorkMiddleware.UnitOfWorkReservationName, options)) + if (_unitOfWorkManager.TryBeginReserved(UnitOfWork.UnitOfWorkReservationName, options)) { var result = await next(); if (!Succeed(result)) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs index c9ac1be509..aeb6f8a8c0 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AbpUnitOfWorkMiddleware.cs @@ -7,8 +7,6 @@ namespace Volo.Abp.AspNetCore.Uow { public class AbpUnitOfWorkMiddleware : IMiddleware, ITransientDependency { - public const string UnitOfWorkReservationName = "_AbpActionUnitOfWork"; - private readonly IUnitOfWorkManager _unitOfWorkManager; public AbpUnitOfWorkMiddleware(IUnitOfWorkManager unitOfWorkManager) @@ -18,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Uow public async Task InvokeAsync(HttpContext context, RequestDelegate next) { - using (var uow = _unitOfWorkManager.Reserve(UnitOfWorkReservationName)) + using (var uow = _unitOfWorkManager.Reserve(UnitOfWork.UnitOfWorkReservationName)) { await next(context); await uow.CompleteAsync(context.RequestAborted); diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs new file mode 100644 index 0000000000..fd1d20d905 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProvider.cs @@ -0,0 +1,52 @@ +using System; +using System.Net.Http; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Options; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Uow; + +namespace Volo.Abp.AspNetCore.Uow +{ + public class AspNetCoreUnitOfWorkTransactionBehaviourProvider : IUnitOfWorkTransactionBehaviourProvider, ISingletonDependency + { + private readonly IHttpContextAccessor _httpContextAccessor; + private readonly AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions _options; + + public virtual bool? IsTransactional + { + get + { + var httpContext = _httpContextAccessor.HttpContext; + if (httpContext == null) + { + return null; + } + + var currentUrl = httpContext.Request.Path.Value; + if (currentUrl != null) + { + foreach (var url in _options.NonTransactionalUrls) + { + if (currentUrl.StartsWith(url, StringComparison.OrdinalIgnoreCase)) + { + return false; + } + } + } + + return !string.Equals( + httpContext.Request.Method, + HttpMethod.Get.Method, StringComparison.OrdinalIgnoreCase + ); + } + } + + public AspNetCoreUnitOfWorkTransactionBehaviourProvider( + IHttpContextAccessor httpContextAccessor, + IOptions options) + { + _httpContextAccessor = httpContextAccessor; + _options = options.Value; + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions.cs new file mode 100644 index 0000000000..dd612a008d --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Uow/AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace Volo.Abp.AspNetCore.Uow +{ + public class AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions + { + public List NonTransactionalUrls { get; } + + public AspNetCoreUnitOfWorkTransactionBehaviourProviderOptions() + { + NonTransactionalUrls = new List + { + "/connect/" + }; + } + } +} diff --git a/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs b/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs index 499c2431c5..516e842563 100644 --- a/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs +++ b/framework/src/Volo.Abp.Authorization/Microsoft/AspNetCore/Authorization/AuthorizationOptionsExtensions.cs @@ -11,9 +11,9 @@ namespace Microsoft.AspNetCore.Authorization /// /// Gets all policies. - /// + /// /// IMPORTANT NOTE: Use this method carefully. - /// It relies on reflection to get all policies from a private field of the . + /// It relies on reflection to get all policies from a private field of the . /// This method may be removed in the future if internals of changes. /// /// @@ -23,4 +23,4 @@ namespace Microsoft.AspNetCore.Authorization return ((IDictionary) PolicyMapProperty.GetValue(options)).Keys.ToList(); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/en-GB.json b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/en-GB.json new file mode 100644 index 0000000000..eabf109a5c --- /dev/null +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Localization/en-GB.json @@ -0,0 +1,10 @@ +{ + "culture": "en-GB", + "texts": { + "Volo.Authorization:010001": "Authorisation failed! Given policy has not granted.", + "Volo.Authorization:010002": "Authorisation failed! Given policy has not granted: {PolicyName}", + "Volo.Authorization:010003": "Authorisation failed! Given policy has not granted for given resource: {ResourceName}", + "Volo.Authorization:010004": "Authorisation failed! Given requirement has not granted for given resource: {ResourceName}", + "Volo.Authorization:010005": "Authorisation failed! Given requirements has not granted for given resource: {ResourceName}" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs index 602fdd9c50..38873fe1b8 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionDefinition.cs @@ -54,7 +54,7 @@ namespace Volo.Abp.Authorization.Permissions /// /// Disabling a permission would be helpful to hide a related application /// functionality from users/clients. - /// + /// /// Default: true. /// public bool IsEnabled { get; set; } @@ -64,8 +64,8 @@ namespace Volo.Abp.Authorization.Permissions /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// public object this[string name] { @@ -74,7 +74,7 @@ namespace Volo.Abp.Authorization.Permissions } protected internal PermissionDefinition( - [NotNull] string name, + [NotNull] string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both, bool isEnabled = true) @@ -90,14 +90,14 @@ namespace Volo.Abp.Authorization.Permissions } public virtual PermissionDefinition AddChild( - [NotNull] string name, + [NotNull] string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both, bool isEnabled = true) { var child = new PermissionDefinition( - name, - displayName, + name, + displayName, multiTenancySide, isEnabled) { @@ -138,4 +138,4 @@ namespace Volo.Abp.Authorization.Permissions return $"[{nameof(PermissionDefinition)} {Name}]"; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs index 5038e8e064..6d3a937a94 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/PermissionGroupDefinition.cs @@ -36,8 +36,8 @@ namespace Volo.Abp.Authorization.Permissions /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// public object this[string name] { @@ -46,7 +46,7 @@ namespace Volo.Abp.Authorization.Permissions } protected internal PermissionGroupDefinition( - string name, + string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both) { @@ -59,7 +59,7 @@ namespace Volo.Abp.Authorization.Permissions } public virtual PermissionDefinition AddPermission( - string name, + string name, ILocalizableString displayName = null, MultiTenancySides multiTenancySide = MultiTenancySides.Both, bool isEnabled = true) @@ -131,4 +131,4 @@ namespace Volo.Abp.Authorization.Permissions return null; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs b/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs new file mode 100644 index 0000000000..86fc494676 --- /dev/null +++ b/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs @@ -0,0 +1,34 @@ +using System; +using System.Linq; +using AutoMapper; +using AutoMapper.Internal; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AutoMapper +{ + public class AbpAutoMapperConventionalRegistrar : ConventionalRegistrarBase + { + protected readonly Type[] OpenTypes = { + typeof(IValueResolver<,,>), + typeof(IMemberValueResolver<,,,>), + typeof(ITypeConverter<,>), + typeof(IValueConverter<,>), + typeof(IMappingAction<,>) + }; + + public override void AddType(IServiceCollection services, Type type) + { + if (IsConventionalRegistrationDisabled(type)) + { + return; + } + + if (type.IsClass && !type.IsAbstract && OpenTypes.Any(type.ImplementsGenericInterface)) + { + services.TryAddTransient(type); + } + } + } +} diff --git a/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs b/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs index 214872e371..25707e3899 100644 --- a/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs +++ b/framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs @@ -13,24 +13,23 @@ namespace Volo.Abp.AutoMapper typeof(AbpObjectMappingModule), typeof(AbpObjectExtendingModule), typeof(AbpAuditingModule) - )] + )] public class AbpAutoMapperModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) + public override void PreConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAutoMapperObjectMapper(); - - var mapperAccessor = new MapperAccessor(); - context.Services.AddSingleton(_ => mapperAccessor); - context.Services.AddSingleton(_ => mapperAccessor); + context.Services.AddConventionalRegistrar(new AbpAutoMapperConventionalRegistrar()); } - public override void OnPreApplicationInitialization(ApplicationInitializationContext context) + public override void ConfigureServices(ServiceConfigurationContext context) { - CreateMappings(context.ServiceProvider); + context.Services.AddAutoMapperObjectMapper(); + + context.Services.AddSingleton(provider => CreateMappings(provider)); + context.Services.AddSingleton(provider => provider.GetRequiredService()); } - private void CreateMappings(IServiceProvider serviceProvider) + private MapperAccessor CreateMappings(IServiceProvider serviceProvider) { using (var scope = serviceProvider.CreateScope()) { @@ -48,7 +47,7 @@ namespace Volo.Abp.AutoMapper { foreach (var profileType in options.ValidatingProfiles) { - config.AssertConfigurationIsValid(((Profile)Activator.CreateInstance(profileType)).ProfileName); + config.AssertConfigurationIsValid(((Profile) Activator.CreateInstance(profileType)).ProfileName); } } @@ -59,7 +58,10 @@ namespace Volo.Abp.AutoMapper ValidateAll(mapperConfiguration); - scope.ServiceProvider.GetRequiredService().Mapper = mapperConfiguration.CreateMapper(); + return new MapperAccessor + { + Mapper = new Mapper(mapperConfiguration, serviceProvider.GetService) + }; } } } diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs index e0f7ec50ad..f1a6264683 100644 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs +++ b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs @@ -1,6 +1,6 @@ // This software is part of the Autofac IoC container // Copyright © 2015 Autofac Contributors -// http://autofac.org +// https://autofac.org // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -24,10 +24,13 @@ // OTHER DEALINGS IN THE SOFTWARE. using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Reflection; using Autofac.Builder; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Autofac; +using Volo.Abp; using Volo.Abp.Modularity; namespace Autofac.Extensions.DependencyInjection @@ -46,16 +49,62 @@ namespace Autofac.Extensions.DependencyInjection /// The into which the registrations should be made. /// /// - /// The set of service descriptors to register in the container. + /// A container builder that can be used to create an . /// public static void Populate( - this ContainerBuilder builder, - IServiceCollection services) + this ContainerBuilder builder, + IServiceCollection services) { - builder.RegisterType().As(); - builder.RegisterType().As(); + Populate(builder, services, null); + } + + /// + /// Populates the Autofac container builder with the set of registered service descriptors + /// and makes and + /// available in the container. Using this overload is incompatible with the ASP.NET Core + /// support for . + /// + /// + /// The into which the registrations should be made. + /// + /// + /// A container builder that can be used to create an . + /// + /// + /// If provided and not then all registrations with lifetime are registered + /// using + /// with provided + /// instead of using . + /// + /// + /// + /// Specifying a addresses a specific case where you have + /// an application that uses Autofac but where you need to isolate a set of services in a child scope. For example, + /// if you have a large application that self-hosts ASP.NET Core items, you may want to isolate the ASP.NET + /// Core registrations in a child lifetime scope so they don't show up for the rest of the application. + /// This overload allows that. Note it is the developer's responsibility to execute this and create an + /// using the child lifetime scope. + /// + /// + public static void Populate( + this ContainerBuilder builder, + IServiceCollection services, + object lifetimeScopeTagForSingletons) + { + if (services == null) + { + throw new ArgumentNullException(nameof(services)); + } - Register(builder, services); + builder.RegisterType().As().ExternallyOwned(); + var autofacServiceScopeFactory = typeof(AutofacServiceProvider).Assembly.GetType("Autofac.Extensions.DependencyInjection.AutofacServiceScopeFactory"); + if (autofacServiceScopeFactory == null) + { + throw new AbpException("Unable get type of Autofac.Extensions.DependencyInjection.AutofacServiceScopeFactory!"); + } + builder.RegisterType(autofacServiceScopeFactory).As(); + + Register(builder, services, lifetimeScopeTagForSingletons); } /// @@ -65,18 +114,33 @@ namespace Autofac.Extensions.DependencyInjection /// The object registration style. /// The registration being built. /// The lifecycle specified on the service registration. + /// + /// If not then all registrations with lifetime are registered + /// using + /// with provided + /// instead of using . + /// /// /// The , configured with the proper lifetime scope, /// and available for additional configuration. /// private static IRegistrationBuilder ConfigureLifecycle( - this IRegistrationBuilder registrationBuilder, - ServiceLifetime lifecycleKind) + this IRegistrationBuilder registrationBuilder, + ServiceLifetime lifecycleKind, + object lifetimeScopeTagForSingleton) { switch (lifecycleKind) { case ServiceLifetime.Singleton: - registrationBuilder.SingleInstance(); + if (lifetimeScopeTagForSingleton == null) + { + registrationBuilder.SingleInstance(); + } + else + { + registrationBuilder.InstancePerMatchingLifetimeScope(lifetimeScopeTagForSingleton); + } + break; case ServiceLifetime.Scoped: registrationBuilder.InstancePerLifetimeScope(); @@ -96,59 +160,67 @@ namespace Autofac.Extensions.DependencyInjection /// The into which the registrations should be made. /// /// - /// The set of service descriptors to register in the container. + /// A container builder that can be used to create an . + /// + /// + /// If not then all registrations with lifetime are registered + /// using + /// with provided + /// instead of using . /// + [SuppressMessage("CA2000", "CA2000", Justification = "Registrations created here are disposed when the built container is disposed.")] private static void Register( - ContainerBuilder builder, - IServiceCollection services) + ContainerBuilder builder, + IServiceCollection services, + object lifetimeScopeTagForSingletons) { var moduleContainer = services.GetSingletonInstance(); var registrationActionList = services.GetRegistrationActionList(); - foreach (var service in services) + foreach (var descriptor in services) { - if (service.ImplementationType != null) + if (descriptor.ImplementationType != null) { // Test if the an open generic type is being registered - var serviceTypeInfo = service.ServiceType.GetTypeInfo(); + var serviceTypeInfo = descriptor.ServiceType.GetTypeInfo(); if (serviceTypeInfo.IsGenericTypeDefinition) { builder - .RegisterGeneric(service.ImplementationType) - .As(service.ServiceType) - .ConfigureLifecycle(service.Lifetime) + .RegisterGeneric(descriptor.ImplementationType) + .As(descriptor.ServiceType) + .ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons) .FindConstructorsWith(new AbpAutofacConstructorFinder()) .ConfigureAbpConventions(moduleContainer, registrationActionList); } else { builder - .RegisterType(service.ImplementationType) - .As(service.ServiceType) - .ConfigureLifecycle(service.Lifetime) + .RegisterType(descriptor.ImplementationType) + .As(descriptor.ServiceType) + .ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons) .FindConstructorsWith(new AbpAutofacConstructorFinder()) .ConfigureAbpConventions(moduleContainer, registrationActionList); } } - else if (service.ImplementationFactory != null) + else if (descriptor.ImplementationFactory != null) { - var registration = RegistrationBuilder.ForDelegate(service.ServiceType, (context, parameters) => - { - var serviceProvider = context.Resolve(); - return service.ImplementationFactory(serviceProvider); - }) - .ConfigureLifecycle(service.Lifetime) - .CreateRegistration(); - //TODO: ConfigureAbpConventions ? + var registration = RegistrationBuilder.ForDelegate(descriptor.ServiceType, (context, parameters) => + { + var serviceProvider = context.Resolve(); + return descriptor.ImplementationFactory(serviceProvider); + }) + .ConfigureLifecycle(descriptor.Lifetime, lifetimeScopeTagForSingletons) + .CreateRegistration(); + //TODO: ConfigureAbpConventions ? builder.RegisterComponent(registration); } else { builder - .RegisterInstance(service.ImplementationInstance) - .As(service.ServiceType) - .ConfigureLifecycle(service.Lifetime); + .RegisterInstance(descriptor.ImplementationInstance) + .As(descriptor.ServiceType) + .ConfigureLifecycle(descriptor.Lifetime, null); } } } diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProvider.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProvider.cs deleted file mode 100644 index 1c1a24ff66..0000000000 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProvider.cs +++ /dev/null @@ -1,122 +0,0 @@ -// This software is part of the Autofac IoC container -// Copyright © 2015 Autofac Contributors -// https://autofac.org -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. - -using System; -using Microsoft.Extensions.DependencyInjection; - -namespace Autofac.Extensions.DependencyInjection -{ - /// - /// Autofac implementation of the ASP.NET Core . - /// - /// - /// - public class AutofacServiceProvider : IServiceProvider, ISupportRequiredService, IDisposable - { - private readonly ILifetimeScope _lifetimeScope; - - private bool _disposed = false; - - /// - /// Initializes a new instance of the class. - /// - /// - /// The lifetime scope from which services will be resolved. - /// - public AutofacServiceProvider(ILifetimeScope lifetimeScope) - { - this._lifetimeScope = lifetimeScope; - } - - /// - /// Gets service of type from the - /// and requires it be present. - /// - /// - /// An object that specifies the type of service object to get. - /// - /// - /// A service object of type . - /// - /// - /// Thrown if the isn't registered with the container. - /// - /// - /// Thrown if the object can't be resolved from the container. - /// - public object GetRequiredService(Type serviceType) - { - return this._lifetimeScope.Resolve(serviceType); - } - - /// - /// Gets the service object of the specified type. - /// - /// - /// An object that specifies the type of service object to get. - /// - /// - /// A service object of type ; or - /// if there is no service object of type . - /// - public object GetService(Type serviceType) - { - return this._lifetimeScope.ResolveOptional(serviceType); - } - - /// - /// Gets the underlying instance of . - /// - public ILifetimeScope LifetimeScope => _lifetimeScope; - - /// - /// Releases unmanaged and - optionally - managed resources. - /// - /// - /// to release both managed and unmanaged resources; - /// to release only unmanaged resources. - /// - protected virtual void Dispose(bool disposing) - { - if (!this._disposed) - { - this._disposed = true; - if (disposing) - { - this._lifetimeScope.Dispose(); - } - } - } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - this.Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs deleted file mode 100644 index 21a7ca331d..0000000000 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceProviderFactory.cs +++ /dev/null @@ -1,77 +0,0 @@ -// This software is part of the Autofac IoC container -// Copyright © 2017 Autofac Contributors -// http://autofac.org -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. - -using System; -using Microsoft.Extensions.DependencyInjection; - -namespace Autofac.Extensions.DependencyInjection -{ - /// - /// A factory for creating a and an . - /// - public class AutofacServiceProviderFactory : IServiceProviderFactory - { - private readonly Action _configurationAction; - - /// - /// Initializes a new instance of the class. - /// - /// Action on a that adds component registrations to the container. - public AutofacServiceProviderFactory(Action configurationAction = null) - { - _configurationAction = configurationAction ?? (builder => { }); - } - - /// - /// Creates a container builder from an . - /// - /// The collection of services - /// A container builder that can be used to create an . - public ContainerBuilder CreateBuilder(IServiceCollection services) - { - var builder = new ContainerBuilder(); - - builder.Populate(services); - - _configurationAction(builder); - - return builder; - } - - /// - /// Creates an from the container builder. - /// - /// The container builder - /// An - public IServiceProvider CreateServiceProvider(ContainerBuilder containerBuilder) - { - if (containerBuilder == null) throw new ArgumentNullException(nameof(containerBuilder)); - - var container = containerBuilder.Build(); - - return new AutofacServiceProvider(container); - } - } -} diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceScope.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceScope.cs deleted file mode 100644 index 425c6769da..0000000000 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceScope.cs +++ /dev/null @@ -1,67 +0,0 @@ -// This software is part of the Autofac IoC container -// Copyright © 2015 Autofac Contributors -// http://autofac.org -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. - -using System; -using Microsoft.Extensions.DependencyInjection; - -namespace Autofac.Extensions.DependencyInjection -{ - /// - /// Autofac implementation of the ASP.NET Core . - /// - /// - internal class AutofacServiceScope : IServiceScope - { - private readonly ILifetimeScope _lifetimeScope; - - /// - /// Initializes a new instance of the class. - /// - /// - /// The lifetime scope from which services should be resolved for this service scope. - /// - public AutofacServiceScope(ILifetimeScope lifetimeScope) - { - this._lifetimeScope = lifetimeScope; - this.ServiceProvider = this._lifetimeScope.Resolve(); - } - - /// - /// Gets an corresponding to this service scope. - /// - /// - /// An that can be used to resolve dependencies from the scope. - /// - public IServiceProvider ServiceProvider { get; } - - /// - /// Disposes of the lifetime scope and resolved disposable services. - /// - public void Dispose() - { - this._lifetimeScope.Dispose(); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceScopeFactory.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceScopeFactory.cs deleted file mode 100644 index 31917fd079..0000000000 --- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacServiceScopeFactory.cs +++ /dev/null @@ -1,65 +0,0 @@ -// This software is part of the Autofac IoC container -// Copyright © 2015 Autofac Contributors -// http://autofac.org -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. - -using System.Diagnostics.CodeAnalysis; -using Microsoft.Extensions.DependencyInjection; - -namespace Autofac.Extensions.DependencyInjection -{ - /// - /// Autofac implementation of the ASP.NET Core . - /// - /// - [SuppressMessage("Microsoft.ApiDesignGuidelines", "CA2213", Justification = "The creator of the root service lifetime scope is responsible for disposal.")] - internal class AutofacServiceScopeFactory : IServiceScopeFactory - { - private readonly ILifetimeScope _lifetimeScope; - - /// - /// Initializes a new instance of the class. - /// - /// The lifetime scope. - public AutofacServiceScopeFactory(ILifetimeScope lifetimeScope) - { - this._lifetimeScope = lifetimeScope; - } - - /// - /// Creates an which contains an - /// used to resolve dependencies within - /// the scope. - /// - /// - /// An controlling the lifetime of the scope. Once - /// this is disposed, any scoped services that have been resolved - /// from the - /// will also be disposed. - /// - public IServiceScope CreateScope() - { - return new AutofacServiceScope(this._lifetimeScope.BeginLifetimeScope()); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj index ec9e4c0364..a57ac74e62 100644 --- a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj +++ b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj @@ -15,8 +15,10 @@ - + + + diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs index 262d95d35b..18f38128db 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IAsyncBackgroundJob.cs @@ -8,9 +8,9 @@ namespace Volo.Abp.BackgroundJobs public interface IAsyncBackgroundJob { /// - /// Executes the job with the . + /// Executes the job with the . /// /// Job arguments. Task ExecuteAsync(TArgs args); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs index e7c942ec4c..94b75f4c91 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/IBackgroundJob.cs @@ -6,9 +6,9 @@ public interface IBackgroundJob { /// - /// Executes the job with the . + /// Executes the job with the . /// /// Job arguments. void Execute(TArgs args); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/AbpBackgroundWorkersQuartzModule.cs b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/AbpBackgroundWorkersQuartzModule.cs index 9cfc748c4e..a47f8dac77 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/AbpBackgroundWorkersQuartzModule.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/AbpBackgroundWorkersQuartzModule.cs @@ -26,20 +26,20 @@ namespace Volo.Abp.BackgroundWorkers.Quartz public override void OnPreApplicationInitialization(ApplicationInitializationContext context) { - var options = context.ServiceProvider.GetService>().Value; + var options = context.ServiceProvider.GetRequiredService>().Value; if (!options.IsEnabled) { - var quartzOptions = context.ServiceProvider.GetService>().Value; - quartzOptions.StartSchedulerFactory = scheduler => Task.CompletedTask; + var quartzOptions = context.ServiceProvider.GetRequiredService>().Value; + quartzOptions.StartSchedulerFactory = _ => Task.CompletedTask; } } public override void OnApplicationInitialization(ApplicationInitializationContext context) { - var quartzBackgroundWorkerOptions = context.ServiceProvider.GetService>().Value; + var quartzBackgroundWorkerOptions = context.ServiceProvider.GetRequiredService>().Value; if (quartzBackgroundWorkerOptions.IsAutoRegisterEnabled) { - var backgroundWorkerManager = context.ServiceProvider.GetService(); + var backgroundWorkerManager = context.ServiceProvider.GetRequiredService(); var works = context.ServiceProvider.GetServices().Where(x=>x.AutoRegister); foreach (var work in works) diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs index 970beea3f0..0b75f389fe 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerAdapter.cs @@ -57,7 +57,7 @@ namespace Volo.Abp.BackgroundWorkers.Quartz .Build(); } - public async override Task Execute(IJobExecutionContext context) + public override async Task Execute(IJobExecutionContext context) { var worker = (IBackgroundWorker) ServiceProvider.GetService(typeof(TWorker)); var workerContext = new PeriodicBackgroundWorkerContext(ServiceProvider); diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerManager.cs b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerManager.cs index d670c1db98..582a7dd520 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerManager.cs +++ b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/QuartzBackgroundWorkerManager.cs @@ -19,14 +19,17 @@ namespace Volo.Abp.BackgroundWorkers.Quartz public virtual async Task StartAsync(CancellationToken cancellationToken = default) { - await _scheduler.ResumeAll(cancellationToken); + if (_scheduler.IsStarted && _scheduler.InStandbyMode) + { + await _scheduler.Start(cancellationToken); + } } public virtual async Task StopAsync(CancellationToken cancellationToken = default) { - if (!_scheduler.IsShutdown) + if (_scheduler.IsStarted && !_scheduler.InStandbyMode) { - await _scheduler.PauseAll(cancellationToken); + await _scheduler.Standby(cancellationToken); } } diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index 612034af19..9a820600bd 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -439,10 +439,10 @@ namespace Volo.Abp.BlazoriseUI } /// - /// Calls IAuthorizationService.CheckAsync for the given . + /// Calls IAuthorizationService.CheckAsync for the given . /// Throws if given policy was not granted for the current user. /// - /// Does nothing if is null or empty. + /// Does nothing if is null or empty. /// /// A policy name to check protected virtual async Task CheckPolicyAsync([CanBeNull] string policyName) diff --git a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs index aa0fecaf09..d6c9303afd 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs +++ b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProvider.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.BlobStoring.Aliyun var blobName = AliyunBlobNameCalculator.Calculate(args); var aliyunConfig = args.Configuration.GetAliyunConfiguration(); var ossClient = GetOssClient(aliyunConfig); - if (!args.OverrideExisting && BlobExistsAsync(ossClient, containerName, blobName)) + if (!args.OverrideExisting && BlobExists(ossClient, containerName, blobName)) { throw new BlobAlreadyExistsException($"Saving BLOB '{args.BlobName}' does already exists in the container '{containerName}'! Set {nameof(args.OverrideExisting)} if it should be overwritten."); } @@ -57,7 +57,7 @@ namespace Volo.Abp.BlobStoring.Aliyun var containerName = GetContainerName(args); var blobName = AliyunBlobNameCalculator.Calculate(args); var ossClient = GetOssClient(args.Configuration); - if(!BlobExistsAsync(ossClient, containerName, blobName)) + if(!BlobExists(ossClient, containerName, blobName)) { return Task.FromResult(false); } @@ -70,7 +70,7 @@ namespace Volo.Abp.BlobStoring.Aliyun var containerName = GetContainerName(args); var blobName = AliyunBlobNameCalculator.Calculate(args); var ossClient = GetOssClient(args.Configuration); - return Task.FromResult(BlobExistsAsync(ossClient, containerName, blobName)); + return Task.FromResult(BlobExists(ossClient, containerName, blobName)); } public async override Task GetOrNullAsync(BlobProviderGetArgs args) @@ -78,7 +78,7 @@ namespace Volo.Abp.BlobStoring.Aliyun var containerName = GetContainerName(args); var blobName = AliyunBlobNameCalculator.Calculate(args); var ossClient = GetOssClient(args.Configuration); - if (!BlobExistsAsync(ossClient, containerName, blobName)) + if (!BlobExists(ossClient, containerName, blobName)) { return null; } @@ -96,7 +96,7 @@ namespace Volo.Abp.BlobStoring.Aliyun : configuration.ContainerName; } - private bool BlobExistsAsync(IOss ossClient,string containerName, string blobName) + private bool BlobExists(IOss ossClient,string containerName, string blobName) { // Make sure Blob Container exists. return ossClient.DoesBucketExist(containerName) && diff --git a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProviderConfiguration.cs b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProviderConfiguration.cs index 757ad4b54c..276cbd8fc7 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProviderConfiguration.cs +++ b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo/Abp/BlobStoring/Aliyun/AliyunBlobProviderConfiguration.cs @@ -81,7 +81,7 @@ namespace Volo.Abp.BlobStoring.Aliyun /// public string ContainerName { - get => _containerConfiguration.GetConfiguration(AliyunBlobProviderConfigurationNames.ContainerName); + get => _containerConfiguration.GetConfigurationOrDefault(AliyunBlobProviderConfigurationNames.ContainerName); set => _containerConfiguration.SetConfiguration(AliyunBlobProviderConfigurationNames.ContainerName, Check.NotNullOrWhiteSpace(value, nameof(value))); } diff --git a/framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfiguration.cs b/framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfiguration.cs index c2d3297f4e..2be373e428 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfiguration.cs +++ b/framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfiguration.cs @@ -81,7 +81,7 @@ namespace Volo.Abp.BlobStoring.Aws /// public string ContainerName { - get => _containerConfiguration.GetConfiguration(AwsBlobProviderConfigurationNames.ContainerName); + get => _containerConfiguration.GetConfigurationOrDefault(AwsBlobProviderConfigurationNames.ContainerName); set => _containerConfiguration.SetConfiguration(AwsBlobProviderConfigurationNames.ContainerName, Check.NotNullOrWhiteSpace(value, nameof(value))); } diff --git a/framework/src/Volo.Abp.BlobStoring.Azure/Volo/Abp/BlobStoring/Azure/AzureBlobProviderConfiguration.cs b/framework/src/Volo.Abp.BlobStoring.Azure/Volo/Abp/BlobStoring/Azure/AzureBlobProviderConfiguration.cs index 7ab338794b..969057d7d6 100644 --- a/framework/src/Volo.Abp.BlobStoring.Azure/Volo/Abp/BlobStoring/Azure/AzureBlobProviderConfiguration.cs +++ b/framework/src/Volo.Abp.BlobStoring.Azure/Volo/Abp/BlobStoring/Azure/AzureBlobProviderConfiguration.cs @@ -16,7 +16,7 @@ /// public string ContainerName { - get => _containerConfiguration.GetConfiguration(AzureBlobProviderConfigurationNames.ContainerName); + get => _containerConfiguration.GetConfigurationOrDefault(AzureBlobProviderConfigurationNames.ContainerName); set => _containerConfiguration.SetConfiguration(AzureBlobProviderConfigurationNames.ContainerName, Check.NotNullOrWhiteSpace(value, nameof(value))); } diff --git a/framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProviderConfiguration.cs b/framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProviderConfiguration.cs index 63b0132d20..395aa76a72 100644 --- a/framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProviderConfiguration.cs +++ b/framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProviderConfiguration.cs @@ -4,7 +4,7 @@ { public string BucketName { - get => _containerConfiguration.GetConfiguration(MinioBlobProviderConfigurationNames.BucketName); + get => _containerConfiguration.GetConfigurationOrDefault(MinioBlobProviderConfigurationNames.BucketName); set => _containerConfiguration.SetConfiguration(MinioBlobProviderConfigurationNames.BucketName, Check.NotNullOrWhiteSpace(value, nameof(value))); } @@ -42,7 +42,7 @@ { get => _containerConfiguration.GetConfigurationOrDefault(MinioBlobProviderConfigurationNames.WithSSL, false); set => _containerConfiguration.SetConfiguration(MinioBlobProviderConfigurationNames.WithSSL, value); - } + } /// ///Default value: false. diff --git a/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs b/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs index 1dc51a2a72..e2d5ff25e9 100644 --- a/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs +++ b/framework/src/Volo.Abp.BlobStoring/Volo/Abp/BlobStoring/BlobContainerFactoryExtensions.cs @@ -6,7 +6,6 @@ /// Gets a named container. /// /// The blob container manager - /// Cancellation token /// /// The container object. /// @@ -19,4 +18,4 @@ ); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs index 26574c1c68..8129435266 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs @@ -81,11 +81,11 @@ namespace Volo.Abp.Cli.Commands sb.AppendLine(" abp add-module [options]"); sb.AppendLine(""); sb.AppendLine("Options:"); - sb.AppendLine(" --new-template Creates a fresh new module (speсialized for your solution) and adds it your solution."); - sb.AppendLine(" --with-source-code Downloads the source code of the module to your solution folder. (Always True if `--new-template` is used.)"); + sb.AppendLine(" --new Creates a fresh new module (speсialized for your solution) and adds it your solution."); + sb.AppendLine(" --with-source-code Downloads the source code of the module to your solution folder. (Always True if `--new` is used.)"); sb.AppendLine(" --add-to-solution-file Adds the downloaded/created module to your solution file. (only available when --with-source-code used)"); sb.AppendLine(" -s|--solution Specify the solution file explicitly."); - sb.AppendLine(" --skip-db-migrations Specify if a new migration will be added or not. (Always True if `--new-template` is used.)"); + sb.AppendLine(" --skip-db-migrations Specify if a new migration will be added or not. (Always True if `--new` is used.)"); sb.AppendLine(" -sp|--startup-project Relative path to the project folder of the startup project. Default value is the current folder."); sb.AppendLine(" -v|--version Specify the version of the module. Default is your project's ABP version."); sb.AppendLine(""); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index 3bd8aecbc1..c4942d04ab 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -150,6 +150,13 @@ namespace Volo.Abp.Cli.Commands Logger.LogInformation("Output folder: " + outputFolder); + if (connectionString == null && + databaseManagementSystem != DatabaseManagementSystem.NotSpecified && + databaseManagementSystem != DatabaseManagementSystem.SQLServer) + { + connectionString = GetNewConnectionStringByDbms(databaseManagementSystem, outputFolder); + } + commandLineArgs.Options.Add(CliConsts.Command, commandLineArgs.Command); var result = await TemplateProjectBuilder.BuildAsync( @@ -219,6 +226,24 @@ namespace Volo.Abp.Cli.Commands } } + private string GetNewConnectionStringByDbms(DatabaseManagementSystem databaseManagementSystem, string outputFolder) + { + switch (databaseManagementSystem) + { + case DatabaseManagementSystem.MySQL: + return "Server=localhost;Port=3306;Database=MyProjectName;Uid=root;Pwd=myPassword;"; + case DatabaseManagementSystem.PostgreSQL: + return "User ID=root;Password=myPassword;Host=localhost;Port=5432;Database=MyProjectName;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;"; + //case DatabaseManagementSystem.Oracle: + case DatabaseManagementSystem.OracleDevart: + return "Data Source=MyProjectName;Integrated Security=yes;"; + case DatabaseManagementSystem.SQLite: + return $"Data Source={Path.Combine(outputFolder,"database\\MyProjectName.db")};Version=3;"; + default: + return null; + } + } + private void DeleteMigrationsIfNeeded(DatabaseProvider databaseProvider, DatabaseManagementSystem databaseManagementSystem, string outputFolder) { if (databaseManagementSystem == DatabaseManagementSystem.NotSpecified || databaseManagementSystem == DatabaseManagementSystem.SQLServer) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/TemplateProjectBuildPipelineBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/TemplateProjectBuildPipelineBuilder.cs index 9590001ea4..513c2b4198 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/TemplateProjectBuildPipelineBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/TemplateProjectBuildPipelineBuilder.cs @@ -17,6 +17,12 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building pipeline.Steps.Add(new ProjectReferenceReplaceStep()); pipeline.Steps.Add(new TemplateCodeDeleteStep()); + + if (context.BuildArgs.ConnectionString != null) + { + pipeline.Steps.Add(new ConnectionStringChangeStep()); + } + pipeline.Steps.Add(new SolutionRenameStep()); if (context.Template.Name == AppProTemplate.TemplateName || @@ -37,11 +43,6 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building pipeline.Steps.Add(new RemoveRootFolderStep()); } - if (context.BuildArgs.ConnectionString != null) - { - pipeline.Steps.Add(new ConnectionStringChangeStep()); - } - pipeline.Steps.Add(new CreateProjectResultZipStep()); return pipeline; diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Module/ModuleTemplateBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Module/ModuleTemplateBase.cs index ef8385d479..5e8db9a346 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Module/ModuleTemplateBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Module/ModuleTemplateBase.cs @@ -75,7 +75,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.Module private static void UpdateNuGetConfig(ProjectBuildContext context, List steps) { - steps.Add(new UpdateNuGetConfigStep("/aspnet-core/NuGet.Config")); + steps.Add(new UpdateNuGetConfigStep("/NuGet.Config")); } private void CleanupFolderHierarchy(ProjectBuildContext context, List steps) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs index 07896b49a1..8cfbe5cb94 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs @@ -205,14 +205,25 @@ namespace Volo.Abp.Cli.ProjectModification string postFix) { var srcPath = Path.Combine(Path.GetDirectoryName(moduleSolutionFile), targetFolder); + + if (!Directory.Exists(srcPath)) + { + return; + } + var projectFolderPath = Directory.GetDirectories(srcPath).FirstOrDefault(d=> d.EndsWith(postFix)); + + if (projectFolderPath == null) + { + return; + } + await SolutionFileModifier.RemoveProjectFromSolutionFileAsync(moduleSolutionFile, new DirectoryInfo(projectFolderPath).Name); if (Directory.Exists(projectFolderPath)) { Directory.Delete(projectFolderPath, true); } - } private async Task ChangeDomainTestReferenceToMongoDB(ModuleWithMastersInfo module, string moduleSolutionFile) diff --git a/framework/src/Volo.Abp.Cli/Properties/launchSettings.json b/framework/src/Volo.Abp.Cli/Properties/launchSettings.json deleted file mode 100644 index 6846f7adbd..0000000000 --- a/framework/src/Volo.Abp.Cli/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "Volo.Abp.Cli": { - "commandName": "Project", - "commandLineArgs": "bundle --skip-version-check", - "workingDirectory": "C:\\Github\\volo\\abp\\templates\\app-pro\\aspnet-core\\src\\MyCompanyName.MyProjectName.Blazor" - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs index 76ae06a5e0..f272484611 100644 --- a/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpStringExtensions.cs @@ -88,7 +88,7 @@ namespace System /// Gets index of nth occurrence of a char in a string. /// /// source string to be searched - /// Char to search in + /// Char to search in /// Count of the occurrence public static int NthIndexOf(this string str, char c, int n) { diff --git a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs index e014ee9e21..f55bdd3bc8 100644 --- a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs @@ -107,7 +107,7 @@ namespace System.Collections.Generic } /// - /// Removes all items from the collection those satisfy the given . + /// Removes all items from the collection. /// /// Type of the items in the collection /// The collection diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs index 6576f08318..71ea895fd2 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeFinder.cs @@ -37,7 +37,7 @@ namespace Volo.Abp.Reflection allTypes.AddRange(typesInThisAssembly.Where(type => type != null)); } - catch (Exception ex) + catch { //TODO: Trigger a global event? } @@ -46,4 +46,4 @@ namespace Volo.Abp.Reflection return allTypes; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs index 6d21fc2a73..00d25681e4 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Text/Formatting/FormattedStringValueExtracter.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.Text.Formatting /// /// /// Say that str is "My name is Neo." and format is "My name is {name}.". - /// Then Extract method gets "Neo" as "name". + /// Then Extract method gets "Neo" as "name". /// public class FormattedStringValueExtracter { @@ -84,7 +84,7 @@ namespace Volo.Abp.Text.Formatting } /// - /// Checks if given fits to given . + /// Checks if given fits to given . /// Also gets extracted values. /// /// String including dynamic values @@ -127,4 +127,4 @@ namespace Volo.Abp.Text.Formatting } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs index cdb03f8515..39b3eed249 100644 --- a/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs +++ b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/DapperRepository.cs @@ -1,4 +1,6 @@ -using System.Data; +using System; +using System.Data; +using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Storage; using Volo.Abp.EntityFrameworkCore; @@ -16,8 +18,14 @@ namespace Volo.Abp.Domain.Repositories.Dapper _dbContextProvider = dbContextProvider; } + [Obsolete("Use GetDbConnectionAsync method.")] public IDbConnection DbConnection => _dbContextProvider.GetDbContext().Database.GetDbConnection(); + public async Task GetDbConnectionAsync() => (await _dbContextProvider.GetDbContextAsync()).Database.GetDbConnection(); + + [Obsolete("Use GetDbTransactionAsync method.")] public IDbTransaction DbTransaction => _dbContextProvider.GetDbContext().Database.CurrentTransaction?.GetDbTransaction(); + + public async Task GetDbTransactionAsync() => (await _dbContextProvider.GetDbContextAsync()).Database.CurrentTransaction?.GetDbTransaction(); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs index f45be08b54..8145c646a0 100644 --- a/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs +++ b/framework/src/Volo.Abp.Dapper/Volo/Abp/Domain/Repositories/Dapper/IDapperRepository.cs @@ -1,11 +1,19 @@ -using System.Data; +using System; +using System.Data; +using System.Threading.Tasks; namespace Volo.Abp.Domain.Repositories.Dapper { public interface IDapperRepository { + [Obsolete("Use GetDbConnectionAsync method.")] IDbConnection DbConnection { get; } + Task GetDbConnectionAsync(); + + [Obsolete("Use GetDbTransactionAsync method.")] IDbTransaction DbTransaction { get; } + + Task GetDbTransactionAsync(); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs index 6cda2f6e39..6c470312d8 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs @@ -13,8 +13,8 @@ namespace Volo.Abp.Data /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// [CanBeNull] public object this[string name] @@ -45,4 +45,4 @@ namespace Volo.Abp.Data return this; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs index 84221fb271..4d5ce2fb27 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using Microsoft.Extensions.Options; using Volo.Abp.DependencyInjection; @@ -14,7 +15,18 @@ namespace Volo.Abp.Data Options = options.Value; } + [Obsolete("Use ResolveAsync method.")] public virtual string Resolve(string connectionStringName = null) + { + return ResolveInternal(connectionStringName); + } + + public virtual Task ResolveAsync(string connectionStringName = null) + { + return Task.FromResult(ResolveInternal(connectionStringName)); + } + + private string ResolveInternal(string connectionStringName) { //Get module specific value if provided if (!connectionStringName.IsNullOrEmpty()) @@ -25,9 +37,9 @@ namespace Volo.Abp.Data return moduleConnString; } } - + //Get default value return Options.ConnectionStrings.Default; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolver.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolver.cs index e9344ef66a..3bc8e22d78 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolver.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolver.cs @@ -1,10 +1,16 @@ -using JetBrains.Annotations; +using System; +using System.Threading.Tasks; +using JetBrains.Annotations; namespace Volo.Abp.Data { public interface IConnectionStringResolver { [NotNull] + [Obsolete("Use ResolveAsync method.")] string Resolve(string connectionStringName = null); + + [NotNull] + Task ResolveAsync(string connectionStringName = null); } } diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolverExtensions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolverExtensions.cs index e3a89e24e8..1fa097964c 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolverExtensions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolverExtensions.cs @@ -1,10 +1,22 @@ -namespace Volo.Abp.Data +using System; +using System.Threading.Tasks; +using JetBrains.Annotations; + +namespace Volo.Abp.Data { public static class ConnectionStringResolverExtensions { + [NotNull] + [Obsolete("Use ResolveAsync method")] public static string Resolve(this IConnectionStringResolver resolver) { return resolver.Resolve(ConnectionStringNameAttribute.GetConnStringName()); } + + [NotNull] + public static Task ResolveAsync(this IConnectionStringResolver resolver) + { + return resolver.ResolveAsync(ConnectionStringNameAttribute.GetConnStringName()); + } } } diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/en-GB.json b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/en-GB.json new file mode 100644 index 0000000000..aab92d7066 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/en-GB.json @@ -0,0 +1,6 @@ +{ + "culture": "en-GB", + "texts": { + "MaxResultCountExceededExceptionMessage": "{0} can not be more than {1}! Increase {2}.{3} on the server side to allow more results." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs index 91879f030e..0cfb8ceb24 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyCrudAppService.cs @@ -132,7 +132,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to to create a new entity. + /// Maps to to create a new entity. /// It uses by default. /// It can be overriden for custom mapping. /// Overriding this has higher priority than overriding the @@ -143,7 +143,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to to create a new entity. + /// Maps to to create a new entity. /// It uses by default. /// It can be overriden for custom mapping. /// @@ -155,7 +155,7 @@ namespace Volo.Abp.Application.Services } /// - /// Sets Id value for the entity if is . + /// Sets Id value for the entity if is . /// It's used while creating a new entity. /// protected virtual void SetIdForGuids(TEntity entity) @@ -171,7 +171,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to to update the entity. + /// Maps to to update the entity. /// It uses by default. /// It can be overriden for custom mapping. /// Overriding this has higher priority than overriding the @@ -183,7 +183,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to to update the entity. + /// Maps to to update the entity. /// It uses by default. /// It can be overriden for custom mapping. /// diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs index b9ffe3359b..54123bc843 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs @@ -62,7 +62,7 @@ namespace Volo.Abp.Application.Services { await CheckGetListPolicyAsync(); - var query = CreateFilteredQuery(input); + var query = await CreateFilteredQueryAsync(input); var totalCount = await AsyncExecuter.CountAsync(query); @@ -160,13 +160,37 @@ namespace Volo.Abp.Application.Services /// methods. /// /// The input. + [Obsolete("Override the CreateFilteredQueryAsync method instead.")] protected virtual IQueryable CreateFilteredQuery(TGetListInput input) { return ReadOnlyRepository; } /// - /// Maps to . + /// This method should create based on given input. + /// It should filter query if needed, but should not do sorting or paging. + /// Sorting should be done in and paging should be done in + /// methods. + /// + /// The input. + protected virtual async Task> CreateFilteredQueryAsync(TGetListInput input) + { + /* If user has overridden the CreateFilteredQuery method, + * we don't want to make breaking change in this point. + */ +#pragma warning disable 618 + var query = CreateFilteredQuery(input); +#pragma warning restore 618 + if (!ReferenceEquals(query, ReadOnlyRepository)) + { + return query; + } + + return await ReadOnlyRepository.GetQueryableAsync(); + } + + /// + /// Maps to . /// It internally calls the by default. /// It can be overriden for custom mapping. /// Overriding this has higher priority than overriding the @@ -177,7 +201,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to . + /// Maps to . /// It uses by default. /// It can be overriden for custom mapping. /// @@ -187,7 +211,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps a list of to objects. + /// Maps a list of to objects. /// It uses method for each item in the list. /// protected virtual async Task> MapToGetListOutputDtosAsync(List entities) @@ -203,7 +227,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to . + /// Maps to . /// It internally calls the by default. /// It can be overriden for custom mapping. /// Overriding this has higher priority than overriding the @@ -214,7 +238,7 @@ namespace Volo.Abp.Application.Services } /// - /// Maps to . + /// Maps to . /// It uses by default. /// It can be overriden for custom mapping. /// diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs index 111359d7f3..fffde41ba7 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs @@ -80,12 +80,12 @@ namespace Volo.Abp.Application.Services Repository = repository; } - protected async override Task DeleteByIdAsync(TKey id) + protected override async Task DeleteByIdAsync(TKey id) { await Repository.DeleteAsync(id); } - protected async override Task GetEntityByIdAsync(TKey id) + protected override async Task GetEntityByIdAsync(TKey id) { return await Repository.GetAsync(id); } diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs index c585b2ac38..da3f386fd9 100644 --- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs +++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ReadOnlyAppService.cs @@ -38,7 +38,7 @@ namespace Volo.Abp.Application.Services where TGetOutputDto : IEntityDto where TGetListOutputDto : IEntityDto { - protected new IReadOnlyRepository Repository { get; } + protected IReadOnlyRepository Repository { get; } protected ReadOnlyAppService(IReadOnlyRepository repository) : base(repository) @@ -46,7 +46,7 @@ namespace Volo.Abp.Application.Services Repository = repository; } - protected async override Task GetEntityByIdAsync(TKey id) + protected override async Task GetEntityByIdAsync(TKey id) { return await Repository.GetAsync(id); } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs index 368fa2dc96..53d2f142cd 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/IAbpCommonDbContextRegistrationOptionsBuilder.cs @@ -9,11 +9,11 @@ namespace Volo.Abp.DependencyInjection IServiceCollection Services { get; } /// - /// Registers default repositories for this DbContext. + /// Registers default repositories for this DbContext. /// /// /// Registers repositories only for aggregate root entities by default. - /// set to true to include all entities. + /// set to true to include all entities. /// IAbpCommonDbContextRegistrationOptionsBuilder AddDefaultRepositories(bool includeAllEntities = false); @@ -67,4 +67,4 @@ namespace Volo.Abp.DependencyInjection /// The DbContext type to be replaced IAbpCommonDbContextRegistrationOptionsBuilder ReplaceDbContext(Type otherDbContextType); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IReadOnlyRepository.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IReadOnlyRepository.cs index 499a1e58be..80d1425044 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IReadOnlyRepository.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IReadOnlyRepository.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Linq.Expressions; +using System.Threading.Tasks; using Volo.Abp.Domain.Entities; using Volo.Abp.Linq; @@ -11,9 +12,17 @@ namespace Volo.Abp.Domain.Repositories { IAsyncQueryableExecuter AsyncExecuter { get; } + [Obsolete("Use WithDetailsAsync method.")] IQueryable WithDetails(); + [Obsolete("Use WithDetailsAsync method.")] IQueryable WithDetails(params Expression>[] propertySelectors); + + Task> WithDetailsAsync(); //TODO: CancellationToken + + Task> WithDetailsAsync(params Expression>[] propertySelectors); //TODO: CancellationToken + + Task> GetQueryableAsync(); //TODO: CancellationToken } public interface IReadOnlyRepository : IReadOnlyRepository, IReadOnlyBasicRepository diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryAsyncExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryAsyncExtensions.cs index f6191a152f..acc1c3a1bd 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryAsyncExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryAsyncExtensions.cs @@ -12,13 +12,14 @@ namespace Volo.Abp.Domain.Repositories { #region Contains - public static Task ContainsAsync( + public static async Task ContainsAsync( [NotNull] this IReadOnlyRepository repository, [NotNull] T item, CancellationToken cancellationToken = default) where T : class, IEntity { - return repository.AsyncExecuter.ContainsAsync(repository, item, cancellationToken); + var queryable = await repository.GetQueryableAsync(); + return await repository.AsyncExecuter.ContainsAsync(queryable, item, cancellationToken); } #endregion diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs index db0ec2b11c..8781fd9547 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs @@ -17,34 +17,54 @@ namespace Volo.Abp.Domain.Repositories public abstract class RepositoryBase : BasicRepositoryBase, IRepository, IUnitOfWorkManagerAccessor where TEntity : class, IEntity { + [Obsolete("This method will be removed in future versions.")] public virtual Type ElementType => GetQueryable().ElementType; + [Obsolete("This method will be removed in future versions.")] public virtual Expression Expression => GetQueryable().Expression; + [Obsolete("This method will be removed in future versions.")] public virtual IQueryProvider Provider => GetQueryable().Provider; + [Obsolete("Use WithDetailsAsync method.")] public virtual IQueryable WithDetails() { return GetQueryable(); } + [Obsolete("Use WithDetailsAsync method.")] public virtual IQueryable WithDetails(params Expression>[] propertySelectors) { return GetQueryable(); } + public virtual Task> WithDetailsAsync() + { + return GetQueryableAsync(); + } + + public virtual Task> WithDetailsAsync(params Expression>[] propertySelectors) + { + return GetQueryableAsync(); + } + + [Obsolete("This method will be removed in future versions.")] IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } + [Obsolete("This method will be removed in future versions.")] public IEnumerator GetEnumerator() { return GetQueryable().GetEnumerator(); } + [Obsolete("Use GetQueryableAsync method.")] protected abstract IQueryable GetQueryable(); + public abstract Task> GetQueryableAsync(); + public abstract Task FindAsync( Expression> predicate, bool includeDetails = true, @@ -103,8 +123,6 @@ namespace Volo.Abp.Domain.Repositories await DeleteAsync(entity, autoSave, cancellationToken); } - - public async Task DeleteManyAsync([NotNull] IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) { foreach (var id in ids) diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/en-GB.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/en-GB.json new file mode 100644 index 0000000000..85c8072a37 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/en-GB.json @@ -0,0 +1,25 @@ +{ + "culture": "en-GB", + "texts": { + "DisplayName:Abp.Mailing.DefaultFromAddress": "Default from address", + "DisplayName:Abp.Mailing.DefaultFromDisplayName": "Default from display name", + "DisplayName:Abp.Mailing.Smtp.Host": "Host", + "DisplayName:Abp.Mailing.Smtp.Port": "Port", + "DisplayName:Abp.Mailing.Smtp.UserName": "User name", + "DisplayName:Abp.Mailing.Smtp.Password": "Password", + "DisplayName:Abp.Mailing.Smtp.Domain": "Domain", + "DisplayName:Abp.Mailing.Smtp.EnableSsl": "Enable SSL", + "DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Use default credentials", + "Description:Abp.Mailing.DefaultFromAddress": "The default from address", + "Description:Abp.Mailing.DefaultFromDisplayName": "The default from display name", + "Description:Abp.Mailing.Smtp.Host": "The name or IP address of the host used for SMTP transactions.", + "Description:Abp.Mailing.Smtp.Port": "The port used for SMTP transactions.", + "Description:Abp.Mailing.Smtp.UserName": "Username associated with the credentials.", + "Description:Abp.Mailing.Smtp.Password": "The password for the user name associated with the credentials.", + "Description:Abp.Mailing.Smtp.Domain": "The domain or computer name that verifies the credentials.", + "Description:Abp.Mailing.Smtp.EnableSsl": "Whether the SmtpClient uses Secure Sockets Layer (SSL) to encrypt the connection.", + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Whether the DefaultCredentials are sent with requests.", + "TextTemplate:StandardEmailTemplates.Layout": "Default email layout template", + "TextTemplate:StandardEmailTemplates.Message": "Simple message template for emails" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs index 2463062cde..5049a1b61b 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; @@ -7,18 +8,32 @@ namespace Volo.Abp.Domain.Repositories { public static class EfCoreRepositoryExtensions { + [Obsolete("Use GetDbContextAsync method.")] public static DbContext GetDbContext(this IReadOnlyBasicRepository repository) where TEntity : class, IEntity { return repository.ToEfCoreRepository().DbContext; } + public static Task GetDbContextAsync(this IReadOnlyBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToEfCoreRepository().GetDbContextAsync(); + } + + [Obsolete("Use GetDbSetAsync method.")] public static DbSet GetDbSet(this IReadOnlyBasicRepository repository) where TEntity : class, IEntity { return repository.ToEfCoreRepository().DbSet; } + public static Task> GetDbSetAsync(this IReadOnlyBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToEfCoreRepository().GetDbSetAsync(); + } + public static IEfCoreRepository ToEfCoreRepository(this IReadOnlyBasicRepository repository) where TEntity : class, IEntity { diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs index ca885bd4fb..a95ec00e34 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs @@ -1,8 +1,6 @@ -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using Nito.AsyncEx; using System; using System.Collections.Generic; using System.Linq; @@ -21,18 +19,41 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore where TDbContext : IEfCoreDbContext where TEntity : class, IEntity { - public virtual DbSet DbSet => DbContext.Set(); + [Obsolete("Use GetDbContextAsync() method.")] + protected virtual TDbContext DbContext => _dbContextProvider.GetDbContext(); + [Obsolete("Use GetDbContextAsync() method.")] DbContext IEfCoreRepository.DbContext => DbContext.As(); - protected virtual TDbContext DbContext => _dbContextProvider.GetDbContext(); + async Task IEfCoreRepository.GetDbContextAsync() + { + return await GetDbContextAsync() as DbContext; + } + + protected virtual Task GetDbContextAsync() + { + return _dbContextProvider.GetDbContextAsync(); + } + + [Obsolete("Use GetDbSetAsync() method.")] + public virtual DbSet DbSet => DbContext.Set(); + + Task> IEfCoreRepository.GetDbSetAsync() + { + return GetDbSetAsync(); + } + + protected async Task> GetDbSetAsync() + { + return (await GetDbContextAsync()).Set(); + } protected virtual AbpEntityOptions AbpEntityOptions => _entityOptionsLazy.Value; private readonly IDbContextProvider _dbContextProvider; private readonly Lazy> _entityOptionsLazy; - public virtual IGuidGenerator GuidGenerator { get; set; } + public IGuidGenerator GuidGenerator { get; set; } public IEfCoreBulkOperationProvider BulkOperationProvider { get; set; } @@ -49,15 +70,17 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore ); } - public async override Task InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + public override async Task InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) { CheckAndSetId(entity); - var savedEntity = DbSet.Add(entity).Entity; + var dbContext = await GetDbContextAsync(); + + var savedEntity = (await dbContext.Set().AddAsync(entity, GetCancellationToken(cancellationToken))).Entity; if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); + await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } return savedEntity; @@ -65,7 +88,11 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override async Task InsertManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) { - foreach (var entity in entities) + var entityArray = entities.ToArray(); + var dbContext = await GetDbContextAsync(); + cancellationToken = GetCancellationToken(cancellationToken); + + foreach (var entity in entityArray) { CheckAndSetId(entity); } @@ -74,30 +101,32 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { await BulkOperationProvider.InsertManyAsync( this, - entities, + entityArray, autoSave, cancellationToken ); return; } - await DbSet.AddRangeAsync(entities); + await dbContext.Set().AddRangeAsync(entityArray, cancellationToken); if (autoSave) { - await DbContext.SaveChangesAsync(); + await dbContext.SaveChangesAsync(cancellationToken); } } - public async override Task UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + public override async Task UpdateAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) { - DbContext.Attach(entity); + var dbContext = await GetDbContextAsync(); + + dbContext.Attach(entity); - var updatedEntity = DbContext.Update(entity).Entity; + var updatedEntity = dbContext.Update(entity).Entity; if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); + await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } return updatedEntity; @@ -105,6 +134,8 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public override async Task UpdateManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) { + cancellationToken = GetCancellationToken(cancellationToken); + if (BulkOperationProvider != null) { await BulkOperationProvider.UpdateManyAsync( @@ -117,65 +148,76 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore return; } - DbSet.UpdateRange(entities); + var dbContext = await GetDbContextAsync(); + + dbContext.Set().UpdateRange(entities); if (autoSave) { - await DbContext.SaveChangesAsync(); + await dbContext.SaveChangesAsync(cancellationToken); } } - public async override Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + public override async Task DeleteAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) { - DbSet.Remove(entity); + var dbContext = await GetDbContextAsync(); + + dbContext.Set().Remove(entity); if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); + await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } } public override async Task DeleteManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) { + cancellationToken = GetCancellationToken(cancellationToken); + if (BulkOperationProvider != null) { await BulkOperationProvider.DeleteManyAsync( this, entities, autoSave, - cancellationToken); + cancellationToken + ); return; } - DbSet.RemoveRange(entities); + var dbContext = await GetDbContextAsync(); + + dbContext.RemoveRange(entities); if (autoSave) { - await DbContext.SaveChangesAsync(); + await dbContext.SaveChangesAsync(cancellationToken); } } - public async override Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) + public override async Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) { return includeDetails - ? await WithDetails().ToListAsync(GetCancellationToken(cancellationToken)) - : await DbSet.ToListAsync(GetCancellationToken(cancellationToken)); + ? await (await WithDetailsAsync()).ToListAsync(GetCancellationToken(cancellationToken)) + : await (await GetDbSetAsync()).ToListAsync(GetCancellationToken(cancellationToken)); } - public async override Task GetCountAsync(CancellationToken cancellationToken = default) + public override async Task GetCountAsync(CancellationToken cancellationToken = default) { - return await DbSet.LongCountAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()).LongCountAsync(GetCancellationToken(cancellationToken)); } - public async override Task> GetPagedListAsync( + public override async Task> GetPagedListAsync( int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) { - var queryable = includeDetails ? WithDetails() : DbSet; + var queryable = includeDetails + ? await WithDetailsAsync() + : await GetDbSetAsync(); return await queryable .OrderBy(sorting) @@ -183,44 +225,53 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore .ToListAsync(GetCancellationToken(cancellationToken)); } + [Obsolete("Use GetQueryableAsync method.")] protected override IQueryable GetQueryable() { return DbSet.AsQueryable(); } - protected override Task SaveChangesAsync(CancellationToken cancellationToken) + public override async Task> GetQueryableAsync() + { + return (await GetDbSetAsync()).AsQueryable(); + } + + protected override async Task SaveChangesAsync(CancellationToken cancellationToken) { - return DbContext.SaveChangesAsync(cancellationToken); + await (await GetDbContextAsync()).SaveChangesAsync(cancellationToken); } - public async override Task FindAsync( + public override async Task FindAsync( Expression> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails - ? await WithDetails() + ? await (await WithDetailsAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) - : await DbSet + : await (await GetDbSetAsync()) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); } - public async override Task DeleteAsync(Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) + public override async Task DeleteAsync(Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await GetQueryable() + var dbContext = await GetDbContextAsync(); + var dbSet = dbContext.Set(); + + var entities = await dbSet .Where(predicate) .ToListAsync(GetCancellationToken(cancellationToken)); foreach (var entity in entities) { - DbSet.Remove(entity); + dbSet.Remove(entity); } if (autoSave) { - await DbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); + await dbContext.SaveChangesAsync(GetCancellationToken(cancellationToken)); } } @@ -230,7 +281,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore CancellationToken cancellationToken = default) where TProperty : class { - await DbContext + await (await GetDbContextAsync()) .Entry(entity) .Collection(propertyExpression) .LoadAsync(GetCancellationToken(cancellationToken)); @@ -242,12 +293,13 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore CancellationToken cancellationToken = default) where TProperty : class { - await DbContext + await (await GetDbContextAsync()) .Entry(entity) .Reference(propertyExpression) .LoadAsync(GetCancellationToken(cancellationToken)); } + [Obsolete("Use WithDetailsAsync")] public override IQueryable WithDetails() { if (AbpEntityOptions.DefaultWithDetailsFunc == null) @@ -258,10 +310,37 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore return AbpEntityOptions.DefaultWithDetailsFunc(GetQueryable()); } + public override async Task> WithDetailsAsync() + { + if (AbpEntityOptions.DefaultWithDetailsFunc == null) + { + return await base.WithDetailsAsync(); + } + + return AbpEntityOptions.DefaultWithDetailsFunc(await GetQueryableAsync()); + } + + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails(params Expression>[] propertySelectors) { - var query = GetQueryable(); + return IncludeDetails( + GetQueryable(), + propertySelectors + ); + } + public override async Task> WithDetailsAsync(params Expression>[] propertySelectors) + { + return IncludeDetails( + await GetQueryableAsync(), + propertySelectors + ); + } + + private static IQueryable IncludeDetails( + IQueryable query, + Expression>[] propertySelectors) + { if (!propertySelectors.IsNullOrEmpty()) { foreach (var propertySelector in propertySelectors) @@ -273,6 +352,7 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore return query; } + [Obsolete("This method will be deleted in future versions.")] public IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) { return DbSet.AsAsyncEnumerable().GetAsyncEnumerator(cancellationToken); @@ -329,8 +409,8 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public virtual async Task FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails - ? await WithDetails().FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) - : await DbSet.FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); + ? await (await WithDetailsAsync()).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) + : await (await GetDbSetAsync()).FindAsync(new object[] {id}, GetCancellationToken(cancellationToken)); } public virtual async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) @@ -344,9 +424,11 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore await DeleteAsync(entity, autoSave, cancellationToken); } - public async virtual Task DeleteManyAsync([NotNull] IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) + public virtual async Task DeleteManyAsync(IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await DbSet.Where(x => ids.Contains(x.Id)).ToListAsync(); + cancellationToken = GetCancellationToken(cancellationToken); + + var entities = await (await GetDbSetAsync()).Where(x => ids.Contains(x.Id)).ToListAsync(cancellationToken); await DeleteManyAsync(entities, autoSave, cancellationToken); } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs index 31a78f744d..f793dc04ed 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/IEfCoreRepository.cs @@ -1,3 +1,5 @@ +using System; +using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Entities; @@ -6,9 +8,15 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore public interface IEfCoreRepository : IRepository where TEntity : class, IEntity { + [Obsolete("Use GetDbContextAsync() method.")] DbContext DbContext { get; } + [Obsolete("Use GetDbSetAsync() method.")] DbSet DbSet { get; } + + Task GetDbContextAsync(); + + Task> GetDbSetAsync(); } public interface IEfCoreRepository : IEfCoreRepository, IRepository @@ -16,4 +24,4 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore { } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/DbContextOptionsFactory.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/DbContextOptionsFactory.cs index a2d52eac48..0147de12fb 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/DbContextOptionsFactory.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DependencyInjection/DbContextOptionsFactory.cs @@ -86,7 +86,11 @@ namespace Volo.Abp.EntityFrameworkCore.DependencyInjection } var connectionStringName = ConnectionStringNameAttribute.GetConnStringName(); + + //Use DefaultConnectionStringResolver.Resolve when we remove IConnectionStringResolver.Resolve +#pragma warning disable 618 var connectionString = serviceProvider.GetRequiredService().Resolve(connectionStringName); +#pragma warning restore 618 return new DbContextCreationContext( connectionStringName, diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreAsyncQueryableProvider.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreAsyncQueryableProvider.cs index 68ff261588..2a0400c578 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreAsyncQueryableProvider.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreAsyncQueryableProvider.cs @@ -11,7 +11,7 @@ using Volo.Abp.Linq; namespace Volo.Abp.EntityFrameworkCore { - public class EfCoreAsyncQueryableProvider : IAsyncQueryableProvider, ITransientDependency + public class EfCoreAsyncQueryableProvider : IAsyncQueryableProvider, ISingletonDependency { public bool CanExecute(IQueryable queryable) { diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IDbContextProvider.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IDbContextProvider.cs index c4655fddd0..b35436cfbc 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IDbContextProvider.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IDbContextProvider.cs @@ -1,8 +1,14 @@ +using System; +using System.Threading.Tasks; + namespace Volo.Abp.EntityFrameworkCore { - public interface IDbContextProvider + public interface IDbContextProvider where TDbContext : IEfCoreDbContext { + [Obsolete("Use GetDbContextAsync method.")] TDbContext GetDbContext(); + + Task GetDbContextAsync(); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/ObjectExtending/EfCoreObjectExtensionManagerExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/ObjectExtending/EfCoreObjectExtensionManagerExtensions.cs index 14fcc93784..54c1909bb3 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/ObjectExtending/EfCoreObjectExtensionManagerExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/ObjectExtending/EfCoreObjectExtensionManagerExtensions.cs @@ -143,7 +143,9 @@ namespace Volo.Abp.ObjectExtending var propertyBuilder = typeBuilder.Property(property.Type, property.Name); efCoreMapping.EntityTypeAndPropertyBuildAction?.Invoke(typeBuilder, propertyBuilder); +#pragma warning disable 618 efCoreMapping.PropertyBuildAction?.Invoke(propertyBuilder); +#pragma warning restore 618 } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Uow/EntityFrameworkCore/UnitOfWorkDbContextProvider.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Uow/EntityFrameworkCore/UnitOfWorkDbContextProvider.cs index 91ed2f8126..143a5659cc 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Uow/EntityFrameworkCore/UnitOfWorkDbContextProvider.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Uow/EntityFrameworkCore/UnitOfWorkDbContextProvider.cs @@ -1,11 +1,15 @@ using System; +using System.Threading; +using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.DependencyInjection; +using Volo.Abp.Threading; namespace Volo.Abp.Uow.EntityFrameworkCore { @@ -14,19 +18,34 @@ namespace Volo.Abp.Uow.EntityFrameworkCore public class UnitOfWorkDbContextProvider : IDbContextProvider where TDbContext : IEfCoreDbContext { + public ILogger> Logger { get; set; } + private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IConnectionStringResolver _connectionStringResolver; + private readonly ICancellationTokenProvider _cancellationTokenProvider; public UnitOfWorkDbContextProvider( IUnitOfWorkManager unitOfWorkManager, - IConnectionStringResolver connectionStringResolver) + IConnectionStringResolver connectionStringResolver, + ICancellationTokenProvider cancellationTokenProvider) { _unitOfWorkManager = unitOfWorkManager; _connectionStringResolver = connectionStringResolver; + _cancellationTokenProvider = cancellationTokenProvider; + + Logger = NullLogger>.Instance; } + [Obsolete("Use GetDbContextAsync method.")] public TDbContext GetDbContext() { + Logger.LogWarning( + "UnitOfWorkDbContextProvider.GetDbContext is deprecated. Use GetDbContextAsync instead! " + + "You are probably using LINQ (LINQ extensions) directly on a repository. In this case, use repository.GetQueryableAsync() method " + + "to obtain an IQueryable instance and use LINQ (LINQ extensions) on this object. " + ); + Logger.LogWarning(Environment.StackTrace.Truncate(2048)); + var unitOfWork = _unitOfWorkManager.Current; if (unitOfWork == null) { @@ -47,6 +66,33 @@ namespace Volo.Abp.Uow.EntityFrameworkCore return ((EfCoreDatabaseApi)databaseApi).DbContext; } + public async Task GetDbContextAsync() + { + var unitOfWork = _unitOfWorkManager.Current; + if (unitOfWork == null) + { + throw new AbpException("A DbContext can only be created inside a unit of work!"); + } + + var connectionStringName = ConnectionStringNameAttribute.GetConnStringName(); + var connectionString = await _connectionStringResolver.ResolveAsync(connectionStringName); + + var dbContextKey = $"{typeof(TDbContext).FullName}_{connectionString}"; + + var databaseApi = unitOfWork.FindDatabaseApi(dbContextKey); + + if (databaseApi == null) + { + databaseApi = new EfCoreDatabaseApi( + await CreateDbContextAsync(unitOfWork, connectionStringName, connectionString) + ); + + unitOfWork.AddDatabaseApi(dbContextKey, databaseApi); + } + + return ((EfCoreDatabaseApi)databaseApi).DbContext; + } + private TDbContext CreateDbContext(IUnitOfWork unitOfWork, string connectionStringName, string connectionString) { var creationContext = new DbContextCreationContext(connectionStringName, connectionString); @@ -67,6 +113,26 @@ namespace Volo.Abp.Uow.EntityFrameworkCore } } + private async Task CreateDbContextAsync(IUnitOfWork unitOfWork, string connectionStringName, string connectionString) + { + var creationContext = new DbContextCreationContext(connectionStringName, connectionString); + using (DbContextCreationContext.Use(creationContext)) + { + var dbContext = await CreateDbContextAsync(unitOfWork); + + if (dbContext is IAbpEfCoreDbContext abpEfCoreDbContext) + { + abpEfCoreDbContext.Initialize( + new AbpEfCoreDbContextInitializationContext( + unitOfWork + ) + ); + } + + return dbContext; + } + } + private TDbContext CreateDbContext(IUnitOfWork unitOfWork) { return unitOfWork.Options.IsTransactional @@ -74,7 +140,16 @@ namespace Volo.Abp.Uow.EntityFrameworkCore : unitOfWork.ServiceProvider.GetRequiredService(); } - public TDbContext CreateDbContextWithTransaction(IUnitOfWork unitOfWork) + private async Task CreateDbContextAsync(IUnitOfWork unitOfWork) + { + Logger.LogDebug($"Creating a new DbContext of type {typeof(TDbContext).FullName}"); + + return unitOfWork.Options.IsTransactional + ? await CreateDbContextWithTransactionAsync(unitOfWork) + : unitOfWork.ServiceProvider.GetRequiredService(); + } + + private TDbContext CreateDbContextWithTransaction(IUnitOfWork unitOfWork) { var transactionApiKey = $"EntityFrameworkCore_{DbContextCreationContext.Current.ConnectionString}"; var activeTransaction = unitOfWork.FindTransactionApi(transactionApiKey) as EfCoreTransactionApi; @@ -117,5 +192,54 @@ namespace Volo.Abp.Uow.EntityFrameworkCore return dbContext; } } + + private async Task CreateDbContextWithTransactionAsync(IUnitOfWork unitOfWork) + { + var transactionApiKey = $"EntityFrameworkCore_{DbContextCreationContext.Current.ConnectionString}"; + var activeTransaction = unitOfWork.FindTransactionApi(transactionApiKey) as EfCoreTransactionApi; + + if (activeTransaction == null) + { + var dbContext = unitOfWork.ServiceProvider.GetRequiredService(); + + var dbTransaction = unitOfWork.Options.IsolationLevel.HasValue + ? await dbContext.Database.BeginTransactionAsync(unitOfWork.Options.IsolationLevel.Value, GetCancellationToken()) + : await dbContext.Database.BeginTransactionAsync(GetCancellationToken()); + + unitOfWork.AddTransactionApi( + transactionApiKey, + new EfCoreTransactionApi( + dbTransaction, + dbContext + ) + ); + + return dbContext; + } + else + { + DbContextCreationContext.Current.ExistingConnection = activeTransaction.DbContextTransaction.GetDbTransaction().Connection; + + var dbContext = unitOfWork.ServiceProvider.GetRequiredService(); + + if (dbContext.As().HasRelationalTransactionManager()) + { + await dbContext.Database.UseTransactionAsync(activeTransaction.DbContextTransaction.GetDbTransaction(), GetCancellationToken()); + } + else + { + await dbContext.Database.BeginTransactionAsync(GetCancellationToken()); //TODO: Why not using the new created transaction? + } + + activeTransaction.AttendedDbContexts.Add(dbContext); + + return dbContext; + } + } + + protected virtual CancellationToken GetCancellationToken(CancellationToken preferredValue = default) + { + return _cancellationTokenProvider.FallbackToProvider(preferredValue); + } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs index 1d93c05580..d28b3ab2a4 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs @@ -33,7 +33,7 @@ namespace Volo.Abp.EventBus /// /// Registers to an event. - /// A new instance of object is created for every event occurrence. + /// A new instance of object is created for every event occurrence. /// /// Event type /// Type of the event handler @@ -116,4 +116,4 @@ namespace Volo.Abp.EventBus /// Event type void UnsubscribeAll(Type eventType); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs index 72a8c753cd..9ff8b89cd8 100644 --- a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs +++ b/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs @@ -16,8 +16,8 @@ namespace Volo.Abp.EventBus { /// /// Returns true if this event data has a Tenant Id information. - /// If so, it should set the our parameter. - /// Otherwise, the our parameter value should not be informative + /// If so, it should set the our parameter. + /// Otherwise, the our parameter value should not be informative /// (it will be null as expected, but doesn't indicate a tenant with null tenant id). /// /// diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/en-GB.json b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/en-GB.json new file mode 100644 index 0000000000..d91aea7708 --- /dev/null +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/en-GB.json @@ -0,0 +1,25 @@ +{ + "culture": "en-GB", + "texts": { + "InternalServerErrorMessage": "An internal error occurred during your request!", + "ValidationErrorMessage": "Your request is not valid!", + "ValidationNarrativeErrorMessageTitle": "The following errors were detected during validation.", + "DefaultErrorMessage": "An error has occurred!", + "DefaultErrorMessageDetail": "Error detail not sent by server.", + "DefaultErrorMessage401": "You are not authenticated!", + "DefaultErrorMessage401Detail": "You should sign in to perform this operation.", + "DefaultErrorMessage403": "You are not authorised!", + "DefaultErrorMessage403Detail": "You are not allowed to perform this operation!", + "DefaultErrorMessage404": "Resource not found!", + "DefaultErrorMessage404Detail": "The resource requested could not found on the server!", + "EntityNotFoundErrorMessage": "There is no entity {0} with id = {1}!", + "Error": "Error", + "UnhandledException": "Unhandled exception!", + "401Message": "Unauthorized", + "403Message": "Forbidden", + "404Message": "Page not found", + "500Message": "Internal Server Error", + "403MessageDetail": "You are not authorised to perform this operation!", + "404MessageDetail": "Sorry, there's nothing at this address." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs index b2b11f0a18..609f42acd2 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureDefinition.cs @@ -69,8 +69,8 @@ namespace Volo.Abp.Features /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// [CanBeNull] public object this[string name] diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs index cba38070a7..b4dd98eb5b 100644 --- a/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/FeatureGroupDefinition.cs @@ -29,8 +29,8 @@ namespace Volo.Abp.Features /// /// Name of the property /// - /// Returns the value in the dictionary by given . - /// Returns null if given is not present in the dictionary. + /// Returns the value in the dictionary by given . + /// Returns null if given is not present in the dictionary. /// public object this[string name] { @@ -39,7 +39,7 @@ namespace Volo.Abp.Features } protected internal FeatureGroupDefinition( - string name, + string name, ILocalizableString displayName = null) { Name = name; @@ -108,4 +108,4 @@ namespace Volo.Abp.Features return $"[{nameof(FeatureGroupDefinition)} {Name}]"; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Features/Volo/Abp/Features/Localization/en-GB.json b/framework/src/Volo.Abp.Features/Volo/Abp/Features/Localization/en-GB.json new file mode 100644 index 0000000000..4836a142ae --- /dev/null +++ b/framework/src/Volo.Abp.Features/Volo/Abp/Features/Localization/en-GB.json @@ -0,0 +1,8 @@ +{ + "culture": "en-GB", + "texts": { + "Volo.Feature:010001": "Feature is not enabled: {FeatureName}", + "Volo.Feature:010002": "Required features are not enabled. All of these features must be enabled: {FeatureNames}", + "Volo.Feature:010003": "Required features are not enabled. At least one of these features must be enabled: {FeatureNames}" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs index aa9c1fdaa0..46eb2fca13 100644 --- a/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs +++ b/framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/Generators/ProxyScriptingJsFuncHelper.cs @@ -123,10 +123,9 @@ namespace Volo.Abp.Http.ProxyScripting.Generators sb.AppendLine("{"); - foreach (var prm in parameters) - { - sb.AppendLine($"{new string(' ', indent)} '{prm.Name}': {GetParamNameInJsFunc(prm)}"); - } + sb.AppendLine(parameters + .Select(prm => $"{new string(' ', indent)} '{prm.Name}': {GetParamNameInJsFunc(prm)}") + .JoinAsString(", " + Environment.NewLine)); sb.Append(new string(' ', indent) + "}"); diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en-GB.json b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en-GB.json new file mode 100644 index 0000000000..e78c9bf746 --- /dev/null +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en-GB.json @@ -0,0 +1,15 @@ +{ + "culture": "en-GB", + "texts": { + "DisplayName:Abp.Ldap.ServerHost": "Server host", + "Description:Abp.Ldap.ServerHost": "Server host", + "DisplayName:Abp.Ldap.ServerPort": "Server port", + "Description:Abp.Ldap.ServerPort": "Server port", + "DisplayName:Abp.Ldap.BaseDc": "Base domain component", + "Description:Abp.Ldap.BaseDc": "Base domain component", + "DisplayName:Abp.Ldap.UserName": "Username", + "Description:Abp.Ldap.UserName": "Username", + "DisplayName:Abp.Ldap.Password": "Password", + "Description:Abp.Ldap.Password": "Password" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/en-GB.json b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/en-GB.json new file mode 100644 index 0000000000..b081ef57f0 --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "DisplayName:Abp.Localization.DefaultLanguage": "Default language", + "Description:Abp.Localization.DefaultLanguage": "The default language of the application." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs index c179b68931..6d4fb7d896 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/IMemoryDbRepository.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Threading.Tasks; using Volo.Abp.Domain.Entities; namespace Volo.Abp.Domain.Repositories.MemoryDb @@ -6,9 +7,15 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb public interface IMemoryDbRepository : IRepository where TEntity : class, IEntity { + [Obsolete("Use GetDatabaseAsync() method.")] IMemoryDatabase Database { get; } + [Obsolete("Use GetCollectionAsync() method.")] IMemoryDatabaseCollection Collection { get; } + + Task GetDatabaseAsync(); + + Task> GetCollectionAsync(); } public interface IMemoryDbRepository : IMemoryDbRepository, IRepository diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs index 7c67e254ee..811c51ed5f 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs @@ -1,4 +1,3 @@ -using JetBrains.Annotations; using System; using System.Collections.Generic; using System.Linq; @@ -22,10 +21,22 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb { //TODO: Add dbcontext just like mongodb implementation! + [Obsolete("Use GetCollectionAsync method.")] public virtual IMemoryDatabaseCollection Collection => Database.Collection(); + public async Task> GetCollectionAsync() + { + return (await GetDatabaseAsync()).Collection(); + } + + [Obsolete("Use GetDatabaseAsync method.")] public virtual IMemoryDatabase Database => DatabaseProvider.GetDatabase(); + public Task GetDatabaseAsync() + { + return DatabaseProvider.GetDatabaseAsync(); + } + protected IMemoryDatabaseProvider DatabaseProvider { get; } public ILocalEventBus LocalEventBus { get; set; } @@ -47,11 +58,17 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb EntityChangeEventHelper = NullEntityChangeEventHelper.Instance; } + [Obsolete("This method will be removed in future versions.")] protected override IQueryable GetQueryable() { return ApplyDataFilters(Collection.AsQueryable()); } + public override async Task> GetQueryableAsync() + { + return ApplyDataFilters((await GetCollectionAsync()).AsQueryable()); + } + protected virtual async Task TriggerDomainEventsAsync(object entity) { var generatesDomainEventsEntity = entity as IGeneratesDomainEvents; @@ -163,39 +180,40 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb await TriggerDomainEventsAsync(entity); } - public override Task FindAsync( + public override async Task FindAsync( Expression> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { - return Task.FromResult(GetQueryable().Where(predicate).SingleOrDefault()); + return (await GetQueryableAsync()).Where(predicate).SingleOrDefault(); } - public async override Task DeleteAsync( + public override async Task DeleteAsync( Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = GetQueryable().Where(predicate).ToList(); + var entities = (await GetQueryableAsync()).Where(predicate).ToList(); + foreach (var entity in entities) { await DeleteAsync(entity, autoSave, cancellationToken); } } - public async override Task InsertAsync( + public override async Task InsertAsync( TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) { await ApplyAbpConceptsForAddedEntityAsync(entity); - Collection.Add(entity); + (await GetCollectionAsync()).Add(entity); return entity; } - public async override Task UpdateAsync( + public override async Task UpdateAsync( TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) @@ -214,12 +232,12 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb await TriggerDomainEventsAsync(entity); - Collection.Update(entity); + (await GetCollectionAsync()).Update(entity); return entity; } - public async override Task DeleteAsync( + public override async Task DeleteAsync( TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) @@ -229,35 +247,35 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb if (entity is ISoftDelete softDeleteEntity && !IsHardDeleted(entity)) { softDeleteEntity.IsDeleted = true; - Collection.Update(entity); + (await GetCollectionAsync()).Update(entity); } else { - Collection.Remove(entity); + (await GetCollectionAsync()).Remove(entity); } } - public override Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) + public override async Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) { - return Task.FromResult(GetQueryable().ToList()); + return (await GetQueryableAsync()).ToList(); } - public override Task GetCountAsync(CancellationToken cancellationToken = default) + public override async Task GetCountAsync(CancellationToken cancellationToken = default) { - return Task.FromResult(GetQueryable().LongCount()); + return (await GetQueryableAsync()).LongCount(); } - public override Task> GetPagedListAsync( + public override async Task> GetPagedListAsync( int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) { - return Task.FromResult(GetQueryable() + return (await GetQueryableAsync()) .OrderBy(sorting) .PageBy(skipCount, maxResultCount) - .ToList()); + .ToList(); } } @@ -270,13 +288,13 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb { } - public override Task InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) + public override async Task InsertAsync(TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) { - SetIdIfNeeded(entity); - return base.InsertAsync(entity, autoSave, cancellationToken); + await SetIdIfNeededAsync(entity); + return await base.InsertAsync(entity, autoSave, cancellationToken); } - protected virtual void SetIdIfNeeded(TEntity entity) + protected virtual async Task SetIdIfNeededAsync(TEntity entity) { if (typeof(TKey) == typeof(int) || typeof(TKey) == typeof(long) || @@ -284,7 +302,8 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb { if (EntityHelper.HasDefaultId(entity)) { - EntityHelper.TrySetId(entity, () => Database.GenerateNextId()); + var nextId = (await GetDatabaseAsync()).GenerateNextId(); + EntityHelper.TrySetId(entity, () => nextId); } } } @@ -301,9 +320,9 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb return entity; } - public virtual Task FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) + public virtual async Task FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { - return Task.FromResult(GetQueryable().FirstOrDefault(e => e.Id.Equals(id))); + return (await GetQueryableAsync()).FirstOrDefault(e => e.Id.Equals(id)); } public virtual async Task DeleteAsync(TKey id, bool autoSave = false, CancellationToken cancellationToken = default) @@ -311,10 +330,10 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb await DeleteAsync(x => x.Id.Equals(id), autoSave, cancellationToken); } - public virtual async Task DeleteManyAsync([NotNull] IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) + public virtual async Task DeleteManyAsync(IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await AsyncExecuter.ToListAsync(GetQueryable().Where(x => ids.Contains(x.Id))); - DeleteManyAsync(entities, autoSave, cancellationToken); + var entities = await AsyncExecuter.ToListAsync((await GetQueryableAsync()).Where(x => ids.Contains(x.Id)), cancellationToken); + await DeleteManyAsync(entities, autoSave, cancellationToken); } } } diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDbCoreRepositoryExtensions.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDbCoreRepositoryExtensions.cs index 1547a581e5..003bf8b034 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDbCoreRepositoryExtensions.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDbCoreRepositoryExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Repositories.MemoryDb; @@ -7,18 +8,32 @@ namespace Volo.Abp.Domain.Repositories { public static class MemoryDbCoreRepositoryExtensions { + [Obsolete("Use GetDatabaseAsync method.")] public static IMemoryDatabase GetDatabase(this IBasicRepository repository) where TEntity : class, IEntity { return repository.ToMemoryDbRepository().Database; } + public static Task GetDatabaseAsync(this IBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToMemoryDbRepository().GetDatabaseAsync(); + } + + [Obsolete("Use GetCollectionAsync method.")] public static IMemoryDatabaseCollection GetCollection(this IBasicRepository repository) where TEntity : class, IEntity { return repository.ToMemoryDbRepository().Collection; } + public static Task> GetCollectionAsync(this IBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToMemoryDbRepository().GetCollectionAsync(); + } + public static IMemoryDbRepository ToMemoryDbRepository(this IBasicRepository repository) where TEntity : class, IEntity { @@ -31,4 +46,4 @@ namespace Volo.Abp.Domain.Repositories return memoryDbRepository; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/IMemoryDatabaseProvider.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/IMemoryDatabaseProvider.cs index ad4456c793..514b079e69 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/IMemoryDatabaseProvider.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/IMemoryDatabaseProvider.cs @@ -1,12 +1,20 @@ -using Volo.Abp.Domain.Repositories.MemoryDb; +using System; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.MemoryDb; namespace Volo.Abp.MemoryDb { public interface IMemoryDatabaseProvider where TMemoryDbContext : MemoryDbContext { + [Obsolete("Use GetDbContextAsync method.")] TMemoryDbContext DbContext { get; } + Task GetDbContextAsync(); + + [Obsolete("Use GetDatabaseAsync method.")] IMemoryDatabase GetDatabase(); + + Task GetDatabaseAsync(); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Uow/MemoryDb/UnitOfWorkMemoryDatabaseProvider.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Uow/MemoryDb/UnitOfWorkMemoryDatabaseProvider.cs index 24c1cdaeb9..c2c5a1df71 100644 --- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Uow/MemoryDb/UnitOfWorkMemoryDatabaseProvider.cs +++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Uow/MemoryDb/UnitOfWorkMemoryDatabaseProvider.cs @@ -1,4 +1,6 @@ -using Volo.Abp.Data; +using System; +using System.Threading.Tasks; +using Volo.Abp.Data; using Volo.Abp.Domain.Repositories.MemoryDb; using Volo.Abp.MemoryDb; @@ -8,7 +10,7 @@ namespace Volo.Abp.Uow.MemoryDb where TMemoryDbContext : MemoryDbContext { public TMemoryDbContext DbContext { get; } - + private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IConnectionStringResolver _connectionStringResolver; private readonly MemoryDatabaseManager _memoryDatabaseManager; @@ -16,7 +18,7 @@ namespace Volo.Abp.Uow.MemoryDb public UnitOfWorkMemoryDatabaseProvider( IUnitOfWorkManager unitOfWorkManager, IConnectionStringResolver connectionStringResolver, - TMemoryDbContext dbContext, + TMemoryDbContext dbContext, MemoryDatabaseManager memoryDatabaseManager) { _unitOfWorkManager = unitOfWorkManager; @@ -25,6 +27,12 @@ namespace Volo.Abp.Uow.MemoryDb _memoryDatabaseManager = memoryDatabaseManager; } + public Task GetDbContextAsync() + { + return Task.FromResult(DbContext); + } + + [Obsolete("Use GetDatabaseAsync method.")] public IMemoryDatabase GetDatabase() { var unitOfWork = _unitOfWorkManager.Current; @@ -44,5 +52,25 @@ namespace Volo.Abp.Uow.MemoryDb return ((MemoryDbDatabaseApi)databaseApi).Database; } + + public async Task GetDatabaseAsync() + { + var unitOfWork = _unitOfWorkManager.Current; + if (unitOfWork == null) + { + throw new AbpException($"A {nameof(IMemoryDatabase)} instance can only be created inside a unit of work!"); + } + + var connectionString = await _connectionStringResolver.ResolveAsync(); + var dbContextKey = $"{typeof(TMemoryDbContext).FullName}_{connectionString}"; + + var databaseApi = unitOfWork.GetOrAddDatabaseApi( + dbContextKey, + () => new MemoryDbDatabaseApi( + _memoryDatabaseManager.Get(connectionString) + )); + + return ((MemoryDbDatabaseApi)databaseApi).Database; + } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs index 50155c6df5..960222679f 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/IMongoDbRepository.cs @@ -1,4 +1,7 @@ -using MongoDB.Driver; +using System; +using System.Threading; +using System.Threading.Tasks; +using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Entities; @@ -7,11 +10,20 @@ namespace Volo.Abp.Domain.Repositories.MongoDB public interface IMongoDbRepository : IRepository where TEntity : class, IEntity { + [Obsolete("Use GetDatabaseAsync method.")] IMongoDatabase Database { get; } + Task GetDatabaseAsync(CancellationToken cancellationToken = default); + + [Obsolete("Use GetCollectionAsync method.")] IMongoCollection Collection { get; } + Task> GetCollectionAsync(CancellationToken cancellationToken = default); + + [Obsolete("Use GetMongoQueryableAsync method.")] IMongoQueryable GetMongoQueryable(); + + Task> GetMongoQueryableAsync(CancellationToken cancellationToken = default); } public interface IMongoDbRepository : IMongoDbRepository, IRepository diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs index 109aeac8cd..53c291a178 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs @@ -27,13 +27,37 @@ namespace Volo.Abp.Domain.Repositories.MongoDB where TMongoDbContext : IAbpMongoDbContext where TEntity : class, IEntity { + [Obsolete("Use GetCollectionAsync method.")] public virtual IMongoCollection Collection => DbContext.Collection(); + public async Task> GetCollectionAsync(CancellationToken cancellationToken = default) + { + return (await GetDbContextAsync(GetCancellationToken(cancellationToken))).Collection(); + } + + [Obsolete("Use GetDatabaseAsync method.")] public virtual IMongoDatabase Database => DbContext.Database; - public virtual IClientSessionHandle SessionHandle => DbContext.SessionHandle; + public async Task GetDatabaseAsync(CancellationToken cancellationToken = default) + { + return (await GetDbContextAsync(GetCancellationToken(cancellationToken))).Database; + } + + [Obsolete("Use GetSessionHandleAsync method.")] + protected virtual IClientSessionHandle SessionHandle => DbContext.SessionHandle; - public virtual TMongoDbContext DbContext => DbContextProvider.GetDbContext(); + protected async Task GetSessionHandleAsync(CancellationToken cancellationToken = default) + { + return (await GetDbContextAsync(GetCancellationToken(cancellationToken))).SessionHandle; + } + + [Obsolete("Use GetDbContextAsync method.")] + protected virtual TMongoDbContext DbContext => DbContextProvider.GetDbContext(); + + protected Task GetDbContextAsync(CancellationToken cancellationToken = default) + { + return DbContextProvider.GetDbContextAsync(GetCancellationToken(cancellationToken)); + } protected IMongoDbContextProvider DbContextProvider { get; } @@ -59,24 +83,27 @@ namespace Volo.Abp.Domain.Repositories.MongoDB GuidGenerator = SimpleGuidGenerator.Instance; } - public async override Task InsertAsync( + public override async Task InsertAsync( TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) { await ApplyAbpConceptsForAddedEntityAsync(entity); - if (SessionHandle != null) + var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); + var collection = dbContext.Collection(); + + if (dbContext.SessionHandle != null) { - await Collection.InsertOneAsync( - SessionHandle, + await collection.InsertOneAsync( + dbContext.SessionHandle, entity, cancellationToken: GetCancellationToken(cancellationToken) ); } else { - await Collection.InsertOneAsync( + await collection.InsertOneAsync( entity, cancellationToken: GetCancellationToken(cancellationToken) ); @@ -87,33 +114,38 @@ namespace Volo.Abp.Domain.Repositories.MongoDB public override async Task InsertManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) { - foreach (var entity in entities) + var entityArray = entities.ToArray(); + + foreach (var entity in entityArray) { await ApplyAbpConceptsForAddedEntityAsync(entity); } + var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); + var collection = dbContext.Collection(); + if (BulkOperationProvider != null) { - await BulkOperationProvider.InsertManyAsync(this, entities, SessionHandle, autoSave, cancellationToken); + await BulkOperationProvider.InsertManyAsync(this, entityArray, dbContext.SessionHandle, autoSave, cancellationToken); return; } - if (SessionHandle != null) + if (dbContext.SessionHandle != null) { - await Collection.InsertManyAsync( - SessionHandle, - entities, + await collection.InsertManyAsync( + dbContext.SessionHandle, + entityArray, cancellationToken: cancellationToken); } else { - await Collection.InsertManyAsync( - entities, + await collection.InsertManyAsync( + entityArray, cancellationToken: cancellationToken); } } - public async override Task UpdateAsync( + public override async Task UpdateAsync( TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) @@ -135,20 +167,21 @@ namespace Volo.Abp.Domain.Repositories.MongoDB var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); ReplaceOneResult result; - if (SessionHandle != null) + var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); + var collection = dbContext.Collection(); + + if (dbContext.SessionHandle != null) { - result = await Collection.ReplaceOneAsync( - SessionHandle, + result = await collection.ReplaceOneAsync( + dbContext.SessionHandle, CreateEntityFilter(entity, true, oldConcurrencyStamp), entity, cancellationToken: GetCancellationToken(cancellationToken) ); - - } else { - result = await Collection.ReplaceOneAsync( + result = await collection.ReplaceOneAsync( CreateEntityFilter(entity, true, oldConcurrencyStamp), entity, cancellationToken: GetCancellationToken(cancellationToken) @@ -165,12 +198,13 @@ namespace Volo.Abp.Domain.Repositories.MongoDB public override async Task UpdateManyAsync(IEnumerable entities, bool autoSave = false, CancellationToken cancellationToken = default) { - var isSoftDeleteEntity = typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)); + var entityArray = entities.ToArray(); - foreach (var entity in entities) + foreach (var entity in entityArray) { SetModificationAuditProperties(entity); + var isSoftDeleteEntity = typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)); if (isSoftDeleteEntity) { SetDeletionAuditProperties(entity); @@ -186,37 +220,40 @@ namespace Volo.Abp.Domain.Repositories.MongoDB SetNewConcurrencyStamp(entity); } + cancellationToken = GetCancellationToken(cancellationToken); + var dbContext = await GetDbContextAsync(cancellationToken); + if (BulkOperationProvider != null) { - await BulkOperationProvider.UpdateManyAsync(this, entities, SessionHandle, autoSave, cancellationToken); + await BulkOperationProvider.UpdateManyAsync(this, entityArray, dbContext.SessionHandle, autoSave, cancellationToken); return; } - var entitiesCount = entities.Count(); BulkWriteResult result; List> replaceRequests = new List>(); - foreach (var entity in entities) + foreach (var entity in entityArray) { replaceRequests.Add(new ReplaceOneModel(CreateEntityFilter(entity), entity)); } - if (SessionHandle != null) + var collection = dbContext.Collection(); + if (dbContext.SessionHandle != null) { - result = await Collection.BulkWriteAsync(SessionHandle, replaceRequests); + result = await collection.BulkWriteAsync(dbContext.SessionHandle, replaceRequests, cancellationToken: cancellationToken); } else { - result = await Collection.BulkWriteAsync(replaceRequests); + result = await collection.BulkWriteAsync(replaceRequests, cancellationToken: cancellationToken); } - if (result.MatchedCount < entitiesCount) + if (result.MatchedCount < entityArray.Length) { ThrowOptimisticConcurrencyException(); } } - public async override Task DeleteAsync( + public override async Task DeleteAsync( TEntity entity, bool autoSave = false, CancellationToken cancellationToken = default) @@ -224,15 +261,18 @@ namespace Volo.Abp.Domain.Repositories.MongoDB await ApplyAbpConceptsForDeletedEntityAsync(entity); var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); + var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); + var collection = dbContext.Collection(); + if (entity is ISoftDelete softDeleteEntity && !IsHardDeleted(entity)) { softDeleteEntity.IsDeleted = true; ReplaceOneResult result; - if (SessionHandle != null) + if (dbContext.SessionHandle != null) { - result = await Collection.ReplaceOneAsync( - SessionHandle, + result = await collection.ReplaceOneAsync( + dbContext.SessionHandle, CreateEntityFilter(entity, true, oldConcurrencyStamp), entity, cancellationToken: GetCancellationToken(cancellationToken) @@ -240,7 +280,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB } else { - result = await Collection.ReplaceOneAsync( + result = await collection.ReplaceOneAsync( CreateEntityFilter(entity, true, oldConcurrencyStamp), entity, cancellationToken: GetCancellationToken(cancellationToken) @@ -256,17 +296,17 @@ namespace Volo.Abp.Domain.Repositories.MongoDB { DeleteResult result; - if (SessionHandle != null) + if (dbContext.SessionHandle != null) { - result = await Collection.DeleteOneAsync( - SessionHandle, + result = await collection.DeleteOneAsync( + dbContext.SessionHandle, CreateEntityFilter(entity, true, oldConcurrencyStamp), cancellationToken: GetCancellationToken(cancellationToken) ); } else { - result = await Collection.DeleteOneAsync( + result = await collection.DeleteOneAsync( CreateEntityFilter(entity, true, oldConcurrencyStamp), GetCancellationToken(cancellationToken) ); @@ -284,35 +324,40 @@ namespace Volo.Abp.Domain.Repositories.MongoDB bool autoSave = false, CancellationToken cancellationToken = default) { - foreach (var entity in entities) + var entityArray = entities.ToArray(); + + foreach (var entity in entityArray) { await ApplyAbpConceptsForDeletedEntityAsync(entity); - var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); + SetNewConcurrencyStamp(entity); } + var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); + var collection = dbContext.Collection(); + if (BulkOperationProvider != null) { - await BulkOperationProvider.DeleteManyAsync(this, entities, SessionHandle, autoSave, cancellationToken); + await BulkOperationProvider.DeleteManyAsync(this, entityArray, dbContext.SessionHandle, autoSave, cancellationToken); return; } - var entitiesCount = entities.Count(); + var entitiesCount = entityArray.Count(); if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity))) { UpdateResult updateResult; - if (SessionHandle != null) + if (dbContext.SessionHandle != null) { - updateResult = await Collection.UpdateManyAsync( - SessionHandle, - CreateEntitiesFilter(entities), + updateResult = await collection.UpdateManyAsync( + dbContext.SessionHandle, + CreateEntitiesFilter(entityArray), Builders.Update.Set(x => ((ISoftDelete)x).IsDeleted, true) ); } else { - updateResult = await Collection.UpdateManyAsync( - CreateEntitiesFilter(entities), + updateResult = await collection.UpdateManyAsync( + CreateEntitiesFilter(entityArray), Builders.Update.Set(x => ((ISoftDelete)x).IsDeleted, true) ); } @@ -325,17 +370,17 @@ namespace Volo.Abp.Domain.Repositories.MongoDB else { DeleteResult deleteResult; - if (SessionHandle != null) + if (dbContext.SessionHandle != null) { - deleteResult = await Collection.DeleteManyAsync( - SessionHandle, - CreateEntitiesFilter(entities) + deleteResult = await collection.DeleteManyAsync( + dbContext.SessionHandle, + CreateEntitiesFilter(entityArray) ); } else { - deleteResult = await Collection.DeleteManyAsync( - CreateEntitiesFilter(entities) + deleteResult = await collection.DeleteManyAsync( + CreateEntitiesFilter(entityArray) ); } @@ -346,38 +391,44 @@ namespace Volo.Abp.Domain.Repositories.MongoDB } } - public async override Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) + public override async Task> GetListAsync(bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().ToListAsync(GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)).ToListAsync(cancellationToken); } - public async override Task GetCountAsync(CancellationToken cancellationToken = default) + public override async Task GetCountAsync(CancellationToken cancellationToken = default) { - return await GetMongoQueryable().LongCountAsync(GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)).LongCountAsync(cancellationToken); } - public async override Task> GetPagedListAsync( + public override async Task> GetPagedListAsync( int skipCount, int maxResultCount, string sorting, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(sorting) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } - public async override Task DeleteAsync( + public override async Task DeleteAsync( Expression> predicate, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + + var entities = await (await GetMongoQueryableAsync(cancellationToken)) .Where(predicate) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); foreach (var entity in entities) { @@ -385,25 +436,49 @@ namespace Volo.Abp.Domain.Repositories.MongoDB } } + [Obsolete("Use GetQueryableAsync method.")] protected override IQueryable GetQueryable() { return GetMongoQueryable(); } - public async override Task FindAsync( + public override async Task> GetQueryableAsync() + { + return await GetMongoQueryableAsync(); + } + + public override async Task FindAsync( Expression> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(predicate) .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); } + [Obsolete("Use GetMongoQueryableAsync method.")] public virtual IMongoQueryable GetMongoQueryable() { - return ApplyDataFilters(SessionHandle != null ? Collection.AsQueryable(SessionHandle) : Collection.AsQueryable()); + return ApplyDataFilters( + SessionHandle != null + ? Collection.AsQueryable(SessionHandle) + : Collection.AsQueryable() + ); + } + + public async Task> GetMongoQueryableAsync(CancellationToken cancellationToken = default) + { + var dbContext = await GetDbContextAsync(cancellationToken); + var collection = dbContext.Collection(); + + return ApplyDataFilters( + dbContext.SessionHandle != null + ? collection.AsQueryable(dbContext.SessionHandle) + : collection.AsQueryable() + ); } + protected virtual bool IsHardDeleted(TEntity entity) { var hardDeletedEntities = UnitOfWorkManager?.Current?.Items.GetOrDefault(UnitOfWorkItemNames.HardDeletedEntities) as HashSet; @@ -552,30 +627,19 @@ namespace Volo.Abp.Domain.Repositories.MongoDB throw new AbpDbConcurrencyException("Database operation expected to affect 1 row but actually affected 0 row. Data may have been modified or deleted since entities were loaded. This exception has been thrown on optimistic concurrency check."); } - /// - /// IMongoQueryable - /// - /// + [Obsolete("This method will be removed in future versions.")] public QueryableExecutionModel GetExecutionModel() { return GetMongoQueryable().GetExecutionModel(); } - /// - /// IMongoQueryable - /// - /// - /// + [Obsolete("This method will be removed in future versions.")] public IAsyncCursor ToCursor(CancellationToken cancellationToken = new CancellationToken()) { return GetMongoQueryable().ToCursor(cancellationToken); } - /// - /// IMongoQueryable - /// - /// - /// + [Obsolete("This method will be removed in future versions.")] public Task> ToCursorAsync(CancellationToken cancellationToken = new CancellationToken()) { return GetMongoQueryable().ToCursorAsync(cancellationToken); @@ -616,16 +680,21 @@ namespace Volo.Abp.Domain.Repositories.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - if (SessionHandle != null) + cancellationToken = GetCancellationToken(cancellationToken); + + var dbContext = await GetDbContextAsync(cancellationToken); + var collection = dbContext.Collection(); + + if (dbContext.SessionHandle != null) { - return await Collection - .Find(SessionHandle, RepositoryFilterer.CreateEntityFilter(id, true)) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + return await collection + .Find(dbContext.SessionHandle, RepositoryFilterer.CreateEntityFilter(id, true)) + .FirstOrDefaultAsync(cancellationToken); } - return await Collection + return await collection .Find(RepositoryFilterer.CreateEntityFilter(id, true)) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(cancellationToken); } public virtual Task DeleteAsync( @@ -638,9 +707,11 @@ namespace Volo.Abp.Domain.Repositories.MongoDB public virtual async Task DeleteManyAsync([NotNull] IEnumerable ids, bool autoSave = false, CancellationToken cancellationToken = default) { - var entities = await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + + var entities = await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => ids.Contains(x.Id)) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); await DeleteManyAsync(entities, autoSave, cancellationToken); } diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDbCoreRepositoryExtensions.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDbCoreRepositoryExtensions.cs index 12da0afaa2..ff367dc554 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDbCoreRepositoryExtensions.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDbCoreRepositoryExtensions.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Entities; @@ -8,24 +9,45 @@ namespace Volo.Abp.Domain.Repositories { public static class MongoDbCoreRepositoryExtensions { + [Obsolete("Use GetDatabaseAsync method.")] public static IMongoDatabase GetDatabase(this IBasicRepository repository) where TEntity : class, IEntity { return repository.ToMongoDbRepository().Database; } + public static Task GetDatabaseAsync(this IBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToMongoDbRepository().GetDatabaseAsync(); + } + + [Obsolete("Use GetCollection method.")] public static IMongoCollection GetCollection(this IBasicRepository repository) where TEntity : class, IEntity { return repository.ToMongoDbRepository().Collection; } + public static Task> GetCollectionAsync(this IBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToMongoDbRepository().GetCollectionAsync(); + } + + [Obsolete("Use GetMongoQueryableAsync method.")] public static IMongoQueryable GetMongoQueryable(this IBasicRepository repository) where TEntity : class, IEntity { return repository.ToMongoDbRepository().GetMongoQueryable(); } + public static Task> GetMongoQueryableAsync(this IBasicRepository repository) + where TEntity : class, IEntity + { + return repository.ToMongoDbRepository().GetMongoQueryableAsync(); + } + public static IMongoDbRepository ToMongoDbRepository(this IBasicRepository repository) where TEntity : class, IEntity { @@ -38,4 +60,4 @@ namespace Volo.Abp.Domain.Repositories return mongoDbRepository; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/IMongoDbContextProvider.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/IMongoDbContextProvider.cs index 9f89054dcc..959cb39df1 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/IMongoDbContextProvider.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/IMongoDbContextProvider.cs @@ -1,8 +1,15 @@ -namespace Volo.Abp.MongoDB +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace Volo.Abp.MongoDB { - public interface IMongoDbContextProvider + public interface IMongoDbContextProvider where TMongoDbContext : IAbpMongoDbContext { + [Obsolete("Use CreateDbContextAsync")] TMongoDbContext GetDbContext(); + + Task GetDbContextAsync(CancellationToken cancellationToken = default); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoDbAsyncQueryableProvider.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoDbAsyncQueryableProvider.cs index a8dc34e83a..52c5edd1d3 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoDbAsyncQueryableProvider.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/MongoDbAsyncQueryableProvider.cs @@ -12,7 +12,7 @@ using Volo.Abp.DynamicProxy; namespace Volo.Abp.MongoDB { - public class MongoDbAsyncQueryableProvider : IAsyncQueryableProvider, ITransientDependency + public class MongoDbAsyncQueryableProvider : IAsyncQueryableProvider, ISingletonDependency { public bool CanExecute(IQueryable queryable) { diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs index d3d8a419fb..724e7673fc 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs @@ -1,28 +1,48 @@ using System; +using System.Threading; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using MongoDB.Bson; using MongoDB.Driver; using Volo.Abp.Data; using Volo.Abp.MongoDB; +using Volo.Abp.Threading; namespace Volo.Abp.Uow.MongoDB { public class UnitOfWorkMongoDbContextProvider : IMongoDbContextProvider where TMongoDbContext : IAbpMongoDbContext { + public ILogger> Logger { get; set; } + private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IConnectionStringResolver _connectionStringResolver; + private readonly ICancellationTokenProvider _cancellationTokenProvider; public UnitOfWorkMongoDbContextProvider( IUnitOfWorkManager unitOfWorkManager, - IConnectionStringResolver connectionStringResolver) + IConnectionStringResolver connectionStringResolver, + ICancellationTokenProvider cancellationTokenProvider) { _unitOfWorkManager = unitOfWorkManager; _connectionStringResolver = connectionStringResolver; + _cancellationTokenProvider = cancellationTokenProvider; + + Logger = NullLogger>.Instance; } + [Obsolete("Use CreateDbContextAsync")] public TMongoDbContext GetDbContext() { + Logger.LogWarning( + "UnitOfWorkDbContextProvider.GetDbContext is deprecated. Use GetDbContextAsync instead! " + + "You are probably using LINQ (LINQ extensions) directly on a repository. In this case, use repository.GetQueryableAsync() method " + + "to obtain an IQueryable instance and use LINQ (LINQ extensions) on this object. " + ); + Logger.LogWarning(Environment.StackTrace.Truncate(2048)); + var unitOfWork = _unitOfWorkManager.Current; if (unitOfWork == null) { @@ -48,6 +68,46 @@ namespace Volo.Abp.Uow.MongoDB return ((MongoDbDatabaseApi) databaseApi).DbContext; } + public async Task GetDbContextAsync(CancellationToken cancellationToken = default) + { + var unitOfWork = _unitOfWorkManager.Current; + if (unitOfWork == null) + { + throw new AbpException( + $"A {nameof(IMongoDatabase)} instance can only be created inside a unit of work!"); + } + + var connectionString = await _connectionStringResolver.ResolveAsync(); + var dbContextKey = $"{typeof(TMongoDbContext).FullName}_{connectionString}"; + + var mongoUrl = new MongoUrl(connectionString); + var databaseName = mongoUrl.DatabaseName; + if (databaseName.IsNullOrWhiteSpace()) + { + databaseName = ConnectionStringNameAttribute.GetConnStringName(); + } + + //TODO: Create only single MongoDbClient per connection string in an application (extract MongoClientCache for example). + var databaseApi = unitOfWork.FindDatabaseApi(dbContextKey); + if (databaseApi == null) + { + databaseApi = new MongoDbDatabaseApi( + await CreateDbContextAsync( + unitOfWork, + mongoUrl, + databaseName, + cancellationToken + ) + ); + + unitOfWork.AddDatabaseApi(dbContextKey, databaseApi); + } + + return ((MongoDbDatabaseApi) databaseApi).DbContext; + } + + [Obsolete("Use CreateDbContextAsync")] + private TMongoDbContext CreateDbContext(IUnitOfWork unitOfWork, MongoUrl mongoUrl, string databaseName) { var client = new MongoClient(mongoUrl); @@ -64,7 +124,34 @@ namespace Volo.Abp.Uow.MongoDB return dbContext; } - public TMongoDbContext CreateDbContextWithTransaction( + private async Task CreateDbContextAsync( + IUnitOfWork unitOfWork, + MongoUrl mongoUrl, + string databaseName, + CancellationToken cancellationToken = default) + { + var client = new MongoClient(mongoUrl); + var database = client.GetDatabase(databaseName); + + if (unitOfWork.Options.IsTransactional) + { + return await CreateDbContextWithTransactionAsync( + unitOfWork, + mongoUrl, + client, + database, + cancellationToken + ); + } + + var dbContext = unitOfWork.ServiceProvider.GetRequiredService(); + dbContext.ToAbpMongoDbContext().InitializeDatabase(database, client, null); + + return dbContext; + } + + [Obsolete("Use CreateDbContextWithTransactionAsync")] + private TMongoDbContext CreateDbContextWithTransaction( IUnitOfWork unitOfWork, MongoUrl url, MongoClient client, @@ -99,5 +186,47 @@ namespace Volo.Abp.Uow.MongoDB return dbContext; } + + private async Task CreateDbContextWithTransactionAsync( + IUnitOfWork unitOfWork, + MongoUrl url, + MongoClient client, + IMongoDatabase database, + CancellationToken cancellationToken = default) + { + var transactionApiKey = $"MongoDb_{url}"; + var activeTransaction = unitOfWork.FindTransactionApi(transactionApiKey) as MongoDbTransactionApi; + var dbContext = unitOfWork.ServiceProvider.GetRequiredService(); + + if (activeTransaction?.SessionHandle == null) + { + var session = await client.StartSessionAsync(cancellationToken: GetCancellationToken(cancellationToken)); + + if (unitOfWork.Options.Timeout.HasValue) + { + session.AdvanceOperationTime(new BsonTimestamp(unitOfWork.Options.Timeout.Value)); + } + + session.StartTransaction(); + + unitOfWork.AddTransactionApi( + transactionApiKey, + new MongoDbTransactionApi(session) + ); + + dbContext.ToAbpMongoDbContext().InitializeDatabase(database, client, session); + } + else + { + dbContext.ToAbpMongoDbContext().InitializeDatabase(database, client, activeTransaction.SessionHandle); + } + + return dbContext; + } + + protected virtual CancellationToken GetCancellationToken(CancellationToken preferredValue = default) + { + return _cancellationTokenProvider.FallbackToProvider(preferredValue); + } } } diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantStore.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantStore.cs index 7125a97405..6c66044e37 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantStore.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantStore.cs @@ -9,8 +9,10 @@ namespace Volo.Abp.MultiTenancy Task FindAsync(Guid id); + [Obsolete("Use FindAsync method.")] TenantConfiguration Find(string name); + [Obsolete("Use FindAsync method.")] TenantConfiguration Find(Guid id); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs index d92409fe0d..0d82419013 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Volo.Abp.Data; @@ -23,6 +24,58 @@ namespace Volo.Abp.MultiTenancy _serviceProvider = serviceProvider; } + public override async Task ResolveAsync(string connectionStringName = null) + { + //No current tenant, fallback to default logic + if (_currentTenant.Id == null) + { + return await base.ResolveAsync(connectionStringName); + } + + using (var serviceScope = _serviceProvider.CreateScope()) + { + var tenantStore = serviceScope + .ServiceProvider + .GetRequiredService(); + + var tenant = await tenantStore.FindAsync(_currentTenant.Id.Value); + + if (tenant?.ConnectionStrings == null) + { + return await base.ResolveAsync(connectionStringName); + } + + //Requesting default connection string + if (connectionStringName == null) + { + return tenant.ConnectionStrings.Default ?? + Options.ConnectionStrings.Default; + } + + //Requesting specific connection string + var connString = tenant.ConnectionStrings.GetOrDefault(connectionStringName); + if (connString != null) + { + return connString; + } + + /* Requested a specific connection string, but it's not specified for the tenant. + * - If it's specified in options, use it. + * - If not, use tenant's default conn string. + */ + + var connStringInOptions = Options.ConnectionStrings.GetOrDefault(connectionStringName); + if (connStringInOptions != null) + { + return connStringInOptions; + } + + return tenant.ConnectionStrings.Default ?? + Options.ConnectionStrings.Default; + } + } + + [Obsolete("Use ResolveAsync method.")] public override string Resolve(string connectionStringName = null) { //No current tenant, fallback to default logic diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs index 6733688a91..c2b56515b4 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs @@ -67,7 +67,8 @@ namespace Volo.Abp.ObjectExtending.Modularity lookupTextPropertyName, () => new ExtensionPropertyConfiguration(this, typeof(string), lookupTextPropertyName) ); - lookupTextPropertyInfo.DisplayName = propertyInfo.DisplayName ?? new FixedLocalizableString(propertyInfo.Name); + + lookupTextPropertyInfo.DisplayName = propertyInfo.DisplayName; } [NotNull] diff --git a/framework/src/Volo.Abp.Quartz/Volo/Abp/Quartz/AbpQuartzModule.cs b/framework/src/Volo.Abp.Quartz/Volo/Abp/Quartz/AbpQuartzModule.cs index 2429f617d9..fc9ba26367 100644 --- a/framework/src/Volo.Abp.Quartz/Volo/Abp/Quartz/AbpQuartzModule.cs +++ b/framework/src/Volo.Abp.Quartz/Volo/Abp/Quartz/AbpQuartzModule.cs @@ -16,9 +16,6 @@ namespace Volo.Abp.Quartz { var options = context.Services.ExecutePreConfiguredActions(); - // TODO: Remove this once Pomelo update MySqlConnector to >= 1.0.0 : https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/pull/1103 - AdaptMysqlConnector(); - context.Services.AddQuartz(options.Properties, build => { // these are the defaults @@ -55,7 +52,7 @@ namespace Volo.Abp.Quartz context.Services.AddSingleton(serviceProvider => { - return AsyncHelper.RunSync(() => serviceProvider.GetService().GetScheduler()); + return AsyncHelper.RunSync(() => serviceProvider.GetRequiredService().GetScheduler()); }); Configure(quartzOptions => @@ -69,7 +66,7 @@ namespace Volo.Abp.Quartz { var options = context.ServiceProvider.GetRequiredService>().Value; - _scheduler = context.ServiceProvider.GetService(); + _scheduler = context.ServiceProvider.GetRequiredService(); AsyncHelper.RunSync(() => options.StartSchedulerFactory.Invoke(_scheduler)); } @@ -81,28 +78,5 @@ namespace Volo.Abp.Quartz AsyncHelper.RunSync(() => _scheduler.Shutdown()); } } - - private void AdaptMysqlConnector() - { - var mySqlAvailable = System.Type.GetType("MySql.Data.MySqlClient.MySqlConnection, MySqlConnector") != null; - if (mySqlAvailable) - { - // Overriding the default 'MySqlConnector' provider to use the old 'MySql.Data' namespace found in MySqlConnector < 1.0.0 - DbProvider.RegisterDbMetadata("MySqlConnector", new DbMetadata() - { - ProductName = "MySQL, MySqlConnector provider", - AssemblyName = "MySqlConnector", - ConnectionType = System.Type.GetType("MySql.Data.MySqlClient.MySqlConnection, MySqlConnector"), - CommandType = System.Type.GetType("MySql.Data.MySqlClient.MySqlCommand, MySqlConnector"), - ParameterType = System.Type.GetType("MySql.Data.MySqlClient.MySqlParameter, MySqlConnector"), - ParameterDbType = System.Type.GetType("MySql.Data.MySqlClient.MySqlDbType, MySqlConnector"), - ParameterDbTypePropertyName = "MySqlDbType", - ParameterNamePrefix = "?", - ExceptionType = System.Type.GetType("MySql.Data.MySqlClient.MySqlException, MySqlConnector"), - BindByName = true, - DbBinaryTypeName = "Blob" - }); - } - } } } diff --git a/framework/src/Volo.Abp.Threading/Volo/Abp/Linq/AsyncQueryableExecuter.cs b/framework/src/Volo.Abp.Threading/Volo/Abp/Linq/AsyncQueryableExecuter.cs index f5b3cf3a6d..b7ac83dc5f 100644 --- a/framework/src/Volo.Abp.Threading/Volo/Abp/Linq/AsyncQueryableExecuter.cs +++ b/framework/src/Volo.Abp.Threading/Volo/Abp/Linq/AsyncQueryableExecuter.cs @@ -8,7 +8,7 @@ using Volo.Abp.DependencyInjection; namespace Volo.Abp.Linq { - public class AsyncQueryableExecuter : IAsyncQueryableExecuter, ITransientDependency + public class AsyncQueryableExecuter : IAsyncQueryableExecuter, ISingletonDependency { protected IEnumerable Providers { get; } diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/en-GB.json b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/en-GB.json new file mode 100644 index 0000000000..ed00dc560b --- /dev/null +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "DisplayName:Abp.Timing.Timezone": "Timezone", + "Description:Abp.Timing.Timezone": "Application time zone" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/en-GB.json b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/en-GB.json new file mode 100644 index 0000000000..2633c31298 --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/en-GB.json @@ -0,0 +1,6 @@ +{ + "culture": "en-GB", + "texts": { + "Menu:Administration": "Administration" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en-GB.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en-GB.json new file mode 100644 index 0000000000..b0d0922089 --- /dev/null +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en-GB.json @@ -0,0 +1,52 @@ +{ + "culture": "en-GB", + "texts": { + "Languages": "Languages", + "AreYouSure": "Are you sure?", + "Cancel": "Cancel", + "Clear": "Clear", + "Yes": "Yes", + "No": "No", + "Ok": "Ok", + "Close": "Close", + "Save": "Save", + "SavingWithThreeDot": "Saving", + "Actions": "Actions", + "Delete": "Delete", + "Edit": "Edit", + "Refresh": "Refresh", + "Language": "Language", + "LoadMore": "Load more", + "ProcessingWithThreeDot": "Processing...", + "LoadingWithThreeDot": "Loading...", + "Welcome": "Welcome", + "Login": "Login", + "Register": "Register", + "Logout": "Logout", + "Submit": "Submit", + "Back": "Back", + "PagerSearch": "Search", + "PagerNext": "Next", + "PagerPrevious": "Previous", + "PagerFirst": "First", + "PagerLast": "Last", + "PagerInfo": "Showing _START_ to _END_ of _TOTAL_ entries", + "PagerInfo{0}{1}{2}": "Showing {0} to {1} of {2} entries", + "PagerInfoEmpty": "Showing 0 to 0 of 0 entries", + "PagerInfoFiltered": "(filtered from _MAX_ total entries)", + "NoDataAvailableInDatatable": "No data available", + "Total": "total", + "Selected": "selected", + "PagerShowMenuEntries": "Show _MENU_ entries", + "DatatableActionDropdownDefaultText": "Actions", + "ChangePassword": "Change Password", + "PersonalInfo": "My Profile", + "AreYouSureYouWantToCancelEditingWarningMessage": "You have unsaved changes.", + "GoHomePage": "Go to the homepage", + "GoBack": "Go back", + "Search": "Search", + "ItemWillBeDeletedMessageWithFormat": "{0} will be deleted!", + "ItemWillBeDeletedMessage": "This item will be deleted!", + "ManageYourAccount": "Manage your account" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkTransactionBehaviourProvider.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkTransactionBehaviourProvider.cs new file mode 100644 index 0000000000..1db7dac938 --- /dev/null +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/IUnitOfWorkTransactionBehaviourProvider.cs @@ -0,0 +1,7 @@ +namespace Volo.Abp.Uow +{ + public interface IUnitOfWorkTransactionBehaviourProvider + { + bool? IsTransactional { get; } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/NullUnitOfWorkTransactionBehaviourProvider.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/NullUnitOfWorkTransactionBehaviourProvider.cs new file mode 100644 index 0000000000..2b302d303a --- /dev/null +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/NullUnitOfWorkTransactionBehaviourProvider.cs @@ -0,0 +1,9 @@ +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Uow +{ + public class NullUnitOfWorkTransactionBehaviourProvider : IUnitOfWorkTransactionBehaviourProvider, ISingletonDependency + { + public bool? IsTransactional => null; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs index b4158229fe..d53acc8f66 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWork.cs @@ -11,6 +11,8 @@ namespace Volo.Abp.Uow { public class UnitOfWork : IUnitOfWork, ITransientDependency { + public const string UnitOfWorkReservationName = "_AbpActionUnitOfWork"; + public Guid Id { get; } = Guid.NewGuid(); public IAbpUnitOfWorkOptions Options { get; private set; } @@ -302,7 +304,7 @@ namespace Volo.Abp.Uow } } } - + protected virtual async Task CommitTransactionsAsync() { foreach (var transaction in GetAllActiveTransactionApis()) diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs index df867c2320..ed225ccc58 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkFailedEventArgs.cs @@ -9,8 +9,8 @@ namespace Volo.Abp.Uow public class UnitOfWorkFailedEventArgs : UnitOfWorkEventArgs { /// - /// Exception that caused failure. This is set only if an error occurred during . - /// Can be null if there is no exception, but is not called. + /// Exception that caused failure. This is set only if an error occurred during . + /// Can be null if there is no exception, but is not called. /// Can be null if another exception occurred during the UOW. /// [CanBeNull] diff --git a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs index f5afcea494..464b6bb871 100644 --- a/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs +++ b/framework/src/Volo.Abp.Uow/Volo/Abp/Uow/UnitOfWorkInterceptor.cs @@ -10,15 +10,20 @@ namespace Volo.Abp.Uow public class UnitOfWorkInterceptor : AbpInterceptor, ITransientDependency { private readonly IUnitOfWorkManager _unitOfWorkManager; + private readonly IUnitOfWorkTransactionBehaviourProvider _transactionBehaviourProvider; private readonly AbpUnitOfWorkDefaultOptions _defaultOptions; - public UnitOfWorkInterceptor(IUnitOfWorkManager unitOfWorkManager, IOptions options) + public UnitOfWorkInterceptor( + IUnitOfWorkManager unitOfWorkManager, + IOptions options, + IUnitOfWorkTransactionBehaviourProvider transactionBehaviourProvider) { _unitOfWorkManager = unitOfWorkManager; + _transactionBehaviourProvider = transactionBehaviourProvider; _defaultOptions = options.Value; } - public async override Task InterceptAsync(IAbpMethodInvocation invocation) + public override async Task InterceptAsync(IAbpMethodInvocation invocation) { if (!UnitOfWorkHelper.IsUnitOfWorkMethod(invocation.Method, out var unitOfWorkAttribute)) { @@ -26,7 +31,16 @@ namespace Volo.Abp.Uow return; } - using (var uow = _unitOfWorkManager.Begin(CreateOptions(invocation, unitOfWorkAttribute))) + var options = CreateOptions(invocation, unitOfWorkAttribute); + + //Trying to begin a reserved UOW by AbpUnitOfWorkMiddleware + if (_unitOfWorkManager.TryBeginReserved(UnitOfWork.UnitOfWorkReservationName, options)) + { + await invocation.ProceedAsync(); + return; + } + + using (var uow = _unitOfWorkManager.Begin(options)) { await invocation.ProceedAsync(); await uow.CompleteAsync(); @@ -42,7 +56,8 @@ namespace Volo.Abp.Uow if (unitOfWorkAttribute?.IsTransactional == null) { options.IsTransactional = _defaultOptions.CalculateIsTransactional( - autoValue: !invocation.Method.Name.StartsWith("Get", StringComparison.InvariantCultureIgnoreCase) + autoValue: _transactionBehaviourProvider.IsTransactional + ?? !invocation.Method.Name.StartsWith("Get", StringComparison.InvariantCultureIgnoreCase) ); } diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/en-GB.json b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/en-GB.json new file mode 100644 index 0000000000..a53b55a853 --- /dev/null +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/en-GB.json @@ -0,0 +1,32 @@ +{ + "culture": "en-GB", + "texts": { + "'{0}' and '{1}' do not match.": "'{0}' and '{1}' do not match.", + "The {0} field is not a valid credit card number.": "The {0} field is not a valid credit card number.", + "{0} is not valid.": "{0} is not valid.", + "The {0} field is not a valid e-mail address.": "The {0} field is not a valid Email address.", + "The {0} field only accepts files with the following extensions: {1}": "The {0} field only accepts files with the following extensions: {1}", + "The field {0} must be a string or array type with a maximum length of '{1}'.": "The field {0} must be a string or array type with a maximum length of '{1}'.", + "The {0} field is not a valid phone number.": "The {0} field is not a valid phone number.", + "The field {0} must be between {1} and {2}.": "The field {0} must be between {1} and {2}.", + "The field {0} must match the regular expression '{1}'.": "The field {0} does not match the requested format.", + "The {0} field is required.": "The {0} field is required.", + "The field {0} must be a string with a maximum length of {1}.": "The field {0} must be a string with a maximum length of {1}.", + "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.", + "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "The {0} field is not a valid fully-qualified http, https, or ftp Url.", + "The field {0} is invalid.": "The field {0} is invalid.", + "ThisFieldIsNotAValidCreditCardNumber.": "This field is not a valid credit card number.", + "ThisFieldIsNotValid.": "This field is not valid.", + "ThisFieldIsNotAValidEmailAddress.": "This field is not a valid e-mail address.", + "ThisFieldOnlyAcceptsFilesWithTheFollowingExtensions:{0}": "This field only accepts files with the following extensions: {0}", + "ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}": "This field must be a string or array type with a maximum length of '{0}'.", + "ThisFieldIsNotAValidPhoneNumber.": "This field is not a valid phone number.", + "ThisFieldMustBeBetween{0}And{1}": "This field must be between {0} and {1}.", + "ThisFieldMustMatchTheRegularExpression{0}": "This field must match the regular expression '{0}'.", + "ThisFieldIsRequired.": "This field is required.", + "ThisFieldMustBeAStringWithAMaximumLengthOf{0}": "This field must be a string with a maximum length of {0}.", + "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "This field must be a string with a minimum length of {1} and a maximum length of {0}.", + "ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl": "This field is not a valid fully-qualified http, https, or ftp URL.", + "ThisFieldIsInvalid.": "This field is invalid." + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/en-GB.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/en-GB.json new file mode 100644 index 0000000000..72096e5385 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "BirthDate": "Birth date", + "Value1": "Value One" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs index 8c647c92c4..8ca1228ee6 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs @@ -54,13 +54,13 @@ namespace Volo.Abp.Auditing public class MyAuditedObject1 : IMyAuditedObject { - public async virtual Task DoItAsync(InputObject inputObject) + public virtual Task DoItAsync(InputObject inputObject) { - return new ResultObject + return Task.FromResult(new ResultObject { Value1 = inputObject.Value1 + "-result", Value2 = inputObject.Value2 + 1 - }; + }); } } diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs index 3ac2246dcc..ea70649350 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AbpAutoMapperModule_Basic_Tests.cs @@ -38,12 +38,12 @@ namespace Volo.Abp.AutoMapper } //[Fact] TODO: Disabled because of https://github.com/AutoMapper/AutoMapper/pull/2379#issuecomment-355899664 - public void Should_Not_Map_Objects_With_AutoMap_Attributes() + /*public void Should_Not_Map_Objects_With_AutoMap_Attributes() { Assert.ThrowsAny(() => { _objectMapper.Map(new MyEntity {Number = 42}); }); - } + }*/ } } diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_Dependency_Injection_Tests.cs b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_Dependency_Injection_Tests.cs new file mode 100644 index 0000000000..56c5e6f061 --- /dev/null +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutoMapper_Dependency_Injection_Tests.cs @@ -0,0 +1,62 @@ +using AutoMapper; +using Shouldly; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Testing; +using Xunit; +using IObjectMapper = Volo.Abp.ObjectMapping.IObjectMapper; + +namespace Volo.Abp.AutoMapper +{ + public class AutoMapper_Dependency_Injection_Tests : AbpIntegratedTest + { + private readonly IObjectMapper _objectMapper; + + public AutoMapper_Dependency_Injection_Tests() + { + _objectMapper = GetRequiredService(); + } + + [Fact] + public void Should_Registered_AutoMapper_Service() + { + GetService().ShouldNotBeNull(); + } + + [Fact] + public void Custom_MappingAction_Test() + { + var sourceModel = new SourceModel + { + Name = "Source" + }; + + _objectMapper.Map(sourceModel).Name.ShouldBe(nameof(CustomMappingActionService)); + } + + public class SourceModel + { + public string Name { get; set; } + } + + public class DestModel + { + public string Name { get; set; } + } + + public class MapperActionProfile : Profile + { + public MapperActionProfile() + { + CreateMap().AfterMap(); + } + } + + public class CustomMappingActionService : IMappingAction + { + public void Process(SourceModel source, DestModel destination, ResolutionContext context) + { + destination.Name = nameof(CustomMappingActionService); + } + } + } +} diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs index b5127e3d7e..e4510a366a 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo/Abp/Dapper/Repositories/PersonDapperRepository.cs @@ -17,14 +17,19 @@ namespace Volo.Abp.Dapper.Repositories public virtual async Task> GetAllPersonNames() { - return (await DbConnection.QueryAsync("select Name from People", transaction: DbTransaction)) - .ToList(); + return (await (await GetDbConnectionAsync()) + .QueryAsync( + "select Name from People", + transaction: await GetDbTransactionAsync() + ) + ).ToList(); } public virtual async Task UpdatePersonNames(string name) { - return await DbConnection.ExecuteAsync("update People set Name = @NewName", new { NewName = name }, - DbTransaction); + return await (await GetDbConnectionAsync()) + .ExecuteAsync("update People set Name = @NewName", new {NewName = name}, + await GetDbTransactionAsync()); } } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs b/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs index d13c89671e..3971c29ff0 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs +++ b/framework/test/Volo.Abp.Data.Tests/Volo/Abp/Data/ConnectionStringResolver_Tests.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.DependencyInjection; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; using Shouldly; using Volo.Abp.Modularity; using Volo.Abp.Testing; @@ -21,21 +22,21 @@ namespace Volo.Abp.Data } [Fact] - public void Should_Get_Default_ConnString_By_Default() + public async Task Should_Get_Default_ConnString_By_Default() { - _connectionStringResolver.Resolve().ShouldBe(DefaultConnString); + (await _connectionStringResolver.ResolveAsync()).ShouldBe(DefaultConnString); } [Fact] - public void Should_Get_Specific_ConnString_IfDefined() + public async Task Should_Get_Specific_ConnString_IfDefined() { - _connectionStringResolver.Resolve(Database1Name).ShouldBe(Database1ConnString); + (await _connectionStringResolver.ResolveAsync(Database1Name)).ShouldBe(Database1ConnString); } [Fact] - public void Should_Get_Default_ConnString_If_Not_Specified() + public async Task Should_Get_Default_ConnString_If_Not_Specified() { - _connectionStringResolver.Resolve(Database2Name).ShouldBe(DefaultConnString); + (await _connectionStringResolver.ResolveAsync(Database2Name)).ShouldBe(DefaultConnString); } [DependsOn(typeof(AbpDataModule))] diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs index baf49f4314..85696fae21 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Repositories/RepositoryRegistration_Tests.cs @@ -242,11 +242,17 @@ namespace Volo.Abp.Domain.Repositories where TEntity : class, IEntity { + [Obsolete("Use GetQueryableAsync method.")] protected override IQueryable GetQueryable() { throw new NotImplementedException(); } + public override Task> GetQueryableAsync() + { + throw new NotImplementedException(); + } + public override Task FindAsync(Expression> predicate, bool includeDetails = true, CancellationToken cancellationToken = default) { throw new NotImplementedException(); diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/en-GB.json b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/en-GB.json new file mode 100644 index 0000000000..65795ab007 --- /dev/null +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/en-GB.json @@ -0,0 +1,6 @@ +{ + "culture": "en-GB", + "texts": { + "hello": "Hello" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs index 7bc4af2e31..977cb8522a 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/DbContext_Replace_Tests.cs @@ -26,12 +26,12 @@ namespace Volo.Abp.EntityFrameworkCore { (ServiceProvider.GetRequiredService() is TestAppDbContext).ShouldBeTrue(); - using (_unitOfWorkManager.Begin()) + using (var uow = _unitOfWorkManager.Begin()) { - (_dummyRepository.GetDbContext() is IThirdDbContext).ShouldBeTrue(); - (_dummyRepository.GetDbContext() is TestAppDbContext).ShouldBeTrue(); + ((await _dummyRepository.GetDbContextAsync()) is IThirdDbContext).ShouldBeTrue(); + ((await _dummyRepository.GetDbContextAsync()) is TestAppDbContext).ShouldBeTrue(); - await _unitOfWorkManager.Current.CompleteAsync(); + await uow.CompleteAsync(); } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs index f94f16c390..aa1e0080b5 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Domain/ExtraProperties_Tests.cs @@ -44,15 +44,13 @@ namespace Volo.Abp.EntityFrameworkCore.Domain [Fact] public async Task An_Extra_Property_Configured_As_Extension2() { - await WithUnitOfWorkAsync(() => + await WithUnitOfWorkAsync(async () => { - var entityEntry = CityRepository.GetDbContext().Attach(new City(Guid.NewGuid(), "NewYork")); + var entityEntry = (await CityRepository.GetDbContextAsync()).Attach(new City(Guid.NewGuid(), "NewYork")); var indexes = entityEntry.Metadata.GetIndexes().ToList(); indexes.ShouldNotBeEmpty(); indexes.ShouldContain(x => x.IsUnique); - return Task.CompletedTask; }); - } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs index 027f54a03a..cd85cbcb5a 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/CityRepository.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore { public class CityRepository : EfCoreRepository, ICityRepository { - public CityRepository(IDbContextProvider dbContextProvider) + public CityRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } @@ -24,7 +24,7 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore public async Task> GetPeopleInTheCityAsync(string cityName) { var city = await FindByNameAsync(cityName); - return await DbContext.People.Where(p => p.CityId == city.Id).ToListAsync(); + return await (await GetDbContextAsync()).People.Where(p => p.CityId == city.Id).ToListAsync(); } } } diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs index ab8c1920a7..6413140bf1 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/PersonRepository.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore public async Task GetViewAsync(string name) { - return await DbContext.PersonView.Where(x => x.Name == name).FirstOrDefaultAsync(); + return await (await GetDbContextAsync()).PersonView.Where(x => x.Name == name).FirstOrDefaultAsync(); } } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/en-GB.json b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/en-GB.json new file mode 100644 index 0000000000..c4f07268eb --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/en-GB.json @@ -0,0 +1,6 @@ +{ + "culture": "en-GB", + "texts": { + "Volo.Abp.Http.DynamicProxying:10001": "Business exception with data: {0}" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/en-GB.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/en-GB.json new file mode 100644 index 0000000000..e54ebaa1f4 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "USA": "United States of America", + "Brazil": "Brazil" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en-GB.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en-GB.json new file mode 100644 index 0000000000..1ea8167f36 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "ThisFieldIsRequired": "This field is required", + "MaxLenghtErrorMessage": "This field can be maximum of '{0}' chars" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en-GB.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en-GB.json new file mode 100644 index 0000000000..4e80b6d07d --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en-GB.json @@ -0,0 +1,11 @@ +{ + "culture": "en-GB", + "texts": { + "Hello {0}.": "Hello {0}.", + "Car": "Car", + "CarPlural": "Cars", + "MaxLenghtErrorMessage": "This field's length can be a maximum of '{0}' chars", + "Universe": "Universe", + "FortyTwo": "Forty Two" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/en-GB.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/en-GB.json new file mode 100644 index 0000000000..65cf997055 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/en-GB.json @@ -0,0 +1,6 @@ +{ + "culture": "en-GB", + "texts": { + "SeeYou": "See you" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs index b6d43dc875..309339e09d 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/CityRepository.cs @@ -10,21 +10,21 @@ namespace Volo.Abp.TestApp.MemoryDb { public class CityRepository : MemoryDbRepository, ICityRepository { - public CityRepository(IMemoryDatabaseProvider databaseProvider) + public CityRepository(IMemoryDatabaseProvider databaseProvider) : base(databaseProvider) { } - public Task FindByNameAsync(string name) + public async Task FindByNameAsync(string name) { - return Task.FromResult(Collection.FirstOrDefault(c => c.Name == name)); + return (await GetCollectionAsync()).FirstOrDefault(c => c.Name == name); } public async Task> GetPeopleInTheCityAsync(string cityName) { var city = await FindByNameAsync(cityName); - return Database.Collection().Where(p => p.CityId == city.Id).ToList(); + return (await GetDatabaseAsync()).Collection().Where(p => p.CityId == city.Id).ToList(); } } } diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/MongoDbAsyncQueryableProvider_Tests.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/MongoDbAsyncQueryableProvider_Tests.cs index ae9be03d57..5335aa11be 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/MongoDbAsyncQueryableProvider_Tests.cs +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/MongoDbAsyncQueryableProvider_Tests.cs @@ -25,10 +25,10 @@ namespace Volo.Abp.MongoDB.Repositories } [Fact] - public void CanExecute() + public async Task CanExecuteAsync() { _mongoDbAsyncQueryableProvider.CanExecute(_personRepository).ShouldBeTrue(); - _mongoDbAsyncQueryableProvider.CanExecute(_personRepository.WithDetails()).ShouldBeTrue(); + _mongoDbAsyncQueryableProvider.CanExecute(await _personRepository.WithDetailsAsync()).ShouldBeTrue(); } [Fact] diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs index bb31883010..df6eed85cc 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/CityRepository.cs @@ -19,13 +19,13 @@ namespace Volo.Abp.TestApp.MongoDB public async Task FindByNameAsync(string name) { - return await (await Collection.FindAsync(c => c.Name == name)).FirstOrDefaultAsync(); + return await (await (await GetCollectionAsync()).FindAsync(c => c.Name == name)).FirstOrDefaultAsync(); } public async Task> GetPeopleInTheCityAsync(string cityName) { var city = await FindByNameAsync(cityName); - return await DbContext.People.AsQueryable().Where(p => p.CityId == city.Id).ToListAsync(); + return await (await GetDbContextAsync()).People.AsQueryable().Where(p => p.CityId == city.Id).ToListAsync(); } } } diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs index a6e5fab1c8..f6af2bde72 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo/Abp/Data/MultiTenancy/MultiTenantConnectionStringResolver_Tests.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Shouldly; using Volo.Abp.MultiTenancy; @@ -49,28 +50,28 @@ namespace Volo.Abp.Data.MultiTenancy } [Fact] - public void All_Tests() + public async Task All_Tests() { //No tenant in current context - _connectionResolver.Resolve().ShouldBe("default-value"); - _connectionResolver.Resolve("db1").ShouldBe("db1-default-value"); + (await _connectionResolver.ResolveAsync()).ShouldBe("default-value"); + (await _connectionResolver.ResolveAsync("db1")).ShouldBe("db1-default-value"); - //Overrided connection strings for tenant1 + //Overriden connection strings for tenant1 using (_currentTenant.Change(_tenant1Id)) { - _connectionResolver.Resolve().ShouldBe("tenant1-default-value"); - _connectionResolver.Resolve("db1").ShouldBe("tenant1-db1-value"); + (await _connectionResolver.ResolveAsync()).ShouldBe("tenant1-default-value"); + (await _connectionResolver.ResolveAsync("db1")).ShouldBe("tenant1-db1-value"); } //No tenant in current context - _connectionResolver.Resolve().ShouldBe("default-value"); - _connectionResolver.Resolve("db1").ShouldBe("db1-default-value"); + (await _connectionResolver.ResolveAsync()).ShouldBe("default-value"); + (await _connectionResolver.ResolveAsync("db1")).ShouldBe("db1-default-value"); //Undefined connection strings for tenant2 using (_currentTenant.Change(_tenant2Id)) { - _connectionResolver.Resolve().ShouldBe("default-value"); - _connectionResolver.Resolve("db1").ShouldBe("db1-default-value"); + (await _connectionResolver.ResolveAsync()).ShouldBe("default-value"); + (await _connectionResolver.ResolveAsync("db1")).ShouldBe("db1-default-value"); } } } diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs index 6078236380..3ca511a7ea 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Queryable_Tests.cs @@ -44,24 +44,22 @@ namespace Volo.Abp.TestApp.Testing [Fact] public async Task WithDetails() { - await WithUnitOfWorkAsync(() => + await WithUnitOfWorkAsync(async () => { - var person = PersonRepository.WithDetails().Single(p => p.Id == TestDataBuilder.UserDouglasId); + var person = (await PersonRepository.WithDetailsAsync()).Single(p => p.Id == TestDataBuilder.UserDouglasId); person.Name.ShouldBe("Douglas"); person.Phones.Count.ShouldBe(2); - return Task.CompletedTask; }); } [Fact] public async Task WithDetails_Explicit() { - await WithUnitOfWorkAsync(() => + await WithUnitOfWorkAsync(async () => { - var person = PersonRepository.WithDetails(p => p.Phones).Single(p => p.Id == TestDataBuilder.UserDouglasId); + var person = (await PersonRepository.WithDetailsAsync(p => p.Phones)).Single(p => p.Id == TestDataBuilder.UserDouglasId); person.Name.ShouldBe("Douglas"); person.Phones.Count.ShouldBe(2); - return Task.CompletedTask; }); } } diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/en-GB.json b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/en-GB.json new file mode 100644 index 0000000000..75d5e13551 --- /dev/null +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "HelloText": "Hello {0}", + "HowAreYou": "how are you?" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs index bf120d2e33..8fd3d68b18 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs +++ b/framework/test/Volo.Abp.Uow.Tests/Volo/Abp/Uow/UnitOfWork_Events_Tests.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.Uow { uow.OnCompleted(() => { - completed = true; + completed = true; return Task.CompletedTask; }); @@ -50,7 +50,12 @@ namespace Volo.Abp.Uow { using (var childUow = _unitOfWorkManager.Begin()) { - childUow.OnCompleted(async () => completed = true); + childUow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + uow.Disposed += (sender, args) => disposed = true; await childUow.CompleteAsync(); @@ -80,9 +85,14 @@ namespace Volo.Abp.Uow using (var uow = _unitOfWorkManager.Begin()) { - uow.OnCompleted(async () => completed = true); - uow.Failed += (sender, args) => failed = true; - uow.Disposed += (sender, args) => disposed = true; + uow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + + uow.Failed += (_, _) => failed = true; + uow.Disposed += (_, _) => disposed = true; } completed.ShouldBeFalse(); @@ -101,7 +111,12 @@ namespace Volo.Abp.Uow { using (var uow = _unitOfWorkManager.Begin()) { - uow.OnCompleted(async () => completed = true); + uow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + uow.Failed += (sender, args) => failed = true; uow.Disposed += (sender, args) => disposed = true; @@ -125,7 +140,12 @@ namespace Volo.Abp.Uow using (var uow = _unitOfWorkManager.Begin()) { - uow.OnCompleted(async () => completed = true); + uow.OnCompleted(() => + { + completed = true; + return Task.CompletedTask; + }); + uow.Failed += (sender, args) => { failed = true; args.IsRolledback.ShouldBeTrue(); }; uow.Disposed += (sender, args) => disposed = true; diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..297a656477 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json @@ -0,0 +1,65 @@ +{ + "culture": "en-GB", + "texts": { + "UserName": "Username", + "EmailAddress": "Email address", + "UserNameOrEmailAddress": "Username or email address", + "Password": "Password", + "RememberMe": "Remember me", + "UseAnotherServiceToLogin": "Use another service to log in", + "UserLockedOutMessage": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", + "InvalidUserNameOrPassword": "Invalid username or password!", + "LoginIsNotAllowed": "You are not allowed to login! You need to confirm your email/phone number.", + "SelfRegistrationDisabledMessage": "Self-registration is disabled for this application. Please contact the application administrator to register a new user.", + "LocalLoginDisabledMessage": "Local login is disabled for this application.", + "Login": "Login", + "Cancel": "Cancel", + "Register": "Register", + "AreYouANewUser": "Are you a new user?", + "AlreadyRegistered": "Already registered?", + "InvalidLoginRequest": "Invalid login request", + "ThereAreNoLoginSchemesConfiguredForThisClient": "There are no login schemes configured for this client.", + "LogInUsingYourProviderAccount": "Log in using your {0} account", + "DisplayName:CurrentPassword": "Current password", + "DisplayName:NewPassword": "New password", + "DisplayName:NewPasswordConfirm": "Confirm new password", + "PasswordChangedMessage": "Your password has been successfully changed.", + "DisplayName:UserName": "Username", + "DisplayName:Email": "Email", + "DisplayName:Name": "Name", + "DisplayName:Surname": "Surname", + "DisplayName:Password": "Password", + "DisplayName:EmailAddress": "Email address", + "DisplayName:PhoneNumber": "Phone number", + "PersonalSettings": "Personal settings", + "PersonalSettingsSaved": "Personal settings saved", + "PasswordChanged": "Password changed", + "NewPasswordConfirmFailed": "Please confirm the new password.", + "Manage": "Manage", + "ManageYourProfile": "Manage your profile", + "DisplayName:Abp.Account.IsSelfRegistrationEnabled": "Is self-registration enabled", + "Description:Abp.Account.IsSelfRegistrationEnabled": "Whether a user can register the account by his or her self.", + "DisplayName:Abp.Account.EnableLocalLogin": "Authenticate with a local account", + "Description:Abp.Account.EnableLocalLogin": "Indicates if the server will allow users to authenticate with a local account.", + "LoggedOutTitle": "Signed Out", + "LoggedOutText": "You have been signed out and you will be redirected soon.", + "ReturnToText": "Click here to redirect to {0}", + "OrLoginWith": "Or login with:", + "ForgotPassword": "Forgot password?", + "SendPasswordResetLink_Information": "A password reset link will be sent to your email to reset your password. If you don't get an email within a few minutes, please re-try.", + "PasswordResetMailSentMessage": "Account recovery email has been sent to your e-mail address. If you receive the email within 15 minutes, check your spam/junk folder. If you find it there, please mark it as -Not Junk-.", + "ResetPassword": "Reset Password", + "ConfirmPassword": "Confirm (repeat) the password", + "ResetPassword_Information": "Please enter your new password.", + "YourPasswordIsSuccessfullyReset": "Your password has been successfully reset.", + "GoToTheApplication": "Go to the application", + "BackToLogin": "Back to login", + "ProfileTab:Password": "Change password", + "ProfileTab:PersonalInfo": "Personal info", + "ReturnToApplication": "Return to application", + "Volo.Account:InvalidEmailAddress": "Cannot find the given email address: {0}", + "PasswordReset": "Password reset", + "PasswordResetInfoInEmail": "We received an account recovery request! If you initiated this request, click the following link to reset your password.", + "ResetMyPassword": "Reset my password" + } +} \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs index 6677f2d4a2..edb1f3f599 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs @@ -39,7 +39,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = GetListQuery( + var query = await GetListQueryAsync( startTime, endTime, httpMethod, @@ -75,7 +75,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore HttpStatusCode? httpStatusCode = null, CancellationToken cancellationToken = default) { - var query = GetListQuery( + var query = await GetListQueryAsync( startTime, endTime, httpMethod, @@ -94,7 +94,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore return totalCount; } - protected virtual IQueryable GetListQuery( + protected virtual async Task> GetListQueryAsync( DateTime? startTime = null, DateTime? endTime = null, string httpMethod = null, @@ -109,7 +109,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore bool includeDetails = false) { var nHttpStatusCode = (int?) httpStatusCode; - return DbSet.AsNoTracking() + return (await GetDbSetAsync()).AsNoTracking() .IncludeDetails(includeDetails) .WhereIf(startTime.HasValue, auditLog => auditLog.ExecutionTime >= startTime) .WhereIf(endTime.HasValue, auditLog => auditLog.ExecutionTime <= endTime) @@ -127,7 +127,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore public virtual async Task> GetAverageExecutionDurationPerDayAsync(DateTime startDate, DateTime endDate) { - var result = await DbSet.AsNoTracking() + var result = await (await GetDbSetAsync()).AsNoTracking() .Where(a => a.ExecutionTime < endDate.AddDays(1) && a.ExecutionTime > startDate) .OrderBy(t => t.ExecutionTime) .GroupBy(t => new { t.ExecutionTime.Date }) @@ -137,14 +137,20 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore return result.ToDictionary(element => element.Day.ClearTime(), element => element.avgExecutionTime); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } + public virtual async Task GetEntityChange(Guid entityChangeId) { - var entityChange = await DbContext.Set() + var entityChange = await (await GetDbContextAsync()).Set() .AsNoTracking() .IncludeDetails() .Where(x => x.Id == entityChangeId) @@ -172,7 +178,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = GetEntityChangeListQuery(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName, includeDetails); + var query = await GetEntityChangeListQueryAsync(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName, includeDetails); return await query.OrderBy(sorting ?? "changeTime desc") .PageBy(skipCount, maxResultCount) @@ -188,7 +194,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore string entityTypeFullName = null, CancellationToken cancellationToken = default) { - var query = GetEntityChangeListQuery(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName); + var query = await GetEntityChangeListQueryAsync(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName); var totalCount = await query.LongCountAsync(GetCancellationToken(cancellationToken)); @@ -197,7 +203,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore public virtual async Task GetEntityChangeWithUsernameAsync(Guid entityChangeId) { - var auditLog = await DbSet.AsNoTracking().IncludeDetails() + var auditLog = await (await GetDbSetAsync()).AsNoTracking().IncludeDetails() .Where(x => x.EntityChanges.Any(y => y.Id == entityChangeId)).FirstAsync(); return new EntityChangeWithUsername() @@ -209,18 +215,20 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore public virtual async Task> GetEntityChangesWithUsernameAsync(string entityId, string entityTypeFullName) { - var query = DbContext.Set() + var dbContext = await GetDbContextAsync(); + + var query = dbContext.Set() .AsNoTracking() .IncludeDetails() .Where(x => x.EntityId == entityId && x.EntityTypeFullName == entityTypeFullName); return await (from e in query - join auditLog in DbSet on e.AuditLogId equals auditLog.Id - select new EntityChangeWithUsername() {EntityChange = e, UserName = auditLog.UserName}) + join auditLog in dbContext.AuditLogs on e.AuditLogId equals auditLog.Id + select new EntityChangeWithUsername {EntityChange = e, UserName = auditLog.UserName}) .OrderByDescending(x => x.EntityChange.ChangeTime).ToListAsync(); } - protected virtual IQueryable GetEntityChangeListQuery( + protected virtual async Task> GetEntityChangeListQueryAsync( Guid? auditLogId = null, DateTime? startTime = null, DateTime? endTime = null, @@ -229,14 +237,16 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore string entityTypeFullName = null, bool includeDetails = false) { - return DbContext.Set().AsNoTracking().IncludeDetails(includeDetails) - .WhereIf(auditLogId.HasValue, e => e.AuditLogId == auditLogId) - .WhereIf(startTime.HasValue, e => e.ChangeTime >= startTime) - .WhereIf(endTime.HasValue, e => e.ChangeTime <= endTime) - .WhereIf(changeType.HasValue, e => e.ChangeType == changeType) - .WhereIf(!string.IsNullOrWhiteSpace(entityId), e => e.EntityId == entityId) - .WhereIf(!string.IsNullOrWhiteSpace(entityTypeFullName), - e => e.EntityTypeFullName.Contains(entityTypeFullName)); + return (await GetDbContextAsync()) + .Set() + .AsNoTracking() + .IncludeDetails(includeDetails) + .WhereIf(auditLogId.HasValue, e => e.AuditLogId == auditLogId) + .WhereIf(startTime.HasValue, e => e.ChangeTime >= startTime) + .WhereIf(endTime.HasValue, e => e.ChangeTime <= endTime) + .WhereIf(changeType.HasValue, e => e.ChangeType == changeType) + .WhereIf(!string.IsNullOrWhiteSpace(entityId), e => e.EntityId == entityId) + .WhereIf(!string.IsNullOrWhiteSpace(entityTypeFullName), e => e.EntityTypeFullName.Contains(entityTypeFullName)); } } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs index 14e4dd39c7..788b6995bb 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs @@ -40,7 +40,7 @@ namespace Volo.Abp.AuditLogging.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = GetListQuery( + var query = await GetListQueryAsync( startTime, endTime, httpMethod, @@ -74,7 +74,7 @@ namespace Volo.Abp.AuditLogging.MongoDB HttpStatusCode? httpStatusCode = null, CancellationToken cancellationToken = default) { - var query = GetListQuery( + var query = await GetListQueryAsync( startTime, endTime, httpMethod, @@ -94,7 +94,7 @@ namespace Volo.Abp.AuditLogging.MongoDB return count; } - protected virtual IQueryable GetListQuery( + protected virtual async Task> GetListQueryAsync( DateTime? startTime = null, DateTime? endTime = null, string httpMethod = null, @@ -108,7 +108,7 @@ namespace Volo.Abp.AuditLogging.MongoDB HttpStatusCode? httpStatusCode = null, bool includeDetails = false) { - return GetMongoQueryable() + return (await GetMongoQueryableAsync()) .WhereIf(startTime.HasValue, auditLog => auditLog.ExecutionTime >= startTime) .WhereIf(endTime.HasValue, auditLog => auditLog.ExecutionTime <= endTime) .WhereIf(hasException.HasValue && hasException.Value, auditLog => auditLog.Exceptions != null && auditLog.Exceptions != "") @@ -126,7 +126,7 @@ namespace Volo.Abp.AuditLogging.MongoDB public virtual async Task> GetAverageExecutionDurationPerDayAsync(DateTime startDate, DateTime endDate) { - var result = await GetMongoQueryable() + var result = await (await GetMongoQueryableAsync()) .Where(a => a.ExecutionTime < endDate.AddDays(1) && a.ExecutionTime > startDate) .OrderBy(t => t.ExecutionTime) .GroupBy(t => new @@ -143,12 +143,11 @@ namespace Volo.Abp.AuditLogging.MongoDB public virtual async Task GetEntityChange(Guid entityChangeId) { - var entityChange = (await GetMongoQueryable() + var entityChange = (await (await GetMongoQueryableAsync()) .Where(x => x.EntityChanges.Any(y => y.Id == entityChangeId)) .OrderBy(x => x.Id) .FirstAsync()).EntityChanges.FirstOrDefault(x => x.Id == entityChangeId); - if (entityChange == null) { throw new EntityNotFoundException(typeof(EntityChange)); @@ -170,13 +169,13 @@ namespace Volo.Abp.AuditLogging.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = GetEntityChangeListQuery(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName); + var query = await GetEntityChangeListQueryAsync(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName); - var auditLogs = await query.As>() + return await query + .OrderBy(sorting ?? "changeTime desc") + .As>() .PageBy>(skipCount, maxResultCount) .ToListAsync(GetCancellationToken(cancellationToken)); - - return auditLogs.AsQueryable().OrderBy(sorting ?? "changeTime desc").ToList(); } public virtual async Task GetEntityChangeCountAsync( @@ -188,7 +187,7 @@ namespace Volo.Abp.AuditLogging.MongoDB string entityTypeFullName = null, CancellationToken cancellationToken = default) { - var query = GetEntityChangeListQuery(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName); + var query = await GetEntityChangeListQueryAsync(auditLogId, startTime, endTime, changeType, entityId, entityTypeFullName); var count = await query.As>().LongCountAsync(GetCancellationToken(cancellationToken)); @@ -197,7 +196,7 @@ namespace Volo.Abp.AuditLogging.MongoDB public virtual async Task GetEntityChangeWithUsernameAsync(Guid entityChangeId) { - var auditLog = (await GetMongoQueryable() + var auditLog = (await (await GetMongoQueryableAsync()) .Where(x => x.EntityChanges.Any(y => y.Id == entityChangeId)) .FirstAsync()); @@ -210,7 +209,7 @@ namespace Volo.Abp.AuditLogging.MongoDB public virtual async Task> GetEntityChangesWithUsernameAsync(string entityId, string entityTypeFullName) { - var auditLogs = await GetMongoQueryable() + var auditLogs = await (await GetMongoQueryableAsync()) .Where(x => x.EntityChanges.Any(y => y.EntityId == entityId && y.EntityTypeFullName == entityTypeFullName)) .As>() .OrderByDescending(x => x.ExecutionTime) @@ -224,7 +223,7 @@ namespace Volo.Abp.AuditLogging.MongoDB {EntityChange = x, UserName = auditLogs.First(y => y.Id == x.AuditLogId).UserName}).ToList(); } - protected virtual IQueryable GetEntityChangeListQuery( + protected virtual async Task> GetEntityChangeListQueryAsync( Guid? auditLogId = null, DateTime? startTime = null, DateTime? endTime = null, @@ -232,7 +231,7 @@ namespace Volo.Abp.AuditLogging.MongoDB string entityId = null, string entityTypeFullName = null) { - return GetMongoQueryable() + return (await GetMongoQueryableAsync()) .SelectMany(x => x.EntityChanges) .WhereIf(auditLogId.HasValue, e => e.Id == auditLogId) .WhereIf(startTime.HasValue, e => e.ChangeTime >= startTime) diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/appsettings.json b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/appsettings.json index e1e6966497..3a8ae55ee8 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/appsettings.json +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True" } } \ No newline at end of file diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/appsettings.json b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/appsettings.json index e1e6966497..3a8ae55ee8 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/appsettings.json +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True" } } \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs index 29d2bb0170..1971faf380 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/EfCoreBackgroundJobRepository.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore public EfCoreBackgroundJobRepository( IDbContextProvider dbContextProvider, - IClock clock) + IClock clock) : base(dbContextProvider) { Clock = clock; @@ -23,14 +23,13 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore public virtual async Task> GetWaitingListAsync(int maxResultCount) { - return await GetWaitingListQuery(maxResultCount) - .ToListAsync(); + return await (await GetWaitingListQueryAsync(maxResultCount)).ToListAsync(); } - protected virtual IQueryable GetWaitingListQuery(int maxResultCount) + protected virtual async Task> GetWaitingListQueryAsync(int maxResultCount) { var now = Clock.Now; - return DbSet + return (await GetDbSetAsync()) .Where(t => !t.IsAbandoned && t.NextTryTime <= now) .OrderByDescending(t => t.Priority) .ThenBy(t => t.TryCount) diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs index 4399e15a98..258c9310e2 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/MongoBackgroundJobRepository.cs @@ -14,8 +14,8 @@ namespace Volo.Abp.BackgroundJobs.MongoDB protected IClock Clock { get; } public MongoBackgroundJobRepository( - IMongoDbContextProvider dbContextProvider, - IClock clock) + IMongoDbContextProvider dbContextProvider, + IClock clock) : base(dbContextProvider) { Clock = clock; @@ -23,14 +23,13 @@ namespace Volo.Abp.BackgroundJobs.MongoDB public virtual async Task> GetWaitingListAsync(int maxResultCount) { - return await GetWaitingListQuery(maxResultCount) - .ToListAsync(); + return await (await GetWaitingListQuery(maxResultCount)).ToListAsync(); } - protected virtual IMongoQueryable GetWaitingListQuery(int maxResultCount) + protected virtual async Task> GetWaitingListQuery(int maxResultCount) { var now = Clock.Now; - return GetMongoQueryable() + return (await GetMongoQueryableAsync()) .Where(t => !t.IsAbandoned && t.NextTryTime <= now) .OrderByDescending(t => t.Priority) .ThenBy(t => t.TryCount) diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/ConsoleAppConsoleAppModule.cs b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/ConsoleAppConsoleAppModule.cs index 5a6691c439..21f2ed53b8 100644 --- a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/ConsoleAppConsoleAppModule.cs +++ b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/ConsoleAppConsoleAppModule.cs @@ -39,7 +39,7 @@ namespace BlobStoring.Database.Host.ConsoleApp.ConsoleApp { Configure(options => { - options.ConnectionStrings.Default = "Server=localhost;Database=BlobStoring_Host;Trusted_Connection=True;MultipleActiveResultSets=true"; + options.ConnectionStrings.Default = "Server=localhost;Database=BlobStoring_Host;Trusted_Connection=True"; }); context.Services.AddAbpDbContext(options => diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/appsettings.json b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/appsettings.json index 2e1ff4f771..13d94f70db 100644 --- a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/appsettings.json +++ b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=BlobStoring_Host;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=BlobStoring_Host;Trusted_Connection=True" } } diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/en-GB.json b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/en-GB.json new file mode 100644 index 0000000000..6369087fa8 --- /dev/null +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/en-GB.json @@ -0,0 +1,6 @@ +{ + "culture": "en-GB", + "texts": { + "ManageYourProfile": "Manage your profile" + } +} \ No newline at end of file diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobContainerRepository.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobContainerRepository.cs index e1d0764807..64b7e3e40a 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobContainerRepository.cs +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobContainerRepository.cs @@ -10,14 +10,15 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore { public class EfCoreDatabaseBlobContainerRepository : EfCoreRepository, IDatabaseBlobContainerRepository { - public EfCoreDatabaseBlobContainerRepository(IDbContextProvider dbContextProvider) + public EfCoreDatabaseBlobContainerRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } public virtual async Task FindAsync(string name, CancellationToken cancellationToken = default) { - return await DbSet.FirstOrDefaultAsync(x => x.Name == name, GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .FirstOrDefaultAsync(x => x.Name == name, GetCancellationToken(cancellationToken)); } } -} \ No newline at end of file +} diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobRepository.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobRepository.cs index 098f6095e4..2ae9331def 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobRepository.cs +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/EfCoreDatabaseBlobRepository.cs @@ -20,7 +20,8 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore string name, CancellationToken cancellationToken = default) { - return await DbSet.FirstOrDefaultAsync( + return await (await GetDbSetAsync()) + .FirstOrDefaultAsync( x => x.ContainerId == containerId && x.Name == name, GetCancellationToken(cancellationToken) ); @@ -31,9 +32,11 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore string name, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync( - x => x.ContainerId == containerId && x.Name == name, - GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .AnyAsync( + x => x.ContainerId == containerId && x.Name == name, + GetCancellationToken(cancellationToken) + ); } public virtual async Task DeleteAsync( @@ -54,4 +57,4 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore return true; } } -} \ No newline at end of file +} diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/MongoDbDatabaseBlobRepository.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/MongoDbDatabaseBlobRepository.cs index 6c5b034fc1..17945a87db 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/MongoDbDatabaseBlobRepository.cs +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/MongoDbDatabaseBlobRepository.cs @@ -15,35 +15,41 @@ namespace Volo.Abp.BlobStoring.Database.MongoDB public virtual async Task FindAsync(Guid containerId, string name, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().FirstOrDefaultAsync( - x => x.ContainerId == containerId && - x.Name == name, - GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + + return await (await GetMongoQueryableAsync(cancellationToken)) + .FirstOrDefaultAsync( + x => x.ContainerId == containerId && x.Name == name, + cancellationToken + ); } public virtual async Task ExistsAsync(Guid containerId, string name, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync( - x => x.ContainerId == containerId && - x.Name == name, - GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + + return await (await GetMongoQueryableAsync(cancellationToken)) + .AnyAsync( + x => x.ContainerId == containerId && x.Name == name, + cancellationToken + ); } public virtual async Task DeleteAsync( - Guid containerId, + Guid containerId, string name, bool autoSave = false, CancellationToken cancellationToken = default) { var blob = await FindAsync(containerId, name, cancellationToken); - if (blob == null) { return false; } - await base.DeleteAsync(blob, autoSave, cancellationToken: GetCancellationToken(cancellationToken)); + await base.DeleteAsync(blob, autoSave, cancellationToken); + return true; } } -} \ No newline at end of file +} diff --git a/modules/blogging/app/Volo.BloggingTestApp/appsettings.json b/modules/blogging/app/Volo.BloggingTestApp/appsettings.json index c85ffe9489..6d3d120f4e 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/appsettings.json +++ b/modules/blogging/app/Volo.BloggingTestApp/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "SqlServer": "Server=localhost;Database=BloggingTestApp;Trusted_Connection=True;MultipleActiveResultSets=true", + "SqlServer": "Server=localhost;Database=BloggingTestApp;Trusted_Connection=True", "MongoDb": "mongodb://localhost:27017/BloggingTestApp" } } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en-GB.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..39c2e5b069 --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/en-GB.json @@ -0,0 +1,58 @@ +{ + "culture": "en-GB", + "texts": { + "Menu:Blogs": "Blogs", + "Menu:BlogManagement": "Blogging", + "Permission:Management": "Management", + "Permission:Edit": "Edit", + "Permission:Create": "Create", + "Permission:Delete": "Delete", + "Permission:Blogging": "Blog", + "Permission:Blogs": "Blogs", + "Permission:Posts": "Posts", + "Permission:Tags": "Tags", + "Permission:Comments": "Comments", + "Title": "Title", + "Delete": "Delete", + "Reply": "Reply", + "ReplyTo": "Reply To {0}", + "ContinueReading": "Continue Reading", + "DaysAgo": "{0} day(s) ago", + "YearsAgo": "{0} year(s) ago", + "MonthsAgo": "{0} month(s) ago", + "WeeksAgo": "{0} week(s) ago", + "MinutesAgo": "{0} minute(s) ago", + "SecondsAgo": "{0} second(s) ago", + "HoursAgo": "{0} hour(s) ago", + "Now": "now", + "Content": "Content", + "SeeAll": "See All", + "PopularTags": "Popular Tags", + "WiewsWithCount": "{0} views", + "LastPosts": "Last Posts", + "LeaveComment": "Leave Comment", + "TagsInThisArticle": "Tags in this article", + "Posts": "Posts", + "Edit": "Edit", + "BLOG": "BLOG", + "CommentDeletionWarningMessage": "Comment will be deleted.", + "PostDeletionWarningMessage": "Post will be deleted.", + "BlogDeletionWarningMessage": "Blog will be deleted.", + "AreYouSure": "Are you sure?", + "CommentWithCount": "{0} comments", + "Comment": "Comment", + "ShareOnTwitter": "Share On Twitter", + "CoverImage": "Cover Image", + "CreateANewPost": "Create A New Post", + "CreateANewBlog": "Create A New Blog", + "WhatIsNew": "What's new?", + "Name": "Name", + "ShortName": "Short Name", + "CreationTime": "Creation time", + "Description": "Description", + "Blogs": "Blogs", + "Tags": "Tags", + "ShareOn": "Share on", + "TitleLengthWarning": "Keep your title size under 60 characters to be SEO friendly!" + } +} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Blogs/EfCoreBlogRepository.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Blogs/EfCoreBlogRepository.cs index 604f7ca8b5..564d45dc7a 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Blogs/EfCoreBlogRepository.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Blogs/EfCoreBlogRepository.cs @@ -17,7 +17,7 @@ namespace Volo.Blogging.Blogs public async Task FindByShortNameAsync(string shortName) { - return await DbSet.FirstOrDefaultAsync(p => p.ShortName == shortName); + return await (await GetDbSetAsync()).FirstOrDefaultAsync(p => p.ShortName == shortName); } } } diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Comments/EfCoreCommentRepository.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Comments/EfCoreCommentRepository.cs index 751d106071..6c28b521aa 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Comments/EfCoreCommentRepository.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Comments/EfCoreCommentRepository.cs @@ -11,14 +11,14 @@ namespace Volo.Blogging.Comments { public class EfCoreCommentRepository : EfCoreRepository, ICommentRepository { - public EfCoreCommentRepository(IDbContextProvider dbContextProvider) + public EfCoreCommentRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { } public async Task> GetListOfPostAsync(Guid postId) { - return await DbSet + return await (await GetDbSetAsync()) .Where(a => a.PostId == postId) .OrderBy(a => a.CreationTime) .ToListAsync(); @@ -26,20 +26,20 @@ namespace Volo.Blogging.Comments public async Task GetCommentCountOfPostAsync(Guid postId) { - return await DbSet + return await (await GetDbSetAsync()) .CountAsync(a => a.PostId == postId); } public async Task> GetRepliesOfComment(Guid id) { - return await DbSet + return await (await GetDbSetAsync()) .Where(a => a.RepliedCommentId == id).ToListAsync(); } public async Task DeleteOfPost(Guid id) { - var recordsToDelete = DbSet.Where(pt => pt.PostId == id); - DbSet.RemoveRange(recordsToDelete); + var recordsToDelete = (await GetDbSetAsync()).Where(pt => pt.PostId == id); + (await GetDbSetAsync()).RemoveRange(recordsToDelete); } } } diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs index b152f3ae7d..a5a84fd340 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs @@ -20,24 +20,24 @@ namespace Volo.Blogging.Posts public async Task> GetPostsByBlogId(Guid id) { - return await DbSet.Where(p => p.BlogId == id).OrderByDescending(p=>p.CreationTime).ToListAsync(); + return await (await GetDbSetAsync()).Where(p => p.BlogId == id).OrderByDescending(p=>p.CreationTime).ToListAsync(); } - public Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null) + public async Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null) { - var query = DbSet.Where(p => blogId == p.BlogId && p.Url == url); + var query = (await GetDbSetAsync()).Where(p => blogId == p.BlogId && p.Url == url); if (excludingPostId != null) { query = query.Where(p => excludingPostId != p.Id); } - return query.AnyAsync(); + return await query.AnyAsync(); } public async Task GetPostByUrl(Guid blogId, string url) { - var post = await DbSet.FirstOrDefaultAsync(p => p.BlogId == blogId && p.Url == url); + var post = await (await GetDbSetAsync()).FirstOrDefaultAsync(p => p.BlogId == blogId && p.Url == url); if (post == null) { @@ -51,18 +51,18 @@ namespace Volo.Blogging.Posts { if (!descending) { - return await DbSet.Where(x=>x.BlogId==blogId).OrderByDescending(x => x.CreationTime).ToListAsync(); + return await (await GetDbSetAsync()).Where(x=>x.BlogId==blogId).OrderByDescending(x => x.CreationTime).ToListAsync(); } else { - return await DbSet.Where(x => x.BlogId == blogId).OrderBy(x => x.CreationTime).ToListAsync(); + return await (await GetDbSetAsync()).Where(x => x.BlogId == blogId).OrderBy(x => x.CreationTime).ToListAsync(); } } - public override IQueryable WithDetails() + public override async Task> WithDetailsAsync() { - return GetQueryable().IncludeDetails(); + return (await GetQueryableAsync()).IncludeDetails(); } } } diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Tagging/EfCoreTagRepository.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Tagging/EfCoreTagRepository.cs index 3e897fa7e3..a92ae780da 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Tagging/EfCoreTagRepository.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Tagging/EfCoreTagRepository.cs @@ -19,27 +19,27 @@ namespace Volo.Blogging.Tagging public async Task> GetListAsync(Guid blogId) { - return await DbSet.Where(t=>t.BlogId == blogId).ToListAsync(); + return await (await GetDbSetAsync()).Where(t=>t.BlogId == blogId).ToListAsync(); } public async Task GetByNameAsync(Guid blogId, string name) { - return await DbSet.FirstAsync(t=> t.BlogId == blogId && t.Name == name); + return await (await GetDbSetAsync()).FirstAsync(t=> t.BlogId == blogId && t.Name == name); } public async Task FindByNameAsync(Guid blogId, string name) { - return await DbSet.FirstOrDefaultAsync(t => t.BlogId == blogId && t.Name == name); + return await (await GetDbSetAsync()).FirstOrDefaultAsync(t => t.BlogId == blogId && t.Name == name); } public async Task> GetListAsync(IEnumerable ids) { - return await DbSet.Where(t => ids.Contains(t.Id)).ToListAsync(); + return await (await GetDbSetAsync()).Where(t => ids.Contains(t.Id)).ToListAsync(); } public async Task DecreaseUsageCountOfTagsAsync(List ids, CancellationToken cancellationToken = default) { - var tags = await DbSet + var tags = await (await GetDbSetAsync()) .Where(t => ids.Any(id => id == t.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Blogs/MongoBlogRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Blogs/MongoBlogRepository.cs index b1c7b5d319..6025dfe3ca 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Blogs/MongoBlogRepository.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Blogs/MongoBlogRepository.cs @@ -15,7 +15,7 @@ namespace Volo.Blogging.Blogs public async Task FindByShortNameAsync(string shortName) { - return await GetMongoQueryable().FirstOrDefaultAsync(p => p.ShortName == shortName); + return await (await GetMongoQueryableAsync()).FirstOrDefaultAsync(p => p.ShortName == shortName); } } } diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Comments/MongoCommentRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Comments/MongoCommentRepository.cs index b17c7f906f..bbbe60345b 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Comments/MongoCommentRepository.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Comments/MongoCommentRepository.cs @@ -17,7 +17,7 @@ namespace Volo.Blogging.Comments public async Task> GetListOfPostAsync(Guid postId) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync()) .Where(a => a.PostId == postId) .OrderBy(a => a.CreationTime) .ToListAsync(); @@ -25,19 +25,19 @@ namespace Volo.Blogging.Comments public async Task GetCommentCountOfPostAsync(Guid postId) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync()) .CountAsync(a => a.PostId == postId); } public async Task> GetRepliesOfComment(Guid id) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync()) .Where(a => a.RepliedCommentId == id).ToListAsync(); } public async Task DeleteOfPost(Guid id) { - var recordsToDelete = GetMongoQueryable().Where(pt => pt.PostId == id); + var recordsToDelete = (await GetMongoQueryableAsync()).Where(pt => pt.PostId == id); foreach (var record in recordsToDelete) { diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs index e12e5f29de..27f4ad4348 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs @@ -18,25 +18,25 @@ namespace Volo.Blogging.Posts public async Task> GetPostsByBlogId(Guid id) { - return await GetMongoQueryable().Where(p => p.BlogId == id).OrderByDescending(p => p.CreationTime).ToListAsync(); + return await (await GetMongoQueryableAsync()).Where(p => p.BlogId == id).OrderByDescending(p => p.CreationTime).ToListAsync(); } - public Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null) + public async Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null) { - var query = GetMongoQueryable().Where(p => blogId == p.BlogId && p.Url == url); + var query = (await GetMongoQueryableAsync()).Where(p => blogId == p.BlogId && p.Url == url); if (excludingPostId != null) { query = query.Where(p => excludingPostId != p.Id); } - return query.AnyAsync(); + return await query.AnyAsync(); } public async Task GetPostByUrl(Guid blogId, string url) { - var post = await GetMongoQueryable().FirstOrDefaultAsync(p => p.BlogId == blogId && p.Url == url); + var post = await (await GetMongoQueryableAsync()).FirstOrDefaultAsync(p => p.BlogId == blogId && p.Url == url); if (post == null) { @@ -48,7 +48,7 @@ namespace Volo.Blogging.Posts public async Task> GetOrderedList(Guid blogId, bool @descending = false) { - var query = GetMongoQueryable().Where(x => x.BlogId == blogId); + var query = (await GetMongoQueryableAsync()).Where(x => x.BlogId == blogId); if (!descending) { diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Tagging/MongoTagRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Tagging/MongoTagRepository.cs index 2c0b3b97bf..f0024b37d7 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Tagging/MongoTagRepository.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Tagging/MongoTagRepository.cs @@ -20,27 +20,27 @@ namespace Volo.Blogging.Tagging public async Task> GetListAsync(Guid blogId) { - return await GetMongoQueryable().Where(t => t.BlogId == blogId).ToListAsync(); + return await (await GetMongoQueryableAsync()).Where(t => t.BlogId == blogId).ToListAsync(); } public async Task GetByNameAsync(Guid blogId, string name) { - return await GetMongoQueryable().Where(t => t.BlogId == blogId && t.Name == name).FirstAsync(); + return await (await GetMongoQueryableAsync()).Where(t => t.BlogId == blogId && t.Name == name).FirstAsync(); } public async Task FindByNameAsync(Guid blogId, string name) { - return await GetMongoQueryable().Where(t => t.BlogId == blogId && t.Name == name).FirstOrDefaultAsync(); + return await (await GetMongoQueryableAsync()).Where(t => t.BlogId == blogId && t.Name == name).FirstOrDefaultAsync(); } public async Task> GetListAsync(IEnumerable ids) { - return await GetMongoQueryable().Where(t => ids.Contains(t.Id)).ToListAsync(); + return await (await GetMongoQueryableAsync()).Where(t => ids.Contains(t.Id)).ToListAsync(); } public async Task DecreaseUsageCountOfTagsAsync(List ids, CancellationToken cancellationToken = default) { - var tags = await GetMongoQueryable() + var tags = await (await GetMongoQueryableAsync()) .Where(t => ids.Contains(t.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Users/MongoBlogUserRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Users/MongoBlogUserRepository.cs index a0b7655946..fdcf4d0097 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Users/MongoBlogUserRepository.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Users/MongoBlogUserRepository.cs @@ -17,7 +17,7 @@ namespace Volo.Blogging.Users public async Task> GetUsersAsync(int maxCount, string filter, CancellationToken cancellationToken) { - var query = GetMongoQueryable(); + var query = await GetMongoQueryableAsync(cancellationToken); if (!string.IsNullOrWhiteSpace(filter)) { diff --git a/modules/cms-kit/docker-compose.override.yml b/modules/cms-kit/docker-compose.override.yml index 94b9df0c22..4cef8f8414 100644 --- a/modules/cms-kit/docker-compose.override.yml +++ b/modules/cms-kit/docker-compose.override.yml @@ -11,19 +11,19 @@ services: identity-server: environment: - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionStrings__Default=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=CmsKit_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__Default=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=CmsKit_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false ports: - "51600:80" cms-kit: environment: - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionStrings__Default=Server=sqlserver;Database=CmsKit_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=CmsKit_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__Default=Server=sqlserver;Database=CmsKit_ModuleDb;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=CmsKit_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=CmsKit_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false - AuthServer__Authority=http://identity-server ports: - "51601:80" \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json index 06b66fcede..7811df81cb 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json @@ -3,8 +3,8 @@ "CorsOrigins": "https://*.CmsKit.com,http://localhost:4200" }, "ConnectionStrings": { - "Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True;MultipleActiveResultSets=true", - "CmsKit": "Server=localhost;Database=CmsKit_Module;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True", + "CmsKit": "Server=localhost;Database=CmsKit_Module;Trusted_Connection=True" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json index e0f3118a11..f79959a2e0 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json @@ -5,7 +5,7 @@ }, "AppSelfUrl": "https://localhost:44318/", "ConnectionStrings": { - "Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs similarity index 89% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs index 449f18fb53..7ced9b3a54 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20201210071514_Initial")] + [Migration("20201224140744_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -1098,6 +1098,78 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsComments"); }); + modelBuilder.Entity("Volo.CmsKit.Contents.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => { b.Property("Id") @@ -1177,6 +1249,96 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsUserReactions"); }); + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HexColor") + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => { b.Property("Id") diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs similarity index 90% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs index 54f7ac975c..826acae0d9 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201210071514_Initial.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201224140744_Initial.cs @@ -269,6 +269,43 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_CmsComments", x => x.Id); }); + migrationBuilder.CreateTable( + name: "CmsContents", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + EntityId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(max)", maxLength: 2147483647, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsContents", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "CmsEntityTags", + columns: table => new + { + TagId = table.Column(type: "uniqueidentifier", nullable: false), + EntityId = table.Column(type: "nvarchar(450)", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId }); + }); + migrationBuilder.CreateTable( name: "CmsRatings", columns: table => new @@ -286,6 +323,30 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_CmsRatings", x => x.Id); }); + migrationBuilder.CreateTable( + name: "CmsTags", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + EntityType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + HexColor = table.Column(type: "nvarchar(6)", maxLength: 6, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsTags", x => x.Id); + }); + migrationBuilder.CreateTable( name: "CmsUserReactions", columns: table => new @@ -736,11 +797,26 @@ namespace Volo.CmsKit.Migrations table: "CmsComments", columns: new[] { "TenantId", "RepliedCommentId" }); + migrationBuilder.CreateIndex( + name: "IX_CmsContents_TenantId_EntityType_EntityId", + table: "CmsContents", + columns: new[] { "TenantId", "EntityType", "EntityId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsEntityTags_TenantId_EntityId_TagId", + table: "CmsEntityTags", + columns: new[] { "TenantId", "EntityId", "TagId" }); + migrationBuilder.CreateIndex( name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", table: "CmsRatings", columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); + migrationBuilder.CreateIndex( + name: "IX_CmsTags_TenantId_Name", + table: "CmsTags", + columns: new[] { "TenantId", "Name" }); + migrationBuilder.CreateIndex( name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", table: "CmsUserReactions", @@ -815,9 +891,18 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "CmsComments"); + migrationBuilder.DropTable( + name: "CmsContents"); + + migrationBuilder.DropTable( + name: "CmsEntityTags"); + migrationBuilder.DropTable( name: "CmsRatings"); + migrationBuilder.DropTable( + name: "CmsTags"); + migrationBuilder.DropTable( name: "CmsUserReactions"); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs new file mode 100644 index 0000000000..06fcbe43a4 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.Designer.cs @@ -0,0 +1,1647 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20201225120048_Added_Page")] + partial class Added_Page + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityColumns() + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.1"); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)") + .HasColumnName("Exceptions"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles"); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Contents.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(515) + .HasColumnType("nvarchar(515)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Url"); + + b.ToTable("CmsPages"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HexColor") + .HasMaxLength(6) + .HasColumnType("nvarchar(6)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs new file mode 100644 index 0000000000..119009c8e1 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201225120048_Added_Page.cs @@ -0,0 +1,46 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class Added_Page : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "CmsPages", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Title = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "nvarchar(515)", maxLength: 515, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsPages", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_CmsPages_TenantId_Url", + table: "CmsPages", + columns: new[] { "TenantId", "Url" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CmsPages"); + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs new file mode 100644 index 0000000000..8f90204baa --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.Designer.cs @@ -0,0 +1,1643 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20201228083120_Updated_Tag_Removed_HexColor")] + partial class Updated_Tag_Removed_HexColor + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .UseIdentityColumns() + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.1"); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasMaxLength(4000) + .HasColumnType("nvarchar(4000)") + .HasColumnName("Exceptions"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("int") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("ImpersonatorUserId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("int") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("nvarchar(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnType("uniqueidentifier") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("datetime2") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("tinyint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpFeatureValues"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("bit") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("bit") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("bit") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("nvarchar(96)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("nvarchar(196)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("nvarchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles"); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Text") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Contents.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(515) + .HasColumnType("nvarchar(515)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Url"); + + b.ToTable("CmsPages"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReactionName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Name"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs new file mode 100644 index 0000000000..476f4ea87e --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201228083120_Updated_Tag_Removed_HexColor.cs @@ -0,0 +1,24 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.CmsKit.Migrations +{ + public partial class Updated_Tag_Removed_HexColor : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "HexColor", + table: "CmsTags"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "HexColor", + table: "CmsTags", + type: "nvarchar(6)", + maxLength: 6, + nullable: true); + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index a082d0db17..37622217c5 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -1096,6 +1096,149 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsComments"); }); + modelBuilder.Entity("Volo.CmsKit.Contents.Content", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2147483647) + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsContents"); + }); + + modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasMaxLength(515) + .HasColumnType("nvarchar(515)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Url"); + + b.ToTable("CmsPages"); + }); + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => { b.Property("Id") @@ -1175,6 +1318,92 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsUserReactions"); }); + modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => + { + b.Property("EntityId") + .HasColumnType("nvarchar(450)"); + + b.Property("TagId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("EntityId", "TagId"); + + b.HasIndex("TenantId", "EntityId", "TagId"); + + b.ToTable("CmsEntityTags"); + }); + + modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EntityType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name"); + + b.ToTable("CmsTags"); + }); + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => { b.Property("Id") diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml index e61017dd4b..9f92acb27b 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/Index.cshtml @@ -5,8 +5,10 @@ @using Volo.CmsKit.GlobalFeatures @using Volo.CmsKit.Pages @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating @using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.ReactionSelection +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Tags @model IndexModel @inject IStringLocalizer Localizer

CMS Kit DEMO

@@ -14,10 +16,19 @@ -

- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -

-

- Martin Fowler

+ @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(ContentViewComponent), new {entityType = "quote", entityId = "1"}) + } + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "quote", + entityId = "1" + }) + }
@@ -26,19 +37,19 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "1"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "1"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "1" }) + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "1"}) } @@ -48,7 +59,7 @@

"Writing code is very simple, but writing simple code is the hardest thing there is!"

-

- Halil ibrahim Kalkan Inspired from Johan Cruyff

+

- Halil ibrahim Kalkan Inspired from Johan Cruyff

@@ -56,19 +67,32 @@ @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(RatingViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(RatingViewComponent), new {entityType = "quote", entityId = "2"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(ReactionSelectionViewComponent), new {entityType = "quote", entityId = "2"}) } @if (GlobalFeatureManager.Instance.IsEnabled()) { - @await Component.InvokeAsync(typeof(CommentingViewComponent), new { entityType = "quote", entityId = "2" }) + @await Component.InvokeAsync(typeof(CommentingViewComponent), new {entityType = "quote", entityId = "2"}) + } + + + + + + @if (GlobalFeatureManager.Instance.IsEnabled()) + { + @await Component.InvokeAsync(typeof(TagViewComponent), new + { + entityType = "IndexPage", + entityId = Guid.Empty.ToString() + }) } - + \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml index da4fb49a47..b059f6fec9 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Pages/_ViewImports.cshtml @@ -3,3 +3,4 @@ @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap @addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling @addTagHelper *, Volo.CmsKit.Public.Web +@addTagHelper *, Volo.CmsKit.Common.Web diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json index 9b7fd1fa18..417b64b609 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Server=localhost;Database=CmsKit_Unified;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=localhost;Database=CmsKit_Unified;Trusted_Connection=True" } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json index 90988e3200..cc22f5d84d 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -3,6 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^4.1.0-rc.2" + "@abp/aspnetcore.mvc.ui.theme.basic": "^4.1.0-rc.2", + "@abp/cms-kit": "4.1.0-rc.2" } } \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css new file mode 100644 index 0000000000..2c0114687f --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/css/star-rating-svg.css @@ -0,0 +1,37 @@ +.jq-stars { + display: inline-block; +} + +.jq-rating-label { + font-size: 22px; + display: inline-block; + position: relative; + vertical-align: top; + font-family: helvetica, arial, verdana; +} + +.jq-star { + width: 100px; + height: 100px; + display: inline-block; + cursor: pointer; +} + +.jq-star-svg { + width: 100%; + height: 100% ; +} + +.jq-star:hover .fs-star-svg polygon { +} + +.jq-star-svg polygon { + stroke: #000; + stroke-linejoin: round; +} + +/* un-used */ +.jq-shadow { + -webkit-filter: drop-shadow( -2px -2px 2px #888 ); + filter: drop-shadow( -2px -2px 2px #888 ); +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js new file mode 100644 index 0000000000..df947cfe2b --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/star-rating-svg/js/jquery.star-rating-svg.min.js @@ -0,0 +1 @@ +!function(a){"use strict";var b="starRating",c=function(){},d={totalStars:5,useFullStars:!1,emptyColor:"lightgray",hoverColor:"orange",activeColor:"gold",useGradient:!0,readOnly:!1,disableAfterRate:!0,starGradient:{start:"#FEF7CD",end:"#FF9511"},strokeWidth:0,strokeColor:"black",initialRating:0,starSize:40,callback:c,onHover:c,onLeave:c},e=function(c,e){var f;this.element=c,this.$el=a(c),this.settings=a.extend({},d,e),f=this.$el.data("rating")||this.settings.initialRating,this._state={rating:(Math.round(2*f)/2).toFixed(1)},this._uid=Math.floor(999*Math.random()),e.starGradient||this.settings.useGradient||(this.settings.starGradient.start=this.settings.starGradient.end=this.settings.activeColor),this._defaults=d,this._name=b,this.init()},f={init:function(){this.renderMarkup(),this.addListeners(),this.initRating()},addListeners:function(){this.settings.readOnly||(this.$stars.on("mouseover",this.hoverRating.bind(this)),this.$stars.on("mouseout",this.restoreState.bind(this)),this.$stars.on("click",this.handleRating.bind(this)))},hoverRating:function(a){var b=this.getIndex(a);this.paintStars(b,"hovered"),this.settings.onHover(b+1,this._state.rating,this.$el)},handleRating:function(a){var b=this.getIndex(a),c=b+1;this.applyRating(c,this.$el),this.executeCallback(c,this.$el),this.settings.disableAfterRate&&this.$stars.off()},applyRating:function(a){var b=a-1;this.paintStars(b,"active"),this._state.rating=b+1},restoreState:function(a){var b=this.getIndex(a),c=this._state.rating||-1;this.paintStars(c-1,"active"),this.settings.onLeave(b+1,this._state.rating,this.$el)},getIndex:function(b){var c=a(b.currentTarget),d=c.width(),e=a(b.target).attr("data-side");e=e?e:this.getOffsetByPixel(b,c,d),e=this.settings.useFullStars?"right":e;var f=c.index()-("left"===e?.5:0);return f=.5>f&&b.offsetX=d&&!this.settings.useFullStars?"left":"right"},initRating:function(){this.paintStars(this._state.rating-1,"active")},paintStars:function(b,c){var d,e,f,g;a.each(this.$stars,function(h,i){d=a(i).find('polygon[data-side="left"]'),e=a(i).find('polygon[data-side="right"]'),f=g=b>=h?c:"empty",f=h-b===.5?c:f,d.attr("class","svg-"+f+"-"+this._uid),e.attr("class","svg-"+g+"-"+this._uid)}.bind(this))},renderMarkup:function(){for(var a='
"+this.getLinearGradient(this._uid+"_SVGID_1_",this.settings.emptyColor,this.settings.emptyColor)+this.getLinearGradient(this._uid+"_SVGID_2_",this.settings.hoverColor,this.settings.hoverColor)+this.getLinearGradient(this._uid+"_SVGID_3_",this.settings.starGradient.start,this.settings.starGradient.end)+'
',b="",c=0;c '},executeCallback:function(a,b){var c=this.settings.callback;c(a,b)}},g={unload:function(){var c="plugin_"+b,d=a(this),e=d.data(c).$stars;e.off(),d.removeData(c).remove()},setRating:function(c,d){var e="plugin_"+b,f=a(this),g=f.data(e);c>g.settings.totalStars||0>c||(d&&(c=Math.round(c)),g.applyRating(c))},getRating:function(){var c="plugin_"+b,d=a(this),e=d.data(c);return e._state.rating}};a.extend(e.prototype,f),a.fn[b]=function(c){if(!a.isPlainObject(c)){if(g.hasOwnProperty(c))return g[c].apply(this,Array.prototype.slice.call(arguments,1));a.error("Method "+c+" does not exist on "+b+".js")}return this.each(function(){a.data(this,"plugin_"+b)||a.data(this,"plugin_"+b,new e(this,c))})}}(jQuery,window,document); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock index 569055bae5..c59ef6d24e 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/yarn.lock @@ -59,6 +59,13 @@ bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" +"@abp/cms-kit@4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/cms-kit/-/cms-kit-4.1.0-rc.2.tgz#d2790dd3812214ab0c8eba6e9ad2b8019889e056" + integrity sha512-bS632Qp3tN+LHVj505lUgwtu2JVOhSf3W6VAXlYG0pSy8n1ltonDZHNKO6iwvnskdPaAA4wgJPWgqjXigChx0Q== + dependencies: + "@abp/star-rating-svg" "~4.1.0-rc.2" + "@abp/core@~4.1.0-rc.2": version "4.1.0-rc.2" resolved "https://registry.yarnpkg.com/@abp/core/-/core-4.1.0-rc.2.tgz#d306106a53fa56109751be0099785c94f43be56f" @@ -154,6 +161,14 @@ "@abp/core" "~4.1.0-rc.2" select2 "^4.0.13" +"@abp/star-rating-svg@~4.1.0-rc.2": + version "4.1.0-rc.2" + resolved "https://registry.yarnpkg.com/@abp/star-rating-svg/-/star-rating-svg-4.1.0-rc.2.tgz#558c681eb591847b3e8f114cbe610e4331f8a0a2" + integrity sha512-LNFCfytarGhqS+91lxYHQKMvlbHMDpjU0Knj8qyefNtQ+rbM2CEspWEtcducim+Qn4brqIHRudUvLI+eEC/0yQ== + dependencies: + "@abp/jquery" "~4.1.0-rc.2" + star-rating-svg "^3.5.0" + "@abp/sweetalert@~4.1.0-rc.2": version "4.1.0-rc.2" resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-4.1.0-rc.2.tgz#cdcaf8e9a33cf218a687fd6a42cfe1c85d89c6b7" @@ -2321,6 +2336,11 @@ stack-trace@0.0.10: resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= +star-rating-svg@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/star-rating-svg/-/star-rating-svg-3.5.0.tgz#72b147015a433da63153fb607af6d51c7c1ea364" + integrity sha1-crFHAVpDPaYxU/tgevbVHHweo2Q= + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/CmsKitPublicRemoteServiceConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/CmsKitAdminRemoteServiceConsts.cs similarity index 100% rename from modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/CmsKitPublicRemoteServiceConsts.cs rename to modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/CmsKitAdminRemoteServiceConsts.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Contents/ContentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Contents/ContentDto.cs new file mode 100644 index 0000000000..aa7a4650b1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Contents/ContentDto.cs @@ -0,0 +1,10 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Admin.Contents +{ + public class ContentDto : EntityDto + { + public string Value { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CheckUrlInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CheckUrlInputDto.cs new file mode 100644 index 0000000000..abb1d81c12 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CheckUrlInputDto.cs @@ -0,0 +1,10 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Pages +{ + public class CheckUrlInputDto + { + [Required] + public string Url { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs new file mode 100644 index 0000000000..50c7a68f32 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageInputDto.cs @@ -0,0 +1,15 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Pages +{ + public class CreatePageInputDto + { + [Required] + public string Title { get; set; } + + [Required] + public string Url { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageWithContentInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageWithContentInputDto.cs new file mode 100644 index 0000000000..bff09b595b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/CreatePageWithContentInputDto.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Pages +{ + public class CreatePageWithContentInputDto + { + [Required] + public string Title { get; set; } + + [Required] + public string Url { get; set; } + + public string Description { get; set; } + + [Required] + public string Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/IPageAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/IPageAdminAppService.cs new file mode 100644 index 0000000000..048d2d89c7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/IPageAdminAppService.cs @@ -0,0 +1,22 @@ +using System; +using System.Threading.Tasks; + +namespace Volo.CmsKit.Admin.Pages +{ + public interface IPageAdminAppService + { + Task GetAsync(Guid id); + + Task CreatePageAsync(CreatePageInputDto input); + + Task CreatePageWithContentAsync(CreatePageWithContentInputDto input); + + Task UpdatePageAsync(Guid id, UpdatePageInputDto input); + + Task DoesUrlExistAsync(CheckUrlInputDto input); + + Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input); + + Task DeleteAsync(Guid id); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs new file mode 100644 index 0000000000..e8750ce07b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageDto.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Admin.Pages +{ + public class PageDto : EntityDto + { + public string Title { get; set; } + + public string Url { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageWithContentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageWithContentDto.cs new file mode 100644 index 0000000000..119dedb041 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/PageWithContentDto.cs @@ -0,0 +1,17 @@ +using System; +using Volo.Abp.Application.Dtos; +using Volo.CmsKit.Admin.Contents; + +namespace Volo.CmsKit.Admin.Pages +{ + public class PageWithContentDto : EntityDto + { + public string Title { get; set; } + + public string Url { get; set; } + + public string Description { get; set; } + + public ContentDto Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageContentInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageContentInputDto.cs new file mode 100644 index 0000000000..f6d46167c8 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageContentInputDto.cs @@ -0,0 +1,10 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Pages +{ + public class UpdatePageContentInputDto + { + [Required] + public string Content { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs new file mode 100644 index 0000000000..eb831fee45 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Pages/UpdatePageInputDto.cs @@ -0,0 +1,15 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Admin.Pages +{ + public class UpdatePageInputDto + { + [Required] + public string Title { get; set; } + + [Required] + public string Url { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/ITagAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/ITagAdminAppService.cs new file mode 100644 index 0000000000..e677a54c28 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/ITagAdminAppService.cs @@ -0,0 +1,10 @@ +using System; +using Volo.Abp.Application.Services; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Admin.Tags +{ + public interface ITagAdminAppService : ICrudAppService + { + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagCreateDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagCreateDto.cs new file mode 100644 index 0000000000..6dd90d1362 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagCreateDto.cs @@ -0,0 +1,17 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Admin.Tags +{ + public class TagCreateDto + { + [Required] + [DynamicMaxLength(typeof(TagConsts), nameof(TagConsts.MaxEntityTypeLength))] + public string EntityType { get; set; } + + [Required] + [DynamicMaxLength(typeof(TagConsts), nameof(TagConsts.MaxNameLength))] + public string Name { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagGetListInput.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagGetListInput.cs new file mode 100644 index 0000000000..23e7041134 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagGetListInput.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Admin.Tags +{ + public class TagGetListInput : PagedAndSortedResultRequestDto + { + public string Filter { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagUpdateDto.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagUpdateDto.cs new file mode 100644 index 0000000000..c4298b7730 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/TagUpdateDto.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Admin.Tags +{ + public class TagUpdateDto + { + [Required] + [DynamicMaxLength(typeof(TagConsts), nameof(TagConsts.MaxNameLength))] + public string Name { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs new file mode 100644 index 0000000000..507b1c276f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissionDefinitionProvider.cs @@ -0,0 +1,29 @@ +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.GlobalFeatures; +using Volo.Abp.Localization; +using Volo.CmsKit.GlobalFeatures; +using Volo.CmsKit.Localization; + +namespace Volo.CmsKit.Permissions +{ + public class CmsKitAdminPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + var cmsGroup = context.GetGroupOrNull(CmsKitAdminPermissions.GroupName) ?? context.AddGroup(CmsKitAdminPermissions.GroupName, L("Permission:CmsKit")); + + if (GlobalFeatureManager.Instance.IsEnabled()) + { + var tagGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Tags.Default, L("Permission:TagManagement")); + tagGroup.AddChild(CmsKitAdminPermissions.Tags.Create, L("Permission:TagManagement.Create")); + tagGroup.AddChild(CmsKitAdminPermissions.Tags.Update, L("Permission:TagManagement.Update")); + tagGroup.AddChild(CmsKitAdminPermissions.Tags.Delete, L("Permission:TagManagement.Delete")); + } + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs new file mode 100644 index 0000000000..26daeb0b01 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Permissions/CmsKitAdminPermissions.cs @@ -0,0 +1,16 @@ +using Volo.Abp.Reflection; + +namespace Volo.CmsKit.Permissions +{ + public class CmsKitAdminPermissions + { + public const string GroupName = "CmsKit"; + public static class Tags + { + public const string Default = GroupName + ".Tags"; + public const string Create = Default + ".Create"; + public const string Update = Default + ".Update"; + public const string Delete = Default + ".Delete"; + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs index 59c8058590..e1062daa92 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationAutoMapperProfile.cs @@ -1,4 +1,6 @@ using AutoMapper; +using Volo.CmsKit.Admin.Pages; +using Volo.CmsKit.Pages; namespace Volo.CmsKit.Admin { @@ -6,9 +8,7 @@ namespace Volo.CmsKit.Admin { public CmsKitAdminApplicationAutoMapperProfile() { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ + CreateMap(); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs new file mode 100644 index 0000000000..6778dd7916 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Pages/PageAdminAppService.cs @@ -0,0 +1,108 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.Admin.Pages +{ + public class PageAdminAppService : CmsKitAdminAppServiceBase, IPageAdminAppService + { + protected readonly IPageRepository PageRepository; + protected readonly IContentRepository ContentRepository; + + public PageAdminAppService(IPageRepository pageRepository, IContentRepository contentRepository) + { + PageRepository = pageRepository; + ContentRepository = contentRepository; + } + + public virtual async Task GetAsync(Guid id) + { + var page = await PageRepository.GetAsync(id); + + return ObjectMapper.Map(page); + } + + public virtual async Task CreatePageAsync(CreatePageInputDto input) + { + var page = await CreatePageAsync(input.Title, input.Url, input.Description); + + await PageRepository.InsertAsync(page); + + return ObjectMapper.Map(page); + } + + public virtual async Task CreatePageWithContentAsync(CreatePageWithContentInputDto input) + { + var page = await CreatePageAsync(input.Title, input.Url, input.Description); + + await PageRepository.InsertAsync(page); + + var content = new Content( + GuidGenerator.Create(), + nameof(Page), + page.Id.ToString(), + input.Content, + page.TenantId); + + await ContentRepository.InsertAsync(content); + + return ObjectMapper.Map(page); + } + + public virtual async Task UpdatePageAsync(Guid id, UpdatePageInputDto input) + { + var page = await PageRepository.GetAsync(id); + + if (page.Url != input.Url) + { + await CheckPageUrlAsync(input.Url); + } + + page.Title = input.Title; + page.Url = input.Url; + page.Description = input.Description; + + await PageRepository.UpdateAsync(page); + + return ObjectMapper.Map(page); + } + + public virtual Task DoesUrlExistAsync(CheckUrlInputDto input) + { + return PageRepository.DoesExistAsync(input.Url); + } + + public virtual async Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input) + { + var pageContent = await ContentRepository.GetAsync(nameof(Page), id.ToString()); + + pageContent.SetValue(input.Content); + + await ContentRepository.UpdateAsync(pageContent); + } + + public virtual async Task DeleteAsync(Guid id) + { + await ContentRepository.DeleteAsync(nameof(Page), id.ToString(), CurrentTenant?.Id, CancellationToken.None); + await PageRepository.DeleteAsync(id, cancellationToken: CancellationToken.None); + } + + protected virtual async Task CreatePageAsync(string title, string url, string description) + { + await CheckPageUrlAsync(url); + + return new Page(GuidGenerator.Create(), title, url, description, CurrentTenant?.Id); + } + + protected virtual async Task CheckPageUrlAsync(string url) + { + if (await PageRepository.DoesExistAsync(url)) + { + throw new UserFriendlyException("Url exist"); + } + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs new file mode 100644 index 0000000000..cda45c23de --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Tags/TagAdminAppService.cs @@ -0,0 +1,72 @@ +using Microsoft.AspNetCore.Authorization; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; +using Volo.CmsKit.Admin.Tags; +using Volo.CmsKit.Permissions; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Admin.Tags +{ + [Authorize(CmsKitAdminPermissions.Tags.Default)] + public class TagAdminAppService : + CrudAppService< + Tag, + TagDto, + Guid, + TagGetListInput, + TagCreateDto, + TagUpdateDto>, + ITagAdminAppService + { + protected ITagManager TagManager { get; } + + public TagAdminAppService( + IRepository repository, + ITagManager tagManager) : base(repository) + { + TagManager = tagManager; + + GetListPolicyName = CmsKitAdminPermissions.Tags.Default; + GetPolicyName = CmsKitAdminPermissions.Tags.Default; + CreatePolicyName = CmsKitAdminPermissions.Tags.Create; + UpdatePolicyName = CmsKitAdminPermissions.Tags.Update; + DeletePolicyName = CmsKitAdminPermissions.Tags.Delete; + } + + [Authorize(CmsKitAdminPermissions.Tags.Create)] + public override async Task CreateAsync(TagCreateDto input) + { + var tag = await TagManager.InsertAsync( + GuidGenerator.Create(), + input.EntityType, + input.Name, + CurrentTenant?.Id); + + return MapToGetOutputDto(tag); + } + + [Authorize(CmsKitAdminPermissions.Tags.Update)] + public override async Task UpdateAsync(Guid id, TagUpdateDto input) + { + var tag = await TagManager.UpdateAsync( + id, + input.Name); + + return MapToGetOutputDto(tag); + } + protected override IQueryable CreateFilteredQuery(TagGetListInput input) + { + return base.CreateFilteredQuery(input) + .WhereIf( + !input.Filter.IsNullOrEmpty(), + x => + x.Name.ToLower().Contains(input.Filter) || + x.EntityType.ToLower().Contains(input.Filter)); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Page/PageAdminController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Page/PageAdminController.cs new file mode 100644 index 0000000000..4e37848e37 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Page/PageAdminController.cs @@ -0,0 +1,70 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.CmsKit.Admin.Pages; + +namespace Volo.CmsKit.Admin.Page +{ + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit-admin/pages")] + public class PageAdminController : CmsKitAdminController, IPageAdminAppService + { + protected readonly IPageAdminAppService PageAdminAppService; + + public PageAdminController(IPageAdminAppService pageAdminAppService) + { + PageAdminAppService = pageAdminAppService; + } + + [HttpGet] + [Route("{id}")] + public virtual Task GetAsync(Guid id) + { + return PageAdminAppService.GetAsync(id); + } + + [HttpPost] + [Route("create")] + public virtual Task CreatePageAsync(CreatePageInputDto input) + { + return PageAdminAppService.CreatePageAsync(input); + } + + [HttpPost] + [Route("create-with-content")] + public virtual Task CreatePageWithContentAsync(CreatePageWithContentInputDto input) + { + return PageAdminAppService.CreatePageWithContentAsync(input); + } + + [HttpPut] + [Route("{id}")] + public virtual Task UpdatePageAsync(Guid id, UpdatePageInputDto input) + { + return PageAdminAppService.UpdatePageAsync(id, input); + } + + [HttpPost] + [Route("does-url-exist")] + public virtual Task DoesUrlExistAsync(CheckUrlInputDto input) + { + return PageAdminAppService.DoesUrlExistAsync(input); + } + + [HttpPut] + [Route("update-content/{id}")] + public virtual Task UpdatePageContentAsync(Guid id, UpdatePageContentInputDto input) + { + return PageAdminAppService.UpdatePageContentAsync(id, input); + } + + [HttpDelete] + [Route("{id}")] + public virtual Task DeleteAsync(Guid id) + { + return PageAdminAppService.DeleteAsync(id); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/TagController.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/TagController.cs new file mode 100644 index 0000000000..11dcc9a846 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi/Volo/CmsKit/Admin/Tags/TagController.cs @@ -0,0 +1,56 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.CmsKit.Admin.Tags; +using Volo.CmsKit.Permissions; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Admin.Tags +{ + public class TagController : CmsKitAdminController, ITagAdminAppService + { + protected ITagAdminAppService TagAdminAppService { get; } + + public TagController(ITagAdminAppService tagAdminAppService) + { + TagAdminAppService = tagAdminAppService; + } + + [HttpPost] + [Authorize(CmsKitAdminPermissions.Tags.Create)] + public Task CreateAsync(TagCreateDto input) + { + return TagAdminAppService.CreateAsync(input); + } + + [HttpDelete("{id}")] + [Authorize(CmsKitAdminPermissions.Tags.Delete)] + public Task DeleteAsync(Guid id) + { + return TagAdminAppService.DeleteAsync(id); + } + + [HttpGet("{id}")] + [Authorize(CmsKitAdminPermissions.Tags.Default)] + public Task GetAsync(Guid id) + { + return TagAdminAppService.GetAsync(id); + } + + [HttpGet] + [Authorize(CmsKitAdminPermissions.Tags.Default)] + public Task> GetListAsync(TagGetListInput input) + { + return TagAdminAppService.GetListAsync(input); + } + + [HttpPut("{id}")] + [Authorize(CmsKitAdminPermissions.Tags.Update)] + public Task UpdateAsync(Guid id, [FromBody] TagUpdateDto input) + { + return TagAdminAppService.UpdateAsync(id, input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs new file mode 100644 index 0000000000..aa0412f026 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/CmsKitCommonRemoteServiceConsts.cs @@ -0,0 +1,7 @@ +namespace Volo.CmsKit +{ + public class CmsKitCommonRemoteServiceConsts + { + public const string RemoteServiceName = "CmsKitCommon"; + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs new file mode 100644 index 0000000000..e7d41e6657 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Tags/TagDto.cs @@ -0,0 +1,12 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Tags +{ + public class TagDto : EntityDto + { + public string EntityType { get; set; } + + public string Name { get; protected set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs similarity index 100% rename from modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAdminAppService.cs rename to modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitAppServiceBase.cs diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs new file mode 100644 index 0000000000..e5044dc200 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationAutoMapperProfile.cs @@ -0,0 +1,15 @@ +using AutoMapper; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit +{ + public class CmsKitCommonApplicationAutoMapperProfile : Profile + { + public CmsKitCommonApplicationAutoMapperProfile() + { + CreateMap(); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs index 5300afdcda..8fa08fa950 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application/Volo/CmsKit/CmsKitCommonApplicationModule.cs @@ -12,5 +12,12 @@ namespace Volo.CmsKit )] public class CmsKitCommonApplicationModule : AbpModule { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.AddMaps(validate: true); + }); + } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs new file mode 100644 index 0000000000..af600d0382 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/IContentRenderer.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.CmsKit.Web.Contents +{ + public interface IContentRenderer + { + Task RenderAsync(string value); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs new file mode 100644 index 0000000000..3f839947e3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Contents/PlainTextContentRenderer.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.CmsKit.Web.Contents +{ + public class PlainTextContentRenderer : IContentRenderer, ITransientDependency + { + public Task RenderAsync(string value) + { + return Task.FromResult(value); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml new file mode 100644 index 0000000000..c1da1f5f10 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs new file mode 100644 index 0000000000..1148bb0436 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CommonPageModel.cs @@ -0,0 +1,13 @@ +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.CmsKit.Localization; + +namespace Volo.CmsKit.Web.Pages +{ + public abstract class CommonPageModel : AbpPageModel + { + protected CommonPageModel() + { + LocalizationResourceType = typeof(CmsKitResource); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs index 336d163cfe..76ba39c3f2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/CmsKitErrorCodes.cs @@ -2,6 +2,6 @@ { public static class CmsKitErrorCodes { - //Add your business exception error codes here... + public const string TagAlreadyExist = "CmsKit:0001"; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs new file mode 100644 index 0000000000..758a29e81f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Contents/ContentConsts.cs @@ -0,0 +1,15 @@ +using System; +using Volo.CmsKit.Entities; + +namespace Volo.CmsKit.Contents +{ + public static class ContentConsts + { + public static int MaxEntityTypeLength { get; set; } = CmsEntityConsts.MaxEntityTypeLength; + + public static int MaxEntityIdLength { get; set; } = CmsEntityConsts.MaxEntityIdLength; + + // TODO: consider + public static int MaxValueLength = int.MaxValue; + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs new file mode 100644 index 0000000000..6514a9c7b8 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/ContentsFeature.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class ContentsFeature : GlobalFeature + { + public const string Name = "CmsKit.Contents"; + + internal ContentsFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs index bb7694262b..5a7adc34b2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/GlobalCmsKitFeatures.cs @@ -13,12 +13,21 @@ namespace Volo.CmsKit.GlobalFeatures public RatingsFeature Ratings => GetFeature(); + public TagsFeature Tags => GetFeature(); + + public ContentsFeature Contents => GetFeature(); + + public PagesFeature Pages => GetFeature(); + public GlobalCmsKitFeatures([NotNull] GlobalFeatureManager featureManager) : base(featureManager) { AddFeature(new ReactionsFeature(this)); AddFeature(new CommentsFeature(this)); AddFeature(new RatingsFeature(this)); + AddFeature(new TagsFeature(this)); + AddFeature(new ContentsFeature(this)); + AddFeature(new PagesFeature(this)); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/PagesFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/PagesFeature.cs new file mode 100644 index 0000000000..c41e217999 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/PagesFeature.cs @@ -0,0 +1,29 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class PagesFeature:GlobalFeature + { + public const string Name = "CmsKit.Pages"; + + internal PagesFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + + } + + public override void Enable() + { + var contentsFeature = FeatureManager.Modules.CmsKit().Contents; + if (!contentsFeature.IsEnabled) + { + contentsFeature.Enable(); + } + + base.Enable(); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs new file mode 100644 index 0000000000..ff20c130fd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/TagsFeature.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using Volo.Abp.GlobalFeatures; + +namespace Volo.CmsKit.GlobalFeatures +{ + [GlobalFeatureName(Name)] + public class TagsFeature : GlobalFeature + { + public const string Name = "CmsKit.Tags"; + + internal TagsFeature( + [NotNull] GlobalCmsKitFeatures cmsKit + ) : base(cmsKit) + { + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..8ffa807e9b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en-GB.json @@ -0,0 +1,29 @@ +{ + "culture": "en-GB", + "texts": { + "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", + "Comments": "Comments", + "Delete": "Delete", + "Edit": "Edit", + "LoginToAddComment": "Login to add comment", + "LoginToRate": "Login to rate", + "LoginToReply": "Login to reply", + "MessageDeletionConfirmationMessage": "This comment will be deleted completely.", + "Permission:CmsKit": "CmsKit", + "Permission:TagManagement": "Tag Management", + "Permission:TagManagement.Create": "Create Tag", + "Permission:TagManagement.Delete": "Delete Tag", + "Permission:TagManagement.Update": "Update Tag", + "PickYourReaction": "Pick your reaction", + "RatingUndoMessage": "Your rating will be undone.", + "Reply": "Reply", + "Send": "Send", + "Star": "Star", + "TagDeletionConfirmationMessage": "Are you sure to delete the '{0}' tag?", + "Tags": "Tags", + "Undo": "Undo", + "Update": "Update", + "YourComment": "Your comment", + "YourReply": "Your reply" + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 73fd2d52b6..42d56b8d16 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -1,22 +1,29 @@ { "culture": "en", "texts": { - "PickYourReaction": "Pick your reaction", - "YourComment": "Your comment", - "YourReply": "Your reply", + "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", "Comments": "Comments", - "Send": "Send", "Delete": "Delete", - "Reply": "Reply", - "Update": "Update", "Edit": "Edit", "LoginToAddComment": "Login to add comment", + "LoginToRate": "Login to rate", "LoginToReply": "Login to reply", "MessageDeletionConfirmationMessage": "This comment will be deleted completely.", - "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", - "Undo": "Undo", + "Permission:CmsKit": "CmsKit", + "Permission:TagManagement": "Tag Management", + "Permission:TagManagement.Create": "Create Tag", + "Permission:TagManagement.Delete": "Delete Tag", + "Permission:TagManagement.Update": "Update Tag", + "PickYourReaction": "Pick your reaction", "RatingUndoMessage": "Your rating will be undo.", - "LoginToRate": "Login to rate", - "Star": "Star" + "Reply": "Reply", + "Send": "Send", + "Star": "Star", + "TagDeletionConfirmationMessage": "Are you sure to delete '{0}' tag?", + "Tags": "Tags", + "Undo": "Undo", + "Update": "Update", + "YourComment": "Your comment", + "YourReply": "Your reply" } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json index 777e89c979..ac8bd98a9f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json @@ -1,22 +1,29 @@ { "culture": "tr", "texts": { - "PickYourReaction": "Tepkinizi seçin", - "YourComment": "Yorumunuz", - "YourReply": "Cevabınız", + "CommentAuthorizationExceptionMessage": "Bu yorumları görebilmek için yetki gerekir.", "Comments": "Yorumlar", - "Send": "Gönder", "Delete": "Sil", - "Reply": "Cevapla", - "Update": "Güncelle", "Edit": "Düzenle", "LoginToAddComment": "Yorum yapmak için giriş yap", + "LoginToRate": "Oylamak için giriş yapın", "LoginToReply": "Cevap vermek için giriş yap", "MessageDeletionConfirmationMessage": "Bu yorum tamamen silinecektir", - "CommentAuthorizationExceptionMessage": "Bu yorumları görebilmek için yetki gerekir.", - "Undo": "Geri al", + "Permission:CmsKit": "CmsKit", + "Permission:TagManagement": "Etiket Yönetimi", + "Permission:TagManagement.Create": "Etiket Oluşturma", + "Permission:TagManagement.Delete": "Etiket Silme", + "Permission:TagManagement.Update": "Etiket Güncelleme", + "PickYourReaction": "Tepkinizi seçin", "RatingUndoMessage": "Oylamanız geri alınacak.", - "LoginToRate": "Oylamak için giriş yapın", - "Star": "Yıldız" + "Reply": "Cevapla", + "Send": "Gönder", + "Star": "Yıldız", + "TagDeletionConfirmationMessage": "'{0}' etiketini silmek istediğinize emin misiniz?", + "Tags": "Etiketler", + "Undo": "Geri al", + "Update": "Güncelle", + "YourComment": "Yorumunuz", + "YourReply": "Cevabınız" } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs new file mode 100644 index 0000000000..105566c2bd --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Pages/PageConsts.cs @@ -0,0 +1,11 @@ +namespace Volo.CmsKit.Pages +{ + public class PageConsts + { + public static int MaxTitleLength = 256; + + public static int MaxUrlLength = 256; + + public static int MaxDescriptionLength = 515; + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs new file mode 100644 index 0000000000..4e6c0b38cc --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Tags/TagConsts.cs @@ -0,0 +1,11 @@ +using Volo.CmsKit.Entities; + +namespace Volo.CmsKit.Tags +{ + public static class TagConsts + { + public static int MaxEntityTypeLength { get; set; } = CmsEntityConsts.MaxEntityTypeLength; + + public static int MaxNameLength { get; set; } = 32; + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs new file mode 100644 index 0000000000..6f4175daad --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/Content.cs @@ -0,0 +1,38 @@ +using System; +using JetBrains.Annotations; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Contents +{ + public class Content : FullAuditedAggregateRoot, IMultiTenant + { + public virtual Guid? TenantId { get; set; } + + public virtual string EntityType { get; set; } + + public virtual string EntityId { get; set; } + + public virtual string Value { get; protected set; } + + protected Content() + { + + } + + public Content(Guid id, [NotNull] string entityType, [NotNull] string entityId, [NotNull] string value, Guid? tenantId = null) : base(id) + { + EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), ContentConsts.MaxEntityTypeLength); + EntityId = Check.NotNullOrWhiteSpace(entityId, nameof(entityId), ContentConsts.MaxEntityIdLength); + SetValue(value); + + TenantId = tenantId; + } + + public void SetValue([NotNull] string value) + { + Value = Check.NotNullOrWhiteSpace(value, nameof(value), ContentConsts.MaxValueLength); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs new file mode 100644 index 0000000000..acd5ed2a84 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Contents/IContentRepository.cs @@ -0,0 +1,25 @@ +using JetBrains.Annotations; +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Contents +{ + public interface IContentRepository : IBasicRepository + { + Task GetAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task FindAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task DeleteAsync([NotNull] string entityType, [NotNull] string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs new file mode 100644 index 0000000000..95c09474aa --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/IPageRepository.cs @@ -0,0 +1,15 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Pages +{ + public interface IPageRepository : IBasicRepository + { + Task GetByUrlAsync(string url); + + Task FindByUrlAsync(string url); + + Task DoesExistAsync(string url); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs new file mode 100644 index 0000000000..240fc629d6 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Pages/Page.cs @@ -0,0 +1,33 @@ +using System; +using JetBrains.Annotations; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Pages +{ + public class Page : FullAuditedAggregateRoot, IMultiTenant + { + public Guid? TenantId { get; set; } + + public virtual string Title { get; set; } + + public virtual string Url { get; set; } + + public virtual string Description { get; set; } + + protected Page() + { + + } + + public Page(Guid id, [NotNull] string title, [NotNull] string url, [CanBeNull] string description = null, Guid? tenantId = null) : base(id) + { + Title = Check.NotNullOrWhiteSpace(title, nameof(title), PageConsts.MaxTitleLength); + Url = Check.NotNullOrWhiteSpace(url, nameof(url), PageConsts.MaxUrlLength); + Description = Check.Length(description, nameof(description), PageConsts.MaxDescriptionLength); + + TenantId = tenantId; + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs new file mode 100644 index 0000000000..5d27e8b15f --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/EntityTag.cs @@ -0,0 +1,32 @@ +using System; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Tags +{ + public class EntityTag : Entity, IMultiTenant + { + public virtual Guid TagId { get; set; } + + public virtual string EntityId { get; set; } + + public virtual Guid? TenantId { get; set; } + + protected EntityTag() + { + } + + public EntityTag(Guid tagId, string entityId, Guid? tenantId = null) + { + TagId = tagId; + EntityId = entityId; + TenantId = tenantId; + } + + public override object[] GetKeys() + { + return new object[] { TagId, EntityId }; + } + + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs new file mode 100644 index 0000000000..6ec0fd4b44 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/IEntityTagRepository.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Tags +{ + public interface IEntityTagRepository : IBasicRepository + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs new file mode 100644 index 0000000000..943fd6af00 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagManager.cs @@ -0,0 +1,30 @@ +using JetBrains.Annotations; +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Tags +{ + public interface ITagManager : IDomainService + { + Task InsertAsync( + Guid id, + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task UpdateAsync( + Guid id, + [NotNull] string name, + CancellationToken cancellationToken = default); + + Task GetOrAddAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs new file mode 100644 index 0000000000..8493fe8401 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/ITagRepository.cs @@ -0,0 +1,36 @@ +using JetBrains.Annotations; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Volo.CmsKit.Tags +{ + public interface ITagRepository : IBasicRepository + { + Task GetAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task AnyAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task FindAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + + Task> GetAllRelatedTagsAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs new file mode 100644 index 0000000000..fab09ed521 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/Tag.cs @@ -0,0 +1,37 @@ +using JetBrains.Annotations; +using System; +using Volo.Abp; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Volo.CmsKit.Tags +{ + public class Tag : FullAuditedAggregateRoot, IMultiTenant + { + public string EntityType { get; set; } + + public string Name { get; protected set; } + + public Guid? TenantId { get; set; } + + protected Tag() + { + } + + public Tag( + Guid id, + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null) : base(id) + { + EntityType = Check.NotNullOrWhiteSpace(entityType, nameof(entityType), TagConsts.MaxEntityTypeLength); + SetName(name); + TenantId = tenantId; + } + + public void SetName(string name) + { + Name = Check.NotNullOrWhiteSpace(name, nameof(name), TagConsts.MaxNameLength); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagAlreadyExistException.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagAlreadyExistException.cs new file mode 100644 index 0000000000..6cae0dde92 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagAlreadyExistException.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using System; +using Volo.Abp; + +namespace Volo.CmsKit.Tags +{ + [Serializable] + public class TagAlreadyExistException : BusinessException + { + public TagAlreadyExistException([NotNull] string entityType, [NotNull] string name) + { + Code = CmsKitErrorCodes.TagAlreadyExist; + WithData(nameof(Tag.EntityType), entityType); + WithData(nameof(Tag.Name), name); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs new file mode 100644 index 0000000000..042b4e27a9 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Tags/TagManager.cs @@ -0,0 +1,74 @@ +using JetBrains.Annotations; +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Domain.Services; + +namespace Volo.CmsKit.Tags +{ + public class TagManager : DomainService, ITagManager + { + private readonly ITagRepository _tagRepository; + + public TagManager(ITagRepository tagRepository) + { + _tagRepository = tagRepository; + } + + public async Task GetOrAddAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + var entity = await _tagRepository.FindAsync(entityType, name, tenantId, cancellationToken); + + if (entity == null) + { + entity = await InsertAsync(GuidGenerator.Create(), entityType, name, tenantId, cancellationToken); + } + + return entity; + } + + public async Task InsertAsync( + Guid id, + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + if (await _tagRepository.AnyAsync(entityType, name, tenantId, cancellationToken)) + { + throw new TagAlreadyExistException(entityType, name); + } + + return await _tagRepository.InsertAsync( + new Tag( + id, + entityType, + name, + tenantId), + cancellationToken: cancellationToken); + } + + public async Task UpdateAsync( + Guid id, + [NotNull] string name, + CancellationToken cancellationToken = default) + { + var entity = await _tagRepository.GetAsync(id, cancellationToken: cancellationToken); + + if (name != entity.Name && + await _tagRepository.AnyAsync(entity.EntityType, name, entity.TenantId, cancellationToken)) + { + throw new TagAlreadyExistException(entity.EntityType, name); + } + + entity.SetName(name); + + return await _tagRepository.UpdateAsync(entity, cancellationToken: cancellationToken); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs index 9dec7877f8..40496aaef8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Comments/EfCoreCommentRepository.cs @@ -28,8 +28,8 @@ namespace Volo.CmsKit.Comments Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - var query = from comment in DbSet - join user in DbContext.Set() on comment.CreatorId equals user.Id + var query = from comment in (await GetDbSetAsync()) + join user in (await GetDbContextAsync()).Set() on comment.CreatorId equals user.Id where entityType == comment.EntityType && entityId == comment.EntityId orderby comment.CreationTime select new CommentWithAuthorQueryResultItem @@ -45,7 +45,7 @@ namespace Volo.CmsKit.Comments Comment comment, CancellationToken cancellationToken = default) { - var replies = await DbSet + var replies = await (await GetDbSetAsync()) .Where(x => x.RepliedCommentId == comment.Id) .ToListAsync(GetCancellationToken(cancellationToken)); diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs new file mode 100644 index 0000000000..9293d637f7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Contents/EfCoreContentRepository.cs @@ -0,0 +1,55 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Contents +{ + public class EfCoreContentRepository : EfCoreRepository, IContentRepository + { + public EfCoreContentRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public Task GetAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken) + ); + } + + public Task FindAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken) + ); + } + + public Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + { + return DeleteAsync(x => + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs index b81704034a..8d32de7958 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs @@ -8,8 +8,11 @@ using Volo.CmsKit.Comments; using Volo.CmsKit.Reactions; using Volo.CmsKit.Users; using Volo.Abp.Users.EntityFrameworkCore; +using Volo.CmsKit.Contents; using Volo.CmsKit.GlobalFeatures; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; +using Volo.CmsKit.Tags; namespace Volo.CmsKit.EntityFrameworkCore { @@ -93,6 +96,58 @@ namespace Volo.CmsKit.EntityFrameworkCore r.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId, x.CreatorId}); }); } + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Contents", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.EntityType).IsRequired().HasMaxLength(ContentConsts.MaxEntityTypeLength); + b.Property(x => x.EntityId).IsRequired().HasMaxLength(ContentConsts.MaxEntityIdLength); + b.Property(x => x.Value).IsRequired().HasMaxLength(ContentConsts.MaxValueLength); + + b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId }); + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Tags", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength); + b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength); + + b.HasIndex(x => new { x.TenantId, x.Name }); + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "EntityTags", options.Schema); + + b.ConfigureByConvention(); + + b.HasKey(x => new { x.EntityId, x.TagId }); + + b.Property(x => x.EntityId).IsRequired(); + b.Property(x => x.TagId).IsRequired(); + + b.HasIndex(x => new { x.TenantId, x.EntityId, x.TagId }); + }); + + builder.Entity(b => + { + b.ToTable(options.TablePrefix + "Pages", options.Schema); + + b.ConfigureByConvention(); + + b.Property(x => x.Title).IsRequired().HasMaxLength(PageConsts.MaxTitleLength); + b.Property(x => x.Url).IsRequired().HasMaxLength(PageConsts.MaxUrlLength); + b.Property(x => x.Description).HasMaxLength(PageConsts.MaxDescriptionLength); + + b.HasIndex(x => new { x.TenantId, x.Url }); + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs index 33e57cab37..c995c21dfb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitEntityFrameworkCoreModule.cs @@ -3,8 +3,11 @@ using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp.Users.EntityFrameworkCore; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit.EntityFrameworkCore @@ -24,6 +27,10 @@ namespace Volo.CmsKit.EntityFrameworkCore options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs new file mode 100644 index 0000000000..93a7df00d2 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Pages/EfCorePageRepository.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Pages +{ + public class EfCorePageRepository : EfCoreRepository, IPageRepository + { + public EfCorePageRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public Task GetByUrlAsync(string url) + { + return GetAsync(x => x.Url == url); + } + + public Task FindByUrlAsync(string url) + { + return FindAsync(x => x.Url == url); + } + + public async Task DoesExistAsync(string url) + { + return await (await GetDbSetAsync()).AnyAsync(x => x.Url == url); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Ratings/EfCoreRatingRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Ratings/EfCoreRatingRepository.cs index 810335b4d6..a48c288932 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Ratings/EfCoreRatingRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Ratings/EfCoreRatingRepository.cs @@ -24,7 +24,7 @@ namespace Volo.CmsKit.Ratings Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - var rating = await DbSet.FirstOrDefaultAsync( + var rating = await (await GetDbSetAsync()).FirstOrDefaultAsync( r => r.EntityType == entityType && r.EntityId == entityId && r.CreatorId == userId, GetCancellationToken(cancellationToken)); @@ -38,7 +38,7 @@ namespace Volo.CmsKit.Ratings Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); var query = ( - from rating in DbSet + from rating in (await GetDbSetAsync()) where rating.EntityType == entityType && rating.EntityId == entityId group rating by rating.StarCount into g @@ -54,4 +54,4 @@ namespace Volo.CmsKit.Ratings return ratings; } } -} \ No newline at end of file +} diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Reactions/EfCoreUserReactionRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Reactions/EfCoreUserReactionRepository.cs index da89de4c74..65824c79b6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Reactions/EfCoreUserReactionRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Reactions/EfCoreUserReactionRepository.cs @@ -30,7 +30,7 @@ namespace Volo.CmsKit.Reactions Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); Check.NotNullOrWhiteSpace(reactionName, nameof(reactionName)); - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.CreatorId == userId && x.EntityType == entityType && @@ -48,7 +48,7 @@ namespace Volo.CmsKit.Reactions Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.CreatorId == userId && x.EntityType == entityType && @@ -64,7 +64,7 @@ namespace Volo.CmsKit.Reactions Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.EntityType == entityType && x.EntityId == entityId) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs new file mode 100644 index 0000000000..cca61b802b --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreEntityTagRepository.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Tags +{ + public class EfCoreEntityTagRepository: EfCoreRepository, IEntityTagRepository + { + public EfCoreEntityTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs new file mode 100644 index 0000000000..3d917a059a --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs @@ -0,0 +1,80 @@ +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Domain.Repositories.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.VirtualFileSystem; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Tags +{ + public class EfCoreTagRepository : EfCoreRepository, ITagRepository + { + public EfCoreTagRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public virtual async Task AnyAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return await (await GetDbSetAsync()).AnyAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + GetCancellationToken(cancellationToken)); + } + + public virtual Task GetAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); + } + + public virtual Task FindAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); + } + + public virtual async Task> GetAllRelatedTagsAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + var entityTagIds = await (await GetDbContextAsync()).Set() + .Where(q => q.EntityId == entityId && q.TenantId == tenantId) + .Select(q => q.TagId) + .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + + var query = (await GetDbSetAsync()) + .Where(x => x.EntityType == entityType && + x.TenantId == tenantId && + entityTagIds.Contains(x.Id)); + + return await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs index 09053167f9..c61d8d9a13 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContext.cs @@ -2,9 +2,13 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; +using Tag = MongoDB.Driver.Tag; namespace Volo.CmsKit.MongoDB { @@ -19,6 +23,14 @@ namespace Volo.CmsKit.MongoDB public IMongoCollection Ratings => Collection(); + public IMongoCollection Contents => Collection(); + + public IMongoCollection Tags => Collection(); + + public IMongoCollection EntityTags => Collection(); + + public IMongoCollection Pages => Collection(); + protected override void CreateModel(IMongoModelBuilder modelBuilder) { base.CreateModel(modelBuilder); diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs index 2dc4c55a71..7f6dcfecf3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs @@ -2,8 +2,11 @@ using Volo.Abp; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit.MongoDB @@ -41,6 +44,26 @@ namespace Volo.CmsKit.MongoDB { x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Ratings"; }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Contents"; + }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Tags"; + }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "EntityTags"; + }); + + builder.Entity(x => + { + x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Pages"; + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs index d479821b38..898b1687a8 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbModule.cs @@ -3,12 +3,18 @@ using Volo.Abp.Modularity; using Volo.Abp.MongoDB; using Volo.Abp.Users.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; using Volo.CmsKit.MongoDB.Comments; +using Volo.CmsKit.MongoDB.Contents; +using Volo.CmsKit.MongoDB.Pages; using Volo.CmsKit.MongoDB.Ratings; using Volo.CmsKit.MongoDB.Reactions; +using Volo.CmsKit.MongoDB.Tags; using Volo.CmsKit.MongoDB.Users; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit.MongoDB @@ -28,6 +34,10 @@ namespace Volo.CmsKit.MongoDB options.AddRepository(); options.AddRepository(); options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs index 9564bcf9f8..5d16c6d55c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Comments/MongoCommentRepository.cs @@ -26,15 +26,15 @@ namespace Volo.CmsKit.MongoDB.Comments Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - var authorsQuery = from comment in GetMongoQueryable() - join user in DbContext.CmsUsers on comment.CreatorId equals user.Id + var authorsQuery = from comment in (await GetMongoQueryableAsync(cancellationToken)) + join user in (await GetDbContextAsync(cancellationToken)).CmsUsers on comment.CreatorId equals user.Id where entityType == comment.EntityType && entityId == comment.EntityId orderby comment.CreationTime select user; var authors = await authorsQuery.ToListAsync(GetCancellationToken(cancellationToken)); - var comments = await GetMongoQueryable() + var comments = await (await GetMongoQueryableAsync(cancellationToken)) .Where(c => c.EntityId == entityId && c.EntityType == entityType) .OrderBy(c => c.CreationTime) .ToListAsync(GetCancellationToken(cancellationToken)); @@ -53,7 +53,7 @@ namespace Volo.CmsKit.MongoDB.Comments Comment comment, CancellationToken cancellationToken = default) { - var replies = await GetMongoQueryable() + var replies = await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.RepliedCommentId == comment.Id) .ToListAsync(GetCancellationToken(cancellationToken)); diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs new file mode 100644 index 0000000000..ccdee8b431 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Contents/MongoContentRepository.cs @@ -0,0 +1,55 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.MongoDB.Contents +{ + public class MongoContentRepository : MongoDbRepository, IContentRepository + { + public MongoContentRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public Task GetAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken) + ); + } + + public Task FindAsync( + string entityType, + string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + !x.IsDeleted && + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken) + ); + } + + public Task DeleteAsync(string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default) + { + return DeleteAsync(x => + x.EntityType == entityType && + x.EntityId == entityId && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs index 40914a9720..d33a5ee371 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/ICmsKitMongoDbContext.cs @@ -2,9 +2,13 @@ using Volo.Abp.Data; using Volo.Abp.MongoDB; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; +using Tag = MongoDB.Driver.Tag; namespace Volo.CmsKit.MongoDB { @@ -18,5 +22,13 @@ namespace Volo.CmsKit.MongoDB IMongoCollection CmsUsers { get; } IMongoCollection Ratings { get; } + + IMongoCollection Contents { get; } + + IMongoCollection Tags { get; } + + IMongoCollection EntityTags { get; } + + IMongoCollection Pages { get; } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs new file mode 100644 index 0000000000..8537500c96 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Pages/MongoPageRepository.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; +using MongoDB.Driver.Linq; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.MongoDB.Pages +{ + public class MongoPageRepository : MongoDbRepository, IPageRepository + { + public MongoPageRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public Task GetByUrlAsync(string url) + { + return GetAsync(x => x.Url == url); + } + + public Task FindByUrlAsync(string url) + { + return FindAsync(x => x.Url == url); + } + + public async Task DoesExistAsync(string url) + { + return await (await GetMongoQueryableAsync()).AnyAsync(x => x.Url == url); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Ratings/MongoRatingRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Ratings/MongoRatingRepository.cs index 92f7f992da..8ff8b4f81d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Ratings/MongoRatingRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Ratings/MongoRatingRepository.cs @@ -25,7 +25,7 @@ namespace Volo.CmsKit.MongoDB.Ratings Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - var rating = await GetMongoQueryable() + var rating = await (await GetMongoQueryableAsync(cancellationToken)) .FirstOrDefaultAsync(r => r.EntityType == entityType && r.EntityId == entityId && r.CreatorId == userId, GetCancellationToken(cancellationToken)); @@ -39,7 +39,7 @@ namespace Volo.CmsKit.MongoDB.Ratings Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); var query = ( - from rating in GetMongoQueryable() + from rating in (await GetMongoQueryableAsync(cancellationToken)) where rating.EntityType == entityType && rating.EntityId == entityId group rating by rating.StarCount into g @@ -55,4 +55,4 @@ namespace Volo.CmsKit.MongoDB.Ratings return ratings; } } -} \ No newline at end of file +} diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Reactions/MongoUserReactionRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Reactions/MongoUserReactionRepository.cs index e3a09c4514..6ac4cf1b80 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Reactions/MongoUserReactionRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Reactions/MongoUserReactionRepository.cs @@ -29,7 +29,7 @@ namespace Volo.CmsKit.MongoDB.Reactions Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); Check.NotNullOrWhiteSpace(reactionName, nameof(reactionName)); - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.CreatorId == userId && x.EntityType == entityType && @@ -47,7 +47,7 @@ namespace Volo.CmsKit.MongoDB.Reactions Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.CreatorId == userId && x.EntityType == entityType && @@ -63,7 +63,7 @@ namespace Volo.CmsKit.MongoDB.Reactions Check.NotNullOrWhiteSpace(entityType, nameof(entityType)); Check.NotNullOrWhiteSpace(entityId, nameof(entityId)); - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.EntityType == entityType && x.EntityId == entityId) diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs new file mode 100644 index 0000000000..5ac1a4b69c --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoEntityTagRepository.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.MongoDB.Tags +{ + public class MongoEntityTagRepository: MongoDbRepository, IEntityTagRepository + { + public MongoEntityTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs new file mode 100644 index 0000000000..02c42c22fb --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/Tags/MongoTagRepository.cs @@ -0,0 +1,82 @@ +using JetBrains.Annotations; +using MongoDB.Driver; +using MongoDB.Driver.Linq; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories.MongoDB; +using Volo.Abp.MongoDB; +using Volo.CmsKit.Tags; +using Tag = Volo.CmsKit.Tags.Tag; + +namespace Volo.CmsKit.MongoDB.Tags +{ + public class MongoTagRepository : MongoDbRepository, ITagRepository + { + public MongoTagRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } + + public async Task AnyAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return await (await GetMongoQueryableAsync(cancellationToken)) + .AnyAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + GetCancellationToken(cancellationToken)); + } + + public Task GetAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return GetAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); + } + + public Task FindAsync( + [NotNull] string entityType, + [NotNull] string name, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + return FindAsync(x => + x.EntityType == entityType && + x.Name == name && + x.TenantId == tenantId, + cancellationToken: GetCancellationToken(cancellationToken)); + } + + public virtual async Task> GetAllRelatedTagsAsync( + [NotNull] string entityType, + [NotNull] string entityId, + Guid? tenantId = null, + CancellationToken cancellationToken = default) + { + var entityTagIds = await (await GetDbContextAsync(cancellationToken)).EntityTags.AsQueryable() + .Where(q => q.EntityId == entityId && q.TenantId == tenantId) + .Select(q => q.TagId) + .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + + var query = (await GetMongoQueryableAsync(cancellationToken)) + .Where(x => + x.EntityType == entityType && + x.TenantId == tenantId && + entityTagIds.Contains(x.Id)); + + var result = await query.ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + return result; + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/ContentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/ContentDto.cs new file mode 100644 index 0000000000..100626fb6d --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/ContentDto.cs @@ -0,0 +1,10 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Contents +{ + public class ContentDto : EntityDto + { + public string Value { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/GetContentInput.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/GetContentInput.cs new file mode 100644 index 0000000000..0dfd9a1636 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/GetContentInput.cs @@ -0,0 +1,8 @@ +namespace Volo.CmsKit.Public.Contents +{ + public class GetContentInput + { + public string EntityType { get; set; } + public string EntityId { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs new file mode 100644 index 0000000000..6f691ceca1 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Contents/IContentAppService.cs @@ -0,0 +1,10 @@ +using System.Threading.Tasks; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Public.Contents +{ + public interface IContentAppService + { + Task GetAsync(GetContentInput input); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs new file mode 100644 index 0000000000..d8ea8f1751 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/IPageAppService.cs @@ -0,0 +1,10 @@ +using System.Threading.Tasks; +using JetBrains.Annotations; + +namespace Volo.CmsKit.Public.Pages +{ + public interface IPageAppService + { + Task GetByUrlAsync([NotNull] string url); + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs new file mode 100644 index 0000000000..49798d5202 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Pages/PageDto.cs @@ -0,0 +1,14 @@ +using System; +using Volo.Abp.Application.Dtos; + +namespace Volo.CmsKit.Public.Pages +{ + public class PageDto : EntityDto + { + public string Title { get; set; } + + public string Url { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Tags/GetRelatedTagsInput.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Tags/GetRelatedTagsInput.cs new file mode 100644 index 0000000000..b8df8ec439 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Tags/GetRelatedTagsInput.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace Volo.CmsKit.Public.Tags +{ + public class GetRelatedTagsInput + { + [Required] + public string EntityType { get; set; } + + [Required] + public string EntityId { get; set; } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Tags/ITagAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Tags/ITagAppService.cs new file mode 100644 index 0000000000..29d786f086 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application.Contracts/Volo/CmsKit/Public/Tags/ITagAppService.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Public.Tags +{ + public interface ITagAppService : IApplicationService + { + Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input); + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs new file mode 100644 index 0000000000..94cffea154 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Contents/ContentAppService.cs @@ -0,0 +1,25 @@ +using System.Threading.Tasks; +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.Public.Contents +{ + public class ContentAppService : CmsKitAppServiceBase, IContentAppService + { + protected readonly IContentRepository ContentRepository; + + public ContentAppService(IContentRepository contentRepository) + { + ContentRepository = contentRepository; + } + + public virtual async Task GetAsync(GetContentInput input) + { + var entity = await ContentRepository.GetAsync( + input.EntityType, + input.EntityId, + CurrentTenant.Id); + + return ObjectMapper.Map(entity); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs new file mode 100644 index 0000000000..38f4406cab --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PageAppService.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.Public.Pages +{ + public class PageAppService : CmsKitPublicAppServiceBase, IPageAppService + { + protected readonly IPageRepository PageRepository; + + public PageAppService(IPageRepository pageRepository) + { + PageRepository = pageRepository; + } + + public virtual async Task GetByUrlAsync(string url) + { + var page = await PageRepository.GetByUrlAsync(url); + + return ObjectMapper.Map(page); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs index 3ac2d1949b..a45eaff0b2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/PublicApplicationAutoMapperProfile.cs @@ -1,7 +1,11 @@ using AutoMapper; using Volo.Abp.AutoMapper; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Public.Comments; +using Volo.CmsKit.Public.Contents; +using Volo.CmsKit.Public.Pages; using Volo.CmsKit.Public.Ratings; using Volo.CmsKit.Ratings; using Volo.CmsKit.Users; @@ -22,6 +26,10 @@ namespace Volo.CmsKit.Public .Ignore(x=> x.Author); CreateMap(); + + CreateMap(); + + CreateMap(); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Tags/TagAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Tags/TagAppService.cs new file mode 100644 index 0000000000..8feaaa0130 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Tags/TagAppService.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Public.Tags +{ + public class TagAppService : CmsKitAppServiceBase, ITagAppService + { + protected readonly ITagManager TagManager; + protected readonly ITagRepository TagRepository; + protected readonly IEntityTagRepository EntityTagRepository; + + public TagAppService( + ITagManager tagManager, + ITagRepository tagRepository, + IEntityTagRepository entityTagRepository) + { + TagManager = tagManager; + TagRepository = tagRepository; + EntityTagRepository = entityTagRepository; + } + + public virtual async Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input) + { + var entities = await TagRepository.GetAllRelatedTagsAsync( + input.EntityType, + input.EntityId, + CurrentTenant.Id); + + return ObjectMapper.Map, List>(entities); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs new file mode 100644 index 0000000000..f18326a3d0 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Contents/ContentController.cs @@ -0,0 +1,28 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Controllers; + +namespace Volo.CmsKit.Public.Contents +{ + + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit-public/contents")] + public class ContentController : CmsKitControllerBase, IContentAppService + { + protected readonly IContentAppService _contentAppService; + + public ContentController(IContentAppService contentAppService) + { + _contentAppService = contentAppService; + } + + [HttpGet] + public virtual Task GetAsync(GetContentInput input) + { + return _contentAppService.GetAsync(input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs new file mode 100644 index 0000000000..45dda25ab5 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Pages/PagesPublicController.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace Volo.CmsKit.Public.Pages +{ + [RemoteService(Name = CmsKitPublicRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit-public/comments")] + public class PagesPublicController + { + protected readonly IPageAppService PageAppService; + + public PagesPublicController(IPageAppService pageAppService) + { + PageAppService = pageAppService; + } + + [HttpGet] + [Route("url/{url}")] + public Task GetByUrlAsync(string url) + { + return PageAppService.GetByUrlAsync(url); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagController.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagController.cs new file mode 100644 index 0000000000..307c5a4247 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi/Volo/CmsKit/Public/Tags/TagController.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Public.Tags +{ + [RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] + [Area("cms-kit")] + [Route("api/cms-kit/tags")] + public class TagController : CmsKitPublicControllerBase, ITagAppService + { + protected readonly ITagAppService TagAppService; + + public TagController(ITagAppService tagAppService) + { + TagAppService = tagAppService; + } + + [HttpGet] + public Task> GetAllRelatedTagsAsync(GetRelatedTagsInput input) + { + return TagAppService.GetAllRelatedTagsAsync(input); + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml new file mode 100644 index 0000000000..47e73b8b19 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml @@ -0,0 +1,14 @@ +@page "{pageUrl}" +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.CmsKit.Localization +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages +@model Volo.CmsKit.Public.Web.Pages.CmsKit.Pages.IndexModel +@inject IHtmlLocalizer L + +@await Component.InvokeAsync(typeof(DefaultPageViewComponent), + new + { + pageId = Model.Page.Id, + title = Model.Page.Title, + description = Model.Page.Description + }) \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs new file mode 100644 index 0000000000..1d5dca0940 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Pages/Index.cshtml.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.CmsKit.Public.Pages; +using Volo.CmsKit.Web.Pages; + +namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Pages +{ + public class IndexModel : CommonPageModel + { + [BindProperty(SupportsGet = true)] + public string PageUrl { get; set; } + + protected readonly IPageAppService PageAppService; + + public PageDto Page; + + public IndexModel(IPageAppService pageAppService) + { + PageAppService = pageAppService; + } + + public async Task OnGetAsync() + { + Page = await PageAppService.GetByUrlAsync(PageUrl); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs new file mode 100644 index 0000000000..129bff61cf --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/ContentViewComponent.cs @@ -0,0 +1,55 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.CmsKit.Public.Contents; +using Volo.CmsKit.Web.Contents; + +namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +{ + [ViewComponent(Name = "CmsContent")] + public class ContentViewComponent : AbpViewComponent + { + private readonly IContentRenderer contentRenderer; + private readonly IContentAppService contentAppService; + + public ContentViewComponent( + IContentRenderer contentRenderer, + IContentAppService contentAppService) + { + this.contentRenderer = contentRenderer; + this.contentAppService = contentAppService; + } + + public virtual async Task InvokeAsync( + string entityType, + string entityId) + { + var content = await contentAppService.GetAsync(new GetContentInput + { + EntityId = entityId, + EntityType = entityType + }); + + var viewModel = new ContentViewModel + { + EntityId = entityId, + EntityType = entityType, + ContentId = content.Id, + Rendered = await contentRenderer.RenderAsync(content.Value) + }; + + return View("~/Pages/CmsKit/Shared/Components/Contents/Default.cshtml", viewModel); + } + + public class ContentViewModel + { + public Guid ContentId { get; set; } + public string EntityType { get; set; } + + public string EntityId { get; set; } + + public string Rendered { get; set; } + } + } +} diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml new file mode 100644 index 0000000000..29f7bfa6a3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Contents/Default.cshtml @@ -0,0 +1,3 @@ +@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents.ContentViewComponent.ContentViewModel + +@Html.Raw(Model.Rendered) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml new file mode 100644 index 0000000000..1f90458ee7 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/Default.cshtml @@ -0,0 +1,21 @@ +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap + +@using Microsoft.AspNetCore.Mvc.RazorPages +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Contents +@model Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages.PageViewModel + + + +

+ @Model.Title +

+
+ + +

+ @Model.Description +

+ + @await Component.InvokeAsync(typeof(ContentViewComponent), new { entityType = nameof(Page), entityId = Model.Id.ToString() }) +
+
diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs new file mode 100644 index 0000000000..450b7ad97e --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Pages/DefaultPageViewComponent.cs @@ -0,0 +1,40 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.CmsKit.Public.Pages; + +namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Pages +{ + [ViewComponent(Name = "CmsDefaultPage")] + public class DefaultPageViewComponent : AbpViewComponent + { + protected readonly IPageAppService PageAppService; + + public DefaultPageViewComponent(IPageAppService pageAppService) + { + PageAppService = pageAppService; + } + + public virtual async Task InvokeAsync(Guid pageId, string title, string description) + { + var model = new PageViewModel + { + Id = pageId, + Title = title, + Description = description + }; + + return View("~/Pages/CmsKit/Shared/Components/Pages/Default.cshtml", model); + } + } + + public class PageViewModel + { + public Guid Id { get; set; } + + public string Title { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml new file mode 100644 index 0000000000..f7c61dbc81 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/Default.cshtml @@ -0,0 +1,13 @@ +@using Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Tags + +@model TagViewComponent.TagViewModel + +@if (Model.Tags != null) +{ + foreach (var tag in Model.Tags) + { + + @tag.Name + + } +} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs new file mode 100644 index 0000000000..44deaad0ed --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Tags/TagViewComponent.cs @@ -0,0 +1,50 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.AspNetCore.Mvc; +using Volo.CmsKit.Public.Tags; +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Tags +{ + [ViewComponent(Name = "CmsTags")] + public class TagViewComponent : AbpViewComponent + { + protected readonly ITagAppService TagAppService; + + public TagViewComponent(ITagAppService tagAppService) + { + TagAppService = tagAppService; + } + + public virtual async Task InvokeAsync( + string entityType, + string entityId) + { + var tagDtos = await TagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput + { + EntityId = entityId, + EntityType = entityType + }); + + var viewModel = new TagViewModel + { + EntityId = entityId, + EntityType = entityType, + Tags = tagDtos + }; + + return View("~/Pages/CmsKit/Shared/Components/Tags/Default.cshtml", viewModel); + } + + public class TagViewModel + { + public List Tags { get; set; } + public string EntityId { get; set; } + public string EntityType { get; set; } + } + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs new file mode 100644 index 0000000000..59fcc8c8bd --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PageAdminAppService_Tests.cs @@ -0,0 +1,183 @@ +using System; +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Uow; +using Volo.CmsKit.Admin.Pages; +using Volo.CmsKit.Contents; +using Xunit; + +namespace Volo.CmsKit.Pages +{ + public class PageAdminAppService_Tests : CmsKitApplicationTestBase + { + private readonly CmsKitTestData _data; + private readonly IPageAdminAppService _pageAdminAppService; + + private readonly IPageRepository _pageRepository; + private readonly IContentRepository _contentRepository; + + public PageAdminAppService_Tests() + { + _data = GetRequiredService(); + _pageAdminAppService = GetRequiredService(); + _pageRepository = GetRequiredService(); + _contentRepository = GetRequiredService(); + } + + [Fact] + public async Task ShouldGetAsync() + { + var page = await _pageAdminAppService.GetAsync(_data.Page_1_Id); + + page.Description.ShouldBe(_data.Page_1_Description); + } + + [Fact] + public async Task ShouldCreateAsync() + { + var dto = new CreatePageInputDto + { + Title = "test", + Url = "test-url" + }; + + await Should.NotThrowAsync(async () => await _pageAdminAppService.CreatePageAsync(dto)); + + var page = await _pageRepository.GetByUrlAsync(dto.Url); + + page.Title.ShouldBe(dto.Title); + } + + [Fact] + public async Task ShouldNotCreateAsync() + { + var dto = new CreatePageInputDto + { + Title = "test", + Url = _data.Page_1_Url + }; + + await Should.ThrowAsync(async () => await _pageAdminAppService.CreatePageAsync(dto)); + } + + [Fact] + public async Task ShouldCreateWithContentAsync() + { + var dto = new CreatePageWithContentInputDto + { + Title = "test", + Url = "test-url", + Content = "my-test-content" + }; + + await Should.NotThrowAsync(async () => await _pageAdminAppService.CreatePageWithContentAsync(dto)); + + var page = await _pageRepository.GetByUrlAsync(dto.Url); + + var content = await _contentRepository.GetAsync(nameof(Page), page.Id.ToString()); + + content.Value.ShouldBe(dto.Content); + } + + [Fact] + public async Task ShouldNotCreateWithContentAsync() + { + var dto = new CreatePageWithContentInputDto + { + Title = "test", + Url = _data.Page_1_Url, + Content = "my-test-content" + }; + + await Should.ThrowAsync(async () => await _pageAdminAppService.CreatePageWithContentAsync(dto)); + } + + [Fact] + public async Task ShouldUpdatePageAsync() + { + var dto = new UpdatePageInputDto + { + Title = _data.Page_1_Title + "++", + Description = "new description", + Url = _data.Page_1_Url+ "test" + }; + + await Should.NotThrowAsync(async () => await _pageAdminAppService.UpdatePageAsync(_data.Page_1_Id, dto)); + + var updatedPage = await _pageRepository.GetAsync(_data.Page_1_Id); + + updatedPage.Title.ShouldNotBe(_data.Page_1_Title); + updatedPage.Title.ShouldBe(dto.Title); + + updatedPage.Url.ShouldNotBe(_data.Page_1_Url); + updatedPage.Url.ShouldBe(dto.Url); + + updatedPage.Description.ShouldNotBe(_data.Page_1_Description); + updatedPage.Description.ShouldBe(dto.Description); + } + + [Fact] + public async Task ShouldNotUpdatePageAsync() + { + var dto = new UpdatePageInputDto + { + Title = _data.Page_1_Title + "++", + Description = "new description", + Url = _data.Page_2_Url + }; + + await Should.ThrowAsync(async () => await _pageAdminAppService.UpdatePageAsync(_data.Page_1_Id, dto)); + } + + [Fact] + public async Task ShouldBeExistAsync() + { + var dto = new CheckUrlInputDto + { + Url = _data.Page_1_Url + }; + + var doesExist = await _pageAdminAppService.DoesUrlExistAsync(dto); + + doesExist.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotBeExistAsync() + { + var dto = new CheckUrlInputDto + { + Url = _data.Page_1_Url+ "+" + }; + + var doesExist = await _pageAdminAppService.DoesUrlExistAsync(dto); + + doesExist.ShouldBeFalse(); + } + + [Fact] + public async Task ShouldUpdateContentAsync() + { + var dto = new UpdatePageContentInputDto + { + Content = "my-new-content" + }; + + await Should.NotThrowAsync(async () => await _pageAdminAppService.UpdatePageContentAsync(_data.Page_1_Id, dto)); + + var content = await _contentRepository.GetAsync(nameof(Page), _data.Page_1_Id.ToString()); + + content.Value.ShouldBe(dto.Content); + } + + [Fact] + public async Task ShouldDeleteAsync() + { + await _pageAdminAppService.DeleteAsync(_data.Page_1_Id); + + await Should.ThrowAsync(async () => await _pageRepository.GetAsync(_data.Page_1_Id)); + + await Should.ThrowAsync(async () => await _contentRepository.GetAsync(nameof(Page), _data.Page_1_Id.ToString())); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs new file mode 100644 index 0000000000..290f02caff --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Pages/PagePublicAppService_Tests.cs @@ -0,0 +1,32 @@ +using System; +using System.Threading.Tasks; +using Shouldly; +using Volo.CmsKit.Public.Pages; +using Xunit; + +namespace Volo.CmsKit.Pages +{ + public class PagePublicAppService_Tests : CmsKitApplicationTestBase + { + private readonly CmsKitTestData _data; + private readonly IPageAppService _pageAppService; + + public PagePublicAppService_Tests() + { + _data = GetRequiredService(); + _pageAppService = GetRequiredService(); + } + + [Fact] + public async Task ShouldGetByUrlAsync() + { + await Should.NotThrowAsync(async () => await _pageAppService.GetByUrlAsync(_data.Page_1_Url)); + } + + [Fact] + public async Task ShouldNotGetByUrlAsync() + { + await Should.ThrowAsync(async () => await _pageAppService.GetByUrlAsync("not-exist-url")); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagAdminAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagAdminAppService_Tests.cs new file mode 100644 index 0000000000..4ad0d43468 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagAdminAppService_Tests.cs @@ -0,0 +1,52 @@ +using Microsoft.Extensions.DependencyInjection; +using NSubstitute; +using Shouldly; +using System; +using System.Threading.Tasks; +using Volo.Abp.Users; +using Volo.CmsKit.Admin.Tags; +using Xunit; + +namespace Volo.CmsKit.Tags +{ + public class TagAdminAppService_Tests : CmsKitApplicationTestBase + { + private readonly ITagAdminAppService _tagAdminAppService; + private ICurrentUser _currentUser; + private readonly CmsKitTestData _cmsKitTestData; + + public TagAdminAppService_Tests() + { + _tagAdminAppService = GetRequiredService(); + _cmsKitTestData = GetRequiredService(); + } + + protected override void AfterAddApplication(IServiceCollection services) + { + _currentUser = Substitute.For(); + services.AddSingleton(_currentUser); + } + + [Fact] + public async Task ShouldCreateProperly() + { + var list = await _tagAdminAppService.CreateAsync(new TagCreateDto + { + EntityType = "any_new_type", + Name = "1", + }); + + list.Id.ShouldNotBe(Guid.Empty); + } + + [Fact] + public async Task ShouldThrowException_WhenTagAlreadyExist() + { + await Should.ThrowAsync(async () => await _tagAdminAppService.CreateAsync(new TagCreateDto + { + EntityType = _cmsKitTestData.Content_1_EntityType, + Name = _cmsKitTestData.Content_1_Tags[0], + })); + } + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagPublicAppService_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagPublicAppService_Tests.cs new file mode 100644 index 0000000000..6ad1136167 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Application.Tests/Tags/TagPublicAppService_Tests.cs @@ -0,0 +1,78 @@ +using Microsoft.Extensions.DependencyInjection; +using NSubstitute; +using Shouldly; +using System.Threading.Tasks; +using Volo.Abp.Clients; +using Volo.Abp.Users; +using Volo.Abp.Validation; +using Volo.CmsKit.Public.Tags; +using Xunit; + +namespace Volo.CmsKit.Tags +{ + public class TagPublicAppService_Tests : CmsKitApplicationTestBase + { + private readonly ITagAppService _tagAppService; + private ICurrentUser _currentUser; + private readonly CmsKitTestData _cmsKitTestData; + + public TagPublicAppService_Tests() + { + _tagAppService = GetRequiredService(); + _cmsKitTestData = GetRequiredService(); + } + + protected override void AfterAddApplication(IServiceCollection services) + { + _currentUser = Substitute.For(); + services.AddSingleton(_currentUser); + } + + [Fact] + public async Task GetAllRelatedTagsAsync() + { + var list = await _tagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput + { + EntityType = _cmsKitTestData.Content_1_EntityType, + EntityId = _cmsKitTestData.EntityId1 + }); + + list.ShouldNotBeEmpty(); + list.Count.ShouldBe(2); + } + + [Fact] + public async Task ShouldntGet_GetAllRelatedTagsAsync() + { + var list = await _tagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput + { + EntityType = "any_other_type", + EntityId = "1" + }); + + list.ShouldBeEmpty(); + } + + [Fact] + public async Task GetRelatedTagsAsync_ShouldThrowValidationException_WithoutEntityType() + { + await Assert.ThrowsAsync(async () => + await _tagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput + { + EntityType = null, + EntityId = _cmsKitTestData.EntityId1 + })); + } + + [Fact] + public async Task GetRelatedTagsAsync_ShouldThrowValidationException_WithoutEntityId() + { + await Assert.ThrowsAsync(async () => + await _tagAppService.GetAllRelatedTagsAsync(new GetRelatedTagsInput + { + EntityType = null, + EntityId = _cmsKitTestData.EntityId1 + })); + } + } +} diff --git a/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Features/GlobalCmsKitFeatures_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Features/GlobalCmsKitFeatures_Tests.cs new file mode 100644 index 0000000000..97e53daeb8 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Features/GlobalCmsKitFeatures_Tests.cs @@ -0,0 +1,30 @@ +using Shouldly; +using Volo.Abp.GlobalFeatures; +using Volo.CmsKit.GlobalFeatures; +using Xunit; + +namespace Volo.CmsKit.Features +{ + public class GlobalCmsKitFeatures_Tests : CmsKitDomainTestBase + { + private readonly GlobalCmsKitFeatures _cmsKitFeatures; + + public GlobalCmsKitFeatures_Tests() + { + _cmsKitFeatures = new GlobalCmsKitFeatures(GlobalFeatureManager.Instance); + } + + [Fact] + public void Page_Feature_Should_Enable_Dependent_Features() + { + _cmsKitFeatures.DisableAll(); + _cmsKitFeatures.Contents.IsEnabled.ShouldBeFalse(); + _cmsKitFeatures.Pages.IsEnabled.ShouldBeFalse(); + + _cmsKitFeatures.Pages.Enable(); + + _cmsKitFeatures.Contents.IsEnabled.ShouldBeTrue(); + _cmsKitFeatures.Pages.IsEnabled.ShouldBeTrue(); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs new file mode 100644 index 0000000000..aa31b015cc --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Tags/TagManager_Tests.cs @@ -0,0 +1,104 @@ +using System; +using System.Threading.Tasks; +using Shouldly; +using Xunit; + +namespace Volo.CmsKit.Tags +{ + public class TagManager_Tests : CmsKitDomainTestBase + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly TagManager _tagManager; + + private readonly ITagRepository _tagRepository; + + public TagManager_Tests() + { + _cmsKitTestData = GetRequiredService(); + _tagManager = GetRequiredService(); + _tagRepository = GetRequiredService(); + } + + [Fact] + public async Task ShouldAddWhenGettingAsync() + { + var newTagEntityType = "testEntity"; + var newTagName = "test_tag_2123"; + + var doesExist = await _tagRepository.AnyAsync(newTagEntityType, newTagName); + + doesExist.ShouldBeFalse(); + + var newTag = await _tagManager.GetOrAddAsync(newTagEntityType, newTagName); + + newTag.ShouldNotBeNull(); + + var doesExistAgain = await _tagRepository.AnyAsync(newTagEntityType, newTagName); + + doesExistAgain.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotAddWhenGettingAsync() + { + var tagName = _cmsKitTestData.Content_1_Tags[0]; + + var tag = await _tagRepository.GetAsync(_cmsKitTestData.Content_1_EntityType, tagName); + + var newTag = await _tagManager.GetOrAddAsync(_cmsKitTestData.Content_1_EntityType, tag.Name); + + newTag.ShouldNotBeNull(); + + newTag.Id.ShouldBe(tag.Id); + } + + [Fact] + public async Task ShouldInsert() + { + var tag = await _tagManager.InsertAsync(Guid.NewGuid(), "test", "test"); + + tag.ShouldNotBeNull(); + + var doesExist = await _tagRepository.AnyAsync("test", "test"); + + doesExist.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotInsert() + { + var type = _cmsKitTestData.Content_1_EntityType; + var name = _cmsKitTestData.Content_1_Tags[0]; + + Should.Throw(async () => await _tagManager.InsertAsync(Guid.NewGuid(), type, name)); + } + + [Fact] + public async Task ShouldUpdate() + { + var type = _cmsKitTestData.Content_1_EntityType; + var name = _cmsKitTestData.Content_1_Tags[0]; + var newName = name + "-updated"; + + var tag = await _tagRepository.GetAsync(type, name); + + await _tagManager.UpdateAsync(tag.Id, newName); + + var updatedTag = await _tagRepository.GetAsync(type, newName); + + updatedTag.Id.ShouldBe(tag.Id); + } + + [Fact] + public async Task ShouldNotUpdate() + { + var type = _cmsKitTestData.Content_1_EntityType; + var name = _cmsKitTestData.Content_1_Tags[0]; + var newName = _cmsKitTestData.Content_1_Tags[1]; + + var tag = await _tagRepository.GetAsync(type, name); + + Should.Throw(async () => await _tagManager.UpdateAsync(tag.Id, newName)); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs new file mode 100644 index 0000000000..72f0b47485 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Contents/ContentRepository_Test.cs @@ -0,0 +1,9 @@ +using Volo.CmsKit.Contents; + +namespace Volo.CmsKit.EntityFrameworkCore.Contents +{ + public class ContentRepository_Test : ContentRepository_Tests + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Pages/PageRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Pages/PageRepository_Test.cs new file mode 100644 index 0000000000..d78d10911c --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Pages/PageRepository_Test.cs @@ -0,0 +1,9 @@ +using Volo.CmsKit.Pages; + +namespace Volo.CmsKit.EntityFrameworkCore.Pages +{ + public class PageRepository_Test : PageRepository_Test + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs new file mode 100644 index 0000000000..205379e2b3 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.EntityFrameworkCore.Tests/EntityFrameworkCore/Tags/TagRepository_Test.cs @@ -0,0 +1,9 @@ +using Volo.CmsKit.Tags; + +namespace Volo.CmsKit.EntityFrameworkCore.Tags +{ + public class TagRepository_Test : TagRepository_Test + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs new file mode 100644 index 0000000000..bb467a4844 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Contents/ContentRepository_Test.cs @@ -0,0 +1,11 @@ +using Volo.CmsKit.Contents; +using Xunit; + +namespace Volo.CmsKit.MongoDB.Contents +{ + [Collection(MongoTestCollection.Name)] + public class ContentRepository_Test : ContentRepository_Tests + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Pages/PageRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Pages/PageRepository_Test.cs new file mode 100644 index 0000000000..1a379f4e95 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Pages/PageRepository_Test.cs @@ -0,0 +1,11 @@ +using Volo.CmsKit.Pages; +using Xunit; + +namespace Volo.CmsKit.MongoDB.Pages +{ + [Collection(MongoTestCollection.Name)] + public class PageRepository_Test : PageRepository_Test + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs new file mode 100644 index 0000000000..1c2f063989 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/Tags/TagRepository_Test.cs @@ -0,0 +1,11 @@ +using Volo.CmsKit.Tags; +using Xunit; + +namespace Volo.CmsKit.MongoDB.Tags +{ + [Collection(MongoTestCollection.Name)] + public class TagRepository_Test : TagRepository_Test + { + + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs index 2237ecc064..b0f820a4f2 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitDataSeedContributor.cs @@ -1,12 +1,16 @@ -using System.Threading.Tasks; +using System.Linq; +using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.MultiTenancy; using Volo.Abp.Users; using Volo.CmsKit.Comments; +using Volo.CmsKit.Contents; +using Volo.CmsKit.Pages; using Volo.CmsKit.Ratings; using Volo.CmsKit.Reactions; +using Volo.CmsKit.Tags; using Volo.CmsKit.Users; namespace Volo.CmsKit @@ -20,7 +24,10 @@ namespace Volo.CmsKit private readonly ReactionManager _reactionManager; private readonly IRatingRepository _ratingRepository; private readonly ICurrentTenant _currentTenant; - + private readonly IContentRepository _contentRepository; + private readonly IEntityTagRepository _entityTagRepository; + private readonly ITagManager _tagManager; + private readonly IPageRepository _pageRepository; public CmsKitDataSeedContributor( IGuidGenerator guidGenerator, ICmsUserRepository cmsUserRepository, @@ -28,7 +35,11 @@ namespace Volo.CmsKit ICommentRepository commentRepository, ReactionManager reactionManager, IRatingRepository ratingRepository, - ICurrentTenant currentTenant) + ICurrentTenant currentTenant, + IContentRepository contentRepository, + ITagManager tagManager, + IEntityTagRepository entityTagRepository, + IPageRepository pageRepository) { _guidGenerator = guidGenerator; _cmsUserRepository = cmsUserRepository; @@ -37,6 +48,10 @@ namespace Volo.CmsKit _reactionManager = reactionManager; _ratingRepository = ratingRepository; _currentTenant = currentTenant; + _contentRepository = contentRepository; + _tagManager = tagManager; + _entityTagRepository = entityTagRepository; + _pageRepository = pageRepository; } public async Task SeedAsync(DataSeedContext context) @@ -50,6 +65,12 @@ namespace Volo.CmsKit await SeedReactionsAsync(); await SeedRatingsAsync(); + + await SeedContentsAsync(); + + await SeedTagsAsync(); + + await SeedPagesAsync(); } } @@ -177,5 +198,57 @@ namespace Volo.CmsKit _cmsKitTestData.User2Id )); } + + private async Task SeedContentsAsync() + { + var content1 = new Content( + _guidGenerator.Create(), + _cmsKitTestData.Content_1_EntityType, + _cmsKitTestData.Content_1_Id, + _cmsKitTestData.Content_1 + ); + + var content2 = new Content( + _guidGenerator.Create(), + _cmsKitTestData.Content_2_EntityType, + _cmsKitTestData.Content_2_Id, + _cmsKitTestData.Content_2 + ); + + await _contentRepository.InsertAsync(content1); + await _contentRepository.InsertAsync(content2); + } + + private async Task SeedTagsAsync() + { + foreach (var tag in _cmsKitTestData.Content_1_Tags) + { + var tagEntity = await _tagManager.InsertAsync(_guidGenerator.Create(), _cmsKitTestData.Content_1_EntityType, tag); + + await _entityTagRepository.InsertAsync(new EntityTag(tagEntity.Id, _cmsKitTestData.Content_1_Id)); + } + + foreach (var tag in _cmsKitTestData.Content_2_Tags) + { + var tagEntity = await _tagManager.InsertAsync(_guidGenerator.Create(), _cmsKitTestData.Content_2_EntityType, tag); + + await _entityTagRepository.InsertAsync(new EntityTag(tagEntity.Id, _cmsKitTestData.Content_2_Id)); + } + } + + private async Task SeedPagesAsync() + { + var page1 = new Page(_cmsKitTestData.Page_1_Id, _cmsKitTestData.Page_1_Title, _cmsKitTestData.Page_1_Url, _cmsKitTestData.Page_1_Description); + var page1Content = new Content(_guidGenerator.Create(), nameof(Page), page1.Id.ToString(), _cmsKitTestData.Page_1_Content); + + await _pageRepository.InsertAsync(page1); + await _contentRepository.InsertAsync(page1Content); + + var page2 = new Page(_cmsKitTestData.Page_2_Id, _cmsKitTestData.Page_2_Title, _cmsKitTestData.Page_2_Url, _cmsKitTestData.Page_2_Description); + var page2Content = new Content(_guidGenerator.Create(), nameof(Page), page2.Id.ToString(), _cmsKitTestData.Page_2_Content); + + await _pageRepository.InsertAsync(page2); + await _contentRepository.InsertAsync(page2Content); + } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs index 4e1472a3d8..11aa185ddd 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/CmsKitTestData.cs @@ -1,4 +1,5 @@ using System; +using JetBrains.Annotations; using Volo.Abp.DependencyInjection; namespace Volo.CmsKit @@ -18,5 +19,41 @@ namespace Volo.CmsKit public string EntityId1 { get; } = "1"; public string EntityId2 { get; } = "2"; + + public string Content_1_EntityType { get; } = "Lyrics"; + + public string Content_1 { get; } = "First things first\nI'ma say all the words inside my head\nI'm fired up and tired of the way that things have been, oh-ooh\nThe way that things have been, oh-ooh"; + + public string Content_1_Id { get; } = "1"; + + public string[] Content_1_Tags => new string[] {"Imagine Dragons", "Music"}; + + public string Content_2_EntityType { get; } = "LyricsAlso"; + + public string Content_2 { get; } = "Second thing second\nDon't you tell me what you think that I could be\nI'm the one at the sail, I'm the master of my sea, oh-ooh\nThe master of my sea, oh-ooh"; + + public string Content_2_Id { get; } = "2"; + + public string[] Content_2_Tags => new string[] {"Imagine Dragons", "Music", "Most Loved Part"}; + + public string Page_1_Title { get; } = "Imagine Dragons - Believer Lyrics"; + + public string Page_1_Url { get; } = "imagine-dragons-believer-lyrics"; + + public string Page_1_Description { get; } = "You can get the lyrics of the music."; + + public Guid Page_1_Id { get; } = Guid.NewGuid(); + + public string Page_1_Content => Content_1; + + public string Page_2_Title { get; } = "Imagine Dragons - Believer Lyrics (Page 2)"; + + public string Page_2_Url { get; } = "imagine-dragons-believer-lyrics-2"; + + public string Page_2_Description { get; } = "You can get the lyrics of the music."; + + public Guid Page_2_Id { get; } = Guid.NewGuid(); + + public string Page_2_Content => Content_2; } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs new file mode 100644 index 0000000000..c92383694e --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Contents/ContentRepository_Tests.cs @@ -0,0 +1,63 @@ +using System; +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Xunit; + +namespace Volo.CmsKit.Contents +{ + public abstract class ContentRepository_Tests : CmsKitTestBase + where TStartupModule : IAbpModule + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly IContentRepository _contentRepository; + + protected ContentRepository_Tests() + { + _cmsKitTestData = GetRequiredService(); + _contentRepository = GetRequiredService(); + } + + [Theory] + [InlineData("Lyrics", "1", "First things first")] + [InlineData("LyricsAlso", "2", "Second thing second")] + public async Task ShouldGetAsync(string entityType, string entityId, string contentStartsWith = null) + { + var content = await _contentRepository.GetAsync(entityType, entityId); + + content.ShouldNotBeNull(); + + if (contentStartsWith != null) + { + content.Value.ShouldStartWith(contentStartsWith); + } + } + + [Fact] + public async Task ShouldNotGetAsync() + { + Should.Throw( + async () + => + await _contentRepository.GetAsync("not_exist_entity", Guid.NewGuid().ToString())); + } + + [Fact] + public async Task ShouldFindAsync() + { + var content = + await _contentRepository.FindAsync(_cmsKitTestData.Content_1_EntityType, _cmsKitTestData.Content_1_Id); + + content.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldNotFindAsync() + { + var content = await _contentRepository.FindAsync("not_exist_entity", Guid.NewGuid().ToString()); + + content.ShouldBeNull(); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs new file mode 100644 index 0000000000..68b91f72a9 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Pages/PageRepository_Test.cs @@ -0,0 +1,62 @@ +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Modularity; +using Xunit; + +namespace Volo.CmsKit.Pages +{ + public abstract class PageRepository_Test : CmsKitTestBase + where TStartupModule : IAbpModule + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly IPageRepository _pageRepository; + + protected PageRepository_Test() + { + _cmsKitTestData = GetRequiredService(); + _pageRepository = GetRequiredService(); + } + + [Fact] + public async Task ShouldGetByUrlAsync() + { + var page = await _pageRepository.GetByUrlAsync(_cmsKitTestData.Page_1_Url); + + page.ShouldNotBeNull(); + page.Description.ShouldBe(_cmsKitTestData.Page_1_Description); + } + + [Fact] + public async Task ShouldFindByUrlAsync() + { + var page = await _pageRepository.FindByUrlAsync(_cmsKitTestData.Page_1_Url); + + page.ShouldNotBeNull(); + page.Description.ShouldBe(_cmsKitTestData.Page_1_Description); + } + + [Fact] + public async Task ShouldNotFindByUrlAsync() + { + var page = await _pageRepository.FindByUrlAsync("not-exist-lyrics"); + + page.ShouldBeNull(); + } + + [Fact] + public async Task ShouldBeExistAsync() + { + var page = await _pageRepository.DoesExistAsync(_cmsKitTestData.Page_1_Url); + + page.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotBeExistAsync() + { + var page = await _pageRepository.DoesExistAsync("not-exist-lyrics"); + + page.ShouldBeFalse(); + } + } +} \ No newline at end of file diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs new file mode 100644 index 0000000000..18cc12df68 --- /dev/null +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs @@ -0,0 +1,116 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Modularity; +using Xunit; + +namespace Volo.CmsKit.Tags +{ + public abstract class TagRepository_Test : CmsKitTestBase + where TStartupModule : IAbpModule + { + private readonly CmsKitTestData _cmsKitTestData; + private readonly ITagRepository _tagRepository; + + protected TagRepository_Test() + { + _cmsKitTestData = GetRequiredService(); + _tagRepository = GetRequiredService(); + } + + [Theory] + [InlineData("Lyrics", "Imagine Dragons")] + [InlineData("Lyrics", "Music")] + [InlineData("LyricsAlso", "Imagine Dragons")] + [InlineData("LyricsAlso", "Music")] + [InlineData("LyricsAlso", "Most Loved Part")] + public async Task ShouldGetAsync(string entityType, string name) + { + var tag = await _tagRepository.GetAsync(entityType, name); + + tag.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldNotGetAsync() + { + Should.Throw( + async () => await _tagRepository.GetAsync("not_exist_entity", Guid.NewGuid().ToString()) + ); + } + + [Theory] + [InlineData("Lyrics", "Imagine Dragons")] + [InlineData("Lyrics", "Music")] + [InlineData("LyricsAlso", "Imagine Dragons")] + [InlineData("LyricsAlso", "Music")] + [InlineData("LyricsAlso", "Most Loved Part")] + public async Task ShouldExistAsync(string entityType, string name) + { + var tag = await _tagRepository.AnyAsync(entityType, name); + + tag.ShouldBeTrue(); + } + + [Fact] + public async Task ShouldNotExistAsync() + { + var tag = await _tagRepository.AnyAsync("not_exist_entity", Guid.NewGuid().ToString()); + + tag.ShouldBeFalse(); + } + + [Theory] + [InlineData("Lyrics", "Imagine Dragons")] + [InlineData("Lyrics", "Music")] + [InlineData("LyricsAlso", "Imagine Dragons")] + [InlineData("LyricsAlso", "Music")] + [InlineData("LyricsAlso", "Most Loved Part")] + public async Task ShouldFindAsync(string entityType, string name) + { + var tag = await _tagRepository.FindAsync(entityType, name); + + tag.ShouldNotBeNull(); + } + + [Fact] + public async Task ShouldNotFindAsync() + { + var tag = await _tagRepository.FindAsync("not_exist_entity", Guid.NewGuid().ToString()); + + tag.ShouldBeNull(); + } + + [Fact] + public async Task Should_Get_Related_Tags() + { + var content_1_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_1_EntityType, _cmsKitTestData.EntityId1); + + content_1_tags.Count.ShouldBe(_cmsKitTestData.Content_1_Tags.Length); + + foreach (var tag in content_1_tags) + { + _cmsKitTestData.Content_1_Tags.Contains(tag.Name).ShouldBeTrue(); + } + + var content_2_tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.Content_2_EntityType, _cmsKitTestData.EntityId2); + + content_2_tags.Count.ShouldBe(_cmsKitTestData.Content_2_Tags.Length); + + foreach (var tag in content_2_tags) + { + _cmsKitTestData.Content_2_Tags.Contains(tag.Name).ShouldBeTrue(); + } + } + + [Fact] + public async Task Should_Not_Get_Related_Tags() + { + var tags = await _tagRepository.GetAllRelatedTagsAsync("not_exist_entity", Guid.NewGuid().ToString()); + + tags.Count.ShouldBe(0); + } + } +} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Migrator/appsettings.json b/modules/docs/app/VoloDocs.Migrator/appsettings.json index c9934c1e75..8ba3526f59 100644 --- a/modules/docs/app/VoloDocs.Migrator/appsettings.json +++ b/modules/docs/app/VoloDocs.Migrator/appsettings.json @@ -1,3 +1,3 @@ { - "ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true" + "ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True" } \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/en-GB.json b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/en-GB.json new file mode 100644 index 0000000000..231ddbfb0e --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/en-GB.json @@ -0,0 +1,10 @@ +{ + "culture": "en-GB", + "texts": { + "DocsTitle": "VoloDocs", + "WelcomeVoloDocs": "Welcome to the VoloDocs!", + "NoProjectWarning": "There`s no defined project yet!", + "CreateYourFirstProject": "Click here to start your first project", + "NoProject": "No project!" + } +} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/appsettings.json b/modules/docs/app/VoloDocs.Web/appsettings.json index 8eea6b57cd..b1fb4d82bc 100644 --- a/modules/docs/app/VoloDocs.Web/appsettings.json +++ b/modules/docs/app/VoloDocs.Web/appsettings.json @@ -1,5 +1,5 @@ { - "ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true", + "ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True", "LogoUrl": "/assets/images/Logo.png", "ElasticSearch": { "Url": "http://localhost:9200" diff --git a/modules/docs/docker-compose.migrate.yml b/modules/docs/docker-compose.migrate.yml index e88580debd..70142e4ce5 100644 --- a/modules/docs/docker-compose.migrate.yml +++ b/modules/docs/docker-compose.migrate.yml @@ -7,6 +7,6 @@ services: context: ../../ dockerfile: modules/docs/app/VoloDocs.Migrator/Dockerfile environment: - - ConnectionString=Server=sqlserver;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionString=Server=sqlserver;Database=VoloDocs;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false depends_on: - sqlserver diff --git a/modules/docs/docker-compose.override.yml b/modules/docs/docker-compose.override.yml index 6a8568ce6e..33508c10fe 100644 --- a/modules/docs/docker-compose.override.yml +++ b/modules/docs/docker-compose.override.yml @@ -10,7 +10,7 @@ services: volo-docs: environment: - - ConnectionString=Server=sqlserver;Database=VoloDocs;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionString=Server=sqlserver;Database=VoloDocs;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false - Title=VoloDocs - LogoUrl=/assets/images/Logo.png ports: diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en-GB.json b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en-GB.json new file mode 100644 index 0000000000..1e3339963a --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/en-GB.json @@ -0,0 +1,59 @@ +{ + "culture": "en-GB", + "texts": { + "Permission:DocumentManagement": "Document Management", + "Permission:Projects": "Projects", + "Permission:Edit": "Edit", + "Permission:Delete": "Delete", + "Permission:Create": "Create", + "Permission:Documents": "Documents", + "Menu:Documents": "Documents", + "Menu:DocumentManagement": "Documents", + "Menu:ProjectManagement": "Projects", + "CreateANewProject": "Create new project", + "Edit": "Edit", + "Create": "Create", + "Pull": "Pull", + "Projects": "Projects", + "Name": "Name", + "ShortName": "ShortName", + "DocumentStoreType": "DocumentStoreType", + "Format": "Format", + "ShortNameInfoText": "Will be used for unique URL.", + "DisplayName:Name": "Name", + "DisplayName:ShortName": "Short name", + "DisplayName:Format": "Format", + "DisplayName:DefaultDocumentName": "Default document name", + "DisplayName:NavigationDocumentName": "Navigation document name", + "DisplayName:MinimumVersion": "Minimum version", + "DisplayName:MainWebsiteUrl": "Main web site URL", + "DisplayName:LatestVersionBranchName": "Latest version branch name", + "DisplayName:GitHubRootUrl": "GitHub root URL", + "DisplayName:GitHubAccessToken": "GitHub access token", + "DisplayName:GitHubUserAgent": "GitHub user agent", + "DisplayName:GithubVersionProviderSource": "GitHub version provider source", + "DisplayName:VersionBranchPrefix": "Version branch prefix", + "DisplayName:All": "Pull all", + "DisplayName:LanguageCode": "Language code", + "DisplayName:Version": "Version", + "Documents": "Documents", + "RemoveFromCache": "Remove from cache", + "Reindex": "Reindex", + "ReindexCompleted": "Reindex completed", + "RemovedFromCache": "Removed from cache", + "RemoveFromCacheConfirmation": "Are you sure you want to remove this item from cache?", + "ReIndexDocumentConfirmation": "Are you sure you want to reindex this item?", + "DeleteFromDatabase": "Delete from database", + "Deleted": "Deleted", + "Search": "Search", + "StartDate": "Start date", + "EndDate": "End date", + "CreationTime": "Creation time", + "LastUpdateTime": "Last update", + "LastSignificantUpdateTime": "Last significant update", + "Version": "Version", + "LanguageCode": "Language code", + "FileName": "File name", + "LastCachedTime": "Cache time" + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json new file mode 100644 index 0000000000..02026775d7 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json @@ -0,0 +1,39 @@ +{ + "culture": "en-GB", + "texts": { + "Documents": "Documents", + "BackToWebsite": "Back to website", + "Contributors": "Contributors", + "ShareOn": "Share on", + "Version": "Version", + "Edit": "Edit", + "LastEditTime": "Last edit", + "Delete": "Delete", + "ClearCache": "Clear cache", + "ClearCacheConfirmationMessage": "Are you sure you want to clear all caches for project \"{0}\"", + "ReIndexAllProjects": "ReIndex all projects", + "ReIndexProject": "ReIndex Project", + "ReIndexProjectConfirmationMessage": "Are you sure you want to reindex project \"{0}\"", + "SuccessfullyReIndexProject": "Successfully reindexed project \"{0}\"", + "ReIndexAllProjectConfirmationMessage": "Are you sure you want to reindex all projects?", + "SuccessfullyReIndexAllProject": "Successfully reindexed all projects", + "InThisDocument": "In this document", + "GoToTop": "Go to top", + "Projects": "Project(s)", + "NoProjectWarning": "There are no Projects yet!", + "DocumentNotFound": "Oops, the requested document was not found!", + "ProjectNotFound": "Oops, the requested project was not found!", + "NavigationDocumentNotFound": "This version does not have a navigation document!", + "DocumentNotFoundInSelectedLanguage": "Document in the language you wanted was not found. Document in the default language is shown.", + "FilterTopics": "Filter topics", + "FullSearch": "Search in documents", + "Volo.Docs.Domain:010001": "Elastic search is not enabled.", + "MultipleVersionDocumentInfo": "This document has multiple versions. Select the options that best fit you.", + "New": "New", + "Upd": "Upd", + "NewExplanation": "Created in the last two weeks.", + "UpdatedExplanation": "Updated in the last two weeks.", + "Volo.Docs.Domain:010002": "ShortName {ShortName} already exists.", + "Preview": "preview" + } +} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Documents/EFCoreDocumentRepository.cs b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Documents/EFCoreDocumentRepository.cs index f096bc10d9..75420f5500 100644 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Documents/EFCoreDocumentRepository.cs +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Documents/EFCoreDocumentRepository.cs @@ -21,7 +21,7 @@ namespace Volo.Docs.Documents public async Task> GetListByProjectId(Guid projectId, CancellationToken cancellationToken = default) { - return await DbSet.Where(d => d.ProjectId == projectId).ToListAsync(cancellationToken: cancellationToken); + return await (await GetDbSetAsync()).Where(d => d.ProjectId == projectId).ToListAsync(cancellationToken: cancellationToken); } public async Task> GetAllAsync( @@ -45,7 +45,7 @@ namespace Volo.Docs.Documents CancellationToken cancellationToken = default) { var query = ApplyFilterForGetAll( - DbSet, + await GetDbSetAsync(), projectId: projectId, name: name, version: version, @@ -87,7 +87,7 @@ namespace Volo.Docs.Documents CancellationToken cancellationToken = default) { var query = ApplyFilterForGetAll( - DbSet, + await GetDbSetAsync(), projectId: projectId, name: name, version: version, @@ -111,7 +111,7 @@ namespace Volo.Docs.Documents bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet.IncludeDetails(includeDetails) + return await (await GetDbSetAsync()).IncludeDetails(includeDetails) .FirstOrDefaultAsync(x => x.ProjectId == projectId && x.Name == name && x.LanguageCode == languageCode && x.Version == version, @@ -127,7 +127,7 @@ namespace Volo.Docs.Documents public async Task GetAsync(Guid id, CancellationToken cancellationToken = default) { - return await DbSet.Where(x => x.Id == id).SingleAsync(cancellationToken: cancellationToken); + return await (await GetDbSetAsync()).Where(x => x.Id == id).SingleAsync(cancellationToken: cancellationToken); } protected virtual IQueryable ApplyFilterForGetAll( @@ -148,7 +148,7 @@ namespace Volo.Docs.Documents DateTime? lastCachedTimeMax, CancellationToken cancellationToken = default) { - return DbSet + return query .WhereIf(projectId.HasValue, d => d.ProjectId == projectId.Value) .WhereIf(name != null, @@ -179,4 +179,4 @@ namespace Volo.Docs.Documents d => d.LastCachedTime.Date <= lastCachedTimeMax.Value.Date); } } -} \ No newline at end of file +} diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Projects/EfCoreProjectRepository.cs b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Projects/EfCoreProjectRepository.cs index 835172e679..bf92a8a795 100644 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Projects/EfCoreProjectRepository.cs +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/Projects/EfCoreProjectRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Docs.Projects public async Task> GetListAsync(string sorting, int maxResultCount, int skipCount) { - var projects = await DbSet.OrderBy(sorting ?? "Id desc") + var projects = await (await GetDbSetAsync()).OrderBy(sorting ?? "Id desc") .PageBy(skipCount, maxResultCount) .ToListAsync(); @@ -30,8 +30,8 @@ namespace Volo.Docs.Projects public async Task GetByShortNameAsync(string shortName) { var normalizeShortName = NormalizeShortName(shortName); - - var project = await DbSet.FirstOrDefaultAsync(p => p.ShortName == normalizeShortName); + + var project = await (await GetDbSetAsync()).FirstOrDefaultAsync(p => p.ShortName == normalizeShortName); if (project == null) { @@ -44,13 +44,13 @@ namespace Volo.Docs.Projects public async Task ShortNameExistsAsync(string shortName) { var normalizeShortName = NormalizeShortName(shortName); - - return await DbSet.AnyAsync(x => x.ShortName == normalizeShortName); + + return await (await GetDbSetAsync()).AnyAsync(x => x.ShortName == normalizeShortName); } - + private string NormalizeShortName(string shortName) { return shortName.ToLower(); } } -} \ No newline at end of file +} diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Documents/MongoDocumentRepository.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Documents/MongoDocumentRepository.cs index b3b5210986..d4b0a1c00e 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Documents/MongoDocumentRepository.cs +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Documents/MongoDocumentRepository.cs @@ -22,17 +22,17 @@ namespace Volo.Docs.Documents public async Task> GetListByProjectId(Guid projectId, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(d => d.ProjectId == projectId).ToListAsync(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)).Where(d => d.ProjectId == projectId).ToListAsync(cancellationToken); } public async Task FindAsync(Guid projectId, string name, string languageCode, string version, bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().FirstOrDefaultAsync(x => x.ProjectId == projectId && - x.Name == name && - x.LanguageCode == languageCode && - x.Version == version, cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)).FirstOrDefaultAsync(x => x.ProjectId == projectId && + x.Name == name && + x.LanguageCode == languageCode && + x.Version == version, cancellationToken); } public async Task DeleteAsync(Guid projectId, string name, string languageCode, string version, @@ -66,7 +66,7 @@ namespace Volo.Docs.Documents return await ApplyFilterForGetAll( - GetMongoQueryable(), + await GetMongoQueryableAsync(cancellationToken), projectId: projectId, name: name, version: version, @@ -110,7 +110,7 @@ namespace Volo.Docs.Documents return await ApplyFilterForGetAll( - GetMongoQueryable(), + await GetMongoQueryableAsync(cancellationToken), projectId: projectId, name: name, version: version, @@ -132,7 +132,7 @@ namespace Volo.Docs.Documents public async Task GetAsync(Guid id, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(x => x.Id == id).SingleAsync(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)).Where(x => x.Id == id).SingleAsync(cancellationToken); } protected virtual IMongoQueryable ApplyFilterForGetAll( @@ -221,4 +221,4 @@ namespace Volo.Docs.Documents return query; } } -} \ No newline at end of file +} diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Projects/MongoProjectRepository.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Projects/MongoProjectRepository.cs index f1312b9e5d..91f1af9b2a 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Projects/MongoProjectRepository.cs +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/Projects/MongoProjectRepository.cs @@ -21,7 +21,7 @@ namespace Volo.Docs.Projects public async Task> GetListAsync(string sorting, int maxResultCount, int skipCount) { - var projects = await GetMongoQueryable().OrderBy(sorting ?? "Id desc").As>() + var projects = await (await GetMongoQueryableAsync()).OrderBy(sorting ?? "Id desc").As>() .PageBy>(skipCount, maxResultCount) .ToListAsync(); @@ -31,8 +31,8 @@ namespace Volo.Docs.Projects public async Task GetByShortNameAsync(string shortName) { var normalizeShortName = NormalizeShortName(shortName); - - var project = await GetMongoQueryable().FirstOrDefaultAsync(p => p.ShortName == normalizeShortName); + + var project = await (await GetMongoQueryableAsync()).FirstOrDefaultAsync(p => p.ShortName == normalizeShortName); if (project == null) { @@ -45,13 +45,13 @@ namespace Volo.Docs.Projects public async Task ShortNameExistsAsync(string shortName) { var normalizeShortName = NormalizeShortName(shortName); - - return await GetMongoQueryable().AnyAsync(x => x.ShortName == normalizeShortName); + + return await (await GetMongoQueryableAsync()).AnyAsync(x => x.ShortName == normalizeShortName); } - + private string NormalizeShortName(string shortName) { return shortName.ToLower(); } } -} \ No newline at end of file +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en-GB.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en-GB.json new file mode 100644 index 0000000000..09b4b306b7 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/en-GB.json @@ -0,0 +1,10 @@ +{ + "culture": "en-GB", + "texts": { + "Features": "Features", + "NoFeatureFoundMessage": "There isn't any available feature.", + "Permission:FeatureManagement": "Feature management", + "Permission:FeatureManagement.ManageHostFeatures": "Manage Host features", + "Volo.Abp.FeatureManagement:InvalidFeatureValue": "{0} feature value is not valid!" + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs index c559851bf1..be75e600d8 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore public virtual async Task FindAsync(string name, string providerName, string providerKey) { - return await DbSet + return await (await GetDbSetAsync()) .OrderBy(x => x.Id) .FirstOrDefaultAsync( s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey @@ -26,7 +26,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore public async Task> FindAllAsync(string name, string providerName, string providerKey) { - return await DbSet + return await (await GetDbSetAsync()) .Where( s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey ).ToListAsync(); @@ -34,7 +34,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore public virtual async Task> GetListAsync(string providerName, string providerKey) { - return await DbSet + return await (await GetDbSetAsync()) .Where( s => s.ProviderName == providerName && s.ProviderKey == providerKey ).ToListAsync(); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs index 2b96ca876a..21d4784f6e 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/MongoFeatureValueRepository.cs @@ -18,20 +18,20 @@ namespace Volo.Abp.FeatureManagement.MongoDB public virtual async Task FindAsync(string name, string providerName, string providerKey) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync()) .OrderBy(x => x.Id) .FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey); } public async Task> FindAllAsync(string name, string providerName, string providerKey) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync()) .Where(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey).ToListAsync(); } public virtual async Task> GetListAsync(string providerName, string providerKey) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync()) .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey) .ToListAsync(); } diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs index 31c9de0e18..69fae63d71 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs @@ -85,6 +85,7 @@ namespace Volo.Abp.Identity (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); await UpdateUserByInput(user, input); + (await UserManager.UpdateAsync(user)).CheckErrors(); await CurrentUnitOfWork.SaveChangesAsync(); @@ -174,6 +175,7 @@ namespace Volo.Abp.Identity user.Name = input.Name; user.Surname = input.Surname; + (await UserManager.UpdateAsync(user)).CheckErrors(); if (input.RoleNames != null) { diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json new file mode 100644 index 0000000000..ef9a64e982 --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en-GB.json @@ -0,0 +1,120 @@ +{ + "culture": "en-GB", + "texts": { + "Menu:IdentityManagement": "Identity management", + "Users": "Users", + "NewUser": "New user", + "UserName": "Username", + "EmailAddress": "Email address", + "PhoneNumber": "Phone number", + "UserInformations": "User information", + "DisplayName:IsDefault": "Default", + "DisplayName:IsStatic": "Static", + "DisplayName:IsPublic": "Public", + "Roles": "Roles", + "Password": "Password", + "PersonalInfo": "My Profile", + "PersonalSettings": "Personal settings", + "UserDeletionConfirmationMessage": "User '{0}' will be deleted. Please confirm?", + "RoleDeletionConfirmationMessage": "Role '{0}' will be deleted. Please confirm?", + "DisplayName:RoleName": "Role name", + "DisplayName:UserName": "Username", + "DisplayName:Name": "Name", + "DisplayName:Surname": "Surname", + "DisplayName:Password": "Password", + "DisplayName:Email": "Email Address", + "DisplayName:PhoneNumber": "Phone Number", + "DisplayName:TwoFactorEnabled": "Two factor verification", + "DisplayName:LockoutEnabled": "Lock account after failed login attempts", + "NewRole": "New role", + "RoleName": "Role name", + "CreationTime": "Creation time", + "Permissions": "Permissions", + "DisplayName:CurrentPassword": "Current password", + "DisplayName:NewPassword": "New password", + "DisplayName:NewPasswordConfirm": "Confirm new password", + "PasswordChangedMessage": "Your password has been changed successfully.", + "PersonalSettingsSavedMessage": "Your personal settings has been saved successfully.", + "Volo.Abp.Identity:DefaultError": "An unknown failure has occurred.", + "Volo.Abp.Identity:ConcurrencyFailure": "Optimistic concurrency failure, object has been modified.", + "Volo.Abp.Identity:DuplicateEmail": "Email '{0}' is already taken.", + "Volo.Abp.Identity:DuplicateRoleName": "Role name '{0}' has already been taken.", + "Volo.Abp.Identity:DuplicateUserName": "Username '{0}' has already been taken.", + "Volo.Abp.Identity:InvalidEmail": "Email '{0}' is invalid.", + "Volo.Abp.Identity:InvalidPasswordHasherCompatibilityMode": "The provided PasswordHasherCompatibilityMode is invalid.", + "Volo.Abp.Identity:InvalidPasswordHasherIterationCount": "The iteration count must be a positive integer.", + "Volo.Abp.Identity:InvalidRoleName": "Role name '{0}' is invalid.", + "Volo.Abp.Identity:InvalidToken": "Invalid token.", + "Volo.Abp.Identity:InvalidUserName": "Username '{0}' is invalid, it should only contain letters or digits.", + "Volo.Abp.Identity:LoginAlreadyAssociated": "A user with this login already exists.", + "Volo.Abp.Identity:PasswordMismatch": "Incorrect password.", + "Volo.Abp.Identity:PasswordRequiresDigit": "Passwords must have at least one digit ('0'-'9').", + "Volo.Abp.Identity:PasswordRequiresLower": "Passwords must have at least one lowercase ('a'-'z').", + "Volo.Abp.Identity:PasswordRequiresNonAlphanumeric": "Passwords must have at least one non alphanumeric character.", + "Volo.Abp.Identity:PasswordRequiresUpper": "Passwords must have at least one uppercase ('A'-'Z').", + "Volo.Abp.Identity:PasswordTooShort": "Passwords must be at least {0} characters.", + "Volo.Abp.Identity:RoleNotFound": "Role {0} does not exist.", + "Volo.Abp.Identity:UserAlreadyHasPassword": "User already has a password set.", + "Volo.Abp.Identity:UserAlreadyInRole": "User is already in role '{0}'.", + "Volo.Abp.Identity:UserLockedOut": "User is locked out.", + "Volo.Abp.Identity:UserLockoutNotEnabled": "Lockout is not enabled for this user.", + "Volo.Abp.Identity:UserNameNotFound": "User {0} does not exist.", + "Volo.Abp.Identity:UserNotInRole": "User is not in role '{0}'.", + "Volo.Abp.Identity:PasswordConfirmationFailed": "Password does not match the confirm password.", + "Volo.Abp.Identity:010001": "You cannot delete your own account!", + "Volo.Abp.Identity:010002": "You cannot set more than {MaxUserMembershipCount} organisation unit(s) for a user!", + "Volo.Abp.Identity:010003": "You cannot change the password of an externally logged in user!", + "Volo.Abp.Identity:010004": "There is already an organisation unit with name {0}. Two units with same name can not be created in same level.", + "Volo.Abp.Identity:010005": "Static roles cannot be renamed.", + "Volo.Abp.Identity:010006": "Static roles cannot be deleted.", + "Volo.Abp.Identity:010007": "You can't change your two factor setting.", + "Volo.Abp.Identity:010008": "Changing the two factor setting is not allowed.", + "Identity.OrganizationUnit.MaxUserMembershipCount": "Maximum allowed organisation unit membership count for a user", + "Permission:IdentityManagement": "Identity management", + "Permission:RoleManagement": "Role management", + "Permission:Create": "Create", + "Permission:Edit": "Edit", + "Permission:Delete": "Delete", + "Permission:ChangePermissions": "Change permissions", + "Permission:UserManagement": "User management", + "Permission:UserLookup": "User lookup", + "Feature:IdentityGroup": "Identity", + "Feature:TwoFactor": "Two factor behaviour", + "Feature:TwoFactorDescription": "Set two factor behaviour. Optional values: Optional, Disabled, Forced", + "Feature:TwoFactor.Optional": "Optional", + "Feature:TwoFactor.Disabled": "Disabled", + "Feature:TwoFactor.Forced": "forced", + "DisplayName:Abp.Identity.Password.RequiredLength": "Required length", + "DisplayName:Abp.Identity.Password.RequiredUniqueChars": "Required unique characters number", + "DisplayName:Abp.Identity.Password.RequireNonAlphanumeric": "Required non-alphanumeric character", + "DisplayName:Abp.Identity.Password.RequireLowercase": "Required lower case character", + "DisplayName:Abp.Identity.Password.RequireUppercase": "Required upper case character", + "DisplayName:Abp.Identity.Password.RequireDigit": "Required digit", + "DisplayName:Abp.Identity.Lockout.AllowedForNewUsers": "Enabled for new users", + "DisplayName:Abp.Identity.Lockout.LockoutDuration": "Lockout duration(in seconds)", + "DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts": "Max failed access attempts", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail": "Require confirmed email", + "DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "Allow users to confirm their phone number", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "Require confirmed phone number", + "DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled": "Allow users to change their usernames", + "DisplayName:Abp.Identity.User.IsEmailUpdateEnabled": "Allow users to change their email addresses", + "Description:Abp.Identity.Password.RequiredLength": "The minimum length a password must be.", + "Description:Abp.Identity.Password.RequiredUniqueChars": "The minimum number of unique characters which a password must contain.", + "Description:Abp.Identity.Password.RequireNonAlphanumeric": "If passwords must contain a non-alphanumeric character.", + "Description:Abp.Identity.Password.RequireLowercase": "If passwords must contain a lower case ASCII character.", + "Description:Abp.Identity.Password.RequireUppercase": "If passwords must contain a upper case ASCII character.", + "Description:Abp.Identity.Password.RequireDigit": "If passwords must contain a digit.", + "Description:Abp.Identity.Lockout.AllowedForNewUsers": "Whether a new user can be locked out.", + "Description:Abp.Identity.Lockout.LockoutDuration": "The duration a user is locked out for when a lockout occurs.", + "Description:Abp.Identity.Lockout.MaxFailedAccessAttempts": "The number of failed access attempts allowed before a user is locked out, assuming lock out is enabled.", + "Description:Abp.Identity.SignIn.RequireConfirmedEmail": "Whether a confirmed email address is required to sign in.", + "Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "Whether the phoneNumber can be confirmed by the user.", + "Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "Whether a confirmed telephone number is required to sign in.", + "Description:Abp.Identity.User.IsUserNameUpdateEnabled": "Whether the username can be updated by the user.", + "Description:Abp.Identity.User.IsEmailUpdateEnabled": "Whether the email can be updated by the user.", + "DisplayName:Abp.Identity.TwoFactorBehaviour": "Two Factor behaviour", + "Description:Abp.Identity.TwoFactorBehaviour": "Two Factor behaviour", + "DisplayName:Abp.Identity.UsersCanChange": "Allow users to change their Two Factor.", + "Description:Abp.Identity.UsersCanChange": "Allow users to change their Two Factor." + } +} \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs index 981a0f8fae..53411c1849 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs @@ -49,12 +49,13 @@ namespace Volo.Abp.Identity /// /// Initializes a new instance of the class. /// - /// Tenant's Id or null for host. + /// id /// Display name. /// Parent's Id or null if OU is a root. + /// Tenant's Id or null for host. public OrganizationUnit(Guid id, string displayName, Guid? parentId = null, Guid? tenantId = null) + : base(id) { - Id = id; TenantId = tenantId; DisplayName = displayName; ParentId = parentId; diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EFCoreIdentitySecurityLogRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EFCoreIdentitySecurityLogRepository.cs index ddccb3187f..91915cd9b8 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EFCoreIdentitySecurityLogRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EFCoreIdentitySecurityLogRepository.cs @@ -34,7 +34,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = GetListQuery( + cancellationToken = GetCancellationToken(cancellationToken); + + var query = await GetListQueryAsync( startTime, endTime, applicationName, @@ -43,12 +45,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore userId, userName, clientId, - correlationId + correlationId, + cancellationToken ); return await query.OrderBy(sorting ?? nameof(IdentitySecurityLog.CreationTime) + " desc") .PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } public async Task GetCountAsync( @@ -63,7 +66,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore string correlationId = null, CancellationToken cancellationToken = default) { - var query = GetListQuery( + cancellationToken = GetCancellationToken(cancellationToken); + + var query = await GetListQueryAsync( startTime, endTime, applicationName, @@ -72,18 +77,21 @@ namespace Volo.Abp.Identity.EntityFrameworkCore userId, userName, clientId, - correlationId + correlationId, + cancellationToken ); - return await query.LongCountAsync(GetCancellationToken(cancellationToken)); + return await query.LongCountAsync(cancellationToken); } public async Task GetByUserIdAsync(Guid id, Guid userId, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet.OrderBy(x => x.Id).FirstOrDefaultAsync(x => x.Id == id && x.UserId == userId, GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .OrderBy(x => x.Id) + .FirstOrDefaultAsync(x => x.Id == id && x.UserId == userId, GetCancellationToken(cancellationToken)); } - protected virtual IQueryable GetListQuery( + protected virtual async Task> GetListQueryAsync( DateTime? startTime = null, DateTime? endTime = null, string applicationName = null, @@ -92,9 +100,10 @@ namespace Volo.Abp.Identity.EntityFrameworkCore Guid? userId = null, string userName = null, string clientId = null, - string correlationId = null) + string correlationId = null, + CancellationToken cancellationToken = default) { - return DbSet.AsNoTracking() + return (await GetDbSetAsync()).AsNoTracking() .WhereIf(startTime.HasValue, securityLog => securityLog.CreationTime >= startTime.Value) .WhereIf(endTime.HasValue, securityLog => securityLog.CreationTime < endTime.Value.AddDays(1).Date) .WhereIf(!applicationName.IsNullOrWhiteSpace(), securityLog => securityLog.ApplicationName == applicationName) diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs index 0d0ff499c1..4cbdfb5725 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityClaimTypeRepository.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore Guid? ignoredId = null, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .WhereIf(ignoredId != null, ct => ct.Id != ignoredId) .CountAsync(ct => ct.Name == name, GetCancellationToken(cancellationToken)) > 0; } @@ -34,7 +34,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore string filter, CancellationToken cancellationToken = default) { - var identityClaimTypes = await DbSet + var identityClaimTypes = await (await GetDbSetAsync()) .WhereIf( !filter.IsNullOrWhiteSpace(), u => @@ -51,7 +51,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore string filter = null, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .WhereIf( !filter.IsNullOrWhiteSpace(), u => @@ -59,4 +59,4 @@ namespace Volo.Abp.Identity.EntityFrameworkCore ).LongCountAsync(GetCancellationToken(cancellationToken)); } } -} \ No newline at end of file +} diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityLinkUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityLinkUserRepository.cs index 39b62c8f46..6920d1081e 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityLinkUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityLinkUserRepository.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Linq.Dynamic.Core; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; @@ -20,7 +19,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore public async Task FindAsync(IdentityLinkUserInfo sourceLinkUserInfo, IdentityLinkUserInfo targetLinkUserInfo, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .OrderBy(x => x.Id).FirstOrDefaultAsync(x => x.SourceUserId == sourceLinkUserInfo.UserId && x.SourceTenantId == sourceLinkUserInfo.TenantId && x.TargetUserId == targetLinkUserInfo.UserId && x.TargetTenantId == targetLinkUserInfo.TenantId || @@ -31,7 +30,8 @@ namespace Volo.Abp.Identity.EntityFrameworkCore public async Task> GetListAsync(IdentityLinkUserInfo linkUserInfo, CancellationToken cancellationToken = default) { - return await DbSet.Where(x => + return await (await GetDbSetAsync()) + .Where(x => x.SourceUserId == linkUserInfo.UserId && x.SourceTenantId == linkUserInfo.TenantId || x.TargetUserId == linkUserInfo.UserId && x.TargetTenantId == linkUserInfo.TenantId) .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs index bb17d863aa..b1389afd6a 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityRoleRepository.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .OrderBy(x => x.Id) .FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken)); @@ -36,7 +36,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || @@ -50,7 +50,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore IEnumerable ids, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(t => ids.Contains(t.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -58,23 +58,32 @@ namespace Volo.Abp.Identity.EntityFrameworkCore public virtual async Task> GetDefaultOnesAsync( bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet.IncludeDetails(includeDetails).Where(r => r.IsDefault).ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) + .Where(r => r.IsDefault) + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.NormalizedName.Contains(filter)) .LongCountAsync(GetCancellationToken(cancellationToken)); } + [Obsolete("Use WithDetailsAsync")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } } } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs index f5d8fd2bb5..8fcce7c35a 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreIdentityUserRepository.cs @@ -6,7 +6,6 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Internal; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; @@ -24,7 +23,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .OrderBy(x => x.Id) .FirstOrDefaultAsync( @@ -37,20 +36,21 @@ namespace Volo.Abp.Identity.EntityFrameworkCore Guid id, CancellationToken cancellationToken = default) { - var query = from userRole in DbContext.Set() - join role in DbContext.Roles on userRole.RoleId equals role.Id + var dbContext = await GetDbContextAsync(); + var query = from userRole in dbContext.Set() + join role in dbContext.Roles on userRole.RoleId equals role.Id where userRole.UserId == id select role.Name; - var organizationUnitIds = DbContext.Set().Where(q => q.UserId == id).Select(q => q.OrganizationUnitId).ToArray(); + var organizationUnitIds = dbContext.Set().Where(q => q.UserId == id).Select(q => q.OrganizationUnitId).ToArray(); var organizationRoleIds = await ( - from ouRole in DbContext.Set() - join ou in DbContext.Set() on ouRole.OrganizationUnitId equals ou.Id + from ouRole in dbContext.Set() + join ou in dbContext.Set() on ouRole.OrganizationUnitId equals ou.Id where organizationUnitIds.Contains(ouRole.OrganizationUnitId) select ouRole.RoleId ).ToListAsync(GetCancellationToken(cancellationToken)); - var orgUnitRoleNameQuery = DbContext.Roles.Where(r => organizationRoleIds.Contains(r.Id)).Select(n => n.Name); + var orgUnitRoleNameQuery = dbContext.Roles.Where(r => organizationRoleIds.Contains(r.Id)).Select(n => n.Name); var resultQuery = query.Union(orgUnitRoleNameQuery); return await resultQuery.ToListAsync(GetCancellationToken(cancellationToken)); } @@ -59,10 +59,11 @@ namespace Volo.Abp.Identity.EntityFrameworkCore Guid id, CancellationToken cancellationToken = default) { - var query = from userOu in DbContext.Set() - join roleOu in DbContext.Set() on userOu.OrganizationUnitId equals roleOu.OrganizationUnitId - join ou in DbContext.Set() on roleOu.OrganizationUnitId equals ou.Id - join userOuRoles in DbContext.Roles on roleOu.RoleId equals userOuRoles.Id + var dbContext = await GetDbContextAsync(); + var query = from userOu in dbContext.Set() + join roleOu in dbContext.Set() on userOu.OrganizationUnitId equals roleOu.OrganizationUnitId + join ou in dbContext.Set() on roleOu.OrganizationUnitId equals ou.Id + join userOuRoles in dbContext.Roles on roleOu.RoleId equals userOuRoles.Id where userOu.UserId == id select userOuRoles.Name; @@ -77,7 +78,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .Where(u => u.Logins.Any(login => login.LoginProvider == loginProvider && login.ProviderKey == providerKey)) .OrderBy(x=>x.Id) @@ -89,7 +90,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .OrderBy(x => x.Id) .FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, GetCancellationToken(cancellationToken)); @@ -100,7 +101,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .Where(u => u.Claims.Any(c => c.ClaimType == claim.Type && c.ClaimValue == claim.Value)) .ToListAsync(GetCancellationToken(cancellationToken)); @@ -111,7 +112,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var role = await DbContext.Roles + var dbContext = await GetDbContextAsync(); + + var role = await dbContext.Roles .Where(x => x.NormalizedName == normalizedRoleName) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -121,7 +124,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore return new List(); } - return await DbSet + return await dbContext.Users .IncludeDetails(includeDetails) .Where(u => u.Roles.Any(r => r.RoleId == role.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); @@ -135,7 +138,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf( !filter.IsNullOrWhiteSpace(), @@ -156,24 +159,26 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from userRole in DbContext.Set() - join role in DbContext.Roles.IncludeDetails(includeDetails) on userRole.RoleId equals role.Id + var dbContext = await GetDbContextAsync(); + + var query = from userRole in dbContext.Set() + join role in dbContext.Roles.IncludeDetails(includeDetails) on userRole.RoleId equals role.Id where userRole.UserId == id select role; //TODO: Needs improvement - var userOrganizationsQuery = from userOrg in DbContext.Set() - join ou in DbContext.OrganizationUnits.IncludeDetails(includeDetails) on userOrg.OrganizationUnitId equals ou.Id + var userOrganizationsQuery = from userOrg in dbContext.Set() + join ou in dbContext.OrganizationUnits.IncludeDetails(includeDetails) on userOrg.OrganizationUnitId equals ou.Id where userOrg.UserId == id select ou; - var orgUserRoleQuery = DbContext.Set() + var orgUserRoleQuery = dbContext.Set() .Where(q => userOrganizationsQuery .Select(t => t.Id) .Contains(q.OrganizationUnitId)) .Select(t => t.RoleId); - var orgRoles = DbContext.Roles.Where(q => orgUserRoleQuery.Contains(q.Id)); + var orgRoles = dbContext.Roles.Where(q => orgUserRoleQuery.Contains(q.Id)); var resultQuery = query.Union(orgRoles); return await resultQuery.ToListAsync(GetCancellationToken(cancellationToken)); @@ -183,7 +188,8 @@ namespace Volo.Abp.Identity.EntityFrameworkCore string filter = null, CancellationToken cancellationToken = default) { - return await this.WhereIf( + return await (await GetDbSetAsync()) + .WhereIf( !filter.IsNullOrWhiteSpace(), u => u.UserName.Contains(filter) || @@ -200,9 +206,11 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from userOU in DbContext.Set() - join ou in DbContext.OrganizationUnits.IncludeDetails(includeDetails) on userOU.OrganizationUnitId equals ou.Id - where userOU.UserId == id + var dbContext = await GetDbContextAsync(); + + var query = from userOu in dbContext.Set() + join ou in dbContext.OrganizationUnits.IncludeDetails(includeDetails) on userOu.OrganizationUnitId equals ou.Id + where userOu.UserId == id select ou; return await query.ToListAsync(GetCancellationToken(cancellationToken)); @@ -213,10 +221,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore CancellationToken cancellationToken = default ) { - var query = from userOu in DbContext.Set() - join user in DbSet on userOu.UserId equals user.Id + var dbContext = await GetDbContextAsync(); + + var query = from userOu in dbContext.Set() + join user in dbContext.Users on userOu.UserId equals user.Id where userOu.OrganizationUnitId == organizationUnitId select user; + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } @@ -225,10 +236,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore CancellationToken cancellationToken = default ) { - var query = from userOu in DbContext.Set() - join user in DbSet on userOu.UserId equals user.Id + var dbContext = await GetDbContextAsync(); + + var query = from userOu in dbContext.Set() + join user in dbContext.Users on userOu.UserId equals user.Id where organizationUnitIds.Contains(userOu.OrganizationUnitId) select user; + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } @@ -237,17 +251,26 @@ namespace Volo.Abp.Identity.EntityFrameworkCore CancellationToken cancellationToken = default ) { - var query = from userOu in DbContext.Set() - join user in DbSet on userOu.UserId equals user.Id - join ou in DbContext.Set() on userOu.OrganizationUnitId equals ou.Id + var dbContext = await GetDbContextAsync(); + + var query = from userOu in dbContext.Set() + join user in dbContext.Users on userOu.UserId equals user.Id + join ou in dbContext.Set() on userOu.OrganizationUnitId equals ou.Id where ou.Code.StartsWith(code) select user; + return await query.ToListAsync(GetCancellationToken(cancellationToken)); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } } } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreOrganizationUnitRepository.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreOrganizationUnitRepository.cs index d63d7a2228..6a54f41959 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreOrganizationUnitRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/EfCoreOrganizationUnitRepository.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq.Dynamic.Core; using System.Linq; +using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.EntityFrameworkCore; @@ -25,7 +26,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .Where(x => x.ParentId == parentId) .ToListAsync(GetCancellationToken(cancellationToken)); @@ -37,7 +38,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .Where(ou => ou.Code.StartsWith(code) && ou.Id != parentId.Value) .ToListAsync(GetCancellationToken(cancellationToken)); @@ -50,7 +51,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .OrderBy(sorting ?? nameof(OrganizationUnit.DisplayName)) .PageBy(skipCount, maxResultCount) @@ -62,7 +63,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .Where(t => ids.Contains(t.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); @@ -73,7 +74,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .OrderBy(x => x.Id) .FirstOrDefaultAsync( @@ -90,10 +91,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from organizationRole in DbContext.Set() - join role in DbContext.Roles.IncludeDetails(includeDetails) on organizationRole.RoleId equals role.Id + var dbContext = await GetDbContextAsync(); + + var query = from organizationRole in dbContext.Set() + join role in dbContext.Roles.IncludeDetails(includeDetails) on organizationRole.RoleId equals role.Id where organizationRole.OrganizationUnitId == organizationUnit.Id select role; + query = query .OrderBy(sorting ?? nameof(IdentityRole.Name)) .PageBy(skipCount, maxResultCount); @@ -105,8 +109,10 @@ namespace Volo.Abp.Identity.EntityFrameworkCore OrganizationUnit organizationUnit, CancellationToken cancellationToken = default) { - var query = from organizationRole in DbContext.Set() - join role in DbContext.Roles on organizationRole.RoleId equals role.Id + var dbContext = await GetDbContextAsync(); + + var query = from organizationRole in dbContext.Set() + join role in dbContext.Roles on organizationRole.RoleId equals role.Id where organizationRole.OrganizationUnitId == organizationUnit.Id select role; @@ -123,8 +129,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore CancellationToken cancellationToken = default) { var roleIds = organizationUnit.Roles.Select(r => r.RoleId).ToList(); + var dbContext = await GetDbContextAsync(); - return await DbContext.Roles + return await dbContext.Roles .Where(r => !roleIds.Contains(r.Id)) .IncludeDetails(includeDetails) .WhereIf(!filter.IsNullOrWhiteSpace(), r => r.Name.Contains(filter)) @@ -139,8 +146,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore CancellationToken cancellationToken = default) { var roleIds = organizationUnit.Roles.Select(r => r.RoleId).ToList(); + var dbContext = await GetDbContextAsync(); - return await DbContext.Roles + return await dbContext.Roles .Where(r => !roleIds.Contains(r.Id)) .WhereIf(!filter.IsNullOrWhiteSpace(), r => r.Name.Contains(filter)) .CountAsync(cancellationToken); @@ -155,7 +163,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = CreateGetMembersFilteredQuery(organizationUnit, filter); + var query = await CreateGetMembersFilteredQueryAsync(organizationUnit, filter); return await query.IncludeDetails(includeDetails).OrderBy(sorting ?? nameof(IdentityUser.UserName)) .PageBy(skipCount, maxResultCount) @@ -167,7 +175,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore string filter = null, CancellationToken cancellationToken = default) { - var query = CreateGetMembersFilteredQuery(organizationUnit, filter); + var query = await CreateGetMembersFilteredQueryAsync(organizationUnit, filter); return await query.CountAsync(GetCancellationToken(cancellationToken)); } @@ -181,11 +189,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - var userIdsInOrganizationUnit = DbContext.Set() + var dbContext = await GetDbContextAsync(); + + var userIdsInOrganizationUnit = dbContext.Set() .Where(uou => uou.OrganizationUnitId == organizationUnit.Id) .Select(uou => uou.UserId); - var query = DbContext.Users + var query = dbContext.Users .Where(u => !userIdsInOrganizationUnit.Contains(u.Id)); if (!filter.IsNullOrWhiteSpace()) @@ -209,11 +219,13 @@ namespace Volo.Abp.Identity.EntityFrameworkCore string filter = null, CancellationToken cancellationToken = default) { - var userIdsInOrganizationUnit = DbContext.Set() + var dbContext = await GetDbContextAsync(); + + var userIdsInOrganizationUnit = dbContext.Set() .Where(uou => uou.OrganizationUnitId == organizationUnit.Id) .Select(uou => uou.UserId); - return await DbContext.Users + return await dbContext.Users .Where(u => !userIdsInOrganizationUnit.Contains(u.Id)) .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.UserName.Contains(filter) || @@ -222,11 +234,17 @@ namespace Volo.Abp.Identity.EntityFrameworkCore .CountAsync(cancellationToken); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } + public virtual Task RemoveAllRolesAsync( OrganizationUnit organizationUnit, CancellationToken cancellationToken = default) @@ -239,17 +257,21 @@ namespace Volo.Abp.Identity.EntityFrameworkCore OrganizationUnit organizationUnit, CancellationToken cancellationToken = default) { - var ouMembersQuery = await DbContext.Set() + var dbContext = await GetDbContextAsync(); + + var ouMembersQuery = await dbContext.Set() .Where(q => q.OrganizationUnitId == organizationUnit.Id) .ToListAsync(GetCancellationToken(cancellationToken)); - DbContext.Set().RemoveRange(ouMembersQuery); + dbContext.Set().RemoveRange(ouMembersQuery); } - protected virtual IQueryable CreateGetMembersFilteredQuery(OrganizationUnit organizationUnit, string filter = null) + protected virtual async Task> CreateGetMembersFilteredQueryAsync(OrganizationUnit organizationUnit, string filter = null) { - var query = from userOu in DbContext.Set() - join user in DbContext.Users on userOu.UserId equals user.Id + var dbContext = await GetDbContextAsync(); + + var query = from userOu in dbContext.Set() + join user in dbContext.Users on userOu.UserId equals user.Id where userOu.OrganizationUnitId == organizationUnit.Id select user; diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs index a123868799..6795735793 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityClaimTypeRepository.cs @@ -24,13 +24,13 @@ namespace Volo.Abp.Identity.MongoDB { if (ignoredId == null) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ct => ct.Name == name) .AnyAsync(GetCancellationToken(cancellationToken)); } else { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ct => ct.Id != ignoredId && ct.Name == name) .AnyAsync(GetCancellationToken(cancellationToken)); } @@ -43,7 +43,7 @@ namespace Volo.Abp.Identity.MongoDB string filter, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -59,7 +59,7 @@ namespace Volo.Abp.Identity.MongoDB string filter = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityLinkUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityLinkUserRepository.cs index 6e8d53821b..43bad94271 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityLinkUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityLinkUserRepository.cs @@ -19,7 +19,7 @@ namespace Volo.Abp.Identity.MongoDB public async Task FindAsync(IdentityLinkUserInfo sourceLinkUserInfo, IdentityLinkUserInfo targetLinkUserInfo, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(x => x.Id).FirstOrDefaultAsync(x => x.SourceUserId == sourceLinkUserInfo.UserId && x.SourceTenantId == sourceLinkUserInfo.TenantId && x.TargetUserId == targetLinkUserInfo.UserId && x.TargetTenantId == targetLinkUserInfo.TenantId || @@ -30,7 +30,7 @@ namespace Volo.Abp.Identity.MongoDB public async Task> GetListAsync(IdentityLinkUserInfo linkUserInfo, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(x => + return await (await GetMongoQueryableAsync(cancellationToken)).Where(x => x.SourceUserId == linkUserInfo.UserId && x.SourceTenantId == linkUserInfo.TenantId || x.TargetUserId == linkUserInfo.UserId && x.TargetTenantId == linkUserInfo.TenantId) .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs index 9c6bccf74f..0731008f57 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityRoleRepository.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(x => x.Id) .FirstOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, GetCancellationToken(cancellationToken)); } @@ -36,7 +36,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.NormalizedName.Contains(filter)) @@ -50,7 +50,7 @@ namespace Volo.Abp.Identity.MongoDB IEnumerable ids, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(t => ids.Contains(t.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -59,14 +59,16 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(r => r.IsDefault).ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); + return await (await GetMongoQueryableAsync(cancellationToken)) + .Where(r => r.IsDefault) + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.NormalizedName.Contains(filter)) diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySecurityLogRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySecurityLogRepository.cs index b63a6001f9..a0a8b9b103 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySecurityLogRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentitySecurityLogRepository.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = GetListQuery( + var query = await GetListQueryAsync( startTime, endTime, applicationName, @@ -65,7 +65,7 @@ namespace Volo.Abp.Identity.MongoDB string correlationId = null, CancellationToken cancellationToken = default) { - var query = GetListQuery( + var query = await GetListQueryAsync( startTime, endTime, applicationName, @@ -85,11 +85,11 @@ namespace Volo.Abp.Identity.MongoDB public async Task GetByUserIdAsync(Guid id, Guid userId, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().OrderBy(x => x.Id).FirstOrDefaultAsync(x => x.Id == id && x.UserId == userId, + return await (await GetMongoQueryableAsync(cancellationToken)).OrderBy(x => x.Id).FirstOrDefaultAsync(x => x.Id == id && x.UserId == userId, GetCancellationToken(cancellationToken)); } - protected virtual IQueryable GetListQuery( + protected virtual async Task> GetListQueryAsync( DateTime? startTime = null, DateTime? endTime = null, string applicationName = null, @@ -100,7 +100,7 @@ namespace Volo.Abp.Identity.MongoDB string clientId = null, string correlationId = null) { - return GetMongoQueryable() + return (await GetMongoQueryableAsync()) .WhereIf(startTime.HasValue, securityLog => securityLog.CreationTime >= startTime.Value) .WhereIf(endTime.HasValue, securityLog => securityLog.CreationTime < endTime.Value.AddDays(1).Date) .WhereIf(!applicationName.IsNullOrWhiteSpace(), diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs index 692e5d5016..0864f7b01c 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoIdentityUserRepository.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(x => x.Id) .FirstOrDefaultAsync( u => u.NormalizedUserName == normalizedUserName, @@ -40,14 +40,17 @@ namespace Volo.Abp.Identity.MongoDB var organizationUnitIds = user.OrganizationUnits .Select(r => r.OrganizationUnitId) .ToArray(); - var organizationUnits = DbContext.OrganizationUnits + + var dbContext = await GetDbContextAsync(cancellationToken); + + var organizationUnits = dbContext.OrganizationUnits .AsQueryable() .Where(ou => organizationUnitIds.Contains(ou.Id)) .ToArray(); var orgUnitRoleIds = organizationUnits.SelectMany(x => x.Roles.Select(r => r.RoleId)).ToArray(); var roleIds = user.Roles.Select(r => r.RoleId).ToArray(); var allRoleIds = orgUnitRoleIds.Union(roleIds); - return await DbContext.Roles.AsQueryable().Where(r => allRoleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken)); + return await dbContext.Roles.AsQueryable().Where(r => allRoleIds.Contains(r.Id)).Select(r => r.Name).ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetRoleNamesInOrganizationUnitAsync( @@ -60,14 +63,16 @@ namespace Volo.Abp.Identity.MongoDB .Select(r => r.OrganizationUnitId) .ToArray(); - var organizationUnits = DbContext.OrganizationUnits + var dbContext = await GetDbContextAsync(cancellationToken); + + var organizationUnits = dbContext.OrganizationUnits .AsQueryable() .Where(ou => organizationUnitIds.Contains(ou.Id)) .ToArray(); var roleIds = organizationUnits.SelectMany(x => x.Roles.Select(r => r.RoleId)).ToArray(); - return await DbContext.Roles //TODO: Such usage suppress filters! + return await dbContext.Roles //TODO: Such usage suppress filters! .AsQueryable() .Where(r => roleIds.Contains(r.Id)) .Select(r => r.Name) @@ -80,7 +85,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(u => u.Logins.Any(login => login.LoginProvider == loginProvider && login.ProviderKey == providerKey)) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -91,7 +96,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(x => x.Id).FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, GetCancellationToken(cancellationToken)); } @@ -100,7 +105,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(u => u.Claims.Any(c => c.ClaimType == claim.Type && c.ClaimValue == claim.Value)) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -110,19 +115,21 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var role = await DbContext.Roles.AsQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + + var role = await (await GetDbContextAsync(cancellationToken)).Roles.AsQueryable() //TODO: Such usages breaks data filters .Where(x => x.NormalizedName == normalizedRoleName) .OrderBy(x => x.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(cancellationToken); if (role == null) { return new List(); } - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(u => u.Roles.Any(r => r.RoleId == role.Id)) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } public virtual async Task> GetListAsync( @@ -133,7 +140,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -158,14 +165,17 @@ namespace Volo.Abp.Identity.MongoDB var organizationUnitIds = user.OrganizationUnits .Select(r => r.OrganizationUnitId) .ToArray(); - var organizationUnits = DbContext.OrganizationUnits + + var dbContext = await GetDbContextAsync(cancellationToken); + + var organizationUnits = dbContext.OrganizationUnits .AsQueryable() .Where(ou => organizationUnitIds.Contains(ou.Id)) .ToArray(); var orgUnitRoleIds = organizationUnits.SelectMany(x => x.Roles.Select(r => r.RoleId)).ToArray(); var roleIds = user.Roles.Select(r => r.RoleId).ToArray(); var allRoleIds = orgUnitRoleIds.Union(roleIds); - return await DbContext.Roles.AsQueryable().Where(r => allRoleIds.Contains(r.Id)).ToListAsync(GetCancellationToken(cancellationToken)); + return await dbContext.Roles.AsQueryable().Where(r => allRoleIds.Contains(r.Id)).ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetOrganizationUnitsAsync( @@ -175,17 +185,19 @@ namespace Volo.Abp.Identity.MongoDB { var user = await GetAsync(id, cancellationToken: GetCancellationToken(cancellationToken)); var organizationUnitIds = user.OrganizationUnits.Select(r => r.OrganizationUnitId); - return await DbContext.OrganizationUnits.AsQueryable() + + var dbContext = await GetDbContextAsync(cancellationToken); + + return await dbContext.OrganizationUnits.AsQueryable() .Where(ou => organizationUnitIds.Contains(ou.Id)) - .ToListAsync(GetCancellationToken(cancellationToken)) - ; + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task GetCountAsync( string filter = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -202,7 +214,7 @@ namespace Volo.Abp.Identity.MongoDB Guid organizationUnitId, CancellationToken cancellationToken = default) { - var result = await GetMongoQueryable() + var result = await (await GetMongoQueryableAsync(cancellationToken)) .Where(u => u.OrganizationUnits.Any(uou => uou.OrganizationUnitId == organizationUnitId)) .ToListAsync(GetCancellationToken(cancellationToken)) ; @@ -213,7 +225,7 @@ namespace Volo.Abp.Identity.MongoDB List organizationUnitIds, CancellationToken cancellationToken = default) { - var result = await GetMongoQueryable() + var result = await (await GetMongoQueryableAsync(cancellationToken)) .Where(u => u.OrganizationUnits.Any(uou => organizationUnitIds.Contains(uou.OrganizationUnitId))) .ToListAsync(GetCancellationToken(cancellationToken)) ; @@ -224,16 +236,17 @@ namespace Volo.Abp.Identity.MongoDB string code, CancellationToken cancellationToken = default) { - var organizationUnitIds = await DbContext.OrganizationUnits.AsQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + + var organizationUnitIds = await (await GetDbContextAsync(cancellationToken)).OrganizationUnits.AsQueryable() .Where(ou => ou.Code.StartsWith(code)) .Select(ou => ou.Id) - .ToListAsync(GetCancellationToken(cancellationToken)) + .ToListAsync(cancellationToken) ; - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(u => u.OrganizationUnits.Any(uou => organizationUnitIds.Contains(uou.OrganizationUnitId))) - .ToListAsync(GetCancellationToken(cancellationToken)) - ; + .ToListAsync(cancellationToken); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs index bd4b079a07..de0afd8abc 100644 --- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs +++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo/Abp/Identity/MongoDB/MongoOrganizationUnitRepository.cs @@ -1,9 +1,7 @@ -using MongoDB.Bson; -using MongoDB.Driver; +using MongoDB.Driver; using MongoDB.Driver.Linq; using System; using System.Collections.Generic; -using System.Data; using System.Linq; using System.Linq.Dynamic.Core; using System.Threading; @@ -11,7 +9,6 @@ using System.Threading.Tasks; using Volo.Abp.Domain.Repositories.MongoDB; using Volo.Abp.MongoDB; using Volo.Abp.MultiTenancy; -using Volo.Abp.Uow; namespace Volo.Abp.Identity.MongoDB { @@ -30,7 +27,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ou => ou.ParentId == parentId) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -41,7 +38,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ou => ou.Code.StartsWith(code) && ou.Id != parentId.Value) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -51,7 +48,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(t => ids.Contains(t.Id)) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -63,7 +60,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(sorting ?? nameof(OrganizationUnit.DisplayName)) .As>() .PageBy>(skipCount, maxResultCount) @@ -75,7 +72,7 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(x => x.Id) .FirstOrDefaultAsync( ou => ou.DisplayName == displayName, @@ -92,7 +89,10 @@ namespace Volo.Abp.Identity.MongoDB CancellationToken cancellationToken = default) { var roleIds = organizationUnit.Roles.Select(r => r.RoleId).ToArray(); - return await ApplyDataFilters, IdentityRole>(DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id))) + var dbContext = await GetDbContextAsync(cancellationToken); + return await ApplyDataFilters, IdentityRole>( + dbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)) + ) .OrderBy(sorting ?? nameof(IdentityRole.Name)) .As>() .PageBy>(skipCount, maxResultCount) @@ -104,7 +104,10 @@ namespace Volo.Abp.Identity.MongoDB CancellationToken cancellationToken = default) { var roleIds = organizationUnit.Roles.Select(r => r.RoleId).ToArray(); - return await ApplyDataFilters, IdentityRole>( DbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id))) + var dbContext = await GetDbContextAsync(cancellationToken); + return await ApplyDataFilters, IdentityRole>( + dbContext.Roles.AsQueryable().Where(r => roleIds.Contains(r.Id)) + ) .As>() .CountAsync(cancellationToken); } @@ -119,7 +122,8 @@ namespace Volo.Abp.Identity.MongoDB CancellationToken cancellationToken = default) { var roleIds = organizationUnit.Roles.Select(r => r.RoleId).ToArray(); - return await ApplyDataFilters, IdentityRole>(DbContext.Roles.AsQueryable()) + var dbContext = await GetDbContextAsync(cancellationToken); + return await ApplyDataFilters, IdentityRole>(dbContext.Roles.AsQueryable()) .Where(r => !roleIds.Contains(r.Id)) .WhereIf(!filter.IsNullOrWhiteSpace(), r => r.Name.Contains(filter)) .OrderBy(sorting ?? nameof(IdentityRole.Name)) @@ -134,7 +138,8 @@ namespace Volo.Abp.Identity.MongoDB CancellationToken cancellationToken = default) { var roleIds = organizationUnit.Roles.Select(r => r.RoleId).ToArray(); - return await ApplyDataFilters, IdentityRole>(DbContext.Roles.AsQueryable()) + var dbContext = await GetDbContextAsync(cancellationToken); + return await ApplyDataFilters, IdentityRole>(dbContext.Roles.AsQueryable()) .Where(r => !roleIds.Contains(r.Id)) .WhereIf(!filter.IsNullOrWhiteSpace(), r => r.Name.Contains(filter)) .As>() @@ -150,13 +155,13 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = CreateGetMembersFilteredQuery(organizationUnit, filter); - + cancellationToken = GetCancellationToken(cancellationToken); + var query = await CreateGetMembersFilteredQueryAsync(organizationUnit, filter, cancellationToken); return await query .OrderBy(sorting ?? nameof(IdentityUser.UserName)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } public virtual async Task GetMembersCountAsync( @@ -164,9 +169,9 @@ namespace Volo.Abp.Identity.MongoDB string filter = null, CancellationToken cancellationToken = default) { - var query = CreateGetMembersFilteredQuery(organizationUnit, filter); - - return await query.CountAsync(GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + var query = await CreateGetMembersFilteredQueryAsync(organizationUnit, filter, cancellationToken); + return await query.CountAsync(cancellationToken); } public async Task> GetUnaddedUsersAsync( @@ -178,7 +183,8 @@ namespace Volo.Abp.Identity.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await ApplyDataFilters, IdentityUser>(DbContext.Users.AsQueryable()) + var dbContext = await GetDbContextAsync(cancellationToken); + return await ApplyDataFilters, IdentityUser>(dbContext.Users.AsQueryable()) .Where(u => !u.OrganizationUnits.Any(uou => uou.OrganizationUnitId == organizationUnit.Id)) .WhereIf>( !filter.IsNullOrWhiteSpace(), @@ -196,7 +202,8 @@ namespace Volo.Abp.Identity.MongoDB public async Task GetUnaddedUsersCountAsync(OrganizationUnit organizationUnit, string filter = null, CancellationToken cancellationToken = default) { - return await ApplyDataFilters, IdentityUser>(DbContext.Users.AsQueryable()) + var dbContext = await GetDbContextAsync(cancellationToken); + return await ApplyDataFilters, IdentityUser>(dbContext.Users.AsQueryable()) .Where(u => !u.OrganizationUnits.Any(uou => uou.OrganizationUnitId == organizationUnit.Id)) .WhereIf>( !filter.IsNullOrWhiteSpace(), @@ -217,7 +224,8 @@ namespace Volo.Abp.Identity.MongoDB public virtual async Task RemoveAllMembersAsync(OrganizationUnit organizationUnit, CancellationToken cancellationToken = default) { - var users = await ApplyDataFilters, IdentityUser>(DbContext.Users.AsQueryable()) + var dbContext = await GetDbContextAsync(cancellationToken); + var users = await ApplyDataFilters, IdentityUser>(dbContext.Users.AsQueryable()) .Where(u => u.OrganizationUnits.Any(uou => uou.OrganizationUnitId == organizationUnit.Id)) .As>() .ToListAsync(GetCancellationToken(cancellationToken)); @@ -225,13 +233,17 @@ namespace Volo.Abp.Identity.MongoDB foreach (var user in users) { user.RemoveOrganizationUnit(organizationUnit.Id); - DbContext.Users.ReplaceOne(u => u.Id == user.Id, user); + await dbContext.Users.ReplaceOneAsync(u => u.Id == user.Id, user, cancellationToken: cancellationToken); } } - protected virtual IMongoQueryable CreateGetMembersFilteredQuery(OrganizationUnit organizationUnit, string filter = null) + protected virtual async Task> CreateGetMembersFilteredQueryAsync( + OrganizationUnit organizationUnit, + string filter = null, + CancellationToken cancellationToken = default) { - return ApplyDataFilters, IdentityUser>(DbContext.Users.AsQueryable()) + var dbContext = await GetDbContextAsync(cancellationToken); + return ApplyDataFilters, IdentityUser>(dbContext.Users.AsQueryable()) .Where(u => u.OrganizationUnits.Any(uou => uou.OrganizationUnitId == organizationUnit.Id)) .WhereIf>( !filter.IsNullOrWhiteSpace(), diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj index 40a310cf2d..2e1187c846 100644 --- a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo.Abp.PermissionManagement.Domain.Identity.csproj @@ -17,7 +17,6 @@ - diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleDeletedEventHandler.cs b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleDeletedEventHandler.cs new file mode 100644 index 0000000000..b3fd565b24 --- /dev/null +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleDeletedEventHandler.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Entities.Events; +using Volo.Abp.EventBus; +using Volo.Abp.Identity; + +namespace Volo.Abp.PermissionManagement.Identity +{ + // public class RoleDeletedEventHandler : + // ILocalEventHandler>, + // ITransientDependency + // { + // protected IPermissionManager PermissionManager { get; } + // + // public RoleDeletedEventHandler(IPermissionManager permissionManager) + // { + // PermissionManager = permissionManager; + // } + // + // public virtual async Task HandleEventAsync(EntityDeletedEventData eventData) + // { + // await PermissionManager.DeleteAsync(RolePermissionValueProvider.ProviderName, eventData.Entity.Name); + // } + // } +} diff --git a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs index 5a95d515c4..18612bcfad 100644 --- a/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs +++ b/modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleUpdateEventHandler.cs @@ -7,37 +7,39 @@ using Volo.Abp.Identity; namespace Volo.Abp.PermissionManagement.Identity { - public class RoleUpdateEventHandler : - ILocalEventHandler, - ITransientDependency - { - protected IIdentityRoleRepository RoleRepository { get; } - protected IPermissionManager PermissionManager { get; } - protected IPermissionGrantRepository PermissionGrantRepository { get; } + //TODO: This code can not be here! - public RoleUpdateEventHandler( - IIdentityRoleRepository roleRepository, - IPermissionManager permissionManager, - IPermissionGrantRepository permissionGrantRepository) - { - RoleRepository = roleRepository; - PermissionManager = permissionManager; - PermissionGrantRepository = permissionGrantRepository; - } - - public virtual async Task HandleEventAsync(IdentityRoleNameChangedEvent eventData) - { - var role = await RoleRepository.FindAsync(eventData.IdentityRole.Id, false); - if (role == null) - { - return; - } - - var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync(RolePermissionValueProvider.ProviderName, eventData.OldName); - foreach (var permissionGrant in permissionGrantsInRole) - { - await PermissionManager.UpdateProviderKeyAsync(permissionGrant, eventData.IdentityRole.Name); - } - } - } + // public class RoleUpdateEventHandler : + // ILocalEventHandler, + // ITransientDependency + // { + // protected IIdentityRoleRepository RoleRepository { get; } + // protected IPermissionManager PermissionManager { get; } + // protected IPermissionGrantRepository PermissionGrantRepository { get; } + // + // public RoleUpdateEventHandler( + // IIdentityRoleRepository roleRepository, + // IPermissionManager permissionManager, + // IPermissionGrantRepository permissionGrantRepository) + // { + // RoleRepository = roleRepository; + // PermissionManager = permissionManager; + // PermissionGrantRepository = permissionGrantRepository; + // } + // + // public virtual async Task HandleEventAsync(IdentityRoleNameChangedEvent eventData) + // { + // var role = await RoleRepository.FindAsync(eventData.IdentityRole.Id, false); + // if (role == null) + // { + // return; + // } + // + // var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync(RolePermissionValueProvider.ProviderName, eventData.OldName); + // foreach (var permissionGrant in permissionGrantsInRole) + // { + // await PermissionManager.UpdateProviderKeyAsync(permissionGrant, eventData.IdentityRole.Name); + // } + // } + // } } diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs index c3c24a29cc..a668b5ff4f 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/RoleChangingEvents_Test.cs @@ -9,50 +9,52 @@ using Xunit; namespace Volo.Abp.Identity { - public class RoleChangingEvents_Test : AbpIdentityDomainTestBase - { - protected readonly IIdentityRoleRepository RoleRepository; - protected readonly IPermissionGrantRepository PermissionGrantRepository; - protected readonly IdentityRoleManager RoleManager; - protected readonly ILookupNormalizer LookupNormalizer; - protected readonly IGuidGenerator GuidGenerator; - protected readonly IUnitOfWorkManager UowManager; - - public RoleChangingEvents_Test() - { - RoleRepository = GetRequiredService(); ; - PermissionGrantRepository = GetRequiredService(); ; - RoleManager = GetRequiredService(); ; - LookupNormalizer = GetRequiredService(); ; - GuidGenerator = GetRequiredService(); - UowManager = GetRequiredService(); - } - - [Fact] - public async Task Role_Update_Event_Test() - { - var role = await RoleRepository - .FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator")) - ; - - var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name); - permissionGrantsInRole.ShouldNotBeNull(); - permissionGrantsInRole.Count.ShouldBeGreaterThan(0); - var count = permissionGrantsInRole.Count; - - using (var uow = UowManager.Begin()) - { - var identityResult = await RoleManager.SetRoleNameAsync(role, "TestModerator"); - identityResult.Succeeded.ShouldBeTrue(); - var xx = await RoleRepository.UpdateAsync(role); - await uow.CompleteAsync(); - } - - role = await RoleRepository.GetAsync(role.Id); - role.Name.ShouldBe("TestModerator"); - - permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name); - permissionGrantsInRole.Count.ShouldBe(count); - } - } + //TODO: This code can not be here! + //https://github.com/abpframework/abp/commit/847f526041145b62376b760776829d5ce257da1c + // public class RoleChangingEvents_Test : AbpIdentityDomainTestBase + // { + // protected readonly IIdentityRoleRepository RoleRepository; + // protected readonly IPermissionGrantRepository PermissionGrantRepository; + // protected readonly IdentityRoleManager RoleManager; + // protected readonly ILookupNormalizer LookupNormalizer; + // protected readonly IGuidGenerator GuidGenerator; + // protected readonly IUnitOfWorkManager UowManager; + // + // public RoleChangingEvents_Test() + // { + // RoleRepository = GetRequiredService(); ; + // PermissionGrantRepository = GetRequiredService(); ; + // RoleManager = GetRequiredService(); ; + // LookupNormalizer = GetRequiredService(); ; + // GuidGenerator = GetRequiredService(); + // UowManager = GetRequiredService(); + // } + // + // [Fact(Skip = "https://github.com/abpframework/abp/actions/runs/454248191")] + // public async Task Role_Update_Event_Test() + // { + // var role = await RoleRepository + // .FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator")) + // ; + // + // var permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name); + // permissionGrantsInRole.ShouldNotBeNull(); + // permissionGrantsInRole.Count.ShouldBeGreaterThan(0); + // var count = permissionGrantsInRole.Count; + // + // using (var uow = UowManager.Begin()) + // { + // var identityResult = await RoleManager.SetRoleNameAsync(role, "TestModerator"); + // identityResult.Succeeded.ShouldBeTrue(); + // var xx = await RoleRepository.UpdateAsync(role); + // await uow.CompleteAsync(); + // } + // + // role = await RoleRepository.GetAsync(role.Id); + // role.Name.ShouldBe("TestModerator"); + // + // permissionGrantsInRole = await PermissionGrantRepository.GetListAsync("R", role.Name); + // permissionGrantsInRole.Count.ShouldBe(count); + // } + // } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en-GB.json b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..7c3c87b884 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/en-GB.json @@ -0,0 +1,14 @@ +{ + "culture": "en-GB", + "texts": { + "Volo.IdentityServer:DuplicateIdentityResourceName": "Identity Resource name already exist: {Name}", + "Volo.IdentityServer:DuplicateApiResourceName": "Api Resource name already exist: {Name}", + "Volo.IdentityServer:DuplicateApiScopeName": "Api Scope name already exist: {Name}", + "Volo.IdentityServer:DuplicateClientId": "ClientId already exist: {ClientId}", + "UserLockedOut": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", + "InvalidUserNameOrPassword": "Invalid username or password!", + "LoginIsNotAllowed": "You are not allowed to login! You need to confirm your email/phone number.", + "InvalidUsername": "Invalid username or password!", + "TheTargetUserIsNotLinkedToYou": "The target user is not linked to you!" + } +} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index 3cdcb7e49d..16a789048d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.IdentityServer.ApiResources public async Task FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) { - var query = from apiResource in DbSet.IncludeDetails(includeDetails) + var query = from apiResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) where apiResource.Name == apiResourceName orderby apiResource.Id select apiResource; @@ -31,7 +31,7 @@ namespace Volo.Abp.IdentityServer.ApiResources public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default) { - var query = from apiResource in DbSet.IncludeDetails(includeDetails) + var query = from apiResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) where apiResourceNames.Contains(apiResource.Name) orderby apiResource.Name select apiResource; @@ -44,7 +44,7 @@ namespace Volo.Abp.IdentityServer.ApiResources bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from api in DbSet.IncludeDetails(includeDetails) + var query = from api in (await GetDbSetAsync()).IncludeDetails(includeDetails) where api.Scopes.Any(x => scopeNames.Contains(x.Scope)) select api; @@ -58,7 +58,7 @@ namespace Volo.Abp.IdentityServer.ApiResources bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.Description.Contains(filter) || @@ -70,41 +70,49 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()).AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); } public async override Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) { - var resourceClaims = DbContext.Set().Where(sc => sc.ApiResourceId == id); + var dbContext = await GetDbContextAsync(); + + var resourceClaims = dbContext.Set().Where(sc => sc.ApiResourceId == id); foreach (var scopeClaim in resourceClaims) { - DbContext.Set().Remove(scopeClaim); + dbContext.Set().Remove(scopeClaim); } - var resourceScopes = DbContext.Set().Where(s => s.ApiResourceId == id); + var resourceScopes = dbContext.Set().Where(s => s.ApiResourceId == id); foreach (var scope in resourceScopes) { - DbContext.Set().Remove(scope); + dbContext.Set().Remove(scope); } - var resourceSecrets = DbContext.Set().Where(s => s.ApiResourceId == id); + var resourceSecrets = dbContext.Set().Where(s => s.ApiResourceId == id); foreach (var secret in resourceSecrets) { - DbContext.Set().Remove(secret); + dbContext.Set().Remove(secret); } - var apiResourceProperties = DbContext.Set().Where(s => s.ApiResourceId == id); + var apiResourceProperties = dbContext.Set().Where(s => s.ApiResourceId == id); foreach (var property in apiResourceProperties) { - DbContext.Set().Remove(property); + dbContext.Set().Remove(property); } await base.DeleteAsync(id, autoSave, cancellationToken); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs index c2a962ead6..4cece3209e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes public async Task GetByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .OrderBy(x=>x.Id) .FirstOrDefaultAsync(x => x.Name == scopeName, GetCancellationToken(cancellationToken)); } @@ -28,7 +28,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from scope in DbSet.IncludeDetails(includeDetails) + var query = from scope in (await GetDbSetAsync()).IncludeDetails(includeDetails) where scopeNames.Contains(scope.Name) orderby scope.Id select scope; @@ -38,7 +38,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes public async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.Description.Contains(filter) || @@ -50,29 +50,36 @@ namespace Volo.Abp.IdentityServer.ApiScopes public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()).AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); } - public async override Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = new CancellationToken()) + public override async Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = new CancellationToken()) { - var scopeClaims = DbContext.Set().Where(sc => sc.ApiScopeId == id); + var dbContext = await GetDbContextAsync(); + var scopeClaims = dbContext.Set().Where(sc => sc.ApiScopeId == id); foreach (var claim in scopeClaims) { - DbContext.Set().Remove(claim); + dbContext.Set().Remove(claim); } - var scopeProperties = DbContext.Set().Where(s => s.ApiScopeId == id); + var scopeProperties = dbContext.Set().Where(s => s.ApiScopeId == id); foreach (var property in scopeProperties) { - DbContext.Set().Remove(property); + dbContext.Set().Remove(property); } await base.DeleteAsync(id, autoSave, cancellationToken); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs index 671d98d822..7607a189ca 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.IdentityServer.Clients bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .OrderBy(x => x.ClientId) .FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken)); @@ -33,7 +33,7 @@ namespace Volo.Abp.IdentityServer.Clients string sorting, int skipCount, int maxResultCount, string filter, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.ClientId.Contains(filter)) .OrderBy(sorting ?? nameof(Client.ClientName) + " desc") @@ -43,7 +43,7 @@ namespace Volo.Abp.IdentityServer.Clients public virtual async Task> GetAllDistinctAllowedCorsOriginsAsync(CancellationToken cancellationToken = default) { - return await DbContext.ClientCorsOrigins + return await (await GetDbContextAsync()).ClientCorsOrigins .Select(x => x.Origin) .Distinct() .ToListAsync(GetCancellationToken(cancellationToken)); @@ -51,62 +51,70 @@ namespace Volo.Abp.IdentityServer.Clients public virtual async Task CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); + return await (await GetDbSetAsync()).AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); } public async override Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) { - foreach (var clientGrantType in DbContext.Set().Where(x => x.ClientId == id)) + var dbContext = await GetDbContextAsync(); + + foreach (var clientGrantType in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientGrantType); + dbContext.Set().Remove(clientGrantType); } - foreach (var clientRedirectUri in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientRedirectUri in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientRedirectUri); + dbContext.Set().Remove(clientRedirectUri); } - foreach (var clientPostLogoutRedirectUri in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientPostLogoutRedirectUri in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientPostLogoutRedirectUri); + dbContext.Set().Remove(clientPostLogoutRedirectUri); } - foreach (var clientScope in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientScope in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientScope); + dbContext.Set().Remove(clientScope); } - foreach (var clientSecret in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientSecret in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientSecret); + dbContext.Set().Remove(clientSecret); } - foreach (var clientClaim in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientClaim in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientClaim); + dbContext.Set().Remove(clientClaim); } - foreach (var clientIdPRestriction in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientIdPRestriction in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientIdPRestriction); + dbContext.Set().Remove(clientIdPRestriction); } - foreach (var clientCorsOrigin in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientCorsOrigin in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientCorsOrigin); + dbContext.Set().Remove(clientCorsOrigin); } - foreach (var clientProperty in DbContext.Set().Where(x => x.ClientId == id)) + foreach (var clientProperty in dbContext.Set().Where(x => x.ClientId == id)) { - DbContext.Set().Remove(clientProperty); + dbContext.Set().Remove(clientProperty); } await base.DeleteAsync(id, autoSave, cancellationToken); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs index 819c90d402..a6fd6e196b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.IdentityServer.Devices string userCode, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(d => d.UserCode == userCode) .OrderBy(d => d.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -33,7 +33,7 @@ namespace Volo.Abp.IdentityServer.Devices string deviceCode, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(d => d.DeviceCode == deviceCode) .OrderBy(d => d.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -42,7 +42,7 @@ namespace Volo.Abp.IdentityServer.Devices public virtual async Task> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs index aa7a27804f..2dbdfc1a3b 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistedGrantRepository.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.IdentityServer.Grants public async Task> GetListAsync(string subjectId, string sessionId, string clientId, string type, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await Filter(subjectId, sessionId, clientId, type) + return await (await FilterAsync(subjectId, sessionId, clientId, type)) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -29,7 +29,7 @@ namespace Volo.Abp.IdentityServer.Grants string key, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.Key == key) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -39,7 +39,7 @@ namespace Volo.Abp.IdentityServer.Grants string subjectId, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.SubjectId == subjectId) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -49,7 +49,7 @@ namespace Volo.Abp.IdentityServer.Grants int maxResultCount, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) @@ -63,21 +63,23 @@ namespace Volo.Abp.IdentityServer.Grants string type = null, CancellationToken cancellationToken = default) { - var persistedGrants = await Filter(subjectId, sessionId, clientId, type).ToListAsync(GetCancellationToken(cancellationToken)); + var persistedGrants = await (await FilterAsync(subjectId, sessionId, clientId, type)).ToListAsync(GetCancellationToken(cancellationToken)); + + var dbSet = await GetDbSetAsync(); foreach (var persistedGrant in persistedGrants) { - DbSet.Remove(persistedGrant); + dbSet.Remove(persistedGrant); } } - private IQueryable Filter( + private async Task> FilterAsync( string subjectId, string sessionId, string clientId, string type) { - return DbSet + return (await GetDbSetAsync()) .WhereIf(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) .WhereIf(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) .WhereIf(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs index 6ddf38e2db..1b83b46158 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs @@ -24,22 +24,28 @@ namespace Volo.Abp.IdentityServer.IdentityResources bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from identityResource in DbSet.IncludeDetails(includeDetails) + var query = from identityResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) where scopeNames.Contains(identityResource.Name) select identityResource; return await query.ToListAsync(GetCancellationToken(cancellationToken)); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } + public virtual async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.Description.Contains(filter) || @@ -54,7 +60,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .Where(x => x.Name == name) .OrderBy(x => x.Id) @@ -63,7 +69,7 @@ namespace Volo.Abp.IdentityServer.IdentityResources public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await DbSet.AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); + return await (await GetDbSetAsync()).AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index 599fa913b5..7db1bba8da 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using MongoDB.Driver; using MongoDB.Driver.Linq; using Volo.Abp.Domain.Repositories.MongoDB; -using Volo.Abp.IdentityServer.ApiScopes; using System.Linq.Dynamic.Core; using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.MongoDB; @@ -21,7 +20,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ar => ar.Name == apiResourceName) .OrderBy(ar => ar.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -30,7 +29,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ar => apiResourceNames.Contains(ar.Name)) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -38,7 +37,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetListByScopesAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ar => ar.Scopes.Any(x => scopeNames.Contains(x.Scope))) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -46,7 +45,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.Description.Contains(filter) || @@ -57,14 +56,10 @@ namespace Volo.Abp.IdentityServer.MongoDB .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetTotalCount() - { - return await GetCountAsync(); - } - public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); + return await (await GetMongoQueryableAsync(cancellationToken)) + .AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs index 91a408392f..69faed9dc3 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs @@ -22,7 +22,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task GetByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.Name == scopeName) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -31,7 +31,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from scope in GetMongoQueryable() + var query = from scope in (await GetMongoQueryableAsync(cancellationToken)) where scopeNames.Contains(scope.Name) orderby scope.Id select scope; @@ -42,7 +42,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.Description.Contains(filter) || @@ -55,7 +55,8 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); + return await (await GetMongoQueryableAsync(cancellationToken)) + .AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs index a68f5738d0..bd99461997 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs @@ -26,7 +26,7 @@ namespace Volo.Abp.IdentityServer.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.ClientId == clientId) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -40,7 +40,7 @@ namespace Volo.Abp.IdentityServer.MongoDB bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf(!filter.IsNullOrWhiteSpace(), x=>x.ClientId.Contains(filter)) .OrderBy(sorting ?? nameof(Client.ClientName)) .As>() @@ -51,7 +51,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetAllDistinctAllowedCorsOriginsAsync( CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .SelectMany(x => x.AllowedCorsOrigins) .Select(y => y.Origin) .Distinct() @@ -60,12 +60,8 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); - } - - public virtual async Task GetTotalCount() - { - return await GetCountAsync(); + return await (await GetMongoQueryableAsync(cancellationToken)) + .AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs index fc6dc0100a..83e87c0a58 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoDeviceFlowCodesRepository.cs @@ -23,7 +23,7 @@ namespace Volo.Abp.IdentityServer.MongoDB string userCode, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(d => d.UserCode == userCode) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -31,7 +31,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task FindByDeviceCodeAsync(string deviceCode, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(d => d.DeviceCode == deviceCode) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -42,7 +42,7 @@ namespace Volo.Abp.IdentityServer.MongoDB int maxResultCount, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs index 15fdf5b00c..84cc5cca0f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf(!filter.IsNullOrWhiteSpace(), x => x.Name.Contains(filter) || x.Description.Contains(filter) || x.DisplayName.Contains(filter)) @@ -35,7 +35,7 @@ namespace Volo.Abp.IdentityServer.MongoDB bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.Name == name) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -44,19 +44,15 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetListByScopeNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(ar => scopeNames.Contains(ar.Name)) .ToListAsync(GetCancellationToken(cancellationToken)); } - public virtual async Task GetTotalCountAsync() - { - return await GetCountAsync(); - } - public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) + .AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs index 6265bcd019..2d4728a7e1 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoPersistedGrantRepository.cs @@ -21,13 +21,13 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task> GetListAsync(string subjectId, string sessionId, string clientId, string type, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await Filter(subjectId, sessionId, clientId, type) + return await (await FilterAsync(subjectId, sessionId, clientId, type)) .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task FindByKeyAsync(string key, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.Key == key) .OrderBy(x => x.Id) .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); @@ -35,7 +35,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetListBySubjectIdAsync(string subjectId, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.SubjectId == subjectId) .ToListAsync(GetCancellationToken(cancellationToken)); } @@ -43,7 +43,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(x => x.Expiration != null && x.Expiration < maxExpirationDate) .OrderBy(x => x.ClientId) .Take(maxResultCount) @@ -57,7 +57,7 @@ namespace Volo.Abp.IdentityServer.MongoDB string type = null, CancellationToken cancellationToken = default) { - var persistedGrants = await Filter(subjectId, sessionId, clientId, type) + var persistedGrants = await (await FilterAsync(subjectId, sessionId, clientId, type)) .ToListAsync(GetCancellationToken(cancellationToken)); foreach (var persistedGrant in persistedGrants) @@ -82,13 +82,13 @@ namespace Volo.Abp.IdentityServer.MongoDB ); } - private IMongoQueryable Filter( + private async Task> FilterAsync( string subjectId, string sessionId, string clientId, string type) { - return GetMongoQueryable() + return (await GetMongoQueryableAsync()) .WhereIf>(!subjectId.IsNullOrWhiteSpace(), x => x.SubjectId == subjectId) .WhereIf>(!sessionId.IsNullOrWhiteSpace(), x => x.SessionId == sessionId) .WhereIf>(!clientId.IsNullOrWhiteSpace(), x => x.ClientId == clientId) diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/en-GB.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/en-GB.json new file mode 100644 index 0000000000..73c2e4a093 --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/en-GB.json @@ -0,0 +1,10 @@ +{ + "culture": "en-GB", + "texts": { + "Permissions": "Permissions", + "OnlyProviderPermissons": "Only this provider", + "All": "All", + "SelectAllInAllTabs": "Grant all permissions", + "SelectAllInThisTab": "Select all" + } +} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/IPermissionManager.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/IPermissionManager.cs index 26310a12fe..70bb83a7d0 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/IPermissionManager.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/IPermissionManager.cs @@ -15,5 +15,7 @@ namespace Volo.Abp.PermissionManagement Task SetAsync(string permissionName, string providerName, string providerKey, bool isGranted); Task UpdateProviderKeyAsync(PermissionGrant permissionGrant, string providerKey); + + Task DeleteAsync(string providerName, string providerKey); } -} \ No newline at end of file +} diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs index 9a2a89e340..fc8da0c6c5 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionManager.cs @@ -111,6 +111,16 @@ namespace Volo.Abp.PermissionManagement return await PermissionGrantRepository.UpdateAsync(permissionGrant); } + public virtual async Task DeleteAsync(string providerName, string providerKey) + { + var permissionGrants = await PermissionGrantRepository.GetListAsync(providerName, providerKey); + //TODO: Use DeleteManyAsync method + foreach (var permissionGrant in permissionGrants) + { + await PermissionGrantRepository.DeleteAsync(permissionGrant); + } + } + protected virtual async Task GetInternalAsync(PermissionDefinition permission, string providerName, string providerKey) { var result = new PermissionWithGrantedProviders(permission.Name, false); @@ -143,4 +153,4 @@ namespace Volo.Abp.PermissionManagement return result; } } -} \ No newline at end of file +} diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs index 5a479c348b..bc0ea04cf2 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/EfCorePermissionGrantRepository.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore string providerKey, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .OrderBy(x => x.Id) .FirstOrDefaultAsync(s => s.Name == name && @@ -39,7 +39,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore string providerKey, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey @@ -49,7 +49,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore public virtual async Task> GetListAsync(string[] names, string providerName, string providerKey, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .Where(s => names.Contains(s.Name) && s.ProviderName == providerName && diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs index a8f95ee6b9..823d5e63a3 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/MongoPermissionGrantRepository.cs @@ -24,13 +24,14 @@ namespace Volo.Abp.PermissionManagement.MongoDB string providerKey, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) .OrderBy(x => x.Id) .FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey, - GetCancellationToken(cancellationToken) + cancellationToken ); } @@ -39,22 +40,24 @@ namespace Volo.Abp.PermissionManagement.MongoDB string providerKey, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey - ).ToListAsync(GetCancellationToken(cancellationToken)); + ).ToListAsync(cancellationToken); } public virtual async Task> GetListAsync(string[] names, string providerName, string providerKey, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) .Where(s => names.Contains(s.Name) && s.ProviderName == providerName && s.ProviderKey == providerKey - ).ToListAsync(GetCancellationToken(cancellationToken)); + ).ToListAsync(cancellationToken); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json new file mode 100644 index 0000000000..722d3e8896 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "Settings": "Settings", + "SuccessfullySaved": "Successfully saved" + } +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs index c3323f331e..e90d2fc63a 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/EfCoreSettingRepository.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore public virtual async Task FindAsync(string name, string providerName, string providerKey) { - return await DbSet + return await (await GetDbSetAsync()) .OrderBy(x => x.Id) .FirstOrDefaultAsync( s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey @@ -26,7 +26,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore public virtual async Task> GetListAsync(string providerName, string providerKey) { - return await DbSet + return await (await GetDbSetAsync()) .Where( s => s.ProviderName == providerName && s.ProviderKey == providerKey ).ToListAsync(); @@ -34,7 +34,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore public virtual async Task> GetListAsync(string[] names, string providerName, string providerKey) { - return await DbSet + return await (await GetDbSetAsync()) .Where( s => names.Contains(s.Name) && s.ProviderName == providerName && s.ProviderKey == providerKey ).ToListAsync(); diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs index 1acaf50d56..e81e76dfcc 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/MongoSettingRepository.cs @@ -19,17 +19,23 @@ namespace Volo.Abp.SettingManagement.MongoDB public virtual async Task FindAsync(string name, string providerName, string providerKey) { - return await GetMongoQueryable().OrderBy(x => x.Id).FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey); + return await (await GetMongoQueryableAsync()) + .OrderBy(x => x.Id) + .FirstOrDefaultAsync(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey); } public virtual async Task> GetListAsync(string providerName, string providerKey) { - return await GetMongoQueryable().Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey).ToListAsync(); + return await (await GetMongoQueryableAsync()) + .Where(s => s.ProviderName == providerName && s.ProviderKey == providerKey) + .ToListAsync(); } public virtual async Task> GetListAsync(string[] names, string providerName, string providerKey) { - return await GetMongoQueryable().Where(s => names.Contains(s.Name) && s.ProviderName == providerName && s.ProviderKey == providerKey).ToListAsync(); + return await (await GetMongoQueryableAsync()) + .Where(s => names.Contains(s.Name) && s.ProviderName == providerName && s.ProviderKey == providerKey) + .ToListAsync(); } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en-GB.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..4d6075ff74 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en-GB.json @@ -0,0 +1,23 @@ +{ + "culture": "en-GB", + "texts": { + "Menu:TenantManagement": "Tenant Management", + "Tenants": "Tenants", + "NewTenant": "New Tenant", + "TenantName": "Tenant name", + "DisplayName:TenantName": "Tenant name", + "TenantDeletionConfirmationMessage": "Tenant '{0}' will be deleted. Is that OK?", + "ConnectionStrings": "Connection Strings", + "DisplayName:DefaultConnectionString": "Default Connection String", + "DisplayName:UseSharedDatabase": "Use the Shared Database", + "ManageHostFeatures": "Manage Host features", + "Permission:TenantManagement": "Tenant management", + "Permission:Create": "Create", + "Permission:Edit": "Edit", + "Permission:Delete": "Delete", + "Permission:ManageConnectionStrings": "Manage connection strings", + "Permission:ManageFeatures": "Manage features", + "DisplayName:AdminEmailAddress": "Admin Email Address", + "DisplayName:AdminPassword": "Admin Password" + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/ITenantRepository.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/ITenantRepository.cs index 1feca866a2..8a3fc0b19a 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/ITenantRepository.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/ITenantRepository.cs @@ -9,30 +9,32 @@ namespace Volo.Abp.TenantManagement public interface ITenantRepository : IBasicRepository { Task FindByNameAsync( - string name, - bool includeDetails = true, + string name, + bool includeDetails = true, CancellationToken cancellationToken = default); + [Obsolete("Use FindByNameAsync method.")] Tenant FindByName( string name, bool includeDetails = true ); + [Obsolete("Use FindAsync method.")] Tenant FindById( Guid id, bool includeDetails = true ); Task> GetListAsync( - string sorting = null, - int maxResultCount = int.MaxValue, - int skipCount = 0, - string filter = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default); Task GetCountAsync( - string filter = null, + string filter = null, CancellationToken cancellationToken = default); } -} \ No newline at end of file +} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs index 5847ed7d89..00b9ef0963 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs @@ -15,7 +15,7 @@ namespace Volo.Abp.TenantManagement protected ICurrentTenant CurrentTenant { get; } public TenantStore( - ITenantRepository tenantRepository, + ITenantRepository tenantRepository, IObjectMapper objectMapper, ICurrentTenant currentTenant) { @@ -52,6 +52,7 @@ namespace Volo.Abp.TenantManagement } } + [Obsolete("Use FindAsync method.")] public virtual TenantConfiguration Find(string name) { using (CurrentTenant.Change(null)) //TODO: No need this if we can implement to define host side (or tenant-independent) entities! @@ -66,6 +67,7 @@ namespace Volo.Abp.TenantManagement } } + [Obsolete("Use FindAsync method.")] public virtual TenantConfiguration Find(Guid id) { using (CurrentTenant.Change(null)) //TODO: No need this if we can implement to define host side (or tenant-independent) entities! diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs index be11861574..4b6208e232 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/EfCoreTenantRepository.cs @@ -23,11 +23,12 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore bool includeDetails = true, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken)); } + [Obsolete("Use FindByNameAsync method.")] public virtual Tenant FindByName(string name, bool includeDetails = true) { return DbSet @@ -35,6 +36,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore .FirstOrDefault(t => t.Name == name); } + [Obsolete("Use FindAsync method.")] public virtual Tenant FindById(Guid id, bool includeDetails = true) { return DbSet @@ -50,7 +52,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore bool includeDetails = false, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) .WhereIf( !filter.IsNullOrWhiteSpace(), @@ -72,9 +74,15 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore ).CountAsync(cancellationToken: cancellationToken); } + [Obsolete("Use WithDetailsAsync method.")] public override IQueryable WithDetails() { return GetQueryable().IncludeDetails(); } + + public override async Task> WithDetailsAsync() + { + return (await GetQueryableAsync()).IncludeDetails(); + } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs index a074cd973a..a2805f7333 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/MongoTenantRepository.cs @@ -13,27 +13,29 @@ namespace Volo.Abp.TenantManagement.MongoDB { public class MongoTenantRepository : MongoDbRepository, ITenantRepository { - public MongoTenantRepository(IMongoDbContextProvider dbContextProvider) + public MongoTenantRepository(IMongoDbContextProvider dbContextProvider) : base(dbContextProvider) { } public virtual async Task FindByNameAsync( - string name, - bool includeDetails = true, + string name, + bool includeDetails = true, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .FirstOrDefaultAsync(t => t.Name == name, GetCancellationToken(cancellationToken)); } + [Obsolete("Use FindByNameAsync method.")] public virtual Tenant FindByName(string name, bool includeDetails = true) { return GetMongoQueryable() .FirstOrDefault(t => t.Name == name); } + [Obsolete("Use FindAsync method.")] public virtual Tenant FindById(Guid id, bool includeDetails = true) { return GetMongoQueryable() @@ -41,14 +43,14 @@ namespace Volo.Abp.TenantManagement.MongoDB } public virtual async Task> GetListAsync( - string sorting = null, - int maxResultCount = int.MaxValue, - int skipCount = 0, - string filter = null, + string sorting = null, + int maxResultCount = int.MaxValue, + int skipCount = 0, + string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -62,7 +64,7 @@ namespace Volo.Abp.TenantManagement.MongoDB public virtual async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -70,4 +72,4 @@ namespace Volo.Abp.TenantManagement.MongoDB ).CountAsync(cancellationToken: cancellationToken); } } -} \ No newline at end of file +} diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantConnectionString_Tests.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantConnectionString_Tests.cs index 24c27db8ae..c6c197ea70 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantConnectionString_Tests.cs +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo/Abp/TenantManagement/TenantConnectionString_Tests.cs @@ -10,7 +10,7 @@ namespace Volo.Abp.TenantManagement [Theory] [InlineData("aaa")] [InlineData("bbb")] - public async Task SetValue(string value) + public void SetValue(string value) { var tenantConnectionString = new TenantConnectionString(Guid.NewGuid(), "MyConnString", "MyConnString-Value"); diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs index 87a8fbc507..de27a05fbd 100644 --- a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs +++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo/Abp/Users/EntityFrameworkCore/EfCoreAbpUserRepositoryBase.cs @@ -27,7 +27,9 @@ namespace Volo.Abp.Users.EntityFrameworkCore public virtual async Task> GetListAsync(IEnumerable ids, CancellationToken cancellationToken = default) { - return await DbSet.Where(u => ids.Contains(u.Id)).ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .Where(u => ids.Contains(u.Id)) + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> SearchAsync( @@ -37,7 +39,7 @@ namespace Volo.Abp.Users.EntityFrameworkCore string filter = null, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .WhereIf( !filter.IsNullOrWhiteSpace(), u => @@ -55,7 +57,7 @@ namespace Volo.Abp.Users.EntityFrameworkCore string filter = null, CancellationToken cancellationToken = default) { - return await DbSet + return await (await GetDbSetAsync()) .WhereIf( !filter.IsNullOrWhiteSpace(), u => diff --git a/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs b/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs index cf4d860def..996b6e314c 100644 --- a/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs +++ b/modules/users/src/Volo.Abp.Users.MongoDB/Volo/Abp/Users/MongoDB/MongoUserRepositoryBase.cs @@ -23,12 +23,18 @@ namespace Volo.Abp.Users.MongoDB public virtual async Task FindByUserNameAsync(string userName, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().OrderBy(x => x.Id).FirstOrDefaultAsync(u => u.UserName == userName, GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) + .OrderBy(x => x.Id) + .FirstOrDefaultAsync(u => u.UserName == userName, cancellationToken); } public virtual async Task> GetListAsync(IEnumerable ids, CancellationToken cancellationToken = default) { - return await GetMongoQueryable().Where(u => ids.Contains(u.Id)).ToListAsync(GetCancellationToken(cancellationToken)); + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) + .Where(u => ids.Contains(u.Id)) + .ToListAsync(cancellationToken); } public async Task> SearchAsync( @@ -38,7 +44,8 @@ namespace Volo.Abp.Users.MongoDB string filter = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -50,12 +57,13 @@ namespace Volo.Abp.Users.MongoDB .OrderBy(sorting ?? nameof(IUserData.UserName)) .As>() .PageBy>(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); + .ToListAsync(cancellationToken); } public async Task GetCountAsync(string filter = null, CancellationToken cancellationToken = default) { - return await GetMongoQueryable() + cancellationToken = GetCancellationToken(cancellationToken); + return await (await GetMongoQueryableAsync(cancellationToken)) .WhereIf>( !filter.IsNullOrWhiteSpace(), u => @@ -64,7 +72,7 @@ namespace Volo.Abp.Users.MongoDB u.Name.Contains(filter) || u.Surname.Contains(filter) ) - .LongCountAsync(GetCancellationToken(cancellationToken)); + .LongCountAsync(cancellationToken); } } } diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en-GB.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en-GB.json new file mode 100644 index 0000000000..cd7cbf3c1a --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/en-GB.json @@ -0,0 +1,14 @@ +{ + "culture": "en-GB", + "texts": { + "VirtualFileExplorer": "Virtual file explorer", + "VirtualFileType": "Virtual file type", + "Menu:VirtualFileExplorer": "Virtual file explorer", + "LastUpdateTime": "Last update time", + "VirtualFileName": "Virtual file name", + "FileContent": "File content", + "Size": "Size", + "BackToRoot": "Back to root", + "EmptyFileInfoList": "There are no virtual files" + } +} \ No newline at end of file diff --git a/npm/ng-packs/packages/core/src/lib/core.module.ts b/npm/ng-packs/packages/core/src/lib/core.module.ts index f25f8f07ac..260cffd4d3 100644 --- a/npm/ng-packs/packages/core/src/lib/core.module.ts +++ b/npm/ng-packs/packages/core/src/lib/core.module.ts @@ -1,5 +1,5 @@ import { CommonModule } from '@angular/common'; -import { HttpClientModule, HttpClientXsrfModule, HTTP_INTERCEPTORS } from '@angular/common/http'; +import { HTTP_INTERCEPTORS, HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'; import { APP_INITIALIZER, Injector, ModuleWithProviders, NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; @@ -30,7 +30,7 @@ import { LocaleProvider } from './providers/locale.provider'; import { LocalizationService } from './services/localization.service'; import { ProfileState } from './states/profile.state'; import { oAuthStorage } from './strategies/auth-flow.strategy'; -import { coreOptionsFactory, CORE_OPTIONS } from './tokens/options.token'; +import { CORE_OPTIONS, coreOptionsFactory } from './tokens/options.token'; import { noop } from './utils/common-utils'; import './utils/date-extensions'; import { getInitialData, localeInitializer } from './utils/initial-utils'; diff --git a/npm/ng-packs/packages/core/src/lib/models/utility.ts b/npm/ng-packs/packages/core/src/lib/models/utility.ts index f1cfbdb6da..3f183d3944 100644 --- a/npm/ng-packs/packages/core/src/lib/models/utility.ts +++ b/npm/ng-packs/packages/core/src/lib/models/utility.ts @@ -1,13 +1,21 @@ +/* tslint:disable:ban-types */ import { TemplateRef, Type } from '@angular/core'; -export type DeepPartial = { - [P in keyof T]?: T[P] extends Serializable ? DeepPartial : T[P]; -}; +export type DeepPartial = Partible extends never + ? T + : { + [K in keyof T]?: DeepPartial; + }; -type Serializable = Record< - string | number | symbol, - string | number | boolean | Record ->; +type Partible = T extends Primitive | Array | Node + ? never + : { + [K in keyof T]: T[K] extends Function ? never : T[K]; + } extends T + ? T + : never; + +export type Primitive = undefined | null | boolean | string | number | bigint | symbol; export type InferredInstanceOf = T extends Type ? U : never; export type InferredContextOf = T extends TemplateRef ? U : never; diff --git a/npm/ng-packs/packages/core/src/lib/services/http-wait.service.ts b/npm/ng-packs/packages/core/src/lib/services/http-wait.service.ts index 96427594ae..7292490a4b 100644 --- a/npm/ng-packs/packages/core/src/lib/services/http-wait.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/http-wait.service.ts @@ -1,44 +1,103 @@ -import { Injectable } from '@angular/core'; +import { Injectable, Injector } from '@angular/core'; import { HttpRequest } from '@angular/common/http'; import { InternalStore } from '../utils/internal-store-utils'; +import { getPathName } from '../utils/http-utils'; +import { map, mapTo, switchMap, takeUntil, tap } from 'rxjs/operators'; +import { of, Subject, timer } from 'rxjs'; +import { LOADER_DELAY } from '../tokens/lodaer-delay.token'; export interface HttpWaitState { - requests: Set>; + requests: HttpRequest[]; + filteredRequests: Array; +} +export interface HttpRequestInfo { + method: string; + endpoint: string; } - @Injectable({ providedIn: 'root', }) export class HttpWaitService { - protected store = new InternalStore({ requests: new Set() }); + protected store = new InternalStore({ + requests: [], + filteredRequests: [], + }); + + private delay: number; + private destroy$ = new Subject(); + + constructor(injector: Injector) { + this.delay = injector.get(LOADER_DELAY, 500); + } getLoading() { - return !!this.store.state.requests.size; + return !!this.applyFilter(this.store.state.requests).length; } getLoading$() { - return this.store.sliceState(({ requests }) => !!requests.size); + return this.store + .sliceState(({ requests }) => requests) + .pipe( + map(requests => !!this.applyFilter(requests).length), + switchMap(condition => + condition + ? this.delay === 0 + ? of(true) + : timer(this.delay).pipe(mapTo(true), takeUntil(this.destroy$)) + : of(false), + ), + tap(() => this.destroy$.next()), + ); } updateLoading$() { - return this.store.sliceUpdate(({ requests }) => !!requests.size); + return this.store.sliceUpdate(({ requests }) => !!this.applyFilter(requests).length); } clearLoading() { - this.store.patch({ requests: new Set() }); + this.store.patch({ requests: [] }); } addRequest(request: HttpRequest) { - const requests = this.store.state.requests; - requests.add(request); - this.store.patch({ requests }); + this.store.patch({ requests: [...this.store.state.requests, request] }); } deleteRequest(request: HttpRequest) { - const requests = this.store.state.requests; - requests.delete(request); + const requests = this.store.state.requests.filter(r => r !== request); this.store.patch({ requests }); } - // TODO: Add filter function + addFilter(request: HttpRequestInfo | HttpRequestInfo[]) { + const requests = Array.isArray(request) ? request : [request]; + const filteredRequests = [ + ...this.store.state.filteredRequests.filter( + f => !requests.some(r => this.isSameRequest(f, r)), + ), + ...requests, + ]; + this.store.patch({ filteredRequests }); + } + + removeFilter(request: HttpRequestInfo | HttpRequestInfo[]) { + const requests = Array.isArray(request) ? request : [request]; + const filteredRequests = this.store.state.filteredRequests.filter( + f => !requests.some(r => this.isSameRequest(f, r)), + ); + this.store.patch({ filteredRequests }); + } + + private applyFilter(requests: HttpRequest[]) { + const { filteredRequests } = this.store.state; + return requests.filter( + ({ method, url }) => + !filteredRequests.find(filteredRequest => + this.isSameRequest(filteredRequest, { method, endpoint: getPathName(url) }), + ), + ); + } + + private isSameRequest(filteredRequest: HttpRequestInfo, request: HttpRequestInfo) { + const { method, endpoint } = filteredRequest; + return endpoint === request.endpoint && method === request.method; + } } diff --git a/npm/ng-packs/packages/core/src/lib/services/permission.service.ts b/npm/ng-packs/packages/core/src/lib/services/permission.service.ts index c89949b064..c549c5a7a8 100644 --- a/npm/ng-packs/packages/core/src/lib/services/permission.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/permission.service.ts @@ -6,7 +6,7 @@ import { ConfigStateService } from './config-state.service'; @Injectable({ providedIn: 'root' }) export class PermissionService { - constructor(private configState: ConfigStateService) {} + constructor(protected configState: ConfigStateService) {} getGrantedPolicy$(key: string) { return this.getStream().pipe( @@ -19,7 +19,7 @@ export class PermissionService { return this.isPolicyGranted(key, policies); } - private isPolicyGranted(key: string, grantedPolicies: Record) { + protected isPolicyGranted(key: string, grantedPolicies: Record) { if (!key) return true; const orRegexp = /\|\|/g; @@ -43,19 +43,19 @@ export class PermissionService { return this.getPolicy(key, grantedPolicies); } - private getStream() { + protected getStream() { return this.configState.getAll$().pipe(map(this.mapToPolicies)); } - private getSnapshot() { + protected getSnapshot() { return this.mapToPolicies(this.configState.getAll()); } - private mapToPolicies(applicationConfiguration: ApplicationConfigurationDto) { - return snq(() => applicationConfiguration.auth.grantedPolicies); + protected mapToPolicies(applicationConfiguration: ApplicationConfigurationDto) { + return snq(() => applicationConfiguration.auth.grantedPolicies, {}); } - private getPolicy(key: string, grantedPolicies: Record) { + protected getPolicy(key: string, grantedPolicies: Record) { return snq(() => grantedPolicies[key], false); } } diff --git a/npm/ng-packs/packages/core/src/lib/services/router-wait.service.ts b/npm/ng-packs/packages/core/src/lib/services/router-wait.service.ts index d1306e63c9..56240d8ca2 100644 --- a/npm/ng-packs/packages/core/src/lib/services/router-wait.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/router-wait.service.ts @@ -1,13 +1,9 @@ -import { Injectable } from '@angular/core'; -import { - NavigationCancel, - NavigationEnd, - NavigationError, - NavigationStart, - Router, -} from '@angular/router'; -import { filter } from 'rxjs/operators'; +import { Injectable, Injector } from '@angular/core'; +import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router } from '@angular/router'; +import { filter, map, mapTo, switchMap, takeUntil, tap } from 'rxjs/operators'; import { InternalStore } from '../utils/internal-store-utils'; +import { of, Subject, timer } from 'rxjs'; +import { LOADER_DELAY } from '../tokens/lodaer-delay.token'; export interface RouterWaitState { loading: boolean; @@ -18,7 +14,10 @@ export interface RouterWaitState { }) export class RouterWaitService { private store = new InternalStore({ loading: false }); - constructor(private router: Router) { + private destroy$ = new Subject(); + private delay: number; + constructor(private router: Router, injector: Injector) { + this.delay = injector.get(LOADER_DELAY, 500); this.router.events .pipe( filter( @@ -28,10 +27,18 @@ export class RouterWaitService { event instanceof NavigationError || event instanceof NavigationCancel, ), + map(event => event instanceof NavigationStart), + switchMap(condition => + condition + ? this.delay === 0 + ? of(true) + : timer(this.delay || 0).pipe(mapTo(true), takeUntil(this.destroy$)) + : of(false), + ), + tap(() => this.destroy$.next()), ) - .subscribe(event => { - if (event instanceof NavigationStart) this.setLoading(true); - else this.setLoading(false); + .subscribe(status => { + this.setLoading(status); }); } diff --git a/npm/ng-packs/packages/core/src/lib/tokens/index.ts b/npm/ng-packs/packages/core/src/lib/tokens/index.ts index 8d23d581a5..2e79e70ef3 100644 --- a/npm/ng-packs/packages/core/src/lib/tokens/index.ts +++ b/npm/ng-packs/packages/core/src/lib/tokens/index.ts @@ -1,2 +1,3 @@ export * from './list.token'; +export * from './lodaer-delay.token'; export * from './options.token'; diff --git a/npm/ng-packs/packages/core/src/lib/tokens/lodaer-delay.token.ts b/npm/ng-packs/packages/core/src/lib/tokens/lodaer-delay.token.ts new file mode 100644 index 0000000000..270059e437 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/tokens/lodaer-delay.token.ts @@ -0,0 +1,3 @@ +import { InjectionToken } from '@angular/core'; + +export const LOADER_DELAY = new InjectionToken('LOADER_DELAY'); diff --git a/npm/ng-packs/packages/core/src/lib/utils/http-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/http-utils.ts new file mode 100644 index 0000000000..50259ec294 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/utils/http-utils.ts @@ -0,0 +1,4 @@ +export function getPathName(url: string): string { + const { pathname } = new URL(url); + return pathname; +} diff --git a/npm/ng-packs/packages/core/src/lib/utils/index.ts b/npm/ng-packs/packages/core/src/lib/utils/index.ts index 2d7ef8eab4..d50fa7712f 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/index.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/index.ts @@ -6,6 +6,7 @@ export * from './factory-utils'; export * from './file-utils'; export * from './form-utils'; export * from './generator-utils'; +export * from './http-utils'; export * from './initial-utils'; export * from './internal-store-utils'; export * from './lazy-load-utils'; diff --git a/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts index ea4af9ddfb..27a8e9cbcf 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/internal-store-utils.ts @@ -33,7 +33,7 @@ export class InternalStore { } this.state$.next(patchedState); - this.update$.next(patchedState); + this.update$.next(patchedState as DeepPartial); } deepPatch(state: DeepPartial) { @@ -43,7 +43,7 @@ export class InternalStore { set(state: State) { this.state$.next(state); - this.update$.next(state); + this.update$.next(state as DeepPartial); } reset() { diff --git a/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts b/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts index 7fa32a1b89..1718946cab 100644 --- a/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts +++ b/npm/ng-packs/packages/core/testing/src/lib/core-testing.module.ts @@ -1,9 +1,11 @@ import { ABP, BaseCoreModule, - coreOptionsFactory, CORE_OPTIONS, + coreOptionsFactory, LIST_QUERY_DEBOUNCE_TIME, + LOADER_DELAY, + PermissionService, RestService, } from '@abp/ng.core'; import { APP_BASE_HREF } from '@angular/common'; @@ -11,6 +13,7 @@ import { ModuleWithProviders, NgModule } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { provideRoutes } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; +import { MockPermissionService } from './services/mock-permission.service'; import { MockRestService } from './services/mock-rest.service'; /** @@ -42,10 +45,18 @@ export class CoreTestingModule { provide: LIST_QUERY_DEBOUNCE_TIME, useValue: listQueryDebounceTime, }, + { + provide: PermissionService, + useClass: MockPermissionService, + }, { provide: RestService, useClass: MockRestService, }, + { + provide: LOADER_DELAY, + useValue: 0, + }, provideRoutes(routes), ], }; diff --git a/npm/ng-packs/packages/core/testing/src/lib/services/index.ts b/npm/ng-packs/packages/core/testing/src/lib/services/index.ts index 24206d7c5d..128750c0bc 100644 --- a/npm/ng-packs/packages/core/testing/src/lib/services/index.ts +++ b/npm/ng-packs/packages/core/testing/src/lib/services/index.ts @@ -1 +1,2 @@ +export * from './mock-permission.service'; export * from './mock-rest.service'; diff --git a/npm/ng-packs/packages/core/testing/src/lib/services/mock-permission.service.ts b/npm/ng-packs/packages/core/testing/src/lib/services/mock-permission.service.ts new file mode 100644 index 0000000000..81bbdcc625 --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/services/mock-permission.service.ts @@ -0,0 +1,34 @@ +import { ConfigStateService, PermissionService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class MockPermissionService extends PermissionService { + constructor(protected configState: ConfigStateService) { + super(configState); + this.grantAllPolicies(); + } + + grantAllPolicies() { + const grantedPolicies = new Proxy( + {}, + { + get() { + return true; + }, + }, + ); + + this.configState['store'].deepPatch({ auth: { grantedPolicies } }); + } + + grantPolicies(keys: string[]) { + const grantedPolicies = keys.reduce((policies, key) => { + policies[key] = true; + return policies; + }, {}); + + this.configState['store'].deepPatch({ auth: { grantedPolicies } }); + } +} diff --git a/npm/ng-packs/packages/core/testing/src/lib/utils/clear-page.util.ts b/npm/ng-packs/packages/core/testing/src/lib/utils/clear-page.util.ts new file mode 100644 index 0000000000..3570d25f2d --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/utils/clear-page.util.ts @@ -0,0 +1,10 @@ +import { ComponentFixture } from '@angular/core/testing'; + +export function clearPage(_fixture: ComponentFixture) { + if (!document) return; + + const elements = document.querySelectorAll('body > *'); + elements.forEach(element => { + if (/^(abp|ngb)-/i.test(element.tagName)) document.body.removeChild(element); + }); +} diff --git a/npm/ng-packs/packages/core/testing/src/lib/utils/index.ts b/npm/ng-packs/packages/core/testing/src/lib/utils/index.ts new file mode 100644 index 0000000000..3de5c9748e --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/utils/index.ts @@ -0,0 +1,2 @@ +export * from './clear-page.util'; +export * from './wait.util'; diff --git a/npm/ng-packs/packages/core/testing/src/lib/utils/wait.util.ts b/npm/ng-packs/packages/core/testing/src/lib/utils/wait.util.ts new file mode 100644 index 0000000000..9bd6b4435f --- /dev/null +++ b/npm/ng-packs/packages/core/testing/src/lib/utils/wait.util.ts @@ -0,0 +1,6 @@ +import { ComponentFixture } from '@angular/core/testing'; + +export function wait(fixture: ComponentFixture, timeout = 0) { + fixture.detectChanges(); + return new Promise(res => setTimeout(res, timeout)); +} diff --git a/npm/ng-packs/packages/core/testing/src/public-api.ts b/npm/ng-packs/packages/core/testing/src/public-api.ts index 3b48853680..657f628e28 100644 --- a/npm/ng-packs/packages/core/testing/src/public-api.ts +++ b/npm/ng-packs/packages/core/testing/src/public-api.ts @@ -1 +1,3 @@ export * from './lib/core-testing.module'; +export * from './lib/services'; +export * from './lib/utils'; diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html index 9963224c2d..97d0616eb3 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html +++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html @@ -35,8 +35,41 @@ -
- +
+ + + + +
diff --git a/npm/ng-packs/packages/schematics/src/commands/api/files-enum/proxy/__namespace@dir__/__name@kebab__.enum.ts.template b/npm/ng-packs/packages/schematics/src/commands/api/files-enum/proxy/__namespace@dir__/__name@kebab__.enum.ts.template index 795ec2bbf6..8b4254090d 100644 --- a/npm/ng-packs/packages/schematics/src/commands/api/files-enum/proxy/__namespace@dir__/__name@kebab__.enum.ts.template +++ b/npm/ng-packs/packages/schematics/src/commands/api/files-enum/proxy/__namespace@dir__/__name@kebab__.enum.ts.template @@ -2,7 +2,7 @@ import { mapEnumToOptions } from '@abp/ng.core'; export enum <%= name %> {<% for (let member of members) { %> - <%= member.key %> = <%= member.value %>,<% } %> + <%= member.key %> = <%= quote(member.value) %>,<% } %> } export const <%= camel(name) %>Options = mapEnumToOptions(<%= name %>); diff --git a/npm/ng-packs/packages/schematics/src/utils/text.ts b/npm/ng-packs/packages/schematics/src/utils/text.ts index 379ea78601..e24129beff 100644 --- a/npm/ng-packs/packages/schematics/src/utils/text.ts +++ b/npm/ng-packs/packages/schematics/src/utils/text.ts @@ -10,6 +10,9 @@ export const macro = (text: string) => upper(snake(text)); export const dir = (text: string) => strings.dasherize(text.replace(/\./g, '/').replace(/\/\//g, '/')); +export const quote = (value: number | string) => + typeof value === 'string' ? `'${value.replace(/'/g, '\\\'')}'` : value; + function _(text: string): string { return text.replace(/\./g, '_'); } diff --git a/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts b/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts index a947809623..70adcf764e 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts @@ -2,18 +2,23 @@ import { CoreModule } from '@abp/ng.core'; import { ThemeSharedModule } from '@abp/ng.theme.shared'; import { ModuleWithProviders, NgModule } from '@angular/core'; import { NgbCollapseModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; -import { NgxValidateCoreModule } from '@ngx-validate/core'; +import { + NgxValidateCoreModule, + VALIDATION_ERROR_TEMPLATE, + VALIDATION_INVALID_CLASSES, + VALIDATION_TARGET_SELECTOR, +} from '@ngx-validate/core'; import { AccountLayoutComponent } from './components/account-layout/account-layout.component'; import { ApplicationLayoutComponent } from './components/application-layout/application-layout.component'; import { EmptyLayoutComponent } from './components/empty-layout/empty-layout.component'; import { LogoComponent } from './components/logo/logo.component'; +import { CurrentUserComponent } from './components/nav-items/current-user.component'; +import { LanguagesComponent } from './components/nav-items/languages.component'; import { NavItemsComponent } from './components/nav-items/nav-items.component'; import { RoutesComponent } from './components/routes/routes.component'; import { ValidationErrorComponent } from './components/validation-error/validation-error.component'; -import { CurrentUserComponent } from './components/nav-items/current-user.component'; -import { LanguagesComponent } from './components/nav-items/languages.component'; -import { BASIC_THEME_STYLES_PROVIDERS } from './providers/styles.provider'; import { BASIC_THEME_NAV_ITEM_PROVIDERS } from './providers/nav-item.provider'; +import { BASIC_THEME_STYLES_PROVIDERS } from './providers/styles.provider'; export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent]; @@ -45,37 +50,32 @@ export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, Empt ], entryComponents: [...LAYOUTS, ValidationErrorComponent, CurrentUserComponent, LanguagesComponent], }) +export class BaseThemeBasicModule {} + +@NgModule({ + exports: [BaseThemeBasicModule], + imports: [BaseThemeBasicModule], +}) export class ThemeBasicModule { static forRoot(): ModuleWithProviders { return { - ngModule: RootThemeBasicModule, - providers: [BASIC_THEME_NAV_ITEM_PROVIDERS, BASIC_THEME_STYLES_PROVIDERS], + ngModule: ThemeBasicModule, + providers: [ + BASIC_THEME_NAV_ITEM_PROVIDERS, + BASIC_THEME_STYLES_PROVIDERS, + { + provide: VALIDATION_ERROR_TEMPLATE, + useValue: ValidationErrorComponent, + }, + { + provide: VALIDATION_TARGET_SELECTOR, + useValue: '.form-group', + }, + { + provide: VALIDATION_INVALID_CLASSES, + useValue: 'is-invalid', + }, + ], }; } } - -@NgModule({ - imports: [ - NgxValidateCoreModule.forRoot({ - targetSelector: '.form-group', - blueprints: { - creditCard: 'AbpValidation::ThisFieldIsNotAValidCreditCardNumber.', - email: 'AbpValidation::ThisFieldIsNotAValidEmailAddress.', - invalid: 'AbpValidation::ThisFieldIsNotValid.', - max: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]', - maxlength: - 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}[{{ requiredLength }}]', - min: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]', - minlength: - 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}[{{ requiredLength }}]', - ngbDate: 'AbpValidation::ThisFieldIsNotValid.', - passwordMismatch: 'AbpIdentity::Volo.Abp.Identity:PasswordConfirmationFailed', - range: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]', - required: 'AbpValidation::ThisFieldIsRequired.', - url: 'AbpValidation::ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl', - }, - errorTemplate: ValidationErrorComponent, - }), - ], -}) -export class RootThemeBasicModule {} diff --git a/npm/ng-packs/packages/theme-basic/testing/ng-package.json b/npm/ng-packs/packages/theme-basic/testing/ng-package.json new file mode 100644 index 0000000000..c539597da7 --- /dev/null +++ b/npm/ng-packs/packages/theme-basic/testing/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/theme-basic/testing", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/theme-basic/testing/src/lib/theme-basic-testing.module.ts b/npm/ng-packs/packages/theme-basic/testing/src/lib/theme-basic-testing.module.ts new file mode 100644 index 0000000000..7df6d40231 --- /dev/null +++ b/npm/ng-packs/packages/theme-basic/testing/src/lib/theme-basic-testing.module.ts @@ -0,0 +1,32 @@ +import { + BaseThemeBasicModule, + BASIC_THEME_NAV_ITEM_PROVIDERS, + BASIC_THEME_STYLES_PROVIDERS, + ValidationErrorComponent, +} from '@abp/ng.theme.basic'; +import { ModuleWithProviders, NgModule } from '@angular/core'; +import { VALIDATION_ERROR_TEMPLATE, VALIDATION_TARGET_SELECTOR } from '@ngx-validate/core'; + +@NgModule({ + exports: [BaseThemeBasicModule], + imports: [BaseThemeBasicModule], +}) +export class ThemeBasicTestingModule { + static forRoot(): ModuleWithProviders { + return { + ngModule: ThemeBasicTestingModule, + providers: [ + BASIC_THEME_NAV_ITEM_PROVIDERS, + BASIC_THEME_STYLES_PROVIDERS, + { + provide: VALIDATION_ERROR_TEMPLATE, + useValue: ValidationErrorComponent, + }, + { + provide: VALIDATION_TARGET_SELECTOR, + useValue: '.form-group', + }, + ], + }; + } +} diff --git a/npm/ng-packs/packages/theme-basic/testing/src/public-api.ts b/npm/ng-packs/packages/theme-basic/testing/src/public-api.ts new file mode 100644 index 0000000000..24a3ac7586 --- /dev/null +++ b/npm/ng-packs/packages/theme-basic/testing/src/public-api.ts @@ -0,0 +1 @@ +export * from './lib/theme-basic-testing.module'; diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.ts b/npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.ts index 7e592cc4b0..893d6e6344 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.ts @@ -27,6 +27,7 @@ import { ePropType } from '../../enums/props.enum'; import { FormProp } from '../../models/form-props'; import { PropData } from '../../models/props'; import { selfFactory } from '../../utils/factory.util'; +import { addTypeaheadTextSuffix } from '../../utils/typeahead.util'; @Component({ selector: 'abp-extensible-form-prop', @@ -96,10 +97,10 @@ export class ExtensibleFormPropComponent implements OnChanges { private getTypeaheadControls() { const { name } = this.prop; - const textSuffix = '_Text'; const extraPropName = `${EXTRA_PROPERTIES_KEY}.${name}`; const keyControl = - this.form.get(extraPropName + textSuffix) || this.form.get(name + textSuffix); + this.form.get(addTypeaheadTextSuffix(extraPropName)) || + this.form.get(addTypeaheadTextSuffix(name)); const valueControl = this.form.get(extraPropName) || this.form.get(name); return [keyControl, valueControl]; } diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/lib/models/internal/object-extensions.ts b/npm/ng-packs/packages/theme-shared/extensions/src/lib/models/internal/object-extensions.ts index db24cfe471..448183b8a0 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/lib/models/internal/object-extensions.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/lib/models/internal/object-extensions.ts @@ -3,11 +3,20 @@ import { EntityPropList } from '../entity-props'; import { FormPropList } from '../form-props'; import { PropContributorCallbacks } from '../props'; +export type DisplayNameGeneratorFn = ( + displayName: LocalizableStringDto, + fallback: LocalizableStringDto, +) => string; + +export type EntityExtensions = Record; + export interface EntityExtensionDto { - properties: Record; + properties: EntityExtensionProperties; configuration: Record; } +export type EntityExtensionProperties = Record; + export interface ExtensionEnumDto { fields: ExtensionEnumFieldDto[]; localizationResource?: string; diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts index b8b2687232..4920687077 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts @@ -14,7 +14,12 @@ import { PropCallback } from '../models/props'; import { createEnum, createEnumOptions, createEnumValueResolver } from './enum.util'; import { createDisplayNameLocalizationPipeKeyGenerator } from './localization.util'; import { createExtraPropertyValueResolver } from './props.util'; -import { createTypeaheadOptions, getTypeaheadType } from './typeahead.util'; +import { + createTypeaheadDisplayNameGenerator, + createTypeaheadOptions, + getTypeaheadType, + hasTypeaheadTextSuffix, +} from './typeahead.util'; import { getValidatorsFromProperty } from './validation.util'; function selectObjectExtensions( @@ -59,7 +64,7 @@ export function getObjectExtensionEntitiesFromStore( .entities; }), map(entities => (isUndefined(entities) ? {} : entities)), - filter(Boolean), + filter(Boolean), take(1), ); } @@ -75,7 +80,7 @@ export function mapEntitiesToContributors( const generateDisplayName = createDisplayNameLocalizationPipeKeyGenerator(localization); return Object.keys(entities).reduce( - (acc, key: keyof Entities) => { + (acc, key: keyof ObjectExtensions.EntityExtensions) => { acc.prop[key] = []; acc.createForm[key] = []; acc.editForm[key] = []; @@ -108,23 +113,30 @@ export function mapEntitiesToContributors( } function createPropertiesToContributorsMapper( - generateDisplayName: DisplayNameGeneratorFn, + generateDisplayName: ObjectExtensions.DisplayNameGeneratorFn, resource: string, enums: Record, ) { return ( - properties: Record, + properties: ObjectExtensions.EntityExtensionProperties, contributors: ObjectExtensions.PropContributors, key: string, ) => { const isExtra = true; + const generateTypeaheadDisplayName = createTypeaheadDisplayNameGenerator( + generateDisplayName, + properties, + ); Object.keys(properties).forEach((name: string) => { const property = properties[name]; const propName = name; const lookup = property.ui.lookup || ({} as ExtensionPropertyUiLookupDto); const type = getTypeaheadType(lookup, name) || getTypeFromProperty(property); - const displayName = generateDisplayName(property.displayName, { name, resource }); + const generateDN = hasTypeaheadTextSuffix(name) + ? generateTypeaheadDisplayName + : generateDisplayName; + const displayName = generateDN(property.displayName, { name, resource }); if (property.ui.onTable.isVisible) { const sortable = Boolean(property.ui.onTable.isSortable); @@ -186,6 +198,3 @@ function getTypeFromProperty(property: ObjectExtensions.ExtensionPropertyDto): e function isUndefined(obj: any): obj is undefined { return typeof obj === 'undefined'; } - -type DisplayNameGeneratorFn = ReturnType; -type Entities = Record; diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/typeahead.util.ts b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/typeahead.util.ts index be89c4a295..b34528104d 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/typeahead.util.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/typeahead.util.ts @@ -2,8 +2,12 @@ import { ABP, ExtensionPropertyUiLookupDto, RestService } from '@abp/ng.core'; import { Observable, of } from 'rxjs'; import { map } from 'rxjs/operators'; import { ePropType } from '../enums/props.enum'; +import { ObjectExtensions } from '../models/object-extensions'; import { PropCallback } from '../models/props'; +const TYPEAHEAD_TEXT_SUFFIX = '_Text'; +const TYPEAHEAD_TEXT_SUFFIX_REGEX = /_Text$/; + export function createTypeaheadOptions( lookup: ExtensionPropertyUiLookupDto, ): PropCallback[]>> { @@ -37,7 +41,32 @@ export function createTypeaheadOptions( export function getTypeaheadType(lookup: ExtensionPropertyUiLookupDto, name: string) { return Boolean(lookup.url) ? ePropType.Typeahead - : name.endsWith('_Text') + : name.endsWith(TYPEAHEAD_TEXT_SUFFIX) ? ePropType.Hidden : undefined; } + +export function createTypeaheadDisplayNameGenerator( + displayNameGeneratorFn: ObjectExtensions.DisplayNameGeneratorFn, + properties: ObjectExtensions.EntityExtensionProperties, +): ObjectExtensions.DisplayNameGeneratorFn { + return (displayName, fallback) => { + const name = removeTypeaheadTextSuffix(fallback.name); + return displayNameGeneratorFn(displayName || properties[name].displayName, { + name, + resource: fallback.resource, + }); + }; +} + +export function addTypeaheadTextSuffix(name: string) { + return name + TYPEAHEAD_TEXT_SUFFIX; +} + +export function hasTypeaheadTextSuffix(name: string) { + return TYPEAHEAD_TEXT_SUFFIX_REGEX.test(name); +} + +export function removeTypeaheadTextSuffix(name: string) { + return name.replace(TYPEAHEAD_TEXT_SUFFIX_REGEX, ''); +} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/loader-bar/loader-bar.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/loader-bar/loader-bar.component.ts index 1700efafe2..3fd01d1b4d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/loader-bar/loader-bar.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/loader-bar/loader-bar.component.ts @@ -76,7 +76,7 @@ export class LoaderBarComponent implements OnDestroy, OnInit { private cdRef: ChangeDetectorRef, private subscription: SubscriptionService, private httpWaitService: HttpWaitService, - private routerWaiterService: RouterWaitService, + private routerWaitService: RouterWaitService, ) {} ngOnInit() { @@ -85,7 +85,7 @@ export class LoaderBarComponent implements OnDestroy, OnInit { subscribeLoading() { this.subscription.addOne( - combineLatest([this.httpWaitService.getLoading$(), this.routerWaiterService.getLoading$()]), + combineLatest([this.httpWaitService.getLoading$(), this.routerWaitService.getLoading$()]), ([httpLoading, routerLoading]) => { if (httpLoading || routerLoading) this.startLoading(); else this.stopLoading(); @@ -102,6 +102,7 @@ export class LoaderBarComponent implements OnDestroy, OnInit { this.isLoading = true; this.progressLevel = 0; + this.cdRef.detectChanges(); this.interval = timer(0, this.intervalPeriod).subscribe(this.reportProgress); this.timer.unsubscribe(); } diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts index 7e5d62fb6a..439989ef73 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts @@ -1,5 +1,8 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; +/** + * @deprecated To be deleted in v5.0. Use ngx-datatale instead. + */ @Component({ selector: 'abp-sort-order-icon', templateUrl: './sort-order-icon.component.html', diff --git a/npm/ng-packs/packages/theme-shared/src/lib/constants/validation.ts b/npm/ng-packs/packages/theme-shared/src/lib/constants/validation.ts new file mode 100644 index 0000000000..463a7b01dc --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/constants/validation.ts @@ -0,0 +1,16 @@ +export const DEFAULT_VALIDATION_BLUEPRINTS = { + creditCard: 'AbpValidation::ThisFieldIsNotAValidCreditCardNumber.', + email: 'AbpValidation::ThisFieldIsNotAValidEmailAddress.', + invalid: 'AbpValidation::ThisFieldIsNotValid.', + max: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]', + maxlength: + 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}[{{ requiredLength }}]', + min: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]', + minlength: + 'AbpValidation::ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}[{{ requiredLength }}]', + ngbDate: 'AbpValidation::ThisFieldIsNotValid.', + passwordMismatch: 'AbpIdentity::Volo.Abp.Identity:PasswordConfirmationFailed', + range: 'AbpValidation::ThisFieldMustBeBetween{0}And{1}[{{ min }},{{ max }}]', + required: 'AbpValidation::ThisFieldIsRequired.', + url: 'AbpValidation::ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl', +}; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/models/common.ts b/npm/ng-packs/packages/theme-shared/src/lib/models/common.ts index 09171179c4..64047e0db7 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/models/common.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/models/common.ts @@ -1,7 +1,9 @@ import { Type } from '@angular/core'; +import { Validation } from '@ngx-validate/core'; export interface RootParams { httpErrorConfig: HttpErrorConfig; + validation?: Partial; } export type ErrorScreenErrorCodes = 401 | 403 | 404 | 500; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/loader-bar.component.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/loader-bar.component.spec.ts index 6d1ab85a46..2326009044 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/loader-bar.component.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/loader-bar.component.spec.ts @@ -2,7 +2,7 @@ import { NavigationEnd, NavigationError, NavigationStart, Router } from '@angula import { createComponentFactory, Spectator, SpyObject } from '@ngneat/spectator/jest'; import { Subject, timer } from 'rxjs'; import { LoaderBarComponent } from '../components/loader-bar/loader-bar.component'; -import { HttpWaitService, SubscriptionService } from '@abp/ng.core'; +import { HttpWaitService, LOADER_DELAY, SubscriptionService } from '@abp/ng.core'; import { HttpRequest } from '@angular/common/http'; describe('LoaderBarComponent', () => { @@ -13,7 +13,11 @@ describe('LoaderBarComponent', () => { const createComponent = createComponentFactory({ component: LoaderBarComponent, detectChanges: false, - providers: [SubscriptionService, { provide: Router, useValue: { events: events$ } }], + providers: [ + SubscriptionService, + { provide: Router, useValue: { events: events$ } }, + { provide: LOADER_DELAY, useValue: 0 }, + ], }); beforeEach(() => { @@ -39,12 +43,11 @@ describe('LoaderBarComponent', () => { }, 10); }); - test.skip('should be interval unsubscribed', done => { + it('should be interval unsubscribed', done => { spectator.detectChanges(); const httpWaitService = spectator.inject(HttpWaitService); httpWaitService.addRequest(new HttpRequest('GET', 'test')); expect(spectator.component.interval.closed).toBe(false); - timer(400).subscribe(() => { expect(spectator.component.interval.closed).toBe(true); done(); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 6775c15e5a..8d64febdbf 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -2,7 +2,13 @@ import { CoreModule, noop } from '@abp/ng.core'; import { DatePipe } from '@angular/common'; import { APP_INITIALIZER, Injector, ModuleWithProviders, NgModule } from '@angular/core'; import { NgbDateParserFormatter, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; -import { NgxValidateCoreModule } from '@ngx-validate/core'; +import { + defaultMapErrorsFn, + NgxValidateCoreModule, + VALIDATION_BLUEPRINTS, + VALIDATION_MAP_ERRORS_FN, + VALIDATION_VALIDATE_ON_SUBMIT, +} from '@ngx-validate/core'; import { NgxDatatableModule } from '@swimlane/ngx-datatable'; import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.component'; import { ButtonComponent } from './components/button/button.component'; @@ -18,6 +24,7 @@ import { TableEmptyMessageComponent } from './components/table-empty-message/tab import { TableComponent } from './components/table/table.component'; import { ToastContainerComponent } from './components/toast-container/toast-container.component'; import { ToastComponent } from './components/toast/toast.component'; +import { DEFAULT_VALIDATION_BLUEPRINTS } from './constants/validation'; import { LoadingDirective } from './directives/loading.directive'; import { NgxDatatableDefaultDirective } from './directives/ngx-datatable-default.directive'; import { NgxDatatableListDirective } from './directives/ngx-datatable-list.directive'; @@ -27,7 +34,7 @@ import { initLazyStyleHandler } from './handlers/lazy-style.handler'; import { RootParams } from './models/common'; import { THEME_SHARED_ROUTE_PROVIDERS } from './providers/route.provider'; import { THEME_SHARED_APPEND_CONTENT } from './tokens/append-content.token'; -import { httpErrorConfigFactory, HTTP_ERROR_CONFIG } from './tokens/http-error.token'; +import { HTTP_ERROR_CONFIG, httpErrorConfigFactory } from './tokens/http-error.token'; import { DateParserFormatter } from './utils/date-parser-formatter'; const declarationsWithExports = [ @@ -69,7 +76,9 @@ export class BaseThemeSharedModule {} exports: [BaseThemeSharedModule], }) export class ThemeSharedModule { - static forRoot(options = {} as RootParams): ModuleWithProviders { + static forRoot( + { httpErrorConfig, validation = {} } = {} as RootParams, + ): ModuleWithProviders { return { ngModule: ThemeSharedModule, providers: [ @@ -92,13 +101,28 @@ export class ThemeSharedModule { deps: [Injector], useFactory: initLazyStyleHandler, }, - { provide: HTTP_ERROR_CONFIG, useValue: options.httpErrorConfig }, + { provide: HTTP_ERROR_CONFIG, useValue: httpErrorConfig }, { provide: 'HTTP_ERROR_CONFIG', useFactory: httpErrorConfigFactory, deps: [HTTP_ERROR_CONFIG], }, { provide: NgbDateParserFormatter, useClass: DateParserFormatter }, + { + provide: VALIDATION_BLUEPRINTS, + useValue: { + ...DEFAULT_VALIDATION_BLUEPRINTS, + ...(validation.blueprints || {}), + }, + }, + { + provide: VALIDATION_MAP_ERRORS_FN, + useValue: validation.mapErrorsFn || defaultMapErrorsFn, + }, + { + provide: VALIDATION_VALIDATE_ON_SUBMIT, + useValue: validation.validateOnSubmit, + }, ], }; } diff --git a/npm/ng-packs/packages/theme-shared/src/public-api.ts b/npm/ng-packs/packages/theme-shared/src/public-api.ts index 7cc8e821d5..5a4f9efe95 100644 --- a/npm/ng-packs/packages/theme-shared/src/public-api.ts +++ b/npm/ng-packs/packages/theme-shared/src/public-api.ts @@ -5,6 +5,7 @@ export * from './lib/animations'; export * from './lib/components'; export { BOOTSTRAP } from './lib/constants/styles'; +export * from './lib/constants/validation'; export * from './lib/directives'; export * from './lib/enums'; export { ErrorHandler } from './lib/handlers'; diff --git a/npm/ng-packs/packages/theme-shared/testing/src/lib/models/config.ts b/npm/ng-packs/packages/theme-shared/testing/src/lib/models/config.ts new file mode 100644 index 0000000000..1b4825cf9f --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/testing/src/lib/models/config.ts @@ -0,0 +1,5 @@ +import { Validation } from '@ngx-validate/core'; + +export interface Config { + validation?: Partial; +} diff --git a/npm/ng-packs/packages/theme-shared/testing/src/lib/models/index.ts b/npm/ng-packs/packages/theme-shared/testing/src/lib/models/index.ts new file mode 100644 index 0000000000..f03c2281a9 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/testing/src/lib/models/index.ts @@ -0,0 +1 @@ +export * from './config'; diff --git a/npm/ng-packs/packages/theme-shared/testing/src/lib/theme-shared-testing.module.ts b/npm/ng-packs/packages/theme-shared/testing/src/lib/theme-shared-testing.module.ts index 323281046a..52abb12ffe 100644 --- a/npm/ng-packs/packages/theme-shared/testing/src/lib/theme-shared-testing.module.ts +++ b/npm/ng-packs/packages/theme-shared/testing/src/lib/theme-shared-testing.module.ts @@ -1,11 +1,19 @@ import { BaseThemeSharedModule, DateParserFormatter, + DEFAULT_VALIDATION_BLUEPRINTS, THEME_SHARED_ROUTE_PROVIDERS, } from '@abp/ng.theme.shared'; import { ModuleWithProviders, NgModule } from '@angular/core'; import { RouterTestingModule } from '@angular/router/testing'; import { NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap'; +import { + defaultMapErrorsFn, + VALIDATION_BLUEPRINTS, + VALIDATION_MAP_ERRORS_FN, + VALIDATION_VALIDATE_ON_SUBMIT, +} from '@ngx-validate/core'; +import { Config } from './models/config'; /** * ThemeSharedTestingModule is the module that will be used in tests @@ -15,12 +23,29 @@ import { NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap'; imports: [RouterTestingModule, BaseThemeSharedModule], }) export class ThemeSharedTestingModule { - static withConfig(): ModuleWithProviders { + static withConfig( + { validation = {} } = {} as Config, + ): ModuleWithProviders { return { ngModule: ThemeSharedTestingModule, providers: [ THEME_SHARED_ROUTE_PROVIDERS, { provide: NgbDateParserFormatter, useClass: DateParserFormatter }, + { + provide: VALIDATION_BLUEPRINTS, + useValue: { + ...DEFAULT_VALIDATION_BLUEPRINTS, + ...(validation.blueprints || {}), + }, + }, + { + provide: VALIDATION_MAP_ERRORS_FN, + useValue: validation.mapErrorsFn || defaultMapErrorsFn, + }, + { + provide: VALIDATION_VALIDATE_ON_SUBMIT, + useValue: validation.validateOnSubmit, + }, ], }; } diff --git a/npm/ng-packs/packages/theme-shared/testing/src/public-api.ts b/npm/ng-packs/packages/theme-shared/testing/src/public-api.ts index 14355a8a28..dc639b1462 100644 --- a/npm/ng-packs/packages/theme-shared/testing/src/public-api.ts +++ b/npm/ng-packs/packages/theme-shared/testing/src/public-api.ts @@ -1 +1,3 @@ +import * as ThemeSharedTesting from './lib/models'; export * from './lib/theme-shared-testing.module'; +export { ThemeSharedTesting }; diff --git a/npm/ng-packs/scripts/publish.ts b/npm/ng-packs/scripts/publish.ts index b8da3637db..7e6f683c96 100644 --- a/npm/ng-packs/scripts/publish.ts +++ b/npm/ng-packs/scripts/publish.ts @@ -8,13 +8,14 @@ program '-v, --nextVersion ', 'next semantic version. Available versions: ["major", "minor", "patch", "premajor", "preminor", "prepatch", "prerelease", "or type a custom version"]', ) + .option('-r, --registry ', 'target npm server registry') .option('-p, --preview', 'publishes with preview tag') .option('-r, --rc', 'publishes with next tag') .option('-g, --skipGit', 'skips git push'); program.parse(process.argv); -const publish = async () => { +(async () => { const versions = ['major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease']; if (!program.nextVersion) { @@ -22,9 +23,11 @@ const publish = async () => { process.exit(1); } - const registry = program.preview - ? 'https://www.myget.org/F/abp-nightly/auth/8f2a5234-1bce-4dc7-b976-2983078590a9/npm/' - : 'https://registry.npmjs.org'; + const registry = + program.registry || + (program.preview + ? 'https://www.myget.org/F/abp-nightly/auth/8f2a5234-1bce-4dc7-b976-2983078590a9/npm/' + : 'https://registry.npmjs.org'); try { await fse.remove('../dist'); @@ -88,8 +91,4 @@ const publish = async () => { } process.exit(0); -}; - -publish(); - -export default publish; +})(); diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock index a3f300d1c8..bc2c1e46f5 100644 --- a/npm/ng-packs/yarn.lock +++ b/npm/ng-packs/yarn.lock @@ -92,14 +92,7 @@ chart.js "^2.9.3" tslib "^2.0.0" -"@abp/utils@^4.1.0-rc.1": - version "4.1.0-rc.1" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.1.0-rc.1.tgz#2863867985db9d178a5ce4347309f060f1ce6142" - integrity sha512-C8e+x5/IdkJWQ8gLtO7ygsth5sd1iXKn0ARu/5u0g11nMjHsMY9Qkwg5QrnpHp2ws1+FL1Dg67omrQp9+KK5SA== - dependencies: - just-compare "^1.3.0" - -"@abp/utils@^4.1.0-rc.2": +"@abp/utils@^4.1.0-rc.1", "@abp/utils@^4.1.0-rc.2": version "4.1.0-rc.2" resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.1.0-rc.2.tgz#eb6dbf0ee493d0f050b37347d2d6d283098aedae" integrity sha512-V2k5I89lVBoeGIKgg4p2H9GlMAcDWbctwKZPVwBEMVEVm1uTR2xQAWdTdSFd5Q8I8Xsf/aIG8ELM7l5j2h7/zQ== @@ -124,31 +117,31 @@ "@angular-devkit/core" "10.1.7" rxjs "6.6.2" -"@angular-devkit/architect@0.1100.4": - version "0.1100.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1100.4.tgz#68c2b0333daa0291ad99205862111c04e7a63020" - integrity sha512-hzTfcSUwM0jsSt9HvvSFyaoAhX9k73L7y4kmkghzIFhKhIKOp/7o3n7hAFwN/jWKKmVQpPKnYmqzm9H9OveaCQ== +"@angular-devkit/architect@0.1100.5": + version "0.1100.5" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1100.5.tgz#3cf9b25464d484160b10417668efbdbd15c9e492" + integrity sha512-yOYfucNouc1doTbcGbCNMXGMSc36+j97XpdNoeGyzFQ7GwezLAro0a9gxc5PdOxndfelkND7J1JuOjxdW5O17A== dependencies: - "@angular-devkit/core" "11.0.4" + "@angular-devkit/core" "11.0.5" rxjs "6.6.3" "@angular-devkit/architect@>=0.1000.0 < 0.1100.0": - version "0.1002.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1002.0.tgz#470b78aaf79308a23da6a0d3935f2d1f85dcb212" - integrity sha512-twM8V03ujBIGVpgV1PBlSDodUdxtUb7WakutfWafAvEHUsgwzfvQz2VtKWvjNZ9AiYjnCuwkQaclqVv0VHNo9w== + version "0.1002.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1002.1.tgz#bd33dda1361b5d7c23e07b41a603b48ac9c3c744" + integrity sha512-vP27xCe++p3zm+zwSDXDm9/rsM71Q4MYidLLi0MQfo8wxsWS/4mWXycCBoMwDkvW44SPJ4Ds1/F46bb3/xRDvA== dependencies: - "@angular-devkit/core" "10.2.0" + "@angular-devkit/core" "10.2.1" rxjs "6.6.2" "@angular-devkit/build-angular@~0.1100.0": - version "0.1100.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.1100.4.tgz#22596475d38b13735876a4c7e1afc199654bb9ed" - integrity sha512-qVkMbtOwlo+k8fvOBOwwfKWMx06k4I1qrdjpRYAoZCt3cdje4EBepSciLrHnTB+ouIqWxpEDfEXTYBS98tXbBg== - dependencies: - "@angular-devkit/architect" "0.1100.4" - "@angular-devkit/build-optimizer" "0.1100.4" - "@angular-devkit/build-webpack" "0.1100.4" - "@angular-devkit/core" "11.0.4" + version "0.1100.5" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.1100.5.tgz#36a609a334369d9597ac50731f458440ffdbb2d1" + integrity sha512-lJYsnBImBAqUAIVC2qGY64UaC2uWOPZEpSWjYUxkRZA/c4IVCJj3M12CgONBjtcKYzFVXc1eojhrScukGIJJcg== + dependencies: + "@angular-devkit/architect" "0.1100.5" + "@angular-devkit/build-optimizer" "0.1100.5" + "@angular-devkit/build-webpack" "0.1100.5" + "@angular-devkit/core" "11.0.5" "@babel/core" "7.12.3" "@babel/generator" "7.12.1" "@babel/plugin-transform-runtime" "7.12.1" @@ -156,7 +149,7 @@ "@babel/runtime" "7.12.1" "@babel/template" "7.10.4" "@jsdevtools/coverage-istanbul-loader" "3.0.5" - "@ngtools/webpack" "11.0.4" + "@ngtools/webpack" "11.0.5" ansi-colors "4.1.1" autoprefixer "9.8.6" babel-loader "8.1.0" @@ -223,10 +216,10 @@ "@angular-devkit/architect" "0.1001.7" rxjs "6.6.2" -"@angular-devkit/build-optimizer@0.1100.4": - version "0.1100.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1100.4.tgz#dbe44ad1d4a6e95436e3bae297dafc09a8ab9190" - integrity sha512-C05y4qMb05PWR7l1gZwRQKiB6KIDq+p72r8Yr6jm0UO6raOtMM72R8nHnioMnGJcFtZDEAYXEF+X7soI3MMlfw== +"@angular-devkit/build-optimizer@0.1100.5": + version "0.1100.5" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1100.5.tgz#25de00e9cbea1444f911aa0a7a53a05800c90d62" + integrity sha512-aKITFuiydR681eS1z84EIdOtqdxP/V5xGZuF3xjGmg5Ddwv36PweAHaCVJEB4btHSWH6uxMvW2hLXg2RTWbRNg== dependencies: loader-utils "2.0.0" source-map "0.7.3" @@ -234,13 +227,13 @@ typescript "4.0.5" webpack-sources "2.0.1" -"@angular-devkit/build-webpack@0.1100.4": - version "0.1100.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1100.4.tgz#8ca4b10ce8fc739b128137c6c7c0d24377d27a76" - integrity sha512-uxe8gNSej3KF1FgqNtJmuRDbbINh3yLtXanXhRxFQLUj8IiNR8IciIVvy6RfXC5gqxcWwy1cOefJLLnuN9AOxQ== +"@angular-devkit/build-webpack@0.1100.5": + version "0.1100.5" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1100.5.tgz#81be4b35dc90ea66be205ad1cb9dc44dc31bf9e0" + integrity sha512-oD5t2oCfyiCyyeZckrqBnQco94zIMkRnRGzy3lFDH7KMiL0DG9l7x3nxn9H0YunYWr55LsGWwXGoR7l03Kl+jw== dependencies: - "@angular-devkit/architect" "0.1100.4" - "@angular-devkit/core" "11.0.4" + "@angular-devkit/architect" "0.1100.5" + "@angular-devkit/core" "11.0.5" rxjs "6.6.3" "@angular-devkit/core@10.0.8": @@ -265,10 +258,10 @@ rxjs "6.6.2" source-map "0.7.3" -"@angular-devkit/core@10.2.0", "@angular-devkit/core@^10.0.0": - version "10.2.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-10.2.0.tgz#fcde160afc2786d2da0166526f065c6cf98684c0" - integrity sha512-XAszFhSF3mZw1VjoOsYGbArr5NJLcStjOvcCGjBPl1UBM2AKpuCQXHxI9XJGYKL3B93Vp5G58d8qkHvamT53OA== +"@angular-devkit/core@10.2.1", "@angular-devkit/core@^10.0.0": + version "10.2.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-10.2.1.tgz#3ae38be4ca56c745788481b3577173ac2007e9e0" + integrity sha512-dzlF9Gl7KNt9sPYT2HYq6ySZYwKzkyYR5mrBj3DZOD0OQsoc21LvLkWAHNSL2iYGdHJQS1oJDNs8iRYxYIOY3w== dependencies: ajv "6.12.4" fast-json-stable-stringify "2.1.0" @@ -276,10 +269,10 @@ rxjs "6.6.2" source-map "0.7.3" -"@angular-devkit/core@11.0.4", "@angular-devkit/core@~11.0.2": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-11.0.4.tgz#4128b90bdb4d1803bb246d177b7cc6df64a0fec1" - integrity sha512-LgTvhZ3Ycz0QvNAH/zO1rpQQDn2JN8u9/Awy1gW/XeCC3FYmxeOj/2JCFzlKah3wJv16nMqro5WTppHt8Y++PA== +"@angular-devkit/core@11.0.5", "@angular-devkit/core@~11.0.2": + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-11.0.5.tgz#8239486d2de6c08fc55d2a64f12a7f5d518c8beb" + integrity sha512-hwV8fjF8JNPJkiVWw8MNzeIfDo01aD/OAOlC4L5rQnVHn+i2EiU3brSDmFqyeHPPV3h/QjuBkS3tkN7gSnVWaQ== dependencies: ajv "6.12.6" fast-json-stable-stringify "2.1.0" @@ -329,12 +322,12 @@ ora "5.0.0" rxjs "6.6.2" -"@angular-devkit/schematics@11.0.4", "@angular-devkit/schematics@~11.0.2": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-11.0.4.tgz#0680fe038c66f2ecc3c69a293505fb02b694ce80" - integrity sha512-fFC7qW9A1bFAZgpCfkezBA4WCRzfVFgOzwPpyt65rgSrzw0+EeHjcrUIcXlhyOXAFrTHtA9oLCfEeSjSx5HBEA== +"@angular-devkit/schematics@11.0.5", "@angular-devkit/schematics@~11.0.2": + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-11.0.5.tgz#e5d89451daa644eccce93970709f7cdf44c11982" + integrity sha512-0NKGC8Nf/4vvDpWKB7bwxIazvNnNHnZBX6XlyBXNl+fW8tpTef3PNMJMSErTz9LFnuv61vsKbc36u/Ek2YChWg== dependencies: - "@angular-devkit/core" "11.0.4" + "@angular-devkit/core" "11.0.5" ora "5.1.0" rxjs "6.6.3" @@ -347,9 +340,9 @@ rxjs "6.4.0" "@angular/animations@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-11.0.4.tgz#fa669490d039455e63413a6b8cd1ff6b7a966bec" - integrity sha512-NI7UdLNdzTfLCDu0zVqwhdKq2z1flRsM2GCD9RHG/NRjlohh73uRTBW+BcYpfh+o+Wq4giiq8UkTIgS2ReqDGg== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-11.0.5.tgz#44157c8bbb3f20ce1d3d6386eae956659cefd9d7" + integrity sha512-ghE/xDTYuEWkKNZtioH9JBrSlux0MLHzWoE7tNP+XMaplt80lCm979vWsEBO3/xpQLRmRlGPul6RacCAoeqogg== dependencies: tslib "^2.0.0" @@ -363,19 +356,19 @@ parse5 "^5.0.0" "@angular/cli@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-11.0.4.tgz#a04724f7ffb27417df59c2359e47ec54e1f61fab" - integrity sha512-VkE/gx6P80EJHg13fG+gkZfd2DJmRaDAtnamcCGM4AThzoUN9XBdxc24uMLEzBb0/mJ4vpMK9+WTNIdMmzl+Tg== - dependencies: - "@angular-devkit/architect" "0.1100.4" - "@angular-devkit/core" "11.0.4" - "@angular-devkit/schematics" "11.0.4" - "@schematics/angular" "11.0.4" - "@schematics/update" "0.1100.4" + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-11.0.5.tgz#1066d290fc91460f98cedcfbc9a5736340661467" + integrity sha512-k4j/2z7qkuigJ1shH0McW1wW63clhrbrg98FK4/KWhU/sce5AgVjuHDQFycAclTwHesf7Vs6Gzt7zGlqUmeKIg== + dependencies: + "@angular-devkit/architect" "0.1100.5" + "@angular-devkit/core" "11.0.5" + "@angular-devkit/schematics" "11.0.5" + "@schematics/angular" "11.0.5" + "@schematics/update" "0.1100.5" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "4.2.0" - ini "1.3.5" + ini "1.3.6" inquirer "7.3.3" npm-package-arg "8.1.0" npm-pick-manifest "6.1.0" @@ -389,9 +382,9 @@ uuid "8.3.1" "@angular/common@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-11.0.4.tgz#39cd88bfcecd895419c059c366eac2df2ca6a2e9" - integrity sha512-4R2ALj71J6EAHVCKNnHHCKL7wcosMsv3gcMXbMTE+Wpzo3khEhM0Tej+I1qmMbVmGXVlRb//4+rjE4gff6FvQw== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-11.0.5.tgz#7ec508cb7e14cf38640fe4e1c0fa3dd322a52505" + integrity sha512-aoXdTkoni65LWhrPKNsAiOnO70XFaTaisO+K8ZYMpciMTTAxHx3hFCF9sj4a+Bo3M1a5UDjpsFDYMeGgJOkmFA== dependencies: tslib "^2.0.0" @@ -434,23 +427,23 @@ integrity sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w== "@angular/core@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-11.0.4.tgz#8eebb6a550dc24e4d53f642c8a78a0da2830cd5b" - integrity sha512-860cTMjdCHcvEsHOsTzpg5rThxwVgtnY4yT0SgboWiphrlzX+aNoyN/cCJHxWhmOTRlrl6/+hkeRq95E2BZkKw== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-11.0.5.tgz#b8c448c3cd4f6dae7327cc1ba4ee2aa29c8dbc26" + integrity sha512-XAXWQi7R3ucZXQwx9QK5jSKJeQyRJ53u2dQDpr7R5stzeCy1a5hrNOkZLg9zOTTPcth/6+FrOrRZP9SMdxtw3w== dependencies: tslib "^2.0.0" "@angular/forms@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-11.0.4.tgz#6d77f01ecdf027a78df18d4e6cd3ad8fc8dd49e4" - integrity sha512-Fhfc4buwMZk0WumDvl/X7XBnOKFeTRTJrwKdi8LlhY6o1Og8H4e/f69u9iDJCF3YjU4qC6yGtPp9YpSVCPP7Ew== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-11.0.5.tgz#1be90f86b45a3d672eecea249b1d8e5e9f8f0bc3" + integrity sha512-2zB1IuqYNJrjh7Og9J8f/AtjX3NHc3VVbt0rPw35ghqIU3aQLpOichdQ1y5QvMWic1UzZ7SjWXDU7RpKbm4iUA== dependencies: tslib "^2.0.0" "@angular/language-service@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-11.0.4.tgz#0a9c01170be92378f217dea3263c4eb2f8411aaa" - integrity sha512-KtQxVSlZi3SwZEN4E56KHkNTFEYa3FPZfLJFm6WD1dSobFyMwJgvztO08GWSaT4S0ht0NNRD2IRt0XzBYuZkag== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-11.0.5.tgz#92499b5f29509142f29ae7af64b049765a7f7050" + integrity sha512-EzGycD9ztTKAZB+kR+masNqCfGmU0vnKd/z33VLmeo9fo41t/YNCEQEEFz/pEl2dEwX/Wjou+3oyTYZIZz2uSA== "@angular/localize@~10.0.10": version "10.0.14" @@ -462,32 +455,32 @@ yargs "15.3.0" "@angular/localize@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-11.0.4.tgz#8f7a36685d97f26d52e3f19d9218e1e2e05a2bb2" - integrity sha512-r0dWvwFvEqQJ/H94rr548S092Hq53RqyMANuFD09CpkWXS6yAWBfArB6mW77PARnicEC0zkbi5qMGACjtSyNtA== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-11.0.5.tgz#e770d4ec1b2094822fdb0524516dca6bf39dfd05" + integrity sha512-tvzgRa/t0xCouCPFMurqZImLeWIISUjVEzkcny9P7xaaz0Cw7kSyulc0e8HXf+8oijSJ624YOYUzr7mkPoIfew== dependencies: "@babel/core" "7.8.3" glob "7.1.2" yargs "^16.1.1" "@angular/platform-browser-dynamic@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-11.0.4.tgz#d775f12954db689507ef98a51d8d7ed5763becd4" - integrity sha512-ZOWTZaFfZSHhMy7a0RIxipiZoiobHWrGlq8/YaMrIgzUb9Fv518FeFCCI68BP0/GuyxX74MJmzv4ZgQctKKxXw== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-11.0.5.tgz#1e1de1ca429d85eb43b14cd5da90eba4ac95bd76" + integrity sha512-MFjpQcqkHOu8iTUMKVG6vfuOHwrRlgPBvkNucEbtXhTTYNlsw2mprxfUODYEu26EBUAh+FGttu8ZjclUGw4bVg== dependencies: tslib "^2.0.0" "@angular/platform-browser@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-11.0.4.tgz#131db1115943eb9c0191080e200c1e9dbd214d4c" - integrity sha512-+uUCKJgspSghJ3R6Fk0XHA0tolbaRBi8JFS2cY+hi9s27WKB88peGvtsK6RCOPJONY6JdOuhpcZqRN8dKfPi7w== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-11.0.5.tgz#b695d2533491f85721612a41d6d3708791bca96c" + integrity sha512-173JZHF3QS78hEscBxFZ/kX8KLjdaDhfAYi4Sh8daIKNUcDcyhqEy7wpAjWmCwdspL1QUtWKCrhZqrEVNGTpvA== dependencies: tslib "^2.0.0" "@angular/router@~11.0.0": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-11.0.4.tgz#324507346c508649135f56e5f2b57c60e0ba7b16" - integrity sha512-B0sqv8zMM6j88+udEZzO8wKBw61pHgWZmLopnAqA65rRPrAvMsvAHUnYqX6w5pYqhJQxCVLVeKM+0QlQh1+WnA== + version "11.0.5" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-11.0.5.tgz#95d47b3b510f6a49597db64cfd7ef936bb24c402" + integrity sha512-mSD4tbzuFH4uBb9vxPQHBUbkIMoWAfVUb7r9gtn3/deOxQbVh08f2gk2iWDN3OQLAa5mNHswuLByAYSw2rPbMA== dependencies: tslib "^2.0.0" @@ -506,10 +499,10 @@ "@ant-design/colors" "^5.0.0" tslib "^2.0.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11", "@babel/code-frame@^7.8.3": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" @@ -591,12 +584,12 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.12.1", "@babel/generator@^7.12.10", "@babel/generator@^7.8.3": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.10.tgz#2b188fc329fb8e4f762181703beffc0fe6df3460" - integrity sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww== +"@babel/generator@^7.12.1", "@babel/generator@^7.12.10", "@babel/generator@^7.12.11", "@babel/generator@^7.8.3": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== dependencies: - "@babel/types" "^7.12.10" + "@babel/types" "^7.12.11" jsesc "^2.5.1" source-map "^0.5.0" @@ -660,16 +653,16 @@ dependencies: "@babel/types" "^7.12.1" -"@babel/helper-function-name@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" - integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== +"@babel/helper-function-name@^7.10.4", "@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== dependencies: - "@babel/helper-get-function-arity" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" -"@babel/helper-get-function-arity@^7.10.4": +"@babel/helper-get-function-arity@^7.12.10": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== @@ -683,7 +676,7 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-member-expression-to-functions@^7.12.1": +"@babel/helper-member-expression-to-functions@^7.12.1", "@babel/helper-member-expression-to-functions@^7.12.7": version "7.12.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== @@ -712,7 +705,7 @@ "@babel/types" "^7.12.1" lodash "^4.17.19" -"@babel/helper-optimise-call-expression@^7.10.4": +"@babel/helper-optimise-call-expression@^7.10.4", "@babel/helper-optimise-call-expression@^7.12.10": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== @@ -734,14 +727,14 @@ "@babel/types" "^7.12.1" "@babel/helper-replace-supers@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9" - integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d" + integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA== dependencies: - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" + "@babel/helper-member-expression-to-functions" "^7.12.7" + "@babel/helper-optimise-call-expression" "^7.12.10" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.11" "@babel/helper-simple-access@^7.12.1": version "7.12.1" @@ -757,22 +750,22 @@ dependencies: "@babel/types" "^7.12.1" -"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" - integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== +"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== dependencies: - "@babel/types" "^7.11.0" + "@babel/types" "^7.12.11" -"@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== "@babel/helper-validator-option@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9" - integrity sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A== + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" + integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw== "@babel/helper-wrap-function@^7.10.4": version "7.12.3" @@ -802,15 +795,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.12.10", "@babel/parser@^7.12.3", "@babel/parser@^7.12.7", "@babel/parser@^7.8.3": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" - integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA== +"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.3", "@babel/parser@^7.12.7", "@babel/parser@^7.8.3": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== "@babel/plugin-proposal-async-generator-functions@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e" - integrity sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A== + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz#04b8f24fd4532008ab4e79f788468fd5a8476566" + integrity sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/helper-remap-async-to-generator" "^7.12.1" @@ -1036,9 +1029,9 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-transform-block-scoping@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz#f0ee727874b42a208a48a586b84c3d222c2bbef1" - integrity sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w== + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz#d93a567a152c22aea3b1929bb118d1d0a175cdca" + integrity sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ== dependencies: "@babel/helper-plugin-utils" "^7.10.4" @@ -1387,26 +1380,26 @@ "@babel/types" "^7.12.7" "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.8.3": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" - integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.10" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.10" - "@babel/types" "^7.12.10" + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.10.tgz#7965e4a7260b26f09c56bcfcb0498af1f6d9b260" - integrity sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw== +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" to-fast-properties "^2.0.0" @@ -2473,12 +2466,12 @@ jquery "3.5.0" replace-in-file "^4.1.3" -"@ngtools/webpack@11.0.4": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-11.0.4.tgz#fd80a8b7d648ddb8e56d73404e6b673903d2d365" - integrity sha512-MAV7inQmsMISTnDcXwyRX5oJZx8F7K/tZRLJciQwkM0DqZyq8fI9KDRwBcmYeQ+J0mSJV9LUVdExmpulpkywqw== +"@ngtools/webpack@11.0.5": + version "11.0.5" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-11.0.5.tgz#9d1abb9f9a5e72c014b5ed3e0c2cefe2a4175b30" + integrity sha512-hM0LdOSlC6c7ij+BvIpAFbe7dpJhL+A51L5v6YbMA6aM0Sb/y+HpE2u34AHEQvute7cLe4EyOyvJ9jSinVAJhQ== dependencies: - "@angular-devkit/core" "11.0.4" + "@angular-devkit/core" "11.0.5" enhanced-resolve "5.3.1" webpack-sources "2.0.1" @@ -2510,18 +2503,18 @@ dependencies: tslib "^1.9.0" -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.4" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== "@nodelib/fs.stat@^1.1.2": version "1.1.3" @@ -2529,11 +2522,11 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" "@npmcli/move-file@^1.0.1": @@ -2559,10 +2552,10 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-2.0.0.tgz#6d8f8ad9db3b75a39115f5def2654df8bed39f28" - integrity sha512-J4bfM7lf8oZvEAdpS71oTvC1ofKxfEZgU5vKVwzZKi4QPiL82udjpseJwxPid9Pu2FNmyRQOX4iEj6W1iOSnPw== +"@octokit/openapi-types@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-2.0.1.tgz#7453d8281ce66b8ed1607f7ac7d751c3baffd2cc" + integrity sha512-9AuC04PUnZrjoLiw3uPtwGh9FE4Q3rTqs51oNlQ0rkwgE8ftYsOC+lsrQyvCvWm85smBbSc0FNRKKumvGyb44Q== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -2651,11 +2644,11 @@ "@types/node" ">= 8" "@octokit/types@^6.0.0", "@octokit/types@^6.0.3": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.1.1.tgz#bc88b3eb5f447b025a2a1a8177a72db216e8d4ca" - integrity sha512-btm3D6S7VkRrgyYF31etUtVY/eQ1KzrNRqhFt25KSe2mKlXuLXJilglRC6eDA2P6ou94BUnk/Kz5MPEolXgoiw== + version "6.1.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.1.2.tgz#2b3a6ae0b8b71c27c770b4ff3e9ad8f1f538af58" + integrity sha512-LPCpcLbcky7fWfHCTuc7tMiSHFpFlrThJqVdaHgowBTMS0ijlZFfonQC/C1PrZOjD4xRCYgBqH9yttEATGE/nw== dependencies: - "@octokit/openapi-types" "^2.0.0" + "@octokit/openapi-types" "^2.0.1" "@types/node" ">= 8" "@rollup/plugin-commonjs@^15.0.0": @@ -2699,13 +2692,13 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@schematics/angular@11.0.4": - version "11.0.4" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-11.0.4.tgz#36268ebda718c4f395457d2eea874fda9c469402" - integrity sha512-LwBD9TIoLy9XqqInJvlN4BHtPyJExyeorNiOp6rXb/wafuDbvZ+9kY9GWZTY1auVo5PNKqErfxr74ydA3FFb9g== +"@schematics/angular@11.0.5": + version "11.0.5" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-11.0.5.tgz#149f908fd600e881ff87c5192d2673d0e3c37f38" + integrity sha512-7p2wweoJYhim8YUy3ih1SrPGqRsa6+aEFbYgo9v4zt7b3tOva8SvkbC2alayK74fclzQ7umqa6xAwvWhy8ORvg== dependencies: - "@angular-devkit/core" "11.0.4" - "@angular-devkit/schematics" "11.0.4" + "@angular-devkit/core" "11.0.5" + "@angular-devkit/schematics" "11.0.5" jsonc-parser "2.3.1" "@schematics/angular@~10.0.5": @@ -2724,15 +2717,15 @@ "@angular-devkit/core" "10.1.7" "@angular-devkit/schematics" "10.1.7" -"@schematics/update@0.1100.4": - version "0.1100.4" - resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.1100.4.tgz#b67efdb39396ddcacef97de008100944af3d1556" - integrity sha512-YwFtgxCQQkYC89IC7dfshyGr0roE6bpp5HgpQLdS/AOjHeZKo7/SPdM0W4ddB+Fml1Fo6v4eFG/Ia9oR7qNv1A== +"@schematics/update@0.1100.5": + version "0.1100.5" + resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.1100.5.tgz#40b529d93db51e6f66378bd9f4ff99f2e9c278f6" + integrity sha512-BYtKKuiWsrlc4FMW3bRyl4tm6lWNMTi8oql/mtkSgH7V5eMmaLDJtM+zDl+qyC/KHPxbHTfoHDapfv1tITSWjA== dependencies: - "@angular-devkit/core" "11.0.4" - "@angular-devkit/schematics" "11.0.4" + "@angular-devkit/core" "11.0.5" + "@angular-devkit/schematics" "11.0.5" "@yarnpkg/lockfile" "1.1.0" - ini "1.3.5" + ini "1.3.6" npm-package-arg "^8.0.0" pacote "9.5.12" semver "7.3.2" @@ -2930,14 +2923,14 @@ integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/node@*", "@types/node@>= 8": - version "14.14.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.13.tgz#9e425079799322113ae8477297ae6ef51b8e0cdf" - integrity sha512-vbxr0VZ8exFMMAjCW8rJwaya0dMCDyYW2ZRdTyjtrCvJoENMpdUHOT/eTzvgyA5ZnqRZ/sI0NwqAxNHKYokLJQ== + version "14.14.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.19.tgz#5135176a8330b88ece4e9ab1fdcfc0a545b4bab4" + integrity sha512-4nhBPStMK04rruRVtVc6cDqhu7S9GZai0fpXgPXrFpcPX6Xul8xnrjSdGB4KPBVYG/R5+fXWdCM8qBoiULWGPQ== "@types/node@^12.11.1": - version "12.19.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" - integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== + version "12.19.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.11.tgz#9220ab4b20d91169eb78f456dbfcbabee89dfb50" + integrity sha512-bwVfNTFZOrGXyiQ6t4B9sZerMSShWNsGRw8tC5DY1qImUNczS9SjT4G6PnzjCnxsu5Ubj6xjL2lgwddkxtQl5w== "@types/node@^8.0.31": version "8.10.66" @@ -3015,9 +3008,9 @@ source-map "^0.6.1" "@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== + version "20.2.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" + integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== "@types/yargs@^13.0.0": version "13.0.11" @@ -3027,9 +3020,9 @@ "@types/yargs-parser" "*" "@types/yargs@^15.0.0": - version "15.0.11" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.11.tgz#361d7579ecdac1527687bcebf9946621c12ab78c" - integrity sha512-jfcNBxHFYJ4nPIacsi3woz1+kvUO6s1CyeEhtnDHBjHUMNj5UlW2GynmnSgiJJEdNg9yW5C8lfoNRZrHGv5EqA== + version "15.0.12" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.12.tgz#6234ce3e3e3fa32c5db301a170f96a599c960d74" + integrity sha512-f+fD/fQAo3BCbCDlrUpznF1A5Zp9rB0noS5vnoormHSIPFKL0Z2DcUJ3Gxp5ytH4uLRNxy7AwYUC9exZzqGMAw== dependencies: "@types/yargs-parser" "*" @@ -3761,7 +3754,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2: +base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -3818,6 +3811,15 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" +bl@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489" + integrity sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blocking-proxy@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-1.0.1.tgz#81d6fd1fe13a4c0d6957df7f91b75e98dac40cb2" @@ -3987,7 +3989,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.15.0, browserslist@^4.7.0, browserslist@^4.9.1: +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4.7.0, browserslist@^4.9.1: version "4.16.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.0.tgz#410277627500be3cb28a1bfe037586fbedf9488b" integrity sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ== @@ -4048,15 +4050,23 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= builtin-modules@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" - integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== builtin-status-codes@^3.0.0: version "3.0.0" @@ -4264,9 +4274,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001165: - version "1.0.30001166" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001166.tgz#ca73e8747acfd16a4fd6c4b784f1b995f9698cf8" - integrity sha512-nCL4LzYK7F4mL0TjEMeYavafOGnBa98vTudH5c8lW9izUjnB99InG6pmC1ElAI1p0GlyZajv4ltUdFXvOHIl1A== + version "1.0.30001173" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001173.tgz#3c47bbe3cd6d7a9eda7f50ac016d158005569f56" + integrity sha512-R3aqmjrICdGCTAnSXtNyvWYMK3YtV5jwudbq0T7nN9k4kmE4CBuwPqyJ+KBzepSTh0huivV2gLbSMEzTTmfeYw== canonical-path@1.0.0: version "1.0.0" @@ -4447,7 +4457,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.0.0, cli-spinners@^2.2.0, cli-spinners@^2.4.0: +cli-spinners@^2.0.0, cli-spinners@^2.2.0, cli-spinners@^2.4.0, cli-spinners@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== @@ -4829,16 +4839,16 @@ conventional-changelog-core@^3.1.6: through2 "^3.0.0" conventional-changelog-core@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.1.tgz#f811ad98ab2ff080becafc61407509420c9b447d" - integrity sha512-8cH8/DEoD3e5Q6aeogdR5oaaKs0+mG6+f+Om0ZYt3PNv7Zo0sQhu4bMDRsqAF+UTekTAtP1W/C41jH/fkm8Jtw== + version "4.2.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.2.tgz#f0897df6d53b5d63dec36b9442bd45354f8b3ce5" + integrity sha512-7pDpRUiobQDNkwHyJG7k9f6maPo9tfPzkSWbRq97GGiZqisElhnvUZSvyQH20ogfOjntB5aadvv6NNcKL1sReg== dependencies: add-stream "^1.0.0" conventional-changelog-writer "^4.0.18" conventional-commits-parser "^3.2.0" dateformat "^3.0.0" get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" + git-raw-commits "^2.0.8" git-remote-origin-url "^2.0.0" git-semver-tags "^4.1.1" lodash "^4.17.15" @@ -4891,9 +4901,9 @@ conventional-changelog-preset-loader@^2.1.1, conventional-changelog-preset-loade integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== conventional-changelog-writer@^4.0.18, conventional-changelog-writer@^4.0.6: - version "4.0.18" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.18.tgz#10b73baa59c7befc69b360562f8b9cd19e63daf8" - integrity sha512-mAQDCKyB9HsE8Ko5cCM1Jn1AWxXPYV0v8dFPabZRkvsiWUul2YyAqbIaoMKF88Zf2ffnOPSvKhboLf3fnjo5/A== + version "4.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f" + integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw== dependencies: compare-func "^2.0.0" conventional-commits-filter "^2.0.7" @@ -4990,6 +5000,13 @@ cookie@0.4.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +copy-anything@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.1.tgz#2afbce6da684bdfcbec93752fa762819cb480d9a" + integrity sha512-lA57e7viQHOdPQcrytv5jFeudZZOXuyk47lZym279FiDQ8jeZomXiGuVf6ffMKkJ+3TIai3J1J3yi6M+/4U35g== + dependencies: + is-what "^3.7.1" + copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" @@ -5025,11 +5042,11 @@ copy-webpack-plugin@6.2.1: webpack-sources "^1.4.3" core-js-compat@^3.6.2: - version "3.8.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.1.tgz#8d1ddd341d660ba6194cbe0ce60f4c794c87a36e" - integrity sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ== + version "3.8.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.2.tgz#3717f51f6c3d2ebba8cbf27619b57160029d1d4c" + integrity sha512-LO8uL9lOIyRRrQmZxHZFl1RV+ZbcsAkFWTktn5SmH40WgLtSNYN4m4W2v9ONT147PxBY/XrRhrWq8TlvObyUjQ== dependencies: - browserslist "^4.15.0" + browserslist "^4.16.0" semver "7.0.0" core-js@3.6.5: @@ -5398,6 +5415,11 @@ dargs@^4.0.1: dependencies: number-is-nan "^1.0.0" +dargs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -5811,9 +5833,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.621: - version "1.3.626" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.626.tgz#48acdf322be07feb2c1330ba05e4bf6327f721a3" - integrity sha512-7CanEvJx74EnvjHu1X8gf93KieyxvFLnqOXAH/ddjWD4RrUZYqdg3pykrQ/7t6SLI7DTsp4tfQXEfzeK5t6oAw== + version "1.3.633" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.633.tgz#16dd5aec9de03894e8d14a1db4cda8a369b9b7fe" + integrity sha512-bsVCsONiVX1abkWdH7KtpuDAhsQ3N3bjPYhROSAXE78roJKet0Y5wznA14JE9pzbwSZmSMAW6KiKYf1RvbTJkA== elliptic@^6.5.3: version "6.5.3" @@ -5905,9 +5927,9 @@ err-code@^1.0.0: integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== dependencies: prr "~1.0.1" @@ -6349,9 +6371,9 @@ fastparse@^1.1.2: integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== fastq@^1.6.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.9.0.tgz#e16a72f338eaca48e91b5c23593bcc2ef66b7947" - integrity sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w== + version "1.10.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.0.tgz#74dbefccade964932cdf500473ef302719c652bb" + integrity sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA== dependencies: reusify "^1.0.4" @@ -6691,9 +6713,9 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-intrinsic@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.1.tgz#94a9768fcbdd0595a1c9273aacf4c89d075631be" - integrity sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg== + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" + integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg== dependencies: function-bind "^1.1.1" has "^1.0.3" @@ -6762,6 +6784,17 @@ git-raw-commits@2.0.0: split2 "^2.0.0" through2 "^2.0.0" +git-raw-commits@^2.0.8: + version "2.0.9" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.9.tgz#5cbc707a615cb77b71e687f8a1ee54af46208b22" + integrity sha512-hSpNpxprVno7IOd4PZ93RQ+gNdzPAIrW0x8av6JQDJGV4k1mR9fE01dl8sEqi2P7aKmmwiGUn1BCPuf16Ae0Qw== + dependencies: + dargs "^7.0.0" + lodash.template "^4.0.2" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" + git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" @@ -7155,9 +7188,9 @@ html-encoding-sniffer@^1.0.2: whatwg-encoding "^1.0.1" html-entities@^1.3.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.3.tgz#3dca638a43ee7de316fc23067398491152ad4736" - integrity sha512-/VulV3SYni1taM7a4RMdceqzJWR39gpZHjBwUnsCFKWV/GJkD14CJ5F7eWcZozmHJK0/f/H5U3b3SiPkuvxMgg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" + integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== html-escaper@^2.0.0: version "2.0.2" @@ -7212,9 +7245,9 @@ http-errors@~1.7.2: toidentifier "1.0.0" http-parser-js@>=0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77" - integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ== + version "0.5.3" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" + integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== http-proxy-agent@^2.1.0: version "2.1.0" @@ -7306,7 +7339,7 @@ icss-utils@^4.0.0, icss-utils@^4.1.1: dependencies: postcss "^7.0.14" -ieee754@^1.1.4: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -7352,9 +7385,9 @@ import-fresh@^2.0.0: resolve-from "^3.0.0" import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.2.tgz#fc129c160c5d68235507f4331a6baad186bdbc3e" - integrity sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw== + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" @@ -7430,10 +7463,10 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +ini@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.6.tgz#f1c46a2a93a253e7b3905115e74d527cd23061a1" + integrity sha512-IZUoxEjNjubzrmvzZU4lKP7OnYmX72XRl3sqkfJhBKweKi5rnGi5+IUdlj/H1M+Ip5JQ1WzaDMOBRY90Ajc5jg== ini@^1.3.2, ini@^1.3.4: version "1.3.8" @@ -7894,6 +7927,11 @@ is-utf8@^0.2.0, is-utf8@^0.2.1: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-what@^3.7.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.12.0.tgz#f4405ce4bd6dd420d3ced51a026fb90e03705e55" + integrity sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw== + is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -8708,10 +8746,11 @@ less@3.12.2: source-map "~0.6.0" less@^3.10.3: - version "3.13.0" - resolved "https://registry.yarnpkg.com/less/-/less-3.13.0.tgz#6a47bb19d97edcf7a53d444b099275dd6b17c85a" - integrity sha512-uPhr9uoSGVKKYVGz0rXcYBK1zjwcIWRGcbnSgNt66XuIZYrYPaQiS+LeUOvqedBwrwdBYYaLqSff5ytGYuT7rA== + version "3.13.1" + resolved "https://registry.yarnpkg.com/less/-/less-3.13.1.tgz#0ebc91d2a0e9c0c6735b83d496b0ab0583077909" + integrity sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw== dependencies: + copy-anything "^2.0.1" tslib "^1.10.0" optionalDependencies: errno "^0.1.1" @@ -9141,9 +9180,9 @@ meow@^4.0.0: trim-newlines "^2.0.0" meow@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-8.0.0.tgz#1aa10ee61046719e334ffdc038bb5069250ec99a" - integrity sha512-nbsTRz2fwniJBFgUkcdISq8y/q9n9VbiHYbfwklFh5V4V2uAcxtKQkDc0yCLPM/kP0d+inZBewn3zJqewHE7kg== + version "8.1.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.0.tgz#0fcaa267e35e4d58584b8205923df6021ddcc7ba" + integrity sha512-fNWkgM1UVMey2kf24yLiccxLihc5W+6zVus3/N0b+VfnJgxV99E9u04X6NAiKdg6ED7DAQBX5sy36NM0QJZkWA== dependencies: "@types/minimist" "^1.2.0" camelcase-keys "^6.2.2" @@ -9224,22 +9263,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -"mime-db@>= 1.43.0 < 2": +mime-db@1.45.0, "mime-db@>= 1.43.0 < 2": version "1.45.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== dependencies: - mime-db "1.44.0" + mime-db "1.45.0" mime@1.6.0, mime@^1.4.1: version "1.6.0" @@ -9247,9 +9281,9 @@ mime@1.6.0, mime@^1.4.1: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.3.1, mime@^2.4.4: - version "2.4.6" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" - integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== + version "2.4.7" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" + integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== mimic-fn@^1.0.0: version "1.2.0" @@ -9589,9 +9623,9 @@ ng-packagr@^11.0.1: terser "^5.0.0" ng-zorro-antd@^10.1.1: - version "10.2.1" - resolved "https://registry.yarnpkg.com/ng-zorro-antd/-/ng-zorro-antd-10.2.1.tgz#06d9c2db7f92bdd560c98c201114b2fc2318af23" - integrity sha512-G1w/Gs2Qgsoyf9c+t1uyQkZ07ayiOoH4waS8CP+IEvlCe0fZ02V0IFjS6NLrTpDxw7qDBIykI+qcWEY14GIF8A== + version "10.2.2" + resolved "https://registry.yarnpkg.com/ng-zorro-antd/-/ng-zorro-antd-10.2.2.tgz#5951f1fd5d1e405e7fe983756dca1eb942b255de" + integrity sha512-4Q2G6DtRJnEQXFcIEUyqgFi6JXcEF9bN0zOPNBV7LTNgjOf31QiE+3Pu2ifz8esGVwv7vmG8if8V2/Ha/Ol8Dw== dependencies: "@angular/cdk" "^10.2.4" "@ant-design/icons-angular" "^10.0.0" @@ -10085,7 +10119,7 @@ ora@5.0.0: strip-ansi "^6.0.0" wcwidth "^1.0.1" -ora@5.1.0, ora@^5.1.0: +ora@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8" integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w== @@ -10111,6 +10145,20 @@ ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" +ora@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.2.0.tgz#de10bfd2d15514384af45f3fa9d9b1aaf344fda1" + integrity sha512-+wG2v8TUU8EgzPHun1k/n45pXquQ9fHnbXVetl9rRgO6kjZszGGbraF3XPTIdgeA+s1lbRjSEftAnyT0w8ZMvQ== + dependencies: + bl "^4.0.3" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + log-symbols "^4.0.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" @@ -11371,7 +11419,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -11921,9 +11969,9 @@ sass@1.27.0: chokidar ">=2.0.0 <4.0.0" sass@^1.23.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.30.0.tgz#60bbbbaf76ba10117e61c6c24f00161c3d60610e" - integrity sha512-26EUhOXRLaUY7+mWuRFqGeGGNmhB1vblpTENO1Z7mAzzIZeVxZr9EZoaY1kyGLFWdSOZxRMAufiN2mkbO6dAlw== + version "1.32.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.0.tgz#10101a026c13080b14e2b374d4e15ee24400a4d3" + integrity sha512-fhyqEbMIycQA4blrz/C0pYhv2o4x2y6FYYAH0CshBw3DXh5D5wyERgxw0ptdau1orc/GhNrhF7DFN2etyOCEng== dependencies: chokidar ">=2.0.0 <4.0.0" @@ -12442,6 +12490,13 @@ split2@^2.0.0: dependencies: through2 "^2.0.2" +split2@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -13350,9 +13405,9 @@ typescript@^3.5.2, typescript@~3.9.2: integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== uglify-js@^3.1.4: - version "3.12.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.1.tgz#78307f539f7b9ca5557babb186ea78ad30cc0375" - integrity sha512-o8lHP20KjIiQe5b/67Rh68xEGRrc2SRsCuuoYclXXoC74AfSRGblU1HKzJWH3HxPZ+Ort85fWHpSX7KwBUC9CQ== + version "3.12.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.4.tgz#93de48bb76bb3ec0fc36563f871ba46e2ee5c7ee" + integrity sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A== uid-number@0.0.6: version "0.0.6" @@ -13702,7 +13757,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: +webpack-dev-middleware@3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== @@ -13713,6 +13768,17 @@ webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" +webpack-dev-middleware@^3.7.2: + version "3.7.3" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" + integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + webpack-dev-server@3.11.0: version "3.11.0" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz#8f154a3bce1bcfd1cc618ef4e703278855e7ff8c" @@ -14015,9 +14081,9 @@ ws@^6.2.1: async-limiter "~1.0.0" ws@^7.0.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb" - integrity sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ== + version "7.4.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.2.tgz#782100048e54eb36fe9843363ab1c68672b261dd" + integrity sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA== xml-name-validator@^3.0.0: version "3.0.0" diff --git a/npm/publish.ps1 b/npm/publish.ps1 index d6ef361224..2342db1334 100644 --- a/npm/publish.ps1 +++ b/npm/publish.ps1 @@ -39,6 +39,7 @@ $commands = ( ) foreach ($command in $commands) { + $timer = [System.Diagnostics.Stopwatch]::StartNew() Write-Host $command Invoke-Expression $command if ($LASTEXITCODE -ne '0' -And $command -notlike '*cd *') { @@ -46,4 +47,9 @@ foreach ($command in $commands) { Set-Location $RootFolder exit $LASTEXITCODE } + $timer.Stop() + $total = $timer.Elapsed + Write-Output "-------------------------" + Write-Output "$command command took $total (Hours:Minutes:Seconds.Milliseconds)" + Write-Output "-------------------------" } \ No newline at end of file diff --git a/npm/verdaccio-containers/.gitignore b/npm/verdaccio-containers/.gitignore new file mode 100644 index 0000000000..784b55966b --- /dev/null +++ b/npm/verdaccio-containers/.gitignore @@ -0,0 +1,2 @@ +publish-packages/abp/ +serve-app/app \ No newline at end of file diff --git a/npm/verdaccio-containers/README.md b/npm/verdaccio-containers/README.md new file mode 100644 index 0000000000..cb4a35fa21 --- /dev/null +++ b/npm/verdaccio-containers/README.md @@ -0,0 +1,40 @@ +## Running containers that publishing packages to the Verdaccio + +### Goal + +We test all templates before the releasing. However, since we test packages without publishing, we may be faced breaking errors. That's why, this compose prepares the real-like test environment. + + +The duty of this compose is to publish the packages to the [Verdaccio](https://verdaccio.org/) (a custom NPM server) running in the container and to serve the Angular pro template (copied from `abp/templates/app/angular` folder) that is consumed these packages from the Verdaccio. + + +### Before starting + +Make sure the [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed on your PC. + +Before starting, the following command should be run to prepare the environment: + +```bash +npm install && npm run prepare +``` + +### Getting Started + +To build and up the compose, run the following command: + +```bash +docker-compose rm -f && docker-compose build --build-arg next_version="" && docker-compose up +``` + +> Be sure to replace the "" with the version you want published. E.g: 4.1.0 + +This command; +- Removes the containers if worked before +- Builds the containers +- Runs the containers. + +The processes may take 30~ minutes. + +The Angular app will be running when you see the "Listening on http://localhost:4200" log. If you see the log, open the browser and navigate to the http://localhost:4200. + +The running Angular app can connect to the backend that is running on http://localhost:44305. Go to the `abp/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator` folder and run the project to create (or update) the database. Then run the HttpApiHost project which is in the `abp/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds` folder. Then refresh the browser. You'll see the Angular app is working properly. diff --git a/npm/verdaccio-containers/docker-compose.yml b/npm/verdaccio-containers/docker-compose.yml new file mode 100644 index 0000000000..e4abb3362f --- /dev/null +++ b/npm/verdaccio-containers/docker-compose.yml @@ -0,0 +1,41 @@ +version: '3.9' + +services: + verdaccio: + image: verdaccio/verdaccio:4.0 + container_name: 'verdaccio' + networks: + - docker_network + environment: + - VERDACCIO_PORT=4873 + ports: + - '4873:4873' + expose: + - '4873/tcp' + publish: + build: + context: ./publish-packages + dockerfile: Dockerfile + args: + next_version: '' + container_name: 'verdaccio_publish' + networks: + - docker_network + depends_on: + - verdaccio + expose: + - '4872' + app: + build: ./serve-app + container_name: 'verdaccio_app' + networks: + - docker_network + depends_on: + - publish + ports: + - '4200:4200' + expose: + - '4200/tcp' +networks: + docker_network: + driver: bridge diff --git a/npm/verdaccio-containers/package-lock.json b/npm/verdaccio-containers/package-lock.json new file mode 100644 index 0000000000..31f1319658 --- /dev/null +++ b/npm/verdaccio-containers/package-lock.json @@ -0,0 +1,50 @@ +{ + "name": "verdaccio-publish", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" + }, + "fs-extra": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } + } + }, + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" + } + } +} diff --git a/npm/verdaccio-containers/package.json b/npm/verdaccio-containers/package.json new file mode 100644 index 0000000000..310b896fb9 --- /dev/null +++ b/npm/verdaccio-containers/package.json @@ -0,0 +1,16 @@ +{ + "name": "verdaccio-publish", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "prepare": "node prepare" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "fs-extra": "^9.0.1" + }, + "devDependencies": {} +} diff --git a/npm/verdaccio-containers/prepare.js b/npm/verdaccio-containers/prepare.js new file mode 100644 index 0000000000..d88cc6fe5a --- /dev/null +++ b/npm/verdaccio-containers/prepare.js @@ -0,0 +1,16 @@ +const fse = require('fs-extra'); +const path = require('path') + + +// packages +fse.removeSync(path.join(__dirname, 'publish-packages/abp')) + +fse.removeSync(path.join(__dirname, '../ng-packs/node_modules')) +fse.removeSync(path.join(__dirname, '../ng-packs/scripts/node_modules')) +fse.copySync(path.join(__dirname, '../ng-packs'), path.join(__dirname, 'publish-packages/abp/npm/ng-packs'), {overwrite: true, errorOnExist: false, }) + +// app angular template +fse.removeSync(path.join(__dirname, 'serve-app/app')) + +fse.removeSync(path.join(__dirname, '../../templates/app/angular/node_modules')); +fse.copySync(path.join(__dirname, '../../templates/app/angular'), path.join(__dirname, 'serve-app/app'), {overwrite: true, errorOnExist: false, }) diff --git a/npm/verdaccio-containers/publish-packages/Dockerfile b/npm/verdaccio-containers/publish-packages/Dockerfile new file mode 100644 index 0000000000..77a72bde19 --- /dev/null +++ b/npm/verdaccio-containers/publish-packages/Dockerfile @@ -0,0 +1,12 @@ +FROM node:14 +ARG next_version +ENV next_version=$next_version +RUN mkdir /publish +COPY . /publish +WORKDIR /publish +EXPOSE 4872/tcp + +RUN apt-get update +RUN apt-get install nano +RUN chmod +x ./entrypoint.sh +CMD /bin/bash ./entrypoint.sh \ No newline at end of file diff --git a/npm/verdaccio-containers/publish-packages/entrypoint.sh b/npm/verdaccio-containers/publish-packages/entrypoint.sh new file mode 100644 index 0000000000..f796d3eca6 --- /dev/null +++ b/npm/verdaccio-containers/publish-packages/entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/bash +echo "v" $next_version " packages to be published to the verdaccio" + + +echo "Waiting for the Verdaccio" +while ! curl -v --silent verdaccio:4873 &> /dev/null +do + printf "%c" "." +done + +var="$(curl -v --silent verdaccio:4873 2>&1 | grep Trying)" +echo $var + +curl -XPUT -H "Content-type: application/json" -d '{ "name": "volo", "password": "123456", "email": "verdaccio@volo.com" }' 'verdaccio:4873/-/user/org.couchdb.user:your_username' + +npx npm-cli-login -u volo -p 123456 -e "verdaccio@volo.com" -r "http://verdaccio:4873" +npm whoami --registry http://verdaccio:4873 + + +cd /publish/abp/npm/ng-packs/scripts + +npm install + +echo "Running the publish script for abp packages" + +npm run publish-packages -- --nextVersion $next_version --skipGit --registry "http://verdaccio:4873" + +cd /publish/abp/npm/ng-packs + +echo '@abp:registry=http://verdaccio:4873' >> .npmrc + +npx npm-check-updates --filter '/^@(abp)\/.*$/' --registry http://verdaccio:4873 --target greatest --packageFile package.json -u + +cd scripts + +npm install + +echo "Running the publish script for abp packages" + +npm run publish-packages -- --nextVersion $next_version --skipGit --registry "http://verdaccio:4873" \ No newline at end of file diff --git a/npm/verdaccio-containers/serve-app/Dockerfile b/npm/verdaccio-containers/serve-app/Dockerfile new file mode 100644 index 0000000000..0f44bc2558 --- /dev/null +++ b/npm/verdaccio-containers/serve-app/Dockerfile @@ -0,0 +1,10 @@ +FROM node:14 +RUN mkdir /app +COPY . /app +WORKDIR /app +EXPOSE 4200/tcp + +RUN apt-get update +RUN apt-get install nano +RUN chmod +x ./entrypoint.sh +CMD /bin/bash ./entrypoint.sh \ No newline at end of file diff --git a/npm/verdaccio-containers/serve-app/entrypoint.sh b/npm/verdaccio-containers/serve-app/entrypoint.sh new file mode 100644 index 0000000000..4d6d71b86b --- /dev/null +++ b/npm/verdaccio-containers/serve-app/entrypoint.sh @@ -0,0 +1,21 @@ +#!/bin/bash +while ping -c1 publish &> /dev/null +do echo "Waiting for publishing to be done"; sleep 10; +done; + +echo "Serving app" + +cd /app/app + +echo "@abp:registry=http://verdaccio:4873" >> .npmrc +echo '@volo:registry=http://verdaccio:4873' >> .npmrc + +npx npm-check-updates --filter '/^@(abp|volo)\/.*$/' --registry http://verdaccio:4873 --target greatest --packageFile package.json -u + +yarn + +yarn ng build --prod + +cd dist/MyProjectName + +npx http-server-spa . index.html 4200 \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs index c4a948493f..e7a231c2fc 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBundleContributor.cs @@ -6,12 +6,11 @@ namespace MyCompanyName.MyProjectName.Blazor { public void AddScripts(BundleContext context) { - } public void AddStyles(BundleContext context) { - context.Add("main.css"); + context.Add("main.css", true); } } -} +} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css new file mode 100644 index 0000000000..910b08b725 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css @@ -0,0 +1,17 @@ +/*! + * Bootstrap v4.5.0 (https://getbootstrap.com/) + * Copyright 2011-2020 The Bootstrap Authors + * Copyright 2011-2020 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;min-width:0;max-width:100%}.row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(.75rem);transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{-ms-flex:1 0 0%;flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item{display:-ms-flexbox;display:flex}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:transparent;border:0}a.close.disabled{pointer-events:none}.toast{max-width:350px;overflow:hidden;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-50px);transform:translate(0,-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:spinner-border .75s linear infinite;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:spinner-grow .75s linear infinite;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;-ms-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;-ms-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0056b3!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#19692c!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#0f6674!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#121416!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}} +/*# sourceMappingURL=bootstrap.min.css.map */ +/*! + * Font Awesome Free 5.12.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:""}.fa-accessible-icon:before{content:""}.fa-accusoft:before{content:""}.fa-acquisitions-incorporated:before{content:""}.fa-ad:before{content:""}.fa-address-book:before{content:""}.fa-address-card:before{content:""}.fa-adjust:before{content:""}.fa-adn:before{content:""}.fa-adobe:before{content:""}.fa-adversal:before{content:""}.fa-affiliatetheme:before{content:""}.fa-air-freshener:before{content:""}.fa-airbnb:before{content:""}.fa-algolia:before{content:""}.fa-align-center:before{content:""}.fa-align-justify:before{content:""}.fa-align-left:before{content:""}.fa-align-right:before{content:""}.fa-alipay:before{content:""}.fa-allergies:before{content:""}.fa-amazon:before{content:""}.fa-amazon-pay:before{content:""}.fa-ambulance:before{content:""}.fa-american-sign-language-interpreting:before{content:""}.fa-amilia:before{content:""}.fa-anchor:before{content:""}.fa-android:before{content:""}.fa-angellist:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angry:before{content:""}.fa-angrycreative:before{content:""}.fa-angular:before{content:""}.fa-ankh:before{content:""}.fa-app-store:before{content:""}.fa-app-store-ios:before{content:""}.fa-apper:before{content:""}.fa-apple:before{content:""}.fa-apple-alt:before{content:""}.fa-apple-pay:before{content:""}.fa-archive:before{content:""}.fa-archway:before{content:""}.fa-arrow-alt-circle-down:before{content:""}.fa-arrow-alt-circle-left:before{content:""}.fa-arrow-alt-circle-right:before{content:""}.fa-arrow-alt-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-down:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrows-alt:before{content:""}.fa-arrows-alt-h:before{content:""}.fa-arrows-alt-v:before{content:""}.fa-artstation:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asterisk:before{content:""}.fa-asymmetrik:before{content:""}.fa-at:before{content:""}.fa-atlas:before{content:""}.fa-atlassian:before{content:""}.fa-atom:before{content:""}.fa-audible:before{content:""}.fa-audio-description:before{content:""}.fa-autoprefixer:before{content:""}.fa-avianex:before{content:""}.fa-aviato:before{content:""}.fa-award:before{content:""}.fa-aws:before{content:""}.fa-baby:before{content:""}.fa-baby-carriage:before{content:""}.fa-backspace:before{content:""}.fa-backward:before{content:""}.fa-bacon:before{content:""}.fa-bahai:before{content:""}.fa-balance-scale:before{content:""}.fa-balance-scale-left:before{content:""}.fa-balance-scale-right:before{content:""}.fa-ban:before{content:""}.fa-band-aid:before{content:""}.fa-bandcamp:before{content:""}.fa-barcode:before{content:""}.fa-bars:before{content:""}.fa-baseball-ball:before{content:""}.fa-basketball-ball:before{content:""}.fa-bath:before{content:""}.fa-battery-empty:before{content:""}.fa-battery-full:before{content:""}.fa-battery-half:before{content:""}.fa-battery-quarter:before{content:""}.fa-battery-three-quarters:before{content:""}.fa-battle-net:before{content:""}.fa-bed:before{content:""}.fa-beer:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-bell:before{content:""}.fa-bell-slash:before{content:""}.fa-bezier-curve:before{content:""}.fa-bible:before{content:""}.fa-bicycle:before{content:""}.fa-biking:before{content:""}.fa-bimobject:before{content:""}.fa-binoculars:before{content:""}.fa-biohazard:before{content:""}.fa-birthday-cake:before{content:""}.fa-bitbucket:before{content:""}.fa-bitcoin:before{content:""}.fa-bity:before{content:""}.fa-black-tie:before{content:""}.fa-blackberry:before{content:""}.fa-blender:before{content:""}.fa-blender-phone:before{content:""}.fa-blind:before{content:""}.fa-blog:before{content:""}.fa-blogger:before{content:""}.fa-blogger-b:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-bold:before{content:""}.fa-bolt:before{content:""}.fa-bomb:before{content:""}.fa-bone:before{content:""}.fa-bong:before{content:""}.fa-book:before{content:""}.fa-book-dead:before{content:""}.fa-book-medical:before{content:""}.fa-book-open:before{content:""}.fa-book-reader:before{content:""}.fa-bookmark:before{content:""}.fa-bootstrap:before{content:""}.fa-border-all:before{content:""}.fa-border-none:before{content:""}.fa-border-style:before{content:""}.fa-bowling-ball:before{content:""}.fa-box:before{content:""}.fa-box-open:before{content:""}.fa-boxes:before{content:""}.fa-braille:before{content:""}.fa-brain:before{content:""}.fa-bread-slice:before{content:""}.fa-briefcase:before{content:""}.fa-briefcase-medical:before{content:""}.fa-broadcast-tower:before{content:""}.fa-broom:before{content:""}.fa-brush:before{content:""}.fa-btc:before{content:""}.fa-buffer:before{content:""}.fa-bug:before{content:""}.fa-building:before{content:""}.fa-bullhorn:before{content:""}.fa-bullseye:before{content:""}.fa-burn:before{content:""}.fa-buromobelexperte:before{content:""}.fa-bus:before{content:""}.fa-bus-alt:before{content:""}.fa-business-time:before{content:""}.fa-buy-n-large:before{content:""}.fa-buysellads:before{content:""}.fa-calculator:before{content:""}.fa-calendar:before{content:""}.fa-calendar-alt:before{content:""}.fa-calendar-check:before{content:""}.fa-calendar-day:before{content:""}.fa-calendar-minus:before{content:""}.fa-calendar-plus:before{content:""}.fa-calendar-times:before{content:""}.fa-calendar-week:before{content:""}.fa-camera:before{content:""}.fa-camera-retro:before{content:""}.fa-campground:before{content:""}.fa-canadian-maple-leaf:before{content:""}.fa-candy-cane:before{content:""}.fa-cannabis:before{content:""}.fa-capsules:before{content:""}.fa-car:before{content:""}.fa-car-alt:before{content:""}.fa-car-battery:before{content:""}.fa-car-crash:before{content:""}.fa-car-side:before{content:""}.fa-caravan:before{content:""}.fa-caret-down:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-caret-square-down:before{content:""}.fa-caret-square-left:before{content:""}.fa-caret-square-right:before{content:""}.fa-caret-square-up:before{content:""}.fa-caret-up:before{content:""}.fa-carrot:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-cart-plus:before{content:""}.fa-cash-register:before{content:""}.fa-cat:before{content:""}.fa-cc-amazon-pay:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-apple-pay:before{content:""}.fa-cc-diners-club:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-cc-visa:before{content:""}.fa-centercode:before{content:""}.fa-centos:before{content:""}.fa-certificate:before{content:""}.fa-chair:before{content:""}.fa-chalkboard:before{content:""}.fa-chalkboard-teacher:before{content:""}.fa-charging-station:before{content:""}.fa-chart-area:before{content:""}.fa-chart-bar:before{content:""}.fa-chart-line:before{content:""}.fa-chart-pie:before{content:""}.fa-check:before{content:""}.fa-check-circle:before{content:""}.fa-check-double:before{content:""}.fa-check-square:before{content:""}.fa-cheese:before{content:""}.fa-chess:before{content:""}.fa-chess-bishop:before{content:""}.fa-chess-board:before{content:""}.fa-chess-king:before{content:""}.fa-chess-knight:before{content:""}.fa-chess-pawn:before{content:""}.fa-chess-queen:before{content:""}.fa-chess-rook:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-down:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-chevron-up:before{content:""}.fa-child:before{content:""}.fa-chrome:before{content:""}.fa-chromecast:before{content:""}.fa-church:before{content:""}.fa-circle:before{content:""}.fa-circle-notch:before{content:""}.fa-city:before{content:""}.fa-clinic-medical:before{content:""}.fa-clipboard:before{content:""}.fa-clipboard-check:before{content:""}.fa-clipboard-list:before{content:""}.fa-clock:before{content:""}.fa-clone:before{content:""}.fa-closed-captioning:before{content:""}.fa-cloud:before{content:""}.fa-cloud-download-alt:before{content:""}.fa-cloud-meatball:before{content:""}.fa-cloud-moon:before{content:""}.fa-cloud-moon-rain:before{content:""}.fa-cloud-rain:before{content:""}.fa-cloud-showers-heavy:before{content:""}.fa-cloud-sun:before{content:""}.fa-cloud-sun-rain:before{content:""}.fa-cloud-upload-alt:before{content:""}.fa-cloudscale:before{content:""}.fa-cloudsmith:before{content:""}.fa-cloudversify:before{content:""}.fa-cocktail:before{content:""}.fa-code:before{content:""}.fa-code-branch:before{content:""}.fa-codepen:before{content:""}.fa-codiepie:before{content:""}.fa-coffee:before{content:""}.fa-cog:before{content:""}.fa-cogs:before{content:""}.fa-coins:before{content:""}.fa-columns:before{content:""}.fa-comment:before{content:""}.fa-comment-alt:before{content:""}.fa-comment-dollar:before{content:""}.fa-comment-dots:before{content:""}.fa-comment-medical:before{content:""}.fa-comment-slash:before{content:""}.fa-comments:before{content:""}.fa-comments-dollar:before{content:""}.fa-compact-disc:before{content:""}.fa-compass:before{content:""}.fa-compress:before{content:""}.fa-compress-alt:before{content:""}.fa-compress-arrows-alt:before{content:""}.fa-concierge-bell:before{content:""}.fa-confluence:before{content:""}.fa-connectdevelop:before{content:""}.fa-contao:before{content:""}.fa-cookie:before{content:""}.fa-cookie-bite:before{content:""}.fa-copy:before{content:""}.fa-copyright:before{content:""}.fa-cotton-bureau:before{content:""}.fa-couch:before{content:""}.fa-cpanel:before{content:""}.fa-creative-commons:before{content:""}.fa-creative-commons-by:before{content:""}.fa-creative-commons-nc:before{content:""}.fa-creative-commons-nc-eu:before{content:""}.fa-creative-commons-nc-jp:before{content:""}.fa-creative-commons-nd:before{content:""}.fa-creative-commons-pd:before{content:""}.fa-creative-commons-pd-alt:before{content:""}.fa-creative-commons-remix:before{content:""}.fa-creative-commons-sa:before{content:""}.fa-creative-commons-sampling:before{content:""}.fa-creative-commons-sampling-plus:before{content:""}.fa-creative-commons-share:before{content:""}.fa-creative-commons-zero:before{content:""}.fa-credit-card:before{content:""}.fa-critical-role:before{content:""}.fa-crop:before{content:""}.fa-crop-alt:before{content:""}.fa-cross:before{content:""}.fa-crosshairs:before{content:""}.fa-crow:before{content:""}.fa-crown:before{content:""}.fa-crutch:before{content:""}.fa-css3:before{content:""}.fa-css3-alt:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-cut:before{content:""}.fa-cuttlefish:before{content:""}.fa-d-and-d:before{content:""}.fa-d-and-d-beyond:before{content:""}.fa-dashcube:before{content:""}.fa-database:before{content:""}.fa-deaf:before{content:""}.fa-delicious:before{content:""}.fa-democrat:before{content:""}.fa-deploydog:before{content:""}.fa-deskpro:before{content:""}.fa-desktop:before{content:""}.fa-dev:before{content:""}.fa-deviantart:before{content:""}.fa-dharmachakra:before{content:""}.fa-dhl:before{content:""}.fa-diagnoses:before{content:""}.fa-diaspora:before{content:""}.fa-dice:before{content:""}.fa-dice-d20:before{content:""}.fa-dice-d6:before{content:""}.fa-dice-five:before{content:""}.fa-dice-four:before{content:""}.fa-dice-one:before{content:""}.fa-dice-six:before{content:""}.fa-dice-three:before{content:""}.fa-dice-two:before{content:""}.fa-digg:before{content:""}.fa-digital-ocean:before{content:""}.fa-digital-tachograph:before{content:""}.fa-directions:before{content:""}.fa-discord:before{content:""}.fa-discourse:before{content:""}.fa-divide:before{content:""}.fa-dizzy:before{content:""}.fa-dna:before{content:""}.fa-dochub:before{content:""}.fa-docker:before{content:""}.fa-dog:before{content:""}.fa-dollar-sign:before{content:""}.fa-dolly:before{content:""}.fa-dolly-flatbed:before{content:""}.fa-donate:before{content:""}.fa-door-closed:before{content:""}.fa-door-open:before{content:""}.fa-dot-circle:before{content:""}.fa-dove:before{content:""}.fa-download:before{content:""}.fa-draft2digital:before{content:""}.fa-drafting-compass:before{content:""}.fa-dragon:before{content:""}.fa-draw-polygon:before{content:""}.fa-dribbble:before{content:""}.fa-dribbble-square:before{content:""}.fa-dropbox:before{content:""}.fa-drum:before{content:""}.fa-drum-steelpan:before{content:""}.fa-drumstick-bite:before{content:""}.fa-drupal:before{content:""}.fa-dumbbell:before{content:""}.fa-dumpster:before{content:""}.fa-dumpster-fire:before{content:""}.fa-dungeon:before{content:""}.fa-dyalog:before{content:""}.fa-earlybirds:before{content:""}.fa-ebay:before{content:""}.fa-edge:before{content:""}.fa-edit:before{content:""}.fa-egg:before{content:""}.fa-eject:before{content:""}.fa-elementor:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-ello:before{content:""}.fa-ember:before{content:""}.fa-empire:before{content:""}.fa-envelope:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-text:before{content:""}.fa-envelope-square:before{content:""}.fa-envira:before{content:""}.fa-equals:before{content:""}.fa-eraser:before{content:""}.fa-erlang:before{content:""}.fa-ethereum:before{content:""}.fa-ethernet:before{content:""}.fa-etsy:before{content:""}.fa-euro-sign:before{content:""}.fa-evernote:before{content:""}.fa-exchange-alt:before{content:""}.fa-exclamation:before{content:""}.fa-exclamation-circle:before{content:""}.fa-exclamation-triangle:before{content:""}.fa-expand:before{content:""}.fa-expand-alt:before{content:""}.fa-expand-arrows-alt:before{content:""}.fa-expeditedssl:before{content:""}.fa-external-link-alt:before{content:""}.fa-external-link-square-alt:before{content:""}.fa-eye:before{content:""}.fa-eye-dropper:before{content:""}.fa-eye-slash:before{content:""}.fa-facebook:before{content:""}.fa-facebook-f:before{content:""}.fa-facebook-messenger:before{content:""}.fa-facebook-square:before{content:""}.fa-fan:before{content:""}.fa-fantasy-flight-games:before{content:""}.fa-fast-backward:before{content:""}.fa-fast-forward:before{content:""}.fa-fax:before{content:""}.fa-feather:before{content:""}.fa-feather-alt:before{content:""}.fa-fedex:before{content:""}.fa-fedora:before{content:""}.fa-female:before{content:""}.fa-fighter-jet:before{content:""}.fa-figma:before{content:""}.fa-file:before{content:""}.fa-file-alt:before{content:""}.fa-file-archive:before{content:""}.fa-file-audio:before{content:""}.fa-file-code:before{content:""}.fa-file-contract:before{content:""}.fa-file-csv:before{content:""}.fa-file-download:before{content:""}.fa-file-excel:before{content:""}.fa-file-export:before{content:""}.fa-file-image:before{content:""}.fa-file-import:before{content:""}.fa-file-invoice:before{content:""}.fa-file-invoice-dollar:before{content:""}.fa-file-medical:before{content:""}.fa-file-medical-alt:before{content:""}.fa-file-pdf:before{content:""}.fa-file-powerpoint:before{content:""}.fa-file-prescription:before{content:""}.fa-file-signature:before{content:""}.fa-file-upload:before{content:""}.fa-file-video:before{content:""}.fa-file-word:before{content:""}.fa-fill:before{content:""}.fa-fill-drip:before{content:""}.fa-film:before{content:""}.fa-filter:before{content:""}.fa-fingerprint:before{content:""}.fa-fire:before{content:""}.fa-fire-alt:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-firefox:before{content:""}.fa-firefox-browser:before{content:"龜"}.fa-first-aid:before{content:""}.fa-first-order:before{content:""}.fa-first-order-alt:before{content:""}.fa-firstdraft:before{content:""}.fa-fish:before{content:""}.fa-fist-raised:before{content:""}.fa-flag:before{content:""}.fa-flag-checkered:before{content:""}.fa-flag-usa:before{content:""}.fa-flask:before{content:""}.fa-flickr:before{content:""}.fa-flipboard:before{content:""}.fa-flushed:before{content:""}.fa-fly:before{content:""}.fa-folder:before{content:""}.fa-folder-minus:before{content:""}.fa-folder-open:before{content:""}.fa-folder-plus:before{content:""}.fa-font:before{content:""}.fa-font-awesome:before{content:""}.fa-font-awesome-alt:before{content:""}.fa-font-awesome-flag:before{content:""}.fa-font-awesome-logo-full:before{content:""}.fa-fonticons:before{content:""}.fa-fonticons-fi:before{content:""}.fa-football-ball:before{content:""}.fa-fort-awesome:before{content:""}.fa-fort-awesome-alt:before{content:""}.fa-forumbee:before{content:""}.fa-forward:before{content:""}.fa-foursquare:before{content:""}.fa-free-code-camp:before{content:""}.fa-freebsd:before{content:""}.fa-frog:before{content:""}.fa-frown:before{content:""}.fa-frown-open:before{content:""}.fa-fulcrum:before{content:""}.fa-funnel-dollar:before{content:""}.fa-futbol:before{content:""}.fa-galactic-republic:before{content:""}.fa-galactic-senate:before{content:""}.fa-gamepad:before{content:""}.fa-gas-pump:before{content:""}.fa-gavel:before{content:""}.fa-gem:before{content:""}.fa-genderless:before{content:""}.fa-get-pocket:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-ghost:before{content:""}.fa-gift:before{content:""}.fa-gifts:before{content:""}.fa-git:before{content:""}.fa-git-alt:before{content:""}.fa-git-square:before{content:""}.fa-github:before{content:""}.fa-github-alt:before{content:""}.fa-github-square:before{content:""}.fa-gitkraken:before{content:""}.fa-gitlab:before{content:""}.fa-gitter:before{content:""}.fa-glass-cheers:before{content:""}.fa-glass-martini:before{content:""}.fa-glass-martini-alt:before{content:""}.fa-glass-whiskey:before{content:""}.fa-glasses:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-globe:before{content:""}.fa-globe-africa:before{content:""}.fa-globe-americas:before{content:""}.fa-globe-asia:before{content:""}.fa-globe-europe:before{content:""}.fa-gofore:before{content:""}.fa-golf-ball:before{content:""}.fa-goodreads:before{content:""}.fa-goodreads-g:before{content:""}.fa-google:before{content:""}.fa-google-drive:before{content:""}.fa-google-play:before{content:""}.fa-google-plus:before{content:""}.fa-google-plus-g:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-wallet:before{content:""}.fa-gopuram:before{content:""}.fa-graduation-cap:before{content:""}.fa-gratipay:before{content:""}.fa-grav:before{content:""}.fa-greater-than:before{content:""}.fa-greater-than-equal:before{content:""}.fa-grimace:before{content:""}.fa-grin:before{content:""}.fa-grin-alt:before{content:""}.fa-grin-beam:before{content:""}.fa-grin-beam-sweat:before{content:""}.fa-grin-hearts:before{content:""}.fa-grin-squint:before{content:""}.fa-grin-squint-tears:before{content:""}.fa-grin-stars:before{content:""}.fa-grin-tears:before{content:""}.fa-grin-tongue:before{content:""}.fa-grin-tongue-squint:before{content:""}.fa-grin-tongue-wink:before{content:""}.fa-grin-wink:before{content:""}.fa-grip-horizontal:before{content:""}.fa-grip-lines:before{content:""}.fa-grip-lines-vertical:before{content:""}.fa-grip-vertical:before{content:""}.fa-gripfire:before{content:""}.fa-grunt:before{content:""}.fa-guitar:before{content:""}.fa-gulp:before{content:""}.fa-h-square:before{content:""}.fa-hacker-news:before{content:""}.fa-hacker-news-square:before{content:""}.fa-hackerrank:before{content:""}.fa-hamburger:before{content:""}.fa-hammer:before{content:""}.fa-hamsa:before{content:""}.fa-hand-holding:before{content:""}.fa-hand-holding-heart:before{content:""}.fa-hand-holding-usd:before{content:""}.fa-hand-lizard:before{content:""}.fa-hand-middle-finger:before{content:""}.fa-hand-paper:before{content:""}.fa-hand-peace:before{content:""}.fa-hand-point-down:before{content:""}.fa-hand-point-left:before{content:""}.fa-hand-point-right:before{content:""}.fa-hand-point-up:before{content:""}.fa-hand-pointer:before{content:""}.fa-hand-rock:before{content:""}.fa-hand-scissors:before{content:""}.fa-hand-spock:before{content:""}.fa-hands:before{content:""}.fa-hands-helping:before{content:""}.fa-handshake:before{content:""}.fa-hanukiah:before{content:""}.fa-hard-hat:before{content:""}.fa-hashtag:before{content:""}.fa-hat-cowboy:before{content:""}.fa-hat-cowboy-side:before{content:""}.fa-hat-wizard:before{content:""}.fa-hdd:before{content:""}.fa-heading:before{content:""}.fa-headphones:before{content:""}.fa-headphones-alt:before{content:""}.fa-headset:before{content:""}.fa-heart:before{content:""}.fa-heart-broken:before{content:""}.fa-heartbeat:before{content:""}.fa-helicopter:before{content:""}.fa-highlighter:before{content:""}.fa-hiking:before{content:""}.fa-hippo:before{content:""}.fa-hips:before{content:""}.fa-hire-a-helper:before{content:""}.fa-history:before{content:""}.fa-hockey-puck:before{content:""}.fa-holly-berry:before{content:""}.fa-home:before{content:""}.fa-hooli:before{content:""}.fa-hornbill:before{content:""}.fa-horse:before{content:""}.fa-horse-head:before{content:""}.fa-hospital:before{content:""}.fa-hospital-alt:before{content:""}.fa-hospital-symbol:before{content:""}.fa-hot-tub:before{content:""}.fa-hotdog:before{content:""}.fa-hotel:before{content:""}.fa-hotjar:before{content:""}.fa-hourglass:before{content:""}.fa-hourglass-end:before{content:""}.fa-hourglass-half:before{content:""}.fa-hourglass-start:before{content:""}.fa-house-damage:before{content:""}.fa-houzz:before{content:""}.fa-hryvnia:before{content:""}.fa-html5:before{content:""}.fa-hubspot:before{content:""}.fa-i-cursor:before{content:""}.fa-ice-cream:before{content:""}.fa-icicles:before{content:""}.fa-icons:before{content:""}.fa-id-badge:before{content:""}.fa-id-card:before{content:""}.fa-id-card-alt:before{content:""}.fa-ideal:before{content:"邏"}.fa-igloo:before{content:""}.fa-image:before{content:""}.fa-images:before{content:""}.fa-imdb:before{content:""}.fa-inbox:before{content:""}.fa-indent:before{content:""}.fa-industry:before{content:""}.fa-infinity:before{content:""}.fa-info:before{content:""}.fa-info-circle:before{content:""}.fa-instagram:before{content:""}.fa-intercom:before{content:""}.fa-internet-explorer:before{content:""}.fa-invision:before{content:""}.fa-ioxhost:before{content:""}.fa-italic:before{content:""}.fa-itch-io:before{content:""}.fa-itunes:before{content:""}.fa-itunes-note:before{content:""}.fa-java:before{content:""}.fa-jedi:before{content:""}.fa-jedi-order:before{content:""}.fa-jenkins:before{content:""}.fa-jira:before{content:""}.fa-joget:before{content:""}.fa-joint:before{content:""}.fa-joomla:before{content:""}.fa-journal-whills:before{content:""}.fa-js:before{content:""}.fa-js-square:before{content:""}.fa-jsfiddle:before{content:""}.fa-kaaba:before{content:""}.fa-kaggle:before{content:""}.fa-key:before{content:""}.fa-keybase:before{content:""}.fa-keyboard:before{content:""}.fa-keycdn:before{content:""}.fa-khanda:before{content:""}.fa-kickstarter:before{content:""}.fa-kickstarter-k:before{content:""}.fa-kiss:before{content:""}.fa-kiss-beam:before{content:""}.fa-kiss-wink-heart:before{content:""}.fa-kiwi-bird:before{content:""}.fa-korvue:before{content:""}.fa-landmark:before{content:""}.fa-language:before{content:""}.fa-laptop:before{content:""}.fa-laptop-code:before{content:""}.fa-laptop-medical:before{content:""}.fa-laravel:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-laugh:before{content:""}.fa-laugh-beam:before{content:""}.fa-laugh-squint:before{content:""}.fa-laugh-wink:before{content:""}.fa-layer-group:before{content:""}.fa-leaf:before{content:""}.fa-leanpub:before{content:""}.fa-lemon:before{content:""}.fa-less:before{content:""}.fa-less-than:before{content:""}.fa-less-than-equal:before{content:""}.fa-level-down-alt:before{content:""}.fa-level-up-alt:before{content:""}.fa-life-ring:before{content:""}.fa-lightbulb:before{content:""}.fa-line:before{content:""}.fa-link:before{content:""}.fa-linkedin:before{content:""}.fa-linkedin-in:before{content:""}.fa-linode:before{content:""}.fa-linux:before{content:""}.fa-lira-sign:before{content:""}.fa-list:before{content:""}.fa-list-alt:before{content:""}.fa-list-ol:before{content:""}.fa-list-ul:before{content:""}.fa-location-arrow:before{content:""}.fa-lock:before{content:""}.fa-lock-open:before{content:""}.fa-long-arrow-alt-down:before{content:""}.fa-long-arrow-alt-left:before{content:""}.fa-long-arrow-alt-right:before{content:""}.fa-long-arrow-alt-up:before{content:""}.fa-low-vision:before{content:""}.fa-luggage-cart:before{content:""}.fa-lyft:before{content:""}.fa-magento:before{content:""}.fa-magic:before{content:""}.fa-magnet:before{content:""}.fa-mail-bulk:before{content:""}.fa-mailchimp:before{content:""}.fa-male:before{content:""}.fa-mandalorian:before{content:""}.fa-map:before{content:""}.fa-map-marked:before{content:""}.fa-map-marked-alt:before{content:""}.fa-map-marker:before{content:""}.fa-map-marker-alt:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-markdown:before{content:""}.fa-marker:before{content:""}.fa-mars:before{content:""}.fa-mars-double:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mask:before{content:""}.fa-mastodon:before{content:""}.fa-maxcdn:before{content:""}.fa-mdb:before{content:""}.fa-medal:before{content:""}.fa-medapps:before{content:""}.fa-medium:before{content:""}.fa-medium-m:before{content:""}.fa-medkit:before{content:""}.fa-medrt:before{content:""}.fa-meetup:before{content:""}.fa-megaport:before{content:""}.fa-meh:before{content:""}.fa-meh-blank:before{content:""}.fa-meh-rolling-eyes:before{content:""}.fa-memory:before{content:""}.fa-mendeley:before{content:""}.fa-menorah:before{content:""}.fa-mercury:before{content:""}.fa-meteor:before{content:""}.fa-microblog:before{content:"駱"}.fa-microchip:before{content:""}.fa-microphone:before{content:""}.fa-microphone-alt:before{content:""}.fa-microphone-alt-slash:before{content:""}.fa-microphone-slash:before{content:""}.fa-microscope:before{content:""}.fa-microsoft:before{content:""}.fa-minus:before{content:""}.fa-minus-circle:before{content:""}.fa-minus-square:before{content:""}.fa-mitten:before{content:""}.fa-mix:before{content:""}.fa-mixcloud:before{content:""}.fa-mizuni:before{content:""}.fa-mobile:before{content:""}.fa-mobile-alt:before{content:""}.fa-modx:before{content:""}.fa-monero:before{content:""}.fa-money-bill:before{content:""}.fa-money-bill-alt:before{content:""}.fa-money-bill-wave:before{content:""}.fa-money-bill-wave-alt:before{content:""}.fa-money-check:before{content:""}.fa-money-check-alt:before{content:""}.fa-monument:before{content:""}.fa-moon:before{content:""}.fa-mortar-pestle:before{content:""}.fa-mosque:before{content:""}.fa-motorcycle:before{content:""}.fa-mountain:before{content:""}.fa-mouse:before{content:""}.fa-mouse-pointer:before{content:""}.fa-mug-hot:before{content:""}.fa-music:before{content:""}.fa-napster:before{content:""}.fa-neos:before{content:""}.fa-network-wired:before{content:""}.fa-neuter:before{content:""}.fa-newspaper:before{content:""}.fa-nimblr:before{content:""}.fa-node:before{content:""}.fa-node-js:before{content:""}.fa-not-equal:before{content:""}.fa-notes-medical:before{content:""}.fa-npm:before{content:""}.fa-ns8:before{content:""}.fa-nutritionix:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-oil-can:before{content:""}.fa-old-republic:before{content:""}.fa-om:before{content:""}.fa-opencart:before{content:""}.fa-openid:before{content:""}.fa-opera:before{content:""}.fa-optin-monster:before{content:""}.fa-orcid:before{content:""}.fa-osi:before{content:""}.fa-otter:before{content:""}.fa-outdent:before{content:""}.fa-page4:before{content:""}.fa-pagelines:before{content:""}.fa-pager:before{content:""}.fa-paint-brush:before{content:""}.fa-paint-roller:before{content:""}.fa-palette:before{content:""}.fa-palfed:before{content:""}.fa-pallet:before{content:""}.fa-paper-plane:before{content:""}.fa-paperclip:before{content:""}.fa-parachute-box:before{content:""}.fa-paragraph:before{content:""}.fa-parking:before{content:""}.fa-passport:before{content:""}.fa-pastafarianism:before{content:""}.fa-paste:before{content:""}.fa-patreon:before{content:""}.fa-pause:before{content:""}.fa-pause-circle:before{content:""}.fa-paw:before{content:""}.fa-paypal:before{content:""}.fa-peace:before{content:""}.fa-pen:before{content:""}.fa-pen-alt:before{content:""}.fa-pen-fancy:before{content:""}.fa-pen-nib:before{content:""}.fa-pen-square:before{content:""}.fa-pencil-alt:before{content:""}.fa-pencil-ruler:before{content:""}.fa-penny-arcade:before{content:""}.fa-people-carry:before{content:""}.fa-pepper-hot:before{content:""}.fa-percent:before{content:""}.fa-percentage:before{content:""}.fa-periscope:before{content:""}.fa-person-booth:before{content:""}.fa-phabricator:before{content:""}.fa-phoenix-framework:before{content:""}.fa-phoenix-squadron:before{content:""}.fa-phone:before{content:""}.fa-phone-alt:before{content:""}.fa-phone-slash:before{content:""}.fa-phone-square:before{content:""}.fa-phone-square-alt:before{content:""}.fa-phone-volume:before{content:""}.fa-photo-video:before{content:""}.fa-php:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-pied-piper-hat:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-square:before{content:"爛"}.fa-piggy-bank:before{content:""}.fa-pills:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-p:before{content:""}.fa-pinterest-square:before{content:""}.fa-pizza-slice:before{content:""}.fa-place-of-worship:before{content:""}.fa-plane:before{content:""}.fa-plane-arrival:before{content:""}.fa-plane-departure:before{content:""}.fa-play:before{content:""}.fa-play-circle:before{content:""}.fa-playstation:before{content:""}.fa-plug:before{content:""}.fa-plus:before{content:""}.fa-plus-circle:before{content:""}.fa-plus-square:before{content:""}.fa-podcast:before{content:""}.fa-poll:before{content:""}.fa-poll-h:before{content:""}.fa-poo:before{content:""}.fa-poo-storm:before{content:""}.fa-poop:before{content:""}.fa-portrait:before{content:""}.fa-pound-sign:before{content:""}.fa-power-off:before{content:""}.fa-pray:before{content:""}.fa-praying-hands:before{content:""}.fa-prescription:before{content:""}.fa-prescription-bottle:before{content:""}.fa-prescription-bottle-alt:before{content:""}.fa-print:before{content:""}.fa-procedures:before{content:""}.fa-product-hunt:before{content:""}.fa-project-diagram:before{content:""}.fa-pushed:before{content:""}.fa-puzzle-piece:before{content:""}.fa-python:before{content:""}.fa-qq:before{content:""}.fa-qrcode:before{content:""}.fa-question:before{content:""}.fa-question-circle:before{content:""}.fa-quidditch:before{content:""}.fa-quinscape:before{content:""}.fa-quora:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-quran:before{content:""}.fa-r-project:before{content:""}.fa-radiation:before{content:""}.fa-radiation-alt:before{content:""}.fa-rainbow:before{content:""}.fa-random:before{content:""}.fa-raspberry-pi:before{content:""}.fa-ravelry:before{content:""}.fa-react:before{content:""}.fa-reacteurope:before{content:""}.fa-readme:before{content:""}.fa-rebel:before{content:""}.fa-receipt:before{content:""}.fa-record-vinyl:before{content:""}.fa-recycle:before{content:""}.fa-red-river:before{content:""}.fa-reddit:before{content:""}.fa-reddit-alien:before{content:""}.fa-reddit-square:before{content:""}.fa-redhat:before{content:""}.fa-redo:before{content:""}.fa-redo-alt:before{content:""}.fa-registered:before{content:""}.fa-remove-format:before{content:""}.fa-renren:before{content:""}.fa-reply:before{content:""}.fa-reply-all:before{content:""}.fa-replyd:before{content:""}.fa-republican:before{content:""}.fa-researchgate:before{content:""}.fa-resolving:before{content:""}.fa-restroom:before{content:""}.fa-retweet:before{content:""}.fa-rev:before{content:""}.fa-ribbon:before{content:""}.fa-ring:before{content:""}.fa-road:before{content:""}.fa-robot:before{content:""}.fa-rocket:before{content:""}.fa-rocketchat:before{content:""}.fa-rockrms:before{content:""}.fa-route:before{content:""}.fa-rss:before{content:""}.fa-rss-square:before{content:""}.fa-ruble-sign:before{content:""}.fa-ruler:before{content:""}.fa-ruler-combined:before{content:""}.fa-ruler-horizontal:before{content:""}.fa-ruler-vertical:before{content:""}.fa-running:before{content:""}.fa-rupee-sign:before{content:""}.fa-sad-cry:before{content:""}.fa-sad-tear:before{content:""}.fa-safari:before{content:""}.fa-salesforce:before{content:""}.fa-sass:before{content:""}.fa-satellite:before{content:""}.fa-satellite-dish:before{content:""}.fa-save:before{content:""}.fa-schlix:before{content:""}.fa-school:before{content:""}.fa-screwdriver:before{content:""}.fa-scribd:before{content:""}.fa-scroll:before{content:""}.fa-sd-card:before{content:""}.fa-search:before{content:""}.fa-search-dollar:before{content:""}.fa-search-location:before{content:""}.fa-search-minus:before{content:""}.fa-search-plus:before{content:""}.fa-searchengin:before{content:""}.fa-seedling:before{content:""}.fa-sellcast:before{content:""}.fa-sellsy:before{content:""}.fa-server:before{content:""}.fa-servicestack:before{content:""}.fa-shapes:before{content:""}.fa-share:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-share-square:before{content:""}.fa-shekel-sign:before{content:""}.fa-shield-alt:before{content:""}.fa-ship:before{content:""}.fa-shipping-fast:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-shoe-prints:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-shopping-cart:before{content:""}.fa-shopware:before{content:""}.fa-shower:before{content:""}.fa-shuttle-van:before{content:""}.fa-sign:before{content:""}.fa-sign-in-alt:before{content:""}.fa-sign-language:before{content:""}.fa-sign-out-alt:before{content:""}.fa-signal:before{content:""}.fa-signature:before{content:""}.fa-sim-card:before{content:""}.fa-simplybuilt:before{content:""}.fa-sistrix:before{content:""}.fa-sitemap:before{content:""}.fa-sith:before{content:""}.fa-skating:before{content:""}.fa-sketch:before{content:""}.fa-skiing:before{content:""}.fa-skiing-nordic:before{content:""}.fa-skull:before{content:""}.fa-skull-crossbones:before{content:""}.fa-skyatlas:before{content:""}.fa-skype:before{content:""}.fa-slack:before{content:""}.fa-slack-hash:before{content:""}.fa-slash:before{content:""}.fa-sleigh:before{content:""}.fa-sliders-h:before{content:""}.fa-slideshare:before{content:""}.fa-smile:before{content:""}.fa-smile-beam:before{content:""}.fa-smile-wink:before{content:""}.fa-smog:before{content:""}.fa-smoking:before{content:""}.fa-smoking-ban:before{content:""}.fa-sms:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-snowboarding:before{content:""}.fa-snowflake:before{content:""}.fa-snowman:before{content:""}.fa-snowplow:before{content:""}.fa-socks:before{content:""}.fa-solar-panel:before{content:""}.fa-sort:before{content:""}.fa-sort-alpha-down:before{content:""}.fa-sort-alpha-down-alt:before{content:""}.fa-sort-alpha-up:before{content:""}.fa-sort-alpha-up-alt:before{content:""}.fa-sort-amount-down:before{content:""}.fa-sort-amount-down-alt:before{content:""}.fa-sort-amount-up:before{content:""}.fa-sort-amount-up-alt:before{content:""}.fa-sort-down:before{content:""}.fa-sort-numeric-down:before{content:""}.fa-sort-numeric-down-alt:before{content:""}.fa-sort-numeric-up:before{content:""}.fa-sort-numeric-up-alt:before{content:""}.fa-sort-up:before{content:""}.fa-soundcloud:before{content:""}.fa-sourcetree:before{content:""}.fa-spa:before{content:""}.fa-space-shuttle:before{content:""}.fa-speakap:before{content:""}.fa-speaker-deck:before{content:""}.fa-spell-check:before{content:""}.fa-spider:before{content:""}.fa-spinner:before{content:""}.fa-splotch:before{content:""}.fa-spotify:before{content:""}.fa-spray-can:before{content:""}.fa-square:before{content:""}.fa-square-full:before{content:""}.fa-square-root-alt:before{content:""}.fa-squarespace:before{content:""}.fa-stack-exchange:before{content:""}.fa-stack-overflow:before{content:""}.fa-stackpath:before{content:""}.fa-stamp:before{content:""}.fa-star:before{content:""}.fa-star-and-crescent:before{content:""}.fa-star-half:before{content:""}.fa-star-half-alt:before{content:""}.fa-star-of-david:before{content:""}.fa-star-of-life:before{content:""}.fa-staylinked:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-steam-symbol:before{content:""}.fa-step-backward:before{content:""}.fa-step-forward:before{content:""}.fa-stethoscope:before{content:""}.fa-sticker-mule:before{content:""}.fa-sticky-note:before{content:""}.fa-stop:before{content:""}.fa-stop-circle:before{content:""}.fa-stopwatch:before{content:""}.fa-store:before{content:""}.fa-store-alt:before{content:""}.fa-strava:before{content:""}.fa-stream:before{content:""}.fa-street-view:before{content:""}.fa-strikethrough:before{content:""}.fa-stripe:before{content:""}.fa-stripe-s:before{content:""}.fa-stroopwafel:before{content:""}.fa-studiovinari:before{content:""}.fa-stumbleupon:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-subscript:before{content:""}.fa-subway:before{content:""}.fa-suitcase:before{content:""}.fa-suitcase-rolling:before{content:""}.fa-sun:before{content:""}.fa-superpowers:before{content:""}.fa-superscript:before{content:""}.fa-supple:before{content:""}.fa-surprise:before{content:""}.fa-suse:before{content:""}.fa-swatchbook:before{content:""}.fa-swift:before{content:""}.fa-swimmer:before{content:""}.fa-swimming-pool:before{content:""}.fa-symfony:before{content:""}.fa-synagogue:before{content:""}.fa-sync:before{content:""}.fa-sync-alt:before{content:""}.fa-syringe:before{content:""}.fa-table:before{content:""}.fa-table-tennis:before{content:""}.fa-tablet:before{content:""}.fa-tablet-alt:before{content:""}.fa-tablets:before{content:""}.fa-tachometer-alt:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-tape:before{content:""}.fa-tasks:before{content:""}.fa-taxi:before{content:""}.fa-teamspeak:before{content:""}.fa-teeth:before{content:""}.fa-teeth-open:before{content:""}.fa-telegram:before{content:""}.fa-telegram-plane:before{content:""}.fa-temperature-high:before{content:""}.fa-temperature-low:before{content:""}.fa-tencent-weibo:before{content:""}.fa-tenge:before{content:""}.fa-terminal:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-th:before{content:""}.fa-th-large:before{content:""}.fa-th-list:before{content:""}.fa-the-red-yeti:before{content:""}.fa-theater-masks:before{content:""}.fa-themeco:before{content:""}.fa-themeisle:before{content:""}.fa-thermometer:before{content:""}.fa-thermometer-empty:before{content:""}.fa-thermometer-full:before{content:""}.fa-thermometer-half:before{content:""}.fa-thermometer-quarter:before{content:""}.fa-thermometer-three-quarters:before{content:""}.fa-think-peaks:before{content:""}.fa-thumbs-down:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbtack:before{content:""}.fa-ticket-alt:before{content:""}.fa-times:before{content:""}.fa-times-circle:before{content:""}.fa-tint:before{content:""}.fa-tint-slash:before{content:""}.fa-tired:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-toilet:before{content:""}.fa-toilet-paper:before{content:""}.fa-toolbox:before{content:""}.fa-tools:before{content:""}.fa-tooth:before{content:""}.fa-torah:before{content:""}.fa-torii-gate:before{content:""}.fa-tractor:before{content:""}.fa-trade-federation:before{content:""}.fa-trademark:before{content:""}.fa-traffic-light:before{content:""}.fa-trailer:before{content:"論"}.fa-train:before{content:""}.fa-tram:before{content:""}.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-trash:before{content:""}.fa-trash-alt:before{content:""}.fa-trash-restore:before{content:""}.fa-trash-restore-alt:before{content:""}.fa-tree:before{content:""}.fa-trello:before{content:""}.fa-tripadvisor:before{content:""}.fa-trophy:before{content:""}.fa-truck:before{content:""}.fa-truck-loading:before{content:""}.fa-truck-monster:before{content:""}.fa-truck-moving:before{content:""}.fa-truck-pickup:before{content:""}.fa-tshirt:before{content:""}.fa-tty:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-tv:before{content:""}.fa-twitch:before{content:""}.fa-twitter:before{content:""}.fa-twitter-square:before{content:""}.fa-typo3:before{content:""}.fa-uber:before{content:""}.fa-ubuntu:before{content:""}.fa-uikit:before{content:""}.fa-umbraco:before{content:""}.fa-umbrella:before{content:""}.fa-umbrella-beach:before{content:""}.fa-underline:before{content:""}.fa-undo:before{content:""}.fa-undo-alt:before{content:""}.fa-uniregistry:before{content:""}.fa-unity:before{content:"雷"}.fa-universal-access:before{content:""}.fa-university:before{content:""}.fa-unlink:before{content:""}.fa-unlock:before{content:""}.fa-unlock-alt:before{content:""}.fa-untappd:before{content:""}.fa-upload:before{content:""}.fa-ups:before{content:""}.fa-usb:before{content:""}.fa-user:before{content:""}.fa-user-alt:before{content:""}.fa-user-alt-slash:before{content:""}.fa-user-astronaut:before{content:""}.fa-user-check:before{content:""}.fa-user-circle:before{content:""}.fa-user-clock:before{content:""}.fa-user-cog:before{content:""}.fa-user-edit:before{content:""}.fa-user-friends:before{content:""}.fa-user-graduate:before{content:""}.fa-user-injured:before{content:""}.fa-user-lock:before{content:""}.fa-user-md:before{content:""}.fa-user-minus:before{content:""}.fa-user-ninja:before{content:""}.fa-user-nurse:before{content:""}.fa-user-plus:before{content:""}.fa-user-secret:before{content:""}.fa-user-shield:before{content:""}.fa-user-slash:before{content:""}.fa-user-tag:before{content:""}.fa-user-tie:before{content:""}.fa-user-times:before{content:""}.fa-users:before{content:""}.fa-users-cog:before{content:""}.fa-usps:before{content:""}.fa-ussunnah:before{content:""}.fa-utensil-spoon:before{content:""}.fa-utensils:before{content:""}.fa-vaadin:before{content:""}.fa-vector-square:before{content:""}.fa-venus:before{content:""}.fa-venus-double:before{content:""}.fa-venus-mars:before{content:""}.fa-viacoin:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-vial:before{content:""}.fa-vials:before{content:""}.fa-viber:before{content:""}.fa-video:before{content:""}.fa-video-slash:before{content:""}.fa-vihara:before{content:""}.fa-vimeo:before{content:""}.fa-vimeo-square:before{content:""}.fa-vimeo-v:before{content:""}.fa-vine:before{content:""}.fa-vk:before{content:""}.fa-vnv:before{content:""}.fa-voicemail:before{content:""}.fa-volleyball-ball:before{content:""}.fa-volume-down:before{content:""}.fa-volume-mute:before{content:""}.fa-volume-off:before{content:""}.fa-volume-up:before{content:""}.fa-vote-yea:before{content:""}.fa-vr-cardboard:before{content:""}.fa-vuejs:before{content:""}.fa-walking:before{content:""}.fa-wallet:before{content:""}.fa-warehouse:before{content:""}.fa-water:before{content:""}.fa-wave-square:before{content:""}.fa-waze:before{content:""}.fa-weebly:before{content:""}.fa-weibo:before{content:""}.fa-weight:before{content:""}.fa-weight-hanging:before{content:""}.fa-weixin:before{content:""}.fa-whatsapp:before{content:""}.fa-whatsapp-square:before{content:""}.fa-wheelchair:before{content:""}.fa-whmcs:before{content:""}.fa-wifi:before{content:""}.fa-wikipedia-w:before{content:""}.fa-wind:before{content:""}.fa-window-close:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-windows:before{content:""}.fa-wine-bottle:before{content:""}.fa-wine-glass:before{content:""}.fa-wine-glass-alt:before{content:""}.fa-wix:before{content:""}.fa-wizards-of-the-coast:before{content:""}.fa-wolf-pack-battalion:before{content:""}.fa-won-sign:before{content:""}.fa-wordpress:before{content:""}.fa-wordpress-simple:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpexplorer:before{content:""}.fa-wpforms:before{content:""}.fa-wpressr:before{content:""}.fa-wrench:before{content:""}.fa-x-ray:before{content:""}.fa-xbox:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-y-combinator:before{content:""}.fa-yahoo:before{content:""}.fa-yammer:before{content:""}.fa-yandex:before{content:""}.fa-yandex-international:before{content:""}.fa-yarn:before{content:""}.fa-yelp:before{content:""}.fa-yen-sign:before{content:""}.fa-yin-yang:before{content:""}.fa-yoast:before{content:""}.fa-youtube:before{content:""}.fa-youtube-square:before{content:""}.fa-zhihu:before{content:""}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;font-display:auto;src:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-brands-400.eot);src:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-brands-400.woff2) format("woff2"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-brands-400.woff) format("woff"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-brands-400.ttf) format("truetype"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:auto;src:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-regular-400.eot);src:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-regular-400.woff2) format("woff2"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-regular-400.woff) format("woff"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-regular-400.ttf) format("truetype"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:auto;src:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-solid-900.eot);src:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-solid-900.woff2) format("woff2"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-solid-900.woff) format("woff"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-solid-900.ttf) format("truetype"),url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} +body:before{content:"mobile";display:none;visibility:hidden}@media(min-width:768px){body:before{content:"tablet"}}@media(min-width:992px){body:before{content:"desktop"}}@media(min-width:1200px){body:before{content:"widescreen"}}@media(min-width:1400px){body:before{content:"fullhd"}}.progress.progress-xs{height:.25rem}.progress.progress-sm{height:.5rem}.progress.progress-md{height:1rem}.progress.progress-lg{height:1.5rem}.progress.progress-xl{height:2rem}[data-tooltip]:not(.is-loading),[data-tooltip]:not(.is-disabled),[data-tooltip]:not([disabled]){cursor:pointer;overflow:visible;position:relative}[data-tooltip]:not(.is-loading)::before,[data-tooltip]:not(.is-loading)::after,[data-tooltip]:not(.is-disabled)::before,[data-tooltip]:not(.is-disabled)::after,[data-tooltip]:not([disabled])::before,[data-tooltip]:not([disabled])::after{box-sizing:border-box;color:var(--b-tooltip-color,#fff);display:inline-block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:var(--b-tooltip-font-size,var(--b-font-size-sm,.875rem));hyphens:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;visibility:hidden;z-index:var(--b-tooltip-z-index,1020)}[data-tooltip]:not(.is-loading)::after,[data-tooltip]:not(.is-disabled)::after,[data-tooltip]:not([disabled])::after{content:"";border-style:solid;border-width:6px;border-color:rgba(var(--b-tooltip-background-color-r,128),var(--b-tooltip-background-color-g,128),var(--b-tooltip-background-color-b,128),.9) transparent transparent transparent;margin-bottom:-5px}[data-tooltip]:not(.is-loading)::after,[data-tooltip]:not(.is-disabled)::after,[data-tooltip]:not([disabled])::after{top:0;right:auto;bottom:auto;left:50%;margin-top:-5px;margin-right:auto;margin-bottom:auto;margin-left:-5px;border-color:rgba(var(--b-tooltip-background-color-r,128),var(--b-tooltip-background-color-g,128),var(--b-tooltip-background-color-b,128),.9) transparent transparent transparent}[data-tooltip]:not(.is-loading)::before,[data-tooltip]:not(.is-disabled)::before,[data-tooltip]:not([disabled])::before{background:rgba(var(--b-tooltip-background-color-r,128),var(--b-tooltip-background-color-g,128),var(--b-tooltip-background-color-b,128),.9);border-radius:var(--b-tooltip-border-radius,4px);content:attr(data-tooltip);padding:var(--b-tooltip-padding,.5rem 1rem);text-overflow:ellipsis;white-space:pre}[data-tooltip]:not(.is-loading)::before,[data-tooltip]:not(.is-disabled)::before,[data-tooltip]:not([disabled])::before{top:0;right:auto;bottom:auto;left:50%;top:0;margin-top:-5px;margin-bottom:auto;transform:translate(-50%,-100%)}[data-tooltip]:not(.is-loading).b-tooltip-bottom::after,[data-tooltip]:not(.is-disabled).b-tooltip-bottom::after,[data-tooltip]:not([disabled]).b-tooltip-bottom::after{top:auto;right:auto;bottom:0;left:50%;margin-top:auto;margin-right:auto;margin-bottom:-5px;margin-left:-5px;border-color:transparent transparent rgba(var(--b-tooltip-background-color-r,128),var(--b-tooltip-background-color-g,128),var(--b-tooltip-background-color-b,128),.9) transparent}[data-tooltip]:not(.is-loading).b-tooltip-bottom::before,[data-tooltip]:not(.is-disabled).b-tooltip-bottom::before,[data-tooltip]:not([disabled]).b-tooltip-bottom::before{top:auto;right:auto;bottom:0;left:50%;margin-top:auto;margin-bottom:-5px;transform:translate(-50%,100%)}[data-tooltip]:not(.is-loading).b-tooltip-left::after,[data-tooltip]:not(.is-disabled).b-tooltip-left::after,[data-tooltip]:not([disabled]).b-tooltip-left::after{top:auto;right:auto;bottom:50%;left:0;margin-top:auto;margin-right:auto;margin-bottom:-6px;margin-left:-11px;border-color:transparent transparent transparent rgba(var(--b-tooltip-background-color-r,128),var(--b-tooltip-background-color-g,128),var(--b-tooltip-background-color-b,128),.9)}[data-tooltip]:not(.is-loading).b-tooltip-left::before,[data-tooltip]:not(.is-disabled).b-tooltip-left::before,[data-tooltip]:not([disabled]).b-tooltip-left::before{top:auto;right:auto;bottom:50%;left:-11px;transform:translate(-100%,50%)}[data-tooltip]:not(.is-loading).b-tooltip-right::after,[data-tooltip]:not(.is-disabled).b-tooltip-right::after,[data-tooltip]:not([disabled]).b-tooltip-right::after{top:auto;right:0;bottom:50%;left:auto;margin-top:auto;margin-right:-11px;margin-bottom:-6px;margin-left:auto;border-color:transparent rgba(var(--b-tooltip-background-color-r,128),var(--b-tooltip-background-color-g,128),var(--b-tooltip-background-color-b,128),.9) transparent transparent}[data-tooltip]:not(.is-loading).b-tooltip-right::before,[data-tooltip]:not(.is-disabled).b-tooltip-right::before,[data-tooltip]:not([disabled]).b-tooltip-right::before{top:auto;right:-11px;bottom:50%;left:auto;margin-top:auto;transform:translate(100%,50%)}[data-tooltip]:not(.is-loading).b-tooltip-multiline::before,[data-tooltip]:not(.is-disabled).b-tooltip-multiline::before,[data-tooltip]:not([disabled]).b-tooltip-multiline::before{height:auto;width:var(--b-tooltip-maxwidth,15rem);max-width:var(--b-tooltip-maxwidth,15rem);text-overflow:clip;white-space:normal;word-break:keep-all}[data-tooltip]:not(.is-loading).b-tooltip-primary.b-tooltip-bottom::after,[data-tooltip]:not(.is-disabled).b-tooltip-primary.b-tooltip-bottom::after,[data-tooltip]:not([disabled]).b-tooltip-primary.b-tooltip-bottom::after{border-color:transparent transparent rgba(142,51,41,.9) transparent}[data-tooltip]:not(.is-loading).b-tooltip-primary.b-tooltip-left::after,[data-tooltip]:not(.is-disabled).b-tooltip-primary.b-tooltip-left::after,[data-tooltip]:not([disabled]).b-tooltip-primary.b-tooltip-left::after{border-color:transparent transparent transparent rgba(142,51,41,.9)}[data-tooltip]:not(.is-loading).b-tooltip-primary.b-tooltip-right::after,[data-tooltip]:not(.is-disabled).b-tooltip-primary.b-tooltip-right::after,[data-tooltip]:not([disabled]).b-tooltip-primary.b-tooltip-right::after{border-color:transparent rgba(142,51,41,.9) transparent transparent}[data-tooltip]:not(.is-loading).b-tooltip-primary:not(.b-tooltip-bottom)::after,[data-tooltip]:not(.is-loading).b-tooltip-primary:not(.b-tooltip-left)::after,[data-tooltip]:not(.is-loading).b-tooltip-primary:not(.b-tooltip-right)::after,[data-tooltip]:not(.is-disabled).b-tooltip-primary:not(.b-tooltip-bottom)::after,[data-tooltip]:not(.is-disabled).b-tooltip-primary:not(.b-tooltip-left)::after,[data-tooltip]:not(.is-disabled).b-tooltip-primary:not(.b-tooltip-right)::after,[data-tooltip]:not([disabled]).b-tooltip-primary:not(.b-tooltip-bottom)::after,[data-tooltip]:not([disabled]).b-tooltip-primary:not(.b-tooltip-left)::after,[data-tooltip]:not([disabled]).b-tooltip-primary:not(.b-tooltip-right)::after{border-color:rgba(142,51,41,.9) transparent transparent transparent}[data-tooltip]:not(.is-loading).b-tooltip-primary:before,[data-tooltip]:not(.is-disabled).b-tooltip-primary:before,[data-tooltip]:not([disabled]).b-tooltip-primary:before{background-color:rgba(142,51,41,.9);color:#8e3329}[data-tooltip]:not(.is-loading):focus::before,[data-tooltip]:not(.is-loading):focus::after,[data-tooltip]:not(.is-loading):hover::before,[data-tooltip]:not(.is-loading):hover::after,[data-tooltip]:not(.is-loading).b-tooltip-active::before,[data-tooltip]:not(.is-loading).b-tooltip-active::after,[data-tooltip]:not(.is-disabled):focus::before,[data-tooltip]:not(.is-disabled):focus::after,[data-tooltip]:not(.is-disabled):hover::before,[data-tooltip]:not(.is-disabled):hover::after,[data-tooltip]:not(.is-disabled).b-tooltip-active::before,[data-tooltip]:not(.is-disabled).b-tooltip-active::after,[data-tooltip]:not([disabled]):focus::before,[data-tooltip]:not([disabled]):focus::after,[data-tooltip]:not([disabled]):hover::before,[data-tooltip]:not([disabled]):hover::after,[data-tooltip]:not([disabled]).b-tooltip-active::before,[data-tooltip]:not([disabled]).b-tooltip-active::after{opacity:1;visibility:visible}[data-tooltip]:not(.is-loading).b-tooltip-fade::before,[data-tooltip]:not(.is-loading).b-tooltip-fade::after,[data-tooltip]:not(.is-disabled).b-tooltip-fade::before,[data-tooltip]:not(.is-disabled).b-tooltip-fade::after,[data-tooltip]:not([disabled]).b-tooltip-fade::before,[data-tooltip]:not([disabled]).b-tooltip-fade::after{transition:opacity var(--b-tooltip-fade-time,.3s) linear,visibility var(--b-tooltip-fade-time,.3s) linear}.b-tooltip-inline{display:inline-block}.b-layout{display:flex;flex:auto;flex-direction:column}.b-layout.b-layout-root{height:100vh}.b-layout,.b-layout *{box-sizing:border-box}@keyframes spinner{0%{transform:translate3d(-50%,-50%,0) rotate(0deg)}100%{transform:translate3d(-50%,-50%,0) rotate(360deg)}}.b-layout>.b-layout-loading{z-index:9999;position:fixed;width:100%;height:100%;background:rgba(0,0,0,.3)}.b-layout>.b-layout-loading:before{animation:1s linear infinite spinner;border:solid 3px #eee;border-bottom-color:var(--b-theme-primary);border-radius:50%;height:40px;left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0);width:40px;content:' '}.b-layout.b-layout-has-sider{flex-direction:row;min-height:0}.b-layout.b-layout-has-sider .b-layout{overflow-x:hidden}.b-layout-header,.b-layout-footer{flex:0 0 auto}.b-layout-header{color:rgba(0,0,0,.65)}.b-layout-header-fixed{position:sticky;z-index:1;top:0;flex:0}.b-layout-footer{color:rgba(0,0,0,.65)}.b-layout-footer-fixed{position:sticky;z-index:1;bottom:0;flex:0}.b-layout-content{flex:1}.b-layout-sider{display:flex;position:relative;background:#001529}.b-layout-sider-content{position:sticky;top:0;z-index:2}.b-layout-header .navbar{line-height:inherit}.b-bar-horizontal[data-collapse=hide]{flex-wrap:nowrap}.b-bar-horizontal[data-collapse=hide][data-broken=true]{height:var(--b-bar-horizontal-height,auto)}.b-bar-horizontal[data-broken=false]{height:var(--b-bar-horizontal-height,auto)}.b-bar-vertical-inline,.b-bar-vertical-popout,.b-bar-vertical-small{display:flex;flex-direction:column;flex-wrap:nowrap;position:sticky;top:0;padding:0;min-width:var(--b-vertical-bar-width,230px);max-width:var(--b-vertical-bar-width,230px);width:var(--b-vertical-bar-width,230px);transition:width 200ms ease-in-out,min-width 200ms ease-in-out;box-shadow:2px 0 6px rgba(0,21,41,.35);height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.b-bar-vertical-inline .b-bar-menu,.b-bar-vertical-popout .b-bar-menu,.b-bar-vertical-small .b-bar-menu{width:100%;display:flex;flex:1;justify-content:space-between;flex-direction:column;align-self:stretch}.b-bar-vertical-inline .b-bar-brand,.b-bar-vertical-popout .b-bar-brand,.b-bar-vertical-small .b-bar-brand{width:100%;display:flex;height:var(--b-vertical-bar-brand-height,64px);min-height:var(--b-vertical-bar-brand-height,64px)}.b-bar-vertical-inline .b-bar-toggler-inline,.b-bar-vertical-popout .b-bar-toggler-inline,.b-bar-vertical-small .b-bar-toggler-inline{height:var(--b-vertical-bar-brand-height,64px);padding:12px;display:inline-flex;cursor:pointer;position:absolute;right:0}.b-bar-vertical-inline .b-bar-toggler-inline>*,.b-bar-vertical-popout .b-bar-toggler-inline>*,.b-bar-vertical-small .b-bar-toggler-inline>*{margin:auto}.b-bar-vertical-inline .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-popout .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-small .b-bar-toggler-popout:not(.b-bar-mobile-toggle){display:flex;position:fixed;left:var(--b-vertical-bar-width,230px);border-radius:0 10px 10px 0;border:0;width:10px;height:40px;padding:5px;align-items:center;transition:width 200ms ease-in-out,left 200ms ease-in-out;box-shadow:2px 0 6px rgba(0,21,41,.35);cursor:pointer}.b-bar-vertical-inline .b-bar-toggler-popout:not(.b-bar-mobile-toggle)>*,.b-bar-vertical-popout .b-bar-toggler-popout:not(.b-bar-mobile-toggle)>*,.b-bar-vertical-small .b-bar-toggler-popout:not(.b-bar-mobile-toggle)>*{margin:auto;display:none}.b-bar-vertical-inline .b-bar-toggler-popout:not(.b-bar-mobile-toggle):hover,.b-bar-vertical-popout .b-bar-toggler-popout:not(.b-bar-mobile-toggle):hover,.b-bar-vertical-small .b-bar-toggler-popout:not(.b-bar-mobile-toggle):hover{width:45px}.b-bar-vertical-inline .b-bar-toggler-popout:not(.b-bar-mobile-toggle):hover>*,.b-bar-vertical-popout .b-bar-toggler-popout:not(.b-bar-mobile-toggle):hover>*,.b-bar-vertical-small .b-bar-toggler-popout:not(.b-bar-mobile-toggle):hover>*{display:block}.b-bar-vertical-inline .b-bar-item,.b-bar-vertical-popout .b-bar-item,.b-bar-vertical-small .b-bar-item{margin:auto;flex-grow:1;min-height:40px}.b-bar-vertical-inline .b-bar-item .b-bar-icon,.b-bar-vertical-popout .b-bar-item .b-bar-icon,.b-bar-vertical-small .b-bar-item .b-bar-icon{font-size:1.25rem;vertical-align:middle;margin:3px;display:inline-block}.b-bar-vertical-inline .b-bar-start,.b-bar-vertical-popout .b-bar-start,.b-bar-vertical-small .b-bar-start{width:100%;display:block}.b-bar-vertical-inline .b-bar-end,.b-bar-vertical-popout .b-bar-end,.b-bar-vertical-small .b-bar-end{padding-bottom:1rem;width:100%;padding-top:1rem;display:block}.b-bar-vertical-inline .b-bar-link,.b-bar-vertical-popout .b-bar-link,.b-bar-vertical-small .b-bar-link{display:block;width:100%;text-decoration:none;padding:.5rem .5rem .5rem 1.5rem;cursor:pointer;overflow-x:hidden;line-height:1.5rem;vertical-align:middle;transition:font-size 150ms ease-in}.b-bar-vertical-inline .b-bar-label,.b-bar-vertical-popout .b-bar-label,.b-bar-vertical-small .b-bar-label{background:transparent;color:#adb5bd;padding:.375rem 1.25rem;font-size:.75rem;text-overflow:ellipsis;overflow-x:hidden}.b-bar-vertical-inline .b-bar-dropdown .b-bar-dropdown-toggle:before,.b-bar-vertical-popout .b-bar-dropdown .b-bar-dropdown-toggle:before,.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-toggle:before{content:" ";border:solid;border-width:0 2px 2px 0;display:inline-block;padding:2px;right:1rem;transition:transform 200ms ease-out;float:right;position:relative;-webkit-transform:rotate(225deg);transform:rotate(225deg);top:.7rem}.b-bar-vertical-inline .b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before,.b-bar-vertical-popout .b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before,.b-bar-vertical-small .b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before{-webkit-transform:rotate(45deg);transform:rotate(45deg);top:.5rem}.b-bar-vertical-inline .b-bar-dropdown .b-bar-dropdown-menu,.b-bar-vertical-popout .b-bar-dropdown .b-bar-dropdown-menu,.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu{display:none;background:inherit;color:inherit;float:none;padding:5px 0}.b-bar-vertical-inline .b-bar-dropdown .b-bar-dropdown-menu[data-visible=true],.b-bar-vertical-popout .b-bar-dropdown .b-bar-dropdown-menu[data-visible=true],.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu[data-visible=true]{display:block}.b-bar-vertical-inline .b-bar-dropdown .b-bar-dropdown-menu .b-bar-dropdown-item,.b-bar-vertical-popout .b-bar-dropdown .b-bar-dropdown-menu .b-bar-dropdown-item,.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu .b-bar-dropdown-item{position:relative;color:inherit;transition:background 100ms ease-in-out,color 100ms ease-in-out;text-decoration:none;display:block;width:100%;overflow-x:hidden}.b-bar-vertical-inline .b-bar-dropdown .b-bar-dropdown-menu .b-bar-dropdown-item i,.b-bar-vertical-popout .b-bar-dropdown .b-bar-dropdown-menu .b-bar-dropdown-item i,.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu .b-bar-dropdown-item i{margin-right:.3rem}.b-bar-vertical-inline .b-bar-dropdown .b-bar-dropdown-menu:before,.b-bar-vertical-popout .b-bar-dropdown .b-bar-dropdown-menu:before,.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu:before{background:inherit;box-shadow:none}.b-bar-vertical-inline .b-bar-mobile-toggle,.b-bar-vertical-popout .b-bar-mobile-toggle,.b-bar-vertical-small .b-bar-mobile-toggle{right:20px;margin:auto;display:none}.b-bar-vertical-inline .b-bar-item-multi-line,.b-bar-vertical-popout .b-bar-item-multi-line,.b-bar-vertical-small .b-bar-item-multi-line{display:-webkit-box !important;-webkit-box-orient:vertical;-webkit-line-clamp:var(--b-bar-item-lines,2);white-space:normal !important;overflow:hidden;text-overflow:ellipsis}.b-bar-vertical-inline.b-bar-dark,.b-bar-vertical-popout.b-bar-dark,.b-bar-vertical-small.b-bar-dark{background:var(--b-bar-dark-background,#001529);color:var(--b-bar-dark-color,rgba(255,255,255,.5))}.b-bar-vertical-inline.b-bar-dark .b-bar-brand,.b-bar-vertical-popout.b-bar-dark .b-bar-brand,.b-bar-vertical-small.b-bar-dark .b-bar-brand{background:var(--b-bar-brand-dark-background,rgba(255,255,255,.025))}.b-bar-vertical-inline.b-bar-dark .b-bar-brand .b-bar-link,.b-bar-vertical-popout.b-bar-dark .b-bar-brand .b-bar-link,.b-bar-vertical-small.b-bar-dark .b-bar-brand .b-bar-link{color:#fff}.b-bar-vertical-inline.b-bar-dark .b-bar-brand .b-bar-link.active,.b-bar-vertical-popout.b-bar-dark .b-bar-brand .b-bar-link.active,.b-bar-vertical-small.b-bar-dark .b-bar-brand .b-bar-link.active{color:#fff;background:inherit}.b-bar-vertical-inline.b-bar-dark .b-bar-brand .b-bar-link:hover,.b-bar-vertical-popout.b-bar-dark .b-bar-brand .b-bar-link:hover,.b-bar-vertical-small.b-bar-dark .b-bar-brand .b-bar-link:hover{color:#fff;background:inherit}.b-bar-vertical-inline.b-bar-dark .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-popout.b-bar-dark .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-small.b-bar-dark .b-bar-toggler-popout:not(.b-bar-mobile-toggle){background:var(--b-bar-dark-background,#001529);color:var(--b-bar-dark-color,rgba(255,255,255,.5))}.b-bar-vertical-inline.b-bar-dark .b-bar-dropdown-menu,.b-bar-vertical-popout.b-bar-dark .b-bar-dropdown-menu,.b-bar-vertical-small.b-bar-dark .b-bar-dropdown-menu{background:var(--b-bar-dropdown-dark-background,#000c17)}.b-bar-vertical-inline.b-bar-dark .b-bar-dropdown-menu .b-bar-dropdown-item.active,.b-bar-vertical-popout.b-bar-dark .b-bar-dropdown-menu .b-bar-dropdown-item.active,.b-bar-vertical-small.b-bar-dark .b-bar-dropdown-menu .b-bar-dropdown-item.active{color:var(--b-bar-item-dark-active-color,#fff);background:var(--b-bar-item-dark-active-background,#0288d1)}.b-bar-vertical-inline.b-bar-dark .b-bar-dropdown-menu .b-bar-dropdown-item:hover,.b-bar-vertical-popout.b-bar-dark .b-bar-dropdown-menu .b-bar-dropdown-item:hover,.b-bar-vertical-small.b-bar-dark .b-bar-dropdown-menu .b-bar-dropdown-item:hover{color:var(--b-bar-item-dark-hover-color,#fff);background:var(--b-bar-item-dark-hover-background,rgba(255,255,255,.3))}.b-bar-vertical-inline.b-bar-dark .b-bar-link,.b-bar-vertical-popout.b-bar-dark .b-bar-link,.b-bar-vertical-small.b-bar-dark .b-bar-link{color:inherit}.b-bar-vertical-inline.b-bar-dark .b-bar-link.active,.b-bar-vertical-popout.b-bar-dark .b-bar-link.active,.b-bar-vertical-small.b-bar-dark .b-bar-link.active{color:var(--b-bar-item-dark-active-color,#fff);background:var(--b-bar-item-dark-active-background,#0288d1)}.b-bar-vertical-inline.b-bar-dark .b-bar-link:hover,.b-bar-vertical-popout.b-bar-dark .b-bar-link:hover,.b-bar-vertical-small.b-bar-dark .b-bar-link:hover{color:var(--b-bar-item-dark-hover-color,#fff);background:var(--b-bar-item-dark-hover-background,rgba(255,255,255,.3))}.b-bar-vertical-inline.b-bar-light,.b-bar-vertical-popout.b-bar-light,.b-bar-vertical-small.b-bar-light{background:var(--b-bar-light-background,#fff);color:var(--b-bar-light-color,rgba(0,0,0,.7))}.b-bar-vertical-inline.b-bar-light .b-bar-brand,.b-bar-vertical-popout.b-bar-light .b-bar-brand,.b-bar-vertical-small.b-bar-light .b-bar-brand{background:var(--b-bar-brand-light-background,rgba(0,0,0,.025))}.b-bar-vertical-inline.b-bar-light .b-bar-brand .b-bar-link,.b-bar-vertical-popout.b-bar-light .b-bar-brand .b-bar-link,.b-bar-vertical-small.b-bar-light .b-bar-brand .b-bar-link{color:#000}.b-bar-vertical-inline.b-bar-light .b-bar-brand .b-bar-link.active,.b-bar-vertical-popout.b-bar-light .b-bar-brand .b-bar-link.active,.b-bar-vertical-small.b-bar-light .b-bar-brand .b-bar-link.active{background:inherit}.b-bar-vertical-inline.b-bar-light .b-bar-brand .b-bar-link:hover,.b-bar-vertical-popout.b-bar-light .b-bar-brand .b-bar-link:hover,.b-bar-vertical-small.b-bar-light .b-bar-brand .b-bar-link:hover{background:inherit}.b-bar-vertical-inline.b-bar-light .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-popout.b-bar-light .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-small.b-bar-light .b-bar-toggler-popout:not(.b-bar-mobile-toggle){background:var(--b-bar-brand-light-background,#fff);color:var(--b-bar-light-color,rgba(0,0,0,.7))}.b-bar-vertical-inline.b-bar-light .b-bar-dropdown-menu,.b-bar-vertical-popout.b-bar-light .b-bar-dropdown-menu,.b-bar-vertical-small.b-bar-light .b-bar-dropdown-menu{background:var(--b-bar-dropdown-light-background,#f2f2f2)}.b-bar-vertical-inline.b-bar-light .b-bar-dropdown-menu .b-bar-dropdown-item.active,.b-bar-vertical-popout.b-bar-light .b-bar-dropdown-menu .b-bar-dropdown-item.active,.b-bar-vertical-small.b-bar-light .b-bar-dropdown-menu .b-bar-dropdown-item.active{color:var(--b-bar-item-light-active-color,#000);background:var(--b-bar-item-light-active-background,#0288d1)}.b-bar-vertical-inline.b-bar-light .b-bar-dropdown-menu .b-bar-dropdown-item:hover,.b-bar-vertical-popout.b-bar-light .b-bar-dropdown-menu .b-bar-dropdown-item:hover,.b-bar-vertical-small.b-bar-light .b-bar-dropdown-menu .b-bar-dropdown-item:hover{color:var(--b-bar-item-dark-hover-color,#000);background:var(--b-bar-item-dark-hover-background,rgba(0,0,0,.3))}.b-bar-vertical-inline.b-bar-light .b-bar-link,.b-bar-vertical-popout.b-bar-light .b-bar-link,.b-bar-vertical-small.b-bar-light .b-bar-link{color:inherit}.b-bar-vertical-inline.b-bar-light .b-bar-link.active,.b-bar-vertical-popout.b-bar-light .b-bar-link.active,.b-bar-vertical-small.b-bar-light .b-bar-link.active{color:var(--b-bar-item-light-active-color,#000);background:var(--b-bar-item-light-active-background,#0288d1)}.b-bar-vertical-inline.b-bar-light .b-bar-link:hover,.b-bar-vertical-popout.b-bar-light .b-bar-link:hover,.b-bar-vertical-small.b-bar-light .b-bar-link:hover{color:var(--b-bar-item-dark-hover-color,#000);background:var(--b-bar-item-dark-hover-background,rgba(0,0,0,.3))}.b-bar-vertical-small,.b-bar-vertical-inline[data-collapse=small],.b-bar-vertical-popout[data-collapse=small]{width:var(--b-vertical-bar-small-width,64px);min-width:var(--b-vertical-bar-small-width,64px);transition:width 200ms ease-in-out,min-width 200ms ease-in-out}.b-bar-vertical-small .b-bar-toggler-inline,.b-bar-vertical-inline[data-collapse=small] .b-bar-toggler-inline,.b-bar-vertical-popout[data-collapse=small] .b-bar-toggler-inline{position:relative;width:100%}.b-bar-vertical-small .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-inline[data-collapse=small] .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-popout[data-collapse=small] .b-bar-toggler-popout:not(.b-bar-mobile-toggle){left:var(--b-vertical-bar-small-width,64px)}.b-bar-vertical-small .b-bar-item>.b-bar-dropdown>.b-bar-dropdown-toggle:before,.b-bar-vertical-inline[data-collapse=small] .b-bar-item>.b-bar-dropdown>.b-bar-dropdown-toggle:before,.b-bar-vertical-popout[data-collapse=small] .b-bar-item>.b-bar-dropdown>.b-bar-dropdown-toggle:before{display:none}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container{z-index:100;max-height:50vh;position:absolute !important;margin:-42px 5px 0 5px;display:flex;width:var(--b-vertical-bar-popout-menu-width,180px);left:var(--b-vertical-bar-small-width,64px)}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right{right:var(--b-vertical-bar-small-width,64px);left:unset}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu{box-shadow:0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05);border-radius:3px;overflow-y:auto;overflow-x:hidden;flex:1 100%}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu .b-bar-dropdown-item,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu .b-bar-dropdown-item,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu .b-bar-dropdown-item{padding:.5rem .5rem .5rem 1.5rem}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu:before,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu:before,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu:before{position:absolute;top:0;left:-7px;right:0;bottom:0;width:100%;height:100%;opacity:.0001;content:' ';z-index:-1}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu.b-bar-right:before,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu.b-bar-right:before,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu.b-bar-right:before{left:unset;right:-7px}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container{left:var(--b-vertical-bar-popout-menu-width,180px)}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right{right:var(--b-vertical-bar-popout-menu-width,180px)}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-toggle:before,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-toggle:before,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-toggle:before{content:" ";border:solid;border-width:0 2px 2px 0;display:inline-block;padding:2px;right:1rem;transition:transform 200ms ease-out;float:right;position:relative;-webkit-transform:rotate(315deg);transform:rotate(315deg)}.b-bar-vertical-small .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before,.b-bar-vertical-inline[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before,.b-bar-vertical-popout[data-collapse=small] .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before{-webkit-transform:rotate(135deg);transform:rotate(135deg);right:.8rem}@keyframes b-bar-link-small{to{text-align:center;padding-left:0;padding-right:0}}.b-bar-vertical-small .b-bar-item>.b-bar-link,.b-bar-vertical-small .b-bar-item>.b-bar-dropdown>.b-bar-link,.b-bar-vertical-inline[data-collapse=small] .b-bar-item>.b-bar-link,.b-bar-vertical-inline[data-collapse=small] .b-bar-item>.b-bar-dropdown>.b-bar-link,.b-bar-vertical-popout[data-collapse=small] .b-bar-item>.b-bar-link,.b-bar-vertical-popout[data-collapse=small] .b-bar-item>.b-bar-dropdown>.b-bar-link{animation:b-bar-link-small forwards;animation-delay:170ms;font-size:0;transition:font-size 100ms ease-out}.b-bar-vertical-small .b-bar-item>.b-bar-link:after,.b-bar-vertical-small .b-bar-item>.b-bar-dropdown>.b-bar-link:after,.b-bar-vertical-inline[data-collapse=small] .b-bar-item>.b-bar-link:after,.b-bar-vertical-inline[data-collapse=small] .b-bar-item>.b-bar-dropdown>.b-bar-link:after,.b-bar-vertical-popout[data-collapse=small] .b-bar-item>.b-bar-link:after,.b-bar-vertical-popout[data-collapse=small] .b-bar-item>.b-bar-dropdown>.b-bar-link:after{display:none}.b-bar-vertical-small .b-bar-label,.b-bar-vertical-inline[data-collapse=small] .b-bar-label,.b-bar-vertical-popout[data-collapse=small] .b-bar-label{text-align:center}.b-bar-vertical-inline:not([data-collapse]){overflow-y:auto;overflow-x:hidden}.b-bar-vertical-inline:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container{position:relative}.b-bar-vertical-inline:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu{position:relative !important;border:none;border-radius:0;box-shadow:none}.b-bar-vertical-inline:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu .b-bar-dropdown-item{padding:.5rem .5rem .5rem 3rem}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-toggle:before{content:" ";border:solid;border-width:0 2px 2px 0;display:inline-block;padding:2px;right:1rem;transition:transform 200ms ease-out;float:right;position:relative;-webkit-transform:rotate(315deg);transform:rotate(315deg)}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown:not([data-visible=true]) .b-bar-dropdown-toggle:before{-webkit-transform:rotate(135deg);transform:rotate(135deg);right:.8rem}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container{z-index:100;max-height:50vh;position:absolute !important;margin:-42px 5px 0 5px;display:flex;width:var(--b-vertical-bar-popout-menu-width,180px);left:var(--b-vertical-bar-width,230px)}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right{right:var(--b-vertical-bar-width,230px);left:unset}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu{box-shadow:0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05);border-radius:3px;overflow-y:auto;overflow-x:hidden;flex:1 100%}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu .b-bar-dropdown-item{padding:.5rem .5rem .5rem 1.5rem}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu:before{position:absolute;top:0;left:-7px;right:0;bottom:0;width:100%;height:100%;opacity:.0001;content:' ';z-index:-1}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu.b-bar-right:before{left:unset;right:-7px}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container{left:var(--b-vertical-bar-popout-menu-width,180px)}.b-bar-vertical-popout:not([data-collapse]) .b-bar-dropdown .b-bar-dropdown-menu-container .b-bar-dropdown-menu>.b-bar-dropdown .b-bar-dropdown-menu-container.b-bar-right{right:var(--b-vertical-bar-popout-menu-width,180px)}.b-bar-vertical-inline[data-collapse=hide],.b-bar-vertical-popout[data-collapse=hide],.b-bar-vertical-small[data-collapse=hide]{width:0;min-width:0;transition:width 200ms ease-in-out,min-width 200ms ease-in-out,visibility 100ms;visibility:hidden}.b-bar-vertical-inline[data-collapse=hide] .b-bar-toggler-inline,.b-bar-vertical-popout[data-collapse=hide] .b-bar-toggler-inline,.b-bar-vertical-small[data-collapse=hide] .b-bar-toggler-inline{display:none}.b-bar-vertical-inline[data-collapse=hide] .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-popout[data-collapse=hide] .b-bar-toggler-popout:not(.b-bar-mobile-toggle),.b-bar-vertical-small[data-collapse=hide] .b-bar-toggler-popout:not(.b-bar-mobile-toggle){visibility:visible;left:0}@media only screen and (max-width:576px){.b-bar-vertical-inline:not([data-collapse]){min-width:100vw}.b-bar-vertical-inline:not([data-collapse]) .b-bar-toggler-inline:not(.b-bar-mobile-toggle){display:none}.b-bar-vertical-inline:not([data-collapse]) .b-bar-toggler-popout:not(.b-bar-mobile-toggle){left:100vw}.b-bar-vertical-inline:not([data-collapse]) .b-bar-mobile-toggle{display:flex}}.b-character-casing-lower{text-transform:lowercase}.b-character-casing-upper{text-transform:uppercase}.b-character-casing-title{text-transform:lowercase}.b-character-casing-title::first-letter {text-transform:uppercase}hr.divider.divider-solid{border-top:var(--b-divider-thickness,2px) solid var(--b-divider-color,#999)}hr.divider.divider-dashed{border-top:var(--b-divider-thickness,2px) dashed var(--b-divider-color,#999)}hr.divider.divider-dotted{border-top:var(--b-divider-thickness,2px) dotted var(--b-divider-color,#999)}hr.divider.divider-text{position:relative;border:none;height:1px;background:var(--b-divider-color,#999)}hr.divider.divider-text::before{content:attr(data-content);display:inline-block;background:#fff;font-weight:bold;font-size:var(--b-divider-font-size,.85rem);color:var(--b-divider-color,#999);border-radius:30rem;padding:.2rem 2rem;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)} +@keyframes fadeIn{0%{opacity:0}100%{opacity:1}0%{opacity:0}}@keyframes slideIn{0%{transform:translateY(1rem);opacity:0}100%{transform:translateY(0);opacity:1}0%{transform:translateY(1rem);opacity:0}}.badge-close{cursor:pointer}.badge-close::before{height:2px;width:50%}.badge-close::after{height:50%;width:2px}.badge-close:hover,.badge-close:focus{background-color:rgba(10,10,10,.3)}.badge-close:active{background-color:rgba(10,10,10,.4)}.navbar-nav .nav-item:hover{cursor:pointer}.navbar-nav .nav-link:hover{cursor:pointer}.nav .nav-link:hover{cursor:pointer}.nav-item{position:relative}.btn-group>.b-tooltip:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.b-tooltip:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.b-tooltip:not(:last-child)>.btn{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.b-tooltip:not(:first-child)>.btn{border-top-left-radius:0;border-top-right-radius:0}.btn-xs,.btn-group-xs>.btn{padding:.15rem .5rem;font-size:.75rem;line-height:1.5;border-radius:.15rem}.btn-md,.btn-group-md>.btn{padding:.47rem 1rem;font-size:1.125rem;line-height:1.5;border-radius:.25rem}.btn-xl,.btn-group-xl>.btn{padding:.5rem 1rem;font-size:1.5rem;line-height:1.5;border-radius:.4rem}.dropdown-toggle.dropdown-toggle-hidden::after{content:none !important}.dropdown-toggle.dropdown-toggle-hidden::before{content:none !important}.dropdown-menu.show{animation-duration:.3s;animation-fill-mode:both;animation-name:fadeIn}.figure-is-16x16{height:16px;width:16px}.figure-is-24x24{height:24px;width:24px}.figure-is-32x32{height:32px;width:32px}.figure-is-48x48{height:48px;width:48px}.figure-is-64x64{height:64px;width:64px}.figure-is-96x96{height:96px;width:96px}.figure-is-128x128{height:128px;width:128px}.figure-is-256x256{height:256px;width:256px}.figure-is-512x512{height:512px;width:512px}.form-check>.form-check-input.form-check-input-pointer,.form-check>.form-check-label.form-check-label-pointer,.custom-checkbox>.custom-control-input.custom-control-input-pointer,.custom-checkbox>.custom-control-label.custom-control-label-pointer,.custom-switch>.custom-control-input.custom-control-input-pointer,.custom-switch>.custom-control-label.custom-control-label-pointer{cursor:pointer}.form-control-plaintext.form-control-xs,.form-control-plaintext.form-control-md,.form-control-plaintext.form-control-xl{padding-right:0;padding-left:0}.form-control-xs{height:calc(1.5em + .3rem + 2px);padding:.15rem .5rem;font-size:.75rem;line-height:1.5;border-radius:.15rem}.form-control-md{height:calc(1.5em + .94rem + 2px);padding:.47rem 1rem;font-size:1.125rem;line-height:1.5;border-radius:.25rem}.form-control-xl{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.5rem;line-height:1.5;border-radius:.4rem}.custom-select-xs{height:calc(1.5em + .3rem + 2px);padding-top:.15rem;padding-bottom:.15rem;padding-left:.5rem;font-size:.75rem}.custom-select-md{height:calc(1.5em + .94rem + 2px);padding-top:.47rem;padding-bottom:.47rem;padding-left:1rem;font-size:1.125rem}.custom-select-xl{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.5rem}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-xs+.custom-control-label::before,.custom-control.custom-checkbox>.custom-control-input.custom-control-input-xs+.custom-control-label::after{width:.7rem;height:.7rem}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-xs+.custom-control-label{line-height:"normal";padding-left:0}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-sm+.custom-control-label::before,.custom-control.custom-checkbox>.custom-control-input.custom-control-input-sm+.custom-control-label::after{width:.8rem;height:.8rem}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-sm+.custom-control-label{line-height:"normal";padding-left:0}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-md+.custom-control-label::before,.custom-control.custom-checkbox>.custom-control-input.custom-control-input-md+.custom-control-label::after{width:1.25rem;height:1.25rem}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-md+.custom-control-label{line-height:1.7rem;padding-left:3px}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-lg+.custom-control-label::before,.custom-control.custom-checkbox>.custom-control-input.custom-control-input-lg+.custom-control-label::after{width:1.55rem;height:1.55rem}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-lg+.custom-control-label{line-height:2rem;padding-left:6px}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-xl+.custom-control-label::before,.custom-control.custom-checkbox>.custom-control-input.custom-control-input-xl+.custom-control-label::after{width:1.85rem;height:1.85rem}.custom-control.custom-checkbox>.custom-control-input.custom-control-input-xl+.custom-control-label{line-height:2.5rem;padding-left:10px}.custom-control.custom-radio>.custom-control-input.custom-control-input-xs+.custom-control-label::before,.custom-control.custom-radio>.custom-control-input.custom-control-input-xs+.custom-control-label::after{width:.7rem;height:.7rem}.custom-control.custom-radio>.custom-control-input.custom-control-input-xs+.custom-control-label{line-height:normal;padding-left:0}.custom-control.custom-radio>.custom-control-input.custom-control-input-sm+.custom-control-label::before,.custom-control.custom-radio>.custom-control-input.custom-control-input-sm+.custom-control-label::after{width:.8rem;height:.8rem}.custom-control.custom-radio>.custom-control-input.custom-control-input-sm+.custom-control-label{line-height:normal;padding-left:0}.custom-control.custom-radio>.custom-control-input.custom-control-input-md+.custom-control-label::before,.custom-control.custom-radio>.custom-control-input.custom-control-input-md+.custom-control-label::after{width:1.25rem;height:1.25rem}.custom-control.custom-radio>.custom-control-input.custom-control-input-md+.custom-control-label{line-height:1.7rem;padding-left:3px}.custom-control.custom-radio>.custom-control-input.custom-control-input-lg+.custom-control-label::before,.custom-control.custom-radio>.custom-control-input.custom-control-input-lg+.custom-control-label::after{width:1.55rem;height:1.55rem}.custom-control.custom-radio>.custom-control-input.custom-control-input-lg+.custom-control-label{line-height:2rem;padding-left:6px}.custom-control.custom-radio>.custom-control-input.custom-control-input-xl+.custom-control-label::before,.custom-control.custom-radio>.custom-control-input.custom-control-input-xl+.custom-control-label::after{width:1.85rem;height:1.85rem}.custom-control.custom-radio>.custom-control-input.custom-control-input-xl+.custom-control-label{line-height:2.5rem;padding-left:10px}.jumbotron.jumbotron-primary{background-color:#007bff;color:#fff}.jumbotron.jumbotron-secondary{background-color:#6c757d;color:#fff}.jumbotron.jumbotron-success{background-color:#28a745;color:#fff}.jumbotron.jumbotron-info{background-color:#17a2b8;color:#fff}.jumbotron.jumbotron-warning{background-color:#ffc107;color:#212529}.jumbotron.jumbotron-danger{background-color:#dc3545;color:#fff}.jumbotron.jumbotron-light{background-color:#f8f9fa;color:#212529}.jumbotron.jumbotron-dark{background-color:#343a40;color:#fff}.jumbotron.jumbotron-link{background-color:#3273dc;color:#fff}.modal-backdrop{z-index:-1}.modal.show{animation-duration:.25s;animation-fill-mode:both;animation-name:fadeIn}.page-item:not(.disabled) .page-link{cursor:pointer}.pagination-xs .page-link{padding:.125rem .25rem;font-size:.75rem;line-height:1.5}.pagination-xs .page-item:first-child .page-link{border-top-left-radius:.15rem;border-bottom-left-radius:.15rem}.pagination-xs .page-item:last-child .page-link{border-top-right-radius:.15rem;border-bottom-right-radius:.15rem}.pagination-md .page-link{padding:.625rem 1.25rem;font-size:1.125rem;line-height:1.5}.pagination-md .page-item:first-child .page-link{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.pagination-md .page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pagination-xl .page-link{padding:1rem 2rem;font-size:1.5rem;line-height:1.5}.pagination-xl .page-item:first-child .page-link{border-top-left-radius:.4rem;border-bottom-left-radius:.4rem}.pagination-xl .page-item:last-child .page-link{border-top-right-radius:.4rem;border-bottom-right-radius:.4rem}.custom-switch .custom-control-input.custom-control-input-primary:checked~.custom-control-label::before{background-color:#007bff;border-color:#007bff}.custom-switch .custom-control-input.custom-control-input-primary:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25);border-color:#007bff}.custom-switch .custom-control-input:disabled.custom-control-input-primary:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch .custom-control-input.custom-control-input-secondary:checked~.custom-control-label::before{background-color:#6c757d;border-color:#6c757d}.custom-switch .custom-control-input.custom-control-input-secondary:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(108,117,125,.25);border-color:#6c757d}.custom-switch .custom-control-input:disabled.custom-control-input-secondary:checked~.custom-control-label::before{background-color:rgba(108,117,125,.5)}.custom-switch .custom-control-input.custom-control-input-success:checked~.custom-control-label::before{background-color:#28a745;border-color:#28a745}.custom-switch .custom-control-input.custom-control-input-success:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25);border-color:#28a745}.custom-switch .custom-control-input:disabled.custom-control-input-success:checked~.custom-control-label::before{background-color:rgba(40,167,69,.5)}.custom-switch .custom-control-input.custom-control-input-info:checked~.custom-control-label::before{background-color:#17a2b8;border-color:#17a2b8}.custom-switch .custom-control-input.custom-control-input-info:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(23,162,184,.25);border-color:#17a2b8}.custom-switch .custom-control-input:disabled.custom-control-input-info:checked~.custom-control-label::before{background-color:rgba(23,162,184,.5)}.custom-switch .custom-control-input.custom-control-input-warning:checked~.custom-control-label::before{background-color:#ffc107;border-color:#ffc107}.custom-switch .custom-control-input.custom-control-input-warning:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(255,193,7,.25);border-color:#ffc107}.custom-switch .custom-control-input:disabled.custom-control-input-warning:checked~.custom-control-label::before{background-color:rgba(255,193,7,.5)}.custom-switch .custom-control-input.custom-control-input-danger:checked~.custom-control-label::before{background-color:#dc3545;border-color:#dc3545}.custom-switch .custom-control-input.custom-control-input-danger:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25);border-color:#dc3545}.custom-switch .custom-control-input:disabled.custom-control-input-danger:checked~.custom-control-label::before{background-color:rgba(220,53,69,.5)}.custom-switch .custom-control-input.custom-control-input-light:checked~.custom-control-label::before{background-color:#f8f9fa;border-color:#f8f9fa}.custom-switch .custom-control-input.custom-control-input-light:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(248,249,250,.25);border-color:#f8f9fa}.custom-switch .custom-control-input:disabled.custom-control-input-light:checked~.custom-control-label::before{background-color:rgba(248,249,250,.5)}.custom-switch .custom-control-input.custom-control-input-dark:checked~.custom-control-label::before{background-color:#343a40;border-color:#343a40}.custom-switch .custom-control-input.custom-control-input-dark:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(52,58,64,.25);border-color:#343a40}.custom-switch .custom-control-input:disabled.custom-control-input-dark:checked~.custom-control-label::before{background-color:rgba(52,58,64,.5)}.custom-switch .custom-control-input.custom-control-input-link:checked~.custom-control-label::before{background-color:#3273dc;border-color:#3273dc}.custom-switch .custom-control-input.custom-control-input-link:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(50,115,220,.25);border-color:#3273dc}.custom-switch .custom-control-input:disabled.custom-control-input-link:checked~.custom-control-label::before{background-color:rgba(50,115,220,.5)}.custom-switch .custom-control-input.custom-control-input-xs+.custom-control-label{line-height:1rem;vertical-align:middle;padding-left:0}.custom-switch .custom-control-input.custom-control-input-xs+.custom-control-label::before{height:.5rem;width:calc(.75rem + (.5rem/2));border-radius:1rem}.custom-switch .custom-control-input.custom-control-input-xs+.custom-control-label::after{height:calc(.5rem - 4px);width:calc(.5rem - 4px);border-radius:calc(.75rem - (.5rem/2))}.custom-switch .custom-control-input.custom-control-input-xs:checked~.custom-control-label::after{transform:translateX(calc(.75rem - (.5rem/2)))}.custom-switch .custom-control-input.custom-control-input-sm+.custom-control-label{line-height:1.25rem;vertical-align:middle;padding-left:0}.custom-switch .custom-control-input.custom-control-input-sm+.custom-control-label::before{height:.75rem;width:calc(1rem + (.75rem/2));border-radius:1.5rem}.custom-switch .custom-control-input.custom-control-input-sm+.custom-control-label::after{height:calc(.75rem - 4px);width:calc(.75rem - 4px);border-radius:calc(1rem - (.75rem/2))}.custom-switch .custom-control-input.custom-control-input-sm:checked~.custom-control-label::after{transform:translateX(calc(1rem - (.75rem/2)))}.custom-switch .custom-control-input.custom-control-input-md+.custom-control-label{line-height:2rem;vertical-align:middle;padding-left:2rem}.custom-switch .custom-control-input.custom-control-input-md+.custom-control-label::before{height:1.5rem;width:calc(2rem + (1.5rem/2));border-radius:3rem}.custom-switch .custom-control-input.custom-control-input-md+.custom-control-label::after{height:calc(1.5rem - 4px);width:calc(1.5rem - 4px);border-radius:calc(2rem - (1.5rem/2))}.custom-switch .custom-control-input.custom-control-input-md:checked~.custom-control-label::after{transform:translateX(calc(2rem - (1.5rem/2)))}.custom-switch .custom-control-input.custom-control-input-lg+.custom-control-label{line-height:2.5rem;vertical-align:middle;padding-left:3rem}.custom-switch .custom-control-input.custom-control-input-lg+.custom-control-label::before{height:2rem;width:calc(3rem + (2rem/2));border-radius:4rem}.custom-switch .custom-control-input.custom-control-input-lg+.custom-control-label::after{height:calc(2rem - 4px);width:calc(2rem - 4px);border-radius:calc(3rem - (2rem/2))}.custom-switch .custom-control-input.custom-control-input-lg:checked~.custom-control-label::after{transform:translateX(calc(3rem - (2rem/2)))}.custom-switch .custom-control-input.custom-control-input-xl+.custom-control-label{line-height:3rem;vertical-align:middle;padding-left:4rem}.custom-switch .custom-control-input.custom-control-input-xl+.custom-control-label::before{height:2.5rem;width:calc(4rem + (2.5rem/2));border-radius:5rem}.custom-switch .custom-control-input.custom-control-input-xl+.custom-control-label::after{height:calc(2.5rem - 4px);width:calc(2.5rem - 4px);border-radius:calc(4rem - (2.5rem/2))}.custom-switch .custom-control-input.custom-control-input-xl:checked~.custom-control-label::after{transform:translateX(calc(4rem - (2.5rem/2)))}table.table tbody tr.selected{background-color:var(--primary)}tr.table-row-selectable:hover{cursor:pointer} +.snackbar{align-items:center;background-color:var(--b-snackbar-background,#323232);color:var(--b-snackbar-text-color,#fff);font-size:.875rem;line-height:1.42857;opacity:0;padding:.875rem 1.5rem;position:absolute;bottom:0;left:0;transform:translateY(100%);transition:opacity 0s .195s,transform .195s cubic-bezier(.4,0,1,1);width:100%;z-index:60}@media(min-width:768px){.snackbar{border-radius:2px;max-width:35.5rem;min-width:18rem;left:50%;transform:translate(-50%,100%);width:auto}}@media(min-width:768px){.snackbar{transition:opacity 0s .2535s,transform .2535s cubic-bezier(.4,0,1,1)}}@media(min-width:1200px){.snackbar{transition:opacity 0s .13s,transform .13s cubic-bezier(.4,0,1,1)}}@media screen and (prefers-reduced-motion:reduce){.snackbar{transition:none}}.snackbar.snackbar-show{transition-duration:.225s;transition-property:transform;transition-timing-function:cubic-bezier(0,0,.2,1);opacity:1;transform:translateY(0)}@media(min-width:768px){.snackbar.snackbar-show{transition-duration:.2925s}}@media(min-width:1200px){.snackbar.snackbar-show{transition-duration:.15s}}@media screen and (prefers-reduced-motion:reduce){.snackbar.snackbar-show{transition:none}}@media(min-width:768px){.snackbar.snackbar-show{transform:translate(-50%,-1.5rem)}}.snackbar-header{display:flex;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:DARKEN(var(--b-snackbar-background,#323232),30%);margin-right:auto;min-width:0;font-weight:bold;padding-bottom:.875rem}.snackbar-footer{display:flex;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:DARKEN(var(--b-snackbar-background,#323232),30%);margin-right:auto;min-width:0;padding-top:.875rem}.snackbar-body{display:flex;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:auto;max-height:100%;min-width:0}.snackbar-action-button{transition-duration:.3s;transition-property:background-color,background-image;transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:transparent;background-image:none;border:0;color:var(--b-snackbar-button-color,var(--b-snackbar-button-color,#ff4081));cursor:pointer;display:block;flex-shrink:0;font-size:inherit;font-weight:500;line-height:inherit;padding:0;text-transform:uppercase;white-space:nowrap}@media(min-width:768px){.snackbar-action-button{transition-duration:.39s}}@media(min-width:1200px){.snackbar-action-button{transition-duration:.2s}}@media screen and (prefers-reduced-motion:reduce){.snackbar-action-button{transition:none}}.snackbar-action-button:focus,.snackbar-action-button:hover{color:var(--b-snackbar-button-hover-color,var(--b-snackbar-button-hover-color,#ff80ab));text-decoration:none}@media(min-width:768px){.snackbar-action-button{margin-left:3rem}}.snackbar-action-button:focus{outline:0}@media(min-width:768px){.snackbar-left,.snackbar-right{transform:translateY(100%)}.snackbar-left.snackbar-show,.snackbar-right.snackbar-show{transform:translateY(-1.5rem)}}@media(min-width:768px){.snackbar-left{left:1.5rem}}@media(min-width:768px){.snackbar-right{right:1.5rem;left:auto}}.snackbar-multi-line{padding-top:1.25rem;padding-bottom:1.25rem}.snackbar-multi-line .snackbar-body{white-space:normal}.snackbar-primary{background-color:var(--b-snackbar-background-primary,#cce5ff);color:var(--b-snackbar-text-primary,#004085)}.snackbar-action-button-primary{color:var(--b-snackbar-button-primary,#ff4081)}.snackbar-action-button-primary:focus,.snackbar-action-button-primary:hover{color:var(--b-snackbar-button-hover-primary,#ff80ab)}.snackbar-secondary{background-color:var(--b-snackbar-background-secondary,#e2e3e5);color:var(--b-snackbar-text-secondary,#383d41)}.snackbar-action-button-secondary{color:var(--b-snackbar-button-secondary,#ff4081)}.snackbar-action-button-secondary:focus,.snackbar-action-button-secondary:hover{color:var(--b-snackbar-button-hover-secondary,#ff80ab)}.snackbar-success{background-color:var(--b-snackbar-background-success,#d4edda);color:var(--b-snackbar-text-success,#155724)}.snackbar-action-button-success{color:var(--b-snackbar-button-success,#ff4081)}.snackbar-action-button-success:focus,.snackbar-action-button-success:hover{color:var(--b-snackbar-button-hover-success,#ff80ab)}.snackbar-danger{background-color:var(--b-snackbar-background-danger,#f8d7da);color:var(--b-snackbar-text-danger,#721c24)}.snackbar-action-button-danger{color:var(--b-snackbar-button-danger,#ff4081)}.snackbar-action-button-danger:focus,.snackbar-action-button-danger:hover{color:var(--b-snackbar-button-hover-danger,#ff80ab)}.snackbar-warning{background-color:var(--b-snackbar-background-warning,#fff3cd);color:var(--b-snackbar-text-warning,#856404)}.snackbar-action-button-warning{color:var(--b-snackbar-button-warning,#ff4081)}.snackbar-action-button-warning:focus,.snackbar-action-button-warning:hover{color:var(--b-snackbar-button-hover-warning,#ff80ab)}.snackbar-info{background-color:var(--b-snackbar-background-info,#d1ecf1);color:var(--b-snackbar-text-info,#0c5460)}.snackbar-action-button-info{color:var(--b-snackbar-button-info,#ff4081)}.snackbar-action-button-info:focus,.snackbar-action-button-info:hover{color:var(--b-snackbar-button-hover-info,#ff80ab)}.snackbar-light{background-color:var(--b-snackbar-background-light,#fefefe);color:var(--b-snackbar-text-light,#818182)}.snackbar-action-button-light{color:var(--b-snackbar-button-light,#ff4081)}.snackbar-action-button-light:focus,.snackbar-action-button-light:hover{color:var(--b-snackbar-button-hover-light,#ff80ab)}.snackbar-dark{background-color:var(--b-snackbar-background-dark,#d6d8d9);color:var(--b-snackbar-text-dark,#1b1e21)}.snackbar-action-button-dark{color:var(--b-snackbar-button-dark,#ff4081)}.snackbar-action-button-dark:focus,.snackbar-action-button-dark:hover{color:var(--b-snackbar-button-hover-dark,#ff80ab)}.snackbar-stack{display:flex;flex-direction:column;position:fixed;z-index:60;bottom:0}.snackbar-stack .snackbar{position:relative;flex-direction:row;margin-bottom:0}.snackbar-stack .snackbar:not(:last-child){margin-bottom:1.5rem}@media(min-width:576px){.snackbar-stack-center{left:50%;transform:translate(-50%,0%)}.snackbar-stack-left{left:1.5rem}.snackbar-stack-right{right:1.5rem}} +.flag-icon-background{background-size:contain;background-position:50%;background-repeat:no-repeat}.flag-icon{background-size:contain;background-position:50%;background-repeat:no-repeat;position:relative;display:inline-block;width:1.33333333em;line-height:1em}.flag-icon:before{content:" "}.flag-icon.flag-icon-squared{width:1em}.flag-icon-ad{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ad.svg)}.flag-icon-ad.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ad.svg)}.flag-icon-ae{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ae.svg)}.flag-icon-ae.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ae.svg)}.flag-icon-af{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/af.svg)}.flag-icon-af.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/af.svg)}.flag-icon-ag{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ag.svg)}.flag-icon-ag.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ag.svg)}.flag-icon-ai{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ai.svg)}.flag-icon-ai.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ai.svg)}.flag-icon-al{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/al.svg)}.flag-icon-al.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/al.svg)}.flag-icon-am{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/am.svg)}.flag-icon-am.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/am.svg)}.flag-icon-ao{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ao.svg)}.flag-icon-ao.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ao.svg)}.flag-icon-aq{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/aq.svg)}.flag-icon-aq.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/aq.svg)}.flag-icon-ar{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ar.svg)}.flag-icon-ar.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ar.svg)}.flag-icon-as{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/as.svg)}.flag-icon-as.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/as.svg)}.flag-icon-at{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/at.svg)}.flag-icon-at.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/at.svg)}.flag-icon-au{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/au.svg)}.flag-icon-au.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/au.svg)}.flag-icon-aw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/aw.svg)}.flag-icon-aw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/aw.svg)}.flag-icon-ax{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ax.svg)}.flag-icon-ax.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ax.svg)}.flag-icon-az{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/az.svg)}.flag-icon-az.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/az.svg)}.flag-icon-ba{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ba.svg)}.flag-icon-ba.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ba.svg)}.flag-icon-bb{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bb.svg)}.flag-icon-bb.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bb.svg)}.flag-icon-bd{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bd.svg)}.flag-icon-bd.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bd.svg)}.flag-icon-be{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/be.svg)}.flag-icon-be.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/be.svg)}.flag-icon-bf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bf.svg)}.flag-icon-bf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bf.svg)}.flag-icon-bg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bg.svg)}.flag-icon-bg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bg.svg)}.flag-icon-bh{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bh.svg)}.flag-icon-bh.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bh.svg)}.flag-icon-bi{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bi.svg)}.flag-icon-bi.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bi.svg)}.flag-icon-bj{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bj.svg)}.flag-icon-bj.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bj.svg)}.flag-icon-bl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bl.svg)}.flag-icon-bl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bl.svg)}.flag-icon-bm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bm.svg)}.flag-icon-bm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bm.svg)}.flag-icon-bn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bn.svg)}.flag-icon-bn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bn.svg)}.flag-icon-bo{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bo.svg)}.flag-icon-bo.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bo.svg)}.flag-icon-bq{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bq.svg)}.flag-icon-bq.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bq.svg)}.flag-icon-br{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/br.svg)}.flag-icon-br.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/br.svg)}.flag-icon-bs{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bs.svg)}.flag-icon-bs.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bs.svg)}.flag-icon-bt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bt.svg)}.flag-icon-bt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bt.svg)}.flag-icon-bv{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bv.svg)}.flag-icon-bv.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bv.svg)}.flag-icon-bw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bw.svg)}.flag-icon-bw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bw.svg)}.flag-icon-by{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/by.svg)}.flag-icon-by.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/by.svg)}.flag-icon-bz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/bz.svg)}.flag-icon-bz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/bz.svg)}.flag-icon-ca{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ca.svg)}.flag-icon-ca.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ca.svg)}.flag-icon-cc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cc.svg)}.flag-icon-cc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cc.svg)}.flag-icon-cd{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cd.svg)}.flag-icon-cd.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cd.svg)}.flag-icon-cf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cf.svg)}.flag-icon-cf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cf.svg)}.flag-icon-cg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cg.svg)}.flag-icon-cg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cg.svg)}.flag-icon-ch{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ch.svg)}.flag-icon-ch.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ch.svg)}.flag-icon-ci{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ci.svg)}.flag-icon-ci.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ci.svg)}.flag-icon-ck{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ck.svg)}.flag-icon-ck.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ck.svg)}.flag-icon-cl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cl.svg)}.flag-icon-cl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cl.svg)}.flag-icon-cm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cm.svg)}.flag-icon-cm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cm.svg)}.flag-icon-cn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cn.svg)}.flag-icon-cn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cn.svg)}.flag-icon-co{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/co.svg)}.flag-icon-co.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/co.svg)}.flag-icon-cr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cr.svg)}.flag-icon-cr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cr.svg)}.flag-icon-cu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cu.svg)}.flag-icon-cu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cu.svg)}.flag-icon-cv{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cv.svg)}.flag-icon-cv.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cv.svg)}.flag-icon-cw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cw.svg)}.flag-icon-cw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cw.svg)}.flag-icon-cx{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cx.svg)}.flag-icon-cx.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cx.svg)}.flag-icon-cy{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cy.svg)}.flag-icon-cy.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cy.svg)}.flag-icon-cz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/cz.svg)}.flag-icon-cz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/cz.svg)}.flag-icon-de{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/de.svg)}.flag-icon-de.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/de.svg)}.flag-icon-dj{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/dj.svg)}.flag-icon-dj.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/dj.svg)}.flag-icon-dk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/dk.svg)}.flag-icon-dk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/dk.svg)}.flag-icon-dm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/dm.svg)}.flag-icon-dm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/dm.svg)}.flag-icon-do{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/do.svg)}.flag-icon-do.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/do.svg)}.flag-icon-dz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/dz.svg)}.flag-icon-dz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/dz.svg)}.flag-icon-ec{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ec.svg)}.flag-icon-ec.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ec.svg)}.flag-icon-ee{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ee.svg)}.flag-icon-ee.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ee.svg)}.flag-icon-eg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/eg.svg)}.flag-icon-eg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/eg.svg)}.flag-icon-eh{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/eh.svg)}.flag-icon-eh.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/eh.svg)}.flag-icon-er{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/er.svg)}.flag-icon-er.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/er.svg)}.flag-icon-es{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/es.svg)}.flag-icon-es.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/es.svg)}.flag-icon-et{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/et.svg)}.flag-icon-et.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/et.svg)}.flag-icon-fi{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/fi.svg)}.flag-icon-fi.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/fi.svg)}.flag-icon-fj{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/fj.svg)}.flag-icon-fj.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/fj.svg)}.flag-icon-fk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/fk.svg)}.flag-icon-fk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/fk.svg)}.flag-icon-fm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/fm.svg)}.flag-icon-fm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/fm.svg)}.flag-icon-fo{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/fo.svg)}.flag-icon-fo.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/fo.svg)}.flag-icon-fr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/fr.svg)}.flag-icon-fr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/fr.svg)}.flag-icon-ga{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ga.svg)}.flag-icon-ga.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ga.svg)}.flag-icon-gb{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gb.svg)}.flag-icon-gb.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gb.svg)}.flag-icon-gd{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gd.svg)}.flag-icon-gd.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gd.svg)}.flag-icon-ge{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ge.svg)}.flag-icon-ge.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ge.svg)}.flag-icon-gf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gf.svg)}.flag-icon-gf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gf.svg)}.flag-icon-gg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gg.svg)}.flag-icon-gg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gg.svg)}.flag-icon-gh{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gh.svg)}.flag-icon-gh.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gh.svg)}.flag-icon-gi{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gi.svg)}.flag-icon-gi.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gi.svg)}.flag-icon-gl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gl.svg)}.flag-icon-gl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gl.svg)}.flag-icon-gm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gm.svg)}.flag-icon-gm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gm.svg)}.flag-icon-gn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gn.svg)}.flag-icon-gn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gn.svg)}.flag-icon-gp{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gp.svg)}.flag-icon-gp.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gp.svg)}.flag-icon-gq{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gq.svg)}.flag-icon-gq.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gq.svg)}.flag-icon-gr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gr.svg)}.flag-icon-gr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gr.svg)}.flag-icon-gs{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gs.svg)}.flag-icon-gs.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gs.svg)}.flag-icon-gt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gt.svg)}.flag-icon-gt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gt.svg)}.flag-icon-gu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gu.svg)}.flag-icon-gu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gu.svg)}.flag-icon-gw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gw.svg)}.flag-icon-gw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gw.svg)}.flag-icon-gy{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gy.svg)}.flag-icon-gy.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gy.svg)}.flag-icon-hk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/hk.svg)}.flag-icon-hk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/hk.svg)}.flag-icon-hm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/hm.svg)}.flag-icon-hm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/hm.svg)}.flag-icon-hn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/hn.svg)}.flag-icon-hn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/hn.svg)}.flag-icon-hr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/hr.svg)}.flag-icon-hr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/hr.svg)}.flag-icon-ht{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ht.svg)}.flag-icon-ht.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ht.svg)}.flag-icon-hu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/hu.svg)}.flag-icon-hu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/hu.svg)}.flag-icon-id{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/id.svg)}.flag-icon-id.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/id.svg)}.flag-icon-ie{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ie.svg)}.flag-icon-ie.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ie.svg)}.flag-icon-il{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/il.svg)}.flag-icon-il.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/il.svg)}.flag-icon-im{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/im.svg)}.flag-icon-im.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/im.svg)}.flag-icon-in{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/in.svg)}.flag-icon-in.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/in.svg)}.flag-icon-io{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/io.svg)}.flag-icon-io.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/io.svg)}.flag-icon-iq{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/iq.svg)}.flag-icon-iq.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/iq.svg)}.flag-icon-ir{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ir.svg)}.flag-icon-ir.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ir.svg)}.flag-icon-is{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/is.svg)}.flag-icon-is.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/is.svg)}.flag-icon-it{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/it.svg)}.flag-icon-it.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/it.svg)}.flag-icon-je{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/je.svg)}.flag-icon-je.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/je.svg)}.flag-icon-jm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/jm.svg)}.flag-icon-jm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/jm.svg)}.flag-icon-jo{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/jo.svg)}.flag-icon-jo.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/jo.svg)}.flag-icon-jp{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/jp.svg)}.flag-icon-jp.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/jp.svg)}.flag-icon-ke{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ke.svg)}.flag-icon-ke.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ke.svg)}.flag-icon-kg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kg.svg)}.flag-icon-kg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kg.svg)}.flag-icon-kh{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kh.svg)}.flag-icon-kh.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kh.svg)}.flag-icon-ki{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ki.svg)}.flag-icon-ki.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ki.svg)}.flag-icon-km{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/km.svg)}.flag-icon-km.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/km.svg)}.flag-icon-kn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kn.svg)}.flag-icon-kn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kn.svg)}.flag-icon-kp{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kp.svg)}.flag-icon-kp.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kp.svg)}.flag-icon-kr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kr.svg)}.flag-icon-kr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kr.svg)}.flag-icon-kw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kw.svg)}.flag-icon-kw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kw.svg)}.flag-icon-ky{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ky.svg)}.flag-icon-ky.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ky.svg)}.flag-icon-kz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/kz.svg)}.flag-icon-kz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/kz.svg)}.flag-icon-la{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/la.svg)}.flag-icon-la.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/la.svg)}.flag-icon-lb{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lb.svg)}.flag-icon-lb.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lb.svg)}.flag-icon-lc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lc.svg)}.flag-icon-lc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lc.svg)}.flag-icon-li{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/li.svg)}.flag-icon-li.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/li.svg)}.flag-icon-lk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lk.svg)}.flag-icon-lk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lk.svg)}.flag-icon-lr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lr.svg)}.flag-icon-lr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lr.svg)}.flag-icon-ls{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ls.svg)}.flag-icon-ls.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ls.svg)}.flag-icon-lt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lt.svg)}.flag-icon-lt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lt.svg)}.flag-icon-lu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lu.svg)}.flag-icon-lu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lu.svg)}.flag-icon-lv{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/lv.svg)}.flag-icon-lv.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/lv.svg)}.flag-icon-ly{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ly.svg)}.flag-icon-ly.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ly.svg)}.flag-icon-ma{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ma.svg)}.flag-icon-ma.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ma.svg)}.flag-icon-mc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mc.svg)}.flag-icon-mc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mc.svg)}.flag-icon-md{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/md.svg)}.flag-icon-md.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/md.svg)}.flag-icon-me{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/me.svg)}.flag-icon-me.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/me.svg)}.flag-icon-mf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mf.svg)}.flag-icon-mf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mf.svg)}.flag-icon-mg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mg.svg)}.flag-icon-mg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mg.svg)}.flag-icon-mh{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mh.svg)}.flag-icon-mh.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mh.svg)}.flag-icon-mk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mk.svg)}.flag-icon-mk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mk.svg)}.flag-icon-ml{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ml.svg)}.flag-icon-ml.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ml.svg)}.flag-icon-mm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mm.svg)}.flag-icon-mm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mm.svg)}.flag-icon-mn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mn.svg)}.flag-icon-mn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mn.svg)}.flag-icon-mo{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mo.svg)}.flag-icon-mo.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mo.svg)}.flag-icon-mp{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mp.svg)}.flag-icon-mp.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mp.svg)}.flag-icon-mq{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mq.svg)}.flag-icon-mq.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mq.svg)}.flag-icon-mr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mr.svg)}.flag-icon-mr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mr.svg)}.flag-icon-ms{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ms.svg)}.flag-icon-ms.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ms.svg)}.flag-icon-mt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mt.svg)}.flag-icon-mt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mt.svg)}.flag-icon-mu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mu.svg)}.flag-icon-mu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mu.svg)}.flag-icon-mv{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mv.svg)}.flag-icon-mv.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mv.svg)}.flag-icon-mw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mw.svg)}.flag-icon-mw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mw.svg)}.flag-icon-mx{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mx.svg)}.flag-icon-mx.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mx.svg)}.flag-icon-my{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/my.svg)}.flag-icon-my.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/my.svg)}.flag-icon-mz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/mz.svg)}.flag-icon-mz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/mz.svg)}.flag-icon-na{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/na.svg)}.flag-icon-na.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/na.svg)}.flag-icon-nc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/nc.svg)}.flag-icon-nc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/nc.svg)}.flag-icon-ne{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ne.svg)}.flag-icon-ne.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ne.svg)}.flag-icon-nf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/nf.svg)}.flag-icon-nf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/nf.svg)}.flag-icon-ng{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ng.svg)}.flag-icon-ng.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ng.svg)}.flag-icon-ni{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ni.svg)}.flag-icon-ni.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ni.svg)}.flag-icon-nl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/nl.svg)}.flag-icon-nl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/nl.svg)}.flag-icon-no{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/no.svg)}.flag-icon-no.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/no.svg)}.flag-icon-np{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/np.svg)}.flag-icon-np.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/np.svg)}.flag-icon-nr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/nr.svg)}.flag-icon-nr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/nr.svg)}.flag-icon-nu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/nu.svg)}.flag-icon-nu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/nu.svg)}.flag-icon-nz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/nz.svg)}.flag-icon-nz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/nz.svg)}.flag-icon-om{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/om.svg)}.flag-icon-om.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/om.svg)}.flag-icon-pa{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pa.svg)}.flag-icon-pa.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pa.svg)}.flag-icon-pe{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pe.svg)}.flag-icon-pe.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pe.svg)}.flag-icon-pf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pf.svg)}.flag-icon-pf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pf.svg)}.flag-icon-pg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pg.svg)}.flag-icon-pg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pg.svg)}.flag-icon-ph{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ph.svg)}.flag-icon-ph.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ph.svg)}.flag-icon-pk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pk.svg)}.flag-icon-pk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pk.svg)}.flag-icon-pl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pl.svg)}.flag-icon-pl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pl.svg)}.flag-icon-pm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pm.svg)}.flag-icon-pm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pm.svg)}.flag-icon-pn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pn.svg)}.flag-icon-pn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pn.svg)}.flag-icon-pr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pr.svg)}.flag-icon-pr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pr.svg)}.flag-icon-ps{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ps.svg)}.flag-icon-ps.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ps.svg)}.flag-icon-pt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pt.svg)}.flag-icon-pt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pt.svg)}.flag-icon-pw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/pw.svg)}.flag-icon-pw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/pw.svg)}.flag-icon-py{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/py.svg)}.flag-icon-py.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/py.svg)}.flag-icon-qa{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/qa.svg)}.flag-icon-qa.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/qa.svg)}.flag-icon-re{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/re.svg)}.flag-icon-re.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/re.svg)}.flag-icon-ro{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ro.svg)}.flag-icon-ro.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ro.svg)}.flag-icon-rs{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/rs.svg)}.flag-icon-rs.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/rs.svg)}.flag-icon-ru{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ru.svg)}.flag-icon-ru.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ru.svg)}.flag-icon-rw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/rw.svg)}.flag-icon-rw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/rw.svg)}.flag-icon-sa{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sa.svg)}.flag-icon-sa.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sa.svg)}.flag-icon-sb{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sb.svg)}.flag-icon-sb.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sb.svg)}.flag-icon-sc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sc.svg)}.flag-icon-sc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sc.svg)}.flag-icon-sd{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sd.svg)}.flag-icon-sd.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sd.svg)}.flag-icon-se{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/se.svg)}.flag-icon-se.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/se.svg)}.flag-icon-sg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sg.svg)}.flag-icon-sg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sg.svg)}.flag-icon-sh{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sh.svg)}.flag-icon-sh.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sh.svg)}.flag-icon-si{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/si.svg)}.flag-icon-si.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/si.svg)}.flag-icon-sj{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sj.svg)}.flag-icon-sj.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sj.svg)}.flag-icon-sk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sk.svg)}.flag-icon-sk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sk.svg)}.flag-icon-sl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sl.svg)}.flag-icon-sl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sl.svg)}.flag-icon-sm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sm.svg)}.flag-icon-sm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sm.svg)}.flag-icon-sn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sn.svg)}.flag-icon-sn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sn.svg)}.flag-icon-so{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/so.svg)}.flag-icon-so.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/so.svg)}.flag-icon-sr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sr.svg)}.flag-icon-sr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sr.svg)}.flag-icon-ss{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ss.svg)}.flag-icon-ss.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ss.svg)}.flag-icon-st{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/st.svg)}.flag-icon-st.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/st.svg)}.flag-icon-sv{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sv.svg)}.flag-icon-sv.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sv.svg)}.flag-icon-sx{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sx.svg)}.flag-icon-sx.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sx.svg)}.flag-icon-sy{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sy.svg)}.flag-icon-sy.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sy.svg)}.flag-icon-sz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/sz.svg)}.flag-icon-sz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/sz.svg)}.flag-icon-tc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tc.svg)}.flag-icon-tc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tc.svg)}.flag-icon-td{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/td.svg)}.flag-icon-td.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/td.svg)}.flag-icon-tf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tf.svg)}.flag-icon-tf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tf.svg)}.flag-icon-tg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tg.svg)}.flag-icon-tg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tg.svg)}.flag-icon-th{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/th.svg)}.flag-icon-th.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/th.svg)}.flag-icon-tj{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tj.svg)}.flag-icon-tj.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tj.svg)}.flag-icon-tk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tk.svg)}.flag-icon-tk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tk.svg)}.flag-icon-tl{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tl.svg)}.flag-icon-tl.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tl.svg)}.flag-icon-tm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tm.svg)}.flag-icon-tm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tm.svg)}.flag-icon-tn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tn.svg)}.flag-icon-tn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tn.svg)}.flag-icon-to{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/to.svg)}.flag-icon-to.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/to.svg)}.flag-icon-tr{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tr.svg)}.flag-icon-tr.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tr.svg)}.flag-icon-tt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tt.svg)}.flag-icon-tt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tt.svg)}.flag-icon-tv{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tv.svg)}.flag-icon-tv.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tv.svg)}.flag-icon-tw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tw.svg)}.flag-icon-tw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tw.svg)}.flag-icon-tz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/tz.svg)}.flag-icon-tz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/tz.svg)}.flag-icon-ua{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ua.svg)}.flag-icon-ua.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ua.svg)}.flag-icon-ug{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ug.svg)}.flag-icon-ug.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ug.svg)}.flag-icon-um{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/um.svg)}.flag-icon-um.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/um.svg)}.flag-icon-us{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/us.svg)}.flag-icon-us.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/us.svg)}.flag-icon-uy{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/uy.svg)}.flag-icon-uy.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/uy.svg)}.flag-icon-uz{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/uz.svg)}.flag-icon-uz.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/uz.svg)}.flag-icon-va{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/va.svg)}.flag-icon-va.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/va.svg)}.flag-icon-vc{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/vc.svg)}.flag-icon-vc.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/vc.svg)}.flag-icon-ve{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ve.svg)}.flag-icon-ve.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ve.svg)}.flag-icon-vg{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/vg.svg)}.flag-icon-vg.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/vg.svg)}.flag-icon-vi{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/vi.svg)}.flag-icon-vi.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/vi.svg)}.flag-icon-vn{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/vn.svg)}.flag-icon-vn.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/vn.svg)}.flag-icon-vu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/vu.svg)}.flag-icon-vu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/vu.svg)}.flag-icon-wf{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/wf.svg)}.flag-icon-wf.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/wf.svg)}.flag-icon-ws{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ws.svg)}.flag-icon-ws.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ws.svg)}.flag-icon-ye{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/ye.svg)}.flag-icon-ye.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/ye.svg)}.flag-icon-yt{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/yt.svg)}.flag-icon-yt.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/yt.svg)}.flag-icon-za{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/za.svg)}.flag-icon-za.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/za.svg)}.flag-icon-zm{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/zm.svg)}.flag-icon-zm.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/zm.svg)}.flag-icon-zw{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/zw.svg)}.flag-icon-zw.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/zw.svg)}.flag-icon-es-ca{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/es-ca.svg)}.flag-icon-es-ca.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/es-ca.svg)}.flag-icon-es-ga{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/es-ga.svg)}.flag-icon-es-ga.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/es-ga.svg)}.flag-icon-eu{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/eu.svg)}.flag-icon-eu.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/eu.svg)}.flag-icon-gb-eng{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gb-eng.svg)}.flag-icon-gb-eng.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gb-eng.svg)}.flag-icon-gb-nir{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gb-nir.svg)}.flag-icon-gb-nir.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gb-nir.svg)}.flag-icon-gb-sct{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gb-sct.svg)}.flag-icon-gb-sct.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gb-sct.svg)}.flag-icon-gb-wls{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/gb-wls.svg)}.flag-icon-gb-wls.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/gb-wls.svg)}.flag-icon-un{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/un.svg)}.flag-icon-un.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/un.svg)}.flag-icon-xk{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/4x3/xk.svg)}.flag-icon-xk.flag-icon-squared{background-image:url(_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/flag-icon/flags/1x1/xk.svg)} +#main-navbar-tools a.dropdown-toggle{text-decoration:none;color:#fff}.navbar .dropdown-submenu{position:relative}.navbar .dropdown-menu{margin:0;padding:0}.navbar .dropdown-menu a{font-size:.9em;padding:10px 15px;display:block;min-width:210px;text-align:left;border-radius:.25rem;min-height:44px}.navbar .dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:16px;top:18px}.navbar .dropdown-submenu .dropdown-menu{top:0;left:100%}.card-header .btn{padding:2px 6px}.card-header h5{margin:0}.container>.card{box-shadow:0 .125rem .25rem rgba(0,0,0,.075) !important}@media screen and (min-width:768px){.navbar .dropdown:hover>.dropdown-menu{display:block}.navbar .dropdown-submenu:hover>.dropdown-menu{display:block}}.input-validation-error{border-color:#dc3545}.field-validation-error{font-size:.8em}.dataTables_scrollBody{min-height:248px}div.dataTables_wrapper div.dataTables_info{padding-top:11px;white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{padding-top:10px;margin-bottom:0}.rtl .dropdown-menu-right{right:auto;left:0}.rtl .dropdown-menu-right a{text-align:right}.rtl .navbar .dropdown-menu a{text-align:right}.rtl .navbar .dropdown-submenu .dropdown-menu{top:0;left:auto;right:100%}.navbar-dark .navbar-nav .nav-link{color:#000 !important}.navbar-nav>.nav-item>.nav-link,.navbar-nav>.nav-item>.dropdown>.nav-link{color:#fff !important}.navbar-nav>.nav-item>div>button{color:#fff}.btn span.spinner-border{margin-right:.5rem} diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.js new file mode 100644 index 0000000000..f19dec7797 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.js @@ -0,0 +1,791 @@ +var abp=abp||{};(function(){abp.utils=abp.utils||{};abp.domReady=function(n){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(n,1):document.addEventListener("DOMContentLoaded",n)};abp.utils.setCookieValue=function(n,t,i,r,u){var f=encodeURIComponent(n)+"=";t&&(f=f+encodeURIComponent(t));i&&(f=f+"; expires="+i);r&&(f=f+"; path="+r);u&&(f=f+"; secure");document.cookie=f};abp.utils.getCookieValue=function(n){for(var i,r=document.cookie.split("; "),t=0;t { + window.blazorise.textEdit.keyPress(instances[elementId], e); + }); + + element.addEventListener("paste", (e) => { + window.blazorise.textEdit.paste(instances[elementId], e); + }); + + return true; + }, + destroy: (element, elementId) => { + var instances = window.blazorise.textEdit._instances || {}; + delete instances[elementId]; + return true; + }, + keyPress: (validator, e) => { + var currentValue = String.fromCharCode(e.which); + + return validator.isValid(currentValue) || e.preventDefault(); + }, + paste: (validator, e) => { + return validator.isValid(e.clipboardData.getData("text/plain")) || e.preventDefault(); + } + }, + numericEdit: { + _instances: [], + + initialize: (dotnetAdapter, element, elementId, decimals, separator, step, min, max) => { + window.blazorise.numericEdit._instances[elementId] = new window.blazorise.NumericMaskValidator(dotnetAdapter, element, elementId, decimals, separator, step, min, max); + + element.addEventListener("keypress", (e) => { + window.blazorise.numericEdit.keyPress(window.blazorise.numericEdit._instances[elementId], e); + }); + + element.addEventListener("keydown", (e) => { + window.blazorise.numericEdit.keyDown(window.blazorise.numericEdit._instances[elementId], e); + }); + + element.addEventListener("paste", (e) => { + window.blazorise.numericEdit.paste(window.blazorise.numericEdit._instances[elementId], e); + }); + return true; + }, + destroy: (element, elementId) => { + var instances = window.blazorise.numericEdit._instances || {}; + delete instances[elementId]; + return true; + }, + keyDown: (validator, e) => { + if (e.which === 38) { + validator.stepApply(1); + } else if (e.which === 40) { + validator.stepApply(-1); + } + return true; + }, + keyPress: (validator, e) => { + var currentValue = String.fromCharCode(e.which); + + return e.which === 13 // still need to allow ENTER key so that we don't preventDefault on form submit + || validator.isValid(currentValue) + || e.preventDefault(); + }, + paste: (validator, e) => { + return validator.isValid(e.clipboardData.getData("text/plain")) || e.preventDefault(); + } + }, + NoValidator: function () { + this.isValid = function (currentValue) { + return true; + }; + }, + NumericMaskValidator: function (dotnetAdapter, element, elementId, decimals, separator, step, min, max) { + this.dotnetAdapter = dotnetAdapter; + this.elementId = elementId; + this.element = element; + this.decimals = decimals === null || decimals === undefined ? 2 : decimals; + this.separator = separator || "."; + this.step = step || 1; + this.min = min; + this.max = max; + this.regex = function () { + var sep = "\\" + this.separator, + dec = this.decimals, + reg = "{0," + dec + "}"; + + return dec ? new RegExp("^(-)?(((\\d+(" + sep + "\\d" + reg + ")?)|(" + sep + "\\d" + reg + ")))?$") : /^(-)?(\d*)$/; + }; + this.carret = function () { + return [this.element.selectionStart, this.element.selectionEnd]; + }; + this.isValid = function (currentValue) { + var value = this.element.value, + selection = this.carret(); + + if (value = value.substring(0, selection[0]) + currentValue + value.substring(selection[1]), !!this.regex().test(value)) { + return value = (value || "").replace(this.separator, "."), value === "-" && this.min < 0 || value >= this.min && value <= this.max; + } + + return false; + }; + this.stepApply = function (sign) { + var value = (this.element.value || "").replace(this.separator, "."); + var number = Number(value) + this.step * sign; + + if (number >= this.min && number <= this.max) { + var newValue = number.toString().replace(".", this.separator); + this.element.value = newValue; + this.dotnetAdapter.invokeMethodAsync('SetValue', newValue); + } + }; + }, + DateTimeMaskValidator: function (element, elementId) { + this.elementId = elementId; + this.element = element; + this.regex = function () { + return /^\d{0,4}$|^\d{4}-0?$|^\d{4}-(?:0?[1-9]|1[012])(?:-(?:0?[1-9]?|[12]\d|3[01])?)?$/; + }; + this.carret = function () { + return [this.element.selectionStart, this.element.selectionEnd]; + }; + this.isValid = function (currentValue) { + var value = this.element.value, + selection = this.carret(); + + return value = value.substring(0, selection[0]) + currentValue + value.substring(selection[1]), !!this.regex().test(value); + }; + }, + RegExMaskValidator: function (element, elementId, editMask) { + this.elementId = elementId; + this.element = element; + this.editMask = editMask; + this.regex = function () { + return new RegExp(this.editMask); + }; + this.carret = function () { + return [this.element.selectionStart, this.element.selectionEnd]; + }; + this.isValid = function (currentValue) { + var value = this.element.value, + selection = this.carret(); + + return value = value.substring(0, selection[0]) + currentValue + value.substring(selection[1]), !!this.regex().test(value); + }; + }, + button: { + _instances: [], + + initialize: (element, elementId, preventDefaultOnSubmit) => { + window.blazorise.button._instances[elementId] = new window.blazorise.ButtonInfo(element, elementId, preventDefaultOnSubmit); + + if (element.type === "submit") { + element.addEventListener("click", (e) => { + window.blazorise.button.click(window.blazorise.button._instances[elementId], e); + }); + } + + return true; + }, + destroy: (elementId) => { + var instances = window.blazorise.button._instances || {}; + delete instances[elementId]; + return true; + }, + click: (buttonInfo, e) => { + if (buttonInfo.preventDefaultOnSubmit) { + return e.preventDefault(); + } + } + }, + ButtonInfo: function (element, elementId, preventDefaultOnSubmit) { + this.elementId = elementId; + this.element = element; + this.preventDefaultOnSubmit = preventDefaultOnSubmit; + }, + link: { + scrollIntoView: (elementId) => { + var element = document.getElementById(elementId); + + if (element) { + element.scrollIntoView(); + window.location.hash = elementId; + } + + return true; + } + }, + fileEdit: { + initialize: (adapter, element, elementId) => { + var nextFileId = 0; + + element.addEventListener('change', function handleInputFileChange(event) { + // Reduce to purely serializable data, plus build an index by ID + element._blazorFilesById = {}; + var fileList = Array.prototype.map.call(element.files, function (file) { + var result = { + id: ++nextFileId, + lastModified: new Date(file.lastModified).toISOString(), + name: file.name, + size: file.size, + type: file.type + }; + element._blazorFilesById[result.id] = result; + + // Attach the blob data itself as a non-enumerable property so it doesn't appear in the JSON + Object.defineProperty(result, 'blob', { value: file }); + + return result; + }); + + adapter.invokeMethodAsync('NotifyChange', fileList).then(null, function (err) { + throw new Error(err); + }); + }); + + return true; + }, + destroy: (element, elementId) => { + // TODO: + return true; + }, + + reset: (element, elementId) => { + if (element) { + element.value = ''; + } + + return true; + }, + + readFileData: function readFileData(element, fileEntryId, position, length) { + var readPromise = getArrayBufferFromFileAsync(element, fileEntryId); + + return readPromise.then(function (arrayBuffer) { + var uint8Array = new Uint8Array(arrayBuffer, position, length); + var base64 = uint8ToBase64(uint8Array); + return base64; + }); + }, + + ensureArrayBufferReadyForSharedMemoryInterop: function ensureArrayBufferReadyForSharedMemoryInterop(elem, fileId) { + return getArrayBufferFromFileAsync(elem, fileId).then(function (arrayBuffer) { + getFileById(elem, fileId).arrayBuffer = arrayBuffer; + }); + }, + + readFileDataSharedMemory: function readFileDataSharedMemory(readRequest) { + // This uses various unsupported internal APIs. Beware that if you also use them, + // your code could become broken by any update. + var inputFileElementReferenceId = Blazor.platform.readStringField(readRequest, 0); + var inputFileElement = document.querySelector('[_bl_' + inputFileElementReferenceId + ']'); + var fileId = Blazor.platform.readInt32Field(readRequest, 4); + var sourceOffset = Blazor.platform.readUint64Field(readRequest, 8); + var destination = Blazor.platform.readInt32Field(readRequest, 16); + var destinationOffset = Blazor.platform.readInt32Field(readRequest, 20); + var maxBytes = Blazor.platform.readInt32Field(readRequest, 24); + + var sourceArrayBuffer = getFileById(inputFileElement, fileId).arrayBuffer; + var bytesToRead = Math.min(maxBytes, sourceArrayBuffer.byteLength - sourceOffset); + var sourceUint8Array = new Uint8Array(sourceArrayBuffer, sourceOffset, bytesToRead); + + var destinationUint8Array = Blazor.platform.toUint8Array(destination); + destinationUint8Array.set(sourceUint8Array, destinationOffset); + + return bytesToRead; + }, + open: (element, elementId) => { + if (!element && elementId) { + element = document.getElementById(elementId); + } + + if (element) { + element.click(); + } + } + }, + + breakpoint: { + // Get the current breakpoint + getBreakpoint: function () { + return window.getComputedStyle(document.body, ':before').content.replace(/\"/g, ''); + }, + + // holds the list of components that are triggers to breakpoint + breakpointComponents: [], + + lastBreakpoint: null, + + addBreakpointComponent: (elementId, dotnetAdapter) => { + window.blazorise.breakpoint.breakpointComponents.push({ elementId: elementId, dotnetAdapter: dotnetAdapter }); + }, + + findBreakpointComponentIndex: (elementId) => { + for (index = 0; index < window.blazorise.breakpoint.breakpointComponents.length; ++index) { + if (window.blazorise.breakpoint.breakpointComponents[index].elementId === elementId) + return index; + } + return -1; + }, + + isBreakpointComponent: (elementId) => { + for (index = 0; index < window.blazorise.breakpoint.breakpointComponents.length; ++index) { + if (window.blazorise.breakpoint.breakpointComponents[index].elementId === elementId) + return true; + } + return false; + }, + + registerBreakpointComponent: (elementId, dotnetAdapter) => { + if (window.blazorise.breakpoint.isBreakpointComponent(elementId) !== true) { + window.blazorise.breakpoint.addBreakpointComponent(elementId, dotnetAdapter); + } + }, + + unregisterBreakpointComponent: (elementId) => { + const index = window.blazorise.breakpoint.findBreakpointComponentIndex(elementId); + if (index !== -1) { + window.blazorise.breakpoint.breakpointComponents.splice(index, 1); + } + }, + + onBreakpoint: (dotnetAdapter, currentBreakpoint) => { + dotnetAdapter.invokeMethodAsync('OnBreakpoint', currentBreakpoint); + } + } +}; + +document.addEventListener('click', function handler(evt) { + if (window.blazorise.closableComponents && window.blazorise.closableComponents.length > 0) { + const lastClosable = window.blazorise.closableComponents[window.blazorise.closableComponents.length - 1]; + + if (lastClosable) { + window.blazorise.tryClose(lastClosable, evt.target.id, false, hasParentInTree(evt.target, lastClosable.elementId)); + } + } +}); + +document.addEventListener('keyup', function handler(evt) { + if (evt.keyCode === 27 && window.blazorise.closableComponents && window.blazorise.closableComponents.length > 0) { + const lastClosable = window.blazorise.closableComponents[window.blazorise.closableComponents.length - 1]; + + if (lastClosable) { + window.blazorise.tryClose(lastClosable, lastClosable.elementId, true, false); + } + } +}); + +// Recalculate breakpoint on resize +window.addEventListener('resize', function () { + if (window.blazorise.breakpoint.breakpointComponents && window.blazorise.breakpoint.breakpointComponents.length > 0) { + var currentBreakpoint = window.blazorise.breakpoint.getBreakpoint(); + + if (window.blazorise.breakpoint.lastBreakpoint !== currentBreakpoint) { + window.blazorise.breakpoint.lastBreakpoint = currentBreakpoint; + + for (index = 0; index < window.blazorise.breakpoint.breakpointComponents.length; ++index) { + window.blazorise.breakpoint.onBreakpoint(window.blazorise.breakpoint.breakpointComponents[index].dotnetAdapter, currentBreakpoint); + } + } + } +}); + +// Set initial breakpoint +window.blazorise.breakpoint.lastBreakpoint = window.blazorise.breakpoint.getBreakpoint(); + +function showPopper(element, tooltip, arrow, placement) { + var thePopper = new Popper(element, tooltip, + { + placement, + modifiers: { + offset: { + offset: 0 + }, + flip: { + behavior: "flip" + }, + arrow: { + element: arrow, + enabled: true + }, + preventOverflow: { + boundary: "scrollParent" + } + + } + } + ); + return thePopper; +} + +function getFileById(elem, fileId) { + var file = elem._blazorFilesById[fileId]; + if (!file) { + throw new Error('There is no file with ID ' + fileId + '. The file list may have changed'); + } + + return file; +} + +function getArrayBufferFromFileAsync(elem, fileId) { + var file = getFileById(elem, fileId); + + // On the first read, convert the FileReader into a Promise + if (!file.readPromise) { + file.readPromise = new Promise(function (resolve, reject) { + var reader = new FileReader(); + reader.onload = function () { resolve(reader.result); }; + reader.onerror = function (err) { reject(err); }; + reader.readAsArrayBuffer(file.blob); + }); + } + + return file.readPromise; +} + +function hasParentInTree(element, parentElementId) { + if (!element.parentElement) return false; + if (element.parentElement.id === parentElementId) return true; + return hasParentInTree(element.parentElement, parentElementId); +} + +var uint8ToBase64 = (function () { + // Code from https://github.com/beatgammit/base64-js/ + // License: MIT + var lookup = []; + + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + } + + function tripletToBase64(num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F]; + } + + function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF); + output.push(tripletToBase64(tmp)); + } + return output.join(''); + } + + return function fromByteArray(uint8) { + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ); + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ); + } + + return parts.join(''); + }; +})(); + +function mutateDOMChange(n){el=document.getElementById(n);ev=document.createEvent("Event");ev.initEvent("change",!0,!1);el.dispatchEvent(ev)}window.blazoriseBootstrap||(window.blazoriseBootstrap={});window.blazoriseBootstrap={tooltip:{initialize:n=>(n.querySelector(".custom-control-input,.btn")&&n.classList.add("b-tooltip-inline"),!0)},modal:{open:(n,t,i)=>(window.blazorise.addClassToBody("modal-open"),i&&(n.querySelector(".modal-body").scrollTop=0),!0),close:()=>(window.blazorise.removeClassFromBody("modal-open"),!0)}}; + +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1);var i,o;!function(e){e.Success="success",e.RequiresRedirect="requiresRedirect"}(i=t.AccessTokenResultStatus||(t.AccessTokenResultStatus={})),function(e){e.Redirect="redirect",e.Success="success",e.Failure="failure",e.OperationCompleted="operationCompleted"}(o=t.AuthenticationResultStatus||(t.AuthenticationResultStatus={}));class s{constructor(e){this._userManager=e}async trySilentSignIn(){return this._intialSilentSignIn||(this._intialSilentSignIn=(async()=>{try{await this._userManager.signinSilent()}catch(e){}})()),this._intialSilentSignIn}async getUser(){window.parent!==window||window.opener||window.frameElement||!this._userManager.settings.redirect_uri||location.href.startsWith(this._userManager.settings.redirect_uri)||await a.instance.trySilentSignIn();const e=await this._userManager.getUser();return e&&e.profile}async getAccessToken(e){const t=await this._userManager.getUser();if(function(e){return!(!e||!e.access_token||e.expired||!e.scopes)}(t)&&function(e,t){const r=new Set(t);if(e&&e.scopes)for(const t of e.scopes)if(!r.has(t))return!1;return!0}(e,t.scopes))return{status:i.Success,token:{grantedScopes:t.scopes,expires:r(t.expires_in),value:t.access_token}};try{const t=e&&e.scopes?{scope:e.scopes.join(" ")}:void 0,n=await this._userManager.signinSilent(t);return{status:i.Success,token:{grantedScopes:n.scopes,expires:r(n.expires_in),value:n.access_token}}}catch(e){return{status:i.RequiresRedirect}}function r(e){const t=new Date;return t.setTime(t.getTime()+1e3*e),t}}async signIn(e){try{return await this._userManager.clearStaleState(),await this._userManager.signinSilent(this.createArguments()),this.success(e)}catch(t){try{return await this._userManager.clearStaleState(),await this._userManager.signinRedirect(this.createArguments(e)),this.redirect()}catch(e){return this.error(this.getExceptionMessage(e))}}}async completeSignIn(e){const t=await this.loginRequired(e),r=await this.stateExists(e);try{const t=await this._userManager.signinCallback(e);return window.self!==window.top?this.operationCompleted():this.success(t&&t.state)}catch(e){return t||window.self!==window.top||!r?this.operationCompleted():this.error("There was an error signing in.")}}async signOut(e){try{return await this._userManager.metadataService.getEndSessionEndpoint()?(await this._userManager.signoutRedirect(this.createArguments(e)),this.redirect()):(await this._userManager.removeUser(),this.success(e))}catch(e){return this.error(this.getExceptionMessage(e))}}async completeSignOut(e){try{if(await this.stateExists(e)){const t=await this._userManager.signoutCallback(e);return this.success(t&&t.state)}return this.operationCompleted()}catch(e){return this.error(this.getExceptionMessage(e))}}getExceptionMessage(e){return function(e){return e&&e.error_description}(e)?e.error_description:function(e){return e&&e.message}(e)?e.message:e.toString()}async stateExists(e){const t=new URLSearchParams(new URL(e).search).get("state");return t&&this._userManager.settings.stateStore?await this._userManager.settings.stateStore.get(t):void 0}async loginRequired(e){const t=new URLSearchParams(new URL(e).search).get("error");if(t&&this._userManager.settings.stateStore){return"login_required"===await this._userManager.settings.stateStore.get(t)}return!1}createArguments(e){return{useReplaceToNavigate:!0,data:e}}error(e){return{status:o.Failure,errorMessage:e}}success(e){return{status:o.Success,state:e}}redirect(){return{status:o.Redirect}}operationCompleted(){return{status:o.OperationCompleted}}}class a{static init(e){return a._initialized||(a._initialized=a.initializeCore(e)),a._initialized}static handleCallback(){return a.initializeCore()}static async initializeCore(e){const t=e||a.resolveCachedSettings();if(!e&&t){const e=a.createUserManagerCore(t);window.parent!==window&&!window.opener&&window.frameElement&&e.settings.redirect_uri&&location.href.startsWith(e.settings.redirect_uri)&&(a.instance=new s(e),a._initialized=(async()=>{await a.instance.completeSignIn(location.href)})())}else if(e){const t=await a.createUserManager(e);a.instance=new s(t)}}static resolveCachedSettings(){const e=window.sessionStorage.getItem(`${a._infrastructureKey}.CachedAuthSettings`);return e?JSON.parse(e):void 0}static getUser(){return a.instance.getUser()}static getAccessToken(e){return a.instance.getAccessToken(e)}static signIn(e){return a.instance.signIn(e)}static async completeSignIn(e){let t=this._pendingOperations[e];return t||(t=a.instance.completeSignIn(e),await t,delete this._pendingOperations[e]),t}static signOut(e){return a.instance.signOut(e)}static async completeSignOut(e){let t=this._pendingOperations[e];return t||(t=a.instance.completeSignOut(e),await t,delete this._pendingOperations[e]),t}static async createUserManager(e){let t;if(function(e){return e.hasOwnProperty("configurationEndpoint")}(e)){const r=await fetch(e.configurationEndpoint);if(!r.ok)throw new Error(`Could not load settings from '${e.configurationEndpoint}'`);t=await r.json()}else e.scope||(e.scope=e.defaultScopes.join(" ")),null===e.response_type&&delete e.response_type,t=e;return window.sessionStorage.setItem(`${a._infrastructureKey}.CachedAuthSettings`,JSON.stringify(t)),a.createUserManagerCore(t)}static createUserManagerCore(e){const t=new n.UserManager(e);return t.events.addUserSignedOut(async()=>{t.removeUser()}),t}}t.AuthenticationService=a,a._infrastructureKey="Microsoft.AspNetCore.Components.WebAssembly.Authentication",a._pendingOperations={},a.handleCallback(),window.AuthenticationService=a},function(e,t,r){var n;n=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=22)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r=4){for(var e=arguments.length,t=Array(e),r=0;r=3){for(var e=arguments.length,t=Array(e),r=0;r=2){for(var e=arguments.length,t=Array(e),r=0;r=1){for(var e=arguments.length,t=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:o.JsonService;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw i.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=t,this._jsonService=new r(["application/jwk-set+json"])}return e.prototype.getMetadata=function(){var e=this;return this._settings.metadata?(i.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(i.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then((function(t){return i.Log.debug("MetadataService.getMetadata: json received"),e._settings.metadata=t,t}))):(i.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},e.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},e.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},e.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},e.prototype.getTokenEndpoint=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",e)},e.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},e.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},e.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},e.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},e.prototype._getMetadataProperty=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.Log.debug("MetadataService.getMetadataProperty for: "+e),this.getMetadata().then((function(r){if(i.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===r[e]){if(!0===t)return void i.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+e);throw i.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+e),new Error("Metadata does not contain property "+e)}return r[e]}))},e.prototype.getSigningKeys=function(){var e=this;return this._settings.signingKeys?(i.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then((function(t){return i.Log.debug("MetadataService.getSigningKeys: jwks_uri received",t),e._jsonService.getJson(t).then((function(t){if(i.Log.debug("MetadataService.getSigningKeys: key set received",t),!t.keys)throw i.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return e._settings.signingKeys=t.keys,e._settings.signingKeys}))}))},n(e,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(".well-known/openid-configuration")<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=".well-known/openid-configuration"))),this._metadataUrl}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtility=void 0;var n=r(0),i=r(1);t.UrlUtility=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.addQueryParam=function(e,t,r){return e.indexOf("?")<0&&(e+="?"),"?"!==e[e.length-1]&&(e+="&"),e+=encodeURIComponent(t),(e+="=")+encodeURIComponent(r)},e.parseUrlFragment=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.Global;"string"!=typeof e&&(e=r.location.href);var o=e.lastIndexOf(t);o>=0&&(e=e.substr(o+1)),"?"===t&&(o=e.indexOf("#"))>=0&&(e=e.substr(0,o));for(var s,a={},u=/([^&=]+)=([^&]*)/g,c=0;s=u.exec(e);)if(a[decodeURIComponent(s[1])]=decodeURIComponent(s[2]),c++>50)return n.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",e),{error:"Response exceeded expected number of parameters"};for(var h in a)return a;return{}},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoseUtil=void 0;var n=r(25),i=function(e){return e&&e.__esModule?e:{default:e}}(r(32));t.JoseUtil=(0,i.default)({jws:n.jws,KeyUtil:n.KeyUtil,X509:n.X509,crypto:n.crypto,hextob64u:n.hextob64u,b64tohex:n.b64tohex,AllowedSigningAlgs:n.AllowedSigningAlgs})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OidcClientSettings=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=t.authority,i=t.metadataUrl,o=t.metadata,l=t.signingKeys,f=t.client_id,g=t.client_secret,d=t.response_type,p=void 0===d?c:d,v=t.scope,y=void 0===v?h:v,m=t.redirect_uri,_=t.post_logout_redirect_uri,S=t.prompt,w=t.display,F=t.max_age,b=t.ui_locales,E=t.acr_values,x=t.resource,k=t.response_mode,A=t.filterProtocolClaims,P=void 0===A||A,C=t.loadUserInfo,T=void 0===C||C,R=t.staleStateAge,I=void 0===R?900:R,D=t.clockSkew,U=void 0===D?300:D,L=t.userInfoJwtIssuer,N=void 0===L?"OP":L,O=t.stateStore,B=void 0===O?new s.WebStorageStateStore:O,M=t.ResponseValidatorCtor,j=void 0===M?a.ResponseValidator:M,H=t.MetadataServiceCtor,K=void 0===H?u.MetadataService:H,V=t.extraQueryParams,q=void 0===V?{}:V,J=t.extraTokenParams,W=void 0===J?{}:J;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._authority=r,this._metadataUrl=i,this._metadata=o,this._signingKeys=l,this._client_id=f,this._client_secret=g,this._response_type=p,this._scope=y,this._redirect_uri=m,this._post_logout_redirect_uri=_,this._prompt=S,this._display=w,this._max_age=F,this._ui_locales=b,this._acr_values=E,this._resource=x,this._response_mode=k,this._filterProtocolClaims=!!P,this._loadUserInfo=!!T,this._staleStateAge=I,this._clockSkew=U,this._userInfoJwtIssuer=N,this._stateStore=B,this._validator=new j(this),this._metadataService=new K(this),this._extraQueryParams="object"===(void 0===q?"undefined":n(q))?q:{},this._extraTokenParams="object"===(void 0===W?"undefined":n(W))?W:{}}return i(e,[{key:"client_id",get:function(){return this._client_id},set:function(e){if(this._client_id)throw o.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=e}},{key:"client_secret",get:function(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(e){if(this._authority)throw o.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=e}},{key:"metadataUrl",get:function(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(".well-known/openid-configuration")<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=".well-known/openid-configuration")),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(e){this._metadata=e}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(e){this._signingKeys=e}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"stateStore",get:function(){return this._stateStore}},{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(e){"object"===(void 0===e?"undefined":n(e))?this._extraQueryParams=e:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(e){"object"===(void 0===e?"undefined":n(e))?this._extraTokenParams=e:this._extraTokenParams={}}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebStorageStateStore=void 0;var n=r(0),i=r(1);t.WebStorageStateStore=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.prefix,n=void 0===r?"oidc.":r,o=t.store,s=void 0===o?i.Global.localStorage:o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._store=s,this._prefix=n}return e.prototype.set=function(e,t){return n.Log.debug("WebStorageStateStore.set",e),e=this._prefix+e,this._store.setItem(e,t),Promise.resolve()},e.prototype.get=function(e){n.Log.debug("WebStorageStateStore.get",e),e=this._prefix+e;var t=this._store.getItem(e);return Promise.resolve(t)},e.prototype.remove=function(e){n.Log.debug("WebStorageStateStore.remove",e),e=this._prefix+e;var t=this._store.getItem(e);return this._store.removeItem(e),Promise.resolve(t)},e.prototype.getAllKeys=function(){n.Log.debug("WebStorageStateStore.getAllKeys");for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Global.XMLHttpRequest,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&Array.isArray(t)?this._contentTypes=t.slice():this._contentTypes=[],this._contentTypes.push("application/json"),n&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=r,this._jwtHandler=n}return e.prototype.getJson=function(e,t){var r=this;if(!e)throw n.Log.error("JsonService.getJson: No url passed"),new Error("url");return n.Log.debug("JsonService.getJson, url: ",e),new Promise((function(i,o){var s=new r._XMLHttpRequest;s.open("GET",e);var a=r._contentTypes,u=r._jwtHandler;s.onload=function(){if(n.Log.debug("JsonService.getJson: HTTP response received, status",s.status),200===s.status){var t=s.getResponseHeader("Content-Type");if(t){var r=a.find((function(e){if(t.startsWith(e))return!0}));if("application/jwt"==r)return void u(s).then(i,o);if(r)try{return void i(JSON.parse(s.responseText))}catch(e){return n.Log.error("JsonService.getJson: Error parsing JSON response",e.message),void o(e)}}o(Error("Invalid response Content-Type: "+t+", from URL: "+e))}else o(Error(s.statusText+" ("+s.status+")"))},s.onerror=function(){n.Log.error("JsonService.getJson: network error"),o(Error("Network Error"))},t&&(n.Log.debug("JsonService.getJson: token passed, setting Authorization header"),s.setRequestHeader("Authorization","Bearer "+t)),s.send()}))},e.prototype.postForm=function(e,t){var r=this;if(!e)throw n.Log.error("JsonService.postForm: No url passed"),new Error("url");return n.Log.debug("JsonService.postForm, url: ",e),new Promise((function(i,o){var s=new r._XMLHttpRequest;s.open("POST",e);var a=r._contentTypes;s.onload=function(){if(n.Log.debug("JsonService.postForm: HTTP response received, status",s.status),200!==s.status){if(400===s.status&&(r=s.getResponseHeader("Content-Type"))&&a.find((function(e){if(r.startsWith(e))return!0})))try{var t=JSON.parse(s.responseText);if(t&&t.error)return n.Log.error("JsonService.postForm: Error from server: ",t.error),void o(new Error(t.error))}catch(e){return n.Log.error("JsonService.postForm: Error parsing JSON response",e.message),void o(e)}o(Error(s.statusText+" ("+s.status+")"))}else{var r;if((r=s.getResponseHeader("Content-Type"))&&a.find((function(e){if(r.startsWith(e))return!0})))try{return void i(JSON.parse(s.responseText))}catch(e){return n.Log.error("JsonService.postForm: Error parsing JSON response",e.message),void o(e)}o(Error("Invalid response Content-Type: "+r+", from URL: "+e))}},s.onerror=function(){n.Log.error("JsonService.postForm: network error"),o(Error("Network Error"))};var u="";for(var c in t){var h=t[c];h&&(u.length>0&&(u+="&"),u+=encodeURIComponent(c),u+="=",u+=encodeURIComponent(h))}s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(u)}))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=t.id,n=t.data,i=t.created,s=t.request_type;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._id=r||(0,o.default)(),this._data=n,this._created="number"==typeof i&&i>0?i:parseInt(Date.now()/1e3),this._request_type=s}return e.prototype.toStorageString=function(){return i.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},e.fromStorageString=function(t){return i.Log.debug("State.fromStorageString"),new e(JSON.parse(t))},e.clearStaleState=function(t,r){var n=Date.now()/1e3-r;return t.getAllKeys().then((function(r){i.Log.debug("State.clearStaleState: got keys",r);for(var o=[],s=function(s){var a=r[s];u=t.get(a).then((function(r){var o=!1;if(r)try{var s=e.fromStorageString(r);i.Log.debug("State.clearStaleState: got item from key: ",a,s.created),s.created<=n&&(o=!0)}catch(e){i.Log.error("State.clearStaleState: Error parsing state for key",a,e.message),o=!0}else i.Log.debug("State.clearStaleState: no item in storage for key: ",a),o=!0;if(o)return i.Log.debug("State.clearStaleState: removed item for key: ",a),t.remove(a)})),o.push(u)},a=0;a0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t instanceof o.OidcClientSettings?this._settings=t:this._settings=new o.OidcClientSettings(t)}return e.prototype.createSigninRequest=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.response_type,n=t.scope,o=t.redirect_uri,s=t.data,u=t.state,c=t.prompt,h=t.display,l=t.max_age,f=t.ui_locales,g=t.id_token_hint,d=t.login_hint,p=t.acr_values,v=t.resource,y=t.request,m=t.request_uri,_=t.response_mode,S=t.extraQueryParams,w=t.extraTokenParams,F=t.request_type,b=t.skipUserInfo,E=arguments[1];i.Log.debug("OidcClient.createSigninRequest");var x=this._settings.client_id;r=r||this._settings.response_type,n=n||this._settings.scope,o=o||this._settings.redirect_uri,c=c||this._settings.prompt,h=h||this._settings.display,l=l||this._settings.max_age,f=f||this._settings.ui_locales,p=p||this._settings.acr_values,v=v||this._settings.resource,_=_||this._settings.response_mode,S=S||this._settings.extraQueryParams,w=w||this._settings.extraTokenParams;var k=this._settings.authority;return a.SigninRequest.isCode(r)&&"code"!==r?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then((function(t){i.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",t);var A=new a.SigninRequest({url:t,client_id:x,redirect_uri:o,response_type:r,scope:n,data:s||u,authority:k,prompt:c,display:h,max_age:l,ui_locales:f,id_token_hint:g,login_hint:d,acr_values:p,resource:v,request:y,request_uri:m,extraQueryParams:S,extraTokenParams:w,request_type:F,response_mode:_,client_secret:e._settings.client_secret,skipUserInfo:b}),P=A.state;return(E=E||e._stateStore).set(P.id,P.toStorageString()).then((function(){return A}))}))},e.prototype.readSigninResponseState=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSigninResponseState");var n="query"===this._settings.response_mode||!this._settings.response_mode&&a.SigninRequest.isCode(this._settings.response_type)?"?":"#",o=new u.SigninResponse(e,n);return o.state?(t=t||this._stateStore,(r?t.remove.bind(t):t.get.bind(t))(o.state).then((function(e){if(!e)throw i.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:l.SigninState.fromStorageString(e),response:o}}))):(i.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response")))},e.prototype.processSigninResponse=function(e,t){var r=this;return i.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(e,t,!0).then((function(e){var t=e.state,n=e.response;return i.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),r._validator.validateSigninResponse(t,n)}))},e.prototype.createSignoutRequest=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.id_token_hint,n=t.data,o=t.state,s=t.post_logout_redirect_uri,a=t.extraQueryParams,u=t.request_type,h=arguments[1];return i.Log.debug("OidcClient.createSignoutRequest"),s=s||this._settings.post_logout_redirect_uri,a=a||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then((function(t){if(!t)throw i.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");i.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",t);var l=new c.SignoutRequest({url:t,id_token_hint:r,post_logout_redirect_uri:s,data:n||o,extraQueryParams:a,request_type:u}),f=l.state;return f&&(i.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(h=h||e._stateStore).set(f.id,f.toStorageString())),l}))},e.prototype.readSignoutResponseState=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSignoutResponseState");var n=new h.SignoutResponse(e);if(!n.state)return i.Log.debug("OidcClient.readSignoutResponseState: No state in response"),n.error?(i.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",n.error),Promise.reject(new s.ErrorResponse(n))):Promise.resolve({undefined:void 0,response:n});var o=n.state;return t=t||this._stateStore,(r?t.remove.bind(t):t.get.bind(t))(o).then((function(e){if(!e)throw i.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:f.State.fromStorageString(e),response:n}}))},e.prototype.processSignoutResponse=function(e,t){var r=this;return i.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(e,t,!0).then((function(e){var t=e.state,n=e.response;return t?(i.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),r._validator.validateSignoutResponse(t,n)):(i.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),n)}))},e.prototype.clearStaleState=function(e){return i.Log.debug("OidcClient.clearStaleState"),e=e||this._stateStore,f.State.clearStaleState(e,this.settings.staleStateAge)},n(e,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenClient=void 0;var n=r(7),i=r(2),o=r(0);t.TokenClient=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw o.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new r,this._metadataService=new s(this._settings)}return e.prototype.exchangeCode=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=Object.assign({},t)).grant_type=t.grant_type||"authorization_code",t.client_id=t.client_id||this._settings.client_id,t.redirect_uri=t.redirect_uri||this._settings.redirect_uri,t.code?t.redirect_uri?t.code_verifier?t.client_id?this._metadataService.getTokenEndpoint(!1).then((function(r){return o.Log.debug("TokenClient.exchangeCode: Received token endpoint"),e._jsonService.postForm(r,t).then((function(e){return o.Log.debug("TokenClient.exchangeCode: response received"),e}))})):(o.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(o.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(o.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(o.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},e.prototype.exchangeRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=Object.assign({},t)).grant_type=t.grant_type||"refresh_token",t.client_id=t.client_id||this._settings.client_id,t.client_secret=t.client_secret||this._settings.client_secret,t.refresh_token?t.client_id?this._metadataService.getTokenEndpoint(!1).then((function(r){return o.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),e._jsonService.postForm(r,t).then((function(e){return o.Log.debug("TokenClient.exchangeRefreshToken: response received"),e}))})):(o.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(o.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var n=r(0);t.ErrorResponse=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.error,o=r.error_description,s=r.error_uri,a=r.state,u=r.session_state;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!i)throw n.Log.error("No error passed to ErrorResponse"),new Error("error");var c=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,o||i));return c.name="ErrorResponse",c.error=i,c.error_description=o,c.error_uri=s,c.state=a,c.session_state=u,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(Error)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninRequest=void 0;var n=r(0),i=r(3),o=r(13);t.SigninRequest=function(){function e(t){var r=t.url,s=t.client_id,a=t.redirect_uri,u=t.response_type,c=t.scope,h=t.authority,l=t.data,f=t.prompt,g=t.display,d=t.max_age,p=t.ui_locales,v=t.id_token_hint,y=t.login_hint,m=t.acr_values,_=t.resource,S=t.response_mode,w=t.request,F=t.request_uri,b=t.extraQueryParams,E=t.request_type,x=t.client_secret,k=t.extraTokenParams,A=t.skipUserInfo;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw n.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!s)throw n.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!a)throw n.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!u)throw n.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!c)throw n.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!h)throw n.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var P=e.isOidc(u),C=e.isCode(u);S||(S=e.isCode(u)?"query":null),this.state=new o.SigninState({nonce:P,data:l,client_id:s,authority:h,redirect_uri:a,code_verifier:C,request_type:E,response_mode:S,client_secret:x,scope:c,extraTokenParams:k,skipUserInfo:A}),r=i.UrlUtility.addQueryParam(r,"client_id",s),r=i.UrlUtility.addQueryParam(r,"redirect_uri",a),r=i.UrlUtility.addQueryParam(r,"response_type",u),r=i.UrlUtility.addQueryParam(r,"scope",c),r=i.UrlUtility.addQueryParam(r,"state",this.state.id),P&&(r=i.UrlUtility.addQueryParam(r,"nonce",this.state.nonce)),C&&(r=i.UrlUtility.addQueryParam(r,"code_challenge",this.state.code_challenge),r=i.UrlUtility.addQueryParam(r,"code_challenge_method","S256"));var T={prompt:f,display:g,max_age:d,ui_locales:p,id_token_hint:v,login_hint:y,acr_values:m,resource:_,request:w,request_uri:F,response_mode:S};for(var R in T)T[R]&&(r=i.UrlUtility.addQueryParam(r,R,T[R]));for(var I in b)r=i.UrlUtility.addQueryParam(r,I,b[I]);this.url=r}return e.isOidc=function(e){return!!e.split(/\s+/g).filter((function(e){return"id_token"===e}))[0]},e.isOAuth=function(e){return!!e.split(/\s+/g).filter((function(e){return"token"===e}))[0]},e.isCode=function(e){return!!e.split(/\s+/g).filter((function(e){return"code"===e}))[0]},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninState=void 0;var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=r.nonce,i=r.authority,o=r.client_id,u=r.redirect_uri,c=r.code_verifier,h=r.response_mode,l=r.client_secret,f=r.scope,g=r.extraTokenParams,d=r.skipUserInfo;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var p=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,arguments[0]));if(!0===n?p._nonce=(0,a.default)():n&&(p._nonce=n),!0===c?p._code_verifier=(0,a.default)()+(0,a.default)()+(0,a.default)():c&&(p._code_verifier=c),p.code_verifier){var v=s.JoseUtil.hashString(p.code_verifier,"SHA256");p._code_challenge=s.JoseUtil.hexToBase64Url(v)}return p._redirect_uri=u,p._authority=i,p._client_id=o,p._response_mode=h,p._client_secret=l,p._scope=f,p._extraTokenParams=g,p._skipUserInfo=d,p}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toStorageString=function(){return i.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},t.fromStorageString=function(e){return i.Log.debug("SigninState.fromStorageString"),new t(JSON.parse(e))},n(t,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),t}(o.State)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,n.default)().replace(/-/g,"")};var n=function(e){return e&&e.__esModule?e:{default:e}}(r(33));e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0;var n=function(){function e(e,t){for(var r=0;r0){var r=parseInt(Date.now()/1e3);this.expires_at=r+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTokenEvents=void 0;var n=r(0),i=r(48);t.AccessTokenEvents=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.accessTokenExpiringNotificationTime,n=void 0===r?60:r,o=t.accessTokenExpiringTimer,s=void 0===o?new i.Timer("Access token expiring"):o,a=t.accessTokenExpiredTimer,u=void 0===a?new i.Timer("Access token expired"):a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._accessTokenExpiringNotificationTime=n,this._accessTokenExpiring=s,this._accessTokenExpired=u}return e.prototype.load=function(e){if(e.access_token&&void 0!==e.expires_in){var t=e.expires_in;if(n.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",t),t>0){var r=t-this._accessTokenExpiringNotificationTime;r<=0&&(r=1),n.Log.debug("AccessTokenEvents.load: registering expiring timer in:",r),this._accessTokenExpiring.init(r)}else n.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var i=t+1;n.Log.debug("AccessTokenEvents.load: registering expired timer in:",i),this._accessTokenExpired.init(i)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.unload=function(){n.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.addAccessTokenExpiring=function(e){this._accessTokenExpiring.addHandler(e)},e.prototype.removeAccessTokenExpiring=function(e){this._accessTokenExpiring.removeHandler(e)},e.prototype.addAccessTokenExpired=function(e){this._accessTokenExpired.addHandler(e)},e.prototype.removeAccessTokenExpired=function(e){this._accessTokenExpired.removeHandler(e)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var n=r(0);t.Event=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._callbacks=[]}return e.prototype.addHandler=function(e){this._callbacks.push(e)},e.prototype.removeHandler=function(e){var t=this._callbacks.findIndex((function(t){return t===e}));t>=0&&this._callbacks.splice(t,1)},e.prototype.raise=function(){n.Log.debug("Event: Raising event: "+this._name);for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:o.CheckSessionIFrame,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.Global.timer;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw i.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=t,this._CheckSessionIFrameCtor=n,this._timer=a,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),this._userManager.getUser().then((function(e){e?r._start(e):r._settings.monitorAnonymousSession&&r._userManager.querySessionStatus().then((function(e){var t={session_state:e.session_state};e.sub&&e.sid&&(t.profile={sub:e.sub,sid:e.sid}),r._start(t)})).catch((function(e){i.Log.error("SessionMonitor ctor: error from querySessionStatus:",e.message)}))})).catch((function(e){i.Log.error("SessionMonitor ctor: error from getUser:",e.message)}))}return e.prototype._start=function(e){var t=this,r=e.session_state;r&&(e.profile?(this._sub=e.profile.sub,this._sid=e.profile.sid,i.Log.debug("SessionMonitor._start: session_state:",r,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,i.Log.debug("SessionMonitor._start: session_state:",r,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(r):this._metadataService.getCheckSessionIframe().then((function(e){if(e){i.Log.debug("SessionMonitor._start: Initializing check session iframe");var n=t._client_id,o=t._checkSessionInterval,s=t._stopCheckSessionOnError;t._checkSessionIFrame=new t._CheckSessionIFrameCtor(t._callback.bind(t),n,e,o,s),t._checkSessionIFrame.load().then((function(){t._checkSessionIFrame.start(r)}))}else i.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")})).catch((function(e){i.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",e.message)})))},e.prototype._stop=function(){var e=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(i.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var t=this._timer.setInterval((function(){e._timer.clearInterval(t),e._userManager.querySessionStatus().then((function(t){var r={session_state:t.session_state};t.sub&&t.sid&&(r.profile={sub:t.sub,sid:t.sid}),e._start(r)})).catch((function(e){i.Log.error("SessionMonitor: error from querySessionStatus:",e.message)}))}),1e3)},e.prototype._callback=function(){var e=this;this._userManager.querySessionStatus().then((function(t){var r=!0;t?t.sub===e._sub?(r=!1,e._checkSessionIFrame.start(t.session_state),t.sid===e._sid?i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",t.session_state):(i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",t.session_state),e._userManager.events._raiseUserSessionChanged())):i.Log.debug("SessionMonitor._callback: Different subject signed into OP:",t.sub):i.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),r&&(e._sub?(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),e._userManager.events._raiseUserSignedOut()):(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),e._userManager.events._raiseUserSignedIn()))})).catch((function(t){e._sub&&(i.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",t.message),e._userManager.events._raiseUserSignedOut())}))},n(e,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckSessionIFrame=void 0;var n=r(0);t.CheckSessionIFrame=function(){function e(t,r,n,i){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._callback=t,this._client_id=r,this._url=n,this._interval=i||2e3,this._stopOnError=o;var s=n.indexOf("/",n.indexOf("//")+2);this._frame_origin=n.substr(0,s),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.style.width=0,this._frame.style.height=0,this._frame.src=n}return e.prototype.load=function(){var e=this;return new Promise((function(t){e._frame.onload=function(){t()},window.document.body.appendChild(e._frame),e._boundMessageEvent=e._message.bind(e),window.addEventListener("message",e._boundMessageEvent,!1)}))},e.prototype._message=function(e){e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&("error"===e.data?(n.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===e.data?(n.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):n.Log.debug("CheckSessionIFrame: "+e.data+" message from check session op iframe"))},e.prototype.start=function(e){var t=this;if(this._session_state!==e){n.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=e;var r=function(){t._frame.contentWindow.postMessage(t._client_id+" "+t._session_state,t._frame_origin)};r(),this._timer=window.setInterval(r,this._interval)}},e.prototype.stop=function(){this._session_state=null,this._timer&&(n.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRevocationClient=void 0;var n=r(0),i=r(2),o=r(1);t.TokenRevocationClient=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.XMLHttpRequest,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw n.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=t,this._XMLHttpRequestCtor=r,this._metadataService=new s(this._settings)}return e.prototype.revoke=function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"access_token";if(!e)throw n.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if("access_token"!==i&&"refresh_token"!=i)throw n.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then((function(o){if(o){n.Log.debug("TokenRevocationClient.revoke: Revoking "+i);var s=r._settings.client_id,a=r._settings.client_secret;return r._revoke(o,s,a,e,i)}if(t)throw n.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")}))},e.prototype._revoke=function(e,t,r,i,o){var s=this;return new Promise((function(a,u){var c=new s._XMLHttpRequestCtor;c.open("POST",e),c.onload=function(){n.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",c.status),200===c.status?a():u(Error(c.statusText+" ("+c.status+")"))},c.onerror=function(){n.Log.debug("TokenRevocationClient.revoke: Network Error."),u("Network Error")};var h="client_id="+encodeURIComponent(t);r&&(h+="&client_secret="+encodeURIComponent(r)),h+="&token_type_hint="+encodeURIComponent(o),h+="&token="+encodeURIComponent(i),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),c.send(h)}))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupWindow=void 0;var n=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.MetadataService,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.UserInfoService,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c.JoseUtil,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.TokenClient;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw i.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=t,this._metadataService=new r(this._settings),this._userInfoService=new n(this._settings),this._joseUtil=u,this._tokenClient=new h(this._settings)}return e.prototype.validateSigninResponse=function(e,t){var r=this;return i.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(e,t).then((function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: state processed"),r._validateTokens(e,t).then((function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),r._processClaims(e,t).then((function(e){return i.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),e}))}))}))},e.prototype.validateSignoutResponse=function(e,t){return e.id!==t.state?(i.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(i.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),t.state=e.data,t.error?(i.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",t.error),Promise.reject(new u.ErrorResponse(t))):Promise.resolve(t))},e.prototype._processSigninParams=function(e,t){if(e.id!==t.state)return i.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!e.client_id)return i.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!e.authority)return i.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==e.authority)return i.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=e.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==e.client_id)return i.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=e.client_id;return i.Log.debug("ResponseValidator._processSigninParams: state validated"),t.state=e.data,t.error?(i.Log.warn("ResponseValidator._processSigninParams: Response was error",t.error),Promise.reject(new u.ErrorResponse(t))):e.nonce&&!t.id_token?(i.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!e.nonce&&t.id_token?(i.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):e.code_verifier&&!t.code?(i.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!e.code_verifier&&t.code?(i.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(t.scope||(t.scope=e.scope),Promise.resolve(t))},e.prototype._processClaims=function(e,t){var r=this;if(t.isOpenIdConnect){if(i.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),t.profile=this._filterProtocolClaims(t.profile),!0!==e.skipUserInfo&&this._settings.loadUserInfo&&t.access_token)return i.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(t.access_token).then((function(e){return i.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),e.sub!==t.profile.sub?(i.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in access_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in access_token"))):(t.profile=r._mergeClaims(t.profile,e),i.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",t.profile),t)}));i.Log.debug("ResponseValidator._processClaims: not loading user info")}else i.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(t)},e.prototype._mergeClaims=function(e,t){var r=Object.assign({},e);for(var i in t){var o=t[i];Array.isArray(o)||(o=[o]);for(var s=0;s1)return i.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));u=a[0]}if(!u)return i.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var c=e.client_id,h=r._settings.clockSkew;return i.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",h),r._joseUtil.validateJwt(t.id_token,u,s,c,h).then((function(){return i.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),n.payload.sub?(t.profile=n.payload,t):(i.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))}))},e.prototype._filterByAlg=function(e,t){var r=null;if(t.startsWith("RS"))r="RSA";else if(t.startsWith("PS"))r="PS";else{if(!t.startsWith("ES"))return i.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",t),[];r="EC"}return i.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",r),e=e.filter((function(e){return e.kty===r})),i.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",r,e.length),e},e.prototype._validateAccessToken=function(e){if(!e.profile)return i.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!e.profile.at_hash)return i.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!e.id_token)return i.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var t=this._joseUtil.parseJwt(e.id_token);if(!t||!t.header)return i.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",t),Promise.reject(new Error("Failed to parse id_token"));var r=t.header.alg;if(!r||5!==r.length)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r),Promise.reject(new Error("Unsupported alg: "+r));var n=r.substr(2,3);if(!n)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,n),Promise.reject(new Error("Unsupported alg: "+r));if(256!==(n=parseInt(n))&&384!==n&&512!==n)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,n),Promise.reject(new Error("Unsupported alg: "+r));var o="sha"+n,s=this._joseUtil.hashString(e.access_token,o);if(!s)return i.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",o),Promise.reject(new Error("Failed to validate at_hash"));var a=s.substr(0,s.length/2),u=this._joseUtil.hexToBase64Url(a);return u!==e.profile.at_hash?(i.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",u,e.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(i.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(e))},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserInfoService=void 0;var n=r(7),i=r(2),o=r(0),s=r(4);t.UserInfoService=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.JoseUtil;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw o.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new r(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new a(this._settings),this._joseUtil=u}return e.prototype.getClaims=function(e){var t=this;return e?this._metadataService.getUserInfoEndpoint().then((function(r){return o.Log.debug("UserInfoService.getClaims: received userinfo url",r),t._jsonService.getJson(r,e).then((function(e){return o.Log.debug("UserInfoService.getClaims: claims received",e),e}))})):(o.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},e.prototype._getClaimsFromJwt=function e(t){var r=this;try{var n=this._joseUtil.parseJwt(t.responseText);if(!n||!n.header||!n.payload)return o.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",n),Promise.reject(new Error("Failed to parse id_token"));var i=n.header.kid,s=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":s=this._metadataService.getIssuer();break;case"ANY":s=Promise.resolve(n.payload.iss);break;default:s=Promise.resolve(this._settings.userInfoJwtIssuer)}return s.then((function(e){return o.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+e),r._metadataService.getSigningKeys().then((function(s){if(!s)return o.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));o.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var a=void 0;if(i)a=s.filter((function(e){return e.kid===i}))[0];else{if((s=r._filterByAlg(s,n.header.alg)).length>1)return o.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));a=s[0]}if(!a)return o.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var u=r._settings.client_id,c=r._settings.clockSkew;return o.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",c),r._joseUtil.validateJwt(t.responseText,a,e,u,c,void 0,!0).then((function(){return o.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),n.payload}))}))}))}catch(e){return o.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",e.message),void reject(e)}},e.prototype._filterByAlg=function(e,t){var r=null;if(t.startsWith("RS"))r="RSA";else if(t.startsWith("PS"))r="PS";else{if(!t.startsWith("ES"))return o.Log.debug("UserInfoService._filterByAlg: alg not supported: ",t),[];r="EC"}return o.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",r),e=e.filter((function(e){return e.kty===r})),o.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",r,e.length),e},e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllowedSigningAlgs=t.b64tohex=t.hextob64u=t.crypto=t.X509=t.KeyUtil=t.jws=void 0;var n=r(26);t.jws=n.jws,t.KeyUtil=n.KEYUTIL,t.X509=n.X509,t.crypto=n.crypto,t.hextob64u=n.hextob64u,t.b64tohex=n.b64tohex,t.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n={userAgent:!1},i={}; +/*! +Copyright (c) 2011, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.9.0 +*/if(void 0===o)var o={};o.lang={extend:function(e,t,r){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),r){var o;for(o in r)e.prototype[o]=r[o];var s=function(){},a=["toString","valueOf"];try{/MSIE/.test(n.userAgent)&&(s=function(e,t){for(o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=s.ceil(t/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new h.init(r,t/2)}},g=l.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new h.init(r,t)}},d=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(g.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return g.parse(unescape(encodeURIComponent(e)))}},p=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,r=t.words,n=t.sigBytes,i=this.blockSize,o=n/(4*i),a=(o=e?s.ceil(o):s.max((0|o)-this._minBufferSize,0))*i,u=s.min(4*a,n);if(a){for(var c=0;c>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;4>s&&i+.75*s>>6*(3-s)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var r=e.length,n=this._map;(i=n.charAt(64))&&-1!=(i=e.indexOf(i))&&(r=i);for(var i=[],o=0,s=0;s>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){for(var t=y,r=(i=t.lib).WordArray,n=i.Hasher,i=t.algo,o=[],s=[],a=function(e){return 4294967296*(e-(0|e))|0},u=2,c=0;64>c;){var h;e:{h=u;for(var l=e.sqrt(h),f=2;f<=l;f++)if(!(h%f)){h=!1;break e}h=!0}h&&(8>c&&(o[c]=a(e.pow(u,.5))),s[c]=a(e.pow(u,1/3)),c++),u++}var g=[];i=i.SHA256=n.extend({_doReset:function(){this._hash=new r.init(o.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],u=r[4],c=r[5],h=r[6],l=r[7],f=0;64>f;f++){if(16>f)g[f]=0|e[t+f];else{var d=g[f-15],p=g[f-2];g[f]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+g[f-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+g[f-16]}d=l+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&h)+s[f]+g[f],p=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&o^i&o),l=h,h=c,c=u,u=a+d|0,a=o,o=i,i=n,n=d+p|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0,r[5]=r[5]+c|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=n._createHelper(i),t.HmacSHA256=n._createHmacHelper(i)}(Math),function(){function e(){return n.create.apply(n,arguments)}for(var t=y,r=t.lib.Hasher,n=(o=t.x64).Word,i=o.WordArray,o=t.algo,s=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],a=[],u=0;80>u;u++)a[u]=e();o=o.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=(l=this._hash.words)[0],n=l[1],i=l[2],o=l[3],u=l[4],c=l[5],h=l[6],l=l[7],f=r.high,g=r.low,d=n.high,p=n.low,v=i.high,y=i.low,m=o.high,_=o.low,S=u.high,w=u.low,F=c.high,b=c.low,E=h.high,x=h.low,k=l.high,A=l.low,P=f,C=g,T=d,R=p,I=v,D=y,U=m,L=_,N=S,O=w,B=F,M=b,j=E,H=x,K=k,V=A,q=0;80>q;q++){var J=a[q];if(16>q)var W=J.high=0|e[t+2*q],z=J.low=0|e[t+2*q+1];else{W=((z=(W=a[q-15]).high)>>>1|(Y=W.low)<<31)^(z>>>8|Y<<24)^z>>>7;var Y=(Y>>>1|z<<31)^(Y>>>8|z<<24)^(Y>>>7|z<<25),G=((z=(G=a[q-2]).high)>>>19|(X=G.low)<<13)^(z<<3|X>>>29)^z>>>6,X=(X>>>19|z<<13)^(X<<3|z>>>29)^(X>>>6|z<<26),$=(z=a[q-7]).high,Q=(Z=a[q-16]).high,Z=Z.low;W=(W=(W=W+$+((z=Y+z.low)>>>0>>0?1:0))+G+((z+=X)>>>0>>0?1:0))+Q+((z+=Z)>>>0>>0?1:0),J.high=W,J.low=z}$=N&B^~N&j,Z=O&M^~O&H,J=P&T^P&I^T&I;var ee=C&R^C&D^R&D,te=(Y=(P>>>28|C<<4)^(P<<30|C>>>2)^(P<<25|C>>>7),G=(C>>>28|P<<4)^(C<<30|P>>>2)^(C<<25|P>>>7),(X=s[q]).high),re=X.low;Q=(Q=(Q=(Q=K+((N>>>14|O<<18)^(N>>>18|O<<14)^(N<<23|O>>>9))+((X=V+((O>>>14|N<<18)^(O>>>18|N<<14)^(O<<23|N>>>9)))>>>0>>0?1:0))+$+((X+=Z)>>>0>>0?1:0))+te+((X+=re)>>>0>>0?1:0))+W+((X+=z)>>>0>>0?1:0),K=j,V=H,j=B,H=M,B=N,M=O,N=U+Q+((O=L+X|0)>>>0>>0?1:0)|0,U=I,L=D,I=T,D=R,T=P,R=C,P=Q+(J=Y+J+((z=G+ee)>>>0>>0?1:0))+((C=X+z|0)>>>0>>0?1:0)|0}g=r.low=g+C,r.high=f+P+(g>>>0>>0?1:0),p=n.low=p+R,n.high=d+T+(p>>>0>>0?1:0),y=i.low=y+D,i.high=v+I+(y>>>0>>0?1:0),_=o.low=_+L,o.high=m+U+(_>>>0>>0?1:0),w=u.low=w+O,u.high=S+N+(w>>>0>>0?1:0),b=c.low=b+M,c.high=F+B+(b>>>0>>0?1:0),x=h.low=x+H,h.high=E+j+(x>>>0>>0?1:0),A=l.low=A+V,l.high=k+K+(A>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),t.SHA512=r._createHelper(o),t.HmacSHA512=r._createHmacHelper(o)}(),function(){var e=y,t=(i=e.x64).Word,r=i.WordArray,n=(i=e.algo).SHA512,i=i.SHA384=n.extend({_doReset:function(){this._hash=new r.init([new t.init(3418070365,3238371032),new t.init(1654270250,914150663),new t.init(2438529370,812702999),new t.init(355462360,4144912697),new t.init(1731405415,4290775857),new t.init(2394180231,1750603025),new t.init(3675008525,1694076839),new t.init(1203062813,3204075428)])},_doFinalize:function(){var e=n._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=n._createHelper(i),e.HmacSHA384=n._createHmacHelper(i)}(); +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */ +var m,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function S(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=_.charAt(r>>6)+_.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=_.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=_.charAt(r>>2)+_.charAt((3&r)<<4));(3&n.length)>0;)n+="=";return n}function w(e){var t,r,n,i="",o=0;for(t=0;t>2),r=3&n,o=1):1==o?(i+=P(r<<2|n>>4),r=15&n,o=2):2==o?(i+=P(r),i+=P(n>>2),r=3&n,o=3):(i+=P(r<<2|n>>4),i+=P(15&n),o=0));return 1==o&&(i+=P(r<<2)),i}function F(e){var t,r=w(e),n=new Array;for(t=0;2*t>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,h=a*u+c*s;i=((u=s*u+((32767&h)<<15)+r[n]+(1073741823&i))>>>30)+(h>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},m=30):"Netscape"!=n.appName?(b.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},m=26):(b.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,h=a*u+c*s;i=((u=s*u+((16383&h)<<14)+r[n]+i)>>28)+(h>>14)+a*c,r[n++]=268435455&u}return i},m=28),b.prototype.DB=m,b.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function I(e){this.m=e}function D(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function M(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function j(){}function H(e){return e}function K(e){this.r2=E(),this.q3=E(),b.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}I.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},I.prototype.revert=function(e){return e},I.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},I.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},I.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},D.prototype.convert=function(e){var t=E();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(b.ZERO)>0&&this.m.subTo(t,t),t},D.prototype.revert=function(e){var t=E();return e.copyTo(t),this.reduce(t),t},D.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},D.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},D.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},b.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},b.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},b.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var s=8==r?255&e[n]:C(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},b.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},b.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},b.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},b.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},b.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,h=o[c-1];if(0!=h){var l=h*(1<1?o[c-2]>>this.F2:0),f=this.FV/l,g=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),b.ONE.dlShiftTo(c,y),y.subTo(o,o);o.t=0;){var m=r[--p]==h?this.DM:Math.floor(r[p]*f+(r[p-1]+d)*g);if((r[p]+=o.am(0,m,r,v,0,c))0&&r.rShiftTo(u,r),s<0&&b.ZERO.subTo(r,r)}}},b.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},b.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},b.prototype.exp=function(e,t){if(e>4294967295||e<1)return b.ONE;var r=E(),n=E(),i=t.convert(this),o=R(e)-1;for(i.copyTo(r);--o>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r);else{var s=r;r=n,n=s}return t.revert(r)},b.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=P(r));s>=0;)a>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=P(r));return i?o:"0"},b.prototype.negate=function(){var e=E();return b.ZERO.subTo(this,e),e},b.prototype.abs=function(){return this.s<0?this.negate():this},b.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},b.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+R(this[this.t-1]^this.s&this.DM)},b.prototype.mod=function(e){var t=E();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(b.ZERO)>0&&e.subTo(t,t),t},b.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new I(t):new D(t),this.exp(e,r)},b.ZERO=T(0),b.ONE=T(1),j.prototype.convert=H,j.prototype.revert=H,j.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},j.prototype.sqrTo=function(e,t){e.squareTo(t)},K.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=E();return e.copyTo(t),this.reduce(t),t},K.prototype.revert=function(e){return e},K.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},K.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},K.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var V,q,J,W=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],z=(1<<26)/W[W.length-1]; +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */function Y(){this.i=0,this.j=0,this.S=new Array} +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */ +function G(){!function(e){q[J++]^=255&e,q[J++]^=e>>8&255,q[J++]^=e>>16&255,q[J++]^=e>>24&255,J>=256&&(J-=256)}((new Date).getTime())}if(b.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},b.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=T(r),i=E(),o=E(),s="";for(this.divRemTo(n,i,o);i.signum()>0;)s=(r+o.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,o);return o.intValue().toString(e)+s},b.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,o=0,s=0,a=0;a=r&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&b.ZERO.subTo(this,this)},b.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(b.ONE.shiftLeft(e-1),L,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(b.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},b.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},b.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},b.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},b.prototype.millerRabin=function(e){var t=this.subtract(b.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var n=t.shiftRight(r);(e=e+1>>1)>W.length&&(e=W.length);for(var i=E(),o=0;o>24},b.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},b.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},b.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this[e]&(1<>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},b.prototype.equals=function(e){return 0==this.compareTo(e)},b.prototype.min=function(e){return this.compareTo(e)<0?this:e},b.prototype.max=function(e){return this.compareTo(e)>0?this:e},b.prototype.and=function(e){var t=E();return this.bitwiseTo(e,U,t),t},b.prototype.or=function(e){var t=E();return this.bitwiseTo(e,L,t),t},b.prototype.xor=function(e){var t=E();return this.bitwiseTo(e,N,t),t},b.prototype.andNot=function(e){var t=E();return this.bitwiseTo(e,O,t),t},b.prototype.not=function(){for(var e=E(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var h=E();for(n.sqrTo(s[1],h);a<=c;)s[a]=E(),n.mulTo(h,s[a-2],s[a]),a+=2}var l,f,g=e.t-1,d=!0,p=E();for(i=R(e[g])-1;g>=0;){for(i>=u?l=e[g]>>i-u&c:(l=(e[g]&(1<0&&(l|=e[g-1]>>this.DB+i-u)),a=r;0==(1&l);)l>>=1,--a;if((i-=a)<0&&(i+=this.DB,--g),d)s[l].copyTo(o),d=!1;else{for(;a>1;)n.sqrTo(o,p),n.sqrTo(p,o),a-=2;a>0?n.sqrTo(o,p):(f=o,o=p,p=f),n.mulTo(p,s[l],o)}for(;g>=0&&0==(e[g]&1<=0?(r.subTo(n,r),t&&i.subTo(s,i),o.subTo(a,o)):(n.subTo(r,n),t&&s.subTo(i,s),a.subTo(o,a))}return 0!=n.compareTo(b.ONE)?b.ZERO:a.compareTo(e)>=0?a.subtract(e):a.signum()<0?(a.addTo(e,a),a.signum()<0?a.add(e):a):a},b.prototype.pow=function(e){return this.exp(e,new j)},b.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},b.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=W[W.length-1]){for(t=0;t>>8,q[J++]=255&X;J=0,G()}function ee(){if(null==V){for(G(),(V=new Y).init(q),J=0;J>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return n}function ie(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null} +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */function oe(e,t){this.x=t,this.q=e}function se(e,t,r,n){this.curve=e,this.x=t,this.y=r,this.z=null==n?b.ONE:n,this.zinv=null}function ae(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new se(this,null,null)}te.prototype.nextBytes=function(e){var t;for(t=0;t0&&t.length>0))throw"Invalid RSA public key";this.n=re(e,16),this.e=parseInt(t,16)}},ie.prototype.encrypt=function(e){var t=function(e,t){if(t=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var o=new te,s=new Array;t>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);r[--t]=s[0]}return r[--t]=2,r[--t]=0,new b(r)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var r=this.doPublic(t);if(null==r)return null;var n=r.toString(16);return 0==(1&n.length)?n:"0"+n},ie.prototype.encryptOAEP=function(e,t,r){var n=function(e,t,r,n){var i=ce.crypto.MessageDigest,o=ce.crypto.Util,s=null;if(r||(r="sha1"),"string"==typeof r&&(s=i.getCanonicalAlgName(r),n=i.getHashLength(s),r=function(e){return be(o.hashHex(Ee(e),s))}),e.length+2*n+2>t)throw"Message too long for RSA";var a,u="";for(a=0;a>3,t,r);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},ie.prototype.type="RSA",oe.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},oe.prototype.toBigInteger=function(){return this.x},oe.prototype.negate=function(){return new oe(this.q,this.x.negate().mod(this.q))},oe.prototype.add=function(e){return new oe(this.q,this.x.add(e.toBigInteger()).mod(this.q))},oe.prototype.subtract=function(e){return new oe(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},oe.prototype.multiply=function(e){return new oe(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},oe.prototype.square=function(){return new oe(this.q,this.x.square().mod(this.q))},oe.prototype.divide=function(e){return new oe(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},se.prototype.getX=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},se.prototype.getY=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},se.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(b.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(b.ZERO))},se.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(b.ZERO)&&!this.y.toBigInteger().equals(b.ZERO)},se.prototype.negate=function(){return new se(this.curve,this.x,this.y.negate(),this.z)},se.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(b.ZERO.equals(r))return b.ZERO.equals(t)?this.twice():this.curve.getInfinity();var n=new b("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),s=(e.x.toBigInteger(),e.y.toBigInteger(),r.square()),a=s.multiply(r),u=i.multiply(s),c=t.square().multiply(this.z),h=c.subtract(u.shiftLeft(1)).multiply(e.z).subtract(a).multiply(r).mod(this.curve.q),l=u.multiply(n).multiply(t).subtract(o.multiply(a)).subtract(c.multiply(t)).multiply(e.z).add(t.multiply(a)).mod(this.curve.q),f=a.multiply(this.z).multiply(e.z).mod(this.curve.q);return new se(this.curve,this.curve.fromBigInteger(h),this.curve.fromBigInteger(l),f)},se.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new b("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),o=this.curve.a.toBigInteger(),s=t.square().multiply(e);b.ZERO.equals(o)||(s=s.add(this.z.square().multiply(o)));var a=(s=s.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),u=s.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q),c=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new se(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(u),c)},se.prototype.multiply=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e,n=r.multiply(new b("3")),i=this.negate(),o=this;for(t=n.bitLength()-2;t>0;--t){o=o.twice();var s=n.testBit(t);s!=r.testBit(t)&&(o=o.add(s?this:i))}return o},se.prototype.multiplyTwo=function(e,t,r){var n;n=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(t);n>=0;)i=i.twice(),e.testBit(n)?i=r.testBit(n)?i.add(o):i.add(this):r.testBit(n)&&(i=i.add(t)),--n;return i},ae.prototype.getQ=function(){return this.q},ae.prototype.getA=function(){return this.a},ae.prototype.getB=function(){return this.b},ae.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},ae.prototype.getInfinity=function(){return this.infinity},ae.prototype.fromBigInteger=function(e){return new oe(this.q,e)},ae.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(e.length-2)/2,r=e.substr(2,t),n=e.substr(t+2,t);return new se(this,this.fromBigInteger(new b(r,16)),this.fromBigInteger(new b(n,16)));default:return null}}, +/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib + */ +oe.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},se.prototype.getEncoded=function(e){var t=function(e,t){var r=e.toByteArrayUnsigned();if(tr.length;)r.unshift(0);return r},r=this.getX().toBigInteger(),n=this.getY().toBigInteger(),i=t(r,32);return e?n.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(t(n,32))),i},se.decodeFrom=function(e,t){t[0];var r=t.length-1,n=t.slice(1,1+r/2),i=t.slice(1+r/2,1+r);n.unshift(0),i.unshift(0);var o=new b(n),s=new b(i);return new se(e,e.fromBigInteger(o),e.fromBigInteger(s))},se.decodeFromHex=function(e,t){t.substr(0,2);var r=t.length-2,n=t.substr(2,r/2),i=t.substr(2+r/2,r/2),o=new b(n,16),s=new b(i,16);return new se(e,e.fromBigInteger(o),e.fromBigInteger(s))},se.prototype.add2D=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.x.equals(e.x))return this.y.equals(e.y)?this.twice():this.curve.getInfinity();var t=e.x.subtract(this.x),r=e.y.subtract(this.y).divide(t),n=r.square().subtract(this.x).subtract(e.x),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new se(this.curve,n,i)},se.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=this.curve.fromBigInteger(b.valueOf(2)),t=this.curve.fromBigInteger(b.valueOf(3)),r=this.x.square().multiply(t).add(this.curve.a).divide(this.y.multiply(e)),n=r.square().subtract(this.x.multiply(e)),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new se(this.curve,n,i)},se.prototype.multiply2D=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e,n=r.multiply(new b("3")),i=this.negate(),o=this;for(t=n.bitLength()-2;t>0;--t){o=o.twice();var s=n.testBit(t);s!=r.testBit(t)&&(o=o.add2D(s?this:i))}return o},se.prototype.isOnCurve=function(){var e=this.getX().toBigInteger(),t=this.getY().toBigInteger(),r=this.curve.getA().toBigInteger(),n=this.curve.getB().toBigInteger(),i=this.curve.getQ(),o=t.multiply(t).mod(i),s=e.multiply(e).multiply(e).add(r.multiply(e)).add(n).mod(i);return o.equals(s)},se.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},se.prototype.validate=function(){var e=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var t=this.getX().toBigInteger(),r=this.getY().toBigInteger();if(t.compareTo(b.ONE)<0||t.compareTo(e.subtract(b.ONE))>0)throw new Error("x coordinate out of bounds");if(r.compareTo(b.ONE)<0||r.compareTo(e.subtract(b.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(e).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0}; +/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval + */ +var ue=function(){var e=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),t=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),n={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function i(e,t,r){return t?n[t]:String.fromCharCode(parseInt(r,16))}var o=new String(""),s=Object.hasOwnProperty;return function(n,a){var u,c,h=n.match(e),l=h[0],f=!1;"{"===l?u={}:"["===l?u=[]:(u=[],f=!0);for(var g=[u],d=1-f,p=h.length;d=0;)delete i[o[h]]}return a.call(t,n,i)}({"":u},"")),u}}();void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.asn1&&ce.asn1||(ce.asn1={}),ce.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+r).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},ce.asn1.DERAbstractString=function(e){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=we(this.s).toLowerCase()},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},o.lang.extend(ce.asn1.DERAbstractString,ce.asn1.ASN1Object),ce.asn1.DERAbstractTime=function(e){ce.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var s=o+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var a=i.getMilliseconds();if(0!=a){var u=n(String(a),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=ve(e)},this.setByDateValue=function(e,t,r,n,i,o){var s=new Date(Date.UTC(e,t-1,r,n,i,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},o.lang.extend(ce.asn1.DERAbstractTime,ce.asn1.ASN1Object),ce.asn1.DERAbstractStructured=function(e){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},o.lang.extend(ce.asn1.DERAbstractStructured,ce.asn1.ASN1Object),ce.asn1.DERBoolean=function(){ce.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},o.lang.extend(ce.asn1.DERBoolean,ce.asn1.ASN1Object),ce.asn1.DERInteger=function(e){ce.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new b(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},o.lang.extend(ce.asn1.DERInteger,ce.asn1.ASN1Object),ce.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=ce.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}ce.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7i.length&&(i=n[r]);return(e=e.replace(i,"::")).slice(1,-1)}function Ne(e){var t="malformed hex value";if(!e.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw t;if(8!=e.length)return 32==e.length?Le(e):e;try{return parseInt(e.substr(0,2),16)+"."+parseInt(e.substr(2,2),16)+"."+parseInt(e.substr(4,2),16)+"."+parseInt(e.substr(6,2),16)}catch(e){throw t}}function Oe(e){for(var t=encodeURIComponent(e),r="",n=0;n"7"?"00"+e:e}fe.getLblen=function(e,t){if("8"!=e.substr(t+2,1))return 1;var r=parseInt(e.substr(t+3,1));return 0==r?-1:0=2*o)break;if(a>=200)break;n.push(u),s=u,a++}return n},fe.getNthChildIdx=function(e,t,r){return fe.getChildIdx(e,t)[r]},fe.getIdxbyList=function(e,t,r,n){var i,o,s=fe;if(0==r.length){if(void 0!==n&&e.substr(t,2)!==n)throw"checking tag doesn't match: "+e.substr(t,2)+"!="+n;return t}return i=r.shift(),o=s.getChildIdx(e,t),s.getIdxbyList(e,o[i],r,n)},fe.getTLVbyList=function(e,t,r,n){var i=fe,o=i.getIdxbyList(e,t,r);if(void 0===o)throw"can't find nthList object";if(void 0!==n&&e.substr(o,2)!=n)throw"checking tag doesn't match: "+e.substr(o,2)+"!="+n;return i.getTLV(e,o)},fe.getVbyList=function(e,t,r,n,i){var o,s,a=fe;if(void 0===(o=a.getIdxbyList(e,t,r,n)))throw"can't find nthList object";return s=a.getV(e,o),!0===i&&(s=s.substr(2)),s},fe.hextooidstr=function(e){var t=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},r=[],n=e.substr(0,2),i=parseInt(n,16);r[0]=new String(Math.floor(i/40)),r[1]=new String(i%40);for(var o=e.substr(2),s=[],a=0;a0&&(h=h+"."+u.join(".")),h},fe.dump=function(e,t,r,n){var i=fe,o=i.getV,s=i.dump,a=i.getChildIdx,u=e;e instanceof ce.asn1.ASN1Object&&(u=e.getEncodedHex());var c=function(e,t){return e.length<=2*t?e:e.substr(0,t)+"..(total "+e.length/2+"bytes).."+e.substr(e.length-t,t)};void 0===t&&(t={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var h=t.ommit_long_octet;if("01"==u.substr(r,2))return"00"==(l=o(u,r))?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n";if("02"==u.substr(r,2))return n+"INTEGER "+c(l=o(u,r),h)+"\n";if("03"==u.substr(r,2))return n+"BITSTRING "+c(l=o(u,r),h)+"\n";if("04"==u.substr(r,2)){var l=o(u,r);return i.isASN1HEX(l)?(F=n+"OCTETSTRING, encapsulates\n")+s(l,t,0,n+" "):n+"OCTETSTRING "+c(l,h)+"\n"}if("05"==u.substr(r,2))return n+"NULL\n";if("06"==u.substr(r,2)){var f=o(u,r),g=ce.asn1.ASN1Util.oidHexToInt(f),d=ce.asn1.x509.OID.oid2name(g),p=g.replace(/\./g," ");return""!=d?n+"ObjectIdentifier "+d+" ("+p+")\n":n+"ObjectIdentifier ("+p+")\n"}if("0c"==u.substr(r,2))return n+"UTF8String '"+Fe(o(u,r))+"'\n";if("13"==u.substr(r,2))return n+"PrintableString '"+Fe(o(u,r))+"'\n";if("14"==u.substr(r,2))return n+"TeletexString '"+Fe(o(u,r))+"'\n";if("16"==u.substr(r,2))return n+"IA5String '"+Fe(o(u,r))+"'\n";if("17"==u.substr(r,2))return n+"UTCTime "+Fe(o(u,r))+"\n";if("18"==u.substr(r,2))return n+"GeneralizedTime "+Fe(o(u,r))+"\n";if("30"==u.substr(r,2)){if("3000"==u.substr(r,4))return n+"SEQUENCE {}\n";F=n+"SEQUENCE\n";var v=t;if((2==(_=a(u,r)).length||3==_.length)&&"06"==u.substr(_[0],2)&&"04"==u.substr(_[_.length-1],2)){d=i.oidname(o(u,_[0]));var y=JSON.parse(JSON.stringify(t));y.x509ExtName=d,v=y}for(var m=0;m<_.length;m++)F+=s(u,v,_[m],n+" ");return F}if("31"==u.substr(r,2)){F=n+"SET\n";var _=a(u,r);for(m=0;m<_.length;m++)F+=s(u,t,_[m],n+" ");return F}var S=parseInt(u.substr(r,2),16);if(0!=(128&S)){var w=31&S;if(0!=(32&S)){var F=n+"["+w+"]\n";for(_=a(u,r),m=0;m<_.length;m++)F+=s(u,t,_[m],n+" ");return F}return"68747470"==(l=o(u,r)).substr(0,8)&&(l=Fe(l)),"subjectAltName"===t.x509ExtName&&2==w&&(l=Fe(l)),n+"["+w+"] "+l+"\n"}return n+"UNKNOWN("+u.substr(r,2)+") "+o(u,r)+"\n"},fe.isASN1HEX=function(e){var t=fe;if(e.length%2==1)return!1;var r=t.getVblen(e,0),n=e.substr(0,2),i=t.getL(e,0);return e.length-n.length-i.length==2*r},fe.oidname=function(e){var t=ce.asn1;ce.lang.String.isHex(e)&&(e=t.ASN1Util.oidHexToInt(e));var r=t.x509.OID.oid2name(e);return""===r&&(r=e),r},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.lang&&ce.lang||(ce.lang={}),ce.lang.String=function(){},"function"==typeof e?(t.utf8tob64u=he=function(t){return ye(new e(t,"utf8").toString("base64"))},t.b64utoutf8=le=function(t){return new e(me(t),"base64").toString("utf8")}):(t.utf8tob64u=he=function(e){return _e(Ie(Oe(e)))},t.b64utoutf8=le=function(e){return decodeURIComponent(De(Se(e)))}),ce.lang.String.isInteger=function(e){return!!e.match(/^[0-9]+$/)||!!e.match(/^-[0-9]+$/)},ce.lang.String.isHex=function(e){return!(e.length%2!=0||!e.match(/^[0-9a-f]+$/)&&!e.match(/^[0-9A-F]+$/))},ce.lang.String.isBase64=function(e){return!(!(e=e.replace(/\s+/g,"")).match(/^[0-9A-Za-z+\/]+={0,3}$/)||e.length%4!=0)},ce.lang.String.isBase64URL=function(e){return!e.match(/[+/=]/)&&(e=me(e),ce.lang.String.isBase64(e))},ce.lang.String.isIntegerArray=function(e){return!!(e=e.replace(/\s+/g,"")).match(/^\[[0-9,]+\]$/)},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:y.algo.MD5,sha1:y.algo.SHA1,sha224:y.algo.SHA224,sha256:y.algo.SHA256,sha384:y.algo.SHA384,sha512:y.algo.SHA512,ripemd160:y.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(void 0===this.DIGESTINFOHEAD[t])throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,r){var n=this.getDigestInfoHex(e,t),i=r/4;if(n.length+22>i)throw"key is too short for SigAlg: keylen="+r+","+t;for(var o="0001",s="00"+n,a="",u=i-o.length-s.length,c=0;c=0)return!1;if(r.compareTo(b.ONE)<0||r.compareTo(i)>=0)return!1;var s=r.modInverse(i),a=e.multiply(s).mod(i),u=t.multiply(s).mod(i);return o.multiply(a).add(n.multiply(u)).getX().toBigInteger().mod(i).equals(t)},this.serializeSig=function(e,t){var r=e.toByteArraySigned(),n=t.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(e){var t;if(48!=e[0])throw new Error("Signature not a valid DERSequence");if(2!=e[t=2])throw new Error("First element in signature must be a DERInteger");var r=e.slice(t+2,t+2+e[t+1]);if(2!=e[t+=2+e[t+1]])throw new Error("Second element in signature must be a DERInteger");var n=e.slice(t+2,t+2+e[t+1]);return t+=2+e[t+1],{r:b.fromByteArrayUnsigned(r),s:b.fromByteArrayUnsigned(n)}},this.parseSigCompact=function(e){if(65!==e.length)throw"Signature has the wrong length";var t=e[0]-27;if(t<0||t>7)throw"Invalid signature type";var r=this.ecparams.n;return{r:b.fromByteArrayUnsigned(e.slice(1,33)).mod(r),s:b.fromByteArrayUnsigned(e.slice(33,65)).mod(r),i:t}},this.readPKCS5PrvKeyHex=function(e){var t,r,n,i=fe,o=ce.crypto.ECDSA.getName,s=i.getVbyList;if(!1===i.isASN1HEX(e))throw"not ASN.1 hex string";try{t=s(e,0,[2,0],"06"),r=s(e,0,[1],"04");try{n=s(e,0,[3,0],"03").substr(2)}catch(e){}}catch(e){throw"malformed PKCS#1/5 plain ECC private key"}if(this.curveName=o(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(e){var t,r,n,i=fe,o=ce.crypto.ECDSA.getName,s=i.getVbyList;if(!1===i.isASN1HEX(e))throw"not ASN.1 hex string";try{s(e,0,[1,0],"06"),t=s(e,0,[1,1],"06"),r=s(e,0,[2,0,1],"04");try{n=s(e,0,[2,0,2,0],"03").substr(2)}catch(e){}}catch(e){throw"malformed PKCS#8 plain ECC private key"}if(this.curveName=o(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PubKeyHex=function(e){var t,r,n=fe,i=ce.crypto.ECDSA.getName,o=n.getVbyList;if(!1===n.isASN1HEX(e))throw"not ASN.1 hex string";try{o(e,0,[0,0],"06"),t=o(e,0,[0,1],"06"),r=o(e,0,[1],"03").substr(2)}catch(e){throw"malformed PKCS#8 ECC public key"}if(this.curveName=i(t),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r)},this.readCertPubKeyHex=function(e,t){5!==t&&(t=6);var r,n,i=fe,o=ce.crypto.ECDSA.getName,s=i.getVbyList;if(!1===i.isASN1HEX(e))throw"not ASN.1 hex string";try{r=s(e,0,[0,t,0,1],"06"),n=s(e,0,[0,t,1],"03").substr(2)}catch(e){throw"malformed X.509 certificate ECC public key"}if(this.curveName=o(r),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},void 0!==e&&void 0!==e.curve&&(this.curveName=e.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==e&&(void 0!==e.prv&&this.setPrivateKeyHex(e.prv),void 0!==e.pub&&this.setPublicKeyHex(e.pub))},ce.crypto.ECDSA.parseSigHex=function(e){var t=ce.crypto.ECDSA.parseSigHexInHexRS(e);return{r:new b(t.r,16),s:new b(t.s,16)}},ce.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=fe,r=t.getChildIdx,n=t.getV;if("30"!=e.substr(0,2))throw"signature is not a ASN.1 sequence";var i=r(e,0);if(2!=i.length)throw"number of signature ASN.1 sequence elements seem wrong";var o=i[0],s=i[1];if("02"!=e.substr(o,2))throw"1st item of sequene of signature is not ASN.1 integer";if("02"!=e.substr(s,2))throw"2nd item of sequene of signature is not ASN.1 integer";return{r:n(e,o),s:n(e,s)}},ce.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=ce.crypto.ECDSA.parseSigHexInHexRS(e),r=t.r,n=t.s;if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw"unknown ECDSA sig r length error";if(n.length%32!=0)throw"unknown ECDSA sig s length error";return r+n},ce.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig length error";var t=e.substr(0,e.length/2),r=e.substr(e.length/2);return ce.crypto.ECDSA.hexRSSigToASN1Sig(t,r)},ce.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var r=new b(e,16),n=new b(t,16);return ce.crypto.ECDSA.biRSSigToASN1Sig(r,n)},ce.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var r=ce.asn1,n=new r.DERInteger({bigint:e}),i=new r.DERInteger({bigint:t});return new r.DERSequence({array:[n,i]}).getEncodedHex()},ce.crypto.ECDSA.getName=function(e){return"2a8648ce3d030107"===e?"secp256r1":"2b8104000a"===e?"secp256k1":"2b81040022"===e?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)?"secp256r1":-1!=="|secp256k1|".indexOf(e)?"secp256k1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(e)?"secp384r1":null},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.ECParameterDB=new function(){var e={},t={};function r(e){return new b(e,16)}this.getByName=function(r){var n=r;if(void 0!==t[n]&&(n=t[r]),void 0!==e[n])return e[n];throw"unregistered EC curve name: "+n},this.regist=function(n,i,o,s,a,u,c,h,l,f,g,d){e[n]={};var p=r(o),v=r(s),y=r(a),m=r(u),_=r(c),S=new ae(p,v,y),w=S.decodePointHex("04"+h+l);e[n].name=n,e[n].keylen=i,e[n].curve=S,e[n].G=w,e[n].n=m,e[n].h=_,e[n].oid=g,e[n].info=d;for(var F=0;F=2*a)break}var l={};return l.keyhex=u.substr(0,2*i[e].keylen),l.ivhex=u.substr(2*i[e].keylen,2*i[e].ivlen),l},a=function(e,t,r,n){var o=y.enc.Base64.parse(e),s=y.enc.Hex.stringify(o);return(0,i[t].proc)(s,r,n)};return{version:"1.0.0",parsePKCS5PEM:function(e){return o(e)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(e,t,r){return s(e,t,r)},decryptKeyB64:function(e,t,r,n){return a(e,t,r,n)},getDecryptedKeyHex:function(e,t){var r=o(e),n=(r.type,r.cipher),i=r.ivsalt,u=r.data,c=s(n,t,i).keyhex;return a(u,n,c,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(e,t,r,n,o){var a="";if(void 0!==n&&null!=n||(n="AES-256-CBC"),void 0===i[n])throw"KEYUTIL unsupported algorithm: "+n;return void 0!==o&&null!=o||(o=function(e){var t=y.lib.WordArray.random(e);return y.enc.Hex.stringify(t)}(i[n].ivlen).toUpperCase()),a="-----BEGIN "+e+" PRIVATE KEY-----\r\n",a+="Proc-Type: 4,ENCRYPTED\r\n",a+="DEK-Info: "+n+","+o+"\r\n",a+="\r\n",(a+=function(e,t,r,n){return(0,i[t].eproc)(e,r,n)}(t,n,s(n,r,o).keyhex,o).replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+e+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var t=fe,r=t.getChildIdx,n=t.getV,i={},o=r(e,0);if(2!=o.length)throw"malformed format: SEQUENCE(0).items != 2: "+o.length;i.ciphertext=n(e,o[1]);var s=r(e,o[0]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+s.length;if("2a864886f70d01050d"!=n(e,s[0]))throw"this only supports pkcs5PBES2";var a=r(e,s[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+a.length;var u=r(e,a[1]);if(2!=u.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+u.length;if("2a864886f70d0307"!=n(e,u[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=n(e,u[1]);var c=r(e,a[0]);if(2!=c.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+c.length;if("2a864886f70d01050c"!=n(e,c[0]))throw"this only supports pkcs5PBKDF2";var h=r(e,c[1]);if(h.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+h.length;i.pbkdf2Salt=n(e,h[0]);var l=n(e,h[1]);try{i.pbkdf2Iter=parseInt(l,16)}catch(e){throw"malformed format pbkdf2Iter: "+l}return i},getPBKDF2KeyHexFromParam:function(e,t){var r=y.enc.Hex.parse(e.pbkdf2Salt),n=e.pbkdf2Iter,i=y.PBKDF2(t,r,{keySize:6,iterations:n});return y.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(e,t){var r=Ce(e,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=Me.getPBKDF2KeyHexFromParam(n,t),o={};o.ciphertext=y.enc.Hex.parse(n.ciphertext);var s=y.enc.Hex.parse(i),a=y.enc.Hex.parse(n.encryptionSchemeIV),u=y.TripleDES.decrypt(o,s,{iv:a});return y.enc.Hex.stringify(u)},getKeyFromEncryptedPKCS8PEM:function(e,t){var r=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(e,t);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(e){var t=fe,r=t.getChildIdx,n=t.getV,i={algparam:null};if("30"!=e.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var o=r(e,0);if(3!=o.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=e.substr(o[1],2))throw"malformed PKCS8 private key(code:003)";var s=r(e,o[1]);if(2!=s.length)throw"malformed PKCS8 private key(code:004)";if("06"!=e.substr(s[0],2))throw"malformed PKCS8 private key(code:005)";if(i.algoid=n(e,s[0]),"06"==e.substr(s[1],2)&&(i.algparam=n(e,s[1])),"04"!=e.substr(o[2],2))throw"malformed PKCS8 private key(code:006)";return i.keyidx=t.getVidx(e,o[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(e){var t=Ce(e,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(t)},getKeyFromPlainPrivatePKCS8Hex:function(e){var t,r=this.parsePlainPrivatePKCS8Hex(e);if("2a864886f70d010101"==r.algoid)t=new ie;else if("2a8648ce380401"==r.algoid)t=new ce.crypto.DSA;else{if("2a8648ce3d0201"!=r.algoid)throw"unsupported private key algorithm";t=new ce.crypto.ECDSA}return t.readPKCS8PrvKeyHex(e),t},_getKeyFromPublicPKCS8Hex:function(e){var t,r=fe.getVbyList(e,0,[0,0],"06");if("2a864886f70d010101"===r)t=new ie;else if("2a8648ce380401"===r)t=new ce.crypto.DSA;else{if("2a8648ce3d0201"!==r)throw"unsupported PKCS#8 public key hex";t=new ce.crypto.ECDSA}return t.readPKCS8PubKeyHex(e),t},parsePublicRawRSAKeyHex:function(e){var t=fe,r=t.getChildIdx,n=t.getV,i={};if("30"!=e.substr(0,2))throw"malformed RSA key(code:001)";var o=r(e,0);if(2!=o.length)throw"malformed RSA key(code:002)";if("02"!=e.substr(o[0],2))throw"malformed RSA key(code:003)";if(i.n=n(e,o[0]),"02"!=e.substr(o[1],2))throw"malformed RSA key(code:004)";return i.e=n(e,o[1]),i},parsePublicPKCS8Hex:function(e){var t=fe,r=t.getChildIdx,n=t.getV,i={algparam:null},o=r(e,0);if(2!=o.length)throw"outer DERSequence shall have 2 elements: "+o.length;var s=o[0];if("30"!=e.substr(s,2))throw"malformed PKCS8 public key(code:001)";var a=r(e,s);if(2!=a.length)throw"malformed PKCS8 public key(code:002)";if("06"!=e.substr(a[0],2))throw"malformed PKCS8 public key(code:003)";if(i.algoid=n(e,a[0]),"06"==e.substr(a[1],2)?i.algparam=n(e,a[1]):"30"==e.substr(a[1],2)&&(i.algparam={},i.algparam.p=t.getVbyList(e,a[1],[0],"02"),i.algparam.q=t.getVbyList(e,a[1],[1],"02"),i.algparam.g=t.getVbyList(e,a[1],[2],"02")),"03"!=e.substr(o[1],2))throw"malformed PKCS8 public key(code:004)";return i.key=n(e,o[1]).substr(2),i}}}();Me.getKey=function(e,t,r){var n,i=(y=fe).getChildIdx,o=(y.getV,y.getVbyList),s=ce.crypto,a=s.ECDSA,u=s.DSA,c=ie,h=Ce,l=Me;if(void 0!==c&&e instanceof c)return e;if(void 0!==a&&e instanceof a)return e;if(void 0!==u&&e instanceof u)return e;if(void 0!==e.curve&&void 0!==e.xy&&void 0===e.d)return new a({pub:e.xy,curve:e.curve});if(void 0!==e.curve&&void 0!==e.d)return new a({prv:e.d,curve:e.curve});if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(C=new c).setPublic(e.n,e.e),C;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.co&&void 0===e.qi)return(C=new c).setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dp,e.dq,e.co),C;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0===e.p)return(C=new c).setPrivate(e.n,e.e,e.d),C;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0===e.x)return(C=new u).setPublic(e.p,e.q,e.g,e.y),C;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0!==e.x)return(C=new u).setPrivate(e.p,e.q,e.g,e.y,e.x),C;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(C=new c).setPublic(Se(e.n),Se(e.e)),C;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.qi)return(C=new c).setPrivateEx(Se(e.n),Se(e.e),Se(e.d),Se(e.p),Se(e.q),Se(e.dp),Se(e.dq),Se(e.qi)),C;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d)return(C=new c).setPrivate(Se(e.n),Se(e.e),Se(e.d)),C;if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0===e.d){var f=(P=new a({curve:e.crv})).ecparams.keylen/4,g="04"+("0000000000"+Se(e.x)).slice(-f)+("0000000000"+Se(e.y)).slice(-f);return P.setPublicKeyHex(g),P}if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0!==e.d){f=(P=new a({curve:e.crv})).ecparams.keylen/4,g="04"+("0000000000"+Se(e.x)).slice(-f)+("0000000000"+Se(e.y)).slice(-f);var d=("0000000000"+Se(e.d)).slice(-f);return P.setPublicKeyHex(g),P.setPrivateKeyHex(d),P}if("pkcs5prv"===r){var p,v=e,y=fe;if(9===(p=i(v,0)).length)(C=new c).readPKCS5PrvKeyHex(v);else if(6===p.length)(C=new u).readPKCS5PrvKeyHex(v);else{if(!(p.length>2&&"04"===v.substr(p[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";(C=new a).readPKCS5PrvKeyHex(v)}return C}if("pkcs8prv"===r)return l.getKeyFromPlainPrivatePKCS8Hex(e);if("pkcs8pub"===r)return l._getKeyFromPublicPKCS8Hex(e);if("x509pub"===r)return qe.getPublicKeyFromCertHex(e);if(-1!=e.indexOf("-END CERTIFICATE-",0)||-1!=e.indexOf("-END X509 CERTIFICATE-",0)||-1!=e.indexOf("-END TRUSTED CERTIFICATE-",0))return qe.getPublicKeyFromCertPEM(e);if(-1!=e.indexOf("-END PUBLIC KEY-")){var m=Ce(e,"PUBLIC KEY");return l._getKeyFromPublicPKCS8Hex(m)}if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var _=h(e,"RSA PRIVATE KEY");return l.getKey(_,null,"pkcs5prv")}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var S=o(n=h(e,"DSA PRIVATE KEY"),0,[1],"02"),w=o(n,0,[2],"02"),F=o(n,0,[3],"02"),E=o(n,0,[4],"02"),x=o(n,0,[5],"02");return(C=new u).setPrivate(new b(S,16),new b(w,16),new b(F,16),new b(E,16),new b(x,16)),C}if(-1!=e.indexOf("-END PRIVATE KEY-"))return l.getKeyFromPlainPrivatePKCS8PEM(e);if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var k=l.getDecryptedKeyHex(e,t),A=new ie;return A.readPKCS5PrvKeyHex(k),A}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var P,C=o(n=l.getDecryptedKeyHex(e,t),0,[1],"04"),T=o(n,0,[2,0],"06"),R=o(n,0,[3,0],"03").substr(2);if(void 0===ce.crypto.OID.oidhex2name[T])throw"undefined OID(hex) in KJUR.crypto.OID: "+T;return(P=new a({curve:ce.crypto.OID.oidhex2name[T]})).setPublicKeyHex(R),P.setPrivateKeyHex(C),P.isPublic=!1,P}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED"))return S=o(n=l.getDecryptedKeyHex(e,t),0,[1],"02"),w=o(n,0,[2],"02"),F=o(n,0,[3],"02"),E=o(n,0,[4],"02"),x=o(n,0,[5],"02"),(C=new u).setPrivate(new b(S,16),new b(w,16),new b(F,16),new b(E,16),new b(x,16)),C;if(-1!=e.indexOf("-END ENCRYPTED PRIVATE KEY-"))return l.getKeyFromEncryptedPKCS8PEM(e,t);throw"not supported argument"},Me.generateKeypair=function(e,t){if("RSA"==e){var r=t;(s=new ie).generate(r,"10001"),s.isPrivate=!0,s.isPublic=!0;var n=new ie,i=s.n.toString(16),o=s.e.toString(16);return n.setPublic(i,o),n.isPrivate=!1,n.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=n,a}if("EC"==e){var s,a,u=t,c=new ce.crypto.ECDSA({curve:u}).generateKeyPairHex();return(s=new ce.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),s.setPrivateKeyHex(c.ecprvhex),s.isPrivate=!0,s.isPublic=!1,(n=new ce.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),n.isPrivate=!1,n.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=n,a}throw"unknown algorithm: "+e},Me.getPEM=function(e,t,r,n,i,o){var s=ce,a=s.asn1,u=a.DERObjectIdentifier,c=a.DERInteger,h=a.ASN1Util.newObject,l=a.x509.SubjectPublicKeyInfo,f=s.crypto,g=f.DSA,d=f.ECDSA,p=ie;function v(e){return h({seq:[{int:0},{int:{bigint:e.n}},{int:e.e},{int:{bigint:e.d}},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.dmp1}},{int:{bigint:e.dmq1}},{int:{bigint:e.coeff}}]})}function m(e){return h({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a0",!0,{oid:{name:e.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]})}function _(e){return h({seq:[{int:0},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}},{int:{bigint:e.y}},{int:{bigint:e.x}}]})}if((void 0!==p&&e instanceof p||void 0!==g&&e instanceof g||void 0!==d&&e instanceof d)&&1==e.isPublic&&(void 0===t||"PKCS8PUB"==t))return Pe(b=new l(e).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==t&&void 0!==p&&e instanceof p&&(void 0===r||null==r)&&1==e.isPrivate)return Pe(b=v(e).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==t&&void 0!==d&&e instanceof d&&(void 0===r||null==r)&&1==e.isPrivate){var S=new u({name:e.curveName}).getEncodedHex(),w=m(e).getEncodedHex(),F="";return(F+=Pe(S,"EC PARAMETERS"))+Pe(w,"EC PRIVATE KEY")}if("PKCS1PRV"==t&&void 0!==g&&e instanceof g&&(void 0===r||null==r)&&1==e.isPrivate)return Pe(b=_(e).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==t&&void 0!==p&&e instanceof p&&void 0!==r&&null!=r&&1==e.isPrivate){var b=v(e).getEncodedHex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",b,r,n,o)}if("PKCS5PRV"==t&&void 0!==d&&e instanceof d&&void 0!==r&&null!=r&&1==e.isPrivate)return b=m(e).getEncodedHex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",b,r,n,o);if("PKCS5PRV"==t&&void 0!==g&&e instanceof g&&void 0!==r&&null!=r&&1==e.isPrivate)return b=_(e).getEncodedHex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",b,r,n,o);var E=function(e,t){var r=x(e,t);return new h({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:r.pbkdf2Salt}},{int:r.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:r.encryptionSchemeIV}}]}]}]},{octstr:{hex:r.ciphertext}}]}).getEncodedHex()},x=function(e,t){var r=y.lib.WordArray.random(8),n=y.lib.WordArray.random(8),i=y.PBKDF2(t,r,{keySize:6,iterations:100}),o=y.enc.Hex.parse(e),s=y.TripleDES.encrypt(o,i,{iv:n})+"",a={};return a.ciphertext=s,a.pbkdf2Salt=y.enc.Hex.stringify(r),a.pbkdf2Iter=100,a.encryptionSchemeAlg="DES-EDE3-CBC",a.encryptionSchemeIV=y.enc.Hex.stringify(n),a};if("PKCS8PRV"==t&&null!=p&&e instanceof p&&1==e.isPrivate){var k=v(e).getEncodedHex();return b=h({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Pe(b,"PRIVATE KEY"):Pe(w=E(b,r),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==d&&e instanceof d&&1==e.isPrivate)return k=new h({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]}).getEncodedHex(),b=h({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Pe(b,"PRIVATE KEY"):Pe(w=E(b,r),"ENCRYPTED PRIVATE KEY");if("PKCS8PRV"==t&&void 0!==g&&e instanceof g&&1==e.isPrivate)return k=new c({bigint:e.x}).getEncodedHex(),b=h({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Pe(b,"PRIVATE KEY"):Pe(w=E(b,r),"ENCRYPTED PRIVATE KEY");throw"unsupported object nor format"},Me.getKeyFromCSRPEM=function(e){var t=Ce(e,"CERTIFICATE REQUEST");return Me.getKeyFromCSRHex(t)},Me.getKeyFromCSRHex=function(e){var t=Me.parseCSRHex(e);return Me.getKey(t.p8pubkeyhex,null,"pkcs8pub")},Me.parseCSRHex=function(e){var t=fe,r=t.getChildIdx,n=t.getTLV,i={},o=e;if("30"!=o.substr(0,2))throw"malformed CSR(code:001)";var s=r(o,0);if(s.length<1)throw"malformed CSR(code:002)";if("30"!=o.substr(s[0],2))throw"malformed CSR(code:003)";var a=r(o,s[0]);if(a.length<3)throw"malformed CSR(code:004)";return i.p8pubkeyhex=n(o,a[2]),i},Me.getJWKFromKey=function(e){var t={};if(e instanceof ie&&e.isPrivate)return t.kty="RSA",t.n=_e(e.n.toString(16)),t.e=_e(e.e.toString(16)),t.d=_e(e.d.toString(16)),t.p=_e(e.p.toString(16)),t.q=_e(e.q.toString(16)),t.dp=_e(e.dmp1.toString(16)),t.dq=_e(e.dmq1.toString(16)),t.qi=_e(e.coeff.toString(16)),t;if(e instanceof ie&&e.isPublic)return t.kty="RSA",t.n=_e(e.n.toString(16)),t.e=_e(e.e.toString(16)),t;if(e instanceof ce.crypto.ECDSA&&e.isPrivate){if("P-256"!==(n=e.getShortNISTPCurveName())&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;var r=e.getPublicKeyXYHex();return t.kty="EC",t.crv=n,t.x=_e(r.x),t.y=_e(r.y),t.d=_e(e.prvKeyHex),t}if(e instanceof ce.crypto.ECDSA&&e.isPublic){var n;if("P-256"!==(n=e.getShortNISTPCurveName())&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;return r=e.getPublicKeyXYHex(),t.kty="EC",t.crv=n,t.x=_e(r.x),t.y=_e(r.y),t}throw"not supported key object"},ie.getPosArrayOfChildrenFromHex=function(e){return fe.getChildIdx(e,0)},ie.getHexValueArrayOfChildrenFromHex=function(e){var t,r=fe.getV,n=r(e,(t=ie.getPosArrayOfChildrenFromHex(e))[0]),i=r(e,t[1]),o=r(e,t[2]),s=r(e,t[3]),a=r(e,t[4]),u=r(e,t[5]),c=r(e,t[6]),h=r(e,t[7]),l=r(e,t[8]);return(t=new Array).push(n,i,o,s,a,u,c,h,l),t},ie.prototype.readPrivateKeyFromPEMString=function(e){var t=Ce(e),r=ie.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},ie.prototype.readPKCS5PrvKeyHex=function(e){var t=ie.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},ie.prototype.readPKCS8PrvKeyHex=function(e){var t,r,n,i,o,s,a,u,c=fe,h=c.getVbyList;if(!1===c.isASN1HEX(e))throw"not ASN.1 hex string";try{t=h(e,0,[2,0,1],"02"),r=h(e,0,[2,0,2],"02"),n=h(e,0,[2,0,3],"02"),i=h(e,0,[2,0,4],"02"),o=h(e,0,[2,0,5],"02"),s=h(e,0,[2,0,6],"02"),a=h(e,0,[2,0,7],"02"),u=h(e,0,[2,0,8],"02")}catch(e){throw"malformed PKCS#8 plain RSA private key"}this.setPrivateEx(t,r,n,i,o,s,a,u)},ie.prototype.readPKCS5PubKeyHex=function(e){var t=fe,r=t.getV;if(!1===t.isASN1HEX(e))throw"keyHex is not ASN.1 hex string";var n=t.getChildIdx(e,0);if(2!==n.length||"02"!==e.substr(n[0],2)||"02"!==e.substr(n[1],2))throw"wrong hex for PKCS#5 public key";var i=r(e,n[0]),o=r(e,n[1]);this.setPublic(i,o)},ie.prototype.readPKCS8PubKeyHex=function(e){var t=fe;if(!1===t.isASN1HEX(e))throw"not ASN.1 hex string";if("06092a864886f70d010101"!==t.getTLVbyList(e,0,[0,0]))throw"not PKCS8 RSA public key";var r=t.getTLVbyList(e,0,[1,0]);this.readPKCS5PubKeyHex(r)},ie.prototype.readCertPubKeyHex=function(e,t){var r,n;(r=new qe).readCertHex(e),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)};var je=new RegExp("");function He(e,t){for(var r="",n=t/4-e.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function Ve(e){for(var t in ce.crypto.Util.DIGESTINFOHEAD){var r=ce.crypto.Util.DIGESTINFOHEAD[t],n=r.length;if(e.substring(0,n)==r)return[t,e.substring(n)]}return[]}function qe(){var e=fe,t=e.getChildIdx,r=e.getV,n=e.getTLV,i=e.getVbyList,o=e.getTLVbyList,s=e.getIdxbyList,a=e.getVidx,u=e.oidname,c=qe,h=Ce;this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return null===this.hex||0!==this.version?this.version:"a003020102"!==o(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return i(this.hex,0,[0,1+this.foffset],"02")},this.getSignatureAlgorithmField=function(){return u(i(this.hex,0,[0,2+this.foffset,0],"06"))},this.getIssuerHex=function(){return o(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return c.hex2dn(this.getIssuerHex())},this.getSubjectHex=function(){return o(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return c.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var e=i(this.hex,0,[0,4+this.foffset,0]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getNotAfter=function(){var e=i(this.hex,0,[0,4+this.foffset,1]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getPublicKeyHex=function(){return e.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return s(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var e=this.getPublicKeyIdx();return s(this.hex,e,[1,0],"30")},this.getPublicKey=function(){return Me.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){return u(i(this.hex,0,[1,0],"06"))},this.getSignatureValueHex=function(){return i(this.hex,0,[2],"03",!0)},this.verifySignature=function(e){var t=this.getSignatureAlgorithmName(),r=this.getSignatureValueHex(),n=o(this.hex,0,[0],"30"),i=new ce.crypto.Signature({alg:t});return i.init(e),i.updateHex(n),i.verify(r)},this.parseExt=function(){if(3!==this.version)return-1;var r=s(this.hex,0,[0,7,0],"30"),n=t(this.hex,r);this.aExtInfo=new Array;for(var o=0;o0&&(c=new Array(r),(new te).nextBytes(c),c=String.fromCharCode.apply(String,c));var h=be(u(Ee("\0\0\0\0\0\0\0\0"+i+c))),l=[];for(n=0;n>8*a-s&255;for(d[0]&=~p,n=0;nthis.n.bitLength())return 0;var n=Ve(this.doPublic(r).toString(16).replace(/^1f+00/,""));if(0==n.length)return!1;var i=n[0];return n[1]==function(e){return ce.crypto.Util.hashString(e,i)}(e)},ie.prototype.verifyWithMessageHash=function(e,t){var r=re(t=(t=t.replace(je,"")).replace(/[ \n]+/g,""),16);if(r.bitLength()>this.n.bitLength())return 0;var n=Ve(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==e)},ie.prototype.verifyPSS=function(e,t,r,n){var i=function(e){return ce.crypto.Util.hashHex(e,r)}(Ee(e));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(i,t,r,n)},ie.prototype.verifyWithMessageHashPSS=function(e,t,r,n){var i=new b(t,16);if(i.bitLength()>this.n.bitLength())return!1;var o,s=function(e){return ce.crypto.Util.hashHex(e,r)},a=be(e),u=a.length,c=this.n.bitLength()-1,h=Math.ceil(c/8);if(-1===n||void 0===n)n=u;else if(-2===n)n=h-u-2;else if(n<-2)throw"invalid salt length";if(h>8*h-c&255;if(0!=(f.charCodeAt(0)&d))throw"bits beyond keysize not zero";var p=Ke(g,f.length,s),v=[];for(o=0;o0&&-1==(":"+n.join(":")+":").indexOf(":"+y+":"))throw"algorithm '"+y+"' not accepted in the list";if("none"!=y&&null===t)throw"key shall be specified to verify.";if("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&(t=Me.getKey(t)),!("RS"!=g&&"PS"!=g||t instanceof i))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==g&&!(t instanceof c))throw"key shall be a ECDSA obj for ES* algs";var m=null;if(void 0===s.jwsalg2sigalg[v.alg])throw"unsupported alg name: "+y;if("none"==(m=s.jwsalg2sigalg[y]))throw"not supported";if("Hmac"==m.substr(0,4)){if(void 0===t)throw"hexadecimal key shall be specified for HMAC";var _=new h({alg:m,pass:t});return _.updateString(d),p==_.doFinal()}if(-1!=m.indexOf("withECDSA")){var S,w=null;try{w=c.concatSigToASN1Sig(p)}catch(e){return!1}return(S=new l({alg:m})).init(t),S.updateString(d),S.verify(w)}return(S=new l({alg:m})).init(t),S.updateString(d),S.verify(p)},ce.jws.JWS.parse=function(e){var t,r,n,i=e.split("."),o={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return t=i[0],r=i[1],3==i.length&&(n=i[2]),o.headerObj=ce.jws.JWS.readSafeJSONString(le(t)),o.payloadObj=ce.jws.JWS.readSafeJSONString(le(r)),o.headerPP=JSON.stringify(o.headerObj,null," "),null==o.payloadObj?o.payloadPP=le(r):o.payloadPP=JSON.stringify(o.payloadObj,null," "),void 0!==n&&(o.sigHex=Se(n)),o},ce.jws.JWS.verifyJWT=function(e,t,n){var i=ce.jws,o=i.JWS,s=o.readSafeJSONString,a=o.inArray,u=o.includedArray,c=e.split("."),h=c[0],l=c[1],f=(Se(c[2]),s(le(h))),g=s(le(l));if(void 0===f.alg)return!1;if(void 0===n.alg)throw"acceptField.alg shall be specified";if(!a(f.alg,n.alg))return!1;if(void 0!==g.iss&&"object"===r(n.iss)&&!a(g.iss,n.iss))return!1;if(void 0!==g.sub&&"object"===r(n.sub)&&!a(g.sub,n.sub))return!1;if(void 0!==g.aud&&"object"===r(n.aud))if("string"==typeof g.aud){if(!a(g.aud,n.aud))return!1}else if("object"==r(g.aud)&&!u(g.aud,n.aud))return!1;var d=i.IntDate.getNow();return void 0!==n.verifyAt&&"number"==typeof n.verifyAt&&(d=n.verifyAt),void 0!==n.gracePeriod&&"number"==typeof n.gracePeriod||(n.gracePeriod=0),!(void 0!==g.exp&&"number"==typeof g.exp&&g.exp+n.gracePeriodt.length&&(r=t.length);for(var n=0;n + * @license MIT + */ +var n=r(29),i=r(30),o=r(31);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return j(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var l=!0,f=0;fi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);for(var r="",n=0;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),h=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return F(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function D(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function U(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function L(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,o){return o||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function O(e,t,r,n,o){return o||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return O(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return O(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(28))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=c(e),n=r[0],s=r[1],a=new o(function(e,t,r){return 3*(t+r)/4-r}(0,n,s)),u=0,h=s>0?n-4:n,l=0;l>16&255,a[u++]=t>>8&255,a[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,a[u++]=255&t),1===s&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t),a},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function h(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,h=-7,l=r?i-1:0,f=r?-1:1,g=e[t+l];for(l+=f,o=g&(1<<-h)-1,g>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+l],l+=f,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),o-=c}return(g?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,h=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:o-1,d=n?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+g]=255&a,g+=d,a/=256,i-=8);for(s=s<0;e[r+g]=255&s,g+=d,s/=256,c-=8);e[r+g-d]|=128*p}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.jws,r=e.KeyUtil,i=e.X509,o=e.crypto,s=e.hextob64u,a=e.b64tohex,u=e.AllowedSigningAlgs;return function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.parseJwt=function e(r){n.Log.debug("JoseUtil.parseJwt");try{var i=t.JWS.parse(r);return{header:i.headerObj,payload:i.payloadObj}}catch(e){n.Log.error(e)}},e.validateJwt=function(t,o,s,u,c,h,l){n.Log.debug("JoseUtil.validateJwt");try{if("RSA"===o.kty)if(o.e&&o.n)o=r.getKey(o);else{if(!o.x5c||!o.x5c.length)return n.Log.error("JoseUtil.validateJwt: RSA key missing key material",o),Promise.reject(new Error("RSA key missing key material"));var f=a(o.x5c[0]);o=i.getPublicKeyFromCertHex(f)}else{if("EC"!==o.kty)return n.Log.error("JoseUtil.validateJwt: Unsupported key type",o&&o.kty),Promise.reject(new Error(o.kty));if(!(o.crv&&o.x&&o.y))return n.Log.error("JoseUtil.validateJwt: EC key missing key material",o),Promise.reject(new Error("EC key missing key material"));o=r.getKey(o)}return e._validateJwt(t,o,s,u,c,h,l)}catch(e){return n.Log.error(e&&e.message||e),Promise.reject("JWT validation failed")}},e.validateJwtAttributes=function(t,r,i,o,s,a){o||(o=0),s||(s=parseInt(Date.now()/1e3));var u=e.parseJwt(t).payload;if(!u.iss)return n.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(u.iss!==r)return n.Log.error("JoseUtil._validateJwt: Invalid issuer in token",u.iss),Promise.reject(new Error("Invalid issuer in token: "+u.iss));if(!u.aud)return n.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(u.aud===i||Array.isArray(u.aud)&&u.aud.indexOf(i)>=0))return n.Log.error("JoseUtil._validateJwt: Invalid audience in token",u.aud),Promise.reject(new Error("Invalid audience in token: "+u.aud));if(u.azp&&u.azp!==i)return n.Log.error("JoseUtil._validateJwt: Invalid azp in token",u.azp),Promise.reject(new Error("Invalid azp in token: "+u.azp));if(!a){var c=s+o,h=s-o;if(!u.iat)return n.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(c>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninResponse=void 0;var n=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"#";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=i.UrlUtility.parseUrlFragment(t,r);this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.code=n.code,this.state=n.state,this.id_token=n.id_token,this.session_state=n.session_state,this.access_token=n.access_token,this.token_type=n.token_type,this.scope=n.scope,this.profile=void 0,this.expires_in=n.expires_in}return n(e,[{key:"expires_in",get:function(){if(this.expires_at){var e=parseInt(Date.now()/1e3);return this.expires_at-e}},set:function(e){var t=parseInt(e);if("number"==typeof t&&t>0){var r=parseInt(Date.now()/1e3);this.expires_at=r+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutRequest=void 0;var n=r(0),i=r(3),o=r(8);t.SignoutRequest=function e(t){var r=t.url,s=t.id_token_hint,a=t.post_logout_redirect_uri,u=t.data,c=t.extraQueryParams,h=t.request_type;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw n.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var l in s&&(r=i.UrlUtility.addQueryParam(r,"id_token_hint",s)),a&&(r=i.UrlUtility.addQueryParam(r,"post_logout_redirect_uri",a),u&&(this.state=new o.State({data:u,request_type:h}),r=i.UrlUtility.addQueryParam(r,"state",this.state.id))),c)r=i.UrlUtility.addQueryParam(r,l,c[l]);this.url=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutResponse=void 0;var n=r(3);t.SignoutResponse=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=n.UrlUtility.parseUrlFragment(t,"?");this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.state=r.state}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryWebStorage=void 0;var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.SilentRenewService,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.SessionMonitor,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.TokenRevocationClient,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:f.TokenClient,p=arguments.length>5&&void 0!==arguments[5]?arguments[5]:g.JoseUtil;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r instanceof s.UserManagerSettings||(r=new s.UserManagerSettings(r));var v=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));return v._events=new u.UserManagerEvents(r),v._silentRenewService=new n(v),v.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),v.startSilentRenew()),v.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),v._sessionMonitor=new o(v)),v._tokenRevocationClient=new a(v._settings),v._tokenClient=new d(v._settings),v._joseUtil=p,v}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getUser=function(){var e=this;return this._loadUser().then((function(t){return t?(i.Log.info("UserManager.getUser: user loaded"),e._events.load(t,!1),t):(i.Log.info("UserManager.getUser: user not found in storage"),null)}))},t.prototype.removeUser=function(){var e=this;return this.storeUser(null).then((function(){i.Log.info("UserManager.removeUser: user removed from storage"),e._events.unload()}))},t.prototype.signinRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:r";var t={useReplaceToNavigate:e.useReplaceToNavigate};return this._signinStart(e,this._redirectNavigator,t).then((function(){i.Log.info("UserManager.signinRedirect: successful")}))},t.prototype.signinRedirectCallback=function(e){return this._signinEnd(e||this._redirectNavigator.url).then((function(e){return e.profile&&e.profile.sub?i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinRedirectCallback: no sub"),e}))},t.prototype.signinPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:p";var t=e.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.display="popup",this._signin(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopup: no sub")),e}))):(i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},t.prototype.signinPopupCallback=function(e){return this._signinCallback(e,this._popupNavigator).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopupCallback: no sub")),e})).catch((function(e){i.Log.error(e.message)}))},t.prototype.signinSilent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t=Object.assign({},t)).request_type="si:s",this._loadUser().then((function(r){return r&&r.refresh_token?(t.refresh_token=r.refresh_token,e._useRefreshToken(t)):(t.id_token_hint=t.id_token_hint||e.settings.includeIdTokenInSilentRenew&&r&&r.id_token,r&&e._settings.validateSubOnSilentRenew&&(i.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",r.profile.sub),t.current_sub=r.profile.sub),e._signinSilentIframe(t))}))},t.prototype._useRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(t).then((function(t){return t?t.access_token?e._loadUser().then((function(r){if(r){var n=Promise.resolve();return t.id_token&&(n=e._validateIdTokenFromTokenRefreshToken(r.profile,t.id_token)),n.then((function(){return i.Log.debug("UserManager._useRefreshToken: refresh token response success"),r.id_token=t.id_token,r.access_token=t.access_token,r.refresh_token=t.refresh_token||r.refresh_token,r.expires_in=t.expires_in,e.storeUser(r).then((function(){return e._events.load(r),r}))}))}return null})):(i.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(i.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))}))},t.prototype._validateIdTokenFromTokenRefreshToken=function(e,t){var r=this;return this._metadataService.getIssuer().then((function(n){return r._joseUtil.validateJwtAttributes(t,n,r._settings.client_id,r._settings.clockSkew).then((function(t){return t?t.sub!==e.sub?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):t.auth_time&&t.auth_time!==e.auth_time?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):t.azp&&t.azp!==e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!t.azp&&e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))}))}))},t.prototype._signinSilentIframe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.prompt=e.prompt||"none",this._signin(e,this._iframeNavigator,{startUrl:t,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilent: no sub")),e}))):(i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype.signinSilentCallback=function(e){return this._signinCallback(e,this._iframeNavigator).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilentCallback: no sub")),e}))},t.prototype.signinCallback=function(e){var t=this;return this.readSigninResponseState(e).then((function(r){var n=r.state;return r.response,"si:r"===n.request_type?t.signinRedirectCallback(e):"si:p"===n.request_type?t.signinPopupCallback(e):"si:s"===n.request_type?t.signinSilentCallback(e):Promise.reject(new Error("invalid response_type in state"))}))},t.prototype.signoutCallback=function(e,t){var r=this;return this.readSignoutResponseState(e).then((function(n){var i=n.state,o=n.response;return i?"so:r"===i.request_type?r.signoutRedirectCallback(e):"so:p"===i.request_type?r.signoutPopupCallback(e,t):Promise.reject(new Error("invalid response_type in state")):o}))},t.prototype.querySessionStatus=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:s";var r=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return r?(t.redirect_uri=r,t.prompt="none",t.response_type=t.response_type||this.settings.query_status_response_type,t.scope=t.scope||"openid",t.skipUserInfo=!0,this._signinStart(t,this._iframeNavigator,{startUrl:r,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then((function(t){return e.processSigninResponse(t.url).then((function(e){if(i.Log.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub)return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};i.Log.info("querySessionStatus successful, user not authenticated")})).catch((function(t){if(t.session_state&&e.settings.monitorAnonymousSession&&("login_required"==t.message||"consent_required"==t.message||"interaction_required"==t.message||"account_selection_required"==t.message))return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:t.session_state};throw t}))}))):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype._signin=function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(e,t,n).then((function(t){return r._signinEnd(t.url,e)}))},t.prototype._signinStart=function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.prepare(n).then((function(t){return i.Log.debug("UserManager._signinStart: got navigator window handle"),r.createSigninRequest(e).then((function(e){return i.Log.debug("UserManager._signinStart: got signin request"),n.url=e.url,n.id=e.state.id,t.navigate(n)})).catch((function(e){throw t.close&&(i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),t.close()),e}))}))},t.prototype._signinEnd=function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(e).then((function(e){i.Log.debug("UserManager._signinEnd: got signin response");var n=new a.User(e);if(r.current_sub){if(r.current_sub!==n.profile.sub)return i.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",n.profile.sub),Promise.reject(new Error("login_required"));i.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return t.storeUser(n).then((function(){return i.Log.debug("UserManager._signinEnd: user stored"),t._events.load(n),n}))}))},t.prototype._signinCallback=function(e,t){return i.Log.debug("UserManager._signinCallback"),t.callback(e)},t.prototype.signoutRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:r";var t=e.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;t&&(e.post_logout_redirect_uri=t);var r={useReplaceToNavigate:e.useReplaceToNavigate};return this._signoutStart(e,this._redirectNavigator,r).then((function(){i.Log.info("UserManager.signoutRedirect: successful")}))},t.prototype.signoutRedirectCallback=function(e){return this._signoutEnd(e||this._redirectNavigator.url).then((function(e){return i.Log.info("UserManager.signoutRedirectCallback: successful"),e}))},t.prototype.signoutPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:p";var t=e.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e.post_logout_redirect_uri=t,e.display="popup",e.post_logout_redirect_uri&&(e.state=e.state||{}),this._signout(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then((function(){i.Log.info("UserManager.signoutPopup: successful")}))},t.prototype.signoutPopupCallback=function(e,t){return void 0===t&&"boolean"==typeof e&&(t=e,e=null),this._popupNavigator.callback(e,t,"?").then((function(){i.Log.info("UserManager.signoutPopupCallback: successful")}))},t.prototype._signout=function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(e,t,n).then((function(e){return r._signoutEnd(e.url)}))},t.prototype._signoutStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.prepare(n).then((function(r){return i.Log.debug("UserManager._signoutStart: got navigator window handle"),t._loadUser().then((function(o){return i.Log.debug("UserManager._signoutStart: loaded current user from storage"),(t._settings.revokeAccessTokenOnSignout?t._revokeInternal(o):Promise.resolve()).then((function(){var s=e.id_token_hint||o&&o.id_token;return s&&(i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),e.id_token_hint=s),t.removeUser().then((function(){return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"),t.createSignoutRequest(e).then((function(e){return i.Log.debug("UserManager._signoutStart: got signout request"),n.url=e.url,e.state&&(n.id=e.state.id),r.navigate(n)}))}))}))})).catch((function(e){throw r.close&&(i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),r.close()),e}))}))},t.prototype._signoutEnd=function(e){return this.processSignoutResponse(e).then((function(e){return i.Log.debug("UserManager._signoutEnd: got signout response"),e}))},t.prototype.revokeAccessToken=function(){var e=this;return this._loadUser().then((function(t){return e._revokeInternal(t,!0).then((function(r){if(r)return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),t.access_token=null,t.refresh_token=null,t.expires_at=null,t.token_type=null,e.storeUser(t).then((function(){i.Log.debug("UserManager.revokeAccessToken: user stored"),e._events.load(t)}))}))})).then((function(){i.Log.info("UserManager.revokeAccessToken: access token revoked successfully")}))},t.prototype._revokeInternal=function(e,t){var r=this;if(e){var n=e.access_token,o=e.refresh_token;return this._revokeAccessTokenInternal(n,t).then((function(e){return r._revokeRefreshTokenInternal(o,t).then((function(t){return e||t||i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),e||t}))}))}return Promise.resolve(!1)},t.prototype._revokeAccessTokenInternal=function(e,t){return!e||e.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(e,t).then((function(){return!0}))},t.prototype._revokeRefreshTokenInternal=function(e,t){return e?this._tokenRevocationClient.revoke(e,t,"refresh_token").then((function(){return!0})):Promise.resolve(!1)},t.prototype.startSilentRenew=function(){this._silentRenewService.start()},t.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},t.prototype._loadUser=function(){return this._userStore.get(this._userStoreKey).then((function(e){return e?(i.Log.debug("UserManager._loadUser: user storageString loaded"),a.User.fromStorageString(e)):(i.Log.debug("UserManager._loadUser: no user storageString"),null)}))},t.prototype.storeUser=function(e){if(e){i.Log.debug("UserManager.storeUser: storing user");var t=e.toStorageString();return this._userStore.set(this._userStoreKey,t)}return i.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},n(t,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),t}(o.OidcClient)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerSettings=void 0;var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=r.popup_redirect_uri,i=r.popup_post_logout_redirect_uri,l=r.popupWindowFeatures,f=r.popupWindowTarget,g=r.silent_redirect_uri,d=r.silentRequestTimeout,p=r.automaticSilentRenew,v=void 0!==p&&p,y=r.validateSubOnSilentRenew,m=void 0!==y&&y,_=r.includeIdTokenInSilentRenew,S=void 0===_||_,w=r.monitorSession,F=void 0===w||w,b=r.monitorAnonymousSession,E=void 0!==b&&b,x=r.checkSessionInterval,k=void 0===x?2e3:x,A=r.stopCheckSessionOnError,P=void 0===A||A,C=r.query_status_response_type,T=r.revokeAccessTokenOnSignout,R=void 0!==T&&T,I=r.accessTokenExpiringNotificationTime,D=void 0===I?60:I,U=r.redirectNavigator,L=void 0===U?new o.RedirectNavigator:U,N=r.popupNavigator,O=void 0===N?new s.PopupNavigator:N,B=r.iframeNavigator,M=void 0===B?new a.IFrameNavigator:B,j=r.userStore,H=void 0===j?new u.WebStorageStateStore({store:c.Global.sessionStorage}):j;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var K=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,arguments[0]));return K._popup_redirect_uri=n,K._popup_post_logout_redirect_uri=i,K._popupWindowFeatures=l,K._popupWindowTarget=f,K._silent_redirect_uri=g,K._silentRequestTimeout=d,K._automaticSilentRenew=v,K._validateSubOnSilentRenew=m,K._includeIdTokenInSilentRenew=S,K._accessTokenExpiringNotificationTime=D,K._monitorSession=F,K._monitorAnonymousSession=E,K._checkSessionInterval=k,K._stopCheckSessionOnError=P,C?K._query_status_response_type=C:arguments[0]&&arguments[0].response_type?K._query_status_response_type=h.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":K._query_status_response_type="id_token",K._revokeAccessTokenOnSignout=R,K._redirectNavigator=L,K._popupNavigator=O,K._iframeNavigator=M,K._userStore=H,K}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),t}(i.OidcClientSettings)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectNavigator=void 0;var n=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1];n.Log.debug("UserManagerEvents.load"),e.prototype.load.call(this,t),r&&this._userLoaded.raise(t)},t.prototype.unload=function(){n.Log.debug("UserManagerEvents.unload"),e.prototype.unload.call(this),this._userUnloaded.raise()},t.prototype.addUserLoaded=function(e){this._userLoaded.addHandler(e)},t.prototype.removeUserLoaded=function(e){this._userLoaded.removeHandler(e)},t.prototype.addUserUnloaded=function(e){this._userUnloaded.addHandler(e)},t.prototype.removeUserUnloaded=function(e){this._userUnloaded.removeHandler(e)},t.prototype.addSilentRenewError=function(e){this._silentRenewError.addHandler(e)},t.prototype.removeSilentRenewError=function(e){this._silentRenewError.removeHandler(e)},t.prototype._raiseSilentRenewError=function(e){n.Log.debug("UserManagerEvents._raiseSilentRenewError",e.message),this._silentRenewError.raise(e)},t.prototype.addUserSignedIn=function(e){this._userSignedIn.addHandler(e)},t.prototype.removeUserSignedIn=function(e){this._userSignedIn.removeHandler(e)},t.prototype._raiseUserSignedIn=function(){n.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},t.prototype.addUserSignedOut=function(e){this._userSignedOut.addHandler(e)},t.prototype.removeUserSignedOut=function(e){this._userSignedOut.removeHandler(e)},t.prototype._raiseUserSignedOut=function(){n.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},t.prototype.addUserSessionChanged=function(e){this._userSessionChanged.addHandler(e)},t.prototype.removeUserSessionChanged=function(e){this._userSessionChanged.removeHandler(e)},t.prototype._raiseUserSessionChanged=function(){n.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},t}(i.AccessTokenEvents)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var n=function(){function e(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.Global.timer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,r));return s._timer=n,s._nowFunc=i||function(){return Date.now()/1e3},s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.init=function(e){e<=0&&(e=1),e=parseInt(e);var t=this.now+e;if(this.expiration===t&&this._timerHandle)i.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),i.Log.debug("Timer.init timer "+this._name+" for duration:",e),this._expiration=t;var r=5;e0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return r in e||(e[r]=[]),e}function s(e,t,n){var i=e;if(e instanceof Comment&&(c(i)&&c(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(i))throw new Error("Not implemented: moving existing logical children");var a=c(t);if(n0;)e(r,0)}var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return c(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=c,t.permuteLogicalChildren=function(e,t){var n=c(e);t.forEach((function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)})),t.forEach((function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):d(r,e)})),t.forEach((function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)})),t.forEach((function(e){n[e.toSiblingIndex]=e.moveRangeStart}))},t.getClosestDomElement=l},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(26),n(17);var r=n(27),o=n(7),i={},a=!1;function s(e,t,n){var o=i[e];o||(o=i[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=s,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");s(n||0,o.toLogicalElement(r,!0),t)},t.getRendererer=function(e){return i[e]},t.renderBatch=function(e,t){var n=i[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),s=r.values(o),u=r.count(o),c=t.referenceFrames(),l=r.values(c),f=t.diffReader,d=0;d0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]>2]}t.monoPlatform={start:function(e){return new Promise((function(t,n){var l,f;s.attachDebuggerHotkey(e),window.Browser={init:function(){}},l=function(){window.Module=function(e,t,n){var l=this,f=e.bootConfig.resources,d=window.Module||{},p=["DEBUGGING ENABLED"];d.print=function(e){return p.indexOf(e)<0&&console.log(e)},d.printErr=function(e){console.error(e),u.showErrorNotification()},d.preRun=d.preRun||[],d.postRun=d.postRun||[],d.preloadPlugins=[];var m,w,_=e.loadResources(f.assembly,(function(e){return"_framework/"+e}),"assembly"),E=e.loadResources(f.pdb||{},(function(e){return"_framework/"+e}),"pdb"),I=e.loadResource("dotnet.wasm","_framework/dotnet.wasm",e.bootConfig.resources.runtime["dotnet.wasm"],"dotnetwasm");if(e.bootConfig.resources.runtime.hasOwnProperty("dotnet.timezones.blat")&&(m=e.loadResource("dotnet.timezones.blat","_framework/dotnet.timezones.blat",e.bootConfig.resources.runtime["dotnet.timezones.blat"],"globalization")),e.bootConfig.icuDataMode!=c.ICUDataMode.Invariant){var C=e.startOptions.applicationCulture||navigator.languages&&navigator.languages[0],N=function(e,t){if(!t||e.icuDataMode===c.ICUDataMode.All)return"icudt.dat";var n=t.split("-")[0];return["en","fr","it","de","es"].includes(n)?"icudt_EFIGS.dat":["zh","ko","ja"].includes(n)?"icudt_CJK.dat":"icudt_no_CJK.dat"}(e.bootConfig,C);w=e.loadResource(N,"_framework/"+N,e.bootConfig.resources.runtime[N],"globalization")}return d.instantiateWasm=function(e,t){return r(l,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,I];case 1:return[4,y(o.sent(),e)];case 2:return n=o.sent(),[3,4];case 3:throw r=o.sent(),d.printErr(r),r;case 4:return t(n),[2]}}))})),[]},d.preRun.push((function(){i=cwrap("mono_wasm_add_assembly",null,["string","number","number"]),MONO.loaded_files=[],m&&function(e){r(this,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return t="blazor:timezonedata",addRunDependency(t),[4,e.response];case 1:return[4,r.sent().arrayBuffer()];case 2:return n=r.sent(),Module.FS_createPath("/","usr",!0,!0),Module.FS_createPath("/usr/","share",!0,!0),Module.FS_createPath("/usr/share/","zoneinfo",!0,!0),MONO.mono_wasm_load_data_archive(new Uint8Array(n),"/usr/share/zoneinfo/"),removeRunDependency(t),[2]}}))}))}(m),w?function(e){r(this,void 0,void 0,(function(){var t,n,r,i,a;return o(this,(function(o){switch(o.label){case 0:return t="blazor:icudata",addRunDependency(t),[4,e.response];case 1:return n=o.sent(),i=Uint8Array.bind,[4,n.arrayBuffer()];case 2:if(r=new(i.apply(Uint8Array,[void 0,o.sent()])),a=MONO.mono_wasm_load_bytes_into_heap(r),!MONO.mono_wasm_load_icu_data(a))throw new Error("Error loading ICU asset.");return removeRunDependency(t),[2]}}))}))}(w):MONO.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT","1"),_.forEach((function(e){return A(e,b(e.name,".dll"))})),E.forEach((function(e){return A(e,e.name)})),window.Blazor._internal.dotNetCriticalError=function(e){d.printErr(BINDING.conv_string(e)||"(null)")},window.Blazor._internal.getSatelliteAssemblies=function(t){var n=BINDING.mono_array_to_js_array(t),i=e.bootConfig.resources.satelliteResources;if(e.startOptions.applicationCulture||navigator.languages&&navigator.languages[0],i){var a=Promise.all(n.filter((function(e){return i.hasOwnProperty(e)})).map((function(t){return e.loadResources(i[t],(function(e){return"_framework/"+e}),"assembly")})).reduce((function(e,t){return e.concat(t)}),new Array).map((function(e){return r(l,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,e.response];case 1:return[2,t.sent().arrayBuffer()]}}))}))})));return BINDING.js_to_mono_obj(a.then((function(e){return e.length&&(window.Blazor._internal.readSatelliteAssemblies=function(){for(var t=BINDING.mono_obj_array_new(e.length),n=0;n>1];var n},readInt32Field:function(e,t){return p(e+(t||0))},readUint64Field:function(e,t){return function(e){var t=e>>2,n=Module.HEAPU32[t+1];if(n>f)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*l+Module.HEAPU32[t]}(e+(t||0))},readFloatField:function(e,t){return n=e+(t||0),Module.HEAPF32[n>>2];var n},readObjectField:function(e,t){return p(e+(t||0))},readStringField:function(e,t,n){var r,o=p(e+(t||0));if(0===o)return null;if(n){var i=BINDING.unbox_mono_obj(o);return"boolean"==typeof i?i?"":null:i}return d?void 0===(r=d.stringCache.get(o))&&(r=BINDING.conv_string(o),d.stringCache.set(o,r)):r=BINDING.conv_string(o),r},readStructField:function(e,t){return e+(t||0)},beginHeapLock:function(){return g(),d=new w},invokeWhenHeapUnlocked:function(e){d?d.enqueuePostReleaseAction(e):e()}};var h=document.createElement("a");function m(e){return e+12}function v(e,t,n){var r="["+e+"] "+t+":"+n;return BINDING.bind_static_method(r)}function y(e,t){return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:if("function"!=typeof WebAssembly.instantiateStreaming)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,WebAssembly.instantiateStreaming(e.response,t)];case 2:return[2,o.sent().instance];case 3:return n=o.sent(),console.info("Streaming compilation failed. Falling back to ArrayBuffer instantiation. ",n),[3,4];case 4:return[4,e.response.then((function(e){return e.arrayBuffer()}))];case 5:return r=o.sent(),[4,WebAssembly.instantiate(r,t)];case 6:return[2,o.sent().instance]}}))}))}function b(e,t){var n=e.lastIndexOf(".");if(n<0)throw new Error("No extension to replace in '"+e+"'");return e.substr(0,n)+t}function g(){if(d)throw new Error("Assertion failed - heap is currently locked")}var w=function(){function e(){this.stringCache=new Map}return e.prototype.enqueuePostReleaseAction=function(e){this.postReleaseActions||(this.postReleaseActions=[]),this.postReleaseActions.push(e)},e.prototype.release=function(){var e;if(d!==this)throw new Error("Trying to release a lock which isn't current");for(d=null;null===(e=this.postReleaseActions)||void 0===e?void 0:e.length;){this.postReleaseActions.shift()(),g()}},e}()},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,a,s)}}))}),{root:i,rootMargin:o+"px"});a.observe(t),a.observe(n);var s=c(t),u=c(n);function c(e){var t=new MutationObserver((function(){a.unobserve(e),a.observe(e)}));return t.observe(e,{attributes:!0}),t}r[e._id]={intersectionObserver:a,mutationObserverBefore:s,mutationObserverAfter:u}},dispose:function(e){var t=r[e._id];t&&(t.intersectionObserver.disconnect(),t.mutationObserverBefore.disconnect(),t.mutationObserverAfter.disconnect(),e.dispose(),delete r[e._id])}};var r={}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1].*)$/;function i(e,t){var n=e.currentElement;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){var r=new RegExp(o).exec(n.textContent),i=r&&r.groups&&r.groups.descriptor;if(!i)return;try{var s=function(e){var t=JSON.parse(e),n=t.type;if("server"!==n&&"webassembly"!==n)throw new Error("Invalid component type '"+n+"'.");return t}(i);switch(t){case"webassembly":return function(e,t,n){var r=e.type,o=e.assembly,i=e.typeName,s=e.parameterDefinitions,u=e.parameterValues,c=e.prerenderId;if("webassembly"!==r)return;if(!o)throw new Error("assembly must be defined when using a descriptor.");if(!i)throw new Error("typeName must be defined when using a descriptor.");if(c){var l=a(c,n);if(!l)throw new Error("Could not find an end component comment for '"+t+"'");return{type:r,assembly:o,typeName:i,parameterDefinitions:s&&atob(s),parameterValues:u&&atob(u),start:t,prerenderId:c,end:l}}return{type:r,assembly:o,typeName:i,parameterDefinitions:s&&atob(s),parameterValues:u&&atob(u),start:t}}(s,n,e);case"server":return function(e,t,n){var r=e.type,o=e.descriptor,i=e.sequence,s=e.prerenderId;if("server"!==r)return;if(!o)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===i)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(i))throw new Error("Error parsing the sequence '"+i+"' for component '"+JSON.stringify(e)+"'");if(s){var u=a(s,n);if(!u)throw new Error("Could not find an end component comment for '"+t+"'");return{type:r,sequence:i,descriptor:o,start:t,prerenderId:s,end:u}}return{type:r,sequence:i,descriptor:o,start:t}}(s,n,e)}}catch(e){throw new Error("Found malformed component comment at "+n.textContent)}}}function a(e,t){for(;t.next()&&t.currentElement;){var n=t.currentElement;if(n.nodeType===Node.COMMENT_NODE&&n.textContent){var r=new RegExp(o).exec(n.textContent),i=r&&r[1];if(i)return s(i,e),n}}}function s(e,t){var n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error("Invalid end of component comment: '"+e+"'");var r=n.prerenderId;if(!r)throw new Error("End of component comment must have a value for the prerendered property: '"+e+"'");if(r!==t)throw new Error("End of component comment prerendered property must match the start comment prerender id: '"+t+"', '"+r+"'")}var u=function(){function e(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}return e.prototype.next=function(){return this.currentIndex++,this.currentIndex0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var a=n(3);n(25);var s=n(17),u=n(20),c=n(12),l=n(49),f=n(37),d=n(18),p=n(50),h=n(51),m=n(22),v=n(52),y=n(38),b=!1;function g(e){return r(this,void 0,void 0,(function(){var t,n,f,g,_,E,I,C,N,A,S,O=this;return o(this,(function(D){switch(D.label){case 0:if(b)throw new Error("Blazor has already started.");return b=!0,d.setEventDispatcher((function(e,t){c.getRendererer(e.browserRendererId).eventDelegator.getHandler(e.eventHandlerId)&&u.monoPlatform.invokeWhenHeapUnlocked((function(){return a.DotNet.invokeMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","DispatchEvent",e,JSON.stringify(t))}))})),window.Blazor._internal.invokeJSFromDotNet=w,t=s.setPlatform(u.monoPlatform),window.Blazor.platform=t,window.Blazor._internal.renderBatch=function(e,t){var n=u.monoPlatform.beginHeapLock();try{c.renderBatch(e,new l.SharedMemoryRenderBatch(t))}finally{n.release()}},n=window.Blazor._internal.navigationManager.getBaseURI,f=window.Blazor._internal.navigationManager.getLocationHref,window.Blazor._internal.navigationManager.getUnmarshalledBaseURI=function(){return BINDING.js_string_to_mono_string(n())},window.Blazor._internal.navigationManager.getUnmarshalledLocationHref=function(){return BINDING.js_string_to_mono_string(f())},window.Blazor._internal.navigationManager.listenForNavigationEvents((function(e,t){return r(O,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,a.DotNet.invokeMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChanged",e,t)];case 1:return n.sent(),[2]}}))}))})),g=null==e?void 0:e.environment,_=m.BootConfigResult.initAsync(g),E=y.discoverComponents(document,"webassembly"),I=new v.WebAssemblyComponentAttacher(E),window.Blazor._internal.registeredComponents={getRegisteredComponentsCount:function(){return I.getCount()},getId:function(e){return I.getId(e)},getAssembly:function(e){return BINDING.js_string_to_mono_string(I.getAssembly(e))},getTypeName:function(e){return BINDING.js_string_to_mono_string(I.getTypeName(e))},getParameterDefinitions:function(e){return BINDING.js_string_to_mono_string(I.getParameterDefinitions(e)||"")},getParameterValues:function(e){return BINDING.js_string_to_mono_string(I.getParameterValues(e)||"")}},window.Blazor._internal.attachRootComponentToElement=function(e,t,n){var r=I.resolveRegisteredElement(e);r?c.attachRootComponentToLogicalElement(n,r,t):c.attachRootComponentToElement(e,t,n)},[4,_];case 1:return C=D.sent(),[4,Promise.all([p.WebAssemblyResourceLoader.initAsync(C.bootConfig,e||{}),h.WebAssemblyConfigLoader.initAsync(C)])];case 2:N=i.apply(void 0,[D.sent(),1]),A=N[0],D.label=3;case 3:return D.trys.push([3,5,,6]),[4,t.start(A)];case 4:return D.sent(),[3,6];case 5:throw S=D.sent(),new Error("Failed to start platform. Reason: "+S);case 6:return t.callEntryPoint(A.bootConfig.entryAssembly),[2]}}))}))}function w(e,t,n,r){var o=u.monoPlatform.readStringField(e,0),i=u.monoPlatform.readInt32Field(e,4),s=u.monoPlatform.readStringField(e,8),c=u.monoPlatform.readUint64Field(e,20);if(null!==s){var l=u.monoPlatform.readUint64Field(e,12);if(0!==l)return a.DotNet.jsCallDispatcher.beginInvokeJSFromDotNet(l,o,s,i,c),0;var f=a.DotNet.jsCallDispatcher.invokeJSFromDotNet(o,s,i,c);return null===f?0:BINDING.js_string_to_mono_string(f)}var d=a.DotNet.jsCallDispatcher.findJSFunction(o,c).call(null,t,n,r);switch(i){case a.DotNet.JSCallResultType.Default:return d;case a.DotNet.JSCallResultType.JSObjectReference:return a.DotNet.createJSObjectReference(d).__jsObjectId;default:throw new Error("Invalid JS call result type '"+i+"'.")}}window.Blazor.start=g,f.shouldAutoStart()&&g().catch((function(e){"undefined"!=typeof Module&&Module.printErr?Module.printErr(e):console.error(e)}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=i,this.arrayBuilderSegmentReader=a,this.diffReader=s,this.editReader=u,this.frameReader=c}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,i.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*i.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*i.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return l(e,t,s.structLength)},e.prototype.referenceFramesEntry=function(e,t){return l(e,t,c.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=l(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=l(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var i={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},a={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},s={structLength:4+a.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return l(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},c={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24,!0)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function l(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] - - - - - - - + @@ -28,11 +22,7 @@ - - - - - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json index 1d9beacd54..b9ba4298dd 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" }, "IdentityServer": { "Clients": { diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en-GB.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en-GB.json new file mode 100644 index 0000000000..d2ca0793a3 --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en-GB.json @@ -0,0 +1,8 @@ +{ + "culture": "en-GB", + "texts": { + "Menu:Home": "Home", + "Welcome": "Welcome", + "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io." + } +} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index 328722915e..40bea2fc83 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -128,6 +128,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json index 6c64a7b397..12bd4f78bb 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json @@ -3,7 +3,7 @@ "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index ac55c87569..d029cd0b1e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -151,6 +151,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json index 1051a8576c..73d80aeec4 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json @@ -5,7 +5,7 @@ "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" }, "AuthServer": { "Authority": "https://localhost:44305", diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index 07db333488..02a2fcd478 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -63,6 +63,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json index c7101f92ed..0e667e5d73 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/appsettings.json @@ -5,7 +5,7 @@ "RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 5815dea9d7..606cdee1d4 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -161,6 +161,7 @@ namespace MyCompanyName.MyProjectName.Web options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json index 8084875aa5..9c81e66699 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json @@ -3,7 +3,7 @@ "SelfUrl": "https://localhost:44303" }, "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True" }, "AuthServer": { "Authority": "https://localhost:44303", diff --git a/templates/module/aspnet-core/docker-compose.override.yml b/templates/module/aspnet-core/docker-compose.override.yml index 8d583bacd7..061757bb76 100644 --- a/templates/module/aspnet-core/docker-compose.override.yml +++ b/templates/module/aspnet-core/docker-compose.override.yml @@ -11,19 +11,19 @@ services: identity-server: environment: - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionStrings__Default=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__Default=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=MyProjectName_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false ports: - "51600:80" my-project-name: environment: - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionStrings__Default=Server=sqlserver;Database=MyProjectName_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false - - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__Default=Server=sqlserver;Database=MyProjectName_ModuleDb;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=MyProjectName_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=MyProjectName_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false - AuthServer__Authority=http://identity-server ports: - "51601:80" \ No newline at end of file diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index a14632e97f..db77093f0a 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -96,6 +96,7 @@ namespace MyCompanyName.MyProjectName { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json index d80fc69b59..b35a5997cf 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json @@ -3,8 +3,8 @@ "CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,http://localhost:44307,https://localhost:44307" }, "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True;MultipleActiveResultSets=true", - "MyProjectName": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Module;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True", + "MyProjectName": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Module;Trusted_Connection=True" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index 9b61558fa8..d576d9a0a5 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -104,6 +104,7 @@ namespace MyCompanyName.MyProjectName { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/appsettings.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/appsettings.json index dd966995a3..29608e57a4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/appsettings.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/appsettings.json @@ -5,7 +5,7 @@ }, "AppSelfUrl": "https://localhost:44301/", "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True" }, "Redis": { "Configuration": "127.0.0.1" diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs index 199fdb4fc1..1f1f64bb78 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs @@ -102,6 +102,7 @@ namespace MyCompanyName.MyProjectName { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português (Brasil)")); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/appsettings.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/appsettings.json index e081a57a67..f90c5b2d28 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/appsettings.json +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True" } } \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en-GB.json b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en-GB.json new file mode 100644 index 0000000000..74ea6af04d --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "ManageYourProfile": "Manage your profile", + "SamplePageMessage": "A sample page for the MyProjectName module" + } +} \ No newline at end of file diff --git a/test/AbpPerfTest/AbpPerfTest.WithAbp/AppModule.cs b/test/AbpPerfTest/AbpPerfTest.WithAbp/AppModule.cs index 1cd88989e6..3846cdd3de 100644 --- a/test/AbpPerfTest/AbpPerfTest.WithAbp/AppModule.cs +++ b/test/AbpPerfTest/AbpPerfTest.WithAbp/AppModule.cs @@ -33,7 +33,7 @@ namespace AbpPerfTest.WithAbp Configure(options => { - options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; + options.TransactionBehavior = UnitOfWorkTransactionBehavior.Auto; }); } diff --git a/test/AbpPerfTest/AbpPerfTest.WithAbp/Controllers/BookController.cs b/test/AbpPerfTest/AbpPerfTest.WithAbp/Controllers/BookController.cs index 7c78937342..1533e95f71 100644 --- a/test/AbpPerfTest/AbpPerfTest.WithAbp/Controllers/BookController.cs +++ b/test/AbpPerfTest/AbpPerfTest.WithAbp/Controllers/BookController.cs @@ -5,7 +5,6 @@ using System.Threading.Tasks; using AbpPerfTest.WithAbp.Dtos; using AbpPerfTest.WithAbp.Entities; using Microsoft.AspNetCore.Mvc; -using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Repositories; namespace AbpPerfTest.WithAbp.Controllers @@ -23,7 +22,7 @@ namespace AbpPerfTest.WithAbp.Controllers [HttpGet] public async Task> GetListAsync() { - var books = await _bookRepository.OrderBy(x => x.Id).Take(10).ToListAsync(); + var books = await _bookRepository.GetPagedListAsync(0, 10, "Id"); return books .Select(b => new BookDto diff --git a/test/AbpPerfTest/AbpPerfTest.WithAbp/appsettings.json b/test/AbpPerfTest/AbpPerfTest.WithAbp/appsettings.json index 9cd22c72c3..3508332bef 100644 --- a/test/AbpPerfTest/AbpPerfTest.WithAbp/appsettings.json +++ b/test/AbpPerfTest/AbpPerfTest.WithAbp/appsettings.json @@ -1,13 +1,13 @@ { "Logging": { "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", + "Default": "Error", + "Microsoft": "Error", "Microsoft.Hosting.Lifetime": "Information" } }, "AllowedHosts": "*", "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithAbp;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithAbp;Trusted_Connection=True" } } diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json index 7f6ca466b2..0a5a9029ec 100644 --- a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json @@ -8,6 +8,6 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithoutAbp;Trusted_Connection=True;MultipleActiveResultSets=true" + "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithoutAbp;Trusted_Connection=True" } } diff --git a/test/AbpPerfTest/_jmeter/SimpleTestPlan.jmx b/test/AbpPerfTest/_jmeter/SimpleTestPlan.jmx index 24327e6e14..0c08c60f20 100644 --- a/test/AbpPerfTest/_jmeter/SimpleTestPlan.jmx +++ b/test/AbpPerfTest/_jmeter/SimpleTestPlan.jmx @@ -16,9 +16,9 @@ continue false - 100 + 20 - 100 + 2000 10 false @@ -84,7 +84,7 @@ - + true @@ -115,7 +115,7 @@ - + diff --git a/test/AbpPerfTest/_jmeter/SimpleTestPlanWithoutAbp.jmx b/test/AbpPerfTest/_jmeter/SimpleTestPlanWithoutAbp.jmx index 39f188daf3..c7d6b3292c 100644 --- a/test/AbpPerfTest/_jmeter/SimpleTestPlanWithoutAbp.jmx +++ b/test/AbpPerfTest/_jmeter/SimpleTestPlanWithoutAbp.jmx @@ -16,9 +16,9 @@ continue false - 100 + 20 - 100 + 500 10 false @@ -84,7 +84,7 @@ - + true @@ -115,7 +115,7 @@ - +