@rlucan/ui 20.0.3 → 20.0.6

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.
@@ -1595,11 +1595,11 @@ class ForceVisibilityDirective {
1595
1595
  }
1596
1596
  else {
1597
1597
  if (this.visibilityFromTop !== 0) {
1598
- document.getElementsByTagName('app-root')[0].scrollTo(0, rect.top - +this.visibilityFromTop);
1598
+ document.getElementsByClassName('force-visibility-root')[0].scrollTo(0, rect.top - +this.visibilityFromTop);
1599
1599
  }
1600
1600
  else {
1601
1601
  if (rect.bottom > window.innerHeight) {
1602
- document.getElementsByTagName('app-root')[0].scrollBy(0, rect.bottom - window.innerHeight + 15);
1602
+ document.getElementsByClassName('force-visibility-root')[0].scrollBy(0, rect.bottom - window.innerHeight + 15);
1603
1603
  }
1604
1604
  }
1605
1605
  }
@@ -1977,6 +1977,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
1977
1977
  }] } });
1978
1978
 
1979
1979
  class AvatarComponent {
1980
+ get styleDiameter() {
1981
+ if (this.diameter === undefined) {
1982
+ return undefined;
1983
+ }
1984
+ if (!isNaN(Number(this.diameter))) {
1985
+ return this.diameter + 'px';
1986
+ }
1987
+ return this.diameter;
1988
+ }
1989
+ get height() {
1990
+ return this.styleDiameter;
1991
+ }
1992
+ get width() {
1993
+ return this.styleDiameter;
1994
+ }
1995
+ get fontSize() {
1996
+ if (this.diameter === undefined) {
1997
+ return undefined;
1998
+ }
1999
+ return 'calc(' + this.styleDiameter + ' / 2)';
2000
+ }
2001
+ get paddingBottom() {
2002
+ if (this.diameter === undefined) {
2003
+ return undefined;
2004
+ }
2005
+ return 'calc(' + this.styleDiameter + ' / 20)';
2006
+ }
1980
2007
  get contrast() {
1981
2008
  const hexCode = this.user.shortColour.substring(1, 7);
1982
2009
  const hexR = parseInt(hexCode.substring(0, 2), 16);
@@ -1990,13 +2017,14 @@ class AvatarComponent {
1990
2017
  this.size = 'normal';
1991
2018
  }
1992
2019
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1993
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.4", type: AvatarComponent, isStandalone: false, selector: "ui-avatar", inputs: { user: "user", srcOptions: "srcOptions", size: "size" }, host: { properties: { "class": "this.size" } }, ngImport: i0, template: "<ui-file *ngIf=\"user.avatar || (!user.avatar && !user.shortName)\" [fileSize]=\"'avatar-' + size\" [srcData]=\"user.avatar || { mimeType: 'image/png'}\" [srcOptions]=\"srcOptions\" ></ui-file>\r\n<div *ngIf=\"!user.avatar && user.shortName\" [ngStyle]=\"{backgroundColor: user.shortColour, color: contrast}\">\r\n {{ user.shortName }}\r\n</div>\r\n", styles: [":host{display:block;flex:0 0 auto}:host.mini{height:16px;width:16px}:host.mini div{font-size:10px}:host.small{height:24px;width:24px}:host.small div{font-size:13px}:host.smaller{height:50px;width:50px}:host.smaller div{font-size:1.5em}:host.normal{height:74px;width:74px}:host.normal div{font-size:37px}:host.bigger{height:100px;width:100px}:host.bigger div{font-size:50px}:host.big{height:150px;width:150px}:host.big div{font-size:75px}:host ui-file ::ng-deep img{border-radius:50%}:host div{display:flex;align-items:center;justify-content:center;width:100%;font-weight:700;color:#fff;background-size:cover;height:100%;border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FileComponent, selector: "ui-file", inputs: ["fileSize", "srcOptions", "srcData", "srcUrl"] }] }); }
2020
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: AvatarComponent, isStandalone: false, selector: "ui-avatar", inputs: { user: "user", srcOptions: "srcOptions", size: "size", diameter: "diameter" }, host: { properties: { "class": "this.size", "style.height": "this.height", "style.width": "this.width" } }, ngImport: i0, template: "@if (user.avatar || (!user.avatar && !user.shortName)) {\r\n <ui-file [fileSize]=\"'avatar-' + size\" [srcData]=\"user.avatar || { mimeType: 'image/png'}\" [srcOptions]=\"srcOptions\" ></ui-file>\r\n}\r\n@if (!user.avatar && user.shortName) {\r\n <div [ngStyle]=\"{backgroundColor: user.shortColour, color: contrast, 'font-size': fontSize, 'padding-bottom': paddingBottom}\">\r\n {{ user.shortName }}\r\n </div>\r\n}\r\n", styles: [":host{display:block;flex:0 0 auto}:host.mini{height:16px;width:16px}:host.mini div{font-size:10px}:host.small{height:24px;width:24px}:host.small div{font-size:13px}:host.smaller{height:50px;width:50px}:host.smaller div{font-size:1.5em}:host.normal{height:74px;width:74px}:host.normal div{font-size:37px}:host.bigger{height:100px;width:100px}:host.bigger div{font-size:50px}:host.big{height:150px;width:150px}:host.big div{font-size:75px}:host ui-file{max-width:100%!important;max-height:100%!important;height:100%!important;width:100%!important}:host ui-file ::ng-deep img{border-radius:50%}:host div{display:flex;align-items:center;justify-content:center;width:100%;font-weight:700;color:#fff;background-size:cover;height:100%;border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FileComponent, selector: "ui-file", inputs: ["fileSize", "srcOptions", "srcData", "srcUrl"] }] }); }
1994
2021
  }
1995
2022
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AvatarComponent, decorators: [{
1996
2023
  type: Component,
1997
- args: [{ selector: 'ui-avatar', standalone: false, template: "<ui-file *ngIf=\"user.avatar || (!user.avatar && !user.shortName)\" [fileSize]=\"'avatar-' + size\" [srcData]=\"user.avatar || { mimeType: 'image/png'}\" [srcOptions]=\"srcOptions\" ></ui-file>\r\n<div *ngIf=\"!user.avatar && user.shortName\" [ngStyle]=\"{backgroundColor: user.shortColour, color: contrast}\">\r\n {{ user.shortName }}\r\n</div>\r\n", styles: [":host{display:block;flex:0 0 auto}:host.mini{height:16px;width:16px}:host.mini div{font-size:10px}:host.small{height:24px;width:24px}:host.small div{font-size:13px}:host.smaller{height:50px;width:50px}:host.smaller div{font-size:1.5em}:host.normal{height:74px;width:74px}:host.normal div{font-size:37px}:host.bigger{height:100px;width:100px}:host.bigger div{font-size:50px}:host.big{height:150px;width:150px}:host.big div{font-size:75px}:host ui-file ::ng-deep img{border-radius:50%}:host div{display:flex;align-items:center;justify-content:center;width:100%;font-weight:700;color:#fff;background-size:cover;height:100%;border-radius:50%}\n"] }]
2024
+ args: [{ selector: 'ui-avatar', standalone: false, template: "@if (user.avatar || (!user.avatar && !user.shortName)) {\r\n <ui-file [fileSize]=\"'avatar-' + size\" [srcData]=\"user.avatar || { mimeType: 'image/png'}\" [srcOptions]=\"srcOptions\" ></ui-file>\r\n}\r\n@if (!user.avatar && user.shortName) {\r\n <div [ngStyle]=\"{backgroundColor: user.shortColour, color: contrast, 'font-size': fontSize, 'padding-bottom': paddingBottom}\">\r\n {{ user.shortName }}\r\n </div>\r\n}\r\n", styles: [":host{display:block;flex:0 0 auto}:host.mini{height:16px;width:16px}:host.mini div{font-size:10px}:host.small{height:24px;width:24px}:host.small div{font-size:13px}:host.smaller{height:50px;width:50px}:host.smaller div{font-size:1.5em}:host.normal{height:74px;width:74px}:host.normal div{font-size:37px}:host.bigger{height:100px;width:100px}:host.bigger div{font-size:50px}:host.big{height:150px;width:150px}:host.big div{font-size:75px}:host ui-file{max-width:100%!important;max-height:100%!important;height:100%!important;width:100%!important}:host ui-file ::ng-deep img{border-radius:50%}:host div{display:flex;align-items:center;justify-content:center;width:100%;font-weight:700;color:#fff;background-size:cover;height:100%;border-radius:50%}\n"] }]
1998
2025
  }], ctorParameters: () => [], propDecorators: { user: [{
1999
- type: Input
2026
+ type: Input,
2027
+ args: [{ required: true }]
2000
2028
  }], srcOptions: [{
2001
2029
  type: Input
2002
2030
  }], size: [{
@@ -2004,6 +2032,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
2004
2032
  args: ['class']
2005
2033
  }, {
2006
2034
  type: Input
2035
+ }], diameter: [{
2036
+ type: Input
2037
+ }], height: [{
2038
+ type: HostBinding,
2039
+ args: ['style.height']
2040
+ }], width: [{
2041
+ type: HostBinding,
2042
+ args: ['style.width']
2007
2043
  }] } });
2008
2044
 
2009
2045
  class SubmitButtonComponent {