ect-button 1.21.0 → 1.21.1

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.
package/README.md CHANGED
@@ -62,7 +62,7 @@ In your HTML template, to add a primary button with an icon and an onClick event
62
62
 
63
63
  ## Dependencies
64
64
 
65
- None
65
+ EctAutoId - https://www.npmjs.com/package/ect-auto-id - A directive that makes sure that all HTML elements are unique.
66
66
 
67
67
 
68
68
  ## Cost
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, output, Component } from '@angular/core';
3
+ import { AutoIdDirective } from 'ect-auto-id';
3
4
 
4
5
  class EctButtonComponent {
5
6
  loaded = false;
@@ -87,11 +88,11 @@ class EctButtonComponent {
87
88
  return name + Math.round(randomNumber);
88
89
  }
89
90
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: EctButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
90
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: EctButtonComponent, isStandalone: true, selector: "ect-button", inputs: { Text: { classPropertyName: "Text", publicName: "Text", isSignal: true, isRequired: false, transformFunction: null }, Type: { classPropertyName: "Type", publicName: "Type", isSignal: true, isRequired: false, transformFunction: null }, Icon: { classPropertyName: "Icon", publicName: "Icon", isSignal: true, isRequired: false, transformFunction: null }, AdditionalCssClasses: { classPropertyName: "AdditionalCssClasses", publicName: "AdditionalCssClasses", isSignal: true, isRequired: false, transformFunction: null }, HideText: { classPropertyName: "HideText", publicName: "HideText", isSignal: true, isRequired: false, transformFunction: null }, Disabled: { classPropertyName: "Disabled", publicName: "Disabled", isSignal: true, isRequired: false, transformFunction: null }, TextBeforeIcon: { classPropertyName: "TextBeforeIcon", publicName: "TextBeforeIcon", isSignal: true, isRequired: false, transformFunction: null }, IsSelected: { classPropertyName: "IsSelected", publicName: "IsSelected", isSignal: true, isRequired: false, transformFunction: null }, TextColour: { classPropertyName: "TextColour", publicName: "TextColour", isSignal: true, isRequired: false, transformFunction: null }, BackgroundColour: { classPropertyName: "BackgroundColour", publicName: "BackgroundColour", isSignal: true, isRequired: false, transformFunction: null }, BorderColour: { classPropertyName: "BorderColour", publicName: "BorderColour", isSignal: true, isRequired: false, transformFunction: null }, IconColour: { classPropertyName: "IconColour", publicName: "IconColour", isSignal: true, isRequired: false, transformFunction: null }, DropDown: { classPropertyName: "DropDown", publicName: "DropDown", isSignal: true, isRequired: false, transformFunction: null }, DropDownOptions: { classPropertyName: "DropDownOptions", publicName: "DropDownOptions", isSignal: true, isRequired: false, transformFunction: null }, ViewScale: { classPropertyName: "ViewScale", publicName: "ViewScale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "@if (loaded) {\r\n @if (IsDropDown) {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\"\r\n data-bs-toggle=\"dropdown\"\r\n aria-expanded=\"false\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText) {\r\n <span>&nbsp;{{Text()}}</span>\r\n } @else {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n <ul class=\"dropdown-menu\" [attr.aria-labelledby]=\"ButtonName\">\r\n @for(dropdownItem of ActualDropDownOptions; track dropdownItem) {\r\n @if(dropdownItem.Divider === true) {\r\n <li class=\"dropdown-divider\"></li>\r\n } @else {\r\n <li>\r\n <a (click)=\"dropdownItem.Action()\"\r\n (keydown.enter)=\"dropdownItem.Action()\"\r\n (keydown.space)=\"dropdownItem.Action()\"\r\n [target]=\"dropdownItem.Target\"\r\n [className]=\"dropdownItem.CssClasses\"\r\n [title]=\"dropdownItem.Text\"\r\n [attr.aria-label]=\"dropdownItem.Text\"\r\n [name]=\"dropdownItem.Id\"\r\n [id]=\"dropdownItem.Id\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n <i [className]=\"dropdownItem.Icon\" [style.color]=\"dropdownItem.IconColour\"></i>&nbsp;{{dropdownItem.Text}}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n } @else {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n (click)=\"clickAction()\"\r\n (keydown.enter)=\"clickAction()\"\r\n (keydown.space)=\"clickAction()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText && IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText && IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (ShowText) {\r\n <span>{{Text()}}</span>\r\n }\r\n @if (ShowText && !IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (hasIcon && ShowText && !IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (!ShowText) {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n}", styles: [".default-margin{margin-right:5px}.default-font-size{font-size:14px}.center-text{text-align:center}.selected-background-color{background-color:#228b22}.standard-button:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"] });
91
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: EctButtonComponent, isStandalone: true, selector: "ect-button", inputs: { Text: { classPropertyName: "Text", publicName: "Text", isSignal: true, isRequired: false, transformFunction: null }, Type: { classPropertyName: "Type", publicName: "Type", isSignal: true, isRequired: false, transformFunction: null }, Icon: { classPropertyName: "Icon", publicName: "Icon", isSignal: true, isRequired: false, transformFunction: null }, AdditionalCssClasses: { classPropertyName: "AdditionalCssClasses", publicName: "AdditionalCssClasses", isSignal: true, isRequired: false, transformFunction: null }, HideText: { classPropertyName: "HideText", publicName: "HideText", isSignal: true, isRequired: false, transformFunction: null }, Disabled: { classPropertyName: "Disabled", publicName: "Disabled", isSignal: true, isRequired: false, transformFunction: null }, TextBeforeIcon: { classPropertyName: "TextBeforeIcon", publicName: "TextBeforeIcon", isSignal: true, isRequired: false, transformFunction: null }, IsSelected: { classPropertyName: "IsSelected", publicName: "IsSelected", isSignal: true, isRequired: false, transformFunction: null }, TextColour: { classPropertyName: "TextColour", publicName: "TextColour", isSignal: true, isRequired: false, transformFunction: null }, BackgroundColour: { classPropertyName: "BackgroundColour", publicName: "BackgroundColour", isSignal: true, isRequired: false, transformFunction: null }, BorderColour: { classPropertyName: "BorderColour", publicName: "BorderColour", isSignal: true, isRequired: false, transformFunction: null }, IconColour: { classPropertyName: "IconColour", publicName: "IconColour", isSignal: true, isRequired: false, transformFunction: null }, DropDown: { classPropertyName: "DropDown", publicName: "DropDown", isSignal: true, isRequired: false, transformFunction: null }, DropDownOptions: { classPropertyName: "DropDownOptions", publicName: "DropDownOptions", isSignal: true, isRequired: false, transformFunction: null }, ViewScale: { classPropertyName: "ViewScale", publicName: "ViewScale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "@if (loaded) {\r\n @if (IsDropDown) {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n autoId\r\n data-bs-toggle=\"dropdown\"\r\n aria-expanded=\"false\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText) {\r\n <span>&nbsp;{{Text()}}</span>\r\n } @else {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n <ul class=\"dropdown-menu\" [attr.aria-labelledby]=\"ButtonName\">\r\n @for(dropdownItem of ActualDropDownOptions; track dropdownItem) {\r\n @if(dropdownItem.Divider === true) {\r\n <li class=\"dropdown-divider\"></li>\r\n } @else {\r\n <li>\r\n <a (click)=\"dropdownItem.Action()\"\r\n (keydown.enter)=\"dropdownItem.Action()\"\r\n (keydown.space)=\"dropdownItem.Action()\"\r\n [target]=\"dropdownItem.Target\"\r\n [className]=\"dropdownItem.CssClasses\"\r\n [title]=\"dropdownItem.Text\"\r\n [attr.aria-label]=\"dropdownItem.Text\"\r\n [name]=\"dropdownItem.Id\"\r\n autoId\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n <i [className]=\"dropdownItem.Icon\" [style.color]=\"dropdownItem.IconColour\"></i>&nbsp;{{dropdownItem.Text}}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n } @else {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n (click)=\"clickAction()\"\r\n (keydown.enter)=\"clickAction()\"\r\n (keydown.space)=\"clickAction()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n autoId\r\n [id]=\"ButtonName\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText && IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText && IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (ShowText) {\r\n <span>{{Text()}}</span>\r\n }\r\n @if (ShowText && !IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (hasIcon && ShowText && !IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (!ShowText) {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n}", styles: [".default-margin{margin-right:5px}.default-font-size{font-size:14px}.center-text{text-align:center}.selected-background-color{background-color:#228b22}.standard-button:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"], dependencies: [{ kind: "directive", type: AutoIdDirective, selector: "[autoId]" }] });
91
92
  }
92
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: EctButtonComponent, decorators: [{
93
94
  type: Component,
94
- args: [{ selector: 'ect-button', template: "@if (loaded) {\r\n @if (IsDropDown) {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\"\r\n data-bs-toggle=\"dropdown\"\r\n aria-expanded=\"false\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText) {\r\n <span>&nbsp;{{Text()}}</span>\r\n } @else {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n <ul class=\"dropdown-menu\" [attr.aria-labelledby]=\"ButtonName\">\r\n @for(dropdownItem of ActualDropDownOptions; track dropdownItem) {\r\n @if(dropdownItem.Divider === true) {\r\n <li class=\"dropdown-divider\"></li>\r\n } @else {\r\n <li>\r\n <a (click)=\"dropdownItem.Action()\"\r\n (keydown.enter)=\"dropdownItem.Action()\"\r\n (keydown.space)=\"dropdownItem.Action()\"\r\n [target]=\"dropdownItem.Target\"\r\n [className]=\"dropdownItem.CssClasses\"\r\n [title]=\"dropdownItem.Text\"\r\n [attr.aria-label]=\"dropdownItem.Text\"\r\n [name]=\"dropdownItem.Id\"\r\n [id]=\"dropdownItem.Id\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n <i [className]=\"dropdownItem.Icon\" [style.color]=\"dropdownItem.IconColour\"></i>&nbsp;{{dropdownItem.Text}}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n } @else {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n (click)=\"clickAction()\"\r\n (keydown.enter)=\"clickAction()\"\r\n (keydown.space)=\"clickAction()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText && IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText && IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (ShowText) {\r\n <span>{{Text()}}</span>\r\n }\r\n @if (ShowText && !IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (hasIcon && ShowText && !IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (!ShowText) {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n}", styles: [".default-margin{margin-right:5px}.default-font-size{font-size:14px}.center-text{text-align:center}.selected-background-color{background-color:#228b22}.standard-button:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"] }]
95
+ args: [{ selector: 'ect-button', imports: [AutoIdDirective], template: "@if (loaded) {\r\n @if (IsDropDown) {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n autoId\r\n data-bs-toggle=\"dropdown\"\r\n aria-expanded=\"false\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText) {\r\n <span>&nbsp;{{Text()}}</span>\r\n } @else {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n <ul class=\"dropdown-menu\" [attr.aria-labelledby]=\"ButtonName\">\r\n @for(dropdownItem of ActualDropDownOptions; track dropdownItem) {\r\n @if(dropdownItem.Divider === true) {\r\n <li class=\"dropdown-divider\"></li>\r\n } @else {\r\n <li>\r\n <a (click)=\"dropdownItem.Action()\"\r\n (keydown.enter)=\"dropdownItem.Action()\"\r\n (keydown.space)=\"dropdownItem.Action()\"\r\n [target]=\"dropdownItem.Target\"\r\n [className]=\"dropdownItem.CssClasses\"\r\n [title]=\"dropdownItem.Text\"\r\n [attr.aria-label]=\"dropdownItem.Text\"\r\n [name]=\"dropdownItem.Id\"\r\n autoId\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n <i [className]=\"dropdownItem.Icon\" [style.color]=\"dropdownItem.IconColour\"></i>&nbsp;{{dropdownItem.Text}}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n } @else {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n (click)=\"clickAction()\"\r\n (keydown.enter)=\"clickAction()\"\r\n (keydown.space)=\"clickAction()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n autoId\r\n [id]=\"ButtonName\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText && IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText && IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (ShowText) {\r\n <span>{{Text()}}</span>\r\n }\r\n @if (ShowText && !IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (hasIcon && ShowText && !IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (!ShowText) {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n}", styles: [".default-margin{margin-right:5px}.default-font-size{font-size:14px}.center-text{text-align:center}.selected-background-color{background-color:#228b22}.standard-button:hover{box-shadow:0 12px 16px #0000003d,0 17px 50px #00000030}\n"] }]
95
96
  }], propDecorators: { Text: [{ type: i0.Input, args: [{ isSignal: true, alias: "Text", required: false }] }], Type: [{ type: i0.Input, args: [{ isSignal: true, alias: "Type", required: false }] }], Icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "Icon", required: false }] }], AdditionalCssClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "AdditionalCssClasses", required: false }] }], HideText: [{ type: i0.Input, args: [{ isSignal: true, alias: "HideText", required: false }] }], Disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "Disabled", required: false }] }], TextBeforeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "TextBeforeIcon", required: false }] }], IsSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "IsSelected", required: false }] }], TextColour: [{ type: i0.Input, args: [{ isSignal: true, alias: "TextColour", required: false }] }], BackgroundColour: [{ type: i0.Input, args: [{ isSignal: true, alias: "BackgroundColour", required: false }] }], BorderColour: [{ type: i0.Input, args: [{ isSignal: true, alias: "BorderColour", required: false }] }], IconColour: [{ type: i0.Input, args: [{ isSignal: true, alias: "IconColour", required: false }] }], DropDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "DropDown", required: false }] }], DropDownOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "DropDownOptions", required: false }] }], ViewScale: [{ type: i0.Input, args: [{ isSignal: true, alias: "ViewScale", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }] } });
