angular-toolbox 1.3.0 → 1.3.2

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 (29) hide show
  1. package/README.md +1 -1
  2. package/esm2022/lib/component/dropdown/dropdown.component.mjs +111 -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/framework/mock/http-monitoring-console/component/renderer/response-body-renderer/response-body-renderer.component.mjs +1 -1
  6. package/esm2022/lib/framework/mock/http-monitoring-console/component/renderer/response-preview-renderer/response-preview-renderer.component.mjs +1 -1
  7. package/esm2022/lib/model/business/ui/dropdown/dropdown-event-type.enum.mjs +22 -0
  8. package/esm2022/lib/model/business/ui/dropdown/dropdown-position.mjs +9 -0
  9. package/esm2022/lib/model/business/ui/dropdown/dropdown-state.mjs +9 -0
  10. package/esm2022/lib/model/business/ui/dropdown/dropdown.event.mjs +27 -0
  11. package/esm2022/lib/model/business/ui/dropdown/index.mjs +5 -0
  12. package/esm2022/lib/model/business/ui/index.mjs +2 -1
  13. package/esm2022/lib/model/business/ui/layout/layout-drag.event.mjs +1 -1
  14. package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +3 -3
  15. package/fesm2022/angular-toolbox.mjs +177 -4
  16. package/fesm2022/angular-toolbox.mjs.map +1 -1
  17. package/lib/component/dropdown/dropdown.component.d.ts +82 -0
  18. package/lib/component/index.d.ts +1 -0
  19. package/lib/component/layout/border-layout/border-layout.component.d.ts +1 -0
  20. package/lib/framework/mock/http-monitoring-console/component/renderer/response-body-renderer/response-body-renderer.component.d.ts +1 -1
  21. package/lib/framework/mock/http-monitoring-console/component/renderer/response-preview-renderer/response-preview-renderer.component.d.ts +1 -1
  22. package/lib/model/business/ui/dropdown/dropdown-event-type.enum.d.ts +20 -0
  23. package/lib/model/business/ui/dropdown/dropdown-position.d.ts +15 -0
  24. package/lib/model/business/ui/dropdown/dropdown-state.d.ts +11 -0
  25. package/lib/model/business/ui/dropdown/dropdown.event.d.ts +40 -0
  26. package/lib/model/business/ui/dropdown/index.d.ts +4 -0
  27. package/lib/model/business/ui/index.d.ts +1 -0
  28. package/lib/model/business/ui/layout/layout-drag.event.d.ts +2 -1
  29. 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';
