ect-button 1.19.5 → 1.19.7

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
@@ -1,6 +1,6 @@
1
1
  # EctButton
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
4
4
 
5
5
  ## Description
6
6
 
@@ -8,13 +8,16 @@ This component allows for the creation of a WCAG compliant button, with addition
8
8
 
9
9
  ## Usage
10
10
 
11
- After installing the NPM package, to use the component, first load the package into your modules file:
11
+ After installing the NPM package, to use the component, first import the EctButtonComponent into your component's Imports array, e.g.:
12
12
  ```javascript
13
- import { EctButtonModule } from 'ect-button';
13
+ @Component({
14
+ selector: 'my-component',
15
+ imports: [ EctButtonComponent ],
16
+ templateUrl: './my-component.component.html',
17
+ styleUrl: './my-component.css'
18
+ })
14
19
  ```
15
20
 
16
- Then add EctButtonModule into your imports array.
17
-
18
21
  In your HTML template, to add a primary button with an icon and an onClick event, use this:
19
22
  ```html
20
23
  <ect-button Text="Add Event to Console"
@@ -1,7 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, Component, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import { BrowserModule } from '@angular/platform-browser';
4
- import { EctLinkModule } from 'ect-link';
2
+ import { input, output, Component } from '@angular/core';
5
3
 
6
4
  class EctButtonComponent {
7
5
  constructor() {
@@ -90,43 +88,15 @@ class EctButtonComponent {
90
88
  return name + Math.round(randomNumber);
91
89
  }
92
90
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: EctButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
93
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: EctButtonComponent, isStandalone: false, 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 } }, 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 @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 [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 <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 type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\">\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 { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", 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 } }, 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 @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 [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 <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 type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\">\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"] }); }
94
92
  }
95
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: EctButtonComponent, decorators: [{
96
94
  type: Component,
97
- args: [{ selector: 'ect-button', standalone: false, 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 @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 [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 <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 type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\">\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"] }]
98
- }] });
99
-
100
- class EctButtonModule {
101
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: EctButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
102
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: EctButtonModule, bootstrap: [EctButtonComponent], declarations: [EctButtonComponent], imports: [BrowserModule,
103
- EctLinkModule], exports: [EctButtonComponent] }); }
104
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: EctButtonModule, imports: [BrowserModule,
105
- EctLinkModule] }); }
106
- }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: EctButtonModule, decorators: [{
108
- type: NgModule,
109
- args: [{
110
- declarations: [
111
- EctButtonComponent
112
- ],
113
- imports: [
114
- BrowserModule,
115
- EctLinkModule
116
- ],
117
- exports: [
118
- EctButtonComponent
119
- ],
120
- bootstrap: [
121
- EctButtonComponent
122
- ],
123
- providers: [],
124
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
125
- }]
95
+ 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 @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 [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 <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 type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\">\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"] }]
126
96
  }] });
127
97
 
128
98
  /*
129
- Copyright (c) 2024 Exodus Cloud Technology Solutions Ltd
99
+ Copyright (c) 2025 Exodus Cloud Technology Solutions Ltd
130
100
 
131
101
  The licence agreement can be found at:
132
102
  https://angular-grid.net/assets/licence/licence_agreement.txt
@@ -137,5 +107,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
137
107
  * Generated bundle index. Do not edit.
138
108
  */
139
109
 
140
- export { EctButtonComponent, EctButtonModule };
110
+ export { EctButtonComponent };
141
111
  //# sourceMappingURL=ect-button.mjs.map
@@ -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/lib/ect-button.module.ts","../../../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 standalone: false\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\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 @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 [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 <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 type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\">\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}","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\n\r\nimport { EctLinkModule } from 'ect-link';\r\n\r\nimport { EctButtonComponent } from './ect-button.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n EctButtonComponent\r\n ],\r\n imports: [\r\n BrowserModule,\r\n EctLinkModule\r\n ],\r\n exports: [\r\n EctButtonComponent\r\n ],\r\n bootstrap: [\r\n EctButtonComponent\r\n ],\r\n providers: [ ],\r\n schemas: [ CUSTOM_ELEMENTS_SCHEMA ]\r\n})\r\nexport class EctButtonModule { }\r\n","/*\n Copyright (c) 2024 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.module';\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":";;;;;MAaa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;QAQS,IAAM,CAAA,MAAA,GAAG,KAAK;AACd,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,SAAS,CAAC;AAC/B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACxB,QAAA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAS,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAU,KAAK,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,KAAK,CAAC;AAClC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAS,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE,CAAC;AAChC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC;A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Ae,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EALxB,SAAA,EAAA,CAAA,kBAAkB,CAVlB,EAAA,YAAA,EAAA,CAAA,kBAAkB,aAGlB,aAAa;AACb,YAAA,aAAa,aAGb,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAQT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAZxB,aAAa;YACb,aAAa,CAAA,EAAA,CAAA,CAAA;;2FAWJ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAjB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE,EAAI;oBACf,OAAO,EAAE,CAAE,sBAAsB;AAClC,iBAAA;;;ACvBD;;;;;;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\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\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 @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 [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 <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 type=\"button\"\r\n [disabled]=\"!Enabled\"\r\n [name]=\"ButtonName\"\r\n [id]=\"ButtonName\">\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":";;;MAYa,kBAAkB,CAAA;AAL/B,IAAA,WAAA,GAAA;QAOS,IAAM,CAAA,MAAA,GAAG,KAAK;AACd,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,SAAS,CAAC;AAC/B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACxB,QAAA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAS,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAChC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAU,KAAK,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,KAAK,CAAC;AAClC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAS,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE,CAAC;AAChC,QAAA,IAAA,CAAA,UAAU,GAAG,KAA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declare class EctButtonComponent implements IEctButtonComponent, OnInit {
39
39
  writeToConsoleWithText(text: string): void;
40
40
  private getActionLinkName;
41
41
  static ɵfac: i0.ɵɵFactoryDeclaration<EctButtonComponent, never>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<EctButtonComponent, "ect-button", never, { "Text": { "alias": "Text"; "required": false; "isSignal": true; }; "Type": { "alias": "Type"; "required": false; "isSignal": true; }; "Icon": { "alias": "Icon"; "required": false; "isSignal": true; }; "AdditionalCssClasses": { "alias": "AdditionalCssClasses"; "required": false; "isSignal": true; }; "HideText": { "alias": "HideText"; "required": false; "isSignal": true; }; "Disabled": { "alias": "Disabled"; "required": false; "isSignal": true; }; "TextBeforeIcon": { "alias": "TextBeforeIcon"; "required": false; "isSignal": true; }; "IsSelected": { "alias": "IsSelected"; "required": false; "isSignal": true; }; "TextColour": { "alias": "TextColour"; "required": false; "isSignal": true; }; "BackgroundColour": { "alias": "BackgroundColour"; "required": false; "isSignal": true; }; "BorderColour": { "alias": "BorderColour"; "required": false; "isSignal": true; }; "IconColour": { "alias": "IconColour"; "required": false; "isSignal": true; }; "DropDown": { "alias": "DropDown"; "required": false; "isSignal": true; }; "DropDownOptions": { "alias": "DropDownOptions"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, false, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<EctButtonComponent, "ect-button", never, { "Text": { "alias": "Text"; "required": false; "isSignal": true; }; "Type": { "alias": "Type"; "required": false; "isSignal": true; }; "Icon": { "alias": "Icon"; "required": false; "isSignal": true; }; "AdditionalCssClasses": { "alias": "AdditionalCssClasses"; "required": false; "isSignal": true; }; "HideText": { "alias": "HideText"; "required": false; "isSignal": true; }; "Disabled": { "alias": "Disabled"; "required": false; "isSignal": true; }; "TextBeforeIcon": { "alias": "TextBeforeIcon"; "required": false; "isSignal": true; }; "IsSelected": { "alias": "IsSelected"; "required": false; "isSignal": true; }; "TextColour": { "alias": "TextColour"; "required": false; "isSignal": true; }; "BackgroundColour": { "alias": "BackgroundColour"; "required": false; "isSignal": true; }; "BorderColour": { "alias": "BorderColour"; "required": false; "isSignal": true; }; "IconColour": { "alias": "IconColour"; "required": false; "isSignal": true; }; "DropDown": { "alias": "DropDown"; "required": false; "isSignal": true; }; "DropDownOptions": { "alias": "DropDownOptions"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, true, never>;
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ect-button",
3
- "version": "1.19.5",
3
+ "version": "1.19.7",
4
4
  "description": "ECT Button with Bootstrap and full WCAG as standard.",
5
5
  "keywords": [
6
6
  "angular",
@@ -16,8 +16,8 @@
16
16
  "type": "git"
17
17
  },
18
18
  "peerDependencies": {
19
- "@angular/common": "^19.0.0",
20
- "@angular/core": "^19.0.0"
19
+ "@angular/common": "^19.2.0",
20
+ "@angular/core": "^19.2.0"
21
21
  },
22
22
  "dependencies": {
23
23
  "tslib": "^2.5.0"
package/public-api.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export * from './lib/ect-button.module';
2
1
  export * from './lib/ect-button.component';
3
2
  export * from './lib/models/btn-dropdown-option.model';
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./ect-button.component";
3
- import * as i2 from "@angular/platform-browser";
4
- import * as i3 from "ect-link";
5
- export declare class EctButtonModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<EctButtonModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<EctButtonModule, [typeof i1.EctButtonComponent], [typeof i2.BrowserModule, typeof i3.EctLinkModule], [typeof i1.EctButtonComponent]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<EctButtonModule>;
9
- }