@api-client/ui 0.6.8 → 0.6.10

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.
Files changed (37) hide show
  1. package/build/src/md/button/internals/group.styles.d.ts.map +1 -1
  2. package/build/src/md/button/internals/group.styles.js +1 -0
  3. package/build/src/md/button/internals/group.styles.js.map +1 -1
  4. package/build/src/modeling/dialogs/CountryTaxonomy.d.ts +24 -0
  5. package/build/src/modeling/dialogs/CountryTaxonomy.d.ts.map +1 -0
  6. package/build/src/modeling/dialogs/CountryTaxonomy.js +174 -0
  7. package/build/src/modeling/dialogs/CountryTaxonomy.js.map +1 -0
  8. package/build/src/modeling/dialogs/PostalCodeTaxonomy.d.ts +24 -0
  9. package/build/src/modeling/dialogs/PostalCodeTaxonomy.d.ts.map +1 -0
  10. package/build/src/modeling/dialogs/PostalCodeTaxonomy.js +167 -0
  11. package/build/src/modeling/dialogs/PostalCodeTaxonomy.js.map +1 -0
  12. package/build/src/modeling/domain-template-browser.d.ts.map +1 -1
  13. package/build/src/modeling/domain-template-browser.js +2 -1
  14. package/build/src/modeling/domain-template-browser.js.map +1 -1
  15. package/build/src/modeling/internals/DomainAutoFieldsDialog.d.ts.map +1 -1
  16. package/build/src/modeling/internals/DomainAutoFieldsDialog.js +30 -0
  17. package/build/src/modeling/internals/DomainAutoFieldsDialog.js.map +1 -1
  18. package/build/src/modeling/internals/DomainPropertyEditor.d.ts.map +1 -1
  19. package/build/src/modeling/internals/DomainPropertyEditor.js +8 -0
  20. package/build/src/modeling/internals/DomainPropertyEditor.js.map +1 -1
  21. package/build/src/modeling/internals/DomainTemplateBrowser.d.ts +10 -6
  22. package/build/src/modeling/internals/DomainTemplateBrowser.d.ts.map +1 -1
  23. package/build/src/modeling/internals/DomainTemplateBrowser.js +75 -8
  24. package/build/src/modeling/internals/DomainTemplateBrowser.js.map +1 -1
  25. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.d.ts.map +1 -1
  26. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.js +12 -0
  27. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.js.map +1 -1
  28. package/build/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +2 -1
  30. package/src/md/button/internals/group.styles.ts +1 -0
  31. package/src/modeling/dialogs/CountryTaxonomy.ts +176 -0
  32. package/src/modeling/dialogs/PostalCodeTaxonomy.ts +169 -0
  33. package/src/modeling/domain-template-browser.ts +2 -1
  34. package/src/modeling/internals/DomainAutoFieldsDialog.ts +30 -0
  35. package/src/modeling/internals/DomainPropertyEditor.ts +6 -0
  36. package/src/modeling/internals/DomainTemplateBrowser.ts +87 -18
  37. package/src/modeling/internals/styles/DomainTemplateBrowser.styles.ts +12 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DomainAutoFieldsDialog.js","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainAutoFieldsDialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;;sBAUF,UAAU;;;;iBAAzC,sBAAuB,SAAQ,WAAU;;;0CAI3D,KAAK,EAAE;YAAC,+LAAS,cAAc,6BAAd,cAAc,uGAAoB;;;QAA3C,yFAA0B,IAAI,GAAG,EAAU;QAEpD;;WAEG;UAJiD;QAHpD;;WAEG;QACM,IAAS,cAAc,oDAAoB;QAA3C,IAAS,cAAc,0DAAoB;QAEpD;;WAEG;QACc,UAAU,gEAAwB;YACjD;gBACE,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE;oBACN;wBACE,EAAE,EAAE,IAAI;wBACR,IAAI,EAAE,YAAY;wBAClB,WAAW,EAAE,gCAAgC;qBAC9C;oBACD;wBACE,EAAE,EAAE,MAAM;wBACV,IA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AAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;;;;2CAIhC,IAAI,CAAC,YAAY;;;;;uBAKrC,aAAa,KAAK,CAAC;oBACtB,IAAI,CAAC,iBAAiB;;0BAEhB,aAAa;;;KAGlC,CAAA;QACH,CAAC;QAED;;WAEG;QACK,cAAc,CAAC,QAA2B;YAChD,OAAO,IAAI,CAAA;iDACkC,QAAQ,CAAC,IAAI;QACtD,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KAC1D,CAAA;QACH,CAAC;QAED;;WAEG;QACK,WAAW,CAAC,KAA0B;YAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;YACpD,MAAM,OAAO,GAAG;gBACd,YAAY,EAAE,IAAI;gBAClB,UAAU,EAAE,UAAU;aACvB,CAAA;YAED,OAAO,IAAI,CAAA;8CAC+B,KAAK,CAAC,EAAE,YAAY,QAAQ,CAAC,OAAO,CAAC;8CACrC,UAAU;6BAC3B,KAAK,CAAC,IAAI;sCACD,KAAK,CAAC,WAAW;;KAElD,CAAA;QACH,CAAC;;;AA3QH;;;;;GAKG;AACH,sCAsQC","sourcesContent":["import { html, type TemplateResult } from 'lit'\nimport { state } from 'lit/decorators.js'\nimport { LitElement } from 'lit'\nimport { classMap } from 'lit/directives/class-map.js'\nimport type { UiListSelection } from '../../md/list/ui-list.js'\nimport type { AutoFieldCategory, AutoFieldDefinition, AutoFieldsSelectionResult } from '../types.js'\n\n/**\n * A component for selecting \"auto fields\" to add to an entity.\n *\n * @fires select - Dispatched when fields are selected with AutoFieldsSelectionResult detail\n * @fires cancel - Dispatched when the user cancels the selection\n */\nexport default class DomainAutoFieldsDialog extends LitElement {\n /**\n * The currently selected field IDs\n */\n @state() accessor selectedFields = new Set<string>()\n\n /**\n * The auto field categories and definitions\n */\n private readonly categories: AutoFieldCategory[] = [\n {\n name: 'Core Fields',\n fields: [\n {\n id: 'id',\n name: 'Identifier',\n description: 'The unique ID for each record.',\n },\n {\n id: 'name',\n name: 'Name',\n description: 'A human-readable name for the record.',\n },\n {\n id: 'display-name',\n name: 'Display Name',\n description: 'A user-friendly label for UI presentation.',\n },\n {\n id: 'description',\n name: 'Description',\n description: 'A detailed description of the record with support for markdown.',\n },\n {\n id: 'public-unique-name',\n name: 'Public Unique Name (Slug)',\n description: 'A URL-friendly unique identifier (e.g., \"my-product\").',\n },\n ],\n },\n {\n name: 'User Information',\n fields: [\n {\n id: 'email',\n name: 'Email Address',\n description: 'Email address with verification support.',\n },\n {\n id: 'role',\n name: 'User Role',\n description: 'Defines the access level or permissions for a user.',\n },\n {\n id: 'first-name',\n name: 'First Name',\n description: 'The first name of a person.',\n },\n {\n id: 'last-name',\n name: 'Last Name',\n description: 'The last name of a person.',\n },\n {\n id: 'phone',\n name: 'Phone Number',\n description: 'Phone number with international format support.',\n },\n {\n id: 'avatar-url',\n name: 'Avatar URL',\n description: 'URL to a profile picture or avatar image.',\n },\n ],\n },\n {\n name: 'Lifecycle & Status',\n fields: [\n {\n id: 'status',\n name: 'Status',\n description: 'The current state of the record (e.g., Active, Draft, Archived).',\n },\n {\n id: 'version',\n name: 'Version Number',\n description: 'Tracks changes to prevent editing conflicts.',\n },\n {\n id: 'owner',\n name: 'Owner',\n description: 'Reference to the user or team that owns this record.',\n },\n ],\n },\n {\n name: 'E-commerce',\n fields: [\n {\n id: 'price',\n name: 'Price',\n description: 'Product price with currency support.',\n },\n {\n id: 'unit-price',\n name: 'Unit Price',\n description: 'Price per unit with currency support.',\n },\n {\n id: 'sku',\n name: 'SKU',\n description: 'Stock Keeping Unit - unique product identifier.',\n },\n {\n id: 'quantity',\n name: 'Quantity',\n description: 'Available quantity or stock amount.',\n },\n {\n id: 'weight',\n name: 'Weight',\n description: 'Physical weight of the item.',\n },\n {\n id: 'images',\n name: 'Images',\n description: 'Multiple image URLs for the product.',\n },\n ],\n },\n {\n name: 'Audit Trail',\n fields: [\n {\n id: 'created',\n name: 'Created At',\n description: 'The date and time when the record was created.',\n },\n {\n id: 'updated',\n name: 'Updated At',\n description: 'The date and time when the record was last updated.',\n },\n {\n id: 'updated-by',\n name: 'Updated By',\n description: 'Reference to the user who last updated the record.',\n },\n ],\n },\n {\n name: 'Soft Delete',\n fields: [\n {\n id: 'is-deleted',\n name: 'Is Deleted',\n description: 'A true/false flag indicating if the record is deleted.',\n },\n {\n id: 'deleted',\n name: 'Deleted At',\n description: 'The date and time when the record was deleted.',\n },\n ],\n },\n ]\n\n /**\n * Resets the selection\n */\n reset(): void {\n this.selectedFields.clear()\n this.requestUpdate()\n }\n\n /**\n * Handles field selection toggle\n */\n private handleFieldToggle(fieldId: string): void {\n if (this.selectedFields.has(fieldId)) {\n this.selectedFields.delete(fieldId)\n } else {\n this.selectedFields.add(fieldId)\n }\n this.requestUpdate()\n }\n\n private handleFieldSelect(e: CustomEvent<UiListSelection>): void {\n const { item } = e.detail\n const { id } = item.dataset\n if (!id) return\n this.handleFieldToggle(id)\n }\n\n /**\n * Handles the Add Selected button click\n */\n private handleAddSelected(): void {\n const result: AutoFieldsSelectionResult = {\n selectedFields: Array.from(this.selectedFields),\n }\n this.dispatchEvent(new CustomEvent('select', { detail: result }))\n }\n\n /**\n * Handles the Cancel button click\n */\n private handleCancel(): void {\n this.dispatchEvent(new CustomEvent('cancel'))\n }\n\n override render(): TemplateResult {\n const selectedCount = this.selectedFields.size\n\n return html`\n <ui-list class=\"list\" @select=\"${this.handleFieldSelect}\"\n >${this.categories.map((category) => this.renderCategory(category))}</ui-list\n >\n\n <div class=\"dialog-actions\">\n <ui-button type=\"button\" @click=\"${this.handleCancel}\" class=\"cancel\">Cancel</ui-button>\n <ui-button\n type=\"button\"\n class=\"save\"\n color=\"filled\"\n ?disabled=\"${selectedCount === 0}\"\n @click=\"${this.handleAddSelected}\"\n >\n Add Selected (${selectedCount})\n </ui-button>\n </div>\n `\n }\n\n /**\n * Renders a category section\n */\n private renderCategory(category: AutoFieldCategory): TemplateResult {\n return html`\n <div class=\"category-title title-medium\">${category.name}</div>\n ${category.fields.map((field) => this.renderField(field))}\n `\n }\n\n /**\n * Renders a field item\n */\n private renderField(field: AutoFieldDefinition): TemplateResult {\n const isSelected = this.selectedFields.has(field.id)\n const classes = {\n 'field-item': true,\n 'selected': isSelected,\n }\n\n return html`\n <ui-list-item image=\"avatar\" data-id=\"${field.id}\" class=\"${classMap(classes)}\" lines=\"two\">\n <ui-checkbox slot=\"start\" .checked=\"${isSelected}\"></ui-checkbox>\n <div class=\"label\">${field.name}</div>\n <div slot=\"supporting-text\">${field.description}</div>\n </ui-list-item>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"DomainAutoFieldsDialog.js","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainAutoFieldsDialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;;sBAUF,UAAU;;;;iBAAzC,sBAAuB,SAAQ,WAAU;;;0CAI3D,KAAK,EAAE;YAAC,+LAAS,cAAc,6BAAd,cAAc,uGAAoB;;;QAA3C,yFAA0B,IAAI,GAAG,EAAU;QAEpD;;WAEG;UAJiD;QAHpD;;WAEG;QACM,IAAS,cAAc,oDAAoB;QAA3C,IAAS,cAAc,0DAAoB;QAEpD;;WAEG;QACc,UAAU,gEAAwB;YACjD;gBACE,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE;oBACN;wBACE,EAAE,EAAE,IAAI;wBACR,IAAI,EAAE,YAAY;wBAClB,WAAW,EAAE,gCAAgC;qBAC9C;oBACD;wBACE,EAAE,EAAE,MAAM;wBACV,IAAI,EAAE,MAAM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;sCACD,KAAK,CAAC,WAAW;;KAElD,CAAA;QACH,CAAC;;;AAzSH;;;;;GAKG;AACH,sCAoSC","sourcesContent":["import { html, type TemplateResult } from 'lit'\nimport { state } from 'lit/decorators.js'\nimport { LitElement } from 'lit'\nimport { classMap } from 'lit/directives/class-map.js'\nimport type { UiListSelection } from '../../md/list/ui-list.js'\nimport type { AutoFieldCategory, AutoFieldDefinition, AutoFieldsSelectionResult } from '../types.js'\n\n/**\n * A component for selecting \"auto fields\" to add to an entity.\n *\n * @fires select - Dispatched when fields are selected with AutoFieldsSelectionResult detail\n * @fires cancel - Dispatched when the user cancels the selection\n */\nexport default class DomainAutoFieldsDialog extends LitElement {\n /**\n * The currently selected field IDs\n */\n @state() accessor selectedFields = new Set<string>()\n\n /**\n * The auto field categories and definitions\n */\n private readonly categories: AutoFieldCategory[] = [\n {\n name: 'Core Fields',\n fields: [\n {\n id: 'id',\n name: 'Identifier',\n description: 'The unique ID for each record.',\n },\n {\n id: 'name',\n name: 'Name',\n description: 'A human-readable name for the record.',\n },\n {\n id: 'display-name',\n name: 'Display Name',\n description: 'A user-friendly label for UI presentation.',\n },\n {\n id: 'description',\n name: 'Description',\n description: 'A detailed description of the record with support for markdown.',\n },\n {\n id: 'public-unique-name',\n name: 'Public Unique Name (Slug)',\n description: 'A URL-friendly unique identifier (e.g., \"my-product\").',\n },\n ],\n },\n {\n name: 'User Information',\n fields: [\n {\n id: 'email',\n name: 'Email Address',\n description: 'Email address with verification support.',\n },\n {\n id: 'role',\n name: 'User Role',\n description: 'Defines the access level or permissions for a user.',\n },\n {\n id: 'first-name',\n name: 'First Name',\n description: 'The first name of a person.',\n },\n {\n id: 'last-name',\n name: 'Last Name',\n description: 'The last name of a person.',\n },\n {\n id: 'phone',\n name: 'Phone Number',\n description: 'Phone number with international format support.',\n },\n {\n id: 'avatar-url',\n name: 'Avatar URL',\n description: 'URL to a profile picture or avatar image.',\n },\n ],\n },\n {\n name: 'Contact & Address',\n fields: [\n {\n id: 'street-address',\n name: 'Street Address',\n description: 'The street address.',\n },\n {\n id: 'city',\n name: 'City',\n description: 'The city.',\n },\n {\n id: 'region',\n name: 'Region',\n description: 'The region/state/province.',\n },\n {\n id: 'postal-code',\n name: 'Postal/Zip Code',\n description: 'The international postal/zip code.',\n },\n {\n id: 'country',\n name: 'Country',\n description: 'The country.',\n },\n ],\n },\n {\n name: 'Lifecycle & Status',\n fields: [\n {\n id: 'status',\n name: 'Status',\n description: 'The current state of the record (e.g., Active, Draft, Archived).',\n },\n {\n id: 'version',\n name: 'Version Number',\n description: 'Tracks changes to prevent editing conflicts.',\n },\n {\n id: 'owner',\n name: 'Owner',\n description: 'Reference to the user or team that owns this record.',\n },\n ],\n },\n {\n name: 'E-commerce',\n fields: [\n {\n id: 'price',\n name: 'Price',\n description: 'Product price with currency support.',\n },\n {\n id: 'unit-price',\n name: 'Unit Price',\n description: 'Price per unit with currency support.',\n },\n {\n id: 'sku',\n name: 'SKU',\n description: 'Stock Keeping Unit - unique product identifier.',\n },\n {\n id: 'quantity',\n name: 'Quantity',\n description: 'Available quantity or stock amount.',\n },\n {\n id: 'weight',\n name: 'Weight',\n description: 'Physical weight of the item.',\n },\n {\n id: 'images',\n name: 'Images',\n description: 'Multiple image URLs for the product.',\n },\n ],\n },\n {\n name: 'Audit Trail',\n fields: [\n {\n id: 'created',\n name: 'Created At',\n description: 'The date and time when the record was created.',\n },\n {\n id: 'updated',\n name: 'Updated At',\n description: 'The date and time when the record was last updated.',\n },\n {\n id: 'updated-by',\n name: 'Updated By',\n description: 'Reference to the user who last updated the record.',\n },\n ],\n },\n {\n name: 'Soft Delete',\n fields: [\n {\n id: 'is-deleted',\n name: 'Is Deleted',\n description: 'A true/false flag indicating if the record is deleted.',\n },\n {\n id: 'deleted',\n name: 'Deleted At',\n description: 'The date and time when the record was deleted.',\n },\n ],\n },\n ]\n\n /**\n * Resets the selection\n */\n reset(): void {\n this.selectedFields.clear()\n this.requestUpdate()\n }\n\n /**\n * Handles field selection toggle\n */\n private handleFieldToggle(fieldId: string): void {\n if (this.selectedFields.has(fieldId)) {\n this.selectedFields.delete(fieldId)\n } else {\n this.selectedFields.add(fieldId)\n }\n this.requestUpdate()\n }\n\n private handleFieldSelect(e: CustomEvent<UiListSelection>): void {\n const { item } = e.detail\n const { id } = item.dataset\n if (!id) return\n this.handleFieldToggle(id)\n }\n\n /**\n * Handles the Add Selected button click\n */\n private handleAddSelected(): void {\n const result: AutoFieldsSelectionResult = {\n selectedFields: Array.from(this.selectedFields),\n }\n this.dispatchEvent(new CustomEvent('select', { detail: result }))\n }\n\n /**\n * Handles the Cancel button click\n */\n private handleCancel(): void {\n this.dispatchEvent(new CustomEvent('cancel'))\n }\n\n override render(): TemplateResult {\n const selectedCount = this.selectedFields.size\n\n return html`\n <ui-list class=\"list\" @select=\"${this.handleFieldSelect}\"\n >${this.categories.map((category) => this.renderCategory(category))}</ui-list\n >\n\n <div class=\"dialog-actions\">\n <ui-button type=\"button\" @click=\"${this.handleCancel}\" class=\"cancel\">Cancel</ui-button>\n <ui-button\n type=\"button\"\n class=\"save\"\n color=\"filled\"\n ?disabled=\"${selectedCount === 0}\"\n @click=\"${this.handleAddSelected}\"\n >\n Add Selected (${selectedCount})\n </ui-button>\n </div>\n `\n }\n\n /**\n * Renders a category section\n */\n private renderCategory(category: AutoFieldCategory): TemplateResult {\n return html`\n <div class=\"category-title title-medium\">${category.name}</div>\n ${category.fields.map((field) => this.renderField(field))}\n `\n }\n\n /**\n * Renders a field item\n */\n private renderField(field: AutoFieldDefinition): TemplateResult {\n const isSelected = this.selectedFields.has(field.id)\n const classes = {\n 'field-item': true,\n 'selected': isSelected,\n }\n\n return html`\n <ui-list-item image=\"avatar\" data-id=\"${field.id}\" class=\"${classMap(classes)}\" lines=\"two\">\n <ui-checkbox slot=\"start\" .checked=\"${isSelected}\"></ui-checkbox>\n <div class=\"label\">${field.name}</div>\n <div slot=\"supporting-text\">${field.description}</div>\n </ui-list-item>\n `\n }\n}\n"]}
