@api-client/ui 0.6.3 → 0.6.5
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/build/src/core/Activity.d.ts +18 -33
- package/build/src/core/Activity.d.ts.map +1 -1
- package/build/src/core/Activity.js +18 -56
- package/build/src/core/Activity.js.map +1 -1
- package/build/src/core/ActivityManager.d.ts +8 -6
- package/build/src/core/ActivityManager.d.ts.map +1 -1
- package/build/src/core/ActivityManager.js +44 -47
- package/build/src/core/ActivityManager.js.map +1 -1
- package/build/src/core/Fragment.d.ts +3 -28
- package/build/src/core/Fragment.d.ts.map +1 -1
- package/build/src/core/Fragment.js +6 -56
- package/build/src/core/Fragment.js.map +1 -1
- package/build/src/core/FragmentManager.d.ts +0 -6
- package/build/src/core/FragmentManager.d.ts.map +1 -1
- package/build/src/core/FragmentManager.js +0 -13
- package/build/src/core/FragmentManager.js.map +1 -1
- package/build/src/modeling/internals/DomainAssociationEditor.d.ts +2 -1
- package/build/src/modeling/internals/DomainAssociationEditor.d.ts.map +1 -1
- package/build/src/modeling/internals/DomainAssociationEditor.js +3 -2
- package/build/src/modeling/internals/DomainAssociationEditor.js.map +1 -1
- package/build/src/modeling/internals/DomainEntityEditor.d.ts +3 -0
- package/build/src/modeling/internals/DomainEntityEditor.d.ts.map +1 -1
- package/build/src/modeling/internals/DomainEntityEditor.js +4 -1
- package/build/src/modeling/internals/DomainEntityEditor.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/core/Activity.ts +27 -64
- package/src/core/ActivityManager.ts +48 -48
- package/src/core/Fragment.ts +6 -65
- package/src/core/FragmentManager.ts +0 -14
- package/src/modeling/internals/DomainAssociationEditor.ts +3 -2
- package/src/modeling/internals/DomainEntityEditor.ts +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainAssociationEditor.d.ts","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainAssociationEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAQ,MAAM,KAAK,CAAA;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AAG7E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAKtD,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,wCAAwC,CAAA;AAK/C;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH
|
|
1
|
+
{"version":3,"file":"DomainAssociationEditor.d.ts","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainAssociationEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAQ,MAAM,KAAK,CAAA;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAElF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AAG7E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAKtD,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,wCAAwC,CAAA;AAK/C;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,eAAe;IAClE;;;OAGG;IACM,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;cAEnD,UAAU,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAO7C,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAanD;;;;;;;;;OASG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAgBrD;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAWrC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CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc;IAgDpE,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc;IAOpE,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc;IAsC1E,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,GAAG,OAAO,OAAO;IAqBjF,SAAS,CAAC,yBAAyB,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc;IAa7E;;;;;OAKG;IACH,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,GAAG,OAAO,OAAO;IAQzF,SAAS,CAAC,wBAAwB,IAAI,cAAc;IAUpD,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,cAAc,GAAG,OAAO,OAAO;IAyBrF,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc;IAgCnE,SAAS,CAAC,2BAA2B,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,GAAG,OAAO,OAAO;IAYhG,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,cAAc,GAAG,OAAO,OAAO;IA2CxF,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,cAAc,GAAG,OAAO,OAAO;IAQnG,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,cAAc;IAyB3E,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,GAAG,cAAc,EAAE;CA2BxG"}
|
|
@@ -143,7 +143,7 @@ let DomainAssociationEditor = (() => {
|
|
|
143
143
|
allowed: [DomainEntityKind],
|
|
144
144
|
withRecent: true,
|
|
145
145
|
};
|
|
146
|
-
const result = await Events.Domain.Browse.browse(data);
|
|
146
|
+
const result = await Events.Domain.Browse.browse(data, this);
|
|
147
147
|
if (!result) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
@@ -679,7 +679,8 @@ let DomainAssociationEditor = (() => {
|
|
|
679
679
|
/**
|
|
680
680
|
* An element that specializes in editing properties of a domain association.
|
|
681
681
|
*
|
|
682
|
-
* @fires
|
|
682
|
+
* @fires domainbrowserbrowse - Dispatched when the user clicks on the "pick" button. The detail object
|
|
683
|
+
* has the full intent configuration.
|
|
683
684
|
* @fires change - Dispatched when the user changes the value of one of the inputs.
|
|
684
685
|
* @fires DomainAssociationEditor#openentity - A custom event with the `key` and `type` when a property was selected.
|
|
685
686
|
* @fires DomainAssociationEditor#delete - A custom event with the `key` and `type` when a property was selected.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainAssociationEditor.js","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainAssociationEditor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAA4C,IAAI,EAAE,MAAM,KAAK,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAEL,sBAAsB,EAEtB,aAAa,EACb,YAAY,GACb,MAAM,wCAAwC,CAAA;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA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C,CAAC,IAAI,CAAA;;uBAES,QAAQ,CAAC,EAAE;sBACZ,IAAI,CAAC,oBAAoB;yBACtB,CAAC,OAAO;;6BAEJ;gBACrB,CAAC,CAAC,OAAO;WACN,CAAA;QACT,CAAC;QAES,wBAAwB,CAAC,UAAiD;YAClF,MAAM,KAAK,GAAqB,EAAE,CAAA;YAClC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;YAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAA;YAE3B,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,aAAa,EAAE,EAAE;gBAC3D,mDAAmD;gBACnD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA,iDAAiD,YAAY,SAAS,CAAC,CAAA;gBAEtF,mCAAmC;gBACnC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;oBACjC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA;sCACe,QAAQ,CAAC,EAAE;mBAC9B,QAAQ,CAAC,WAAW;0CACG,QAAQ,CAAC,WAAW;;SAErD,CAAC,CAAA;gBACJ,CAAC;gBAED,sDAAsD;gBACtD,IAAI,aAAa,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC;oBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA,2BAA2B,CAAC,CAAA;gBAC7C,CAAC;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,KAAK,CAAA;QACd,CAAC;;;;;;;AAxrBH;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,uCA6pBC","sourcesContent":["import { nothing, type TemplateResult, type PropertyValues, html } from 'lit'\nimport { state } from 'lit/decorators.js'\nimport { live } from 'lit/directives/live.js'\nimport { DomainAssociation } from '@api-client/core/modeling/DomainAssociation.js'\nimport { DomainEntityKind } from '@api-client/core/models/kinds.js'\nimport type { DomainEntity } from '@api-client/core/modeling/DomainEntity.js'\nimport { cancelEvent } from '@api-client/core/lib/events/Utils.js'\nimport type { UiCheckboxElement } from '../../md/checkbox/ui-checkbox.js'\nimport { ModelingElement } from './ModelingElement.js'\nimport type { UiSwitchElement } from '../../md/switch/ui-switch.js'\nimport { Events } from '../../events/Events.js'\nimport { renderHelp } from '../../help/render.js'\nimport type { DomainBrowseInit, DomainSelectionInfo } from '../types.js'\nimport {\n type AssociationSemantic,\n getSemanticsByCategory,\n SemanticCategory,\n SemanticScope,\n SemanticType,\n} from '@api-client/core/modeling/Semantics.js'\nimport type { TaxonomyDialog } from '../dialogs/TaxonomyDialog.js'\nimport { TagsTaxonomy } from '../dialogs/TagsTaxonomy.js'\nimport { CategoryTaxonomy } from '../dialogs/CategoryTaxonomy.js'\n\n/**\n * Dispatched when the user wants to navigate to a parent entity.\n *\n * @event DomainAssociationEditor#openentity\n * @type {CustomEvent}\n * @property {object} detail - The event details.\n * @property {string} detail.key - The key of the parent entity to navigate to.\n * @property {string} detail.kind - The kind of the parent entity. It will always be `DomainEntityKind`.\n */\n\n/**\n * Dispatched when the user deletes a property.\n *\n * @event DomainAssociationEditor#delete\n * @type {CustomEvent}\n * @property {object} detail - The event details.\n * @property {string} detail.key - The key of the parent entity to navigate to.\n * @property {string} detail.kind - The kind of the parent entity. It will always be `DomainEntityKind`.\n */\n\n/**\n * An element that specializes in editing properties of a domain association.\n *\n * @fires startactivityforresult - Dispatched when the user clicks on the \"pick\" button.\n * @fires change - Dispatched when the user changes the value of one of the inputs.\n * @fires DomainAssociationEditor#openentity - A custom event with the `key` and `type` when a property was selected.\n * @fires DomainAssociationEditor#delete - A custom event with the `key` and `type` when a property was selected.\n */\nexport default class DomainAssociationEditor extends ModelingElement {\n /**\n * The `DomainAssociation` object being edited.\n * This is updated when the `selected` property changes.\n */\n @state() private accessor domainElement: DomainAssociation | undefined\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('selected') || cp.has('root') || cp.has('namespace')) {\n this.computeAssociation()\n }\n super.willUpdate(cp)\n }\n\n protected async computeAssociation(): Promise<void> {\n const { root, selected, namespace } = this\n this.domainElement = undefined\n if (!root || !selected) {\n this.domainElement = undefined\n return\n }\n // MD components have issues updating values\n // so we need to wait for the updateComplete to remove them.\n await this.updateComplete\n this.domainElement = root.findAssociation(selected, namespace)\n }\n\n /**\n * Sets the value of one of the \"attribute\" fields.\n * These are the checkboxes located in the \"Attributes\" section.\n *\n * @param name The name of the attribute to set.\n * @param value The boolean option to set as the value.\n * @throws {TypeError} When the passed name is not a valid attribute name.\n * @throws {TypeError} When the passed value is not a boolean value.\n * @fires change - Dispatched when an attribute value is updated.\n */\n setModelAttribute(name: string, value: boolean): void {\n if (!DomainAssociation.isValidAttribute(name)) {\n throw new TypeError(`Invalid attribute name: ${name}.`)\n }\n if (typeof value !== 'boolean') {\n throw new TypeError(`Invalid attribute value: ${value}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n domainElement[name] = value\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * Sets the value of the association's `schema.linked` property.\n * @param value The value to set the `linked` property to.\n */\n setSchemaLinked(value: boolean): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n schema.linked = value\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * A handler for the one of the metadata inputs value change.\n *\n * It supports the following fields:\n *\n * - `name`\n * - `displayName`\n * - `description`\n */\n protected handleMetaChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const node = e.target as HTMLInputElement\n const { name, value } = node\n if (value && !node.reportValidity()) {\n return\n }\n if (!['name', 'displayName', 'description'].includes(name as string)) {\n return\n }\n if (name === 'name' && !value) {\n return\n }\n domainElement.info[name as 'name' | 'description' | 'displayName'] = value\n this.notifyChange()\n }\n\n /**\n * A handler for any of the checkboxes in the `attributes` section.\n * It calls the `setModelAttribute()` method.\n */\n protected handleAttributeOptionChange(e: Event): void {\n const checkbox = e.target as UiCheckboxElement\n const { name = '', checked } = checkbox\n this.setModelAttribute(name, !!checked)\n }\n\n protected handleLinkedChange(e: Event): void {\n const checkbox = e.target as UiSwitchElement\n const { name, checked } = checkbox\n if (name !== 'linked') {\n return\n }\n this.setSchemaLinked(!!checked)\n }\n\n protected async handleSelectTarget(): Promise<void> {\n const domain = this.domainElement?.domain\n if (!domain) {\n throw new Error('Domain is not defined for the domain association.')\n }\n const data: DomainBrowseInit = {\n reason: 'pick',\n domain,\n allowed: [DomainEntityKind],\n withRecent: true,\n }\n const result = await Events.Domain.Browse.browse(data)\n if (!result) {\n return\n }\n if (result.result === 'canceled') {\n return\n }\n if (result.kind !== DomainEntityKind) {\n return\n }\n this.addTarget(result.selected, result.domain)\n }\n\n protected handleDeleteTarget(e: Event): void {\n const button = e.target as HTMLButtonElement\n const { key, namespace } = button.dataset\n if (!key || !namespace) {\n return\n }\n const { domainElement, root } = this\n if (!domainElement || !root) {\n return\n }\n let entity: DomainEntity | undefined\n if (root.key === namespace) {\n entity = root.findEntity(key)\n } else {\n // const foreign = root.foreign.find((item) => item.key === namespace)\n // if (!foreign) {\n // throw new Error(`Namespace ${namespace} not found.`)\n // }\n // entity = foreign.findEntity(key)\n throw new Error(`Foreign namespaces are not supported yet.`)\n }\n if (entity) {\n domainElement.removeTarget(entity)\n this.notifyChange()\n this.requestUpdate()\n }\n }\n\n protected handleNavigateTarget(e: Event): void {\n const item = e.currentTarget as HTMLElement\n const { key } = item.dataset\n if (!key) {\n return\n }\n const detail: DomainSelectionInfo = {\n key,\n kind: DomainEntityKind,\n domain: this.root?.key || '',\n }\n this.dispatchEvent(new CustomEvent('openentity', { detail }))\n }\n\n protected handleUnionTypeChange(e: Event): void {\n const select = e.target as HTMLSelectElement\n const { value } = select\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n schema.unionType = value as 'allOf' | 'anyOf' | 'oneOf' | 'not'\n this.notifyChange()\n this.requestUpdate()\n }\n\n protected handleTargetDragEnter(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const hasJsonData = dt.types.includes('application/json')\n if (!hasJsonData) {\n return\n }\n const zone = e.currentTarget as HTMLElement\n zone.classList.add('drop-zone')\n dt.dropEffect = 'link'\n dt.effectAllowed = 'link'\n }\n\n protected handleTargetDragOver(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const hasJsonData = dt.types.includes('application/json')\n if (!hasJsonData) {\n return\n }\n e.preventDefault()\n }\n\n protected handleTargetDragLeave(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const zone = e.currentTarget as HTMLElement\n zone.classList.remove('drop-zone')\n }\n\n protected handleTargetDrop(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const zone = e.currentTarget as HTMLElement\n zone.classList.remove('drop-zone')\n const raw = dt.getData('application/json')\n const data = JSON.parse(raw) as { items: DomainSelectionInfo[] }\n const entities = data.items.filter((item) => item.kind === DomainEntityKind)\n if (entities.length === 0 || !this.domainElement || !this.root) {\n return\n }\n for (const info of entities) {\n const entity = this.root.findEntity(info.key, info.domain)\n if (!entity) {\n throw new Error(`Entity with key ${info.key} not found in namespace ${info.domain}.`)\n }\n this.domainElement.addTarget(entity)\n }\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * Adds a target entity to the association.\n *\n * @param key The key of the target entity to add.\n * @param nsKey The namespace key of the target entity, if it is in a foreign namespace.\n */\n protected addTarget(key: string, nsKey?: string): void {\n const { domainElement, root } = this\n if (!domainElement || !root) {\n return\n }\n const entity = root.findEntity(key, nsKey)\n if (entity) {\n domainElement.addTarget(entity)\n } else {\n throw new Error(`Entity with key ${key} not found in namespace ${nsKey || root.key}.`)\n }\n this.notifyChange()\n this.requestUpdate()\n }\n\n protected handleDelete(): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const { root } = this\n if (!root) {\n return\n }\n root.removeAssociation(domainElement.key)\n this.dispatchEvent(new CustomEvent('delete', { detail: { key: domainElement.key, kind: domainElement.kind } }))\n }\n\n protected handleDeleteTaxonomy(e: Event): void {\n const button = e.currentTarget as HTMLButtonElement\n const { id } = button.dataset\n if (!id) {\n return\n }\n this.domainElement?.removeSemantic(id as SemanticType)\n }\n\n protected handleTaxonomySelect(e: CustomEvent<{ item: HTMLElement }>): void {\n const { value } = e.detail.item.dataset\n if (value) {\n this.domainElement?.addSemantic({\n id: value as SemanticType,\n })\n this.requestUpdate()\n }\n }\n\n protected handleConfigureTaxonomy(e: Event): void {\n const button = e.currentTarget as HTMLButtonElement\n const { id } = button.dataset\n if (!id) {\n return\n }\n const element = this.domainElement\n if (!element) {\n return\n }\n let dialog: TaxonomyDialog\n if (id === SemanticType.Tags) {\n dialog = new TagsTaxonomy(element)\n } else if (id === SemanticType.Categories) {\n dialog = new CategoryTaxonomy(element)\n } else {\n throw new TypeError(`Unsupported taxonomy type: ${id}.`)\n }\n dialog.run()\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const { domainElement } = this\n if (!domainElement) {\n return nothing\n }\n return this.renderForm(domainElement)\n }\n\n protected renderForm(model: DomainAssociation): TemplateResult {\n return html`\n <form name=\"association\" @submit=\"${cancelEvent}\" data-key=\"${model.key}\" class=\"modeling-form\">\n ${this.renderMetaInputs(model)} ${this.renderAttributes(model)} ${this.renderTargetEntitySection(model)}\n ${this.renderSchema(model)} ${this.renderDataGovernanceSection(model)}\n </form>\n `\n }\n\n protected renderMetaInputs(model: DomainAssociation): TemplateResult {\n const disabled = !this.canEdit\n const formatError =\n 'Name must start with a letter or underscore and can only contain letters, numbers, and underscores.'\n return html`\n <div class=\"editor-section\">\n <div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"name\"\n .value=\"${live(model.info.name || '')}\"\n label=\"Name\"\n required\n minLength=\"2\"\n maxLength=\"59\"\n pattern=\"[a-zA-Z_][a-zA-Z0-9_]+\"\n .invalidText=\"${formatError}\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleMetaChange}\"\n ></ui-outlined-text-field>\n ${renderHelp('association', 'name-input')}\n </div>\n <div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"displayName\"\n .value=\"${live(model.info.displayName || '')}\"\n label=\"Display name (optional)\"\n @change=\"${this.handleMetaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('association', 'displayName-input')}\n </div>\n <div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"description\"\n .value=\"${live(model.info.description || '')}\"\n label=\"Description (optional)\"\n @change=\"${this.handleMetaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('association', 'description-input')}\n </div>\n </div>\n `\n }\n\n protected renderAttributes(model: DomainAssociation): TemplateResult {\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Attributes</div>\n ${this.renderAttributeOptions(model)}\n </div>`\n }\n\n protected renderAttributeOptions(model: DomainAssociation): TemplateResult {\n const { required = false, multiple = false } = model\n const disabled = !this.canEdit\n return html`<div class=\"checkbox-group\">\n <div class=\"row\">\n <div class=\"input checkbox\">\n <ui-checkbox\n id=\"att-required\"\n .checked=\"${required}\"\n name=\"required\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-required\" class=\"body-medium\">Required</label>\n </div>\n </div>\n ${renderHelp('association', 'required-checkbox')}\n </div>\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-multiple\"\n .checked=\"${multiple}\"\n name=\"multiple\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-multiple\" class=\"body-medium\">Multiple values</label>\n <span class=\"body-small meta\">Creates an array of values.</span>\n </div>\n </div>\n ${renderHelp('association', 'multiple-checkbox')}\n </div>\n </div>`\n }\n\n protected renderSchema(model: DomainAssociation): TemplateResult | typeof nothing {\n const { linked = false } = model.schema || {}\n const disabled = !this.canEdit\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Schema</div>\n <div class=\"row\">\n <div class=\"input\">\n <ui-switch\n .checked=\"${linked}\"\n name=\"linked\"\n id=\"linked\"\n @change=\"${this.handleLinkedChange}\"\n ?disabled=\"${disabled}\"\n ></ui-switch>\n <label for=\"linked\" class=\"body-medium\">Use the reference key to access schema.</label>\n </div>\n ${renderHelp('association', 'linked-switch')}\n </div>\n </div>`\n }\n\n protected renderTargetEntitySection(model: DomainAssociation): TemplateResult {\n return html`<div\n class=\"editor-section\"\n @dragenter=\"${this.handleTargetDragEnter}\"\n @dragover=\"${this.handleTargetDragOver}\"\n @dragleave=\"${this.handleTargetDragLeave}\"\n @drop=\"${this.handleTargetDrop}\"\n >\n <div class=\"section-title title-medium\">Target entity</div>\n ${this.renderChooseTargetButton()} ${this.renderTargetEntities(model)}\n </div>`\n }\n\n /**\n * Renders the section with the current target entity.\n *\n * @todo: The UI only allows to select one target entity.\n * We need to add a way to select multiple target entities.\n */\n protected renderTargetEntities(model: DomainAssociation): TemplateResult | typeof nothing {\n const targets = [...model.listTargets()]\n if (!targets.length) {\n return nothing\n }\n return html`${this.renderTargetItems(targets)} ${targets.length > 1 ? this.renderUnionType(model) : nothing}`\n }\n\n protected renderChooseTargetButton(): TemplateResult {\n const disabled = !this.canEdit\n return html`<div class=\"row\">\n <ui-button color=\"tonal\" type=\"button\" @click=\"${this.handleSelectTarget}\" ?disabled=\"${disabled}\"\n >Choose target entity</ui-button\n >\n ${renderHelp('association', 'target-selector')}\n </div>`\n }\n\n protected renderTargetItems(targets: DomainEntity[]): TemplateResult | typeof nothing {\n if (!targets.length) {\n return nothing\n }\n const disabled = !this.canEdit\n return html`<ui-chip-set>\n ${targets.map((item) => {\n const label = item.info.getLabel()\n return html`<ui-chip\n type=\"input\"\n class=\"target-chip\"\n data-key=\"${item.key}\"\n data-namespace=\"${item.domain.key}\"\n removable\n title=\"Open the association target\"\n aria-label=\"Open the association target ${label}\"\n ?disabled=\"${disabled}\"\n @remove=\"${this.handleDeleteTarget}\"\n @click=\"${this.handleNavigateTarget}\"\n >${label}</ui-chip\n >`\n })}\n </ui-chip-set> `\n }\n\n protected renderUnionType(model: DomainAssociation): TemplateResult {\n const { schema } = model\n const unionType = schema?.unionType || 'anyOf'\n const supportingText = 'Used with multiple entities.'\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Union type\"\n class=\"input\"\n name=\"unionType\"\n .value=\"${unionType}\"\n .supportingText=\"${supportingText}\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleUnionTypeChange}\"\n >\n <ui-option value=\"allOf\">\n <div>All of</div>\n <div slot=\"supporting-text\">Combines all fields into a single schema.</div>\n </ui-option>\n <ui-option value=\"anyOf\">\n <div>Any of (default)</div>\n <div slot=\"supporting-text\">Any of the schemas are valid (separately).</div>\n </ui-option>\n <ui-option value=\"oneOf\">\n <div>One of</div>\n <div slot=\"supporting-text\">Same as Any of, but different validation rules.</div>\n </ui-option>\n </ui-select>\n ${renderHelp('association', 'unionType-select')}\n </div>`\n }\n\n protected renderDataGovernanceSection(model: DomainAssociation): TemplateResult | typeof nothing {\n // TODO: Add classification UI (data tagging)\n const tax = this.renderTaxonomyInput(model)\n if (tax === nothing) {\n return nothing\n }\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Data Governance</div>\n ${tax}\n </div>`\n }\n\n protected renderTaxonomyInput(model: DomainAssociation): TemplateResult | typeof nothing {\n const allCategories = getSemanticsByCategory(SemanticScope.Association)\n const selectedSemantics: AssociationSemantic[] = []\n const filteredCategories: Record<string, AssociationSemantic[]> = {}\n\n // Filter categories and semantics, excluding already selected ones\n for (const category of Object.keys(allCategories)) {\n const semantics = allCategories[category as SemanticCategory].filter((s) => {\n // Check if this semantic is already selected\n if (model.semantics.some((ms) => ms.id === s.id)) {\n selectedSemantics.push(s as AssociationSemantic)\n return false\n }\n return true\n }) as AssociationSemantic[]\n\n if (semantics.length > 0) {\n filteredCategories[category] = semantics\n }\n }\n\n if (Object.keys(filteredCategories).length === 0 && selectedSemantics.length === 0) {\n return nothing\n }\n\n return html`<div class=\"taxonomy\">\n <ui-button\n id=\"taxonomy-menu-anchor\"\n popoverTarget=\"taxonomy-menu\"\n color=\"outlined\"\n aria-label=\"Add association taxonomy\"\n ?disabled=\"${!this.canEdit}\"\n >\n <ui-icon slot=\"icon\">add</ui-icon>Add taxonomy\n </ui-button>\n <ui-menu popover=\"auto\" id=\"taxonomy-menu\" class=\"taxonomy-menu\" @select=\"${this.handleTaxonomySelect}\">\n ${this.renderTaxonomyCategories(filteredCategories)}\n </ui-menu>\n ${renderHelp('association', 'taxonomy-select')}\n </div>\n ${this.renderSelectedSemantics(selectedSemantics)}`\n }\n\n protected renderSelectedSemantics(selected: AssociationSemantic[]): TemplateResult | typeof nothing {\n if (selected.length === 0) {\n return nothing\n }\n const items = selected.map((semantic) => this.renderTaxonomyItem(semantic))\n return html`<div class=\"enabled-taxonomy\">${items}</div>`\n }\n\n protected renderTaxonomyItem(semantic: AssociationSemantic): TemplateResult {\n const canEdit = this.canEdit\n return html`<div class=\"taxonomy-item\">\n <span class=\"label body-large\">${semantic.displayName}</span>\n ${semantic.hasConfig\n ? html`<ui-button\n color=\"text\"\n data-id=\"${semantic.id}\"\n @click=\"${this.handleConfigureTaxonomy}\"\n ?disabled=\"${!canEdit}\"\n >Configure</ui-button\n >`\n : nothing}\n ${canEdit\n ? html`<ui-icon-button\n type=\"button\"\n data-id=\"${semantic.id}\"\n @click=\"${this.handleDeleteTaxonomy}\"\n ?disabled=\"${!canEdit}\"\n ><ui-icon icon=\"deleteOutline\"></ui-icon\n ></ui-icon-button>`\n : nothing}\n </div>`\n }\n\n protected renderTaxonomyCategories(categories: Record<string, AssociationSemantic[]>): TemplateResult[] {\n const items: TemplateResult[] = []\n const entries = Object.entries(categories)\n const cLen = entries.length\n\n entries.forEach(([categoryName, semantics], categoryIndex) => {\n // Add category title as a non-selectable menu item\n items.push(html` <div class=\"menu-category-title title-small\">${categoryName}</div> `)\n\n // Add semantics from this category\n for (const semantic of semantics) {\n items.push(html`\n <ui-menu-item data-value=\"${semantic.id}\" lines=\"two\">\n <div>${semantic.displayName}</div>\n <div slot=\"supporting-text\">${semantic.description}</div>\n </ui-menu-item>\n `)\n }\n\n // Add divider after each category except the last one\n if (categoryIndex < cLen - 1) {\n items.push(html`<ui-divider></ui-divider>`)\n }\n })\n\n return items\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DomainAssociationEditor.js","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainAssociationEditor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAA4C,IAAI,EAAE,MAAM,KAAK,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAEL,sBAAsB,EAEtB,aAAa,EACb,YAAY,GACb,MAAM,wCAAwC,CAAA;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;;sBA+BZ,eAAe;;;;iBAA/C,uBAAwB,SAAQ,WAAe;;;yCAKjE,KAAK,EAAE;YAAC,4LAAiB,aAAa,6BAAb,aAAa,qGAA+B;;;QAA7D,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AC,CAAC,OAAO;WACN,CAAA;QACT,CAAC;QAES,wBAAwB,CAAC,UAAiD;YAClF,MAAM,KAAK,GAAqB,EAAE,CAAA;YAClC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;YAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAA;YAE3B,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,EAAE,aAAa,EAAE,EAAE;gBAC3D,mDAAmD;gBACnD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA,iDAAiD,YAAY,SAAS,CAAC,CAAA;gBAEtF,mCAAmC;gBACnC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;oBACjC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA;sCACe,QAAQ,CAAC,EAAE;mBAC9B,QAAQ,CAAC,WAAW;0CACG,QAAQ,CAAC,WAAW;;SAErD,CAAC,CAAA;gBACJ,CAAC;gBAED,sDAAsD;gBACtD,IAAI,aAAa,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC;oBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA,2BAA2B,CAAC,CAAA;gBAC7C,CAAC;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,KAAK,CAAA;QACd,CAAC;;;;;;;AAzrBH;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AACH,uCA6pBC","sourcesContent":["import { nothing, type TemplateResult, type PropertyValues, html } from 'lit'\nimport { state } from 'lit/decorators.js'\nimport { live } from 'lit/directives/live.js'\nimport { DomainAssociation } from '@api-client/core/modeling/DomainAssociation.js'\nimport { DomainEntityKind } from '@api-client/core/models/kinds.js'\nimport type { DomainEntity } from '@api-client/core/modeling/DomainEntity.js'\nimport { cancelEvent } from '@api-client/core/lib/events/Utils.js'\nimport type { UiCheckboxElement } from '../../md/checkbox/ui-checkbox.js'\nimport { ModelingElement } from './ModelingElement.js'\nimport type { UiSwitchElement } from '../../md/switch/ui-switch.js'\nimport { Events } from '../../events/Events.js'\nimport { renderHelp } from '../../help/render.js'\nimport type { DomainBrowseInit, DomainSelectionInfo } from '../types.js'\nimport {\n type AssociationSemantic,\n getSemanticsByCategory,\n SemanticCategory,\n SemanticScope,\n SemanticType,\n} from '@api-client/core/modeling/Semantics.js'\nimport type { TaxonomyDialog } from '../dialogs/TaxonomyDialog.js'\nimport { TagsTaxonomy } from '../dialogs/TagsTaxonomy.js'\nimport { CategoryTaxonomy } from '../dialogs/CategoryTaxonomy.js'\n\n/**\n * Dispatched when the user wants to navigate to a parent entity.\n *\n * @event DomainAssociationEditor#openentity\n * @type {CustomEvent}\n * @property {object} detail - The event details.\n * @property {string} detail.key - The key of the parent entity to navigate to.\n * @property {string} detail.kind - The kind of the parent entity. It will always be `DomainEntityKind`.\n */\n\n/**\n * Dispatched when the user deletes a property.\n *\n * @event DomainAssociationEditor#delete\n * @type {CustomEvent}\n * @property {object} detail - The event details.\n * @property {string} detail.key - The key of the parent entity to navigate to.\n * @property {string} detail.kind - The kind of the parent entity. It will always be `DomainEntityKind`.\n */\n\n/**\n * An element that specializes in editing properties of a domain association.\n *\n * @fires domainbrowserbrowse - Dispatched when the user clicks on the \"pick\" button. The detail object\n * has the full intent configuration.\n * @fires change - Dispatched when the user changes the value of one of the inputs.\n * @fires DomainAssociationEditor#openentity - A custom event with the `key` and `type` when a property was selected.\n * @fires DomainAssociationEditor#delete - A custom event with the `key` and `type` when a property was selected.\n */\nexport default class DomainAssociationEditor extends ModelingElement {\n /**\n * The `DomainAssociation` object being edited.\n * This is updated when the `selected` property changes.\n */\n @state() private accessor domainElement: DomainAssociation | undefined\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('selected') || cp.has('root') || cp.has('namespace')) {\n this.computeAssociation()\n }\n super.willUpdate(cp)\n }\n\n protected async computeAssociation(): Promise<void> {\n const { root, selected, namespace } = this\n this.domainElement = undefined\n if (!root || !selected) {\n this.domainElement = undefined\n return\n }\n // MD components have issues updating values\n // so we need to wait for the updateComplete to remove them.\n await this.updateComplete\n this.domainElement = root.findAssociation(selected, namespace)\n }\n\n /**\n * Sets the value of one of the \"attribute\" fields.\n * These are the checkboxes located in the \"Attributes\" section.\n *\n * @param name The name of the attribute to set.\n * @param value The boolean option to set as the value.\n * @throws {TypeError} When the passed name is not a valid attribute name.\n * @throws {TypeError} When the passed value is not a boolean value.\n * @fires change - Dispatched when an attribute value is updated.\n */\n setModelAttribute(name: string, value: boolean): void {\n if (!DomainAssociation.isValidAttribute(name)) {\n throw new TypeError(`Invalid attribute name: ${name}.`)\n }\n if (typeof value !== 'boolean') {\n throw new TypeError(`Invalid attribute value: ${value}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n domainElement[name] = value\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * Sets the value of the association's `schema.linked` property.\n * @param value The value to set the `linked` property to.\n */\n setSchemaLinked(value: boolean): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n schema.linked = value\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * A handler for the one of the metadata inputs value change.\n *\n * It supports the following fields:\n *\n * - `name`\n * - `displayName`\n * - `description`\n */\n protected handleMetaChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const node = e.target as HTMLInputElement\n const { name, value } = node\n if (value && !node.reportValidity()) {\n return\n }\n if (!['name', 'displayName', 'description'].includes(name as string)) {\n return\n }\n if (name === 'name' && !value) {\n return\n }\n domainElement.info[name as 'name' | 'description' | 'displayName'] = value\n this.notifyChange()\n }\n\n /**\n * A handler for any of the checkboxes in the `attributes` section.\n * It calls the `setModelAttribute()` method.\n */\n protected handleAttributeOptionChange(e: Event): void {\n const checkbox = e.target as UiCheckboxElement\n const { name = '', checked } = checkbox\n this.setModelAttribute(name, !!checked)\n }\n\n protected handleLinkedChange(e: Event): void {\n const checkbox = e.target as UiSwitchElement\n const { name, checked } = checkbox\n if (name !== 'linked') {\n return\n }\n this.setSchemaLinked(!!checked)\n }\n\n protected async handleSelectTarget(): Promise<void> {\n const domain = this.domainElement?.domain\n if (!domain) {\n throw new Error('Domain is not defined for the domain association.')\n }\n const data: DomainBrowseInit = {\n reason: 'pick',\n domain,\n allowed: [DomainEntityKind],\n withRecent: true,\n }\n const result = await Events.Domain.Browse.browse(data, this)\n if (!result) {\n return\n }\n if (result.result === 'canceled') {\n return\n }\n if (result.kind !== DomainEntityKind) {\n return\n }\n this.addTarget(result.selected, result.domain)\n }\n\n protected handleDeleteTarget(e: Event): void {\n const button = e.target as HTMLButtonElement\n const { key, namespace } = button.dataset\n if (!key || !namespace) {\n return\n }\n const { domainElement, root } = this\n if (!domainElement || !root) {\n return\n }\n let entity: DomainEntity | undefined\n if (root.key === namespace) {\n entity = root.findEntity(key)\n } else {\n // const foreign = root.foreign.find((item) => item.key === namespace)\n // if (!foreign) {\n // throw new Error(`Namespace ${namespace} not found.`)\n // }\n // entity = foreign.findEntity(key)\n throw new Error(`Foreign namespaces are not supported yet.`)\n }\n if (entity) {\n domainElement.removeTarget(entity)\n this.notifyChange()\n this.requestUpdate()\n }\n }\n\n protected handleNavigateTarget(e: Event): void {\n const item = e.currentTarget as HTMLElement\n const { key } = item.dataset\n if (!key) {\n return\n }\n const detail: DomainSelectionInfo = {\n key,\n kind: DomainEntityKind,\n domain: this.root?.key || '',\n }\n this.dispatchEvent(new CustomEvent('openentity', { detail }))\n }\n\n protected handleUnionTypeChange(e: Event): void {\n const select = e.target as HTMLSelectElement\n const { value } = select\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n schema.unionType = value as 'allOf' | 'anyOf' | 'oneOf' | 'not'\n this.notifyChange()\n this.requestUpdate()\n }\n\n protected handleTargetDragEnter(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const hasJsonData = dt.types.includes('application/json')\n if (!hasJsonData) {\n return\n }\n const zone = e.currentTarget as HTMLElement\n zone.classList.add('drop-zone')\n dt.dropEffect = 'link'\n dt.effectAllowed = 'link'\n }\n\n protected handleTargetDragOver(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const hasJsonData = dt.types.includes('application/json')\n if (!hasJsonData) {\n return\n }\n e.preventDefault()\n }\n\n protected handleTargetDragLeave(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const zone = e.currentTarget as HTMLElement\n zone.classList.remove('drop-zone')\n }\n\n protected handleTargetDrop(e: DragEvent): void {\n const dt = e.dataTransfer\n if (!dt) {\n return\n }\n const zone = e.currentTarget as HTMLElement\n zone.classList.remove('drop-zone')\n const raw = dt.getData('application/json')\n const data = JSON.parse(raw) as { items: DomainSelectionInfo[] }\n const entities = data.items.filter((item) => item.kind === DomainEntityKind)\n if (entities.length === 0 || !this.domainElement || !this.root) {\n return\n }\n for (const info of entities) {\n const entity = this.root.findEntity(info.key, info.domain)\n if (!entity) {\n throw new Error(`Entity with key ${info.key} not found in namespace ${info.domain}.`)\n }\n this.domainElement.addTarget(entity)\n }\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * Adds a target entity to the association.\n *\n * @param key The key of the target entity to add.\n * @param nsKey The namespace key of the target entity, if it is in a foreign namespace.\n */\n protected addTarget(key: string, nsKey?: string): void {\n const { domainElement, root } = this\n if (!domainElement || !root) {\n return\n }\n const entity = root.findEntity(key, nsKey)\n if (entity) {\n domainElement.addTarget(entity)\n } else {\n throw new Error(`Entity with key ${key} not found in namespace ${nsKey || root.key}.`)\n }\n this.notifyChange()\n this.requestUpdate()\n }\n\n protected handleDelete(): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const { root } = this\n if (!root) {\n return\n }\n root.removeAssociation(domainElement.key)\n this.dispatchEvent(new CustomEvent('delete', { detail: { key: domainElement.key, kind: domainElement.kind } }))\n }\n\n protected handleDeleteTaxonomy(e: Event): void {\n const button = e.currentTarget as HTMLButtonElement\n const { id } = button.dataset\n if (!id) {\n return\n }\n this.domainElement?.removeSemantic(id as SemanticType)\n }\n\n protected handleTaxonomySelect(e: CustomEvent<{ item: HTMLElement }>): void {\n const { value } = e.detail.item.dataset\n if (value) {\n this.domainElement?.addSemantic({\n id: value as SemanticType,\n })\n this.requestUpdate()\n }\n }\n\n protected handleConfigureTaxonomy(e: Event): void {\n const button = e.currentTarget as HTMLButtonElement\n const { id } = button.dataset\n if (!id) {\n return\n }\n const element = this.domainElement\n if (!element) {\n return\n }\n let dialog: TaxonomyDialog\n if (id === SemanticType.Tags) {\n dialog = new TagsTaxonomy(element)\n } else if (id === SemanticType.Categories) {\n dialog = new CategoryTaxonomy(element)\n } else {\n throw new TypeError(`Unsupported taxonomy type: ${id}.`)\n }\n dialog.run()\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const { domainElement } = this\n if (!domainElement) {\n return nothing\n }\n return this.renderForm(domainElement)\n }\n\n protected renderForm(model: DomainAssociation): TemplateResult {\n return html`\n <form name=\"association\" @submit=\"${cancelEvent}\" data-key=\"${model.key}\" class=\"modeling-form\">\n ${this.renderMetaInputs(model)} ${this.renderAttributes(model)} ${this.renderTargetEntitySection(model)}\n ${this.renderSchema(model)} ${this.renderDataGovernanceSection(model)}\n </form>\n `\n }\n\n protected renderMetaInputs(model: DomainAssociation): TemplateResult {\n const disabled = !this.canEdit\n const formatError =\n 'Name must start with a letter or underscore and can only contain letters, numbers, and underscores.'\n return html`\n <div class=\"editor-section\">\n <div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"name\"\n .value=\"${live(model.info.name || '')}\"\n label=\"Name\"\n required\n minLength=\"2\"\n maxLength=\"59\"\n pattern=\"[a-zA-Z_][a-zA-Z0-9_]+\"\n .invalidText=\"${formatError}\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleMetaChange}\"\n ></ui-outlined-text-field>\n ${renderHelp('association', 'name-input')}\n </div>\n <div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"displayName\"\n .value=\"${live(model.info.displayName || '')}\"\n label=\"Display name (optional)\"\n @change=\"${this.handleMetaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('association', 'displayName-input')}\n </div>\n <div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"description\"\n .value=\"${live(model.info.description || '')}\"\n label=\"Description (optional)\"\n @change=\"${this.handleMetaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('association', 'description-input')}\n </div>\n </div>\n `\n }\n\n protected renderAttributes(model: DomainAssociation): TemplateResult {\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Attributes</div>\n ${this.renderAttributeOptions(model)}\n </div>`\n }\n\n protected renderAttributeOptions(model: DomainAssociation): TemplateResult {\n const { required = false, multiple = false } = model\n const disabled = !this.canEdit\n return html`<div class=\"checkbox-group\">\n <div class=\"row\">\n <div class=\"input checkbox\">\n <ui-checkbox\n id=\"att-required\"\n .checked=\"${required}\"\n name=\"required\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-required\" class=\"body-medium\">Required</label>\n </div>\n </div>\n ${renderHelp('association', 'required-checkbox')}\n </div>\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-multiple\"\n .checked=\"${multiple}\"\n name=\"multiple\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-multiple\" class=\"body-medium\">Multiple values</label>\n <span class=\"body-small meta\">Creates an array of values.</span>\n </div>\n </div>\n ${renderHelp('association', 'multiple-checkbox')}\n </div>\n </div>`\n }\n\n protected renderSchema(model: DomainAssociation): TemplateResult | typeof nothing {\n const { linked = false } = model.schema || {}\n const disabled = !this.canEdit\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Schema</div>\n <div class=\"row\">\n <div class=\"input\">\n <ui-switch\n .checked=\"${linked}\"\n name=\"linked\"\n id=\"linked\"\n @change=\"${this.handleLinkedChange}\"\n ?disabled=\"${disabled}\"\n ></ui-switch>\n <label for=\"linked\" class=\"body-medium\">Use the reference key to access schema.</label>\n </div>\n ${renderHelp('association', 'linked-switch')}\n </div>\n </div>`\n }\n\n protected renderTargetEntitySection(model: DomainAssociation): TemplateResult {\n return html`<div\n class=\"editor-section\"\n @dragenter=\"${this.handleTargetDragEnter}\"\n @dragover=\"${this.handleTargetDragOver}\"\n @dragleave=\"${this.handleTargetDragLeave}\"\n @drop=\"${this.handleTargetDrop}\"\n >\n <div class=\"section-title title-medium\">Target entity</div>\n ${this.renderChooseTargetButton()} ${this.renderTargetEntities(model)}\n </div>`\n }\n\n /**\n * Renders the section with the current target entity.\n *\n * @todo: The UI only allows to select one target entity.\n * We need to add a way to select multiple target entities.\n */\n protected renderTargetEntities(model: DomainAssociation): TemplateResult | typeof nothing {\n const targets = [...model.listTargets()]\n if (!targets.length) {\n return nothing\n }\n return html`${this.renderTargetItems(targets)} ${targets.length > 1 ? this.renderUnionType(model) : nothing}`\n }\n\n protected renderChooseTargetButton(): TemplateResult {\n const disabled = !this.canEdit\n return html`<div class=\"row\">\n <ui-button color=\"tonal\" type=\"button\" @click=\"${this.handleSelectTarget}\" ?disabled=\"${disabled}\"\n >Choose target entity</ui-button\n >\n ${renderHelp('association', 'target-selector')}\n </div>`\n }\n\n protected renderTargetItems(targets: DomainEntity[]): TemplateResult | typeof nothing {\n if (!targets.length) {\n return nothing\n }\n const disabled = !this.canEdit\n return html`<ui-chip-set>\n ${targets.map((item) => {\n const label = item.info.getLabel()\n return html`<ui-chip\n type=\"input\"\n class=\"target-chip\"\n data-key=\"${item.key}\"\n data-namespace=\"${item.domain.key}\"\n removable\n title=\"Open the association target\"\n aria-label=\"Open the association target ${label}\"\n ?disabled=\"${disabled}\"\n @remove=\"${this.handleDeleteTarget}\"\n @click=\"${this.handleNavigateTarget}\"\n >${label}</ui-chip\n >`\n })}\n </ui-chip-set> `\n }\n\n protected renderUnionType(model: DomainAssociation): TemplateResult {\n const { schema } = model\n const unionType = schema?.unionType || 'anyOf'\n const supportingText = 'Used with multiple entities.'\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Union type\"\n class=\"input\"\n name=\"unionType\"\n .value=\"${unionType}\"\n .supportingText=\"${supportingText}\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleUnionTypeChange}\"\n >\n <ui-option value=\"allOf\">\n <div>All of</div>\n <div slot=\"supporting-text\">Combines all fields into a single schema.</div>\n </ui-option>\n <ui-option value=\"anyOf\">\n <div>Any of (default)</div>\n <div slot=\"supporting-text\">Any of the schemas are valid (separately).</div>\n </ui-option>\n <ui-option value=\"oneOf\">\n <div>One of</div>\n <div slot=\"supporting-text\">Same as Any of, but different validation rules.</div>\n </ui-option>\n </ui-select>\n ${renderHelp('association', 'unionType-select')}\n </div>`\n }\n\n protected renderDataGovernanceSection(model: DomainAssociation): TemplateResult | typeof nothing {\n // TODO: Add classification UI (data tagging)\n const tax = this.renderTaxonomyInput(model)\n if (tax === nothing) {\n return nothing\n }\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Data Governance</div>\n ${tax}\n </div>`\n }\n\n protected renderTaxonomyInput(model: DomainAssociation): TemplateResult | typeof nothing {\n const allCategories = getSemanticsByCategory(SemanticScope.Association)\n const selectedSemantics: AssociationSemantic[] = []\n const filteredCategories: Record<string, AssociationSemantic[]> = {}\n\n // Filter categories and semantics, excluding already selected ones\n for (const category of Object.keys(allCategories)) {\n const semantics = allCategories[category as SemanticCategory].filter((s) => {\n // Check if this semantic is already selected\n if (model.semantics.some((ms) => ms.id === s.id)) {\n selectedSemantics.push(s as AssociationSemantic)\n return false\n }\n return true\n }) as AssociationSemantic[]\n\n if (semantics.length > 0) {\n filteredCategories[category] = semantics\n }\n }\n\n if (Object.keys(filteredCategories).length === 0 && selectedSemantics.length === 0) {\n return nothing\n }\n\n return html`<div class=\"taxonomy\">\n <ui-button\n id=\"taxonomy-menu-anchor\"\n popoverTarget=\"taxonomy-menu\"\n color=\"outlined\"\n aria-label=\"Add association taxonomy\"\n ?disabled=\"${!this.canEdit}\"\n >\n <ui-icon slot=\"icon\">add</ui-icon>Add taxonomy\n </ui-button>\n <ui-menu popover=\"auto\" id=\"taxonomy-menu\" class=\"taxonomy-menu\" @select=\"${this.handleTaxonomySelect}\">\n ${this.renderTaxonomyCategories(filteredCategories)}\n </ui-menu>\n ${renderHelp('association', 'taxonomy-select')}\n </div>\n ${this.renderSelectedSemantics(selectedSemantics)}`\n }\n\n protected renderSelectedSemantics(selected: AssociationSemantic[]): TemplateResult | typeof nothing {\n if (selected.length === 0) {\n return nothing\n }\n const items = selected.map((semantic) => this.renderTaxonomyItem(semantic))\n return html`<div class=\"enabled-taxonomy\">${items}</div>`\n }\n\n protected renderTaxonomyItem(semantic: AssociationSemantic): TemplateResult {\n const canEdit = this.canEdit\n return html`<div class=\"taxonomy-item\">\n <span class=\"label body-large\">${semantic.displayName}</span>\n ${semantic.hasConfig\n ? html`<ui-button\n color=\"text\"\n data-id=\"${semantic.id}\"\n @click=\"${this.handleConfigureTaxonomy}\"\n ?disabled=\"${!canEdit}\"\n >Configure</ui-button\n >`\n : nothing}\n ${canEdit\n ? html`<ui-icon-button\n type=\"button\"\n data-id=\"${semantic.id}\"\n @click=\"${this.handleDeleteTaxonomy}\"\n ?disabled=\"${!canEdit}\"\n ><ui-icon icon=\"deleteOutline\"></ui-icon\n ></ui-icon-button>`\n : nothing}\n </div>`\n }\n\n protected renderTaxonomyCategories(categories: Record<string, AssociationSemantic[]>): TemplateResult[] {\n const items: TemplateResult[] = []\n const entries = Object.entries(categories)\n const cLen = entries.length\n\n entries.forEach(([categoryName, semantics], categoryIndex) => {\n // Add category title as a non-selectable menu item\n items.push(html` <div class=\"menu-category-title title-small\">${categoryName}</div> `)\n\n // Add semantics from this category\n for (const semantic of semantics) {\n items.push(html`\n <ui-menu-item data-value=\"${semantic.id}\" lines=\"two\">\n <div>${semantic.displayName}</div>\n <div slot=\"supporting-text\">${semantic.description}</div>\n </ui-menu-item>\n `)\n }\n\n // Add divider after each category except the last one\n if (categoryIndex < cLen - 1) {\n items.push(html`<ui-divider></ui-divider>`)\n }\n })\n\n return items\n }\n}\n"]}
|
|
@@ -28,6 +28,9 @@ import type { UiListSelection } from '../../md/list/ui-list.js';
|
|
|
28
28
|
* An element that provides an editor interface for a domain entity.
|
|
29
29
|
* @fires DomainEntityEditor#select - A custom event with the `key` and `type` when a property was selected.
|
|
30
30
|
* @fires DomainEntityEditor#openentity - A custom event with the `key` and `type` when a property was selected.
|
|
31
|
+
* @fires domainbrowserbrowse - Dispatched when the user clicks on the "choose parent" button. The detail object
|
|
32
|
+
* has the full intent configuration.
|
|
33
|
+
* @fires domainrename - Dispatched when the user renames the entity.
|
|
31
34
|
*/
|
|
32
35
|
export default class DomainEntityEditor extends ModelingElement {
|
|
33
36
|
protected domainElement: DomainEntity | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainEntityEditor.d.ts","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainEntityEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAK7E,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AAIxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAItD,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,wCAAwC,CAAA;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAG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hE,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc;IAKrE,SAAS,CAAC,uBAAuB,IAAI,cAAc;IASnD,SAAS,CAAC,yBAAyB,IAAI,cAAc;IAerD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc;IAYlE,SAAS,CAAC,oBAAoB,IAAI,cAAc;IAmChD,SAAS,CAAC,sBAAsB,IAAI,cAAc;IAUlD,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc;IAQ/D,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,GAAG,cAAc;IAgB/E,SAAS,CAAC,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,GAAG,cAAc;IAiE7F,SAAS,CAAC,2BAA2B,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc;IAU1E,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc,GAAG,OAAO,OAAO;IA8EnF,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,cAAc,GAAG,OAAO,OAAO;IAQ9F,SAAS,CAAC,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc;IAmBtE,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,GAAG,cAAc,EAAE;CA2BnG"}
|
|
@@ -281,7 +281,7 @@ let DomainEntityEditor = (() => {
|
|
|
281
281
|
allowed: [DomainEntityKind],
|
|
282
282
|
withRecent: true,
|
|
283
283
|
};
|
|
284
|
-
const result = await Events.Domain.Browse.browse(data);
|
|
284
|
+
const result = await Events.Domain.Browse.browse(data, this);
|
|
285
285
|
if (!result) {
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
@@ -1178,6 +1178,9 @@ let DomainEntityEditor = (() => {
|
|
|
1178
1178
|
* An element that provides an editor interface for a domain entity.
|
|
1179
1179
|
* @fires DomainEntityEditor#select - A custom event with the `key` and `type` when a property was selected.
|
|
1180
1180
|
* @fires DomainEntityEditor#openentity - A custom event with the `key` and `type` when a property was selected.
|
|
1181
|
+
* @fires domainbrowserbrowse - Dispatched when the user clicks on the "choose parent" button. The detail object
|
|
1182
|
+
* has the full intent configuration.
|
|
1183
|
+
* @fires domainrename - Dispatched when the user renames the entity.
|
|
1181
1184
|
*/
|
|
1182
1185
|
export default DomainEntityEditor;
|
|
1183
1186
|
//# sourceMappingURL=DomainEntityEditor.js.map
|