Giter Club home page Giter Club logo

enonic-types's People

Contributors

garlov avatar itemodahl avatar mikewoudenberg avatar srnilssen avatar tajakobsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enonic-types's Issues

Possible error with content.data.media.attachment using <Content>

Hi,

If I use this library to validate Content that is a media-type content it looks like it doesn't except .media.attachment as something to exist within content.data. But if you upload an SVG to Content Studio, it stores some data here. Today we bypass this with a @ts-ignore.

import { Content, ContentLibrary } from 'enonic-types/content';
const libContent: ContentLibrary = __non_webpack_require__('/lib/xp/content');

// ...

const attachmentContent: Content = libPortal.getContent<Content>();
log.info(attachmentContent?.data?.media?.attachment); // ts linter doesn't like this row

Is this expected? Maybe I'm using it wrong. I'm using 1.4.0 of this lib, but used 0.0.74 before and recently upgrading didn't solve the problem.

Skjermbilde 2020-11-11 kl  10 23 47

Types for lib-explorer are incomplete

The NPM package @item-enonic-types/[email protected] only contains index.d.ts which references ./client and ./document but they are not packaged in the module. I think this can be easily fixed by adding both files to the package.json files section

Type for node library doesnt correctly mirror the code

A couple of things:

There is only two functions directly under lib-node: connect and multiRepoConnect. The functions get, delete, update etc, should instead be moved into the type of RepoConnection.

Some of the RepoConnection functions have either a string or an array of strings as an argument, and depending on what is used, either an object or an array of object is returned. Could this be mirrored in the types?

-ร˜

displayName is not always readonly

displayName can be edited by content.modify, what leads to an error
Cannot assign to 'displayName' because it is a read-only property
Is there any way to solve this now?

Add types for lib-util

Types should be added for lib-util.

If you are looking to contribute to this project, this is a task you can grab. Just comment on this issue that you grabbed it.

Built-in content types

What is your thought on adding types for XPs non-abstract built-in content types such as base:shortcut and base:folder.

We are encountering them in our code from time to time, and since they aren't generated by the gradle plugin we end up managing/duplicating them ourself, since they follow XP perhaps they could fit in here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.