angular-toolbox 1.3.1 → 1.3.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.
Files changed (25) hide show
  1. package/README.md +1 -1
  2. package/esm2022/lib/component/dropdown/dropdown.component.mjs +118 -0
  3. package/esm2022/lib/component/index.mjs +2 -1
  4. package/esm2022/lib/component/layout/border-layout/border-layout.component.mjs +2 -1
  5. package/esm2022/lib/model/business/ui/dropdown/dropdown-event-type.enum.mjs +22 -0
  6. package/esm2022/lib/model/business/ui/dropdown/dropdown-position.mjs +9 -0
  7. package/esm2022/lib/model/business/ui/dropdown/dropdown-state.mjs +9 -0
  8. package/esm2022/lib/model/business/ui/dropdown/dropdown.event.mjs +27 -0
  9. package/esm2022/lib/model/business/ui/dropdown/index.mjs +6 -0
  10. package/esm2022/lib/model/business/ui/dropdown/popover-state.mjs +9 -0
  11. package/esm2022/lib/model/business/ui/index.mjs +2 -1
  12. package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +5 -5
  13. package/fesm2022/angular-toolbox.mjs +194 -6
  14. package/fesm2022/angular-toolbox.mjs.map +1 -1
  15. package/lib/component/dropdown/dropdown.component.d.ts +87 -0
  16. package/lib/component/index.d.ts +1 -0
  17. package/lib/component/layout/border-layout/border-layout.component.d.ts +1 -0
  18. package/lib/model/business/ui/dropdown/dropdown-event-type.enum.d.ts +20 -0
  19. package/lib/model/business/ui/dropdown/dropdown-position.d.ts +15 -0
  20. package/lib/model/business/ui/dropdown/dropdown-state.d.ts +11 -0
  21. package/lib/model/business/ui/dropdown/dropdown.event.d.ts +40 -0
  22. package/lib/model/business/ui/dropdown/index.d.ts +5 -0
  23. package/lib/model/business/ui/dropdown/popover-state.d.ts +11 -0
  24. package/lib/model/business/ui/index.d.ts +1 -0
  25. package/package.json +1 -1
@@ -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, ViewEncapsulation, HostBinding, HostListener, ViewChild, ContentChildren, Directive } from '@angular/core';
2
+ import { Injectable, NgModule, EventEmitter, Component, Inject, isDevMode, Optional, ChangeDetectionStrategy, Input, Pipe, Output, inject, ViewEncapsulation, ViewChild, HostBinding, HostListener, 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';
@@ -583,11 +583,11 @@ class AbstractVersionManager {
583
583
  * @private
584
584
  * The current version of the Angular Toolbox library.
585
585
  */
586
- const LAYERS_VERSION_CONFIG = {
586
+ const ATX_VERSION_CONFIG = {
587
587
  major: 1,
588
588
  minor: 3,
589
- patch: 1,
590
- buildTimestamp: 1726585120773
589
+ patch: 3,
590
+ buildTimestamp: 1727082987006
591
591
  };
592
592
  /**
593
593
  * The public service that exposes the current version of the Angular Toolbox library.
@@ -597,7 +597,7 @@ class AngularToolboxVersionService extends AbstractVersionManager {
597
597
  * @private
598
598
  */
599
599
  constructor() {
600
- super(LAYERS_VERSION_CONFIG);
600
+ super(ATX_VERSION_CONFIG);
601
601
  }
602
602
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AngularToolboxVersionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
603
603
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: AngularToolboxVersionService }); }
@@ -1163,6 +1163,79 @@ var LayoutDragEventType;
1163
1163
  LayoutDragEventType["DRAGGING"] = "dragging";
1164
1164
  })(LayoutDragEventType || (LayoutDragEventType = {}));
1165
1165
 
