Skip to content

Commit f52683b

Browse files
committed
'[CHECKPOINT]'
1 parent de5466a commit f52683b

File tree

13 files changed

+52
-45
lines changed

13 files changed

+52
-45
lines changed
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
<button [type]="props.attr.type" *ngIf="props.btnIsPresent && !props.link && !props.routerLink" (click)="props.click($event)" [class]="props.btnClass" [ngStyle]="props.btnStyle">
2-
<ng-container *ngIf="props.iconIsPresent" >
3-
<img *ngIf="props.iconType === 'img'" [src]=props.iconSrc [alt]="props.iconAlt" [class]="props.iconClass" />
4-
<i *ngIf="props.iconType === 'icon'" [class]="props.iconClass"></i>
5-
</ng-container>
6-
<span [ngStyle]="props.style" [class]="props.class">{{ props.text | translate}}</span>
2+
<ng-container [ngTemplateOutlet]="buttonBody"></ng-container>
73
</button>
84

95
<a [href]="props.link" *ngIf="props.btnIsPresent && props.link" [class]="props.btnClass + ' ' + classPrefix('MainLink0')" [ngStyle]="props.btnStyle">
10-
<ng-container *ngIf="props.iconIsPresent" >
11-
<img *ngIf="props.iconType === 'img'" [src]=props.iconSrc [alt]="props.iconAlt" [class]="props.iconClass" />
12-
<i *ngIf="props.iconType === 'icon'" [class]="props.iconClass"></i>
13-
</ng-container>
14-
<span [ngStyle]="props.style" [class]="props.class">{{ props.text | translate}}</span>
6+
<ng-container [ngTemplateOutlet]="buttonBody"></ng-container>
157
</a>
168

179
<a [routerLink]="props.routerLink" *ngIf="props.btnIsPresent && props.routerLink" [class]="props.btnClass + ' ' + classPrefix('MainLink0')" [ngStyle]="props.btnStyle">
10+
<ng-container [ngTemplateOutlet]="buttonBody"></ng-container>
11+
</a>
12+
13+
14+
<ng-template #buttonBody>
1815
<ng-container *ngIf="props.iconIsPresent" >
1916
<img *ngIf="props.iconType === 'img'" [src]=props.iconSrc [alt]="props.iconAlt" [class]="props.iconClass" />
2017
<i *ngIf="props.iconType === 'icon'" [class]="props.iconClass"></i>
2118
</ng-container>
2219
<span [ngStyle]="props.style" [class]="props.class">{{ props.text | translate}}</span>
23-
</a>
24-
25-
20+
</ng-template>

projects/wml-components-base/src/lib/models.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ export class WMLMotionUIProperty<V=any,T="animation" | "transition"> extends WML
292292
}
293293
}
294294
readonly animationEnd:(evt?:AnimationEvent)=> void =(evt)=>{
295-
296295
let state = this.getGroupMotionState()
297296
let finalStyles ={
298297
"opening":this.keyFrameStyles["100%"],

projects/wml-field/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.0.5",
1111
"@angular/core": "^19.0.5",
12-
"@windmillcode/angular-wml-components-base": "^19.0.5100",
13-
"@windmillcode/wml-components-base": "^19.0.5100"
12+
"@windmillcode/angular-wml-components-base": "^19.0.5101",
13+
"@windmillcode/wml-components-base": "^19.0.5101"
1414
},
1515
"private": false,
1616
"repository": {
@@ -20,5 +20,5 @@
2020
"scripts": {
2121
"build": "npx ng build"
2222
},
23-
"version": "19.0.5100"
23+
"version": "19.0.5101"
2424
}

projects/wml-field/src/lib/wml-field-zero/wml-field-zero.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<div [class]="classPrefix('MainPod')">
1+
<div
2+
3+
[class]="classPrefix('MainPod')">
24
<section [class]="classPrefix('Pod0')">
35
<ng-template #customLabel ></ng-template>
46
</section>

projects/wml-field/src/lib/wml-field-zero/wml-field-zero.component.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Input, Type, ViewChild, ViewContainerRef } from '@angular/core';
22
import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
3-
import { generateClassPrefix, WMLCustomComponent, WMLDeepPartial, WMLWrapper } from '@windmillcode/wml-components-base';
3+
import { generateClassPrefix, WMLCustomComponent, WMLDeepPartial, WMLUIProperty, WMLWrapper } from '@windmillcode/wml-components-base';
44
import {addCustomComponent} from '@windmillcode/angular-wml-components-base';
55

66
// rxjs
@@ -22,27 +22,28 @@ export class WMLFieldZeroPropsComponent {
2222
) { }
2323

2424
classPrefix = generateClassPrefix('WMLField')
25-
@Input("props") wmlField = new WMLFieldZeroProps()
25+
@Input("props") props = new WMLFieldZeroProps()
2626
@HostBinding('class') myClass: string = this.classPrefix(`View`);
2727
@HostBinding('attr.id') myId?:string;
28+
@HostBinding('style') myStyle: Partial<CSSStyleDeclaration> = {};
2829
ngUnsub= new Subject<void>()
2930
@ViewChild("customLabel",{read:ViewContainerRef,static:true}) customLabel!:ViewContainerRef;
3031
@ViewChild("customField", {read:ViewContainerRef,static:true}) customField!:ViewContainerRef;
3132
@ViewChild("customError", {read:ViewContainerRef,static:true}) customError!:ViewContainerRef;
3233

