@seniorsistemas/angular-components 17.7.0 → 17.7.1

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 (32) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +1287 -1420
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/file-upload/file-upload.component.d.ts +17 -15
  6. package/components/file-upload/models/index.d.ts +0 -1
  7. package/components/file-upload/models/validate-errors.d.ts +0 -1
  8. package/esm2015/components/file-upload/file-upload.component.js +45 -60
  9. package/esm2015/components/file-upload/file-upload.module.js +6 -16
  10. package/esm2015/components/file-upload/file-upload.service.js +1 -3
  11. package/esm2015/components/file-upload/models/index.js +1 -2
  12. package/esm2015/components/file-upload/models/validate-errors.js +1 -2
  13. package/esm2015/seniorsistemas-angular-components.js +74 -76
  14. package/esm5/components/file-upload/file-upload.component.js +45 -60
  15. package/esm5/components/file-upload/file-upload.module.js +6 -16
  16. package/esm5/components/file-upload/file-upload.service.js +1 -3
  17. package/esm5/components/file-upload/models/index.js +1 -2
  18. package/esm5/components/file-upload/models/validate-errors.js +1 -2
  19. package/esm5/seniorsistemas-angular-components.js +74 -76
  20. package/fesm2015/seniorsistemas-angular-components.js +835 -963
  21. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  22. package/fesm5/seniorsistemas-angular-components.js +1202 -1332
  23. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  24. package/package.json +1 -1
  25. package/seniorsistemas-angular-components.d.ts +73 -75
  26. package/seniorsistemas-angular-components.metadata.json +1 -1
  27. package/components/file-upload/components/file-item/file-item.component.d.ts +0 -26
  28. package/components/file-upload/models/storage-units.d.ts +0 -5
  29. package/esm2015/components/file-upload/components/file-item/file-item.component.js +0 -105
  30. package/esm2015/components/file-upload/models/storage-units.js +0 -6
  31. package/esm5/components/file-upload/components/file-item/file-item.component.js +0 -107
  32. package/esm5/components/file-upload/models/storage-units.js +0 -6
@@ -1,12 +1,12 @@
1
1
  import { __decorate, __awaiter, __param, __rest } from 'tslib';
2
- import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Directive, KeyValueDiffers, HostBinding, Renderer2, TemplateRef, InjectionToken, Inject, ViewEncapsulation, Pipe, ɵɵinject, ViewContainerRef, ChangeDetectorRef, Optional, ContentChild } from '@angular/core';
2
+ import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Directive, KeyValueDiffers, HostBinding, Renderer2, TemplateRef, InjectionToken, Inject, ViewEncapsulation, ViewContainerRef, ChangeDetectorRef, Pipe, ɵɵinject, Optional, ContentChild } from '@angular/core';
3
3
  import { trigger, transition, style as style$7, animate, state, group, query, animateChild } from '@angular/animations';
4
4
  import { Subject, of, from, ReplaySubject, throwError, forkJoin } from 'rxjs';
5
5
  import { takeUntil, tap, map, switchMap, catchError, first, filter, take, delay, debounceTime, repeat, finalize } from 'rxjs/operators';
6
6
  import { CommonModule } from '@angular/common';
7
7
  import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormControl, FormGroup, NG_VALIDATORS, FormBuilder, Validators, FormArray, ControlContainer } from '@angular/forms';
8
8
  import { RouterModule, NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router } from '@angular/router';
9
- import { HttpClient, HttpClientModule, HttpEventType } from '@angular/common/http';
9
+ import { HttpClient, HttpEventType, HttpClientModule } from '@angular/common/http';
10
10
  import { user, service } from '@seniorsistemas/senior-platform-data';
11
11
  import * as moment_ from 'moment';
12
12
  import { CookieService } from 'ngx-cookie-service';
@@ -47,6 +47,7 @@ import { PanelModule as PanelModule$1 } from 'primeng/panel';
47
47
  import { RadioButtonModule } from 'primeng/radiobutton';
48
48
  import { SliderModule } from 'primeng/slider';
49
49
  import { MessageService, ConfirmationService } from 'primeng/api';
50
+ import { ProgressBarModule as ProgressBarModule$1 } from 'primeng/progressbar';
50
51
  import { DomSanitizer } from '@angular/platform-browser';
51
52
  import { Clipboard } from '@angular/cdk/clipboard';
52
53
  import Cropper from 'cropperjs';
@@ -5634,487 +5635,20 @@ EmptyStateModule = __decorate([
5634
5635
  })
5635
5636
  ], EmptyStateModule);
5636
5637
 
