@seniorsistemas/angular-components 17.17.9 → 17.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/seniorsistemas-angular-components.umd.js +254 -225
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/country-phone-picker/country-phone-picker.component.d.ts +17 -8
- package/components/dynamic-form/components/fields/chips/chips-field.component.d.ts +1 -1
- package/components/ia-insight/components/ia-insight-card/ia-insight-card.component.d.ts +1 -1
- package/components/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.d.ts +1 -1
- package/components/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.d.ts +1 -1
- package/components/inline-edit/components/inline-edit-item/inline-edit-item.component.d.ts +1 -1
- package/esm2015/components/country-phone-picker/country-phone-picker.component.js +58 -21
- package/esm2015/components/country-phone-picker/country-phone-picker.module.js +3 -1
- package/esm2015/components/dynamic-form/components/field-label/field-label.module.js +2 -2
- package/esm2015/components/dynamic-form/components/fields/bignumber/bignumber-field.module.js +2 -2
- package/esm2015/components/dynamic-form/components/fields/chips/chips-field.component.js +1 -1
- package/esm2015/components/dynamic-form/components/fields/currency/currency-field.module.js +2 -2
- package/esm2015/components/dynamic-form/components/fields/number/number-field.module.js +3 -3
- package/esm2015/components/ia-insight/components/ia-insight-card/ia-insight-card.component.js +1 -1
- package/esm2015/components/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.js +2 -2
- package/esm2015/components/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.js +2 -2
- package/esm2015/components/inline-edit/components/inline-edit-item/inline-edit-item.component.js +2 -2
- package/esm2015/components/picklist/picklist.module.js +2 -2
- package/esm2015/seniorsistemas-angular-components.js +76 -82
- package/esm5/components/country-phone-picker/country-phone-picker.component.js +58 -21
- package/esm5/components/country-phone-picker/country-phone-picker.module.js +3 -1
- package/esm5/components/dynamic-form/components/field-label/field-label.module.js +2 -2
- package/esm5/components/dynamic-form/components/fields/bignumber/bignumber-field.module.js +2 -2
- package/esm5/components/dynamic-form/components/fields/chips/chips-field.component.js +1 -1
- package/esm5/components/dynamic-form/components/fields/currency/currency-field.module.js +2 -2
- package/esm5/components/dynamic-form/components/fields/number/number-field.module.js +3 -3
- package/esm5/components/ia-insight/components/ia-insight-card/ia-insight-card.component.js +1 -1
- package/esm5/components/inline-edit/components/fields/inline-edit-calendar/inline-edit-calendar.component.js +2 -2
- package/esm5/components/inline-edit/components/fields/inline-edit-number/inline-edit-number.component.js +2 -2
- package/esm5/components/inline-edit/components/inline-edit-item/inline-edit-item.component.js +2 -2
- package/esm5/components/picklist/picklist.module.js +2 -2
- package/esm5/seniorsistemas-angular-components.js +76 -82
- package/fesm2015/seniorsistemas-angular-components.js +173 -137
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +179 -143
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.d.ts +75 -81
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
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, Renderer2, Directive, KeyValueDiffers, HostBinding, ChangeDetectorRef, TemplateRef, InjectionToken, Inject,
|
|
2
|
+
import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Renderer2, Directive, KeyValueDiffers, HostBinding, ChangeDetectorRef, TemplateRef, InjectionToken, Inject, PLATFORM_ID, ViewContainerRef, ViewEncapsulation, Pipe, ɵɵinject, ViewChildren, ContentChild, Optional } 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, fromEvent, forkJoin, pipe } from 'rxjs';
|
|
5
5
|
import { takeUntil, tap, map, switchMap, catchError, first, filter, take, delay, debounceTime, repeat, finalize } from 'rxjs/operators';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { CommonModule, isPlatformBrowser } 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
9
|
import { HttpClient, HttpEventType, HttpClientModule } from '@angular/common/http';
|
|
@@ -26,6 +26,7 @@ import { autocompletion, pickedCompletion, startCompletion } from '@codemirror/a
|
|
|
26
26
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
27
27
|
import { showTooltip } from '@codemirror/tooltip';
|
|
28
28
|
import { lineNumbers } from '@codemirror/gutter';
|
|
29
|
+
import { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
29
30
|
import { NgxMaskModule } from 'ngx-mask';
|
|
30
31
|
import { Hotkey, HotkeysService, HotkeyModule } from 'angular2-hotkeys';
|
|
31
32
|
import BigNumber, { BigNumber as BigNumber$1 } from 'bignumber.js';
|
|
@@ -4851,15 +4852,135 @@ CountryPhonePickerService = __decorate([
|
|
|
4851
4852
|
Injectable()
|
|
4852
4853
|
], CountryPhonePickerService);
|
|
4853
4854
|
|
|
4855
|
+
const Breakpoints = {
|
|
4856
|
+
SM_MIN: 0,
|
|
4857
|
+
SM_MAX: 767,
|
|
4858
|
+
MD_MIN: 768,
|
|
4859
|
+
MD_MAX: 991,
|
|
4860
|
+
LG_MIN: 992,
|
|
4861
|
+
LG_MAX: 1199,
|
|
4862
|
+
XL_MIN: 1200,
|
|
4863
|
+
XL_MAX: Infinity,
|
|
4864
|
+
};
|
|
4865
|
+
|
|
4866
|
+
class ExportUtils {
|
|
4867
|
+
constructor() {
|
|
4868
|
+
throw new Error("Classe não deve ser instanciada.");
|
|
4869
|
+
}
|
|
4870
|
+
static addClass(element, className) {
|
|
4871
|
+
element.nativeElement.className = `${element.nativeElement.className} ${className}`;
|
|
4872
|
+
}
|
|
4873
|
+
static removeClass(element, className) {
|
|
4874
|
+
if (element.nativeElement.className.includes(className)) {
|
|
4875
|
+
element.nativeElement.className = element.nativeElement.className.replace(className, "");
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4878
|
+
static exportCSV(columns = [], data = [], csvSeparator = ";", documentName = "download") {
|
|
4879
|
+
let csv = "\ufeff";
|
|
4880
|
+
columns.filter((column) => column.exportable && column.field).forEach((column, i) => {
|
|
4881
|
+
csv += `"${column.header || column.field}"`;
|
|
4882
|
+
if (i < columns.length - 1)
|
|
4883
|
+
csv += csvSeparator;
|
|
4884
|
+
});
|
|
4885
|
+
data.forEach((record) => {
|
|
4886
|
+
csv += "\n";
|
|
4887
|
+
columns.filter((column) => column.exportable && column.field).forEach((column, i) => {
|
|
4888
|
+
let cellData;
|
|
4889
|
+
if (Array.isArray(column.field)) {
|
|
4890
|
+
const fieldValues = column.field.map((col) => this.resolveFieldData(record, col));
|
|
4891
|
+
cellData = fieldValues
|
|
4892
|
+
.flat()
|
|
4893
|
+
.filter((value) => value !== null && value !== undefined)
|
|
4894
|
+
.join(column.separator);
|
|
4895
|
+
}
|
|
4896
|
+
else {
|
|
4897
|
+
cellData = this.resolveFieldData(record, column.field);
|
|
4898
|
+
}
|
|
4899
|
+
if (cellData != null)
|
|
4900
|
+
cellData = String(cellData).replace(/"/g, `""`);
|
|
4901
|
+
else
|
|
4902
|
+
cellData = "";
|
|
4903
|
+
csv += `"${cellData}"`;
|
|
4904
|
+
if (i < columns.length - 1)
|
|
4905
|
+
csv += csvSeparator;
|
|
4906
|
+
});
|
|
4907
|
+
});
|
|
4908
|
+
const blob = new Blob([csv], {
|
|
4909
|
+
type: "text/csv;charset=utf-8;",
|
|
4910
|
+
});
|
|
4911
|
+
if (window.navigator.msSaveOrOpenBlob)
|
|
4912
|
+
navigator.msSaveOrOpenBlob(blob, documentName + ".csv");
|
|
4913
|
+
else {
|
|
4914
|
+
const link = document.createElement("a");
|
|
4915
|
+
link.style.display = "none";
|
|
4916
|
+
document.body.appendChild(link);
|
|
4917
|
+
if (link.download !== undefined) {
|
|
4918
|
+
link.setAttribute("href", URL.createObjectURL(blob));
|
|
4919
|
+
link.setAttribute("download", documentName + ".csv");
|
|
4920
|
+
link.click();
|
|
4921
|
+
}
|
|
4922
|
+
else {
|
|
4923
|
+
csv = "data:text/csv;charset=utf-8," + csv;
|
|
4924
|
+
window.open(encodeURI(csv));
|
|
4925
|
+
}
|
|
4926
|
+
document.body.removeChild(link);
|
|
4927
|
+
}
|
|
4928
|
+
}
|
|
4929
|
+
static resolveFieldData(data, field) {
|
|
4930
|
+
if (data && field) {
|
|
4931
|
+
if (this.isFunction(field))
|
|
4932
|
+
return field(data);
|
|
4933
|
+
else if (field.indexOf(".") == -1)
|
|
4934
|
+
return data[field];
|
|
4935
|
+
else {
|
|
4936
|
+
const fields = field.split(".");
|
|
4937
|
+
let value = data;
|
|
4938
|
+
for (let i = 0, len = fields.length; i < len; ++i) {
|
|
4939
|
+
if (value == null) {
|
|
4940
|
+
return null;
|
|
4941
|
+
}
|
|
4942
|
+
value = value[fields[i]];
|
|
4943
|
+
}
|
|
4944
|
+
return value;
|
|
4945
|
+
}
|
|
4946
|
+
}
|
|
4947
|
+
else
|
|
4948
|
+
return null;
|
|
4949
|
+
}
|
|
4950
|
+
static isFunction(obj) {
|
|
4951
|
+
return !!(obj && obj.constructor && obj.call && obj.apply);
|
|
4952
|
+
}
|
|
4953
|
+
}
|
|
4954
|
+
|
|
4955
|
+
const convertToMomentDateFormat = (format) => {
|
|
4956
|
+
// A ordem dos replaces é importante.
|
|
4957
|
+
return format
|
|
4958
|
+
.replace(/\bd\b/, "D") // day of month (no leading zero)
|
|
4959
|
+
.replace(/\bdd\b/, "DD") // day of month
|
|
4960
|
+
.replace(/\bo\b/, "DDD") // day of the year (no leading zero)
|
|
4961
|
+
.replace(/\boo\b/, "DDDD") // day of the year
|
|
4962
|
+
.replace(/\bM\b/, "MMM") // month name short
|
|
4963
|
+
.replace(/\bMM\b/, "MMMM") // month name long
|
|
4964
|
+
.replace(/\bm\b/, "M") // month of year (no leading)
|
|
4965
|
+
.replace(/\bmm\b/, "MM") // month of year
|
|
4966
|
+
.replace(/\by\b/, "YY") // year (two digits)
|
|
4967
|
+
.replace(/\byy\b/, "YYYY"); // year (four digits)
|
|
4968
|
+
};
|
|
4969
|
+
|
|
4970
|
+
const isNullOrUndefined = (value) => value === null || value === undefined;
|
|
4971
|
+
|
|
4854
4972
|
var CountryPhonePickerComponent_1;
|
|
4855
4973
|
let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryPhonePickerComponent {
|
|
4856
|
-
constructor(
|
|
4857
|
-
this.
|
|
4858
|
-
this.
|
|
4859
|
-
this.
|
|
4974
|
+
constructor(_countryPhonePickerService, _translate, _eRef, platformId) {
|
|
4975
|
+
this._countryPhonePickerService = _countryPhonePickerService;
|
|
4976
|
+
this._translate = _translate;
|
|
4977
|
+
this._eRef = _eRef;
|
|
4978
|
+
this.platformId = platformId;
|
|
4860
4979
|
this.currentItemIndex = 0;
|
|
4861
4980
|
this.phone = new FormControl("");
|
|
4862
4981
|
this.filter = new FormControl("");
|
|
4982
|
+
this.dropTop = 0;
|
|
4983
|
+
this.dropLeft = 0;
|
|
4863
4984
|
this._open = false;
|
|
4864
4985
|
this.offsetTop = 0;
|
|
4865
4986
|
this.ordination = Ordination.NO;
|
|
@@ -4876,7 +4997,7 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
|
|
|
4876
4997
|
}
|
|
4877
4998
|
else {
|
|
4878
4999
|
this.filteredCountriesList = this._countriesList.filter((country) => {
|
|
4879
|
-
const countryName = this.
|
|
5000
|
+
const countryName = this._translate.instant(`platform.angular_components.country_name_${country.id}`);
|
|
4880
5001
|
return countryName.toLowerCase().includes(value.toLowerCase());
|
|
4881
5002
|
});
|
|
4882
5003
|
}
|
|
@@ -4908,7 +5029,7 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
|
|
|
4908
5029
|
this._onTouched = onTouched;
|
|
4909
5030
|
}
|
|
4910
5031
|
onClickout(event) {
|
|
4911
|
-
if (!this.
|
|
5032
|
+
if (!this._eRef.nativeElement.contains(event.target)) {
|
|
4912
5033
|
if (this.open) {
|
|
4913
5034
|
this.open = false;
|
|
4914
5035
|
}
|
|
@@ -4916,7 +5037,7 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
|
|
|
4916
5037
|
}
|
|
4917
5038
|
ngOnInit() {
|
|
4918
5039
|
var _a;
|
|
4919
|
-
const countries = this.
|
|
5040
|
+
const countries = this._countryPhonePickerService.getCountries(this.ordination);
|
|
4920
5041
|
this.filter.valueChanges.subscribe(this._filterCountries);
|
|
4921
5042
|
if ((_a = this.countries) === null || _a === void 0 ? void 0 : _a.length) {
|
|
4922
5043
|
this._countriesList = countries.filter((country) => this.countries.includes(country.id));
|
|
@@ -4962,7 +5083,13 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
|
|
|
4962
5083
|
}
|
|
4963
5084
|
set open(open) {
|
|
4964
5085
|
this._open = open;
|
|
4965
|
-
if (
|
|
5086
|
+
if (open) {
|
|
5087
|
+
this._createDropdownPortal();
|
|
5088
|
+
}
|
|
5089
|
+
else {
|
|
5090
|
+
if (this._portalHost && this._portalHost.hasAttached()) {
|
|
5091
|
+
this._portalHost.detach();
|
|
5092
|
+
}
|
|
4966
5093
|
this.phoneInput.nativeElement.focus();
|
|
4967
5094
|
}
|
|
4968
5095
|
}
|
|
@@ -5033,9 +5160,7 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
|
|
|
5033
5160
|
let mask;
|
|
5034
5161
|
if (Array.isArray(this.selectedItem.mask)) {
|
|
5035
5162
|
const rawMask = this.selectedItem.mask[0].replace(/[^0]/g, "");
|
|
5036
|
-
mask = value.length <= rawMask.length
|
|
5037
|
-
? this.selectedItem.mask[0] + "\0"
|
|
5038
|
-
: this.selectedItem.mask[1] + "\0";
|
|
5163
|
+
mask = value.length <= rawMask.length ? this.selectedItem.mask[0] + "\0" : this.selectedItem.mask[1] + "\0";
|
|
5039
5164
|
}
|
|
5040
5165
|
else {
|
|
5041
5166
|
mask = this.selectedItem.mask + "\0";
|
|
@@ -5062,12 +5187,36 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
|
|
|
5062
5187
|
tokens = `^${tokens}*`;
|
|
5063
5188
|
return this.phone.value.replace(new RegExp(tokens), replace);
|
|
5064
5189
|
}
|
|
5190
|
+
_createDropdownPortal() {
|
|
5191
|
+
if (!isPlatformBrowser(this.platformId) || isNullOrUndefined(this.dropElement))
|
|
5192
|
+
return;
|
|
5193
|
+
const bodyElement = document.body;
|
|
5194
|
+
const dropElementRect = this.dropElement.nativeElement.getBoundingClientRect();
|
|
5195
|
+
this.dropTop = dropElementRect.bottom + window.scrollY;
|
|
5196
|
+
this.dropLeft = dropElementRect.left + window.scrollX;
|
|
5197
|
+
this._portalHost = new DomPortalOutlet(bodyElement, null, null, null);
|
|
5198
|
+
const portal = new TemplatePortal(this.dropdownTemplate, this.viewContainerRef);
|
|
5199
|
+
this._portalHost.attach(portal);
|
|
5200
|
+
}
|
|
5065
5201
|
};
|
|
5066
5202
|
CountryPhonePickerComponent.ctorParameters = () => [
|
|
5067
5203
|
{ type: CountryPhonePickerService },
|
|
5068
5204
|
{ type: TranslateService },
|
|
5069
|
-
{ type: ElementRef }
|
|
5205
|
+
{ type: ElementRef },
|
|
5206
|
+
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
|
|
5070
5207
|
];
|
|
5208
|
+
__decorate([
|
|
5209
|
+
ViewChild("dropdownTemplate")
|
|
5210
|
+
], CountryPhonePickerComponent.prototype, "dropdownTemplate", void 0);
|
|
5211
|
+
__decorate([
|
|
5212
|
+
ViewChild("dropElement", { read: ViewContainerRef })
|
|
5213
|
+
], CountryPhonePickerComponent.prototype, "viewContainerRef", void 0);
|
|
5214
|
+
__decorate([
|
|
5215
|
+
ViewChild("dropElement", { read: ElementRef })
|
|
5216
|
+
], CountryPhonePickerComponent.prototype, "dropElement", void 0);
|
|
5217
|
+
__decorate([
|
|
5218
|
+
ViewChild("#dropdownContainer", { read: ElementRef })
|
|
5219
|
+
], CountryPhonePickerComponent.prototype, "dropdownContainer", void 0);
|
|
5071
5220
|
__decorate([
|
|
5072
5221
|
Input()
|
|
5073
5222
|
], CountryPhonePickerComponent.prototype, "countries", void 0);
|
|
@@ -5098,14 +5247,17 @@ __decorate([
|
|
|
5098
5247
|
CountryPhonePickerComponent = CountryPhonePickerComponent_1 = __decorate([
|
|
5099
5248
|
Component({
|
|
5100
5249
|
selector: "s-country-phone-picker",
|
|
5101
|
-
template: "<div class=\"country-phone-picker\">\n
|
|
5102
|
-
providers: [
|
|
5250
|
+
template: "<div class=\"country-phone-picker\">\n <div #dropElement class=\"phone-input\">\n <div class=\"drop\" (click)=\"open = !open\">\n <span class=\"drop-flag\" [ngClass]=\"'fi fi-' + selectedItem.id\"> </span>\n <span class=\"drop-icon fas fa-caret-down\"></span>\n </div>\n <p class=\"phone-ddi\">{{ selectedItem.ddi }}</p>\n <input\n #phoneInput\n type=\"tel\"\n autofocus\n [mask]=\"mask\"\n [placeholder]=\"getPlaceholder()\"\n [formControl]=\"phone\"\n (focus)=\"onPhoneInputFocus()\"\n (blur)=\"onBlur(value)\"\n />\n </div>\n <ng-template #dropdownTemplate>\n <div\n #dropdownContainer\n *ngIf=\"open\"\n class=\"dropdown\"\n [ngStyle]=\"{\n position: 'absolute',\n top: dropTop + 'px',\n left: dropLeft + 'px'\n }\"\n >\n <div class=\"search\">\n <input class=\"search-field\" type=\"text\" [formControl]=\"filter\" />\n <span class=\"search-icon fas fa-search\"></span>\n <span class=\"search-clear fa fa-times\" (click)=\"onCleanFilter()\"></span>\n </div>\n <ul class=\"select-list\">\n <li\n *ngFor=\"let country of filteredCountriesList; let i = index\"\n class=\"select-option\"\n [ngClass]=\"{ 'select-option--focused': i == currentItemIndex }\"\n (click)=\"onSelectItem(country)\"\n >\n <span class=\"select-option__flag\" [ngClass]=\"'fi fi-' + country.id\"> </span>\n <span class=\"select-option__name\">\n {{ \"platform.angular_components.country_name_\" + country.id | translate }}\n </span>\n <span class=\"select-option__ddi\">\n {{ country.ddi }}\n </span>\n </li>\n </ul>\n </div>\n </ng-template>\n</div>\n",
|
|
5251
|
+
providers: [
|
|
5252
|
+
{
|
|
5103
5253
|
provide: NG_VALUE_ACCESSOR,
|
|
5104
5254
|
useExisting: forwardRef(() => CountryPhonePickerComponent_1),
|
|
5105
5255
|
multi: true,
|
|
5106
|
-
}
|
|
5107
|
-
|
|
5108
|
-
|
|
5256
|
+
},
|
|
5257
|
+
],
|
|
5258
|
+
styles: [".country-phone-picker .phone-input{background-color:#fff;border:1px solid #d8d8d8;border-radius:4px;display:-ms-flexbox;display:flex;line-height:normal;overflow:hidden}.country-phone-picker .phone-input .drop{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex}.country-phone-picker .phone-input .drop .drop-flag{margin-left:12px}.country-phone-picker .phone-input .drop .drop-icon{font-size:12px;margin:0 8px}.country-phone-picker .phone-input .phone-ddi{margin:8px 0}.country-phone-picker .phone-input input{border:none;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;line-height:150%;margin-left:8px}.country-phone-picker .phone-input input:focus{color:#697882;outline:0}.dropdown{background-color:#fff;border-radius:4px;box-shadow:0 4px 5px #00000033;padding:4px 0;position:absolute;margin:2px 0;z-index:999999}.dropdown .search{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:8px 12px}.dropdown .search .search-field{border:1px solid #d8d8d8;border-radius:4px;-ms-flex-positive:1;flex-grow:1;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:400;height:36px;line-height:150%;padding:0 32px 0 8px}.dropdown .search .search-icon{color:#333;font-size:12px;position:relative;right:24px}.dropdown .search .search-clear{color:#333;cursor:pointer;font-size:1rem}.dropdown .select-list{list-style:none;max-height:234px;min-width:360px;max-width:100vw;overflow:scroll;padding:0}.dropdown .select-list .select-option{cursor:pointer;display:-ms-flexbox;display:flex;padding:12px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.dropdown .select-list .select-option .select-option__flag{margin-right:12px}.dropdown .select-list .select-option .select-option__name{margin-right:.5rem;max-width:100%;overflow:hidden;text-overflow:ellipsis}.dropdown .select-list .select-option .select-option__ddi{color:#697882;font-size:14px;font-family:\"Open Sans\",sans-serif;font-weight:400;line-height:150%}.dropdown .select-list .select-option--focused,.dropdown .select-list .select-option:hover{background-color:#e5eaea}"]
|
|
5259
|
+
}),
|
|
5260
|
+
__param(3, Inject(PLATFORM_ID))
|
|
5109
5261
|
], CountryPhonePickerComponent);
|
|
5110
5262
|
|
|
5111
5263
|
let CountryPhonePickerModule = class CountryPhonePickerModule {
|
|
@@ -5117,6 +5269,7 @@ CountryPhonePickerModule = __decorate([
|
|
|
5117
5269
|
TranslateModule,
|
|
5118
5270
|
ReactiveFormsModule,
|
|
5119
5271
|
NgxMaskModule.forRoot(),
|
|
5272
|
+
PortalModule,
|
|
5120
5273
|
],
|
|
5121
5274
|
declarations: [CountryPhonePickerComponent],
|
|
5122
5275
|
exports: [CountryPhonePickerComponent],
|
|
@@ -6765,123 +6918,6 @@ FileUploadService = __decorate([
|
|
|
6765
6918
|
Injectable()
|
|
6766
6919
|
], FileUploadService);
|
|
6767
6920
|
|
|
6768
|
-
const Breakpoints = {
|
|
6769
|
-
SM_MIN: 0,
|
|
6770
|
-
SM_MAX: 767,
|
|
6771
|
-
MD_MIN: 768,
|
|
6772
|
-
MD_MAX: 991,
|
|
6773
|
-
LG_MIN: 992,
|
|
6774
|
-
LG_MAX: 1199,
|
|
6775
|
-
XL_MIN: 1200,
|
|
6776
|
-
XL_MAX: Infinity,
|
|
6777
|
-
};
|
|
6778
|
-
|
|
6779
|
-
class ExportUtils {
|
|
6780
|
-
constructor() {
|
|
6781
|
-
throw new Error("Classe não deve ser instanciada.");
|
|
6782
|
-
}
|
|
6783
|
-
static addClass(element, className) {
|
|
6784
|
-
element.nativeElement.className = `${element.nativeElement.className} ${className}`;
|
|
6785
|
-
}
|
|
6786
|
-
static removeClass(element, className) {
|
|
6787
|
-
if (element.nativeElement.className.includes(className)) {
|
|
6788
|
-
element.nativeElement.className = element.nativeElement.className.replace(className, "");
|
|
6789
|
-
}
|
|
6790
|
-
}
|
|
6791
|
-
static exportCSV(columns = [], data = [], csvSeparator = ";", documentName = "download") {
|
|
6792
|
-
let csv = "\ufeff";
|
|
6793
|
-
columns.filter((column) => column.exportable && column.field).forEach((column, i) => {
|
|
6794
|
-
csv += `"${column.header || column.field}"`;
|
|
6795
|
-
if (i < columns.length - 1)
|
|
6796
|
-
csv += csvSeparator;
|
|
6797
|
-
});
|
|
6798
|
-
data.forEach((record) => {
|
|
6799
|
-
csv += "\n";
|
|
6800
|
-
columns.filter((column) => column.exportable && column.field).forEach((column, i) => {
|
|
6801
|
-
let cellData;
|
|
6802
|
-
if (Array.isArray(column.field)) {
|
|
6803
|
-
const fieldValues = column.field.map((col) => this.resolveFieldData(record, col));
|
|
6804
|
-
cellData = fieldValues
|
|
6805
|
-
.flat()
|
|
6806
|
-
.filter((value) => value !== null && value !== undefined)
|
|
6807
|
-
.join(column.separator);
|
|
6808
|
-
}
|
|
6809
|
-
else {
|
|
6810
|
-
cellData = this.resolveFieldData(record, column.field);
|
|
6811
|
-
}
|
|
6812
|
-
if (cellData != null)
|
|
6813
|
-
cellData = String(cellData).replace(/"/g, `""`);
|
|
6814
|
-
else
|
|
6815
|
-
cellData = "";
|
|
6816
|
-
csv += `"${cellData}"`;
|
|
6817
|
-
if (i < columns.length - 1)
|
|
6818
|
-
csv += csvSeparator;
|
|
6819
|
-
});
|
|
6820
|
-
});
|
|
6821
|
-
const blob = new Blob([csv], {
|
|
6822
|
-
type: "text/csv;charset=utf-8;",
|
|
6823
|
-
});
|
|
6824
|
-
if (window.navigator.msSaveOrOpenBlob)
|
|
6825
|
-
navigator.msSaveOrOpenBlob(blob, documentName + ".csv");
|
|
6826
|
-
else {
|
|
6827
|
-
const link = document.createElement("a");
|
|
6828
|
-
link.style.display = "none";
|
|
6829
|
-
document.body.appendChild(link);
|
|
6830
|
-
if (link.download !== undefined) {
|
|
6831
|
-
link.setAttribute("href", URL.createObjectURL(blob));
|
|
6832
|
-
link.setAttribute("download", documentName + ".csv");
|
|
6833
|
-
link.click();
|
|
6834
|
-
}
|
|
6835
|
-
else {
|
|
6836
|
-
csv = "data:text/csv;charset=utf-8," + csv;
|
|
6837
|
-
window.open(encodeURI(csv));
|
|
6838
|
-
}
|
|
6839
|
-
document.body.removeChild(link);
|
|
6840
|
-
}
|
|
6841
|
-
}
|
|
6842
|
-
static resolveFieldData(data, field) {
|
|
6843
|
-
if (data && field) {
|
|
6844
|
-
if (this.isFunction(field))
|
|
6845
|
-
return field(data);
|
|
6846
|
-
else if (field.indexOf(".") == -1)
|
|
6847
|
-
return data[field];
|
|
6848
|
-
else {
|
|
6849
|
-
const fields = field.split(".");
|
|
6850
|
-
let value = data;
|
|
6851
|
-
for (let i = 0, len = fields.length; i < len; ++i) {
|
|
6852
|
-
if (value == null) {
|
|
6853
|
-
return null;
|
|
6854
|
-
}
|
|
6855
|
-
value = value[fields[i]];
|
|
6856
|
-
}
|
|
6857
|
-
return value;
|
|
6858
|
-
}
|
|
6859
|
-
}
|
|
6860
|
-
else
|
|
6861
|
-
return null;
|
|
6862
|
-
}
|
|
6863
|
-
static isFunction(obj) {
|
|
6864
|
-
return !!(obj && obj.constructor && obj.call && obj.apply);
|
|
6865
|
-
}
|
|
6866
|
-
}
|
|
6867
|
-
|
|
6868
|
-
const convertToMomentDateFormat = (format) => {
|
|
6869
|
-
// A ordem dos replaces é importante.
|
|
6870
|
-
return format
|
|
6871
|
-
.replace(/\bd\b/, "D") // day of month (no leading zero)
|
|
6872
|
-
.replace(/\bdd\b/, "DD") // day of month
|
|
6873
|
-
.replace(/\bo\b/, "DDD") // day of the year (no leading zero)
|
|
6874
|
-
.replace(/\boo\b/, "DDDD") // day of the year
|
|
6875
|
-
.replace(/\bM\b/, "MMM") // month name short
|
|
6876
|
-
.replace(/\bMM\b/, "MMMM") // month name long
|
|
6877
|
-
.replace(/\bm\b/, "M") // month of year (no leading)
|
|
6878
|
-
.replace(/\bmm\b/, "MM") // month of year
|
|
6879
|
-
.replace(/\by\b/, "YY") // year (two digits)
|
|
6880
|
-
.replace(/\byy\b/, "YYYY"); // year (four digits)
|
|
6881
|
-
};
|
|
6882
|
-
|
|
6883
|
-
const isNullOrUndefined = (value) => value === null || value === undefined;
|
|
6884
|
-
|
|
6885
6921
|
var ValidateErrors;
|
|
6886
6922
|
(function (ValidateErrors) {
|
|
6887
6923
|
ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
|
|
@@ -19859,5 +19895,5 @@ const fallback = {
|
|
|
19859
19895
|
* Generated bundle index. Do not edit.
|
|
19860
19896
|
*/
|
|
19861
19897
|
|
|
19862
|
-
export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, 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, CheckDisabled, CheckboxComponent, CheckboxModule, ChipsComponent, ChipsField, ChipsModule, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CurrencyService, 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, FileUploadPermissions, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, InlineEditCalendarField, InlineEditComponent, InlineEditField, InlineEditLookupField, InlineEditModule, InlineEditNumberField, InlineEditTextAreaField, InlineEditTextAreaIAField, InlineEditTextField, KanbanComponent, KanbanModule, KanbanTemplateTypes, LabelValueComponent, LabelValueModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationButtonComponent, NavigationButtonModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, NumericService, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, PicklistComponent, PicklistModule, PicklistTemplateTypes, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SliderComponent, SliderModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TemplateDirective, TemplateModule, TextAreaField, TextAreaIAComponent, TextAreaIAModule, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, isNullOrUndefined, parseItensPickList, ɵ0$3 as ɵ0, ɵ1$2 as ɵ1, ɵ2$1 as ɵ2, ɵ3$1 as ɵ3, ɵ4, TooltipComponent as ɵa, TooltipDirective as ɵb, TablePagingComponent as ɵba, PasswordFieldModule as ɵbb, FieldLabelModule as ɵbc,
|
|
19898
|
+
export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, 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, CheckDisabled, CheckboxComponent, CheckboxModule, ChipsComponent, ChipsField, ChipsModule, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CurrencyService, 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, FileUploadPermissions, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, InlineEditCalendarField, InlineEditComponent, InlineEditField, InlineEditLookupField, InlineEditModule, InlineEditNumberField, InlineEditTextAreaField, InlineEditTextAreaIAField, InlineEditTextField, KanbanComponent, KanbanModule, KanbanTemplateTypes, LabelValueComponent, LabelValueModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationButtonComponent, NavigationButtonModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, NumericService, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, PicklistComponent, PicklistModule, PicklistTemplateTypes, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SliderComponent, SliderModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TemplateDirective, TemplateModule, TextAreaField, TextAreaIAComponent, TextAreaIAModule, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, isNullOrUndefined, parseItensPickList, ɵ0$3 as ɵ0, ɵ1$2 as ɵ1, ɵ2$1 as ɵ2, ɵ3$1 as ɵ3, ɵ4, TooltipComponent as ɵa, TooltipDirective as ɵb, TablePagingComponent as ɵba, PasswordFieldModule as ɵbb, FieldLabelModule as ɵbc, FieldLabelComponent as ɵbd, PasswordFieldComponent as ɵbe, TextFieldModule as ɵbf, TextFieldComponent as ɵbg, NumberFieldModule as ɵbh, NumberFieldComponent as ɵbi, CurrencyFieldModule as ɵbj, CurrencyFieldComponent as ɵbk, BignumberFieldModule as ɵbl, BignumberFieldComponent as ɵbm, CheckboxFieldModule as ɵbn, CheckboxFieldComponent as ɵbo, ProfilePictureModule as ɵbp, ThumbnailService as ɵbq, StructureModule as ɵbr, HeaderComponent as ɵbs, FooterComponent as ɵbt, ProfilePictureFieldComponent as ɵbu, EditorFieldModule as ɵbv, EditorFieldComponent as ɵbw, AutocompleteFieldComponent as ɵbx, BooleanFieldComponent as ɵby, BooleanSwitchFieldComponent as ɵbz, TieredMenuEventService as ɵc, CalendarFieldComponent as ɵca, ChipsFieldComponent as ɵcb, CountryPhonePickerFieldComponent as ɵcc, DynamicFieldComponent as ɵcd, DynamicFormDirective as ɵce, FieldsetComponent as ɵcf, FileUploadComponent$1 as ɵcg, LookupFieldComponent as ɵch, RadioButtonComponent as ɵci, RowComponent as ɵcj, SectionComponent as ɵck, SelectFieldComponent as ɵcl, SliderFieldComponent as ɵcm, TextAreaFieldComponent as ɵcn, TextAreaIAFieldComponent as ɵco, IAssistService as ɵcp, DecimalField as ɵcr, SideTableComponent as ɵcs, InfiniteScrollModule as ɵct, InfiniteScrollDirective as ɵcu, IAInsightSidebarComponent as ɵcv, IAInsightCardComponent as ɵcw, IAInsightCardLoaderComponent as ɵcx, InlineEditItemComponent as ɵcy, InlineEditCalendarComponent as ɵcz, TieredMenuService as ɵd, InlineEditLookupComponent as ɵda, InlineEditNumberComponent as ɵdb, InlineEditTextComponent as ɵdc, InlineEditTextAreaComponent as ɵdd, InlineEditTextAreaIAComponent as ɵde, KanbanEventService as ɵdf, KanbanItemComponent as ɵdg, KanbanColumnComponent as ɵdh, KanbanItemDraggingComponent as ɵdi, NumberLocaleOptions as ɵdj, BorderButtonModule as ɵdk, BorderButtonComponent as ɵdl, ProgressBarDeterminateComponent as ɵdm, ProgressBarIndeterminateComponent as ɵdn, SelectButtonItemComponent as ɵdo, SlidePanelService as ɵdp, TimelineItemModule as ɵdq, TimelineIconItemComponent as ɵdr, HorizontalTimelineModule as ɵds, HorizontalTimelineComponent as ɵdt, VerticalTimelineModule as ɵdu, VerticalTimelineComponent as ɵdv, RangeLineComponent as ɵdw, CollapseOptionComponent as ɵdx, CollapsedItemsComponent as ɵdy, VerticalItemsComponent as ɵdz, TieredMenuGlobalService as ɵe, ChipItemComponent as ɵea, TieredMenuComponent as ɵf, TieredMenuNestedComponent as ɵg, TieredMenuItemComponent as ɵh, TieredMenuDividerComponent as ɵi, CustomTranslationsModule as ɵj, CodeEditorComponent as ɵk, CoreFacade as ɵl, CodeMirror6Core as ɵm, CountryPhonePickerService as ɵn, LocalizedCurrencyImpurePipe as ɵo, LocalizedBignumberPipe as ɵp, LocalizedBignumberImpurePipe as ɵq, NumericPipe as ɵr, EmptyStateGoBackComponent as ɵs, IAssistIconComponent as ɵt, SeniorIconComponent as ɵu, DotsIndicatorComponent as ɵv, LoadingIndicatorComponent as ɵw, FileUploadService as ɵx, InfoSignComponent as ɵy, TableColumnsComponent as ɵz };
|
|
19863
19899
|
//# sourceMappingURL=seniorsistemas-angular-components.js.map
|