Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom-element-manifest: add reference to the type object #7822

Closed
1 task done
MarcusNotheis opened this issue Nov 8, 2023 · 1 comment · Fixed by #7613
Closed
1 task done

custom-element-manifest: add reference to the type object #7822

MarcusNotheis opened this issue Nov 8, 2023 · 1 comment · Fixed by #7613

Comments

@MarcusNotheis
Copy link
Collaborator

MarcusNotheis commented Nov 8, 2023

Feature Request Description

In Web Components for React, we're currently exploring the custom-element-manifest for our wrapper generation.
In order to create proper interfaces, we would need an enhancement to the CEM so that the origin of an enum is part of the manifest.

Example:
The following snippet is an excerpt of ui5-button CEM:

{
  "default": "\"Default\"",
  "deprecated": false,
  "fieldName": "design",
  "name": "design",
  "type": {
    "text": "ButtonDesign"
  },
  "description": "Defines the component design."
},

With this information we know that the design attribute is of type ButtonDesign, but we don't know where to import the enum from.

Proposed Solution

To solve this issue, the CEM offers a references array as part of the type, where a name and a package can be specified: https://github.com/webcomponents/custom-elements-manifest/blob/efaf2fc1ca3dcd93e4f392e5d9c72840813ad5ea/schema.d.ts#L179-L183

With the new information, the CEM would now look like this:

{
  "default": "\"Default\"",
  "deprecated": false,
  "fieldName": "design",
  "name": "design",
  "type": {
    "text": "ButtonDesign",
    "references": [
      { 
        "name": "ButtonDesign", 
        "package": "@ui5/webcomponents", 
        "module": "dist/types/ButtonDesign.js" 
      }
    ]
  },
  "description": "Defines the component design."
},

Proposed Alternatives

No response

Organization

UI5 Web Components for React

Additional Context

No response

Priority

None

Privacy Policy

  • I’m not disclosing any internal or sensitive information.
@petyabegovska
Copy link
Collaborator

petyabegovska commented Nov 8, 2023

Hi @MarcusNotheis,

This request will be resolved with issues #6958 and #7610, which we plan for UI5 Web Components version 1.20.0.

Best regards,
Petya

@nnaydenow nnaydenow self-assigned this Nov 8, 2023
@ilhan007 ilhan007 added this to the 1.20.0 milestone Nov 15, 2023
@ilhan007 ilhan007 modified the milestones: 1.20.0, 1.21.0 Dec 4, 2023
@ilhan007 ilhan007 modified the milestones: 1.21.0, 1.22.0 Jan 5, 2024
@petyabegovska petyabegovska moved this to Completed in Planning - Topic Core Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

4 participants