@seniorsistemas/angular-components 17.1.0 → 17.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/seniorsistemas-angular-components.umd.js +118 -109
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/configurations/fields/bignumber-field.d.ts +2 -0
- package/components/dynamic-form/configurations/form-field.d.ts +1 -0
- package/components/switch/switch.component.d.ts +1 -0
- package/components/table/table-paging/table-paging.component.d.ts +1 -0
- package/esm2015/components/accordion/accordion.module.js +3 -3
- package/esm2015/components/accordion/components/accordion-panel/accordion-panel.component.js +3 -3
- package/esm2015/components/dynamic-form/components/fields/bignumber/number-field.component.js +2 -2
- package/esm2015/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.js +2 -2
- package/esm2015/components/dynamic-form/components/fields/chips/chips-field.component.js +3 -2
- package/esm2015/components/dynamic-form/configurations/fields/bignumber-field.js +3 -2
- package/esm2015/components/dynamic-form/configurations/form-field.js +1 -1
- package/esm2015/components/dynamic-form/dynamic-form.module.js +3 -3
- package/esm2015/components/switch/switch.component.js +6 -3
- package/esm2015/components/table/table-paging/table-paging.component.js +6 -2
- package/esm5/components/accordion/accordion.module.js +3 -3
- package/esm5/components/accordion/components/accordion-panel/accordion-panel.component.js +3 -3
- package/esm5/components/dynamic-form/components/fields/bignumber/number-field.component.js +2 -2
- package/esm5/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.js +2 -2
- package/esm5/components/dynamic-form/components/fields/chips/chips-field.component.js +3 -2
- package/esm5/components/dynamic-form/configurations/fields/bignumber-field.js +3 -2
- package/esm5/components/dynamic-form/configurations/form-field.js +1 -1
- package/esm5/components/dynamic-form/dynamic-form.module.js +3 -3
- package/esm5/components/switch/switch.component.js +6 -3
- package/esm5/components/table/table-paging/table-paging.component.js +6 -2
- package/fesm2015/seniorsistemas-angular-components.js +111 -103
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +116 -108
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __decorate, __spread, __assign, __values, __extends, __rest, __awaiter, __generator, __param, __read } from 'tslib';
|
|
2
|
-
import { EventEmitter, Input, Output, Component, ContentChildren, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector,
|
|
2
|
+
import { EventEmitter, Input, Output, Component, ContentChildren, ViewChild, HostListener, forwardRef, NgModule, ɵɵdefineInjectable, Injectable, ElementRef, ApplicationRef, ComponentFactoryResolver, Injector, Directive, HostBinding, Renderer2, Pipe, ViewEncapsulation, InjectionToken, Inject, TemplateRef, ViewContainerRef, ChangeDetectorRef, Optional, ContentChild } from '@angular/core';
|
|
3
3
|
import { trigger, transition, style as style$7, animate, state, group, query, animateChild } from '@angular/animations';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { FormsModule, ReactiveFormsModule, FormControl,
|
|
5
|
+
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, FormControl, FormGroup, NG_VALIDATORS, Validators, FormArray, ControlContainer } from '@angular/forms';
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
|
-
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
8
7
|
import { RouterModule, NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router } from '@angular/router';
|
|
9
8
|
import { BreadcrumbModule as BreadcrumbModule$1 } from 'primeng/breadcrumb';
|
|
10
9
|
import { Subject, of, from, forkJoin, throwError, ReplaySubject } from 'rxjs';
|
|
@@ -142,7 +141,7 @@ var AccordionPanelComponent = /** @class */ (function () {
|
|
|
142
141
|
AccordionPanelComponent = __decorate([
|
|
143
142
|
Component({
|
|
144
143
|
selector: "s-accordion-panel",
|
|
145
|
-
template: "<div\n class=\"accordion-panel\"\n [ngClass]=\"{\n 'accordion-panel--open': isOpen,\n 'accordion-panel--disabled': disabled\n }\">\n <div class=\"header\" (click)=\"onTabClick()\">\n <div class=\"header__title\">\n <span class=\"icon\" [ngClass]=\"isOpen ? 'fas fa-minus' : 'fas fa-plus'\"></span>\n <span\n *ngIf=\"validationMessage\"\n class=\"exclamation-icon fas fa-exclamation-circle\"\n [sTooltip]=\"validationMessage\">\n </span>\n <span class=\"title\">{{ header }}</span>\n </div>\n <div class=\"header__controls\">\n <button\n *ngFor=\"let button of buttons\"\n class=\"icon-button\"\n [ngClass]=\"button.icon\"\n (click)=\"onIconButtonsClick($event, button.onClick)\">\n </button>\n <
|
|
144
|
+
template: "<div\n class=\"accordion-panel\"\n [ngClass]=\"{\n 'accordion-panel--open': isOpen,\n 'accordion-panel--disabled': disabled\n }\">\n <div class=\"header\" (click)=\"onTabClick()\">\n <div class=\"header__title\">\n <span class=\"icon\" [ngClass]=\"isOpen ? 'fas fa-minus' : 'fas fa-plus'\"></span>\n <span\n *ngIf=\"validationMessage\"\n class=\"exclamation-icon fas fa-exclamation-circle\"\n [sTooltip]=\"validationMessage\">\n </span>\n <span class=\"title\">{{ header }}</span>\n </div>\n <div class=\"header__controls\">\n <button\n *ngFor=\"let button of buttons\"\n class=\"icon-button\"\n [ngClass]=\"button.icon\"\n (click)=\"onIconButtonsClick($event, button.onClick)\">\n </button>\n <s-switch\n *ngIf=\"switch\"\n class=\"switch\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"switchState\"\n (click)=\"$event.stopPropagation()\"\n (valueChanged)=\"switch.onChange($event)\">\n </s-switch>\n </div>\n </div>\n <ng-container *ngIf=\"cache; then cacheTemplate else cachelessTemplate\"></ng-container>\n</div>\n\n<ng-template #cacheTemplate>\n <div\n class=\"content\"\n [@cacheAnimation]=\"isOpen\"\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cacheAnimation.start)=\"onContentAnimationStart()\"\n (@cacheAnimation.done)=\"onContentAnimationDone()\">\n <div class=\"content-container\">\n <ng-container [ngTemplateOutlet]=\"panelContent\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cachelessTemplate>\n <div\n *ngIf=\"isOpen\"\n class=\"content\"\n @cachelessAnimation\n [@.disabled]=\"isContentAnimationDisabled\"\n (@cachelessAnimation.start)=\"onContentAnimationStart()\"\n (@cachelessAnimation.done)=\"onContentAnimationDone()\">\n <div class=\"content-container\">\n <ng-container [ngTemplateOutlet]=\"panelContent\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #panelContent>\n <ng-content></ng-content>\n</ng-template>",
|
|
146
145
|
animations: [
|
|
147
146
|
trigger("cachelessAnimation", [
|
|
148
147
|
transition(":enter", [style$7({ height: "0" }), animate("200ms linear", style$7({ height: "*" }))]),
|
|
@@ -154,7 +153,7 @@ var AccordionPanelComponent = /** @class */ (function () {
|
|
|
154
153
|
transition("* => *", animate("200ms")),
|
|
155
154
|
]),
|
|
156
155
|
],
|
|
157
|
-
styles: [".accordion-panel{border-bottom:1px solid #c1c1cc}.accordion-panel .header{-ms-flex-align:center;align-items:center;background-color:#fff;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.accordion-panel .header .header__title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.accordion-panel .header .header__title .icon{color:#212533;font-size:1rem;margin-right:12px}.accordion-panel .header .header__title .exclamation-icon{color:#c13018;font-size:1rem;margin-right:12px}.accordion-panel .header .header__title .title{font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:700;line-height:150%;text-transform:uppercase}.accordion-panel .header .header__controls{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;margin-left:16px}.accordion-panel .header .header__controls .icon-button{color:#212533;cursor:pointer;font-size:1rem;margin-left:
|
|
156
|
+
styles: [".accordion-panel{border-bottom:1px solid #c1c1cc}.accordion-panel .header{-ms-flex-align:center;align-items:center;background-color:#fff;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:16px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.accordion-panel .header .header__title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.accordion-panel .header .header__title .icon{color:#212533;font-size:1rem;margin-right:12px}.accordion-panel .header .header__title .exclamation-icon{color:#c13018;font-size:1rem;margin-right:12px}.accordion-panel .header .header__title .title{font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:700;line-height:150%;text-transform:uppercase}.accordion-panel .header .header__controls{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;margin-left:16px}.accordion-panel .header .header__controls .icon-button{color:#212533;cursor:pointer;font-size:1rem;margin-left:12px;padding:4px;border:none;background:0 0}.accordion-panel .header .header__controls .switch{padding-left:16px}.accordion-panel .content{background-color:#fff;overflow:hidden}.accordion-panel .content .content-container{margin:20px}.accordion-panel--open .header{background-color:#eeebf2;border-bottom:1px solid #c1c1cc}.accordion-panel--disabled .header{cursor:auto}.accordion-panel--disabled .header .header__title .icon,.accordion-panel--disabled .header .header__title .title{color:#c1c1cc}.accordion-panel--disabled .header .header__controls .icon-button{color:#c1c1cc;cursor:auto}"]
|
|
158
157
|
})
|
|
159
158
|
], AccordionPanelComponent);
|
|
160
159
|
return AccordionPanelComponent;
|
|
@@ -236,6 +235,105 @@ var AccordionComponent = /** @class */ (function () {
|
|
|
236
235
|
return AccordionComponent;
|
|
237
236
|
}());
|
|
238
237
|
|
|
238
|
+
var SwitchComponent = /** @class */ (function () {
|
|
239
|
+
function SwitchComponent() {
|
|
240
|
+
this.readonly = false;
|
|
241
|
+
this.disabled = false;
|
|
242
|
+
this.valueChanged = new EventEmitter();
|
|
243
|
+
this.value = false;
|
|
244
|
+
}
|
|
245
|
+
SwitchComponent_1 = SwitchComponent;
|
|
246
|
+
SwitchComponent.prototype.onFocusIn = function () {
|
|
247
|
+
var switchElement = this.switchRef.nativeElement;
|
|
248
|
+
switchElement.classList.add("switch--focus");
|
|
249
|
+
};
|
|
250
|
+
SwitchComponent.prototype.onFocusOut = function () {
|
|
251
|
+
var switchElement = this.switchRef.nativeElement;
|
|
252
|
+
switchElement.classList.remove("switch--focus");
|
|
253
|
+
};
|
|
254
|
+
SwitchComponent.prototype.writeValue = function (value) {
|
|
255
|
+
if (!this.disabled) {
|
|
256
|
+
this.value = value;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
SwitchComponent.prototype.registerOnChange = function (onChange) {
|
|
260
|
+
this._onChange = onChange;
|
|
261
|
+
};
|
|
262
|
+
SwitchComponent.prototype.registerOnTouched = function (onTouched) {
|
|
263
|
+
this._onTouched = onTouched;
|
|
264
|
+
};
|
|
265
|
+
SwitchComponent.prototype.setDisabledState = function (disabled) {
|
|
266
|
+
this.disabled = disabled;
|
|
267
|
+
};
|
|
268
|
+
SwitchComponent.prototype.toggleCheck = function () {
|
|
269
|
+
this.value = !this.value;
|
|
270
|
+
this.valueChanged.emit(this.value);
|
|
271
|
+
if (this._onChange) {
|
|
272
|
+
this._onChange(this.value);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
var SwitchComponent_1;
|
|
276
|
+
__decorate([
|
|
277
|
+
Input()
|
|
278
|
+
], SwitchComponent.prototype, "readonly", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
Input()
|
|
281
|
+
], SwitchComponent.prototype, "trueLabel", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
Input()
|
|
284
|
+
], SwitchComponent.prototype, "falseLabel", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
Input()
|
|
287
|
+
], SwitchComponent.prototype, "inputId", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
Input()
|
|
290
|
+
], SwitchComponent.prototype, "inputName", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
Input()
|
|
293
|
+
], SwitchComponent.prototype, "disabled", void 0);
|
|
294
|
+
__decorate([
|
|
295
|
+
Output()
|
|
296
|
+
], SwitchComponent.prototype, "valueChanged", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
Input()
|
|
299
|
+
], SwitchComponent.prototype, "value", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
ViewChild("switch", { static: true })
|
|
302
|
+
], SwitchComponent.prototype, "switchRef", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
HostListener('focusin')
|
|
305
|
+
], SwitchComponent.prototype, "onFocusIn", null);
|
|
306
|
+
__decorate([
|
|
307
|
+
HostListener('focusout')
|
|
308
|
+
], SwitchComponent.prototype, "onFocusOut", null);
|
|
309
|
+
SwitchComponent = SwitchComponent_1 = __decorate([
|
|
310
|
+
Component({
|
|
311
|
+
selector: 's-switch',
|
|
312
|
+
template: "<div #switch class=\"switch\" [ngClass]=\"{ 'switch--disabled': disabled }\">\n <label class=\"switch-toggle\">\n <input\n #input\n [id]=\"inputId\"\n [name]=\"inputName\"\n type=\"checkbox\"\n [checked]=\"value\"\n [disabled]=\"readonly || disabled\"\n (change)=\"toggleCheck()\">\n <span class=\"slider\"></span>\n </label>\n <span class=\"label\">\n {{ value ? trueLabel : falseLabel }}\n </span>\n</div>",
|
|
313
|
+
providers: [{
|
|
314
|
+
provide: NG_VALUE_ACCESSOR,
|
|
315
|
+
useExisting: forwardRef(function () { return SwitchComponent_1; }),
|
|
316
|
+
multi: true,
|
|
317
|
+
}],
|
|
318
|
+
styles: [".switch{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}.switch .switch-toggle{display:inline-block;height:24px;margin:0;position:relative;width:40px}.switch .switch-toggle input{height:0;opacity:0;width:0}.switch .switch-toggle input:checked+.slider{background-color:#428bca;border-radius:15px}.switch .switch-toggle input:checked+.slider:before{transform:translateX(16px)}.switch .switch-toggle .slider{background-color:#a5a5b2;border-radius:15px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:.4s}.switch .switch-toggle .slider:before{background-color:#fff;border-radius:50%;bottom:4px;content:\"\";height:16px;left:4px;position:absolute;transition:.4s;width:16px}.switch .label{color:#212533;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%;margin-left:12px}.switch--disabled{opacity:.5}.switch--focus .switch-toggle .slider{box-shadow:0 0 0 2px #428BCA80}"]
|
|
319
|
+
})
|
|
320
|
+
], SwitchComponent);
|
|
321
|
+
return SwitchComponent;
|
|
322
|
+
}());
|
|
323
|
+
|
|
324
|
+
var SwitchModule = /** @class */ (function () {
|
|
325
|
+
function SwitchModule() {
|
|
326
|
+
}
|
|
327
|
+
SwitchModule = __decorate([
|
|
328
|
+
NgModule({
|
|
329
|
+
imports: [CommonModule],
|
|
330
|
+
declarations: [SwitchComponent],
|
|
331
|
+
exports: [SwitchComponent],
|
|
332
|
+
})
|
|
333
|
+
], SwitchModule);
|
|
334
|
+
return SwitchModule;
|
|
335
|
+
}());
|
|
336
|
+
|
|
239
337
|
var TooltipPosition;
|
|
240
338
|
(function (TooltipPosition) {
|
|
241
339
|
TooltipPosition["Top"] = "top";
|
|
@@ -643,7 +741,7 @@ var AccordionModule = /** @class */ (function () {
|
|
|
643
741
|
FormsModule,
|
|
644
742
|
BrowserAnimationsModule,
|
|
645
743
|
TooltipModule,
|
|
646
|
-
|
|
744
|
+
SwitchModule,
|
|
647
745
|
],
|
|
648
746
|
declarations: [
|
|
649
747
|
AccordionComponent,
|
|
@@ -2736,7 +2834,7 @@ var LocaleModule = /** @class */ (function () {
|
|
|
2736
2834
|
var BignumberField = /** @class */ (function (_super) {
|
|
2737
2835
|
__extends(BignumberField, _super);
|
|
2738
2836
|
function BignumberField(config) {
|
|
2739
|
-
var _a, _b;
|
|
2837
|
+
var _a, _b, _c;
|
|
2740
2838
|
var _this = _super.call(this, config) || this;
|
|
2741
2839
|
_this.allowNegative = (_a = config.allowNegative) !== null && _a !== void 0 ? _a : true;
|
|
2742
2840
|
_this.numberLocaleOptions = config.numberLocaleOptions || new NumberLocaleOptions();
|
|
@@ -2751,6 +2849,7 @@ var BignumberField = /** @class */ (function (_super) {
|
|
|
2751
2849
|
_this.onFocus = config.onFocus;
|
|
2752
2850
|
_this.onComplete = config.onComplete;
|
|
2753
2851
|
_this.onInput = config.onInput;
|
|
2852
|
+
_this.autoClear = (_c = config.autoClear) !== null && _c !== void 0 ? _c : true;
|
|
2754
2853
|
return _this;
|
|
2755
2854
|
}
|
|
2756
2855
|
return BignumberField;
|
|
@@ -6160,6 +6259,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6160
6259
|
function TablePagingComponent(translate, hostProjectConfigs) {
|
|
6161
6260
|
this.translate = translate;
|
|
6162
6261
|
this.hostProjectConfigs = hostProjectConfigs;
|
|
6262
|
+
this.exportable = true;
|
|
6163
6263
|
this.enableExportSelectedRecords = true;
|
|
6164
6264
|
}
|
|
6165
6265
|
TablePagingComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -6361,6 +6461,9 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6361
6461
|
__decorate([
|
|
6362
6462
|
Input()
|
|
6363
6463
|
], TablePagingComponent.prototype, "table", void 0);
|
|
6464
|
+
__decorate([
|
|
6465
|
+
Input()
|
|
6466
|
+
], TablePagingComponent.prototype, "exportable", void 0);
|
|
6364
6467
|
__decorate([
|
|
6365
6468
|
Input()
|
|
6366
6469
|
], TablePagingComponent.prototype, "enableExportSelectedRecords", void 0);
|
|
@@ -6381,7 +6484,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6381
6484
|
], TablePagingComponent.prototype, "totalRecordsText", void 0);
|
|
6382
6485
|
TablePagingComponent = __decorate([
|
|
6383
6486
|
Component({
|
|
6384
|
-
template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button
|
|
6487
|
+
template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button\n *ngIf=\"exportable\"\n class=\"export-button\" \n priority=\"default\" \n iconClass=\"fa fa-fw fa-file-export\" \n [disabled]=\"false\" \n [auxiliary]=\"true\" \n [tooltip]=\"getTooltipText()\" \n [model]=\"getActions()\">\n </s-button>\n</div>\n",
|
|
6385
6488
|
selector: "s-table-paging",
|
|
6386
6489
|
styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
|
|
6387
6490
|
}),
|
|
@@ -6493,7 +6596,8 @@ var ChipsFieldComponent = /** @class */ (function () {
|
|
|
6493
6596
|
], ChipsFieldComponent.prototype, "formControl", void 0);
|
|
6494
6597
|
ChipsFieldComponent = __decorate([
|
|
6495
6598
|
Component({
|
|
6496
|
-
template: "<p-chips\n *ngIf=\"field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [pKeyFilter]=\"field.keyFilter\">\n</p-chips>\n\n<p-chips\n *ngIf=\"!field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n</p-chips>\n"
|
|
6599
|
+
template: "<p-chips\n *ngIf=\"field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [pKeyFilter]=\"field.keyFilter\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n</p-chips>\n\n<p-chips\n *ngIf=\"!field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n</p-chips>\n",
|
|
6600
|
+
styles: [".chip-content{display:block;padding-right:1rem}"]
|
|
6497
6601
|
})
|
|
6498
6602
|
], ChipsFieldComponent);
|
|
6499
6603
|
return ChipsFieldComponent;
|
|
@@ -6949,7 +7053,7 @@ var BignumberFieldComponent = /** @class */ (function (_super) {
|
|
|
6949
7053
|
], BignumberFieldComponent.prototype, "onComplete", void 0);
|
|
6950
7054
|
BignumberFieldComponent = __decorate([
|
|
6951
7055
|
Component({
|
|
6952
|
-
template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\">\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sBignumberInput\n [allowNegative]=\"field.allowNegative\"\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template
|
|
7056
|
+
template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [autoClear]=\"field.autoClear\">\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sBignumberInput\n [allowNegative]=\"field.allowNegative\"\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n",
|
|
6953
7057
|
encapsulation: ViewEncapsulation.None,
|
|
6954
7058
|
styles: ["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
|
|
6955
7059
|
})
|
|
@@ -6968,7 +7072,7 @@ var BooleanSwitchFieldComponent = /** @class */ (function () {
|
|
|
6968
7072
|
], BooleanSwitchFieldComponent.prototype, "formControl", void 0);
|
|
6969
7073
|
BooleanSwitchFieldComponent = __decorate([
|
|
6970
7074
|
Component({
|
|
6971
|
-
template: "<div class=\"ui-grid ui-grid-responsive ui-grid-pad ui-fluid\">\n <div class=\"ui-grid-row\">\n <div class=\"i-grid-col-1\">\n <
|
|
7075
|
+
template: "<div class=\"ui-grid ui-grid-responsive ui-grid-pad ui-fluid\">\n <div class=\"ui-grid-row\">\n <div class=\"i-grid-col-1\">\n <s-switch\n [id]=\"(field.id || field.name)\"\n [inputName]=\"field.name\"\n [formControl]=\"formControl\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n (valueChanged)=\"field.onChange ? field.onChange($event) : null\">\n </s-switch>\n </div>\n <div class=\"i-grid-col-1\" *ngIf=\"field.optionsLabel\">\n <ng-container *ngIf=\"formControl.value; else caseFalse\">\n <span>{{ field.optionsLabel.true }}</span>\n </ng-container>\n <ng-template #caseFalse>\n <span>{{ field.optionsLabel.false }}</span>\n </ng-template>\n </div>\n </div>\n</div>"
|
|
6972
7076
|
})
|
|
6973
7077
|
], BooleanSwitchFieldComponent);
|
|
6974
7078
|
return BooleanSwitchFieldComponent;
|
|
@@ -7826,7 +7930,7 @@ var DynamicFormModule = /** @class */ (function () {
|
|
|
7826
7930
|
MaskFormatterModule,
|
|
7827
7931
|
HotkeyModule.forRoot(),
|
|
7828
7932
|
MouseEventsModule,
|
|
7829
|
-
|
|
7933
|
+
SwitchModule,
|
|
7830
7934
|
PasswordStrengthModule,
|
|
7831
7935
|
SliderModule,
|
|
7832
7936
|
],
|
|
@@ -14256,102 +14360,6 @@ var SplitButtonModule = /** @class */ (function () {
|
|
|
14256
14360
|
return SplitButtonModule;
|
|
14257
14361
|
}());
|
|
14258
14362
|
|
|
14259
|
-
var SwitchComponent = /** @class */ (function () {
|
|
14260
|
-
function SwitchComponent() {
|
|
14261
|
-
this.readonly = false;
|
|
14262
|
-
this.disabled = false;
|
|
14263
|
-
this.valueChanged = new EventEmitter();
|
|
14264
|
-
this.value = false;
|
|
14265
|
-
}
|
|
14266
|
-
SwitchComponent_1 = SwitchComponent;
|
|
14267
|
-
SwitchComponent.prototype.onFocusIn = function () {
|
|
14268
|
-
var switchElement = this.switchRef.nativeElement;
|
|
14269
|
-
switchElement.classList.add("switch--focus");
|
|
14270
|
-
};
|
|
14271
|
-
SwitchComponent.prototype.onFocusOut = function () {
|
|
14272
|
-
var switchElement = this.switchRef.nativeElement;
|
|
14273
|
-
switchElement.classList.remove("switch--focus");
|
|
14274
|
-
};
|
|
14275
|
-
SwitchComponent.prototype.writeValue = function (value) {
|
|
14276
|
-
if (!this.disabled) {
|
|
14277
|
-
this.value = value;
|
|
14278
|
-
}
|
|
14279
|
-
};
|
|
14280
|
-
SwitchComponent.prototype.registerOnChange = function (onChange) {
|
|
14281
|
-
this._onChange = onChange;
|
|
14282
|
-
};
|
|
14283
|
-
SwitchComponent.prototype.registerOnTouched = function (onTouched) {
|
|
14284
|
-
this._onTouched = onTouched;
|
|
14285
|
-
};
|
|
14286
|
-
SwitchComponent.prototype.setDisabledState = function (disabled) {
|
|
14287
|
-
this.disabled = disabled;
|
|
14288
|
-
};
|
|
14289
|
-
SwitchComponent.prototype.toggleCheck = function () {
|
|
14290
|
-
this.value = !this.value;
|
|
14291
|
-
this.valueChanged.emit(this.value);
|
|
14292
|
-
if (this._onChange) {
|
|
14293
|
-
this._onChange(this.value);
|
|
14294
|
-
}
|
|
14295
|
-
};
|
|
14296
|
-
var SwitchComponent_1;
|
|
14297
|
-
__decorate([
|
|
14298
|
-
Input()
|
|
14299
|
-
], SwitchComponent.prototype, "readonly", void 0);
|
|
14300
|
-
__decorate([
|
|
14301
|
-
Input()
|
|
14302
|
-
], SwitchComponent.prototype, "trueLabel", void 0);
|
|
14303
|
-
__decorate([
|
|
14304
|
-
Input()
|
|
14305
|
-
], SwitchComponent.prototype, "falseLabel", void 0);
|
|
14306
|
-
__decorate([
|
|
14307
|
-
Input()
|
|
14308
|
-
], SwitchComponent.prototype, "inputId", void 0);
|
|
14309
|
-
__decorate([
|
|
14310
|
-
Input()
|
|
14311
|
-
], SwitchComponent.prototype, "disabled", void 0);
|
|
14312
|
-
__decorate([
|
|
14313
|
-
Output()
|
|
14314
|
-
], SwitchComponent.prototype, "valueChanged", void 0);
|
|
14315
|
-
__decorate([
|
|
14316
|
-
Input()
|
|
14317
|
-
], SwitchComponent.prototype, "value", void 0);
|
|
14318
|
-
__decorate([
|
|
14319
|
-
ViewChild("switch", { static: true })
|
|
14320
|
-
], SwitchComponent.prototype, "switchRef", void 0);
|
|
14321
|
-
__decorate([
|
|
14322
|
-
HostListener('focusin')
|
|
14323
|
-
], SwitchComponent.prototype, "onFocusIn", null);
|
|
14324
|
-
__decorate([
|
|
14325
|
-
HostListener('focusout')
|
|
14326
|
-
], SwitchComponent.prototype, "onFocusOut", null);
|
|
14327
|
-
SwitchComponent = SwitchComponent_1 = __decorate([
|
|
14328
|
-
Component({
|
|
14329
|
-
selector: 's-switch',
|
|
14330
|
-
template: "<div #switch class=\"switch\" [ngClass]=\"{ 'switch--disabled': disabled }\">\n <label class=\"switch-toggle\">\n <input\n #input\n [id]=\"inputId\"\n type=\"checkbox\"\n [checked]=\"value\"\n [disabled]=\"readonly || disabled\"\n (change)=\"toggleCheck()\">\n <span class=\"slider\"></span>\n </label>\n <span class=\"label\">\n {{ value ? trueLabel : falseLabel }}\n </span>\n</div>",
|
|
14331
|
-
providers: [{
|
|
14332
|
-
provide: NG_VALUE_ACCESSOR,
|
|
14333
|
-
useExisting: forwardRef(function () { return SwitchComponent_1; }),
|
|
14334
|
-
multi: true,
|
|
14335
|
-
}],
|
|
14336
|
-
styles: [".switch{display:-ms-inline-flexbox;display:inline-flex}.switch .switch-toggle{display:inline-block;height:24px;position:relative;width:40px}.switch .switch-toggle input{height:0;opacity:0;width:0}.switch .switch-toggle input:checked+.slider{background-color:#428bca;border-radius:15px}.switch .switch-toggle input:checked+.slider:before{transform:translateX(16px)}.switch .switch-toggle .slider{background-color:#a5a5b2;border-radius:15px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:.4s}.switch .switch-toggle .slider:before{background-color:#fff;border-radius:50%;bottom:4px;content:\"\";height:16px;left:4px;position:absolute;transition:.4s;width:16px}.switch .label{color:#212533;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%;margin-left:12px}.switch--disabled{opacity:.5}.switch--focus .switch-toggle .slider{box-shadow:0 0 0 2px #428BCA80}"]
|
|
14337
|
-
})
|
|
14338
|
-
], SwitchComponent);
|
|
14339
|
-
return SwitchComponent;
|
|
14340
|
-
}());
|
|
14341
|
-
|
|
14342
|
-
var SwitchModule = /** @class */ (function () {
|
|
14343
|
-
function SwitchModule() {
|
|
14344
|
-
}
|
|
14345
|
-
SwitchModule = __decorate([
|
|
14346
|
-
NgModule({
|
|
14347
|
-
imports: [CommonModule],
|
|
14348
|
-
declarations: [SwitchComponent],
|
|
14349
|
-
exports: [SwitchComponent],
|
|
14350
|
-
})
|
|
14351
|
-
], SwitchModule);
|
|
14352
|
-
return SwitchModule;
|
|
14353
|
-
}());
|
|
14354
|
-
|
|
14355
14363
|
var PanelComponent = /** @class */ (function () {
|
|
14356
14364
|
function PanelComponent() {
|
|
14357
14365
|
this.toggleable = true;
|