@everymatrix/stage-mm-verification-report 1.0.42 → 1.0.44

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 (3) hide show
  1. package/main.js +23 -13
  2. package/main.js.map +1 -1
  3. package/package.json +1 -1
package/main.js CHANGED
@@ -23419,21 +23419,31 @@ var DmRangeDatePickerLibComponent = class _DmRangeDatePickerLibComponent {
23419
23419
  const popEl = this.popover.container;
23420
23420
  const parentEl = popEl.parentElement;
23421
23421
  this.popoverOpened = true;
23422
- if (popEl) {
23422
+ if (popEl && parentEl) {
23423
23423
  popEl.style.left = "0px";
23424
- popEl.style.top = "0px";
23425
- if (parentEl) {
23424
+ popEl.style.top = `${parentEl.offsetHeight}px`;
23425
+ popEl.style.bottom = "";
23426
+ requestAnimationFrame(() => {
23426
23427
  const rect = popEl.getBoundingClientRect();
23427
23428
  const parentRect = parentEl.getBoundingClientRect();
23428
- const isClippedRight = rect.right > window.innerWidth;
23429
+ const popoverHeight = popEl.offsetHeight;
23430
+ const viewportHeight = window.innerHeight;
23431
+ const viewportWidth = window.innerWidth;
23432
+ const isClippedRight = rect.right > viewportWidth;
23433
+ const isClippedBottom = rect.bottom > viewportHeight;
23434
+ const spaceAbove = parentRect.top;
23429
23435
  if (isClippedRight) {
23430
23436
  popEl.style.left = `-${rect.width - parentRect.width}px`;
23431
23437
  }
23432
- const isClippedBottom = rect.bottom > window.innerHeight;
23433
23438
  if (isClippedBottom) {
23434
- popEl.style.top = `-${rect.height - parentRect.height}px`;
23439
+ if (spaceAbove >= popoverHeight) {
23440
+ popEl.style.top = "";
23441
+ popEl.style.bottom = `${parentEl.offsetHeight}px`;
23442
+ } else {
23443
+ popEl.style.top = `-${(viewportHeight - (viewportHeight - popoverHeight)) / 2}px`;
23444
+ }
23435
23445
  }
23436
- }
23446
+ });
23437
23447
  }
23438
23448
  }
23439
23449
  onPopoverClose() {
@@ -52322,8 +52332,8 @@ var SaveTemplateModalComponent = class _SaveTemplateModalComponent {
52322
52332
  this.radioButtonControl.setValue("existing");
52323
52333
  if (this.template?.template_id !== template.template_id) {
52324
52334
  this.templateService.setUrlTemplateId(template.template_id);
52325
- this.templateService.savedTemplateSubject.next(template);
52326
52335
  }
52336
+ this.templateService.savedTemplateSubject.next(template);
52327
52337
  this.updateTemplateList(template);
52328
52338
  this.templateService.template.set(template);
52329
52339
  this.globalMessageService.showSuccessMessage({
@@ -58165,7 +58175,7 @@ var AppComponent = class _AppComponent {
58165
58175
  });
58166
58176
  this.templateService.savedTemplateSubject.pipe(takeUntilDestroyed(this.destroyRef), filter((data) => data !== null)).subscribe((template) => {
58167
58177
  if (template) {
58168
- this.updateReport(template, false);
58178
+ this.updateReport(template);
58169
58179
  }
58170
58180
  this.templateService.savedTemplateSubject.next(null);
58171
58181
  });
@@ -58235,14 +58245,14 @@ var AppComponent = class _AppComponent {
58235
58245
  } else {
58236
58246
  this.buildFilterForm(allFields, visibleFields, template.input_params.fieldValues);
58237
58247
  }
58238
- this.filterForm.markAsPristine();
58248
+ this.filterForm.markAsDirty();
58239
58249
  this.filterForm.markAsUntouched();
58240
58250
  }
58241
- updateReport(template, isTemplateSaved = true) {
58251
+ updateReport(template) {
58242
58252
  this.applyTemplate(template);
58243
58253
  this.runState = false;
58244
58254
  this.showReportTable.set(false);
58245
- this.isTemplateSaved.set(isTemplateSaved);
58255
+ this.isTemplateSaved.set(true);
58246
58256
  }
58247
58257
  processTemplateIdFromUrl() {
58248
58258
  const queryParams = new URLSearchParams(window.location.search);
@@ -58635,7 +58645,7 @@ var AppComponent = class _AppComponent {
58635
58645
  return this.domainLookupsSignal()?.length === this.filterForm.get("merchant_name").value.length;
58636
58646
  }
58637
58647
  get isTemplateSavingEnabled() {
58638
- return !this.isTemplateSaved() && this.filterForm && this.filterForm.dirty && this.filterForm.get("merchant_name") && this.filterForm.get("merchant_name").value && this.filterForm.get("merchant_name").value.length > 0;
58648
+ return !this.isTemplateSaved() && this.filterForm?.get("merchant_name")?.value?.length > 0;
58639
58649
  }
58640
58650
  applyConfigurationFields(event2) {
58641
58651
  this.isTemplateSaved.set(false);