├── .gitignore ├── LICENSE.txt ├── README.md ├── Signum.Engine.Extensions ├── Alerts │ └── AlertLogic.cs ├── Authorization │ ├── ActiveDirectoryAuthorizer.cs │ ├── ActiveDirectoryLogic.cs │ ├── AuthCache.cs │ ├── AuthLogic.cs │ ├── MicrosoftGraphLogic.cs │ ├── OperationAuthLogic.cs │ ├── PermissionAuthLogic.cs │ ├── PropertyAuthLogic.cs │ ├── QueryAuthLogic.cs │ ├── ResetPasswordRequestLogic.cs │ ├── SessionLogLogic.cs │ ├── TypeAuthCache.cs │ ├── TypeAuthLogic.Conditions.cs │ ├── TypeAuthLogic.cs │ ├── UserGraph.cs │ └── UserTicketLogic.cs ├── Basics │ ├── CultureInfoLogic.cs │ ├── DisableLogic.cs │ └── TypeConditionLogic.cs ├── Cache │ ├── CacheLogic.cs │ ├── CachedTable.cs │ ├── CachedTableConstructor.cs │ ├── PostgresCacheInvalidation.cs │ └── ToStringExpressionVisitor.cs ├── Calendar │ └── CalendarDayLogic.cs ├── Chart │ ├── ChartColorLogic.cs │ ├── ChartLogic.cs │ ├── ChartScriptLogic.cs │ ├── Icons │ │ ├── bars.png │ │ ├── bubblepack.png │ │ ├── bubbles.png │ │ ├── calendar.png │ │ ├── charts.psd │ │ ├── columns.png │ │ ├── doughnut.png │ │ ├── forcegraph.png │ │ ├── heatmap.png │ │ ├── lines.png │ │ ├── markermap.png │ │ ├── multibars.png │ │ ├── multicolumns.png │ │ ├── multilines.png │ │ ├── parallelcoordinates.png │ │ ├── pivottable.png │ │ ├── points.png │ │ ├── punchcard.png │ │ ├── stackedareas.png │ │ ├── stackedbars.png │ │ ├── stackedcolumns.png │ │ └── treemap.png │ ├── Scripts │ │ ├── Bars.cs │ │ ├── BubblePack.cs │ │ ├── Bubbleplot.cs │ │ ├── CalendarStream.cs │ │ ├── Columns.cs │ │ ├── Heatmap.cs │ │ ├── Line.cs │ │ ├── Markermap.cs │ │ ├── MultiBars.cs │ │ ├── MultiColumns.cs │ │ ├── MultiLines.cs │ │ ├── ParallelCordiantes.cs │ │ ├── Pie.cs │ │ ├── PivotTable.cs │ │ ├── Punchcard.cs │ │ ├── Scatterplot.cs │ │ ├── StackedBars.cs │ │ ├── StackedColumns.cs │ │ ├── StackedLines.cs │ │ └── TreeMap.cs │ └── UserChartLogic.cs ├── Dashboard │ └── DashboardLogic.cs ├── DiffLog │ └── DiffLogLogic.cs ├── Disconnected │ ├── DisconnectedLogic.cs │ ├── DisconnectedTools.cs │ ├── ExportManager.cs │ ├── ImportManager.cs │ └── LocalBackupManager.cs ├── Dynamic │ ├── DynamicApiLogic.cs │ ├── DynamicCSSOverrideLogic.cs │ ├── DynamicClientLogic.cs │ ├── DynamicExpressionLogic.cs │ ├── DynamicIsolationLogic.cs │ ├── DynamicLogic.cs │ ├── DynamicMixinConnectionLogic.cs │ ├── DynamicSqlMigrationLogic.cs │ ├── DynamicTypeConditionLogic.cs │ ├── DynamicTypeLogic.cs │ ├── DynamicValidationLogic.cs │ └── DynamicViewLogic.cs ├── Excel │ ├── CellBuilder.cs │ ├── ExcelAttachmentLogic.cs │ ├── ExcelExtensions.cs │ ├── ExcelGenerator.cs │ ├── ExcelLogic.cs │ ├── PlainExcelGenerator.cs │ └── plainExcelTemplate.xlsx ├── Files │ ├── AzureBlobStoragebFileTypeAlgorithm.cs │ ├── BigStringLogic.cs │ ├── FileLogic.cs │ ├── FilePathEmbeddedLogic.cs │ ├── FilePathLogic.cs │ ├── FileTypeAlgorithm.cs │ └── FileTypeLogic.cs ├── Help │ ├── BaseHelp.cs │ ├── HelpGenerator.cs │ ├── HelpLogic.cs │ ├── HelpSearch.cs │ ├── HelpTools.cs │ ├── HelpUtilities.cs │ ├── HelpXml.cs │ ├── Sample.xml │ └── SignumFrameworkHelp.xsd ├── Isolation │ └── IsolationLogic.cs ├── Joyride │ └── JoyrideLogic.cs ├── MachineLearning │ ├── AutoconfigureNeuralNetworkAlgorithm.cs │ ├── PredictorAlgorithm.cs │ ├── PredictorCodificationLogic.cs │ ├── PredictorLogic.cs │ ├── PredictorLogicQuery.cs │ ├── PredictorPredictLogic.cs │ └── PredictorSimpleSaver.cs ├── Mailing │ ├── AsyncEmailSenderLogic.cs │ ├── EmailLogic.cs │ ├── EmailMasterTemplateLogic.cs │ ├── EmailModelLogic.cs │ ├── EmailPackageLogic.cs │ ├── EmailSenderConfigurationLogic.cs │ ├── EmailSenderManager.Exchange.cs │ ├── EmailSenderManager.MicrosoftGraph.cs │ ├── EmailSenderManager.SMTP.cs │ ├── EmailSenderManager.cs │ ├── EmailTemplateLogic.cs │ ├── EmailTemplateRenderer.cs │ ├── ImageAttachmentLogic.cs │ ├── Pop3 │ │ ├── IPop3Client.cs │ │ └── Pop3ConfigurationLogic.cs │ └── SendEmailTaskLogic.cs ├── Map │ └── MapLogic.cs ├── Migrations │ ├── CSharpMigrationRunner.cs │ ├── MigrationLogic.cs │ └── SqlMigrationRunner.cs ├── Notes │ └── NoteLogic.cs ├── Omnibox │ └── OmniboxLogic.cs ├── Printing │ └── PrintLogic.cs ├── Processes │ ├── PackageLogic.cs │ ├── ProcessLogic.cs │ └── ProcessRunnerLogic.cs ├── Profiler │ └── ProfilerLogic.cs ├── Rest │ ├── RestApiKeyLogic.cs │ └── RestLogLogic.cs ├── SMS │ ├── SMSLogic.cs │ ├── SMSModelLogic.cs │ ├── SMSProcessAlgortihms.cs │ └── SMSProcessLogic.cs ├── Scheduler │ ├── SchedulerLogic.cs │ ├── SimpleTaskLogic.cs │ └── SystemEventLogLogic.cs ├── Signum.Engine.Extensions.csproj ├── Templating │ ├── CommonTemplate.cs │ ├── Conditions.cs │ ├── TemplatingLogic.cs │ ├── TemplatingSyntax.md │ ├── TextTemplateParser.Nodes.cs │ ├── TextTemplateParser.cs │ └── ValueProviders.cs ├── Toolbar │ └── ToolbarLogic.cs ├── Translation │ ├── AzureTranslator.cs │ ├── DeepLTranslator.cs │ ├── ITranslator.cs │ ├── TranslatedInstanceLogic.cs │ ├── TranslatedInstanceSynchronizer.cs │ ├── TranslationLogic.cs │ ├── TranslationReplacementLogic.cs │ └── TranslationSynchronizer.cs ├── Tree │ └── TreeLogic.cs ├── UserAssets │ ├── QueryTokenSynchronizer.cs │ └── UserAssetsExporterImporter.cs ├── UserQueries │ └── UserQueryLogic.cs ├── ViewLog │ └── ViewLogLogic.cs ├── Word │ ├── TableBinder.cs │ ├── WordAttachmentLogic.cs │ ├── WordImageReplacer.cs │ ├── WordModelLogic.cs │ ├── WordTemplateLogic.cs │ ├── WordTemplateNodes.cs │ ├── WordTemplateParser.cs │ └── WordTemplateRenderer.cs └── Workflow │ ├── CaseActivityLogic.cs │ ├── CaseFlowLogic.cs │ ├── ImportExport │ └── WorkflowImportExport.cs │ ├── LaneBuilder.cs │ ├── PoolBuilder.cs │ ├── WorkflowActivityMonitorLogic.cs │ ├── WorkflowBuilder.cs │ ├── WorkflowEventTaskLogic.cs │ ├── WorkflowLogic.cs │ ├── WorkflowLogicStarter.cs │ ├── WorkflowNodeGraph.cs │ └── WorkflowScriptRunner.cs ├── Signum.Engine.MachineLearning.TensorFlow ├── NetworkBuilder.cs ├── Signum.Engine.MachineLearning.TensorFlow.csproj ├── TensorFlowDefault.cs ├── TensorFlowEncoding.cs └── TensorFlowNeuralNetworkPredictor.cs ├── Signum.Entities.Extensions ├── Alerts │ ├── Alert.cs │ └── SendNotificationEmailTaskEntity .cs ├── Authorization │ ├── ActiveDirectoryConfiguration.cs │ ├── AuthMessages.cs │ ├── AuthTokenConfigration.cs │ ├── PasswordValidInterval.cs │ ├── PermissionSymbol.cs │ ├── ResetPasswordRequest.cs │ ├── Role.cs │ ├── Rules.cs │ ├── ServicesData.cs │ ├── SessionLog.cs │ ├── User.cs │ └── UserTicket.cs ├── Basics │ ├── BootstrapStyle.cs │ ├── CultureInfoEntity.cs │ ├── DateSpanEntity.cs │ ├── DisabledMixin.cs │ ├── FileContent.cs │ └── TypeConditionSymbol.cs ├── Cache │ └── CachePermissions.cs ├── Calendar │ └── CalendarDay.cs ├── Chart │ ├── ChartColor.cs │ ├── ChartColumn.cs │ ├── ChartOmniboxResultGenerator.cs │ ├── ChartParameter.cs │ ├── ChartPermissions.cs │ ├── ChartRequest.cs │ ├── ChartScript.cs │ ├── ChartScriptColumn.cs │ ├── ChartScriptParameter.cs │ ├── ChartUtils.cs │ ├── UserChart.cs │ └── UserChartOmniboxResultGenerator.cs ├── Dashboard │ ├── DashboardEntity.cs │ ├── DashboardOmniboxResultGenerator.cs │ └── PanelPart.cs ├── DiffLog │ ├── DiffLogMixin.cs │ └── TimeMachine.cs ├── Disconnected │ ├── DisconnectedExportEntity.cs │ ├── DisconnectedImportEntity.cs │ └── DisconnectedMachineEntity.cs ├── Dynamic │ ├── Dynamic.cs │ ├── DynamicApi.cs │ ├── DynamicCSSOverride.cs │ ├── DynamicClient.cs │ ├── DynamicCode.cs │ ├── DynamicExpression.cs │ ├── DynamicIsolation.cs │ ├── DynamicMixinConnection.cs │ ├── DynamicSqlMigration.cs │ ├── DynamicType.cs │ ├── DynamicTypeCondition.cs │ ├── DynamicTypeConditionSymbol.cs │ ├── DynamicValidation.cs │ ├── DynamicView.cs │ └── EvalEmbedded.cs ├── Excel │ ├── ExcelAttachmentEntity.cs │ └── ExcelReportEntity.cs ├── Files │ ├── BigStringMixin.cs │ ├── FileEmbedded.cs │ ├── FileEntity.cs │ ├── FilePathEmbedded.cs │ ├── FilePathEntity.cs │ ├── FilePathUtils.cs │ ├── FileTypeSymbol.cs │ └── FileUtils.cs ├── Help │ ├── AppendixHelp.cs │ ├── HelpMessage.cs │ ├── HelpModuleOmniboxResult.cs │ ├── NamespaceHelp.cs │ ├── QueryHelp.cs │ └── TypeHelp.cs ├── Isolation │ └── IsolationEntity.cs ├── Joyride │ ├── Joyride.cs │ ├── JoyrideMessage.cs │ ├── JoyrideStep.cs │ └── JoyrideStepStyle.cs ├── MachineLearning │ ├── NeuralNetworkSettings.cs │ ├── PredictSimpleResults.cs │ ├── Predictor.cs │ ├── PredictorCodification.cs │ ├── PredictorCodification.cs.rej │ ├── PredictorEpochProgress.cs │ └── PredictorMessage.cs ├── Mailing │ ├── EmailConfiguration.cs │ ├── EmailMasterTemplate.cs │ ├── EmailMessage.cs │ ├── EmailModel.cs │ ├── EmailSenderConfiguration.cs │ ├── EmailTemplate.cs │ ├── ImageAttachmentEntity.cs │ ├── Pop3Configuration.cs │ └── SendEmailTask.cs ├── Map │ ├── MapMessage.cs │ └── MapOmniboxResultGenerator.cs ├── Migrations │ ├── CSharpMigration.cs │ ├── ExecutedLoadProcess.cs │ └── SqlMigration.cs ├── Notes │ └── Note.cs ├── Omnibox │ ├── DynamicQueryOmniboxResultGenerator.cs │ ├── EntityOmniboxResultGenerator.cs │ ├── OmniboxParser.cs │ ├── OmniboxUtils.cs │ └── SpecialOmniboxResultGenerator.cs ├── Printing │ ├── PrintLine.cs │ └── PrintPackages.cs ├── Processes │ ├── Package.cs │ └── Process.cs ├── Profiler │ └── ProfilerPermissions.cs ├── Properties │ └── Attributes.cs ├── Rest │ ├── RestApiKeyEntity.cs │ └── RestLog.cs ├── SMS │ ├── SMSCharacters.cs │ ├── SMSCharactersMap.xlsx │ ├── SMSConfigurationEntity.cs │ ├── SMSMessage.cs │ ├── SMSPackages.cs │ └── SMSTemplate.cs ├── Scheduler │ ├── HolidayCalendarEntity.cs │ ├── ScheduleRule.cs │ ├── ScheduledTaskEntity.cs │ ├── ScheduledTaskLogEntity.cs │ ├── SimpleTask.cs │ └── SystemEventLog.cs ├── Signum.Entities.Extensions.csproj ├── Templating │ ├── TemplateApplicable.cs │ ├── TemplateTokenMessage.cs │ └── TemplatingModelConverterSymbole.cs ├── Toolbar │ └── Toolbar.cs ├── Translation │ ├── TranslatedInstance.cs │ ├── TranslationReplacement.cs │ └── TranslatorMessage.cs ├── Translations │ ├── Signum.Entities.Extensions.de.xml │ ├── Signum.Entities.Extensions.en.xml │ ├── Signum.Entities.Extensions.es.xml │ ├── Signum.Entities.Extensions.fa.xml │ ├── Signum.Entities.Extensions.fr.xml │ ├── Signum.Entities.Extensions.it.xml │ ├── Signum.Entities.Extensions.nl.xml │ └── Signum.Entities.Extensions.pt.xml ├── Tree │ ├── TreeEntity.cs │ └── TreeOmniboxResultGenertor.cs ├── UserAssets │ ├── FilterValueConverter.cs │ ├── FilterValueConverters │ │ ├── CurrentEntityConverter.cs │ │ ├── CurrentUserConverter.cs │ │ ├── LiteFilterValueConverter.cs │ │ └── SmartDateTimeFilterValueConverter.cs │ ├── QueryTokenEmbedded.cs │ └── UserAssets.cs ├── UserQueries │ ├── UserQueryEntity.cs │ └── UserQueryOmniboxResultGenerator.cs ├── ViewLog │ └── ViewLogEntity.cs ├── Word │ ├── SystemWordTemplate.cs │ ├── WordAttachmentEntity.cs │ └── WordTemplate.cs └── Workflow │ ├── Case.cs │ ├── CaseActivity.cs │ ├── CaseActivityMixin.cs │ ├── CaseJunction.cs │ ├── CaseNotification.cs │ ├── Workflow.cs │ ├── WorkflowAction.cs │ ├── WorkflowActivity.cs │ ├── WorkflowCondition.cs │ ├── WorkflowConfiguration.cs │ ├── WorkflowConnection.cs │ ├── WorkflowEvent.cs │ ├── WorkflowEventTask.cs │ ├── WorkflowGateway.cs │ ├── WorkflowLane.cs │ ├── WorkflowPool.cs │ ├── WorkflowScript.cs │ ├── WorkflowScriptRetryStrategy.cs │ └── WorkflowTimerCondition.cs ├── Signum.React.Extensions.Selenium ├── BrowserProxy.cs ├── Frames │ ├── EntityButtonContainer.cs │ ├── FrameModalProxy.cs │ ├── FramePageProxy.cs │ ├── LineContainer.cs │ ├── ValidationSummaryContainer.cs │ └── WidgetContainer.cs ├── LineProxies │ ├── BaseLineProxy.cs │ ├── EntityBaseProxy.cs │ ├── EntityComboProxy.cs │ ├── EntityDetailProxy.cs │ ├── EntityLineProxy.cs │ ├── EntityListCheckBoxProxy.cs │ ├── EntityListProxy.cs │ ├── EntityRepeaterProxy.cs │ ├── EntityStripProxy.cs │ ├── EntityTabRepeaterProxy.cs │ ├── EntityTable.cs │ ├── FileLineProxy.cs │ └── ValueLineProxy.cs ├── ModalProxies │ ├── MessageModalProxy.cs │ ├── ModalProxy.cs │ ├── SelectorModalProxy.cs │ └── ValueLineModalProxy.cs ├── Search │ ├── ColumnEditorProxy.cs │ ├── EntityContextMenuProxy.cs │ ├── FilterOptionProxy.cs │ ├── FiltersProxy.cs │ ├── PaginationSelectorProxy.cs │ ├── QueryTokenBuilderProxy.cs │ ├── QueryTokenPartProxy.cs │ ├── ResultTableProxy.cs │ ├── SearchControlProxy.cs │ ├── SearchModalProxy.cs │ ├── SearchPageProxy.cs │ └── ValueSearchControlLineProxy.cs ├── SeleniumExtensions.cs ├── Signum.React.Extensions.Selenium.csproj └── WebElementLocator.cs └── Signum.React.Extensions ├── Alerts ├── AlertController.cs ├── AlertDropdown.css ├── AlertDropdown.tsx ├── AlertsClient.tsx ├── AlertsServer.cs ├── Signum.Entities.Alerts.t4s ├── Signum.Entities.Alerts.ts └── Templates │ ├── Alert.tsx │ └── AlertType.tsx ├── Authorization ├── ActiveDirectoryClient.tsx ├── ActiveDirectoryController.cs ├── Admin │ ├── AuthAdmin.css │ ├── ColoredRadios.tsx │ ├── OperationRulePackControl.tsx │ ├── PermissionRulePackControl.tsx │ ├── PropertyRulePackControl.tsx │ ├── QueryRulePackControl.tsx │ └── TypeRulePackControl.tsx ├── AuthAdminClient.tsx ├── AuthAdminController.cs ├── AuthClient.tsx ├── AuthController.cs ├── AuthServer.cs ├── AuthTokensServer.cs ├── AzureAD │ ├── ADGroup.tsx │ ├── ActiveDirectoryConfiguration.tsx │ └── AzureAD.tsx ├── AzureAuthenticationServer.cs ├── Login │ ├── ChangePasswordPage.tsx │ ├── ChangePasswordSuccessPage.tsx │ ├── ForgotPasswordEmailPage.tsx │ ├── Login.css │ ├── LoginDropdown.tsx │ ├── LoginPage.tsx │ └── ResetPassword.tsx ├── Signum.Entities.Authorization.t4s ├── Signum.Entities.Authorization.ts ├── Templates │ ├── DoublePassword.tsx │ ├── Role.tsx │ └── User.tsx ├── UserTicketServer.cs └── WindowsAuthenticationServer.cs ├── Basics ├── BasicsClient.tsx ├── Color.ts ├── DisabledClient.tsx ├── Signum.Entities.Basics.t4s ├── Signum.Entities.Basics.ts └── Templates │ ├── CollapsableCard.tsx │ ├── ColorTypeahead.tsx │ ├── DateSpan.tsx │ ├── IconTypeahead.tsx │ ├── PropertyRouteCombo.tsx │ ├── ScrollPanel.tsx │ └── TimeSpan.tsx ├── Cache ├── CacheClient.tsx ├── CacheController.cs ├── CacheServer.cs ├── CacheStatisticsPage.tsx ├── Signum.Entities.Cache.t4s └── Signum.Entities.Cache.ts ├── Chart ├── Chart.css ├── ChartButton.tsx ├── ChartClient.tsx ├── ChartController.cs ├── ChartOmniboxProvider.tsx ├── ChartPalette │ ├── ChartPaletteClient.tsx │ ├── ChartPaletteControl.tsx │ └── ChartPaletteController.cs ├── ChartServer.cs ├── D3Scripts │ ├── Bars.tsx │ ├── BubblePack.tsx │ ├── Bubbleplot.tsx │ ├── CalendarStream.tsx │ ├── Columns.tsx │ ├── CombinedLinesAndColumns.tsx │ ├── Components │ │ ├── Axis.tsx │ │ ├── ChartUtils.ts │ │ ├── InitialMessage.tsx │ │ ├── Legend.tsx │ │ ├── PivotTable.ts │ │ ├── ReactChart.tsx │ │ ├── ReactChartCombined.tsx │ │ ├── Rule.tsx │ │ ├── Stratify.ts │ │ ├── TextEllipsis.tsx │ │ └── Ticks.tsx │ ├── Line.tsx │ ├── MultiBars.tsx │ ├── MultiColumns.tsx │ ├── MultiLines.tsx │ ├── ParallelCoordiantes.tsx │ ├── Pie.tsx │ ├── Punchcard.tsx │ ├── Scatterplot.tsx │ ├── StackedBars.tsx │ ├── StackedColumns.tsx │ ├── StackedLines.tsx │ └── TreeMap.tsx ├── GoogleMapScripts │ ├── GoogleMapStyles.ts │ ├── GoogleMapsChartUtils.tsx │ ├── Heatmap.tsx │ └── Markermap.tsx ├── HtmlScripts │ ├── PivotTable.css │ └── PivotTable.tsx ├── Signum.Entities.Chart.t4s ├── Signum.Entities.Chart.ts ├── Templates │ ├── ChartBuilder.tsx │ ├── ChartColumn.tsx │ ├── ChartRenderer.tsx │ ├── ChartRendererCombined.tsx │ ├── ChartRequestPage.tsx │ ├── ChartRequestView.tsx │ ├── ChartTable.tsx │ └── FullscreenComponent.tsx ├── UserChart │ ├── UserChart.tsx │ ├── UserChartClient.tsx │ ├── UserChartController.cs │ ├── UserChartMenu.tsx │ └── UserChartPage.tsx ├── UserChartOmniboxProvider.tsx └── UserChartToolbarConfig.tsx ├── Codemirror ├── CSSCodeMirror.tsx ├── CSharpCodeMirror.tsx ├── CodeMirrorComponent.tsx ├── HtmlCodemirror.tsx ├── JavascriptCodeMirror.tsx ├── SqlCodeMirror.tsx └── XmlCodeMirror.tsx ├── Dashboard ├── Admin │ ├── CombinedUserChartPart.tsx │ ├── Dashboard.tsx │ ├── EntityGridRepeater.tsx │ ├── LinkListPart.tsx │ ├── UserChartPart.tsx │ ├── UserQueryPart.tsx │ └── ValueUserQueryListPart.tsx ├── Dashboard.css ├── DashboardClient.tsx ├── DashboardController.cs ├── DashboardOmniboxProvider.tsx ├── DashboardServer.cs ├── DashboardToolbarConfig.tsx ├── Signum.Entities.Dashboard.t4s ├── Signum.Entities.Dashboard.ts └── View │ ├── CombinedUserChartPart.tsx │ ├── DashboardPage.tsx │ ├── DashboardView.tsx │ ├── LinkListPart.tsx │ ├── UserChartPart.tsx │ ├── UserQueryPart.tsx │ ├── UserTreePart.tsx │ └── ValueUserQueryListPart.tsx ├── DiffLog ├── DiffLogClient.tsx ├── DiffLogController.cs ├── DiffLogServer.cs ├── Signum.Entities.DiffLog.t4s ├── Signum.Entities.DiffLog.ts ├── Templates │ ├── DiffDocument.tsx │ ├── DiffLog.css │ ├── OperationLog.tsx │ └── TimeMachinePage.tsx └── TimeMachineController.cs ├── Disconnected ├── DisconnectedServer.cs ├── Signum.Entities.Disconnected.t4s └── Signum.Entities.Disconnected.ts ├── Dynamic ├── Api │ └── DynamicApi.tsx ├── CSS │ └── DynamicCSSOverride.tsx ├── Client │ └── DynamicClientComponent.tsx ├── DynamicApiClient.tsx ├── DynamicCSSOverrideClient.tsx ├── DynamicClient.tsx ├── DynamicClientClient.tsx ├── DynamicClientController.cs ├── DynamicClientOptions.tsx ├── DynamicController.cs ├── DynamicExpressionClient.tsx ├── DynamicExpressionController.cs ├── DynamicIsolationClient.tsx ├── DynamicPanelPage.css ├── DynamicPanelPage.tsx ├── DynamicServer.cs ├── DynamicTypeClient.tsx ├── DynamicTypeConditionClient.tsx ├── DynamicTypeConditionController.cs ├── DynamicTypeController.cs ├── DynamicValidationClient.tsx ├── DynamicValidationController.cs ├── DynamicViewClient.tsx ├── DynamicViewController.cs ├── Expression │ └── DynamicExpression.tsx ├── Signum.Entities.Dynamic.t4s ├── Signum.Entities.Dynamic.ts ├── SignumDynamicApiControllerProvider.cs ├── Type │ ├── DynamicMixinConnection.tsx │ ├── DynamicSqlMigration.tsx │ ├── DynamicType.css │ ├── DynamicType.tsx │ ├── DynamicTypeDefinitionComponent.tsx │ └── ValueComponent.tsx ├── TypeCondition │ └── DynamicTypeCondition.tsx ├── Validation │ └── DynamicValidation.tsx └── View │ ├── Designer.tsx │ ├── DynamicView.css │ ├── DynamicView.tsx │ ├── DynamicViewComponent.tsx │ ├── DynamicViewOverride.tsx │ ├── DynamicViewSelector.tsx │ ├── DynamicViewTabs.tsx │ ├── DynamicViewTree.css │ ├── DynamicViewTree.tsx │ ├── FindOptionsComponent.tsx │ ├── FindOptionsExpression.tsx │ ├── GlobalModules.ts │ ├── HtmlAttributesComponent.tsx │ ├── HtmlAttributesExpression.tsx │ ├── ModulesHelp.tsx │ ├── NodeSelectorModal.tsx │ ├── NodeUtils.tsx │ ├── Nodes.tsx │ ├── ShowCodeModal.tsx │ ├── StyleOptionsComponent.tsx │ └── StyleOptionsExpression.tsx ├── Excel ├── ExcelClient.tsx ├── ExcelController.cs ├── ExcelMenu.tsx ├── ExcelServer.cs ├── Signum.Entities.Excel.t4s ├── Signum.Entities.Excel.ts └── Templates │ └── ExcelReport.tsx ├── Files ├── FileDownloader.tsx ├── FileImage.tsx ├── FileImageLine.tsx ├── FileLine.tsx ├── FileUploader.tsx ├── Files.css ├── Files.tsx ├── FilesClient.tsx ├── FilesController.cs ├── FilesServer.cs ├── ImageModal.tsx ├── MultiFileImageLine.tsx ├── MultiFileLine.tsx ├── Signum.Entities.Files.t4s └── Signum.Entities.Files.ts ├── Help ├── Help.css ├── HelpClient.tsx ├── HelpController.cs ├── HelpOmniboxProvider.tsx ├── HelpServer.cs ├── Pages │ ├── AppendixHelpPage.tsx │ ├── EditableText.tsx │ ├── HelpIndexPage.tsx │ ├── NamespaceHelpPage.tsx │ └── TypeHelpPage.tsx ├── Signum.Entities.Help.t4s └── Signum.Entities.Help.ts ├── HtmlEditor ├── HtmlContentStateConverter.tsx ├── HtmlEditor.css ├── HtmlEditor.tsx ├── HtmlEditorButtons.tsx ├── Plugins │ ├── BasicCommandsPlugin.tsx │ ├── ImagePlugin.tsx │ └── LinksPlugin.tsx ├── draftjs-to-html.ts └── html-to-draftjs.d.ts ├── Isolation ├── IsolationClient.tsx ├── IsolationController.cs ├── IsolationDropdown.tsx ├── IsolationFilter.cs ├── IsolationServer.cs ├── IsolationWidget.tsx ├── Signum.Entities.Isolation.t4s └── Signum.Entities.Isolation.ts ├── Joyride ├── JoyrideClient.tsx ├── JoyrideComponent.tsx ├── JoyrideNavItem.tsx ├── Signum.Entities.Joyride.t4s ├── Signum.Entities.Joyride.ts ├── Templates │ ├── Joyride.tsx │ ├── JoyrideStep.tsx │ └── JoyrideStepStyle.tsx └── joyride.d.ts ├── MachineLearning ├── PredictRequest.cs ├── PredictorClient.tsx ├── PredictorController.cs ├── PredictorServer.cs ├── Signum.Entities.MachineLearning.t4s ├── Signum.Entities.MachineLearning.ts └── Templates │ ├── LineChart.tsx │ ├── NeuralNetworkSettings.tsx │ ├── PredictModal.tsx │ ├── PredictSimpleResult.tsx │ ├── Predictor.tsx │ ├── PredictorClassificationMetrics.tsx │ ├── PredictorMetrics.tsx │ ├── PredictorRegressionMetrics.tsx │ ├── PredictorSubQuery.tsx │ ├── ProgressBar.tsx │ └── SimpleResultButton.tsx ├── Mailing ├── AsyncEmailSenderPage.tsx ├── Mailing.css ├── MailingClient.tsx ├── MailingController.cs ├── MailingMenu.tsx ├── MailingServer.cs ├── Pop3 │ ├── Pop3Configuration.tsx │ └── Pop3Reception.tsx ├── Signum.Entities.Mailing.t4s ├── Signum.Entities.Mailing.ts └── Templates │ ├── EmailConfiguration.tsx │ ├── EmailFrom.tsx │ ├── EmailMasterTemplate.tsx │ ├── EmailMessage.tsx │ ├── EmailPackage.tsx │ ├── EmailRecipient.tsx │ ├── EmailSenderConfiguration.tsx │ ├── EmailTemplate.tsx │ ├── IframeRenderer.tsx │ ├── MicrosoftGraph.tsx │ └── SendEmailTask.tsx ├── Map ├── MapClient.tsx ├── MapController.cs ├── MapOmniboxProvider.tsx ├── MapServer.cs ├── Operation │ ├── OperationMap.ts │ ├── OperationMapPage.tsx │ └── operationMap.css ├── OperationMAp.cs ├── Schema │ ├── ColorProviders │ │ ├── Auth.tsx │ │ ├── Cache.tsx │ │ ├── Default.ts │ │ ├── Disconnected.tsx │ │ └── Isolation.tsx │ ├── SchemaMap.ts │ ├── SchemaMapPage.tsx │ └── schemaMap.css ├── SchemaMap.cs ├── Signum.Entities.Map.t4s ├── Signum.Entities.Map.ts └── Utils.ts ├── Migrations ├── Signum.Entities.Migrations.t4s └── Signum.Entities.Migrations.ts ├── Notes ├── NotesClient.tsx ├── Signum.Entities.Notes.t4s ├── Signum.Entities.Notes.ts └── Templates │ └── Note.tsx ├── Omnibox ├── DynamicQueryOmniboxProvider.tsx ├── EntityOmniboxProvider.tsx ├── OmniboxAutocomplete.tsx ├── OmniboxClient.tsx ├── OmniboxController.cs ├── OmniboxServer.cs ├── ReactSpecialOmniboxGenerator.cs ├── Signum.Entities.Omnibox.t4s ├── Signum.Entities.Omnibox.ts └── SpecialOmniboxProvider.tsx ├── Printing ├── PrintClient.tsx ├── PrintController.cs ├── PrintPanelPage.tsx ├── PrintServer.cs ├── Signum.Entities.Printing.t4s ├── Signum.Entities.Printing.ts └── Templates │ ├── PrintLine.tsx │ └── PrintPackage.tsx ├── Processes ├── ProcessClient.tsx ├── ProcessController.cs ├── ProcessPanelPage.tsx ├── ProcessServer.cs ├── Processes.css ├── Signum.Entities.Processes.t4s ├── Signum.Entities.Processes.ts └── Templates │ ├── Package.tsx │ ├── PackageLine.tsx │ ├── PackageOperation.tsx │ └── Process.tsx ├── Profiler ├── Heavy │ ├── HeavyEntryPage.tsx │ ├── HeavyListPage.tsx │ └── Profiler.css ├── ProfilerClient.tsx ├── ProfilerHeavyController.cs ├── ProfilerServer.cs ├── ProfilerTimesController.cs ├── Signum.Entities.Profiler.t4s ├── Signum.Entities.Profiler.ts └── Times │ ├── Times.css │ └── TimesPage.tsx ├── Properties ├── launchSettings.json └── launchSettings.json.orig ├── Rest ├── RestApiKeyController.cs ├── RestClient.tsx ├── RestLogController.cs ├── RestLogFilter.cs ├── RestLogServer.cs ├── RestServer.cs ├── Signum.Entities.Rest.t4s ├── Signum.Entities.Rest.ts └── Templates │ ├── RestApiKey.tsx │ └── RestLog.tsx ├── SMS ├── SMSClient.tsx ├── SMSController.cs ├── SMSServer.cs ├── Signum.Entities.SMS.t4s ├── Signum.Entities.SMS.ts └── Templates │ ├── MultipleSMS.tsx │ ├── SMSMessage.tsx │ ├── SMSSendPackage.tsx │ ├── SMSTemplate.tsx │ └── SMSUpdatePackage.tsx ├── Scheduler ├── SchedulerClient.tsx ├── SchedulerController.cs ├── SchedulerPanelPage.tsx ├── SchedulerServer.cs ├── Signum.Entities.Scheduler.t4s ├── Signum.Entities.Scheduler.ts ├── SystemEventServer.cs └── Templates │ ├── HolidayCalendar.tsx │ ├── ScheduleRuleMinutely.tsx │ ├── ScheduleRuleMonths.tsx │ ├── ScheduleRuleWeekDays.tsx │ └── ScheduledTask.tsx ├── Signum.React.Extensions.csproj ├── Templating ├── Signum.Entities.Templating.t4s ├── Signum.Entities.Templating.ts ├── TemplateControls.tsx ├── Templates │ ├── QueryModel.tsx │ └── TemplateApplicable.tsx └── TemplatingServer.cs ├── Toolbar ├── QueryToolbarConfig.tsx ├── Sidebar.css ├── SidebarContainer.tsx ├── Signum.Entities.Toolbar.t4s ├── Signum.Entities.Toolbar.ts ├── Templates │ ├── Toolbar.css │ ├── Toolbar.tsx │ ├── ToolbarElement.tsx │ ├── ToolbarMainRenderer.tsx │ ├── ToolbarMenu.tsx │ └── ToolbarRenderer.tsx ├── ToolbarClient.tsx ├── ToolbarController.cs └── ToolbarServer.cs ├── Translation ├── Code │ ├── TranslationCodeStatus.tsx │ ├── TranslationCodeSync.tsx │ ├── TranslationCodeSyncNamespaces.tsx │ ├── TranslationCodeView.tsx │ └── TranslationTypeTable.tsx ├── CultureClient.ts ├── CultureDropdown.tsx ├── CulturesController.cs ├── Instances │ ├── TranslatedInstanceStatus.tsx │ ├── TranslatedInstanceSync.tsx │ └── TranslatedInstanceView.tsx ├── Signum.Entities.Translation.t4s ├── Signum.Entities.Translation.ts ├── TranslatedInstanceClient.tsx ├── TranslatedInstanceController.cs ├── TranslatedInstanceTools.tsx ├── Translation.css ├── TranslationClient.tsx ├── TranslationController.cs └── TranslationServer.cs ├── Tree ├── Signum.Entities.Tree.t4s ├── Signum.Entities.Tree.ts ├── Templates │ └── MoveTreeModel.tsx ├── TreeButton.tsx ├── TreeClient.tsx ├── TreeController.cs ├── TreeModal.tsx ├── TreeOmniboxProvider.tsx ├── TreePage.tsx ├── TreeServer.cs ├── TreeViewer.css └── TreeViewer.tsx ├── TypeHelp ├── TypeHelpButtonBarComponent.tsx ├── TypeHelpClient.tsx ├── TypeHelpComponent.css ├── TypeHelpComponent.tsx ├── TypeHelpController.cs └── TypeHelpServer.cs ├── UserAssets ├── ImportAssetsPage.tsx ├── Signum.Entities.UserAssets.t4s ├── Signum.Entities.UserAssets.ts ├── Templates │ ├── FilterBuilderEmbedded.tsx │ └── QueryTokenEmbeddedBuilder.tsx ├── UserAssetClient.tsx ├── UserAssetController.cs └── UserAssetServer.cs ├── UserQueries ├── Signum.Entities.UserQueries.t4s ├── Signum.Entities.UserQueries.ts ├── StringDistance.tsx ├── Templates │ ├── UserQuery.tsx │ └── UserQueryPage.tsx ├── UserQueryClient.tsx ├── UserQueryController.cs ├── UserQueryMenu.tsx ├── UserQueryOmniboxProvider.tsx ├── UserQueryServer.cs └── UserQueryToolbarConfig.tsx ├── ViewLog ├── Signum.Entities.ViewLog.t4s └── Signum.Entities.ViewLog.ts ├── Word ├── Signum.Entities.Word.t4s ├── Signum.Entities.Word.ts ├── Templates │ └── WordTemplate.tsx ├── WordClient.tsx ├── WordController.cs ├── WordEntityMenu.tsx ├── WordSearchMenu.tsx └── WordServer.cs ├── Workflow ├── ActivityMonitor │ ├── WorkflowActivityMonitorPage.tsx │ └── WorkflowActivityStatsModal.tsx ├── Bpmn │ ├── Bpmn.css │ ├── BpmnModelerComponent.tsx │ ├── BpmnUtils.tsx │ ├── CaseFlowRenderer.ts │ ├── CaseFlowViewerComponent.tsx │ ├── ConnectionIcons.ts │ ├── CustomContextPad.ts │ ├── CustomMinimap.ts │ ├── CustomPopupMenu.ts │ ├── CustomRenderer.ts │ ├── WorkflowActivityMonitorRenderer.ts │ └── WorkflowActivityMonitorViewerComponent.tsx ├── Case │ ├── ActivityWithRemarks.tsx │ ├── Case.tsx │ ├── CaseAct.css │ ├── CaseActivityStatsModal.tsx │ ├── CaseButtonBar.tsx │ ├── CaseFlowButton.tsx │ ├── CaseFrameModal.tsx │ ├── CaseFramePage.tsx │ ├── CaseFromSenderInfo.tsx │ ├── CaseTagType.tsx │ ├── CaseTagsModel.tsx │ ├── Inbox.css │ ├── InboxFilter.tsx │ ├── InlineCaseTags.tsx │ ├── Tag.css │ └── Tag.tsx ├── Signum.Entities.Workflow.t4s ├── Signum.Entities.Workflow.ts ├── Workflow │ ├── InitialWorkflow.xml │ ├── Workflow.tsx │ ├── WorkflowAction.tsx │ ├── WorkflowActivityModel.tsx │ ├── WorkflowCondition.tsx │ ├── WorkflowConnectionModel.tsx │ ├── WorkflowDropdown.tsx │ ├── WorkflowEventModel.tsx │ ├── WorkflowEventTask.tsx │ ├── WorkflowEventTaskActionComponent.tsx │ ├── WorkflowEventTaskConditionComponent.tsx │ ├── WorkflowHelpComponent.tsx │ ├── WorkflowLaneModel.tsx │ ├── WorkflowPanelPage.tsx │ ├── WorkflowReplacementComponent.tsx │ ├── WorkflowScript.tsx │ └── WorkflowTimerCondition.tsx ├── WorkflowClient.tsx ├── WorkflowController.cs ├── WorkflowServer.cs ├── WorkflowToolbarConfig.tsx └── bpmn-js.d.ts ├── package.json ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | #ignore thumbnails created by windows 2 | Thumbs.db 3 | #Ignore files build by Visual Studio 4 | *.obj 5 | *.exe 6 | *.pdb 7 | *.user 8 | *.aps 9 | *.pch 10 | *.vspscc 11 | *_i.c 12 | *_p.c 13 | *.ncb 14 | *.suo 15 | *.tlb 16 | *.tlh 17 | *.bak 18 | *.cache 19 | *.ilk 20 | *.log 21 | [Bb]in 22 | [Dd]ebug*/ 23 | *.lib 24 | *.sbr 25 | obj/ 26 | [Rr]elease*/ 27 | _ReSharper*/ 28 | [Tt]est[Rr]esult* 29 | *.js.map 30 | *.js 31 | *.ncrunchproject 32 | /Signum.React.Extensions/ts_out/* 33 | /Signum.React.Extensions/node_modules/** 34 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Signum Software 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Signum Extensions 2 | This repository is deprecated and all commits have been merged into https://github.com/signumsoftware/framework to improve developer ergonomics. 3 | 4 | Check https://github.com/signumsoftware/framework/commit/b7848eff42f5d242ed73035a5cc91f35d5ec20c8#commitcomment-55557696 5 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Calendar/CalendarDayLogic.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine; 2 | using Signum.Engine.DynamicQuery; 3 | using Signum.Engine.Maps; 4 | using Signum.Engine.Operations; 5 | using Signum.Entities; 6 | using Signum.Entities.Calendar; 7 | using Signum.Utilities; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Reflection; 11 | using System.Text; 12 | 13 | namespace Signum.Engine.Calendar 14 | { 15 | public static class CalendarDayLogic 16 | { 17 | public static void Start(SchemaBuilder sb) 18 | { 19 | if (sb.NotDefined(MethodBase.GetCurrentMethod())) 20 | { 21 | sb.Include() 22 | .WithQuery(() => e => new 23 | { 24 | Entity = e, 25 | e.Id, 26 | e.Date, 27 | }); 28 | } 29 | } 30 | 31 | public static void CreateDays(Date startDate, Date endDate) 32 | { 33 | List days = new List(); 34 | for (Date d = startDate; d < endDate; d = d.AddDays(1)) 35 | days.Add(new CalendarDayEntity { Date = d }); 36 | days.BulkInsert(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/bars.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/bubblepack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/bubblepack.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/bubbles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/bubbles.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/calendar.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/charts.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/charts.psd -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/columns.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/doughnut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/doughnut.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/forcegraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/forcegraph.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/heatmap.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/lines.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/markermap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/markermap.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/multibars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/multibars.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/multicolumns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/multicolumns.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/multilines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/multilines.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/parallelcoordinates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/parallelcoordinates.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/pivottable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/pivottable.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/points.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/punchcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/punchcard.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/stackedareas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/stackedareas.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/stackedbars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/stackedbars.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/stackedcolumns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/stackedcolumns.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Chart/Icons/treemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Chart/Icons/treemap.png -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Excel/plainExcelTemplate.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Engine.Extensions/Excel/plainExcelTemplate.xlsx -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Files/FileLogic.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Engine.Maps; 3 | using Signum.Engine.DynamicQuery; 4 | using Signum.Entities.Files; 5 | using System.Reflection; 6 | using System.Linq.Expressions; 7 | using Signum.Entities; 8 | using Signum.Utilities; 9 | using Signum.Engine.Basics; 10 | 11 | namespace Signum.Engine.Files 12 | { 13 | public static class FileLogic 14 | { 15 | public static void Start(SchemaBuilder sb) 16 | { 17 | if (sb.NotDefined(MethodInfo.GetCurrentMethod())) 18 | { 19 | sb.Include() 20 | .WithQuery(() => a => new 21 | { 22 | Entity = a, 23 | a.Id, 24 | a.FileName, 25 | }); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Help/HelpUtilities.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | 3 | namespace Signum.Engine.Help 4 | { 5 | public static class HelpUtilities 6 | { 7 | public static string Extract(this string s, Match m) 8 | { 9 | return Extract(s, m.Index, m.Index + m.Length); 10 | } 11 | 12 | public static string Extract(this string s, int start, int end) 13 | { 14 | if (s.Length <= etcLength) return s; 15 | 16 | int m = (start + end) / 2; 17 | int limMin = m - lp2; 18 | int limMax = m + lp2; 19 | if (limMin < 0) 20 | { 21 | limMin = 0; 22 | limMax = etcLength; 23 | } 24 | if (limMax > s.Length) 25 | { 26 | limMax = s.Length; 27 | limMin = limMax - etcLength; 28 | } 29 | 30 | return (limMin != 0 ? "..." : "") 31 | + s.Substring(limMin, limMax - limMin) 32 | + (limMax != end ? "..." : ""); 33 | } 34 | 35 | const int etcLength = 300; 36 | const int lp2 = etcLength / 2; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Help/Sample.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | A labour day calendar that can be used for [ScheduleTaskEntity] 4 | 5 | The Name of the Calendar 6 | A collection of [HolydayEntity] 7 | 8 | 9 | Remove the Calendar from the database 10 | 11 | 12 | Default queries for calendars 13 | Shows all the removed calendars 14 | 15 | 16 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Map/MapLogic.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Maps; 2 | using Signum.Engine.Authorization; 3 | using System.Reflection; 4 | using Signum.Entities.Map; 5 | 6 | namespace Signum.Engine.Map 7 | { 8 | public static class MapLogic 9 | { 10 | 11 | public static void Start(SchemaBuilder sb) 12 | { 13 | if (sb.NotDefined(MethodInfo.GetCurrentMethod())) 14 | { 15 | PermissionAuthLogic.RegisterPermissions(MapPermission.ViewMap); 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Omnibox/OmniboxLogic.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Signum.Engine.Maps; 5 | using Signum.Entities; 6 | using Signum.Utilities; 7 | using Signum.Engine.DynamicQuery; 8 | using Signum.Entities.Authorization; 9 | using System.Reflection; 10 | using Signum.Entities.Basics; 11 | using Signum.Engine.Operations; 12 | using System.Linq.Expressions; 13 | using Signum.Entities.Notes; 14 | using Signum.Engine.Extensions.Basics; 15 | using Signum.Engine.Basics; 16 | using Signum.Engine; 17 | using Signum.Engine.Authorization; 18 | using Signum.Entities.Omnibox; 19 | 20 | namespace Signum.Engine.Omnibox 21 | { 22 | public static class OmniboxLogic 23 | { 24 | public static void Start(SchemaBuilder sb) 25 | { 26 | if (sb.NotDefined(MethodBase.GetCurrentMethod())) 27 | { 28 | PermissionAuthLogic.RegisterTypes(typeof(OmniboxPermission)); 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/SMS/SMSProcessAlgortihms.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Signum.Engine.Processes; 3 | using Signum.Entities.SMS; 4 | using Signum.Engine.Operations; 5 | 6 | namespace Signum.Engine.SMS 7 | { 8 | public class SMSMessageSendProcessAlgortihm : IProcessAlgorithm 9 | { 10 | public void Execute(ExecutingProcess executingProcess) 11 | { 12 | SMSSendPackageEntity package = (SMSSendPackageEntity)executingProcess.Data!; 13 | 14 | executingProcess.ForEachLine(package.SMSMessages().Where(s => s.State == SMSMessageState.Created), 15 | sms => sms.Execute(SMSMessageOperation.Send)); 16 | } 17 | } 18 | 19 | public class SMSMessageUpdateStatusProcessAlgorithm : IProcessAlgorithm 20 | { 21 | public void Execute(ExecutingProcess executingProcess) 22 | { 23 | SMSUpdatePackageEntity package = (SMSUpdatePackageEntity)executingProcess.Data!; 24 | 25 | executingProcess.ForEachLine(package.SMSMessages().Where(sms => sms.State == SMSMessageState.Sent && !sms.UpdatePackageProcessed), sms => 26 | { 27 | sms.Execute(SMSMessageOperation.UpdateStatus); 28 | }); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Templating/TemplatingLogic.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Maps; 2 | using Signum.Entities; 3 | using Signum.Entities.Templating; 4 | using Signum.Utilities; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Reflection; 8 | 9 | namespace Signum.Engine.Templating 10 | { 11 | 12 | public static class TemplatingLogic 13 | { 14 | public static Dictionary> Converters = new Dictionary>(); 15 | 16 | public static void Start(SchemaBuilder sb) 17 | { 18 | if (sb.NotDefined(MethodInfo.GetCurrentMethod())) 19 | { 20 | SymbolLogic.Start(sb, () => Converters.Keys); 21 | } 22 | } 23 | 24 | public static void Register(ModelConverterSymbol modelConverter, Func converterFunction) 25 | where F : ModifiableEntity 26 | where T : ModifiableEntity 27 | { 28 | Converters[modelConverter] = mod => converterFunction((F)mod); 29 | } 30 | 31 | public static ModifiableEntity Convert(this ModelConverterSymbol converterSymbol, ModifiableEntity entity) 32 | { 33 | return Converters.GetOrThrow(converterSymbol)(entity); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Signum.Engine.Extensions/Workflow/WorkflowLogicStarter.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Maps; 2 | using Signum.Entities.Workflow; 3 | using System; 4 | 5 | namespace Signum.Engine.Workflow 6 | { 7 | 8 | public static class WorkflowLogicStarter 9 | { 10 | public static void Start(SchemaBuilder sb, Func getConfiguration) 11 | { 12 | WorkflowLogic.Start(sb, getConfiguration); 13 | CaseActivityLogic.Start(sb); 14 | WorkflowEventTaskLogic.Start(sb); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Signum.Engine.MachineLearning.TensorFlow/Signum.Engine.MachineLearning.TensorFlow.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | enable 6 | nullable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Signum.Engine.MachineLearning.TensorFlow/TensorFlowDefault.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.MachineLearning; 3 | using Signum.Utilities; 4 | 5 | namespace Signum.Engine.MachineLearning.TensorFlow 6 | { 7 | public static class TensorFlowDefault 8 | { 9 | static readonly object Zero = 0; 10 | public static object? GetDefaultValue(PredictorCodification c) 11 | { 12 | switch (c.Column.NullHandling) 13 | { 14 | case PredictorColumnNullHandling.Zero: return c.Column.Token.Type.IsClass || c.Column.Token.Type.IsInterface ? null : Zero; 15 | case PredictorColumnNullHandling.Error: throw new Exception($"Null found on {c.Column.Token} of {(c.Column is PredictorColumnSubQuery pcsq ? pcsq.SubQuery.ToString() : "MainQuery")}"); 16 | case PredictorColumnNullHandling.Average: return c.Average; 17 | case PredictorColumnNullHandling.Min: return c.Min; 18 | case PredictorColumnNullHandling.Max: return c.Max; 19 | default: throw new UnexpectedValueException(c.Column.NullHandling); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Alerts/SendNotificationEmailTaskEntity .cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities; 2 | using Signum.Entities.Mailing; 3 | using Signum.Entities.Scheduler; 4 | using Signum.Utilities; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace Signum.Entities.Alerts 12 | { 13 | [Serializable, EntityKind(EntityKind.Shared, EntityData.Master)] 14 | public class SendNotificationEmailTaskEntity : Entity, ITaskEntity 15 | { 16 | [Unit("mins"), NumberIsValidator(ComparisonType.GreaterThanOrEqualTo, 0)] 17 | public int SendNotificationsOlderThan { get; set; } 18 | 19 | public SendAlertTypeBehavior SendBehavior { get; set; } 20 | 21 | [PreserveOrder, NoRepeatValidator] 22 | public MList AlertTypes { get; set; } = new MList(); 23 | } 24 | 25 | public enum SendAlertTypeBehavior 26 | { 27 | All, 28 | Include, 29 | Exclude, 30 | } 31 | 32 | 33 | [AutoInit] 34 | public static class SendNotificationEmailTaskOperation 35 | { 36 | public static ExecuteSymbol Save; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Authorization/AuthTokenConfigration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Authorization 4 | { 5 | [Serializable] 6 | public class AuthTokenConfigurationEmbedded : EmbeddedEntity 7 | { 8 | [Unit("mins")] 9 | public int RefreshTokenEvery { get; set; } = 30; 10 | 11 | [DateInPastValidator] 12 | public DateTime? RefreshAnyTokenPreviousTo { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Authorization/PasswordValidInterval.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Authorization 4 | { 5 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 6 | public class PasswordExpiresIntervalEntity : Entity 7 | { 8 | public decimal Days { get; set; } 9 | 10 | public decimal DaysWarning { get; set; } 11 | 12 | public bool Enabled { get; set; } 13 | } 14 | 15 | [AutoInit] 16 | public static class PasswordExpiresIntervalOperation 17 | { 18 | public static ExecuteSymbol Save; 19 | } 20 | 21 | [Serializable] 22 | public class PasswordExpiredException : ApplicationException 23 | { 24 | public PasswordExpiredException() { } 25 | public PasswordExpiredException(string message) : base(message) { } 26 | public PasswordExpiredException(string message, Exception inner) : base(message, inner) { } 27 | protected PasswordExpiredException( 28 | System.Runtime.Serialization.SerializationInfo info, 29 | System.Runtime.Serialization.StreamingContext context) 30 | : base(info, context) 31 | { } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Authorization/PermissionSymbol.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Authorization 4 | { 5 | [Serializable] 6 | public class PermissionSymbol : Symbol 7 | { 8 | private PermissionSymbol() { } 9 | 10 | public PermissionSymbol(Type declaringType, string fieldName) : 11 | base(declaringType, fieldName) 12 | { 13 | } 14 | } 15 | 16 | [AutoInit] 17 | public static class BasicPermission 18 | { 19 | public static PermissionSymbol AdminRules; 20 | public static PermissionSymbol AutomaticUpgradeOfProperties; 21 | public static PermissionSymbol AutomaticUpgradeOfQueries; 22 | public static PermissionSymbol AutomaticUpgradeOfOperations; 23 | } 24 | 25 | [AutoInit] 26 | public static class ActiveDirectoryPermission 27 | { 28 | public static PermissionSymbol InviteUsersFromAD; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Authorization/ResetPasswordRequest.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Scheduler; 2 | using System; 3 | using System.Linq.Expressions; 4 | using Signum.Utilities; 5 | 6 | namespace Signum.Entities.Authorization 7 | { 8 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 9 | public class ResetPasswordRequestEntity : Entity 10 | { 11 | [UniqueIndex(AvoidAttachToUniqueIndexes = true)] 12 | public string Code { get; set; } 13 | 14 | public UserEntity User { get; set; } 15 | 16 | public DateTime RequestDate { get; set; } 17 | 18 | public bool Used { get; set; } 19 | 20 | private static Expression> IsValidExpression = r => 21 | !r.Used && TimeZoneManager.Now < r.RequestDate.AddHours(24); 22 | 23 | [ExpressionField(nameof(IsValidExpression))] 24 | public bool IsValid => IsValidExpression.Evaluate(this); 25 | } 26 | 27 | [AutoInit] 28 | public static class ResetPasswordRequestOperation 29 | { 30 | public static readonly ExecuteSymbol Execute; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Authorization/UserTicket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Utilities; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace Signum.Entities.Authorization 6 | { 7 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional), TicksColumn(false)] 8 | public class UserTicketEntity : Entity 9 | { 10 | public Lite User { get; set; } 11 | 12 | [StringLengthValidator(Min = 36, Max = 36)] 13 | public string Ticket { get; set; } 14 | 15 | public DateTime ConnectionDate { get; set; } 16 | 17 | [StringLengthValidator(Max = 200)] 18 | public string Device { get; set; } 19 | 20 | public string StringTicket() 21 | { 22 | return "{0}|{1}".FormatWith(User.Id, Ticket); 23 | } 24 | 25 | public static (PrimaryKey userId, string ticket) ParseTicket(string ticket) 26 | { 27 | Match m = Regex.Match(ticket, @"^(?.*)\|(?.*)$"); 28 | if (!m.Success) throw new FormatException("The content of the ticket has an invalid format"); 29 | return (userId: PrimaryKey.Parse(m.Groups["id"].Value, typeof(UserEntity)), ticket: m.Groups["ticket"].Value); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Basics/BootstrapStyle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Signum.Entities.Basics 8 | { 9 | [InTypeScript(true)] 10 | public enum BootstrapStyle 11 | { 12 | Light, 13 | Dark, 14 | Primary, 15 | Secondary, 16 | Success, 17 | Info, 18 | Warning, 19 | Danger, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Basics/DisabledMixin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Basics 4 | { 5 | 6 | [Serializable] 7 | public class DisabledMixin : MixinEntity 8 | { 9 | DisabledMixin(ModifiableEntity mainEntity, MixinEntity next) 10 | : base(mainEntity, next) 11 | { 12 | } 13 | 14 | public bool IsDisabled { get; set; } 15 | 16 | protected override void CopyFrom(MixinEntity mixin, object[] args) 17 | { 18 | this.IsDisabled = ((DisabledMixin)mixin).IsDisabled; 19 | } 20 | } 21 | 22 | [AutoInit] 23 | public static class DisableOperation 24 | { 25 | public static readonly ExecuteSymbol Disable; 26 | public static readonly ExecuteSymbol Enabled; 27 | } 28 | 29 | public enum DisabledMessage 30 | { 31 | ParentIsDisabled, 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Basics/FileContent.cs: -------------------------------------------------------------------------------- 1 | namespace Signum.Entities.Basics 2 | { 3 | public class FileContent 4 | { 5 | public string FileName { get; private set; } 6 | public byte[] Bytes { get; private set; } 7 | 8 | public FileContent(string fileName, byte[] bytes) 9 | { 10 | this.FileName = fileName; 11 | this.Bytes = bytes; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Basics/TypeConditionSymbol.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Basics 4 | { 5 | [Serializable] 6 | public class TypeConditionSymbol : Symbol 7 | { 8 | private TypeConditionSymbol() { } 9 | 10 | public TypeConditionSymbol(Type declaringType, string fieldName) : 11 | base(declaringType, fieldName) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Cache/CachePermissions.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | 3 | namespace Signum.Entities.Cache 4 | { 5 | [AutoInit] 6 | public static class CachePermission 7 | { 8 | public static PermissionSymbol ViewCache; 9 | public static PermissionSymbol InvalidateCache; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Calendar/CalendarDay.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq.Expressions; 6 | using System.Text; 7 | 8 | namespace Signum.Entities.Calendar 9 | { 10 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 11 | public class CalendarDayEntity : Entity 12 | { 13 | public Date Date { get; set; } 14 | 15 | [AutoExpressionField] 16 | public override string ToString() => As.Expression(() => Date.ToShortString()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Chart/ChartColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities; 3 | using Signum.Entities.Basics; 4 | using Signum.Utilities; 5 | 6 | namespace Signum.Entities.Chart 7 | { 8 | [Serializable, EntityKind(EntityKind.System, EntityData.Master), TicksColumn(false)] 9 | public class ChartColorEntity : Entity 10 | { 11 | [ImplementedByAll, UniqueIndex] 12 | public Lite Related { get; set; } 13 | 14 | [StringLengthValidator(Max = 100), NotNullValidator(DisabledInModelBinder = true)] 15 | public string Color { get; set; } 16 | 17 | public override string ToString() 18 | { 19 | if (Related == null) 20 | return " -> {0}".FormatWith(Color); 21 | 22 | 23 | return "{0} {1} -> {2}".FormatWith(Related.GetType().NiceName(), Related.Id, Color); 24 | } 25 | } 26 | 27 | [Serializable] 28 | public class ChartPaletteModel : ModelEntity 29 | { 30 | public string TypeName { get; set; } 31 | 32 | public MList Colors { get; set; } = new MList(); 33 | 34 | public override string ToString() 35 | { 36 | var type = TypeEntity.TryGetType(TypeName); 37 | 38 | return ChartMessage.ColorsFor0.NiceToString().FormatWith(type?.NiceName() ?? TypeName); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Chart/ChartPermissions.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | 3 | namespace Signum.Entities.Chart 4 | { 5 | [AutoInit] 6 | public static class ChartPermission 7 | { 8 | public static PermissionSymbol ViewCharting; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/DiffLog/DiffLogMixin.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Basics; 2 | using System; 3 | 4 | namespace Signum.Entities.DiffLog 5 | { 6 | [Serializable] 7 | public class DiffLogMixin : MixinEntity 8 | { 9 | protected DiffLogMixin(ModifiableEntity mainEntity, MixinEntity next) 10 | : base(mainEntity, next) 11 | { 12 | this.RebindEvents(); 13 | } 14 | 15 | [NotifyChildProperty] 16 | public BigStringEmbedded InitialState { get; set; } = new BigStringEmbedded(); 17 | 18 | [NotifyChildProperty] 19 | public BigStringEmbedded FinalState { get; set; } = new BigStringEmbedded(); 20 | 21 | public bool Cleaned { get; set; } 22 | } 23 | 24 | public enum DiffLogMessage 25 | { 26 | PreviousLog, 27 | NextLog, 28 | CurrentEntity, 29 | 30 | NavigatesToThePreviousOperationLog, 31 | DifferenceBetweenFinalStateOfPreviousLogAndTheInitialState, 32 | StateWhenTheOperationStarted, 33 | DifferenceBetweenInitialStateAndFinalState, 34 | StateWhenTheOperationFinished, 35 | DifferenceBetweenFinalStateAndTheInitialStateOfNextLog, 36 | NavigatesToTheNextOperationLog, 37 | DifferenceBetweenFinalStateAndTheCurrentStateOfTheEntity, 38 | NavigatesToTheCurrentEntity, 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/DiffLog/TimeMachine.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | using System.ComponentModel; 3 | 4 | namespace Signum.Entities.DiffLog 5 | { 6 | public enum TimeMachineMessage 7 | { 8 | TimeMachine, 9 | [Description("[Entity deleted]")] 10 | EntityDeleted, 11 | CompareVersions, 12 | } 13 | 14 | [AutoInit] 15 | public static class TimeMachinePermission 16 | { 17 | public static PermissionSymbol ShowTimeMachine; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Dynamic/Dynamic.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | 3 | namespace Signum.Entities.Dynamic 4 | { 5 | [AutoInit] 6 | public static class DynamicPanelPermission 7 | { 8 | public static PermissionSymbol ViewDynamicPanel; 9 | public static PermissionSymbol RestartApplication; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Dynamic/DynamicCSSOverride.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Basics; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.Entities.Dynamic 7 | { 8 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 9 | [Mixin(typeof(DisabledMixin))] 10 | public class DynamicCSSOverrideEntity : Entity 11 | { 12 | [StringLengthValidator(Min = 3, Max = 100), UniqueIndex] 13 | public string Name { get; set; } 14 | 15 | [StringLengthValidator(Min = 3, MultiLine = true)] 16 | public string Script { get; set; } 17 | 18 | [AutoExpressionField] 19 | public override string ToString() => As.Expression(() => Name); 20 | } 21 | 22 | [AutoInit] 23 | public static class DynamicCSSOverrideOperation 24 | { 25 | public static readonly ExecuteSymbol Save; 26 | public static readonly DeleteSymbol Delete; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Dynamic/DynamicClient.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities; 2 | using Signum.Entities.Basics; 3 | using Signum.Utilities; 4 | using System; 5 | using System.Linq; 6 | using System.Linq.Expressions; 7 | using System.Reflection; 8 | 9 | namespace Signum.Entities.Dynamic 10 | { 11 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 12 | [Mixin(typeof(DisabledMixin))] 13 | public class DynamicClientEntity : Entity 14 | { 15 | [UniqueIndex] 16 | [StringLengthValidator(Min = 3, Max = 100), IdentifierValidator(IdentifierType.PascalAscii)] 17 | public string Name { get; set; } 18 | 19 | [StringLengthValidator(MultiLine = true)] 20 | public string Code { get; set; } 21 | 22 | [AutoExpressionField] 23 | public override string ToString() => As.Expression(() => Name); 24 | } 25 | 26 | [AutoInit] 27 | public static class DynamicClientOperation 28 | { 29 | public static readonly ConstructSymbol.From Clone; 30 | public static readonly ExecuteSymbol Save; 31 | public static readonly DeleteSymbol Delete; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Dynamic/DynamicIsolation.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities; 2 | using Signum.Entities.Isolation; 3 | using Signum.Utilities; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | 8 | namespace Signum.Entities.Dynamic 9 | { 10 | [Serializable] 11 | public class DynamicIsolationMixin : MixinEntity 12 | { 13 | DynamicIsolationMixin(ModifiableEntity mainEntity, MixinEntity? next) 14 | : base(mainEntity, next) 15 | { 16 | } 17 | 18 | public IsolationStrategy IsolationStrategy { get; set; } = IsolationStrategy.None; 19 | 20 | protected override void CopyFrom(MixinEntity mixin, object[] args) 21 | { 22 | this.IsolationStrategy = ((DynamicIsolationMixin)mixin).IsolationStrategy; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Dynamic/DynamicMixinConnection.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Basics; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.Entities.Dynamic 7 | { 8 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 9 | public class DynamicMixinConnectionEntity : Entity 10 | { 11 | 12 | public Lite EntityType { get; set; } 13 | 14 | [StringLengthValidator(Max = 100)] 15 | public string MixinName { get; set; } 16 | 17 | [AutoExpressionField] 18 | public override string ToString() => As.Expression(() => EntityType + " - " + MixinName); 19 | } 20 | 21 | [AutoInit] 22 | public static class DynamicMixinConnectionOperation 23 | { 24 | public static readonly ExecuteSymbol Save; 25 | public static readonly DeleteSymbol Delete; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Dynamic/DynamicTypeConditionSymbol.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | using System.Linq.Expressions; 4 | 5 | namespace Signum.Entities.Dynamic 6 | { 7 | [Serializable, EntityKind(EntityKind.Shared, EntityData.Transactional)] 8 | public class DynamicTypeConditionSymbolEntity : Entity 9 | { 10 | [StringLengthValidator(Min = 1, Max = 100), IdentifierValidator(IdentifierType.PascalAscii)] 11 | public string Name { get; set; } 12 | 13 | [AutoExpressionField] 14 | public override string ToString() => As.Expression(() => Name); 15 | } 16 | 17 | [AutoInit] 18 | public static class DynamicTypeConditionSymbolOperation 19 | { 20 | public static readonly ExecuteSymbol Save; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Files/BigStringMixin.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Signum.Entities.Files 8 | { 9 | 10 | [Serializable] 11 | public class BigStringMixin : MixinEntity 12 | { 13 | BigStringMixin(ModifiableEntity mainEntity, MixinEntity? next) 14 | : base(mainEntity, next) 15 | { 16 | } 17 | 18 | public FilePathEmbedded? File { get; set; } 19 | 20 | public static Action? PreSavingAction; 21 | protected override void PreSaving(PreSavingContext ctx) 22 | { 23 | PreSavingAction?.Invoke(this, ctx); 24 | } 25 | 26 | public static Action? PostRetrievingAction; 27 | protected override void PostRetrieving(PostRetrievingContext ctx) 28 | { 29 | PostRetrievingAction?.Invoke(this, ctx); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Files/FileEmbedded.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | using System.IO; 4 | 5 | namespace Signum.Entities.Files 6 | { 7 | [Serializable] 8 | public class FileEmbedded : EmbeddedEntity, IFile 9 | { 10 | public FileEmbedded() 11 | { 12 | } 13 | 14 | public FileEmbedded(string readFileFrom) 15 | { 16 | this.FileName = Path.GetFileName(readFileFrom)!; 17 | this.BinaryFile = File.ReadAllBytes(readFileFrom); 18 | } 19 | 20 | [StringLengthValidator(Min = 3, Max = 200)] 21 | public string FileName { get; set; } 22 | 23 | public byte[] BinaryFile { get; set; } 24 | 25 | public override string ToString() 26 | { 27 | return "{0} - {1}".FormatWith(FileName, BinaryFile?.Let(bf => StringExtensions.ToComputerSize(bf.Length)) ?? "??"); 28 | } 29 | 30 | public string? FullWebPath() 31 | { 32 | throw new NotImplementedException("Full web path not implemented for File Embedded"); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Files/FileTypeSymbol.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Files 4 | { 5 | [Serializable] 6 | public class FileTypeSymbol : Symbol 7 | { 8 | private FileTypeSymbol() { } 9 | 10 | public FileTypeSymbol(Type declaringType, string fieldName) : 11 | base(declaringType, fieldName) 12 | { 13 | } 14 | } 15 | 16 | [System.AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = false, AllowMultiple = true)] 17 | public class DefaultFileTypeAttribute : Attribute 18 | { 19 | public string? SymbolContainer { get; set; } 20 | public string SymbolName { get; set; } 21 | 22 | public FileTypeSymbol FileTypeSymbol { get; set; } 23 | 24 | public DefaultFileTypeAttribute(string symbolName, string? symbolContainer = null) 25 | { 26 | this.SymbolName = symbolName; 27 | this.SymbolContainer = symbolContainer; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Help/AppendixHelp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Basics; 3 | 4 | namespace Signum.Entities.Help 5 | { 6 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 7 | public class AppendixHelpEntity : Entity 8 | { 9 | [StringLengthValidator(Min = 3, Max = 100)] 10 | public string UniqueName { get; set; } 11 | 12 | public CultureInfoEntity Culture { get; set; } 13 | 14 | [StringLengthValidator(Max = 200)] 15 | public string Title { get; set; } 16 | 17 | [StringLengthValidator(Min = 3, MultiLine = true)] 18 | public string? Description { get; set; } 19 | 20 | public override string ToString() 21 | { 22 | return Title; 23 | } 24 | } 25 | 26 | [AutoInit] 27 | public static class AppendixHelpOperation 28 | { 29 | public static ExecuteSymbol Save; 30 | public static DeleteSymbol Delete; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Help/NamespaceHelp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using Signum.Entities.Basics; 4 | using Signum.Utilities; 5 | 6 | namespace Signum.Entities.Help 7 | { 8 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 9 | public class NamespaceHelpEntity : Entity 10 | { 11 | [StringLengthValidator(Max = 300)] 12 | public string Name { get; set; } 13 | 14 | public CultureInfoEntity Culture { get; set; } 15 | 16 | [StringLengthValidator(Max = 200)] 17 | public string? Title { get; set; } 18 | 19 | [StringLengthValidator(MultiLine = true)] 20 | public string? Description { get; set; } 21 | 22 | [AutoExpressionField] 23 | public override string ToString() => As.Expression(() => Name); 24 | } 25 | 26 | [AutoInit] 27 | public static class NamespaceHelpOperation 28 | { 29 | public static ExecuteSymbol Save; 30 | public static DeleteSymbol Delete; 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Joyride/JoyrideMessage.cs: -------------------------------------------------------------------------------- 1 | namespace Signum.Entities.Joyride 2 | { 3 | public enum JoyrideMessage 4 | { 5 | Back, 6 | Close, 7 | Last, 8 | Next, 9 | Skip 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/MachineLearning/PredictSimpleResults.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | 4 | namespace Signum.Entities.MachineLearning 5 | { 6 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 7 | public class PredictSimpleResultEntity : Entity 8 | { 9 | 10 | public Lite Predictor { get; internal set; } 11 | 12 | [ImplementedByAll] 13 | public Lite? Target { get; set; } 14 | 15 | [StringLengthValidator(Max = 100)] 16 | public string? Key0 { get; set; } 17 | 18 | [StringLengthValidator(Max = 100)] 19 | public string? Key1 { get; set; } 20 | 21 | [StringLengthValidator(Max = 100)] 22 | public string? Key2 { get; set; } 23 | 24 | public PredictionSet Type { get; set; } 25 | 26 | [StringLengthValidator(Max = 200)] 27 | public string? OriginalCategory { get; set; } 28 | 29 | [Format("0.0000")] 30 | public double? OriginalValue { get; set; } 31 | 32 | [StringLengthValidator(Max = 200)] 33 | public string? PredictedCategory { get; set; } 34 | 35 | [Format("0.0000")] 36 | public double? PredictedValue { get; set; } 37 | } 38 | 39 | public enum PredictionSet 40 | { 41 | Validation, 42 | Training 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/MachineLearning/PredictorCodification.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.MachineLearning 4 | { 5 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 6 | public class PredictorCodificationEntity : Entity 7 | { 8 | 9 | public Lite Predictor { get; set; } 10 | 11 | public PredictorColumnUsage Usage { get; set; } 12 | 13 | public int Index { get; set; } 14 | 15 | public int? SubQueryIndex{ get; set; } 16 | 17 | public int OriginalColumnIndex { get; set; } 18 | 19 | //For flatting collections 20 | [DbType(Size = 100)] 21 | public string? SplitKey0 { get; set; } 22 | 23 | [DbType(Size = 100)] 24 | public string? SplitKey1 { get; set; } 25 | 26 | [DbType(Size = 100)] 27 | public string? SplitKey2 { get; set; } 28 | 29 | 30 | //For 1-hot encoding 31 | [DbType(Size = 100)] 32 | public string? IsValue { get; set; } 33 | 34 | public float? Average { get; set; } 35 | public float? StdDev { get; set; } 36 | 37 | public float? Min { get; set; } 38 | public float? Max { get; set; } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/MachineLearning/PredictorCodification.cs.rej: -------------------------------------------------------------------------------- 1 | diff a/Signum.Entities.Extensions/MachineLearning/PredictorCodification.cs b/Signum.Entities.Extensions/MachineLearning/PredictorCodification.cs (rejected hunks) 2 | @@ -17,7 +17,6 @@ 3 | public int OriginalColumnIndex { get; set; } 4 | 5 | //For flatting collections 6 | - [SqlDbType(Size = 100)] 7 | public string SplitKey0 { get; set; } 8 | 9 | public string SplitKey1 { get; set; } 10 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/MachineLearning/PredictorEpochProgress.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | 4 | namespace Signum.Entities.MachineLearning 5 | { 6 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 7 | public class PredictorEpochProgressEntity : Entity 8 | { 9 | 10 | public Lite Predictor { get; set; } 11 | 12 | public DateTime CreationDate { get; private set; } = TimeZoneManager.Now; 13 | [Unit("ms")] 14 | public long Ellapsed { get; internal set; } 15 | 16 | public int TrainingExamples { get; set; } 17 | 18 | public int Epoch { get; set; } 19 | 20 | [Format("0.0000")] 21 | public double? LossTraining { get; set; } 22 | [Format("0.0000")] 23 | public double? AccuracyTraining { get; set; } 24 | [Format("0.0000")] 25 | public double? LossValidation { get; internal set; } 26 | [Format("0.0000")] 27 | public double? AccuracyValidation { get; internal set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Mailing/EmailConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Basics; 3 | 4 | namespace Signum.Entities.Mailing 5 | { 6 | [Serializable] 7 | public class EmailConfigurationEmbedded : EmbeddedEntity 8 | { 9 | 10 | public CultureInfoEntity DefaultCulture { get; set; } 11 | 12 | public string UrlLeft { get; set; } 13 | 14 | public bool SendEmails { get; set; } 15 | 16 | public bool ReciveEmails { get; set; } 17 | 18 | [StringLengthValidator(Min = 3, Max = 100), EMailValidator] 19 | public string? OverrideEmailAddress { get; set; } 20 | 21 | [Unit("hs")] 22 | public double? AvoidSendingEmailsOlderThan { get; set; } 23 | 24 | public int ChunkSizeSendingEmails { get; set; } = 100; 25 | 26 | public int MaxEmailSendRetries { get; set; } = 3; 27 | 28 | [Unit("sec")] 29 | public int AsyncSenderPeriod { get; set; } = 5 * 60; //5 minutes 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Mailing/EmailModel.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | using System.Linq.Expressions; 4 | 5 | namespace Signum.Entities.Mailing 6 | { 7 | [Serializable, EntityKind(EntityKind.SystemString, EntityData.Master), TicksColumn(false)] 8 | public class EmailModelEntity : Entity 9 | { 10 | [UniqueIndex] 11 | public string FullClassName { get; set; } 12 | 13 | [AutoExpressionField] 14 | public override string ToString() => As.Expression(() => FullClassName); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Mailing/ImageAttachmentEntity.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Files; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.Entities.Mailing 7 | { 8 | [Serializable, EntityKind(EntityKind.Part, EntityData.Master)] 9 | public class ImageAttachmentEntity : Entity, IAttachmentGeneratorEntity 10 | { 11 | [Ignore] 12 | internal object? FileNameNode; 13 | 14 | string? fileName; 15 | [StringLengthValidator(Min = 3, Max = 100), FileNameValidator] 16 | public string? FileName 17 | { 18 | get { return fileName; } 19 | set 20 | { 21 | if (Set(ref fileName, value)) 22 | FileNameNode = null; 23 | } 24 | } 25 | 26 | [StringLengthValidator(Min = 1, Max = 300)] 27 | public string ContentId { get; set; } 28 | 29 | public EmailAttachmentType Type { get; set; } 30 | 31 | 32 | public FileEmbedded File { get; set; } 33 | 34 | [AutoExpressionField] 35 | public override string ToString() => As.Expression(() => FileName ?? File.FileName); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Map/MapMessage.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | using Signum.Utilities; 3 | using System.ComponentModel; 4 | 5 | namespace Signum.Entities.Map 6 | { 7 | public enum MapMessage 8 | { 9 | Map, 10 | Namespace, 11 | TableSize, 12 | Columns, 13 | Rows, 14 | [Description("Press {0} to explore each table")] 15 | Press0ToExploreEachTable, 16 | [Description("Press {0} to explore states and operations")] 17 | Press0ToExploreStatesAndOperations, 18 | Filter, 19 | Color, 20 | State, 21 | StateColor, 22 | RowsHistory, 23 | TableSizeHistory, 24 | } 25 | 26 | [DescriptionOptions(DescriptionOptions.Members)] 27 | public enum DefaultState 28 | { 29 | Start, 30 | All, 31 | End, 32 | } 33 | 34 | [AutoInit] 35 | public static class MapPermission 36 | { 37 | public static PermissionSymbol ViewMap; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Migrations/CSharpMigration.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | using System.Linq.Expressions; 4 | 5 | namespace Signum.Entities.Migrations 6 | { 7 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional), TicksColumn(false)] 8 | public class CSharpMigrationEntity : Entity 9 | { 10 | [UniqueIndex] 11 | [StringLengthValidator(Max = 200)] 12 | public string UniqueName { get; set; } 13 | 14 | public DateTime ExecutionDate { get; set; } 15 | 16 | [AutoExpressionField] 17 | public override string ToString() => As.Expression(() => UniqueName); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Migrations/ExecutedLoadProcess.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Basics; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.Entities.Migrations 7 | { 8 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional), TicksColumn(false)] 9 | public class LoadMethodLogEntity : Entity 10 | { 11 | [StringLengthValidator(Min = 3, Max = 400)] 12 | public string? MethodName { get; set; } 13 | 14 | [StringLengthValidator(Min = 3, Max = 400)] 15 | public string? ClassName { get; set; } 16 | 17 | [StringLengthValidator(Min = 3, Max = 400)] 18 | public string? Description { get; set; } 19 | 20 | public DateTime Start { get; set; } 21 | 22 | public DateTime? End { get; set; } 23 | 24 | static Expression> DurationExpression = 25 | log => (double?)(log.End - log.Start)!.Value.TotalMilliseconds; 26 | [ExpressionField("DurationExpression"), Unit("ms")] 27 | public double? Duration 28 | { 29 | get { return End == null ? null : DurationExpression.Evaluate(this); } 30 | } 31 | 32 | public Lite? Exception { get; set; } 33 | 34 | [AutoExpressionField] 35 | public override string ToString() => As.Expression(() => MethodName!); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Migrations/SqlMigration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using Signum.Utilities; 4 | 5 | namespace Signum.Entities.Migrations 6 | { 7 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional), TicksColumn(false)] 8 | public class SqlMigrationEntity : Entity 9 | { 10 | [UniqueIndex] 11 | [StringLengthValidator(Max = 200)] 12 | public string VersionNumber { get; set; } 13 | 14 | [StringLengthValidator(Min = 0, Max = 400)] 15 | public string? Comment { get; set; } 16 | 17 | [AutoExpressionField] 18 | public override string ToString() => As.Expression(() => VersionNumber); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Printing/PrintPackages.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Processes; 3 | using Signum.Utilities; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.Entities.Printing 7 | { 8 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 9 | public class PrintPackageEntity : Entity, IProcessDataEntity 10 | { 11 | [StringLengthValidator(Max = 200)] 12 | public string? Name { get; set; } 13 | 14 | [AutoExpressionField] 15 | public override string ToString() => As.Expression(() => Name ?? "- No Name -"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Profiler/ProfilerPermissions.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | 3 | namespace Signum.Entities.Profiler 4 | { 5 | [AutoInit] 6 | public static class ProfilerPermission 7 | { 8 | public static PermissionSymbol ViewTimeTracker; 9 | public static PermissionSymbol ViewHeavyProfiler; 10 | public static PermissionSymbol OverrideSessionTimeout; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Properties/Attributes.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System.Runtime.CompilerServices; 3 | 4 | [assembly: DefaultAssemblyCulture("en")] 5 | [assembly: InternalsVisibleTo("Signum.Engine.Extensions")] 6 | [assembly: InternalsVisibleTo("Signum.React.Extensions")] 7 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Rest/RestApiKeyEntity.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Authorization; 2 | using System; 3 | 4 | namespace Signum.Entities.Rest 5 | { 6 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 7 | public class RestApiKeyEntity : Entity 8 | { 9 | public Lite User { get; set; } 10 | 11 | [StringLengthValidator(Min = 20, Max = 100)] 12 | [UniqueIndex] 13 | public string ApiKey { get; set; } 14 | } 15 | 16 | [AutoInit] 17 | public static class RestApiKeyOperation 18 | { 19 | public static ExecuteSymbol Save; 20 | public static DeleteSymbol Delete; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/SMS/SMSCharactersMap.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.Entities.Extensions/SMS/SMSCharactersMap.xlsx -------------------------------------------------------------------------------- /Signum.Entities.Extensions/SMS/SMSConfigurationEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Basics; 3 | 4 | namespace Signum.Entities.SMS 5 | { 6 | [Serializable] 7 | public class SMSConfigurationEmbedded : EmbeddedEntity 8 | { 9 | public CultureInfoEntity DefaultCulture { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/SMS/SMSPackages.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Processes; 3 | using Signum.Utilities; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.Entities.SMS 7 | { 8 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 9 | public class SMSSendPackageEntity : SMSPackageEntity 10 | { 11 | 12 | } 13 | 14 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 15 | public class SMSUpdatePackageEntity : SMSPackageEntity 16 | { 17 | 18 | } 19 | 20 | [Serializable] 21 | public abstract class SMSPackageEntity : Entity, IProcessDataEntity 22 | { 23 | public SMSPackageEntity() 24 | { 25 | this.Name = GetType().NiceName() + ": " + TimeZoneManager.Now.ToString(); 26 | } 27 | 28 | [StringLengthValidator(Max = 200)] 29 | public string? Name { get; set; } 30 | 31 | [AutoExpressionField] 32 | public override string ToString() => As.Expression(() => Name!); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Scheduler/SimpleTask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Scheduler 4 | { 5 | [Serializable, EntityKind(EntityKind.SystemString, EntityData.Master)] 6 | public class SimpleTaskSymbol : Symbol, ITaskEntity 7 | { 8 | private SimpleTaskSymbol() { } 9 | 10 | public SimpleTaskSymbol(Type declaringType, string fieldName) : 11 | base(declaringType, fieldName) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Scheduler/SystemEventLog.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities.Basics; 2 | using System; 3 | 4 | namespace Signum.Entities.Scheduler 5 | { 6 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 7 | public class SystemEventLogEntity : Entity 8 | { 9 | [StringLengthValidator(Min = 3, Max = 100)] 10 | public string MachineName { get; set; } 11 | 12 | public DateTime Date { get; set; } 13 | 14 | public Lite? User { get; set; } 15 | 16 | [StringLengthValidator(Min = 3, Max = 100)] 17 | public string EventType { get; set; } 18 | 19 | public Lite? Exception { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Templating/TemplatingModelConverterSymbole.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Templating 4 | { 5 | [Serializable] 6 | public class ModelConverterSymbol : Symbol 7 | { 8 | private ModelConverterSymbol() { } 9 | 10 | public ModelConverterSymbol(Type declaringType, string fieldName) : 11 | base(declaringType, fieldName) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Translation/TranslationReplacement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Basics; 3 | 4 | namespace Signum.Entities.Translation 5 | { 6 | 7 | [Serializable, EntityKind(EntityKind.Main, EntityData.Master)] 8 | public class TranslationReplacementEntity : Entity 9 | { 10 | 11 | public CultureInfoEntity CultureInfo { get; set; } 12 | 13 | [StringLengthValidator(Min = 3, Max = 200)] 14 | public string WrongTranslation { get; set; } 15 | 16 | [StringLengthValidator(Min = 3, Max = 200)] 17 | public string RightTranslation { get; set; } 18 | } 19 | 20 | [AutoInit] 21 | public static class TranslationReplacementOperation 22 | { 23 | public static ExecuteSymbol Save; 24 | public static DeleteSymbol Delete; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/UserAssets/FilterValueConverters/LiteFilterValueConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Utilities; 3 | 4 | namespace Signum.Entities.UserAssets 5 | { 6 | public class LiteFilterValueConverter : IFilterValueConverter 7 | { 8 | public Result? TryToStringValue(object? value, Type type) 9 | { 10 | if (!(value is Lite lite)) 11 | { 12 | return null; 13 | } 14 | 15 | return new Result.Success(lite.Key()); 16 | } 17 | 18 | public Result? TryParseValue(string? value, Type type) 19 | { 20 | if (!value.HasText()) 21 | return null; 22 | 23 | string? error = Lite.TryParseLite(value, out Lite? lite); 24 | if (error == null) 25 | return new Result.Success(lite); 26 | else 27 | return new Result.Error(error); 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/ViewLog/ViewLogEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Entities.Basics; 3 | using System.Linq.Expressions; 4 | using Signum.Utilities; 5 | 6 | namespace Signum.Entities.ViewLog 7 | { 8 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 9 | public class ViewLogEntity : Entity 10 | { 11 | public ViewLogEntity() 12 | { 13 | RebindEvents(); 14 | } 15 | 16 | [ImplementedByAll] 17 | public Lite Target { get; set; } 18 | 19 | public Lite User { get; set; } 20 | 21 | [StringLengthValidator(Min = 3, Max = 100)] 22 | public string ViewAction { get; set; } 23 | 24 | [Format("G")] 25 | public DateTime StartDate { get; private set; } = TimeZoneManager.Now; 26 | 27 | [Format("G")] 28 | public DateTime EndDate { get; set; } 29 | 30 | [NotifyChildProperty] 31 | public BigStringEmbedded Data { get; set; } = new BigStringEmbedded(); 32 | 33 | [AutoExpressionField, Unit("ms")] 34 | public double Duration => As.Expression(() => (EndDate - StartDate).TotalMilliseconds); 35 | } 36 | 37 | public enum ViewLogMessage 38 | { 39 | ViewLogMyLast 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Word/SystemWordTemplate.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System; 3 | using System.Linq.Expressions; 4 | 5 | namespace Signum.Entities.Word 6 | { 7 | [Serializable, EntityKind(EntityKind.SystemString, EntityData.Master), TicksColumn(false)] 8 | public class WordModelEntity : Entity 9 | { 10 | [StringLengthValidator(Max = 200), UniqueIndex] 11 | public string FullClassName { get; set; } 12 | 13 | [AutoExpressionField] 14 | public override string ToString() => As.Expression(() => FullClassName); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Word/WordAttachmentEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Signum.Utilities; 3 | using System.Linq.Expressions; 4 | using Signum.Entities.Mailing; 5 | using Signum.Entities.Templating; 6 | 7 | namespace Signum.Entities.Word 8 | { 9 | [Serializable, EntityKind(EntityKind.Part, EntityData.Master)] 10 | public class WordAttachmentEntity : Entity, IAttachmentGeneratorEntity 11 | { 12 | string fileName; 13 | [StringLengthValidator(Min = 3, Max = 100), FileNameValidator] 14 | public string FileName 15 | { 16 | get { return fileName; } 17 | set 18 | { 19 | if (Set(ref fileName, value)) 20 | FileNameNode = null; 21 | } 22 | } 23 | 24 | [Ignore] 25 | internal object? FileNameNode; 26 | 27 | 28 | public Lite WordTemplate { get; set; } 29 | 30 | [ImplementedByAll] 31 | public Lite OverrideModel { get; set; } 32 | 33 | public ModelConverterSymbol ModelConverter { get; set; } 34 | 35 | [AutoExpressionField] 36 | public override string ToString() => As.Expression(() => FileName); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Workflow/CaseActivityMixin.cs: -------------------------------------------------------------------------------- 1 | using Signum.Entities; 2 | using Signum.Utilities; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Signum.Entities.Workflow 8 | { 9 | [Serializable] 10 | public class CaseActivityMixin : MixinEntity 11 | { 12 | CaseActivityMixin(ModifiableEntity mainEntity, MixinEntity next) 13 | : base(mainEntity, next) 14 | { 15 | 16 | this.CaseActivity = WorkflowActivityInfo.Current.CaseActivity?.ToLite(); 17 | } 18 | 19 | public Lite? CaseActivity { get; set; } 20 | 21 | //protected override void CopyFrom(MixinEntity mixin, object[] args) 22 | //{ 23 | // this.CaseActivity = ((CaseActivityMixin)mixin).CaseActivity; 24 | //} 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Workflow/CaseJunction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Workflow 4 | { 5 | //Only for split and join 6 | [Serializable, EntityKind(EntityKind.System, EntityData.Transactional)] 7 | public class CaseJunctionEntity : Entity 8 | { 9 | public WorkflowGatewayDirection Direction { get; set; } 10 | 11 | 12 | public Lite From { get; set; } 13 | 14 | 15 | public Lite To { get; set; } 16 | } 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Signum.Entities.Extensions/Workflow/WorkflowConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Signum.Entities.Workflow 4 | { 5 | [Serializable] 6 | public class WorkflowConfigurationEmbedded : EmbeddedEntity 7 | { 8 | [Unit("sec")] 9 | public int ScriptRunnerPeriod { get; set; } = 5 * 60; //5 minutes 10 | 11 | [Unit("hs")] 12 | public double? AvoidExecutingScriptsOlderThan { get; set; } 13 | 14 | public int ChunkSizeRunningScripts { get; set; } = 100; 15 | 16 | public bool IsBudgetActive { get; set; } = false; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/Frames/ValidationSummaryContainer.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using OpenQA.Selenium; 3 | 4 | namespace Signum.React.Selenium 5 | { 6 | public interface IValidationSummaryContainer 7 | { 8 | IWebElement Element { get; } 9 | } 10 | 11 | public static class ValidationSummaryContainerExtensions 12 | { 13 | public static WebElementLocator ValidationSummary(this IValidationSummaryContainer container) 14 | { 15 | return container.Element.WithLocator(By.CssSelector("ul.validaton-summary")); 16 | } 17 | 18 | public static string[] ValidationErrors(this IValidationSummaryContainer container) 19 | { 20 | var errors = container.ValidationSummary().CombineCss(" > li").FindElements().Select(a => a.Text).ToArray(); 21 | 22 | return errors; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/Frames/WidgetContainer.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using Signum.Utilities; 3 | 4 | namespace Signum.React.Selenium 5 | { 6 | public interface IWidgetContainer 7 | { 8 | IWebElement Element { get; } 9 | } 10 | 11 | public static class WidgetContainerExtensions 12 | { 13 | public static WebElementLocator WidgetContainer(this IWidgetContainer container) 14 | { 15 | return container.Element.WithLocator(By.CssSelector("ul.sf-widgets")); 16 | } 17 | 18 | public static IWebElement QuickLinkClick(this IWidgetContainer container, string name) 19 | { 20 | var ql = container.WidgetContainer().CombineCss("dropdown .sf-quicklinks").Find(); 21 | 22 | ql.Click(); 23 | 24 | var element = ql.GetParent().WaitElementPresent(By.CssSelector("ul.dropdown-menu a[data-name='{0}']".FormatWith(name))); 25 | 26 | return element.CaptureOnClick(); 27 | } 28 | 29 | public static SearchModalProxy QuickLinkClickSearch(this IWidgetContainer container, string name) 30 | { 31 | return new SearchModalProxy(container.QuickLinkClick(name)); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/LineProxies/BaseLineProxy.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using Signum.Entities; 3 | 4 | namespace Signum.React.Selenium 5 | { 6 | public class BaseLineProxy 7 | { 8 | public IWebElement Element { get; private set; } 9 | 10 | public PropertyRoute Route { get; private set; } 11 | 12 | public BaseLineProxy(IWebElement element, PropertyRoute route) 13 | { 14 | this.Element = element; 15 | this.Route = route; 16 | } 17 | 18 | protected static string ToVisible(bool visible) 19 | { 20 | return visible ? "visible" : "not visible"; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/LineProxies/FileLineProxy.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using Signum.Entities; 3 | 4 | namespace Signum.React.Selenium 5 | { 6 | public class FileLineProxy : BaseLineProxy 7 | { 8 | public FileLineProxy(IWebElement element, PropertyRoute route) 9 | : base(element, route) 10 | { 11 | 12 | } 13 | 14 | public void SetPath(string path) 15 | { 16 | FileElement.Find().SendKeys(path); 17 | FileElement.WaitNoPresent(); 18 | } 19 | 20 | private WebElementLocator FileElement 21 | { 22 | get { return this.Element.WithLocator(By.CssSelector("input[type=file]")); } 23 | } 24 | } 25 | 26 | public static class FileExtensions 27 | { 28 | public static LineContainer SetPath(this EntityRepeaterProxy repeater, string path) where T : ModifiableEntity 29 | { 30 | var count = repeater.ItemsCount(); 31 | 32 | var input = repeater.Element.FindElement(By.CssSelector("input[type=file]")); 33 | input.SendKeys(path); 34 | 35 | return repeater.Details(count + 1); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/ModalProxies/ValueLineModalProxy.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using Signum.Entities; 3 | using System; 4 | using System.Linq.Expressions; 5 | 6 | namespace Signum.React.Selenium 7 | { 8 | public class ValueLineModalProxy : ModalProxy 9 | { 10 | PropertyRoute? route; 11 | public ValueLineModalProxy(IWebElement element, PropertyRoute? route = null) : base(element) 12 | { 13 | this.route = route; 14 | } 15 | 16 | public ValueLineProxy ValueLine 17 | { 18 | get 19 | { 20 | var formGroup = this.Element.FindElement(By.CssSelector("div.modal-body div.form-group")); 21 | return new ValueLineProxy(formGroup, route!); 22 | } 23 | } 24 | } 25 | 26 | public static class ValueLineModalProxyExtensions 27 | { 28 | public static ValueLineModalProxy AsValueLineModal(this IWebElement element) 29 | { 30 | return new ValueLineModalProxy(element); 31 | } 32 | 33 | public static ValueLineModalProxy AsValueLineModal(this IWebElement element, Expression> propertyRoute) 34 | where T : IRootEntity 35 | { 36 | return new ValueLineModalProxy(element, PropertyRoute.Construct(propertyRoute)); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/Search/ColumnEditorProxy.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | 3 | namespace Signum.React.Selenium 4 | { 5 | public class ColumnEditorProxy 6 | { 7 | public IWebElement Element; 8 | 9 | public ColumnEditorProxy(IWebElement element) 10 | { 11 | this.Element = element; 12 | } 13 | 14 | 15 | public void Close() 16 | { 17 | this.Element.FindElement(By.ClassName("button.close")).Click(); 18 | } 19 | 20 | public QueryTokenBuilderProxy QueryToken => new QueryTokenBuilderProxy(this.Element.FindElement(By.ClassName("sf-query-token-builder"))); 21 | public IWebElement Name => this.Element.FindElement(By.ClassName("input.form-control")); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/Search/QueryTokenPartProxy.cs: -------------------------------------------------------------------------------- 1 | using OpenQA.Selenium; 2 | using Signum.Utilities; 3 | 4 | namespace Signum.React.Selenium 5 | { 6 | 7 | public class QueryTokenPartProxy 8 | { 9 | public IWebElement Element { get; private set; } 10 | 11 | public QueryTokenPartProxy(IWebElement element) 12 | { 13 | this.Element = element; 14 | } 15 | 16 | public void Select(string? key) 17 | { 18 | if (!this.Element.IsElementVisible(By.ClassName("rw-popup-container"))) 19 | { 20 | this.Element.FindElement(By.ClassName("rw-dropdown-list")).Click(); 21 | } 22 | 23 | var container = this.Element.WaitElementVisible(By.ClassName("rw-popup-container")); 24 | 25 | var selector = key.HasText() ? 26 | By.CssSelector("div > span[data-token='" + key + "']") : 27 | By.CssSelector("div > span:not([data-token])"); 28 | 29 | var elem = container.WaitElementVisible(selector); 30 | elem.ScrollTo(); 31 | elem.Click(); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Signum.React.Extensions.Selenium/Signum.React.Extensions.Selenium.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | enable 6 | nullable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Alerts/AlertsServer.cs: -------------------------------------------------------------------------------- 1 | using Signum.Utilities; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using Signum.React.Maps; 6 | using Signum.React.Facades; 7 | using Signum.Engine.Cache; 8 | using Signum.Entities.Cache; 9 | using Signum.Engine.Authorization; 10 | using Signum.Engine.Maps; 11 | using Microsoft.AspNetCore.Builder; 12 | 13 | namespace Signum.React.Alerts 14 | { 15 | public static class AlertsServer 16 | { 17 | public static void Start(IApplicationBuilder app) 18 | { 19 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Alerts/Signum.Entities.Alerts.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Alerts/Templates/AlertType.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { AlertTypeSymbol } from '../Signum.Entities.Alerts' 5 | 6 | export default function AlertType(p : { ctx: TypeContext }){ 7 | const ctx = p.ctx; 8 | const ctx4 = ctx.subCtx({ labelColumns: 2 }); 9 | return ( 10 |
11 | n.name)} /> 12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Authorization/Admin/ColoredRadios.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' 3 | import { IconProp } from '@fortawesome/fontawesome-svg-core' 4 | import "./AuthAdmin.css" 5 | import { coalesceIcon } from '@framework/Operations/ContextualOperations'; 6 | 7 | interface ColorRadioProps { 8 | checked: boolean; 9 | onClicked: (e: React.MouseEvent) => void; 10 | color: string; 11 | title?: string; 12 | icon?: IconProp; 13 | } 14 | 15 | export function ColorRadio(p : ColorRadioProps){ 16 | return ( 17 | { e.preventDefault(); p.onClicked(e); }} title={p.title} 18 | className="sf-auth-chooser" 19 | style={{ color: p.checked ? p.color : "#aaa" }}> 20 | 21 | 22 | ); 23 | } 24 | 25 | export function GrayCheckbox(p : { checked: boolean, onUnchecked: () => void }){ 26 | return ( 27 | 28 | 29 | 30 | ); 31 | } 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Authorization/AzureAD/ADGroup.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { EntityLine, EntityTable, ValueLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { useForceUpdate } from '@framework/Hooks'; 5 | import { ADGroupEntity, UserADQuery } from '../Signum.Entities.Authorization'; 6 | import { ValueSearchControlLine } from '../../../../Framework/Signum.React/Scripts/Search'; 7 | 8 | export default function ADGroup(p: { ctx: TypeContext }) { 9 | const ctx = p.ctx; 10 | return ( 11 |
12 | n.displayName)} /> 13 | 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Authorization/Login/ChangePasswordSuccessPage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { classes, Dic } from '@framework/Globals' 3 | import * as Navigator from '@framework/Navigator' 4 | import { ModelState } from '@framework/Signum.Entities' 5 | import { ValidationError } from '@framework/Services' 6 | import { LoginAuthMessage } from '../Signum.Entities.Authorization' 7 | import * as AuthClient from '../AuthClient' 8 | import { useStateWithPromise } from '@framework/Hooks' 9 | 10 | export default function ChangePasswordSucessPage() { 11 | return ( 12 |
13 |

{LoginAuthMessage.PasswordChanged.niceToString()}

14 |

{LoginAuthMessage.PasswordHasBeenChangedSuccessfully.niceToString()}

15 |
16 | ); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Authorization/Login/Login.css: -------------------------------------------------------------------------------- 1 | label.sf-remember-me input[type=checkbox] { 2 | margin: 0; 3 | vertical-align: middle; 4 | width: 16px; 5 | height: 16px; 6 | } 7 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Authorization/Signum.Entities.Authorization.t4s: -------------------------------------------------------------------------------- 1 | export interface UserEntity { 2 | newPassword: string; 3 | } 4 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Basics/BasicsClient.tsx: -------------------------------------------------------------------------------- 1 | import { EntitySettings } from '@framework/Navigator' 2 | import * as Constructor from '@framework/Constructor' 3 | import * as Navigator from '@framework/Navigator' 4 | import { TimeSpanEmbedded, DateSpanEmbedded } from './Signum.Entities.Basics' 5 | 6 | export function start(options: { routes: JSX.Element[] }) { 7 | Navigator.addSettings(new EntitySettings(TimeSpanEmbedded, e => import('./Templates/TimeSpan'))); 8 | Navigator.addSettings(new EntitySettings(DateSpanEmbedded, e => import('./Templates/DateSpan'))); 9 | Constructor.registerConstructor(TimeSpanEmbedded, () => TimeSpanEmbedded.New({ days: 0, hours: 0, minutes: 0, seconds: 0 })); 10 | Constructor.registerConstructor(DateSpanEmbedded, () => DateSpanEmbedded.New({ years: 0, months: 0, days: 0 })); 11 | } 12 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Basics/Signum.Entities.Basics.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Basics/Templates/DateSpan.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { DateSpanEmbedded } from '../Signum.Entities.Basics' 5 | 6 | export default function DateSpan(p : { ctx: TypeContext }){ 7 | const e = p.ctx; 8 | const sc = e.subCtx({ formGroupStyle: "BasicDown" }); 9 | 10 | return ( 11 |
12 |
13 | n.years)} /> 14 |
15 |
16 | n.months)} /> 17 |
18 |
19 | n.days)} /> 20 |
21 |
22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Basics/Templates/TimeSpan.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { TimeSpanEmbedded } from '../Signum.Entities.Basics' 5 | 6 | export default function TimeSpan(p : { ctx: TypeContext }){ 7 | const e = p.ctx; 8 | const sc = e.subCtx({ formGroupStyle: "BasicDown" }); 9 | 10 | return ( 11 |
12 |
13 | n.days)} /> 14 |
15 |
16 | n.hours)} /> 17 |
18 |
19 | n.minutes)} /> 20 |
21 |
22 | n.seconds)} /> 23 |
24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Cache/Signum.Entities.Cache.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Cache/Signum.Entities.Cache.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////// 2 | //Auto-generated. Do NOT modify!// 3 | ////////////////////////////////// 4 | 5 | import { MessageKey, QueryKey, Type, EnumType, registerSymbol } from '../../../Framework/Signum.React/Scripts/Reflection' 6 | import * as Entities from '../../../Framework/Signum.React/Scripts/Signum.Entities' 7 | import * as Authorization from '../Authorization/Signum.Entities.Authorization' 8 | 9 | 10 | export module CachePermission { 11 | export const ViewCache : Authorization.PermissionSymbol = registerSymbol("Permission", "CachePermission.ViewCache"); 12 | export const InvalidateCache : Authorization.PermissionSymbol = registerSymbol("Permission", "CachePermission.InvalidateCache"); 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Chart/ChartController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Microsoft.AspNetCore.Mvc; 4 | using Signum.Engine.Basics; 5 | using Signum.Entities.Chart; 6 | using Signum.Engine.Chart; 7 | using System.ComponentModel.DataAnnotations; 8 | 9 | namespace Signum.React.Chart 10 | { 11 | public class ChartController : ControllerBase 12 | { 13 | [HttpGet("api/chart/scripts")] 14 | public List ChartScripts() 15 | { 16 | return ChartScriptLogic.Scripts.Values.ToList(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Chart/D3Scripts/Components/Axis.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import * as d3 from 'd3' 3 | import * as ChartUtils from './ChartUtils'; 4 | import { translate } from './ChartUtils'; 5 | import TextEllipsis from './TextEllipsis'; 6 | import { Rule } from './Rule'; 7 | 8 | export function XAxis({ xRule, yRule }: { xRule: Rule<"content">, yRule: Rule<"content"> }) { 9 | return ( 10 | 11 | 12 | 13 | ); 14 | } 15 | 16 | export function YAxis({ xRule, yRule }: { xRule: Rule<"content">, yRule: Rule<"content"> }) { 17 | return ( 18 | 19 | 20 | 21 | ); 22 | } 23 | 24 | export function YAxisEnd({ xRule, yRule }: { xRule: Rule<"content">, yRule: Rule<"content"> }) { 25 | return ( 26 | 27 | 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Chart/D3Scripts/Components/InitialMessage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import * as d3 from 'd3' 3 | import { ChartTable } from '../../ChartClient'; 4 | import { Rule } from './Rule'; 5 | import { JavascriptMessage, SearchMessage } from '@framework/Signum.Entities'; 6 | import { SearchControl } from '@framework/Search'; 7 | import { useInterval } from '@framework/Hooks'; 8 | 9 | interface InitialMessageProps { 10 | x?: number; 11 | y?: number; 12 | loading: boolean; 13 | data?: ChartTable; 14 | } 15 | 16 | export default function InitialMessage(p: InitialMessageProps) { 17 | 18 | var dots = useInterval(p.loading ? 1000 : null, 0, d => (d + 1) % 4); 19 | 20 | if (p.loading) 21 | return ( 22 | 23 | {JavascriptMessage.loading.niceToString() + ".".repeat(dots) + " ".repeat(3 - dots)} 24 | 25 | ); 26 | 27 | if (p.data == null) 28 | return ( 29 | 30 | {JavascriptMessage.searchForResults.niceToString()} 31 | 32 | ); 33 | 34 | if (p.data.rows.length == 0) 35 | return ( 36 | 37 | {SearchMessage.NoResultsFound.niceToString()} 38 | 39 | ); 40 | 41 | return null; 42 | } 43 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Chart/HtmlScripts/PivotTable.css: -------------------------------------------------------------------------------- 1 | table.pivot-table th { 2 | background: #f8f8f8; 3 | } 4 | 5 | .pivot-table a { 6 | color: inherit; 7 | } 8 | 9 | .pivot-table a:hover { 10 | color: dodgerblue; 11 | } 12 | 13 | .pivot-table tr:hover td, 14 | .pivot-table tr:hover th:not([rowspan]) { 15 | border-bottom: 1px solid black; 16 | } 17 | 18 | 19 | .pivot-table .sf-create-cell { 20 | position: absolute; 21 | top: 0px; 22 | right: 2px; 23 | font-size: 14px; 24 | display: none; 25 | } 26 | 27 | .pivot-table td, 28 | .pivot-table th { 29 | position: relative; 30 | } 31 | 32 | .pivot-table .sf-create-cell { 33 | position: absolute; 34 | top: 0px; 35 | right: 2px; 36 | font-size: 14px; 37 | display: none; 38 | } 39 | 40 | .pivot-table td:hover .sf-create-cell, 41 | .pivot-table th:hover .sf-create-cell { 42 | display: initial; 43 | } 44 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Chart/Signum.Entities.Chart.t4s: -------------------------------------------------------------------------------- 1 | import { FilterOptionParsed, OrderOptionParsed, FilterRequest, OrderRequest } from '@framework/FindOptions' 2 | 3 | //Partial 4 | export interface ChartRequestModel { 5 | queryKey: string; 6 | 7 | filterOptions: FilterOptionParsed[]; 8 | 9 | filters: FilterRequest[]; 10 | } 11 | 12 | export interface ChartScriptParameterEmbedded { 13 | enumValues: { name: string, typeFilter : ChartColumnType }[]; 14 | } 15 | 16 | export type IChartBase = ChartRequestModel | UserChartEntity; 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Chart/UserChart/UserChartController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using Signum.Entities; 4 | using Signum.Engine.Basics; 5 | using Signum.Entities.Chart; 6 | using Signum.Engine.Chart; 7 | using Signum.React.Filters; 8 | using Microsoft.AspNetCore.Mvc; 9 | 10 | namespace Signum.React.Chart 11 | { 12 | [ValidateModelFilter] 13 | public class UserChartController : ControllerBase 14 | { 15 | [HttpGet("api/userChart/forQuery/{queryKey}")] 16 | public IEnumerable> FromQuery(string queryKey) 17 | { 18 | return UserChartLogic.GetUserCharts(QueryLogic.ToQueryName(queryKey)); 19 | } 20 | 21 | [HttpGet("api/userChart/forEntityType/{typeName}")] 22 | public IEnumerable> FromEntityType(string typeName) 23 | { 24 | return UserChartLogic.GetUserChartsEntity(TypeLogic.GetType(typeName)); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/Admin/CombinedUserChartPart.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine, EntityStrip } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { UserChartPartEntity, DashboardEntity, CombinedUserChartPartEntity } from '../Signum.Entities.Dashboard' 5 | import { D3ChartScript, UserChartEntity } from '../../Chart/Signum.Entities.Chart'; 6 | 7 | export default function CombinedUserChartPart(p: { ctx: TypeContext }) { 8 | const ctx = p.ctx; 9 | 10 | return ( 11 |
12 | p.userCharts)} findOptions={{ 13 | queryName: UserChartEntity, filterOptions: [{ 14 | token: UserChartEntity.token(a => a.entity.chartScript.key), 15 | operation: "IsIn", 16 | value: [D3ChartScript.Columns.key, D3ChartScript.Line.key] 17 | }] 18 | }} /> 19 | 20 | p.showData)} inlineCheckbox="block" /> 21 | p.allowChangeShowData)} inlineCheckbox="block" /> 22 | p.combinePinnedFiltersWithSameLabel)} inlineCheckbox="block" /> 23 | p.useSameScale)} inlineCheckbox="block" /> 24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/Admin/LinkListPart.tsx: -------------------------------------------------------------------------------- 1 | 2 | import * as React from 'react' 3 | import { ValueLine, EntityRepeater } from '@framework/Lines' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { LinkListPartEntity, LinkElementEmbedded } from '../Signum.Entities.Dashboard' 6 | 7 | export default function ValueSearchControlPart(p : { ctx: TypeContext }){ 8 | const ctx = p.ctx.subCtx({ formGroupStyle: "SrOnly", placeholderLabels: true }); 9 | 10 | return ( 11 |
12 | p.links)} getComponent={(tc: TypeContext) => { 13 | return ( 14 |
15 | cuq.label)} /> 16 |   17 | cuq.link)} /> 18 |
19 | ); 20 | }} /> 21 |
22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/Admin/UserChartPart.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { UserChartPartEntity, DashboardEntity } from '../Signum.Entities.Dashboard' 5 | 6 | export default function UserChartPart(p: { ctx: TypeContext }) { 7 | const ctx = p.ctx; 8 | 9 | return ( 10 |
11 | p.userChart)} create={false} onChange={() => ctx.findParentCtx(DashboardEntity).frame!.entityComponent!.forceUpdate()} /> 12 | p.showData)} inlineCheckbox="block" /> 13 | p.allowChangeShowData)} inlineCheckbox="block" /> 14 | p.createNew)} inlineCheckbox="block" /> 15 | p.autoRefresh)} inlineCheckbox="block" /> 16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/Admin/UserQueryPart.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { UserQueryPartEntity, DashboardEntity } from '../Signum.Entities.Dashboard' 5 | import { useForceUpdate } from '@framework/Hooks'; 6 | 7 | export default function UserQueryPart(p: { ctx: TypeContext }) { 8 | const ctx = p.ctx.subCtx({ formGroupStyle: p.ctx.value.renderMode == "BigValue" ? "Basic" : undefined }); 9 | const forceUpdate = useForceUpdate(); 10 | return ( 11 |
12 | p.userQuery)} create={false} onChange={() => ctx.findParentCtx(DashboardEntity).frame!.entityComponent!.forceUpdate()} /> 13 | p.renderMode)} onChange={() => forceUpdate()} /> 14 | { 15 | ctx.value.renderMode == "SearchControl" &&
16 | p.allowSelection)} inlineCheckbox="block" /> 17 | p.showFooter)} inlineCheckbox="block" /> 18 | p.createNew)} inlineCheckbox="block" /> 19 |
20 | } 21 |
22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/Admin/ValueUserQueryListPart.tsx: -------------------------------------------------------------------------------- 1 | 2 | import * as React from 'react' 3 | import { ValueLine, EntityLine, EntityRepeater, EntityTable } from '@framework/Lines' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { ValueUserQueryListPartEntity, ValueUserQueryElementEmbedded } from '../Signum.Entities.Dashboard' 6 | 7 | export default function ValueUserQueryListPart(p : { ctx: TypeContext }){ 8 | 9 | const ctx = p.ctx; 10 | 11 | return ( 12 | p.userQueries)} /> 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/DashboardController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Signum.Engine.Authorization; 4 | using Signum.Entities; 5 | using Signum.Entities.Authorization; 6 | using Signum.Engine.Basics; 7 | using Signum.Entities.Dashboard; 8 | using Signum.Engine.Dashboard; 9 | using System.Linq; 10 | 11 | namespace Signum.React.Dashboard 12 | { 13 | public class DashboardController : ControllerBase 14 | { 15 | [HttpGet("api/dashboard/forEntityType/{typeName}")] 16 | public IEnumerable> FromEntityType(string typeName) 17 | { 18 | return DashboardLogic.GetDashboardsEntity(TypeLogic.GetType(typeName)); 19 | } 20 | [HttpGet("api/dashboard/home")] 21 | public Lite? Home() 22 | { 23 | var result = DashboardLogic.GetHomePageDashboard(); 24 | return result?.ToLite(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/DashboardServer.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Reflection; 3 | using Signum.React.UserAssets; 4 | using Signum.React.Facades; 5 | using Signum.Engine.Dashboard; 6 | using Signum.Entities.Dashboard; 7 | using Signum.Engine.Authorization; 8 | using Microsoft.AspNetCore.Builder; 9 | 10 | namespace Signum.React.Dashboard 11 | { 12 | public static class DashboardServer 13 | { 14 | public static void Start(IApplicationBuilder app) 15 | { 16 | UserAssetServer.Start(app); 17 | 18 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 19 | 20 | EntityPackTS.AddExtension += ep => 21 | { 22 | if (ep.entity.IsNew || !DashboardPermission.ViewDashboard.IsAuthorized()) 23 | return; 24 | 25 | var dashboards = DashboardLogic.GetDashboardsEntity(ep.entity.GetType()); 26 | if (dashboards.Any()) 27 | ep.extension.Add("dashboards", dashboards); 28 | 29 | var result = DashboardLogic.GetEmbeddedDashboards(ep.entity.GetType()); 30 | if (result != null) 31 | ep.extension.Add("embeddedDashboards", result); 32 | }; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/DashboardToolbarConfig.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Location } from 'history' 3 | import { ToolbarConfig, ToolbarResponse } from '../Toolbar/ToolbarClient' 4 | import * as DashboardClient from './DashboardClient' 5 | import { DashboardEntity } from './Signum.Entities.Dashboard' 6 | import { coalesceIcon } from '@framework/Operations/ContextualOperations'; 7 | import * as AppContext from '@framework/AppContext' 8 | import { parseIcon } from '../Basics/Templates/IconTypeahead' 9 | 10 | export default class DashboardToolbarConfig extends ToolbarConfig { 11 | 12 | constructor() { 13 | var type = DashboardEntity; 14 | super(type); 15 | } 16 | 17 | getIcon(element: ToolbarResponse) { 18 | return ToolbarConfig.coloredIcon(coalesceIcon(parseIcon(element.iconName), "th-large"), element.iconColor ?? "darkslateblue"); 19 | } 20 | 21 | navigateTo(element: ToolbarResponse): Promise { 22 | return Promise.resolve(DashboardClient.dashboardUrl(element.content!)); 23 | } 24 | 25 | isCompatibleWithUrl(res: ToolbarResponse, location: Location, query: any): boolean { 26 | return location.pathname == AppContext.toAbsoluteUrl(DashboardClient.dashboardUrl(res.content!)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/Signum.Entities.Dashboard.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Dashboard/View/LinkListPart.tsx: -------------------------------------------------------------------------------- 1 | 2 | import * as React from 'react' 3 | import * as AppContext from '@framework/AppContext' 4 | import { LinkListPartEntity, LinkElementEmbedded } from '../Signum.Entities.Dashboard' 5 | import { PanelPartContentProps } from '../DashboardClient'; 6 | 7 | export default function LinkListPart(p: PanelPartContentProps){ 8 | return ( 9 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /Signum.React.Extensions/DiffLog/DiffLogServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Signum.React.Facades; 3 | using Signum.Entities.DiffLog; 4 | using Microsoft.AspNetCore.Builder; 5 | using Signum.React.Authorization; 6 | using Signum.Engine.Authorization; 7 | using Signum.Entities.Basics; 8 | using Signum.Entities.Authorization; 9 | 10 | namespace Signum.React.DiffLog 11 | { 12 | public static class DiffLogServer 13 | { 14 | public static void Start(IApplicationBuilder app) 15 | { 16 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 17 | 18 | ReflectionServer.RegisterLike(typeof(DiffLogMessage), () => TimeMachinePermission.ShowTimeMachine.IsAuthorized() || TypeAuthLogic.GetAllowed(typeof(OperationLogEntity)).MaxUI() > TypeAllowedBasic.None); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Signum.React.Extensions/DiffLog/Signum.Entities.DiffLog.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/DiffLog/Templates/DiffLog.css: -------------------------------------------------------------------------------- 1 | .colorIcon { 2 | color: black; 3 | padding: 2px; 4 | margin: 0 2px; 5 | } 6 | 7 | .colorIcon.red { 8 | background: #FF8B8B; 9 | } 10 | 11 | .colorIcon.mini.red { 12 | background: #FFD1D1; 13 | } 14 | 15 | .colorIcon.green { 16 | background: #72F272; 17 | } 18 | 19 | .colorIcon.mini.green { 20 | background: #CEF3CE; 21 | } 22 | 23 | .nav-tabs > li.linkTab > a:hover { 24 | border-color: transparent; 25 | background-color: transparent; 26 | } 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Disconnected/Signum.Entities.Disconnected.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/CSS/DynamicCSSOverride.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, TypeContext } from '@framework/Lines' 3 | import CSSCodeMirror from '../../Codemirror/CSSCodeMirror' 4 | import { DynamicCSSOverrideEntity } from '../Signum.Entities.Dynamic' 5 | import { useForceUpdate } from '@framework/Hooks' 6 | 7 | export default function DynamicCSSOverrideComponent(p : { ctx: TypeContext }){ 8 | const forceUpdate = useForceUpdate(); 9 | function handleCodeChange(newScript: string) { 10 | const entity = p.ctx.value; 11 | entity.script = newScript; 12 | entity.modified = true; 13 | forceUpdate(); 14 | } 15 | 16 | var ctx = p.ctx; 17 | 18 | return ( 19 |
20 | dt.name)} /> 21 |
22 |
23 | 24 |
25 |
26 | ); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicApiClient.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { EntitySettings } from '@framework/Navigator' 3 | import * as Navigator from '@framework/Navigator' 4 | import { DynamicApiEntity, DynamicApiEval } from './Signum.Entities.Dynamic' 5 | import { SearchControl, ValueSearchControlLine } from '@framework/Search' 6 | import * as Finder from '@framework/Finder' 7 | import * as Constructor from '@framework/Constructor' 8 | import * as DynamicClientOptions from './DynamicClientOptions' 9 | 10 | export function start(options: { routes: JSX.Element[] }) { 11 | Navigator.addSettings(new EntitySettings(DynamicApiEntity, w => import('./Api/DynamicApi'))); 12 | Constructor.registerConstructor(DynamicApiEntity, () => DynamicApiEntity.New({ eval: DynamicApiEval.New() })); 13 | DynamicClientOptions.Options.onGetDynamicLineForPanel.push(ctx => ); 14 | DynamicClientOptions.Options.registerDynamicPanelSearch(DynamicApiEntity, t => [ 15 | { token: t.append(p => p.name), type: "Text" }, 16 | { token: t.append(p => p.entity.eval!.script), type: "Code" }, 17 | ]); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicCSSOverrideClient.tsx: -------------------------------------------------------------------------------- 1 | import { EntitySettings } from '@framework/Navigator' 2 | import * as Navigator from '@framework/Navigator' 3 | import { DynamicCSSOverrideEntity } from './Signum.Entities.Dynamic' 4 | import * as DynamicClientOptions from './DynamicClientOptions' 5 | 6 | export function start(options: { routes: JSX.Element[] }) { 7 | Navigator.addSettings(new EntitySettings(DynamicCSSOverrideEntity, w => import('./CSS/DynamicCSSOverride'))); 8 | DynamicClientOptions.Options.registerDynamicPanelSearch(DynamicCSSOverrideEntity, t => [ 9 | { token: t.append(p => p.name), type: "Text" }, 10 | { token: t.append(p => p.script), type: "Code" }, 11 | ]); 12 | } 13 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicClientController.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Basics; 2 | using Signum.Engine.Dynamic; 3 | using Signum.Entities.Dynamic; 4 | using Signum.Utilities; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using Microsoft.AspNetCore.Mvc; 9 | 10 | namespace Signum.React.Dynamic 11 | { 12 | public class DynamicClientController : ControllerBase 13 | { 14 | [HttpGet("api/dynamic/clients")] 15 | public List GetClients() 16 | { 17 | var res = DynamicClientLogic.Clients.Value; 18 | return res; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicIsolationClient.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import * as Navigator from '@framework/Navigator' 3 | import { DynamicTypeEntity, DynamicIsolationMixin } from './Signum.Entities.Dynamic' 4 | import { ValueLine } from '@framework/Lines' 5 | 6 | export function start(options: { routes: JSX.Element[] }) { 7 | 8 | Navigator.getSettings(DynamicTypeEntity)!.overrideView(vr => { 9 | vr.insertAfterLine(a => a.baseType, ctx => [ m.isolationStrategy)} labelColumns={3} />]) 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicPanelPage.css: -------------------------------------------------------------------------------- 1 | tr.dynamic-error-line { 2 | cursor: pointer; 3 | } 4 | 5 | 6 | .error-block h3 { 7 | margin-top: 0px; 8 | color: black; 9 | } 10 | 11 | .mini-alert { 12 | margin: 0 5px; 13 | padding: 0 5px; 14 | border-width: 1px; 15 | border-style: solid; 16 | border-radius: 3px; 17 | } 18 | 19 | .has-search .form-control { 20 | padding-left: 2.375rem; 21 | } 22 | 23 | .has-search .form-control-feedback { 24 | position: absolute; 25 | z-index: 2; 26 | display: block; 27 | width: 2.375rem; 28 | height: 2.375rem; 29 | line-height: 2.375rem; 30 | text-align: center; 31 | pointer-events: none; 32 | color: #aaa; 33 | } 34 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicServer.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Basics; 2 | using Signum.Entities; 3 | using Signum.Entities.Basics; 4 | using Signum.React.Json; 5 | using Signum.React.TypeHelp; 6 | using Signum.Utilities; 7 | using System.Reflection; 8 | using Microsoft.AspNetCore.Builder; 9 | using Signum.React.Facades; 10 | using Signum.Entities.Dynamic; 11 | using Signum.Entities.Authorization; 12 | 13 | namespace Signum.React.Dynamic 14 | { 15 | public static class DynamicServer 16 | { 17 | public static void Start(IApplicationBuilder app) 18 | { 19 | TypeHelpServer.Start(app); 20 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 21 | ReflectionServer.RegisterLike(typeof(DynamicViewMessage), () => UserEntity.Current != null); 22 | 23 | SignumServer.WebEntityJsonConverterFactory.AfterDeserilization.Register((PropertyRouteEntity wc) => 24 | { 25 | var route = PropertyRouteLogic.TryGetPropertyRouteEntity(wc.RootType, wc.Path); 26 | if (route != null) 27 | { 28 | wc.SetId(route.Id); 29 | wc.SetIsNew(false); 30 | wc.SetCleanModified(false); 31 | } 32 | }); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/DynamicTypeController.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine; 2 | using Signum.Engine.Dynamic; 3 | using Signum.Engine.Maps; 4 | using Signum.Entities.Dynamic; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using Microsoft.AspNetCore.Mvc; 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Signum.React.Dynamic 11 | { 12 | public class DynamicTypeController : ControllerBase 13 | { 14 | [HttpPost("api/dynamic/type/propertyType")] 15 | public string CodePropertyType([Required, FromBody]DynamicProperty property) 16 | { 17 | return DynamicTypeLogic.GetPropertyType(property); 18 | 19 | } 20 | 21 | [HttpGet("api/dynamic/type/expressionNames/{typeName}")] 22 | public List ExpressionNames(string typeName) 23 | { 24 | if (!Schema.Current.Tables.ContainsKey(typeof(DynamicExpressionEntity))) 25 | return new List(); 26 | 27 | return Database.Query().Where(a => a.FromType == typeName).Select(a => a.Name).ToList(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/Signum.Entities.Dynamic.t4s: -------------------------------------------------------------------------------- 1 | interface IDynamicValidationEvaluator {} 2 | interface IDynamicTypeConditionEvaluator {} 3 | interface IDynamicApiEvaluator {} 4 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/SignumDynamicApiControllerProvider.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.ApplicationParts; 3 | using Microsoft.AspNetCore.Mvc.Controllers; 4 | using Microsoft.CodeAnalysis; 5 | using Microsoft.CodeAnalysis.CSharp; 6 | using Signum.Engine; 7 | using Signum.Engine.Dynamic; 8 | using Signum.Entities.Dynamic; 9 | using Signum.Utilities; 10 | using System; 11 | using System.Collections.Generic; 12 | using System.IO; 13 | using System.Linq; 14 | using System.Reflection; 15 | using System.Text; 16 | using System.Threading.Tasks; 17 | using System.ComponentModel.DataAnnotations; 18 | 19 | 20 | namespace Signum.React.Extensions.Dynamic 21 | { 22 | public class SignumDynamicApiControllerProvider : IApplicationFeatureProvider 23 | { 24 | public void PopulateFeature(IEnumerable parts, ControllerFeature feature) 25 | { 26 | if (DynamicCode.CodeGenControllerAssemblyPath.HasText()) 27 | { 28 | var assembly = Assembly.LoadFrom(DynamicCode.CodeGenControllerAssemblyPath); 29 | var candidates = assembly.GetExportedTypes(); 30 | 31 | foreach (var candidate in candidates) 32 | { 33 | feature.Controllers.Add(candidate.GetTypeInfo()); 34 | } 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/Type/DynamicType.css: -------------------------------------------------------------------------------- 1 | div.properties h4 { 2 | color: #87a6b5; 3 | } 4 | 5 | div.properties a.sf-line-button:not(:hover) { 6 | color: #87a6b5; 7 | } 8 | 9 | div.properties div.card-header { 10 | padding: 5px; 11 | } 12 | 13 | div.properties .panel-group { 14 | margin-bottom: 5px; 15 | } 16 | 17 | div.validators h4 { 18 | color: #e6b600; 19 | } 20 | 21 | div.validators a.sf-line-button:not(:hover) { 22 | color: #e6b600; 23 | } 24 | 25 | div.validators div.card-header { 26 | padding: 2px; 27 | } 28 | 29 | div.validators .panel-group { 30 | margin-bottom: 5px; 31 | } 32 | 33 | .small-codemirror .CodeMirror { 34 | height: auto; 35 | } 36 | 37 | .database-mapping { 38 | color: #439b43; 39 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Dynamic/View/GlobalModules.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import * as luxon from 'luxon' 3 | import * as Entities from '@framework/Signum.Entities' 4 | import * as Operations from '@framework/Operations' 5 | import * as Constructor from '@framework/Constructor' 6 | import * as Globals from '@framework/Globals' 7 | import * as Finder from '@framework/Finder' 8 | import * as Reflection from '@framework/Reflection' 9 | import * as Navigator from '@framework/Navigator' 10 | import * as Components from '@framework/Components' 11 | import * as AuthClient from '../../Authorization/AuthClient' 12 | import * as Services from '@framework/Services' 13 | import * as TreeClient from '../../Tree/TreeClient' 14 | import * as AutoCompleteConfig from '@framework/Lines/AutoCompleteConfig' 15 | import * as Hooks from '@framework/Hooks' 16 | import * as SelectorModal from '@framework/SelectorModal' 17 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 18 | 19 | export const globalModules: any = { 20 | luxon, 21 | React, 22 | Components, 23 | Globals, 24 | Navigator, 25 | Finder, 26 | Reflection, 27 | Entities, 28 | AuthClient, 29 | Operations, 30 | Constructor, 31 | Services, 32 | TreeClient, 33 | AutoCompleteConfig, 34 | Hooks, 35 | SelectorModal, 36 | FontAwesomeIcon, 37 | }; 38 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Excel/ExcelServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Signum.React.Facades; 3 | using Signum.Entities.Excel; 4 | using Microsoft.AspNetCore.Builder; 5 | using Signum.Engine.Authorization; 6 | using Signum.Entities.Authorization; 7 | 8 | namespace Signum.React.Excel 9 | { 10 | public static class ExcelServer 11 | { 12 | public static void Start(IApplicationBuilder app) 13 | { 14 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 15 | 16 | ReflectionServer.RegisterLike(typeof(ExcelMessage), () => ExcelPermission.PlainExcel.IsAuthorized()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Excel/Signum.Entities.Excel.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Excel/Templates/ExcelReport.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { FileLine } from '../../Files/FileLine' 5 | import { ExcelReportEntity } from '../Signum.Entities.Excel' 6 | 7 | export default function ExcelReport(p : { ctx: TypeContext }){ 8 | const e = p.ctx; 9 | 10 | return ( 11 |
12 | f.query)} /> 13 | f.displayName)} /> 14 | f.file)} /> 15 |
16 | ); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Files/FileImage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { IFile, IFilePath } from "./Signum.Entities.Files"; 3 | import { configurtions } from "./FileDownloader"; 4 | import { ModifiableEntity } from '@framework/Signum.Entities'; 5 | import * as Services from '@framework/Services' 6 | import { PropertyRoute } from '@framework/Lines'; 7 | 8 | interface FileImageProps extends React.ImgHTMLAttributes { 9 | file?: IFile & ModifiableEntity | null; 10 | } 11 | 12 | export function FileImage(p: FileImageProps) { 13 | 14 | var [objectUrl, setObjectUrl] = React.useState(undefined); 15 | var { file, ...rest } = p; 16 | 17 | React.useEffect(() => { 18 | if (file && !file.fullWebPath && !file.binaryFile) { 19 | var url = configurtions[file.Type].fileUrl!(file); 20 | 21 | Services.ajaxGetRaw({ url: url }) 22 | .then(resp => resp.blob()) 23 | .then(blob => setObjectUrl(URL.createObjectURL(blob))) 24 | .done(); 25 | } 26 | return () => { objectUrl && URL.revokeObjectURL(objectUrl) }; 27 | }, [p.file]); 28 | 29 | var src = file == null ? undefined : 30 | (file as IFilePath).fullWebPath || (file.binaryFile != null ? "data:image/jpeg;base64," + file.binaryFile : objectUrl); 31 | return ( 32 | 33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Files/Files.tsx: -------------------------------------------------------------------------------- 1 | export { FileUploader } from './FileUploader' 2 | export { FileDownloader } from './FileDownloader' 3 | export { FileImageLine } from './FileImageLine' 4 | export { FileLine } from './FileLine' 5 | export { MultiFileLine } from './MultiFileLine' 6 | export { MultiFileImageLine } from './MultiFileImageLine' 7 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Files/Signum.Entities.Files.t4s: -------------------------------------------------------------------------------- 1 | export interface IFile 2 | { 3 | __isFile__ : true; //only for type-checking 4 | binaryFile?: string | null; 5 | fileName?: string | null; 6 | fullWebPath?: string | null; 7 | } 8 | 9 | export interface FileEntity extends IFile { } 10 | export interface FileEmbedded extends IFile { } 11 | 12 | export interface IFilePath extends IFile 13 | { 14 | fileType?: FileTypeSymbol | null; 15 | suffix?: string | null; 16 | } 17 | 18 | export interface FilePathEntity extends IFilePath { } 19 | export interface FilePathEmbedded extends IFilePath { 20 | entityId: number | string; 21 | mListRowId: number | string | null; 22 | propertyRoute: string; 23 | rootType: string; 24 | } 25 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Help/Help.css: -------------------------------------------------------------------------------- 1 | ul.responsive-columns { 2 | column-width: 360px; 3 | } 4 | 5 | ul.responsive-columns > li { 6 | break-inside: avoid-column; 7 | } 8 | 9 | .sf-edit-container:hover .sf-edit-button { 10 | color: #bbb; 11 | } 12 | 13 | .sf-edit-button { 14 | color: #eee; 15 | font-size: 16px; 16 | } 17 | 18 | .sf-edit-button:hover { 19 | color: #888 !important; 20 | } 21 | 22 | .sf-edit-button.active { 23 | color: #888 !important; 24 | } 25 | 26 | .sf-edit-button.block { 27 | margin-top: -16px; 28 | display: block; 29 | } 30 | 31 | .sf-info { 32 | opacity: .6; 33 | margin-bottom: -10px; 34 | } 35 | 36 | .sf-no-text{ 37 | opacity: .3; 38 | } 39 | 40 | .shortcut { 41 | opacity: 0; 42 | transition: opacity .25s ease-in-out; 43 | } 44 | 45 | .shortcut-container:hover .shortcut { 46 | opacity: 1; 47 | } 48 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Help/HelpServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.Help 5 | { 6 | public static class HelpServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Help/Signum.Entities.Help.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/HtmlEditor/Plugins/BasicCommandsPlugin.tsx: -------------------------------------------------------------------------------- 1 | import * as draftjs from 'draft-js'; 2 | import { HtmlEditorPlugin, HtmlEditorController } from '../HtmlEditor'; 3 | 4 | export default class BasicCommandsPlugin implements HtmlEditorPlugin { 5 | 6 | expandEditorProps?(props: draftjs.EditorProps, controller: HtmlEditorController) { 7 | var prevKeyCommand = props.handleKeyCommand; 8 | props.handleKeyCommand = (command, state, timeStamp) => { 9 | 10 | if (prevKeyCommand) { 11 | var result = prevKeyCommand(command, state, timeStamp); 12 | if (result == "handled") 13 | return result; 14 | } 15 | 16 | const inlineStyle = 17 | command == "bold" ? "BOLD" : 18 | command == "italic" ? "ITALIC" : 19 | command == "underline" ? "UNDERLINE" : 20 | undefined; 21 | 22 | if (inlineStyle) { 23 | controller.setEditorState(draftjs.RichUtils.toggleInlineStyle(controller.editorState, inlineStyle)); 24 | return "handled"; 25 | } 26 | 27 | return "not-handled"; 28 | } 29 | 30 | return props 31 | } 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /Signum.React.Extensions/HtmlEditor/draftjs-to-html.ts: -------------------------------------------------------------------------------- 1 | declare module "draftjs-to-html" { 2 | import { ContentState, RawDraftEntity, RawDraftContentState } from "draft-js" 3 | export default function draftToHtml( 4 | rawContentState: RawDraftContentState, 5 | hashConfig?: { trigger: "#", separator: " " }, 6 | directional?: boolean, 7 | customEntityTransform?: (entity: RawDraftEntity, text: string) => string | undefined 8 | ): string; 9 | } 10 | -------------------------------------------------------------------------------- /Signum.React.Extensions/HtmlEditor/html-to-draftjs.d.ts: -------------------------------------------------------------------------------- 1 | declare module "html-to-draftjs" { 2 | import { ContentState, RawDraftEntity, ContentBlock, RawDraftContentBlock } from "draft-js" 3 | export default function htmlToDraft( 4 | htmlContent: string, 5 | customChunkRenderer?: (nodeName: string, node: HTMLElement) => RawDraftEntity | null | undefined 6 | ): { 7 | contentBlocks: Array; 8 | entityMap: { [key: string]: RawDraftEntity }; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Isolation/IsolationFilter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.Filters; 2 | using Signum.Engine.Isolation; 3 | using Signum.Entities; 4 | using Signum.Entities.Authorization; 5 | using Signum.Entities.Isolation; 6 | using Signum.React.Filters; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading.Tasks; 11 | 12 | namespace Signum.React.Extensions.Isolation 13 | { 14 | public class IsolationFilter : SignumDisposableResourceFilter 15 | { 16 | public override IDisposable? GetResource(ResourceExecutingContext context) 17 | { 18 | var user = UserEntity.Current; 19 | 20 | if (user == null) 21 | return null; 22 | 23 | var isolation = user.TryMixin()?.Isolation; 24 | 25 | if (isolation == null) 26 | { 27 | var isolationKey = context.HttpContext.Request.Headers["SF_Isolation"].FirstOrDefault(); 28 | if (isolationKey != null) 29 | isolation = Lite.Parse(isolationKey); 30 | } 31 | 32 | return IsolationEntity.Override(isolation); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Isolation/IsolationWidget.tsx: -------------------------------------------------------------------------------- 1 | 2 | import * as React from 'react' 3 | import { ModifiableEntity, tryGetMixin } from '@framework/Signum.Entities' 4 | import { IsolationMessage, IsolationMixin } from './Signum.Entities.Isolation'; 5 | import * as IsolationClient from './IsolationClient'; 6 | import { WidgetContext } from '@framework/Frames/Widgets'; 7 | 8 | export interface IsolationWidgetProps { 9 | wc: WidgetContext 10 | } 11 | 12 | export function IsolationWidget(p: IsolationWidgetProps) { 13 | 14 | const entity = p.wc.ctx.value; 15 | 16 | var mixin = tryGetMixin(entity, IsolationMixin); 17 | 18 | if (mixin == null) 19 | return null; 20 | 21 | const isolation = entity.isNew ? IsolationClient.getOverridenIsolation().current?.toStr ?? IsolationMessage.GlobalEntity.niceToString() : 22 | mixin.isolation?.toStr ?? IsolationMessage.GlobalEntity.niceToString(); 23 | 24 | return ( 25 | {isolation} 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Isolation/Signum.Entities.Isolation.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Joyride/JoyrideClient.tsx: -------------------------------------------------------------------------------- 1 | import { EntitySettings } from '@framework/Navigator' 2 | import * as Navigator from '@framework/Navigator' 3 | import { JoyrideEntity, JoyrideStepEntity, JoyrideStepStyleEntity } from './Signum.Entities.Joyride' 4 | import * as UserAssetClient from '../UserAssets/UserAssetClient' 5 | 6 | export function start(options: { routes: JSX.Element[] }) { 7 | 8 | Navigator.addSettings(new EntitySettings(JoyrideEntity, a => import('./Templates/Joyride'))); 9 | Navigator.addSettings(new EntitySettings(JoyrideStepEntity, a => import('./Templates/JoyrideStep'))); 10 | Navigator.addSettings(new EntitySettings(JoyrideStepStyleEntity, a => import('./Templates/JoyrideStepStyle'))); 11 | 12 | UserAssetClient.registerExportAssertLink(JoyrideEntity); 13 | UserAssetClient.registerExportAssertLink(JoyrideStepEntity); 14 | UserAssetClient.registerExportAssertLink(JoyrideStepStyleEntity); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Joyride/JoyrideNavItem.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Nav } from 'react-bootstrap' 3 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' 4 | import { JoyrideComponentHandle } from "./JoyrideComponent"; 5 | 6 | export interface JoyrideNavItemProps { 7 | getJoyrideComponent: () => JoyrideComponentHandle; 8 | } 9 | 10 | export default function JoyrideNavItem(p : JoyrideNavItemProps){ 11 | 12 | function onClick() { 13 | const joyrideComponent = p.getJoyrideComponent(); 14 | 15 | if (joyrideComponent?.joyride) 16 | joyrideComponent.joyride.reset(true); 17 | } 18 | 19 | return ( 20 | 21 | 22 | 23 | 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Joyride/Signum.Entities.Joyride.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Joyride/Templates/JoyrideStep.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { JoyrideStepEntity } from '../Signum.Entities.Joyride' 3 | import { ValueLine, EntityLine, TypeContext } from '@framework/Lines' 4 | import HtmlCodemirror from "../../Codemirror/HtmlCodemirror"; 5 | 6 | export default function JoyrideStep(p : { ctx: TypeContext }){ 7 | const ctx = p.ctx; 8 | return ( 9 |
10 | a.title)} /> 11 | a.culture)} /> 12 | a.selector)} /> 13 | a.position)} /> 14 | a.type)} /> 15 | a.allowClicksThruHole)} /> 16 | a.isFixed)} /> 17 | a.style)} /> 18 | a.text)} /> 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Joyride/Templates/JoyrideStepStyle.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { JoyrideStepStyleEntity } from '../Signum.Entities.Joyride' 3 | import { ValueLine, TypeContext } from '@framework/Lines' 4 | import { ColorTypeaheadLine } from '../../Basics/Templates/ColorTypeahead'; 5 | 6 | export default function JoyrideStepStyle(p : { ctx: TypeContext }){ 7 | const ctx = p.ctx; 8 | return ( 9 |
10 | a.name)} /> 11 | a.color)} /> 12 | a.mainColor)} /> 13 | a.backgroundColor)} /> 14 | a.borderRadius)} /> 15 | a.textAlign)} /> 16 | a.width)} /> 17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /Signum.React.Extensions/MachineLearning/PredictorServer.cs: -------------------------------------------------------------------------------- 1 | using Signum.React.Json; 2 | using Signum.Utilities; 3 | using System.Reflection; 4 | using Signum.Engine.Basics; 5 | using Signum.React.UserAssets; 6 | using Signum.Entities.MachineLearning; 7 | using Signum.Engine.MachineLearning; 8 | using Microsoft.AspNetCore.Builder; 9 | using Signum.React.Facades; 10 | 11 | namespace Signum.React.MachineLearning 12 | { 13 | public static class PredictorServer 14 | { 15 | public static void Start(IApplicationBuilder app) 16 | { 17 | UserAssetServer.Start(app); 18 | 19 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 20 | 21 | SignumServer.WebEntityJsonConverterFactory.AfterDeserilization.Register((PredictorMainQueryEmbedded p) => 22 | { 23 | if (p.Query != null) 24 | { 25 | p.ParseData(); 26 | } 27 | }); 28 | 29 | SignumServer.WebEntityJsonConverterFactory.AfterDeserilization.Register((PredictorSubQueryEntity mc) => 30 | { 31 | if (mc.Query != null) 32 | { 33 | var qd = QueryLogic.Queries.QueryDescription(mc.Query.ToQueryName()); 34 | mc.ParseData(qd); 35 | } 36 | }); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Signum.React.Extensions/MachineLearning/Signum.Entities.MachineLearning.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Mailing.css: -------------------------------------------------------------------------------- 1 | .sf-email-htmlbody 2 | { 3 | border: 0; 4 | min-height: 200px; 5 | } 6 | .sf-template-message-insert-container 7 | { 8 | margin: 10px 9 | } 10 | .sf-email-inserttoken-targetactive 11 | { 12 | border: 2px solid #58ACFA !important; 13 | } 14 | .sf-email-replacements-container 15 | { 16 | margin-top: 5px; 17 | } 18 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Pop3/Pop3Reception.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { ValueSearchControlLine } from '@framework/Search' 4 | import { ExceptionEntity } from '@framework/Signum.Entities.Basics' 5 | import { TypeContext } from '@framework/TypeContext' 6 | import { Pop3ReceptionEntity, EmailMessageEntity, EmailReceptionMixin } from '../Signum.Entities.Mailing' 7 | 8 | export default function Pop3Reception(p : { ctx: TypeContext }){ 9 | const sc = p.ctx; 10 | 11 | return ( 12 |
13 | s.pop3Configuration)} /> 14 | s.startDate)} /> 15 | s.endDate)} /> 16 | s.newEmails)} /> 17 | s.exception)} /> 18 | a.entity).mixin(EmailReceptionMixin).append(a => a.receptionInfo!.reception), parentValue: sc.value }} /> 19 | a.entity).expression("Pop3Reception"), parentValue: sc.value }} /> 20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Signum.Entities.Mailing.t4s: -------------------------------------------------------------------------------- 1 | export interface Pop3ConfigurationEntity { 2 | newPassword: string; 3 | } 4 | 5 | export interface SmtpNetworkDeliveryEmbedded { 6 | newPassword: string; 7 | } 8 | 9 | export interface ExchangeWebServiceEmbedded { 10 | newPassword: string; 11 | } 12 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Templates/EmailFrom.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { EmailAddressEmbedded, EmailFromEmbedded } from '../Signum.Entities.Mailing' 5 | 6 | export default function EmailFrom(p: { ctx: TypeContext }) { 7 | const sc = p.ctx.subCtx({ placeholderLabels: true, formGroupStyle: "SrOnly" }); 8 | 9 | return ( 10 |
11 |
12 | ea.emailOwner)} /> 13 |
14 |
15 | c.emailAddress)} /> 16 | c.azureUserId)} /> 17 |
18 |
19 | c.displayName)} /> 20 |
21 |
22 | ); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Templates/EmailPackage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { SearchControl } from '@framework/Search' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { EmailPackageEntity, EmailMessageEntity } from '../Signum.Entities.Mailing' 6 | 7 | export default function EmailPackage(p : { ctx: TypeContext }){ 8 | const e = p.ctx; 9 | 10 | return ( 11 |
12 | f.name)} readOnly={true} /> 13 |
14 | {EmailMessageEntity.nicePluralName()} 15 | e.package), 18 | parentValue: e.value 19 | }} /> 20 |
21 |
22 | ); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Templates/EmailRecipient.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { EmailRecipientEmbedded } from '../Signum.Entities.Mailing' 5 | 6 | export default function EmailRecipient(p : { ctx: TypeContext }){ 7 | const sc = p.ctx.subCtx({ placeholderLabels: true, formGroupStyle: "SrOnly" }); 8 | 9 | return ( 10 |
11 |
12 | c.kind)} /> 13 |
14 |
15 | ea.emailOwner)} /> 16 |
17 |
18 | c.emailAddress)} /> 19 |
20 |
21 | c.displayName)} /> 22 |
23 |
24 | ); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Templates/IframeRenderer.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | export interface IFrameRendererProps extends React.HTMLAttributes { 4 | html: string | null | undefined; 5 | } 6 | 7 | export default function IFrameRenderer({ html, ...props }: IFrameRendererProps) { 8 | 9 | const iframe = React.useRef(null) 10 | 11 | React.useEffect(() => { 12 | iframe.current!.contentDocument!.body.innerHTML = html ?? ""; 13 | }, [html]); 14 | 15 | return ; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Mailing/Templates/MicrosoftGraph.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityCombo } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { EmailConfigurationEmbedded, MicrosoftGraphEmbedded } from '../Signum.Entities.Mailing' 5 | import { useForceUpdate } from '../../../../Framework/Signum.React/Scripts/Hooks'; 6 | 7 | export default function MicrosoftGraph(p: { ctx: TypeContext }) { 8 | const sc = p.ctx; 9 | const forceUpdate = useForceUpdate(); 10 | 11 | return ( 12 |
13 | ca.useActiveDirectoryConfiguration)} onChange={forceUpdate} /> 14 | { 15 | !sc.value.useActiveDirectoryConfiguration &&
16 | ca.azure_DirectoryID)} /> 17 | ca.azure_ApplicationID)} /> 18 | ca.azure_ClientSecret)} /> 19 |
20 | } 21 |
22 | ); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Map/MapController.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Basics; 2 | using Signum.Entities.Map; 3 | using Signum.Engine.Authorization; 4 | using Signum.React.Maps; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace Signum.React.Map 8 | { 9 | public class MapController : ControllerBase 10 | { 11 | [HttpGet("api/map/types")] 12 | public SchemaMapInfo Index() 13 | { 14 | MapPermission.ViewMap.AssertAuthorized(); 15 | 16 | return SchemaMap.GetMapInfo(); 17 | 18 | } 19 | 20 | [HttpGet("api/map/operations/{typeName}")] 21 | public OperationMapInfo Operation(string typeName) 22 | { 23 | MapPermission.ViewMap.AssertAuthorized(); 24 | 25 | return OperationMap.GetOperationMapInfo(TypeLogic.GetType(typeName)); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Map/Operation/operationMap.css: -------------------------------------------------------------------------------- 1 |  2 | rect.state { 3 | stroke-width: 1px; 4 | shape-rendering: geometricPrecision; 5 | } 6 | 7 | rect.state.special { 8 | color:lightgray; 9 | fill: lightgray; 10 | stroke-width: 2px; 11 | stroke-dasharray: 2 2; 12 | } 13 | 14 | rect.state.ignore { 15 | stroke-dasharray: 2 2; 16 | } 17 | 18 | text.state { 19 | text-anchor: middle; 20 | cursor: default; 21 | font-size: 16px; 22 | } 23 | 24 | rect.operation { 25 | fill-opacity: .5; 26 | stroke-width:0; 27 | } 28 | 29 | text.operation { 30 | text-anchor: middle; 31 | cursor: default; 32 | font-size: 12px; 33 | } 34 | 35 | path.link { 36 | fill:transparent; 37 | } 38 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Map/Schema/ColorProviders/Isolation.tsx: -------------------------------------------------------------------------------- 1 | import { ClientColorProvider, TableInfo } from '../SchemaMap' 2 | 3 | export default function getDefaultProviders(info: TableInfo[]): ClientColorProvider[] { 4 | return [ 5 | { 6 | name: "namespace", 7 | getFill: t => t.extra["isolation"] == undefined ? "white" : 8 | t.extra["isolation"] == "Isolated" ? "#CC0099" : 9 | t.extra["isolation"] == "Optional" ? "#9966FF" : 10 | t.extra["isolation"] == "None" ? "#00CCFF" : "black", 11 | getTooltip: t => t.extra["isolation"] == undefined ? undefined : t.extra["isolation"] 12 | } 13 | ]; 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Map/Signum.Entities.Map.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Migrations/Signum.Entities.Migrations.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Migrations/Signum.Entities.Migrations.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////// 2 | //Auto-generated. Do NOT modify!// 3 | ////////////////////////////////// 4 | 5 | import { MessageKey, QueryKey, Type, EnumType, registerSymbol } from '../../../Framework/Signum.React/Scripts/Reflection' 6 | import * as Entities from '../../../Framework/Signum.React/Scripts/Signum.Entities' 7 | import * as Basics from '../../../Framework/Signum.React/Scripts/Signum.Entities.Basics' 8 | 9 | 10 | export const CSharpMigrationEntity = new Type("CSharpMigration"); 11 | export interface CSharpMigrationEntity extends Entities.Entity { 12 | Type: "CSharpMigration"; 13 | uniqueName: string; 14 | executionDate: string; 15 | } 16 | 17 | export const LoadMethodLogEntity = new Type("LoadMethodLog"); 18 | export interface LoadMethodLogEntity extends Entities.Entity { 19 | Type: "LoadMethodLog"; 20 | methodName: string | null; 21 | className: string | null; 22 | description: string | null; 23 | start: string; 24 | end: string | null; 25 | exception: Entities.Lite | null; 26 | } 27 | 28 | export const SqlMigrationEntity = new Type("SqlMigration"); 29 | export interface SqlMigrationEntity extends Entities.Entity { 30 | Type: "SqlMigration"; 31 | versionNumber: string; 32 | comment: string | null; 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Notes/Signum.Entities.Notes.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Notes/Templates/Note.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine, EntityCombo } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { NoteEntity } from '../Signum.Entities.Notes' 5 | 6 | export default function Note(p : { ctx: TypeContext }){ 7 | const e = p.ctx; 8 | 9 | const ec = e.subCtx({ labelColumns: { sm: 2 } }); 10 | const sc = ec.subCtx({ formGroupStyle: "Basic" }); 11 | 12 | return ( 13 |
14 | {!ec.value.isNew && 15 |
16 | e.createdBy)} readOnly={true} /> 17 | e.creationDate)} readOnly={true} /> 18 |
19 | } 20 | n.target)} readOnly={true} /> 21 |
22 | n.title)} /> 23 | n.noteType)} remove={true} /> 24 | n.text)} valueLineType="TextArea" valueHtmlAttributes={{ style: { height: "180px" } }} /> 25 |
26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Omnibox/OmniboxController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Linq; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Signum.Engine.Authorization; 6 | using Signum.Entities.Omnibox; 7 | using Signum.React.Filters; 8 | 9 | namespace Signum.React.Omnibox 10 | { 11 | [ValidateModelFilter] 12 | public class OmniboxController : ControllerBase 13 | { 14 | [HttpPost("api/omnibox")] 15 | public List OmniboxResults([Required, FromBody]OmniboxRequest request) 16 | { 17 | OmniboxPermission.ViewOmnibox.AssertAuthorized(); 18 | 19 | var generator = new SpecialOmniboxGenerator() 20 | { 21 | Actions = request.specialActions.ToDictionary(a => a, a => new ReactSpecialOmniboxAction { Key = a }) 22 | }; 23 | 24 | using (ReactSpecialOmniboxGenerator.OverrideClientGenerator(generator)) 25 | { 26 | return OmniboxParser.Results(request.query, new System.Threading.CancellationToken()); 27 | } 28 | } 29 | 30 | public class OmniboxRequest 31 | { 32 | public string query; 33 | public string[] specialActions; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Omnibox/Signum.Entities.Omnibox.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Omnibox/SpecialOmniboxProvider.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { OmniboxResult, OmniboxMatch, OmniboxProvider, specialActions } from './OmniboxClient' 3 | 4 | export default class SpecialOmniboxProvider extends OmniboxProvider 5 | { 6 | getProviderName() { 7 | return "SpecialOmniboxResult"; 8 | } 9 | 10 | icon() { 11 | return this.coloredIcon("cog", "limegreen"); 12 | } 13 | 14 | renderItem(result: SpecialOmniboxResult): React.ReactChild[] { 15 | 16 | const array: React.ReactChild[] = []; 17 | 18 | array.push(this.icon()); 19 | 20 | array.push("!"); 21 | 22 | this.renderMatch(result.match, array) 23 | 24 | return array; 25 | } 26 | 27 | navigateTo(result: SpecialOmniboxResult) { 28 | return specialActions[result.key].onClick(); 29 | } 30 | 31 | toString(result: SpecialOmniboxResult) { 32 | return "!" + result.key; 33 | } 34 | } 35 | 36 | interface SpecialOmniboxResult extends OmniboxResult { 37 | match: OmniboxMatch; 38 | key: string; 39 | } 40 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Printing/PrintController.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Printing; 2 | using Signum.Entities.Files; 3 | using Signum.Entities.Processes; 4 | using Signum.React.Filters; 5 | using System.Collections.Generic; 6 | using Microsoft.AspNetCore.Mvc; 7 | using System.ComponentModel.DataAnnotations; 8 | 9 | namespace Signum.React.Processes 10 | { 11 | [ValidateModelFilter] 12 | public class PrintController : ControllerBase 13 | { 14 | [HttpGet("api/printing/stats")] 15 | public List Stats() 16 | { 17 | return PrintingLogic.GetReadyToPrintStats(); 18 | } 19 | 20 | [HttpPost("api/printing/createProcess")] 21 | public ProcessEntity? Stats([Required, FromBody]FileTypeSymbol fileType) 22 | { 23 | return PrintingLogic.CreateProcess(fileType); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Printing/PrintServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.Printing 5 | { 6 | public static class PrintServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Printing/Signum.Entities.Printing.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Printing/Templates/PrintLine.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { SearchControl } from '@framework/Search' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { PrintLineEntity } from '../Signum.Entities.Printing' 6 | import { ProcessExceptionLineEntity } from '../../Processes/Signum.Entities.Processes' 7 | import { FileLine } from '../../Files/FileLine' 8 | 9 | export default function PrintLine(p : { ctx: TypeContext }){ 10 | const e = p.ctx.subCtx({ readOnly: true }); 11 | 12 | return ( 13 |
14 | f.creationDate)} /> 15 | f.referred)} /> 16 | f.file)} fileType={e.value.testFileType ?? undefined} readOnly={p.ctx.value.state != "NewTest"} /> 17 | f.state)} /> 18 | f.printedOn)} /> 19 | {!e.value.isNew && 20 |
21 | {ProcessExceptionLineEntity.nicePluralName()} 22 | e.line), parentValue: e.value }} /> 23 |
24 | } 25 |
26 | ); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Printing/Templates/PrintPackage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { SearchControl } from '@framework/Search' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { PrintPackageEntity, PrintLineEntity } from '../Signum.Entities.Printing' 6 | 7 | export default function PrintPackage(p : { ctx: TypeContext }){ 8 | const e = p.ctx; 9 | 10 | return ( 11 |
12 | f.name)} /> 13 |
14 | {PrintLineEntity.nicePluralName()} 15 | e.package), parentValue: e.value }} /> 16 |
17 |
18 | ); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Processes/ProcessServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.Processes 5 | { 6 | public static class ProcessServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Processes/Processes.css: -------------------------------------------------------------------------------- 1 | .progressContainer 2 | { 3 | padding: 3px; 4 | border: solid 1px #BDBDBD; 5 | width: 250px; 6 | height:15px; 7 | } 8 | 9 | .progressBar 10 | { 11 | background-color: #A9F5F2; 12 | width: 0px; 13 | height: auto; 14 | } 15 | 16 | span.process-contextual-icon { 17 | float: right; 18 | font-size: initial; 19 | margin-left: 5px; 20 | color: gray; 21 | } 22 | 23 | span.process-contextual-icon:hover { 24 | color: black; 25 | } 26 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Processes/Signum.Entities.Processes.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Processes/Templates/Package.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { SearchControl } from '@framework/Search' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { PackageEntity, PackageLineEntity, PackageQuery } from '../Signum.Entities.Processes' 6 | 7 | export default function Package(p : { ctx: TypeContext }){ 8 | const e = p.ctx; 9 | 10 | return ( 11 |
12 | f.name)} /> 13 |
14 | {PackageLineEntity.nicePluralName()} 15 | e.package), parentValue: e.value }} /> 16 |
17 |
18 | ); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Processes/Templates/PackageLine.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { SearchControl, ValueSearchControlLine } from '@framework/Search' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { PackageLineEntity, ProcessExceptionLineEntity } from '../Signum.Entities.Processes' 6 | 7 | export default function Package(p : { ctx: TypeContext }){ 8 | const ctx = p.ctx.subCtx({ readOnly: true }); 9 | 10 | return ( 11 |
12 | f.package)} /> 13 | f.target)} /> 14 | f.result)} /> 15 | f.finishTime)} /> 16 | e.line), 21 | parentValue: ctx.value 22 | }} /> 23 |
24 | ); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Processes/Templates/PackageOperation.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { SearchControl } from '@framework/Search' 4 | import { TypeContext } from '@framework/TypeContext' 5 | import { PackageOperationEntity, PackageLineEntity, PackageQuery } from '../Signum.Entities.Processes' 6 | 7 | export default function PackageOperation(p : { ctx: TypeContext }){ 8 | const e = p.ctx; 9 | 10 | return ( 11 |
12 | f.name)} /> 13 | f.operation)} readOnly={true} /> 14 |
15 | {PackageLineEntity.nicePluralName()} 16 | e.package), parentValue: e.value }} /> 17 |
18 |
19 | ); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Profiler/Heavy/Profiler.css: -------------------------------------------------------------------------------- 1 | .sf-profiler-chart svg 2 | { 3 | shape-rendering: crispEdges; 4 | } 5 | .sf-profiler-chart .entry 6 | { 7 | cursor: pointer; 8 | } 9 | .sf-profiler-chart .shape-before 10 | { 11 | opacity: 0.3; 12 | fill: white; 13 | } 14 | .sf-profiler-chart .label 15 | { 16 | font-size: 12px; 17 | } 18 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Profiler/ProfilerServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Signum.React.Facades; 3 | using Signum.Entities.Profiler; 4 | using Microsoft.AspNetCore.Builder; 5 | using Signum.React.Authorization; 6 | using Signum.Engine.Authorization; 7 | 8 | namespace Signum.React.Profiler 9 | { 10 | public static class ProfilerServer 11 | { 12 | public static void Start(IApplicationBuilder app) 13 | { 14 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 15 | ReflectionServer.RegisterLike(typeof(ProfilerPermission), () => ProfilerPermission.ViewHeavyProfiler.IsAuthorized() || ProfilerPermission.ViewTimeTracker.IsAuthorized()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Profiler/Signum.Entities.Profiler.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Profiler/Signum.Entities.Profiler.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////// 2 | //Auto-generated. Do NOT modify!// 3 | ////////////////////////////////// 4 | 5 | import { MessageKey, QueryKey, Type, EnumType, registerSymbol } from '../../../Framework/Signum.React/Scripts/Reflection' 6 | import * as Entities from '../../../Framework/Signum.React/Scripts/Signum.Entities' 7 | import * as Authorization from '../Authorization/Signum.Entities.Authorization' 8 | 9 | 10 | export module ProfilerPermission { 11 | export const ViewTimeTracker : Authorization.PermissionSymbol = registerSymbol("Permission", "ProfilerPermission.ViewTimeTracker"); 12 | export const ViewHeavyProfiler : Authorization.PermissionSymbol = registerSymbol("Permission", "ProfilerPermission.ViewHeavyProfiler"); 13 | export const OverrideSessionTimeout : Authorization.PermissionSymbol = registerSymbol("Permission", "ProfilerPermission.OverrideSessionTimeout"); 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Profiler/Times/Times.css: -------------------------------------------------------------------------------- 1 | .task { 2 | border-bottom: 1px solid #ddd; 3 | list-style: none; 4 | } 5 | 6 | .task .processName { 7 | font-size: 150%; 8 | } 9 | 10 | .task .numTimes { 11 | color: #666; 12 | } 13 | 14 | .task .max, .task .med, .task .min, .task .last, .task .sum { 15 | display: block; 16 | height: 10px; 17 | float: left; 18 | margin-right: 10px; 19 | margin-left: 0px; 20 | } 21 | 22 | .task .max { 23 | background: #b22222; 24 | } 25 | 26 | .task .med { 27 | background: #ff7722; 28 | } 29 | 30 | .task .min { 31 | background: #ffd700; 32 | } 33 | 34 | .task .last { 35 | background: #b27aff; 36 | } 37 | 38 | .task .sum { 39 | background: #597FFF; 40 | } 41 | 42 | .leftBorder { 43 | border-left: 1px solid #eee; 44 | } 45 | 46 | #tasks { 47 | width: 1200px; 48 | } 49 | 50 | #tasks .left { 51 | float: left; 52 | } 53 | 54 | 55 | .entityName { 56 | color:darkgreen; 57 | font-weight:bold; 58 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:57328/", 7 | "sslPort": 44399 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "Signum.React.Extensions": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:53271/" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Properties/launchSettings.json.orig: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | <<<<<<< HEAD 7 | "applicationUrl": "http://localhost:57615/", 8 | ======= 9 | "applicationUrl": "http://localhost:53267/", 10 | >>>>>>> 4620215e715c28da287367a73519c94f14117d40 11 | "sslPort": 0 12 | } 13 | }, 14 | "profiles": { 15 | "IIS Express": { 16 | "commandName": "IISExpress", 17 | "launchBrowser": true, 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "Signum.React.Extensions": { 23 | "commandName": "Project", 24 | "launchBrowser": true, 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | }, 28 | <<<<<<< HEAD 29 | "applicationUrl": "http://localhost:57617/" 30 | ======= 31 | "applicationUrl": "http://localhost:53271/" 32 | >>>>>>> 4620215e715c28da287367a73519c94f14117d40 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Rest/RestApiKeyController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Signum.Engine; 4 | using Signum.Engine.Rest; 5 | using Signum.Entities; 6 | using Signum.Entities.Authorization; 7 | using Signum.Entities.Rest; 8 | 9 | namespace Signum.React.Profiler 10 | { 11 | public class RestApiKeyController : ControllerBase 12 | { 13 | [HttpGet("api/restApiKey/generate")] 14 | public string GenerateRestApiKey() 15 | { 16 | return RestApiKeyLogic.GenerateRestApiKey(); 17 | } 18 | 19 | [HttpGet("api/restApiKey/current")] 20 | public string? GetAPIKey() 21 | { 22 | using (ExecutionMode.Global()) 23 | return Database.Query().Where(a => a.User.Is(UserEntity.Current)).Select(a => a.ApiKey).SingleOrDefault(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Rest/RestLogController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Net.Http; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Signum.Engine; 7 | using Signum.Entities; 8 | using Signum.Entities.Rest; 9 | using Signum.Engine.Rest; 10 | 11 | namespace Signum.React.RestLog 12 | { 13 | public class RestLogController : ControllerBase 14 | { 15 | [HttpGet("api/restLog/")] 16 | public async Task GetRestDiffLog(string id, string url) 17 | { 18 | var oldRequest = Database.Retrieve(PrimaryKey.Parse(id, typeof(RestLogEntity))); 19 | if (!oldRequest.AllowReplay) 20 | { 21 | throw new InvalidOperationException("Replay not allowed for this RestLog"); 22 | } 23 | var oldCredentials = Database.Query().Single(r => r.User.Is(oldRequest.User)); 24 | 25 | var result = await RestLogLogic.GetRestDiffResult(new HttpMethod(oldRequest.HttpMethod!), url, oldCredentials.ApiKey, oldRequest.RequestBody, oldRequest.ResponseBody); 26 | 27 | return RestLogLogic.RestDiffLog(result); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Rest/RestLogServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.RestLog 5 | { 6 | public static class RestLogServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | 12 | 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Rest/Signum.Entities.Rest.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Rest/Templates/RestApiKey.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' 3 | import { RestApiKeyEntity } from '../Signum.Entities.Rest' 4 | import { TypeContext, ValueLine, EntityLine } from "@framework/Lines"; 5 | import { classes } from "@framework/Globals"; 6 | import { API } from "../RestClient"; 7 | import { useForceUpdate } from '@framework/Hooks'; 8 | 9 | export default function RestApiKeyComponent(p : { ctx: TypeContext }){ 10 | 11 | const forceUpdate = useForceUpdate(); 12 | 13 | function generateApiKey(e: React.MouseEvent) { 14 | e.preventDefault(); 15 | API.generateRestApiKey() 16 | .then(key => { 17 | p.ctx.value.apiKey = key; 18 | forceUpdate(); 19 | }) 20 | .done(); 21 | } 22 | 23 | const ctx = p.ctx; 24 | return ( 25 |
26 | e.user)} /> 27 | e.apiKey)} 28 | extraButtons={vl => 29 | 31 | 32 | } /> 33 |
34 | ); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /Signum.React.Extensions/SMS/SMSController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Signum.Engine.Authorization; 3 | using System.Threading; 4 | using Signum.Entities.SMS; 5 | using System.Collections.Generic; 6 | using System; 7 | using Signum.Engine.SMS; 8 | using System.Linq; 9 | using Signum.Entities.Basics; 10 | using Signum.Engine.Basics; 11 | using Signum.Entities; 12 | using Signum.Utilities; 13 | 14 | namespace Signum.React.SMS 15 | { 16 | public class SMSController : ControllerBase 17 | { 18 | [HttpPost("api/sms/remainingCharacters")] 19 | public int RemainingCharacters([FromBody] RemainingCharactersRequest request) 20 | { 21 | var message = request.RemoveNoSMSCharacters ? SMSCharacters.RemoveNoSMSCharacters(request.Message) : request.Message; 22 | 23 | return SMSCharacters.RemainingLength(message); 24 | } 25 | 26 | [HttpGet("api/sms/getAllTypes")] 27 | public List GetAllTypes() 28 | { 29 | return SMSLogic.GetAllTypes() 30 | .Select(type => TypeLogic.TypeToEntity.GetOrThrow(type).CleanName) 31 | .ToList(); 32 | } 33 | 34 | public class RemainingCharactersRequest 35 | { 36 | public string Message; 37 | public bool RemoveNoSMSCharacters; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Signum.React.Extensions/SMS/SMSServer.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Scheduler; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using System.Reflection; 5 | using Signum.Entities.SMS; 6 | using Signum.React.Json; 7 | using Signum.Utilities; 8 | using Signum.Engine.Basics; 9 | using Signum.React.Facades; 10 | 11 | namespace Signum.React.SMS 12 | { 13 | public static class SMSServer 14 | { 15 | public static void Start(IApplicationBuilder app) 16 | { 17 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 18 | 19 | SignumServer.WebEntityJsonConverterFactory.AfterDeserilization.Register((SMSTemplateEntity et) => 20 | { 21 | if (et.Query != null) 22 | { 23 | var qd = QueryLogic.Queries.QueryDescription(et.Query.ToQueryName()); 24 | et.ParseData(qd); 25 | } 26 | }); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Signum.React.Extensions/SMS/Signum.Entities.SMS.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/SMS/Templates/MultipleSMS.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { MultipleSMSModel } from '../Signum.Entities.SMS' 5 | 6 | export default function MultipleSMS(p: { ctx: TypeContext }){ 7 | 8 | return ( 9 |
10 | a.message)} formGroupHtmlAttributes={{ className: "sf-sms-msg-text" }} /> 11 | a.from)} /> 12 |
); 13 | } 14 | -------------------------------------------------------------------------------- /Signum.React.Extensions/SMS/Templates/SMSSendPackage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { SearchControl } from '@framework/Search'; 5 | import { SMSSendPackageEntity, SMSMessageEntity } from '../Signum.Entities.SMS' 6 | 7 | export default function SMSSendPackage(p: { ctx: TypeContext }) { 8 | 9 | return ( 10 |
11 | a.name)} /> 12 | 18 |
); 19 | } 20 | -------------------------------------------------------------------------------- /Signum.React.Extensions/SMS/Templates/SMSUpdatePackage.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { SearchControl } from '@framework/Search'; 5 | import { SMSUpdatePackageEntity, SMSMessageEntity } from '../Signum.Entities.SMS' 6 | 7 | export default function SMSSendPackage(p: { ctx: TypeContext }) { 8 | 9 | return ( 10 |
11 | a.name)} /> 12 | 19 |
); 20 | } 21 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/SchedulerController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Signum.Engine.Authorization; 3 | using System.Threading; 4 | using Signum.Entities.Scheduler; 5 | using Signum.Engine.Scheduler; 6 | 7 | namespace Signum.React.Scheduler 8 | { 9 | public class SchedulerController : ControllerBase 10 | { 11 | [HttpGet("api/scheduler/view")] 12 | public SchedulerState View() 13 | { 14 | var state = SchedulerLogic.GetSchedulerState(); 15 | 16 | return state; 17 | } 18 | 19 | [HttpPost("api/scheduler/start")] 20 | public void Start() 21 | { 22 | SchedulerPermission.ViewSchedulerPanel.AssertAuthorized(); 23 | 24 | SchedulerLogic.StartScheduledTasks(); 25 | 26 | Thread.Sleep(1000); 27 | } 28 | 29 | [HttpPost("api/scheduler/stop")] 30 | public void Stop() 31 | { 32 | SchedulerPermission.ViewSchedulerPanel.AssertAuthorized(); 33 | 34 | SchedulerLogic.StopScheduledTasks(); 35 | 36 | Thread.Sleep(1000); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/SchedulerServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Signum.Engine.Scheduler; 3 | using Microsoft.AspNetCore.Builder; 4 | using Microsoft.AspNetCore.Hosting; 5 | using Microsoft.Extensions.Hosting; 6 | 7 | namespace Signum.React.Scheduler 8 | { 9 | public static class SchedulerServer 10 | { 11 | public static void Start(IApplicationBuilder app, IHostApplicationLifetime lifetime) 12 | { 13 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 14 | 15 | lifetime.ApplicationStopping.Register(() => 16 | { 17 | if (SchedulerLogic.Running) 18 | SchedulerLogic.StopScheduledTasks(); 19 | 20 | SchedulerLogic.StopRunningTasks(); 21 | }); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/Signum.Entities.Scheduler.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/SystemEventServer.cs: -------------------------------------------------------------------------------- 1 | using Signum.Engine.Scheduler; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.Extensions.Hosting; 5 | 6 | namespace Signum.React.Scheduler 7 | { 8 | public static class SystemEventServer 9 | { 10 | public static void LogStartStop(IApplicationBuilder app, IHostApplicationLifetime lifetime) 11 | { 12 | SystemEventLogLogic.Log("Application Start"); 13 | 14 | lifetime.ApplicationStopping.Register(() => 15 | { 16 | SystemEventLogLogic.Log("Application Stop"); 17 | }); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/Templates/HolidayCalendar.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityRepeater, EntityTable } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { HolidayCalendarEntity, HolidayEmbedded } from '../Signum.Entities.Scheduler' 5 | 6 | export default function HolidayCalendar(p : { ctx: TypeContext }){ 7 | const e = p.ctx; 8 | 9 | return ( 10 |
11 | f.name)} /> 12 |
13 | f.holidays)} columns={EntityTable.typedColumns([ 14 | { property: a => a.date }, 15 | { property: a => a.name }, 16 | ])} /> 17 |
18 |
19 | ); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/Templates/ScheduleRuleMinutely.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { ScheduleRuleMinutelyEntity } from '../Signum.Entities.Scheduler' 5 | 6 | export default function ScheduleRuleMinutely(p : { ctx: TypeContext }){ 7 | const ctx4 = p.ctx.subCtx({ labelColumns: { sm: 2 } }); 8 | 9 | return ( 10 |
11 | f.startingOn)} helpText="The hour determines when each execution will occour"/> 12 | f.eachMinutes)} /> 13 |
14 | ); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Scheduler/Templates/ScheduledTask.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityLine, EntityDetail } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { ScheduledTaskEntity } from '../Signum.Entities.Scheduler' 5 | 6 | export default function ScheduledTask(p : { ctx: TypeContext }){ 7 | const ctx = p.ctx; 8 | 9 | return ( 10 |
11 | f.task)} create={false} /> 12 | f.rule)} /> 13 | f.user)} /> 14 | {!ctx.value.isNew && f.machineName)} />} 15 | {!ctx.value.isNew && f.applicationName)} />} 16 | f.suspended)} /> 17 |
18 | ); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Templating/Signum.Entities.Templating.t4s: -------------------------------------------------------------------------------- 1 | import { FilterOptionParsed, OrderOptionParsed, FilterRequest, OrderRequest, Pagination } from '@framework/FindOptions' 2 | 3 | //Partial 4 | export interface QueryModel { 5 | queryKey: string; 6 | 7 | filters: FilterRequest[]; 8 | orders: OrderRequest[]; 9 | pagination: Pagination; 10 | } 11 | 12 | export interface ITemplateApplicable {} -------------------------------------------------------------------------------- /Signum.React.Extensions/Templating/Templates/QueryModel.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { SearchControl } from '@framework/Search' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { QueryModelMessage, QueryModel } from '../../Templating/Signum.Entities.Templating' 5 | import { SearchControlHandler } from '@framework/SearchControl/SearchControl'; 6 | 7 | interface QueryModelComponentProps { 8 | ctx: TypeContext 9 | } 10 | 11 | export default function QueryModelComponent(p : QueryModelComponentProps){ 12 | function handleOnSearch() { 13 | const qr = searchControl.current!.searchControlLoaded!.getQueryRequest(); 14 | const model = p.ctx.value; 15 | model.filters = qr.filters; 16 | model.orders = qr.orders; 17 | model.pagination = qr.pagination; 18 | model.modified = true; 19 | } 20 | 21 | var searchControl = React.useRef(null); 22 | const ctx = p.ctx; 23 | return ( 24 |
25 |

