@energycap/components 0.37.4-ECAP-19248-factor-searcher-updates.20230831-1041 → 0.37.5-ECAP-18945-record-view-mask.20230901-1615
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/esm2020/lib/display/dialog/dialog-types.mjs +1 -1
- package/esm2020/lib/display/dialog/dialog.component.mjs +36 -4
- package/fesm2015/energycap-components.mjs +35 -3
- package/fesm2015/energycap-components.mjs.map +1 -1
- package/fesm2020/energycap-components.mjs +35 -3
- package/fesm2020/energycap-components.mjs.map +1 -1
- package/lib/display/dialog/dialog-types.d.ts +6 -0
- package/lib/display/dialog/dialog.component.d.ts +12 -1
- package/package.json +1 -1
- package/src/styles/mixins/_dialog-base.scss +2 -1
@@ -5236,6 +5236,23 @@ class DialogComponent {
|
|
5236
5236
|
this.close(new DialogResult(false));
|
5237
5237
|
}
|
5238
5238
|
}
|
5239
|
+
/**
|
5240
|
+
* Defines the width of the dialog (height is auto). Can be a number that will be converted to pixels, or xsmall(320px), small(480px), medium(640px), or large(1024px)
|
5241
|
+
*/
|
5242
|
+
set size(value) {
|
5243
|
+
this._size = value;
|
5244
|
+
// If the size is a string, set the dialog class. Otherwise, clear it.
|
5245
|
+
if (typeof value == 'string') {
|
5246
|
+
this.dialogSizeClass = `dialog-${value}`;
|
5247
|
+
}
|
5248
|
+
else {
|
5249
|
+
this.dialogSizeClass = undefined;
|
5250
|
+
}
|
5251
|
+
}
|
5252
|
+
;
|
5253
|
+
get size() {
|
5254
|
+
return this._size;
|
5255
|
+
}
|
5239
5256
|
constructor(componentFactoryResolver, windowService, dialogService, documentRef) {
|
5240
5257
|
this.componentFactoryResolver = componentFactoryResolver;
|
5241
5258
|
this.windowService = windowService;
|
@@ -5259,10 +5276,16 @@ class DialogComponent {
|
|
5259
5276
|
this.displayAsPanel = false;
|
5260
5277
|
this.alignToTop = false;
|
5261
5278
|
this.transparentMask = false;
|
5279
|
+
this.noMask = false;
|
5262
5280
|
/**
|
5263
5281
|
* Defines the width of the dialog (height is auto). Can be a number that will be converted to pixels, or xsmall(320px), small(480px), medium(640px), or large(1024px)
|
5264
5282
|
*/
|
5265
|
-
this.
|
5283
|
+
this._size = 'small';
|
5284
|
+
/**
|
5285
|
+
* Bound to the host. The classes set the --ec-dialog-width variable to our default 'small', 'medium', etc. sizes.
|
5286
|
+
* Undefined when the size is a number, which is used for custom sizes.
|
5287
|
+
*/
|
5288
|
+
this.dialogSizeClass = `dialog-${this._size}`;
|
5266
5289
|
/**
|
5267
5290
|
* Emits an event when the dialog is opened
|
5268
5291
|
*/
|
@@ -5311,6 +5334,9 @@ class DialogComponent {
|
|
5311
5334
|
if (options.transparentMask !== undefined) {
|
5312
5335
|
this.transparentMask = options.transparentMask;
|
5313
5336
|
}
|
5337
|
+
if (options.noMask !== undefined) {
|
5338
|
+
this.noMask = options.noMask;
|
5339
|
+
}
|
5314
5340
|
if (options.canOpenDialog !== undefined) {
|
5315
5341
|
const canOpen = await options.canOpenDialog();
|
5316
5342
|
if (!canOpen) {
|
@@ -5411,10 +5437,13 @@ class DialogComponent {
|
|
5411
5437
|
}
|
5412
5438
|
}
|
5413
5439
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DialogComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: WindowService }, { token: DialogService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
5414
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DialogComponent, selector: "ec-dialog", inputs: { size: "size", content: "content", context: "context", options: "options", dialogOpenStartEventId: "dialogOpenStartEventId" }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "onOverlayClick($event)" }, properties: { "class.is-open": "this.isOpen", "class.fade-in": "this.fadeIn", "class.fade-out": "this.fadeOut", "class.is-panel": "this.displayAsPanel", "class.is-top-aligned": "this.alignToTop", "class.is-transparent": "this.transparentMask" } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<article [style.
|
5440
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DialogComponent, selector: "ec-dialog", inputs: { size: "size", content: "content", context: "context", options: "options", dialogOpenStartEventId: "dialogOpenStartEventId" }, outputs: { opened: "opened", closed: "closed" }, host: { listeners: { "click": "onOverlayClick($event)" }, properties: { "class": "dialogSizeClass", "style.--ec-dialog-width.px": "width", "class.is-open": "this.isOpen", "class.fade-in": "this.fadeIn", "class.fade-out": "this.fadeOut", "class.is-panel": "this.displayAsPanel", "class.is-top-aligned": "this.alignToTop", "class.is-transparent": "this.transparentMask", "class.no-mask": "this.noMask" } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<article [style.min-width]="minWidth" cdkTrapFocus cdkTrapFocusAutoCapture><ng-template #content></ng-template></article>', isInline: true, styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes panelMaskFadeIn{0%{background-color:transparent}to{background-color:var(--ec-dialog-background-color)}}:host{--ec-dialog-background-color: var(--ec-background-color-dialog);align-items:center;background-color:var(--ec-dialog-background-color);justify-content:center;position:fixed;z-index:var(--ec-z-index-dialog);inset:0;display:none}:host.is-open{display:flex}:host.fade-in{animation-name:fadeIn;animation-duration:125ms;animation-fill-mode:forwards;animation-timing-function:ease-in-out}:host.fade-out{animation-name:fadeIn;animation-duration:.1s;animation-direction:reverse;animation-fill-mode:forwards;animation-timing-function:ease-in-out}:host.is-panel article{position:absolute;top:0;bottom:0;right:0;max-height:none;border-right:0;border-top:0;border-bottom:0;border-radius:0;box-shadow:0 0 .5rem var(--ec-color-shadow)}:host.is-panel.fade-in{animation-name:panelMaskFadeIn;animation-duration:.25s;animation-fill-mode:forwards}:host.is-panel.fade-in article{animation-name:slideIn;animation-duration:.25s;animation-fill-mode:forwards;animation-timing-function:ease-out}:host.is-panel.fade-out{animation-name:panelMaskFadeIn;animation-direction:reverse;animation-fill-mode:forwards}:host.is-panel.fade-out article{animation-name:slideIn;animation-duration:225ms;animation-direction:reverse;animation-fill-mode:forwards;animation-timing-function:ease-in}:host.is-panel.no-mask{left:auto;width:var(--ec-dialog-width)}:host.is-top-aligned{align-items:flex-start}:host.is-top-aligned article{min-height:auto;margin-top:20vh}:host.is-transparent{--ec-dialog-background-color: transparent}article{background-color:var(--ec-background-color-body);background-clip:padding-box;box-shadow:0 0 .625rem #1a1a2333;border-radius:var(--ec-border-radius-dialog);overflow:hidden;display:flex;flex:none;min-height:9rem;max-height:90vh;max-width:90vw;width:var(--ec-dialog-width)}:host.dialog-xsmall{--ec-dialog-width: 20rem}:host.dialog-small{--ec-dialog-width: 30rem}:host.dialog-medium{--ec-dialog-width: 40rem}:host.dialog-large{--ec-dialog-width: 50rem}:host.dialog-xlarge{--ec-dialog-width: 60rem}:host.dialog-full{--ec-dialog-width: 90vw}\n"], dependencies: [{ kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
|
5415
5441
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DialogComponent, decorators: [{
|
5416
5442
|
type: Component,
|
5417
|
-
args: [{ selector: 'ec-dialog', template: '<article [style.
|
5443
|
+
args: [{ selector: 'ec-dialog', template: '<article [style.min-width]="minWidth" cdkTrapFocus cdkTrapFocusAutoCapture><ng-template #content></ng-template></article>', host: {
|
5444
|
+
'[class]': 'dialogSizeClass',
|
5445
|
+
'[style.--ec-dialog-width.px]': 'width'
|
5446
|
+
}, styles: ["@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes panelMaskFadeIn{0%{background-color:transparent}to{background-color:var(--ec-dialog-background-color)}}:host{--ec-dialog-background-color: var(--ec-background-color-dialog);align-items:center;background-color:var(--ec-dialog-background-color);justify-content:center;position:fixed;z-index:var(--ec-z-index-dialog);inset:0;display:none}:host.is-open{display:flex}:host.fade-in{animation-name:fadeIn;animation-duration:125ms;animation-fill-mode:forwards;animation-timing-function:ease-in-out}:host.fade-out{animation-name:fadeIn;animation-duration:.1s;animation-direction:reverse;animation-fill-mode:forwards;animation-timing-function:ease-in-out}:host.is-panel article{position:absolute;top:0;bottom:0;right:0;max-height:none;border-right:0;border-top:0;border-bottom:0;border-radius:0;box-shadow:0 0 .5rem var(--ec-color-shadow)}:host.is-panel.fade-in{animation-name:panelMaskFadeIn;animation-duration:.25s;animation-fill-mode:forwards}:host.is-panel.fade-in article{animation-name:slideIn;animation-duration:.25s;animation-fill-mode:forwards;animation-timing-function:ease-out}:host.is-panel.fade-out{animation-name:panelMaskFadeIn;animation-direction:reverse;animation-fill-mode:forwards}:host.is-panel.fade-out article{animation-name:slideIn;animation-duration:225ms;animation-direction:reverse;animation-fill-mode:forwards;animation-timing-function:ease-in}:host.is-panel.no-mask{left:auto;width:var(--ec-dialog-width)}:host.is-top-aligned{align-items:flex-start}:host.is-top-aligned article{min-height:auto;margin-top:20vh}:host.is-transparent{--ec-dialog-background-color: transparent}article{background-color:var(--ec-background-color-body);background-clip:padding-box;box-shadow:0 0 .625rem #1a1a2333;border-radius:var(--ec-border-radius-dialog);overflow:hidden;display:flex;flex:none;min-height:9rem;max-height:90vh;max-width:90vw;width:var(--ec-dialog-width)}:host.dialog-xsmall{--ec-dialog-width: 20rem}:host.dialog-small{--ec-dialog-width: 30rem}:host.dialog-medium{--ec-dialog-width: 40rem}:host.dialog-large{--ec-dialog-width: 50rem}:host.dialog-xlarge{--ec-dialog-width: 60rem}:host.dialog-full{--ec-dialog-width: 90vw}\n"] }]
|
5418
5447
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: WindowService }, { type: DialogService }, { type: Document, decorators: [{
|
5419
5448
|
type: Inject,
|
5420
5449
|
args: [DOCUMENT]
|
@@ -5436,6 +5465,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
5436
5465
|
}], transparentMask: [{
|
5437
5466
|
type: HostBinding,
|
5438
5467
|
args: ['class.is-transparent']
|
5468
|
+
}], noMask: [{
|
5469
|
+
type: HostBinding,
|
5470
|
+
args: ['class.no-mask']
|
5439
5471
|
}], onOverlayClick: [{
|
5440
5472
|
type: HostListener,
|
5441
5473
|
args: ['click', ['$event']]
|