@@ -586,8 +586,8 @@ class AbstractVersionManager {
586
586
  const LAYERS_VERSION_CONFIG = {
587
587
  major: 1,
588
588
  minor: 3,
589
- patch: 0,
590
- buildTimestamp: 1726584264692
589
+ patch: 2,
590
+ buildTimestamp: 1726925482016
591
591
  };
592
592
  /**
593
593
  * The public service that exposes the current version of the Angular Toolbox library.
@@ -1163,6 +1163,71 @@ 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
+
1166
1231
  /**
1167
1232
  * @license
1168
1233
  * Copyright Pascal ECHEMANN. All Rights Reserved.
@@ -7851,6 +7916,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
7851
7916
  type: Optional
7852
7917
  }] }] });
7853
7918
 
7919
+ /**
7920
+ * @license
7921
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
7922
+ *
7923
+ * Use of this source code is governed by an MIT-style license that can be
7924
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7925
+ */
7926
+ /**
7927
+ * @private
7928
+ */
7929
+ const API_MATCH = ':popover-open';
7930
+ /**
7931
+ * The ATX dropdown component allows to create popup containers that are displayed by clicking on a button.
7932
+ * The content of the container is defined by Developer.
7933
+ * This component is part of the LAF-less API.
7934
+ */
7935
+ class DropdownComponent extends IdentifiableComponent {
7936
+ /**
7937
+ * @private
7938
+ */
7939
+ constructor() {
7940
+ super();
7941
+ /**
7942
+ * An event fired on the dropdown component just after it is shown or hidden.
7943
+ */
7944
+ this.toggle = new EventEmitter();
7945
+ /**
7946
+ * An event fired on the dropdown component just before it is shown or hidden.
7947
+ */
7948
+ this.beforeToggle = new EventEmitter();
7949
+ /**
7950
+ * Sets the vertical position of the content container.
7951
+ */
7952
+ this.vPos = "bottom";
7953
+ /**
7954
+ * Sets the horizontal position of the content container.
7955
+ */
7956
+ this.hPos = "left";
7957
+ this.id = this.getID().toString();
7958
+ }
7959
+ /**
7960
+ * Hides the dropdown container.
7961
+ */
7962
+ hideContent() {
7963
+ if (!this._popover)
7964
+ return;
7965
+ this._popover.nativeElement.hidePopover();
7966
+ }
7967
+ /**
7968
+ * Displays the dropdown container.
7969
+ */
7970
+ showContent() {
7971
+ if (!this._popover)
7972
+ return;
7973
+ this._popover.nativeElement.showPopover();
7974
+ }
7975
+ /**
7976
+ * Returns the display state of the dropdown.
7977
+ *
7978
+ * @returns Returns `true` whether the dropdown is opened; `false` otherwise.
7979
+ */
7980
+ isOpened() {
7981
+ if (!this._popover)
7982
+ return false;
7983
+ return this._popover.nativeElement.matches(API_MATCH);
7984
+ }
7985
+ /**
7986
+ * @private
7987
+ */
7988
+ onBeforeToggle(event) {
7989
+ this.beforeToggle.emit(this.buildEvent(event, DropdownEventType.BEFORE_TOGGLE));
7990
+ }
7991
+ /**
7992
+ * @private
7993
+ */
7994
+ onToggle(event) {
7995
+ this.toggle.emit(this.buildEvent(event, DropdownEventType.TOGGLE));
7996
+ }
7997
+ /**
7998
+ * @private
7999
+ */
8000
+ buildEvent(event, type) {
8001
+ return new DropdownEvent(this, type, event.newState, event.oldState);
8002
+ }
8003
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8004
+ 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" }, 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 popover [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"] }); }
8005
+ }
8006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImport: i0, type: DropdownComponent, decorators: [{
8007
+ type: Component,
8008
+ 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 popover [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"] }]
8009
+ }], ctorParameters: () => [], propDecorators: { toggle: [{
8010
+ type: Output
8011
+ }], beforeToggle: [{
8012
+ type: Output
8013
+ }], buttonClass: [{
8014
+ type: Input
8015
+ }], containerClass: [{
8016
+ type: Input
8017
+ }], vPos: [{
8018
+ type: Input
8019
+ }], hPos: [{
8020
+ type: Input
8021
+ }], _popover: [{
8022
+ type: ViewChild,
8023
+ args: ["popover"]
8024
+ }] } });
8025
+
7854
8026
  /**
7855
8027
  * @license
7856
8028
  * Copyright Pascal ECHEMANN. All Rights Reserved.
@@ -8418,6 +8590,7 @@ class BorderLayoutRenderer extends IdentifiableComponent {
8418
8590
  /**
8419
8591
  * A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
8420
8592
  * Each region is defined by a `BorderLayoutContainer` instance, and is identified by a corresponding constant: `NORTH`, `SOUTH`, `EAST`, `WEST`, and `CENTER`.
8593
+ * This component is part of the LAF-less API.
8421
8594
  */
8422
8595
  class BorderLayout extends IdentifiableComponent {
8423
8596
  /**
@@ -8828,5 +9001,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.3", ngImpor
8828
9001
  * Generated bundle index. Do not edit.
8829
9002
  */
8830
9003
 
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 };
9004
+ 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
9005
  //# sourceMappingURL=angular-toolbox.mjs.map