@datarailsshared/datarailsshared 1.4.191-rocket → 1.4.193-rocket

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.
@@ -6,7 +6,7 @@ import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS } from '@angular/mat
6
6
  import * as i1$4 from '@angular/material/core';
7
7
  import { MAT_DATE_FORMATS, DateAdapter, MAT_DATE_LOCALE, MatNativeDateModule } from '@angular/material/core';
8
8
  import * as i1$2 from '@angular/forms';
9
- import { NG_VALUE_ACCESSOR, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import { NG_VALUE_ACCESSOR, FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
10
10
  import { BehaviorSubject, Subject, noop as noop$1, from, merge as merge$1, fromEvent } from 'rxjs';
11
11
  import * as moment$9 from 'moment';
12
12
  import * as _ from 'lodash';
@@ -4800,20 +4800,19 @@ const getAlignmentDimension = (position) => {
4800
4800
 
4801
4801
  class DrPopoverComponent {
4802
4802
  cdr;
4803
- componentFactoryResolver;
4804
4803
  viewContainerRef;
4805
4804
  elementRef;
4806
4805
  popoverRef;
4807
4806
  popoverOpened = new EventEmitter();
4808
- _contentAsRef;
4809
4807
  _contentAsType;
4810
- set content(content) {
4811
- this.isContentTemplate = this.content instanceof TemplateRef;
4808
+ _contentAsTemplate;
4809
+ set content(value) {
4810
+ this.isContentTemplate = value instanceof TemplateRef;
4812
4811
  if (this.isContentTemplate) {
4813
- this._contentAsRef = content;
4812
+ this._contentAsTemplate = value;
4814
4813
  }
4815
4814
  else {
4816
- this._contentAsType = content;
4815
+ this._contentAsType = value;
4817
4816
  }
4818
4817
  }
4819
4818
  ;
@@ -4845,17 +4844,15 @@ class DrPopoverComponent {
4845
4844
  this.popoverRef.close();
4846
4845
  }
4847
4846
  }
4848
- constructor(cdr, componentFactoryResolver, viewContainerRef, elementRef, popoverRef) {
4847
+ constructor(cdr, viewContainerRef, elementRef, popoverRef) {
4849
4848
  this.cdr = cdr;
4850
- this.componentFactoryResolver = componentFactoryResolver;
4851
4849
  this.viewContainerRef = viewContainerRef;
4852
4850
  this.elementRef = elementRef;
4853
4851
  this.popoverRef = popoverRef;
4854
4852
  }
4855
4853
  ngOnInit() {
4856
- this.isContentTemplate = this.content instanceof TemplateRef;
4857
4854
  if (!this.isContentTemplate) {
4858
- this.componentRef = this.viewContainerRef.createComponent(this.componentFactoryResolver.resolveComponentFactory(this._contentAsType));
4855
+ this.componentRef = this.viewContainerRef.createComponent(this._contentAsType);
4859
4856
  Object.assign(this.componentRef.instance, this.contentContext);
4860
4857
  this.popoverContainer.nativeElement.appendChild(this.componentRef.location.nativeElement);
4861
4858
  }
@@ -4890,8 +4887,8 @@ class DrPopoverComponent {
4890
4887
  });
4891
4888
  }
4892
4889
  }
4893
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: DrPopoverComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: DrPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
4894
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: DrPopoverComponent, selector: "dr-popover", inputs: { content: "content", contentContext: "contentContext", class: "class", hostRef: "hostRef", manualClosing: "manualClosing", alignment: "alignment", position: "position", freezeToContainerSelector: "freezeToContainerSelector" }, outputs: { popoverOpened: "popoverOpened" }, host: { listeners: { "document:mouseup": "clickOutside($event)" }, properties: { "style.width": "this.width", "style.height": "this.height", "@popover": "this.popover" } }, viewQueries: [{ propertyName: "popoverContainer", first: true, predicate: ["popoverContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"dr-popover\" [class]=\"class\" #popoverContainer>\n <ng-container *ngIf=\"isContentTemplate\">\n <ng-container *ngTemplateOutlet=\"_contentAsRef; context: contentContext\"></ng-container>\n </ng-container>\n</div>\n", styles: [".dr-popover{display:flex;background:#fff;border:1px solid #e5e5e5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
4890
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: DrPopoverComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: DrPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
4891
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: DrPopoverComponent, selector: "dr-popover", inputs: { content: "content", contentContext: "contentContext", class: "class", hostRef: "hostRef", manualClosing: "manualClosing", alignment: "alignment", position: "position", freezeToContainerSelector: "freezeToContainerSelector" }, outputs: { popoverOpened: "popoverOpened" }, host: { listeners: { "document:mouseup": "clickOutside($event)" }, properties: { "style.width": "this.width", "style.height": "this.height", "@popover": "this.popover" } }, viewQueries: [{ propertyName: "popoverContainer", first: true, predicate: ["popoverContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"dr-popover\" [class]=\"class\" #popoverContainer>\n <ng-container *ngIf=\"isContentTemplate\">\n <ng-container *ngTemplateOutlet=\"_contentAsTemplate; context: contentContext\"></ng-container>\n </ng-container>\n</div>\n", styles: [".dr-popover{display:flex;background:#fff;border:1px solid #e5e5e5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
4895
4892
  trigger('popover', POPUP_ANIMATION),
4896
4893
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4897
4894
  }
@@ -4899,8 +4896,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
4899
4896
  type: Component,
4900
4897
  args: [{ selector: 'dr-popover', animations: [
4901
4898
  trigger('popover', POPUP_ANIMATION),
4902
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dr-popover\" [class]=\"class\" #popoverContainer>\n <ng-container *ngIf=\"isContentTemplate\">\n <ng-container *ngTemplateOutlet=\"_contentAsRef; context: contentContext\"></ng-container>\n </ng-container>\n</div>\n", styles: [".dr-popover{display:flex;background:#fff;border:1px solid #e5e5e5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"] }]
4903
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: DrPopoverRef }]; }, propDecorators: { popoverOpened: [{
4899
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dr-popover\" [class]=\"class\" #popoverContainer>\n <ng-container *ngIf=\"isContentTemplate\">\n <ng-container *ngTemplateOutlet=\"_contentAsTemplate; context: contentContext\"></ng-container>\n </ng-container>\n</div>\n", styles: [".dr-popover{display:flex;background:#fff;border:1px solid #e5e5e5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"] }]
4900
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: DrPopoverRef }]; }, propDecorators: { popoverOpened: [{
4904
4901
  type: Output
4905
4902
  }], content: [{
4906
4903
  type: Input
@@ -6254,9 +6251,9 @@ class DialogModalWrapperComponent {
6254
6251
  ngOnInit() {
6255
6252
  if (!this.dialogData.fields)
6256
6253
  this.dialogData.fields = [];
6257
- this.form = new UntypedFormGroup(this.dialogData.fields.reduce((accumulator, currentValue) => {
6254
+ this.form = new FormGroup(this.dialogData.fields.reduce((accumulator, currentValue) => {
6258
6255
  const currentFormControl = {};
6259
- currentFormControl[currentValue.name] = new UntypedFormGroup(currentValue.default || null, currentValue.validators || []);
6256
+ currentFormControl[currentValue.name] = new FormControl(currentValue.default || null, currentValue.validators || []);
6260
6257
  return Object.assign(accumulator, currentFormControl);
6261
6258
  }, {}));
6262
6259
  }
@@ -7077,6 +7074,97 @@ var TooltipPosition;
7077
7074
  TooltipPosition["LEFT_BOTTOM"] = "left-bottom";
7078
7075
  })(TooltipPosition || (TooltipPosition = {}));
7079
7076
 
7077
+ class ClickOutsideDirective {
7078
+ _document /*: HTMLDocument*/;
7079
+ _el;
7080
+ attachOutsideOnClick = false;
7081
+ exclude = '';
7082
+ clickOutside = new EventEmitter();
7083
+ _nodesExcluded = [];
7084
+ constructor(_document /*: HTMLDocument*/, _el) {
7085
+ this._document = _document;
7086
+ this._el = _el;
7087
+ this._initOnClickBody = this._initOnClickBody.bind(this);
7088
+ this._onClickBody = this._onClickBody.bind(this);
7089
+ }
7090
+ ngOnInit() {
7091
+ this._init();
7092
+ }
7093
+ ngOnDestroy() {
7094
+ if (this.attachOutsideOnClick) {
7095
+ this._el.nativeElement.removeEventListener('click', this._initOnClickBody);
7096
+ }
7097
+ this._document.body.removeEventListener('click', this._onClickBody);
7098
+ }
7099
+ ngOnChanges(changes) {
7100
+ if (changes['attachOutsideOnClick'] || changes['exclude']) {
7101
+ this._init();
7102
+ }
7103
+ }
7104
+ _init() {
7105
+ if (this.exclude) {
7106
+ this.exclude.split(',').forEach((selector) => {
7107
+ if (selector) {
7108
+ try {
7109
+ const node = this._document.querySelector(selector.trim());
7110
+ if (node) {
7111
+ this._nodesExcluded.push(node);
7112
+ }
7113
+ }
7114
+ catch (err) {
7115
+ if (window.console) {
7116
+ window.console.error('[ng2-click-outside] Check your exclude selector syntax.', err);
7117
+ }
7118
+ }
7119
+ }
7120
+ });
7121
+ }
7122
+ if (this.attachOutsideOnClick) {
7123
+ this._el.nativeElement.addEventListener('click', this._initOnClickBody);
7124
+ }
7125
+ else {
7126
+ this._initOnClickBody();
7127
+ }
7128
+ }
7129
+ /** @internal */
7130
+ _initOnClickBody() {
7131
+ this._document.body.addEventListener('click', this._onClickBody);
7132
+ }
7133
+ /** @internal */
7134
+ _onClickBody(e) {
7135
+ if (!this._el.nativeElement.contains(e.target) && !this._shouldExclude(e.target)) {
7136
+ this.clickOutside.emit(e);
7137
+ if (this.attachOutsideOnClick) {
7138
+ this._document.body.removeEventListener('click', this._onClickBody);
7139
+ }
7140
+ }
7141
+ }
7142
+ /** @internal */
7143
+ _shouldExclude(target) {
7144
+ for (let i = 0; i < this._nodesExcluded.length; i++) {
7145
+ if (this._nodesExcluded[i].contains(target)) {
7146
+ return true;
7147
+ }
7148
+ }
7149
+ return false;
7150
+ }
7151
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
7152
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: { attachOutsideOnClick: "attachOutsideOnClick", exclude: "exclude" }, outputs: { clickOutside: "clickOutside" }, usesOnChanges: true, ngImport: i0 });
7153
+ }
7154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ClickOutsideDirective, decorators: [{
7155
+ type: Directive,
7156
+ args: [{ selector: '[clickOutside]' }]
7157
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
7158
+ type: Inject,
7159
+ args: [DOCUMENT]
7160
+ }] }, { type: i0.ElementRef }]; }, propDecorators: { attachOutsideOnClick: [{
7161
+ type: Input
7162
+ }], exclude: [{
7163
+ type: Input
7164
+ }], clickOutside: [{
7165
+ type: Output
7166
+ }] } });
7167
+
7080
7168
  const TOOLTIP_COMPONENTS = [
7081
7169
  TooltipInfoComponent,
7082
7170
  TooltipInfoSimpleComponent,
@@ -7781,11 +7869,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
7781
7869
  }]
7782
7870
  }] });