1166
+ /**
1167
+ * @license
1168
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
1169
+ *
1170
+ * Use of this source code is governed by an MIT-style license that can be
1171
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
1172
+ */
1173
+
1174
+ /**
1175
+ * @license
1176
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
1177
+ *
1178
+ * Use of this source code is governed by an MIT-style license that can be found in
1179
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
1180
+ */
1181
+ /**
1182
+ * The `DropdownEvent` class is an event that represents an interaction with a dropdown container.
1183
+ */
1184
+ class DropdownEvent {
1185
+ /**
1186
+ * Creates a new `DropdownEvent` instance.
1187
+ *
1188
+ * @param target The dropdown container that triggered this event.
1189
+ * @param type The type of this event.
1190
+ * @param newState The state the dropdown container is transitioning to.
1191
+ * @param oldState The state the dropdown container is transitioning from.
1192
+ */
1193
+ constructor(target, type, newState, oldState) {
1194
+ this.target = target;
1195
+ this.type = type;
1196
+ this.newState = newState;
1197
+ this.oldState = oldState;
1198
+ }
1199
+ }
1200
+
1201
+ /**
1202
+ * @license
1203
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
1204
+ *
1205
+ * Use of this source code is governed by an MIT-style license that can be found in
1206
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
1207
+ */
1208
+ /**
1209
+ * Defines the type of a `DropdownEvent` instance.
1210
+ */
1211
+ var DropdownEventType;
1212
+ (function (DropdownEventType) {
1213
+ /**
1214
+ * Defines an event fired on a dropdown component just after it is shown or hidden.
1215
+ */
1216
+ DropdownEventType["TOGGLE"] = "toggle";
1217
+ /**
1218
+ * Defines an event fired on a dropdown component just before it is shown or hidden.
1219
+ */
1220
+ DropdownEventType["BEFORE_TOGGLE"] = "beforetoggle";
1221
+ })(DropdownEventType || (DropdownEventType = {}));
1222
+
1223
+ /**
1224
+ * @license
1225
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
1226
+ *
1227
+ * Use of this source code is governed by an MIT-style license that can be
1228
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
1229
+ */
1230
+
1231
+ /**
1232
+ * @license
1233
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
1234
+ *
1235
+ * Use of this source code is governed by an MIT-style license that can be
1236
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
1237
+ */
1238
+
1166
1239
  /**
1167
1240
  * @license
1168
1241
  * Copyright Pascal ECHEMANN. All Rights Reserved.
@@ -7851,6 +7924,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
7851
7924
  type: Optional
7852
7925
  }] }] });
7853
7926
 
7927
+ /**
7928
+ * @license
7929
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
7930
+ *
7931
+ * Use of this source code is governed by an MIT-style license that can be
7932
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7933
+ */
7934
+ /**
7935
+ * @private
7936
+ */
7937
+ const API_MATCH = ':popover-open';
7938
+ /**
7939
+ * The ATX dropdown component allows to create popup containers that are displayed by clicking on a button.
7940
+ * The content of the container is defined by Developer.
7941
+ * This component is part of the LAF-less API.
7942
+ */
7943
+ class DropdownComponent extends IdentifiableComponent {
7944
+ /**
7945
+ * @private
7946
+ */
7947
+ constructor() {
7948
+ super();
7949
+ /**
7950
+ * An event fired on the dropdown component just after it is shown or hidden.
7951
+ */
7952
+ this.toggle = new EventEmitter();
7953
+ /**
7954
+ * An event fired on the dropdown component just before it is shown or hidden.
7955
+ */
7956
+ this.beforeToggle = new EventEmitter();
7957
+ /**
7958
+ * Sets the vertical position of the content container.
7959
+ */
7960
+ this.vPos = "bottom";
7961
+ /**
7962
+ * Sets the horizontal position of the content container.
7963
+ */
7964
+ this.hPos = "left";
7965
+ /**
7966
+ * Indicates whether the content container can be "light dismissed" by selecting outside the popover area
7967
+ * (`auto`), or not (`manual`).
7968
+ */
7969
+ this.popoverState = "auto";
7970
+ this.id = this.getID().toString();
7971
+ }
7972
+ /**
7973
+ * Hides the dropdown container.
7974
+ */
7975
+ hideContent() {
7976
+ if (!this._popover)
7977
+ return;
7978
+ this._popover.nativeElement.hidePopover();
7979
+ }
7980
+ /**
7981
+ * Displays the dropdown container.
7982
+ */
7983
+ showContent() {
7984
+ if (!this._popover)
7985
+ return;
7986
+ this._popover.nativeElement.showPopover();
7987
+ }
7988
+ /**
7989
+ * Returns the display state of the dropdown.
7990
+ *
7991
+ * @returns Returns `true` whether the dropdown is opened; `false` otherwise.
7992
+ */
7993
+ isOpened() {
7994
+ if (!this._popover)
7995
+ return false;
7996
+ return this._popover.nativeElement.matches(API_MATCH);
7997
+ }
7998
+ /**
7999
+ * @private
8000
+ */
8001
+ onBeforeToggle(event) {
8002
+ this.beforeToggle.emit(this.buildEvent(event, DropdownEventType.BEFORE_TOGGLE));
8003
+ }
8004
+ /**
8005
+ * @private
8006
+ */
8007
+ onToggle(event) {
8008
+ this.toggle.emit(this.buildEvent(event, DropdownEventType.TOGGLE));
8009
+ }
8010
+ /**
8011
+ * @private
8012
+ */
8013
+ buildEvent(event, type) {
8014
+ return new DropdownEvent(this, type, event.newState, event.oldState);
8015
+ }
8016
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8017
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.3", type: DropdownComponent, isStandalone: true, selector: "atx-dropdown", inputs: { buttonClass: "buttonClass", containerClass: "containerClass", vPos: "vPos", hPos: "hPos", popoverState: "popoverState" }, outputs: { toggle: "toggle", beforeToggle: "beforeToggle" }, viewQueries: [{ propertyName: "_popover", first: true, predicate: ["popover"], descendants: true }], usesInheritance: true, 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<div class=\"atx-dropdown-container\" [class]=\"containerClass\">\r\n <button [class]=\"buttonClass\" [attr.popovertarget]=\"id\">\r\n <ng-content></ng-content>\r\n </button>\r\n <div #popover [attr.popover]=\"popoverState\" [attr.id]=\"id\" (toggle)=\"onToggle($event)\" (beforetoggle)=\"onBeforeToggle($event)\"></div>\r\n <div class=\"atx-dropdown-popover\"\r\n [class.atx-dropdown-v-start]=\"vPos === 'start'\"\r\n [class.atx-dropdown-top]=\"vPos === 'top'\"\r\n [class.atx-dropdown-middle]=\"vPos === 'middle'\"\r\n [class.atx-dropdown-bottom]=\"vPos === 'bottom'\"\r\n [class.atx-dropdown-v-end]=\"vPos === 'end'\"\r\n [class.atx-dropdown-h-start]=\"hPos === 'start'\"\r\n [class.atx-dropdown-left]=\"hPos === 'left'\"\r\n [class.atx-dropdown-center]=\"hPos === 'center'\"\r\n [class.atx-dropdown-right]=\"hPos === 'right'\"\r\n [class.atx-dropdown-h-end]=\"hPos === 'end'\"\r\n [class.atx-dropdown-centered]=\"hPos === 'center' && vPos === 'middle'\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".atx-dropdown-container{position:relative}[popover]:popover-open{inset:unset;border:none;background:none;margin:0;padding:0}[popover]:popover-open+.atx-dropdown-popover{display:block}.atx-dropdown-popover{display:none;position:absolute;left:0;margin:0;padding:0;z-index:100;height:auto;width:max-content}.atx-dropdown-v-start{bottom:unset;top:0}.atx-dropdown-top{bottom:calc(100% + var(--atx-dropdown-gutter, 2px));top:unset}.atx-dropdown-middle{bottom:unset;top:50%;transform:translateY(-50%)}.atx-dropdown-bottom{bottom:unset;top:calc(100% + var(--atx-dropdown-gutter, 2px))}.atx-dropdown-v-end{bottom:0;top:unset}.atx-dropdown-h-start{right:calc(100% + var(--atx-dropdown-gutter, 2px));left:unset}.atx-dropdown-left{left:0;right:unset}.atx-dropdown-center{left:50%;transform:translate(-50%);right:unset}.atx-dropdown-right{right:0;left:unset}.atx-dropdown-h-end{right:unset;left:calc(100% + var(--atx-dropdown-gutter, 2px))}.atx-dropdown-centered{transform:translate(-50%,-50%)}\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"] }); }
8018
+ }
8019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: DropdownComponent, decorators: [{
8020
+ type: Component,
8021
+ args: [{ selector: 'atx-dropdown', standalone: true, 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<div class=\"atx-dropdown-container\" [class]=\"containerClass\">\r\n <button [class]=\"buttonClass\" [attr.popovertarget]=\"id\">\r\n <ng-content></ng-content>\r\n </button>\r\n <div #popover [attr.popover]=\"popoverState\" [attr.id]=\"id\" (toggle)=\"onToggle($event)\" (beforetoggle)=\"onBeforeToggle($event)\"></div>\r\n <div class=\"atx-dropdown-popover\"\r\n [class.atx-dropdown-v-start]=\"vPos === 'start'\"\r\n [class.atx-dropdown-top]=\"vPos === 'top'\"\r\n [class.atx-dropdown-middle]=\"vPos === 'middle'\"\r\n [class.atx-dropdown-bottom]=\"vPos === 'bottom'\"\r\n [class.atx-dropdown-v-end]=\"vPos === 'end'\"\r\n [class.atx-dropdown-h-start]=\"hPos === 'start'\"\r\n [class.atx-dropdown-left]=\"hPos === 'left'\"\r\n [class.atx-dropdown-center]=\"hPos === 'center'\"\r\n [class.atx-dropdown-right]=\"hPos === 'right'\"\r\n [class.atx-dropdown-h-end]=\"hPos === 'end'\"\r\n [class.atx-dropdown-centered]=\"hPos === 'center' && vPos === 'middle'\">\r\n <ng-content select=\"[content]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".atx-dropdown-container{position:relative}[popover]:popover-open{inset:unset;border:none;background:none;margin:0;padding:0}[popover]:popover-open+.atx-dropdown-popover{display:block}.atx-dropdown-popover{display:none;position:absolute;left:0;margin:0;padding:0;z-index:100;height:auto;width:max-content}.atx-dropdown-v-start{bottom:unset;top:0}.atx-dropdown-top{bottom:calc(100% + var(--atx-dropdown-gutter, 2px));top:unset}.atx-dropdown-middle{bottom:unset;top:50%;transform:translateY(-50%)}.atx-dropdown-bottom{bottom:unset;top:calc(100% + var(--atx-dropdown-gutter, 2px))}.atx-dropdown-v-end{bottom:0;top:unset}.atx-dropdown-h-start{right:calc(100% + var(--atx-dropdown-gutter, 2px));left:unset}.atx-dropdown-left{left:0;right:unset}.atx-dropdown-center{left:50%;transform:translate(-50%);right:unset}.atx-dropdown-right{right:0;left:unset}.atx-dropdown-h-end{right:unset;left:calc(100% + var(--atx-dropdown-gutter, 2px))}.atx-dropdown-centered{transform:translate(-50%,-50%)}\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"] }]
8022
+ }], ctorParameters: () => [], propDecorators: { toggle: [{
8023
+ type: Output
8024
+ }], beforeToggle: [{
8025
+ type: Output
8026
+ }], buttonClass: [{
8027
+ type: Input
8028
+ }], containerClass: [{
8029
+ type: Input
8030
+ }], vPos: [{
8031
+ type: Input
8032
+ }], hPos: [{
8033
+ type: Input
8034
+ }], popoverState: [{
8035
+ type: Input
8036
+ }], _popover: [{
8037
+ type: ViewChild,
8038
+ args: ["popover"]
8039
+ }] } });
8040
+
7854
8041
  /**
7855
8042
  * @license
7856
8043
  * Copyright Pascal ECHEMANN. All Rights Reserved.
@@ -8418,6 +8605,7 @@ class BorderLayoutRenderer extends IdentifiableComponent {
8418
8605
  /**
8419
8606
  * A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
8420
8607
  * Each region is defined by a `BorderLayoutContainer` instance, and is identified by a corresponding constant: `NORTH`, `SOUTH`, `EAST`, `WEST`, and `CENTER`.
8608
+ * This component is part of the LAF-less API.
8421
8609
  */
