@gipisistemas/ng-core 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/styles/colors.scss +5 -1
- package/bundles/gipisistemas-ng-core.umd.js +8379 -7856
- package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js +10 -9
- package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
- package/core/gipi-components/models/sort.model.d.ts +3 -3
- package/core/utils/array.util.d.ts +2 -2
- package/core/utils/object.util.d.ts +3 -5
- package/esm2015/core/gipi-components/models/sort.model.js +1 -1
- package/esm2015/core/gipi-components/services/abstract-crud.service.js +18 -24
- package/esm2015/core/utils/array.util.js +4 -2
- package/esm2015/core/utils/object.util.js +5 -9
- package/esm2015/gipi-components.js +10 -1
- package/esm2015/shared/components/input/input.component.js +46 -23
- package/esm2015/shared/components/table/table.component.js +1 -1
- package/esm2015/shared/gipi-components/abstract-form/abstract-form.component.js +1 -1
- package/esm2015/shared/gipi-components/button/button.component.js +2 -2
- package/esm2015/shared/gipi-components/card/card.component.js +113 -0
- package/esm2015/shared/gipi-components/datepicker/datepicker/datepicker.component.js +8 -3
- package/esm2015/shared/gipi-components/empty-state/empty-state.component.js +30 -0
- package/esm2015/shared/gipi-components/layout-grid/col.directive.js +4 -4
- package/esm2015/shared/gipi-components/month-year-picker/month-year-picker.component.js +2 -2
- package/esm2015/shared/gipi-components/notification/notification.component.js +8 -3
- package/esm2015/shared/gipi-components/sidebar/sidenav/sidenav.component.js +35 -3
- package/esm2015/shared/gipi-components/slide-toggle/slide-toggle.component.js +113 -0
- package/esm2015/shared/gipi-components/tabs/shared/dynamic-tab.directive.js +18 -0
- package/esm2015/shared/gipi-components/tabs/shared/tab.model.js +8 -0
- package/esm2015/shared/gipi-components/tabs/tab/tab.component.js +66 -0
- package/esm2015/shared/gipi-components/tabs/tab-group/tab-group.component.js +123 -0
- package/esm2015/shared/gipi-components/textarea/textarea.component.js +298 -0
- package/esm2015/shared/shared.module.js +20 -16
- package/esm2015/shared.js +1 -5
- package/esm5/core/gipi-components/models/sort.model.js +1 -1
- package/esm5/core/gipi-components/services/abstract-crud.service.js +18 -24
- package/esm5/core/utils/array.util.js +4 -3
- package/esm5/core/utils/object.util.js +5 -9
- package/esm5/gipi-components.js +10 -1
- package/esm5/shared/components/input/input.component.js +46 -23
- package/esm5/shared/components/table/table.component.js +1 -1
- package/esm5/shared/gipi-components/abstract-form/abstract-form.component.js +1 -1
- package/esm5/shared/gipi-components/button/button.component.js +2 -2
- package/esm5/shared/gipi-components/card/card.component.js +135 -0
- package/esm5/shared/gipi-components/datepicker/datepicker/datepicker.component.js +8 -3
- package/esm5/shared/gipi-components/empty-state/empty-state.component.js +33 -0
- package/esm5/shared/gipi-components/layout-grid/col.directive.js +4 -4
- package/esm5/shared/gipi-components/month-year-picker/month-year-picker.component.js +2 -2
- package/esm5/shared/gipi-components/notification/notification.component.js +8 -3
- package/esm5/shared/gipi-components/sidebar/sidenav/sidenav.component.js +35 -3
- package/esm5/shared/gipi-components/slide-toggle/slide-toggle.component.js +127 -0
- package/esm5/shared/gipi-components/tabs/shared/dynamic-tab.directive.js +19 -0
- package/esm5/shared/gipi-components/tabs/shared/tab.model.js +10 -0
- package/esm5/shared/gipi-components/tabs/tab/tab.component.js +67 -0
- package/esm5/shared/gipi-components/tabs/tab-group/tab-group.component.js +131 -0
- package/esm5/shared/gipi-components/textarea/textarea.component.js +352 -0
- package/esm5/shared/shared.module.js +20 -16
- package/esm5/shared.js +1 -5
- package/fesm2015/gipisistemas-ng-core.js +1741 -1303
- package/fesm2015/gipisistemas-ng-core.js.map +1 -1
- package/fesm5/gipisistemas-ng-core.js +8369 -7851
- package/fesm5/gipisistemas-ng-core.js.map +1 -1
- package/gipi-components.d.ts +8 -0
- package/gipisistemas-ng-core.metadata.json +1 -1
- package/package.json +1 -2
- package/shared/components/input/input.component.d.ts +13 -11
- package/shared/components/table/table.component.d.ts +3 -3
- package/shared/gipi-components/card/card.component.d.ts +23 -0
- package/shared/gipi-components/empty-state/empty-state.component.d.ts +5 -0
- package/shared/gipi-components/notification/notification.component.d.ts +1 -0
- package/shared/gipi-components/sidebar/sidenav/sidenav.component.d.ts +7 -0
- package/shared/gipi-components/slide-toggle/slide-toggle.component.d.ts +27 -0
- package/shared/{directives → gipi-components/tabs/shared}/dynamic-tab.directive.d.ts +1 -1
- package/shared/gipi-components/tabs/shared/tab.model.d.ts +12 -0
- package/shared/{components → gipi-components/tabs}/tab/tab.component.d.ts +4 -2
- package/shared/gipi-components/tabs/tab-group/tab-group.component.d.ts +22 -0
- package/shared/gipi-components/textarea/textarea.component.d.ts +68 -0
- package/shared.d.ts +0 -4
- package/esm2015/shared/components/select-button/select-button.component.js +0 -181
- package/esm2015/shared/components/tab/tab.component.js +0 -57
- package/esm2015/shared/components/tab-group/tab-group.component.js +0 -117
- package/esm2015/shared/directives/dynamic-tab.directive.js +0 -18
- package/esm5/shared/components/select-button/select-button.component.js +0 -195
- package/esm5/shared/components/tab/tab.component.js +0 -58
- package/esm5/shared/components/tab-group/tab-group.component.js +0 -125
- package/esm5/shared/directives/dynamic-tab.directive.js +0 -19
- package/shared/components/select-button/select-button.component.d.ts +0 -35
- package/shared/components/tab-group/tab-group.component.d.ts +0 -22
@@ -1,7 +1,7 @@
|
|
1
|
-
import { InjectionToken, NgModule, EventEmitter, ContentChild, TemplateRef, ViewChild, ElementRef, Input, Output, Component, forwardRef, Inject, ɵɵdefineInjectable, ɵɵinject, Injectable,
|
1
|
+
import { InjectionToken, NgModule, EventEmitter, ContentChild, TemplateRef, ViewChild, ElementRef, Input, Output, Component, forwardRef, Inject, ɵɵdefineInjectable, ɵɵinject, Injectable, ChangeDetectorRef, Renderer2, NgZone, ChangeDetectionStrategy, ViewEncapsulation, Optional, Directive, HostBinding, HostListener, RendererFactory2, Host, ViewContainerRef, Pipe, ContentChildren, QueryList, ComponentFactoryResolver, inject, LOCALE_ID, SkipSelf, InjectFlags, Injector, Self, Attribute, PLATFORM_ID, ɵstringify, INJECTOR as INJECTOR$1, ɵɵdirectiveInject } from '@angular/core';
|
2
2
|
import { __decorate, __metadata, __param, __awaiter } from 'tslib';
|
3
3
|
import { CdkStepperModule, CdkStepper } from '@angular/cdk/stepper';
|
4
|
-
import {
|
4
|
+
import { formatNumber, formatPercent, DOCUMENT, formatDate, isPlatformBrowser, CommonModule, formatCurrency } from '@angular/common';
|
5
5
|
import { BREAKPOINT, FlexLayoutModule } from '@angular/flex-layout';
|
6
6
|
import { NG_VALUE_ACCESSOR, FormControl, NgControl, NgForm, FormGroupDirective, Validators, NG_VALIDATORS, ControlContainer, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
7
7
|
import { MatMenu, MAT_SNACK_BAR_DATA, MatSnackBar, MatSelect as MatSelect$1, MatOption, MatFormField, MatTableDataSource, MatSort, MatPaginator, MatDialogRef, MAT_DIALOG_DATA, MatDialogConfig, MatDialog, MatNativeDateModule, MatRippleModule as MatRippleModule$1, MatDialogModule as MatDialogModule$1, MatIconRegistry } from '@angular/material';
|
@@ -53,9 +53,11 @@ import { MatTabsModule } from '@angular/material/tabs';
|
|
53
53
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
54
54
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
55
55
|
import { MatTreeModule } from '@angular/material/tree';
|
56
|
+
import rfdc_ from 'rfdc';
|
56
57
|
import { HttpHeaders, HttpParams, HttpClient, HttpErrorResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
57
58
|
import { Subject, throwError, BehaviorSubject, of, combineLatest, fromEvent, ReplaySubject, Subscription, merge } from 'rxjs';
|
58
59
|
import { debounceTime, map, distinctUntilChanged, switchMap, startWith, delay, takeUntil, take, tap, filter, auditTime, finalize, shareReplay, catchError } from 'rxjs/operators';
|
60
|
+
import { parsePhoneNumberFromString, getExampleNumber } from 'libphonenumber-js';
|
59
61
|
import { trigger, state, style, transition, animate, animation, useAnimation } from '@angular/animations';
|
60
62
|
import { A, Z, ZERO, NINE, SPACE, HOME, END, ENTER, ESCAPE, UP_ARROW, DOWN_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, LEFT_ARROW, BACKSPACE } from '@angular/cdk/keycodes';
|
61
63
|
import { coerceCssPixelValue, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
@@ -68,7 +70,6 @@ import { matDatepickerAnimations as matDatepickerAnimations$1 } from '@angular/m
|
|
68
70
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
69
71
|
import { DomSanitizer } from '@angular/platform-browser';
|
70
72
|
import { onlyNumbers, isValidIE, isValidCEP } from '@brazilian-utils/brazilian-utils';
|
71
|
-
import { parsePhoneNumberFromString, getExampleNumber } from 'libphonenumber-js';
|
72
73
|
|
73
74
|
const APP_MESSAGES = new InjectionToken('app.messages');
|
74
75
|
const DEFAULT_MESSAGES = {
|
@@ -550,6 +551,7 @@ class StringUtil {
|
|
550
551
|
}
|
551
552
|
StringUtil.EMPTY = '';
|
552
553
|
|
554
|
+
const cloneDeep = rfdc_();
|
553
555
|
/** @dynamic */
|
554
556
|
class ObjectUtil {
|
555
557
|
static isNull(value) {
|
@@ -561,21 +563,15 @@ class ObjectUtil {
|
|
561
563
|
}
|
562
564
|
let id = null;
|
563
565
|
if (typeof value === 'object') {
|
564
|
-
id =
|
566
|
+
id = value['id'];
|
565
567
|
}
|
566
568
|
return !UUIDUtil.isValid(id);
|
567
569
|
}
|
568
|
-
static isNotNil(value) {
|
569
|
-
return typeof value !== 'undefined' && value !== null;
|
570
|
-
}
|
571
|
-
static isNil(value) {
|
572
|
-
return typeof value === 'undefined' || value === null;
|
573
|
-
}
|
574
570
|
static clone(value) {
|
575
571
|
if (ObjectUtil.isNull(value)) {
|
576
572
|
return new Object();
|
577
573
|
}
|
578
|
-
return
|
574
|
+
return cloneDeep(value);
|
579
575
|
}
|
580
576
|
static resolveFieldData(data, field) {
|
581
577
|
if (data && field) {
|
@@ -1102,11 +1098,160 @@ InputFileComponent = __decorate([
|
|
1102
1098
|
ActivatedRoute])
|
1103
1099
|
], InputFileComponent);
|
1104
1100
|
|
1101
|
+
/** @dynamic */
|
1102
|
+
class NumberUtil {
|
1103
|
+
static isPositive(value) {
|
1104
|
+
return !ObjectUtil.isNull(value) && value > 0;
|
1105
|
+
}
|
1106
|
+
static isNegative(value) {
|
1107
|
+
return !ObjectUtil.isNull(value) && value < 0;
|
1108
|
+
}
|
1109
|
+
static format(value, digitsInfo, type) {
|
1110
|
+
if (!ObjectUtil.isNull(value) && (!type || type === 'NUMBER')) {
|
1111
|
+
return formatNumber(value, 'pt', digitsInfo);
|
1112
|
+
}
|
1113
|
+
else if (!ObjectUtil.isNull(value) && type === 'PERCENT') {
|
1114
|
+
return formatPercent(value / 100, 'pt', digitsInfo);
|
1115
|
+
}
|
1116
|
+
return StringUtil.EMPTY;
|
1117
|
+
}
|
1118
|
+
static onlyNumbers(value) {
|
1119
|
+
return String(value).replace(/[^\d]/g, '');
|
1120
|
+
}
|
1121
|
+
static isNumber(value) {
|
1122
|
+
return value !== null && value !== undefined && !isNaN(value) && typeof value === 'number';
|
1123
|
+
}
|
1124
|
+
}
|
1125
|
+
|
1126
|
+
/** @dynamic */
|
1127
|
+
class PhoneUtil {
|
1128
|
+
static removeCharacters(value) {
|
1129
|
+
if (StringUtil.isEmpty(value)) {
|
1130
|
+
return '';
|
1131
|
+
}
|
1132
|
+
return value.replace(/\D/g, '');
|
1133
|
+
}
|
1134
|
+
static maskLib(phoneNumber, state, country = 'BR') {
|
1135
|
+
let exampleNumber;
|
1136
|
+
if (!StringUtil.isEmpty(phoneNumber)) {
|
1137
|
+
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
1138
|
+
if (parsedNumber) {
|
1139
|
+
exampleNumber = parsedNumber;
|
1140
|
+
}
|
1141
|
+
}
|
1142
|
+
else {
|
1143
|
+
exampleNumber = getExampleNumber(country, state);
|
1144
|
+
}
|
1145
|
+
if (exampleNumber) {
|
1146
|
+
const formattedNumber = exampleNumber.formatNational();
|
1147
|
+
return formattedNumber.replace(/\d/g, '0');
|
1148
|
+
}
|
1149
|
+
else {
|
1150
|
+
throw new Error('Estado não suportado ou código de estado inválido.');
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
static formatLib(phoneNumber, country = 'BR') {
|
1154
|
+
try {
|
1155
|
+
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
1156
|
+
if (parsedNumber) {
|
1157
|
+
return parsedNumber.formatNational();
|
1158
|
+
}
|
1159
|
+
else {
|
1160
|
+
throw new Error('Número de telefone inválido.');
|
1161
|
+
}
|
1162
|
+
}
|
1163
|
+
catch (error) {
|
1164
|
+
throw new Error('Erro ao formatar o número de telefone: ' + error.message);
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
static format(number, mask) {
|
1168
|
+
let numberNotFormatted = NumberUtil.onlyNumbers(number);
|
1169
|
+
let phoneFormatted = '';
|
1170
|
+
if ((numberNotFormatted.length < 8) ||
|
1171
|
+
(numberNotFormatted.length > 12) ||
|
1172
|
+
(!this.isPossible(numberNotFormatted) && !this.isValid(numberNotFormatted))) {
|
1173
|
+
return numberNotFormatted;
|
1174
|
+
}
|
1175
|
+
if (StringUtil.isEmpty(mask)) {
|
1176
|
+
mask = this.mask(numberNotFormatted);
|
1177
|
+
}
|
1178
|
+
for (let i = 0, j = 0; i < mask.length && j < numberNotFormatted.length; i++) {
|
1179
|
+
phoneFormatted += mask.charAt(i) === '0' ? numberNotFormatted.charAt(j++) : mask.charAt(i);
|
1180
|
+
}
|
1181
|
+
return phoneFormatted;
|
1182
|
+
}
|
1183
|
+
static mask(phone) {
|
1184
|
+
const specialPrefixes = ['0900', '0800', '0700', '0600', '0500', '0400', '0300', '0200', '0100'];
|
1185
|
+
let phoneAux = this.removeCharacters(phone.replace(/\D/g, ''));
|
1186
|
+
if ((phoneAux.length < 8) ||
|
1187
|
+
(phoneAux.length > 12) ||
|
1188
|
+
(!this.isPossible(phoneAux) && !this.isValid(phoneAux))) {
|
1189
|
+
return '0*';
|
1190
|
+
}
|
1191
|
+
const existInArray = specialPrefixes.some(prefix => phoneAux.startsWith(prefix));
|
1192
|
+
if (existInArray) {
|
1193
|
+
return '0000 000 0000'; // Para números especiais como 0800
|
1194
|
+
}
|
1195
|
+
switch (phoneAux.length) {
|
1196
|
+
case 8: return '0000-0000';
|
1197
|
+
case 9: return '0 0000-0000';
|
1198
|
+
case 10: return '(00) 0000-0000';
|
1199
|
+
case 11: return '(00) 0 0000-0000';
|
1200
|
+
case 12: return '(000) 0 0000-0000';
|
1201
|
+
default: return '0*';
|
1202
|
+
}
|
1203
|
+
}
|
1204
|
+
static isPossible(phoneNumber, country = 'BR') {
|
1205
|
+
try {
|
1206
|
+
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
1207
|
+
return parsedNumber ? parsedNumber.isPossible() : false;
|
1208
|
+
}
|
1209
|
+
catch (error) {
|
1210
|
+
return false;
|
1211
|
+
}
|
1212
|
+
}
|
1213
|
+
static isValid(phoneNumber, country = 'BR') {
|
1214
|
+
try {
|
1215
|
+
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
1216
|
+
return parsedNumber ? parsedNumber.isValid() : false;
|
1217
|
+
}
|
1218
|
+
catch (error) {
|
1219
|
+
return false;
|
1220
|
+
}
|
1221
|
+
}
|
1222
|
+
static getType(phoneNumber, country = 'BR') {
|
1223
|
+
try {
|
1224
|
+
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
1225
|
+
return parsedNumber ? parsedNumber.getType() : null;
|
1226
|
+
}
|
1227
|
+
catch (error) {
|
1228
|
+
return null;
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
static isEqual(phoneNumber1, phoneNumber2, country = 'BR') {
|
1232
|
+
try {
|
1233
|
+
const parsedNumber1 = parsePhoneNumberFromString(phoneNumber1, country);
|
1234
|
+
const parsedNumber2 = parsePhoneNumberFromString(phoneNumber2, country);
|
1235
|
+
if (parsedNumber1 && parsedNumber2) {
|
1236
|
+
return parsedNumber1.isEqual(parsedNumber2);
|
1237
|
+
}
|
1238
|
+
else {
|
1239
|
+
return false;
|
1240
|
+
}
|
1241
|
+
}
|
1242
|
+
catch (error) {
|
1243
|
+
return false;
|
1244
|
+
}
|
1245
|
+
}
|
1246
|
+
}
|
1247
|
+
|
1105
1248
|
var InputComponent_1;
|
1106
1249
|
let InputComponent = InputComponent_1 = class InputComponent {
|
1107
|
-
constructor() {
|
1108
|
-
this.
|
1109
|
-
this.
|
1250
|
+
constructor(elementRef, _changeDetectorRef) {
|
1251
|
+
this.elementRef = elementRef;
|
1252
|
+
this._changeDetectorRef = _changeDetectorRef;
|
1253
|
+
this._inputSubject$ = new BehaviorSubject('');
|
1254
|
+
this._maskPhone$ = new BehaviorSubject('');
|
1110
1255
|
this.tooltip = '';
|
1111
1256
|
this.styleClassFormField = '';
|
1112
1257
|
this.styleClassSuffix = '';
|
@@ -1127,26 +1272,32 @@ let InputComponent = InputComponent_1 = class InputComponent {
|
|
1127
1272
|
this.onTouch = () => { };
|
1128
1273
|
}
|
1129
1274
|
get value() {
|
1130
|
-
return this.
|
1275
|
+
return this._value;
|
1131
1276
|
}
|
1132
|
-
set value(
|
1277
|
+
set value(value) {
|
1278
|
+
let valueAux = null;
|
1133
1279
|
if (this.lowerCase) {
|
1134
|
-
|
1280
|
+
valueAux = this.checkLowercase(this.checkSpaceDrop(value));
|
1135
1281
|
}
|
1136
1282
|
else {
|
1137
|
-
|
1283
|
+
valueAux = this.checkUppercase(this.checkSpaceDrop(value));
|
1138
1284
|
}
|
1139
|
-
this.
|
1285
|
+
this._value = valueAux;
|
1286
|
+
if (this.value !== value) {
|
1287
|
+
this._changeDetectorRef.detectChanges();
|
1288
|
+
}
|
1289
|
+
this.onChange(this._value);
|
1140
1290
|
this.onTouch();
|
1141
1291
|
}
|
1142
1292
|
ngOnInit() {
|
1143
1293
|
if (this.phone) {
|
1144
|
-
this._inputSubject
|
1145
|
-
|
1294
|
+
this._inputSubject$.pipe(debounceTime(300)).subscribe(value => {
|
1295
|
+
if (!StringUtil.isEmpty(value)) {
|
1296
|
+
this._maskPhone$.next(PhoneUtil.mask(value));
|
1297
|
+
}
|
1146
1298
|
});
|
1147
1299
|
}
|
1148
1300
|
}
|
1149
|
-
ngAfterViewInit() { }
|
1150
1301
|
registerOnChange(fn) {
|
1151
1302
|
this.onChange = fn;
|
1152
1303
|
}
|
@@ -1154,8 +1305,16 @@ let InputComponent = InputComponent_1 = class InputComponent {
|
|
1154
1305
|
this.onTouch = fn;
|
1155
1306
|
}
|
1156
1307
|
writeValue(value) {
|
1308
|
+
if (this.phone && !StringUtil.isEmpty(value)) {
|
1309
|
+
this._inputSubject$.next(value);
|
1310
|
+
this._changeDetectorRef.detectChanges();
|
1311
|
+
}
|
1157
1312
|
this.value = value;
|
1158
1313
|
}
|
1314
|
+
setDisabledState(isDisabled) {
|
1315
|
+
this.disabled = isDisabled;
|
1316
|
+
this._changeDetectorRef.detectChanges();
|
1317
|
+
}
|
1159
1318
|
checkSpaceDrop(value) {
|
1160
1319
|
if (this.spaceDrop && value) {
|
1161
1320
|
return value.replace(/\s/g, '');
|
@@ -1185,23 +1344,27 @@ let InputComponent = InputComponent_1 = class InputComponent {
|
|
1185
1344
|
this.onTouch();
|
1186
1345
|
}
|
1187
1346
|
}
|
1188
|
-
|
1347
|
+
onInputPhoneKeydown(event) {
|
1189
1348
|
if (!this.phone) {
|
1190
1349
|
return;
|
1191
1350
|
}
|
1192
1351
|
const value = PhoneUtil.removeCharacters(event.target.value);
|
1193
1352
|
const key = event.key;
|
1194
|
-
if (/\d/.test(key) && value.length < 12) {
|
1195
|
-
this._maskPhone
|
1353
|
+
if (/\d/.test(key) && ((value.trim().length < 8) || (value.trim().length > 12))) {
|
1354
|
+
this._maskPhone$.next('0*');
|
1196
1355
|
}
|
1197
1356
|
}
|
1198
1357
|
onInputPhoneChange(value) {
|
1199
1358
|
if (!this.phone) {
|
1200
1359
|
return;
|
1201
1360
|
}
|
1202
|
-
this._inputSubject
|
1361
|
+
this._inputSubject$.next(value);
|
1203
1362
|
}
|
1204
1363
|
};
|
1364
|
+
InputComponent.ctorParameters = () => [
|
1365
|
+
{ type: ElementRef },
|
1366
|
+
{ type: ChangeDetectorRef }
|
1367
|
+
];
|
1205
1368
|
__decorate([
|
1206
1369
|
ViewChild('input', { static: false, read: ElementRef }),
|
1207
1370
|
__metadata("design:type", ElementRef)
|
@@ -1271,9 +1434,10 @@ __decorate([
|
|
1271
1434
|
__metadata("design:type", String)
|
1272
1435
|
], InputComponent.prototype, "appearance", void 0);
|
1273
1436
|
__decorate([
|
1274
|
-
Input(
|
1275
|
-
__metadata("design:type", Object)
|
1276
|
-
|
1437
|
+
Input(),
|
1438
|
+
__metadata("design:type", Object),
|
1439
|
+
__metadata("design:paramtypes", [Object])
|
1440
|
+
], InputComponent.prototype, "value", null);
|
1277
1441
|
__decorate([
|
1278
1442
|
Input(),
|
1279
1443
|
__metadata("design:type", String)
|
@@ -1317,7 +1481,7 @@ __decorate([
|
|
1317
1481
|
InputComponent = InputComponent_1 = __decorate([
|
1318
1482
|
Component({
|
1319
1483
|
selector: 'itss-input',
|
1320
|
-
template: "<div fxLayout=\"column\">\n <mat-label *ngIf=\"label\">\n {{ label }}\n <span *ngIf=\"required && label\"> * </span>\n <gipi-helpful-tip *ngIf=\"tooltip && label\"\n [tooltip]=\"tooltip\">\n </gipi-helpful-tip>\n </mat-label>\n\n <ng-container *ngIf=\"hidePasswordManager && (type === 'password')\">\n <input style=\"opacity: 0;position: absolute;\">\n <input type=\"password\"\n style=\"opacity: 0;position: absolute;\">\n </ng-container>\n\n <mat-form-field [appearance]=\"appearance\"\n [class]=\"styleClassFormField\">\n <input matInput\n #input\n *ngIf=\"mask\"\n autocomplete=\"off\"\n upperCase\n lowerCase\n spaceDrop\n [enabledUpperCase]=\"upperCase\"\n [enabledLowerCase]=\"lowerCase\"\n [spaceDrop]=\"spaceDrop\"\n [name]=\"name\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"maxlength\"\n [mask]=\"phone ? (_maskPhone | async) : mask\"\n [dropSpecialCharacters]=\"dropSpecialCharacters\"\n [patterns]=\"patterns\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (
|
1484
|
+
template: "<div fxLayout=\"column\">\n <mat-label *ngIf=\"label\">\n {{ label }}\n <span *ngIf=\"required && label\"> * </span>\n <gipi-helpful-tip *ngIf=\"tooltip && label\"\n [tooltip]=\"tooltip\">\n </gipi-helpful-tip>\n </mat-label>\n\n <ng-container *ngIf=\"hidePasswordManager && (type === 'password')\">\n <input style=\"opacity: 0;position: absolute;\">\n <input type=\"password\"\n style=\"opacity: 0;position: absolute;\">\n </ng-container>\n\n <mat-form-field [appearance]=\"appearance\"\n [class]=\"styleClassFormField\">\n <input matInput\n #input\n *ngIf=\"mask || phone\"\n autocomplete=\"off\"\n upperCase\n lowerCase\n spaceDrop\n [enabledUpperCase]=\"upperCase\"\n [enabledLowerCase]=\"lowerCase\"\n [spaceDrop]=\"spaceDrop\"\n [name]=\"name\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"maxlength\"\n [mask]=\"phone ? (_maskPhone$ | async) : mask\"\n [dropSpecialCharacters]=\"dropSpecialCharacters\"\n [patterns]=\"patterns\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keydown)=\"onInputPhoneKeydown($event)\"\n (ngModelChange)=\"onInputPhoneChange($event)\">\n\n <input matInput\n #input\n *ngIf=\"!mask && !phone\"\n [name]=\"name\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n autocomplete=\"off\"\n upperCase\n [enabledUpperCase]=\"upperCase\"\n [type]=\"type\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"maxlength\"\n [mask]=\"''\"\n spaceDrop\n [spaceDrop]=\"spaceDrop\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\">\n\n <mat-spinner matPrefix\n *ngIf=\"loading\"\n mode=\"indeterminate\"\n diameter=\"17\">\n </mat-spinner>\n\n <div *ngIf=\"suffixRef\"\n matSuffix\n [class]=\"styleClassSuffix\">\n <ng-template [ngTemplateOutlet]=\"suffixRef\"> </ng-template>\n </div>\n </mat-form-field>\n</div>",
|
1321
1485
|
providers: [
|
1322
1486
|
{
|
1323
1487
|
provide: NG_VALUE_ACCESSOR,
|
@@ -1327,7 +1491,8 @@ InputComponent = InputComponent_1 = __decorate([
|
|
1327
1491
|
],
|
1328
1492
|
styles: ["mat-label span{color:#d14014!important}"]
|
1329
1493
|
}),
|
1330
|
-
__metadata("design:paramtypes", [
|
1494
|
+
__metadata("design:paramtypes", [ElementRef,
|
1495
|
+
ChangeDetectorRef])
|
1331
1496
|
], InputComponent);
|
1332
1497
|
|
1333
1498
|
let LoadingOverlayComponent = class LoadingOverlayComponent {
|
@@ -2654,240 +2819,64 @@ RadioGroupEnumComponent = RadioGroupEnumComponent_1 = __decorate([
|
|
2654
2819
|
__metadata("design:paramtypes", [ChangeDetectorRef])
|
2655
2820
|
], RadioGroupEnumComponent);
|
2656
2821
|
|
2657
|
-
var
|
2658
|
-
let
|
2659
|
-
constructor(
|
2660
|
-
this.
|
2661
|
-
this.
|
2662
|
-
this.
|
2663
|
-
this.
|
2664
|
-
this.
|
2665
|
-
this.
|
2666
|
-
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2822
|
+
var SelectEntityPagedComponent_1;
|
2823
|
+
let SelectEntityPagedComponent = SelectEntityPagedComponent_1 = class SelectEntityPagedComponent {
|
2824
|
+
constructor(_changeDetectorRef) {
|
2825
|
+
this._changeDetectorRef = _changeDetectorRef;
|
2826
|
+
this.valueSearchCtrl = new FormControl('');
|
2827
|
+
this.totalOptions = 0;
|
2828
|
+
this.subscriptions = [];
|
2829
|
+
this.searching = false;
|
2830
|
+
this.toggleAllCheckboxChecked = false;
|
2831
|
+
this.toggleAllCheckboxIndeterminate = false;
|
2832
|
+
this._options = [];
|
2833
|
+
this.closeIcon = 'close';
|
2834
|
+
this.multiple = false;
|
2835
|
+
// Mostrar/ocultar o input para pesquisar
|
2836
|
+
this.hideFieldSearch = false;
|
2837
|
+
// Mostrar/ocultar o botão limpar opções selecionadas
|
2838
|
+
this.showClear = false;
|
2839
|
+
this.debounceTime = 1000; // milissegundos
|
2840
|
+
// Valores que não serão exibidos nas opções
|
2841
|
+
this.valuesExclud = [];
|
2842
|
+
this.appearance = 'outline';
|
2843
|
+
this.property = 'description';
|
2844
|
+
this.trackyBy = 'id';
|
2845
|
+
this.initLoaded = true;
|
2846
|
+
this.infiniteScroll = true;
|
2847
|
+
this.modelChange = new EventEmitter();
|
2848
|
+
this.selectionChange = new EventEmitter();
|
2849
|
+
this.searchChange = new EventEmitter();
|
2850
|
+
this.addChange = new EventEmitter();
|
2851
|
+
this.openedChange = new EventEmitter();
|
2852
|
+
this.trackByOption = (index, obj) => this.trackyBy ? obj[this.trackyBy] : obj;
|
2853
|
+
this.onChange = () => { };
|
2854
|
+
this.onTouch = () => { };
|
2670
2855
|
}
|
2671
|
-
|
2672
|
-
|
2856
|
+
set paramNextBatch(val) {
|
2857
|
+
this._paramNextBatch = val;
|
2673
2858
|
}
|
2674
|
-
|
2675
|
-
return this.
|
2859
|
+
get paramNextBatch() {
|
2860
|
+
return this._paramNextBatch;
|
2676
2861
|
}
|
2677
|
-
|
2678
|
-
this.
|
2679
|
-
this.
|
2862
|
+
set model(val) {
|
2863
|
+
this.modelValue = val;
|
2864
|
+
this.modelChange.emit(this.modelValue);
|
2865
|
+
this.onChange(this.modelValue);
|
2866
|
+
this.onTouch(this.modelValue);
|
2680
2867
|
}
|
2681
|
-
|
2682
|
-
this.
|
2868
|
+
get model() {
|
2869
|
+
return this.modelValue;
|
2683
2870
|
}
|
2684
|
-
|
2685
|
-
this.
|
2871
|
+
set options(val) {
|
2872
|
+
this._options = val;
|
2686
2873
|
}
|
2687
|
-
|
2688
|
-
this.
|
2689
|
-
this.cd.markForCheck();
|
2874
|
+
get options() {
|
2875
|
+
return this._options;
|
2690
2876
|
}
|
2691
|
-
|
2692
|
-
if (
|
2693
|
-
return;
|
2694
|
-
}
|
2695
|
-
if (this.multiple) {
|
2696
|
-
if (this.isSelected(option)) {
|
2697
|
-
this.removeOption(option);
|
2698
|
-
}
|
2699
|
-
else {
|
2700
|
-
this.value = [...(this.value || []), this.getOptionValue(option)];
|
2701
|
-
}
|
2702
|
-
this.onModelChange(this.value);
|
2703
|
-
this.onChange.emit({
|
2704
|
-
originalEvent: event,
|
2705
|
-
value: this.value
|
2706
|
-
});
|
2707
|
-
}
|
2708
|
-
else {
|
2709
|
-
const value = this.getOptionValue(option);
|
2710
|
-
if (this.value !== value) {
|
2711
|
-
this.value = this.getOptionValue(option);
|
2712
|
-
this.onModelChange(this.value);
|
2713
|
-
this.onChange.emit({
|
2714
|
-
originalEvent: event,
|
2715
|
-
value: this.value
|
2716
|
-
});
|
2717
|
-
}
|
2718
|
-
}
|
2719
|
-
this.onOptionClick.emit({
|
2720
|
-
originalEvent: event,
|
2721
|
-
option: option,
|
2722
|
-
index: index
|
2723
|
-
});
|
2724
|
-
}
|
2725
|
-
onBlur() {
|
2726
|
-
this.onModelTouched();
|
2727
|
-
}
|
2728
|
-
removeOption(option) {
|
2729
|
-
this.value = this.value.filter(val => !ObjectUtil.equals(val, this.getOptionValue(option), this.dataKey));
|
2730
|
-
}
|
2731
|
-
isSelected(option) {
|
2732
|
-
let selected = false;
|
2733
|
-
const optionValue = this.getOptionValue(option);
|
2734
|
-
if (this.multiple) {
|
2735
|
-
if (this.value) {
|
2736
|
-
for (const val of this.value) {
|
2737
|
-
if (ObjectUtil.equals(val, optionValue, this.dataKey)) {
|
2738
|
-
selected = true;
|
2739
|
-
break;
|
2740
|
-
}
|
2741
|
-
}
|
2742
|
-
}
|
2743
|
-
}
|
2744
|
-
else {
|
2745
|
-
selected = ObjectUtil.equals(this.getOptionValue(option), this.value, this.dataKey);
|
2746
|
-
}
|
2747
|
-
return selected;
|
2748
|
-
}
|
2749
|
-
};
|
2750
|
-
SelectButtonComponent.ctorParameters = () => [
|
2751
|
-
{ type: ChangeDetectorRef }
|
2752
|
-
];
|
2753
|
-
__decorate([
|
2754
|
-
Input(),
|
2755
|
-
__metadata("design:type", Array)
|
2756
|
-
], SelectButtonComponent.prototype, "options", void 0);
|
2757
|
-
__decorate([
|
2758
|
-
Input(),
|
2759
|
-
__metadata("design:type", String)
|
2760
|
-
], SelectButtonComponent.prototype, "property", void 0);
|
2761
|
-
__decorate([
|
2762
|
-
Input(),
|
2763
|
-
__metadata("design:type", String)
|
2764
|
-
], SelectButtonComponent.prototype, "optionValue", void 0);
|
2765
|
-
__decorate([
|
2766
|
-
Input(),
|
2767
|
-
__metadata("design:type", String)
|
2768
|
-
], SelectButtonComponent.prototype, "optionDisabled", void 0);
|
2769
|
-
__decorate([
|
2770
|
-
Input(),
|
2771
|
-
__metadata("design:type", Number)
|
2772
|
-
], SelectButtonComponent.prototype, "tabindex", void 0);
|
2773
|
-
__decorate([
|
2774
|
-
Input(),
|
2775
|
-
__metadata("design:type", Boolean)
|
2776
|
-
], SelectButtonComponent.prototype, "multiple", void 0);
|
2777
|
-
__decorate([
|
2778
|
-
Input(),
|
2779
|
-
__metadata("design:type", String)
|
2780
|
-
], SelectButtonComponent.prototype, "label", void 0);
|
2781
|
-
__decorate([
|
2782
|
-
Input(),
|
2783
|
-
__metadata("design:type", Boolean)
|
2784
|
-
], SelectButtonComponent.prototype, "required", void 0);
|
2785
|
-
__decorate([
|
2786
|
-
Input(),
|
2787
|
-
__metadata("design:type", String)
|
2788
|
-
], SelectButtonComponent.prototype, "styleClass", void 0);
|
2789
|
-
__decorate([
|
2790
|
-
Input(),
|
2791
|
-
__metadata("design:type", String)
|
2792
|
-
], SelectButtonComponent.prototype, "ariaLabelledBy", void 0);
|
2793
|
-
__decorate([
|
2794
|
-
Input(),
|
2795
|
-
__metadata("design:type", Boolean)
|
2796
|
-
], SelectButtonComponent.prototype, "disabled", void 0);
|
2797
|
-
__decorate([
|
2798
|
-
Input(),
|
2799
|
-
__metadata("design:type", String)
|
2800
|
-
], SelectButtonComponent.prototype, "dataKey", void 0);
|
2801
|
-
__decorate([
|
2802
|
-
Output(),
|
2803
|
-
__metadata("design:type", EventEmitter)
|
2804
|
-
], SelectButtonComponent.prototype, "onOptionClick", void 0);
|
2805
|
-
__decorate([
|
2806
|
-
Output(),
|
2807
|
-
__metadata("design:type", EventEmitter)
|
2808
|
-
], SelectButtonComponent.prototype, "onChange", void 0);
|
2809
|
-
__decorate([
|
2810
|
-
ContentChild(TemplateRef, { static: false }),
|
2811
|
-
__metadata("design:type", Object)
|
2812
|
-
], SelectButtonComponent.prototype, "itemTemplate", void 0);
|
2813
|
-
SelectButtonComponent = SelectButtonComponent_1 = __decorate([
|
2814
|
-
Component({
|
2815
|
-
selector: 'itss-select-button',
|
2816
|
-
template: "<div fxLayout=\"column\">\n <mat-label *ngIf=\"label\"\n class=\"label\">\n {{ label }}\n <span *ngIf=\"required && label\">*</span>\n </mat-label>\n\n <div [ngClass]=\"'selectbutton component'\"\n [class]=\"styleClass\"\n role=\"group\">\n <div *ngFor=\"let option of options; let i = index\"\n #btn\n class=\"button component\"\n [class]=\"option.styleClass\"\n role=\"button\"\n [attr.aria-pressed]=\"isSelected(option)\"\n [ngClass]=\"{'highlight': isSelected(option),\n 'disabled': disabled || isOptionDisabled(option),\n 'button-icon-only': (option.icon && !getPropertyLabel(option))}\"\n (click)=\"onItemClick($event,option,i)\"\n (keydown.enter)=\"onItemClick($event,option,i)\"\n [attr.title]=\"option.title\"\n [attr.aria-label]=\"option.label\"\n (blur)=\"onBlur()\"\n [attr.tabindex]=\"disabled ? null : tabindex\"\n [attr.aria-labelledby]=\"this.getPropertyLabel(option)\"\n [attr.id]=\"i\">\n\n <ng-container *ngIf=\"!itemTemplate else customcontent\">\n <span [ngClass]=\"'button-icon button-icon-left'\"\n [class]=\"option.icon\"\n *ngIf=\"option.icon\">\n </span>\n <span class=\"button-label\">\n {{ getPropertyLabel(option) }}\n </span>\n </ng-container>\n\n <ng-template #customcontent>\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: option, index: i}\"></ng-container>\n </ng-template>\n\n </div>\n </div>\n</div>",
|
2817
|
-
providers: [
|
2818
|
-
{
|
2819
|
-
provide: NG_VALUE_ACCESSOR,
|
2820
|
-
useExisting: forwardRef(() => SelectButtonComponent_1),
|
2821
|
-
multi: true
|
2822
|
-
}
|
2823
|
-
],
|
2824
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2825
|
-
host: {
|
2826
|
-
'class': 'itss-element'
|
2827
|
-
},
|
2828
|
-
styles: [".label{color:#696969;font-size:1rem;margin-bottom:7px!important}.label>span{color:#f44336}.component{font-weight:400;display:flex;width:100%}.component:disabled,.disabled{cursor:not-allowed!important;background:#e0e0e0!important;border-color:#e0e0e0!important;color:#00000042!important}.selectbutton .button{background:#fff;border:1px solid #e1e5e4;color:#696969;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;padding:1rem;align-items:center;display:flex;justify-content:center;min-width:5rem;cursor:pointer}.selectbutton .button:first-of-type{border-top-left-radius:5px;border-bottom-left-radius:5px}.selectbutton .button:last-of-type{border-top-right-radius:5px;border-bottom-right-radius:5px}.selectbutton .button .button-icon-left,.selectbutton .button .button-icon-right{color:#696969}.selectbutton .button:not(.disabled):not(.highlight):hover{background:#f7f7f7;border-color:#e1e5e4;color:#696969}.selectbutton .button:not(.disabled):not(.highlight):hover .button-icon-left,.selectbutton .button:not(.disabled):not(.highlight):hover .button-icon-right{color:#696969}.selectbutton .button.highlight{background:#f3465c;border-color:#f3465c;color:#fff;cursor:default}.selectbutton .button.highlight .button-icon-left,.selectbutton .button.highlight .button-icon-right{color:#fff}.selectbutton .button.highlight:hover{background:#e6364e;border-color:#e6364e;color:#fff}.selectbutton .button.highlight:hover .button-icon-left,.selectbutton .button.highlight:hover .button-icon-right{color:#fff}itss-select-button.ng-dirty.ng-invalid>.selectbutton>.button{border-color:#f44336}.button.button-icon-only{width:3rem;padding:.75rem 0}.button.button-icon-only .button-icon-left,.button.button-icon-only .button-icon-right{margin:0}.button.button-icon-only.button-rounded{border-radius:50%;height:3rem}.button-label{font-weight:700}"]
|
2829
|
-
}),
|
2830
|
-
__metadata("design:paramtypes", [ChangeDetectorRef])
|
2831
|
-
], SelectButtonComponent);
|
2832
|
-
|
2833
|
-
var SelectEntityPagedComponent_1;
|
2834
|
-
let SelectEntityPagedComponent = SelectEntityPagedComponent_1 = class SelectEntityPagedComponent {
|
2835
|
-
constructor(_changeDetectorRef) {
|
2836
|
-
this._changeDetectorRef = _changeDetectorRef;
|
2837
|
-
this.valueSearchCtrl = new FormControl('');
|
2838
|
-
this.totalOptions = 0;
|
2839
|
-
this.subscriptions = [];
|
2840
|
-
this.searching = false;
|
2841
|
-
this.toggleAllCheckboxChecked = false;
|
2842
|
-
this.toggleAllCheckboxIndeterminate = false;
|
2843
|
-
this._options = [];
|
2844
|
-
this.closeIcon = 'close';
|
2845
|
-
this.multiple = false;
|
2846
|
-
// Mostrar/ocultar o input para pesquisar
|
2847
|
-
this.hideFieldSearch = false;
|
2848
|
-
// Mostrar/ocultar o botão limpar opções selecionadas
|
2849
|
-
this.showClear = false;
|
2850
|
-
this.debounceTime = 1000; // milissegundos
|
2851
|
-
// Valores que não serão exibidos nas opções
|
2852
|
-
this.valuesExclud = [];
|
2853
|
-
this.appearance = 'outline';
|
2854
|
-
this.property = 'description';
|
2855
|
-
this.trackyBy = 'id';
|
2856
|
-
this.initLoaded = true;
|
2857
|
-
this.infiniteScroll = true;
|
2858
|
-
this.modelChange = new EventEmitter();
|
2859
|
-
this.selectionChange = new EventEmitter();
|
2860
|
-
this.searchChange = new EventEmitter();
|
2861
|
-
this.addChange = new EventEmitter();
|
2862
|
-
this.openedChange = new EventEmitter();
|
2863
|
-
this.trackByOption = (index, obj) => this.trackyBy ? obj[this.trackyBy] : obj;
|
2864
|
-
this.onChange = () => { };
|
2865
|
-
this.onTouch = () => { };
|
2866
|
-
}
|
2867
|
-
set paramNextBatch(val) {
|
2868
|
-
this._paramNextBatch = val;
|
2869
|
-
}
|
2870
|
-
get paramNextBatch() {
|
2871
|
-
return this._paramNextBatch;
|
2872
|
-
}
|
2873
|
-
set model(val) {
|
2874
|
-
this.modelValue = val;
|
2875
|
-
this.modelChange.emit(this.modelValue);
|
2876
|
-
this.onChange(this.modelValue);
|
2877
|
-
this.onTouch(this.modelValue);
|
2878
|
-
}
|
2879
|
-
get model() {
|
2880
|
-
return this.modelValue;
|
2881
|
-
}
|
2882
|
-
set options(val) {
|
2883
|
-
this._options = val;
|
2884
|
-
}
|
2885
|
-
get options() {
|
2886
|
-
return this._options;
|
2887
|
-
}
|
2888
|
-
get scrollViewportHeight() {
|
2889
|
-
if (ArrayUtil.isEmpty(this.options)) {
|
2890
|
-
return 0;
|
2877
|
+
get scrollViewportHeight() {
|
2878
|
+
if (ArrayUtil.isEmpty(this.options)) {
|
2879
|
+
return 0;
|
2891
2880
|
}
|
2892
2881
|
// Cada mat-option possui 3em ou 39px. 3 * quantidade de mat-option
|
2893
2882
|
return (3 * this.options.length);
|
@@ -3959,6 +3948,7 @@ SelectSearchComponent = SelectSearchComponent_1 = __decorate([
|
|
3959
3948
|
MatFormField, Object])
|
3960
3949
|
], SelectSearchComponent);
|
3961
3950
|
|
3951
|
+
const cloneDeep$1 = rfdc_();
|
3962
3952
|
/** @dynamic */
|
3963
3953
|
class ArrayUtil {
|
3964
3954
|
static isEmpty(value) {
|
@@ -3968,7 +3958,7 @@ class ArrayUtil {
|
|
3968
3958
|
if (ObjectUtil.isNull(value)) {
|
3969
3959
|
return new Array();
|
3970
3960
|
}
|
3971
|
-
return
|
3961
|
+
return cloneDeep$1(value);
|
3972
3962
|
}
|
3973
3963
|
/**
|
3974
3964
|
* Função para realizar ordenação de Array de objetos
|
@@ -4616,214 +4606,25 @@ StepperComponent = StepperComponent_1 = __decorate([
|
|
4616
4606
|
})
|
4617
4607
|
], StepperComponent);
|
4618
4608
|
|
4619
|
-
|
4620
|
-
|
4621
|
-
|
4622
|
-
|
4623
|
-
|
4624
|
-
|
4625
|
-
|
4626
|
-
|
4627
|
-
|
4628
|
-
|
4629
|
-
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
__decorate([
|
4634
|
-
Input(),
|
4635
|
-
__metadata("design:type", String)
|
4636
|
-
], TabComponent.prototype, "label", void 0);
|
4637
|
-
__decorate([
|
4638
|
-
Input(),
|
4639
|
-
__metadata("design:type", Object)
|
4640
|
-
], TabComponent.prototype, "active", void 0);
|
4641
|
-
__decorate([
|
4642
|
-
Input(),
|
4643
|
-
__metadata("design:type", TemplateRef)
|
4644
|
-
], TabComponent.prototype, "template", void 0);
|
4645
|
-
__decorate([
|
4646
|
-
Input(),
|
4647
|
-
__metadata("design:type", Object)
|
4648
|
-
], TabComponent.prototype, "closeable", void 0);
|
4649
|
-
__decorate([
|
4650
|
-
Input(),
|
4651
|
-
__metadata("design:type", Object)
|
4652
|
-
], TabComponent.prototype, "disabled", void 0);
|
4653
|
-
__decorate([
|
4654
|
-
Input(),
|
4655
|
-
__metadata("design:type", Object)
|
4656
|
-
], TabComponent.prototype, "data", void 0);
|
4657
|
-
__decorate([
|
4658
|
-
Input(),
|
4659
|
-
__metadata("design:type", String)
|
4660
|
-
], TabComponent.prototype, "icon", void 0);
|
4661
|
-
__decorate([
|
4662
|
-
Output(),
|
4663
|
-
__metadata("design:type", Object)
|
4664
|
-
], TabComponent.prototype, "selectionChange", void 0);
|
4665
|
-
TabComponent = __decorate([
|
4666
|
-
Component({
|
4667
|
-
selector: 'itss-tab',
|
4668
|
-
template: "<div *ngIf=\"active\">\n <ng-content></ng-content>\n <ng-container *ngIf=\"template\"\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{$implicit: data}\">\n </ng-container>\n</div>\n",
|
4669
|
-
styles: [""]
|
4670
|
-
})
|
4671
|
-
], TabComponent);
|
4672
|
-
|
4673
|
-
let DynamicTabDirective = class DynamicTabDirective {
|
4674
|
-
constructor(viewContainer) {
|
4675
|
-
this.viewContainer = viewContainer;
|
4676
|
-
}
|
4677
|
-
};
|
4678
|
-
DynamicTabDirective.ctorParameters = () => [
|
4679
|
-
{ type: ViewContainerRef }
|
4680
|
-
];
|
4681
|
-
DynamicTabDirective = __decorate([
|
4682
|
-
Directive({
|
4683
|
-
selector: '[dynamicTab]'
|
4684
|
-
}),
|
4685
|
-
__metadata("design:paramtypes", [ViewContainerRef])
|
4686
|
-
], DynamicTabDirective);
|
4687
|
-
|
4688
|
-
class TabDTO extends AbstractDTO {
|
4689
|
-
constructor() {
|
4690
|
-
super(...arguments);
|
4691
|
-
this.active = false;
|
4692
|
-
this.closeable = false;
|
4693
|
-
this.disabled = false;
|
4694
|
-
}
|
4695
|
-
}
|
4696
|
-
|
4697
|
-
let TabGroupComponent = class TabGroupComponent {
|
4698
|
-
constructor(_componentFactoryResolver) {
|
4699
|
-
this._componentFactoryResolver = _componentFactoryResolver;
|
4700
|
-
this.dynamicTabs = [];
|
4701
|
-
}
|
4702
|
-
ngOnInit() {
|
4609
|
+
/**
|
4610
|
+
* Throttle a function
|
4611
|
+
*/
|
4612
|
+
function throttle(func, wait, options) {
|
4613
|
+
options = options || {};
|
4614
|
+
let context;
|
4615
|
+
let args;
|
4616
|
+
let result;
|
4617
|
+
let timeout = null;
|
4618
|
+
let previous = 0;
|
4619
|
+
function later() {
|
4620
|
+
previous = options.leading === false ? 0 : +new Date();
|
4621
|
+
timeout = null;
|
4622
|
+
result = func.apply(context, args);
|
4703
4623
|
}
|
4704
|
-
|
4705
|
-
const
|
4706
|
-
if (
|
4707
|
-
|
4708
|
-
}
|
4709
|
-
}
|
4710
|
-
openTab(label, template, data, closeable = false, disabled = false, action) {
|
4711
|
-
const tab = new TabDTO();
|
4712
|
-
tab.label = label;
|
4713
|
-
tab.template = template;
|
4714
|
-
tab.data = data;
|
4715
|
-
tab.closeable = closeable;
|
4716
|
-
tab.disabled = disabled;
|
4717
|
-
tab.action = action;
|
4718
|
-
this.openTabs(Array(tab));
|
4719
|
-
}
|
4720
|
-
openTabs(tabs) {
|
4721
|
-
const tabsComponent = tabs.map(tab => this.getTabComponent(tab.label, tab.template, tab.data, tab.closeable, tab.disabled, tab.action));
|
4722
|
-
this.dynamicTabs.push(...tabsComponent);
|
4723
|
-
this.selectTab(this.dynamicTabs[0]);
|
4724
|
-
}
|
4725
|
-
getTabComponent(label, template, data, closeable = false, disabled = false, action) {
|
4726
|
-
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(TabComponent);
|
4727
|
-
const componentRef = this.dynamicTabPlaceholder.viewContainer.createComponent(componentFactory);
|
4728
|
-
const instance = componentRef.instance;
|
4729
|
-
instance.label = label;
|
4730
|
-
instance.template = template;
|
4731
|
-
instance.data = data;
|
4732
|
-
instance.closeable = closeable;
|
4733
|
-
instance.disabled = disabled;
|
4734
|
-
instance.action = action;
|
4735
|
-
return componentRef.instance;
|
4736
|
-
}
|
4737
|
-
selectTab(tab) {
|
4738
|
-
this.tabs.toArray().forEach(t => (t.active = false));
|
4739
|
-
this.dynamicTabs.forEach(t => (t.active = false));
|
4740
|
-
tab.active = true;
|
4741
|
-
tab.selectionChange.emit();
|
4742
|
-
if (tab.action) {
|
4743
|
-
tab.action(tab.data);
|
4744
|
-
}
|
4745
|
-
}
|
4746
|
-
closeTab(tab) {
|
4747
|
-
const index = this.dynamicTabs.indexOf(tab);
|
4748
|
-
this.dynamicTabs.splice(index, 1);
|
4749
|
-
const viewContainerRef = this.dynamicTabPlaceholder.viewContainer;
|
4750
|
-
viewContainerRef.remove(index);
|
4751
|
-
if (this.tabs.length > 0) {
|
4752
|
-
this.selectTab(this.tabs.first);
|
4753
|
-
}
|
4754
|
-
}
|
4755
|
-
closeActiveTab() {
|
4756
|
-
const activeTabs = this.dynamicTabs.filter(tab => tab.active);
|
4757
|
-
if (activeTabs.length > 0) {
|
4758
|
-
this.closeTab(activeTabs[0]);
|
4759
|
-
}
|
4760
|
-
}
|
4761
|
-
closeAllTabs() {
|
4762
|
-
const tabs = Object.assign([], this.dynamicTabs);
|
4763
|
-
if (tabs.length > 0) {
|
4764
|
-
tabs.forEach(tab => this.closeTab(tab));
|
4765
|
-
}
|
4766
|
-
}
|
4767
|
-
nextTab() {
|
4768
|
-
const currentTab = this.tabs.toArray().find(tab => tab.active);
|
4769
|
-
const nextTab = this.tabs.toArray()[this.tabs.toArray().indexOf(currentTab) + 1];
|
4770
|
-
if (nextTab != null) {
|
4771
|
-
this.tabs.toArray().forEach(t => (t.active = false));
|
4772
|
-
this.dynamicTabs.forEach(t => (t.active = false));
|
4773
|
-
nextTab.active = true;
|
4774
|
-
nextTab.selectionChange.emit();
|
4775
|
-
}
|
4776
|
-
}
|
4777
|
-
previousTab() {
|
4778
|
-
const currentTab = this.tabs.toArray().find(tab => tab.active);
|
4779
|
-
const previousTab = this.tabs.toArray()[this.tabs.toArray().indexOf(currentTab) - 1];
|
4780
|
-
if (previousTab != null) {
|
4781
|
-
this.tabs.toArray().forEach(t => (t.active = false));
|
4782
|
-
this.dynamicTabs.forEach(t => (t.active = false));
|
4783
|
-
previousTab.active = true;
|
4784
|
-
previousTab.selectionChange.emit();
|
4785
|
-
}
|
4786
|
-
}
|
4787
|
-
};
|
4788
|
-
TabGroupComponent.ctorParameters = () => [
|
4789
|
-
{ type: ComponentFactoryResolver }
|
4790
|
-
];
|
4791
|
-
__decorate([
|
4792
|
-
ContentChildren(TabComponent),
|
4793
|
-
__metadata("design:type", QueryList)
|
4794
|
-
], TabGroupComponent.prototype, "tabs", void 0);
|
4795
|
-
__decorate([
|
4796
|
-
ViewChild(DynamicTabDirective, { static: false }),
|
4797
|
-
__metadata("design:type", DynamicTabDirective)
|
4798
|
-
], TabGroupComponent.prototype, "dynamicTabPlaceholder", void 0);
|
4799
|
-
TabGroupComponent = __decorate([
|
4800
|
-
Component({
|
4801
|
-
selector: 'itss-tab-group',
|
4802
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link\n *ngFor=\"let tab of tabs\"\n (click)=\"selectTab(tab)\"\n [class.active]=\"tab.active\"\n [disabled]=\"tab.disabled\">\n <div mat-card-avatar\n *ngIf=\"tab.icon\">\n <mat-icon>{{ tab.icon }}</mat-icon>\n </div>\n\n {{ tab.label }}\n </a>\n\n <a mat-tab-link\n *ngFor=\"let tab of dynamicTabs\"\n (click)=\"selectTab(tab)\"\n [class.active]=\"tab.active\"\n [disabled]=\"tab.disabled\">\n <div mat-card-avatar\n *ngIf=\"tab.icon\">\n <mat-icon>{{ tab.icon }}</mat-icon>\n </div>\n\n {{ tab.label }}\n </a>\n</nav>\n\n<ng-content></ng-content>\n<ng-template dynamicTab\n #container></ng-template>\n",
|
4803
|
-
styles: [""]
|
4804
|
-
}),
|
4805
|
-
__metadata("design:paramtypes", [ComponentFactoryResolver])
|
4806
|
-
], TabGroupComponent);
|
4807
|
-
|
4808
|
-
/**
|
4809
|
-
* Throttle a function
|
4810
|
-
*/
|
4811
|
-
function throttle(func, wait, options) {
|
4812
|
-
options = options || {};
|
4813
|
-
let context;
|
4814
|
-
let args;
|
4815
|
-
let result;
|
4816
|
-
let timeout = null;
|
4817
|
-
let previous = 0;
|
4818
|
-
function later() {
|
4819
|
-
previous = options.leading === false ? 0 : +new Date();
|
4820
|
-
timeout = null;
|
4821
|
-
result = func.apply(context, args);
|
4822
|
-
}
|
4823
|
-
return function () {
|
4824
|
-
const now = +new Date();
|
4825
|
-
if (!previous && options.leading === false) {
|
4826
|
-
previous = now;
|
4624
|
+
return function () {
|
4625
|
+
const now = +new Date();
|
4626
|
+
if (!previous && options.leading === false) {
|
4627
|
+
previous = now;
|
4827
4628
|
}
|
4828
4629
|
const remaining = wait - (now - previous);
|
4829
4630
|
context = this;
|
@@ -6577,7 +6378,7 @@ let GIPIColDirective = class GIPIColDirective {
|
|
6577
6378
|
this._destroy$.complete();
|
6578
6379
|
}
|
6579
6380
|
_setHostClassMap() {
|
6580
|
-
const hostClassMap = Object.assign({ ['grid-col']: true, [`grid-col-${this.GIPISpan}`]: ObjectUtil.
|
6381
|
+
const hostClassMap = Object.assign({ ['grid-col']: true, [`grid-col-${this.GIPISpan}`]: !ObjectUtil.isNull(this.GIPISpan), [`grid-col-order-${this.GIPIOrder}`]: !ObjectUtil.isNull(this.GIPIOrder), [`grid-col-offset-${this.GIPIOffset}`]: !ObjectUtil.isNull(this.GIPIOffset), [`grid-col-pull-${this.GIPIPull}`]: !ObjectUtil.isNull(this.GIPIPull), [`grid-col-push-${this.GIPIPush}`]: !ObjectUtil.isNull(this.GIPIPush) }, this._generateClass());
|
6581
6382
|
for (const i in this._classMap) {
|
6582
6383
|
if (this._classMap.hasOwnProperty(i)) {
|
6583
6384
|
this.renderer.removeClass(this.elementRef.nativeElement, i);
|
@@ -6609,7 +6410,7 @@ let GIPIColDirective = class GIPIColDirective {
|
|
6609
6410
|
const listClassMap = {};
|
6610
6411
|
listOfSizeInputName.forEach(name => {
|
6611
6412
|
const sizeName = name.replace('GIPI', '').toLowerCase();
|
6612
|
-
if (ObjectUtil.
|
6413
|
+
if (!ObjectUtil.isNull(this[name])) {
|
6613
6414
|
if (typeof this[name] === 'number' || typeof this[name] === 'string') {
|
6614
6415
|
listClassMap[`grid-col-${sizeName}-${this[name]}`] = true;
|
6615
6416
|
}
|
@@ -6618,7 +6419,7 @@ let GIPIColDirective = class GIPIColDirective {
|
|
6618
6419
|
const prefixArray = ['span', 'pull', 'push', 'offset', 'order'];
|
6619
6420
|
prefixArray.forEach(prefix => {
|
6620
6421
|
const prefixClass = prefix === 'span' ? '-' : `-${prefix}-`;
|
6621
|
-
listClassMap[`grid-col-${sizeName}${prefixClass}${embedded[prefix]}`] = embedded && ObjectUtil.
|
6422
|
+
listClassMap[`grid-col-${sizeName}${prefixClass}${embedded[prefix]}`] = embedded && !ObjectUtil.isNull(embedded[prefix]);
|
6622
6423
|
});
|
6623
6424
|
}
|
6624
6425
|
}
|
@@ -7019,6 +6820,21 @@ GIPIPaginationControlsDirective = __decorate([
|
|
7019
6820
|
ChangeDetectorRef])
|
7020
6821
|
], GIPIPaginationControlsDirective);
|
7021
6822
|
|
6823
|
+
let GIPIDynamicTabDirective = class GIPIDynamicTabDirective {
|
6824
|
+
constructor(viewContainer) {
|
6825
|
+
this.viewContainer = viewContainer;
|
6826
|
+
}
|
6827
|
+
};
|
6828
|
+
GIPIDynamicTabDirective.ctorParameters = () => [
|
6829
|
+
{ type: ViewContainerRef }
|
6830
|
+
];
|
6831
|
+
GIPIDynamicTabDirective = __decorate([
|
6832
|
+
Directive({
|
6833
|
+
selector: '[GIPIDynamicTab]'
|
6834
|
+
}),
|
6835
|
+
__metadata("design:paramtypes", [ViewContainerRef])
|
6836
|
+
], GIPIDynamicTabDirective);
|
6837
|
+
|
7022
6838
|
let GIPITemplateDirective = class GIPITemplateDirective {
|
7023
6839
|
constructor(template) {
|
7024
6840
|
this.template = template;
|
@@ -7290,7 +7106,7 @@ GIPIAbstractFormComponent = GIPIAbstractFormComponent_1 = __decorate([
|
|
7290
7106
|
Component({
|
7291
7107
|
selector: `gipi-abstract-form`,
|
7292
7108
|
exportAs: 'gipiAbstractForm',
|
7293
|
-
template: "<div
|
7109
|
+
template: "<div class=\"form-content\"\n [class.form-dialog]=\"dialog\"\n [class.space-bottom]=\"!dialog\"\n [style.flex-direction]=\"flexDirection\"\n [style.align-items]=\"alignItems\"\n [style.justify-content]=\"justifyContent\"\n [style.gap]=\"getGap\"\n [style.padding]=\"getPadding\">\n <ng-content> </ng-content>\n</div>\n<div class=\"form-footer\"\n [style.margin-inline]=\"getPadding\"\n *ngIf=\"GIPIActionRowComponent\">\n <ng-content select=\"gipi-action-row\"> </ng-content>\n</div>",
|
7294
7110
|
providers: [
|
7295
7111
|
{
|
7296
7112
|
provide: NG_VALUE_ACCESSOR,
|
@@ -8750,7 +8566,7 @@ GIPIButtonComponent = GIPIButtonComponent_1 = __decorate([
|
|
8750
8566
|
selector: `gipi-button[gipi-primary], gipi-button[gipi-primary-icon], gipi-button[gipi-secondary], gipi-button[gipi-secondary-icon],
|
8751
8567
|
gipi-button[gipi-tertiary], gipi-button[gipi-link], gipi-button[gipi-icon], gipi-button[gipi-action]`,
|
8752
8568
|
exportAs: 'gipiButton',
|
8753
|
-
template: "<button [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : label\"\n [attr.title]=\"title ? title : label\"\n [disabled]=\"disabled || loading\"\n [matTooltip]=\"tooltip\"\n role=\"button\"\n [class]=\"buttonClass\"\n [ngClass]=\"{'button-base': true,\n 'button-primary': (isButtonPrimary || isButtonPrimaryIcon),\n 'button-primary-icon': isButtonPrimaryIcon,\n 'button-secondary': (isButtonSecondary || isButtonSecondaryIcon),\n 'button-secondary-icon': isButtonSecondaryIcon,\n 'button-tertiary': (isButtonTertiary || isButtonTertiaryIcon),\n 'button-tertiary-icon': isButtonTertiaryIcon,\n 'button-link': isButtonLink,\n 'button-only-icon': isButtonIcon,\n 'button-for-input': isForInput,\n 'button-notification': notification,\n 'button-action': isButtonAction}\"\n [style.padding.px]=\"buttonPadding\"\n #popoverTrigger=\"popoverTrigger\"\n [popoverTriggerFor]=\"btnPopover\"\n [popoverTriggerOn]=\"popover ? 'click' : 'none'\"\n [popoverBackdropCloseOnClick]=\"true\"\n (opened)=\"onOpenPopover.emit()\"\n (closed)=\"onClosePopover.emit()\"\n (click)=\"handleClick($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\">\n\n <span [ngClass]=\"{'button-content': true,\n 'button-disabled': disabled,\n 'button-icon-left': ((iconPos === 'left') && label),\n 'button-icon-right': ((iconPos === 'right') && label),\n 'button-icon-top': ((iconPos === 'top') && label),\n 'button-icon-bottom': ((iconPos === 'bottom') && label),\n 'button-icon-center': (iconPos === 'center')}\">\n\n <mat-icon *ngIf=\"svgIcon || icon\"\n [svgIcon]=\"svgIcon\"\n [style.width.px]=\"iconWidth\"\n [style.height.px]=\"iconHeight\">\n {{ (!svgIcon && icon) ? icon : '' }}\n </mat-icon>\n\n <span class=\"button-label\"\n [attr.aria-hidden]=\"(icon || svgIcon) && !label\"\n *ngIf=\"!isButtonIcon && label\">\n {{ label }}\n </span>\n </span>\n\n</button>\n<gipi-overlay *ngIf=\"overlay && !popover\"\n [(visible)]=\"_overlayVisible\"\n [appendTo]=\"'body'\"\n (onShow)=\"onShowOverlay.emit()\">\n <ng-content> </ng-content>\n</gipi-overlay>\n\n<gipi-popover #btnPopover=\"gipiPopover\"\n [popoverOverlapTrigger]=\"false\"\n [popoverCloseOnClick]=\"false\"\n [popoverArrowWidth]=\"0\"\n [popoverOffsetY]=\"3\">\n <div class=\"btn-popover-content\">\n <ng-content> </ng-content>\n </div>\n</gipi-popover>",
|
8569
|
+
template: "<button [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : label\"\n [attr.title]=\"title ? title : label\"\n [disabled]=\"disabled || loading\"\n [matTooltip]=\"tooltip\"\n role=\"button\"\n [class]=\"buttonClass\"\n [ngClass]=\"{'button-base': true,\n 'button-primary': (isButtonPrimary || isButtonPrimaryIcon),\n 'button-primary-icon': isButtonPrimaryIcon,\n 'button-secondary': (isButtonSecondary || isButtonSecondaryIcon),\n 'button-secondary-icon': isButtonSecondaryIcon,\n 'button-tertiary': (isButtonTertiary || isButtonTertiaryIcon),\n 'button-tertiary-icon': isButtonTertiaryIcon,\n 'button-link': isButtonLink,\n 'button-only-icon': isButtonIcon,\n 'button-for-input': isForInput,\n 'button-notification': notification,\n 'button-action': isButtonAction}\"\n [style.padding.px]=\"buttonPadding\"\n #popoverTrigger=\"popoverTrigger\"\n [popoverTriggerFor]=\"btnPopover\"\n [popoverTriggerOn]=\"popover ? 'click' : 'none'\"\n [popoverBackdropCloseOnClick]=\"true\"\n (opened)=\"onOpenPopover.emit()\"\n (closed)=\"onClosePopover.emit()\"\n (click)=\"handleClick($event)\"\n (focus)=\"handleFocus($event)\"\n (blur)=\"handleBlur($event)\">\n\n <span [ngClass]=\"{'button-content': true,\n 'button-disabled': disabled,\n 'button-icon-left': ((iconPos === 'left') && label),\n 'button-icon-right': ((iconPos === 'right') && label),\n 'button-icon-top': ((iconPos === 'top') && label),\n 'button-icon-bottom': ((iconPos === 'bottom') && label),\n 'button-icon-center': (iconPos === 'center')}\">\n\n <mat-icon *ngIf=\"svgIcon || icon\"\n [svgIcon]=\"svgIcon\"\n [style.width.px]=\"iconWidth\"\n [style.height.px]=\"iconHeight\"\n [style.font-size.px]=\"iconWidth || iconHeight\">\n {{ (!svgIcon && icon) ? icon : '' }}\n </mat-icon>\n\n <span class=\"button-label\"\n [attr.aria-hidden]=\"(icon || svgIcon) && !label\"\n *ngIf=\"!isButtonIcon && label\">\n {{ label }}\n </span>\n </span>\n\n</button>\n<gipi-overlay *ngIf=\"overlay && !popover\"\n [(visible)]=\"_overlayVisible\"\n [appendTo]=\"'body'\"\n (onShow)=\"onShowOverlay.emit()\">\n <ng-content> </ng-content>\n</gipi-overlay>\n\n<gipi-popover #btnPopover=\"gipiPopover\"\n [popoverOverlapTrigger]=\"false\"\n [popoverCloseOnClick]=\"false\"\n [popoverArrowWidth]=\"0\"\n [popoverOffsetY]=\"3\"\n [fxHide]=\"!popover\">\n <div class=\"btn-popover-content\">\n <ng-content> </ng-content>\n </div>\n</gipi-popover>",
|
8754
8570
|
providers: [
|
8755
8571
|
{
|
8756
8572
|
provide: NG_VALUE_ACCESSOR,
|
@@ -8766,15 +8582,124 @@ GIPIButtonComponent = GIPIButtonComponent_1 = __decorate([
|
|
8766
8582
|
__metadata("design:paramtypes", [ElementRef])
|
8767
8583
|
], GIPIButtonComponent);
|
8768
8584
|
|
8585
|
+
var GIPICardComponent_1;
|
8586
|
+
let nextUniqueId = 0;
|
8587
|
+
let GIPICardComponent = GIPICardComponent_1 = class GIPICardComponent {
|
8588
|
+
constructor(elementRef, _changeDetectorRef) {
|
8589
|
+
this.elementRef = elementRef;
|
8590
|
+
this._changeDetectorRef = _changeDetectorRef;
|
8591
|
+
this._uniqueId = `gipi-card-${++nextUniqueId}`;
|
8592
|
+
this._id = '';
|
8593
|
+
this._name = '';
|
8594
|
+
this._loading = false;
|
8595
|
+
this._shadow = true;
|
8596
|
+
this._padding = true;
|
8597
|
+
}
|
8598
|
+
get id() {
|
8599
|
+
return this._id;
|
8600
|
+
}
|
8601
|
+
set id(value) {
|
8602
|
+
this._id = value || this._uniqueId;
|
8603
|
+
}
|
8604
|
+
get name() {
|
8605
|
+
return this._name;
|
8606
|
+
}
|
8607
|
+
set name(value) {
|
8608
|
+
this._name = value || this._uniqueId;
|
8609
|
+
}
|
8610
|
+
get loading() {
|
8611
|
+
return this._loading;
|
8612
|
+
}
|
8613
|
+
set loading(value) {
|
8614
|
+
if (value !== this.loading) {
|
8615
|
+
this._loading = value;
|
8616
|
+
this._changeDetectorRef.markForCheck();
|
8617
|
+
}
|
8618
|
+
}
|
8619
|
+
get shadow() {
|
8620
|
+
return this._shadow;
|
8621
|
+
}
|
8622
|
+
set shadow(value) {
|
8623
|
+
if (value !== this.shadow) {
|
8624
|
+
this._shadow = value;
|
8625
|
+
this._changeDetectorRef.markForCheck();
|
8626
|
+
}
|
8627
|
+
}
|
8628
|
+
get padding() {
|
8629
|
+
return this._padding;
|
8630
|
+
}
|
8631
|
+
set padding(value) {
|
8632
|
+
if (value !== this.padding) {
|
8633
|
+
this._padding = value;
|
8634
|
+
this._changeDetectorRef.markForCheck();
|
8635
|
+
}
|
8636
|
+
}
|
8637
|
+
ngOnInit() { }
|
8638
|
+
};
|
8639
|
+
GIPICardComponent.ctorParameters = () => [
|
8640
|
+
{ type: ElementRef },
|
8641
|
+
{ type: ChangeDetectorRef }
|
8642
|
+
];
|
8643
|
+
__decorate([
|
8644
|
+
Input(),
|
8645
|
+
__metadata("design:type", String),
|
8646
|
+
__metadata("design:paramtypes", [String])
|
8647
|
+
], GIPICardComponent.prototype, "id", null);
|
8648
|
+
__decorate([
|
8649
|
+
Input(),
|
8650
|
+
__metadata("design:type", String),
|
8651
|
+
__metadata("design:paramtypes", [String])
|
8652
|
+
], GIPICardComponent.prototype, "name", null);
|
8653
|
+
__decorate([
|
8654
|
+
Input(),
|
8655
|
+
__metadata("design:type", Boolean),
|
8656
|
+
__metadata("design:paramtypes", [Boolean])
|
8657
|
+
], GIPICardComponent.prototype, "loading", null);
|
8658
|
+
__decorate([
|
8659
|
+
Input(),
|
8660
|
+
__metadata("design:type", Boolean),
|
8661
|
+
__metadata("design:paramtypes", [Boolean])
|
8662
|
+
], GIPICardComponent.prototype, "shadow", null);
|
8663
|
+
__decorate([
|
8664
|
+
Input(),
|
8665
|
+
__metadata("design:type", Boolean),
|
8666
|
+
__metadata("design:paramtypes", [Boolean])
|
8667
|
+
], GIPICardComponent.prototype, "padding", null);
|
8668
|
+
GIPICardComponent = GIPICardComponent_1 = __decorate([
|
8669
|
+
Component({
|
8670
|
+
selector: 'gipi-card',
|
8671
|
+
exportAs: 'gipiCard',
|
8672
|
+
template: "<ng-content></ng-content>",
|
8673
|
+
providers: [
|
8674
|
+
{
|
8675
|
+
provide: NG_VALUE_ACCESSOR,
|
8676
|
+
useExisting: forwardRef(() => GIPICardComponent_1),
|
8677
|
+
multi: true
|
8678
|
+
}
|
8679
|
+
],
|
8680
|
+
host: {
|
8681
|
+
'class': 'gipi-card',
|
8682
|
+
'[attr.id]': 'id',
|
8683
|
+
'[attr.name]': 'name',
|
8684
|
+
'[class.shadow-none]': '!shadow',
|
8685
|
+
'[class.padding-none]': '!padding',
|
8686
|
+
'[class.loading]': 'loading',
|
8687
|
+
},
|
8688
|
+
styles: [":host{display:block;flex:1;border-radius:.2rem;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084);padding:1.6rem}.padding-none{padding:0!important}.shadow-none{box-shadow:none!important}"]
|
8689
|
+
}),
|
8690
|
+
__metadata("design:paramtypes", [ElementRef,
|
8691
|
+
ChangeDetectorRef])
|
8692
|
+
], GIPICardComponent);
|
8693
|
+
|
8769
8694
|
var GIPIChipsComponent_1;
|
8770
8695
|
class RemoveChange {
|
8771
8696
|
}
|
8772
|
-
let nextUniqueId = 0;
|
8697
|
+
let nextUniqueId$1 = 0;
|
8773
8698
|
let GIPIChipsComponent = GIPIChipsComponent_1 = class GIPIChipsComponent {
|
8774
8699
|
constructor(_changeDetectorRef, elementRef) {
|
8775
8700
|
this._changeDetectorRef = _changeDetectorRef;
|
8776
8701
|
this.elementRef = elementRef;
|
8777
|
-
this._name = `gipi-chips-${nextUniqueId++}`;
|
8702
|
+
this._name = `gipi-chips-${nextUniqueId$1++}`;
|
8778
8703
|
this.id = this._name;
|
8779
8704
|
this.name = this._name;
|
8780
8705
|
this.label = 'Selecionados';
|
@@ -8956,12 +8881,12 @@ GIPIConfirmationDialogComponent = GIPIConfirmationDialogComponent_1 = __decorate
|
|
8956
8881
|
], GIPIConfirmationDialogComponent);
|
8957
8882
|
|
8958
8883
|
var GIPIDropdownMenuComponent_1;
|
8959
|
-
let nextUniqueId$
|
8884
|
+
let nextUniqueId$2 = 0;
|
8960
8885
|
let GIPIDropdownMenuComponent = GIPIDropdownMenuComponent_1 = class GIPIDropdownMenuComponent {
|
8961
8886
|
constructor(_changeDetectorRef, elementRef) {
|
8962
8887
|
this._changeDetectorRef = _changeDetectorRef;
|
8963
8888
|
this.elementRef = elementRef;
|
8964
|
-
this._name = `gipi-dropdown-menu-${nextUniqueId$
|
8889
|
+
this._name = `gipi-dropdown-menu-${nextUniqueId$2++}`;
|
8965
8890
|
this.id = this._name;
|
8966
8891
|
this.name = this._name;
|
8967
8892
|
this.label = '';
|
@@ -9135,6 +9060,32 @@ GIPIDropdownMenuComponent = GIPIDropdownMenuComponent_1 = __decorate([
|
|
9135
9060
|
ElementRef])
|
9136
9061
|
], GIPIDropdownMenuComponent);
|
9137
9062
|
|
9063
|
+
var GIPIEmptyStateComponent_1;
|
9064
|
+
let GIPIEmptyStateComponent = GIPIEmptyStateComponent_1 = class GIPIEmptyStateComponent {
|
9065
|
+
constructor() { }
|
9066
|
+
ngOnInit() { }
|
9067
|
+
};
|
9068
|
+
GIPIEmptyStateComponent = GIPIEmptyStateComponent_1 = __decorate([
|
9069
|
+
Component({
|
9070
|
+
selector: 'gipi-empty-state',
|
9071
|
+
exportAs: 'gipiEmptyState',
|
9072
|
+
template: "<mat-icon>sentiment_very_dissatisfied</mat-icon>\nNenhum registro foi encontrado",
|
9073
|
+
providers: [
|
9074
|
+
{
|
9075
|
+
provide: NG_VALUE_ACCESSOR,
|
9076
|
+
useExisting: forwardRef(() => GIPIEmptyStateComponent_1),
|
9077
|
+
multi: true
|
9078
|
+
}
|
9079
|
+
],
|
9080
|
+
host: {
|
9081
|
+
'class': 'gipi-empty-state',
|
9082
|
+
},
|
9083
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
9084
|
+
styles: [":host{display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:1.4rem;font-weight:600;color:#131313;padding:2.4rem 0}:host>mat-icon{font-size:3.2rem;height:3.2rem;width:3.2rem;margin-bottom:5px}"]
|
9085
|
+
}),
|
9086
|
+
__metadata("design:paramtypes", [])
|
9087
|
+
], GIPIEmptyStateComponent);
|
9088
|
+
|
9138
9089
|
var GIPIExpansionPanelComponent_1;
|
9139
9090
|
let GIPIExpansionPanelComponent = GIPIExpansionPanelComponent_1 = class GIPIExpansionPanelComponent {
|
9140
9091
|
constructor(elementRef, _changeDetectorRef) {
|
@@ -9516,12 +9467,12 @@ GIPIFooterComponent = GIPIFooterComponent_1 = __decorate([
|
|
9516
9467
|
], GIPIFooterComponent);
|
9517
9468
|
|
9518
9469
|
var GIPIFormFieldComponent_1;
|
9519
|
-
let nextUniqueId$
|
9470
|
+
let nextUniqueId$3 = 0;
|
9520
9471
|
let GIPIFormFieldComponent = GIPIFormFieldComponent_1 = class GIPIFormFieldComponent {
|
9521
9472
|
constructor(_changeDetectorRef, elementRef) {
|
9522
9473
|
this._changeDetectorRef = _changeDetectorRef;
|
9523
9474
|
this.elementRef = elementRef;
|
9524
|
-
this._name = `gipi-form-field-${nextUniqueId$
|
9475
|
+
this._name = `gipi-form-field-${nextUniqueId$3++}`;
|
9525
9476
|
this.id = this._name;
|
9526
9477
|
this.name = this._name;
|
9527
9478
|
this.label = '';
|
@@ -9773,12 +9724,12 @@ GIPIFormFieldComponent = GIPIFormFieldComponent_1 = __decorate([
|
|
9773
9724
|
], GIPIFormFieldComponent);
|
9774
9725
|
|
9775
9726
|
var GIPIHelpfulTipComponent_1;
|
9776
|
-
let nextUniqueId$
|
9727
|
+
let nextUniqueId$4 = 0;
|
9777
9728
|
let GIPIHelpfulTipComponent = GIPIHelpfulTipComponent_1 = class GIPIHelpfulTipComponent {
|
9778
9729
|
constructor(_changeDetectorRef, elementRef) {
|
9779
9730
|
this._changeDetectorRef = _changeDetectorRef;
|
9780
9731
|
this.elementRef = elementRef;
|
9781
|
-
this._name = `gipi-form-field-${nextUniqueId$
|
9732
|
+
this._name = `gipi-form-field-${nextUniqueId$4++}`;
|
9782
9733
|
this.id = this._name;
|
9783
9734
|
this.name = this._name;
|
9784
9735
|
this._tooltip = '';
|
@@ -9831,11 +9782,11 @@ GIPIHelpfulTipComponent = GIPIHelpfulTipComponent_1 = __decorate([
|
|
9831
9782
|
], GIPIHelpfulTipComponent);
|
9832
9783
|
|
9833
9784
|
var GIPIInputCheckboxComponent_1;
|
9834
|
-
let nextUniqueId$
|
9785
|
+
let nextUniqueId$5 = 0;
|
9835
9786
|
let GIPIInputCheckboxComponent = GIPIInputCheckboxComponent_1 = class GIPIInputCheckboxComponent {
|
9836
9787
|
constructor(_changeDetectorRef) {
|
9837
9788
|
this._changeDetectorRef = _changeDetectorRef;
|
9838
|
-
this._name = `gipi-input-checkbox-${nextUniqueId$
|
9789
|
+
this._name = `gipi-input-checkbox-${nextUniqueId$5++}`;
|
9839
9790
|
this.id = this._name;
|
9840
9791
|
this.name = this._name;
|
9841
9792
|
this.disabled = false;
|
@@ -9939,12 +9890,12 @@ GIPIInputCheckboxComponent = GIPIInputCheckboxComponent_1 = __decorate([
|
|
9939
9890
|
], GIPIInputCheckboxComponent);
|
9940
9891
|
|
9941
9892
|
var GIPIInputCurrencyComponent_1;
|
9942
|
-
let nextUniqueId$
|
9893
|
+
let nextUniqueId$6 = 0;
|
9943
9894
|
let GIPIInputCurrencyComponent = GIPIInputCurrencyComponent_1 = class GIPIInputCurrencyComponent {
|
9944
9895
|
constructor(_changeDetectorRef, elementRef) {
|
9945
9896
|
this._changeDetectorRef = _changeDetectorRef;
|
9946
9897
|
this.elementRef = elementRef;
|
9947
|
-
this._name = `gipi-input-currency-${nextUniqueId$
|
9898
|
+
this._name = `gipi-input-currency-${nextUniqueId$6++}`;
|
9948
9899
|
this.id = this._name;
|
9949
9900
|
this.name = this._name;
|
9950
9901
|
this.placeholder = '';
|
@@ -10132,12 +10083,12 @@ GIPIInputCurrencyComponent = GIPIInputCurrencyComponent_1 = __decorate([
|
|
10132
10083
|
|
10133
10084
|
var GIPIInputMonthPickerComponent_1;
|
10134
10085
|
const yearsPerPage = 24;
|
10135
|
-
let nextUniqueId$
|
10086
|
+
let nextUniqueId$7 = 0;
|
10136
10087
|
let GIPIInputMonthPickerComponent = GIPIInputMonthPickerComponent_1 = class GIPIInputMonthPickerComponent {
|
10137
10088
|
constructor(_changeDetectorRef, _config) {
|
10138
10089
|
this._changeDetectorRef = _changeDetectorRef;
|
10139
10090
|
this._config = _config;
|
10140
|
-
this._name = `gipi-input-monthpicker-${nextUniqueId$
|
10091
|
+
this._name = `gipi-input-monthpicker-${nextUniqueId$7++}`;
|
10141
10092
|
this._yearArrays = [];
|
10142
10093
|
this._now = new Date();
|
10143
10094
|
this._currentMonth = this._now.getMonth();
|
@@ -10533,14 +10484,14 @@ GIPIInputMonthPickerComponent = GIPIInputMonthPickerComponent_1 = __decorate([
|
|
10533
10484
|
], GIPIInputMonthPickerComponent);
|
10534
10485
|
|
10535
10486
|
var GIPIInputSelectEnumComponent_1;
|
10536
|
-
let nextUniqueId$
|
10487
|
+
let nextUniqueId$8 = 0;
|
10537
10488
|
/** A altura dos itens selecionados em unidades `px`. */
|
10538
10489
|
const OPTION_HEIGHT_PX = 40;
|
10539
10490
|
let GIPIInputSelectEnumComponent = GIPIInputSelectEnumComponent_1 = class GIPIInputSelectEnumComponent {
|
10540
10491
|
constructor(elementRef, _changeDetectorRef) {
|
10541
10492
|
this.elementRef = elementRef;
|
10542
10493
|
this._changeDetectorRef = _changeDetectorRef;
|
10543
|
-
this._name = `gipi-input-select-enum-${nextUniqueId$
|
10494
|
+
this._name = `gipi-input-select-enum-${nextUniqueId$8++}`;
|
10544
10495
|
this._enumList = [];
|
10545
10496
|
this._itemSizeScrollViewport = 5;
|
10546
10497
|
this._lastOptionSelected = null;
|
@@ -11415,11 +11366,11 @@ GIPIOverlayComponent = GIPIOverlayComponent_1 = __decorate([
|
|
11415
11366
|
var GIPIInputSelectComponent_1;
|
11416
11367
|
/** A altura dos itens selecionados em unidades `px`. */
|
11417
11368
|
const OPTION_HEIGHT_PX$1 = 44;
|
11418
|
-
let nextUniqueId$
|
11369
|
+
let nextUniqueId$9 = 0;
|
11419
11370
|
let GIPIInputSelectComponent = GIPIInputSelectComponent_1 = class GIPIInputSelectComponent {
|
11420
11371
|
constructor(_changeDetectorRef) {
|
11421
11372
|
this._changeDetectorRef = _changeDetectorRef;
|
11422
|
-
this._name = `gipi-input-select-${nextUniqueId$
|
11373
|
+
this._name = `gipi-input-select-${nextUniqueId$9++}`;
|
11423
11374
|
this._onDestroy = new Subject();
|
11424
11375
|
this._itemSizeScrollViewport = 5;
|
11425
11376
|
this._overlayVisible = false;
|
@@ -12060,13 +12011,13 @@ GIPIInputSelectComponent = GIPIInputSelectComponent_1 = __decorate([
|
|
12060
12011
|
], GIPIInputSelectComponent);
|
12061
12012
|
|
12062
12013
|
var GIPIInputSelectListboxComponent_1;
|
12063
|
-
let nextUniqueId$
|
12014
|
+
let nextUniqueId$a = 0;
|
12064
12015
|
let GIPIInputSelectListboxComponent = GIPIInputSelectListboxComponent_1 = class GIPIInputSelectListboxComponent {
|
12065
12016
|
constructor(_changeDetectorRef, _elementRef, _renderer) {
|
12066
12017
|
this._changeDetectorRef = _changeDetectorRef;
|
12067
12018
|
this._elementRef = _elementRef;
|
12068
12019
|
this._renderer = _renderer;
|
12069
|
-
this._name = `gipi-input-select-listbox-${nextUniqueId$
|
12020
|
+
this._name = `gipi-input-select-listbox-${nextUniqueId$a++}`;
|
12070
12021
|
this._isOverlayChildrenClicked = false;
|
12071
12022
|
this._overlayVisible = false;
|
12072
12023
|
this._selectEntityOpened = false;
|
@@ -12837,11 +12788,11 @@ GIPIInputSearchComponent = GIPIInputSearchComponent_1 = __decorate([
|
|
12837
12788
|
], GIPIInputSearchComponent);
|
12838
12789
|
|
12839
12790
|
var GIPIInputSelectPagedComponent_1;
|
12840
|
-
let nextUniqueId$
|
12791
|
+
let nextUniqueId$b = 0;
|
12841
12792
|
let GIPIInputSelectPagedComponent = GIPIInputSelectPagedComponent_1 = class GIPIInputSelectPagedComponent {
|
12842
12793
|
constructor(_changeDetectorRef) {
|
12843
12794
|
this._changeDetectorRef = _changeDetectorRef;
|
12844
|
-
this._name = `gipi-input-select-paged-${nextUniqueId$
|
12795
|
+
this._name = `gipi-input-select-paged-${nextUniqueId$b++}`;
|
12845
12796
|
this.valueSearchCtrl = new FormControl('');
|
12846
12797
|
this.totalOptions = 0;
|
12847
12798
|
this.subscriptions = [];
|
@@ -13179,12 +13130,12 @@ GIPIInputSelectPagedComponent = GIPIInputSelectPagedComponent_1 = __decorate([
|
|
13179
13130
|
], GIPIInputSelectPagedComponent);
|
13180
13131
|
|
13181
13132
|
var GIPIInputSelectRadioComponent_1;
|
13182
|
-
let nextUniqueId$
|
13133
|
+
let nextUniqueId$c = 0;
|
13183
13134
|
let GIPIInputSelectRadioComponent = GIPIInputSelectRadioComponent_1 = class GIPIInputSelectRadioComponent {
|
13184
13135
|
constructor(elementRef, _changeDetectorRef) {
|
13185
13136
|
this.elementRef = elementRef;
|
13186
13137
|
this._changeDetectorRef = _changeDetectorRef;
|
13187
|
-
this._name = `gipi-input-select-radio-${nextUniqueId$
|
13138
|
+
this._name = `gipi-input-select-radio-${nextUniqueId$c++}`;
|
13188
13139
|
this._enumList = [];
|
13189
13140
|
this.id = this._name;
|
13190
13141
|
this.name = this._name;
|
@@ -13447,6 +13398,7 @@ let GIPINotificationComponent = GIPINotificationComponent_1 = class GIPINotifica
|
|
13447
13398
|
this.iconHeight = 24;
|
13448
13399
|
this.icon = null;
|
13449
13400
|
this.svgIcon = null;
|
13401
|
+
this.notification = false;
|
13450
13402
|
this.onShowOverlay = new EventEmitter();
|
13451
13403
|
this.onClick = new EventEmitter();
|
13452
13404
|
this.onFocus = new EventEmitter();
|
@@ -13502,6 +13454,10 @@ __decorate([
|
|
13502
13454
|
Input(),
|
13503
13455
|
__metadata("design:type", String)
|
13504
13456
|
], GIPINotificationComponent.prototype, "tooltip", void 0);
|
13457
|
+
__decorate([
|
13458
|
+
Input(),
|
13459
|
+
__metadata("design:type", Boolean)
|
13460
|
+
], GIPINotificationComponent.prototype, "notification", void 0);
|
13505
13461
|
__decorate([
|
13506
13462
|
Output(),
|
13507
13463
|
__metadata("design:type", EventEmitter)
|
@@ -13522,7 +13478,7 @@ GIPINotificationComponent = GIPINotificationComponent_1 = __decorate([
|
|
13522
13478
|
Component({
|
13523
13479
|
selector: `gipi-notification`,
|
13524
13480
|
exportAs: 'gipiNotification',
|
13525
|
-
template: "<gipi-button gipi-icon\n [id]=\"id\"\n [name]=\"name\"\n [ariaLabel]=\"ariaLabel\"\n [buttonPadding]=\"buttonPadding\"\n [iconWidth]=\"iconWidth\"\n [iconHeight]=\"iconHeight\"\n [icon]=\"icon\"\n [svgIcon]=\"svgIcon\"\n [disabled]=\"disabled\"\n [loading]=\"loading\"\n [tooltip]=\"tooltip\"\n [popover]=\"true\"\n [overlay]=\"false\"\n (onShowOverlay)=\"onShowOverlay.emit()\"\n (click)=\"onClick.emit($event)\"\n (focus)=\"onFocus.emit($event)\"\n (blur)=\"onBlur.emit($event)\">\n <
|
13481
|
+
template: "<gipi-button gipi-icon\n [id]=\"id\"\n [name]=\"name\"\n [ariaLabel]=\"ariaLabel\"\n [buttonPadding]=\"buttonPadding\"\n [iconWidth]=\"iconWidth\"\n [iconHeight]=\"iconHeight\"\n [icon]=\"icon\"\n [svgIcon]=\"svgIcon\"\n [disabled]=\"disabled\"\n [loading]=\"loading\"\n [tooltip]=\"tooltip\"\n [popover]=\"true\"\n [overlay]=\"false\"\n [notification]=\"notification\"\n (onShowOverlay)=\"onShowOverlay.emit()\"\n (click)=\"onClick.emit($event)\"\n (focus)=\"onFocus.emit($event)\"\n (blur)=\"onBlur.emit($event)\">\n <ng-content> </ng-content>\n</gipi-button>\n",
|
13526
13482
|
providers: [
|
13527
13483
|
{
|
13528
13484
|
provide: NG_VALUE_ACCESSOR,
|
@@ -13534,7 +13490,7 @@ GIPINotificationComponent = GIPINotificationComponent_1 = __decorate([
|
|
13534
13490
|
'class': 'gipi-notification',
|
13535
13491
|
},
|
13536
13492
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
13537
|
-
styles: [".button-only-icon{padding:4px!important}.button-only-icon .button-content>mat-icon{width:24px!important;height:24px!important}
|
13493
|
+
styles: [".button-only-icon{padding:4px!important}.button-only-icon .button-content>mat-icon{width:24px!important;height:24px!important}"]
|
13538
13494
|
}),
|
13539
13495
|
__metadata("design:paramtypes", [])
|
13540
13496
|
], GIPINotificationComponent);
|
@@ -13682,11 +13638,11 @@ class PasswordUtil {
|
|
13682
13638
|
}
|
13683
13639
|
|
13684
13640
|
var GIPIPasswordRequerimentsComponent_1;
|
13685
|
-
let nextUniqueId$
|
13641
|
+
let nextUniqueId$d = 0;
|
13686
13642
|
let GIPIPasswordRequerimentsComponent = GIPIPasswordRequerimentsComponent_1 = class GIPIPasswordRequerimentsComponent {
|
13687
13643
|
constructor(_changeDetectorRef) {
|
13688
13644
|
this._changeDetectorRef = _changeDetectorRef;
|
13689
|
-
this._name = `gipi-password-requeriments-${nextUniqueId$
|
13645
|
+
this._name = `gipi-password-requeriments-${nextUniqueId$d++}`;
|
13690
13646
|
this.id = this._name;
|
13691
13647
|
this.name = this._name;
|
13692
13648
|
this.disabled = false;
|
@@ -14235,11 +14191,11 @@ GIPIPopoverTarget = __decorate([
|
|
14235
14191
|
], GIPIPopoverTarget);
|
14236
14192
|
|
14237
14193
|
var GIPIRadioGroupComponent_1;
|
14238
|
-
let nextUniqueId$
|
14194
|
+
let nextUniqueId$e = 0;
|
14239
14195
|
let GIPIRadioGroupComponent = GIPIRadioGroupComponent_1 = class GIPIRadioGroupComponent {
|
14240
14196
|
constructor(_changeDetectorRef) {
|
14241
14197
|
this._changeDetectorRef = _changeDetectorRef;
|
14242
|
-
this._name = `gipi-radio-group-${nextUniqueId$
|
14198
|
+
this._name = `gipi-radio-group-${nextUniqueId$e++}`;
|
14243
14199
|
this._enumList = [];
|
14244
14200
|
this.id = this._name;
|
14245
14201
|
this.name = this._name;
|
@@ -14372,169 +14328,756 @@ GIPIRadioGroupComponent = GIPIRadioGroupComponent_1 = __decorate([
|
|
14372
14328
|
__metadata("design:paramtypes", [ChangeDetectorRef])
|
14373
14329
|
], GIPIRadioGroupComponent);
|
14374
14330
|
|
14375
|
-
var
|
14376
|
-
let
|
14377
|
-
|
14378
|
-
|
14379
|
-
this.
|
14380
|
-
this.
|
14381
|
-
this.isButtonSecondary = this._hasHostAttributes('gipi-secondary');
|
14382
|
-
this.required = false;
|
14383
|
-
this.multiple = false;
|
14384
|
-
this.disabled = false;
|
14385
|
-
this.onOptionClick = new EventEmitter();
|
14386
|
-
this.onChange = new EventEmitter();
|
14387
|
-
this.onModelChange = () => { };
|
14388
|
-
this.onModelTouched = () => { };
|
14389
|
-
}
|
14390
|
-
ngOnInit() { }
|
14391
|
-
writeValue(obj) {
|
14392
|
-
this.value = obj;
|
14393
|
-
this._changeDetectorRef.markForCheck();
|
14394
|
-
}
|
14395
|
-
registerOnChange(fn) {
|
14396
|
-
this.onModelChange = fn;
|
14331
|
+
var GIPIRangePageComponent_1;
|
14332
|
+
let nextUniqueId$f = 0;
|
14333
|
+
class RangePage {
|
14334
|
+
constructor(start, end) {
|
14335
|
+
this.start = start;
|
14336
|
+
this.end = end;
|
14397
14337
|
}
|
14398
|
-
|
14399
|
-
this.
|
14338
|
+
getTotalCount() {
|
14339
|
+
return (this.end - this.start) + 1;
|
14400
14340
|
}
|
14401
|
-
|
14402
|
-
this.
|
14403
|
-
this._changeDetectorRef.markForCheck();
|
14341
|
+
getRange() {
|
14342
|
+
return Array.from({ length: this.getTotalCount() }, (_, i) => this.start - 1 + i);
|
14404
14343
|
}
|
14405
|
-
|
14406
|
-
|
14344
|
+
}
|
14345
|
+
let GIPIRangePageComponent = GIPIRangePageComponent_1 = class GIPIRangePageComponent {
|
14346
|
+
constructor(elementRef, _changeDetectorRef) {
|
14347
|
+
this.elementRef = elementRef;
|
14348
|
+
this._changeDetectorRef = _changeDetectorRef;
|
14349
|
+
this._name = `gipi-range-page-${nextUniqueId$f++}`;
|
14350
|
+
this._startPage = 1;
|
14351
|
+
this._endPage = 1;
|
14352
|
+
this.id = this._name;
|
14353
|
+
this.name = this._name;
|
14354
|
+
this.label = '';
|
14355
|
+
this.tooltip = '';
|
14356
|
+
this.placeholderStart = '';
|
14357
|
+
this.placeholderEnd = '';
|
14358
|
+
this.help = '';
|
14359
|
+
this._min = 1;
|
14360
|
+
this._max = 100;
|
14361
|
+
this._step = 1;
|
14362
|
+
this._required = false;
|
14363
|
+
this._disabled = false;
|
14364
|
+
this.onChange = (value) => { };
|
14365
|
+
this.onTouched = () => { };
|
14407
14366
|
}
|
14408
|
-
|
14409
|
-
return
|
14367
|
+
get min() {
|
14368
|
+
return NumberUtil.isNumber(this._min) ? this._min : 1;
|
14410
14369
|
}
|
14411
|
-
|
14412
|
-
|
14370
|
+
set min(value) {
|
14371
|
+
this._min = value;
|
14372
|
+
this._initPage();
|
14413
14373
|
}
|
14414
|
-
|
14415
|
-
|
14374
|
+
get max() {
|
14375
|
+
return NumberUtil.isNumber(this._max) ? this._max : 100;
|
14376
|
+
}
|
14377
|
+
set max(value) {
|
14378
|
+
this._max = value;
|
14379
|
+
this._initPage();
|
14380
|
+
}
|
14381
|
+
get step() {
|
14382
|
+
return NumberUtil.isNumber(this._step) ? this._step : 1;
|
14383
|
+
}
|
14384
|
+
set step(value) {
|
14385
|
+
this._step = value;
|
14386
|
+
this._initPage();
|
14387
|
+
}
|
14388
|
+
get required() {
|
14389
|
+
return this._required;
|
14390
|
+
}
|
14391
|
+
set required(value) {
|
14392
|
+
this._required = coerceBooleanProperty(value);
|
14393
|
+
}
|
14394
|
+
get disabled() {
|
14395
|
+
return this._disabled;
|
14396
|
+
}
|
14397
|
+
set disabled(value) {
|
14398
|
+
this._disabled = coerceBooleanProperty(value);
|
14399
|
+
}
|
14400
|
+
get formattedValue() {
|
14401
|
+
return '';
|
14402
|
+
}
|
14403
|
+
ngOnInit() {
|
14404
|
+
this._initPage();
|
14405
|
+
}
|
14406
|
+
ngOnDestroy() { }
|
14407
|
+
writeValue(value) {
|
14408
|
+
if (!ObjectUtil.isNull(value)) {
|
14409
|
+
this._startPage = value.start || this._startPage;
|
14410
|
+
this._endPage = value.end || this._endPage;
|
14411
|
+
}
|
14412
|
+
this._changeDetectorRef.detectChanges();
|
14413
|
+
}
|
14414
|
+
registerOnChange(fn) {
|
14415
|
+
this.onChange = fn;
|
14416
|
+
}
|
14417
|
+
registerOnTouched(fn) {
|
14418
|
+
this.onTouched = fn;
|
14419
|
+
}
|
14420
|
+
setDisabledState(isDisabled) {
|
14421
|
+
this.disabled = isDisabled;
|
14422
|
+
this._changeDetectorRef.markForCheck();
|
14423
|
+
}
|
14424
|
+
_initPage() {
|
14425
|
+
this._startPage = this.min;
|
14426
|
+
this._endPage = Math.min(this._startPage + this.step - 1, this.max);
|
14427
|
+
}
|
14428
|
+
updateEndPage() {
|
14429
|
+
if (this.disabled) {
|
14416
14430
|
return;
|
14417
14431
|
}
|
14418
|
-
if (this.
|
14419
|
-
|
14420
|
-
this.removeOption(option);
|
14421
|
-
}
|
14422
|
-
else {
|
14423
|
-
this.value = [...(this.value || []), this.getOptionValue(option)];
|
14424
|
-
}
|
14425
|
-
this.onModelChange(this.value);
|
14426
|
-
this.onChange.emit({
|
14427
|
-
originalEvent: event,
|
14428
|
-
value: this.value
|
14429
|
-
});
|
14432
|
+
if (this._startPage < this.min) {
|
14433
|
+
this._startPage = this.min;
|
14430
14434
|
}
|
14431
|
-
else {
|
14432
|
-
|
14433
|
-
if (this.value !== value) {
|
14434
|
-
this.value = this.getOptionValue(option);
|
14435
|
-
this.onModelChange(this.value);
|
14436
|
-
this.onChange.emit({
|
14437
|
-
originalEvent: event,
|
14438
|
-
value: this.value
|
14439
|
-
});
|
14440
|
-
}
|
14435
|
+
else if (this._startPage > this.max) {
|
14436
|
+
this._startPage = this.max;
|
14441
14437
|
}
|
14442
|
-
this.
|
14443
|
-
|
14444
|
-
|
14445
|
-
|
14446
|
-
|
14438
|
+
if (this._endPage < this._startPage) {
|
14439
|
+
this._endPage = this._startPage;
|
14440
|
+
}
|
14441
|
+
else if (this._endPage > (this._startPage + (this.step - 1))) {
|
14442
|
+
this._endPage = Math.min(this._startPage + this.step - 1, this.max);
|
14443
|
+
}
|
14444
|
+
this._propagateChange();
|
14447
14445
|
}
|
14448
|
-
|
14449
|
-
|
14450
|
-
|
14451
|
-
if (this.multiple) {
|
14452
|
-
if (this.value && Array.isArray(this.value)) {
|
14453
|
-
for (const val of this.value) {
|
14454
|
-
if (ObjectUtil.equals(val, optionValue, this.dataKey)) {
|
14455
|
-
selected = true;
|
14456
|
-
break;
|
14457
|
-
}
|
14458
|
-
}
|
14459
|
-
}
|
14446
|
+
updateStartPage() {
|
14447
|
+
if (this.disabled) {
|
14448
|
+
return;
|
14460
14449
|
}
|
14461
|
-
|
14462
|
-
|
14450
|
+
if (this._endPage > this.max) {
|
14451
|
+
this._endPage = this.max;
|
14463
14452
|
}
|
14464
|
-
|
14453
|
+
else if (this._endPage > this.max) {
|
14454
|
+
this._endPage = this.max;
|
14455
|
+
}
|
14456
|
+
if (this._startPage > this._endPage) {
|
14457
|
+
this._startPage = this._endPage;
|
14458
|
+
}
|
14459
|
+
else if (this._startPage < (this._endPage - (this.step + 1))) {
|
14460
|
+
this._startPage = Math.max(this._endPage - this.step + 1, this.min);
|
14461
|
+
}
|
14462
|
+
this._propagateChange();
|
14465
14463
|
}
|
14466
|
-
|
14467
|
-
|
14464
|
+
previous() {
|
14465
|
+
if (this.disabled) {
|
14466
|
+
return;
|
14467
|
+
}
|
14468
|
+
const newStartPage = Math.max(this._startPage - this.step + 1, this.min);
|
14469
|
+
let newEndPage = Math.min(newStartPage + this.step - 1, this.max);
|
14470
|
+
if (newEndPage >= this.min) {
|
14471
|
+
this._startPage = newStartPage;
|
14472
|
+
this._endPage = newEndPage;
|
14473
|
+
this._propagateChange();
|
14474
|
+
}
|
14468
14475
|
}
|
14469
|
-
|
14470
|
-
this.
|
14476
|
+
next() {
|
14477
|
+
if (this.disabled) {
|
14478
|
+
return;
|
14479
|
+
}
|
14480
|
+
// const newStartPage = Math.min(this._startPage + this.step, this.max - this.step + 1);
|
14481
|
+
// let newEndPage = newStartPage + this.step - 1;
|
14482
|
+
const newStartPage = Math.min(this._startPage + this.step, this.max);
|
14483
|
+
let newEndPage = Math.min(newStartPage + this.step - 1, this.max);
|
14484
|
+
if ((newStartPage === this.max) || (newEndPage > this.max)) {
|
14485
|
+
newEndPage = newStartPage;
|
14486
|
+
}
|
14487
|
+
if (newEndPage <= this.max) {
|
14488
|
+
this._startPage = newStartPage;
|
14489
|
+
this._endPage = newEndPage;
|
14490
|
+
this._propagateChange();
|
14491
|
+
}
|
14471
14492
|
}
|
14472
|
-
|
14473
|
-
|
14493
|
+
selectText(input) {
|
14494
|
+
if (this.disabled || !input) {
|
14495
|
+
return;
|
14496
|
+
}
|
14497
|
+
setTimeout(() => input.select(), 0);
|
14474
14498
|
}
|
14475
|
-
|
14476
|
-
|
14499
|
+
_propagateChange() {
|
14500
|
+
this.onChange(new RangePage(this._startPage, this._endPage));
|
14501
|
+
this.onTouched();
|
14477
14502
|
}
|
14478
14503
|
};
|
14479
|
-
|
14504
|
+
GIPIRangePageComponent.ctorParameters = () => [
|
14480
14505
|
{ type: ElementRef },
|
14481
14506
|
{ type: ChangeDetectorRef }
|
14482
14507
|
];
|
14483
|
-
__decorate([
|
14484
|
-
Input(),
|
14485
|
-
__metadata("design:type", Object)
|
14486
|
-
], GIPISelectButtonComponent.prototype, "id", void 0);
|
14487
14508
|
__decorate([
|
14488
14509
|
Input(),
|
14489
14510
|
__metadata("design:type", String)
|
14490
|
-
],
|
14511
|
+
], GIPIRangePageComponent.prototype, "id", void 0);
|
14491
14512
|
__decorate([
|
14492
14513
|
Input(),
|
14493
14514
|
__metadata("design:type", String)
|
14494
|
-
],
|
14515
|
+
], GIPIRangePageComponent.prototype, "name", void 0);
|
14495
14516
|
__decorate([
|
14496
14517
|
Input(),
|
14497
14518
|
__metadata("design:type", String)
|
14498
|
-
],
|
14519
|
+
], GIPIRangePageComponent.prototype, "label", void 0);
|
14499
14520
|
__decorate([
|
14500
14521
|
Input(),
|
14501
|
-
__metadata("design:type",
|
14502
|
-
],
|
14522
|
+
__metadata("design:type", String)
|
14523
|
+
], GIPIRangePageComponent.prototype, "tooltip", void 0);
|
14503
14524
|
__decorate([
|
14504
14525
|
Input(),
|
14505
|
-
__metadata("design:type",
|
14506
|
-
],
|
14526
|
+
__metadata("design:type", String)
|
14527
|
+
], GIPIRangePageComponent.prototype, "placeholderStart", void 0);
|
14507
14528
|
__decorate([
|
14508
14529
|
Input(),
|
14509
14530
|
__metadata("design:type", String)
|
14510
|
-
],
|
14531
|
+
], GIPIRangePageComponent.prototype, "placeholderEnd", void 0);
|
14511
14532
|
__decorate([
|
14512
14533
|
Input(),
|
14513
14534
|
__metadata("design:type", String)
|
14514
|
-
],
|
14535
|
+
], GIPIRangePageComponent.prototype, "help", void 0);
|
14515
14536
|
__decorate([
|
14516
14537
|
Input(),
|
14517
|
-
__metadata("design:type",
|
14518
|
-
|
14538
|
+
__metadata("design:type", Number),
|
14539
|
+
__metadata("design:paramtypes", [Number])
|
14540
|
+
], GIPIRangePageComponent.prototype, "min", null);
|
14519
14541
|
__decorate([
|
14520
14542
|
Input(),
|
14521
|
-
__metadata("design:type",
|
14522
|
-
|
14543
|
+
__metadata("design:type", Number),
|
14544
|
+
__metadata("design:paramtypes", [Number])
|
14545
|
+
], GIPIRangePageComponent.prototype, "max", null);
|
14523
14546
|
__decorate([
|
14524
14547
|
Input(),
|
14525
|
-
__metadata("design:type",
|
14526
|
-
|
14548
|
+
__metadata("design:type", Number),
|
14549
|
+
__metadata("design:paramtypes", [Number])
|
14550
|
+
], GIPIRangePageComponent.prototype, "step", null);
|
14527
14551
|
__decorate([
|
14528
|
-
|
14529
|
-
__metadata("design:type",
|
14530
|
-
|
14552
|
+
Input(),
|
14553
|
+
__metadata("design:type", Boolean),
|
14554
|
+
__metadata("design:paramtypes", [Boolean])
|
14555
|
+
], GIPIRangePageComponent.prototype, "required", null);
|
14531
14556
|
__decorate([
|
14532
|
-
|
14533
|
-
__metadata("design:type",
|
14534
|
-
|
14535
|
-
|
14557
|
+
Input(),
|
14558
|
+
__metadata("design:type", Boolean),
|
14559
|
+
__metadata("design:paramtypes", [Boolean])
|
14560
|
+
], GIPIRangePageComponent.prototype, "disabled", null);
|
14561
|
+
GIPIRangePageComponent = GIPIRangePageComponent_1 = __decorate([
|
14536
14562
|
Component({
|
14537
|
-
selector:
|
14563
|
+
selector: 'gipi-range-page',
|
14564
|
+
template: "<label *ngIf=\"label\"\n class=\"input-label\"\n [attr.for]=\"id\">\n {{ label }}\n <span *ngIf=\"required\"> * </span>\n <gipi-helpful-tip *ngIf=\"tooltip && label\"\n [tooltip]=\"tooltip\">\n </gipi-helpful-tip>\n</label>\n\n<div class=\"input-content\">\n <div class=\"prefix\"\n [class.disabled]=\"disabled\"\n (click)=\"previous()\">\n <mat-icon>chevron_left</mat-icon>\n </div>\n <input #startInput\n matInput\n class=\"input-element\"\n type=\"number\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"10\"\n [placeholder]=\"placeholderStart\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"false\"\n [autocomplete]=\"'off'\"\n [autofocus]=\"false\"\n [(ngModel)]=\"_startPage\"\n (keyup)=\"updateEndPage()\"\n (focus)=\"selectText(startInput)\"\n (click)=\"selectText(startInput)\" />\n <div class=\"infix\">\n a\n </div>\n <input #endInput\n matInput\n class=\"input-element\"\n type=\"number\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [min]=\"_startPage\"\n [max]=\"max\"\n [maxlength]=\"10\"\n [placeholder]=\"placeholderEnd\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"false\"\n [autocomplete]=\"'off'\"\n [autofocus]=\"false\"\n [(ngModel)]=\"_endPage\"\n (keyup)=\"updateStartPage()\"\n (focus)=\"selectText(endInput)\"\n (click)=\"selectText(endInput)\" />\n <div class=\"suffix\"\n [class.disabled]=\"disabled\"\n (click)=\"next()\">\n <mat-icon>chevron_right</mat-icon>\n </div>\n</div>\n\n<small *ngIf=\"help\"\n class=\"input-help\">\n {{ help }}\n</small>",
|
14565
|
+
providers: [
|
14566
|
+
{
|
14567
|
+
provide: NG_VALUE_ACCESSOR,
|
14568
|
+
useExisting: forwardRef(() => GIPIRangePageComponent_1),
|
14569
|
+
multi: true
|
14570
|
+
},
|
14571
|
+
],
|
14572
|
+
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}:host .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0;text-align:center;margin:0!important}:host .input-content .input-element::-webkit-inner-spin-button,:host .input-content .input-element::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;opacity:0}:host .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}:host .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}:host .input-content .input-element:disabled{cursor:not-allowed}:host .input-content .infix,:host .input-content .prefix,:host .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;padding-inline:.8rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:.2s;background-color:#e0313e}:host .input-content .infix>mat-icon,:host .input-content .prefix>mat-icon,:host .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#fff}:host .input-content .infix:not(.infix):not(.disabled):hover,:host .input-content .prefix:not(.infix):not(.disabled):hover,:host .input-content .suffix:not(.infix):not(.disabled):hover{background-color:#cc2d38}:host .input-content .infix:not(.infix):not(.disabled):active,:host .input-content .prefix:not(.infix):not(.disabled):active,:host .input-content .suffix:not(.infix):not(.disabled):active{background-color:#9f232c}:host .input-content .prefix.disabled,:host .input-content .suffix.disabled{background-color:#d1d2d4}:host .input-content .prefix.disabled>mat-icon,:host .input-content .suffix.disabled>mat-icon{color:#9a9da2}:host .input-content .prefix{border-right:1px solid rgba(0,0,0,.12);border-radius:.6rem 0 0 .6rem;cursor:pointer}:host .input-content .infix{width:1rem;padding:0;background-color:transparent}:host .input-content .suffix{border-left:1px solid rgba(0,0,0,.12);border-radius:0 .6rem .6rem 0;cursor:pointer}:host .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
14573
|
+
}),
|
14574
|
+
__metadata("design:paramtypes", [ElementRef,
|
14575
|
+
ChangeDetectorRef])
|
14576
|
+
], GIPIRangePageComponent);
|
14577
|
+
|
14578
|
+
var GIPIRangeSliderComponent_1;
|
14579
|
+
let nextUniqueId$g = 0;
|
14580
|
+
let GIPIRangeSliderComponent = GIPIRangeSliderComponent_1 = class GIPIRangeSliderComponent {
|
14581
|
+
constructor(elementRef, _changeDetectorRef) {
|
14582
|
+
this.elementRef = elementRef;
|
14583
|
+
this._changeDetectorRef = _changeDetectorRef;
|
14584
|
+
this._name = `gipi-range-slider-${nextUniqueId$g++}`;
|
14585
|
+
this.id = this._name;
|
14586
|
+
this.name = this._name;
|
14587
|
+
this.label = '';
|
14588
|
+
this.help = '';
|
14589
|
+
this.min = 1;
|
14590
|
+
this.max = 100;
|
14591
|
+
this._maxRange = 5;
|
14592
|
+
this._fromValue = 1;
|
14593
|
+
this._toValue = 1;
|
14594
|
+
this._step = 1;
|
14595
|
+
this._disabled = false;
|
14596
|
+
this._required = false;
|
14597
|
+
this.onChange = () => { };
|
14598
|
+
this.onTouched = () => { };
|
14599
|
+
}
|
14600
|
+
get maxRange() {
|
14601
|
+
return this._maxRange || 5;
|
14602
|
+
}
|
14603
|
+
set maxRange(value) {
|
14604
|
+
if (!value || (value <= 0)) {
|
14605
|
+
throw new Error('Minimum value for "maxRange" must be 1');
|
14606
|
+
}
|
14607
|
+
this._maxRange = value || 5;
|
14608
|
+
}
|
14609
|
+
get fromValue() {
|
14610
|
+
return this._fromValue || 1;
|
14611
|
+
}
|
14612
|
+
set fromValue(value) {
|
14613
|
+
if (!value || (value <= 0)) {
|
14614
|
+
throw new Error('Minimum value for "from" must be 1');
|
14615
|
+
}
|
14616
|
+
this._fromValue = value || 1;
|
14617
|
+
}
|
14618
|
+
get toValue() {
|
14619
|
+
return this._toValue || 1;
|
14620
|
+
}
|
14621
|
+
set toValue(value) {
|
14622
|
+
if (!value || (value <= 0)) {
|
14623
|
+
throw new Error('Minimum value for "to" must be 1');
|
14624
|
+
}
|
14625
|
+
this._toValue = value || 1;
|
14626
|
+
}
|
14627
|
+
get step() {
|
14628
|
+
return this._step || 1;
|
14629
|
+
}
|
14630
|
+
set step(value) {
|
14631
|
+
if (!value || (value <= 0)) {
|
14632
|
+
throw new Error('Minimum value for "step" must be 1');
|
14633
|
+
}
|
14634
|
+
this._step = value || 1;
|
14635
|
+
}
|
14636
|
+
get disabled() {
|
14637
|
+
return this._disabled;
|
14638
|
+
}
|
14639
|
+
set disabled(value) {
|
14640
|
+
this._disabled = coerceBooleanProperty(value);
|
14641
|
+
}
|
14642
|
+
get required() {
|
14643
|
+
return this._required;
|
14644
|
+
}
|
14645
|
+
set required(value) {
|
14646
|
+
this._required = coerceBooleanProperty(value);
|
14647
|
+
}
|
14648
|
+
ngOnInit() { }
|
14649
|
+
ngAfterViewInit() {
|
14650
|
+
this._fillSlider();
|
14651
|
+
this._setToggleAccessible();
|
14652
|
+
}
|
14653
|
+
ngOnDestroy() { }
|
14654
|
+
writeValue(value) {
|
14655
|
+
if (value) {
|
14656
|
+
this.fromValue = value.from;
|
14657
|
+
this.toValue = value.to;
|
14658
|
+
if (this.fromSlider && this.toSlider) {
|
14659
|
+
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
14660
|
+
this.toSlider.nativeElement.value = this.toValue.toString();
|
14661
|
+
this._fillSlider();
|
14662
|
+
this._setToggleAccessible();
|
14663
|
+
}
|
14664
|
+
}
|
14665
|
+
}
|
14666
|
+
registerOnChange(fn) {
|
14667
|
+
this.onChange = fn;
|
14668
|
+
}
|
14669
|
+
registerOnTouched(fn) {
|
14670
|
+
this.onTouched = fn;
|
14671
|
+
}
|
14672
|
+
setDisabledState(isDisabled) {
|
14673
|
+
this.disabled = isDisabled;
|
14674
|
+
this._changeDetectorRef.markForCheck();
|
14675
|
+
}
|
14676
|
+
controlFromInput(isByNgModel) {
|
14677
|
+
let [from, to] = isByNgModel ? [this.fromValue, this.toValue] : this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
14678
|
+
from = this._roundToStep(from);
|
14679
|
+
to = this._roundToStep(to);
|
14680
|
+
// if ((to - from) > this.maxRange) {
|
14681
|
+
// from = to - this.maxRange;
|
14682
|
+
// }
|
14683
|
+
this._fillSlider();
|
14684
|
+
this._setToggleAccessible();
|
14685
|
+
if (from > to) {
|
14686
|
+
this.fromValue = to;
|
14687
|
+
}
|
14688
|
+
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
14689
|
+
this._notifyValueChange();
|
14690
|
+
}
|
14691
|
+
controlToInput(isByNgModel) {
|
14692
|
+
let [from, to] = isByNgModel ? [this.fromValue, this.toValue] : this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
14693
|
+
from = this._roundToStep(from);
|
14694
|
+
to = this._roundToStep(to);
|
14695
|
+
// if ((to - from) > this.maxRange) {
|
14696
|
+
// to = from + this.maxRange;
|
14697
|
+
// }
|
14698
|
+
this._fillSlider();
|
14699
|
+
this._setToggleAccessible();
|
14700
|
+
if (from <= to) {
|
14701
|
+
this.toValue = to;
|
14702
|
+
}
|
14703
|
+
else {
|
14704
|
+
this.toValue = from;
|
14705
|
+
}
|
14706
|
+
this.toSlider.nativeElement.value = this.toValue.toString();
|
14707
|
+
this._notifyValueChange();
|
14708
|
+
}
|
14709
|
+
controlFromSlider() {
|
14710
|
+
let [from, to] = this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
14711
|
+
from = this._roundToStep(from);
|
14712
|
+
to = this._roundToStep(to);
|
14713
|
+
if ((to - from) > this.maxRange) {
|
14714
|
+
from = to - this.maxRange;
|
14715
|
+
}
|
14716
|
+
this._fillSlider();
|
14717
|
+
this._setToggleAccessible();
|
14718
|
+
if ((to - from) === this.maxRange) {
|
14719
|
+
let [from, to] = this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
14720
|
+
from = this._roundToStep(from);
|
14721
|
+
to = this._roundToStep(to);
|
14722
|
+
if ((to - from) > this.maxRange) {
|
14723
|
+
to = from + this.maxRange;
|
14724
|
+
}
|
14725
|
+
this._fillSlider();
|
14726
|
+
if (from <= to) {
|
14727
|
+
this.toValue = to;
|
14728
|
+
}
|
14729
|
+
else {
|
14730
|
+
this.toValue = from;
|
14731
|
+
}
|
14732
|
+
this.toSlider.nativeElement.value = this.toValue.toString();
|
14733
|
+
}
|
14734
|
+
if (from >= to) {
|
14735
|
+
this.fromValue = to;
|
14736
|
+
}
|
14737
|
+
else {
|
14738
|
+
this.fromValue = from;
|
14739
|
+
}
|
14740
|
+
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
14741
|
+
this._notifyValueChange();
|
14742
|
+
}
|
14743
|
+
controlToSlider() {
|
14744
|
+
let [from, to] = this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
14745
|
+
from = this._roundToStep(from);
|
14746
|
+
to = this._roundToStep(to);
|
14747
|
+
if ((to - from) > this.maxRange) {
|
14748
|
+
to = from + this.maxRange;
|
14749
|
+
}
|
14750
|
+
this._fillSlider();
|
14751
|
+
this._setToggleAccessible();
|
14752
|
+
if ((to - from) === this.maxRange) {
|
14753
|
+
let [from, to] = this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
14754
|
+
from = this._roundToStep(from);
|
14755
|
+
to = this._roundToStep(to);
|
14756
|
+
if ((to - from) > this.maxRange) {
|
14757
|
+
from = to - this.maxRange;
|
14758
|
+
}
|
14759
|
+
this._fillSlider();
|
14760
|
+
if (from >= to) {
|
14761
|
+
this.fromValue = to;
|
14762
|
+
}
|
14763
|
+
else {
|
14764
|
+
this.fromValue = from;
|
14765
|
+
}
|
14766
|
+
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
14767
|
+
}
|
14768
|
+
if (from <= to) {
|
14769
|
+
this.toValue = to;
|
14770
|
+
}
|
14771
|
+
else {
|
14772
|
+
this.toValue = from;
|
14773
|
+
}
|
14774
|
+
this.toSlider.nativeElement.value = this.toValue.toString();
|
14775
|
+
this._notifyValueChange();
|
14776
|
+
}
|
14777
|
+
_getParsed(currentFrom, currentTo) {
|
14778
|
+
const from = parseInt(currentFrom.value, 10);
|
14779
|
+
const to = parseInt(currentTo.value, 10);
|
14780
|
+
return [from, to];
|
14781
|
+
}
|
14782
|
+
_fillSlider() {
|
14783
|
+
const fromSliderEl = this.fromSlider.nativeElement;
|
14784
|
+
const toSliderEl = this.toSlider.nativeElement;
|
14785
|
+
const rangeDistance = Number(toSliderEl.max) - Number(toSliderEl.min);
|
14786
|
+
const fromPosition = (this.fromValue - Number(fromSliderEl.min));
|
14787
|
+
const toPosition = (this.toValue - Number(toSliderEl.min));
|
14788
|
+
const sliderColor = '#e0e1e2';
|
14789
|
+
const rangeColor = '#f1a0a6';
|
14790
|
+
toSliderEl.style.background = `linear-gradient(
|
14791
|
+
to right,
|
14792
|
+
${sliderColor} 0%,
|
14793
|
+
${sliderColor} ${(fromPosition) / (rangeDistance) * 100}%,
|
14794
|
+
${rangeColor} ${((fromPosition) / (rangeDistance)) * 100}%,
|
14795
|
+
${rangeColor} ${(toPosition) / (rangeDistance) * 100}%,
|
14796
|
+
${sliderColor} ${(toPosition) / (rangeDistance) * 100}%,
|
14797
|
+
${sliderColor} 100%)`;
|
14798
|
+
}
|
14799
|
+
_setToggleAccessible() {
|
14800
|
+
const fromInput = this.fromSlider.nativeElement;
|
14801
|
+
const toInput = this.toSlider.nativeElement;
|
14802
|
+
const fromValue = parseInt(fromInput.value, 10);
|
14803
|
+
const toValue = parseInt(toInput.value, 10);
|
14804
|
+
if (fromValue <= parseInt(fromInput.min, 10) && toValue <= parseInt(toInput.min, 10)) {
|
14805
|
+
// Ambos estão no mínimo
|
14806
|
+
fromInput.style.zIndex = '1';
|
14807
|
+
toInput.style.zIndex = '2';
|
14808
|
+
}
|
14809
|
+
else if (fromValue >= parseInt(fromInput.max, 10) && toValue >= parseInt(toInput.max, 10)) {
|
14810
|
+
// Ambos estão no máximo
|
14811
|
+
fromInput.style.zIndex = '2';
|
14812
|
+
toInput.style.zIndex = '1';
|
14813
|
+
}
|
14814
|
+
else {
|
14815
|
+
// Caso geral
|
14816
|
+
fromInput.style.zIndex = '2';
|
14817
|
+
toInput.style.zIndex = '1';
|
14818
|
+
}
|
14819
|
+
}
|
14820
|
+
_roundToStep(value) {
|
14821
|
+
return Math.round(value / this.step) * this.step;
|
14822
|
+
}
|
14823
|
+
_notifyValueChange() {
|
14824
|
+
this.onChange({ from: this.fromValue, to: this.toValue });
|
14825
|
+
}
|
14826
|
+
onBlur() {
|
14827
|
+
this.onTouched();
|
14828
|
+
}
|
14829
|
+
};
|
14830
|
+
GIPIRangeSliderComponent.ctorParameters = () => [
|
14831
|
+
{ type: ElementRef },
|
14832
|
+
{ type: ChangeDetectorRef }
|
14833
|
+
];
|
14834
|
+
__decorate([
|
14835
|
+
ViewChild('fromSlider', { static: false }),
|
14836
|
+
__metadata("design:type", ElementRef)
|
14837
|
+
], GIPIRangeSliderComponent.prototype, "fromSlider", void 0);
|
14838
|
+
__decorate([
|
14839
|
+
ViewChild('toSlider', { static: false }),
|
14840
|
+
__metadata("design:type", ElementRef)
|
14841
|
+
], GIPIRangeSliderComponent.prototype, "toSlider", void 0);
|
14842
|
+
__decorate([
|
14843
|
+
Input(),
|
14844
|
+
__metadata("design:type", String)
|
14845
|
+
], GIPIRangeSliderComponent.prototype, "id", void 0);
|
14846
|
+
__decorate([
|
14847
|
+
Input(),
|
14848
|
+
__metadata("design:type", String)
|
14849
|
+
], GIPIRangeSliderComponent.prototype, "name", void 0);
|
14850
|
+
__decorate([
|
14851
|
+
Input(),
|
14852
|
+
__metadata("design:type", String)
|
14853
|
+
], GIPIRangeSliderComponent.prototype, "label", void 0);
|
14854
|
+
__decorate([
|
14855
|
+
Input(),
|
14856
|
+
__metadata("design:type", String)
|
14857
|
+
], GIPIRangeSliderComponent.prototype, "help", void 0);
|
14858
|
+
__decorate([
|
14859
|
+
Input(),
|
14860
|
+
__metadata("design:type", Number)
|
14861
|
+
], GIPIRangeSliderComponent.prototype, "min", void 0);
|
14862
|
+
__decorate([
|
14863
|
+
Input(),
|
14864
|
+
__metadata("design:type", Number)
|
14865
|
+
], GIPIRangeSliderComponent.prototype, "max", void 0);
|
14866
|
+
__decorate([
|
14867
|
+
Input(),
|
14868
|
+
__metadata("design:type", Number),
|
14869
|
+
__metadata("design:paramtypes", [Number])
|
14870
|
+
], GIPIRangeSliderComponent.prototype, "maxRange", null);
|
14871
|
+
__decorate([
|
14872
|
+
Input('from'),
|
14873
|
+
__metadata("design:type", Number),
|
14874
|
+
__metadata("design:paramtypes", [Number])
|
14875
|
+
], GIPIRangeSliderComponent.prototype, "fromValue", null);
|
14876
|
+
__decorate([
|
14877
|
+
Input('to'),
|
14878
|
+
__metadata("design:type", Number),
|
14879
|
+
__metadata("design:paramtypes", [Number])
|
14880
|
+
], GIPIRangeSliderComponent.prototype, "toValue", null);
|
14881
|
+
__decorate([
|
14882
|
+
Input(),
|
14883
|
+
__metadata("design:type", Number),
|
14884
|
+
__metadata("design:paramtypes", [Number])
|
14885
|
+
], GIPIRangeSliderComponent.prototype, "step", null);
|
14886
|
+
__decorate([
|
14887
|
+
Input(),
|
14888
|
+
__metadata("design:type", Boolean),
|
14889
|
+
__metadata("design:paramtypes", [Boolean])
|
14890
|
+
], GIPIRangeSliderComponent.prototype, "disabled", null);
|
14891
|
+
__decorate([
|
14892
|
+
Input(),
|
14893
|
+
__metadata("design:type", Boolean),
|
14894
|
+
__metadata("design:paramtypes", [Boolean])
|
14895
|
+
], GIPIRangeSliderComponent.prototype, "required", null);
|
14896
|
+
GIPIRangeSliderComponent = GIPIRangeSliderComponent_1 = __decorate([
|
14897
|
+
Component({
|
14898
|
+
selector: 'gipi-range-slider',
|
14899
|
+
exportAs: 'gipiRangeSlider',
|
14900
|
+
template: "<label *ngIf=\"label\"\n class=\"input-label\"\n [attr.for]=\"id\">\n {{ label }}\n <span *ngIf=\"required\"> * </span>\n</label>\n\n<div class=\"slider-wrapper\">\n <!-- <input type=\"number\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [(ngModel)]=\"fromValue\"\n (ngModelChange)=\"controlFromInput(true)\"\n (input)=\"controlFromInput(false)\"\n (blur)=\"onBlur()\" /> -->\n <span class=\"value min\">\n {{ min }}\n </span>\n <div class=\"sliders-control\">\n <input #fromSlider\n id=\"fromSlider\"\n type=\"range\"\n class=\"from-value\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"fromValue\"\n (input)=\"controlFromSlider()\"\n (mouseup)=\"controlFromSlider()\"\n (blur)=\"onBlur()\" />\n <input #toSlider\n id=\"toSlider\"\n type=\"range\"\n class=\"to-value\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"toValue\"\n (input)=\"controlToSlider()\"\n (mouseup)=\"controlToSlider()\"\n (blur)=\"onBlur()\" />\n </div>\n <span class=\"value max\">\n {{ max }}\n </span>\n <!-- <input type=\"number\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [(ngModel)]=\"toValue\"\n (ngModelChange)=\"controlToInput(true)\"\n (input)=\"controlToInput(false)\"\n (blur)=\"onBlur()\" /> -->\n</div>\n<span class=\"value min\">\n {{ fromValue }} - {{ toValue }}\n</span>\n<small *ngIf=\"help\"\n class=\"input-help\">\n {{ help }}\n</small>",
|
14901
|
+
providers: [
|
14902
|
+
{
|
14903
|
+
provide: NG_VALUE_ACCESSOR,
|
14904
|
+
useExisting: forwardRef(() => GIPIRangeSliderComponent_1),
|
14905
|
+
multi: true
|
14906
|
+
},
|
14907
|
+
],
|
14908
|
+
host: {
|
14909
|
+
'class': 'gipi-range-slider',
|
14910
|
+
},
|
14911
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
14912
|
+
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .slider-wrapper{display:flex;align-items:center;justify-content:space-between;gap:1.6rem}:host .slider-wrapper>input{display:flex;font-family:inherit;font-size:inherit;color:inherit;text-align:center;padding:.75rem .8rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem;outline:0}:host .sliders-control{display:flex;align-items:center;justify-content:center;padding:2rem;position:relative;flex:1}:host .from-value,:host .to-value{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.6rem;border-radius:.4rem;width:100%;position:absolute;background-color:#e0e1e2;pointer-events:none;outline:0}:host .from-value::-webkit-slider-thumb,:host .to-value::-webkit-slider-thumb{-webkit-appearance:none;display:block;width:1.4rem;height:1.4rem;border-radius:50%;background-color:#e0313e;pointer-events:all;box-shadow:0 .5px 0 0 rgba(0,0,0,.08),0 1px 1px 0 rgba(0,0,0,.14);cursor:-webkit-grab;cursor:grab;outline:0}:host .from-value::-webkit-slider-thumb:hover,:host .to-value::-webkit-slider-thumb:hover{background-color:#cc2d38}:host .from-value::-webkit-slider-thumb:active,:host .to-value::-webkit-slider-thumb:active{box-shadow:inset 0 0 3px #e0313e,0 0 9px #e0313e;-webkit-box-shadow:inset 0 0 3px #e0313e,0 0 9px #e0313e;cursor:-webkit-grabbing;cursor:grabbing}:host input[type=number]{border:1px solid rgba(0,0,0,.12);color:#131313;width:50px;height:30px;font-size:20px;outline:0}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;opacity:0}:host #fromSlider{height:0;z-index:1}"]
|
14913
|
+
}),
|
14914
|
+
__metadata("design:paramtypes", [ElementRef,
|
14915
|
+
ChangeDetectorRef])
|
14916
|
+
], GIPIRangeSliderComponent);
|
14917
|
+
|
14918
|
+
var GIPISelectButtonComponent_1;
|
14919
|
+
let GIPISelectButtonComponent = GIPISelectButtonComponent_1 = class GIPISelectButtonComponent {
|
14920
|
+
constructor(_elementRef, _changeDetectorRef) {
|
14921
|
+
this._elementRef = _elementRef;
|
14922
|
+
this._changeDetectorRef = _changeDetectorRef;
|
14923
|
+
this.isButtonPrimary = this._hasHostAttributes('gipi-primary');
|
14924
|
+
this.isButtonSecondary = this._hasHostAttributes('gipi-secondary');
|
14925
|
+
this.required = false;
|
14926
|
+
this.multiple = false;
|
14927
|
+
this.disabled = false;
|
14928
|
+
this.onOptionClick = new EventEmitter();
|
14929
|
+
this.onChange = new EventEmitter();
|
14930
|
+
this.onModelChange = () => { };
|
14931
|
+
this.onModelTouched = () => { };
|
14932
|
+
}
|
14933
|
+
ngOnInit() { }
|
14934
|
+
writeValue(obj) {
|
14935
|
+
this.value = obj;
|
14936
|
+
this._changeDetectorRef.markForCheck();
|
14937
|
+
}
|
14938
|
+
registerOnChange(fn) {
|
14939
|
+
this.onModelChange = fn;
|
14940
|
+
}
|
14941
|
+
registerOnTouched(fn) {
|
14942
|
+
this.onModelTouched = fn;
|
14943
|
+
}
|
14944
|
+
setDisabledState(isDisabled) {
|
14945
|
+
this.disabled = isDisabled;
|
14946
|
+
this._changeDetectorRef.markForCheck();
|
14947
|
+
}
|
14948
|
+
getOptionLabel(option) {
|
14949
|
+
return this.optionLabel ? ObjectUtil.resolveFieldData(option, this.optionLabel) : option.label != undefined ? option.label : option;
|
14950
|
+
}
|
14951
|
+
getOptionValue(option) {
|
14952
|
+
return this.optionValue ? ObjectUtil.resolveFieldData(option, this.optionValue) : this.optionLabel || option.value === undefined ? option : option.value;
|
14953
|
+
}
|
14954
|
+
isOptionDisabled(option) {
|
14955
|
+
return this.optionDisabled ? ObjectUtil.resolveFieldData(option, this.optionDisabled) : option.disabled !== undefined ? option.disabled : false;
|
14956
|
+
}
|
14957
|
+
onItemClick(event, option, index) {
|
14958
|
+
if (this.disabled || this.isOptionDisabled(option)) {
|
14959
|
+
return;
|
14960
|
+
}
|
14961
|
+
if (this.multiple) {
|
14962
|
+
if (this.isSelected(option)) {
|
14963
|
+
this.removeOption(option);
|
14964
|
+
}
|
14965
|
+
else {
|
14966
|
+
this.value = [...(this.value || []), this.getOptionValue(option)];
|
14967
|
+
}
|
14968
|
+
this.onModelChange(this.value);
|
14969
|
+
this.onChange.emit({
|
14970
|
+
originalEvent: event,
|
14971
|
+
value: this.value
|
14972
|
+
});
|
14973
|
+
}
|
14974
|
+
else {
|
14975
|
+
const value = this.getOptionValue(option);
|
14976
|
+
if (this.value !== value) {
|
14977
|
+
this.value = this.getOptionValue(option);
|
14978
|
+
this.onModelChange(this.value);
|
14979
|
+
this.onChange.emit({
|
14980
|
+
originalEvent: event,
|
14981
|
+
value: this.value
|
14982
|
+
});
|
14983
|
+
}
|
14984
|
+
}
|
14985
|
+
this.onOptionClick.emit({
|
14986
|
+
originalEvent: event,
|
14987
|
+
option: option,
|
14988
|
+
index: index
|
14989
|
+
});
|
14990
|
+
}
|
14991
|
+
isSelected(option) {
|
14992
|
+
let selected = false;
|
14993
|
+
const optionValue = this.getOptionValue(option);
|
14994
|
+
if (this.multiple) {
|
14995
|
+
if (this.value && Array.isArray(this.value)) {
|
14996
|
+
for (const val of this.value) {
|
14997
|
+
if (ObjectUtil.equals(val, optionValue, this.dataKey)) {
|
14998
|
+
selected = true;
|
14999
|
+
break;
|
15000
|
+
}
|
15001
|
+
}
|
15002
|
+
}
|
15003
|
+
}
|
15004
|
+
else {
|
15005
|
+
selected = ObjectUtil.equals(this.getOptionValue(option), this.value, this.dataKey);
|
15006
|
+
}
|
15007
|
+
return selected;
|
15008
|
+
}
|
15009
|
+
removeOption(option) {
|
15010
|
+
this.value = this.value.filter(val => !ObjectUtil.equals(val, this.getOptionValue(option), this.dataKey));
|
15011
|
+
}
|
15012
|
+
onBlur() {
|
15013
|
+
this.onModelTouched();
|
15014
|
+
}
|
15015
|
+
_getHostElement() {
|
15016
|
+
return this._elementRef.nativeElement;
|
15017
|
+
}
|
15018
|
+
_hasHostAttributes(...attributes) {
|
15019
|
+
return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));
|
15020
|
+
}
|
15021
|
+
};
|
15022
|
+
GIPISelectButtonComponent.ctorParameters = () => [
|
15023
|
+
{ type: ElementRef },
|
15024
|
+
{ type: ChangeDetectorRef }
|
15025
|
+
];
|
15026
|
+
__decorate([
|
15027
|
+
Input(),
|
15028
|
+
__metadata("design:type", Object)
|
15029
|
+
], GIPISelectButtonComponent.prototype, "id", void 0);
|
15030
|
+
__decorate([
|
15031
|
+
Input(),
|
15032
|
+
__metadata("design:type", String)
|
15033
|
+
], GIPISelectButtonComponent.prototype, "arialLabel", void 0);
|
15034
|
+
__decorate([
|
15035
|
+
Input(),
|
15036
|
+
__metadata("design:type", String)
|
15037
|
+
], GIPISelectButtonComponent.prototype, "dataKey", void 0);
|
15038
|
+
__decorate([
|
15039
|
+
Input(),
|
15040
|
+
__metadata("design:type", String)
|
15041
|
+
], GIPISelectButtonComponent.prototype, "label", void 0);
|
15042
|
+
__decorate([
|
15043
|
+
Input(),
|
15044
|
+
__metadata("design:type", Boolean)
|
15045
|
+
], GIPISelectButtonComponent.prototype, "required", void 0);
|
15046
|
+
__decorate([
|
15047
|
+
Input(),
|
15048
|
+
__metadata("design:type", Array)
|
15049
|
+
], GIPISelectButtonComponent.prototype, "options", void 0);
|
15050
|
+
__decorate([
|
15051
|
+
Input(),
|
15052
|
+
__metadata("design:type", String)
|
15053
|
+
], GIPISelectButtonComponent.prototype, "optionLabel", void 0);
|
15054
|
+
__decorate([
|
15055
|
+
Input(),
|
15056
|
+
__metadata("design:type", String)
|
15057
|
+
], GIPISelectButtonComponent.prototype, "optionValue", void 0);
|
15058
|
+
__decorate([
|
15059
|
+
Input(),
|
15060
|
+
__metadata("design:type", String)
|
15061
|
+
], GIPISelectButtonComponent.prototype, "optionDisabled", void 0);
|
15062
|
+
__decorate([
|
15063
|
+
Input(),
|
15064
|
+
__metadata("design:type", Boolean)
|
15065
|
+
], GIPISelectButtonComponent.prototype, "multiple", void 0);
|
15066
|
+
__decorate([
|
15067
|
+
Input(),
|
15068
|
+
__metadata("design:type", Boolean)
|
15069
|
+
], GIPISelectButtonComponent.prototype, "disabled", void 0);
|
15070
|
+
__decorate([
|
15071
|
+
Output(),
|
15072
|
+
__metadata("design:type", EventEmitter)
|
15073
|
+
], GIPISelectButtonComponent.prototype, "onOptionClick", void 0);
|
15074
|
+
__decorate([
|
15075
|
+
Output(),
|
15076
|
+
__metadata("design:type", EventEmitter)
|
15077
|
+
], GIPISelectButtonComponent.prototype, "onChange", void 0);
|
15078
|
+
GIPISelectButtonComponent = GIPISelectButtonComponent_1 = __decorate([
|
15079
|
+
Component({
|
15080
|
+
selector: `gipi-select-button[gipi-primary], gipi-select-button[gipi-secondary]`,
|
14538
15081
|
exportAs: 'gipiSelectButton',
|
14539
15082
|
template: "<div class=\"select-button-content\"\n [attr.id]=\"id\"\n [attr.aria-label]=\"arialLabel\">\n\n <span *ngIf=\"label\"\n class=\"label\">\n {{ label }}\n <span *ngIf=\"required && label\">*</span>\n </span>\n\n <div class=\"select-button\"\n role=\"group\">\n\n <div *ngFor=\"let option of options; let i = index\"\n role=\"button\"\n #btn\n class=\"button\"\n [attr.aria-pressed]=\"isSelected(option)\"\n [ngClass]=\"{'selected': isSelected(option),\n 'disabled': disabled || isOptionDisabled(option),\n 'button-primary': isButtonPrimary,\n 'button-secondary': isButtonSecondary}\"\n (click)=\"onItemClick($event, option, i)\"\n (keydown.enter)=\"onItemClick($event, option, i)\"\n [attr.title]=\"option.title\"\n [attr.aria-label]=\"option.label\"\n (blur)=\"onBlur()\"\n [attr.aria-labelledby]=\"this.getOptionLabel(option)\">\n {{ getOptionLabel(option) }}\n </div>\n\n </div>\n</div>\n",
|
14540
15083
|
providers: [
|
@@ -14920,8 +15463,12 @@ let GIPISidenavComponent = GIPISidenavComponent_1 = class GIPISidenavComponent {
|
|
14920
15463
|
this._mouseEnter = false;
|
14921
15464
|
this.menuItems = [];
|
14922
15465
|
this.labelToggle = 'Retrair menu';
|
15466
|
+
this.showTagNewIntegration = false;
|
15467
|
+
this.showIntegration = false;
|
14923
15468
|
this.showConfiguration = false;
|
14924
15469
|
this.onClickMenuItem = new EventEmitter();
|
15470
|
+
this.onClickMenuIntegration = new EventEmitter();
|
15471
|
+
this.onClickMenuConfiguration = new EventEmitter();
|
14925
15472
|
}
|
14926
15473
|
ngOnInit() { }
|
14927
15474
|
ngAfterViewInit() {
|
@@ -15079,12 +15626,32 @@ __decorate([
|
|
15079
15626
|
], GIPISidenavComponent.prototype, "sidenav", void 0);
|
15080
15627
|
__decorate([
|
15081
15628
|
Input(),
|
15082
|
-
__metadata("design:type", Array)
|
15083
|
-
], GIPISidenavComponent.prototype, "menuItems", void 0);
|
15629
|
+
__metadata("design:type", Array)
|
15630
|
+
], GIPISidenavComponent.prototype, "menuItems", void 0);
|
15631
|
+
__decorate([
|
15632
|
+
Input(),
|
15633
|
+
__metadata("design:type", String)
|
15634
|
+
], GIPISidenavComponent.prototype, "labelToggle", void 0);
|
15635
|
+
__decorate([
|
15636
|
+
Input(),
|
15637
|
+
__metadata("design:type", Boolean)
|
15638
|
+
], GIPISidenavComponent.prototype, "showTagNewIntegration", void 0);
|
15639
|
+
__decorate([
|
15640
|
+
Input(),
|
15641
|
+
__metadata("design:type", String)
|
15642
|
+
], GIPISidenavComponent.prototype, "iconIntegration", void 0);
|
15643
|
+
__decorate([
|
15644
|
+
Input(),
|
15645
|
+
__metadata("design:type", String)
|
15646
|
+
], GIPISidenavComponent.prototype, "svgIconIntegration", void 0);
|
15084
15647
|
__decorate([
|
15085
15648
|
Input(),
|
15086
15649
|
__metadata("design:type", String)
|
15087
|
-
], GIPISidenavComponent.prototype, "
|
15650
|
+
], GIPISidenavComponent.prototype, "labelIntegration", void 0);
|
15651
|
+
__decorate([
|
15652
|
+
Input(),
|
15653
|
+
__metadata("design:type", Boolean)
|
15654
|
+
], GIPISidenavComponent.prototype, "showIntegration", void 0);
|
15088
15655
|
__decorate([
|
15089
15656
|
Input(),
|
15090
15657
|
__metadata("design:type", String)
|
@@ -15105,11 +15672,19 @@ __decorate([
|
|
15105
15672
|
Output(),
|
15106
15673
|
__metadata("design:type", EventEmitter)
|
15107
15674
|
], GIPISidenavComponent.prototype, "onClickMenuItem", void 0);
|
15675
|
+
__decorate([
|
15676
|
+
Output(),
|
15677
|
+
__metadata("design:type", EventEmitter)
|
15678
|
+
], GIPISidenavComponent.prototype, "onClickMenuIntegration", void 0);
|
15679
|
+
__decorate([
|
15680
|
+
Output(),
|
15681
|
+
__metadata("design:type", EventEmitter)
|
15682
|
+
], GIPISidenavComponent.prototype, "onClickMenuConfiguration", void 0);
|
15108
15683
|
GIPISidenavComponent = GIPISidenavComponent_1 = __decorate([
|
15109
15684
|
Component({
|
15110
15685
|
selector: `gipi-sidenav`,
|
15111
15686
|
exportAs: 'gipiSidenav',
|
15112
|
-
template: "<mat-sidenav #sidenav\n [mode]=\"(isScreenLarge | async) ? 'side' : 'over'\"\n class=\"sidenav\"\n [class.large-sidenav]=\"(isOpened | async)\"\n [class.small-sidenav]=\"!(isOpened | async)\"\n [disableClose]=\"(isScreenLarge | async)\"\n opened=\"true\">\n\n <div [ngClass]=\"{'sidenav-content-menu': true,\n 'show-
|
15687
|
+
template: "<mat-sidenav #sidenav\n [mode]=\"(isScreenLarge | async) ? 'side' : 'over'\"\n class=\"sidenav\"\n [class.large-sidenav]=\"(isOpened | async)\"\n [class.small-sidenav]=\"!(isOpened | async)\"\n [disableClose]=\"(isScreenLarge | async)\"\n opened=\"true\">\n\n <div [ngClass]=\"{'sidenav-content-menu': true,\n 'show-bottom': (showConfiguration || showIntegration)}\">\n\n <!-- Bot\u00E3o expandir e retrair o menu -->\n <button id=\"buttonToogleSidenav\"\n name=\"toggleSidenav\"\n class=\"toggle-sidenav\"\n (click)=\"toggleSidenav(); _mouseEnter = false;\">\n <mat-icon [@indicatorRotate]=\"(isOpened | async) ? 'opened': 'closed'\">\n chevron_right\n </mat-icon>\n\n {{ ((labelToggle) && (isOpened | async)) ? labelToggle : '' }}\n </button>\n\n <!-- Bot\u00E3o voltar do submenu -->\n <div class=\"sidenav-action-menu sidenav-menu-collapsable\">\n <a *ngIf=\"(isOpened | async) && (_levelOneMenuCollapsableSelected || _levelTwoMenuCollapsableSelected)\"\n (click)=\"onMenuCollapsableGoBack()\"\n (mouseenter)=\"!_mouseEnter && onMouseEnter()\"\n (mouseleave)=\"_mouseEnter && onMouseLeave()\">\n <mat-icon>\n arrow_back\n </mat-icon>\n <span>\n {{ (submenuBackButtonName | async) }}\n </span>\n </a>\n </div>\n\n <!-- Se o menu item for do tipo submenu -->\n <mat-nav-list class=\"sidenav-menu-list\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\">\n <div *ngFor=\"let menu of (levelMenuCollapsableSelected | async)\"\n class=\"sidenav-action-menu\">\n\n <a *ngIf=\"menu.type === 'ITEM'\"\n [routerLink]=\"menu.route\"\n [class.menu-active]=\"isMenuActive(menu)\"\n (click)=\"onMenuItemSelected(menu)\">\n <mat-icon *ngIf=\"menu.icon\">\n {{ menu.icon }}\n </mat-icon>\n <mat-icon *ngIf=\"menu.svgIcon\"\n [svgIcon]=\"menu.svgIcon\">\n </mat-icon>\n <span *ngIf=\"(isOpened | async)\">\n {{ getMenuName(menu.name) }}\n </span>\n </a>\n\n <a *ngIf=\"menu.type === 'COLLAPSABLE'\"\n [class.menu-active]=\"isMenuCollapsableActive(menu)\"\n (click)=\"onMenuCollapsableSelected(menu); onMenuItemSelected(menu, false)\">\n <mat-icon *ngIf=\"menu.icon\">\n {{ menu.icon }}\n </mat-icon>\n <mat-icon *ngIf=\"menu.svgIcon\"\n [svgIcon]=\"menu.svgIcon\">\n </mat-icon>\n <span *ngIf=\"(isOpened | async)\">\n {{ getMenuName(menu.name) }}\n </span>\n <mat-icon *ngIf=\"(isOpened | async)\">\n chevron_right\n </mat-icon>\n </a>\n\n </div>\n </mat-nav-list>\n </div>\n\n <div class=\"sidenav-action-menu sidenav-bottom-menu\">\n <a *ngIf=\"showIntegration\"\n (click)=\"onMenuItemSelected(null); onClickMenuIntegration.emit()\">\n <mat-icon *ngIf=\"iconIntegration\">\n {{ iconIntegration }}\n </mat-icon>\n <mat-icon *ngIf=\"svgIconIntegration\"\n [svgIcon]=\"svgIconIntegration\">\n </mat-icon>\n <span *ngIf=\"(labelIntegration) && (isOpened | async)\">\n {{ labelIntegration }}\n </span>\n <div class=\"tag-new\"\n *ngIf=\"showTagNewIntegration\">\n Novo\n </div>\n </a>\n\n <a *ngIf=\"showConfiguration\"\n (click)=\"onMenuItemSelected(null); onClickMenuConfiguration.emit()\">\n <mat-icon *ngIf=\"iconConfiguration\">\n {{ iconConfiguration }}\n </mat-icon>\n <mat-icon *ngIf=\"svgIconConfiguration\"\n [svgIcon]=\"svgIconConfiguration\">\n </mat-icon>\n <span *ngIf=\"(labelConfiguration) && (isOpened | async)\">\n {{ labelConfiguration }}\n </span>\n </a>\n </div>\n</mat-sidenav>\n",
|
15113
15688
|
encapsulation: ViewEncapsulation.None,
|
15114
15689
|
providers: [
|
15115
15690
|
{
|
@@ -15128,13 +15703,121 @@ GIPISidenavComponent = GIPISidenavComponent_1 = __decorate([
|
|
15128
15703
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
|
15129
15704
|
])
|
15130
15705
|
],
|
15131
|
-
styles: [".sidenav{padding:.8rem 1.2rem;border-radius:5px;background-color:#fff;position:fixed!important;top:66px!important;bottom:8px!important;border:0!important}.sidenav.small-sidenav{overflow-y:auto;width:76px}.sidenav.small-sidenav .sidenav-
|
15706
|
+
styles: [".sidenav{padding:.8rem 1.2rem;border-radius:5px;background-color:#fff;position:fixed!important;top:66px!important;bottom:8px!important;border:0!important}.sidenav.small-sidenav{overflow-y:auto;width:76px}.sidenav.small-sidenav .sidenav-bottom-menu,.sidenav.small-sidenav .sidenav-content-menu .sidenav-menu-list .action-sidenav,.sidenav.small-sidenav .sidenav-content-menu .toggle-sidenav{text-align:center!important}.sidenav.large-sidenav{overflow-y:auto;width:248px}.sidenav .sidenav-content-menu{width:100%;background-color:#f5f5f6;border-radius:4px;display:flex;flex-direction:column;align-items:stretch;height:100%}.sidenav .sidenav-content-menu.show-bottom{height:calc(100% - 18px - 52px)!important}.sidenav .sidenav-content-menu .toggle-sidenav{all:unset;border-radius:4px;border:none;text-align:left;cursor:pointer;background-color:#e0313e;color:#fff;display:flex;align-items:center;gap:8px;padding:10px 16px}.sidenav .sidenav-content-menu .toggle-sidenav>mat-icon{width:2rem;height:2rem;font-size:2rem}.sidenav .sidenav-content-menu .toggle-sidenav:hover{background-color:#cc2d38}.sidenav .sidenav-content-menu .sidenav-menu-list{overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.sidenav .sidenav-content-menu .sidenav-menu-list::-webkit-scrollbar{display:none}.menu-active{color:#e0313e!important;background-color:#e0e1e2!important}.menu-active>mat-icon,.menu-active>mat-icon svg,.menu-active>mat-icon svg path{color:#e0313e!important;fill:#e0313e!important}.sidenav-action-menu{cursor:pointer;display:flex}.sidenav-action-menu.sidenav-bottom-menu{flex-direction:column;gap:1rem;margin-top:1rem}.sidenav-action-menu a{flex:1;padding:16px;background-color:#f5f5f6;display:flex;align-items:center;gap:8px;cursor:pointer;font-size:1.4rem;font-weight:600}.sidenav-action-menu a:hover{background-color:#e0e1e2}.sidenav-action-menu a>span{flex:1;line-height:2rem}.sidenav-action-menu a>mat-icon{width:2rem;height:2rem;font-size:2rem;line-height:2rem;color:#595959;fill:#595959}.sidenav-action-menu a>mat-icon svg,.sidenav-action-menu a>mat-icon svg path{color:#595959;fill:#595959}.sidenav-bottom-menu a{border-radius:4px}.sidenav-menu-collapsable a{background-color:#e0e1e2}.sidenav-menu-collapsable a:hover{background-color:#d1d2d4}.mat-list-base{padding-top:0!important}.mat-drawer-inner-container{display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;overflow:hidden!important}.mat-drawer:not(.mat-drawer-side){box-shadow:none!important}.tag-new{display:flex;align-items:center;justify-content:center;background-color:#e0313e;color:#fff;padding:.2rem .6rem;font-size:1rem;line-height:1.2rem;border-radius:.4rem}"]
|
15132
15707
|
}),
|
15133
15708
|
__metadata("design:paramtypes", [NavService,
|
15134
15709
|
BreakpointObserverService,
|
15135
15710
|
Router])
|
15136
15711
|
], GIPISidenavComponent);
|
15137
15712
|
|
15713
|
+
var GIPISlideToggleComponent_1;
|
15714
|
+
let nextUniqueId$h = 0;
|
15715
|
+
let GIPISlideToggleComponent = GIPISlideToggleComponent_1 = class GIPISlideToggleComponent {
|
15716
|
+
constructor(_changeDetectorRef) {
|
15717
|
+
this._changeDetectorRef = _changeDetectorRef;
|
15718
|
+
this._name = `gipi-slide-toggle-${nextUniqueId$h++}`;
|
15719
|
+
this._slideToggleValue = false;
|
15720
|
+
this.id = this._name;
|
15721
|
+
this.name = this._name;
|
15722
|
+
this.label = '';
|
15723
|
+
this.help = '';
|
15724
|
+
this._required = false;
|
15725
|
+
this._disabled = false;
|
15726
|
+
this.onChange = () => { };
|
15727
|
+
this.onTouched = () => { };
|
15728
|
+
}
|
15729
|
+
get slideToggleValue() {
|
15730
|
+
return this._slideToggleValue;
|
15731
|
+
}
|
15732
|
+
set slideToggleValue(value) {
|
15733
|
+
this._slideToggleValue = value;
|
15734
|
+
this.onChange(value);
|
15735
|
+
this.onTouched();
|
15736
|
+
}
|
15737
|
+
get required() {
|
15738
|
+
return this._required;
|
15739
|
+
}
|
15740
|
+
set required(value) {
|
15741
|
+
if (this.required !== value) {
|
15742
|
+
this._required = coerceBooleanProperty(value);
|
15743
|
+
this._changeDetectorRef.markForCheck();
|
15744
|
+
}
|
15745
|
+
}
|
15746
|
+
get disabled() {
|
15747
|
+
return this._disabled;
|
15748
|
+
}
|
15749
|
+
set disabled(value) {
|
15750
|
+
if (this.disabled !== value) {
|
15751
|
+
this._disabled = coerceBooleanProperty(value);
|
15752
|
+
this._changeDetectorRef.markForCheck();
|
15753
|
+
}
|
15754
|
+
}
|
15755
|
+
ngOnInit() { }
|
15756
|
+
writeValue(value) {
|
15757
|
+
this.slideToggleValue = value;
|
15758
|
+
this._changeDetectorRef.markForCheck();
|
15759
|
+
}
|
15760
|
+
registerOnChange(fn) {
|
15761
|
+
this.onChange = fn;
|
15762
|
+
}
|
15763
|
+
registerOnTouched(fn) {
|
15764
|
+
this.onTouched = fn;
|
15765
|
+
}
|
15766
|
+
setDisabledState(isDisabled) {
|
15767
|
+
this.disabled = isDisabled;
|
15768
|
+
this._changeDetectorRef.markForCheck();
|
15769
|
+
}
|
15770
|
+
};
|
15771
|
+
GIPISlideToggleComponent.ctorParameters = () => [
|
15772
|
+
{ type: ChangeDetectorRef }
|
15773
|
+
];
|
15774
|
+
__decorate([
|
15775
|
+
Input(),
|
15776
|
+
__metadata("design:type", String)
|
15777
|
+
], GIPISlideToggleComponent.prototype, "id", void 0);
|
15778
|
+
__decorate([
|
15779
|
+
Input(),
|
15780
|
+
__metadata("design:type", String)
|
15781
|
+
], GIPISlideToggleComponent.prototype, "name", void 0);
|
15782
|
+
__decorate([
|
15783
|
+
Input(),
|
15784
|
+
__metadata("design:type", String)
|
15785
|
+
], GIPISlideToggleComponent.prototype, "label", void 0);
|
15786
|
+
__decorate([
|
15787
|
+
Input(),
|
15788
|
+
__metadata("design:type", String)
|
15789
|
+
], GIPISlideToggleComponent.prototype, "help", void 0);
|
15790
|
+
__decorate([
|
15791
|
+
Input(),
|
15792
|
+
__metadata("design:type", Boolean),
|
15793
|
+
__metadata("design:paramtypes", [Boolean])
|
15794
|
+
], GIPISlideToggleComponent.prototype, "required", null);
|
15795
|
+
__decorate([
|
15796
|
+
Input(),
|
15797
|
+
__metadata("design:type", Boolean),
|
15798
|
+
__metadata("design:paramtypes", [Boolean])
|
15799
|
+
], GIPISlideToggleComponent.prototype, "disabled", null);
|
15800
|
+
GIPISlideToggleComponent = GIPISlideToggleComponent_1 = __decorate([
|
15801
|
+
Component({
|
15802
|
+
selector: 'gipi-slide-toggle',
|
15803
|
+
exportAs: 'gipiSlideToggle',
|
15804
|
+
template: "<input class=\"toggle toggle-light\"\n type=\"checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [(ngModel)]=\"slideToggleValue\" />\n<label class=\"toggle-btn\"\n [attr.for]=\"id\">\n</label>\n<label class=\"toggle-label\"\n *ngIf=\"label\"\n [attr.for]=\"id\">\n {{ label }}\n</label>",
|
15805
|
+
providers: [
|
15806
|
+
{
|
15807
|
+
provide: NG_VALUE_ACCESSOR,
|
15808
|
+
useExisting: forwardRef(() => GIPISlideToggleComponent_1),
|
15809
|
+
multi: true,
|
15810
|
+
},
|
15811
|
+
],
|
15812
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
15813
|
+
host: {
|
15814
|
+
'class': 'gipi-slide-toggle',
|
15815
|
+
},
|
15816
|
+
styles: [":host{display:flex;align-items:center;cursor:pointer}.toggle-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:1rem;cursor:pointer}.toggle{display:none}.toggle ::-moz-selection,.toggle :after::-moz-selection,.toggle :before::-moz-selection,.toggle+.toggle-btn::-moz-selection,.toggle::-moz-selection,.toggle:after::-moz-selection,.toggle:before::-moz-selection{background:0 0}.toggle ::selection,.toggle :after::selection,.toggle :before::selection,.toggle+.toggle-btn::selection,.toggle::selection,.toggle:after::selection,.toggle:before::selection{background:0 0}.toggle+.toggle-btn{display:block;width:40px;height:24px;outline:0;background:#e0e1e2;border-radius:22px;padding:4px;transition:.4s;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.toggle+.toggle-btn:after,.toggle+.toggle-btn:before{content:\"\";display:block;width:16px;height:16px;position:relative}.toggle+.toggle-btn:after{left:0;background:#8c8f93;border-radius:50%;transition:.2s}.toggle+.toggle-btn:before{display:none}.toggle:checked+.toggle-btn:after{left:50%;background:#414244}"]
|
15817
|
+
}),
|
15818
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
15819
|
+
], GIPISlideToggleComponent);
|
15820
|
+
|
15138
15821
|
var GIPIStepperComponent_1;
|
15139
15822
|
let GIPIStepperComponent = GIPIStepperComponent_1 = class GIPIStepperComponent extends CdkStepper {
|
15140
15823
|
ngOnInit() { }
|
@@ -15834,6 +16517,194 @@ GIPITableComponent = GIPITableComponent_1 = __decorate([
|
|
15834
16517
|
__metadata("design:paramtypes", [])
|
15835
16518
|
], GIPITableComponent);
|
15836
16519
|
|
16520
|
+
class TabModel {
|
16521
|
+
constructor() {
|
16522
|
+
this.active = false;
|
16523
|
+
this.closeable = false;
|
16524
|
+
this.disabled = false;
|
16525
|
+
}
|
16526
|
+
}
|
16527
|
+
|
16528
|
+
let GIPITabComponent = class GIPITabComponent {
|
16529
|
+
constructor() {
|
16530
|
+
this.active = false;
|
16531
|
+
this.closeable = false;
|
16532
|
+
this.disabled = false;
|
16533
|
+
this.selectionChange = new EventEmitter();
|
16534
|
+
}
|
16535
|
+
ngOnInit() { }
|
16536
|
+
};
|
16537
|
+
__decorate([
|
16538
|
+
Input(),
|
16539
|
+
__metadata("design:type", Number)
|
16540
|
+
], GIPITabComponent.prototype, "index", void 0);
|
16541
|
+
__decorate([
|
16542
|
+
Input(),
|
16543
|
+
__metadata("design:type", String)
|
16544
|
+
], GIPITabComponent.prototype, "label", void 0);
|
16545
|
+
__decorate([
|
16546
|
+
Input(),
|
16547
|
+
__metadata("design:type", Boolean)
|
16548
|
+
], GIPITabComponent.prototype, "active", void 0);
|
16549
|
+
__decorate([
|
16550
|
+
Input(),
|
16551
|
+
__metadata("design:type", TemplateRef)
|
16552
|
+
], GIPITabComponent.prototype, "template", void 0);
|
16553
|
+
__decorate([
|
16554
|
+
Input(),
|
16555
|
+
__metadata("design:type", Boolean)
|
16556
|
+
], GIPITabComponent.prototype, "closeable", void 0);
|
16557
|
+
__decorate([
|
16558
|
+
Input(),
|
16559
|
+
__metadata("design:type", Boolean)
|
16560
|
+
], GIPITabComponent.prototype, "disabled", void 0);
|
16561
|
+
__decorate([
|
16562
|
+
Input(),
|
16563
|
+
__metadata("design:type", Object)
|
16564
|
+
], GIPITabComponent.prototype, "data", void 0);
|
16565
|
+
__decorate([
|
16566
|
+
Input(),
|
16567
|
+
__metadata("design:type", String)
|
16568
|
+
], GIPITabComponent.prototype, "icon", void 0);
|
16569
|
+
__decorate([
|
16570
|
+
Input(),
|
16571
|
+
__metadata("design:type", String)
|
16572
|
+
], GIPITabComponent.prototype, "svgIcon", void 0);
|
16573
|
+
__decorate([
|
16574
|
+
Output(),
|
16575
|
+
__metadata("design:type", EventEmitter)
|
16576
|
+
], GIPITabComponent.prototype, "selectionChange", void 0);
|
16577
|
+
GIPITabComponent = __decorate([
|
16578
|
+
Component({
|
16579
|
+
selector: 'gipi-tab',
|
16580
|
+
exportAs: 'gipiTab',
|
16581
|
+
template: "<ng-container *ngIf=\"active\">\n <ng-content> </ng-content>\n <ng-container *ngIf=\"template\"\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{$implicit: data}\">\n </ng-container>\n</ng-container>",
|
16582
|
+
host: {
|
16583
|
+
'class': 'gipi-tab',
|
16584
|
+
'[style.display]': '!active ? "none" : "block"',
|
16585
|
+
},
|
16586
|
+
styles: [":host{padding:1.6rem}"]
|
16587
|
+
}),
|
16588
|
+
__metadata("design:paramtypes", [])
|
16589
|
+
], GIPITabComponent);
|
16590
|
+
|
16591
|
+
let GIPITabGroupComponent = class GIPITabGroupComponent {
|
16592
|
+
constructor(elementRef, _componentFactoryResolver) {
|
16593
|
+
this.elementRef = elementRef;
|
16594
|
+
this._componentFactoryResolver = _componentFactoryResolver;
|
16595
|
+
this.dynamicTabs = [];
|
16596
|
+
}
|
16597
|
+
ngOnInit() { }
|
16598
|
+
ngAfterContentInit() {
|
16599
|
+
const activeTabs = this.tabQueryList.filter(tab => tab.active);
|
16600
|
+
if (activeTabs.length === 0 && this.tabQueryList.length > 0) {
|
16601
|
+
this.selectTab(this.tabQueryList.first);
|
16602
|
+
}
|
16603
|
+
}
|
16604
|
+
openTab(label, template, data, closeable = false, disabled = false, action) {
|
16605
|
+
const tab = new TabModel();
|
16606
|
+
tab.label = label;
|
16607
|
+
tab.template = template;
|
16608
|
+
tab.data = data;
|
16609
|
+
tab.closeable = closeable;
|
16610
|
+
tab.disabled = disabled;
|
16611
|
+
tab.action = action;
|
16612
|
+
this._openTabs(Array(tab));
|
16613
|
+
}
|
16614
|
+
_openTabs(tabList) {
|
16615
|
+
const tabsComponent = tabList.map(tab => this._getTabComponent(tab.label, tab.template, tab.data, tab.closeable, tab.disabled, tab.action));
|
16616
|
+
this.dynamicTabs.push(...tabsComponent);
|
16617
|
+
this.selectTab(this.dynamicTabs[0]);
|
16618
|
+
}
|
16619
|
+
_getTabComponent(label, template, data, closeable = false, disabled = false, action) {
|
16620
|
+
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(GIPITabComponent);
|
16621
|
+
const componentRef = this.dynamicTabPlaceholder.viewContainer.createComponent(componentFactory);
|
16622
|
+
const instance = componentRef.instance;
|
16623
|
+
instance.label = label;
|
16624
|
+
instance.template = template;
|
16625
|
+
instance.data = data;
|
16626
|
+
instance.closeable = closeable;
|
16627
|
+
instance.disabled = disabled;
|
16628
|
+
instance.action = action;
|
16629
|
+
return componentRef.instance;
|
16630
|
+
}
|
16631
|
+
selectTab(tab) {
|
16632
|
+
this.tabQueryList.toArray().forEach(t => (t.active = false));
|
16633
|
+
this.dynamicTabs.forEach(t => (t.active = false));
|
16634
|
+
tab.active = true;
|
16635
|
+
tab.selectionChange.emit();
|
16636
|
+
if (tab.action) {
|
16637
|
+
tab.action(tab.data);
|
16638
|
+
}
|
16639
|
+
}
|
16640
|
+
closeTab(tab) {
|
16641
|
+
const index = this.dynamicTabs.indexOf(tab);
|
16642
|
+
this.dynamicTabs.splice(index, 1);
|
16643
|
+
const viewContainerRef = this.dynamicTabPlaceholder.viewContainer;
|
16644
|
+
viewContainerRef.remove(index);
|
16645
|
+
if (this.tabQueryList.length > 0) {
|
16646
|
+
this.selectTab(this.tabQueryList.first);
|
16647
|
+
}
|
16648
|
+
}
|
16649
|
+
closeActiveTab() {
|
16650
|
+
const activeTabs = this.dynamicTabs.filter(tab => tab.active);
|
16651
|
+
if (activeTabs.length > 0) {
|
16652
|
+
this.closeTab(activeTabs[0]);
|
16653
|
+
}
|
16654
|
+
}
|
16655
|
+
closeAllTabs() {
|
16656
|
+
const tabs = Object.assign([], this.dynamicTabs);
|
16657
|
+
if (tabs.length > 0) {
|
16658
|
+
tabs.forEach(tab => this.closeTab(tab));
|
16659
|
+
}
|
16660
|
+
}
|
16661
|
+
nextTab() {
|
16662
|
+
const currentTab = this.tabQueryList.toArray().find(tab => tab.active);
|
16663
|
+
const nextTab = this.tabQueryList.toArray()[this.tabQueryList.toArray().indexOf(currentTab) + 1];
|
16664
|
+
if (nextTab != null) {
|
16665
|
+
this.tabQueryList.toArray().forEach(t => (t.active = false));
|
16666
|
+
this.dynamicTabs.forEach(t => (t.active = false));
|
16667
|
+
nextTab.active = true;
|
16668
|
+
nextTab.selectionChange.emit();
|
16669
|
+
}
|
16670
|
+
}
|
16671
|
+
previousTab() {
|
16672
|
+
const currentTab = this.tabQueryList.toArray().find(tab => tab.active);
|
16673
|
+
const previousTab = this.tabQueryList.toArray()[this.tabQueryList.toArray().indexOf(currentTab) - 1];
|
16674
|
+
if (previousTab != null) {
|
16675
|
+
this.tabQueryList.toArray().forEach(t => (t.active = false));
|
16676
|
+
this.dynamicTabs.forEach(t => (t.active = false));
|
16677
|
+
previousTab.active = true;
|
16678
|
+
previousTab.selectionChange.emit();
|
16679
|
+
}
|
16680
|
+
}
|
16681
|
+
};
|
16682
|
+
GIPITabGroupComponent.ctorParameters = () => [
|
16683
|
+
{ type: ElementRef },
|
16684
|
+
{ type: ComponentFactoryResolver }
|
16685
|
+
];
|
16686
|
+
__decorate([
|
16687
|
+
ContentChildren(GIPITabComponent),
|
16688
|
+
__metadata("design:type", QueryList)
|
16689
|
+
], GIPITabGroupComponent.prototype, "tabQueryList", void 0);
|
16690
|
+
__decorate([
|
16691
|
+
ViewChild(GIPIDynamicTabDirective, { static: false }),
|
16692
|
+
__metadata("design:type", GIPIDynamicTabDirective)
|
16693
|
+
], GIPITabGroupComponent.prototype, "dynamicTabPlaceholder", void 0);
|
16694
|
+
GIPITabGroupComponent = __decorate([
|
16695
|
+
Component({
|
16696
|
+
selector: 'gipi-tab-group',
|
16697
|
+
exportAs: 'gipiTabGroup',
|
16698
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link\n *ngFor=\"let tab of tabQueryList\"\n (click)=\"selectTab(tab)\"\n [class.active]=\"tab.active\"\n [disabled]=\"tab.disabled\">\n <mat-icon *ngIf=\"tab.icon || tab.svgIcon\"\n [svgIcon]=\"tab.svgIcon ? tab.svgIcon : ''\">\n {{ !tab.svgIcon && tab.icon ? tab.icon : '' }}\n </mat-icon>\n\n {{ tab.label }}\n </a>\n\n <a mat-tab-link\n *ngFor=\"let tab of dynamicTabs\"\n (click)=\"selectTab(tab)\"\n [class.active]=\"tab.active\"\n [disabled]=\"tab.disabled\">\n <mat-icon *ngIf=\"tab.icon || tab.svgIcon\"\n [svgIcon]=\"tab.svgIcon ? tab.svgIcon : ''\">\n {{ !tab.svgIcon && tab.icon ? tab.icon : '' }}\n </mat-icon>\n\n {{ tab.label }}\n </a>\n</nav>\n\n<ng-content> </ng-content>\n<ng-template dynamicTab\n #container>\n</ng-template>",
|
16699
|
+
host: {
|
16700
|
+
'class': 'gipi-tab-group',
|
16701
|
+
},
|
16702
|
+
styles: [":host{display:block;flex:1;width:100%;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)}:host ::ng-deep .mat-tab-nav-bar{background:#f5f5f6;border:none;border-radius:.4rem;padding:.4rem;box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1)}:host ::ng-deep .mat-tab-links{display:flex;gap:1rem}:host ::ng-deep .mat-tab-link{height:auto!important;padding:1rem!important;opacity:1!important;border:none!important;border-radius:4px!important;transition:.2s!important;color:#595959!important;gap:1rem}:host ::ng-deep .mat-tab-link>mat-icon{width:2rem!important;height:2rem!important;font-size:2rem!important;color:#595959!important}:host ::ng-deep .mat-tab-link>mat-icon svg,:host ::ng-deep .mat-tab-link>mat-icon svg g path,:host ::ng-deep .mat-tab-link>mat-icon svg path{color:#595959!important;fill:#595959!important}:host ::ng-deep .mat-tab-link:not(.active):hover{background:#e0e1e2!important}:host ::ng-deep .mat-tab-link.active{background:#e0313e!important;color:#fff!important}:host ::ng-deep .mat-tab-link.active>mat-icon{color:#fff!important}:host ::ng-deep .mat-tab-link.active>mat-icon svg,:host ::ng-deep .mat-tab-link.active>mat-icon svg g path,:host ::ng-deep .mat-tab-link.active>mat-icon svg path{color:#fff!important;fill:#fff!important}:host ::ng-deep .mat-tab-link:disabled,:host ::ng-deep .mat-tab-link:disabled>mat-icon{color:#9a9da2!important;fill:#9a9da2!important}:host ::ng-deep .mat-tab-link:disabled svg,:host ::ng-deep .mat-tab-link:disabled svg g path,:host ::ng-deep .mat-tab-link:disabled svg path,:host ::ng-deep .mat-tab-link:disabled>mat-icon svg,:host ::ng-deep .mat-tab-link:disabled>mat-icon svg g path,:host ::ng-deep .mat-tab-link:disabled>mat-icon svg path{color:#9a9da2!important;fill:#9a9da2!important}:host ::ng-deep .mat-ink-bar{display:none!important}"]
|
16703
|
+
}),
|
16704
|
+
__metadata("design:paramtypes", [ElementRef,
|
16705
|
+
ComponentFactoryResolver])
|
16706
|
+
], GIPITabGroupComponent);
|
16707
|
+
|
15837
16708
|
var GIPIToolbarComponent_1;
|
15838
16709
|
let GIPIToolbarComponent = GIPIToolbarComponent_1 = class GIPIToolbarComponent {
|
15839
16710
|
constructor() { }
|
@@ -15916,31 +16787,6 @@ GIPITopNavComponent = GIPITopNavComponent_1 = __decorate([
|
|
15916
16787
|
__metadata("design:paramtypes", [NavService])
|
15917
16788
|
], GIPITopNavComponent);
|
15918
16789
|
|
15919
|
-
/** @dynamic */
|
15920
|
-
class NumberUtil {
|
15921
|
-
static isPositive(value) {
|
15922
|
-
return !ObjectUtil.isNull(value) && value > 0;
|
15923
|
-
}
|
15924
|
-
static isNegative(value) {
|
15925
|
-
return !ObjectUtil.isNull(value) && value < 0;
|
15926
|
-
}
|
15927
|
-
static format(value, digitsInfo, type) {
|
15928
|
-
if (!ObjectUtil.isNull(value) && (!type || type === 'NUMBER')) {
|
15929
|
-
return formatNumber(value, 'pt', digitsInfo);
|
15930
|
-
}
|
15931
|
-
else if (!ObjectUtil.isNull(value) && type === 'PERCENT') {
|
15932
|
-
return formatPercent(value / 100, 'pt', digitsInfo);
|
15933
|
-
}
|
15934
|
-
return StringUtil.EMPTY;
|
15935
|
-
}
|
15936
|
-
static onlyNumbers(value) {
|
15937
|
-
return String(value).replace(/[^\d]/g, '');
|
15938
|
-
}
|
15939
|
-
static isNumber(value) {
|
15940
|
-
return value !== null && value !== undefined && !isNaN(value) && typeof value === 'number';
|
15941
|
-
}
|
15942
|
-
}
|
15943
|
-
|
15944
16790
|
const moment = moment_;
|
15945
16791
|
/** @dynamic */
|
15946
16792
|
class DateUtil {
|
@@ -19735,7 +20581,7 @@ MatDatepickerInput = MatDatepickerInput_1 = __decorate([
|
|
19735
20581
|
* found in the LICENSE file at https://angular.io/license
|
19736
20582
|
*/
|
19737
20583
|
var MatDateRangeInput_1;
|
19738
|
-
let nextUniqueId$
|
20584
|
+
let nextUniqueId$i = 0;
|
19739
20585
|
let MatDateRangeInput = MatDateRangeInput_1 = class MatDateRangeInput {
|
19740
20586
|
constructor(_changeDetectorRef, _elementRef, control, _dateAdapter, _formField) {
|
19741
20587
|
this._changeDetectorRef = _changeDetectorRef;
|
@@ -19743,7 +20589,7 @@ let MatDateRangeInput = MatDateRangeInput_1 = class MatDateRangeInput {
|
|
19743
20589
|
this._dateAdapter = _dateAdapter;
|
19744
20590
|
this._formField = _formField;
|
19745
20591
|
/** Unique ID for the input. */
|
19746
|
-
this.id = `mat-date-range-input-${nextUniqueId$
|
20592
|
+
this.id = `mat-date-range-input-${nextUniqueId$i++}`;
|
19747
20593
|
/** Whether the control is focused. */
|
19748
20594
|
this.focused = false;
|
19749
20595
|
/** Name of the form control. */
|
@@ -20531,12 +21377,12 @@ class BrowserUtil {
|
|
20531
21377
|
|
20532
21378
|
var DateRangePickerComponent_1;
|
20533
21379
|
const moment$1 = moment_;
|
20534
|
-
let nextUniqueId$
|
21380
|
+
let nextUniqueId$j = 0;
|
20535
21381
|
let DateRangePickerComponent = DateRangePickerComponent_1 = class DateRangePickerComponent {
|
20536
21382
|
constructor(elementRef, _changeDetectorRef) {
|
20537
21383
|
this.elementRef = elementRef;
|
20538
21384
|
this._changeDetectorRef = _changeDetectorRef;
|
20539
|
-
this._name = `gipi-date-range-${nextUniqueId$
|
21385
|
+
this._name = `gipi-date-range-${nextUniqueId$j++}`;
|
20540
21386
|
this.idStartDate = `${this._name}-start`;
|
20541
21387
|
this.idEndDate = `${this._name}-end`;
|
20542
21388
|
this.nameStartDate = `${this._name}-start`;
|
@@ -21160,12 +22006,12 @@ PresetRangeComponent = PresetRangeComponent_1 = __decorate([
|
|
21160
22006
|
|
21161
22007
|
var DatepickerComponent_1;
|
21162
22008
|
const moment$3 = moment_;
|
21163
|
-
let nextUniqueId$
|
22009
|
+
let nextUniqueId$k = 0;
|
21164
22010
|
let DatepickerComponent = DatepickerComponent_1 = class DatepickerComponent {
|
21165
22011
|
constructor(elementRef, _changeDetectorRef) {
|
21166
22012
|
this.elementRef = elementRef;
|
21167
22013
|
this._changeDetectorRef = _changeDetectorRef;
|
21168
|
-
this._name = `gipi-date-range-${nextUniqueId$
|
22014
|
+
this._name = `gipi-date-range-${nextUniqueId$k++}`;
|
21169
22015
|
this.id = `${this._name}-date`;
|
21170
22016
|
this.name = `${this._name}-date`;
|
21171
22017
|
this.label = '';
|
@@ -21184,14 +22030,18 @@ let DatepickerComponent = DatepickerComponent_1 = class DatepickerComponent {
|
|
21184
22030
|
}
|
21185
22031
|
set minDate(value) {
|
21186
22032
|
this._minDate = value;
|
21187
|
-
|
22033
|
+
if (!ObjectUtil.isNull(value)) {
|
22034
|
+
this._minDate.setHours(0, 0, 0, 0);
|
22035
|
+
}
|
21188
22036
|
}
|
21189
22037
|
get maxDate() {
|
21190
22038
|
return this._maxDate;
|
21191
22039
|
}
|
21192
22040
|
set maxDate(value) {
|
21193
22041
|
this._maxDate = value;
|
21194
|
-
|
22042
|
+
if (!ObjectUtil.isNull(value)) {
|
22043
|
+
this._maxDate.setHours(0, 0, 0, 0);
|
22044
|
+
}
|
21195
22045
|
}
|
21196
22046
|
get required() {
|
21197
22047
|
return this._required;
|
@@ -21683,7 +22533,7 @@ class MonthPickerModel {
|
|
21683
22533
|
this.selectedYearMoment = moment$5();
|
21684
22534
|
this.updateYearText();
|
21685
22535
|
this.selectedMonthMoment = moment$5();
|
21686
|
-
this.months =
|
22536
|
+
this.months = ['Jan.', 'Fev.', 'Mar.', 'Abr.', 'Mai.', 'Jun.', 'Jul.', 'Ago.', 'Set.', 'Out.', 'Nov.', 'Dez.'];
|
21687
22537
|
this.selectedMonthIndex = this.selectedMonthMoment.month();
|
21688
22538
|
this.selectedMonthYear = this.selectedYearMoment.year();
|
21689
22539
|
}
|
@@ -21704,7 +22554,7 @@ class MonthPickerModel {
|
|
21704
22554
|
this.updateYearText();
|
21705
22555
|
}
|
21706
22556
|
}
|
21707
|
-
let nextUniqueId$
|
22557
|
+
let nextUniqueId$l = 0;
|
21708
22558
|
let MonthYearPickerComponent = MonthYearPickerComponent_1 = class MonthYearPickerComponent {
|
21709
22559
|
constructor(elementRef, _changeDetectorRef, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dir, _document) {
|
21710
22560
|
this.elementRef = elementRef;
|
@@ -21714,7 +22564,7 @@ let MonthYearPickerComponent = MonthYearPickerComponent_1 = class MonthYearPicke
|
|
21714
22564
|
this._viewContainerRef = _viewContainerRef;
|
21715
22565
|
this._dir = _dir;
|
21716
22566
|
this._document = _document;
|
21717
|
-
this._name = `gipi-date-range-${nextUniqueId$
|
22567
|
+
this._name = `gipi-date-range-${nextUniqueId$l++}`;
|
21718
22568
|
this._focusedElementBeforeOpen = null;
|
21719
22569
|
this._backdropHarnessClass = `${this._name}-backdrop`;
|
21720
22570
|
this._stateChanges = new Subject();
|
@@ -22123,319 +22973,99 @@ MonthYearPickerModule = __decorate([
|
|
22123
22973
|
entryComponents: [
|
22124
22974
|
CalendarMonthYearComponent,
|
22125
22975
|
],
|
22126
|
-
})
|
22127
|
-
], MonthYearPickerModule);
|
22128
|
-
|
22129
|
-
var GIPIRangePageComponent_1;
|
22130
|
-
let nextUniqueId$i = 0;
|
22131
|
-
class RangePage {
|
22132
|
-
constructor(start, end) {
|
22133
|
-
this.start = start;
|
22134
|
-
this.end = end;
|
22135
|
-
}
|
22136
|
-
getTotalCount() {
|
22137
|
-
return (this.end - this.start) + 1;
|
22138
|
-
}
|
22139
|
-
getRange() {
|
22140
|
-
return Array.from({ length: this.getTotalCount() }, (_, i) => this.start - 1 + i);
|
22141
|
-
}
|
22142
|
-
}
|
22143
|
-
let GIPIRangePageComponent = GIPIRangePageComponent_1 = class GIPIRangePageComponent {
|
22144
|
-
constructor(elementRef, _changeDetectorRef) {
|
22145
|
-
this.elementRef = elementRef;
|
22146
|
-
this._changeDetectorRef = _changeDetectorRef;
|
22147
|
-
this._name = `gipi-range-page-${nextUniqueId$i++}`;
|
22148
|
-
this._startPage = 1;
|
22149
|
-
this._endPage = 1;
|
22150
|
-
this.id = this._name;
|
22151
|
-
this.name = this._name;
|
22152
|
-
this.label = '';
|
22153
|
-
this.tooltip = '';
|
22154
|
-
this.placeholderStart = '';
|
22155
|
-
this.placeholderEnd = '';
|
22156
|
-
this.help = '';
|
22157
|
-
this._min = 1;
|
22158
|
-
this._max = 100;
|
22159
|
-
this._step = 1;
|
22160
|
-
this._required = false;
|
22161
|
-
this._disabled = false;
|
22162
|
-
this.onChange = (value) => { };
|
22163
|
-
this.onTouched = () => { };
|
22164
|
-
}
|
22165
|
-
get min() {
|
22166
|
-
return NumberUtil.isNumber(this._min) ? this._min : 1;
|
22167
|
-
}
|
22168
|
-
set min(value) {
|
22169
|
-
this._min = value;
|
22170
|
-
this._initPage();
|
22171
|
-
}
|
22172
|
-
get max() {
|
22173
|
-
return NumberUtil.isNumber(this._max) ? this._max : 100;
|
22174
|
-
}
|
22175
|
-
set max(value) {
|
22176
|
-
this._max = value;
|
22177
|
-
this._initPage();
|
22178
|
-
}
|
22179
|
-
get step() {
|
22180
|
-
return NumberUtil.isNumber(this._step) ? this._step : 1;
|
22181
|
-
}
|
22182
|
-
set step(value) {
|
22183
|
-
this._step = value;
|
22184
|
-
this._initPage();
|
22185
|
-
}
|
22186
|
-
get required() {
|
22187
|
-
return this._required;
|
22188
|
-
}
|
22189
|
-
set required(value) {
|
22190
|
-
this._required = coerceBooleanProperty(value);
|
22191
|
-
}
|
22192
|
-
get disabled() {
|
22193
|
-
return this._disabled;
|
22194
|
-
}
|
22195
|
-
set disabled(value) {
|
22196
|
-
this._disabled = coerceBooleanProperty(value);
|
22197
|
-
}
|
22198
|
-
get formattedValue() {
|
22199
|
-
return '';
|
22200
|
-
}
|
22201
|
-
ngOnInit() {
|
22202
|
-
this._initPage();
|
22203
|
-
}
|
22204
|
-
ngOnDestroy() { }
|
22205
|
-
writeValue(value) {
|
22206
|
-
if (!ObjectUtil.isNull(value)) {
|
22207
|
-
this._startPage = value.start || this._startPage;
|
22208
|
-
this._endPage = value.end || this._endPage;
|
22209
|
-
}
|
22210
|
-
this._changeDetectorRef.detectChanges();
|
22211
|
-
}
|
22212
|
-
registerOnChange(fn) {
|
22213
|
-
this.onChange = fn;
|
22214
|
-
}
|
22215
|
-
registerOnTouched(fn) {
|
22216
|
-
this.onTouched = fn;
|
22217
|
-
}
|
22218
|
-
setDisabledState(isDisabled) {
|
22219
|
-
this.disabled = isDisabled;
|
22220
|
-
this._changeDetectorRef.markForCheck();
|
22221
|
-
}
|
22222
|
-
_initPage() {
|
22223
|
-
this._startPage = this.min;
|
22224
|
-
this._endPage = Math.min(this._startPage + this.step - 1, this.max);
|
22225
|
-
}
|
22226
|
-
updateEndPage() {
|
22227
|
-
if (this.disabled) {
|
22228
|
-
return;
|
22229
|
-
}
|
22230
|
-
if (this._startPage < this.min) {
|
22231
|
-
this._startPage = this.min;
|
22232
|
-
}
|
22233
|
-
else if (this._startPage > this.max) {
|
22234
|
-
this._startPage = this.max;
|
22235
|
-
}
|
22236
|
-
if (this._endPage < this._startPage) {
|
22237
|
-
this._endPage = this._startPage;
|
22238
|
-
}
|
22239
|
-
else if (this._endPage > (this._startPage + (this.step - 1))) {
|
22240
|
-
this._endPage = Math.min(this._startPage + this.step - 1, this.max);
|
22241
|
-
}
|
22242
|
-
this._propagateChange();
|
22243
|
-
}
|
22244
|
-
updateStartPage() {
|
22245
|
-
if (this.disabled) {
|
22246
|
-
return;
|
22247
|
-
}
|
22248
|
-
if (this._endPage > this.max) {
|
22249
|
-
this._endPage = this.max;
|
22250
|
-
}
|
22251
|
-
else if (this._endPage > this.max) {
|
22252
|
-
this._endPage = this.max;
|
22253
|
-
}
|
22254
|
-
if (this._startPage > this._endPage) {
|
22255
|
-
this._startPage = this._endPage;
|
22256
|
-
}
|
22257
|
-
else if (this._startPage < (this._endPage - (this.step + 1))) {
|
22258
|
-
this._startPage = Math.max(this._endPage - this.step + 1, this.min);
|
22259
|
-
}
|
22260
|
-
this._propagateChange();
|
22261
|
-
}
|
22262
|
-
previous() {
|
22263
|
-
if (this.disabled) {
|
22264
|
-
return;
|
22265
|
-
}
|
22266
|
-
const newStartPage = Math.max(this._startPage - this.step + 1, this.min);
|
22267
|
-
let newEndPage = Math.min(newStartPage + this.step - 1, this.max);
|
22268
|
-
if (newEndPage >= this.min) {
|
22269
|
-
this._startPage = newStartPage;
|
22270
|
-
this._endPage = newEndPage;
|
22271
|
-
this._propagateChange();
|
22272
|
-
}
|
22273
|
-
}
|
22274
|
-
next() {
|
22275
|
-
if (this.disabled) {
|
22276
|
-
return;
|
22277
|
-
}
|
22278
|
-
// const newStartPage = Math.min(this._startPage + this.step, this.max - this.step + 1);
|
22279
|
-
// let newEndPage = newStartPage + this.step - 1;
|
22280
|
-
const newStartPage = Math.min(this._startPage + this.step, this.max);
|
22281
|
-
let newEndPage = Math.min(newStartPage + this.step - 1, this.max);
|
22282
|
-
if ((newStartPage === this.max) || (newEndPage > this.max)) {
|
22283
|
-
newEndPage = newStartPage;
|
22284
|
-
}
|
22285
|
-
if (newEndPage <= this.max) {
|
22286
|
-
this._startPage = newStartPage;
|
22287
|
-
this._endPage = newEndPage;
|
22288
|
-
this._propagateChange();
|
22289
|
-
}
|
22290
|
-
}
|
22291
|
-
selectText(input) {
|
22292
|
-
if (this.disabled || !input) {
|
22293
|
-
return;
|
22294
|
-
}
|
22295
|
-
setTimeout(() => input.select(), 0);
|
22296
|
-
}
|
22297
|
-
_propagateChange() {
|
22298
|
-
this.onChange(new RangePage(this._startPage, this._endPage));
|
22299
|
-
this.onTouched();
|
22300
|
-
}
|
22301
|
-
};
|
22302
|
-
GIPIRangePageComponent.ctorParameters = () => [
|
22303
|
-
{ type: ElementRef },
|
22304
|
-
{ type: ChangeDetectorRef }
|
22305
|
-
];
|
22306
|
-
__decorate([
|
22307
|
-
Input(),
|
22308
|
-
__metadata("design:type", String)
|
22309
|
-
], GIPIRangePageComponent.prototype, "id", void 0);
|
22310
|
-
__decorate([
|
22311
|
-
Input(),
|
22312
|
-
__metadata("design:type", String)
|
22313
|
-
], GIPIRangePageComponent.prototype, "name", void 0);
|
22314
|
-
__decorate([
|
22315
|
-
Input(),
|
22316
|
-
__metadata("design:type", String)
|
22317
|
-
], GIPIRangePageComponent.prototype, "label", void 0);
|
22318
|
-
__decorate([
|
22319
|
-
Input(),
|
22320
|
-
__metadata("design:type", String)
|
22321
|
-
], GIPIRangePageComponent.prototype, "tooltip", void 0);
|
22322
|
-
__decorate([
|
22323
|
-
Input(),
|
22324
|
-
__metadata("design:type", String)
|
22325
|
-
], GIPIRangePageComponent.prototype, "placeholderStart", void 0);
|
22326
|
-
__decorate([
|
22327
|
-
Input(),
|
22328
|
-
__metadata("design:type", String)
|
22329
|
-
], GIPIRangePageComponent.prototype, "placeholderEnd", void 0);
|
22330
|
-
__decorate([
|
22331
|
-
Input(),
|
22332
|
-
__metadata("design:type", String)
|
22333
|
-
], GIPIRangePageComponent.prototype, "help", void 0);
|
22334
|
-
__decorate([
|
22335
|
-
Input(),
|
22336
|
-
__metadata("design:type", Number),
|
22337
|
-
__metadata("design:paramtypes", [Number])
|
22338
|
-
], GIPIRangePageComponent.prototype, "min", null);
|
22339
|
-
__decorate([
|
22340
|
-
Input(),
|
22341
|
-
__metadata("design:type", Number),
|
22342
|
-
__metadata("design:paramtypes", [Number])
|
22343
|
-
], GIPIRangePageComponent.prototype, "max", null);
|
22344
|
-
__decorate([
|
22345
|
-
Input(),
|
22346
|
-
__metadata("design:type", Number),
|
22347
|
-
__metadata("design:paramtypes", [Number])
|
22348
|
-
], GIPIRangePageComponent.prototype, "step", null);
|
22349
|
-
__decorate([
|
22350
|
-
Input(),
|
22351
|
-
__metadata("design:type", Boolean),
|
22352
|
-
__metadata("design:paramtypes", [Boolean])
|
22353
|
-
], GIPIRangePageComponent.prototype, "required", null);
|
22354
|
-
__decorate([
|
22355
|
-
Input(),
|
22356
|
-
__metadata("design:type", Boolean),
|
22357
|
-
__metadata("design:paramtypes", [Boolean])
|
22358
|
-
], GIPIRangePageComponent.prototype, "disabled", null);
|
22359
|
-
GIPIRangePageComponent = GIPIRangePageComponent_1 = __decorate([
|
22360
|
-
Component({
|
22361
|
-
selector: 'gipi-range-page',
|
22362
|
-
template: "<label *ngIf=\"label\"\n class=\"input-label\"\n [attr.for]=\"id\">\n {{ label }}\n <span *ngIf=\"required\"> * </span>\n <gipi-helpful-tip *ngIf=\"tooltip && label\"\n [tooltip]=\"tooltip\">\n </gipi-helpful-tip>\n</label>\n\n<div class=\"input-content\">\n <div class=\"prefix\"\n [class.disabled]=\"disabled\"\n (click)=\"previous()\">\n <mat-icon>chevron_left</mat-icon>\n </div>\n <input #startInput\n matInput\n class=\"input-element\"\n type=\"number\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [min]=\"min\"\n [max]=\"max\"\n [maxlength]=\"10\"\n [placeholder]=\"placeholderStart\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"false\"\n [autocomplete]=\"'off'\"\n [autofocus]=\"false\"\n [(ngModel)]=\"_startPage\"\n (keyup)=\"updateEndPage()\"\n (focus)=\"selectText(startInput)\"\n (click)=\"selectText(startInput)\" />\n <div class=\"infix\">\n a\n </div>\n <input #endInput\n matInput\n class=\"input-element\"\n type=\"number\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [min]=\"_startPage\"\n [max]=\"max\"\n [maxlength]=\"10\"\n [placeholder]=\"placeholderEnd\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"false\"\n [autocomplete]=\"'off'\"\n [autofocus]=\"false\"\n [(ngModel)]=\"_endPage\"\n (keyup)=\"updateStartPage()\"\n (focus)=\"selectText(endInput)\"\n (click)=\"selectText(endInput)\" />\n <div class=\"suffix\"\n [class.disabled]=\"disabled\"\n (click)=\"next()\">\n <mat-icon>chevron_right</mat-icon>\n </div>\n</div>\n\n<small *ngIf=\"help\"\n class=\"input-help\">\n {{ help }}\n</small>",
|
22363
|
-
providers: [
|
22364
|
-
{
|
22365
|
-
provide: NG_VALUE_ACCESSOR,
|
22366
|
-
useExisting: forwardRef(() => GIPIRangePageComponent_1),
|
22367
|
-
multi: true
|
22368
|
-
},
|
22369
|
-
],
|
22370
|
-
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}:host .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0;text-align:center;margin:0!important}:host .input-content .input-element::-webkit-inner-spin-button,:host .input-content .input-element::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;opacity:0}:host .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}:host .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}:host .input-content .input-element:disabled{cursor:not-allowed}:host .input-content .infix,:host .input-content .prefix,:host .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;padding-inline:.8rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:.2s;background-color:#e0313e}:host .input-content .infix>mat-icon,:host .input-content .prefix>mat-icon,:host .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#fff}:host .input-content .infix:not(.infix):not(.disabled):hover,:host .input-content .prefix:not(.infix):not(.disabled):hover,:host .input-content .suffix:not(.infix):not(.disabled):hover{background-color:#cc2d38}:host .input-content .infix:not(.infix):not(.disabled):active,:host .input-content .prefix:not(.infix):not(.disabled):active,:host .input-content .suffix:not(.infix):not(.disabled):active{background-color:#9f232c}:host .input-content .prefix.disabled,:host .input-content .suffix.disabled{background-color:#d1d2d4}:host .input-content .prefix.disabled>mat-icon,:host .input-content .suffix.disabled>mat-icon{color:#9a9da2}:host .input-content .prefix{border-right:1px solid rgba(0,0,0,.12);border-radius:.6rem 0 0 .6rem;cursor:pointer}:host .input-content .infix{width:1rem;padding:0;background-color:transparent}:host .input-content .suffix{border-left:1px solid rgba(0,0,0,.12);border-radius:0 .6rem .6rem 0;cursor:pointer}:host .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
22371
|
-
}),
|
22372
|
-
__metadata("design:paramtypes", [ElementRef,
|
22373
|
-
ChangeDetectorRef])
|
22374
|
-
], GIPIRangePageComponent);
|
22976
|
+
})
|
22977
|
+
], MonthYearPickerModule);
|
22375
22978
|
|
22376
|
-
var
|
22377
|
-
let nextUniqueId$
|
22378
|
-
let
|
22979
|
+
var GIPITextareaComponent_1;
|
22980
|
+
let nextUniqueId$m = 0;
|
22981
|
+
let GIPITextareaComponent = GIPITextareaComponent_1 = class GIPITextareaComponent {
|
22379
22982
|
constructor(elementRef, _changeDetectorRef) {
|
22380
22983
|
this.elementRef = elementRef;
|
22381
22984
|
this._changeDetectorRef = _changeDetectorRef;
|
22382
|
-
this._name = `gipi-
|
22985
|
+
this._name = `gipi-textarea-${nextUniqueId$m++}`;
|
22383
22986
|
this.id = this._name;
|
22384
22987
|
this.name = this._name;
|
22385
22988
|
this.label = '';
|
22989
|
+
this.placeholder = '';
|
22990
|
+
this.cols = 20;
|
22991
|
+
this.rows = 4;
|
22386
22992
|
this.help = '';
|
22387
|
-
this.
|
22388
|
-
this.
|
22389
|
-
this.
|
22390
|
-
this.
|
22391
|
-
this.
|
22392
|
-
this.
|
22393
|
-
this.
|
22993
|
+
this.maxlength = 254;
|
22994
|
+
this.minlength = 0;
|
22995
|
+
this._resize = 'horizontal';
|
22996
|
+
this._minHeight = '60px';
|
22997
|
+
this._height = '60px';
|
22998
|
+
this._maxHeight = 'auto';
|
22999
|
+
this._autocomplete = 'off';
|
23000
|
+
this._autofocus = false;
|
23001
|
+
this._readOnly = false;
|
22394
23002
|
this._required = false;
|
23003
|
+
this._disabled = false;
|
23004
|
+
this._lowerCase = false;
|
23005
|
+
this._upperCase = false;
|
23006
|
+
this._spaceDrop = false;
|
22395
23007
|
this.onChange = () => { };
|
22396
23008
|
this.onTouched = () => { };
|
22397
23009
|
}
|
22398
|
-
get
|
22399
|
-
return this.
|
23010
|
+
get resize() {
|
23011
|
+
return this._resize;
|
22400
23012
|
}
|
22401
|
-
set
|
22402
|
-
if (
|
22403
|
-
|
23013
|
+
set resize(value) {
|
23014
|
+
if (value !== this.resize) {
|
23015
|
+
this._resize = value.toLowerCase();
|
23016
|
+
this._changeDetectorRef.detectChanges();
|
22404
23017
|
}
|
22405
|
-
this._maxRange = value || 5;
|
22406
23018
|
}
|
22407
|
-
get
|
22408
|
-
return this.
|
23019
|
+
get minHeight() {
|
23020
|
+
return this._minHeight;
|
22409
23021
|
}
|
22410
|
-
set
|
22411
|
-
if (
|
22412
|
-
|
23022
|
+
set minHeight(value) {
|
23023
|
+
if (value.trim().toUpperCase() === 'AUTO') {
|
23024
|
+
this._minHeight = 'auto';
|
23025
|
+
}
|
23026
|
+
else {
|
23027
|
+
this._minHeight = coerceCssPixelValue(value);
|
22413
23028
|
}
|
22414
|
-
this._fromValue = value || 1;
|
22415
23029
|
}
|
22416
|
-
get
|
22417
|
-
return this.
|
23030
|
+
get height() {
|
23031
|
+
return this._height;
|
22418
23032
|
}
|
22419
|
-
set
|
22420
|
-
if (
|
22421
|
-
|
23033
|
+
set height(value) {
|
23034
|
+
if (value.trim().toUpperCase() === 'AUTO') {
|
23035
|
+
this._height = 'auto';
|
23036
|
+
}
|
23037
|
+
else {
|
23038
|
+
this._height = coerceCssPixelValue(value);
|
22422
23039
|
}
|
22423
|
-
this._toValue = value || 1;
|
22424
23040
|
}
|
22425
|
-
get
|
22426
|
-
return this.
|
23041
|
+
get maxHeight() {
|
23042
|
+
return this._maxHeight;
|
22427
23043
|
}
|
22428
|
-
set
|
22429
|
-
if (
|
22430
|
-
|
23044
|
+
set maxHeight(value) {
|
23045
|
+
if (value.trim().toUpperCase() === 'AUTO') {
|
23046
|
+
this._maxHeight = 'auto';
|
23047
|
+
}
|
23048
|
+
else {
|
23049
|
+
this._maxHeight = coerceCssPixelValue(value);
|
22431
23050
|
}
|
22432
|
-
this._step = value || 1;
|
22433
23051
|
}
|
22434
|
-
get
|
22435
|
-
return this.
|
23052
|
+
get autocomplete() {
|
23053
|
+
return this._autocomplete;
|
22436
23054
|
}
|
22437
|
-
set
|
22438
|
-
this.
|
23055
|
+
set autocomplete(value) {
|
23056
|
+
this._autocomplete = value;
|
23057
|
+
}
|
23058
|
+
get autofocus() {
|
23059
|
+
return this._autofocus;
|
23060
|
+
}
|
23061
|
+
set autofocus(value) {
|
23062
|
+
this._autofocus = coerceBooleanProperty(value);
|
23063
|
+
}
|
23064
|
+
get readOnly() {
|
23065
|
+
return this._readOnly;
|
23066
|
+
}
|
23067
|
+
set readOnly(value) {
|
23068
|
+
this._readOnly = coerceBooleanProperty(value);
|
22439
23069
|
}
|
22440
23070
|
get required() {
|
22441
23071
|
return this._required;
|
@@ -22443,275 +23073,201 @@ let GIPIRangeSliderComponent = GIPIRangeSliderComponent_1 = class GIPIRangeSlide
|
|
22443
23073
|
set required(value) {
|
22444
23074
|
this._required = coerceBooleanProperty(value);
|
22445
23075
|
}
|
22446
|
-
|
22447
|
-
|
22448
|
-
this._fillSlider();
|
22449
|
-
this._setToggleAccessible();
|
23076
|
+
get disabled() {
|
23077
|
+
return this._disabled;
|
22450
23078
|
}
|
22451
|
-
|
22452
|
-
|
22453
|
-
if (value) {
|
22454
|
-
this.fromValue = value.from;
|
22455
|
-
this.toValue = value.to;
|
22456
|
-
if (this.fromSlider && this.toSlider) {
|
22457
|
-
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
22458
|
-
this.toSlider.nativeElement.value = this.toValue.toString();
|
22459
|
-
this._fillSlider();
|
22460
|
-
this._setToggleAccessible();
|
22461
|
-
}
|
22462
|
-
}
|
23079
|
+
set disabled(value) {
|
23080
|
+
this._disabled = coerceBooleanProperty(value);
|
22463
23081
|
}
|
22464
|
-
|
22465
|
-
this.
|
23082
|
+
get lowerCase() {
|
23083
|
+
return this._lowerCase;
|
22466
23084
|
}
|
22467
|
-
|
22468
|
-
this.
|
23085
|
+
set lowerCase(value) {
|
23086
|
+
this._lowerCase = coerceBooleanProperty(value);
|
22469
23087
|
}
|
22470
|
-
|
22471
|
-
this.
|
22472
|
-
this._changeDetectorRef.markForCheck();
|
23088
|
+
get upperCase() {
|
23089
|
+
return this._upperCase;
|
22473
23090
|
}
|
22474
|
-
|
22475
|
-
|
22476
|
-
from = this._roundToStep(from);
|
22477
|
-
to = this._roundToStep(to);
|
22478
|
-
// if ((to - from) > this.maxRange) {
|
22479
|
-
// from = to - this.maxRange;
|
22480
|
-
// }
|
22481
|
-
this._fillSlider();
|
22482
|
-
this._setToggleAccessible();
|
22483
|
-
if (from > to) {
|
22484
|
-
this.fromValue = to;
|
22485
|
-
}
|
22486
|
-
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
22487
|
-
this._notifyValueChange();
|
23091
|
+
set upperCase(value) {
|
23092
|
+
this._upperCase = coerceBooleanProperty(value);
|
22488
23093
|
}
|
22489
|
-
|
22490
|
-
|
22491
|
-
from = this._roundToStep(from);
|
22492
|
-
to = this._roundToStep(to);
|
22493
|
-
// if ((to - from) > this.maxRange) {
|
22494
|
-
// to = from + this.maxRange;
|
22495
|
-
// }
|
22496
|
-
this._fillSlider();
|
22497
|
-
this._setToggleAccessible();
|
22498
|
-
if (from <= to) {
|
22499
|
-
this.toValue = to;
|
22500
|
-
}
|
22501
|
-
else {
|
22502
|
-
this.toValue = from;
|
22503
|
-
}
|
22504
|
-
this.toSlider.nativeElement.value = this.toValue.toString();
|
22505
|
-
this._notifyValueChange();
|
23094
|
+
get spaceDrop() {
|
23095
|
+
return this._spaceDrop;
|
22506
23096
|
}
|
22507
|
-
|
22508
|
-
|
22509
|
-
from = this._roundToStep(from);
|
22510
|
-
to = this._roundToStep(to);
|
22511
|
-
if ((to - from) > this.maxRange) {
|
22512
|
-
from = to - this.maxRange;
|
22513
|
-
}
|
22514
|
-
this._fillSlider();
|
22515
|
-
this._setToggleAccessible();
|
22516
|
-
if ((to - from) === this.maxRange) {
|
22517
|
-
let [from, to] = this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
22518
|
-
from = this._roundToStep(from);
|
22519
|
-
to = this._roundToStep(to);
|
22520
|
-
if ((to - from) > this.maxRange) {
|
22521
|
-
to = from + this.maxRange;
|
22522
|
-
}
|
22523
|
-
this._fillSlider();
|
22524
|
-
if (from <= to) {
|
22525
|
-
this.toValue = to;
|
22526
|
-
}
|
22527
|
-
else {
|
22528
|
-
this.toValue = from;
|
22529
|
-
}
|
22530
|
-
this.toSlider.nativeElement.value = this.toValue.toString();
|
22531
|
-
}
|
22532
|
-
if (from >= to) {
|
22533
|
-
this.fromValue = to;
|
22534
|
-
}
|
22535
|
-
else {
|
22536
|
-
this.fromValue = from;
|
22537
|
-
}
|
22538
|
-
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
22539
|
-
this._notifyValueChange();
|
23097
|
+
set spaceDrop(value) {
|
23098
|
+
this._spaceDrop = coerceBooleanProperty(value);
|
22540
23099
|
}
|
22541
|
-
|
22542
|
-
|
22543
|
-
from = this._roundToStep(from);
|
22544
|
-
to = this._roundToStep(to);
|
22545
|
-
if ((to - from) > this.maxRange) {
|
22546
|
-
to = from + this.maxRange;
|
22547
|
-
}
|
22548
|
-
this._fillSlider();
|
22549
|
-
this._setToggleAccessible();
|
22550
|
-
if ((to - from) === this.maxRange) {
|
22551
|
-
let [from, to] = this._getParsed(this.fromSlider.nativeElement, this.toSlider.nativeElement);
|
22552
|
-
from = this._roundToStep(from);
|
22553
|
-
to = this._roundToStep(to);
|
22554
|
-
if ((to - from) > this.maxRange) {
|
22555
|
-
from = to - this.maxRange;
|
22556
|
-
}
|
22557
|
-
this._fillSlider();
|
22558
|
-
if (from >= to) {
|
22559
|
-
this.fromValue = to;
|
22560
|
-
}
|
22561
|
-
else {
|
22562
|
-
this.fromValue = from;
|
22563
|
-
}
|
22564
|
-
this.fromSlider.nativeElement.value = this.fromValue.toString();
|
22565
|
-
}
|
22566
|
-
if (from <= to) {
|
22567
|
-
this.toValue = to;
|
22568
|
-
}
|
22569
|
-
else {
|
22570
|
-
this.toValue = from;
|
22571
|
-
}
|
22572
|
-
this.toSlider.nativeElement.value = this.toValue.toString();
|
22573
|
-
this._notifyValueChange();
|
23100
|
+
get value() {
|
23101
|
+
return this._value;
|
22574
23102
|
}
|
22575
|
-
|
22576
|
-
|
22577
|
-
|
22578
|
-
|
23103
|
+
set value(value) {
|
23104
|
+
let valueAux = value;
|
23105
|
+
valueAux = this._checkSpaceDrop(valueAux);
|
23106
|
+
valueAux = this._checkLowercase(valueAux);
|
23107
|
+
valueAux = this._checkUppercase(valueAux);
|
23108
|
+
this._value = valueAux;
|
23109
|
+
this.onChange(this._value);
|
23110
|
+
this.onTouched(this._value);
|
22579
23111
|
}
|
22580
|
-
|
22581
|
-
|
22582
|
-
|
22583
|
-
const rangeDistance = Number(toSliderEl.max) - Number(toSliderEl.min);
|
22584
|
-
const fromPosition = (this.fromValue - Number(fromSliderEl.min));
|
22585
|
-
const toPosition = (this.toValue - Number(toSliderEl.min));
|
22586
|
-
const sliderColor = '#e0e1e2';
|
22587
|
-
const rangeColor = '#f1a0a6';
|
22588
|
-
toSliderEl.style.background = `linear-gradient(
|
22589
|
-
to right,
|
22590
|
-
${sliderColor} 0%,
|
22591
|
-
${sliderColor} ${(fromPosition) / (rangeDistance) * 100}%,
|
22592
|
-
${rangeColor} ${((fromPosition) / (rangeDistance)) * 100}%,
|
22593
|
-
${rangeColor} ${(toPosition) / (rangeDistance) * 100}%,
|
22594
|
-
${sliderColor} ${(toPosition) / (rangeDistance) * 100}%,
|
22595
|
-
${sliderColor} 100%)`;
|
23112
|
+
ngOnInit() { }
|
23113
|
+
writeValue(value) {
|
23114
|
+
this._value = value;
|
22596
23115
|
}
|
22597
|
-
|
22598
|
-
|
22599
|
-
|
22600
|
-
|
22601
|
-
|
22602
|
-
|
22603
|
-
|
22604
|
-
|
22605
|
-
|
22606
|
-
}
|
22607
|
-
else if (fromValue >= parseInt(fromInput.max, 10) && toValue >= parseInt(toInput.max, 10)) {
|
22608
|
-
// Ambos estão no máximo
|
22609
|
-
fromInput.style.zIndex = '2';
|
22610
|
-
toInput.style.zIndex = '1';
|
22611
|
-
}
|
22612
|
-
else {
|
22613
|
-
// Caso geral
|
22614
|
-
fromInput.style.zIndex = '2';
|
22615
|
-
toInput.style.zIndex = '1';
|
22616
|
-
}
|
23116
|
+
registerOnChange(fn) {
|
23117
|
+
this.onChange = fn;
|
23118
|
+
}
|
23119
|
+
registerOnTouched(fn) {
|
23120
|
+
this.onTouched = fn;
|
23121
|
+
}
|
23122
|
+
setDisabledState(isDisabled) {
|
23123
|
+
this.disabled = isDisabled;
|
23124
|
+
this._changeDetectorRef.markForCheck();
|
22617
23125
|
}
|
22618
|
-
|
22619
|
-
|
23126
|
+
_checkSpaceDrop(value) {
|
23127
|
+
if (this.spaceDrop && value) {
|
23128
|
+
return value.replace(/\s/g, '');
|
23129
|
+
}
|
23130
|
+
return value;
|
22620
23131
|
}
|
22621
|
-
|
22622
|
-
|
23132
|
+
_checkUppercase(value) {
|
23133
|
+
if (this.upperCase && value) {
|
23134
|
+
return value.toUpperCase();
|
23135
|
+
}
|
23136
|
+
return value;
|
22623
23137
|
}
|
22624
|
-
|
22625
|
-
this.
|
23138
|
+
_checkLowercase(value) {
|
23139
|
+
if (this.lowerCase && value) {
|
23140
|
+
return value.toLowerCase();
|
23141
|
+
}
|
23142
|
+
return value;
|
22626
23143
|
}
|
22627
23144
|
};
|
22628
|
-
|
23145
|
+
GIPITextareaComponent.ctorParameters = () => [
|
22629
23146
|
{ type: ElementRef },
|
22630
23147
|
{ type: ChangeDetectorRef }
|
22631
23148
|
];
|
22632
23149
|
__decorate([
|
22633
|
-
|
22634
|
-
__metadata("design:type",
|
22635
|
-
],
|
22636
|
-
__decorate([
|
22637
|
-
ViewChild('toSlider', { static: false }),
|
22638
|
-
__metadata("design:type", ElementRef)
|
22639
|
-
], GIPIRangeSliderComponent.prototype, "toSlider", void 0);
|
23150
|
+
Input(),
|
23151
|
+
__metadata("design:type", String)
|
23152
|
+
], GIPITextareaComponent.prototype, "id", void 0);
|
22640
23153
|
__decorate([
|
22641
23154
|
Input(),
|
22642
23155
|
__metadata("design:type", String)
|
22643
|
-
],
|
23156
|
+
], GIPITextareaComponent.prototype, "name", void 0);
|
22644
23157
|
__decorate([
|
22645
23158
|
Input(),
|
22646
23159
|
__metadata("design:type", String)
|
22647
|
-
],
|
23160
|
+
], GIPITextareaComponent.prototype, "label", void 0);
|
22648
23161
|
__decorate([
|
22649
23162
|
Input(),
|
22650
23163
|
__metadata("design:type", String)
|
22651
|
-
],
|
23164
|
+
], GIPITextareaComponent.prototype, "placeholder", void 0);
|
23165
|
+
__decorate([
|
23166
|
+
Input(),
|
23167
|
+
__metadata("design:type", Number)
|
23168
|
+
], GIPITextareaComponent.prototype, "cols", void 0);
|
23169
|
+
__decorate([
|
23170
|
+
Input(),
|
23171
|
+
__metadata("design:type", Number)
|
23172
|
+
], GIPITextareaComponent.prototype, "rows", void 0);
|
22652
23173
|
__decorate([
|
22653
23174
|
Input(),
|
22654
23175
|
__metadata("design:type", String)
|
22655
|
-
],
|
23176
|
+
], GIPITextareaComponent.prototype, "help", void 0);
|
22656
23177
|
__decorate([
|
22657
23178
|
Input(),
|
22658
23179
|
__metadata("design:type", Number)
|
22659
|
-
],
|
23180
|
+
], GIPITextareaComponent.prototype, "maxlength", void 0);
|
22660
23181
|
__decorate([
|
22661
23182
|
Input(),
|
22662
23183
|
__metadata("design:type", Number)
|
22663
|
-
],
|
23184
|
+
], GIPITextareaComponent.prototype, "minlength", void 0);
|
22664
23185
|
__decorate([
|
22665
23186
|
Input(),
|
22666
|
-
__metadata("design:type",
|
22667
|
-
__metadata("design:paramtypes", [
|
22668
|
-
],
|
23187
|
+
__metadata("design:type", String),
|
23188
|
+
__metadata("design:paramtypes", [String])
|
23189
|
+
], GIPITextareaComponent.prototype, "resize", null);
|
22669
23190
|
__decorate([
|
22670
|
-
Input(
|
22671
|
-
__metadata("design:type",
|
22672
|
-
__metadata("design:paramtypes", [
|
22673
|
-
],
|
23191
|
+
Input(),
|
23192
|
+
__metadata("design:type", String),
|
23193
|
+
__metadata("design:paramtypes", [String])
|
23194
|
+
], GIPITextareaComponent.prototype, "minHeight", null);
|
22674
23195
|
__decorate([
|
22675
|
-
Input(
|
22676
|
-
__metadata("design:type",
|
22677
|
-
__metadata("design:paramtypes", [
|
22678
|
-
],
|
23196
|
+
Input(),
|
23197
|
+
__metadata("design:type", String),
|
23198
|
+
__metadata("design:paramtypes", [String])
|
23199
|
+
], GIPITextareaComponent.prototype, "height", null);
|
22679
23200
|
__decorate([
|
22680
23201
|
Input(),
|
22681
|
-
__metadata("design:type",
|
22682
|
-
__metadata("design:paramtypes", [
|
22683
|
-
],
|
23202
|
+
__metadata("design:type", String),
|
23203
|
+
__metadata("design:paramtypes", [String])
|
23204
|
+
], GIPITextareaComponent.prototype, "maxHeight", null);
|
23205
|
+
__decorate([
|
23206
|
+
Input(),
|
23207
|
+
__metadata("design:type", String),
|
23208
|
+
__metadata("design:paramtypes", [String])
|
23209
|
+
], GIPITextareaComponent.prototype, "autocomplete", null);
|
22684
23210
|
__decorate([
|
22685
23211
|
Input(),
|
22686
23212
|
__metadata("design:type", Boolean),
|
22687
23213
|
__metadata("design:paramtypes", [Boolean])
|
22688
|
-
],
|
23214
|
+
], GIPITextareaComponent.prototype, "autofocus", null);
|
22689
23215
|
__decorate([
|
22690
23216
|
Input(),
|
22691
23217
|
__metadata("design:type", Boolean),
|
22692
23218
|
__metadata("design:paramtypes", [Boolean])
|
22693
|
-
],
|
22694
|
-
|
23219
|
+
], GIPITextareaComponent.prototype, "readOnly", null);
|
23220
|
+
__decorate([
|
23221
|
+
Input(),
|
23222
|
+
__metadata("design:type", Boolean),
|
23223
|
+
__metadata("design:paramtypes", [Boolean])
|
23224
|
+
], GIPITextareaComponent.prototype, "required", null);
|
23225
|
+
__decorate([
|
23226
|
+
Input(),
|
23227
|
+
__metadata("design:type", Boolean),
|
23228
|
+
__metadata("design:paramtypes", [Boolean])
|
23229
|
+
], GIPITextareaComponent.prototype, "disabled", null);
|
23230
|
+
__decorate([
|
23231
|
+
Input(),
|
23232
|
+
__metadata("design:type", Boolean),
|
23233
|
+
__metadata("design:paramtypes", [Boolean])
|
23234
|
+
], GIPITextareaComponent.prototype, "lowerCase", null);
|
23235
|
+
__decorate([
|
23236
|
+
Input(),
|
23237
|
+
__metadata("design:type", Boolean),
|
23238
|
+
__metadata("design:paramtypes", [Boolean])
|
23239
|
+
], GIPITextareaComponent.prototype, "upperCase", null);
|
23240
|
+
__decorate([
|
23241
|
+
Input(),
|
23242
|
+
__metadata("design:type", Boolean),
|
23243
|
+
__metadata("design:paramtypes", [Boolean])
|
23244
|
+
], GIPITextareaComponent.prototype, "spaceDrop", null);
|
23245
|
+
__decorate([
|
23246
|
+
Input(),
|
23247
|
+
__metadata("design:type", Object),
|
23248
|
+
__metadata("design:paramtypes", [Object])
|
23249
|
+
], GIPITextareaComponent.prototype, "value", null);
|
23250
|
+
GIPITextareaComponent = GIPITextareaComponent_1 = __decorate([
|
22695
23251
|
Component({
|
22696
|
-
selector: 'gipi-
|
22697
|
-
exportAs: '
|
22698
|
-
template: "<label
|
23252
|
+
selector: 'gipi-textarea',
|
23253
|
+
exportAs: 'gipiTextarea',
|
23254
|
+
template: "<label class=\"textarea-label\"\n *ngIf=\"label\"\n [attr.for]=\"id\">\n {{ label }}\n <span *ngIf=\"required\"> * </span>\n</label>\n\n<textarea class=\"textarea-element\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [placeholder]=\"placeholder\"\n [cols]=\"cols\"\n [rows]=\"rows\"\n [class.resize-none]=\"resize === 'none'\"\n [class.resize-both]=\"resize === 'both'\"\n [class.resize-horizontal]=\"resize === 'horizontal'\"\n [class.resize-vertical]=\"resize === 'vertical'\"\n [style.min-height.px]=\"minHeight\"\n [style.height.px]=\"height\"\n [style.max-height.px]=\"maxHeight\"\n [minlength]=\"minlength\"\n [maxlength]=\"maxlength\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"readOnly\"\n [attr.autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [(ngModel)]=\"value\"\n [value]=\"value\">\n </textarea>\n\n<small *ngIf=\"help\"\n class=\"textarea-help\">\n {{ help }}\n</small>",
|
22699
23255
|
providers: [
|
22700
23256
|
{
|
22701
23257
|
provide: NG_VALUE_ACCESSOR,
|
22702
|
-
useExisting: forwardRef(() =>
|
23258
|
+
useExisting: forwardRef(() => GIPITextareaComponent_1),
|
22703
23259
|
multi: true
|
22704
|
-
}
|
23260
|
+
}
|
22705
23261
|
],
|
22706
23262
|
host: {
|
22707
|
-
'class': 'gipi-
|
23263
|
+
'class': 'gipi-textarea',
|
22708
23264
|
},
|
22709
23265
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
22710
|
-
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .
|
23266
|
+
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .textarea-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .textarea-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .textarea-element{display:flex;font-family:inherit;font-size:inherit;color:inherit;padding:.75rem .8rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:6px;caret-color:#696969;max-height:12rem;min-height:6rem;resize:vertical;outline:0;overflow:auto}:host .textarea-element:not(:disabled):hover{border-color:#6d6f73}:host .textarea-element:not(:disabled).ng-dirty.ng-invalid:enabled:hover,:host .textarea-element:not(:disabled):invalid:enabled:hover{border-color:#e07f62}:host .textarea-element:not(:disabled):enabled:focus{outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}:host .textarea-element:not(:disabled).ng-dirty.ng-invalid:enabled,:host .textarea-element:not(:disabled):invalid:enabled{border-color:#d14014}:host .textarea-element:not(:disabled).ng-dirty.ng-invalid:enabled:focus,:host .textarea-element:not(:disabled):invalid:enabled:focus{outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #f1c4b6;border-color:#d14014}:host .textarea-element:disabled{color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}:host .textarea-element.resize-none{resize:none}:host .textarea-element.resize-both{resize:both}:host .textarea-element.resize-horizontal{resize:horizontal}:host .textarea-element.resize-vertical{resize:vertical}:host .textarea-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
22711
23267
|
}),
|
22712
23268
|
__metadata("design:paramtypes", [ElementRef,
|
22713
23269
|
ChangeDetectorRef])
|
22714
|
-
],
|
23270
|
+
], GIPITextareaComponent);
|
22715
23271
|
|
22716
23272
|
let INJECTOR;
|
22717
23273
|
const GIPIComponents = [
|
@@ -22754,6 +23310,13 @@ const GIPIComponents = [
|
|
22754
23310
|
GIPIBadgeComponent,
|
22755
23311
|
GIPIRangeSliderComponent,
|
22756
23312
|
GIPIRangePageComponent,
|
23313
|
+
GIPISlideToggleComponent,
|
23314
|
+
GIPIEmptyStateComponent,
|
23315
|
+
GIPICardComponent,
|
23316
|
+
GIPITextareaComponent,
|
23317
|
+
// Tabs
|
23318
|
+
GIPITabGroupComponent,
|
23319
|
+
GIPITabComponent,
|
22757
23320
|
// Table
|
22758
23321
|
GIPITableHeaderComponent,
|
22759
23322
|
GIPITableBodyComponent,
|
@@ -22769,6 +23332,7 @@ const GIPIDirectives = [
|
|
22769
23332
|
GIPIFileDragAndDropDirective,
|
22770
23333
|
GIPIInfiniteScrollDirective,
|
22771
23334
|
GIPIPaginationControlsDirective,
|
23335
|
+
GIPIDynamicTabDirective,
|
22772
23336
|
];
|
22773
23337
|
const GIPIPipes = [
|
22774
23338
|
GIPIPaginatePipe,
|
@@ -22817,9 +23381,6 @@ SharedModule = __decorate([
|
|
22817
23381
|
RadioGroupEntityComponent,
|
22818
23382
|
RadioGroupEnumComponent,
|
22819
23383
|
SlideToggleComponent,
|
22820
|
-
TabGroupComponent,
|
22821
|
-
TabComponent,
|
22822
|
-
DynamicTabDirective,
|
22823
23384
|
IconComponent,
|
22824
23385
|
StepperComponent,
|
22825
23386
|
TextareaComponent,
|
@@ -22832,7 +23393,6 @@ SharedModule = __decorate([
|
|
22832
23393
|
SpaceDropDirective,
|
22833
23394
|
OverlayPanelComponent,
|
22834
23395
|
ItssTemplate,
|
22835
|
-
SelectButtonComponent,
|
22836
23396
|
SelectMonthPeriodComponent,
|
22837
23397
|
InputSelectInfiniteScrollDirective,
|
22838
23398
|
TableScrolledComponent,
|
@@ -22884,8 +23444,6 @@ SharedModule = __decorate([
|
|
22884
23444
|
RadioGroupEntityComponent,
|
22885
23445
|
RadioGroupEnumComponent,
|
22886
23446
|
SlideToggleComponent,
|
22887
|
-
TabGroupComponent,
|
22888
|
-
TabComponent,
|
22889
23447
|
IconComponent,
|
22890
23448
|
StepperComponent,
|
22891
23449
|
TextareaComponent,
|
@@ -22895,7 +23453,6 @@ SharedModule = __decorate([
|
|
22895
23453
|
MentionModule,
|
22896
23454
|
OverlayPanelComponent,
|
22897
23455
|
ItssTemplate,
|
22898
|
-
SelectButtonComponent,
|
22899
23456
|
SelectMonthPeriodComponent,
|
22900
23457
|
InputSelectInfiniteScrollDirective,
|
22901
23458
|
TableScrolledComponent,
|
@@ -22910,8 +23467,8 @@ SharedModule = __decorate([
|
|
22910
23467
|
],
|
22911
23468
|
entryComponents: [
|
22912
23469
|
GIPIConfirmationDialogComponent,
|
22913
|
-
|
22914
|
-
|
23470
|
+
GIPITabGroupComponent,
|
23471
|
+
GIPITabComponent,
|
22915
23472
|
PopoverComponent,
|
22916
23473
|
],
|
22917
23474
|
providers: [
|
@@ -23685,33 +24242,27 @@ class GIPIAbstractCrudService extends GIPIAbstractService {
|
|
23685
24242
|
return this.baseService.httpClient.post(this.url('find-all', version), filter, this.options()).pipe(map(this.handleMapper), takeUntil(this.handleDestroy), catchError(this.handleError));
|
23686
24243
|
}
|
23687
24244
|
findAllEnabled(page, size, version) {
|
23688
|
-
|
23689
|
-
|
23690
|
-
|
23691
|
-
|
23692
|
-
|
23693
|
-
}
|
23694
|
-
return this.baseService.httpClient.get(this.url(`find-all-enabled
|
24245
|
+
const validatedPage = Math.max(page, 0);
|
24246
|
+
const validatedSize = Math.max(size, 10);
|
24247
|
+
const params = new URLSearchParams();
|
24248
|
+
params.set('page', validatedPage.toString());
|
24249
|
+
params.set('size', validatedSize.toString());
|
24250
|
+
const queryString = !StringUtil.isEmpty(params.toString()) ? `?${params.toString()}` : '';
|
24251
|
+
return this.baseService.httpClient.get(this.url(`find-all-enabled${queryString}`, version), this.options()).pipe(map(this.handleMapper), takeUntil(this.handleDestroy), catchError(this.handleError));
|
23695
24252
|
}
|
23696
24253
|
findByValue(value, page, size, sort, version) {
|
23697
|
-
|
23698
|
-
|
23699
|
-
|
23700
|
-
|
23701
|
-
|
23702
|
-
|
23703
|
-
|
23704
|
-
if ((!page) || (page && (page < 0))) {
|
23705
|
-
page = 0;
|
23706
|
-
}
|
23707
|
-
if ((!size) || (size && (size <= 0))) {
|
23708
|
-
size = 10;
|
23709
|
-
}
|
23710
|
-
let lSort = '';
|
24254
|
+
const formattedValue = !StringUtil.isEmpty(value) ? value.trim() : '';
|
24255
|
+
const validatedPage = Math.max(page, 0);
|
24256
|
+
const validatedSize = Math.max(size, 10);
|
24257
|
+
const params = new URLSearchParams();
|
24258
|
+
params.set('value', formattedValue);
|
24259
|
+
params.set('page', validatedPage.toString());
|
24260
|
+
params.set('size', validatedSize.toString());
|
23711
24261
|
if (!ObjectUtil.isNull(sort) && !StringUtil.isEmpty(sort.field)) {
|
23712
|
-
|
24262
|
+
params.set('sort', `${sort.field},${sort.direction}`);
|
23713
24263
|
}
|
23714
|
-
|
24264
|
+
const queryString = !StringUtil.isEmpty(params.toString()) ? `?${params.toString()}` : '';
|
24265
|
+
return this.baseService.httpClient.get(this.url(`find-by-value${queryString}`, version), this.options()).pipe(map(this.handleMapper), takeUntil(this.handleDestroy), catchError(this.handleError));
|
23715
24266
|
}
|
23716
24267
|
/**
|
23717
24268
|
* Refers to the enable-or-disable endpoint
|
@@ -24849,6 +25400,15 @@ class MenuDTO extends AbstractDTO {
|
|
24849
25400
|
}
|
24850
25401
|
}
|
24851
25402
|
|
25403
|
+
class TabDTO extends AbstractDTO {
|
25404
|
+
constructor() {
|
25405
|
+
super(...arguments);
|
25406
|
+
this.active = false;
|
25407
|
+
this.closeable = false;
|
25408
|
+
this.disabled = false;
|
25409
|
+
}
|
25410
|
+
}
|
25411
|
+
|
24852
25412
|
class TableColumnDTO extends AbstractDTO {
|
24853
25413
|
constructor(name, property, value, sortable, hiddenSm, visible, width, marginLeft, marginRight, align, template, templateHeader, sliceLength, action) {
|
24854
25414
|
super();
|
@@ -25244,128 +25804,6 @@ class EmailUtil {
|
|
25244
25804
|
}
|
25245
25805
|
}
|
25246
25806
|
|
25247
|
-
/** @dynamic */
|
25248
|
-
class PhoneUtil {
|
25249
|
-
static removeCharacters(value) {
|
25250
|
-
if (StringUtil.isEmpty(value)) {
|
25251
|
-
return '';
|
25252
|
-
}
|
25253
|
-
return value.replace(/\D/g, '');
|
25254
|
-
}
|
25255
|
-
static maskLib(phoneNumber, state, country = 'BR') {
|
25256
|
-
let exampleNumber;
|
25257
|
-
if (!StringUtil.isEmpty(phoneNumber)) {
|
25258
|
-
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
25259
|
-
if (parsedNumber) {
|
25260
|
-
exampleNumber = parsedNumber;
|
25261
|
-
}
|
25262
|
-
}
|
25263
|
-
else {
|
25264
|
-
exampleNumber = getExampleNumber(country, state);
|
25265
|
-
}
|
25266
|
-
if (exampleNumber) {
|
25267
|
-
const formattedNumber = exampleNumber.formatNational();
|
25268
|
-
return formattedNumber.replace(/\d/g, '0');
|
25269
|
-
}
|
25270
|
-
else {
|
25271
|
-
throw new Error('Estado não suportado ou código de estado inválido.');
|
25272
|
-
}
|
25273
|
-
}
|
25274
|
-
static formatLib(phoneNumber, country = 'BR') {
|
25275
|
-
try {
|
25276
|
-
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
25277
|
-
if (parsedNumber) {
|
25278
|
-
return parsedNumber.formatNational();
|
25279
|
-
}
|
25280
|
-
else {
|
25281
|
-
throw new Error('Número de telefone inválido.');
|
25282
|
-
}
|
25283
|
-
}
|
25284
|
-
catch (error) {
|
25285
|
-
throw new Error('Erro ao formatar o número de telefone: ' + error.message);
|
25286
|
-
}
|
25287
|
-
}
|
25288
|
-
static format(number, mask) {
|
25289
|
-
let numberNotFormatted = NumberUtil.onlyNumbers(number);
|
25290
|
-
let phoneFormatted = '';
|
25291
|
-
if ((numberNotFormatted.length < 8) ||
|
25292
|
-
(numberNotFormatted.length > 12) ||
|
25293
|
-
(!this.isPossible(numberNotFormatted) && !this.isValid(numberNotFormatted))) {
|
25294
|
-
return numberNotFormatted;
|
25295
|
-
}
|
25296
|
-
if (StringUtil.isEmpty(mask)) {
|
25297
|
-
mask = this.mask(numberNotFormatted);
|
25298
|
-
}
|
25299
|
-
for (let i = 0, j = 0; i < mask.length && j < numberNotFormatted.length; i++) {
|
25300
|
-
phoneFormatted += mask.charAt(i) === '0' ? numberNotFormatted.charAt(j++) : mask.charAt(i);
|
25301
|
-
}
|
25302
|
-
return phoneFormatted;
|
25303
|
-
}
|
25304
|
-
static mask(phone) {
|
25305
|
-
const specialPrefixes = ['0900', '0800', '0700', '0600', '0500', '0400', '0300', '0200', '0100'];
|
25306
|
-
let phoneAux = this.removeCharacters(phone.replace(/\D/g, ''));
|
25307
|
-
if ((phoneAux.length < 8) ||
|
25308
|
-
(phoneAux.length > 12) ||
|
25309
|
-
(!this.isPossible(phoneAux) && !this.isValid(phoneAux))) {
|
25310
|
-
return '0*';
|
25311
|
-
}
|
25312
|
-
const existInArray = specialPrefixes.some(prefix => phoneAux.startsWith(prefix));
|
25313
|
-
if (existInArray) {
|
25314
|
-
return '0000 000 0000'; // Para números especiais como 0800
|
25315
|
-
}
|
25316
|
-
switch (phoneAux.length) {
|
25317
|
-
case 8: return '0000-0000';
|
25318
|
-
case 9: return '0 0000-0000';
|
25319
|
-
case 10: return '(00) 0000-0000';
|
25320
|
-
case 11: return '(00) 0 0000-0000';
|
25321
|
-
case 12: return '(000) 0 0000-0000';
|
25322
|
-
default: return '0*';
|
25323
|
-
}
|
25324
|
-
}
|
25325
|
-
static isPossible(phoneNumber, country = 'BR') {
|
25326
|
-
try {
|
25327
|
-
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
25328
|
-
return parsedNumber ? parsedNumber.isPossible() : false;
|
25329
|
-
}
|
25330
|
-
catch (error) {
|
25331
|
-
return false;
|
25332
|
-
}
|
25333
|
-
}
|
25334
|
-
static isValid(phoneNumber, country = 'BR') {
|
25335
|
-
try {
|
25336
|
-
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
25337
|
-
return parsedNumber ? parsedNumber.isValid() : false;
|
25338
|
-
}
|
25339
|
-
catch (error) {
|
25340
|
-
return false;
|
25341
|
-
}
|
25342
|
-
}
|
25343
|
-
static getType(phoneNumber, country = 'BR') {
|
25344
|
-
try {
|
25345
|
-
const parsedNumber = parsePhoneNumberFromString(phoneNumber, country);
|
25346
|
-
return parsedNumber ? parsedNumber.getType() : null;
|
25347
|
-
}
|
25348
|
-
catch (error) {
|
25349
|
-
return null;
|
25350
|
-
}
|
25351
|
-
}
|
25352
|
-
static isEqual(phoneNumber1, phoneNumber2, country = 'BR') {
|
25353
|
-
try {
|
25354
|
-
const parsedNumber1 = parsePhoneNumberFromString(phoneNumber1, country);
|
25355
|
-
const parsedNumber2 = parsePhoneNumberFromString(phoneNumber2, country);
|
25356
|
-
if (parsedNumber1 && parsedNumber2) {
|
25357
|
-
return parsedNumber1.isEqual(parsedNumber2);
|
25358
|
-
}
|
25359
|
-
else {
|
25360
|
-
return false;
|
25361
|
-
}
|
25362
|
-
}
|
25363
|
-
catch (error) {
|
25364
|
-
return false;
|
25365
|
-
}
|
25366
|
-
}
|
25367
|
-
}
|
25368
|
-
|
25369
25807
|
/** @dynamic */
|
25370
25808
|
class TableColumnBuilder {
|
25371
25809
|
constructor(breakpointObserverService) {
|
@@ -25940,5 +26378,5 @@ const MAT_NATIVE_DATE_FORMATS = {
|
|
25940
26378
|
* Generated bundle index. Do not edit.
|
25941
26379
|
*/
|
25942
26380
|
|
25943
|
-
export { APP_MESSAGES, AbstractComponent, AbstractCrudComponent, AbstractCrudService, AbstractDTO, AbstractFindComponent, AbstractFindService, AbstractModel, AbstractService, AlertComponent, Archive, ArrayUtil, AuthGuard, AuthInterceptor, AuthenticationService, BaseUser, BreakpointEnum, BreakpointObserverService, BrowserUtil, ButtonComponent, CalendarMonthYearComponent, CardComponent, ChartDTO, CheckboxComponent, ConfirmationDTO, ConfirmationService, CoreModule, CriteriaOperationEnum, CriteriaSortDirectionEnum, CurrencyUtil, DEFAULT_MESSAGES, DateAdapter, DateRange, DateRangePickerComponent, DateUtil, DatepickerModule, DefaultMatCalendarRangeStrategy, DialogDTO, DialogService, DocumentUtil,
|
26381
|
+
export { APP_MESSAGES, AbstractComponent, AbstractCrudComponent, AbstractCrudService, AbstractDTO, AbstractFindComponent, AbstractFindService, AbstractModel, AbstractService, AlertComponent, Archive, ArrayUtil, AuthGuard, AuthInterceptor, AuthenticationService, BaseUser, BreakpointEnum, BreakpointObserverService, BrowserUtil, ButtonComponent, CalendarMonthYearComponent, CardComponent, ChartDTO, CheckboxComponent, ConfirmationDTO, ConfirmationService, CoreModule, CriteriaOperationEnum, CriteriaSortDirectionEnum, CurrencyUtil, DEFAULT_MESSAGES, DateAdapter, DateRange, DateRangePickerComponent, DateUtil, DatepickerModule, DefaultMatCalendarRangeStrategy, DialogDTO, DialogService, DocumentUtil, EmailUtil, ErrorInterceptor, FilterDTO, GIPIAbstractComponent, GIPIAbstractCrudComponent, GIPIAbstractCrudService, GIPIAbstractDTO, GIPIAbstractFilterModel, GIPIAbstractFindComponent, GIPIAbstractFormComponent, GIPIAbstractModel, GIPIAbstractService, GIPIActionRowComponent, GIPIAppliedFilter, GIPIAutowired, GIPIBadgeComponent, GIPIBaseService, GIPIBreakpointService, GIPIButtonComponent, GIPICardComponent, GIPIColDirective, GIPIConfirmationDialogComponent, GIPIConnectedOverlayScrollHandler, GIPIDomHandler, GIPIDropdownMenuComponent, GIPIDynamicTabDirective, GIPIEmptyStateComponent, GIPIExpansionPanelComponent, GIPIFileDragAndDropComponent, GIPIFileService, GIPIFooterComponent, GIPIFormFieldComponent, GIPIHelpfulTipComponent, GIPIInfiniteScrollDirective, GIPIInputCheckboxComponent, GIPIInputCurrencyComponent, GIPIInputMonthPickerComponent, GIPIInputSearchComponent, GIPIInputSelectComponent, GIPIInputSelectEnumComponent, GIPIInputSelectListboxComponent, GIPIInputSelectPagedComponent, GIPIInputSelectRadioComponent, GIPINotificationComponent, GIPINoveltiesComponent, GIPIOverlayComponent, GIPIOverlayService, GIPIPageEvent, GIPIPageModel, GIPIPaginatePipe, GIPIPaginationControlsDirective, GIPIPaginationService, GIPIPasswordRequerimentsComponent, GIPIPopoverComponent, GIPIPopoverTarget, GIPIPopoverTrigger, GIPIRadioGroupComponent, GIPIRangePageComponent, GIPIRangeSliderComponent, GIPIResizeService, GIPIRowDirective, GIPISelectButtonComponent, GIPISelectComponent, GIPISessionStorageService, GIPISidenavComponent, GIPISidenavContainerComponent, GIPISlideToggleComponent, GIPISortDirectionEnum, GIPISortModel, GIPIStepperComponent, GIPITabComponent, GIPITabGroupComponent, GIPITableBodyComponent, GIPITableComponent, GIPITableFooterComponent, GIPITableHeaderComponent, GIPITablePaginationComponent, GIPITableProgressBarComponent, GIPITemplateDirective, GIPITextareaComponent, GIPIToolbarComponent, GIPITopNavComponent, GIPIUserProfileComponent, GIPI_BREAKPOINTS, GIPI_CUSTOM_BREAKPOINTS_PROVIDER, GIPI_MONTH_YEAR_SCROLL_STRATEGY, GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY, GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY_PROVIDER, INJECTOR, IconComponent, InputComponent, InputCurrencyComponent, InputFileComponent, InputListboxDTO, ItssTemplate, LoadingComponent, LoadingOverlayComponent, LocalTimeEnum, LocalTimePipe, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_DATE_LOCALE_PROVIDER, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_NATIVE_DATE_FORMATS, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, MaxRangeDirective, MaxRangeSelectionStrategy, MenuDTO, MenuTypeEnum, MessageDTO, MessageService, MonthPickerModel, MonthYear, MonthYearPickerComponent, MonthYearPickerModule, MultitenantModel, NativeDateAdapter, NavService, NumberUtil, ObjectUtil, OverlayPanelComponent, POINTS_NAME, PageDTO, PasswordUtil, Permission, PermissionGuard, PhoneMaskDirective, PhoneUtil, Platform, PopoverComponent, PopoverRef, PopoverService, PresetRangeComponent, PublicGuard, RadioButtonEnum, RadioGroupEntityComponent, RadioGroupEnumComponent, RangePage, Role, SelectButtonAddComponent, SelectButtonNextBatchComponent, SelectEntityComponent, SelectEntityPagedComponent, SelectEnumComponent, SelectMonthPeriodComponent, SelectNoEntriesFoundDirective, SelectSearchClearDirective, SelectSearchComponent, SharedModule, SlideToggleComponent, SortDTO, SortDirectionEnum, SortModel, StepperComponent, StringUtil, SvgRegisterService, TabDTO, TabModel, TableColumnBuilder, TableColumnBuilderModel, TableColumnDTO, TableColumnModel, TableComponent, TableScrolledComponent, TimeUtil, TokenDTO, URLParamsUtil, UUIDUtil, customCurrencyMaskConfig, getReflectType, gridResponsiveMap, matDatepickerAnimations, nextUniqueId$j as nextUniqueId, siderResponsiveMap, transformPopover, yearsPerPage$1 as yearsPerPage, yearsPerRow, ƟCMP, ƟFAC, ƟPROV, ɵ0$3 as ɵ0, MAT_DATE_RANGE_INPUT_PARENT as ɵa, MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY as ɵb, MAT_CALENDAR_RANGE_STRATEGY_PROVIDER as ɵc, MatDatepickerBase as ɵd, MAT_FORM_FIELD as ɵe, MatDatepickerInputBase as ɵf, GIPINgConfig as ɵg, GIPIChipsComponent as ɵh, GIPIFileDragAndDropDirective as ɵi, TextareaComponent as ɵj, UpperCaseDirective as ɵk, LowerCaseDirective as ɵl, SpaceDropDirective as ɵm, InputSelectInfiniteScrollDirective as ɵn, ITSS_SELECT_SEARCH_DEFAULT_OPTIONS as ɵo, MaterialModule as ɵq, DatepickerComponent as ɵr };
|
25944
26382
|
//# sourceMappingURL=gipisistemas-ng-core.js.map
|