7783
7871
 
7872
+ class ClickOutsideModule {
7873
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ClickOutsideModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7874
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.5", ngImport: i0, type: ClickOutsideModule, declarations: [ClickOutsideDirective], imports: [CommonModule], exports: [ClickOutsideDirective] });
7875
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ClickOutsideModule, imports: [CommonModule] });
7876
+ }
7877
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ClickOutsideModule, decorators: [{
7878
+ type: NgModule,
7879
+ args: [{
7880
+ imports: [CommonModule],
7881
+ declarations: [ClickOutsideDirective],
7882
+ exports: [ClickOutsideDirective]
7883
+ }]
7884
+ }] });
7885
+
7784
7886
  /* components */
7785
7887
 
7786
7888
  /**
7787
7889
  * Generated bundle index. Do not edit.
7788
7890
  */
7789
7891
 
7790
- export { AnyTagComponent, BadgeStatus, CHAT_MESSAGE_TYPE, CalendarView, ChatMessage, ChatRole, CheckboxComponent, CustomDateFormat, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DateTags, DayTagComponent, DefaultTreeviewEventParser, DefaultTreeviewI18n, DialogModalWrapperComponent, DialogService, DialogWrapperComponent, DownlineTreeviewEventParser, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrBadgeStatusComponent, DrBadgeStatusModule, DrButtonComponent, DrChatComponent, DrChatCustomMessageDirective, DrChatFormComponent, DrChatMessageComponent, DrChatMessageFileComponent, DrChatMessageTextComponent, DrChatModule, DrChatSuggestionsComponent, DrDatePickerComponent, DrDatePickerCustomHeaderComponent, DrDatePickerFormatDirective, DrDatePickerWithTimeframeComponent, DrDetailsListComponent, DrDetailsListModule, DrDialogModule, DrDotFlashingComponent, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrErrorComponent, DrErrorModule, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrScenarioConfigurationComponent, DrScenarioModule, DrScenarioTagConfigurationComponent, DrSelectAddItemComponent, DrSelectComponent, DrSharedUtils, DrShowTimeframePipe, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, IMAGE_TYPES, ListTagComponent, ListTagModule, MonthTagComponent, OrderDownlineTreeviewEventParser, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, Scenario, ScenarioService, SpinnerSize, SpinnerType, StepperComponent, TagTypes, TimeframeOption, ToggleButtonMode, TooltipComponent, TooltipInfoComponent, TooltipInfoSimpleComponent, TooltipNoBodyComponent, TooltipPosition, TooltipProcessDefaultComponent, TreeviewComponent, TreeviewConfig, TreeviewEventParser, TreeviewHelper, TreeviewI18n, TreeviewItem, TreeviewModule, TreeviewPipe, WeekTagComponent, YearTagComponent };
7892
+ export { AnyTagComponent, BadgeStatus, CHAT_MESSAGE_TYPE, CalendarView, ChatMessage, ChatRole, CheckboxComponent, ClickOutsideDirective, ClickOutsideModule, CustomDateFormat, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DateTags, DayTagComponent, DefaultTreeviewEventParser, DefaultTreeviewI18n, DialogModalWrapperComponent, DialogService, DialogWrapperComponent, DownlineTreeviewEventParser, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrBadgeStatusComponent, DrBadgeStatusModule, DrButtonComponent, DrChatComponent, DrChatCustomMessageDirective, DrChatFormComponent, DrChatMessageComponent, DrChatMessageFileComponent, DrChatMessageTextComponent, DrChatModule, DrChatSuggestionsComponent, DrDatePickerComponent, DrDatePickerCustomHeaderComponent, DrDatePickerFormatDirective, DrDatePickerWithTimeframeComponent, DrDetailsListComponent, DrDetailsListModule, DrDialogModule, DrDotFlashingComponent, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrErrorComponent, DrErrorModule, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrScenarioConfigurationComponent, DrScenarioModule, DrScenarioTagConfigurationComponent, DrSelectAddItemComponent, DrSelectComponent, DrSharedUtils, DrShowTimeframePipe, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, IMAGE_TYPES, ListTagComponent, ListTagModule, MonthTagComponent, OrderDownlineTreeviewEventParser, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, Scenario, ScenarioService, SpinnerSize, SpinnerType, StepperComponent, TagTypes, TimeframeOption, ToggleButtonMode, TooltipComponent, TooltipInfoComponent, TooltipInfoSimpleComponent, TooltipNoBodyComponent, TooltipPosition, TooltipProcessDefaultComponent, TreeviewComponent, TreeviewConfig, TreeviewEventParser, TreeviewHelper, TreeviewI18n, TreeviewItem, TreeviewModule, TreeviewPipe, WeekTagComponent, YearTagComponent };
7791
7893
  //# sourceMappingURL=datarailsshared-datarailsshared.mjs.map