@@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,EAAE,gBAAgB,GAAG,cAAc;IAyBxE,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,GAAG,cAAc,EAAE;CA2BrG"}
@@ -22,6 +22,8 @@ import { UrlTaxonomy } from '../dialogs/UrlTaxonomy.js';
22
22
  import { PublicUniqueNameTaxonomy } from '../dialogs/PublicUniqueNameTaxonomy.js';
23
23
  import { GeospatialCoordinatesTaxonomy } from '../dialogs/GeospatialCoordinatesTaxonomy.js';
24
24
  import { CalculatedTaxonomy } from '../dialogs/CalculatedTaxonomy.js';
25
+ import { PostalCodeTaxonomy } from '../dialogs/PostalCodeTaxonomy.js';
26
+ import { CountryTaxonomy } from '../dialogs/CountryTaxonomy.js';
25
27
  let DomainPropertyEditor = (() => {
26
28
  let _classSuper = ModelingElement;
27
29
  let _domainElement_decorators;
@@ -640,6 +642,12 @@ let DomainPropertyEditor = (() => {
640
642
  else if (id === SemanticType.Calculated) {
641
643
  dialog = new CalculatedTaxonomy(element);
642
644
  }
645
+ else if (id === SemanticType.PostalCode) {
646
+ dialog = new PostalCodeTaxonomy(element);
647
+ }
648
+ else if (id === SemanticType.Country) {
649
+ dialog = new CountryTaxonomy(element);
650
+ }
643
651
  else {
644
652
  throw new TypeError(`Unsupported taxonomy type: ${id}.`);
645
653
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DomainPropertyEditor.js","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainPropertyEditor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC7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YACH,CAAC,CAAC,CAAA;YAEF,OAAO,KAAK,CAAA;QACd,CAAC;;;AA97CH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oCAs5CC","sourcesContent":["import { nothing, html, type PropertyValues, type TemplateResult } from 'lit'\nimport { state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { live } from 'lit/directives/live.js'\nimport type { UiCheckboxElement } from '../../md/checkbox/ui-checkbox.js'\nimport { getFormatInfo, getPropertyInputOptions } from '../lib/ui_mapping.js'\nimport { DomainProperty } from '@api-client/core/modeling/DomainProperty.js'\nimport { cancelEvent } from '@api-client/core/lib/events/Utils.js'\nimport { BinaryFormats, type DomainPropertyFormat, NumberFormats } from '@api-client/core/modeling/DataFormat.js'\nimport {\n PropertySemantic,\n SemanticCategory,\n SemanticScope,\n SemanticType,\n getSemanticsByCategory,\n} from '@api-client/core/modeling/Semantics.js'\nimport { ModelingElement } from './ModelingElement.js'\nimport type { DomainPropertyInputConfig } from '../types.js'\nimport { renderHelp } from '../../help/render.js'\nimport type { TaxonomyDialog } from '../dialogs/TaxonomyDialog.js'\nimport { PasswordTaxonomy } from '../dialogs/PasswordTaxonomy.js'\nimport { MarkdownTaxonomy } from '../dialogs/MarkdownTaxonomy.js'\nimport { HtmlTaxonomy } from '../dialogs/HtmlTaxonomy.js'\nimport { CurrencyTaxonomy } from '../dialogs/CurrencyTaxonomy.js'\nimport { StatusTaxonomy } from '../dialogs/StatusTaxonomy.js'\nimport { SkuTaxonomy } from '../dialogs/SkuTaxonomy.js'\nimport { EmailTaxonomy } from '../dialogs/EmailTaxonomy.js'\nimport { PhoneTaxonomy } from '../dialogs/PhoneTaxonomy.js'\nimport { UrlTaxonomy } from '../dialogs/UrlTaxonomy.js'\nimport { PublicUniqueNameTaxonomy } from '../dialogs/PublicUniqueNameTaxonomy.js'\nimport { GeospatialCoordinatesTaxonomy } from '../dialogs/GeospatialCoordinatesTaxonomy.js'\nimport { CalculatedTaxonomy } from '../dialogs/CalculatedTaxonomy.js'\nimport type { UiSelectElement } from '../../md/select/ui-select.js'\n\n/**\n * Dispatched when the user deletes a property.\n *\n * @event DomainPropertyEditor#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 * `DomainPropertyEditor` is a LitElement-based web component that provides a user interface for editing\n * properties of a `DomainProperty` object. It allows users to modify various aspects of a data property,\n * including its metadata, attributes, schema, and enum values.\n *\n * ## Features\n *\n * - **Metadata Editing**: Allows editing of the property's name, display name, and description.\n * - **Attribute Management**: Provides controls for setting data type, format, and other attributes\n * like `required`, `multiple`, `primary`, `index`, and `readOnly`.\n * - **Schema Definition**: Enables defining the schema for the property, including default values\n * and enum values.\n * - **Enum Editor**: Supports enabling and disabling an enum editor for predefined values, with\n * options to add, update, and delete enum values.\n * - **Default Value Setting**: Allows setting a default value for the property, either as a literal\n * value or a function.\n * - **Data Type and Format Selection**: Provides dropdowns for selecting the data type and format\n * of the property.\n * - **Validation**: Includes input validation to ensure data integrity.\n * - **Change Notification**: Dispatches a `change` event whenever a property is modified.\n *\n * ## Usage\n *\n * The `DomainPropertyEditor` is typically used within a larger application that manages data models.\n *\n * ```html\n * <domain-property-editor .root=\"${this.domainNamespace}\" selected=\"property-key\"></domain-property-editor>\n * ```\n *\n * @fires DomainPropertyEditor#delete - A custom event with the `key` and `type` when a property was selected.\n */\nexport default class DomainPropertyEditor extends ModelingElement {\n /**\n * The `DomainProperty` object being edited.\n * This is updated when the `selected` property changes.\n */\n @state() private accessor domainElement: DomainProperty | undefined\n /**\n * Indicates whether the default value input field is visible.\n * This is set to `true` when the user selects the \"Literal\" option in the default value select.\n */\n @state() private accessor hasDefaultValueInput = false\n /**\n * Whether the enum options are enabled.\n * When `true` the user can add, update, and delete enum values.\n */\n @state() private accessor enumEnabled = false\n\n /**\n * A fields that holds in memory enum values after disabling the enum editor.\n * When that happens the values are removed from the model but kept in memory.\n * As long as the property stays the same, the user can reopen the enum editor\n * and restore the previous value.\n */\n protected cachedEnumValues: string[] | undefined\n /**\n * A cached value of the schema-sensitive input configuration.\n * These are the default value and enum value inputs.\n */\n protected cachedSchemaInputConfig?: DomainPropertyInputConfig\n\n /**\n * A configuration for a schema-sensitive HTML input.\n */\n get schemaInputConfig(): DomainPropertyInputConfig {\n return this.cachedSchemaInputConfig || { type: 'text' }\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('selected') || cp.has('root') || cp.has('namespace')) {\n this.computeProperty()\n }\n super.willUpdate(cp)\n }\n\n protected async computeProperty(): Promise<void> {\n const { root, selected, namespace } = this\n this.domainElement = undefined\n if (!root || !selected) {\n return\n }\n await this.updateComplete\n const value = root.findProperty(selected, namespace)\n this.domainElement = value\n const schema = value?.ensureSchema()\n if (schema && schema.defaultValue) {\n this.hasDefaultValueInput = schema.defaultValue.type === 'literal'\n } else {\n this.hasDefaultValueInput = false\n }\n if (schema && schema.enum) {\n this.enumEnabled = true\n } else {\n this.enumEnabled = false\n }\n this.cachedEnumValues = undefined\n this.updateSchemaInputConfig()\n }\n\n /**\n * Toggles the state of the enum editor.\n *\n * If the editor was disabled, it enables it and vice-versa.\n *\n * It ensures the property has the schema and then:\n * - When enabling:\n * - If `cachedEnumValues` is set it restores them.\n * - Otherwise it sets the default enum value `['']`\n * - When disabling:\n * - It sets the `cachedEnumValues` to the current enum value.\n * - Removes the enum from the model\n * - Requests the model update.\n *\n * @fires change - Dispatched when the enum editor state changes.\n */\n toggleEnum(): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n this.enumEnabled = !this.enumEnabled\n const schema = domainElement.ensureSchema()\n if (!this.enumEnabled) {\n this.cachedEnumValues = schema.enum\n schema.enum = undefined\n } else if (this.cachedEnumValues) {\n schema.enum = this.cachedEnumValues || ['']\n this.cachedEnumValues = undefined\n } else {\n schema.enum = ['']\n }\n this.requestUpdate()\n this.notifyChange()\n }\n\n /**\n * Updates an enum value.\n *\n * @param index The index at which to update the value.\n * @param value The value to set. Empty string is acceptable. The type is determined by the property type.\n * @throws {RangeError} When the index is out of bounds.\n * @throws {TypeError} When the value is not a string.\n * @fires change - Dispatched when the enum value is updated.\n */\n updateEnum(index: number, value: string): void {\n if (index < 0) {\n throw new RangeError(`Enum array index cannot be negative.`)\n }\n if (typeof value !== 'string') {\n throw new TypeError(`Expected a string for the enum value, got ${typeof value}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (!schema.enum) {\n schema.enum = [value]\n } else {\n if (schema.enum.length - 1 < index) {\n throw new RangeError(`Invalid enum array index: ${index}.`)\n }\n schema.enum[index] = value\n }\n this.notifyChange()\n }\n\n /**\n * Adds a new enum value to the property.\n *\n * @param value The value to add. Defaults to an empty string.\n * @throws {TypeError} When the value is not a string.\n * @fires change - Dispatched when a new enum value is added.\n */\n addEnum(value = ''): void {\n if (typeof value !== 'string') {\n throw new TypeError(`Expected a string for the enum value, got ${typeof value}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (!schema.enum) {\n schema.enum = [value]\n } else {\n schema.enum.push(value)\n }\n this.requestUpdate()\n // this should be immediately propagated to other clients.\n this.notifyChange()\n }\n\n /**\n * Deletes an enum value at a position.\n *\n * @param index The index at which to delete an enum property.\n * @throws {RangeError} When the index is out of bounds.\n * @fires change - Dispatched when an enum value is deleted.\n */\n deleteEnum(index: number): void {\n if (index < 0) {\n throw new RangeError(`Enum array index cannot be negative.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (!schema.enum) {\n return\n }\n if (schema.enum.length - 1 < index) {\n throw new RangeError(`Invalid enum array index: ${index}.`)\n }\n schema.enum.splice(index, 1)\n this.requestUpdate()\n this.notifyChange()\n }\n\n /**\n * Sets a new defaultValue on the property schema.\n *\n * @param value The default value to set. Empty to remove.\n * @param type The type of the value.\n * @param dataType Optional data type to set. Defaults to string. Only used with `type` equal `literal`.\n * @fires change - Dispatched when the default value is updated.\n */\n setDefaultValue(value?: string, type: 'function' | 'literal' = 'function'): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (value === schema.defaultValue?.value) {\n return\n }\n if (value || (type === 'literal' && value === '')) {\n schema.defaultValue = {\n type,\n value: value,\n }\n } else {\n delete schema.defaultValue\n }\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * Updates the property's data type.\n *\n * It sets the `format` for `number`, `datetime`, and `binary` data types.\n *\n * @param value The value to set.\n * @throws {TypeError} When the passed value is not a valid data type.\n * @fires change - Dispatched when the data type is updated.\n */\n setDataType(value: string): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n if (!DomainProperty.isValidType(value)) {\n throw new TypeError(`Invalid data type: ${value}.`)\n }\n domainElement.type = value\n const binding = domainElement.getWebBinding()\n if (value === 'number') {\n binding.format = 'int64'\n } else if (value === 'binary') {\n binding.format = 'base64'\n } else {\n binding.format = undefined\n }\n this.notifyChange()\n this.requestUpdate()\n this.updateSchemaInputConfig()\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 (!DomainProperty.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 `format` value on the model.\n *\n * @param format The format value to set.\n * @throws {TypeError} When the passed format value is not supported.\n * @fires change - Dispatched when the format value is updated.\n */\n setFormat(format?: string): void {\n if (!DomainProperty.isValidFormat(format)) {\n throw new TypeError(`Invalid format value: ${format}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const binding = domainElement.getWebBinding()\n if (binding.format === format) {\n return\n }\n binding.format = format\n this.requestUpdate()\n this.notifyChange()\n this.updateSchemaInputConfig()\n }\n\n /**\n * Sets an example value on the schema.\n * @param value The value to set. Removes the examples array if not set.\n */\n setExampleValue(value?: string): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n // @TODO: Eventually, support multiple examples\n const schema = domainElement.ensureSchema()\n if (value) {\n schema.examples = [value]\n } else {\n delete schema.examples\n }\n this.requestUpdate()\n this.notifyChange()\n }\n\n /**\n * A method to be called when a schema property changes.\n * It caches the schema-sensitive input configuration.\n */\n protected updateSchemaInputConfig(): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n this.cachedSchemaInputConfig = getPropertyInputOptions(domainElement)\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 * - `literalDefaultValue`\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 protected handleSchemaChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const node = e.target as HTMLInputElement\n const { name, value, checked } = node\n if ((value || checked) && !node.reportValidity()) {\n return\n }\n if (name === 'literalDefaultValue') {\n this.setDefaultValue(value, 'literal')\n return\n }\n if (['minimum', 'maximum', 'multipleOf'].includes(name as string)) {\n const schema = domainElement.ensureSchema()\n schema[name as 'minimum' | 'maximum' | 'multipleOf'] = Number(value) || undefined\n } else if (['exclusiveMinimum', 'exclusiveMaximum'].includes(name as string)) {\n const schema = domainElement.ensureSchema()\n schema[name as 'exclusiveMinimum' | 'exclusiveMaximum'] = checked\n }\n this.updateSchemaInputConfig()\n this.notifyChange()\n }\n\n /**\n * A handler for the data type select input change\n */\n protected handleDataTypeChange(e: Event): void {\n const select = e.target as UiSelectElement\n const { value, name } = select\n if (name !== 'datatype' || !value) {\n return\n }\n this.setDataType(value)\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 /**\n * A handler for the default value select input change.\n * Depending on the selected options it calls the `setDefaultValue()`\n * with appropriate arguments.\n */\n protected handleDefaultValueChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const select = e.target as UiSelectElement\n const { value = '' } = select\n if (!value) {\n this.setDefaultValue()\n this.hasDefaultValueInput = false\n return\n }\n if (value.startsWith('function.')) {\n const fName = value.substring(9)\n this.setDefaultValue(fName, 'function')\n this.hasDefaultValueInput = false\n return\n }\n if (value.startsWith('literal.')) {\n const setValue = value.substring(8)\n this.setDefaultValue(setValue, 'literal')\n this.hasDefaultValueInput = false\n return\n }\n if (value === 'literal') {\n this.hasDefaultValueInput = true\n this.setDefaultValue('', 'literal')\n }\n }\n\n /**\n * A handler for the format select input change.\n * Calls the `setFormat()` with the appropriate value.\n */\n protected handleFormatChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const select = e.target as UiSelectElement\n const { value } = select\n this.setFormat(value)\n }\n\n /**\n * Handles the toggle button for the enum editor.\n * It calls the toggleEnum() whenever activated.\n */\n protected handleEnumOptionChange(): void {\n this.toggleEnum()\n }\n\n /**\n * A handler for the enum input change.\n * It calls the `updateEnum()` method\n */\n protected handleEnumChange(e: Event): void {\n const input = e.target as HTMLInputElement\n if (!input.reportValidity()) {\n return\n }\n const { value, dataset } = input\n const index = Number(dataset.index)\n if (isNaN(index)) {\n return\n }\n this.updateEnum(index, value)\n }\n\n /**\n * A handler for the add enum button.\n */\n protected handleAddEnum(): void {\n this.addEnum()\n }\n\n /**\n * A handler for the delete enum value button click.\n */\n protected handleDeleteEnum(e: Event): void {\n const button = e.currentTarget as HTMLElement\n const { dataset } = button\n const index = Number(dataset.index)\n if (isNaN(index)) {\n return\n }\n this.deleteEnum(index)\n }\n\n /**\n * Handles a change on the example input.\n */\n protected handleExampleChange(e: Event): void {\n const node = e.target as HTMLInputElement\n const { name, value } = node\n if (value && !node.reportValidity()) {\n return\n }\n if (name !== 'example') {\n return\n }\n this.setExampleValue(value)\n }\n\n // protected handleTaxonomyChange(e: Event): void {\n // const node = e.currentTarget as MdOutlinedSelect\n // const { value } = node\n // if (!value) {\n // return\n // }\n // node.displayText = ''\n // this.domainElement?.addSemantic({\n // id: value as SemanticType,\n // })\n // this.requestUpdate()\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.Password) {\n dialog = new PasswordTaxonomy(element)\n } else if (id === SemanticType.Markdown) {\n dialog = new MarkdownTaxonomy(element)\n } else if (id === SemanticType.HTML) {\n dialog = new HtmlTaxonomy(element)\n } else if (id === SemanticType.Status) {\n dialog = new StatusTaxonomy(element)\n } else if (id === SemanticType.Currency) {\n dialog = new CurrencyTaxonomy(element)\n } else if (id === SemanticType.SKU) {\n dialog = new SkuTaxonomy(element)\n } else if (id === SemanticType.Email) {\n dialog = new EmailTaxonomy(element)\n } else if (id === SemanticType.Phone) {\n dialog = new PhoneTaxonomy(element)\n } else if (id === SemanticType.URL) {\n dialog = new UrlTaxonomy(element)\n } else if (id === SemanticType.PublicUniqueName) {\n dialog = new PublicUniqueNameTaxonomy(element)\n } else if (id === SemanticType.GeospatialCoordinates) {\n dialog = new GeospatialCoordinatesTaxonomy(element)\n } else if (id === SemanticType.Calculated) {\n dialog = new CalculatedTaxonomy(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: DomainProperty): TemplateResult {\n return html`\n <form name=\"property\" @submit=\"${cancelEvent}\" data-key=\"${model.key}\" class=\"modeling-form\">\n ${this.renderMetaInputs(model)} ${this.renderAttributes(model)} ${this.renderSchema(model)}\n ${this.renderDataGovernanceSection(model)}\n </form>\n `\n }\n\n protected renderMetaInputs(model: DomainProperty): 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('property', '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 ?disabled=\"${disabled}\"\n @change=\"${this.handleMetaChange}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', '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 ?disabled=\"${disabled}\"\n @change=\"${this.handleMetaChange}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'description-input')}\n </div>\n </div>\n `\n }\n\n protected renderAttributes(model: DomainProperty): TemplateResult {\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Attributes</div>\n ${this.renderDataTypeInput(model)} ${this.renderFormat(model)} ${this.renderAttributeOptions(model)}\n </div>`\n }\n\n protected renderTaxonomy(): TemplateResult {\n return html`<div class=\"editor-section\"></div>`\n }\n\n protected renderSchema(model: DomainProperty): TemplateResult | typeof nothing {\n if (model.type === 'binary') {\n return nothing\n }\n let content: (TemplateResult | typeof nothing)[] | typeof nothing\n switch (model.type) {\n case 'string':\n content = this.renderStringSchema(model)\n break\n case 'number':\n content = this.renderNumberSchema(model)\n break\n case 'boolean':\n content = this.renderBooleanSchema(model)\n break\n case 'date':\n content = this.renderDateSchema(model)\n break\n case 'time':\n content = this.renderTimeSchema(model)\n break\n case 'datetime':\n content = this.renderDateTimeSchema(model)\n break\n // case 'binary':\n // content = this.renderBinarySchema(model)\n // break\n default:\n content = nothing\n }\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Schema</div>\n ${content}\n </div>`\n }\n\n protected renderDataTypeInput(model: DomainProperty): TemplateResult {\n const disabled = !this.canEdit\n const { type } = model\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Data Type\"\n class=\"input\"\n required\n name=\"datatype\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleDataTypeChange}\"\n >\n <ui-option ?selected=\"${type === 'string'}\" value=\"string\">\n <div>String</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'number'}\" value=\"number\">\n <div>Number</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'boolean'}\" value=\"boolean\">\n <div>Boolean</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'date'}\" value=\"date\">\n <div>Date</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'time'}\" value=\"time\">\n <div>Time</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'datetime'}\" value=\"datetime\">\n <div>Date and time</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'binary'}\" value=\"binary\">\n <div>Binary</div>\n </ui-option>\n </ui-select>\n ${renderHelp('property', 'datatype-select')}\n </div>`\n }\n\n protected renderAttributeOptions(model: DomainProperty): TemplateResult {\n const { primary = false, index = false, required = false, multiple = false, readOnly = false } = model\n const disabled = !this.canEdit\n return html`<div class=\"checkbox-group\">\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-identifier\"\n .checked=\"${primary}\"\n name=\"primary\"\n @change=\"${this.handleAttributeOptionChange}\"\n ?disabled=\"${disabled}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-identifier\" class=\"body-medium\">Identifier</label>\n <span class=\"body-small meta\">The primary key in the data store.</span>\n </div>\n </div>\n ${renderHelp('property', 'primary-checkbox')}\n </div>\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-index\"\n .checked=\"${index}\"\n name=\"index\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-index\" class=\"body-medium\">Search field</label>\n <span class=\"body-small meta\">Marks this field as index and enables searching on it.</span>\n </div>\n </div>\n ${renderHelp('property', 'index-checkbox')}\n </div>\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('property', '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('property', 'multiple-checkbox')}\n </div>\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-readOnly\"\n .checked=\"${readOnly}\"\n name=\"readOnly\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-readOnly\" class=\"body-medium\">Read only</label>\n <span class=\"body-small meta\">The value can only be set when object is created.</span>\n </div>\n </div>\n ${renderHelp('property', 'readOnly-checkbox')}\n </div>\n </div>`\n }\n\n protected renderStringSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderEnumEditor(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderNumberSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderMultipleOfInput(model),\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderEnumEditor(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderBooleanSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [this.renderDefaultValueInput(model)]\n }\n\n protected renderDateSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderTimeSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderDateTimeSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n /**\n * Renders the input for the default value.\n *\n * Note, when defining a new function, add support for it generation in the\n * `src/modeling/value_generator.ts` file.\n */\n protected renderDefaultValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n const { type } = model\n // || type === 'any' || type === 'nil'\n if (type === 'binary') {\n return nothing\n }\n const schema = model.schema || {}\n const { defaultValue } = schema\n let isNone = true\n let isLiteral = false\n if (defaultValue) {\n if (defaultValue.type === 'literal') {\n isNone = false\n isLiteral = true\n } else if (defaultValue.value) {\n isNone = false\n }\n }\n\n let allowLiteral = false\n const options: TemplateResult[] = [\n html`<ui-option ?selected=\"${isNone}\" value=\"\">\n <div>None</div>\n </ui-option>`,\n html`<ui-divider></ui-divider>`,\n ]\n if (type === 'string') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'random'}\" value=\"function.random\">\n <div>Random string</div>\n <div slot=\"supporting-text\">Generates a random string.</div>\n </ui-option>`\n )\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'uuid-v4'}\" value=\"function.uuid-v4\">\n <div>UUID</div>\n <div slot=\"supporting-text\">Random UUID v4 value.</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'number') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'incremental'}\" value=\"function.incremental\">\n <div>Incremental</div>\n <div slot=\"supporting-text\">Increments the value with each new object.</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'boolean') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'false'}\" value=\"literal.false\">\n <div>FALSE</div>\n </ui-option>`\n )\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'true'}\" value=\"literal.true\">\n <div>TRUE</div>\n </ui-option>`\n )\n } else if (type === 'date') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'now'}\" value=\"function.now\">\n <div>Current date</div>\n <div slot=\"supporting-text\">YYYY-MM-DD format</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'time') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'now'}\" value=\"function.now\">\n <div>Current time</div>\n <div slot=\"supporting-text\">HH:mm:ss format.</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'datetime') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'now'}\" value=\"function.now\">\n <div>Current date and time</div>\n <div slot=\"supporting-text\">YYYY-MM-DDTHH:mm:ss format.</div>\n </ui-option>`\n )\n allowLiteral = true\n }\n\n if (allowLiteral) {\n // options.push(html`<ui-divider></ui-divider>`)\n options.push(\n html`<ui-option ?selected=\"${isLiteral}\" value=\"literal\">\n <div>Literal</div>\n <div slot=\"supporting-text\">Enter custom value.</div>\n </ui-option>`\n )\n }\n const disabled = !this.canEdit\n const supportingText = 'Used when creating the object.'\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Default value\"\n class=\"input\"\n name=\"defaultValue\"\n .supportingText=\"${supportingText}\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleDefaultValueChange}\"\n >\n ${options}\n </ui-select>\n ${renderHelp('property', 'defaultValue-select')}\n </div>`\n }\n\n protected renderLiteralDefaultValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n if (!this.hasDefaultValueInput) {\n return nothing\n }\n const schema = model.schema || {}\n const { defaultValue } = schema\n const currentValue = defaultValue?.value || ''\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"literalDefaultValue\"\n .value=\"${live(currentValue)}\"\n label=\"Literal value\"\n required\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || ''}\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'literalDefaultValue-input')}\n </div>`\n }\n\n protected renderFormat(model: DomainProperty): TemplateResult | typeof nothing {\n const { type } = model\n if (type === 'number') {\n return this.renderFormatInput(model, NumberFormats)\n }\n if (type === 'binary') {\n return this.renderFormatInput(model, BinaryFormats)\n }\n return nothing\n }\n\n protected renderFormatInput(model: DomainProperty, formats: DomainPropertyFormat[]): TemplateResult {\n const binding = model.getWebBinding()\n const options = formats.map((format) => {\n const info = getFormatInfo(format)\n return html`<ui-option ?selected=\"${format === binding.format}\" value=\"${format}\">\n <div>${info.label}</div>\n <div slot=\"supporting-text\">${info.help}</div>\n </ui-option>`\n })\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Format\"\n class=\"input\"\n name=\"format\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleFormatChange}\"\n >\n ${options}\n </ui-select>\n ${renderHelp('property', 'format-select')}\n </div>`\n }\n\n /**\n * Renders the enum editing editor section.\n */\n protected renderEnumEditor(model: DomainProperty): TemplateResult {\n return html`<div class=\"row\">${this.renderEnumToggle()} ${renderHelp('property', 'enumValues-switch')}</div>\n ${this.renderEnumValues(model)} ${this.renderAddEnumButton()}`\n }\n\n /**\n * Renders the enum toggle button.\n */\n protected renderEnumToggle(): TemplateResult {\n const disabled = !this.canEdit\n return html`<div class=\"input enum\">\n <ui-switch\n .checked=\"${this.enumEnabled}\"\n id=\"enumValues\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleEnumOptionChange}\"\n ></ui-switch>\n <label for=\"enumValues\" class=\"body-medium\">Pre-defined values (enum)</label>\n </div>`\n }\n\n /**\n * Renders the list of enum inputs or nothing when not required.\n */\n protected renderEnumValues(model: DomainProperty): TemplateResult[] | typeof nothing {\n if (!this.enumEnabled) {\n return nothing\n }\n const schema = model.schema || {}\n // We use the default value to render the first input when no enum was set.\n const { enum: enumValues = [''] } = schema\n if (!enumValues.length) {\n return nothing\n }\n return enumValues.map((value, index) => this.renderEnumItem(value, index))\n }\n\n /**\n * Renders the text field to edit an enum value.\n * @param value The enum value to render in the input\n * @param index The enum's index in the enum array.\n */\n protected renderEnumItem(value: string, index: number): TemplateResult {\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"enum-input row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"enum\"\n .value=\"${live(value)}\"\n label=\"Value\"\n data-index=\"${index}\"\n @change=\"${this.handleEnumChange}\"\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n ?disabled=\"${disabled}\"\n .supportingText=\"${info.help || ''}\"\n ></ui-outlined-text-field>\n <ui-icon-button type=\"button\" data-index=\"${index}\" @click=\"${this.handleDeleteEnum}\"\n ><ui-icon icon=\"deleteOutline\"></ui-icon\n ></ui-icon-button>\n </div>`\n }\n\n /**\n * Renders the \"add\" value value button.\n */\n protected renderAddEnumButton(): TemplateResult | typeof nothing {\n if (!this.enumEnabled || !this.canEdit) {\n return nothing\n }\n return html`<div class=\"enum-input row\">\n <ui-button color=\"outlined\" @click=\"${this.handleAddEnum}\">\n <ui-icon slot=\"icon\" icon=\"add\"></ui-icon>Add\n </ui-button>\n </div>`\n }\n\n protected renderExampleValueInput(model: DomainProperty): TemplateResult {\n const schema = model.schema || {}\n const { examples = [] } = schema\n const [example = ''] = examples\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"example\"\n .value=\"${live(example)}\"\n label=\"Example value\"\n @change=\"${this.handleExampleChange}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || 'Used with documentation.'}\"\n .type=\"${info.type}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'example-input')}\n </div>`\n }\n\n protected renderMinimumValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { minimum } = schema\n let label = 'Minimum length'\n if (model.type === 'number') {\n label = 'Minimum value'\n } else if (model.type === 'date' || model.type === 'datetime') {\n label = 'Minimum date'\n } else if (model.type === 'time') {\n label = 'Minimum time'\n }\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"minimum\"\n .value=\"${live((minimum as unknown as string) ?? '')}\"\n label=\"${label}\"\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || ''}\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'schema:minimum-input')}\n </div>`\n }\n\n protected renderExclusiveMinimumInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { exclusiveMinimum = false } = schema\n const disabled = !this.canEdit\n return html`<div class=\"checkbox row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"exclusive-minimum\"\n .checked=\"${exclusiveMinimum}\"\n name=\"exclusiveMinimum\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"exclusive-minimum\" class=\"body-medium\">Exclude minimum value</label>\n <span class=\"body-small meta\">The value must be greater than, but not equal to, the minimum.</span>\n </div>\n </div>\n ${renderHelp('property', 'schema:exclusive-minimum-checkbox')}\n </div>`\n }\n\n protected renderExclusiveMaximumInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { exclusiveMaximum } = schema\n const disabled = !this.canEdit\n return html`<div class=\"checkbox row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"exclusive-maximum\"\n .checked=\"${exclusiveMaximum || false}\"\n name=\"exclusiveMaximum\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"exclusive-maximum\" class=\"body-medium\">Exclude maximum value</label>\n <span class=\"body-small meta\">The value must be less than, but not equal to, the maximum.</span>\n </div>\n </div>\n ${renderHelp('property', 'schema:exclusive-maximum-checkbox')}\n </div>`\n }\n\n protected renderMaximumValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { maximum } = schema\n let label = 'Maximum length'\n if (model.type === 'number') {\n label = 'Maximum value'\n } else if (model.type === 'date' || model.type === 'datetime') {\n label = 'Maximum date'\n } else if (model.type === 'time') {\n label = 'Maximum time'\n }\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"maximum\"\n .value=\"${live((maximum as unknown as string) ?? '')}\"\n label=\"${label}\"\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || ''}\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'schema:maximum-input')}\n </div>`\n }\n\n protected renderMultipleOfInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { multipleOf } = schema\n const disabled = !this.canEdit\n const supportingText = 'The number must be divisible by this value. E.g., 2 for even numbers.'\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"multipleOf\"\n .value=\"${live((multipleOf as unknown as string) || '')}\"\n label=\"Value increment\"\n .supportingText=\"${supportingText}\"\n type=\"number\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'schema:multipleOf-input')}\n </div>`\n }\n\n protected renderDataGovernanceSection(model: DomainProperty): 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: DomainProperty): TemplateResult | typeof nothing {\n const allCategories = getSemanticsByCategory(SemanticScope.Property)\n const selectedSemantics: PropertySemantic[] = []\n const filteredCategories: Record<string, PropertySemantic[]> = {}\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 if (s.applicableDataTypes && !s.applicableDataTypes.includes(model.type)) {\n return false\n }\n // Check if this semantic is already selected\n if (model.semantics.some((ms) => ms.id === s.id)) {\n selectedSemantics.push(s as PropertySemantic)\n return false\n }\n return true\n }) as PropertySemantic[]\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 property 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('property', 'taxonomy-select')}\n </div>\n ${this.renderSelectedSemantics(selectedSemantics)}`\n }\n\n protected renderSelectedSemantics(selected: PropertySemantic[]): 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: PropertySemantic): 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, PropertySemantic[]>): 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":"DomainPropertyEditor.js","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainPropertyEditor.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAA;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAClE,OAAO,EAAE,aAAa,EAA6B,aAAa,EAAE,MAAM,yCAAyC,CAAA;AACjH,OAAO,EAGL,aAAa,EACb,YAAY,EACZ,sBAAsB,GACvB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA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} from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { live } from 'lit/directives/live.js'\nimport type { UiCheckboxElement } from '../../md/checkbox/ui-checkbox.js'\nimport { getFormatInfo, getPropertyInputOptions } from '../lib/ui_mapping.js'\nimport { DomainProperty } from '@api-client/core/modeling/DomainProperty.js'\nimport { cancelEvent } from '@api-client/core/lib/events/Utils.js'\nimport { BinaryFormats, type DomainPropertyFormat, NumberFormats } from '@api-client/core/modeling/DataFormat.js'\nimport {\n PropertySemantic,\n SemanticCategory,\n SemanticScope,\n SemanticType,\n getSemanticsByCategory,\n} from '@api-client/core/modeling/Semantics.js'\nimport { ModelingElement } from './ModelingElement.js'\nimport type { DomainPropertyInputConfig } from '../types.js'\nimport { renderHelp } from '../../help/render.js'\nimport type { TaxonomyDialog } from '../dialogs/TaxonomyDialog.js'\nimport { PasswordTaxonomy } from '../dialogs/PasswordTaxonomy.js'\nimport { MarkdownTaxonomy } from '../dialogs/MarkdownTaxonomy.js'\nimport { HtmlTaxonomy } from '../dialogs/HtmlTaxonomy.js'\nimport { CurrencyTaxonomy } from '../dialogs/CurrencyTaxonomy.js'\nimport { StatusTaxonomy } from '../dialogs/StatusTaxonomy.js'\nimport { SkuTaxonomy } from '../dialogs/SkuTaxonomy.js'\nimport { EmailTaxonomy } from '../dialogs/EmailTaxonomy.js'\nimport { PhoneTaxonomy } from '../dialogs/PhoneTaxonomy.js'\nimport { UrlTaxonomy } from '../dialogs/UrlTaxonomy.js'\nimport { PublicUniqueNameTaxonomy } from '../dialogs/PublicUniqueNameTaxonomy.js'\nimport { GeospatialCoordinatesTaxonomy } from '../dialogs/GeospatialCoordinatesTaxonomy.js'\nimport { CalculatedTaxonomy } from '../dialogs/CalculatedTaxonomy.js'\nimport { PostalCodeTaxonomy } from '../dialogs/PostalCodeTaxonomy.js'\nimport { CountryTaxonomy } from '../dialogs/CountryTaxonomy.js'\nimport type { UiSelectElement } from '../../md/select/ui-select.js'\n\n/**\n * Dispatched when the user deletes a property.\n *\n * @event DomainPropertyEditor#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 * `DomainPropertyEditor` is a LitElement-based web component that provides a user interface for editing\n * properties of a `DomainProperty` object. It allows users to modify various aspects of a data property,\n * including its metadata, attributes, schema, and enum values.\n *\n * ## Features\n *\n * - **Metadata Editing**: Allows editing of the property's name, display name, and description.\n * - **Attribute Management**: Provides controls for setting data type, format, and other attributes\n * like `required`, `multiple`, `primary`, `index`, and `readOnly`.\n * - **Schema Definition**: Enables defining the schema for the property, including default values\n * and enum values.\n * - **Enum Editor**: Supports enabling and disabling an enum editor for predefined values, with\n * options to add, update, and delete enum values.\n * - **Default Value Setting**: Allows setting a default value for the property, either as a literal\n * value or a function.\n * - **Data Type and Format Selection**: Provides dropdowns for selecting the data type and format\n * of the property.\n * - **Validation**: Includes input validation to ensure data integrity.\n * - **Change Notification**: Dispatches a `change` event whenever a property is modified.\n *\n * ## Usage\n *\n * The `DomainPropertyEditor` is typically used within a larger application that manages data models.\n *\n * ```html\n * <domain-property-editor .root=\"${this.domainNamespace}\" selected=\"property-key\"></domain-property-editor>\n * ```\n *\n * @fires DomainPropertyEditor#delete - A custom event with the `key` and `type` when a property was selected.\n */\nexport default class DomainPropertyEditor extends ModelingElement {\n /**\n * The `DomainProperty` object being edited.\n * This is updated when the `selected` property changes.\n */\n @state() private accessor domainElement: DomainProperty | undefined\n /**\n * Indicates whether the default value input field is visible.\n * This is set to `true` when the user selects the \"Literal\" option in the default value select.\n */\n @state() private accessor hasDefaultValueInput = false\n /**\n * Whether the enum options are enabled.\n * When `true` the user can add, update, and delete enum values.\n */\n @state() private accessor enumEnabled = false\n\n /**\n * A fields that holds in memory enum values after disabling the enum editor.\n * When that happens the values are removed from the model but kept in memory.\n * As long as the property stays the same, the user can reopen the enum editor\n * and restore the previous value.\n */\n protected cachedEnumValues: string[] | undefined\n /**\n * A cached value of the schema-sensitive input configuration.\n * These are the default value and enum value inputs.\n */\n protected cachedSchemaInputConfig?: DomainPropertyInputConfig\n\n /**\n * A configuration for a schema-sensitive HTML input.\n */\n get schemaInputConfig(): DomainPropertyInputConfig {\n return this.cachedSchemaInputConfig || { type: 'text' }\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('selected') || cp.has('root') || cp.has('namespace')) {\n this.computeProperty()\n }\n super.willUpdate(cp)\n }\n\n protected async computeProperty(): Promise<void> {\n const { root, selected, namespace } = this\n this.domainElement = undefined\n if (!root || !selected) {\n return\n }\n await this.updateComplete\n const value = root.findProperty(selected, namespace)\n this.domainElement = value\n const schema = value?.ensureSchema()\n if (schema && schema.defaultValue) {\n this.hasDefaultValueInput = schema.defaultValue.type === 'literal'\n } else {\n this.hasDefaultValueInput = false\n }\n if (schema && schema.enum) {\n this.enumEnabled = true\n } else {\n this.enumEnabled = false\n }\n this.cachedEnumValues = undefined\n this.updateSchemaInputConfig()\n }\n\n /**\n * Toggles the state of the enum editor.\n *\n * If the editor was disabled, it enables it and vice-versa.\n *\n * It ensures the property has the schema and then:\n * - When enabling:\n * - If `cachedEnumValues` is set it restores them.\n * - Otherwise it sets the default enum value `['']`\n * - When disabling:\n * - It sets the `cachedEnumValues` to the current enum value.\n * - Removes the enum from the model\n * - Requests the model update.\n *\n * @fires change - Dispatched when the enum editor state changes.\n */\n toggleEnum(): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n this.enumEnabled = !this.enumEnabled\n const schema = domainElement.ensureSchema()\n if (!this.enumEnabled) {\n this.cachedEnumValues = schema.enum\n schema.enum = undefined\n } else if (this.cachedEnumValues) {\n schema.enum = this.cachedEnumValues || ['']\n this.cachedEnumValues = undefined\n } else {\n schema.enum = ['']\n }\n this.requestUpdate()\n this.notifyChange()\n }\n\n /**\n * Updates an enum value.\n *\n * @param index The index at which to update the value.\n * @param value The value to set. Empty string is acceptable. The type is determined by the property type.\n * @throws {RangeError} When the index is out of bounds.\n * @throws {TypeError} When the value is not a string.\n * @fires change - Dispatched when the enum value is updated.\n */\n updateEnum(index: number, value: string): void {\n if (index < 0) {\n throw new RangeError(`Enum array index cannot be negative.`)\n }\n if (typeof value !== 'string') {\n throw new TypeError(`Expected a string for the enum value, got ${typeof value}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (!schema.enum) {\n schema.enum = [value]\n } else {\n if (schema.enum.length - 1 < index) {\n throw new RangeError(`Invalid enum array index: ${index}.`)\n }\n schema.enum[index] = value\n }\n this.notifyChange()\n }\n\n /**\n * Adds a new enum value to the property.\n *\n * @param value The value to add. Defaults to an empty string.\n * @throws {TypeError} When the value is not a string.\n * @fires change - Dispatched when a new enum value is added.\n */\n addEnum(value = ''): void {\n if (typeof value !== 'string') {\n throw new TypeError(`Expected a string for the enum value, got ${typeof value}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (!schema.enum) {\n schema.enum = [value]\n } else {\n schema.enum.push(value)\n }\n this.requestUpdate()\n // this should be immediately propagated to other clients.\n this.notifyChange()\n }\n\n /**\n * Deletes an enum value at a position.\n *\n * @param index The index at which to delete an enum property.\n * @throws {RangeError} When the index is out of bounds.\n * @fires change - Dispatched when an enum value is deleted.\n */\n deleteEnum(index: number): void {\n if (index < 0) {\n throw new RangeError(`Enum array index cannot be negative.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (!schema.enum) {\n return\n }\n if (schema.enum.length - 1 < index) {\n throw new RangeError(`Invalid enum array index: ${index}.`)\n }\n schema.enum.splice(index, 1)\n this.requestUpdate()\n this.notifyChange()\n }\n\n /**\n * Sets a new defaultValue on the property schema.\n *\n * @param value The default value to set. Empty to remove.\n * @param type The type of the value.\n * @param dataType Optional data type to set. Defaults to string. Only used with `type` equal `literal`.\n * @fires change - Dispatched when the default value is updated.\n */\n setDefaultValue(value?: string, type: 'function' | 'literal' = 'function'): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const schema = domainElement.ensureSchema()\n if (value === schema.defaultValue?.value) {\n return\n }\n if (value || (type === 'literal' && value === '')) {\n schema.defaultValue = {\n type,\n value: value,\n }\n } else {\n delete schema.defaultValue\n }\n this.notifyChange()\n this.requestUpdate()\n }\n\n /**\n * Updates the property's data type.\n *\n * It sets the `format` for `number`, `datetime`, and `binary` data types.\n *\n * @param value The value to set.\n * @throws {TypeError} When the passed value is not a valid data type.\n * @fires change - Dispatched when the data type is updated.\n */\n setDataType(value: string): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n if (!DomainProperty.isValidType(value)) {\n throw new TypeError(`Invalid data type: ${value}.`)\n }\n domainElement.type = value\n const binding = domainElement.getWebBinding()\n if (value === 'number') {\n binding.format = 'int64'\n } else if (value === 'binary') {\n binding.format = 'base64'\n } else {\n binding.format = undefined\n }\n this.notifyChange()\n this.requestUpdate()\n this.updateSchemaInputConfig()\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 (!DomainProperty.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 `format` value on the model.\n *\n * @param format The format value to set.\n * @throws {TypeError} When the passed format value is not supported.\n * @fires change - Dispatched when the format value is updated.\n */\n setFormat(format?: string): void {\n if (!DomainProperty.isValidFormat(format)) {\n throw new TypeError(`Invalid format value: ${format}.`)\n }\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const binding = domainElement.getWebBinding()\n if (binding.format === format) {\n return\n }\n binding.format = format\n this.requestUpdate()\n this.notifyChange()\n this.updateSchemaInputConfig()\n }\n\n /**\n * Sets an example value on the schema.\n * @param value The value to set. Removes the examples array if not set.\n */\n setExampleValue(value?: string): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n // @TODO: Eventually, support multiple examples\n const schema = domainElement.ensureSchema()\n if (value) {\n schema.examples = [value]\n } else {\n delete schema.examples\n }\n this.requestUpdate()\n this.notifyChange()\n }\n\n /**\n * A method to be called when a schema property changes.\n * It caches the schema-sensitive input configuration.\n */\n protected updateSchemaInputConfig(): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n this.cachedSchemaInputConfig = getPropertyInputOptions(domainElement)\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 * - `literalDefaultValue`\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 protected handleSchemaChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const node = e.target as HTMLInputElement\n const { name, value, checked } = node\n if ((value || checked) && !node.reportValidity()) {\n return\n }\n if (name === 'literalDefaultValue') {\n this.setDefaultValue(value, 'literal')\n return\n }\n if (['minimum', 'maximum', 'multipleOf'].includes(name as string)) {\n const schema = domainElement.ensureSchema()\n schema[name as 'minimum' | 'maximum' | 'multipleOf'] = Number(value) || undefined\n } else if (['exclusiveMinimum', 'exclusiveMaximum'].includes(name as string)) {\n const schema = domainElement.ensureSchema()\n schema[name as 'exclusiveMinimum' | 'exclusiveMaximum'] = checked\n }\n this.updateSchemaInputConfig()\n this.notifyChange()\n }\n\n /**\n * A handler for the data type select input change\n */\n protected handleDataTypeChange(e: Event): void {\n const select = e.target as UiSelectElement\n const { value, name } = select\n if (name !== 'datatype' || !value) {\n return\n }\n this.setDataType(value)\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 /**\n * A handler for the default value select input change.\n * Depending on the selected options it calls the `setDefaultValue()`\n * with appropriate arguments.\n */\n protected handleDefaultValueChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const select = e.target as UiSelectElement\n const { value = '' } = select\n if (!value) {\n this.setDefaultValue()\n this.hasDefaultValueInput = false\n return\n }\n if (value.startsWith('function.')) {\n const fName = value.substring(9)\n this.setDefaultValue(fName, 'function')\n this.hasDefaultValueInput = false\n return\n }\n if (value.startsWith('literal.')) {\n const setValue = value.substring(8)\n this.setDefaultValue(setValue, 'literal')\n this.hasDefaultValueInput = false\n return\n }\n if (value === 'literal') {\n this.hasDefaultValueInput = true\n this.setDefaultValue('', 'literal')\n }\n }\n\n /**\n * A handler for the format select input change.\n * Calls the `setFormat()` with the appropriate value.\n */\n protected handleFormatChange(e: Event): void {\n const { domainElement } = this\n if (!domainElement) {\n return\n }\n const select = e.target as UiSelectElement\n const { value } = select\n this.setFormat(value)\n }\n\n /**\n * Handles the toggle button for the enum editor.\n * It calls the toggleEnum() whenever activated.\n */\n protected handleEnumOptionChange(): void {\n this.toggleEnum()\n }\n\n /**\n * A handler for the enum input change.\n * It calls the `updateEnum()` method\n */\n protected handleEnumChange(e: Event): void {\n const input = e.target as HTMLInputElement\n if (!input.reportValidity()) {\n return\n }\n const { value, dataset } = input\n const index = Number(dataset.index)\n if (isNaN(index)) {\n return\n }\n this.updateEnum(index, value)\n }\n\n /**\n * A handler for the add enum button.\n */\n protected handleAddEnum(): void {\n this.addEnum()\n }\n\n /**\n * A handler for the delete enum value button click.\n */\n protected handleDeleteEnum(e: Event): void {\n const button = e.currentTarget as HTMLElement\n const { dataset } = button\n const index = Number(dataset.index)\n if (isNaN(index)) {\n return\n }\n this.deleteEnum(index)\n }\n\n /**\n * Handles a change on the example input.\n */\n protected handleExampleChange(e: Event): void {\n const node = e.target as HTMLInputElement\n const { name, value } = node\n if (value && !node.reportValidity()) {\n return\n }\n if (name !== 'example') {\n return\n }\n this.setExampleValue(value)\n }\n\n // protected handleTaxonomyChange(e: Event): void {\n // const node = e.currentTarget as MdOutlinedSelect\n // const { value } = node\n // if (!value) {\n // return\n // }\n // node.displayText = ''\n // this.domainElement?.addSemantic({\n // id: value as SemanticType,\n // })\n // this.requestUpdate()\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.Password) {\n dialog = new PasswordTaxonomy(element)\n } else if (id === SemanticType.Markdown) {\n dialog = new MarkdownTaxonomy(element)\n } else if (id === SemanticType.HTML) {\n dialog = new HtmlTaxonomy(element)\n } else if (id === SemanticType.Status) {\n dialog = new StatusTaxonomy(element)\n } else if (id === SemanticType.Currency) {\n dialog = new CurrencyTaxonomy(element)\n } else if (id === SemanticType.SKU) {\n dialog = new SkuTaxonomy(element)\n } else if (id === SemanticType.Email) {\n dialog = new EmailTaxonomy(element)\n } else if (id === SemanticType.Phone) {\n dialog = new PhoneTaxonomy(element)\n } else if (id === SemanticType.URL) {\n dialog = new UrlTaxonomy(element)\n } else if (id === SemanticType.PublicUniqueName) {\n dialog = new PublicUniqueNameTaxonomy(element)\n } else if (id === SemanticType.GeospatialCoordinates) {\n dialog = new GeospatialCoordinatesTaxonomy(element)\n } else if (id === SemanticType.Calculated) {\n dialog = new CalculatedTaxonomy(element)\n } else if (id === SemanticType.PostalCode) {\n dialog = new PostalCodeTaxonomy(element)\n } else if (id === SemanticType.Country) {\n dialog = new CountryTaxonomy(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: DomainProperty): TemplateResult {\n return html`\n <form name=\"property\" @submit=\"${cancelEvent}\" data-key=\"${model.key}\" class=\"modeling-form\">\n ${this.renderMetaInputs(model)} ${this.renderAttributes(model)} ${this.renderSchema(model)}\n ${this.renderDataGovernanceSection(model)}\n </form>\n `\n }\n\n protected renderMetaInputs(model: DomainProperty): 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('property', '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 ?disabled=\"${disabled}\"\n @change=\"${this.handleMetaChange}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', '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 ?disabled=\"${disabled}\"\n @change=\"${this.handleMetaChange}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'description-input')}\n </div>\n </div>\n `\n }\n\n protected renderAttributes(model: DomainProperty): TemplateResult {\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Attributes</div>\n ${this.renderDataTypeInput(model)} ${this.renderFormat(model)} ${this.renderAttributeOptions(model)}\n </div>`\n }\n\n protected renderTaxonomy(): TemplateResult {\n return html`<div class=\"editor-section\"></div>`\n }\n\n protected renderSchema(model: DomainProperty): TemplateResult | typeof nothing {\n if (model.type === 'binary') {\n return nothing\n }\n let content: (TemplateResult | typeof nothing)[] | typeof nothing\n switch (model.type) {\n case 'string':\n content = this.renderStringSchema(model)\n break\n case 'number':\n content = this.renderNumberSchema(model)\n break\n case 'boolean':\n content = this.renderBooleanSchema(model)\n break\n case 'date':\n content = this.renderDateSchema(model)\n break\n case 'time':\n content = this.renderTimeSchema(model)\n break\n case 'datetime':\n content = this.renderDateTimeSchema(model)\n break\n // case 'binary':\n // content = this.renderBinarySchema(model)\n // break\n default:\n content = nothing\n }\n return html`<div class=\"editor-section\">\n <div class=\"section-title title-medium\">Schema</div>\n ${content}\n </div>`\n }\n\n protected renderDataTypeInput(model: DomainProperty): TemplateResult {\n const disabled = !this.canEdit\n const { type } = model\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Data Type\"\n class=\"input\"\n required\n name=\"datatype\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleDataTypeChange}\"\n >\n <ui-option ?selected=\"${type === 'string'}\" value=\"string\">\n <div>String</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'number'}\" value=\"number\">\n <div>Number</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'boolean'}\" value=\"boolean\">\n <div>Boolean</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'date'}\" value=\"date\">\n <div>Date</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'time'}\" value=\"time\">\n <div>Time</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'datetime'}\" value=\"datetime\">\n <div>Date and time</div>\n </ui-option>\n <ui-option ?selected=\"${type === 'binary'}\" value=\"binary\">\n <div>Binary</div>\n </ui-option>\n </ui-select>\n ${renderHelp('property', 'datatype-select')}\n </div>`\n }\n\n protected renderAttributeOptions(model: DomainProperty): TemplateResult {\n const { primary = false, index = false, required = false, multiple = false, readOnly = false } = model\n const disabled = !this.canEdit\n return html`<div class=\"checkbox-group\">\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-identifier\"\n .checked=\"${primary}\"\n name=\"primary\"\n @change=\"${this.handleAttributeOptionChange}\"\n ?disabled=\"${disabled}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-identifier\" class=\"body-medium\">Identifier</label>\n <span class=\"body-small meta\">The primary key in the data store.</span>\n </div>\n </div>\n ${renderHelp('property', 'primary-checkbox')}\n </div>\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-index\"\n .checked=\"${index}\"\n name=\"index\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-index\" class=\"body-medium\">Search field</label>\n <span class=\"body-small meta\">Marks this field as index and enables searching on it.</span>\n </div>\n </div>\n ${renderHelp('property', 'index-checkbox')}\n </div>\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('property', '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('property', 'multiple-checkbox')}\n </div>\n <div class=\"row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"att-readOnly\"\n .checked=\"${readOnly}\"\n name=\"readOnly\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleAttributeOptionChange}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"att-readOnly\" class=\"body-medium\">Read only</label>\n <span class=\"body-small meta\">The value can only be set when object is created.</span>\n </div>\n </div>\n ${renderHelp('property', 'readOnly-checkbox')}\n </div>\n </div>`\n }\n\n protected renderStringSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderEnumEditor(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderNumberSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderMultipleOfInput(model),\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderEnumEditor(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderBooleanSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [this.renderDefaultValueInput(model)]\n }\n\n protected renderDateSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderTimeSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n protected renderDateTimeSchema(model: DomainProperty): (TemplateResult | typeof nothing)[] {\n return [\n this.renderDefaultValueInput(model),\n this.renderLiteralDefaultValueInput(model),\n this.renderExampleValueInput(model),\n this.renderMinimumValueInput(model),\n this.renderExclusiveMinimumInput(model),\n this.renderMaximumValueInput(model),\n this.renderExclusiveMaximumInput(model),\n ]\n }\n\n /**\n * Renders the input for the default value.\n *\n * Note, when defining a new function, add support for it generation in the\n * `src/modeling/value_generator.ts` file.\n */\n protected renderDefaultValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n const { type } = model\n // || type === 'any' || type === 'nil'\n if (type === 'binary') {\n return nothing\n }\n const schema = model.schema || {}\n const { defaultValue } = schema\n let isNone = true\n let isLiteral = false\n if (defaultValue) {\n if (defaultValue.type === 'literal') {\n isNone = false\n isLiteral = true\n } else if (defaultValue.value) {\n isNone = false\n }\n }\n\n let allowLiteral = false\n const options: TemplateResult[] = [\n html`<ui-option ?selected=\"${isNone}\" value=\"\">\n <div>None</div>\n </ui-option>`,\n html`<ui-divider></ui-divider>`,\n ]\n if (type === 'string') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'random'}\" value=\"function.random\">\n <div>Random string</div>\n <div slot=\"supporting-text\">Generates a random string.</div>\n </ui-option>`\n )\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'uuid-v4'}\" value=\"function.uuid-v4\">\n <div>UUID</div>\n <div slot=\"supporting-text\">Random UUID v4 value.</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'number') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'incremental'}\" value=\"function.incremental\">\n <div>Incremental</div>\n <div slot=\"supporting-text\">Increments the value with each new object.</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'boolean') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'false'}\" value=\"literal.false\">\n <div>FALSE</div>\n </ui-option>`\n )\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'true'}\" value=\"literal.true\">\n <div>TRUE</div>\n </ui-option>`\n )\n } else if (type === 'date') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'now'}\" value=\"function.now\">\n <div>Current date</div>\n <div slot=\"supporting-text\">YYYY-MM-DD format</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'time') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'now'}\" value=\"function.now\">\n <div>Current time</div>\n <div slot=\"supporting-text\">HH:mm:ss format.</div>\n </ui-option>`\n )\n allowLiteral = true\n } else if (type === 'datetime') {\n options.push(\n html`<ui-option ?selected=\"${defaultValue?.value === 'now'}\" value=\"function.now\">\n <div>Current date and time</div>\n <div slot=\"supporting-text\">YYYY-MM-DDTHH:mm:ss format.</div>\n </ui-option>`\n )\n allowLiteral = true\n }\n\n if (allowLiteral) {\n // options.push(html`<ui-divider></ui-divider>`)\n options.push(\n html`<ui-option ?selected=\"${isLiteral}\" value=\"literal\">\n <div>Literal</div>\n <div slot=\"supporting-text\">Enter custom value.</div>\n </ui-option>`\n )\n }\n const disabled = !this.canEdit\n const supportingText = 'Used when creating the object.'\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Default value\"\n class=\"input\"\n name=\"defaultValue\"\n .supportingText=\"${supportingText}\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleDefaultValueChange}\"\n >\n ${options}\n </ui-select>\n ${renderHelp('property', 'defaultValue-select')}\n </div>`\n }\n\n protected renderLiteralDefaultValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n if (!this.hasDefaultValueInput) {\n return nothing\n }\n const schema = model.schema || {}\n const { defaultValue } = schema\n const currentValue = defaultValue?.value || ''\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"literalDefaultValue\"\n .value=\"${live(currentValue)}\"\n label=\"Literal value\"\n required\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || ''}\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'literalDefaultValue-input')}\n </div>`\n }\n\n protected renderFormat(model: DomainProperty): TemplateResult | typeof nothing {\n const { type } = model\n if (type === 'number') {\n return this.renderFormatInput(model, NumberFormats)\n }\n if (type === 'binary') {\n return this.renderFormatInput(model, BinaryFormats)\n }\n return nothing\n }\n\n protected renderFormatInput(model: DomainProperty, formats: DomainPropertyFormat[]): TemplateResult {\n const binding = model.getWebBinding()\n const options = formats.map((format) => {\n const info = getFormatInfo(format)\n return html`<ui-option ?selected=\"${format === binding.format}\" value=\"${format}\">\n <div>${info.label}</div>\n <div slot=\"supporting-text\">${info.help}</div>\n </ui-option>`\n })\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-select\n label=\"Format\"\n class=\"input\"\n name=\"format\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleFormatChange}\"\n >\n ${options}\n </ui-select>\n ${renderHelp('property', 'format-select')}\n </div>`\n }\n\n /**\n * Renders the enum editing editor section.\n */\n protected renderEnumEditor(model: DomainProperty): TemplateResult {\n return html`<div class=\"row\">${this.renderEnumToggle()} ${renderHelp('property', 'enumValues-switch')}</div>\n ${this.renderEnumValues(model)} ${this.renderAddEnumButton()}`\n }\n\n /**\n * Renders the enum toggle button.\n */\n protected renderEnumToggle(): TemplateResult {\n const disabled = !this.canEdit\n return html`<div class=\"input enum\">\n <ui-switch\n .checked=\"${this.enumEnabled}\"\n id=\"enumValues\"\n ?disabled=\"${disabled}\"\n @change=\"${this.handleEnumOptionChange}\"\n ></ui-switch>\n <label for=\"enumValues\" class=\"body-medium\">Pre-defined values (enum)</label>\n </div>`\n }\n\n /**\n * Renders the list of enum inputs or nothing when not required.\n */\n protected renderEnumValues(model: DomainProperty): TemplateResult[] | typeof nothing {\n if (!this.enumEnabled) {\n return nothing\n }\n const schema = model.schema || {}\n // We use the default value to render the first input when no enum was set.\n const { enum: enumValues = [''] } = schema\n if (!enumValues.length) {\n return nothing\n }\n return enumValues.map((value, index) => this.renderEnumItem(value, index))\n }\n\n /**\n * Renders the text field to edit an enum value.\n * @param value The enum value to render in the input\n * @param index The enum's index in the enum array.\n */\n protected renderEnumItem(value: string, index: number): TemplateResult {\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"enum-input row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"enum\"\n .value=\"${live(value)}\"\n label=\"Value\"\n data-index=\"${index}\"\n @change=\"${this.handleEnumChange}\"\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n ?disabled=\"${disabled}\"\n .supportingText=\"${info.help || ''}\"\n ></ui-outlined-text-field>\n <ui-icon-button type=\"button\" data-index=\"${index}\" @click=\"${this.handleDeleteEnum}\"\n ><ui-icon icon=\"deleteOutline\"></ui-icon\n ></ui-icon-button>\n </div>`\n }\n\n /**\n * Renders the \"add\" value value button.\n */\n protected renderAddEnumButton(): TemplateResult | typeof nothing {\n if (!this.enumEnabled || !this.canEdit) {\n return nothing\n }\n return html`<div class=\"enum-input row\">\n <ui-button color=\"outlined\" @click=\"${this.handleAddEnum}\">\n <ui-icon slot=\"icon\" icon=\"add\"></ui-icon>Add\n </ui-button>\n </div>`\n }\n\n protected renderExampleValueInput(model: DomainProperty): TemplateResult {\n const schema = model.schema || {}\n const { examples = [] } = schema\n const [example = ''] = examples\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"example\"\n .value=\"${live(example)}\"\n label=\"Example value\"\n @change=\"${this.handleExampleChange}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || 'Used with documentation.'}\"\n .type=\"${info.type}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'example-input')}\n </div>`\n }\n\n protected renderMinimumValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { minimum } = schema\n let label = 'Minimum length'\n if (model.type === 'number') {\n label = 'Minimum value'\n } else if (model.type === 'date' || model.type === 'datetime') {\n label = 'Minimum date'\n } else if (model.type === 'time') {\n label = 'Minimum time'\n }\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"minimum\"\n .value=\"${live((minimum as unknown as string) ?? '')}\"\n label=\"${label}\"\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || ''}\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'schema:minimum-input')}\n </div>`\n }\n\n protected renderExclusiveMinimumInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { exclusiveMinimum = false } = schema\n const disabled = !this.canEdit\n return html`<div class=\"checkbox row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"exclusive-minimum\"\n .checked=\"${exclusiveMinimum}\"\n name=\"exclusiveMinimum\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"exclusive-minimum\" class=\"body-medium\">Exclude minimum value</label>\n <span class=\"body-small meta\">The value must be greater than, but not equal to, the minimum.</span>\n </div>\n </div>\n ${renderHelp('property', 'schema:exclusive-minimum-checkbox')}\n </div>`\n }\n\n protected renderExclusiveMaximumInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { exclusiveMaximum } = schema\n const disabled = !this.canEdit\n return html`<div class=\"checkbox row\">\n <div class=\"input checkbox metadata\">\n <ui-checkbox\n id=\"exclusive-maximum\"\n .checked=\"${exclusiveMaximum || false}\"\n name=\"exclusiveMaximum\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-checkbox>\n <div class=\"label\">\n <label for=\"exclusive-maximum\" class=\"body-medium\">Exclude maximum value</label>\n <span class=\"body-small meta\">The value must be less than, but not equal to, the maximum.</span>\n </div>\n </div>\n ${renderHelp('property', 'schema:exclusive-maximum-checkbox')}\n </div>`\n }\n\n protected renderMaximumValueInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { maximum } = schema\n let label = 'Maximum length'\n if (model.type === 'number') {\n label = 'Maximum value'\n } else if (model.type === 'date' || model.type === 'datetime') {\n label = 'Maximum date'\n } else if (model.type === 'time') {\n label = 'Maximum time'\n }\n const info = this.schemaInputConfig\n const disabled = !this.canEdit\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"maximum\"\n .value=\"${live((maximum as unknown as string) ?? '')}\"\n label=\"${label}\"\n type=\"${info.type}\"\n pattern=\"${ifDefined(info.pattern)}\"\n min=\"${ifDefined(info.min)}\"\n max=\"${ifDefined(info.max)}\"\n step=\"${ifDefined(info.step)}\"\n .supportingText=\"${info.help || ''}\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'schema:maximum-input')}\n </div>`\n }\n\n protected renderMultipleOfInput(model: DomainProperty): TemplateResult | typeof nothing {\n const schema = model.schema || {}\n const { multipleOf } = schema\n const disabled = !this.canEdit\n const supportingText = 'The number must be divisible by this value. E.g., 2 for even numbers.'\n return html`<div class=\"row input-row\">\n <ui-outlined-text-field\n class=\"input\"\n name=\"multipleOf\"\n .value=\"${live((multipleOf as unknown as string) || '')}\"\n label=\"Value increment\"\n .supportingText=\"${supportingText}\"\n type=\"number\"\n @change=\"${this.handleSchemaChange}\"\n ?disabled=\"${disabled}\"\n ></ui-outlined-text-field>\n ${renderHelp('property', 'schema:multipleOf-input')}\n </div>`\n }\n\n protected renderDataGovernanceSection(model: DomainProperty): 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: DomainProperty): TemplateResult | typeof nothing {\n const allCategories = getSemanticsByCategory(SemanticScope.Property)\n const selectedSemantics: PropertySemantic[] = []\n const filteredCategories: Record<string, PropertySemantic[]> = {}\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 if (s.applicableDataTypes && !s.applicableDataTypes.includes(model.type)) {\n return false\n }\n // Check if this semantic is already selected\n if (model.semantics.some((ms) => ms.id === s.id)) {\n selectedSemantics.push(s as PropertySemantic)\n return false\n }\n return true\n }) as PropertySemantic[]\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 property 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('property', 'taxonomy-select')}\n </div>\n ${this.renderSelectedSemantics(selectedSemantics)}`\n }\n\n protected renderSelectedSemantics(selected: PropertySemantic[]): 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: PropertySemantic): 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, PropertySemantic[]>): 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,8 +1,12 @@
1
1
  import { type TemplateResult, LitElement } from 'lit';
2
- import { TEMPLATE_CATEGORIES } from '@api-client/core/modeling/templates/meta/index.js';
3
- import type { AssociationInfo, DomainTemplate, EntityInfo, ModelInfo, NamespaceInfo, PropertyInfo } from '@api-client/core/modeling/templates/types.js';
4
2
  import type { IconType } from '../../md/icons/Icons.js';
5
- export declare const availableCategories: (keyof typeof TEMPLATE_CATEGORIES)[];
3
+ import { templatesByVertical } from '@api-client/domain-templates';
4
+ import type { AssociationInfo, DomainTemplate, DomainTemplateMetadata, EntityInfo, ModelInfo, NamespaceInfo, PropertyInfo } from '@api-client/domain-templates/types.js';
5
+ /**
6
+ * Registry of all available template metadata
7
+ */
8
+ export declare const TEMPLATE_METADATA_REGISTRY: Record<string, DomainTemplate>;
9
+ export declare const availableCategories: (keyof typeof templatesByVertical)[];
6
10
  /**
7
11
  * The selection detail object dispatched by the `selectionchange` event.
8
12
  */
@@ -37,12 +41,12 @@ export default class DomainTemplateBrowser extends LitElement {
37
41
  * If not set, all categories are included.
38
42
  * @attribute
39
43
  */
40
- accessor category: keyof typeof TEMPLATE_CATEGORIES | undefined;
44
+ accessor category: keyof typeof templatesByVertical | undefined;
41
45
  /**
42
46
  * The internal list of filtered templates to render in the UI.
43
47
  * This is computed based on `query` and `category`.
44
48
  */
45
- accessor templates: DomainTemplate[];
49
+ accessor templates: DomainTemplateMetadata[];
46
50
  /**
47
51
  * The currently previewed template. When set, the component renders the preview view instead of the list.
48
52
  */
@@ -68,7 +72,7 @@ export default class DomainTemplateBrowser extends LitElement {
68
72
  protected renderSearchInput(): TemplateResult;
69
73
  protected renderCategoryFilters(): TemplateResult;
70
74
  protected renderTemplatesGrid(): TemplateResult;
71
- protected renderTemplateCard(template: DomainTemplate): TemplateResult;
75
+ protected renderTemplateCard(template: DomainTemplateMetadata): TemplateResult;
72
76
  protected renderEmptyState(): TemplateResult;
73
77
  renderPreviewMode(): TemplateResult;
74
78
  protected renderTemplateDetails(template: DomainTemplate): TemplateResult;
@@ -1 +1 @@
1
- {"version":3,"file":"DomainTemplateBrowser.d.ts","sourceRoot":"","sources":["../../../../src/modeling/internals/DomainTemplateBrowser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAE3D,OAAO,EAEL,mBAAmB,EAGpB,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACb,MAAM,8CAA8C,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD,eAAO,MAAM,mBAAmB,EAAuC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAAE,CAAA;AAE3G;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,YAAY,GAAG,QAAQ,CAqBzD;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU;IAC3D;;;;OAIG;IACyB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IAE9D;;;;OAIG;IACyB,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,mBAAmB,GAAG,SAAS,CAAA;IAE3F;;;OAGG;IACM,QAAQ,CAAC,SAAS,EA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