8422
8610
  class BorderLayout extends IdentifiableComponent {
8423
8611
  /**
@@ -8828,5 +9016,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
8828
9016
  * Generated bundle index. Do not edit.
8829
9017
  */
8830
9018
 
8831
- export { APP_PRIDGE_REF, ATX_LOGGER_CONFIG, AbstractLogger, AbstractSubscriptionManager, AbstractVersionManager, AbstractWindowService, AnchorLinklDirective, AngularToolboxLogoComponent, AngularToolboxModule, AngularToolboxVersionService, AppBridgeError, AppBridgeService, ArrayList, ArrayListEvent, ArrayListEventType, AtxHttpMockConsoleService, AtxMonitoringConsoleComponent, BIGINT, BOOLEAN, BUTTON_ROLE, BorderLayout, BorderLayoutContainer, ButtonRoleDirective, CSS_PROP, ConsoleLogConnector, ContentRendererDirective, DARK_MODE_CONFIG, DEFAULT_LOG_CONNECTOR, DarkModeService, DefaultLogConnector, 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, IdentifiableComponent, IntegrityError, LINK_ROLE, LOG_CONFIG_STRING, LOG_ERROR_STRING, LOG_INFO_STRING, LOG_WARNING_STRING, LayoutDragEvent, LayoutDragEventType, LayoutRegion, 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 };
9019
+ export { APP_PRIDGE_REF, ATX_LOGGER_CONFIG, AbstractLogger, AbstractSubscriptionManager, AbstractVersionManager, AbstractWindowService, AnchorLinklDirective, AngularToolboxLogoComponent, AngularToolboxModule, AngularToolboxVersionService, AppBridgeError, AppBridgeService, ArrayList, ArrayListEvent, ArrayListEventType, AtxHttpMockConsoleService, AtxMonitoringConsoleComponent, BIGINT, BOOLEAN, BUTTON_ROLE, BorderLayout, BorderLayoutContainer, ButtonRoleDirective, CSS_PROP, ConsoleLogConnector, ContentRendererDirective, DARK_MODE_CONFIG, DEFAULT_LOG_CONNECTOR, DarkModeService, DefaultLogConnector, 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, IdentifiableComponent, IntegrityError, LINK_ROLE, LOG_CONFIG_STRING, LOG_ERROR_STRING, LOG_INFO_STRING, LOG_WARNING_STRING, LayoutDragEvent, LayoutDragEventType, LayoutRegion, 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 };
8832
9020
  //# sourceMappingURL=angular-toolbox.mjs.map