angular-toolbox 1.5.2 → 1.5.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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A library that provides useful tools for Angular apps development.
4
4
 
5
- [![Angular Toolbox version](https://img.shields.io/badge/Angular%20Toolbox:1.5.2%231E90FF.svg)]()
5
+ [![Angular Toolbox version](https://img.shields.io/badge/Angular%20Toolbox:1.5.3%231E90FF.svg)]()
6
6
 
7
7
  ## License
8
8
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, NgModule, EventEmitter, Component, Inject, isDevMode, Optional, ChangeDetectionStrategy, Input, Pipe, Output, inject, ViewContainerRef, ViewChild, ViewEncapsulation, HostBinding, HostListener, ContentChildren, Directive } from '@angular/core';
2
+ import { Injectable, NgModule, EventEmitter, Component, Inject, isDevMode, Optional, ChangeDetectionStrategy, Input, Pipe, Output, inject, ViewContainerRef, ViewChild, ViewEncapsulation, HostListener, HostBinding, ContentChildren, Directive } from '@angular/core';
3
3
  import { Observable, from, of } from 'rxjs';
4
4
  import * as i1$1 from '@angular/common';
5
5
  import { DOCUMENT, formatDate, CommonModule, DatePipe, NgStyle, XhrFactory } from '@angular/common';
@@ -586,8 +586,8 @@ class AbstractVersionManager {
586
586
  const ATX_VERSION_CONFIG = {
587
587
  major: 1,
588
588
  minor: 5,
589
- patch: 2,
590
- buildTimestamp: 1733834973900
589
+ patch: 3,
590
+ buildTimestamp: 1734518682739
591
591
  };
592
592
  /**
593
593
  * The public service that exposes the current version of the Angular Toolbox library.
@@ -8924,7 +8924,7 @@ class DropdownComponent extends IdentifiableComponent {
8924
8924
  *
8925
8925
  * @returns Returns `true` whether the dropdown is opened; `false` otherwise.
8926
8926
  */
8927
- isOpened() {
8927
+ isOpen() {
8928
8928
  if (!this._popover)
8929
8929
  return false;
8930
8930
  return this._popover.nativeElement.matches(API_MATCH);
@@ -8977,6 +8977,156 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
8977
8977
  args: ["button"]
8978
8978
  }] } });
8979
8979
 
8980
+ /**
8981
+ * @license
8982
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
8983
+ *
8984
+ * Use of this source code is governed by an MIT-style license that can be
8985
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
8986
+ */
8987
+ /**
8988
+ * The `NavbarComponent` component is a horizontal menu. It can be used to show a list of navigation
8989
+ * links positioned on the top side of your page.
8990
+ */
8991
+ class NavbarComponent {
8992
+ constructor() {
8993
+ /**
8994
+ * Emits a event each time the collapse state of the component changes in responsive mode.
8995
+ */
8996
+ this.stateChange = new EventEmitter();
8997
+ /**
8998
+ * @private
8999
+ */
9000
+ this.menuOpen = false;
9001
+ /**
9002
+ * @private
9003
+ */
9004
+ this.isResponsive = false;
9005
+ }
9006
+ /**
9007
+ * A string that represents the aria label of the button when the menu is expanded in responsive mode.
9008
+ */
9009
+ set expandedLabel(value) {
9010
+ this.expLabel = value;
9011
+ this.setBtnLabel();
9012
+ }
9013
+ get expandedLabel() {
9014
+ return this.expLabel;
9015
+ }
9016
+ /**
9017
+ * A string that represents the aria label of the button when the menu is collapsed in responsive mode.
9018
+ */
9019
+ set collapsedLabel(value) {
9020
+ this.collLabel = value;
9021
+ this.setBtnLabel();
9022
+ }
9023
+ get collapsedLabel() {
9024
+ return this.collLabel;
9025
+ }
9026
+ /**
9027
+ * Forces the menu to open in responsive mode.
9028
+ */
9029
+ open() {
9030
+ if (this.isResponsive === false)
9031
+ return;
9032
+ this.menuOpen = true;
9033
+ this.emitStateEvt();
9034
+ }
9035
+ /**
9036
+ * Forces the menu to close in responsive mode.
9037
+ */
9038
+ close() {
9039
+ if (this.isResponsive === false)
9040
+ return;
9041
+ this.menuOpen = false;
9042
+ this.emitStateEvt();
9043
+ }
9044
+ /**
9045
+ * Returns a boolean that indicates whether the menu is currently in responsive mode (`true`),
9046
+ * or not (`false`).
9047
+ *
9048
+ * @returns `true` whether the menu is in responsive mode; `false` otherwise.
9049
+ */
9050
+ isResponsiveMode() {
9051
+ return this.isResponsive;
9052
+ }
9053
+ /**
9054
+ * Returns a boolean that indicates whether the menu is open in responsive mode (`true`),
9055
+ * or not (`false`).
9056
+ *
9057
+ * @returns `true` whether the menu is open in responsive mode; `false` otherwise.
9058
+ */
9059
+ isOpen() {
9060
+ return this.menuOpen;
9061
+ }
9062
+ /**
9063
+ * @private
9064
+ */
9065
+ ngOnInit() {
9066
+ this.matchMedia();
9067
+ }
9068
+ /**
9069
+ * @private
9070
+ */
9071
+ onClick() {
9072
+ this.menuOpen = !this.menuOpen;
9073
+ this.emitStateEvt();
9074
+ }
9075
+ /**
9076
+ * @private
9077
+ */
9078
+ onResize() {
9079
+ this.matchMedia();
9080
+ }
9081
+ /**
9082
+ * @private
9083
+ */
9084
+ matchMedia() {
9085
+ if (window.matchMedia("(max-width: 768px)").matches) {
9086
+ if (this.isResponsive === true)
9087
+ return;
9088
+ this.isResponsive = true;
9089
+ this.menuOpen = false;
9090
+ this.setBtnLabel();
9091
+ }
9092
+ else {
9093
+ if (this.isResponsive === false)
9094
+ return;
9095
+ this.isResponsive = this.menuOpen = false;
9096
+ this.setBtnLabel();
9097
+ }
9098
+ }
9099
+ /**
9100
+ * @private
9101
+ */
9102
+ setBtnLabel() {
9103
+ this.btnLabel = this.menuOpen ? this.expLabel : this.collLabel;
9104
+ }
9105
+ /**
9106
+ * @private
9107
+ */
9108
+ emitStateEvt() {
9109
+ this.stateChange.emit(this.menuOpen);
9110
+ }
9111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9112
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: NavbarComponent, isStandalone: true, selector: "atx-navbar", inputs: { brandLabel: "brandLabel", expandedLabel: "expandedLabel", collapsedLabel: "collapsedLabel" }, outputs: { stateChange: "stateChange" }, host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0, template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n<nav class=\"atx-navbar\" role=\"menubar\" [class.atx-menu-open]=\"menuOpen\">\r\n <div class=\"atx-menu-action\">\r\n <div class=\"atx-brand\" [attr.aria-label]=\"brandLabel\">\r\n <ng-content select=\"[brand]\"></ng-content>\r\n </div>\r\n <div class=\"atx-burger\" role=\"button\" (click)=\"onClick()\" [attr.aria-label]=\"btnLabel\" [attr.title]=\"btnLabel\">\r\n <ng-content select=\"[icon]\"></ng-content>\r\n </div>\r\n </div>\r\n <ul class=\"atx-menu\" role=\"menu\">\r\n <ng-content></ng-content>\r\n </ul>\r\n</nav>", styles: ["*{margin:0;padding:0;box-sizing:border-box}.atx-menu{list-style:none;display:flex;gap:1em}.atx-navbar,.atx-menu-action{display:flex;align-items:center;justify-content:space-between}.atx-burger{display:none;-webkit-user-select:none;user-select:none}@media (max-width: 768px){.atx-navbar{flex-flow:row wrap}.atx-menu{display:none;text-align:center;width:100%}.atx-menu-action{flex-basis:100%}.atx-burger{display:block;margin-left:auto}.atx-menu-open .atx-menu{display:block}}\n/**\n * @license\n * Copyright Pascal ECHEMANN. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\n */\n"] }); }
9113
+ }
9114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: NavbarComponent, decorators: [{
9115
+ type: Component,
9116
+ args: [{ selector: 'atx-navbar', template: "<!--\r\n * LICENSE\r\n * Copyright Pascal ECHEMANN. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\r\n-->\r\n \r\n<nav class=\"atx-navbar\" role=\"menubar\" [class.atx-menu-open]=\"menuOpen\">\r\n <div class=\"atx-menu-action\">\r\n <div class=\"atx-brand\" [attr.aria-label]=\"brandLabel\">\r\n <ng-content select=\"[brand]\"></ng-content>\r\n </div>\r\n <div class=\"atx-burger\" role=\"button\" (click)=\"onClick()\" [attr.aria-label]=\"btnLabel\" [attr.title]=\"btnLabel\">\r\n <ng-content select=\"[icon]\"></ng-content>\r\n </div>\r\n </div>\r\n <ul class=\"atx-menu\" role=\"menu\">\r\n <ng-content></ng-content>\r\n </ul>\r\n</nav>", styles: ["*{margin:0;padding:0;box-sizing:border-box}.atx-menu{list-style:none;display:flex;gap:1em}.atx-navbar,.atx-menu-action{display:flex;align-items:center;justify-content:space-between}.atx-burger{display:none;-webkit-user-select:none;user-select:none}@media (max-width: 768px){.atx-navbar{flex-flow:row wrap}.atx-menu{display:none;text-align:center;width:100%}.atx-menu-action{flex-basis:100%}.atx-burger{display:block;margin-left:auto}.atx-menu-open .atx-menu{display:block}}\n/**\n * @license\n * Copyright Pascal ECHEMANN. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license\n */\n"] }]
9117
+ }], propDecorators: { stateChange: [{
9118
+ type: Output
9119
+ }], brandLabel: [{
9120
+ type: Input
9121
+ }], expandedLabel: [{
9122
+ type: Input
9123
+ }], collapsedLabel: [{
9124
+ type: Input
9125
+ }], onResize: [{
9126
+ type: HostListener,
9127
+ args: ['window:resize']
9128
+ }] } });
9129
+
8980
9130
  /**
8981
9131
  * @license
8982
9132
  * Copyright Pascal ECHEMANN. All Rights Reserved.
@@ -10034,5 +10184,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
10034
10184
  * Generated bundle index. Do not edit.
10035
10185
  */
