@memberjunction/ng-core-entity-forms 2.43.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.d.ts +94 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.js +814 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +198 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +1863 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -0
- package/dist/lib/custom/Actions/actions-top-area-extended.js +2 -2
- package/dist/lib/custom/Entities/entities-form.component.js +2 -2
- package/dist/lib/custom/EntityActions/entityaction.form.component.js +2 -2
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts +48 -0
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Templates/template-param-dialog.component.js +689 -0
- package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -0
- package/dist/lib/custom/Templates/templates-form.component.d.ts +88 -0
- package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Templates/templates-form.component.js +767 -0
- package/dist/lib/custom/Templates/templates-form.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +22 -14
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +63 -10
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/AIAction/aiaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgent/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentAction/aiagentaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentLearningCycle/aiagentlearningcycle.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentLearningCycle/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentModel/aiagentmodel.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentModel/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNote/aiagentnote.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNote/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNoteType/aiagentnotetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentNoteType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentPrompt/aiagentprompt.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentPrompt/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentRequest/aiagentrequest.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIAgentRequest/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfiguration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfigurationParam/aiconfigurationparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIConfigurationParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModel/aimodel.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModel/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelAction/aimodelaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelVendor/aimodelvendor.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIModelVendor/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPrompt/aiprompt.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPrompt/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptCategory/aipromptcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptModel/aipromptmodel.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptModel/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptRun/aipromptrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptType/aiprompttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIPromptType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIResultCache/airesultcache.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIResultCache/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendor/aivendor.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendor/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorType/aivendortype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorTypeDefinition/aivendortypedefinition.form.component.js +2 -2
- package/dist/lib/generated/Entities/AIVendorTypeDefinition/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Action/action.form.component.js +2 -2
- package/dist/lib/generated/Entities/Action/sections/code.component.js +2 -2
- package/dist/lib/generated/Entities/Action/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Action/sections/top.component.js +2 -2
- package/dist/lib/generated/Entities/ActionAuthorization/actionauthorization.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionAuthorization/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionCategory/actioncategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContext/actioncontext.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContext/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContextType/actioncontexttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionContextType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionExecutionLog/actionexecutionlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionExecutionLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionFilter/actionfilter.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionFilter/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionLibrary/actionlibrary.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionLibrary/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionParam/actionparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ActionResultCode/actionresultcode.form.component.js +2 -2
- package/dist/lib/generated/Entities/ActionResultCode/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Application/application.form.component.js +2 -2
- package/dist/lib/generated/Entities/Application/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationEntity/applicationentity.form.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationEntity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationSetting/applicationsetting.form.component.js +2 -2
- package/dist/lib/generated/Entities/ApplicationSetting/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ArtifactType/artifacttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ArtifactType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLog/auditlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLogType/auditlogtype.form.component.js +2 -2
- package/dist/lib/generated/Entities/AuditLogType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Authorization/authorization.form.component.js +2 -2
- package/dist/lib/generated/Entities/Authorization/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/AuthorizationRole/authorizationrole.form.component.js +2 -2
- package/dist/lib/generated/Entities/AuthorizationRole/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationBaseMessageType/communicationbasemessagetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationBaseMessageType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationLog/communicationlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProvider/communicationprovider.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProvider/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProviderMessageType/communicationprovidermessagetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationProviderMessageType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationRun/communicationrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/CommunicationRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Company/company.form.component.js +2 -2
- package/dist/lib/generated/Entities/Company/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegration/companyintegration.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRecordMap/companyintegrationrecordmap.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRecordMap/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRun/companyintegrationrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunAPILog/companyintegrationrunapilog.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunAPILog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunDetail/companyintegrationrundetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/CompanyIntegrationRunDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentFileType/contentfiletype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentFileType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItem/contentitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemAttribute/contentitemattribute.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemAttribute/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemTag/contentitemtag.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentItemTag/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentProcessRun/contentprocessrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentProcessRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSource/contentsource.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSource/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceParam/contentsourceparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceType/contentsourcetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceTypeParam/contentsourcetypeparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentSourceTypeParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentType/contenttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ContentTypeAttribute/contenttypeattribute.form.component.js +2 -2
- package/dist/lib/generated/Entities/ContentTypeAttribute/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Conversation/conversation.form.component.js +2 -2
- package/dist/lib/generated/Entities/Conversation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifact/conversationartifact.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifact/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactPermission/conversationartifactpermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactPermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactVersion/conversationartifactversion.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationArtifactVersion/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationDetail/conversationdetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/ConversationDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Dashboard/dashboard.form.component.js +2 -2
- package/dist/lib/generated/Entities/Dashboard/sections/details.component.js +5 -5
- package/dist/lib/generated/Entities/DashboardCategory/dashboardcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserPreference/dashboarduserpreference.form.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserPreference/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserState/dashboarduserstate.form.component.js +2 -2
- package/dist/lib/generated/Entities/DashboardUserState/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DataContext/datacontext.form.component.js +2 -2
- package/dist/lib/generated/Entities/DataContext/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DataContextItem/datacontextitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/DataContextItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Dataset/dataset.form.component.js +2 -2
- package/dist/lib/generated/Entities/Dataset/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DatasetItem/datasetitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/DatasetItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRun/duplicaterun.form.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetail/duplicaterundetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetailMatch/duplicaterundetailmatch.form.component.js +2 -2
- package/dist/lib/generated/Entities/DuplicateRunDetailMatch/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Employee/employee.form.component.js +2 -2
- package/dist/lib/generated/Entities/Employee/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeCompanyIntegration/employeecompanyintegration.form.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeCompanyIntegration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeRole/employeerole.form.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeRole/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeSkill/employeeskill.form.component.js +2 -2
- package/dist/lib/generated/Entities/EmployeeSkill/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/entity.form.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/api.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/audit.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/db.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/top.component.js +2 -2
- package/dist/lib/generated/Entities/Entity/sections/ui.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAIAction/entityaiaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAIAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAction/entityaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionFilter/entityactionfilter.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionFilter/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocation/entityactioninvocation.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocationType/entityactioninvocationtype.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionInvocationType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionParam/entityactionparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityActionParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationField/entitycommunicationfield.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationField/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationMessageType/entitycommunicationmessagetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityCommunicationMessageType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocument/entitydocument.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocument/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentRun/entitydocumentrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentSetting/entitydocumentsetting.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentSetting/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentType/entitydocumenttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityDocumentType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityField/entityfield.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityField/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityFieldValue/entityfieldvalue.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityFieldValue/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityPermission/entitypermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityPermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRecordDocument/entityrecorddocument.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRecordDocument/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationship/entityrelationship.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationship/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationshipDisplayComponent/entityrelationshipdisplaycomponent.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntityRelationshipDisplayComponent/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/EntitySetting/entitysetting.form.component.js +2 -2
- package/dist/lib/generated/Entities/EntitySetting/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ErrorLog/errorlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/ErrorLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ExplorerNavigationItem/explorernavigationitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/ExplorerNavigationItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/File/file.form.component.js +2 -2
- package/dist/lib/generated/Entities/File/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/FileCategory/filecategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/FileCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/FileEntityRecordLink/fileentityrecordlink.form.component.js +2 -2
- package/dist/lib/generated/Entities/FileEntityRecordLink/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/FileStorageProvider/filestorageprovider.form.component.js +2 -2
- package/dist/lib/generated/Entities/FileStorageProvider/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCode/generatedcode.form.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCode/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCodeCategory/generatedcodecategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/GeneratedCodeCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Integration/integration.form.component.js +2 -2
- package/dist/lib/generated/Entities/Integration/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/IntegrationURLFormat/integrationurlformat.form.component.js +2 -2
- package/dist/lib/generated/Entities/IntegrationURLFormat/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Library/library.form.component.js +2 -2
- package/dist/lib/generated/Entities/Library/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/LibraryItem/libraryitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/LibraryItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/List/list.form.component.js +2 -2
- package/dist/lib/generated/Entities/List/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ListCategory/listcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/ListCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ListDetail/listdetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/ListDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/OutputDeliveryType/outputdeliverytype.form.component.js +2 -2
- package/dist/lib/generated/Entities/OutputDeliveryType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/OutputFormatType/outputformattype.form.component.js +2 -2
- package/dist/lib/generated/Entities/OutputFormatType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/OutputTriggerType/outputtriggertype.form.component.js +2 -2
- package/dist/lib/generated/Entities/OutputTriggerType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Query/query.form.component.js +2 -2
- package/dist/lib/generated/Entities/Query/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryCategory/querycategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryEntity/queryentity.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryField/queryfield.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryField/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueryPermission/querypermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueryPermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Queue/queue.form.component.js +2 -2
- package/dist/lib/generated/Entities/Queue/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueueTask/queuetask.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueueTask/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/QueueType/queuetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/QueueType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Recommendation/recommendation.form.component.js +2 -2
- package/dist/lib/generated/Entities/Recommendation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationItem/recommendationitem.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationProvider/recommendationprovider.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationProvider/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationRun/recommendationrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecommendationRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChange/recordchange.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChange/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChangeReplayRun/recordchangereplayrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordChangeReplayRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeDeletionLog/recordmergedeletionlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeDeletionLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeLog/recordmergelog.form.component.js +2 -2
- package/dist/lib/generated/Entities/RecordMergeLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Report/report.form.component.js +2 -2
- package/dist/lib/generated/Entities/Report/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportCategory/reportcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportSnapshot/reportsnapshot.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportSnapshot/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportUserState/reportuserstate.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportUserState/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ReportVersion/reportversion.form.component.js +2 -2
- package/dist/lib/generated/Entities/ReportVersion/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceLink/resourcelink.form.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceLink/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ResourcePermission/resourcepermission.form.component.js +2 -2
- package/dist/lib/generated/Entities/ResourcePermission/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceType/resourcetype.form.component.js +2 -2
- package/dist/lib/generated/Entities/ResourceType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Role/role.form.component.js +2 -2
- package/dist/lib/generated/Entities/Role/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/RowLevelSecurityFilter/rowlevelsecurityfilter.form.component.js +2 -2
- package/dist/lib/generated/Entities/RowLevelSecurityFilter/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledAction/scheduledaction.form.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledAction/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledActionParam/scheduledactionparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/ScheduledActionParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/SchemaInfo/schemainfo.form.component.js +2 -2
- package/dist/lib/generated/Entities/SchemaInfo/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Skill/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Skill/skill.form.component.js +2 -2
- package/dist/lib/generated/Entities/Tag/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Tag/tag.form.component.js +2 -2
- package/dist/lib/generated/Entities/TaggedItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TaggedItem/taggeditem.form.component.js +2 -2
- package/dist/lib/generated/Entities/Template/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Template/template.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateCategory/templatecategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContent/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContent/templatecontent.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContentType/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateContentType/templatecontenttype.form.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateParam/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/TemplateParam/templateparam.form.component.js +2 -2
- package/dist/lib/generated/Entities/User/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/User/user.form.component.js +9 -9
- package/dist/lib/generated/Entities/User/user.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/UserApplication/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserApplication/userapplication.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserApplicationEntity/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserApplicationEntity/userapplicationentity.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserFavorite/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserFavorite/userfavorite.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserNotification/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserNotification/usernotification.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserRecordLog/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserRecordLog/userrecordlog.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserRole/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserRole/userrole.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserView/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserView/userview.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewCategory/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewCategory/userviewcategory.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRun/userviewrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRunDetail/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/UserViewRunDetail/userviewrundetail.form.component.js +2 -2
- package/dist/lib/generated/Entities/VectorDatabase/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/VectorDatabase/vectordatabase.form.component.js +2 -2
- package/dist/lib/generated/Entities/VectorIndex/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/VectorIndex/vectorindex.form.component.js +2 -2
- package/dist/lib/generated/Entities/VersionInstallation/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/VersionInstallation/versioninstallation.form.component.js +2 -2
- package/dist/lib/generated/Entities/Workflow/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Workflow/workflow.form.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowEngine/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowEngine/workflowengine.form.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowRun/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/WorkflowRun/workflowrun.form.component.js +2 -2
- package/dist/lib/generated/Entities/Workspace/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/Workspace/workspace.form.component.js +2 -2
- package/dist/lib/generated/Entities/WorkspaceItem/sections/details.component.js +2 -2
- package/dist/lib/generated/Entities/WorkspaceItem/workspaceitem.form.component.js +2 -2
- package/dist/lib/shared/components/template-editor.component.d.ts +67 -0
- package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -0
- package/dist/lib/shared/components/template-editor.component.js +698 -0
- package/dist/lib/shared/components/template-editor.component.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
import { Component, ViewChild } from '@angular/core';
|
|
17
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
18
|
+
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
19
|
+
import { TemplateFormComponent } from '../../generated/Entities/Template/template.form.component';
|
|
20
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
21
|
+
import { TemplateEngineBase } from '@memberjunction/templates-base-types';
|
|
22
|
+
import { Subject } from 'rxjs';
|
|
23
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
24
|
+
import { languages } from '@codemirror/language-data';
|
|
25
|
+
import * as i0 from "@angular/core";
|
|
26
|
+
import * as i1 from "@angular/forms";
|
|
27
|
+
import * as i2 from "@progress/kendo-angular-inputs";
|
|
28
|
+
import * as i3 from "@progress/kendo-angular-dropdowns";
|
|
29
|
+
import * as i4 from "@memberjunction/ng-user-view-grid";
|
|
30
|
+
import * as i5 from "@memberjunction/ng-base-forms";
|
|
31
|
+
import * as i6 from "@memberjunction/ng-form-toolbar";
|
|
32
|
+
import * as i7 from "@memberjunction/ng-tabstrip";
|
|
33
|
+
import * as i8 from "@memberjunction/ng-container-directives";
|
|
34
|
+
import * as i9 from "./template-param-dialog.component";
|
|
35
|
+
import * as i10 from "../../shared/components/template-editor.component";
|
|
36
|
+
const _c0 = ["codeEditor"];
|
|
37
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
39
|
+
i0.ɵɵelementStart(0, "kendo-textbox", 46);
|
|
40
|
+
i0.ɵɵtwoWayListener("ngModelChange", function TemplatesFormExtendedComponent_Conditional_1_Conditional_9_Template_kendo_textbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.Name, $event) || (ctx_r2.record.Name = $event); return i0.ɵɵresetView($event); });
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
} if (rf & 2) {
|
|
43
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
44
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.Name);
|
|
45
|
+
} }
|
|
46
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵelementStart(0, "div", 10);
|
|
48
|
+
i0.ɵɵtext(1);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
52
|
+
i0.ɵɵadvance();
|
|
53
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.record.Name || "Unnamed Template", " ");
|
|
54
|
+
} }
|
|
55
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
56
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
57
|
+
i0.ɵɵelementStart(0, "kendo-textarea", 47);
|
|
58
|
+
i0.ɵɵtwoWayListener("ngModelChange", function TemplatesFormExtendedComponent_Conditional_1_Conditional_15_Template_kendo_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.Description, $event) || (ctx_r2.record.Description = $event); return i0.ɵɵresetView($event); });
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
62
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.Description);
|
|
63
|
+
i0.ɵɵproperty("rows", 2);
|
|
64
|
+
} }
|
|
65
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
67
|
+
i0.ɵɵtext(1);
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
} if (rf & 2) {
|
|
70
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
71
|
+
i0.ɵɵadvance();
|
|
72
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.record.Description || "No description provided", " ");
|
|
73
|
+
} }
|
|
74
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
76
|
+
i0.ɵɵelementStart(0, "kendo-combobox", 48);
|
|
77
|
+
i0.ɵɵtwoWayListener("ngModelChange", function TemplatesFormExtendedComponent_Conditional_1_Conditional_21_Template_kendo_combobox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r2.record.CategoryID, $event) || (ctx_r2.record.CategoryID = $event); return i0.ɵɵresetView($event); });
|
|
78
|
+
i0.ɵɵlistener("valueChange", function TemplatesFormExtendedComponent_Conditional_1_Conditional_21_Template_kendo_combobox_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCategoryChange($event)); });
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
80
|
+
} if (rf & 2) {
|
|
81
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
82
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r2.record.CategoryID);
|
|
83
|
+
i0.ɵɵproperty("data", ctx_r2.categoryOptions)("valuePrimitive", true)("allowCustom", true);
|
|
84
|
+
} }
|
|
85
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
86
|
+
i0.ɵɵelementStart(0, "div", 16);
|
|
87
|
+
i0.ɵɵtext(1);
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
} if (rf & 2) {
|
|
90
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
91
|
+
i0.ɵɵadvance();
|
|
92
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.record.Category || "Uncategorized", " ");
|
|
93
|
+
} }
|
|
94
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
+
i0.ɵɵelementStart(0, "span", 18);
|
|
96
|
+
i0.ɵɵelement(1, "i", 49);
|
|
97
|
+
i0.ɵɵtext(2, " Active ");
|
|
98
|
+
i0.ɵɵelementEnd();
|
|
99
|
+
} }
|
|
100
|
+
function TemplatesFormExtendedComponent_Conditional_1_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelementStart(0, "span", 19);
|
|
102
|
+
i0.ɵɵelement(1, "i", 50);
|
|
103
|
+
i0.ɵɵtext(2, " Inactive ");
|
|
104
|
+
i0.ɵɵelementEnd();
|
|
105
|
+
} }
|
|
106
|
+
function TemplatesFormExtendedComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
108
|
+
i0.ɵɵelementStart(0, "form", 2, 0);
|
|
109
|
+
i0.ɵɵelement(2, "mj-form-toolbar", 3);
|
|
110
|
+
i0.ɵɵelementStart(3, "div", 4)(4, "div", 5)(5, "div", 6)(6, "label", 7);
|
|
111
|
+
i0.ɵɵelement(7, "i", 8);
|
|
112
|
+
i0.ɵɵtext(8, " Template Name ");
|
|
113
|
+
i0.ɵɵelementEnd();
|
|
114
|
+
i0.ɵɵtemplate(9, TemplatesFormExtendedComponent_Conditional_1_Conditional_9_Template, 1, 1, "kendo-textbox", 9)(10, TemplatesFormExtendedComponent_Conditional_1_Conditional_10_Template, 2, 1, "div", 10);
|
|
115
|
+
i0.ɵɵelementEnd();
|
|
116
|
+
i0.ɵɵelementStart(11, "div", 6)(12, "label", 7);
|
|
117
|
+
i0.ɵɵelement(13, "i", 11);
|
|
118
|
+
i0.ɵɵtext(14, " Description ");
|
|
119
|
+
i0.ɵɵelementEnd();
|
|
120
|
+
i0.ɵɵtemplate(15, TemplatesFormExtendedComponent_Conditional_1_Conditional_15_Template, 1, 2, "kendo-textarea", 12)(16, TemplatesFormExtendedComponent_Conditional_1_Conditional_16_Template, 2, 1, "div", 13);
|
|
121
|
+
i0.ɵɵelementEnd();
|
|
122
|
+
i0.ɵɵelementStart(17, "div", 6)(18, "label", 7);
|
|
123
|
+
i0.ɵɵelement(19, "i", 14);
|
|
124
|
+
i0.ɵɵtext(20, " Category ");
|
|
125
|
+
i0.ɵɵelementEnd();
|
|
126
|
+
i0.ɵɵtemplate(21, TemplatesFormExtendedComponent_Conditional_1_Conditional_21_Template, 1, 4, "kendo-combobox", 15)(22, TemplatesFormExtendedComponent_Conditional_1_Conditional_22_Template, 2, 1, "div", 16);
|
|
127
|
+
i0.ɵɵelementEnd();
|
|
128
|
+
i0.ɵɵelementStart(23, "div", 17);
|
|
129
|
+
i0.ɵɵtemplate(24, TemplatesFormExtendedComponent_Conditional_1_Conditional_24_Template, 3, 0, "span", 18)(25, TemplatesFormExtendedComponent_Conditional_1_Conditional_25_Template, 3, 0, "span", 19);
|
|
130
|
+
i0.ɵɵelementEnd()()();
|
|
131
|
+
i0.ɵɵelementStart(26, "mj-tabstrip", 20);
|
|
132
|
+
i0.ɵɵlistener("TabSelected", function TemplatesFormExtendedComponent_Conditional_1_Template_mj_tabstrip_TabSelected_26_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onTabSelect($event)); })("ResizeContainer", function TemplatesFormExtendedComponent_Conditional_1_Template_mj_tabstrip_ResizeContainer_26_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.InvokeManualResize()); });
|
|
133
|
+
i0.ɵɵelementStart(27, "mj-tab", 21);
|
|
134
|
+
i0.ɵɵelement(28, "i", 22);
|
|
135
|
+
i0.ɵɵtext(29, " Contents ");
|
|
136
|
+
i0.ɵɵelementStart(30, "span", 23);
|
|
137
|
+
i0.ɵɵtext(31);
|
|
138
|
+
i0.ɵɵelementEnd()();
|
|
139
|
+
i0.ɵɵelementStart(32, "mj-tab-body")(33, "div", 24)(34, "mj-template-editor", 25);
|
|
140
|
+
i0.ɵɵlistener("contentChange", function TemplatesFormExtendedComponent_Conditional_1_Template_mj_template_editor_contentChange_34_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSharedTemplateContentChange($event)); })("runTemplate", function TemplatesFormExtendedComponent_Conditional_1_Template_mj_template_editor_runTemplate_34_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSharedTemplateRun($event)); });
|
|
141
|
+
i0.ɵɵelementEnd()()();
|
|
142
|
+
i0.ɵɵelementStart(35, "mj-tab", 26);
|
|
143
|
+
i0.ɵɵelement(36, "i", 27);
|
|
144
|
+
i0.ɵɵtext(37, " Details ");
|
|
145
|
+
i0.ɵɵelementEnd();
|
|
146
|
+
i0.ɵɵelementStart(38, "mj-tab-body")(39, "div", 28)(40, "div", 29);
|
|
147
|
+
i0.ɵɵelement(41, "mj-form-field", 30)(42, "mj-form-field", 31)(43, "mj-form-field", 32)(44, "mj-form-field", 33)(45, "mj-form-field", 34)(46, "mj-form-field", 35)(47, "mj-form-field", 36)(48, "mj-form-field", 37)(49, "mj-form-field", 38);
|
|
148
|
+
i0.ɵɵelementEnd()()();
|
|
149
|
+
i0.ɵɵelementStart(50, "mj-tab", 39);
|
|
150
|
+
i0.ɵɵelement(51, "i", 40);
|
|
151
|
+
i0.ɵɵtext(52, " Parameters ");
|
|
152
|
+
i0.ɵɵelementEnd();
|
|
153
|
+
i0.ɵɵelementStart(53, "mj-tab-body");
|
|
154
|
+
i0.ɵɵelement(54, "mj-user-view-grid", 41);
|
|
155
|
+
i0.ɵɵelementEnd();
|
|
156
|
+
i0.ɵɵelementStart(55, "mj-tab", 42);
|
|
157
|
+
i0.ɵɵelement(56, "i", 43);
|
|
158
|
+
i0.ɵɵtext(57, " AI Prompts ");
|
|
159
|
+
i0.ɵɵelementEnd();
|
|
160
|
+
i0.ɵɵelementStart(58, "mj-tab-body");
|
|
161
|
+
i0.ɵɵelement(59, "mj-user-view-grid", 41);
|
|
162
|
+
i0.ɵɵelementEnd();
|
|
163
|
+
i0.ɵɵelementStart(60, "mj-tab", 44);
|
|
164
|
+
i0.ɵɵelement(61, "i", 8);
|
|
165
|
+
i0.ɵɵtext(62, " Documents ");
|
|
166
|
+
i0.ɵɵelementEnd();
|
|
167
|
+
i0.ɵɵelementStart(63, "mj-tab-body");
|
|
168
|
+
i0.ɵɵelement(64, "mj-user-view-grid", 41);
|
|
169
|
+
i0.ɵɵelementEnd()()();
|
|
170
|
+
i0.ɵɵelementStart(65, "mj-template-param-dialog", 45);
|
|
171
|
+
i0.ɵɵtwoWayListener("isVisibleChange", function TemplatesFormExtendedComponent_Conditional_1_Template_mj_template_param_dialog_isVisibleChange_65_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.showParamDialog, $event) || (ctx_r2.showParamDialog = $event); return i0.ɵɵresetView($event); });
|
|
172
|
+
i0.ɵɵlistener("onClose", function TemplatesFormExtendedComponent_Conditional_1_Template_mj_template_param_dialog_onClose_65_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onParamDialogClose()); });
|
|
173
|
+
i0.ɵɵelementEnd();
|
|
174
|
+
} if (rf & 2) {
|
|
175
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
176
|
+
i0.ɵɵadvance(2);
|
|
177
|
+
i0.ɵɵproperty("form", ctx_r2);
|
|
178
|
+
i0.ɵɵadvance(7);
|
|
179
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 9 : 10);
|
|
180
|
+
i0.ɵɵadvance(6);
|
|
181
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 15 : 16);
|
|
182
|
+
i0.ɵɵadvance(6);
|
|
183
|
+
i0.ɵɵconditional(ctx_r2.EditMode ? 21 : 22);
|
|
184
|
+
i0.ɵɵadvance(3);
|
|
185
|
+
i0.ɵɵconditional(ctx_r2.record.IsActive ? 24 : 25);
|
|
186
|
+
i0.ɵɵadvance(2);
|
|
187
|
+
i0.ɵɵproperty("bottomMargin", 140);
|
|
188
|
+
i0.ɵɵadvance(5);
|
|
189
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.templateContents.length, " ");
|
|
190
|
+
i0.ɵɵadvance(2);
|
|
191
|
+
i0.ɵɵproperty("bottomMargin", 80);
|
|
192
|
+
i0.ɵɵadvance();
|
|
193
|
+
i0.ɵɵproperty("template", ctx_r2.record)("config", ctx_r2.templateEditorConfig);
|
|
194
|
+
i0.ɵɵadvance(7);
|
|
195
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
196
|
+
i0.ɵɵadvance();
|
|
197
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
198
|
+
i0.ɵɵadvance();
|
|
199
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
200
|
+
i0.ɵɵadvance();
|
|
201
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
202
|
+
i0.ɵɵadvance();
|
|
203
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
204
|
+
i0.ɵɵadvance();
|
|
205
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
206
|
+
i0.ɵɵadvance();
|
|
207
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
208
|
+
i0.ɵɵadvance();
|
|
209
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
210
|
+
i0.ɵɵadvance();
|
|
211
|
+
i0.ɵɵproperty("record", ctx_r2.record)("ShowLabel", true)("EditMode", ctx_r2.EditMode);
|
|
212
|
+
i0.ɵɵadvance();
|
|
213
|
+
i0.ɵɵproperty("Visible", ctx_r2.record.IsSaved);
|
|
214
|
+
i0.ɵɵadvance(4);
|
|
215
|
+
i0.ɵɵproperty("Params", ctx_r2.BuildRelationshipViewParamsByEntityName("Template Params", "TemplateID"))("NewRecordValues", ctx_r2.NewRecordValues("Template Params"))("AllowLoad", ctx_r2.IsCurrentTab("Template Params"))("EditMode", ctx_r2.GridEditMode())("BottomMargin", ctx_r2.GridBottomMargin);
|
|
216
|
+
i0.ɵɵadvance();
|
|
217
|
+
i0.ɵɵproperty("Visible", ctx_r2.record.IsSaved);
|
|
218
|
+
i0.ɵɵadvance(4);
|
|
219
|
+
i0.ɵɵproperty("Params", ctx_r2.BuildRelationshipViewParamsByEntityName("AI Prompts", "TemplateID"))("NewRecordValues", ctx_r2.NewRecordValues("AI Prompts"))("AllowLoad", ctx_r2.IsCurrentTab("AI Prompts"))("EditMode", ctx_r2.GridEditMode())("BottomMargin", ctx_r2.GridBottomMargin);
|
|
220
|
+
i0.ɵɵadvance();
|
|
221
|
+
i0.ɵɵproperty("Visible", ctx_r2.record.IsSaved);
|
|
222
|
+
i0.ɵɵadvance(4);
|
|
223
|
+
i0.ɵɵproperty("Params", ctx_r2.BuildRelationshipViewParamsByEntityName("Entity Documents", "TemplateID"))("NewRecordValues", ctx_r2.NewRecordValues("Entity Documents"))("AllowLoad", ctx_r2.IsCurrentTab("Entity Documents"))("EditMode", ctx_r2.GridEditMode())("BottomMargin", ctx_r2.GridBottomMargin);
|
|
224
|
+
i0.ɵɵadvance();
|
|
225
|
+
i0.ɵɵproperty("template", ctx_r2.record);
|
|
226
|
+
i0.ɵɵtwoWayProperty("isVisible", ctx_r2.showParamDialog);
|
|
227
|
+
} }
|
|
228
|
+
let TemplatesFormExtendedComponent = class TemplatesFormExtendedComponent extends TemplateFormComponent {
|
|
229
|
+
constructor() {
|
|
230
|
+
super(...arguments);
|
|
231
|
+
this.templateContents = [];
|
|
232
|
+
this.selectedContentIndex = 0;
|
|
233
|
+
this.isAddingNewContent = false;
|
|
234
|
+
this.newTemplateContent = null;
|
|
235
|
+
this.hasUnsavedChanges = false;
|
|
236
|
+
this.templateInfoExpanded = true;
|
|
237
|
+
this.templateContentsExpanded = true;
|
|
238
|
+
this.categoryOptions = [
|
|
239
|
+
{ text: 'Select Category...', value: '' },
|
|
240
|
+
// TODO: Load from database
|
|
241
|
+
];
|
|
242
|
+
this.contentTypeOptions = [];
|
|
243
|
+
this.supportedLanguages = languages;
|
|
244
|
+
this.codeEditor = null;
|
|
245
|
+
this.isUpdatingEditorValue = false;
|
|
246
|
+
this.isRunningTemplate = false;
|
|
247
|
+
this.templateTestResult = null;
|
|
248
|
+
this.templateTestError = null;
|
|
249
|
+
this.showParamDialog = false;
|
|
250
|
+
// Template editor configuration for shared component
|
|
251
|
+
this.templateEditorConfig = {
|
|
252
|
+
allowEdit: true,
|
|
253
|
+
showRunButton: true,
|
|
254
|
+
compactMode: false
|
|
255
|
+
};
|
|
256
|
+
this.destroy$ = new Subject();
|
|
257
|
+
}
|
|
258
|
+
ngOnInit() {
|
|
259
|
+
const _super = Object.create(null, {
|
|
260
|
+
ngOnInit: { get: () => super.ngOnInit }
|
|
261
|
+
});
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
yield _super.ngOnInit.call(this);
|
|
264
|
+
yield this.loadTemplateContents();
|
|
265
|
+
yield this.loadCategories();
|
|
266
|
+
this.loadContentTypes();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
ngOnDestroy() {
|
|
270
|
+
this.destroy$.next();
|
|
271
|
+
this.destroy$.complete();
|
|
272
|
+
}
|
|
273
|
+
ngAfterViewInit() {
|
|
274
|
+
// Initial sync when view is ready
|
|
275
|
+
this.syncEditorValue();
|
|
276
|
+
}
|
|
277
|
+
loadTemplateContents() {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
if (this.record && this.record.ID) {
|
|
280
|
+
try {
|
|
281
|
+
const rv = new RunView();
|
|
282
|
+
const results = yield rv.RunView({
|
|
283
|
+
EntityName: 'Template Contents',
|
|
284
|
+
ExtraFilter: `TemplateID='${this.record.ID}'`,
|
|
285
|
+
OrderBy: 'Priority ASC, __mj_CreatedAt ASC',
|
|
286
|
+
ResultType: 'entity_object'
|
|
287
|
+
});
|
|
288
|
+
this.templateContents = results.Results;
|
|
289
|
+
// If we have contents but no selection, select the first one
|
|
290
|
+
if (this.templateContents.length > 0 && this.selectedContentIndex === 0) {
|
|
291
|
+
this.selectedContentIndex = 0;
|
|
292
|
+
}
|
|
293
|
+
// If no template contents exist, create a default one for single-content optimization
|
|
294
|
+
if (this.templateContents.length === 0) {
|
|
295
|
+
yield this.createDefaultTemplateContent();
|
|
296
|
+
}
|
|
297
|
+
// Entity change tracking is handled automatically by BaseEntity
|
|
298
|
+
// Sync editor value after loading content
|
|
299
|
+
this.syncEditorValue();
|
|
300
|
+
}
|
|
301
|
+
catch (error) {
|
|
302
|
+
console.error('Error loading template contents:', error);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
createDefaultTemplateContent() {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
+
const md = new Metadata();
|
|
310
|
+
const defaultContent = yield md.GetEntityObject('Template Contents');
|
|
311
|
+
defaultContent.TemplateID = this.record.ID;
|
|
312
|
+
defaultContent.Priority = 1;
|
|
313
|
+
defaultContent.IsActive = true;
|
|
314
|
+
// Set default to first real content type (skip "Select Type..." if it exists)
|
|
315
|
+
const validContentTypes = this.contentTypeOptions.filter(option => option.value !== '');
|
|
316
|
+
if (validContentTypes.length > 0) {
|
|
317
|
+
defaultContent.TypeID = validContentTypes[0].value;
|
|
318
|
+
}
|
|
319
|
+
this.templateContents = [defaultContent];
|
|
320
|
+
this.selectedContentIndex = 0;
|
|
321
|
+
// Sync editor value after creating default content
|
|
322
|
+
this.syncEditorValue();
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
selectTemplateContent(index, confirmSwitch = true) {
|
|
326
|
+
// If we're adding new content and user clicks on existing content, ask for confirmation
|
|
327
|
+
if (this.isAddingNewContent && confirmSwitch) {
|
|
328
|
+
if (!confirm('You have unsaved changes to a new content version. Are you sure you want to switch? Your changes will be lost.')) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if (index >= 0 && index < this.templateContents.length) {
|
|
333
|
+
this.selectedContentIndex = index;
|
|
334
|
+
this.isAddingNewContent = false;
|
|
335
|
+
// Don't clear newTemplateContent to preserve the work in progress
|
|
336
|
+
// Sync editor value when switching content
|
|
337
|
+
this.syncEditorValue();
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
loadCategories() {
|
|
341
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
+
try {
|
|
343
|
+
const rv = new RunView();
|
|
344
|
+
const results = yield rv.RunView({
|
|
345
|
+
EntityName: 'Template Categories',
|
|
346
|
+
ResultType: 'entity_object'
|
|
347
|
+
});
|
|
348
|
+
this.categoryOptions = [
|
|
349
|
+
{ text: 'Select Category...', value: '' },
|
|
350
|
+
...results.Results.map((cat) => ({
|
|
351
|
+
text: cat.Name,
|
|
352
|
+
value: cat.ID
|
|
353
|
+
}))
|
|
354
|
+
];
|
|
355
|
+
}
|
|
356
|
+
catch (error) {
|
|
357
|
+
console.error('Error loading categories:', error);
|
|
358
|
+
this.categoryOptions = [{ text: 'Select Category...', value: '' }];
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
loadContentTypes() {
|
|
363
|
+
try {
|
|
364
|
+
// Get content types from TemplateEngine cache
|
|
365
|
+
const contentTypes = TemplateEngineBase.Instance.TemplateContentTypes;
|
|
366
|
+
this.contentTypeOptions = [
|
|
367
|
+
{ text: 'Select Type...', value: '' },
|
|
368
|
+
...contentTypes.map(ct => ({
|
|
369
|
+
text: ct.Name,
|
|
370
|
+
value: ct.ID
|
|
371
|
+
}))
|
|
372
|
+
];
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
console.error('Error loading content types:', error);
|
|
376
|
+
// Fallback to basic types
|
|
377
|
+
this.contentTypeOptions = [
|
|
378
|
+
{ text: 'Select Type...', value: '' },
|
|
379
|
+
{ text: 'HTML', value: 'HTML' },
|
|
380
|
+
{ text: 'Plain Text', value: 'Text' },
|
|
381
|
+
{ text: 'Markdown', value: 'Markdown' }
|
|
382
|
+
];
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
onCategoryChange(value) {
|
|
386
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
387
|
+
var _a;
|
|
388
|
+
// If it's a new category (string but not in existing options)
|
|
389
|
+
if (value && !this.categoryOptions.find(opt => opt.value === value)) {
|
|
390
|
+
// Check for duplicate category names (case-insensitive, trimmed)
|
|
391
|
+
if (this.isDuplicateCategory(value)) {
|
|
392
|
+
const existingCategory = this.categoryOptions.find(option => option.text && option.text.trim().toLowerCase() === value.trim().toLowerCase());
|
|
393
|
+
if (existingCategory) {
|
|
394
|
+
// Use the existing category instead
|
|
395
|
+
this.record.CategoryID = existingCategory.value;
|
|
396
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Category "${existingCategory.text}" already exists. Using existing category.`, 'warning');
|
|
397
|
+
}
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
try {
|
|
401
|
+
// Create new category with trimmed name
|
|
402
|
+
const md = new Metadata();
|
|
403
|
+
const newCategory = yield md.GetEntityObject('Template Categories');
|
|
404
|
+
newCategory.Name = value.trim();
|
|
405
|
+
newCategory.UserID = this.record.UserID || md.CurrentUser.ID;
|
|
406
|
+
const saved = yield newCategory.Save();
|
|
407
|
+
if (saved) {
|
|
408
|
+
// Add to options and set the ID
|
|
409
|
+
this.categoryOptions.push({
|
|
410
|
+
text: newCategory.Name,
|
|
411
|
+
value: newCategory.ID
|
|
412
|
+
});
|
|
413
|
+
this.record.CategoryID = newCategory.ID;
|
|
414
|
+
MJNotificationService.Instance.CreateSimpleNotification(`New category "${newCategory.Name}" created successfully.`, 'success');
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to create new category. ${((_a = newCategory.LatestResult) === null || _a === void 0 ? void 0 : _a.Message) || ''}`, 'error');
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
catch (error) {
|
|
421
|
+
console.error('Error creating new category:', error);
|
|
422
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error creating new category. Please try again.', 'error');
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
addNewTemplateContent() {
|
|
428
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
+
const md = new Metadata();
|
|
430
|
+
this.newTemplateContent = yield md.GetEntityObject('Template Contents');
|
|
431
|
+
this.newTemplateContent.TemplateID = this.record.ID;
|
|
432
|
+
this.newTemplateContent.Priority = this.templateContents.length + 1;
|
|
433
|
+
this.newTemplateContent.IsActive = true;
|
|
434
|
+
// Set default to first real content type (skip "Select Type..." if it exists)
|
|
435
|
+
const validContentTypes = this.contentTypeOptions.filter(option => option.value !== '');
|
|
436
|
+
if (validContentTypes.length > 0) {
|
|
437
|
+
this.newTemplateContent.TypeID = validContentTypes[0].value;
|
|
438
|
+
}
|
|
439
|
+
this.newTemplateContent.TemplateText = '';
|
|
440
|
+
// Add immediately to the array
|
|
441
|
+
this.templateContents.push(this.newTemplateContent);
|
|
442
|
+
this.selectedContentIndex = this.templateContents.length - 1;
|
|
443
|
+
this.isAddingNewContent = true;
|
|
444
|
+
// Sync editor value when adding new content
|
|
445
|
+
this.syncEditorValue();
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
cancelNewTemplateContent() {
|
|
449
|
+
this.isAddingNewContent = false;
|
|
450
|
+
this.newTemplateContent = null;
|
|
451
|
+
}
|
|
452
|
+
deleteTemplateContent(index) {
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
console.log('deleteTemplateContent called with index:', index);
|
|
455
|
+
console.log('templateContents length:', this.templateContents.length);
|
|
456
|
+
if (index >= 0 && index < this.templateContents.length) {
|
|
457
|
+
const contentToDelete = this.templateContents[index];
|
|
458
|
+
console.log('Content to delete:', contentToDelete);
|
|
459
|
+
if (contentToDelete.ID) {
|
|
460
|
+
try {
|
|
461
|
+
console.log('Attempting to delete content with ID:', contentToDelete.ID);
|
|
462
|
+
const result = yield contentToDelete.Delete();
|
|
463
|
+
console.log('Delete result:', result);
|
|
464
|
+
if (result) {
|
|
465
|
+
this.templateContents.splice(index, 1);
|
|
466
|
+
// Adjust selected index if necessary
|
|
467
|
+
if (this.selectedContentIndex >= this.templateContents.length) {
|
|
468
|
+
this.selectedContentIndex = Math.max(0, this.templateContents.length - 1);
|
|
469
|
+
}
|
|
470
|
+
// If no contents remain, create a default one
|
|
471
|
+
if (this.templateContents.length === 0) {
|
|
472
|
+
yield this.createDefaultTemplateContent();
|
|
473
|
+
}
|
|
474
|
+
console.log('Content deleted successfully');
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
console.error('Delete returned false');
|
|
478
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete template content. ${contentToDelete.LatestResult.Message}`, 'error');
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
catch (error) {
|
|
482
|
+
console.error('Error deleting template content:', error);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
else {
|
|
486
|
+
// Not saved yet, just remove from array
|
|
487
|
+
console.log('Removing unsaved content from array');
|
|
488
|
+
this.templateContents.splice(index, 1);
|
|
489
|
+
if (this.selectedContentIndex >= this.templateContents.length) {
|
|
490
|
+
this.selectedContentIndex = Math.max(0, this.templateContents.length - 1);
|
|
491
|
+
}
|
|
492
|
+
// Reset adding new content state if we're deleting the new content
|
|
493
|
+
if (this.isAddingNewContent && index === this.templateContents.length) {
|
|
494
|
+
this.isAddingNewContent = false;
|
|
495
|
+
this.newTemplateContent = null;
|
|
496
|
+
}
|
|
497
|
+
console.log('Unsaved content removed successfully');
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
console.error('Invalid index for deletion:', index);
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
get currentTemplateContent() {
|
|
506
|
+
if (this.isAddingNewContent) {
|
|
507
|
+
return this.newTemplateContent;
|
|
508
|
+
}
|
|
509
|
+
return this.templateContents[this.selectedContentIndex] || null;
|
|
510
|
+
}
|
|
511
|
+
get hasMultipleContents() {
|
|
512
|
+
return this.templateContents.length > 1 || this.isAddingNewContent;
|
|
513
|
+
}
|
|
514
|
+
onContentTypeChange() {
|
|
515
|
+
// Content type changes just modify the current content, no new record creation
|
|
516
|
+
this.updateUnsavedChangesFlag();
|
|
517
|
+
}
|
|
518
|
+
onContentChange() {
|
|
519
|
+
this.updateUnsavedChangesFlag();
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Updates the hasUnsavedChanges flag based on entity dirty states
|
|
523
|
+
*/
|
|
524
|
+
updateUnsavedChangesFlag() {
|
|
525
|
+
var _a;
|
|
526
|
+
this.hasUnsavedChanges = this.templateContents.some(content => content.Dirty) ||
|
|
527
|
+
this.isAddingNewContent ||
|
|
528
|
+
((_a = this.record) === null || _a === void 0 ? void 0 : _a.Dirty) || false;
|
|
529
|
+
}
|
|
530
|
+
onTemplateTextChange(event) {
|
|
531
|
+
var _a;
|
|
532
|
+
if (this.isUpdatingEditorValue) {
|
|
533
|
+
// Ignore change events when we're programmatically updating the editor
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (this.currentTemplateContent) {
|
|
537
|
+
// Extract value from event - might be event.target.value or just event depending on component
|
|
538
|
+
const value = typeof event === 'string' ? event : (((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || event);
|
|
539
|
+
this.currentTemplateContent.TemplateText = value;
|
|
540
|
+
// hasUnsavedChanges is automatically handled by entity's IsDirty flag
|
|
541
|
+
this.updateUnsavedChangesFlag();
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Manually sync the editor value without triggering change events
|
|
546
|
+
*/
|
|
547
|
+
syncEditorValue() {
|
|
548
|
+
// Use Promise.resolve() to wait for the next microtask after any pending changes
|
|
549
|
+
Promise.resolve().then(() => {
|
|
550
|
+
// Then setTimeout for the next macrotask to ensure DOM is updated
|
|
551
|
+
setTimeout(() => {
|
|
552
|
+
var _a;
|
|
553
|
+
if (!this.codeEditor) {
|
|
554
|
+
console.log('Code editor ViewChild is null - element may not be rendered yet');
|
|
555
|
+
console.log('currentTemplateContent exists:', !!this.currentTemplateContent);
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
this.isUpdatingEditorValue = true;
|
|
559
|
+
const newValue = ((_a = this.currentTemplateContent) === null || _a === void 0 ? void 0 : _a.TemplateText) || '';
|
|
560
|
+
// Use the setValue method from mj-code-editor component
|
|
561
|
+
this.codeEditor.setValue(newValue);
|
|
562
|
+
this.isUpdatingEditorValue = false;
|
|
563
|
+
}, 0);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
saveTemplateContents() {
|
|
567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
+
try {
|
|
569
|
+
// Save all template contents that have changes
|
|
570
|
+
for (const content of this.templateContents) {
|
|
571
|
+
content.TemplateID = this.record.ID; // Ensure FK is set
|
|
572
|
+
if (content.Dirty || !content.ID) {
|
|
573
|
+
const contentResult = yield content.Save();
|
|
574
|
+
if (!contentResult) {
|
|
575
|
+
console.error('Failed to save template content:', content);
|
|
576
|
+
return false;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
this.isAddingNewContent = false;
|
|
581
|
+
this.newTemplateContent = null;
|
|
582
|
+
this.updateUnsavedChangesFlag(); // Update based on current entity states
|
|
583
|
+
return true;
|
|
584
|
+
}
|
|
585
|
+
catch (error) {
|
|
586
|
+
console.error('Error saving template contents:', error);
|
|
587
|
+
return false;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
SaveRecord() {
|
|
592
|
+
const _super = Object.create(null, {
|
|
593
|
+
SaveRecord: { get: () => super.SaveRecord }
|
|
594
|
+
});
|
|
595
|
+
return __awaiter(this, arguments, void 0, function* (StopEditModeAfterSave = true) {
|
|
596
|
+
var _a;
|
|
597
|
+
// Check if we need to create a new category first
|
|
598
|
+
if (this.record.CategoryID && !this.categoryOptions.find(opt => opt.value === this.record.CategoryID)) {
|
|
599
|
+
// Check for duplicate category names (case-insensitive, trimmed)
|
|
600
|
+
if (this.isDuplicateCategory(this.record.CategoryID)) {
|
|
601
|
+
const existingCategory = this.categoryOptions.find(option => { var _a; return option.text && option.text.trim().toLowerCase() === ((_a = this.record.CategoryID) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()); });
|
|
602
|
+
if (existingCategory) {
|
|
603
|
+
// Use the existing category instead
|
|
604
|
+
this.record.CategoryID = existingCategory.value;
|
|
605
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Category "${existingCategory.text}" already exists. Using existing category.`, 'warning');
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
try {
|
|
610
|
+
// Create new category with trimmed name
|
|
611
|
+
const md = new Metadata();
|
|
612
|
+
const newCategory = yield md.GetEntityObject('Template Categories');
|
|
613
|
+
newCategory.Name = this.record.CategoryID.trim(); // CategoryID contains the new category name, trim it
|
|
614
|
+
newCategory.UserID = this.record.UserID || md.CurrentUser.ID;
|
|
615
|
+
const saved = yield newCategory.Save();
|
|
616
|
+
if (saved) {
|
|
617
|
+
// Add to options and set the ID
|
|
618
|
+
this.categoryOptions.push({
|
|
619
|
+
text: newCategory.Name,
|
|
620
|
+
value: newCategory.ID
|
|
621
|
+
});
|
|
622
|
+
this.record.CategoryID = newCategory.ID;
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
console.error('Failed to create new category');
|
|
626
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to create new category. ${((_a = newCategory.LatestResult) === null || _a === void 0 ? void 0 : _a.Message) || ''}`, 'error');
|
|
627
|
+
return false;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
catch (error) {
|
|
631
|
+
console.error('Error creating new category during save:', error);
|
|
632
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error creating new category during save. Please try again.', 'error');
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
// Call the parent save method to save the template
|
|
638
|
+
// Before saving, if a new record, make sure the UserID is set
|
|
639
|
+
if (!this.record.IsSaved && !this.record.UserID) {
|
|
640
|
+
const md = new Metadata();
|
|
641
|
+
this.record.UserID = md.CurrentUser.ID;
|
|
642
|
+
}
|
|
643
|
+
const templateSaved = yield _super.SaveRecord.call(this, StopEditModeAfterSave);
|
|
644
|
+
if (templateSaved) {
|
|
645
|
+
// Then save all template contents
|
|
646
|
+
return yield this.saveTemplateContents();
|
|
647
|
+
}
|
|
648
|
+
return false;
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
getContentTypeDisplayText(typeId) {
|
|
652
|
+
if (!typeId)
|
|
653
|
+
return '-';
|
|
654
|
+
const option = this.contentTypeOptions.find(opt => opt.value === typeId);
|
|
655
|
+
return option ? option.text : typeId;
|
|
656
|
+
}
|
|
657
|
+
getEditorLanguage() {
|
|
658
|
+
var _a;
|
|
659
|
+
if (!((_a = this.currentTemplateContent) === null || _a === void 0 ? void 0 : _a.TypeID)) {
|
|
660
|
+
return 'jinja2'; // default to jinja2 for template syntax (compatible with Nunjucks)
|
|
661
|
+
}
|
|
662
|
+
const contentType = this.currentTemplateContent.TypeID.toLowerCase();
|
|
663
|
+
// Map content types to CodeMirror language modes
|
|
664
|
+
switch (contentType) {
|
|
665
|
+
case 'html':
|
|
666
|
+
return 'jinja2'; // Use jinja2 for HTML templates to get template syntax highlighting
|
|
667
|
+
case 'markdown':
|
|
668
|
+
case 'md':
|
|
669
|
+
return 'markdown';
|
|
670
|
+
case 'javascript':
|
|
671
|
+
case 'js':
|
|
672
|
+
return 'javascript';
|
|
673
|
+
case 'css':
|
|
674
|
+
return 'css';
|
|
675
|
+
case 'json':
|
|
676
|
+
return 'json';
|
|
677
|
+
case 'xml':
|
|
678
|
+
return 'xml';
|
|
679
|
+
case 'sql':
|
|
680
|
+
return 'sql';
|
|
681
|
+
case 'text':
|
|
682
|
+
case 'plain':
|
|
683
|
+
default:
|
|
684
|
+
return 'jinja2'; // Default to jinja2 since templates often contain template syntax
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
isDuplicateCategory(categoryName) {
|
|
688
|
+
const normalizedName = categoryName.trim().toLowerCase();
|
|
689
|
+
return this.categoryOptions.some(option => option.text && option.text.trim().toLowerCase() === normalizedName);
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Test run the current template using the parameter dialog
|
|
693
|
+
*/
|
|
694
|
+
runTemplate() {
|
|
695
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
696
|
+
var _a;
|
|
697
|
+
if (!((_a = this.record) === null || _a === void 0 ? void 0 : _a.IsSaved) || !this.currentTemplateContent) {
|
|
698
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please save the template before running it.', 'warning');
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
// Save any unsaved changes first
|
|
702
|
+
if (this.hasUnsavedChanges) {
|
|
703
|
+
const saveResult = yield this.SaveRecord(false); // Don't exit edit mode
|
|
704
|
+
if (!saveResult) {
|
|
705
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to save template changes.', 'error');
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
// Show the parameter dialog
|
|
710
|
+
this.showParamDialog = true;
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Handle parameter dialog close
|
|
715
|
+
*/
|
|
716
|
+
onParamDialogClose() {
|
|
717
|
+
this.showParamDialog = false;
|
|
718
|
+
}
|
|
719
|
+
getContentTypeOptionsForContent() {
|
|
720
|
+
// Always exclude "Select Type..." option for all content
|
|
721
|
+
return this.contentTypeOptions.filter(option => option.value !== '');
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Handles template content changes from the shared editor
|
|
725
|
+
*/
|
|
726
|
+
onSharedTemplateContentChange(content) {
|
|
727
|
+
this.templateContents = content;
|
|
728
|
+
this.updateUnsavedChangesFlag();
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Handles template run requests from the shared editor
|
|
732
|
+
*/
|
|
733
|
+
onSharedTemplateRun(template) {
|
|
734
|
+
this.runTemplate();
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
TemplatesFormExtendedComponent.ɵfac = /*@__PURE__*/ (() => { let ɵTemplatesFormExtendedComponent_BaseFactory; return function TemplatesFormExtendedComponent_Factory(t) { return (ɵTemplatesFormExtendedComponent_BaseFactory || (ɵTemplatesFormExtendedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TemplatesFormExtendedComponent)))(t || TemplatesFormExtendedComponent); }; })();
|
|
738
|
+
TemplatesFormExtendedComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TemplatesFormExtendedComponent, selectors: [["mj-templates-form"]], viewQuery: function TemplatesFormExtendedComponent_Query(rf, ctx) { if (rf & 1) {
|
|
739
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
740
|
+
} if (rf & 2) {
|
|
741
|
+
let _t;
|
|
742
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.codeEditor = _t.first);
|
|
743
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 3, consts: [["form", "ngForm"], ["mjFillContainer", "", 1, "record-form-container", 3, "bottomMargin", "rightMargin"], ["mjFillContainer", "", 1, "record-form"], [3, "form"], [1, "template-header", 2, "background", "#f8f9fa", "border-bottom", "1px solid #dee2e6", "padding", "8px 20px"], [2, "display", "grid", "grid-template-columns", "1fr 2fr 1fr auto", "gap", "12px", "align-items", "start"], [1, "form-group", 2, "margin", "0"], [1, "form-label", 2, "font-weight", "500", "margin-bottom", "3px", "color", "#495057", "font-size", "0.85em"], [1, "fa-solid", "fa-file-text"], ["name", "templateName", "placeholder", "Enter template name...", 3, "ngModel"], [1, "form-control-plaintext", 2, "font-size", "1em", "font-weight", "500", "padding", "6px 0"], [1, "fa-solid", "fa-align-left"], ["name", "description", "placeholder", "Enter template description...", 3, "ngModel", "rows"], [1, "form-control-plaintext", 2, "padding", "8px 0", "color", "#6c757d"], [1, "fa-solid", "fa-folder"], ["name", "categoryId", "textField", "text", "valueField", "value", "placeholder", "Select or enter new category...", 3, "ngModel", "data", "valuePrimitive", "allowCustom"], [1, "form-control-plaintext", 2, "padding", "8px 0"], [2, "display", "flex", "flex-direction", "column", "align-items", "flex-end", "justify-content", "center"], [1, "badge", "badge-success", 2, "background", "#28a745", "color", "white", "padding", "6px 12px", "border-radius", "4px", "font-size", "0.85em"], [1, "badge", "badge-secondary", 2, "background", "#6c757d", "color", "white", "padding", "6px 12px", "border-radius", "4px", "font-size", "0.85em"], ["mjFillContainer", "", 3, "TabSelected", "ResizeContainer", "bottomMargin"], ["Name", "Contents"], [1, "fa-solid", "fa-file-lines"], [1, "badge", "badge-info", 2, "background", "#17a2b8", "color", "white", "padding", "2px 6px", "border-radius", "3px", "font-size", "0.7em", "margin-left", "6px"], ["mjFillContainer", "", 1, "template-contents-main", "content-margin", 3, "bottomMargin"], [2, "height", "100%", "display", "block", 3, "contentChange", "runTemplate", "template", "config"], ["Name", "Details"], [1, "fa-solid", "fa-cogs"], [2, "padding", "20px"], [1, "record-form"], ["FieldName", "UserPrompt", "Type", "textarea", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "UserID", "Type", "textbox", "LinkType", "Record", "LinkComponentType", "Search", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ActiveAt", "Type", "datepicker", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "DisabledAt", "Type", "datepicker", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "IsActive", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "__mj_CreatedAt", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "__mj_UpdatedAt", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "Category", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "User", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["Name", "Template Params", 3, "Visible"], [1, "fa-solid", "fa-sliders"], [3, "Params", "NewRecordValues", "AllowLoad", "EditMode", "BottomMargin"], ["Name", "AI Prompts", 3, "Visible"], [1, "fa-solid", "fa-robot"], ["Name", "Entity Documents", 3, "Visible"], [3, "isVisibleChange", "onClose", "template", "isVisible"], ["name", "templateName", "placeholder", "Enter template name...", 3, "ngModelChange", "ngModel"], ["name", "description", "placeholder", "Enter template description...", 3, "ngModelChange", "ngModel", "rows"], ["name", "categoryId", "textField", "text", "valueField", "value", "placeholder", "Select or enter new category...", 3, "ngModelChange", "valueChange", "ngModel", "data", "valuePrimitive", "allowCustom"], [1, "fa-solid", "fa-check-circle"], [1, "fa-solid", "fa-pause-circle"]], template: function TemplatesFormExtendedComponent_Template(rf, ctx) { if (rf & 1) {
|
|
744
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
745
|
+
i0.ɵɵtemplate(1, TemplatesFormExtendedComponent_Conditional_1_Template, 66, 57);
|
|
746
|
+
i0.ɵɵelementEnd();
|
|
747
|
+
} if (rf & 2) {
|
|
748
|
+
i0.ɵɵproperty("bottomMargin", 20)("rightMargin", 5);
|
|
749
|
+
i0.ɵɵadvance();
|
|
750
|
+
i0.ɵɵconditional(ctx.record ? 1 : -1);
|
|
751
|
+
} }, dependencies: [i1.ɵNgNoValidate, i1.NgControlStatus, i1.NgControlStatusGroup, i1.NgModel, i1.NgForm, i2.TextAreaComponent, i2.TextBoxComponent, i3.ComboBoxComponent, i4.UserViewGridComponent, i5.MJFormField, i6.FormToolbarComponent, i7.MJTabStripComponent, i7.MJTabBodyComponent, i7.MJTabComponent, i8.FillContainer, i9.TemplateParamDialogComponent, i10.TemplateEditorComponent], styles: [".k-pane[_ngcontent-%COMP%] {\n background-color: #F5F6FA;\n}\n\n.content-margin[_ngcontent-%COMP%] {\n margin: 10px;\n} \n\n\na[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] {\n display: block;\n flex-direction: column;\n background-color: #F5F6FA;\n padding: 10px;\n}\n\n.record-form-group[_ngcontent-%COMP%] {\n margin-top: 0px;\n background-color: #F5F6FA;\n}\n\nbutton[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n.record-form[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n\n.k-splitter[_ngcontent-%COMP%] {\n border-width: 0px;\n}\n\n.record-form-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child {\n font-weight: bold;\n padding-right: 10px;\n} \n\n.record-form[_ngcontent-%COMP%] .record-form-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n \n\n@media (min-width: 768px) {\n .record-form-row[_ngcontent-%COMP%] {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n width: 240px;\n margin-bottom: 0;\n }\n}"] });
|
|
752
|
+
TemplatesFormExtendedComponent = __decorate([
|
|
753
|
+
RegisterClass(BaseFormComponent, 'Templates')
|
|
754
|
+
], TemplatesFormExtendedComponent);
|
|
755
|
+
export { TemplatesFormExtendedComponent };
|
|
756
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplatesFormExtendedComponent, [{
|
|
757
|
+
type: Component,
|
|
758
|
+
args: [{ selector: 'mj-templates-form', template: "<div class=\"record-form-container\" mjFillContainer [bottomMargin]=\"20\" [rightMargin]=\"5\">\n @if (record) {\n <form class=\"record-form\" #form=\"ngForm\" mjFillContainer>\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Top Section - Key Fields -->\n <div class=\"template-header\" style=\"background: #f8f9fa; border-bottom: 1px solid #dee2e6; padding: 8px 20px;\">\n <div style=\"display: grid; grid-template-columns: 1fr 2fr 1fr auto; gap: 12px; align-items: start;\">\n \n <!-- Name -->\n <div class=\"form-group\" style=\"margin: 0;\">\n <label class=\"form-label\" style=\"font-weight: 500; margin-bottom: 3px; color: #495057; font-size: 0.85em;\">\n <i class=\"fa-solid fa-file-text\"></i> Template Name\n </label>\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" name=\"templateName\" placeholder=\"Enter template name...\"></kendo-textbox>\n } @else {\n <div class=\"form-control-plaintext\" style=\"font-size: 1em; font-weight: 500; padding: 6px 0;\">\n {{ record.Name || 'Unnamed Template' }}\n </div>\n }\n </div>\n\n <!-- Description -->\n <div class=\"form-group\" style=\"margin: 0;\">\n <label class=\"form-label\" style=\"font-weight: 500; margin-bottom: 3px; color: #495057; font-size: 0.85em;\">\n <i class=\"fa-solid fa-align-left\"></i> Description\n </label>\n @if (EditMode) {\n <kendo-textarea [(ngModel)]=\"record.Description\" \n name=\"description\"\n [rows]=\"2\"\n placeholder=\"Enter template description...\"></kendo-textarea>\n } @else {\n <div class=\"form-control-plaintext\" style=\"padding: 8px 0; color: #6c757d;\">\n {{ record.Description || 'No description provided' }}\n </div>\n }\n </div>\n\n <!-- Category -->\n <div class=\"form-group\" style=\"margin: 0;\">\n <label class=\"form-label\" style=\"font-weight: 500; margin-bottom: 3px; color: #495057; font-size: 0.85em;\">\n <i class=\"fa-solid fa-folder\"></i> Category\n </label>\n @if (EditMode) {\n <kendo-combobox [(ngModel)]=\"record.CategoryID\" \n name=\"categoryId\"\n [data]=\"categoryOptions\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [allowCustom]=\"true\"\n (valueChange)=\"onCategoryChange($event)\"\n placeholder=\"Select or enter new category...\">\n </kendo-combobox>\n } @else {\n <div class=\"form-control-plaintext\" style=\"padding: 8px 0;\">\n {{ record.Category || 'Uncategorized' }}\n </div>\n }\n </div>\n\n <!-- Template Status -->\n <div style=\"display: flex; flex-direction: column; align-items: flex-end; justify-content: center;\">\n @if (record.IsActive) {\n <span class=\"badge badge-success\" style=\"background: #28a745; color: white; padding: 6px 12px; border-radius: 4px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-check-circle\"></i> Active\n </span>\n } @else {\n <span class=\"badge badge-secondary\" style=\"background: #6c757d; color: white; padding: 6px 12px; border-radius: 4px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-pause-circle\"></i> Inactive\n </span>\n }\n </div>\n </div>\n </div>\n\n <mj-tabstrip (TabSelected)=\"onTabSelect($event)\" mjFillContainer (ResizeContainer)=\"InvokeManualResize()\" [bottomMargin]=\"140\">\n \n <!-- Contents Tab - Main Focus -->\n <mj-tab Name=\"Contents\">\n <i class=\"fa-solid fa-file-lines\"></i> Contents \n <span class=\"badge badge-info\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 3px; font-size: 0.7em; margin-left: 6px;\">\n {{ templateContents.length }}\n </span>\n </mj-tab>\n <mj-tab-body>\n <div class=\"template-contents-main content-margin\" mjFillContainer [bottomMargin]=\"80\">\n <!-- Shared Template Editor -->\n <mj-template-editor \n [template]=\"record\"\n [config]=\"templateEditorConfig\"\n (contentChange)=\"onSharedTemplateContentChange($event)\"\n (runTemplate)=\"onSharedTemplateRun($event)\"\n style=\"height: 100%; display: block;\">\n </mj-template-editor>\n </div>\n </mj-tab-body>\n\n <!-- Details Tab - Extra Fields -->\n <mj-tab Name=\"Details\">\n <i class=\"fa-solid fa-cogs\"></i> Details\n </mj-tab>\n <mj-tab-body>\n <div style=\"padding: 20px;\">\n <div class=\"record-form\">\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"UserPrompt\"\n Type=\"textarea\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"UserID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n LinkType=\"Record\"\n LinkComponentType=\"Search\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ActiveAt\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"DisabledAt\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"IsActive\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"__mj_CreatedAt\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"__mj_UpdatedAt\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"Category\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"User\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n </div>\n </div>\n </mj-tab-body>\n\n <!-- Template Params Tab -->\n <mj-tab Name=\"Template Params\" [Visible]=\"record.IsSaved\"> \n <i class=\"fa-solid fa-sliders\"></i> Parameters\n </mj-tab>\n <mj-tab-body>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('Template Params','TemplateID')\" \n [NewRecordValues]=\"NewRecordValues('Template Params')\"\n [AllowLoad]=\"IsCurrentTab('Template Params')\" \n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"GridBottomMargin\">\n </mj-user-view-grid> \n </mj-tab-body>\n\n <!-- AI Prompts Tab -->\n <mj-tab Name=\"AI Prompts\" [Visible]=\"record.IsSaved\"> \n <i class=\"fa-solid fa-robot\"></i> AI Prompts\n </mj-tab>\n <mj-tab-body>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Prompts','TemplateID')\" \n [NewRecordValues]=\"NewRecordValues('AI Prompts')\"\n [AllowLoad]=\"IsCurrentTab('AI Prompts')\" \n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"GridBottomMargin\">\n </mj-user-view-grid> \n </mj-tab-body>\n\n <!-- Entity Documents Tab -->\n <mj-tab Name=\"Entity Documents\" [Visible]=\"record.IsSaved\"> \n <i class=\"fa-solid fa-file-text\"></i> Documents\n </mj-tab>\n <mj-tab-body>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('Entity Documents','TemplateID')\" \n [NewRecordValues]=\"NewRecordValues('Entity Documents')\"\n [AllowLoad]=\"IsCurrentTab('Entity Documents')\" \n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"GridBottomMargin\">\n </mj-user-view-grid> \n </mj-tab-body>\n </mj-tabstrip>\n </form>\n\n <!-- Template Parameter Dialog -->\n <mj-template-param-dialog \n [template]=\"record\"\n [(isVisible)]=\"showParamDialog\"\n (onClose)=\"onParamDialogClose()\">\n </mj-template-param-dialog>\n }\n</div>", styles: [".k-pane {\n background-color: #F5F6FA;\n}\n\n.content-margin {\n margin: 10px;\n} \n\n\na {\n font-size: 14px;\n font-weight: bolder;\n}\n\n.tab-header-icon {\n margin-right: 5px;\n}\n\n.record-form {\n display: block;\n flex-direction: column;\n background-color: #F5F6FA;\n padding: 10px;\n}\n\n.record-form-group {\n margin-top: 0px;\n background-color: #F5F6FA;\n}\n\nbutton {\n margin-right: 5px;\n}\n\n.record-form h2 {\n margin-bottom: 10px;\n}\n\n.k-splitter {\n border-width: 0px;\n}\n\n.record-form-row {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: start;\n gap: 10px;\n margin-bottom: 12px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n\n\n/* .record-form .record-form-row:nth-child(odd) {\n background-color: #f2f2f2; \n} */\n\n/* \n.record-form .record-form-row:nth-child(even) {\n background-color: #ffffff; \n} */\n\n.record-form .record-form-row > :first-child {\n font-weight: bold;\n padding-right: 10px;\n} \n\n.record-form .record-form-row > span {\n white-space: pre-line;\n max-height: 300px;\n overflow: auto;\n}\n\n \n\n@media (min-width: 768px) {\n .record-form-row {\n flex-direction: row;\n align-items: center;\n }\n\n .record-form-row label {\n width: 240px;\n margin-bottom: 0;\n }\n}\n"] }]
|
|
759
|
+
}], null, { codeEditor: [{
|
|
760
|
+
type: ViewChild,
|
|
761
|
+
args: ['codeEditor']
|
|
762
|
+
}] }); })();
|
|
763
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplatesFormExtendedComponent, { className: "TemplatesFormExtendedComponent", filePath: "src/lib/custom/Templates/templates-form.component.ts", lineNumber: 22 }); })();
|
|
764
|
+
export function LoadTemplatesFormExtendedComponent() {
|
|
765
|
+
// prevents tree shaking
|
|
766
|
+
}
|
|
767
|
+
//# sourceMappingURL=templates-form.component.js.map
|