{QueryModelMessage.ConfigureYourQueryAndPressSearchBeforeOk.niceToString()}

26 | "Basic"} 29 | allowSelection={false} 30 | findOptions={{ queryName: ctx.value.queryKey }} 31 | onSearch={handleOnSearch} /> 32 |
33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Templating/TemplatingServer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Signum.Engine.Authorization; 3 | using Signum.Entities.Mailing; 4 | using Signum.Entities.Templating; 5 | using Signum.Entities.Word; 6 | using Signum.React.Facades; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Reflection; 11 | using System.Threading.Tasks; 12 | 13 | namespace Signum.React.Extensions.Templating 14 | { 15 | public static class TemplatingServer 16 | { 17 | public static void Start(IApplicationBuilder app) 18 | { 19 | ReflectionServer.RegisterLike(typeof(TemplateTokenMessage), () => 20 | TypeAuthLogic.GetAllowed(typeof(EmailTemplateEntity)).MaxUI() > Entities.Authorization.TypeAllowedBasic.None || 21 | TypeAuthLogic.GetAllowed(typeof(WordTemplateEntity)).MaxUI() > Entities.Authorization.TypeAllowedBasic.None); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Toolbar/SidebarContainer.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ErrorBoundary } from '@framework/Components'; 3 | import "./Sidebar.css" 4 | 5 | interface SidebarContainerProps { 6 | sidebarVisible: boolean | undefined; 7 | sidebarContent: React.ReactElement; 8 | children: React.ReactNode; 9 | } 10 | 11 | export default function SidebarContainer(p : SidebarContainerProps){ 12 | 13 | function renderSideBar() { 14 | return ( 15 |
16 | {p.sidebarContent} 17 |
18 | ); 19 | } 20 | const visible = p.sidebarVisible; 21 | return ( 22 |
23 | {visible && renderSideBar()} 24 |
25 | 26 | {p.children} 27 | 28 |
29 |
30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Toolbar/Signum.Entities.Toolbar.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Toolbar/Templates/ToolbarMenu.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ValueLine, EntityRepeater } from '@framework/Lines' 3 | import { TypeContext } from '@framework/TypeContext' 4 | import { ToolbarMenuEntity } from '../Signum.Entities.Toolbar' 5 | import { ToolbarElementTable } from './Toolbar'; 6 | 7 | export default function ToolbarMenu(p : { ctx: TypeContext }){ 8 | const ctx = p.ctx; 9 | 10 | return ( 11 |
12 | f.name)} /> 13 | m.elements)} /> 14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Toolbar/ToolbarController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Signum.Entities.Toolbar; 3 | using Signum.Engine.Toolbar; 4 | 5 | namespace Signum.React.Toolbar 6 | { 7 | public class ToolbarController : ControllerBase 8 | { 9 | [HttpGet("api/toolbar/current/{location}")] 10 | public ToolbarResponse? Current(ToolbarLocation location) 11 | { 12 | return ToolbarLogic.GetCurrentToolbarResponse(location); 13 | } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Toolbar/ToolbarServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.Toolbar 5 | { 6 | public static class ToolbarServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Translation/Signum.Entities.Translation.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Translation/TranslatedInstanceTools.tsx: -------------------------------------------------------------------------------- 1 | import { ModifiableEntity } from '@framework/Signum.Entities'; 2 | import { getLambdaMembers } from '@framework/Reflection'; 3 | 4 | export function translated(entity: T, field: (e: T) => S): S { 5 | var members = getLambdaMembers(field); 6 | 7 | if (members.length != 1 || members[0].type != 'Member') 8 | throw new Error("Invalid lambda"); 9 | 10 | const prop = members[0].name; 11 | 12 | return (entity as any)[prop + "_translated"] as S ?? (entity as any)[prop] as S; 13 | } 14 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Tree/Signum.Entities.Tree.t4s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/signumsoftware/extensions/636a5e15e34ce24dfdd5b2a949e5d88191e99fad/Signum.React.Extensions/Tree/Signum.Entities.Tree.t4s -------------------------------------------------------------------------------- /Signum.React.Extensions/Tree/TreeButton.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' 3 | import * as Finder from '@framework/Finder' 4 | import * as AppContext from '@framework/AppContext' 5 | import { default as SearchControlLoaded } from '@framework/SearchControl/SearchControlLoaded' 6 | import { TreeMessage } from './Signum.Entities.Tree' 7 | import * as TreeClient from './TreeClient' 8 | import { Button } from 'react-bootstrap'; 9 | 10 | export interface TreeButtonProps { 11 | searchControl: SearchControlLoaded; 12 | } 13 | 14 | export default function TreeButton(p : TreeButtonProps){ 15 | function handleClick(e: React.MouseEvent) { 16 | const fo = p.searchControl.props.findOptions; 17 | 18 | const path = TreeClient.treePath(fo.queryKey, Finder.toFilterOptions(fo.filterOptions)); 19 | 20 | if (p.searchControl.props.avoidChangeUrl) 21 | window.open(AppContext.toAbsoluteUrl(path)); 22 | else 23 | AppContext.pushOrOpenInTab(path, e); 24 | } 25 | 26 | var label = p.searchControl.props.largeToolbarButtons == true ? " " + TreeMessage.Tree.niceToString() : undefined; 27 | return ( 28 | 29 | ); 30 | } 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Tree/TreeOmniboxProvider.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { OmniboxResult, OmniboxMatch, OmniboxProvider } from '../Omnibox/OmniboxClient' 3 | 4 | 5 | export default class TreeOmniboxProvider extends OmniboxProvider 6 | { 7 | getProviderName() { 8 | return "TreeOmniboxResult"; 9 | } 10 | 11 | icon() { 12 | return this.coloredIcon("sitemap", "gold"); 13 | } 14 | 15 | renderItem(result: TreeOmniboxResult): React.ReactChild[] { 16 | 17 | var array: React.ReactChild[] = []; 18 | 19 | array.push(this.icon()); 20 | 21 | this.renderMatch(result.typeMatch, array); 22 | 23 | return array; 24 | } 25 | 26 | navigateTo(result: TreeOmniboxResult) { 27 | return Promise.resolve("~/tree/" + result.type); 28 | } 29 | 30 | toString(result: TreeOmniboxResult) { 31 | return result.typeMatch.text; 32 | } 33 | } 34 | 35 | interface TreeOmniboxResult extends OmniboxResult { 36 | type: string; 37 | typeMatch: OmniboxMatch; 38 | } 39 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Tree/TreeServer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Signum.Engine.Authorization; 3 | using Signum.Engine.Maps; 4 | using Signum.Entities.Authorization; 5 | using Signum.Entities.Tree; 6 | using Signum.React.Facades; 7 | using System.Linq; 8 | using System.Reflection; 9 | 10 | namespace Signum.React.Tree 11 | { 12 | public class TreeServer 13 | { 14 | public static void Start(IApplicationBuilder app) 15 | { 16 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 17 | ReflectionServer.RegisterLike(typeof(TreeEntity), () => Schema.Current.Tables.Keys.Where(p => typeof(TreeEntity).IsAssignableFrom(p)).Any(t => TypeAuthLogic.GetAllowed(t).MaxUI() > TypeAllowedBasic.None)); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Tree/TreeViewer.css: -------------------------------------------------------------------------------- 1 | .fa-sm { 2 | font-size: 0.5em; 3 | } 4 | 5 | .tree-container { 6 | padding: 10px; 7 | border: 1px solid #ccc; 8 | border-radius: 5px; 9 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 10 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 11 | -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 12 | transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 13 | -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; 14 | } 15 | 16 | 17 | .tree-container ul { 18 | padding-left: 16px; 19 | margin-bottom: 0px; 20 | } 21 | 22 | .tree-container ul li { 23 | list-style: none 24 | } 25 | 26 | span.place-holder { 27 | display: inline-block; 28 | width: 12px; 29 | } 30 | 31 | 32 | .tree-label { 33 | cursor: pointer; 34 | padding: 3px; 35 | -webkit-user-select: none; 36 | -moz-user-select: none; 37 | -ms-user-select: none; 38 | user-select: none; 39 | } 40 | 41 | .tree-label.tree-selected { 42 | color: #fff !important; 43 | background-color: #337ab7; 44 | } 45 | 46 | .tree-label.tree-disabled { 47 | color: gray; 48 | font-style: italic; 49 | } 50 | 51 | 52 | .tree-icon { 53 | cursor: pointer; 54 | width: 12px; 55 | } 56 | -------------------------------------------------------------------------------- /Signum.React.Extensions/TypeHelp/TypeHelpButtonBarComponent.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { TypeHelpMode } from './TypeHelpClient'; 3 | import { TypeContext } from '@framework/Lines'; 4 | 5 | interface TypeHelpButtonBarComponentProps { 6 | typeName: string; 7 | mode: TypeHelpMode; 8 | extraButtons?: React.ReactNode; 9 | ctx?: TypeContext; 10 | } 11 | 12 | export default function TypeHelpButtonBarComponent(p : TypeHelpButtonBarComponentProps){ 13 | return ( 14 |
15 | {p.extraButtons} 16 | { 17 | TypeHelpButtonBarComponent.getTypeHelpButtons 18 | .flatMap(f => f(p)) 19 | .orderBy(p => p.order) 20 | .map((p, i) => React.cloneElement(p.element, { key: i })) 21 | } 22 |
23 | ); 24 | } 25 | 26 | TypeHelpButtonBarComponent.getTypeHelpButtons = [] as Array<(props: TypeHelpButtonBarComponentProps) => ({ element: React.ReactElement, order: number })[]>; 27 | -------------------------------------------------------------------------------- /Signum.React.Extensions/TypeHelp/TypeHelpComponent.css: -------------------------------------------------------------------------------- 1 | div.sf-type-help{ 2 | background: #eee; 3 | margin: -5px; 4 | padding: 5px; 5 | } 6 | 7 | div.sf-type-help h4{ 8 | font-family: monospace; 9 | } 10 | 11 | div.sf-type-help-bar{ 12 | background: #ddd; 13 | margin: -5px; 14 | padding: 5px; 15 | } 16 | 17 | ul.sf-members { 18 | font-family: monospace; 19 | font-size: 13px; 20 | white-space: nowrap; 21 | padding-left: 10px; 22 | list-style: none; 23 | overflow:auto; 24 | } 25 | 26 | ul.sf-members ul.sf-members{ 27 | background:rgba(204, 204, 204, 0.5); 28 | } 29 | 30 | span.sf-member-name { 31 | font-weight: bold; 32 | } 33 | 34 | span.sf-member-primitive { 35 | color: blue; 36 | } 37 | 38 | .sf-member-class { 39 | color: #156F8A; 40 | } 41 | 42 | span.sf-member-date { 43 | color: #5100A1; 44 | } 45 | 46 | .sf-member-enum { 47 | color: #800046; 48 | } 49 | 50 | span.sf-member-lite { 51 | color: #2B91AF; 52 | } 53 | 54 | span.sf-member-collection { 55 | color: #CE6700; 56 | } 57 | 58 | span.sf-member-others { 59 | color: #808080; 60 | } 61 | 62 | span.sf-member-click { 63 | cursor: pointer; 64 | } 65 | -------------------------------------------------------------------------------- /Signum.React.Extensions/TypeHelp/TypeHelpServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.TypeHelp 5 | { 6 | public static class TypeHelpServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/UserAssets/Signum.Entities.UserAssets.t4s: -------------------------------------------------------------------------------- 1 | import { QueryToken } from '@framework/FindOptions' 2 | 3 | export interface QueryTokenEmbedded { 4 | token?: QueryToken; 5 | parseException?: string; 6 | } 7 | -------------------------------------------------------------------------------- /Signum.React.Extensions/UserQueries/Signum.Entities.UserQueries.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/UserQueries/UserQueryController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using Signum.Entities; 4 | using Signum.React.ApiControllers; 5 | using Signum.Entities.UserQueries; 6 | using Signum.Engine.UserQueries; 7 | using Signum.Engine.Basics; 8 | using Microsoft.AspNetCore.Mvc; 9 | 10 | namespace Signum.React.UserQueries 11 | { 12 | public class UserQueryController : ControllerBase 13 | { 14 | 15 | 16 | [HttpGet("api/userQueries/forEntityType/{typeName}")] 17 | public IEnumerable> FromEntityType(string typeName) 18 | { 19 | return UserQueryLogic.GetUserQueriesEntity(TypeLogic.GetType(typeName)); 20 | } 21 | 22 | [HttpGet("api/userQueries/forQuery/{queryKey}")] 23 | public IEnumerable> FromQuery(string queryKey) 24 | { 25 | return UserQueryLogic.GetUserQueries(QueryLogic.ToQueryName(queryKey)); 26 | } 27 | 28 | [HttpGet("api/userQueries/forQueryAppendFilters/{queryKey}")] 29 | public IEnumerable> FromQueryAppendFilters(string queryKey) 30 | { 31 | return UserQueryLogic.GetUserQueries(QueryLogic.ToQueryName(queryKey), appendFilterOnly : true); 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Signum.React.Extensions/ViewLog/Signum.Entities.ViewLog.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/ViewLog/Signum.Entities.ViewLog.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////// 2 | //Auto-generated. Do NOT modify!// 3 | ////////////////////////////////// 4 | 5 | import { MessageKey, QueryKey, Type, EnumType, registerSymbol } from '../../../Framework/Signum.React/Scripts/Reflection' 6 | import * as Entities from '../../../Framework/Signum.React/Scripts/Signum.Entities' 7 | import * as Basics from '../../../Framework/Signum.React/Scripts/Signum.Entities.Basics' 8 | 9 | 10 | export const ViewLogEntity = new Type("ViewLog"); 11 | export interface ViewLogEntity extends Entities.Entity { 12 | Type: "ViewLog"; 13 | target: Entities.Lite; 14 | user: Entities.Lite; 15 | viewAction: string; 16 | startDate: string; 17 | endDate: string; 18 | data: Basics.BigStringEmbedded; 19 | } 20 | 21 | export module ViewLogMessage { 22 | export const ViewLogMyLast = new MessageKey("ViewLogMessage", "ViewLogMyLast"); 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Word/Signum.Entities.Word.t4s: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Bpmn/Bpmn.css: -------------------------------------------------------------------------------- 1 | [class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before { 2 | margin-left:0 !important; 3 | margin-right:0 !important; 4 | } 5 | 6 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Bpmn/CustomContextPad.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import BpmnContextPadProvider from "bpmn-js/lib/features/context-pad/ContextPadProvider" 3 | 4 | export class CustomContextPadProvider extends BpmnContextPadProvider { 5 | static $inject = ['config.contextPad', 'injector', 'eventBus', 'contextPad', 'modeling', 'elementFactory', 'connect', 'create', 'popupMenu', 'canvas', 'rules', 'translate']; 6 | constructor(config: any, injector: any, eventBus: any, contextPad: any, modeling: any, elementFactory: any, connect: any, create: any, popupMenu: any, canvas: any, rules: any, translate: any) { 7 | super(config, injector, eventBus, contextPad, modeling, elementFactory, connect, create, popupMenu, canvas, rules, translate); 8 | } 9 | 10 | getContextPadEntries(element: BPMN.DiElement) { 11 | var result = super.getContextPadEntries(element); 12 | 13 | delete result["append.text-annotation"]; 14 | 15 | if (element.type == "bpmn:Lane" || element.type == "bpmn:Participant") { 16 | delete result["lane-divide-two"]; 17 | delete result["lane-divide-three"]; 18 | 19 | if (element.type == "bpmn:Participant") { 20 | delete result["connect"]; 21 | } 22 | } 23 | 24 | return result; 25 | } 26 | } 27 | 28 | export var __init__ = ['contextPadProvider']; 29 | export var contextPadProvider = ['type', CustomContextPadProvider]; 30 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Bpmn/CustomMinimap.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import MMPair from "diagram-js-minimap" 3 | 4 | const Minimap = MMPair.minimap[1]; 5 | 6 | export class CustomMinimap extends (Minimap as any) { 7 | static $inject = ['config.minimap', 'injector', 'eventBus', 'canvas', 'elementRegistry']; 8 | constructor(config: any, injector: any, eventBus: any, canvas: any, elementRegistry: any) { 9 | super(config, injector, eventBus, canvas, elementRegistry); 10 | } 11 | } 12 | 13 | 14 | export var __init__ = ['minimap']; 15 | export var minimap = ['type', CustomMinimap]; 16 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/CaseAct.css: -------------------------------------------------------------------------------- 1 |  2 | div.workflow-buttons { 3 | margin-top: 20px; 4 | border: 1px solid #ccc; 5 | padding: 5px; 6 | } 7 | 8 | div.workflow-buttons .btn-toolbar { 9 | margin-bottom: 0px; 10 | } 11 | 12 | div.workflow-buttons .btn { 13 | margin-right: 10px; 14 | } 15 | 16 | 17 | .case-main-entity .sf-widgets { 18 | margin-top: 0px; 19 | } 20 | 21 | .case-main-entity .sf-button-widget-container { 22 | overflow: auto; 23 | } 24 | 25 | .case-alert { 26 | margin-bottom: 5px; 27 | padding: 5px; 28 | white-space: pre; 29 | } 30 | 31 | .case-help-button { 32 | background: #ddd; 33 | padding: 3px; 34 | } 35 | 36 | .inline-tags{ 37 | text-align:right; 38 | } 39 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/CaseFlowButton.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' 3 | import * as Navigator from '@framework/Navigator' 4 | import { CaseActivityEntity, WorkflowActivityMessage } from '../Signum.Entities.Workflow' 5 | 6 | interface CaseFlowButtonProps { 7 | caseActivity: CaseActivityEntity; 8 | } 9 | 10 | export default function CaseFlowButton(p : CaseFlowButtonProps){ 11 | function handleClick(e: React.MouseEvent) { 12 | e.preventDefault(); 13 | var ca = p.caseActivity; 14 | Navigator.view(ca.case, { extraProps: { caseActivity: ca } }).done(); 15 | } 16 | 17 | return ( 18 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/CaseTagType.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { ColorTypeaheadLine } from '../../Basics/Templates/ColorTypeahead' 3 | import { CaseTagTypeEntity } from '../Signum.Entities.Workflow' 4 | import { ValueLine, TypeContext } from '@framework/Lines' 5 | import Tag from './Tag' 6 | import { useForceUpdate } from '@framework/Hooks' 7 | 8 | export default function CaseTagTypeComponent(p : { ctx: TypeContext }){ 9 | const forceUpdate = useForceUpdate(); 10 | var ctx = p.ctx; 11 | return ( 12 |
13 |
14 | e.name)} onChange={() => forceUpdate()} /> 15 | e.color)} onChange={() => forceUpdate()} /> 16 |
17 |
18 | 19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/CaseTagsModel.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { CaseTagsModel, CaseTagTypeEntity } from '../Signum.Entities.Workflow' 3 | import { EntityStrip, TypeContext } from '@framework/Lines' 4 | import Tag from './Tag' 5 | 6 | export default function CaseTagsModelComponent(p : { ctx: TypeContext }){ 7 | var ctx = p.ctx; 8 | return ( 9 | a.caseTags)} 10 | onItemHtmlAttributes={tag => ({ style: { textDecoration: "none" } })} 11 | onRenderItem={tag => } 12 | /> 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/Inbox.css: -------------------------------------------------------------------------------- 1 | .new-row { 2 | font-weight:bold; 3 | } 4 | 5 | .opened-row { 6 | } 7 | 8 | .in-progress-row { 9 | font-style:italic; 10 | } 11 | 12 | .done-row { 13 | color: gray; 14 | } 15 | 16 | .done-by-other-row { 17 | color: brown; 18 | } 19 | 20 | a.case-icon:focus, 21 | a.case-icon:hover{ 22 | outline:none; 23 | text-decoration:none; 24 | } 25 | 26 | .case-icon-ghost { 27 | opacity: 0; 28 | transition: opacity 0.5s; 29 | } 30 | 31 | tr:hover .case-icon-ghost{ 32 | opacity: 1; 33 | } 34 | 35 | a.case-icon .case-tag{ 36 | margin-left: 5px; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/Tag.css: -------------------------------------------------------------------------------- 1 | .case-tag { 2 | white-space: nowrap; 3 | overflow: hidden; 4 | max-width: 80px; 5 | text-overflow: ellipsis; 6 | border: 1px solid; 7 | padding: 0 3px; 8 | border-radius: 3px; 9 | font-size: smaller; 10 | font-style: normal; 11 | font-weight: normal; 12 | display: inline-block; 13 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Case/Tag.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { CaseTagTypeEntity } from '../Signum.Entities.Workflow' 3 | import { Color } from '../../Basics/Color' 4 | import "./Tag.css" 5 | 6 | export default function Tag(p : { tag: CaseTagTypeEntity }){ 7 | const tag = p.tag; 8 | var color = Color.tryParse(tag.color!) ?? Color.Black; 9 | 10 | return ( 11 | {tag.name} 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/Signum.Entities.Workflow.t4s: -------------------------------------------------------------------------------- 1 | interface IWorkflowTimerConditionEvaluator {} 2 | interface IWorkflowConditionEvaluator {} 3 | interface IWorkflowActionExecutor {} 4 | interface IWorkflowLaneActorsEvaluator {} 5 | interface ISubEntitiesEvaluator{} 6 | interface IWorkflowScriptExecutor{} 7 | interface IWorkflowEventTaskConditionEvaluator{} 8 | interface IWorkflowEventTaskActionEval{} 9 | 10 | export interface WorkflowEntitiesDictionary { 11 | [bpmnElementId: string]: Entities.ModelEntity 12 | } 13 | -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/WorkflowServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Builder; 3 | 4 | namespace Signum.React.Workflow 5 | { 6 | public static class WorkflowServer 7 | { 8 | public static void Start(IApplicationBuilder app) 9 | { 10 | SignumControllerFactory.RegisterArea(MethodInfo.GetCurrentMethod()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Signum.React.Extensions/Workflow/WorkflowToolbarConfig.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Location } from 'history' 3 | import { ToolbarConfig, ToolbarResponse } from '../Toolbar/ToolbarClient' 4 | import * as WorkflowClient from './WorkflowClient' 5 | import { WorkflowEntity } from './Signum.Entities.Workflow' 6 | import { coalesceIcon } from '@framework/Operations/ContextualOperations'; 7 | import * as AppContext from '@framework/AppContext' 8 | import { parseIcon } from '../Basics/Templates/IconTypeahead' 9 | 10 | export default class WorkflowToolbarConfig extends ToolbarConfig { 11 | 12 | constructor() { 13 | var type = WorkflowEntity; 14 | super(type); 15 | } 16 | 17 | getIcon(element: ToolbarResponse) { 18 | return ToolbarConfig.coloredIcon(coalesceIcon(parseIcon(element.iconName), "th-large"), element.iconColor ?? "darkslateblue"); 19 | } 20 | 21 | navigateTo(element: ToolbarResponse): Promise { 22 | return Promise.resolve(WorkflowClient.workflowStartUrl(element.content!)); 23 | } 24 | 25 | isCompatibleWithUrl(res: ToolbarResponse, location: Location, query: any): boolean { 26 | return location.pathname == AppContext.toAbsoluteUrl(WorkflowClient.workflowStartUrl(res.content!)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Signum.React.Extensions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "signum-react-extensions", 3 | "version": "1.0.0", 4 | "description": "Resable modules to use on top of Signum Framework", 5 | "repository": "https://github.com/signumsoftware/extensions", 6 | "keywords": [ 7 | "Signum", 8 | "Framework", 9 | "React", 10 | "LINQ", 11 | "Bootstrap", 12 | "D3" 13 | ], 14 | "author": "Signum Software", 15 | "license": "MIT", 16 | "resolutions": { 17 | "@types/react": "file:../../Framework/Signum.React/node_modules/@types/react" 18 | }, 19 | "dependencies": { 20 | "@types/codemirror": "0.0.108", 21 | "@types/draft-js": "0.11.1", 22 | "@types/googlemaps": "3.43.3", 23 | "draft-js": "0.11.7", 24 | "draftjs-to-html": "0.9.1", 25 | "html-to-draftjs": "1.5.0", 26 | "react": "17.0.2", 27 | "react-dom": "17.0.2", 28 | "@azure/msal-browser": "2.14.1", 29 | "@types/react": "file:../../Framework/Signum.React/node_modules/@types/react" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Signum.React.Extensions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "sourceMap": true, 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "allowSyntheticDefaultImports": true, 8 | "jsx": "react", 9 | "incremental": true, 10 | "outDir": "./ts_out", 11 | "composite": true, 12 | //"noEmit": true, 13 | "strict": true, 14 | "declarationMap": true, 15 | "paths": { 16 | "@framework/*": [ "../../Framework/Signum.React/Scripts/*" ], 17 | "*": [ 18 | "../../Framework/Signum.React/node_modules/@types/*", 19 | "../../Framework/Signum.React/node_modules/*", 20 | "./*" 21 | ] 22 | }, 23 | "lib": [ 24 | "ES2020", 25 | "dom" 26 | ] 27 | }, 28 | "exclude": [ 29 | "../../Framework/Signum.React/ts_out", 30 | "../../Framework/Signum.React/node_modules", 31 | "./node_modules", 32 | "./ts_out" 33 | ], 34 | "references": [ 35 | { "path": "../../Framework/Signum.React" } 36 | ] 37 | } 38 | --------------------------------------------------------------------------------