96
97
 
97
98
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"ect-button.mjs","sources":["../../../projects/ect-button/src/lib/ect-button.component.ts","../../../projects/ect-button/src/lib/ect-button.component.html","../../../projects/ect-button/src/public-api.ts","../../../projects/ect-button/src/ect-button.ts"],"sourcesContent":["import { Component, input, OnInit, output } from '@angular/core';\r\nimport { IBtnDropdownOption } from './models/btn-dropdown-option.model';\r\n\r\nexport interface IEctButtonComponent {\r\n clickAction(): void;\r\n}\r\n\r\n@Component({\r\n selector: 'ect-button',\r\n templateUrl: './ect-button.component.html',\r\n styleUrls: ['./ect-button.component.css']\r\n})\r\nexport class EctButtonComponent implements IEctButtonComponent, OnInit {\r\n \r\n public loaded = false;\r\n public Text = input<string>('');\r\n public Type = input<string>('primary');\r\n public Icon = input<string>('');\r\n public AdditionalCssClasses = input<string>('');\r\n public HideText = input<boolean>(false);\r\n public Disabled = input<boolean>(false);\r\n public TextBeforeIcon = input<boolean>(false);\r\n public IsSelected = input<boolean>(false);\r\n public TextColour = input<string>('');\r\n public BackgroundColour = input<string>('');\r\n public BorderColour = input<string>('');\r\n public IconColour = input<string>('');\r\n public DropDown = input<boolean>(false);\r\n public DropDownOptions = input<IBtnDropdownOption[]>([]);\r\n public ViewScale = input<string>('100');\r\n\r\n public ActualType = '';\r\n public ActualHideText = false;\r\n public IsDropDown = false;\r\n public ActualDropDownOptions: IBtnDropdownOption[] = [];\r\n private ExpectedCssClasses = '';\r\n \r\n public onClick = output<any>();\r\n\r\n public hasIcon = true;\r\n public hasIconColour = this.IconColour() !== '';\r\n private buttonId = '';\r\n\r\n ngOnInit(): void {\r\n let text = this.Text();\r\n let type = this.Type();\r\n let icon = this.Icon();\r\n let additionalCssClasses = this.AdditionalCssClasses();\r\n let hideText = this.HideText();\r\n let disabled = this.Disabled();\r\n let textBeforeIcon = this.TextBeforeIcon();\r\n let isSelected = this.IsSelected();\r\n let textColour = this.TextColour();\r\n let backgroundColour = this.BackgroundColour();\r\n let borderColour = this.BorderColour();\r\n let iconColour = this.IconColour();\r\n let dropDown = this.DropDown();\r\n\r\n this.ExpectedCssClasses = 'btn btn-' + type + ' ' + additionalCssClasses + ' standard-button';\r\n if (isSelected === true) {\r\n this.ExpectedCssClasses += ' selected-background-color';\r\n }\r\n if (dropDown === true) {\r\n this.ExpectedCssClasses += ' dropdown-toggle';\r\n }\r\n\r\n this.ActualType = type !== '' ? type : 'primary';\r\n this.ActualHideText = text === '' ? true : hideText;\r\n this.IsDropDown = dropDown === true;\r\n this.ActualDropDownOptions = this.DropDownOptions();\r\n this.ActualDropDownOptions.forEach((option) => { \r\n option.Id = this.getActionLinkName(option.Text);\r\n });\r\n\r\n const randomNumber = Math.random() * (9999999 - 99) + 99;\r\n this.buttonId = 'button' + Math.round(randomNumber);\r\n\r\n this.loaded = true;\r\n }\r\n\r\n public get CssClasses(): string {\r\n return this.ExpectedCssClasses;\r\n }\r\n\r\n public get ShowText(): boolean {\r\n return !this.HideText();\r\n }\r\n\r\n public clickAction(): void {\r\n this.onClick.emit(null);\r\n }\r\n\r\n public get Enabled(): boolean {\r\n return this.Disabled() !== true;\r\n }\r\n\r\n public get IconBeforeText(): boolean {\r\n return this.TextBeforeIcon() !== true;\r\n }\r\n\r\n public get ButtonName(): string {\r\n return this.buttonId;\r\n }\r\n\r\n writeToConsoleWithText(text: string): void {\r\n console.log(text);\r\n }\r\n\r\n private getActionLinkName(text: string): string {\r\n var actualText = text.replace(' ', '').toLocaleLowerCase();\r\n var name = 'action-' + (actualText !== '' ? actualText + '-' : '');\r\n const randomNumber = Math.random() * (9999999 - 99) + 99;\r\n return name + Math.round(randomNumber);\r\n }\r\n\r\n}\r\n","@if (loaded) {\r\n @if (IsDropDown) {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\"\r\n data-bs-toggle=\"dropdown\"\r\n aria-expanded=\"false\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText) {\r\n <span>&nbsp;{{Text()}}</span>\r\n } @else {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n <ul class=\"dropdown-menu\" [attr.aria-labelledby]=\"ButtonName\">\r\n @for(dropdownItem of ActualDropDownOptions; track dropdownItem) {\r\n @if(dropdownItem.Divider === true) {\r\n <li class=\"dropdown-divider\"></li>\r\n } @else {\r\n <li>\r\n <a (click)=\"dropdownItem.Action()\"\r\n (keydown.enter)=\"dropdownItem.Action()\"\r\n (keydown.space)=\"dropdownItem.Action()\"\r\n [target]=\"dropdownItem.Target\"\r\n [className]=\"dropdownItem.CssClasses\"\r\n [title]=\"dropdownItem.Text\"\r\n [attr.aria-label]=\"dropdownItem.Text\"\r\n [name]=\"dropdownItem.Id\"\r\n [id]=\"dropdownItem.Id\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n <i [className]=\"dropdownItem.Icon\" [style.color]=\"dropdownItem.IconColour\"></i>&nbsp;{{dropdownItem.Text}}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n } @else {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n (click)=\"clickAction()\"\r\n (keydown.enter)=\"clickAction()\"\r\n (keydown.space)=\"clickAction()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText && IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText && IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (ShowText) {\r\n <span>{{Text()}}</span>\r\n }\r\n @if (ShowText && !IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (hasIcon && ShowText && !IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (!ShowText) {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n}","/*\r\n Copyright (c) 2025 Exodus Cloud Technology Solutions Ltd\r\n\r\n The licence agreement can be found at:\r\n https://angular-grid.net/assets/licence/licence_agreement.txt\r\n\r\n*/\r\n\r\nexport * from './lib/ect-button.component';\r\nexport * from './lib/models/btn-dropdown-option.model';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAYa,kBAAkB,CAAA;IAEtB,MAAM,GAAG,KAAK;AACd,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,kDAAC;AACxB,IAAA,IAAI,GAAG,KAAK,CAAS,SAAS,kDAAC;AAC/B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,kDAAC;AACxB,IAAA,oBAAoB,GAAG,KAAK,CAAS,EAAE,kEAAC;AACxC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,sDAAC;AAChC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,sDAAC;AAChC,IAAA,cAAc,GAAG,KAAK,CAAU,KAAK,4DAAC;AACtC,IAAA,UAAU,GAAG,KAAK,CAAU,KAAK,wDAAC;AAClC,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,wDAAC;AAC9B,IAAA,g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;;AAME;;ACNF;;AAEG;;;;"}
1
+ {"version":3,"file":"ect-button.mjs","sources":["../../../projects/ect-button/src/lib/ect-button.component.ts","../../../projects/ect-button/src/lib/ect-button.component.html","../../../projects/ect-button/src/public-api.ts","../../../projects/ect-button/src/ect-button.ts"],"sourcesContent":["import { Component, input, OnInit, output } from '@angular/core';\r\nimport { IBtnDropdownOption } from './models/btn-dropdown-option.model';\r\nimport { AutoIdDirective } from 'ect-auto-id';\r\n\r\nexport interface IEctButtonComponent {\r\n clickAction(): void;\r\n}\r\n\r\n@Component({\r\n selector: 'ect-button',\r\n templateUrl: './ect-button.component.html',\r\n styleUrls: ['./ect-button.component.css'],\r\n imports: [ AutoIdDirective ]\r\n})\r\nexport class EctButtonComponent implements IEctButtonComponent, OnInit {\r\n \r\n public loaded = false;\r\n public Text = input<string>('');\r\n public Type = input<string>('primary');\r\n public Icon = input<string>('');\r\n public AdditionalCssClasses = input<string>('');\r\n public HideText = input<boolean>(false);\r\n public Disabled = input<boolean>(false);\r\n public TextBeforeIcon = input<boolean>(false);\r\n public IsSelected = input<boolean>(false);\r\n public TextColour = input<string>('');\r\n public BackgroundColour = input<string>('');\r\n public BorderColour = input<string>('');\r\n public IconColour = input<string>('');\r\n public DropDown = input<boolean>(false);\r\n public DropDownOptions = input<IBtnDropdownOption[]>([]);\r\n public ViewScale = input<string>('100');\r\n\r\n public ActualType = '';\r\n public ActualHideText = false;\r\n public IsDropDown = false;\r\n public ActualDropDownOptions: IBtnDropdownOption[] = [];\r\n private ExpectedCssClasses = '';\r\n \r\n public onClick = output<any>();\r\n\r\n public hasIcon = true;\r\n public hasIconColour = this.IconColour() !== '';\r\n private buttonId = '';\r\n\r\n ngOnInit(): void {\r\n let text = this.Text();\r\n let type = this.Type();\r\n let icon = this.Icon();\r\n let additionalCssClasses = this.AdditionalCssClasses();\r\n let hideText = this.HideText();\r\n let disabled = this.Disabled();\r\n let textBeforeIcon = this.TextBeforeIcon();\r\n let isSelected = this.IsSelected();\r\n let textColour = this.TextColour();\r\n let backgroundColour = this.BackgroundColour();\r\n let borderColour = this.BorderColour();\r\n let iconColour = this.IconColour();\r\n let dropDown = this.DropDown();\r\n\r\n this.ExpectedCssClasses = 'btn btn-' + type + ' ' + additionalCssClasses + ' standard-button';\r\n if (isSelected === true) {\r\n this.ExpectedCssClasses += ' selected-background-color';\r\n }\r\n if (dropDown === true) {\r\n this.ExpectedCssClasses += ' dropdown-toggle';\r\n }\r\n\r\n this.ActualType = type !== '' ? type : 'primary';\r\n this.ActualHideText = text === '' ? true : hideText;\r\n this.IsDropDown = dropDown === true;\r\n this.ActualDropDownOptions = this.DropDownOptions();\r\n this.ActualDropDownOptions.forEach((option) => { \r\n option.Id = this.getActionLinkName(option.Text);\r\n });\r\n\r\n const randomNumber = Math.random() * (9999999 - 99) + 99;\r\n this.buttonId = 'button' + Math.round(randomNumber);\r\n\r\n this.loaded = true;\r\n }\r\n\r\n public get CssClasses(): string {\r\n return this.ExpectedCssClasses;\r\n }\r\n\r\n public get ShowText(): boolean {\r\n return !this.HideText();\r\n }\r\n\r\n public clickAction(): void {\r\n this.onClick.emit(null);\r\n }\r\n\r\n public get Enabled(): boolean {\r\n return this.Disabled() !== true;\r\n }\r\n\r\n public get IconBeforeText(): boolean {\r\n return this.TextBeforeIcon() !== true;\r\n }\r\n\r\n public get ButtonName(): string {\r\n return this.buttonId;\r\n }\r\n\r\n writeToConsoleWithText(text: string): void {\r\n console.log(text);\r\n }\r\n\r\n private getActionLinkName(text: string): string {\r\n var actualText = text.replace(' ', '').toLocaleLowerCase();\r\n var name = 'action-' + (actualText !== '' ? actualText + '-' : '');\r\n const randomNumber = Math.random() * (9999999 - 99) + 99;\r\n return name + Math.round(randomNumber);\r\n }\r\n\r\n}\r\n","@if (loaded) {\r\n @if (IsDropDown) {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n autoId\r\n data-bs-toggle=\"dropdown\"\r\n aria-expanded=\"false\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText) {\r\n <span>&nbsp;{{Text()}}</span>\r\n } @else {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n <ul class=\"dropdown-menu\" [attr.aria-labelledby]=\"ButtonName\">\r\n @for(dropdownItem of ActualDropDownOptions; track dropdownItem) {\r\n @if(dropdownItem.Divider === true) {\r\n <li class=\"dropdown-divider\"></li>\r\n } @else {\r\n <li>\r\n <a (click)=\"dropdownItem.Action()\"\r\n (keydown.enter)=\"dropdownItem.Action()\"\r\n (keydown.space)=\"dropdownItem.Action()\"\r\n [target]=\"dropdownItem.Target\"\r\n [className]=\"dropdownItem.CssClasses\"\r\n [title]=\"dropdownItem.Text\"\r\n [attr.aria-label]=\"dropdownItem.Text\"\r\n [name]=\"dropdownItem.Id\"\r\n autoId\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n <i [className]=\"dropdownItem.Icon\" [style.color]=\"dropdownItem.IconColour\"></i>&nbsp;{{dropdownItem.Text}}\r\n </a>\r\n </li>\r\n }\r\n }\r\n </ul>\r\n } @else {\r\n <button [className]=\"CssClasses\"\r\n [title]=\"Text()\"\r\n [attr.aria-label]=\"Text()\"\r\n [style.background-color]=\"BackgroundColour()\"\r\n [style.border-color]=\"BorderColour()\"\r\n [style.color]=\"TextColour()\"\r\n (click)=\"clickAction()\"\r\n (keydown.enter)=\"clickAction()\"\r\n (keydown.space)=\"clickAction()\"\r\n type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n autoId\r\n [id]=\"ButtonName\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [style.font-size]=\"ViewScale() + '%'\">\r\n @if (hasIcon && ShowText && IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (ShowText && IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (ShowText) {\r\n <span>{{Text()}}</span>\r\n }\r\n @if (ShowText && !IconBeforeText) {\r\n <span>&nbsp;</span>\r\n }\r\n @if (hasIcon && ShowText && !IconBeforeText) {\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n }\r\n @if (!ShowText) {\r\n <span class=\"center-text\">\r\n @if(hasIconColour) {\r\n <i [className]=\"Icon()\" [style.color]=\"IconColour()\"></i>\r\n } @else {\r\n <i [className]=\"Icon()\"></i>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n}","/*\n Copyright (c) 2025 Exodus Cloud Technology Solutions Ltd\n\n The licence agreement can be found at:\n https://angular-grid.net/assets/licence/licence_agreement.txt\n\n*/\n\nexport * from './lib/ect-button.component';\nexport * from './lib/models/btn-dropdown-option.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAca,kBAAkB,CAAA;IAEtB,MAAM,GAAG,KAAK;AACd,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,kDAAC;AACxB,IAAA,IAAI,GAAG,KAAK,CAAS,SAAS,kDAAC;AAC/B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,kDAAC;AACxB,IAAA,oBAAoB,GAAG,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EAAA,UAAA,EAAA,CAAA,EAAA,CAAA;;2FAEf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;+BACE,YAAY,EAAA,OAAA,EAGb,CAAE,eAAe,CAAE,EAAA,QAAA,EAAA,27HAAA,EAAA,MAAA,EAAA,CAAA,wOAAA,CAAA,EAAA;;;AEZ9B;;;;;;AAME;;ACNF;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ect-button",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
4
4
  "description": "ECT Button with Bootstrap and full WCAG as standard.",
5
5
  "keywords": [
6
6
  "angular",
@@ -17,7 +17,8 @@
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@angular/common": "^21.0.1",
20
- "@angular/core": "^21.0.1"
20
+ "@angular/core": "^21.0.1",
21
+ "ect-auto-id": "^1.21.0"
21
22
  },
22
23
  "dependencies": {
23
24
  "tslib": "^2.5.0"