@memberjunction/ng-core-entity-forms 6.2.0-edge.1 → 6.2.0-edge.2
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/dist/lib/custom/AIAgents/agent-form-tabs.d.ts +1 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/agent-form-tabs.js +2 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +528 -521
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +10 -16
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/pending-records.d.ts +11 -0
- package/dist/lib/custom/AIPrompts/pending-records.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/pending-records.js +21 -0
- package/dist/lib/custom/AIPrompts/pending-records.js.map +1 -0
- package/dist/lib/custom/Entities/entity-form.component.d.ts +8 -1
- package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.js +240 -147
- package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts +19 -0
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js +50 -8
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js.map +1 -1
- package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts +37 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.js +399 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/record-forms.component.d.ts +69 -0
- package/dist/lib/custom/Rubrics/record-forms.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/record-forms.component.js +587 -0
- package/dist/lib/custom/Rubrics/record-forms.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.d.ts +67 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.js +534 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts +25 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.js +299 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.js.map +1 -0
- package/dist/lib/custom/Rubrics/scale-form.component.d.ts +31 -0
- package/dist/lib/custom/Rubrics/scale-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/scale-form.component.js +395 -0
- package/dist/lib/custom/Rubrics/scale-form.component.js.map +1 -0
- package/dist/lib/custom/Templates/templates-form.component.d.ts +13 -4
- package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/templates-form.component.js +110 -113
- package/dist/lib/custom/Templates/templates-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.d.ts +6 -0
- package/dist/lib/custom/Tests/test-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.js +402 -361
- package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts +5 -0
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.js +704 -664
- package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
- package/dist/lib/custom/Users/user-overview.panel.js +1 -1
- package/dist/lib/custom/Users/user-overview.panel.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +56 -48
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +60 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js +61 -43
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js +74 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js +37 -19
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js +31 -13
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +156 -84
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js +62 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js +24 -6
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js +24 -16
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js +74 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js +135 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js +87 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js +155 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js +62 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js +183 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js +120 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js +103 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js +171 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js +24 -16
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js +27 -25
- package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js +19 -11
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +172 -118
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +436 -422
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +44 -2
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts +116 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts.map +1 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js +820 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js.map +1 -0
- package/dist/lib/shared/components/template-editor.component.d.ts +25 -1
- package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
- package/dist/lib/shared/components/template-editor.component.js +67 -3
- package/dist/lib/shared/components/template-editor.component.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +47 -43
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-clone-config-editor.component.js","sourceRoot":"","sources":["../../../../src/lib/panels/record-clone/entity-clone-config-editor.component.ts","../../../../src/lib/panels/record-clone/entity-clone-config-editor.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,YAAY,EAAkF,MAAM,sBAAsB,CAAC;AACpI,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EACH,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B,GAE/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C7D,2BAAuB;YAIpD,eAA+B;YACA,AAA1C,AAD+E,AAApE,iDAA+B,wBAA4D,8CAC7D,2BAAuB;YAIrD,eAA+B;YACH,AAAvC,AAD+E,AAApE,iDAA+B,wBAA4D,2CAChE,2BAAuB;YAIlD,eAAmC;YACI,AAAlD,AADmF,AAAxE,qDAAmC,wBAA4D,yFACzD,2BAAuB;YAI7D,eAA+B;YACQ,AAAlD,AAD+E,AAApE,iDAA+B,wBAA4D,yFACrD,2BAAuB;YAI7D,eAAkC;YACJ,AAAzC,AADkF,AAAvE,oDAAkC,wBAA4D,6CACjE,2BAAuB;YASa,eAAuC;YAAC,AAAxC,6FAAuC,2BAAuB;YAK/H,eAAoC;YACC,AAAhD,AADoF,AAAzE,sDAAoC,wBAA4D,wFAC5D,2BAAuB;YAKtE,eAQC;YARD,+BAQC;YACD,eAIC;YAJD,gFAIC;YAQL,eAoBC;YApBD,6BAoBC;YAIH,eAoCC;YApCD,2DAoCC;YAKqE,eAAsB;YAAC,AAAvB,wCAAsB,2BAAuB;YAEjH,cAEC;YAFD,yCAEC;YAK0D,eAAuB;YAAvB,yCAAuB;YAGvB,eAAuB;YAAvB,yCAAuB;YAGlF,eAEC;YAFD,2CAEC;YAGH,cAYC;YAZD,iDAYC;YAOG,eAAyB;YAAzB,2CAAyB;YACgC,cAAoD;YAApD,0EAAoD;YAC7G,cAAwH;YAAxH,8CAAwH;YAG5H,eAEC;YAFD,6CAEC;YACD,cAEC;YAFD,4CAEC;;;iFD1KU,gCAAgC;cAP5C,SAAS;6BACM,KAAK,YACP,+BAA+B,mBACxB,uBAAuB,CAAC,MAAM;;kBAS9C,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,MAAM;;kFAXE,gCAAgC","sourcesContent":["import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { CompositeKey, type EntityInfo, type IEntityCloneConfiguration, type ICloneRelationshipPolicy } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport type { RecordClonePlanDetails } from '@memberjunction/core-entities';\nimport { RecordCloneService, CompositeKeyToRecordCloneKey } from '@memberjunction/ng-record-clone';\nimport {\n CloneConfigMetaFromEntity,\n CloneConfigValidator,\n DEFAULT_CLONE_AI_ACTIONS,\n DEFAULT_CLONE_ENTITY_ACTIONS,\n type CloneConfigValidationError,\n} from '@memberjunction/record-cloning-base';\n\n/** String-list rules under `Clone.Fields` the editor offers as field chips. */\nexport type CloneFieldListKey = 'PromptFor' | 'Exclude' | 'Ownership' | 'ServerAllocated';\n\n/** One row of the relationships grid. */\nexport interface CloneRelationshipRow {\n RelatedEntity: string;\n JoinField: string;\n /**\n * Key of this row in `Clone.Relationships`: `\"<RelatedEntity>\"`, or `\"<RelatedEntity>.<JoinField>\"`\n * when the entity has several relationships to the same target (or the config already uses it).\n */\n ConfigKey: string;\n Policy: ICloneRelationshipPolicy['Policy'] | '';\n Locked: boolean;\n MaxRecords: number | null;\n}\n\ntype Option<T> = { text: string; value: T };\n\n/**\n * Editor for an entity's record-cloning configuration (`Configuration.Clone` on its MJ: Entities\n * record), shown in the Entities form's Settings section (plan §12.6).\n *\n * The common settings have controls; everything else (Reset values, Rules, JsonRemap, Presets,\n * Descendants, CreationPath) is editable in the Advanced JSON box, which always shows the whole\n * bag. Validate runs the client-safe `CloneConfigValidator`; Preview plan asks the server for a\n * dry-run plan of one record using the saved configuration; Copy metadata JSON produces the\n * `metadata/entities/.clone-configurations.json` entry for shipping the setting.\n */\n@Component({\n standalone: false,\n selector: 'mj-entity-clone-config-editor',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './entity-clone-config-editor.component.html',\n styleUrls: ['./entity-clone-config-editor.component.css'],\n})\nexport class EntityCloneConfigEditorComponent extends BaseAngularComponent {\n private cdr = inject(ChangeDetectorRef);\n private cloneService = inject(RecordCloneService);\n\n /** The entity whose configuration is edited; supplies fields and relationships. */\n @Input() Entity: EntityInfo | null = null;\n /** The current `Configuration.Clone` bag, or null when the entity has none. */\n @Input() CloneConfig: IEntityCloneConfiguration | null = null;\n /** Controls are read-only unless the form is in edit mode. */\n @Input() EditMode = false;\n /** Fires with the new bag (null to remove it) on every change. */\n @Output() CloneConfigChange = new EventEmitter<IEntityCloneConfiguration | null>();\n\n public readonly ScopeOptions = {\n Subtypes: [\n { text: 'Include (default)', value: 'include' },\n { text: 'Exclude', value: 'exclude' },\n ] as Option<string>[],\n Hierarchy: [\n { text: 'Whole subtree (default)', value: 'subtree' },\n { text: 'This node only', value: 'node' },\n ] as Option<string>[],\n SoftLinks: [\n { text: 'Skip (default)', value: 'skip' },\n { text: 'Include', value: 'include' },\n ] as Option<string>[],\n // Entity Actions run on cloned rows by default, as for any create; AI Actions don't.\n EntityActions: [\n { text: 'Fire (default)', value: 'fire' },\n { text: 'Suppress', value: 'suppress' },\n ] as Option<string>[],\n AIActions: [\n { text: 'Suppress (default)', value: 'suppress' },\n { text: 'Fire', value: 'fire' },\n ] as Option<string>[],\n UserEditable: [\n { text: 'All (default): users may narrow scope; widening needs Override Scope', value: 'all' },\n { text: 'Scope: users may narrow scope', value: 'scope' },\n { text: 'Fields only: values, no scope changes', value: 'fields' },\n { text: 'None: confirm only', value: 'none' },\n ] as Option<string>[],\n NamingStrategy: [\n { text: 'Suffix (default)', value: 'suffix' },\n { text: 'Increment', value: 'increment' },\n { text: 'Prompt the user', value: 'prompt' },\n { text: 'None', value: 'none' },\n ] as Option<string>[],\n Policy: [\n { text: 'Default', value: '' },\n { text: 'Deep (copy)', value: 'Deep' },\n { text: 'Reference', value: 'Reference' },\n { text: 'Skip', value: 'Skip' },\n ] as Option<string>[],\n };\n\n public readonly FieldLists: Array<{ Key: CloneFieldListKey; Label: string; Hint: string }> = [\n { Key: 'PromptFor', Label: 'Ask the user for', Hint: 'Required on the clone, e.g. a unique Email.' },\n { Key: 'Exclude', Label: 'Never copy', Hint: 'Left at the column default on the clone.' },\n { Key: 'Ownership', Label: 'Set to the cloning user', Hint: 'Owner or creator columns.' },\n { Key: 'ServerAllocated', Label: 'Let the server assign', Hint: 'Numbers or slugs the save hook allocates.' },\n ];\n\n public ValidationResults: CloneConfigValidationError[] | null = null;\n public JsonError = '';\n public CopyMessage = '';\n public PreviewRecordId = '';\n public PreviewPlan: RecordClonePlanDetails | null = null;\n public PreviewError = '';\n public IsPreviewing = false;\n /** Show every one-to-many relationship, not only the configured ones. */\n public ShowAllRelationships = false;\n\n /** Bumped after each add so the \"Add field…\" dropdowns re-render showing their placeholder. */\n public AddVersion = 0;\n private previewRequest = 0;\n\n // ── Read helpers ─────────────────────────────────────────────────────\n\n public get Config(): IEntityCloneConfiguration {\n return this.CloneConfig ?? {};\n }\n\n /** Fields a list rule may name: everything but key and __mj system columns. */\n public get FieldNames(): string[] {\n return (this.Entity?.Fields ?? [])\n .filter((f) => !f.IsPrimaryKey && !f.Name.startsWith('__mj_'))\n .map((f) => f.Name);\n }\n\n public FieldList(key: CloneFieldListKey): string[] {\n return (this.Config.Fields?.[key] as string[] | undefined) ?? [];\n }\n\n public AvailableFields(key: CloneFieldListKey): string[] {\n const chosen = new Set(this.FieldList(key));\n return this.FieldNames.filter((f) => !chosen.has(f));\n }\n\n public get NamingFields(): string[] {\n return this.Config.Naming?.Fields ?? [];\n }\n\n public get AvailableNamingFields(): string[] {\n const chosen = new Set(this.NamingFields);\n return this.FieldNames.filter((f) => !chosen.has(f));\n }\n\n /** One row per one-to-many relationship, with its configured policy. */\n public get RelationshipRows(): CloneRelationshipRow[] {\n const rels = (this.Entity?.RelatedEntities ?? []).filter((r) => r.Type?.trim().toLowerCase() === 'one to many');\n const perTarget = new Map<string, number>();\n for (const r of rels) perTarget.set(r.RelatedEntity, (perTarget.get(r.RelatedEntity) ?? 0) + 1);\n const configured = this.Config.Relationships ?? {};\n return rels.map((r) => {\n const qualified = `${r.RelatedEntity}.${r.RelatedEntityJoinField}`;\n // Prefer an existing qualified key; use the plain key only when this target is unambiguous.\n const configKey = qualified in configured || (perTarget.get(r.RelatedEntity) ?? 0) > 1 ? qualified : r.RelatedEntity;\n const cfg = configured[configKey];\n return {\n RelatedEntity: r.RelatedEntity,\n JoinField: r.RelatedEntityJoinField,\n ConfigKey: configKey,\n Policy: cfg?.Policy ?? '',\n Locked: cfg?.Locked ?? false,\n MaxRecords: cfg?.MaxRecords ?? null,\n };\n });\n }\n\n /** The rows the grid shows: configured relationships, or all of them when expanded. */\n public get VisibleRelationshipRows(): CloneRelationshipRow[] {\n const rows = this.RelationshipRows;\n return this.ShowAllRelationships ? rows : rows.filter((r) => r.Policy || r.Locked || r.MaxRecords);\n }\n\n public get AdvancedJson(): string {\n return this.CloneConfig ? JSON.stringify(this.CloneConfig, null, 2) : '';\n }\n\n public get HasConfig(): boolean {\n return !!this.CloneConfig && Object.keys(this.CloneConfig).length > 0;\n }\n\n // ── Edits ────────────────────────────────────────────────────────────\n\n /** Sets top-level keys; an undefined, empty or default-equivalent value removes the key. */\n /** The value of the input, select or textarea that raised a DOM event. */\n public InputValue(event: Event): string {\n const target = event.target as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null;\n return target?.value ?? '';\n }\n\n public Patch(changes: Partial<IEntityCloneConfiguration>): void {\n const next: Record<string, unknown> = { ...this.Config };\n for (const [k, v] of Object.entries(changes)) {\n if (v === undefined || v === '' || v === null) delete next[k];\n else next[k] = v;\n }\n this.emit(next as IEntityCloneConfiguration);\n }\n\n public OnNumberChange(key: 'MaxDepth' | 'MaxRecords', value: number | null): void {\n this.Patch({ [key]: value && value > 0 ? Math.floor(value) : undefined });\n }\n\n\n public OnHooksChange(key: 'EntityActions' | 'AIActions', value: 'suppress' | 'fire'): void {\n const hooks = { ...(this.Config.Hooks ?? {}), [key]: value };\n // Only the default leaves the key out; the other value must be written to take effect.\n if (value === (key === 'EntityActions' ? DEFAULT_CLONE_ENTITY_ACTIONS : DEFAULT_CLONE_AI_ACTIONS)) delete hooks[key];\n this.Patch({ Hooks: Object.keys(hooks).length > 0 ? hooks : undefined });\n }\n\n public OnNamingChange(changes: { Template?: string; Strategy?: string }): void {\n const naming: Record<string, unknown> = { ...(this.Config.Naming ?? {}), ...changes };\n for (const k of Object.keys(naming)) {\n if (naming[k] === '' || naming[k] === undefined) delete naming[k];\n }\n this.Patch({ Naming: Object.keys(naming).length > 0 ? (naming as IEntityCloneConfiguration['Naming']) : undefined });\n }\n\n public AddNamingField(field: string | null): void {\n if (!field) return;\n this.AddVersion++;\n const naming = { ...(this.Config.Naming ?? {}), Fields: [...this.NamingFields, field] };\n this.Patch({ Naming: naming });\n }\n\n public RemoveNamingField(field: string): void {\n const fields = this.NamingFields.filter((f) => f !== field);\n const naming: Record<string, unknown> = { ...(this.Config.Naming ?? {}), Fields: fields };\n if (fields.length === 0) delete naming['Fields'];\n this.Patch({ Naming: Object.keys(naming).length > 0 ? (naming as IEntityCloneConfiguration['Naming']) : undefined });\n }\n\n public AddField(key: CloneFieldListKey, field: string | null): void {\n if (!field) return;\n this.AddVersion++;\n this.setFieldList(key, [...this.FieldList(key), field]);\n }\n\n public RemoveField(key: CloneFieldListKey, field: string): void {\n this.setFieldList(key, this.FieldList(key).filter((f) => f !== field));\n }\n\n public OnRelationshipChange(row: CloneRelationshipRow, changes: Partial<Pick<CloneRelationshipRow, 'Policy' | 'Locked' | 'MaxRecords'>>): void {\n const merged = { ...row, ...changes };\n const relationships: Record<string, ICloneRelationshipPolicy> = { ...(this.Config.Relationships ?? {}) };\n const existing: ICloneRelationshipPolicy = { ...(relationships[row.ConfigKey] ?? {}) };\n if (merged.Policy) existing.Policy = merged.Policy; else delete existing.Policy;\n if (merged.Locked) existing.Locked = true; else delete existing.Locked;\n if (merged.MaxRecords && merged.MaxRecords > 0) existing.MaxRecords = Math.floor(merged.MaxRecords); else delete existing.MaxRecords;\n if (Object.keys(existing).length > 0) relationships[row.ConfigKey] = existing;\n else delete relationships[row.ConfigKey];\n this.Patch({ Relationships: Object.keys(relationships).length > 0 ? relationships : undefined });\n }\n\n /** Replaces the whole bag with the Advanced JSON, if it parses to an object. */\n public OnApplyJson(text: string): void {\n const trimmed = text.trim();\n if (!trimmed) {\n this.JsonError = '';\n this.emit(null);\n return;\n }\n try {\n const parsed: unknown = JSON.parse(trimmed);\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n this.JsonError = 'The clone configuration must be a JSON object.';\n } else {\n this.JsonError = '';\n this.emit(parsed as IEntityCloneConfiguration);\n }\n } catch (err) {\n this.JsonError = `Not valid JSON: ${err instanceof Error ? err.message : String(err)}`;\n }\n this.cdr.markForCheck();\n }\n\n // ── Actions ──────────────────────────────────────────────────────────\n\n /** Runs the client-side validator against this entity's fields and relationships. */\n public Validate(): void {\n if (!this.Entity) return;\n const all = (this.ProviderToUse?.Entities ?? []).map((e) => CloneConfigMetaFromEntity(e, e.CloneConfig));\n this.ValidationResults = CloneConfigValidator.Validate(CloneConfigMetaFromEntity(this.Entity, { ...this.Config, Enabled: true }), all);\n this.cdr.markForCheck();\n }\n\n /** Copies the `.clone-configurations.json` entry for this entity to the clipboard. */\n public async CopyMetadataJson(): Promise<void> {\n if (!this.Entity) return;\n const entry = {\n fields: { Name: this.Entity.Name, Configuration: { Clone: this.Config } },\n primaryKey: { ID: `@lookup:MJ: Entities.Name=${this.Entity.Name}` },\n };\n try {\n await navigator.clipboard.writeText(JSON.stringify(entry, null, 2));\n this.CopyMessage = 'Copied. Paste it into metadata/entities/.clone-configurations.json.';\n } catch {\n this.CopyMessage = 'Copy failed; select the Advanced JSON instead.';\n }\n this.cdr.markForCheck();\n }\n\n /** Asks the server for a dry-run plan of one record. Uses the saved configuration, not unsaved edits. */\n public async PreviewPlanFor(recordId: string): Promise<void> {\n const id = recordId.trim();\n if (!this.Entity || !id) return;\n // Only the latest request may update the preview, so a slow earlier answer can't overwrite it.\n const request = ++this.previewRequest;\n this.IsPreviewing = true;\n this.PreviewError = '';\n this.PreviewPlan = null;\n this.cdr.markForCheck();\n try {\n const out = await this.cloneService.PlanClone(\n {\n EntityName: this.Entity.Name,\n SourceRecordKey: CompositeKeyToRecordCloneKey(CompositeKey.FromURLSegment(this.Entity, id)),\n },\n this.ProviderToUse\n );\n if (request === this.previewRequest) this.PreviewPlan = out.Plan;\n } catch (err) {\n if (request === this.previewRequest) this.PreviewError = err instanceof Error ? err.message : String(err);\n } finally {\n if (request === this.previewRequest) this.IsPreviewing = false;\n this.cdr.markForCheck();\n }\n }\n\n // ── Internals ────────────────────────────────────────────────────────\n\n private setFieldList(key: CloneFieldListKey, values: string[]): void {\n const fields: Record<string, unknown> = { ...(this.Config.Fields ?? {}) };\n if (values.length > 0) fields[key] = values; else delete fields[key];\n this.Patch({ Fields: Object.keys(fields).length > 0 ? (fields as IEntityCloneConfiguration['Fields']) : undefined });\n }\n\n private emit(next: IEntityCloneConfiguration | null): void {\n const empty = !next || Object.keys(next).length === 0;\n this.ValidationResults = null;\n this.CloneConfigChange.emit(empty ? null : next);\n this.cdr.markForCheck();\n }\n}\n","<div class=\"mj-clone-config\">\n <p class=\"mj-clone-config-intro\">\n How records of this entity are copied. Most teams ship this as JSON in\n <code>metadata/entities/.clone-configurations.json</code>; changes here save with the entity.\n </p>\n\n <!-- Status -->\n <div class=\"mj-clone-config-group\">\n <div class=\"mj-clone-config-row\">\n <span class=\"mj-clone-config-label\">Allow cloning from this entity's records</span>\n <mj-switch [ngModel]=\"Config.Enabled === true\" [Disabled]=\"!EditMode\" (ngModelChange)=\"Patch({ Enabled: $event ? true : undefined })\"></mj-switch>\n </div>\n <div class=\"mj-clone-config-row\">\n <span class=\"mj-clone-config-label\">Never clone these rows (not even as children)</span>\n <mj-switch [ngModel]=\"Config.NotCloneable === true\" [Disabled]=\"!EditMode\" (ngModelChange)=\"Patch({ NotCloneable: $event ? true : undefined })\"></mj-switch>\n </div>\n @if (Config.NotCloneable || Config.Enabled === false) {\n <label class=\"mj-clone-config-field mj-clone-config-field--wide\">\n <span>Reason shown to users</span>\n <input class=\"mj-clone-config-input\" type=\"text\" [value]=\"Config.NotCloneableReason ?? ''\" [disabled]=\"!EditMode\"\n (change)=\"Patch({ NotCloneableReason: InputValue($event) })\" />\n </label>\n }\n </div>\n\n <!-- Scope defaults -->\n <h4 class=\"mj-clone-config-heading\">Scope</h4>\n <div class=\"mj-clone-config-grid\">\n <label class=\"mj-clone-config-field\">\n <span>Max depth</span>\n <mj-numeric-input [ngModel]=\"Config.MaxDepth ?? null\" [Min]=\"1\" [Max]=\"10\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnNumberChange('MaxDepth', $event)\"></mj-numeric-input>\n </label>\n <label class=\"mj-clone-config-field\">\n <span>Max records</span>\n <mj-numeric-input [ngModel]=\"Config.MaxRecords ?? null\" [Min]=\"1\" [Max]=\"100000\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnNumberChange('MaxRecords', $event)\"></mj-numeric-input>\n </label>\n <label class=\"mj-clone-config-field\">\n <span>IS-A subtypes</span>\n <mj-dropdown [Data]=\"ScopeOptions.Subtypes\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.Subtypes ?? 'include'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"Patch({ Subtypes: $event === 'include' ? undefined : $event })\"></mj-dropdown>\n </label>\n <label class=\"mj-clone-config-field\">\n <span>Hierarchy</span>\n <mj-dropdown [Data]=\"ScopeOptions.Hierarchy\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.Hierarchy ?? 'subtree'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"Patch({ Hierarchy: $event === 'subtree' ? undefined : $event })\"></mj-dropdown>\n </label>\n <label class=\"mj-clone-config-field\">\n <span>Soft links (tags, notes, attachments)</span>\n <mj-dropdown [Data]=\"ScopeOptions.SoftLinks\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.SoftLinks ?? 'skip'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"Patch({ SoftLinks: $event === 'skip' ? undefined : $event })\"></mj-dropdown>\n </label>\n <label class=\"mj-clone-config-field\">\n <span>Entity Actions</span>\n <mj-dropdown [Data]=\"ScopeOptions.EntityActions\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.Hooks?.EntityActions ?? 'fire'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnHooksChange('EntityActions', $event)\"></mj-dropdown>\n </label>\n <label class=\"mj-clone-config-field\">\n <span>AI Actions</span>\n <mj-dropdown [Data]=\"ScopeOptions.AIActions\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.Hooks?.AIActions ?? 'suppress'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnHooksChange('AIActions', $event)\"></mj-dropdown>\n </label>\n <label class=\"mj-clone-config-field mj-clone-config-field--wide\">\n <span>What users may change</span>\n <mj-dropdown [Data]=\"ScopeOptions.UserEditable\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.UserEditable ?? 'all'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"Patch({ UserEditable: $event === 'all' ? undefined : $event })\"></mj-dropdown>\n </label>\n </div>\n\n <!-- Naming -->\n <h4 class=\"mj-clone-config-heading\">Naming</h4>\n <div class=\"mj-clone-config-grid\">\n <label class=\"mj-clone-config-field\">\n <span>Name template</span>\n <input class=\"mj-clone-config-input\" type=\"text\" placeholder=\"Copy of {Name}\" [value]=\"Config.Naming?.Template ?? ''\" [disabled]=\"!EditMode\"\n (change)=\"OnNamingChange({ Template: InputValue($event) })\" />\n </label>\n <label class=\"mj-clone-config-field\">\n <span>Strategy</span>\n <mj-dropdown [Data]=\"ScopeOptions.NamingStrategy\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"Config.Naming?.Strategy ?? 'suffix'\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnNamingChange({ Strategy: $event === 'suffix' ? '' : $event })\"></mj-dropdown>\n </label>\n <div class=\"mj-clone-config-field mj-clone-config-field--wide\">\n <span>Fields the template names</span>\n <div class=\"mj-clone-config-chips\">\n @for (f of NamingFields; track f) {\n <span class=\"mj-clone-config-chip\">{{ f }}\n @if (EditMode) {\n <button type=\"button\" class=\"mj-clone-config-chip-x\" [attr.aria-label]=\"'Remove ' + f\" (click)=\"RemoveNamingField(f)\"><i class=\"fa-solid fa-xmark\"></i></button>\n }\n </span>\n } @empty {\n <span class=\"mj-clone-config-muted\">The name field and unique text fields (default)</span>\n }\n @if (EditMode && AvailableNamingFields.length > 0) {\n @for (v of [AddVersion]; track v) {\n <mj-dropdown class=\"mj-clone-config-add\" [Data]=\"AvailableNamingFields\" Placeholder=\"Add field…\" [ngModel]=\"null\" (ngModelChange)=\"AddNamingField($event)\"></mj-dropdown>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Field rules -->\n <h4 class=\"mj-clone-config-heading\">Fields</h4>\n <div class=\"mj-clone-config-lists\">\n @for (list of FieldLists; track list.Key) {\n <div class=\"mj-clone-config-field mj-clone-config-field--wide\">\n <span>{{ list.Label }} <span class=\"mj-clone-config-muted\">{{ list.Hint }}</span></span>\n <div class=\"mj-clone-config-chips\">\n @for (f of FieldList(list.Key); track f) {\n <span class=\"mj-clone-config-chip\">{{ f }}\n @if (EditMode) {\n <button type=\"button\" class=\"mj-clone-config-chip-x\" [attr.aria-label]=\"'Remove ' + f\" (click)=\"RemoveField(list.Key, f)\"><i class=\"fa-solid fa-xmark\"></i></button>\n }\n </span>\n } @empty {\n <span class=\"mj-clone-config-muted\">None</span>\n }\n @if (EditMode && AvailableFields(list.Key).length > 0) {\n @for (v of [AddVersion]; track v) {\n <mj-dropdown class=\"mj-clone-config-add\" [Data]=\"AvailableFields(list.Key)\" Placeholder=\"Add field…\" [ngModel]=\"null\" (ngModelChange)=\"AddField(list.Key, $event)\"></mj-dropdown>\n }\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Relationships -->\n @if (RelationshipRows.length > 0) {\n <div class=\"mj-clone-config-heading-row\">\n <h4 class=\"mj-clone-config-heading\">Related records</h4>\n <button type=\"button\" mjButton Variant=\"flat\" Size=\"sm\" (click)=\"ShowAllRelationships = !ShowAllRelationships\">\n {{ ShowAllRelationships ? 'Show configured only' : 'Show all ' + RelationshipRows.length }}\n </button>\n </div>\n @if (!ShowAllRelationships && VisibleRelationshipRows.length === 0) {\n <p class=\"mj-clone-config-muted\">No relationship has its own policy; each uses the default. Show all to set one.</p>\n }\n @if (VisibleRelationshipRows.length > 0) {\n <div class=\"mj-clone-config-table-wrap\">\n <table class=\"mj-clone-config-table\">\n <thead>\n <tr><th>Relationship</th><th>Policy</th><th>Locked</th><th>Max records</th></tr>\n </thead>\n <tbody>\n @for (row of VisibleRelationshipRows; track row.ConfigKey + row.JoinField) {\n <tr>\n <td>{{ row.RelatedEntity }} <span class=\"mj-clone-config-muted\">({{ row.JoinField }})</span></td>\n <td>\n <mj-dropdown [Data]=\"ScopeOptions.Policy\" TextField=\"text\" ValueField=\"value\" [ValuePrimitive]=\"true\"\n [ngModel]=\"row.Policy\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnRelationshipChange(row, { Policy: $event })\"></mj-dropdown>\n </td>\n <td>\n <mj-switch [ngModel]=\"row.Locked\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnRelationshipChange(row, { Locked: $event })\"></mj-switch>\n </td>\n <td>\n <mj-numeric-input [ngModel]=\"row.MaxRecords\" [Min]=\"1\" [Disabled]=\"!EditMode\" (ngModelChange)=\"OnRelationshipChange(row, { MaxRecords: $event })\"></mj-numeric-input>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n }\n\n <!-- Advanced JSON -->\n <details class=\"mj-clone-config-advanced\">\n <summary>Advanced (JSON): Reset values, Rules, JsonRemap, Presets, Descendants and the rest</summary>\n <textarea class=\"mj-clone-config-json\" rows=\"14\" spellcheck=\"false\" [value]=\"AdvancedJson\" [disabled]=\"!EditMode\"\n aria-label=\"Clone configuration JSON\" (change)=\"OnApplyJson(InputValue($event))\"></textarea>\n @if (JsonError) {\n <p class=\"mj-clone-config-error\">{{ JsonError }}</p>\n }\n </details>\n\n <!-- Actions -->\n <div class=\"mj-clone-config-actions\">\n <button type=\"button\" mjButton Variant=\"outline\" Size=\"sm\" [disabled]=\"!HasConfig\" (click)=\"Validate()\">\n <i class=\"fa-solid fa-list-check\"></i> Validate\n </button>\n <button type=\"button\" mjButton Variant=\"outline\" Size=\"sm\" [disabled]=\"!HasConfig\" (click)=\"CopyMetadataJson()\">\n <i class=\"fa-regular fa-copy\"></i> Copy metadata JSON\n </button>\n @if (CopyMessage) {\n <span class=\"mj-clone-config-muted\">{{ CopyMessage }}</span>\n }\n </div>\n\n @if (ValidationResults) {\n @if (ValidationResults.length === 0) {\n <p class=\"mj-clone-config-ok\"><i class=\"fa-solid fa-circle-check\"></i> No problems found.</p>\n } @else {\n <ul class=\"mj-clone-config-findings\">\n @for (r of ValidationResults; track $index) {\n <li [class.is-error]=\"r.Severity === 'Error'\">\n <strong>{{ r.Severity }}</strong> <code>{{ r.PropertyPath }}</code>: {{ r.Message }}\n </li>\n }\n </ul>\n }\n }\n\n <!-- Preview -->\n <h4 class=\"mj-clone-config-heading\">Preview a clone</h4>\n <p class=\"mj-clone-config-muted\">Plans a clone of one record with the <strong>saved</strong> configuration. Nothing is written.</p>\n <div class=\"mj-clone-config-preview-row\">\n <input class=\"mj-clone-config-input\" type=\"text\" placeholder=\"Record ID\" aria-label=\"Record ID to preview\"\n [value]=\"PreviewRecordId\" (input)=\"PreviewRecordId = InputValue($event)\" (keydown.enter)=\"!IsPreviewing && PreviewPlanFor(PreviewRecordId)\" />\n <button type=\"button\" mjButton Variant=\"outline\" Size=\"sm\" [disabled]=\"!PreviewRecordId.trim() || IsPreviewing\" (click)=\"PreviewPlanFor(PreviewRecordId)\">\n @if (IsPreviewing) { <i class=\"fa-solid fa-spinner fa-spin\"></i> } @else { <i class=\"fa-solid fa-diagram-project\"></i> } Preview plan\n </button>\n </div>\n @if (PreviewError) {\n <p class=\"mj-clone-config-error\">{{ PreviewError }}</p>\n }\n @if (PreviewPlan) {\n <mj-clone-plan-tree [Plan]=\"PreviewPlan\"></mj-clone-plan-tree>\n }\n</div>\n"]}
|
|
@@ -5,7 +5,7 @@ import { MJConfirmService } from '@memberjunction/ng-ui-components';
|
|
|
5
5
|
import { LanguageDescription } from '@codemirror/language';
|
|
6
6
|
import { CodeEditorComponent } from '@memberjunction/ng-code-editor';
|
|
7
7
|
import { SystemPlaceholder, SystemPlaceholderCategory } from '@memberjunction/ai-core-plus';
|
|
8
|
-
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
8
|
+
import { BaseAngularComponent, PendingRecordItem } from '@memberjunction/ng-base-types';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export interface TemplateEditorConfig {
|
|
11
11
|
allowEdit?: boolean;
|
|
@@ -121,8 +121,18 @@ export declare class TemplateEditorComponent extends BaseAngularComponent implem
|
|
|
121
121
|
private destroy$;
|
|
122
122
|
private get _metadata();
|
|
123
123
|
private activeTimeouts;
|
|
124
|
+
private elementRef;
|
|
124
125
|
constructor(notificationService: MJNotificationService, confirmService: MJConfirmService);
|
|
125
126
|
ngOnInit(): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* A host form that folds this editor's contents into its pending records (see GetPendingChanges)
|
|
129
|
+
* also reverts them when the user discards the edit: `BaseFormComponent.CancelEdit()` calls
|
|
130
|
+
* `Revert()` on every pending record and broadcasts REVERT_PENDING_CHANGES. The entities roll back
|
|
131
|
+
* on their own, but this editor's rows, CodeMirror's text and the dirty flag would not know, so
|
|
132
|
+
* the screen would keep showing discarded text and the next save would fail on it. Reload from
|
|
133
|
+
* the saved state when the event comes from a form this editor sits inside.
|
|
134
|
+
*/
|
|
135
|
+
private listenForHostFormEvents;
|
|
126
136
|
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
127
137
|
private organizePlaceholdersByCategory;
|
|
128
138
|
/**
|
|
@@ -186,6 +196,20 @@ export declare class TemplateEditorComponent extends BaseAngularComponent implem
|
|
|
186
196
|
*/
|
|
187
197
|
private syncEditorValue;
|
|
188
198
|
SaveTemplateContents(): Promise<boolean>;
|
|
199
|
+
/**
|
|
200
|
+
* The content rows a HOST FORM should persist inside its own save: every content that is new or
|
|
201
|
+
* dirty, each stamped with the template's ID. Forms that embed this editor (Templates, AI Prompts)
|
|
202
|
+
* call this from their `PopulatePendingRecords()` override, so the template and its contents
|
|
203
|
+
* commit in one transaction and a content that fails validation blocks the save visibly instead
|
|
204
|
+
* of being dropped on the floor. A brand-new content nobody typed into is not a change and is
|
|
205
|
+
* skipped; a read-only editor contributes nothing.
|
|
206
|
+
*/
|
|
207
|
+
GetPendingChanges(): PendingRecordItem[];
|
|
208
|
+
/**
|
|
209
|
+
* The host form has persisted the rows from {@link GetPendingChanges}: clear the local dirty state
|
|
210
|
+
* and publish the saved set to listeners.
|
|
211
|
+
*/
|
|
212
|
+
MarkContentsSaved(): void;
|
|
189
213
|
/** @deprecated Use {@link SaveTemplateContents}. */
|
|
190
214
|
saveTemplateContents(): Promise<boolean>;
|
|
191
215
|
GetContentTypeDisplayText(typeId: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-editor.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/components/template-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAa,aAAa,
|
|
1
|
+
{"version":3,"file":"template-editor.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/shared/components/template-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAa,aAAa,EAAsB,MAAM,eAAe,CAAC;AAClK,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,+BA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B;IAazB;;OAEG;IACH,OAAO,CAAC,eAAe;IAmBjB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC;IAkC9C;;;;;;;OAOG;IACI,iBAAiB,IAAI,iBAAiB,EAAE;IAoB/C;;;OAGG;IACI,iBAAiB,IAAI,IAAI;IAOhC,oDAAoD;IAC9C,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC;IAI9C,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAMjD,yDAAyD;IACzD,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAIjD,iBAAiB,IAAI,MAAM;IAgC3B,iDAAiD;IACjD,iBAAiB,IAAI,MAAM;IAI3B;;OAEG;IACG,aAAa;IAyBnB,6CAA6C;IACvC,aAAa;IAInB,+BAA+B,IAAI,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;IAKvE,+DAA+D;IAC/D,+BAA+B,IAAI,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;yCA5wB9D,uBAAuB;2CAAvB,uBAAuB;CA+wBnC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, inject } from '@angular/core';
|
|
2
2
|
import { RunView } from '@memberjunction/core';
|
|
3
|
+
import { MJEventType, MJGlobal } from '@memberjunction/global';
|
|
3
4
|
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
5
|
+
import { IsDescendantElement } from '@memberjunction/ng-shared-generic';
|
|
4
6
|
import { TemplateEngineBase } from '@memberjunction/templates-base-types';
|
|
5
7
|
import { languages } from '@codemirror/language-data';
|
|
6
8
|
import { Subject } from 'rxjs';
|
|
9
|
+
import { takeUntil } from 'rxjs/operators';
|
|
7
10
|
import { DEFAULT_SYSTEM_PLACEHOLDERS, SYSTEM_PLACEHOLDER_CATEGORIES } from '@memberjunction/ai-core-plus';
|
|
8
|
-
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
11
|
+
import { BaseAngularComponent, BaseFormComponentEventCodes, PendingRecordItem } from '@memberjunction/ng-base-types';
|
|
9
12
|
import * as i0 from "@angular/core";
|
|
10
13
|
import * as i1 from "@memberjunction/ng-notifications";
|
|
11
14
|
import * as i2 from "@memberjunction/ng-ui-components";
|
|
@@ -611,14 +614,38 @@ export class TemplateEditorComponent extends BaseAngularComponent {
|
|
|
611
614
|
this.isUpdatingEditorValue = false;
|
|
612
615
|
this.destroy$ = new Subject();
|
|
613
616
|
this.activeTimeouts = [];
|
|
617
|
+
this.elementRef = inject(ElementRef);
|
|
614
618
|
}
|
|
615
619
|
async ngOnInit() {
|
|
616
620
|
this.LoadContentTypes();
|
|
617
621
|
this.organizePlaceholdersByCategory();
|
|
622
|
+
this.listenForHostFormEvents();
|
|
618
623
|
if (this.Template) {
|
|
619
624
|
await this.LoadTemplateContents();
|
|
620
625
|
}
|
|
621
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* A host form that folds this editor's contents into its pending records (see GetPendingChanges)
|
|
629
|
+
* also reverts them when the user discards the edit: `BaseFormComponent.CancelEdit()` calls
|
|
630
|
+
* `Revert()` on every pending record and broadcasts REVERT_PENDING_CHANGES. The entities roll back
|
|
631
|
+
* on their own, but this editor's rows, CodeMirror's text and the dirty flag would not know, so
|
|
632
|
+
* the screen would keep showing discarded text and the next save would fail on it. Reload from
|
|
633
|
+
* the saved state when the event comes from a form this editor sits inside.
|
|
634
|
+
*/
|
|
635
|
+
listenForHostFormEvents() {
|
|
636
|
+
MJGlobal.Instance.GetEventListener(false).pipe(takeUntil(this.destroy$)).subscribe((e) => {
|
|
637
|
+
if (e.event !== MJEventType.ComponentEvent || e.eventCode !== BaseFormComponentEventCodes.BASE_CODE) {
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
const formEvent = e.args;
|
|
641
|
+
if (formEvent.subEventCode !== BaseFormComponentEventCodes.REVERT_PENDING_CHANGES) {
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
if (IsDescendantElement(formEvent.elementRef, this.elementRef)) {
|
|
645
|
+
void this.RefreshAndDiscardChanges();
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
622
649
|
async ngOnChanges(changes) {
|
|
623
650
|
if (changes['template']) {
|
|
624
651
|
// Template input has changed, reload contents
|
|
@@ -1000,6 +1027,43 @@ export class TemplateEditorComponent extends BaseAngularComponent {
|
|
|
1000
1027
|
return false;
|
|
1001
1028
|
}
|
|
1002
1029
|
}
|
|
1030
|
+
/**
|
|
1031
|
+
* The content rows a HOST FORM should persist inside its own save: every content that is new or
|
|
1032
|
+
* dirty, each stamped with the template's ID. Forms that embed this editor (Templates, AI Prompts)
|
|
1033
|
+
* call this from their `PopulatePendingRecords()` override, so the template and its contents
|
|
1034
|
+
* commit in one transaction and a content that fails validation blocks the save visibly instead
|
|
1035
|
+
* of being dropped on the floor. A brand-new content nobody typed into is not a change and is
|
|
1036
|
+
* skipped; a read-only editor contributes nothing.
|
|
1037
|
+
*/
|
|
1038
|
+
GetPendingChanges() {
|
|
1039
|
+
if (!this.config.allowEdit || !this.Template) {
|
|
1040
|
+
return [];
|
|
1041
|
+
}
|
|
1042
|
+
const pending = [];
|
|
1043
|
+
for (const content of this.TemplateContents) {
|
|
1044
|
+
// An unsaved entity always reports Dirty; the empty-text guard keeps a default row nobody used out.
|
|
1045
|
+
const untouchedNew = !content.IsSaved && !(content.TemplateText ?? '').trim();
|
|
1046
|
+
if (untouchedNew || !content.Dirty) {
|
|
1047
|
+
continue;
|
|
1048
|
+
}
|
|
1049
|
+
content.TemplateID = this.Template.ID;
|
|
1050
|
+
const item = new PendingRecordItem();
|
|
1051
|
+
item.entityObject = content;
|
|
1052
|
+
item.action = 'save';
|
|
1053
|
+
pending.push(item);
|
|
1054
|
+
}
|
|
1055
|
+
return pending;
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* The host form has persisted the rows from {@link GetPendingChanges}: clear the local dirty state
|
|
1059
|
+
* and publish the saved set to listeners.
|
|
1060
|
+
*/
|
|
1061
|
+
MarkContentsSaved() {
|
|
1062
|
+
this.IsAddingNewContent = false;
|
|
1063
|
+
this.NewTemplateContent = null;
|
|
1064
|
+
this.updateUnsavedChangesFlag();
|
|
1065
|
+
this.ContentChange.emit(this.TemplateContents);
|
|
1066
|
+
}
|
|
1003
1067
|
/** @deprecated Use {@link SaveTemplateContents}. */
|
|
1004
1068
|
async saveTemplateContents() {
|
|
1005
1069
|
return this.SaveTemplateContents();
|
|
@@ -1111,5 +1175,5 @@ export class TemplateEditorComponent extends BaseAngularComponent {
|
|
|
1111
1175
|
type: ViewChild,
|
|
1112
1176
|
args: ['codeEditor']
|
|
1113
1177
|
}] }); })();
|
|
1114
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateEditorComponent, { className: "TemplateEditorComponent", filePath: "src/lib/shared/components/template-editor.component.ts", lineNumber:
|
|
1178
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateEditorComponent, { className: "TemplateEditorComponent", filePath: "src/lib/shared/components/template-editor.component.ts", lineNumber: 29 }); })();
|
|
1115
1179
|
//# sourceMappingURL=template-editor.component.js.map
|