@libs-ui/components-buttons-status 0.2.304 → 0.2.306-3
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { ChangeDetectionStrategy, Component, effect, inject, input, signal, untracked, viewChild } from '@angular/core';
|
|
2
3
|
import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
|
|
3
4
|
import { LibsUiConfigProjectService } from '@libs-ui/services-config-project';
|
|
@@ -21,7 +22,7 @@ export class LibsUiComponentsButtonsStatusComponent {
|
|
|
21
22
|
untracked(() => this.classBinding.set(`libs-ui-buttons-status ${this.config().classInclude}`));
|
|
22
23
|
const keys = ['color', 'background'];
|
|
23
24
|
const config = this.config().type === 'other' ? this.config().otherConfig : get(this.configProjectService.ConfigButtonStatus, this.config().type);
|
|
24
|
-
keys.forEach(key => {
|
|
25
|
+
keys.forEach((key) => {
|
|
25
26
|
const color = get(config, key) || colorStepContrastFromOrigin(get(config, 'color', ''), 90)?.light;
|
|
26
27
|
this.buttonEl()?.nativeElement.style.setProperty(`--libs-ui-button-status-${key}`, color);
|
|
27
28
|
});
|
|
@@ -31,9 +32,6 @@ export class LibsUiComponentsButtonsStatusComponent {
|
|
|
31
32
|
}
|
|
32
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsButtonsStatusComponent, decorators: [{
|
|
33
34
|
type: Component,
|
|
34
|
-
args: [{ selector: 'libs_ui-components-buttons-status', standalone: true, imports: [
|
|
35
|
-
TranslateModule,
|
|
36
|
-
LibsUiComponentsPopoverComponent
|
|
37
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #buttonEl\n [class]=\"classBinding()\">\n @if (config().classIconLeft) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconLeft || config().popoverIconLeft?.ignoreShowPopover\"\n [type]=\"config().popoverIconLeft?.type || 'other'\"\n [config]=\"config().popoverIconLeft?.config\"\n class=\"{{ config().classIconLeft }}\"></i>\n }\n @if (config().label; as label) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [class]=\"config().classLabelInclude || 'libs-ui-font-h6r'\"\n [innerHtml]=\"label | translate\"></span>\n }\n @if (config().classIconRight) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconRight || config().popoverIconRight?.ignoreShowPopover\"\n [type]=\"config().popoverIconRight?.type || 'other'\"\n [config]=\"config().popoverIconRight?.config\"\n class=\"{{ config().classIconRight }}\"></i>\n }\n</button>\n", styles: [".libs-ui-buttons-status{display:flex;align-items:center;justify-content:center;padding:1px 6px;border:none;border-radius:10px;cursor:text;width:max-content;background-color:var(--libs-ui-button-status-background, #E9F1FE)}.libs-ui-buttons-status span,.libs-ui-buttons-status i{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status span:before,.libs-ui-buttons-status i:before{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status:focus{outline:none;box-shadow:none}\n"] }]
|
|
35
|
+
args: [{ selector: 'libs_ui-components-buttons-status', standalone: true, imports: [TranslateModule, LibsUiComponentsPopoverComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #buttonEl\n [class]=\"classBinding()\">\n @if (config().classIconLeft) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconLeft || config().popoverIconLeft?.ignoreShowPopover\"\n [type]=\"config().popoverIconLeft?.type || 'other'\"\n [config]=\"config().popoverIconLeft?.config\"\n class=\"{{ config().classIconLeft }}\"></i>\n }\n @if (config().label; as label) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [class]=\"config().classLabelInclude || 'libs-ui-font-h6r'\"\n [innerHtml]=\"label | translate\"></span>\n }\n @if (config().classIconRight) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconRight || config().popoverIconRight?.ignoreShowPopover\"\n [type]=\"config().popoverIconRight?.type || 'other'\"\n [config]=\"config().popoverIconRight?.config\"\n class=\"{{ config().classIconRight }}\"></i>\n }\n</button>\n", styles: [".libs-ui-buttons-status{display:flex;align-items:center;justify-content:center;padding:1px 6px;border:none;border-radius:10px;cursor:text;width:max-content;background-color:var(--libs-ui-button-status-background, #E9F1FE)}.libs-ui-buttons-status span,.libs-ui-buttons-status i{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status span:before,.libs-ui-buttons-status i:before{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status:focus{outline:none;box-shadow:none}\n"] }]
|
|
38
36
|
}], ctorParameters: () => [] });
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHVzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvY29tcG9uZW50cy9idXR0b25zL3N0YXR1cy9zcmMvc3RhdHVzLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvY29tcG9uZW50cy9idXR0b25zL3N0YXR1cy9zcmMvc3RhdHVzLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHVEQUF1RDtBQUN2RCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBYyxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3BJLE9BQU8sRUFBRSxnQ0FBZ0MsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQy9FLE9BQU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vcG92ZXJJY29uUmlnaHQgfHwgY29uZmlnKCkucG9wb3Zlckljb25SaWdodD8uaWdub3JlU2hvd1BvcG92ZXJcIlxuICAgICAgW3R5cGVdPVwiY29uZmlnKCkucG9wb3Zlckljb25SaWdodD8udHlwZSB8fCAnb3RoZXInXCJcbiAgICAgIFtjb25maWddPVwiY29uZmlnKCkucG9wb3Zlckljb25SaWdodD8uY29uZmlnXCJcbiAgICAgIGNsYXNzPVwie3sgY29uZmlnKCkuY2xhc3NJY29uUmlnaHQgfX1cIj48L2k+XG4gIH1cbjwvYnV0dG9uPlxuIl19
|
|
@@ -6,6 +6,7 @@ import { get, colorStepContrastFromOrigin } from '@libs-ui/utils';
|
|
|
6
6
|
import * as i1 from '@ngx-translate/core';
|
|
7
7
|
import { TranslateModule } from '@ngx-translate/core';
|
|
8
8
|
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9
10
|
class LibsUiComponentsButtonsStatusComponent {
|
|
10
11
|
// #region PROPERTY
|
|
11
12
|
classBinding = signal('');
|
|
@@ -22,7 +23,7 @@ class LibsUiComponentsButtonsStatusComponent {
|
|
|
22
23
|
untracked(() => this.classBinding.set(`libs-ui-buttons-status ${this.config().classInclude}`));
|
|
23
24
|
const keys = ['color', 'background'];
|
|
24
25
|
const config = this.config().type === 'other' ? this.config().otherConfig : get(this.configProjectService.ConfigButtonStatus, this.config().type);
|
|
25
|
-
keys.forEach(key => {
|
|
26
|
+
keys.forEach((key) => {
|
|
26
27
|
const color = get(config, key) || colorStepContrastFromOrigin(get(config, 'color', ''), 90)?.light;
|
|
27
28
|
this.buttonEl()?.nativeElement.style.setProperty(`--libs-ui-button-status-${key}`, color);
|
|
28
29
|
});
|
|
@@ -32,10 +33,7 @@ class LibsUiComponentsButtonsStatusComponent {
|
|
|
32
33
|
}
|
|
33
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsButtonsStatusComponent, decorators: [{
|
|
34
35
|
type: Component,
|
|
35
|
-
args: [{ selector: 'libs_ui-components-buttons-status', standalone: true, imports: [
|
|
36
|
-
TranslateModule,
|
|
37
|
-
LibsUiComponentsPopoverComponent
|
|
38
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #buttonEl\n [class]=\"classBinding()\">\n @if (config().classIconLeft) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconLeft || config().popoverIconLeft?.ignoreShowPopover\"\n [type]=\"config().popoverIconLeft?.type || 'other'\"\n [config]=\"config().popoverIconLeft?.config\"\n class=\"{{ config().classIconLeft }}\"></i>\n }\n @if (config().label; as label) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [class]=\"config().classLabelInclude || 'libs-ui-font-h6r'\"\n [innerHtml]=\"label | translate\"></span>\n }\n @if (config().classIconRight) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconRight || config().popoverIconRight?.ignoreShowPopover\"\n [type]=\"config().popoverIconRight?.type || 'other'\"\n [config]=\"config().popoverIconRight?.config\"\n class=\"{{ config().classIconRight }}\"></i>\n }\n</button>\n", styles: [".libs-ui-buttons-status{display:flex;align-items:center;justify-content:center;padding:1px 6px;border:none;border-radius:10px;cursor:text;width:max-content;background-color:var(--libs-ui-button-status-background, #E9F1FE)}.libs-ui-buttons-status span,.libs-ui-buttons-status i{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status span:before,.libs-ui-buttons-status i:before{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status:focus{outline:none;box-shadow:none}\n"] }]
|
|
36
|
+
args: [{ selector: 'libs_ui-components-buttons-status', standalone: true, imports: [TranslateModule, LibsUiComponentsPopoverComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button #buttonEl\n [class]=\"classBinding()\">\n @if (config().classIconLeft) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconLeft || config().popoverIconLeft?.ignoreShowPopover\"\n [type]=\"config().popoverIconLeft?.type || 'other'\"\n [config]=\"config().popoverIconLeft?.config\"\n class=\"{{ config().classIconLeft }}\"></i>\n }\n @if (config().label; as label) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [class]=\"config().classLabelInclude || 'libs-ui-font-h6r'\"\n [innerHtml]=\"label | translate\"></span>\n }\n @if (config().classIconRight) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconRight || config().popoverIconRight?.ignoreShowPopover\"\n [type]=\"config().popoverIconRight?.type || 'other'\"\n [config]=\"config().popoverIconRight?.config\"\n class=\"{{ config().classIconRight }}\"></i>\n }\n</button>\n", styles: [".libs-ui-buttons-status{display:flex;align-items:center;justify-content:center;padding:1px 6px;border:none;border-radius:10px;cursor:text;width:max-content;background-color:var(--libs-ui-button-status-background, #E9F1FE)}.libs-ui-buttons-status span,.libs-ui-buttons-status i{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status span:before,.libs-ui-buttons-status i:before{color:var(--libs-ui-button-status-color, #2B80FF)}.libs-ui-buttons-status:focus{outline:none;box-shadow:none}\n"] }]
|
|
39
37
|
}], ctorParameters: () => [] });
|
|
40
38
|
|
|
41
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libs-ui-components-buttons-status.mjs","sources":["../../../../../../libs-ui/components/buttons/status/src/status.component.ts","../../../../../../libs-ui/components/buttons/status/src/status.component.html","../../../../../../libs-ui/components/buttons/status/src/libs-ui-components-buttons-status.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"libs-ui-components-buttons-status.mjs","sources":["../../../../../../libs-ui/components/buttons/status/src/status.component.ts","../../../../../../libs-ui/components/buttons/status/src/status.component.html","../../../../../../libs-ui/components/buttons/status/src/libs-ui-components-buttons-status.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { ChangeDetectionStrategy, Component, effect, ElementRef, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';\nimport { LibsUiConfigProjectService } from '@libs-ui/services-config-project';\nimport { colorStepContrastFromOrigin, get } from '@libs-ui/utils';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { IButtonStatus } from './interfaces';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-buttons-status',\n templateUrl: './status.component.html',\n styleUrl: './status.component.scss',\n standalone: true,\n imports: [TranslateModule, LibsUiComponentsPopoverComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LibsUiComponentsButtonsStatusComponent {\n // #region PROPERTY\n protected classBinding = signal('');\n\n private configProjectService = inject(LibsUiConfigProjectService);\n\n // #region INPUT\n readonly config = input.required<IButtonStatus>();\n\n /* VIEW CHILD */\n private readonly buttonEl = viewChild<ElementRef>('buttonEl');\n\n constructor() {\n effect(() => this.setClassByType());\n }\n\n /* FUNCTIONS */\n private async setClassByType() {\n untracked(() => this.classBinding.set(`libs-ui-buttons-status ${this.config().classInclude}`));\n const keys = ['color', 'background'];\n const config = this.config().type === 'other' ? this.config().otherConfig : get(this.configProjectService.ConfigButtonStatus, this.config().type);\n\n keys.forEach((key) => {\n const color = get(config, key) || colorStepContrastFromOrigin(get<any>(config, 'color', ''), 90)?.light;\n\n this.buttonEl()?.nativeElement.style.setProperty(`--libs-ui-button-status-${key}`, color);\n });\n }\n}\n","<button #buttonEl\n [class]=\"classBinding()\">\n @if (config().classIconLeft) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconLeft || config().popoverIconLeft?.ignoreShowPopover\"\n [type]=\"config().popoverIconLeft?.type || 'other'\"\n [config]=\"config().popoverIconLeft?.config\"\n class=\"{{ config().classIconLeft }}\"></i>\n }\n @if (config().label; as label) {\n <span LibsUiComponentsPopoverDirective\n [type]=\"'text'\"\n [class]=\"config().classLabelInclude || 'libs-ui-font-h6r'\"\n [innerHtml]=\"label | translate\"></span>\n }\n @if (config().classIconRight) {\n <i LibsUiComponentsPopoverDirective\n [ignoreShowPopover]=\"!config().popoverIconRight || config().popoverIconRight?.ignoreShowPopover\"\n [type]=\"config().popoverIconRight?.type || 'other'\"\n [config]=\"config().popoverIconRight?.config\"\n class=\"{{ config().classIconRight }}\"></i>\n }\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;MAiBa,sCAAsC,CAAA;;AAEvC,IAAA,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;AAE3B,IAAA,oBAAoB,GAAG,MAAM,CAAC,0BAA0B,CAAC;;AAGxD,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAiB;;AAGhC,IAAA,QAAQ,GAAG,SAAS,CAAa,UAAU,CAAC;AAE7D,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IACrC;;AAGQ,IAAA,MAAM,cAAc,GAAA;QAC1B,SAAS,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,0BAA0B,IAAI,CAAC,MAAM,EAAE,CAAC,YAAY,CAAA,CAAE,CAAC,CAAC;AAC9F,QAAA,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC;AACpC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC;AAEjJ,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;YACnB,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,2BAA2B,CAAC,GAAG,CAAM,MAAM,EA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AA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,wBAAA,EAAA,wBAAA,EAAA,qBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGhD,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBATlD,SAAS;+BAEE,mCAAmC,EAAA,UAAA,EAGjC,IAAI,EAAA,OAAA,EACP,CAAC,eAAe,EAAE,gCAAgC,CAAC,EAAA,eAAA,EAC3C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g+BAAA,EAAA,MAAA,EAAA,CAAA,6fAAA,CAAA,EAAA;;;AEfjD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-buttons-status",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.306-3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=18.0.0",
|
|
6
|
-
"@libs-ui/components-popover": "0.2.
|
|
7
|
-
"@libs-ui/services-config-project": "0.2.
|
|
8
|
-
"@libs-ui/utils": "0.2.
|
|
6
|
+
"@libs-ui/components-popover": "0.2.306-3",
|
|
7
|
+
"@libs-ui/services-config-project": "0.2.306-3",
|
|
8
|
+
"@libs-ui/utils": "0.2.306-3",
|
|
9
9
|
"@ngx-translate/core": "^15.0.0"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": false,
|