5637
- var ProgressBarColors;
5638
- (function (ProgressBarColors) {
5639
- ProgressBarColors["Blue"] = "blue";
5640
- ProgressBarColors["Green"] = "green";
5641
- ProgressBarColors["Red"] = "red";
5642
- ProgressBarColors["Yellow"] = "yellow";
5643
- })(ProgressBarColors || (ProgressBarColors = {}));
5644
-
5645
- var ProgressBarMode;
5646
- (function (ProgressBarMode) {
5647
- ProgressBarMode["Determinate"] = "determinate";
5648
- ProgressBarMode["Indeterminate"] = "indeterminate";
5649
- })(ProgressBarMode || (ProgressBarMode = {}));
5650
-
5651
- let ProgressBarComponent = class ProgressBarComponent {
5652
- constructor() {
5653
- this.numberFormatOptions = {
5654
- style: "decimal",
5655
- minimumFractionDigits: 0,
5656
- maximumFractionDigits: 2,
5657
- };
5658
- this.showValue = true;
5659
- this.mode = ProgressBarMode.Determinate;
5660
- }
5661
- ngOnInit() {
5662
- this.validateInputs();
5663
- }
5664
- validateInputs() {
5665
- if (this.value < 0 || this.value > 100) {
5666
- throw new Error("Invalid value for value");
5667
- }
5668
- if (this.targetValue < 0 || this.targetValue > 100) {
5669
- throw new Error("Invalid value for targetValue");
5670
- }
5671
- if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
5672
- throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
5673
- }
5674
- }
5675
- };
5676
- __decorate([
5677
- Input()
5678
- ], ProgressBarComponent.prototype, "value", void 0);
5679
- __decorate([
5680
- Input()
5681
- ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
5682
- __decorate([
5683
- Input()
5684
- ], ProgressBarComponent.prototype, "targetValue", void 0);
5685
- __decorate([
5686
- Input()
5687
- ], ProgressBarComponent.prototype, "label", void 0);
5688
- __decorate([
5689
- Input()
5690
- ], ProgressBarComponent.prototype, "targetLabel", void 0);
5691
- __decorate([
5692
- Input()
5693
- ], ProgressBarComponent.prototype, "activeColor", void 0);
5694
- __decorate([
5695
- Input()
5696
- ], ProgressBarComponent.prototype, "showValue", void 0);
5697
- __decorate([
5698
- Input()
5699
- ], ProgressBarComponent.prototype, "mode", void 0);
5700
- ProgressBarComponent = __decorate([
5701
- Component({
5702
- selector: "s-progressbar",
5703
- template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
5704
- styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
5705
- })
5706
- ], ProgressBarComponent);
5707
-
5708
- let ProgressBarDeterminateComponent = class ProgressBarDeterminateComponent {
5709
- constructor(localeService) {
5710
- this.localeService = localeService;
5711
- this.showValue = true;
5712
- }
5713
- ngOnInit() {
5714
- this.validateValues();
5715
- this.onGetLocale();
5716
- }
5717
- onGetLocale() {
5718
- this.localeService.getLocale().subscribe({
5719
- next: (locale) => {
5720
- this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", this.numberFormatOptions);
5721
- },
5722
- error: () => {
5723
- this.numberFormat = new Intl.NumberFormat("pt-BR", this.numberFormatOptions);
5724
- },
5725
- });
5726
- }
5727
- validateValues() {
5728
- if (this.value < 0 || this.value > 100) {
5729
- throw new Error("Invalid value for value");
5730
- }
5731
- if (this.targetValue < 0 || this.targetValue > 100) {
5732
- throw new Error("Invalid value for targetValue");
5733
- }
5734
- }
5735
- };
5736
- ProgressBarDeterminateComponent.ctorParameters = () => [
5737
- { type: LocaleService }
5738
- ];
5739
- __decorate([
5740
- Input()
5741
- ], ProgressBarDeterminateComponent.prototype, "value", void 0);
5742
- __decorate([
5743
- Input()
5744
- ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
5745
- __decorate([
5746
- Input()
5747
- ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
5748
- __decorate([
5749
- Input()
5750
- ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
5751
- __decorate([
5752
- Input()
5753
- ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
5754
- __decorate([
5755
- Input()
5756
- ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
5757
- ProgressBarDeterminateComponent = __decorate([
5758
- Component({
5759
- selector: "s-progressbar-determinate",
5760
- template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
5761
- styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
5762
- })
5763
- ], ProgressBarDeterminateComponent);
5764
-
5765
- let ProgressBarIndeterminateComponent = class ProgressBarIndeterminateComponent {
5766
- };
5767
- __decorate([
5768
- Input()
5769
- ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
5770
- __decorate([
5771
- Input()
5772
- ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
5773
- ProgressBarIndeterminateComponent = __decorate([
5774
- Component({
5775
- selector: "s-progressbar-indeterminate",
5776
- template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
5777
- styles: [".progressbar-indeterminate{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:5s infinite indeterminate-progress;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translateX(-250%)}100%{transform:translateX(250%)}}"]
5778
- })
5779
- ], ProgressBarIndeterminateComponent);
5780
-
5781
- let ProgressBarModule = class ProgressBarModule {
5782
- };
5783
- ProgressBarModule = __decorate([
5784
- NgModule({
5785
- imports: [CommonModule],
5786
- declarations: [
5787
- ProgressBarComponent,
5788
- ProgressBarDeterminateComponent,
5789
- ProgressBarIndeterminateComponent,
5790
- ],
5791
- exports: [ProgressBarComponent],
5792
- })
5793
- ], ProgressBarModule);
5794
-
5795
- let LocalizedBignumberPipe = class LocalizedBignumberPipe {
5796
- constructor(localeService) {
5797
- this.localeService = localeService;
5798
- }
5799
- transform(value, options) {
5800
- return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
5801
- }
5802
- applyMask(value, options) {
5803
- return this.localeService.get().pipe(map(localeConfig => {
5804
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5805
- const configs = {
5806
- prefix: (_c = (_a = options === null || options === void 0 ? void 0 : options.prefix) !== null && _a !== void 0 ? _a : (_b = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _b === void 0 ? void 0 : _b.currencySymbol) !== null && _c !== void 0 ? _c : "R$",
5807
- thousandsSeparator: (_f = (_d = options === null || options === void 0 ? void 0 : options.thousandsSeparator) !== null && _d !== void 0 ? _d : (_e = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _e === void 0 ? void 0 : _e.thousandsSeparator) !== null && _f !== void 0 ? _f : ".",
5808
- decimalSeparator: (_j = (_g = options === null || options === void 0 ? void 0 : options.decimalSeparator) !== null && _g !== void 0 ? _g : (_h = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _h === void 0 ? void 0 : _h.decimalSeparator) !== null && _j !== void 0 ? _j : ",",
5809
- scale: (_k = options === null || options === void 0 ? void 0 : options.scale) !== null && _k !== void 0 ? _k : 2,
5810
- allowNegative: (_l = options === null || options === void 0 ? void 0 : options.allowNegative) !== null && _l !== void 0 ? _l : true
5811
- };
5812
- const isNumber = !(new BigNumber(value).isNaN());
5813
- return applyMask(value, configs, isNumber);
5814
- }));
5815
- }
5816
- };
5817
- LocalizedBignumberPipe.ctorParameters = () => [
5818
- { type: LocaleService }
5819
- ];
5820
- LocalizedBignumberPipe = __decorate([
5821
- Pipe({
5822
- name: "localizedBignumber",
5823
- })
5824
- ], LocalizedBignumberPipe);
5825
-
5826
- let LocalizedBignumberImpurePipe = class LocalizedBignumberImpurePipe extends LocalizedBignumberPipe {
5827
- transform(value, options) {
5828
- return super.transform(value, options);
5829
- }
5830
- };
5831
- LocalizedBignumberImpurePipe = __decorate([
5832
- Pipe({
5833
- name: "localizedBignumberImpure",
5834
- pure: false,
5835
- })
5836
- ], LocalizedBignumberImpurePipe);
5837
-
5838
- class LocalizedCurrencyPipeOptions extends NumberLocaleOptions {
5839
- constructor(config = {}) {
5840
- super(config);
5841
- this.scale = 2;
5842
- }
5843
- }
5844
- /**
5845
- * @deprecated Should use localizedBignumberPipe instead
5846
- */
5847
- let LocalizedCurrencyPipe = class LocalizedCurrencyPipe {
5848
- constructor(localeService) {
5849
- this.localeService = localeService;
5850
- }
5851
- transform(value, options) {
5852
- if (!options) {
5853
- options = new LocalizedCurrencyPipeOptions();
5854
- }
5855
- return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
5856
- }
5857
- applyMask(value, options) {
5858
- return this.localeService.get().pipe(map(localeConfig => {
5859
- const config = Object.assign(Object.assign({}, localeConfig.number), options);
5860
- const { scale, currencySymbol, thousandsSeparator, decimalSeparator } = config;
5861
- const rawValue = Number(value).toFixed(scale);
5862
- const onlyNumbers = rawValue.replace(/[^0-9]/g, ``);
5863
- const integerPart = onlyNumbers
5864
- .slice(0, onlyNumbers.length - scale)
5865
- .replace(/^0*/g, ``)
5866
- .replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || `0`;
5867
- const decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
5868
- const newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
5869
- const isZero = !Number(onlyNumbers);
5870
- const operator = rawValue.includes("-") && !isZero ? "-" : "";
5871
- return `${operator}${currencySymbol}${newValue}`;
5872
- }));
5873
- }
5874
- };
5875
- LocalizedCurrencyPipe.ctorParameters = () => [
5876
- { type: LocaleService }
5877
- ];
5878
- LocalizedCurrencyPipe = __decorate([
5879
- Pipe({
5880
- name: "localizedCurrency",
5881
- })
5882
- ], LocalizedCurrencyPipe);
5883
-
5884
- /**
5885
- * @deprecated Should use localizedBignumberPipe instead
5886
- */
5887
- let LocalizedCurrencyImpurePipe = class LocalizedCurrencyImpurePipe extends LocalizedCurrencyPipe {
5888
- transform(value, options = new LocalizedCurrencyPipeOptions()) {
5889
- return super.transform(value, options);
5890
- }
5891
- };
5892
- LocalizedCurrencyImpurePipe = __decorate([
5893
- Pipe({
5894
- name: "localizedCurrencyImpure",
5895
- pure: false,
5896
- })
5897
- ], LocalizedCurrencyImpurePipe);
5898
-
5899
- const moment$1 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
5900
- let LocalizedDatePipe = class LocalizedDatePipe {
5901
- constructor(localeService) {
5902
- this.localeService = localeService;
5903
- }
5904
- transform(value, format = "L LTS") {
5905
- return this.localeService.get().pipe(map(() => (value ? moment$1(value).format(format) : value)));
5906
- }
5907
- };
5908
- LocalizedDatePipe.ctorParameters = () => [
5909
- { type: LocaleService }
5910
- ];
5911
- LocalizedDatePipe = __decorate([
5912
- Pipe({
5913
- name: "localizedDate",
5914
- })
5915
- ], LocalizedDatePipe);
5916
-
5917
- let LocalizedDateImpurePipe = class LocalizedDateImpurePipe extends LocalizedDatePipe {
5918
- };
5919
- LocalizedDateImpurePipe = __decorate([
5920
- Pipe({
5921
- name: "localizedDateImpure",
5922
- pure: false,
5923
- })
5924
- ], LocalizedDateImpurePipe);
5925
-
5926
- /**
5927
- * @deprecated Should use localizedBignumberPipe instead
5928
- */
5929
- let LocalizedNumberPipe = class LocalizedNumberPipe {
5930
- constructor(localeService) {
5931
- this.localeService = localeService;
5932
- }
5933
- transform(value, minimumFractionDigits) {
5934
- return from(this.localeService.getLocale()).pipe(map((locale) => {
5935
- const numericValue = Number(value);
5936
- if (!value && isNaN(numericValue))
5937
- return;
5938
- return new Intl.NumberFormat(locale, {
5939
- minimumFractionDigits: minimumFractionDigits || 0,
5940
- }).format(Number(value));
5941
- }));
5942
- }
5943
- };
5944
- LocalizedNumberPipe.ctorParameters = () => [
5945
- { type: LocaleService }
5946
- ];
5947
- LocalizedNumberPipe = __decorate([
5948
- Pipe({ name: "localizedNumber" })
5949
- ], LocalizedNumberPipe);
5950
-
5951
- const moment$2 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
5952
- let LocalizedTimePipe = class LocalizedTimePipe {
5953
- constructor(localeService) {
5954
- this.localeService = localeService;
5955
- }
5956
- transform(value, format = "LTS") {
5957
- return this.localeService.get().pipe(map(() => (value ? moment$2(value, "HH:mm:ss").format(format) : value)));
5958
- }
5959
- };
5960
- LocalizedTimePipe.ctorParameters = () => [
5961
- { type: LocaleService }
5962
- ];
5963
- LocalizedTimePipe = __decorate([
5964
- Pipe({
5965
- name: "localizedTime",
5966
- })
5967
- ], LocalizedTimePipe);
5968
-
5969
- let LocalizedTimeImpurePipe = class LocalizedTimeImpurePipe extends LocalizedTimePipe {
5970
- };
5971
- LocalizedTimeImpurePipe = __decorate([
5972
- Pipe({
5973
- name: "localizedTimeImpure",
5974
- pure: false,
5975
- })
5976
- ], LocalizedTimeImpurePipe);
5977
-
5978
- let NumericService = class NumericService {
5979
- constructor(localeService) {
5980
- this.localeService = localeService;
5981
- }
5982
- /**
5983
- * Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
5984
- *
5985
- * This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
5986
- *
5987
- * Can be overwritten by the provided Intl.NumberFormatOptions.
5988
- *
5989
- * Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
5990
- *
5991
- * @param {number | string | BigNumber} value The value to be formatted.
5992
- * @param {Intl.NumberFormatOptions} options Options that overwrites the default Intl.NumberFormatOptions.
5993
- * @return `string` The formatted value.
5994
- */
5995
- instant(value, options) {
5996
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5997
- options = Object.assign(Object.assign({}, options), { locale: (_c = (_a = options === null || options === void 0 ? void 0 : options.locale) !== null && _a !== void 0 ? _a : (_b = this.localeService.getLocaleOptions()) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "pt-BR", options: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.options), { currency: ((_d = options === null || options === void 0 ? void 0 : options.options) === null || _d === void 0 ? void 0 : _d.style) === "currency" ? (_f = (_e = options === null || options === void 0 ? void 0 : options.options) === null || _e === void 0 ? void 0 : _e.currency) !== null && _f !== void 0 ? _f : "BRL" : undefined, currencyDisplay: ((_g = options === null || options === void 0 ? void 0 : options.options) === null || _g === void 0 ? void 0 : _g.style) === "currency" ? (_j = (_h = options === null || options === void 0 ? void 0 : options.options) === null || _h === void 0 ? void 0 : _h.currencyDisplay) !== null && _j !== void 0 ? _j : "narrowSymbol" : undefined, minimumFractionDigits: (_l = (_k = options === null || options === void 0 ? void 0 : options.options) === null || _k === void 0 ? void 0 : _k.minimumFractionDigits) !== null && _l !== void 0 ? _l : 0 }) });
5998
- // From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
5999
- return new Intl.NumberFormat(options.locale, options.options).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
6000
- }
6001
- getType(value) {
6002
- // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
6003
- if (value === null) {
6004
- return "null";
6005
- }
6006
- const baseType = typeof value;
6007
- // Primitive types
6008
- if (baseType !== "object" && baseType !== "function") {
6009
- return baseType;
6010
- }
6011
- // Symbol.toStringTag often specifies the "display name" of the
6012
- // object's class. It's used in Object.prototype.toString().
6013
- const tag = value[Symbol.toStringTag];
6014
- if (typeof tag === "string") {
6015
- return tag;
6016
- }
6017
- // If it's a function whose source code starts with the "class" keyword
6018
- if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
6019
- return "class";
6020
- }
6021
- // The name of the constructor; for example `Array`, `GeneratorFunction`,
6022
- // `Number`, `String`, `Boolean` or `MyCustomClass`
6023
- const className = value.constructor.name;
6024
- if (typeof className === "string" && className !== "") {
6025
- return className;
6026
- }
6027
- // At this point there's no robust way to get the type of value,
6028
- // so we use the base implementation.
6029
- return baseType;
6030
- }
6031
- };
6032
- NumericService.ctorParameters = () => [
6033
- { type: LocaleService }
6034
- ];
6035
- NumericService.ɵprov = ɵɵdefineInjectable({ factory: function NumericService_Factory() { return new NumericService(ɵɵinject(LocaleService)); }, token: NumericService, providedIn: "root" });
6036
- NumericService = __decorate([
6037
- Injectable({
6038
- providedIn: "root",
6039
- })
6040
- ], NumericService);
6041
-
6042
- let NumericPipe = class NumericPipe {
6043
- constructor(numericService, localeService) {
6044
- this.numericService = numericService;
6045
- this.localeService = localeService;
6046
- }
6047
- transform(value, options) {
6048
- return (options === null || options === void 0 ? void 0 : options.locale) ? of(this.numericService.instant(value, options))
6049
- : this.localeService.getLocale().pipe(map((locale) => this.numericService.instant(value, {
6050
- locale,
6051
- options: options === null || options === void 0 ? void 0 : options.options,
6052
- })));
6053
- }
6054
- };
6055
- NumericPipe.ctorParameters = () => [
6056
- { type: NumericService },
6057
- { type: LocaleService }
6058
- ];
6059
- NumericPipe = __decorate([
6060
- Pipe({ name: "numeric" })
6061
- ], NumericPipe);
6062
-
6063
- var LocaleModule_1;
6064
- let LocaleModule = LocaleModule_1 = class LocaleModule {
6065
- static forRoot() {
6066
- return {
6067
- ngModule: LocaleModule_1,
6068
- providers: [
6069
- LocaleService,
6070
- LocalizedCurrencyPipe,
6071
- LocalizedDatePipe,
6072
- LocalizedTimePipe,
6073
- LocalizedNumberPipe,
6074
- LocalizedCurrencyImpurePipe,
6075
- LocalizedDateImpurePipe,
6076
- LocalizedTimeImpurePipe,
6077
- LocalizedBignumberPipe,
6078
- LocalizedBignumberImpurePipe,
6079
- NumericPipe
6080
- ],
6081
- };
5638
+ let FileUploadService = class FileUploadService {
5639
+ constructor() {
5640
+ this.BASE_URL_FIELD_CUSTOMIZATION = "platform/field_customization";
5641
+ this.TOKEN = new AbortController();
6082
5642
  }
6083
- static forChild() {
6084
- return {
6085
- ngModule: LocaleModule_1,
6086
- };
5643
+ getMetadataCustomField(request) {
5644
+ return __awaiter(this, void 0, void 0, function* () {
5645
+ return CustomHttpClient.POST(`${this.BASE_URL_FIELD_CUSTOMIZATION}/queries/getFileMetadata`, request, { signal: this.TOKEN.signal });
5646
+ });
6087
5647
  }
6088
5648
  };
6089
- LocaleModule = LocaleModule_1 = __decorate([
6090
- NgModule({
6091
- imports: [CommonModule],
6092
- exports: [
6093
- LocalizedCurrencyPipe,
6094
- LocalizedDatePipe,
6095
- LocalizedTimePipe,
6096
- LocalizedNumberPipe,
6097
- LocalizedCurrencyImpurePipe,
6098
- LocalizedDateImpurePipe,
6099
- LocalizedTimeImpurePipe,
6100
- LocalizedBignumberPipe,
6101
- LocalizedBignumberImpurePipe,
6102
- NumericPipe
6103
- ],
6104
- declarations: [
6105
- LocalizedCurrencyPipe,
6106
- LocalizedDatePipe,
6107
- LocalizedTimePipe,
6108
- LocalizedNumberPipe,
6109
- LocalizedCurrencyImpurePipe,
6110
- LocalizedDateImpurePipe,
6111
- LocalizedTimeImpurePipe,
6112
- LocalizedBignumberPipe,
6113
- LocalizedBignumberImpurePipe,
6114
- NumericPipe
6115
- ],
6116
- })
6117
- ], LocaleModule);
5649
+ FileUploadService = __decorate([
5650
+ Injectable()
5651
+ ], FileUploadService);
6118
5652
 
6119
5653
  const Breakpoints = {
6120
5654
  SM_MIN: 0,
@@ -6219,145 +5753,24 @@ class ExportUtils {
6219
5753
  var ValidateErrors;
6220
5754
  (function (ValidateErrors) {
6221
5755
  ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
6222
- ValidateErrors["MAX_COMBINED_FILE_SIZE"] = "MAX_COMBINED_FILE_SIZE";
6223
5756
  ValidateErrors["MAX_FILE_LIMIT"] = "MAX_FILE_LIMIT";
6224
5757
  ValidateErrors["UNSUPPORTED_EXTENSION"] = "UNSUPPORTED_EXTENSION";
6225
5758
  })(ValidateErrors || (ValidateErrors = {}));
6226
5759
 
6227
5760
  var FileUploadPermissions;
6228
- (function (FileUploadPermissions) {
6229
- FileUploadPermissions["Add"] = "add";
6230
- FileUploadPermissions["Read"] = "read";
6231
- FileUploadPermissions["Remove"] = "remove";
6232
- })(FileUploadPermissions || (FileUploadPermissions = {}));
6233
- const ALL_PERMISSIONS = [
6234
- FileUploadPermissions.Add,
6235
- FileUploadPermissions.Read,
6236
- FileUploadPermissions.Remove,
6237
- ];
6238
-
6239
- const StorageUnits = {
6240
- KB: 1024,
6241
- MB: Math.pow(1024, 2),
6242
- GB: Math.pow(1024, 3),
6243
- };
6244
-
6245
- let FileItemComponent = class FileItemComponent {
6246
- constructor(localeService) {
6247
- this.localeService = localeService;
6248
- this.canReadFiles = true;
6249
- this.canRemoveFiles = true;
6250
- this.cancelUpload = new EventEmitter();
6251
- this.removeFile = new EventEmitter();
6252
- }
6253
- ngOnInit() {
6254
- this._getLocale();
6255
- }
6256
- ngAfterContentInit() {
6257
- this._update();
6258
- }
6259
- onResize() {
6260
- this._update();
6261
- }
6262
- _update() {
6263
- const windowWidth = window.innerWidth;
6264
- this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;
6265
- }
6266
- simplifySize(size) {
6267
- let unit;
6268
- let convertedSize;
6269
- if (size < StorageUnits.KB) {
6270
- convertedSize = size;
6271
- unit = "bytes";
6272
- }
6273
- else if (size < StorageUnits.MB) {
6274
- convertedSize = size / StorageUnits.KB;
6275
- unit = "KB";
6276
- }
6277
- else if (size < StorageUnits.GB) {
6278
- convertedSize = size / StorageUnits.MB;
6279
- unit = "MB";
6280
- }
6281
- else {
6282
- convertedSize = size / StorageUnits.GB;
6283
- unit = "GB";
6284
- }
6285
- return `${convertedSize.toLocaleString(this._locale, { maximumFractionDigits: 2 })} ${unit}`;
6286
- }
6287
- _getLocale() {
6288
- this.localeService
6289
- .getLocale()
6290
- .pipe(first())
6291
- .subscribe((locale) => {
6292
- this._locale = locale;
6293
- });
6294
- }
6295
- };
6296
- FileItemComponent.ctorParameters = () => [
6297
- { type: LocaleService }
6298
- ];
6299
- __decorate([
6300
- Input()
6301
- ], FileItemComponent.prototype, "id", void 0);
6302
- __decorate([
6303
- Input()
6304
- ], FileItemComponent.prototype, "file", void 0);
6305
- __decorate([
6306
- Input()
6307
- ], FileItemComponent.prototype, "canReadFiles", void 0);
6308
- __decorate([
6309
- Input()
6310
- ], FileItemComponent.prototype, "canRemoveFiles", void 0);
6311
- __decorate([
6312
- Input()
6313
- ], FileItemComponent.prototype, "cancelLabel", void 0);
6314
- __decorate([
6315
- Input()
6316
- ], FileItemComponent.prototype, "removeLabel", void 0);
6317
- __decorate([
6318
- Input()
6319
- ], FileItemComponent.prototype, "ariaLabelProgress", void 0);
6320
- __decorate([
6321
- Input()
6322
- ], FileItemComponent.prototype, "successTooltip", void 0);
6323
- __decorate([
6324
- Input()
6325
- ], FileItemComponent.prototype, "ariaLabelSuccess", void 0);
6326
- __decorate([
6327
- Output()
6328
- ], FileItemComponent.prototype, "cancelUpload", void 0);
6329
- __decorate([
6330
- Output()
6331
- ], FileItemComponent.prototype, "removeFile", void 0);
6332
- __decorate([
6333
- HostListener("window:resize")
6334
- ], FileItemComponent.prototype, "onResize", null);
6335
- FileItemComponent = __decorate([
6336
- Component({
6337
- selector: "s-file-item",
6338
- template: "<div [id]=\"id\" class=\"file-item-container\">\n <div class=\"file-info\">\n <ng-container *ngIf=\"canReadFiles; then fileNameUrl; else fileName\"></ng-container>\n <ng-template #fileNameUrl>\n <a\n class=\"file-name file-name--link\"\n tabindex=\"0\"\n [href]=\"file.objectURL\"\n download>\n {{ file.name }}\n </a>\n </ng-template>\n <ng-template #fileName>\n <span\n *ngIf=\"!canReadFiles\"\n class=\"file-name\">\n {{ file.name }}\n </span>\n </ng-template>\n <span class=\"file-size\">\n {{ simplifySize(file.size) }}\n </span>\n <div\n *ngIf=\"file.isUploading && !isSmallDevice\"\n class=\"progressbar\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n <s-progressbar\n [value]=\"file.progress\"\n activeColor=\"blue\"\n [showValue]=\"true\">\n </s-progressbar>\n </div>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n\n <span\n *ngIf=\"!file.isUploading && !file.error\"\n class=\"status-icon status-icon--success fas fa-check\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [sTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && file.error\"\n class=\"status-icon status-icon--fail fas fa-times\"\n [attr.aria-label]=\"file.error?.message\"\n [sTooltip]=\"file.error?.message\">\n </span>\n </div>\n <button\n *ngIf=\"file.isUploading\"\n class=\"file-option file-option--cancel\"\n (click)=\"cancelUpload.emit(file)\">\n {{ cancelLabel || \"platform.angular_components.cancel\" | translate }}\n </button>\n <button\n *ngIf=\"canRemoveFiles && !file.isUploading\"\n class=\"file-option file-option--remove\"\n (click)=\"removeFile.emit(file)\">\n {{ removeLabel || \"platform.angular_components.remove\" | translate }}\n </button>\n</div>\n",
6339
- styles: [".file-item-container{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:16px;padding:16px}.file-item-container .file-info{color:#212533;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;gap:16px;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.file-item-container .file-info .file-name{-ms-flex-positive:1;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item-container .file-info .file-name--link{color:#428bca;text-decoration:none}.file-item-container .file-info .file-size{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-item-container .progressbar{width:20%}.file-item-container .status-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;font-size:12px}.file-item-container .status-icon--success{color:#0c9348}.file-item-container .status-icon--fail{color:#c13018}.file-item-container .file-option{background-color:transparent;border:none;color:#428bca;cursor:pointer;font-family:\"Open Sans\",sans-serif;font-size:14px;overflow:hidden;text-overflow:ellipsis;max-width:100%}@media screen and (max-width:600px){.file-item-container{-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:column;flex-direction:column}}"]
6340
- })
6341
- ], FileItemComponent);
6342
-
6343
- const moment$3 = moment_;
6344
- let FileUploadService = class FileUploadService {
6345
- constructor() {
6346
- this.BASE_URL_FIELD_CUSTOMIZATION = "platform/field_customization";
6347
- this.TOKEN = new AbortController();
6348
- }
6349
- getMetadataCustomField(request) {
6350
- return __awaiter(this, void 0, void 0, function* () {
6351
- return CustomHttpClient.POST(`${this.BASE_URL_FIELD_CUSTOMIZATION}/queries/getFileMetadata`, request, { signal: this.TOKEN.signal });
6352
- });
6353
- }
6354
- };
6355
- FileUploadService = __decorate([
6356
- Injectable()
6357
- ], FileUploadService);
5761
+ (function (FileUploadPermissions) {
5762
+ FileUploadPermissions["Add"] = "add";
5763
+ FileUploadPermissions["Read"] = "read";
5764
+ FileUploadPermissions["Remove"] = "remove";
5765
+ })(FileUploadPermissions || (FileUploadPermissions = {}));
5766
+ const ALL_PERMISSIONS = [
5767
+ FileUploadPermissions.Add,
5768
+ FileUploadPermissions.Read,
5769
+ FileUploadPermissions.Remove,
5770
+ ];
6358
5771
 
6359
5772
  var FileUploadComponent_1;
6360
- const moment$4 = moment_;
5773
+ const moment$1 = moment_;
6361
5774
  let FileUploadComponent = FileUploadComponent_1 = class FileUploadComponent {
6362
5775
  constructor(sanitizer, fileUploadService, translate) {
6363
5776
  this.sanitizer = sanitizer;
@@ -6376,59 +5789,58 @@ let FileUploadComponent = FileUploadComponent_1 = class FileUploadComponent {
6376
5789
  this.cancelUpload = new EventEmitter();
6377
5790
  this.downloadFile = new EventEmitter();
6378
5791
  this.validateErrors = new EventEmitter();
6379
- this.inputValue = "";
6380
5792
  this._files = [];
6381
5793
  this.ngUsubscribe = new Subject();
5794
+ this.inputValue = "";
6382
5795
  }
6383
5796
  set files(files) {
6384
5797
  var _a;
6385
5798
  if (this.showFileUploadDate && ((_a = files[0]) === null || _a === void 0 ? void 0 : _a.objectId)) {
6386
- this._getUploadDate(files);
5799
+ this.getUploadDate(files);
6387
5800
  }
6388
- this._files = files.map((file) => {
6389
- if (this._isImage(file)) {
5801
+ this._files = files.map(file => {
5802
+ if (this.isImage(file)) {
6390
5803
  file.objectURL = this.sanitizer.bypassSecurityTrustUrl(window.URL.createObjectURL(file));
6391
5804
  }
6392
5805
  return file;
6393
5806
  });
6394
5807
  }
6395
5808
  ngOnInit() {
6396
- this.supportedExtensions = this.supportedExtensions.map((extension) => extension.replace(".", "").toLowerCase());
5809
+ this.supportedExtensions = this.supportedExtensions
5810
+ .map(extension => extension.replace(".", "").toLowerCase());
6397
5811
  }
6398
5812
  ngOnDestroy() {
6399
5813
  this.ngUsubscribe.next();
6400
5814
  this.ngUsubscribe.complete();
6401
5815
  }
5816
+ ngAfterContentInit() {
5817
+ this.update();
5818
+ }
5819
+ onResize() {
5820
+ this.update();
5821
+ }
6402
5822
  onFileSelect(files) {
6403
5823
  const newFiles = [];
6404
5824
  if (!this.multiple) {
6405
5825
  this.files = [];
6406
5826
  }
6407
- if (this._isFileLimitExceeded(files)) {
5827
+ if (this.isFileLimitExceeded(files)) {
6408
5828
  this.validateErrors.emit({
6409
5829
  files,
6410
5830
  validation: ValidateErrors.MAX_FILE_LIMIT,
6411
5831
  });
6412
- this._clearFileInput();
6413
- return;
6414
- }
6415
- if (this._isFileCombinedSizeExceeded(files)) {
6416
- this.validateErrors.emit({
6417
- files,
6418
- validation: ValidateErrors.MAX_COMBINED_FILE_SIZE,
6419
- });
6420
- this._clearFileInput();
5832
+ this.clearFileInput();
6421
5833
  return;
6422
5834
  }
6423
5835
  for (const file of files) {
6424
- if (this._isUnsupportedFileExtension(file)) {
5836
+ if (this.isUnsupportedFileExtension(file)) {
6425
5837
  this.validateErrors.emit({
6426
5838
  files: [file],
6427
5839
  validation: ValidateErrors.UNSUPPORTED_EXTENSION,
6428
5840
  });
6429
5841
  continue;
6430
5842
  }
6431
- if (this._isFileSizeExceeded(file)) {
5843
+ if (this.isFileSizeExceeded(file)) {
6432
5844
  this.validateErrors.emit({
6433
5845
  files: [file],
6434
5846
  validation: ValidateErrors.MAX_FILE_SIZE,
@@ -6443,7 +5855,7 @@ let FileUploadComponent = FileUploadComponent_1 = class FileUploadComponent {
6443
5855
  files: newFiles,
6444
5856
  });
6445
5857
  }
6446
- this._clearFileInput();
5858
+ this.clearFileInput();
6447
5859
  }
6448
5860
  onRemoveFile(file) {
6449
5861
  const fileIndex = this.files.indexOf(file);
@@ -6452,13 +5864,12 @@ let FileUploadComponent = FileUploadComponent_1 = class FileUploadComponent {
6452
5864
  this.removeFile.emit({ file });
6453
5865
  }
6454
5866
  }
6455
- onCancelUpload(file) {
6456
- const index = this.files.indexOf(file);
6457
- if (index != -1) {
6458
- this.files.splice(index, 1);
5867
+ onCancelUpload(index) {
5868
+ const removedFiles = this.files.splice(index, 1);
5869
+ if (removedFiles.length) {
6459
5870
  this.cancelUpload.emit(index);
6460
5871
  }
6461
- this._clearFileInput();
5872
+ this.clearFileInput();
6462
5873
  }
6463
5874
  onDowloadFile(index) {
6464
5875
  this.downloadFile.emit({
@@ -6469,64 +5880,50 @@ let FileUploadComponent = FileUploadComponent_1 = class FileUploadComponent {
6469
5880
  get files() {
6470
5881
  return this._files;
6471
5882
  }
6472
- _isImage(file) {
5883
+ update() {
5884
+ const windowWidth = window.innerWidth;
5885
+ this.isSmallDevice = windowWidth <= Breakpoints.SM_MAX;
5886
+ }
5887
+ isImage(file) {
6473
5888
  return /^image\//.test(file.type);
6474
5889
  }
6475
- _isFileLimitExceeded(files) {
5890
+ isFileLimitExceeded(files) {
6476
5891
  if (!this.fileLimit) {
6477
5892
  return false;
6478
5893
  }
6479
5894
  return this.files.length + files.length > this.fileLimit;
6480
5895
  }
6481
- _isFileCombinedSizeExceeded(files) {
6482
- if (!this.maxCombinedFileSize) {
6483
- return false;
6484
- }
6485
- const filesList = [...files, ...this.files];
6486
- const combinedSize = filesList.reduce((combinedSize, file) => combinedSize + file.size, 0);
6487
- return combinedSize > this.maxCombinedFileSize;
6488
- }
6489
- _isFileSizeExceeded(file) {
5896
+ isFileSizeExceeded(file) {
6490
5897
  if (!this.maxFileSize) {
6491
5898
  return false;
6492
5899
  }
6493
5900
  return file.size > this.maxFileSize;
6494
5901
  }
6495
- _isUnsupportedFileExtension(file) {
5902
+ isUnsupportedFileExtension(file) {
6496
5903
  var _a;
6497
5904
  if ((_a = this.supportedExtensions) === null || _a === void 0 ? void 0 : _a.length) {
6498
- const extension = file.name
6499
- .split(".")
6500
- .pop()
6501
- .toLowerCase();
5905
+ const extension = file.name.split(".").pop().toLowerCase();
6502
5906
  return !this.supportedExtensions.includes(extension);
6503
5907
  }
6504
5908
  return false;
6505
5909
  }
6506
- _clearFileInput() {
5910
+ clearFileInput() {
6507
5911
  this.inputUpload.nativeElement.value = null;
6508
5912
  }
6509
- _getUploadDate(blobFile) {
5913
+ getUploadDate(blobFile) {
6510
5914
  if (!blobFile) {
6511
5915
  return;
6512
5916
  }
6513
- this.fileUploadService
6514
- .getMetadataCustomField({ objectId: blobFile[0].objectId })
6515
- .then((metadata) => this._setModifiedDate(metadata));
6516
- }
6517
- _setModifiedDate(metadata) {
6518
- const hour = moment$4(metadata.modified).format("HH");
6519
- const minutes = moment$4(metadata.modified).format("mm");
6520
- const day = moment$4(metadata.modified).format("DD");
6521
- const month = moment$4(metadata.modified).format("MM");
6522
- const fullYear = moment$4(metadata.modified).format("YYYY");
6523
- this.modifiedDate = this.translate.instant("platform.angular_components.date_modified_custom_blob", {
6524
- hour,
6525
- minutes,
6526
- day,
6527
- month,
6528
- fullYear,
6529
- });
5917
+ this.fileUploadService.getMetadataCustomField({ objectId: blobFile[0].objectId })
5918
+ .then(metadata => this.setModifiedDate(metadata));
5919
+ }
5920
+ setModifiedDate(metadata) {
5921
+ const hour = moment$1(metadata.modified).format("HH");
5922
+ const minutes = moment$1(metadata.modified).format("mm");
5923
+ const day = moment$1(metadata.modified).format("DD");
5924
+ const month = moment$1(metadata.modified).format("MM");
5925
+ const fullYear = moment$1(metadata.modified).format("YYYY");
5926
+ this.modifiedDate = this.translate.instant("platform.angular_components.date_modified_custom_blob", { hour, minutes, day, month, fullYear });
6530
5927
  }
6531
5928
  };
6532
5929
  FileUploadComponent.nextId = 0;
@@ -6571,9 +5968,6 @@ __decorate([
6571
5968
  __decorate([
6572
5969
  Input()
6573
5970
  ], FileUploadComponent.prototype, "maxFileSize", void 0);
6574
- __decorate([
6575
- Input()
6576
- ], FileUploadComponent.prototype, "maxCombinedFileSize", void 0);
6577
5971
  __decorate([
6578
5972
  Input()
6579
5973
  ], FileUploadComponent.prototype, "fileLimit", void 0);
@@ -6619,11 +6013,14 @@ __decorate([
6619
6013
  __decorate([
6620
6014
  Output()
6621
6015
  ], FileUploadComponent.prototype, "validateErrors", void 0);
6016
+ __decorate([
6017
+ HostListener("window:resize")
6018
+ ], FileUploadComponent.prototype, "onResize", null);
6622
6019
  FileUploadComponent = FileUploadComponent_1 = __decorate([
6623
6020
  Component({
6624
6021
  selector: "s-file-upload",
6625
- template: "<div [id]=\"id\" class=\"fileupload\">\n <div class=\"fileupload-choose\">\n <input\n #inputUpload\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer ? $event.dataTransfer.files : $event.target.files)\"\n />\n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\"\n >\n </s-button>\n </div>\n <ul\n *ngIf=\"files.length\"\n class=\"file-list\"\n role=\"grid\">\n <li *ngFor=\"let file of files; let i = index\" class=\"file-list-item\">\n <s-file-item\n [id]=\"'file-' + i\"\n [file]=\"file\"\n [canReadFiles]=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\"\n [canRemoveFiles]=\"permissions.includes(REMOVE_PERMISSION) && !(disabled || !!formGroup?.disabled)\"\n [cancelLabel]=\"cancelLabel\"\n [removeLabel]=\"removeLabel\"\n [ariaLabelProgress]=\"ariaLabelProgress\"\n [successTooltip]=\"successTooltip\"\n [ariaLabelSuccess]=\"ariaLabelSuccess\"\n (cancelUpload)=\"onCancelUpload($event)\"\n (removeFile)=\"onRemoveFile($event)\"\n >\n </s-file-item>\n </li>\n </ul>\n</div>\n",
6626
- styles: [".fileupload .fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.fileupload input[type=file]{display:none}.fileupload .file-list{border:1px solid #c1c1cc;border-radius:4px;padding:0}.fileupload .file-list .file-list-item{list-style-type:none}.fileupload .file-list .file-list-item:not(:first-child){border-top:1px solid #ccc}"]
6022
+ template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [pTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\">\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
6023
+ styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name .s-fileupload-list-file-name-date{font-size:.75rem;color:#999}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
6627
6024
  })
6628
6025
  ], FileUploadComponent);
6629
6026
 
@@ -6631,350 +6028,667 @@ let FileUploadModule = class FileUploadModule {
6631
6028
  };
6632
6029
  FileUploadModule = __decorate([
6633
6030
  NgModule({
6031
+ declarations: [FileUploadComponent],
6634
6032
  imports: [
6635
6033
  CommonModule,
6636
- HttpClientModule,
6637
6034
  ButtonModule,
6638
- TooltipModule,
6639
- ProgressBarModule,
6035
+ TooltipModule$1,
6036
+ ProgressBarModule$1,
6640
6037
  TranslateModule,
6641
6038
  ],
6642
- declarations: [
6643
- FileUploadComponent,
6644
- FileItemComponent,
6645
- ],
6646
- providers: [
6647
- FileUploadService,
6648
- LocaleService,
6649
- ],
6039
+ providers: [FileUploadService],
6650
6040
  exports: [FileUploadComponent],
6651
6041
  })
6652
6042
  ], FileUploadModule);
6653
6043
 
6654
6044
  let InfoSignComponent = class InfoSignComponent {
6655
6045
  };
6656
- InfoSignComponent = __decorate([
6046
+ InfoSignComponent = __decorate([
6047
+ Component({
6048
+ selector: "s-info-sign-component",
6049
+ template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\">\n </i>\n</span>",
6050
+ styles: [".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]
6051
+ })
6052
+ ], InfoSignComponent);
6053
+
6054
+ let InfoSignDirective = class InfoSignDirective {
6055
+ constructor(templateRef, viewContainer, componentFactoryResolver) {
6056
+ this.templateRef = templateRef;
6057
+ this.viewContainer = viewContainer;
6058
+ this.componentFactoryResolver = componentFactoryResolver;
6059
+ this.displayTime = 5000;
6060
+ }
6061
+ ngOnInit() {
6062
+ if (!this.componentRef && this.sInfoSign) {
6063
+ this.viewContainer.clear();
6064
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(InfoSignComponent);
6065
+ this.componentRef = this.viewContainer.createComponent(componentFactory);
6066
+ this.componentRef.instance.templateRef = this.templateRef;
6067
+ this.componentRef.instance.tooltip = this.sInfoSign;
6068
+ this.componentRef.instance.displayTime = this.displayTime;
6069
+ }
6070
+ else if (this.componentRef && this.sInfoSign) {
6071
+ this.componentRef.instance.tooltip = this.sInfoSign;
6072
+ }
6073
+ else {
6074
+ this.viewContainer.clear();
6075
+ this.viewContainer.createEmbeddedView(this.templateRef);
6076
+ }
6077
+ }
6078
+ ngOnDestroy() {
6079
+ if (this.componentRef) {
6080
+ this.componentRef.destroy();
6081
+ }
6082
+ }
6083
+ };
6084
+ InfoSignDirective.ctorParameters = () => [
6085
+ { type: TemplateRef },
6086
+ { type: ViewContainerRef },
6087
+ { type: ComponentFactoryResolver }
6088
+ ];
6089
+ __decorate([
6090
+ Input()
6091
+ ], InfoSignDirective.prototype, "sInfoSign", void 0);
6092
+ __decorate([
6093
+ Input('sInfoSignDisplayTime')
6094
+ ], InfoSignDirective.prototype, "displayTime", void 0);
6095
+ InfoSignDirective = __decorate([
6096
+ Directive({
6097
+ selector: "[sInfoSign]",
6098
+ })
6099
+ ], InfoSignDirective);
6100
+
6101
+ let InfoSignModule = class InfoSignModule {
6102
+ };
6103
+ InfoSignModule = __decorate([
6104
+ NgModule({
6105
+ imports: [
6106
+ TooltipModule,
6107
+ CommonModule,
6108
+ ],
6109
+ declarations: [
6110
+ InfoSignDirective,
6111
+ InfoSignComponent,
6112
+ ],
6113
+ exports: [InfoSignDirective],
6114
+ entryComponents: [InfoSignComponent],
6115
+ })
6116
+ ], InfoSignModule);
6117
+
6118
+ let IAssistIconComponent = class IAssistIconComponent {
6119
+ };
6120
+ IAssistIconComponent = __decorate([
6121
+ Component({
6122
+ template: "<svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n</svg>"
6123
+ })
6124
+ ], IAssistIconComponent);
6125
+
6126
+ let SeniorIconComponent = class SeniorIconComponent {
6127
+ };
6128
+ SeniorIconComponent = __decorate([
6129
+ Component({
6130
+ template: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 348 613\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g filter=\"url(#filter0_d_2841_2040)\">\n <path d=\"M174.719 518.932L258.161 439.782C264.546 433.762 269.614 426.603 273.072 418.719C276.53 410.834 278.31 402.378 278.31 393.838C278.31 385.298 276.53 376.843 273.072 368.958C269.614 361.073 264.546 353.915 258.161 347.895L174.719 269.199C168.45 263.304 163.474 256.289 160.077 248.56C156.681 240.83 154.933 232.539 154.933 224.165C154.933 215.792 156.681 207.501 160.077 199.771C163.474 192.042 168.45 185.027 174.719 179.132L303.718 301.496C329.517 326.089 344 359.371 344 394.066C344 428.76 329.517 462.043 303.718 486.635L174.719 609C168.45 603.105 163.474 596.09 160.077 588.36C156.681 580.631 154.933 572.34 154.933 563.966C154.933 555.592 156.681 547.301 160.077 539.572C163.474 531.842 168.45 524.828 174.719 518.932ZM173.76 94.0677L90.3189 173.218C83.9334 179.238 78.8659 186.397 75.408 194.281C71.95 202.166 70.1698 210.622 70.1698 219.162C70.1698 227.702 71.95 236.157 75.408 244.042C78.8659 251.927 83.9334 259.085 90.3189 265.105L173.76 344.256C180.03 350.151 185.006 357.166 188.402 364.895C191.798 372.625 193.547 380.916 193.547 389.289C193.547 397.663 191.798 405.954 188.402 413.684C185.006 421.413 180.03 428.428 173.76 434.323L44.2823 311.504C18.4832 286.911 4 253.629 4 218.934C4 184.24 18.4832 150.957 44.2823 126.365L173.76 4C186.213 16.0129 193.192 32.1861 193.192 49.0338C193.192 65.8815 186.213 82.0547 173.76 94.0677Z\" fill=\"white\" />\n </g>\n <defs>\n <filter id=\"filter0_d_2841_2040\" x=\"0\" y=\"0\" width=\"348\" height=\"613\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\" >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\n <feOffset />\n <feGaussianBlur stdDeviation=\"2\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix type=\"matrix\" values=\"0 0 0 0 0.418936 0 0 0 0 1 0 0 0 0 0.930272 0 0 0 0.35 0\" />\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_2841_2040\" />\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_2841_2040\" result=\"shape\" />\n </filter>\n </defs>\n</svg>\n"
6131
+ })
6132
+ ], SeniorIconComponent);
6133
+
6134
+ var SVGFactoryIcons;
6135
+ (function (SVGFactoryIcons) {
6136
+ SVGFactoryIcons["IAssist"] = "iassist";
6137
+ SVGFactoryIcons["Senior"] = "senior";
6138
+ })(SVGFactoryIcons || (SVGFactoryIcons = {}));
6139
+
6140
+ let SVGFactoryDirective = class SVGFactoryDirective {
6141
+ constructor(viewContainerRef, componentFactoryResolver, cdr) {
6142
+ this.viewContainerRef = viewContainerRef;
6143
+ this.componentFactoryResolver = componentFactoryResolver;
6144
+ this.cdr = cdr;
6145
+ this._iconClass = this._getIconClass(SVGFactoryIcons.Senior);
6146
+ }
6147
+ set sSVGFactory(icon) {
6148
+ this._iconClass = this._getIconClass(icon);
6149
+ }
6150
+ ngAfterViewInit() {
6151
+ this._createComponent();
6152
+ }
6153
+ _createComponent() {
6154
+ const factory = this.componentFactoryResolver.resolveComponentFactory(this._iconClass);
6155
+ this.viewContainerRef.clear();
6156
+ this.viewContainerRef.createComponent(factory);
6157
+ this.cdr.detectChanges();
6158
+ }
6159
+ _getIconClass(icon) {
6160
+ switch (icon) {
6161
+ case SVGFactoryIcons.IAssist:
6162
+ return IAssistIconComponent;
6163
+ case SVGFactoryIcons.Senior:
6164
+ default:
6165
+ return SeniorIconComponent;
6166
+ }
6167
+ }
6168
+ };
6169
+ SVGFactoryDirective.ctorParameters = () => [
6170
+ { type: ViewContainerRef },
6171
+ { type: ComponentFactoryResolver },
6172
+ { type: ChangeDetectorRef }
6173
+ ];
6174
+ __decorate([
6175
+ Input("sSVGFactory")
6176
+ ], SVGFactoryDirective.prototype, "sSVGFactory", null);
6177
+ SVGFactoryDirective = __decorate([
6178
+ Directive({
6179
+ selector: "[sSVGFactory]",
6180
+ })
6181
+ ], SVGFactoryDirective);
6182
+
6183
+ let SVGFactoryModule = class SVGFactoryModule {
6184
+ };
6185
+ SVGFactoryModule = __decorate([
6186
+ NgModule({
6187
+ imports: [CommonModule],
6188
+ declarations: [
6189
+ SVGFactoryDirective,
6190
+ IAssistIconComponent,
6191
+ SeniorIconComponent,
6192
+ ],
6193
+ exports: [SVGFactoryDirective],
6194
+ })
6195
+ ], SVGFactoryModule);
6196
+
6197
+ let DotsIndicatorComponent = class DotsIndicatorComponent {
6198
+ };
6199
+ DotsIndicatorComponent = __decorate([
6200
+ Component({
6201
+ selector: "s-dots-indicator",
6202
+ template: "<div class=\"dots-indicator\">\n <div class=\"bounce bounce--1\"></div>\n <div class=\"bounce bounce--2\"></div>\n <div class=\"bounce bounce--3\"></div>\n</div>\n",
6203
+ styles: [".dots-indicator .bounce{animation:1.2s ease-out infinite bounce;background-color:#333;border-radius:100%;display:inline-block;height:10px;width:10px}.dots-indicator .bounce+.bounce{margin-left:15px}.dots-indicator .bounce.bounce--1{animation-delay:0s}.dots-indicator .bounce.bounce--2{animation-delay:.1s}.dots-indicator .bounce.bounce--3{animation-delay:.2s}@keyframes bounce{100%,80%{transform:scale(1)}90%{transform:scale(1.8)}}"]
6204
+ })
6205
+ ], DotsIndicatorComponent);
6206
+
6207
+ let LoadingIndicatorComponent = class LoadingIndicatorComponent {
6208
+ };
6209
+ LoadingIndicatorComponent = __decorate([
6210
+ Component({
6211
+ selector: "s-logo-indicator",
6212
+ template: "<div class=\"logo-indicator\">\n <span *sSVGFactory=\"'senior'\"></span>\n</div>\n",
6213
+ styles: [".logo-indicator{animation:1s infinite pulsar,1s infinite scale;background-color:#00c89a;border-radius:50%;box-shadow:0 0 0 #00c89ab3;height:64px;padding:calc(64px * .16);position:relative;width:64px}@keyframes pulsar{0%{box-shadow:0 0 0 0 #00c89ab3}70%{box-shadow:0 0 0 40px #00c89a00}100%{box-shadow:0 0 0 0 #00c89a00}}@keyframes scale{0%,100%{transform:scale(1)}50%{transform:scale(1.3)}}"]
6214
+ })
6215
+ ], LoadingIndicatorComponent);
6216
+
6217
+ var LoadingStateIndicators;
6218
+ (function (LoadingStateIndicators) {
6219
+ LoadingStateIndicators["Dots"] = "dots";
6220
+ LoadingStateIndicators["Logo"] = "logo";
6221
+ })(LoadingStateIndicators || (LoadingStateIndicators = {}));
6222
+
6223
+ var LoadingStateComponent_1;
6224
+ let LoadingStateComponent = LoadingStateComponent_1 = class LoadingStateComponent {
6225
+ constructor() {
6226
+ this.indicator = LoadingStateIndicators.Dots;
6227
+ this.id = `s-loading-state-${LoadingStateComponent_1.nextId++}`;
6228
+ this.BLOCK_TIMEOUT_VALUE = 300;
6229
+ this.UNBLOCK_TIMEOUT_VALUE = 200;
6230
+ }
6231
+ set loading(loading) {
6232
+ this._loading = loading;
6233
+ loading ? this.block() : this.unblock();
6234
+ }
6235
+ get loading() {
6236
+ return this._loading;
6237
+ }
6238
+ block() {
6239
+ if (this.unblockTimeoutId) {
6240
+ clearTimeout(this.unblockTimeoutId);
6241
+ this.unblockTimeoutId = undefined;
6242
+ }
6243
+ if (!this.blockTimeoutId) {
6244
+ this.blockTimeoutId = setTimeout(() => {
6245
+ this.blocking = true;
6246
+ this.blockTimeoutId = undefined;
6247
+ }, this.BLOCK_TIMEOUT_VALUE);
6248
+ }
6249
+ }
6250
+ unblock() {
6251
+ if (this.blockTimeoutId) {
6252
+ clearTimeout(this.blockTimeoutId);
6253
+ this.blockTimeoutId = undefined;
6254
+ }
6255
+ if (!this.unblockTimeoutId) {
6256
+ this.unblockTimeoutId = setTimeout(() => {
6257
+ this.blocking = false;
6258
+ this.unblockTimeoutId = undefined;
6259
+ }, this.UNBLOCK_TIMEOUT_VALUE);
6260
+ }
6261
+ }
6262
+ ngOnDestroy() {
6263
+ if (this.blockTimeoutId) {
6264
+ clearTimeout(this.blockTimeoutId);
6265
+ }
6266
+ if (this.unblockTimeoutId) {
6267
+ clearTimeout(this.unblockTimeoutId);
6268
+ }
6269
+ }
6270
+ };
6271
+ LoadingStateComponent.nextId = 0;
6272
+ __decorate([
6273
+ Input()
6274
+ ], LoadingStateComponent.prototype, "indicator", void 0);
6275
+ __decorate([
6276
+ Input()
6277
+ ], LoadingStateComponent.prototype, "id", void 0);
6278
+ __decorate([
6279
+ Input()
6280
+ ], LoadingStateComponent.prototype, "blockWindow", void 0);
6281
+ __decorate([
6282
+ Input()
6283
+ ], LoadingStateComponent.prototype, "loading", null);
6284
+ LoadingStateComponent = LoadingStateComponent_1 = __decorate([
6657
6285
  Component({
6658
- selector: "s-info-sign-component",
6659
- template: "<span class=\"info-sign\">\n <span *ngTemplateOutlet=\"templateRef\"></span>\n <i\n class=\"info-sign__icon fa fa-info-circle\"\n aria-hidden=\"true\"\n [sTooltip]=\"tooltip\"\n [escape]=\"false\"\n tooltipPosition=\"top\"\n [displayTime]=\"displayTime\"\n mobileBehavior=\"tap\"\n showDelay=\"0\">\n </i>\n</span>",
6660
- styles: [".info-sign{-ms-flex-align:baseline;align-items:baseline;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start}.info-sign .info-sign__icon{padding:0 12px}"]
6286
+ selector: "s-loading-state",
6287
+ template: "<div\n [id]=\"id\"\n class=\"s-loading-state-container\"\n [ngClass]=\"{\n 'loading': loading,\n 'blocking': blocking,\n 'fullscreen': blockWindow\n }\">\n <div\n [id]=\"id + '-loader'\"\n class=\"loader\">\n <div\n [id]=\"id + '-spinner'\"\n class=\"spinner\">\n <ng-container [ngSwitch]=\"indicator\">\n <s-logo-indicator *ngSwitchCase=\"'logo'\"></s-logo-indicator>\n <s-dots-indicator *ngSwitchCase=\"'dots'\"></s-dots-indicator>\n </ng-container>\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"overlay\">\n </div>\n </div>\n <div\n [id]=\"id + '-contents'\"\n class=\"contents\">\n <ng-container *ngTemplateOutlet=\"contents || originalContent\"></ng-container>\n <ng-template #originalContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>",
6288
+ styles: [".s-loading-state-container{position:relative}.s-loading-state-container .loader{opacity:0;position:absolute;transition:opacity .2s ease-out,display .2s ease-out;visibility:hidden;inset:1px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.s-loading-state-container .loader .overlay{background-color:#fff;height:100%;opacity:.8;transition:opacity .2s ease-out,display .2s ease-out;width:100%}.s-loading-state-container .loader .spinner{display:-ms-flexbox;display:flex;position:absolute;z-index:2}.s-loading-state-container.blocking>.loader,.s-loading-state-container.loading>.loader{visibility:visible}.s-loading-state-container.blocking>.loader,.s-loading-state-container.blocking>.loader>.overlay,.s-loading-state-container.loading>.loader,.s-loading-state-container.loading>.loader>.overlay{cursor:wait;z-index:1}.s-loading-state-container.blocking>.contents,.s-loading-state-container.loading>.contents{z-index:0!important}.s-loading-state-container.blocking.loading>.loader{opacity:1}.s-loading-state-container.fullscreen>.loader{left:0;position:fixed;top:0;z-index:1005}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.loader{opacity:0;visibility:hidden}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.contents{z-index:0!important}"]
6661
6289
  })
6662
- ], InfoSignComponent);
6290
+ ], LoadingStateComponent);
6663
6291
 
6664
- let InfoSignDirective = class InfoSignDirective {
6665
- constructor(templateRef, viewContainer, componentFactoryResolver) {
6666
- this.templateRef = templateRef;
6667
- this.viewContainer = viewContainer;
6292
+ let LoadingStateDirective = class LoadingStateDirective {
6293
+ constructor(target, template, componentFactoryResolver, cdr) {
6294
+ this.target = target;
6295
+ this.template = template;
6668
6296
  this.componentFactoryResolver = componentFactoryResolver;
6669
- this.displayTime = 5000;
6297
+ this.cdr = cdr;
6298
+ this._loading = false;
6299
+ this.indicator = LoadingStateIndicators.Dots;
6670
6300
  }
6671
- ngOnInit() {
6672
- if (!this.componentRef && this.sInfoSign) {
6673
- this.viewContainer.clear();
6674
- const componentFactory = this.componentFactoryResolver.resolveComponentFactory(InfoSignComponent);
6675
- this.componentRef = this.viewContainer.createComponent(componentFactory);
6676
- this.componentRef.instance.templateRef = this.templateRef;
6677
- this.componentRef.instance.tooltip = this.sInfoSign;
6678
- this.componentRef.instance.displayTime = this.displayTime;
6301
+ set sLoadingState(value) {
6302
+ if (typeof value === "boolean") {
6303
+ this._loading = value;
6304
+ this.indicator = LoadingStateIndicators.Dots;
6679
6305
  }
6680
- else if (this.componentRef && this.sInfoSign) {
6681
- this.componentRef.instance.tooltip = this.sInfoSign;
6306
+ else if (typeof value === "object") {
6307
+ this._loading = value.loading;
6308
+ this.indicator = value.indicator || LoadingStateIndicators.Dots;
6682
6309
  }
6683
- else {
6684
- this.viewContainer.clear();
6685
- this.viewContainer.createEmbeddedView(this.templateRef);
6310
+ if (this.loaderComponent) {
6311
+ this.loaderComponent.instance.loading = this._loading;
6312
+ this.loaderComponent.instance.indicator = this.indicator;
6686
6313
  }
6687
6314
  }
6315
+ ngAfterViewInit() {
6316
+ this.createComponent();
6317
+ }
6318
+ createComponent() {
6319
+ const factory = this.componentFactoryResolver.resolveComponentFactory(LoadingStateComponent);
6320
+ this.loaderComponent = this.target.createComponent(factory);
6321
+ this.loaderComponent.instance.contents = this.template;
6322
+ this.loaderComponent.instance.loading = this._loading;
6323
+ this.loaderComponent.instance.indicator = this.indicator;
6324
+ this.cdr.detectChanges();
6325
+ }
6688
6326
  ngOnDestroy() {
6689
- if (this.componentRef) {
6690
- this.componentRef.destroy();
6327
+ if (this.loaderComponent) {
6328
+ this.loaderComponent.destroy();
6691
6329
  }
6692
6330
  }
6693
6331
  };
6694
- InfoSignDirective.ctorParameters = () => [
6695
- { type: TemplateRef },
6332
+ LoadingStateDirective.ctorParameters = () => [
6696
6333
  { type: ViewContainerRef },
6697
- { type: ComponentFactoryResolver }
6334
+ { type: TemplateRef },
6335
+ { type: ComponentFactoryResolver },
6336
+ { type: ChangeDetectorRef }
6698
6337
  ];
6699
6338
  __decorate([
6700
- Input()
6701
- ], InfoSignDirective.prototype, "sInfoSign", void 0);
6702
- __decorate([
6703
- Input('sInfoSignDisplayTime')
6704
- ], InfoSignDirective.prototype, "displayTime", void 0);
6705
- InfoSignDirective = __decorate([
6339
+ Input("sLoadingState")
6340
+ ], LoadingStateDirective.prototype, "sLoadingState", null);
6341
+ LoadingStateDirective = __decorate([
6706
6342
  Directive({
6707
- selector: "[sInfoSign]",
6343
+ selector: "[sLoadingState]",
6708
6344
  })
6709
- ], InfoSignDirective);
6345
+ ], LoadingStateDirective);
6710
6346
 
6711
- let InfoSignModule = class InfoSignModule {
6347
+ let LoadingStateModule = class LoadingStateModule {
6712
6348
  };
6713
- InfoSignModule = __decorate([
6349
+ LoadingStateModule = __decorate([
6714
6350
  NgModule({
6715
6351
  imports: [
6716
- TooltipModule,
6717
6352
  CommonModule,
6353
+ SVGFactoryModule,
6718
6354
  ],
6719
6355
  declarations: [
6720
- InfoSignDirective,
6721
- InfoSignComponent,
6356
+ LoadingStateComponent,
6357
+ LoadingStateDirective,
6358
+ DotsIndicatorComponent,
6359
+ LoadingIndicatorComponent,
6722
6360
  ],
6723
- exports: [InfoSignDirective],
6724
- entryComponents: [InfoSignComponent],
6361
+ exports: [
6362
+ LoadingStateComponent,
6363
+ LoadingStateDirective,
6364
+ ],
6365
+ entryComponents: [LoadingStateComponent],
6725
6366
  })
6726
- ], InfoSignModule);
6367
+ ], LoadingStateModule);
6727
6368
 
6728
- let IAssistIconComponent = class IAssistIconComponent {
6369
+ let LocalizedBignumberPipe = class LocalizedBignumberPipe {
6370
+ constructor(localeService) {
6371
+ this.localeService = localeService;
6372
+ }
6373
+ transform(value, options) {
6374
+ return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
6375
+ }
6376
+ applyMask(value, options) {
6377
+ return this.localeService.get().pipe(map(localeConfig => {
6378
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6379
+ const configs = {
6380
+ prefix: (_c = (_a = options === null || options === void 0 ? void 0 : options.prefix) !== null && _a !== void 0 ? _a : (_b = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _b === void 0 ? void 0 : _b.currencySymbol) !== null && _c !== void 0 ? _c : "R$",
6381
+ thousandsSeparator: (_f = (_d = options === null || options === void 0 ? void 0 : options.thousandsSeparator) !== null && _d !== void 0 ? _d : (_e = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _e === void 0 ? void 0 : _e.thousandsSeparator) !== null && _f !== void 0 ? _f : ".",
6382
+ decimalSeparator: (_j = (_g = options === null || options === void 0 ? void 0 : options.decimalSeparator) !== null && _g !== void 0 ? _g : (_h = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _h === void 0 ? void 0 : _h.decimalSeparator) !== null && _j !== void 0 ? _j : ",",
6383
+ scale: (_k = options === null || options === void 0 ? void 0 : options.scale) !== null && _k !== void 0 ? _k : 2,
6384
+ allowNegative: (_l = options === null || options === void 0 ? void 0 : options.allowNegative) !== null && _l !== void 0 ? _l : true
6385
+ };
6386
+ const isNumber = !(new BigNumber(value).isNaN());
6387
+ return applyMask(value, configs, isNumber);
6388
+ }));
6389
+ }
6729
6390
  };
6730
- IAssistIconComponent = __decorate([
6731
- Component({
6732
- template: "<svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n</svg>"
6391
+ LocalizedBignumberPipe.ctorParameters = () => [
6392
+ { type: LocaleService }
6393
+ ];
6394
+ LocalizedBignumberPipe = __decorate([
6395
+ Pipe({
6396
+ name: "localizedBignumber",
6733
6397
  })
6734
- ], IAssistIconComponent);
6398
+ ], LocalizedBignumberPipe);
6735
6399
 
6736
- let SeniorIconComponent = class SeniorIconComponent {
6400
+ let LocalizedBignumberImpurePipe = class LocalizedBignumberImpurePipe extends LocalizedBignumberPipe {
6401
+ transform(value, options) {
6402
+ return super.transform(value, options);
6403
+ }
6737
6404
  };
6738
- SeniorIconComponent = __decorate([
6739
- Component({
6740
- template: "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 348 613\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g filter=\"url(#filter0_d_2841_2040)\">\n <path d=\"M174.719 518.932L258.161 439.782C264.546 433.762 269.614 426.603 273.072 418.719C276.53 410.834 278.31 402.378 278.31 393.838C278.31 385.298 276.53 376.843 273.072 368.958C269.614 361.073 264.546 353.915 258.161 347.895L174.719 269.199C168.45 263.304 163.474 256.289 160.077 248.56C156.681 240.83 154.933 232.539 154.933 224.165C154.933 215.792 156.681 207.501 160.077 199.771C163.474 192.042 168.45 185.027 174.719 179.132L303.718 301.496C329.517 326.089 344 359.371 344 394.066C344 428.76 329.517 462.043 303.718 486.635L174.719 609C168.45 603.105 163.474 596.09 160.077 588.36C156.681 580.631 154.933 572.34 154.933 563.966C154.933 555.592 156.681 547.301 160.077 539.572C163.474 531.842 168.45 524.828 174.719 518.932ZM173.76 94.0677L90.3189 173.218C83.9334 179.238 78.8659 186.397 75.408 194.281C71.95 202.166 70.1698 210.622 70.1698 219.162C70.1698 227.702 71.95 236.157 75.408 244.042C78.8659 251.927 83.9334 259.085 90.3189 265.105L173.76 344.256C180.03 350.151 185.006 357.166 188.402 364.895C191.798 372.625 193.547 380.916 193.547 389.289C193.547 397.663 191.798 405.954 188.402 413.684C185.006 421.413 180.03 428.428 173.76 434.323L44.2823 311.504C18.4832 286.911 4 253.629 4 218.934C4 184.24 18.4832 150.957 44.2823 126.365L173.76 4C186.213 16.0129 193.192 32.1861 193.192 49.0338C193.192 65.8815 186.213 82.0547 173.76 94.0677Z\" fill=\"white\" />\n </g>\n <defs>\n <filter id=\"filter0_d_2841_2040\" x=\"0\" y=\"0\" width=\"348\" height=\"613\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\" >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\" />\n <feOffset />\n <feGaussianBlur stdDeviation=\"2\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix type=\"matrix\" values=\"0 0 0 0 0.418936 0 0 0 0 1 0 0 0 0 0.930272 0 0 0 0.35 0\" />\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_2841_2040\" />\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_2841_2040\" result=\"shape\" />\n </filter>\n </defs>\n</svg>\n"
6405
+ LocalizedBignumberImpurePipe = __decorate([
6406
+ Pipe({
6407
+ name: "localizedBignumberImpure",
6408
+ pure: false,
6741
6409
  })
6742
- ], SeniorIconComponent);
6743
-
6744
- var SVGFactoryIcons;
6745
- (function (SVGFactoryIcons) {
6746
- SVGFactoryIcons["IAssist"] = "iassist";
6747
- SVGFactoryIcons["Senior"] = "senior";
6748
- })(SVGFactoryIcons || (SVGFactoryIcons = {}));
6410
+ ], LocalizedBignumberImpurePipe);
6749
6411
 
6750
- let SVGFactoryDirective = class SVGFactoryDirective {
6751
- constructor(viewContainerRef, componentFactoryResolver, cdr) {
6752
- this.viewContainerRef = viewContainerRef;
6753
- this.componentFactoryResolver = componentFactoryResolver;
6754
- this.cdr = cdr;
6755
- this._iconClass = this._getIconClass(SVGFactoryIcons.Senior);
6412
+ class LocalizedCurrencyPipeOptions extends NumberLocaleOptions {
6413
+ constructor(config = {}) {
6414
+ super(config);
6415
+ this.scale = 2;
6756
6416
  }
6757
- set sSVGFactory(icon) {
6758
- this._iconClass = this._getIconClass(icon);
6417
+ }
6418
+ /**
6419
+ * @deprecated Should use localizedBignumberPipe instead
6420
+ */
6421
+ let LocalizedCurrencyPipe = class LocalizedCurrencyPipe {
6422
+ constructor(localeService) {
6423
+ this.localeService = localeService;
6759
6424
  }
6760
- ngAfterViewInit() {
6761
- this._createComponent();
6425
+ transform(value, options) {
6426
+ if (!options) {
6427
+ options = new LocalizedCurrencyPipeOptions();
6428
+ }
6429
+ return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
6762
6430
  }
6763
- _createComponent() {
6764
- const factory = this.componentFactoryResolver.resolveComponentFactory(this._iconClass);
6765
- this.viewContainerRef.clear();
6766
- this.viewContainerRef.createComponent(factory);
6767
- this.cdr.detectChanges();
6431
+ applyMask(value, options) {
6432
+ return this.localeService.get().pipe(map(localeConfig => {
6433
+ const config = Object.assign(Object.assign({}, localeConfig.number), options);
6434
+ const { scale, currencySymbol, thousandsSeparator, decimalSeparator } = config;
6435
+ const rawValue = Number(value).toFixed(scale);
6436
+ const onlyNumbers = rawValue.replace(/[^0-9]/g, ``);
6437
+ const integerPart = onlyNumbers
6438
+ .slice(0, onlyNumbers.length - scale)
6439
+ .replace(/^0*/g, ``)
6440
+ .replace(/\B(?=(\d{3})+(?!\d))/g, thousandsSeparator) || `0`;
6441
+ const decimalPart = onlyNumbers.slice(onlyNumbers.length - scale);
6442
+ const newValue = scale ? integerPart + decimalSeparator + decimalPart : integerPart;
6443
+ const isZero = !Number(onlyNumbers);
6444
+ const operator = rawValue.includes("-") && !isZero ? "-" : "";
6445
+ return `${operator}${currencySymbol}${newValue}`;
6446
+ }));
6447
+ }
6448
+ };
6449
+ LocalizedCurrencyPipe.ctorParameters = () => [
6450
+ { type: LocaleService }
6451
+ ];
6452
+ LocalizedCurrencyPipe = __decorate([
6453
+ Pipe({
6454
+ name: "localizedCurrency",
6455
+ })
6456
+ ], LocalizedCurrencyPipe);
6457
+
6458
+ /**
6459
+ * @deprecated Should use localizedBignumberPipe instead
6460
+ */
6461
+ let LocalizedCurrencyImpurePipe = class LocalizedCurrencyImpurePipe extends LocalizedCurrencyPipe {
6462
+ transform(value, options = new LocalizedCurrencyPipeOptions()) {
6463
+ return super.transform(value, options);
6464
+ }
6465
+ };
6466
+ LocalizedCurrencyImpurePipe = __decorate([
6467
+ Pipe({
6468
+ name: "localizedCurrencyImpure",
6469
+ pure: false,
6470
+ })
6471
+ ], LocalizedCurrencyImpurePipe);
6472
+
6473
+ const moment$2 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
6474
+ let LocalizedDatePipe = class LocalizedDatePipe {
6475
+ constructor(localeService) {
6476
+ this.localeService = localeService;
6768
6477
  }
6769
- _getIconClass(icon) {
6770
- switch (icon) {
6771
- case SVGFactoryIcons.IAssist:
6772
- return IAssistIconComponent;
6773
- case SVGFactoryIcons.Senior:
6774
- default:
6775
- return SeniorIconComponent;
6776
- }
6478
+ transform(value, format = "L LTS") {
6479
+ return this.localeService.get().pipe(map(() => (value ? moment$2(value).format(format) : value)));
6777
6480
  }
6778
6481
  };
6779
- SVGFactoryDirective.ctorParameters = () => [
6780
- { type: ViewContainerRef },
6781
- { type: ComponentFactoryResolver },
6782
- { type: ChangeDetectorRef }
6482
+ LocalizedDatePipe.ctorParameters = () => [
6483
+ { type: LocaleService }
6783
6484
  ];
6784
- __decorate([
6785
- Input("sSVGFactory")
6786
- ], SVGFactoryDirective.prototype, "sSVGFactory", null);
6787
- SVGFactoryDirective = __decorate([
6788
- Directive({
6789
- selector: "[sSVGFactory]",
6485
+ LocalizedDatePipe = __decorate([
6486
+ Pipe({
6487
+ name: "localizedDate",
6790
6488
  })
6791
- ], SVGFactoryDirective);
6489
+ ], LocalizedDatePipe);
6792
6490
 
6793
- let SVGFactoryModule = class SVGFactoryModule {
6491
+ let LocalizedDateImpurePipe = class LocalizedDateImpurePipe extends LocalizedDatePipe {
6794
6492
  };
6795
- SVGFactoryModule = __decorate([
6796
- NgModule({
6797
- imports: [CommonModule],
6798
- declarations: [
6799
- SVGFactoryDirective,
6800
- IAssistIconComponent,
6801
- SeniorIconComponent,
6802
- ],
6803
- exports: [SVGFactoryDirective],
6493
+ LocalizedDateImpurePipe = __decorate([
6494
+ Pipe({
6495
+ name: "localizedDateImpure",
6496
+ pure: false,
6804
6497
  })
6805
- ], SVGFactoryModule);
6498
+ ], LocalizedDateImpurePipe);
6806
6499
 
6807
- let DotsIndicatorComponent = class DotsIndicatorComponent {
6500
+ /**
6501
+ * @deprecated Should use localizedBignumberPipe instead
6502
+ */
6503
+ let LocalizedNumberPipe = class LocalizedNumberPipe {
6504
+ constructor(localeService) {
6505
+ this.localeService = localeService;
6506
+ }
6507
+ transform(value, minimumFractionDigits) {
6508
+ return from(this.localeService.getLocale()).pipe(map((locale) => {
6509
+ const numericValue = Number(value);
6510
+ if (!value && isNaN(numericValue))
6511
+ return;
6512
+ return new Intl.NumberFormat(locale, {
6513
+ minimumFractionDigits: minimumFractionDigits || 0,
6514
+ }).format(Number(value));
6515
+ }));
6516
+ }
6808
6517
  };
6809
- DotsIndicatorComponent = __decorate([
6810
- Component({
6811
- selector: "s-dots-indicator",
6812
- template: "<div class=\"dots-indicator\">\n <div class=\"bounce bounce--1\"></div>\n <div class=\"bounce bounce--2\"></div>\n <div class=\"bounce bounce--3\"></div>\n</div>\n",
6813
- styles: [".dots-indicator .bounce{animation:1.2s ease-out infinite bounce;background-color:#333;border-radius:100%;display:inline-block;height:10px;width:10px}.dots-indicator .bounce+.bounce{margin-left:15px}.dots-indicator .bounce.bounce--1{animation-delay:0s}.dots-indicator .bounce.bounce--2{animation-delay:.1s}.dots-indicator .bounce.bounce--3{animation-delay:.2s}@keyframes bounce{100%,80%{transform:scale(1)}90%{transform:scale(1.8)}}"]
6814
- })
6815
- ], DotsIndicatorComponent);
6518
+ LocalizedNumberPipe.ctorParameters = () => [
6519
+ { type: LocaleService }
6520
+ ];
6521
+ LocalizedNumberPipe = __decorate([
6522
+ Pipe({ name: "localizedNumber" })
6523
+ ], LocalizedNumberPipe);
6816
6524
 
6817
- let LoadingIndicatorComponent = class LoadingIndicatorComponent {
6525
+ const moment$3 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
6526
+ let LocalizedTimePipe = class LocalizedTimePipe {
6527
+ constructor(localeService) {
6528
+ this.localeService = localeService;
6529
+ }
6530
+ transform(value, format = "LTS") {
6531
+ return this.localeService.get().pipe(map(() => (value ? moment$3(value, "HH:mm:ss").format(format) : value)));
6532
+ }
6818
6533
  };
6819
- LoadingIndicatorComponent = __decorate([
6820
- Component({
6821
- selector: "s-logo-indicator",
6822
- template: "<div class=\"logo-indicator\">\n <span *sSVGFactory=\"'senior'\"></span>\n</div>\n",
6823
- styles: [".logo-indicator{animation:1s infinite pulsar,1s infinite scale;background-color:#00c89a;border-radius:50%;box-shadow:0 0 0 #00c89ab3;height:64px;padding:calc(64px * .16);position:relative;width:64px}@keyframes pulsar{0%{box-shadow:0 0 0 0 #00c89ab3}70%{box-shadow:0 0 0 40px #00c89a00}100%{box-shadow:0 0 0 0 #00c89a00}}@keyframes scale{0%,100%{transform:scale(1)}50%{transform:scale(1.3)}}"]
6534
+ LocalizedTimePipe.ctorParameters = () => [
6535
+ { type: LocaleService }
6536
+ ];
6537
+ LocalizedTimePipe = __decorate([
6538
+ Pipe({
6539
+ name: "localizedTime",
6824
6540
  })
6825
- ], LoadingIndicatorComponent);
6541
+ ], LocalizedTimePipe);
6826
6542
 
6827
- var LoadingStateIndicators;
6828
- (function (LoadingStateIndicators) {
6829
- LoadingStateIndicators["Dots"] = "dots";
6830
- LoadingStateIndicators["Logo"] = "logo";
6831
- })(LoadingStateIndicators || (LoadingStateIndicators = {}));
6543
+ let LocalizedTimeImpurePipe = class LocalizedTimeImpurePipe extends LocalizedTimePipe {
6544
+ };
6545
+ LocalizedTimeImpurePipe = __decorate([
6546
+ Pipe({
6547
+ name: "localizedTimeImpure",
6548
+ pure: false,
6549
+ })
6550
+ ], LocalizedTimeImpurePipe);
6832
6551
 
6833
- var LoadingStateComponent_1;
6834
- let LoadingStateComponent = LoadingStateComponent_1 = class LoadingStateComponent {
6835
- constructor() {
6836
- this.indicator = LoadingStateIndicators.Dots;
6837
- this.id = `s-loading-state-${LoadingStateComponent_1.nextId++}`;
6838
- this.BLOCK_TIMEOUT_VALUE = 300;
6839
- this.UNBLOCK_TIMEOUT_VALUE = 200;
6840
- }
6841
- set loading(loading) {
6842
- this._loading = loading;
6843
- loading ? this.block() : this.unblock();
6552
+ let NumericService = class NumericService {
6553
+ constructor(localeService) {
6554
+ this.localeService = localeService;
6844
6555
  }
6845
- get loading() {
6846
- return this._loading;
6556
+ /**
6557
+ * Wrapper around Intl.NumberFormat that returns the localized value using the user's locale by default(platform's preferential language).
6558
+ *
6559
+ * This method should only be used after the localeService has been initialized by the host application, either by a resolver or a manual call.
6560
+ *
6561
+ * Can be overwritten by the provided Intl.NumberFormatOptions.
6562
+ *
6563
+ * Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
6564
+ *
6565
+ * @param {number | string | BigNumber} value The value to be formatted.
6566
+ * @param {Intl.NumberFormatOptions} options Options that overwrites the default Intl.NumberFormatOptions.
6567
+ * @return `string` The formatted value.
6568
+ */
6569
+ instant(value, options) {
6570
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6571
+ options = Object.assign(Object.assign({}, options), { locale: (_c = (_a = options === null || options === void 0 ? void 0 : options.locale) !== null && _a !== void 0 ? _a : (_b = this.localeService.getLocaleOptions()) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "pt-BR", options: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.options), { currency: ((_d = options === null || options === void 0 ? void 0 : options.options) === null || _d === void 0 ? void 0 : _d.style) === "currency" ? (_f = (_e = options === null || options === void 0 ? void 0 : options.options) === null || _e === void 0 ? void 0 : _e.currency) !== null && _f !== void 0 ? _f : "BRL" : undefined, currencyDisplay: ((_g = options === null || options === void 0 ? void 0 : options.options) === null || _g === void 0 ? void 0 : _g.style) === "currency" ? (_j = (_h = options === null || options === void 0 ? void 0 : options.options) === null || _h === void 0 ? void 0 : _h.currencyDisplay) !== null && _j !== void 0 ? _j : "narrowSymbol" : undefined, minimumFractionDigits: (_l = (_k = options === null || options === void 0 ? void 0 : options.options) === null || _k === void 0 ? void 0 : _k.minimumFractionDigits) !== null && _l !== void 0 ? _l : 0 }) });
6572
+ // From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
6573
+ return new Intl.NumberFormat(options.locale, options.options).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
6847
6574
  }
6848
- block() {
6849
- if (this.unblockTimeoutId) {
6850
- clearTimeout(this.unblockTimeoutId);
6851
- this.unblockTimeoutId = undefined;
6852
- }
6853
- if (!this.blockTimeoutId) {
6854
- this.blockTimeoutId = setTimeout(() => {
6855
- this.blocking = true;
6856
- this.blockTimeoutId = undefined;
6857
- }, this.BLOCK_TIMEOUT_VALUE);
6575
+ getType(value) {
6576
+ // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
6577
+ if (value === null) {
6578
+ return "null";
6858
6579
  }
6859
- }
6860
- unblock() {
6861
- if (this.blockTimeoutId) {
6862
- clearTimeout(this.blockTimeoutId);
6863
- this.blockTimeoutId = undefined;
6580
+ const baseType = typeof value;
6581
+ // Primitive types
6582
+ if (baseType !== "object" && baseType !== "function") {
6583
+ return baseType;
6864
6584
  }
6865
- if (!this.unblockTimeoutId) {
6866
- this.unblockTimeoutId = setTimeout(() => {
6867
- this.blocking = false;
6868
- this.unblockTimeoutId = undefined;
6869
- }, this.UNBLOCK_TIMEOUT_VALUE);
6585
+ // Symbol.toStringTag often specifies the "display name" of the
6586
+ // object's class. It's used in Object.prototype.toString().
6587
+ const tag = value[Symbol.toStringTag];
6588
+ if (typeof tag === "string") {
6589
+ return tag;
6870
6590
  }
6871
- }
6872
- ngOnDestroy() {
6873
- if (this.blockTimeoutId) {
6874
- clearTimeout(this.blockTimeoutId);
6591
+ // If it's a function whose source code starts with the "class" keyword
6592
+ if (baseType === "function" && Function.prototype.toString.call(value).startsWith("class")) {
6593
+ return "class";
6875
6594
  }
6876
- if (this.unblockTimeoutId) {
6877
- clearTimeout(this.unblockTimeoutId);
6595
+ // The name of the constructor; for example `Array`, `GeneratorFunction`,
6596
+ // `Number`, `String`, `Boolean` or `MyCustomClass`
6597
+ const className = value.constructor.name;
6598
+ if (typeof className === "string" && className !== "") {
6599
+ return className;
6878
6600
  }
6601
+ // At this point there's no robust way to get the type of value,
6602
+ // so we use the base implementation.
6603
+ return baseType;
6879
6604
  }
6880
6605
  };
6881
- LoadingStateComponent.nextId = 0;
6882
- __decorate([
6883
- Input()
6884
- ], LoadingStateComponent.prototype, "indicator", void 0);
6885
- __decorate([
6886
- Input()
6887
- ], LoadingStateComponent.prototype, "id", void 0);
6888
- __decorate([
6889
- Input()
6890
- ], LoadingStateComponent.prototype, "blockWindow", void 0);
6891
- __decorate([
6892
- Input()
6893
- ], LoadingStateComponent.prototype, "loading", null);
6894
- LoadingStateComponent = LoadingStateComponent_1 = __decorate([
6895
- Component({
6896
- selector: "s-loading-state",
6897
- template: "<div\n [id]=\"id\"\n class=\"s-loading-state-container\"\n [ngClass]=\"{\n 'loading': loading,\n 'blocking': blocking,\n 'fullscreen': blockWindow\n }\">\n <div\n [id]=\"id + '-loader'\"\n class=\"loader\">\n <div\n [id]=\"id + '-spinner'\"\n class=\"spinner\">\n <ng-container [ngSwitch]=\"indicator\">\n <s-logo-indicator *ngSwitchCase=\"'logo'\"></s-logo-indicator>\n <s-dots-indicator *ngSwitchCase=\"'dots'\"></s-dots-indicator>\n </ng-container>\n </div>\n <div\n [id]=\"id + '-overlay'\"\n class=\"overlay\">\n </div>\n </div>\n <div\n [id]=\"id + '-contents'\"\n class=\"contents\">\n <ng-container *ngTemplateOutlet=\"contents || originalContent\"></ng-container>\n <ng-template #originalContent>\n <ng-content></ng-content>\n </ng-template>\n </div>\n</div>",
6898
- styles: [".s-loading-state-container{position:relative}.s-loading-state-container .loader{opacity:0;position:absolute;transition:opacity .2s ease-out,display .2s ease-out;visibility:hidden;inset:1px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.s-loading-state-container .loader .overlay{background-color:#fff;height:100%;opacity:.8;transition:opacity .2s ease-out,display .2s ease-out;width:100%}.s-loading-state-container .loader .spinner{display:-ms-flexbox;display:flex;position:absolute;z-index:2}.s-loading-state-container.blocking>.loader,.s-loading-state-container.loading>.loader{visibility:visible}.s-loading-state-container.blocking>.loader,.s-loading-state-container.blocking>.loader>.overlay,.s-loading-state-container.loading>.loader,.s-loading-state-container.loading>.loader>.overlay{cursor:wait;z-index:1}.s-loading-state-container.blocking>.contents,.s-loading-state-container.loading>.contents{z-index:0!important}.s-loading-state-container.blocking.loading>.loader{opacity:1}.s-loading-state-container.fullscreen>.loader{left:0;position:fixed;top:0;z-index:1005}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.loader{opacity:0;visibility:hidden}::ng-deep .s-loading-state-container.loading.blocking s-loading-state .s-loading-state-container>.contents{z-index:0!important}"]
6606
+ NumericService.ctorParameters = () => [
6607
+ { type: LocaleService }
6608
+ ];
6609
+ NumericService.ɵprov = ɵɵdefineInjectable({ factory: function NumericService_Factory() { return new NumericService(ɵɵinject(LocaleService)); }, token: NumericService, providedIn: "root" });
6610
+ NumericService = __decorate([
6611
+ Injectable({
6612
+ providedIn: "root",
6899
6613
  })
6900
- ], LoadingStateComponent);
6614
+ ], NumericService);
6901
6615
 
6902
- let LoadingStateDirective = class LoadingStateDirective {
6903
- constructor(target, template, componentFactoryResolver, cdr) {
6904
- this.target = target;
6905
- this.template = template;
6906
- this.componentFactoryResolver = componentFactoryResolver;
6907
- this.cdr = cdr;
6908
- this._loading = false;
6909
- this.indicator = LoadingStateIndicators.Dots;
6910
- }
6911
- set sLoadingState(value) {
6912
- if (typeof value === "boolean") {
6913
- this._loading = value;
6914
- this.indicator = LoadingStateIndicators.Dots;
6915
- }
6916
- else if (typeof value === "object") {
6917
- this._loading = value.loading;
6918
- this.indicator = value.indicator || LoadingStateIndicators.Dots;
6919
- }
6920
- if (this.loaderComponent) {
6921
- this.loaderComponent.instance.loading = this._loading;
6922
- this.loaderComponent.instance.indicator = this.indicator;
6923
- }
6924
- }
6925
- ngAfterViewInit() {
6926
- this.createComponent();
6927
- }
6928
- createComponent() {
6929
- const factory = this.componentFactoryResolver.resolveComponentFactory(LoadingStateComponent);
6930
- this.loaderComponent = this.target.createComponent(factory);
6931
- this.loaderComponent.instance.contents = this.template;
6932
- this.loaderComponent.instance.loading = this._loading;
6933
- this.loaderComponent.instance.indicator = this.indicator;
6934
- this.cdr.detectChanges();
6616
+ let NumericPipe = class NumericPipe {
6617
+ constructor(numericService, localeService) {
6618
+ this.numericService = numericService;
6619
+ this.localeService = localeService;
6935
6620
  }
6936
- ngOnDestroy() {
6937
- if (this.loaderComponent) {
6938
- this.loaderComponent.destroy();
6939
- }
6621
+ transform(value, options) {
6622
+ return (options === null || options === void 0 ? void 0 : options.locale) ? of(this.numericService.instant(value, options))
6623
+ : this.localeService.getLocale().pipe(map((locale) => this.numericService.instant(value, {
6624
+ locale,
6625
+ options: options === null || options === void 0 ? void 0 : options.options,
6626
+ })));
6940
6627
  }
6941
6628
  };
6942
- LoadingStateDirective.ctorParameters = () => [
6943
- { type: ViewContainerRef },
6944
- { type: TemplateRef },
6945
- { type: ComponentFactoryResolver },
6946
- { type: ChangeDetectorRef }
6629
+ NumericPipe.ctorParameters = () => [
6630
+ { type: NumericService },
6631
+ { type: LocaleService }
6947
6632
  ];
6948
- __decorate([
6949
- Input("sLoadingState")
6950
- ], LoadingStateDirective.prototype, "sLoadingState", null);
6951
- LoadingStateDirective = __decorate([
6952
- Directive({
6953
- selector: "[sLoadingState]",
6954
- })
6955
- ], LoadingStateDirective);
6633
+ NumericPipe = __decorate([
6634
+ Pipe({ name: "numeric" })
6635
+ ], NumericPipe);
6956
6636
 
6957
- let LoadingStateModule = class LoadingStateModule {
6637
+ var LocaleModule_1;
6638
+ let LocaleModule = LocaleModule_1 = class LocaleModule {
6639
+ static forRoot() {
6640
+ return {
6641
+ ngModule: LocaleModule_1,
6642
+ providers: [
6643
+ LocaleService,
6644
+ LocalizedCurrencyPipe,
6645
+ LocalizedDatePipe,
6646
+ LocalizedTimePipe,
6647
+ LocalizedNumberPipe,
6648
+ LocalizedCurrencyImpurePipe,
6649
+ LocalizedDateImpurePipe,
6650
+ LocalizedTimeImpurePipe,
6651
+ LocalizedBignumberPipe,
6652
+ LocalizedBignumberImpurePipe,
6653
+ NumericPipe
6654
+ ],
6655
+ };
6656
+ }
6657
+ static forChild() {
6658
+ return {
6659
+ ngModule: LocaleModule_1,
6660
+ };
6661
+ }
6958
6662
  };
6959
- LoadingStateModule = __decorate([
6663
+ LocaleModule = LocaleModule_1 = __decorate([
6960
6664
  NgModule({
6961
- imports: [
6962
- CommonModule,
6963
- SVGFactoryModule,
6665
+ imports: [CommonModule],
6666
+ exports: [
6667
+ LocalizedCurrencyPipe,
6668
+ LocalizedDatePipe,
6669
+ LocalizedTimePipe,
6670
+ LocalizedNumberPipe,
6671
+ LocalizedCurrencyImpurePipe,
6672
+ LocalizedDateImpurePipe,
6673
+ LocalizedTimeImpurePipe,
6674
+ LocalizedBignumberPipe,
6675
+ LocalizedBignumberImpurePipe,
6676
+ NumericPipe
6964
6677
  ],
6965
6678
  declarations: [
6966
- LoadingStateComponent,
6967
- LoadingStateDirective,
6968
- DotsIndicatorComponent,
6969
- LoadingIndicatorComponent,
6970
- ],
6971
- exports: [
6972
- LoadingStateComponent,
6973
- LoadingStateDirective,
6679
+ LocalizedCurrencyPipe,
6680
+ LocalizedDatePipe,
6681
+ LocalizedTimePipe,
6682
+ LocalizedNumberPipe,
6683
+ LocalizedCurrencyImpurePipe,
6684
+ LocalizedDateImpurePipe,
6685
+ LocalizedTimeImpurePipe,
6686
+ LocalizedBignumberPipe,
6687
+ LocalizedBignumberImpurePipe,
6688
+ NumericPipe
6974
6689
  ],
6975
- entryComponents: [LoadingStateComponent],
6976
6690
  })
6977
- ], LoadingStateModule);
6691
+ ], LocaleModule);
6978
6692
 
6979
6693
  var LocalizedNumberInputDirective_1;
6980
6694
  let LocalizedNumberInputDirective = LocalizedNumberInputDirective_1 = class LocalizedNumberInputDirective {
@@ -7797,7 +7511,7 @@ var EnumBadgeColors;
7797
7511
  EnumBadgeColors["GRAY"] = "gray";
7798
7512
  })(EnumBadgeColors || (EnumBadgeColors = {}));
7799
7513
 
7800
- const moment$5 = moment_;
7514
+ const moment$4 = moment_;
7801
7515
  let TableColumnsComponent = class TableColumnsComponent {
7802
7516
  constructor(viewContainerRef, translate, hostProjectConfigs) {
7803
7517
  this.viewContainerRef = viewContainerRef;
@@ -7902,7 +7616,7 @@ let TableColumnsComponent = class TableColumnsComponent {
7902
7616
  return applyMask(attributeValue, numberConfigs, this.isNumber(attributeValue));
7903
7617
  case EnumColumnFieldType.DATE:
7904
7618
  const dateFormat = this.getDateFormat(column, locale);
7905
- return moment$5(attributeValue).format(dateFormat);
7619
+ return moment$4(attributeValue).format(dateFormat);
7906
7620
  case EnumColumnFieldType.BOOLEAN:
7907
7621
  const value = attributeValue ? "yes" : "no";
7908
7622
  return this.translate.instant(prefix + value);
@@ -9929,7 +9643,7 @@ var CustomFieldType;
9929
9643
  CustomFieldType["Any"] = "Any";
9930
9644
  CustomFieldType["Enum"] = "Enum";
9931
9645
  })(CustomFieldType || (CustomFieldType = {}));
9932
- const moment$6 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
9646
+ const moment$5 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
9933
9647
  let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponent {
9934
9648
  constructor(customFieldsService, localeService, sanitizer, translateService, controlContainer) {
9935
9649
  this.customFieldsService = customFieldsService;
@@ -10117,16 +9831,16 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
10117
9831
  return;
10118
9832
  switch (type) {
10119
9833
  case FieldType.Date:
10120
- parsedValues[name] = moment$6(value).toDate();
9834
+ parsedValues[name] = moment$5(value).toDate();
10121
9835
  break;
10122
9836
  case FieldType.DateTime:
10123
- parsedValues[name] = moment$6(value).toDate();
9837
+ parsedValues[name] = moment$5(value).toDate();
10124
9838
  break;
10125
9839
  case FieldType.LocalDateTime:
10126
- parsedValues[name] = moment$6(value, "YYYY-MM-DD[T]HH:mm:ss.SSS").toDate();
9840
+ parsedValues[name] = moment$5(value, "YYYY-MM-DD[T]HH:mm:ss.SSS").toDate();
10127
9841
  break;
10128
9842
  case FieldType.Time:
10129
- parsedValues[name] = moment$6(value, "HH:mm:ss").toDate();
9843
+ parsedValues[name] = moment$5(value, "HH:mm:ss").toDate();
10130
9844
  break;
10131
9845
  }
10132
9846
  });
@@ -10157,16 +9871,16 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
10157
9871
  value = new BigNumber(value).toFixed(scale).toString();
10158
9872
  break;
10159
9873
  case FieldType.Date:
10160
- value = moment$6(value).format("YYYY-MM-DD");
9874
+ value = moment$5(value).format("YYYY-MM-DD");
10161
9875
  break;
10162
9876
  case FieldType.DateTime:
10163
- value = moment$6(value).format();
9877
+ value = moment$5(value).format();
10164
9878
  break;
10165
9879
  case FieldType.LocalDateTime:
10166
- value = moment$6(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS");
9880
+ value = moment$5(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS");
10167
9881
  break;
10168
9882
  case FieldType.Time:
10169
- value = moment$6(value).format("HH:mm:ss");
9883
+ value = moment$5(value).format("HH:mm:ss");
10170
9884
  break;
10171
9885
  }
10172
9886
  }
@@ -10559,7 +10273,7 @@ EditableOverlayModule = __decorate([
10559
10273
  })
10560
10274
  ], EditableOverlayModule);
10561
10275
 
10562
- const moment$7 = moment_;
10276
+ const moment$6 = moment_;
10563
10277
  const YEAR = "year";
10564
10278
  const MONTH = "month";
10565
10279
  const DAY = "day";
@@ -10569,19 +10283,19 @@ const SECOND = "second";
10569
10283
  const MILLISECOND = "millisecond";
10570
10284
  class DateUtils {
10571
10285
  static parse(date) {
10572
- return moment$7(date).toDate();
10286
+ return moment$6(date).toDate();
10573
10287
  }
10574
10288
  static toString(date, with_time = false) {
10575
- let result = with_time ? moment$7(date, "YYYY-MM-DD hh:mm:ss.SSS") : moment$7(date, "YYYY-MM-DD");
10289
+ let result = with_time ? moment$6(date, "YYYY-MM-DD hh:mm:ss.SSS") : moment$6(date, "YYYY-MM-DD");
10576
10290
  return result.toString();
10577
10291
  }
10578
10292
  static format(date, formatString = "YYYY-MM-DD HH:mm:ss.SSS", lang = "en") {
10579
- const monthName = moment$7(date)
10293
+ const monthName = moment$6(date)
10580
10294
  .locale(lang)
10581
10295
  .startOf("month")
10582
10296
  .format("MMMM");
10583
10297
  const monthNameCapitalized = monthName.charAt(0).toUpperCase() + monthName.slice(1);
10584
- const dateToFormat = moment$7(date).locale(lang);
10298
+ const dateToFormat = moment$6(date).locale(lang);
10585
10299
  const format_map = {
10586
10300
  YYYY: dateToFormat.format("YYYY"),
10587
10301
  MM: dateToFormat.format("MM"),
@@ -10611,13 +10325,13 @@ class DateUtils {
10611
10325
  return str;
10612
10326
  }
10613
10327
  static diff(fistDate, secondDate, scale) {
10614
- const milliseconds = moment$7(fistDate).diff(secondDate, MILLISECOND);
10615
- const seconds = moment$7(fistDate).diff(secondDate, SECOND);
10616
- const minutes = moment$7(fistDate).diff(secondDate, MINUTE);
10617
- const hours = moment$7(fistDate).diff(secondDate, HOUR);
10618
- const days = moment$7(fistDate).diff(secondDate, DAY);
10619
- const months = moment$7(fistDate).diff(secondDate, MONTH);
10620
- const years = moment$7(fistDate).diff(secondDate, YEAR);
10328
+ const milliseconds = moment$6(fistDate).diff(secondDate, MILLISECOND);
10329
+ const seconds = moment$6(fistDate).diff(secondDate, SECOND);
10330
+ const minutes = moment$6(fistDate).diff(secondDate, MINUTE);
10331
+ const hours = moment$6(fistDate).diff(secondDate, HOUR);
10332
+ const days = moment$6(fistDate).diff(secondDate, DAY);
10333
+ const months = moment$6(fistDate).diff(secondDate, MONTH);
10334
+ const years = moment$6(fistDate).diff(secondDate, YEAR);
10621
10335
  if (!scale.endsWith("s")) {
10622
10336
  scale += "s";
10623
10337
  }
@@ -10632,14 +10346,14 @@ class DateUtils {
10632
10346
  }[scale]);
10633
10347
  }
10634
10348
  static today() {
10635
- const dateStr = moment$7().format("YYY-MM-DD");
10349
+ const dateStr = moment$6().format("YYY-MM-DD");
10636
10350
  return new Date(dateStr);
10637
10351
  }
10638
10352
  static now() {
10639
- return moment$7().toDate();
10353
+ return moment$6().toDate();
10640
10354
  }
10641
10355
  static add(date, quantity, scale) {
10642
- return moment$7(date).add(quantity, scale).toDate();
10356
+ return moment$6(date).add(quantity, scale).toDate();
10643
10357
  }
10644
10358
  static startOf(date, scale) {
10645
10359
  const scores = {
@@ -10667,7 +10381,7 @@ class DateUtils {
10667
10381
  return new Date(vals[0], vals[1], vals[2], vals[3], vals[4], vals[5], vals[6]);
10668
10382
  }
10669
10383
  static clone(date) {
10670
- return moment$7(date).toDate();
10384
+ return moment$6(date).toDate();
10671
10385
  }
10672
10386
  static getDateValues(date) {
10673
10387
  return [
@@ -10681,7 +10395,7 @@ class DateUtils {
10681
10395
  ];
10682
10396
  }
10683
10397
  static getDaysInMonth(date) {
10684
- return moment$7(date, "YYYY-MM").daysInMonth();
10398
+ return moment$6(date, "YYYY-MM").daysInMonth();
10685
10399
  }
10686
10400
  }
10687
10401
 
@@ -14222,6 +13936,164 @@ ProfilePicturePickerModule = __decorate([
14222
13936
  })
14223
13937
  ], ProfilePicturePickerModule);
14224
13938
 
13939
+ var ProgressBarColors;
13940
+ (function (ProgressBarColors) {
13941
+ ProgressBarColors["Blue"] = "blue";
13942
+ ProgressBarColors["Green"] = "green";
13943
+ ProgressBarColors["Red"] = "red";
13944
+ ProgressBarColors["Yellow"] = "yellow";
13945
+ })(ProgressBarColors || (ProgressBarColors = {}));
13946
+
13947
+ var ProgressBarMode;
13948
+ (function (ProgressBarMode) {
13949
+ ProgressBarMode["Determinate"] = "determinate";
13950
+ ProgressBarMode["Indeterminate"] = "indeterminate";
13951
+ })(ProgressBarMode || (ProgressBarMode = {}));
13952
+
13953
+ let ProgressBarComponent = class ProgressBarComponent {
13954
+ constructor() {
13955
+ this.numberFormatOptions = {
13956
+ style: "decimal",
13957
+ minimumFractionDigits: 0,
13958
+ maximumFractionDigits: 2,
13959
+ };
13960
+ this.showValue = true;
13961
+ this.mode = ProgressBarMode.Determinate;
13962
+ }
13963
+ ngOnInit() {
13964
+ this.validateInputs();
13965
+ }
13966
+ validateInputs() {
13967
+ if (this.value < 0 || this.value > 100) {
13968
+ throw new Error("Invalid value for value");
13969
+ }
13970
+ if (this.targetValue < 0 || this.targetValue > 100) {
13971
+ throw new Error("Invalid value for targetValue");
13972
+ }
13973
+ if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
13974
+ throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
13975
+ }
13976
+ }
13977
+ };
13978
+ __decorate([
13979
+ Input()
13980
+ ], ProgressBarComponent.prototype, "value", void 0);
13981
+ __decorate([
13982
+ Input()
13983
+ ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
13984
+ __decorate([
13985
+ Input()
13986
+ ], ProgressBarComponent.prototype, "targetValue", void 0);
13987
+ __decorate([
13988
+ Input()
13989
+ ], ProgressBarComponent.prototype, "label", void 0);
13990
+ __decorate([
13991
+ Input()
13992
+ ], ProgressBarComponent.prototype, "targetLabel", void 0);
13993
+ __decorate([
13994
+ Input()
13995
+ ], ProgressBarComponent.prototype, "activeColor", void 0);
13996
+ __decorate([
13997
+ Input()
13998
+ ], ProgressBarComponent.prototype, "showValue", void 0);
13999
+ __decorate([
14000
+ Input()
14001
+ ], ProgressBarComponent.prototype, "mode", void 0);
14002
+ ProgressBarComponent = __decorate([
14003
+ Component({
14004
+ selector: "s-progressbar",
14005
+ template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
14006
+ styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
14007
+ })
14008
+ ], ProgressBarComponent);
14009
+
14010
+ let ProgressBarDeterminateComponent = class ProgressBarDeterminateComponent {
14011
+ constructor(localeService) {
14012
+ this.localeService = localeService;
14013
+ this.showValue = true;
14014
+ }
14015
+ ngOnInit() {
14016
+ this.validateValues();
14017
+ this.onGetLocale();
14018
+ }
14019
+ onGetLocale() {
14020
+ this.localeService.getLocale().subscribe({
14021
+ next: (locale) => {
14022
+ this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", this.numberFormatOptions);
14023
+ },
14024
+ error: () => {
14025
+ this.numberFormat = new Intl.NumberFormat("pt-BR", this.numberFormatOptions);
14026
+ },
14027
+ });
14028
+ }
14029
+ validateValues() {
14030
+ if (this.value < 0 || this.value > 100) {
14031
+ throw new Error("Invalid value for value");
14032
+ }
14033
+ if (this.targetValue < 0 || this.targetValue > 100) {
14034
+ throw new Error("Invalid value for targetValue");
14035
+ }
14036
+ }
14037
+ };
14038
+ ProgressBarDeterminateComponent.ctorParameters = () => [
14039
+ { type: LocaleService }
14040
+ ];
14041
+ __decorate([
14042
+ Input()
14043
+ ], ProgressBarDeterminateComponent.prototype, "value", void 0);
14044
+ __decorate([
14045
+ Input()
14046
+ ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
14047
+ __decorate([
14048
+ Input()
14049
+ ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
14050
+ __decorate([
14051
+ Input()
14052
+ ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
14053
+ __decorate([
14054
+ Input()
14055
+ ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
14056
+ __decorate([
14057
+ Input()
14058
+ ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
14059
+ ProgressBarDeterminateComponent = __decorate([
14060
+ Component({
14061
+ selector: "s-progressbar-determinate",
14062
+ template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
14063
+ styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
14064
+ })
14065
+ ], ProgressBarDeterminateComponent);
14066
+
14067
+ let ProgressBarIndeterminateComponent = class ProgressBarIndeterminateComponent {
14068
+ };
14069
+ __decorate([
14070
+ Input()
14071
+ ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
14072
+ __decorate([
14073
+ Input()
14074
+ ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
14075
+ ProgressBarIndeterminateComponent = __decorate([
14076
+ Component({
14077
+ selector: "s-progressbar-indeterminate",
14078
+ template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
14079
+ styles: [".progressbar-indeterminate{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:5s infinite indeterminate-progress;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translateX(-250%)}100%{transform:translateX(250%)}}"]
14080
+ })
14081
+ ], ProgressBarIndeterminateComponent);
14082
+
14083
+ let ProgressBarModule = class ProgressBarModule {
14084
+ };
14085
+ ProgressBarModule = __decorate([
14086
+ NgModule({
14087
+ imports: [CommonModule],
14088
+ declarations: [
14089
+ ProgressBarComponent,
14090
+ ProgressBarDeterminateComponent,
14091
+ ProgressBarIndeterminateComponent,
14092
+ ],
14093
+ exports: [ProgressBarComponent],
14094
+ })
14095
+ ], ProgressBarModule);
14096
+
14225
14097
  let PanelComponent = class PanelComponent {
14226
14098
  constructor() {
14227
14099
  this.toggleable = true;
@@ -16632,5 +16504,5 @@ const fallback = {
16632
16504
  * Generated bundle index. Do not edit.
16633
16505
  */
16634
16506
 
16635
- export { AccordionComponent, AccordionModule, AccordionPanelComponent, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TablePagingComponent as ɵba, TextFieldModule as ɵbb, TextFieldComponent as ɵbc, NumberFieldModule as ɵbd, LocalizedNumberInputModule as ɵbe, NumberInputModule as ɵbf, NumberFieldComponent as ɵbg, CurrencyFieldModule as ɵbh, CurrencyFieldComponent as ɵbi, NumberFieldModule$1 as ɵbj, BignumberInputModule as ɵbk, BignumberFieldComponent as ɵbl, AutocompleteFieldComponent as ɵbm, BooleanFieldComponent as ɵbn, BooleanSwitchFieldComponent as ɵbo, CalendarFieldComponent as ɵbp, ChipsFieldComponent as ɵbq, CountryPhonePickerFieldComponent as ɵbr, DynamicFieldComponent as ɵbs, DynamicFormDirective as ɵbt, FieldsetComponent as ɵbu, FileUploadComponent$1 as ɵbv, LookupFieldComponent as ɵbw, PasswordFieldComponent as ɵbx, RadioButtonComponent as ɵby, RowComponent as ɵbz, TemplateDirective as ɵc, SectionComponent as ɵca, SelectFieldComponent as ɵcb, SliderFieldComponent as ɵcc, TextAreaFieldComponent as ɵcd, TextAreaIAFieldComponent as ɵce, IAssistService as ɵcf, DecimalField as ɵch, SideTableComponent as ɵci, ThumbnailService as ɵcj, InfiniteScrollModule as ɵck, InfiniteScrollDirective as ɵcl, IAInsightSidebarComponent as ɵcm, IAInsightCardComponent as ɵcn, IAInsightCardLoaderComponent as ɵco, StructureModule as ɵcp, HeaderComponent as ɵcq, FooterComponent as ɵcr, KanbanEventService as ɵcs, KanbanItemComponent as ɵct, KanbanColumnComponent as ɵcu, KanbanItemDraggingComponent as ɵcv, NumberLocaleOptions as ɵcw, BorderButtonModule as ɵcx, BorderButtonComponent as ɵcy, SelectButtonItemComponent as ɵcz, TemplateModule as ɵd, SlidePanelService as ɵda, TieredMenuEventService as ɵdb, TieredMenuService as ɵdc, TieredMenuComponent as ɵdd, TieredMenuNestedComponent as ɵde, TieredMenuItemComponent as ɵdf, TieredMenuDividerComponent as ɵdg, TimelineItemModule as ɵdh, TimelineIconItemComponent as ɵdi, HorizontalTimelineModule as ɵdj, HorizontalTimelineComponent as ɵdk, VerticalTimelineModule as ɵdl, VerticalTimelineComponent as ɵdm, RangeLineComponent as ɵdn, CollapseOptionComponent as ɵdo, CollapsedItemsComponent as ɵdp, VerticalItemsComponent as ɵdq, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, ProgressBarDeterminateComponent as ɵt, ProgressBarIndeterminateComponent as ɵu, FileUploadService as ɵv, FileItemComponent as ɵw, LocaleService as ɵx, InfoSignComponent as ɵy, TableColumnsComponent as ɵz };
16507
+ export { AccordionComponent, AccordionModule, AccordionPanelComponent, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, LocalizedNumberInputModule as ɵba, NumberInputModule as ɵbb, NumberFieldComponent as ɵbc, CurrencyFieldModule as ɵbd, CurrencyFieldComponent as ɵbe, NumberFieldModule$1 as ɵbf, BignumberInputModule as ɵbg, BignumberFieldComponent as ɵbh, AutocompleteFieldComponent as ɵbi, BooleanFieldComponent as ɵbj, BooleanSwitchFieldComponent as ɵbk, CalendarFieldComponent as ɵbl, ChipsFieldComponent as ɵbm, CountryPhonePickerFieldComponent as ɵbn, DynamicFieldComponent as ɵbo, DynamicFormDirective as ɵbp, FieldsetComponent as ɵbq, FileUploadComponent$1 as ɵbr, LookupFieldComponent as ɵbs, PasswordFieldComponent as ɵbt, RadioButtonComponent as ɵbu, RowComponent as ɵbv, SectionComponent as ɵbw, SelectFieldComponent as ɵbx, SliderFieldComponent as ɵby, TextAreaFieldComponent as ɵbz, TemplateDirective as ɵc, TextAreaIAFieldComponent as ɵca, IAssistService as ɵcb, DecimalField as ɵcd, SideTableComponent as ɵce, ThumbnailService as ɵcf, InfiniteScrollModule as ɵcg, InfiniteScrollDirective as ɵch, IAInsightSidebarComponent as ɵci, IAInsightCardComponent as ɵcj, IAInsightCardLoaderComponent as ɵck, StructureModule as ɵcl, HeaderComponent as ɵcm, FooterComponent as ɵcn, KanbanEventService as ɵco, KanbanItemComponent as ɵcp, KanbanColumnComponent as ɵcq, KanbanItemDraggingComponent as ɵcr, NumberLocaleOptions as ɵcs, BorderButtonModule as ɵct, BorderButtonComponent as ɵcu, ProgressBarDeterminateComponent as ɵcv, ProgressBarIndeterminateComponent as ɵcw, SelectButtonItemComponent as ɵcx, SlidePanelService as ɵcy, TieredMenuEventService as ɵcz, TemplateModule as ɵd, TieredMenuService as ɵda, TieredMenuComponent as ɵdb, TieredMenuNestedComponent as ɵdc, TieredMenuItemComponent as ɵdd, TieredMenuDividerComponent as ɵde, TimelineItemModule as ɵdf, TimelineIconItemComponent as ɵdg, HorizontalTimelineModule as ɵdh, HorizontalTimelineComponent as ɵdi, VerticalTimelineModule as ɵdj, VerticalTimelineComponent as ɵdk, RangeLineComponent as ɵdl, CollapseOptionComponent as ɵdm, CollapsedItemsComponent as ɵdn, VerticalItemsComponent as ɵdo, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, TextFieldModule as ɵx, TextFieldComponent as ɵy, NumberFieldModule as ɵz };
16636
16508
  //# sourceMappingURL=seniorsistemas-angular-components.js.map