10036
10186
 
10037
- export { APP_PRIDGE_REF, ATX_LOGGER_CONFIG, AbstractLogger, AbstractSubscriptionManager, AbstractVersionManager, AbstractWindowService, AnchorLinklDirective, AngularToolboxLogoComponent, AngularToolboxModule, AngularToolboxVersionService, AppBridgeError, AppBridgeService, ArrayList, ArrayListEvent, ArrayListEventType, AtxHttpMockConsoleService, AtxMockDocumentation, AtxMonitoringConsoleComponent, BIGINT, BOOLEAN, BUTTON_ROLE, BorderLayout, BorderLayoutContainer, ButtonRoleDirective, CSS_PROP, ConsoleLogConnector, ContentRendererDirective, DARK_MODE_CONFIG, DEFAULT_LOG_CONNECTOR, DarkModeService, DefaultLogConnector, DialogBackdropType, DialogOutlet, DialogOutletEvent, DialogService, DialogServiceError, DropdownComponent, DropdownEvent, DropdownEventType, EMPTY_STRING, FEATURES, FUNCTION, FetchClient, FetchClientBuilder, FetchClientResponseType, HTTP_MOCKING_FRAMEWORK_CONFIG, HTTP_MOCK_MAX_DELAY, HTTP_MOCK_SERVICE, HtmlLogConnector, HttpHeadersMockBuilder, HttpMock, HttpMockLoggingService, HttpMockProductionPolicy, HttpMockService, HttpMockServiceError, HttpResponseMockBuilder, HttpStatusText, HttpStatusTextFinder, IdentifiableComponent, IntegrityError, LINK_ROLE, LOG_CONFIG_STRING, LOG_ERROR_STRING, LOG_INFO_STRING, LOG_WARNING_STRING, LayoutDragEvent, LayoutDragEventType, LayoutRegion, LayoutRegionError, LogBuilder, LogImpl, LogLevel, LogUtil, LoggerService, NUMBER, NavigateToUrlDirective, OBJECT, STORAGE_KEY, STRING, SYMBOL, SafeHtmlPipe, ScrollService, SubscriptionError, SubscriptionService, UNDEFINED, Uuid, VERSION_CONFIG, VersionService, VersionUtil, WindowFeatureState, WindowService, WindowTarget, httpHeadersMock, httpMockFactory, httpResponseMock };
10187
+ export { APP_PRIDGE_REF, ATX_LOGGER_CONFIG, AbstractLogger, AbstractSubscriptionManager, AbstractVersionManager, AbstractWindowService, AnchorLinklDirective, AngularToolboxLogoComponent, AngularToolboxModule, AngularToolboxVersionService, AppBridgeError, AppBridgeService, ArrayList, ArrayListEvent, ArrayListEventType, AtxHttpMockConsoleService, AtxMockDocumentation, AtxMonitoringConsoleComponent, BIGINT, BOOLEAN, BUTTON_ROLE, BorderLayout, BorderLayoutContainer, ButtonRoleDirective, CSS_PROP, ConsoleLogConnector, ContentRendererDirective, DARK_MODE_CONFIG, DEFAULT_LOG_CONNECTOR, DarkModeService, DefaultLogConnector, DialogBackdropType, DialogOutlet, DialogOutletEvent, DialogService, DialogServiceError, DropdownComponent, DropdownEvent, DropdownEventType, EMPTY_STRING, FEATURES, FUNCTION, FetchClient, FetchClientBuilder, FetchClientResponseType, HTTP_MOCKING_FRAMEWORK_CONFIG, HTTP_MOCK_MAX_DELAY, HTTP_MOCK_SERVICE, HtmlLogConnector, HttpHeadersMockBuilder, HttpMock, HttpMockLoggingService, HttpMockProductionPolicy, HttpMockService, HttpMockServiceError, HttpResponseMockBuilder, HttpStatusText, HttpStatusTextFinder, IdentifiableComponent, IntegrityError, LINK_ROLE, LOG_CONFIG_STRING, LOG_ERROR_STRING, LOG_INFO_STRING, LOG_WARNING_STRING, LayoutDragEvent, LayoutDragEventType, LayoutRegion, LayoutRegionError, LogBuilder, LogImpl, LogLevel, LogUtil, LoggerService, NUMBER, NavbarComponent, NavigateToUrlDirective, OBJECT, STORAGE_KEY, STRING, SYMBOL, SafeHtmlPipe, ScrollService, SubscriptionError, SubscriptionService, UNDEFINED, Uuid, VERSION_CONFIG, VersionService, VersionUtil, WindowFeatureState, WindowService, WindowTarget, httpHeadersMock, httpMockFactory, httpResponseMock };
10038
10188
  //# sourceMappingURL=angular-toolbox.mjs.map