@libs-ui/components-buttons-status 0.2.140 → 0.2.142

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, inject, input, viewChild, effect, untracked, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { signal, inject, input, viewChild, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
4
4
  import { LibsUiConfigProjectService } from '@libs-ui/services-config-project';
5
5
  import { get, colorStepContrastFromOrigin } from '@libs-ui/utils';
@@ -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":["import { 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: [\n TranslateModule,\n LibsUiComponentsPopoverComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LibsUiComponentsButtonsStatusComponent {\n\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(config, 'color', ''), 90)?.light;\n\n this.buttonEl()?.nativeElement.style.setProperty(`--libs-ui-button-status-${key}`, color);\n });\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":";;;;;;;;MAmBa,sCAAsC,CAAA;;AAGvC,IAAA,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAE5B,IAAA,oBAAoB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;;AAGzD,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAiB,CAAC;;AAGjC,IAAA,QAAQ,GAAG,SAAS,CAAa,UAAU,CAAC,CAAC;AAE9D,IAAA,WAAA,GAAA;QACE,MAAM,CAA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A,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,g+BAuBA,EDTI,MAAA,EAAA,CAAA,6fAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,4FACf,gCAAgC,EAAA,QAAA,EAAA,+DAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,cAAA,EAAA,0CAAA,EAAA,4BAAA,EAAA,kCAAA,EAAA,8BAAA,EAAA,oBAAA,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,CAAA;;4FAIvB,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAZlD,SAAS;+BAEE,mCAAmC,EAAA,UAAA,EAGjC,IAAI,EACP,OAAA,EAAA;wBACP,eAAe;wBACf,gCAAgC;qBACjC,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g+BAAA,EAAA,MAAA,EAAA,CAAA,6fAAA,CAAA,EAAA,CAAA;;;AEjBjD;;AAEG;;;;"}
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":["import { 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: [\n TranslateModule,\n LibsUiComponentsPopoverComponent\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class LibsUiComponentsButtonsStatusComponent {\n\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(config, 'color', ''), 90)?.light;\n\n this.buttonEl()?.nativeElement.style.setProperty(`--libs-ui-button-status-${key}`, color);\n });\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":";;;;;;;;MAmBa,sCAAsC,CAAA;;AAGvC,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;;;AAI7B,IAAA,MAAM,cAAc,GAAA;QAC1B,SAAS,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,0BAA0B,IAAI,CAAC,MAAM,EAAE,CAAC,YAAY,CAAE,CAAA,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,GAAG,IAAG;YACjB,MAAM,KAAK,GAAG,GAAG,C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4BAAA,EAAA,kCAAA,EAAA,8BAAA,EAAA,oBAAA,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;;4FAIvB,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAZlD,SAAS;+BAEE,mCAAmC,EAAA,UAAA,EAGjC,IAAI,EACP,OAAA,EAAA;wBACP,eAAe;wBACf;qBACD,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g+BAAA,EAAA,MAAA,EAAA,CAAA,6fAAA,CAAA,EAAA;;;AEjBjD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libs-ui/components-buttons-status",
3
- "version": "0.2.140",
3
+ "version": "0.2.142",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.0",
6
6
  "@angular/core": "^18.2.0"