@seniorsistemas/angular-components 17.1.0 → 17.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/seniorsistemas-angular-components.umd.js +115 -107
- 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/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/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/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/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/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 +108 -101
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +113 -106
- 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,
|
|
@@ -6160,6 +6258,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6160
6258
|
function TablePagingComponent(translate, hostProjectConfigs) {
|
|
6161
6259
|
this.translate = translate;
|
|
6162
6260
|
this.hostProjectConfigs = hostProjectConfigs;
|
|
6261
|
+
this.exportable = true;
|
|
6163
6262
|
this.enableExportSelectedRecords = true;
|
|
6164
6263
|
}
|
|
6165
6264
|
TablePagingComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -6361,6 +6460,9 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6361
6460
|
__decorate([
|
|
6362
6461
|
Input()
|
|
6363
6462
|
], TablePagingComponent.prototype, "table", void 0);
|
|
6463
|
+
__decorate([
|
|
6464
|
+
Input()
|
|
6465
|
+
], TablePagingComponent.prototype, "exportable", void 0);
|
|
6364
6466
|
__decorate([
|
|
6365
6467
|
Input()
|
|
6366
6468
|
], TablePagingComponent.prototype, "enableExportSelectedRecords", void 0);
|
|
@@ -6381,7 +6483,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
6381
6483
|
], TablePagingComponent.prototype, "totalRecordsText", void 0);
|
|
6382
6484
|
TablePagingComponent = __decorate([
|
|
6383
6485
|
Component({
|
|
6384
|
-
template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button
|
|
6486
|
+
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
6487
|
selector: "s-table-paging",
|
|
6386
6488
|
styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
|
|
6387
6489
|
}),
|
|
@@ -6493,7 +6595,8 @@ var ChipsFieldComponent = /** @class */ (function () {
|
|
|
6493
6595
|
], ChipsFieldComponent.prototype, "formControl", void 0);
|
|
6494
6596
|
ChipsFieldComponent = __decorate([
|
|
6495
6597
|
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"
|
|
6598
|
+
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",
|
|
6599
|
+
styles: [".chip-content{display:block;padding-right:1rem}"]
|
|
6497
6600
|
})
|
|
6498
6601
|
], ChipsFieldComponent);
|
|
6499
6602
|
return ChipsFieldComponent;
|
|
@@ -6968,7 +7071,7 @@ var BooleanSwitchFieldComponent = /** @class */ (function () {
|
|
|
6968
7071
|
], BooleanSwitchFieldComponent.prototype, "formControl", void 0);
|
|
6969
7072
|
BooleanSwitchFieldComponent = __decorate([
|
|
6970
7073
|
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 <
|
|
7074
|
+
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
7075
|
})
|
|
6973
7076
|
], BooleanSwitchFieldComponent);
|
|
6974
7077
|
return BooleanSwitchFieldComponent;
|
|
@@ -7826,7 +7929,7 @@ var DynamicFormModule = /** @class */ (function () {
|
|
|
7826
7929
|
MaskFormatterModule,
|
|
7827
7930
|
HotkeyModule.forRoot(),
|
|
7828
7931
|
MouseEventsModule,
|
|
7829
|
-
|
|
7932
|
+
SwitchModule,
|
|
7830
7933
|
PasswordStrengthModule,
|
|
7831
7934
|
SliderModule,
|
|
7832
7935
|
],
|
|
@@ -14256,102 +14359,6 @@ var SplitButtonModule = /** @class */ (function () {
|
|
|
14256
14359
|
return SplitButtonModule;
|
|
14257
14360
|
}());
|
|
14258
14361
|
|
|
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
14362
|
var PanelComponent = /** @class */ (function () {
|
|
14356
14363
|
function PanelComponent() {
|
|
14357
14364
|
this.toggleable = true;
|