Skip to content

Commit

Permalink
fix(angular): add missing property/event types
Browse files Browse the repository at this point in the history
- remove incorrect input type on globalStyles
- fix missing properties being filtered out from metadata

Signed-off-by: Cory Rylan <splintercode.cb@gmail.com>
  • Loading branch information
coryrylan committed Feb 11, 2022
1 parent 91d205e commit 8de1fdb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -4,7 +4,7 @@
* The full license information can be found in LICENSE in the root directory of this project.
*/

import { Directive, ElementRef, {{#hasProps}} Input {{/hasProps}} {{#hasEvents}}, Output, EventEmitter {{/hasEvents}} } from '@angular/core';
import { Directive, ElementRef {{#hasProps}}, Input {{/hasProps}} {{#hasEvents}}, Output, EventEmitter {{/hasEvents}} } from '@angular/core';
import { {{elementClassName}} } from '@cds/core/{{{directiveModule}}}';

@Directive({ selector: '{{tagName}}' })
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/card/card.element.ts
Expand Up @@ -49,7 +49,7 @@ import styles from './card.element.scss';
* @cssprop --cds-card-remove-margin
*/
export class CdsCard extends CdsInternalPanel {
@globalStyle() globalStyles = css`
@globalStyle() protected globalStyles = css`
[cds-card-remove-margin] {
margin-left: calc(-1 * var(--card-remove-margin));
width: calc(100% + calc(var(--card-remove-margin) * 2));
Expand Down
2 changes: 1 addition & 1 deletion scripts/core-ng-module-generator.js
Expand Up @@ -129,7 +129,7 @@ function getDirectiveProps(props) {
.filter(prop => prop.privacy === undefined) // public
.filter(prop => !prop.static)
.filter(prop => !prop.readonly)
.filter(prop => prop.type && prop.type.text && !prop.type.text.includes('EventEmitter')) // exclude events
.filter(prop => !prop.type?.text?.includes('EventEmitter')) // exclude events
.map(prop => ({ name: prop.name, isBoolean: prop?.type?.text === 'boolean' }));
}

Expand Down

0 comments on commit 8de1fdb

Please sign in to comment.