3334
initComponent(){
3435

35-
if(this.wmlField){
36-
this.wmlField.view.cdref = this.cdref
36+
if(this.props){
37+
this.props.view.cdref = this.cdref
3738
}
3839

3940
["label","field","error"].forEach((key,index0)=>{
40-
if( this.wmlField?.[key]?.type === "custom"){
41-
this.wmlField[key].custom.props.wmlField = this.wmlField
41+
if( this.props?.[key]?.type === "custom"){
42+
this.props[key].custom.props.wmlField = this.props
4243
addCustomComponent(
4344
[this.customLabel,this.customField,this.customError][index0],
44-
this.wmlField[key].custom.cpnt as Type<any>,
45-
this.wmlField[key].custom.props
45+
this.props[key].custom.cpnt as Type<any>,
46+
this.props[key].custom.props
4647
)
4748
}
4849
})
@@ -51,7 +52,8 @@ export class WMLFieldZeroPropsComponent {
5152

5253
ngOnInit(): void {
5354
this.initComponent()
54-
this.myId = this.wmlField.view.id
55+
this.myId = this.props.view.id
56+
this.myStyle = this.props.view.style
5557
}
5658

5759
ngOnDestroy(){
@@ -126,6 +128,8 @@ export class WMLFieldZeroProps<FC=any,FP=any> extends WMLWrapper {
126128
}= {
127129
type:"wml-card"
128130
}
131+
132+
parentContainer = new WMLUIProperty({})
129133
label = {
130134
type:"custom",
131135
custom:new WMLCustomComponent<WMLLabelZeroComponent,WMLLabelZeroProps>({

projects/wml-form/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"peerDependencies": {
1010
"@angular/common": "^19.0.5",
1111
"@angular/core": "^19.0.5",
12-
"@windmillcode/angular-wml-components-base": "^19.0.5100",
13-
"@windmillcode/wml-components-base": "^19.0.5100"
12+
"@windmillcode/angular-wml-components-base": "^19.0.5101",
13+
"@windmillcode/wml-components-base": "^19.0.5101"
1414
},
1515
"private": false,
1616
"repository": {
@@ -20,5 +20,5 @@
2020
"scripts": {
2121
"build": "npx ng build"
2222
},
23-
"version": "19.0.5100"
23+
"version": "19.0.5101"
2424
}

projects/wml-form/src/lib/wml-form-zero/wml-form-zero/wml-form-zero.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<div [class]="classPrefix('MainPod')" (ngSubmit)="silenceSubmitAction($event)">
22
<section [style]="section.style" [class]="classPrefix('Pod0')" *ngFor="let section of props.displayFields">
3-
<div [class]="classPrefix('Pod0Item0')" *ngFor="let field of section.value">
3+
<div
4+
[ngStyle]="field.parentContainer.style"
5+
[class]="classPrefix('Pod0Item0') + field.parentContainer.class" *ngFor="let field of section.value">
46
<div [class]="classPrefix('Pod0Item1') + ' glassmorphism'" *ngIf="field.self.type === 'wml-card'">
57
<wml-field-zero [props]="field"></wml-field-zero>
68
</div>

projects/wml-input/src/lib/wml-input-zero/wml-input-zero/wml-input-zero.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[style]="props.input.style"
66
[class]="classPrefix('MainPodInput0') + props.input.class"
77
[type]="props.type"
8-
*ngIf="['input','password','number','email'].includes(props.type)"
8+
*ngIf="['input','password','number','email','color','tel'].includes(props.type)"
99
[formControlName]="props.wmlField.field.formControlName"
1010
(input)="triggerChange($event)"
1111
[placeholder]="props.input.placeholder | translate"

projects/wml-input/src/lib/wml-input-zero/wml-input-zero/wml-input-zero.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class WMLInputZeroProps {
6262
range =new WMLInputZeroAreaProps({})
6363
checkbox = new WMLInputZeroCheckboxProps({})
6464
datetime = new WMLInputZeroDatetimeProps({})
65-
type:"datetime"| "time"| "date"| "range"| "input" | "number" | "password" | "email" | "tel" | "textarea" | "checkbox" = "input";
65+
type:HTMLInputElement["type"] = "input";
6666
wmlField: WMLFieldZeroProps = new WMLFieldZeroProps()
6767
}
6868

projects/wml-schematics/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"peerDependencies": {
99
"@angular/common": "^19.0.5",
1010
"@angular/core": "^19.0.5",
11-
"@windmillcode/angular-wml-components-base": "^19.0.5100",
12-
"@windmillcode/wml-components-base": "^19.0.5100"
11+
"@windmillcode/angular-wml-components-base": "^19.0.5101",
12+
"@windmillcode/wml-components-base": "^19.0.5101"
1313
},
1414
"private": false,
1515
"repository": {
@@ -22,5 +22,5 @@
2222
"postbuild": "npx copyfiles schematics/collection.json schematics/*/schema.json schematics/*/files/** ../../dist/wml-schematics/",
2323
"test": "npx ng test templates --code-coverage"
2424
},
25-
"version": "19.0.5100"
25+
"version": "19.0.5101"
2626
}

0 commit comments

Comments
 (0)