@cqa-lib/cqa-ui 1.0.114 → 1.0.116

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.
@@ -761,10 +761,10 @@ class TableDataLoaderComponent {
761
761
  }
762
762
  }
763
763
  TableDataLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableDataLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
764
- TableDataLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: TableDataLoaderComponent, selector: "cqa-table-data-loader", inputs: { label: "label", size: "size" }, host: { classAttribute: "cqa-ui-root" }, ngImport: i0, template: "<div class=\"loading-spinner-simple cqa-py-2 cqa-flex cqa-flex-row cqa-items-center cqa-justify-center cqa-gap-3 cqa-text-center\">\n <svg class=\"cqa-animate-spin cqa-text-primary\" [attr.width]=\"size\" [attr.height]=\"size\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"cqa-opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"cqa-opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n <span class=\"cqa-text-primary\">{{ label }}</span>\n </div>\n\n\n" });
764
+ TableDataLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: TableDataLoaderComponent, selector: "cqa-table-data-loader", inputs: { label: "label", size: "size" }, host: { classAttribute: "cqa-ui-root cqa-table-data-loader" }, ngImport: i0, template: "<div class=\"loading-spinner-simple cqa-py-2 cqa-flex cqa-flex-row cqa-items-center cqa-justify-center cqa-gap-3 cqa-text-center\">\n <svg class=\"cqa-animate-spin cqa-text-primary\" [attr.width]=\"size\" [attr.height]=\"size\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"cqa-opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"cqa-opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n <span class=\"cqa-text-primary\">{{ label }}</span>\n </div>\n\n\n" });
765
765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TableDataLoaderComponent, decorators: [{
766
766
  type: Component,
767
- args: [{ selector: 'cqa-table-data-loader', host: { class: 'cqa-ui-root' }, template: "<div class=\"loading-spinner-simple cqa-py-2 cqa-flex cqa-flex-row cqa-items-center cqa-justify-center cqa-gap-3 cqa-text-center\">\n <svg class=\"cqa-animate-spin cqa-text-primary\" [attr.width]=\"size\" [attr.height]=\"size\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"cqa-opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"cqa-opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n <span class=\"cqa-text-primary\">{{ label }}</span>\n </div>\n\n\n", styles: [] }]
767
+ args: [{ selector: 'cqa-table-data-loader', host: { class: 'cqa-ui-root cqa-table-data-loader' }, template: "<div class=\"loading-spinner-simple cqa-py-2 cqa-flex cqa-flex-row cqa-items-center cqa-justify-center cqa-gap-3 cqa-text-center\">\n <svg class=\"cqa-animate-spin cqa-text-primary\" [attr.width]=\"size\" [attr.height]=\"size\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"cqa-opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"cqa-opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n <span class=\"cqa-text-primary\">{{ label }}</span>\n </div>\n\n\n", styles: [] }]
768
768
  }], propDecorators: { label: [{
769
769
  type: Input
770
770
  }], size: [{
@@ -2641,6 +2641,11 @@ class DynamicFilterComponent {
2641
2641
  start: new FormControl(initialRange.start),
2642
2642
  end: new FormControl(initialRange.end),
2643
2643
  });
2644
+ // initialize ngx model display
2645
+ this.ngxDateRangeByKey[c.key] = {
2646
+ startDate: initialRange.start || null,
2647
+ endDate: initialRange.end || null
2648
+ };
2644
2649
  }
2645
2650
  else {
2646
2651
  const initial = this.resolveInitialSelectValue(c);
@@ -2949,22 +2954,12 @@ class DynamicFilterComponent {
2949
2954
  const endCtrl = dateGroup.controls['end'];
2950
2955
  const startVal = startCtrl?.value;
2951
2956
  const endVal = endCtrl?.value;
2952
- const startParseErr = startCtrl?.errors?.['matDatepickerParse']?.text;
2953
- const endParseErr = endCtrl?.errors?.['matDatepickerParse']?.text;
2954
- if (!startVal && !endVal && !startParseErr && !endParseErr)
2957
+ if (!startVal && !endVal)
2955
2958
  return null;
2956
- if (startParseErr)
2957
- return `Invalid start date format`;
2958
- if (endParseErr)
2959
- return `Invalid end date format`;
2960
2959
  if (startVal && !endVal)
2961
2960
  return `Please select an end date`;
2962
2961
  if (!startVal && endVal)
2963
2962
  return `Please select a start date`;
2964
- if (dateGroup.hasError('matStartDateInvalid'))
2965
- return `Start date must be before end date`;
2966
- if (dateGroup.hasError('matEndDateInvalid'))
2967
- return `End date must be after start date`;
2968
2963
  if (dateGroup.invalid) {
2969
2964
  const config = this.config?.find(c => c.key === key);
2970
2965
  return config ? `${config.label} is invalid` : 'Date range is invalid';