@seniorsistemas/angular-components 17.0.0 → 17.1.0
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 +98 -0
- 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/index.d.ts +2 -0
- package/components/switch/switch.component.d.ts +21 -0
- package/components/switch/switch.module.d.ts +2 -0
- package/esm2015/components/switch/index.js +3 -0
- package/esm2015/components/switch/switch.component.js +86 -0
- package/esm2015/components/switch/switch.module.js +15 -0
- package/esm2015/public-api.js +2 -1
- package/esm5/components/switch/index.js +3 -0
- package/esm5/components/switch/switch.component.js +88 -0
- package/esm5/components/switch/switch.module.js +18 -0
- package/esm5/public-api.js +2 -1
- package/fesm2015/seniorsistemas-angular-components.js +92 -1
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +97 -1
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -14402,6 +14402,102 @@
|
|
|
14402
14402
|
return SplitButtonModule;
|
|
14403
14403
|
}());
|
|
14404
14404
|
|
|
14405
|
+
var SwitchComponent = /** @class */ (function () {
|
|
14406
|
+
function SwitchComponent() {
|
|
14407
|
+
this.readonly = false;
|
|
14408
|
+
this.disabled = false;
|
|
14409
|
+
this.valueChanged = new core.EventEmitter();
|
|
14410
|
+
this.value = false;
|
|
14411
|
+
}
|
|
14412
|
+
SwitchComponent_1 = SwitchComponent;
|
|
14413
|
+
SwitchComponent.prototype.onFocusIn = function () {
|
|
14414
|
+
var switchElement = this.switchRef.nativeElement;
|
|
14415
|
+
switchElement.classList.add("switch--focus");
|
|
14416
|
+
};
|
|
14417
|
+
SwitchComponent.prototype.onFocusOut = function () {
|
|
14418
|
+
var switchElement = this.switchRef.nativeElement;
|
|
14419
|
+
switchElement.classList.remove("switch--focus");
|
|
14420
|
+
};
|
|
14421
|
+
SwitchComponent.prototype.writeValue = function (value) {
|
|
14422
|
+
if (!this.disabled) {
|
|
14423
|
+
this.value = value;
|
|
14424
|
+
}
|
|
14425
|
+
};
|
|
14426
|
+
SwitchComponent.prototype.registerOnChange = function (onChange) {
|
|
14427
|
+
this._onChange = onChange;
|
|
14428
|
+
};
|
|
14429
|
+
SwitchComponent.prototype.registerOnTouched = function (onTouched) {
|
|
14430
|
+
this._onTouched = onTouched;
|
|
14431
|
+
};
|
|
14432
|
+
SwitchComponent.prototype.setDisabledState = function (disabled) {
|
|
14433
|
+
this.disabled = disabled;
|
|
14434
|
+
};
|
|
14435
|
+
SwitchComponent.prototype.toggleCheck = function () {
|
|
14436
|
+
this.value = !this.value;
|
|
14437
|
+
this.valueChanged.emit(this.value);
|
|
14438
|
+
if (this._onChange) {
|
|
14439
|
+
this._onChange(this.value);
|
|
14440
|
+
}
|
|
14441
|
+
};
|
|
14442
|
+
var SwitchComponent_1;
|
|
14443
|
+
__decorate([
|
|
14444
|
+
core.Input()
|
|
14445
|
+
], SwitchComponent.prototype, "readonly", void 0);
|
|
14446
|
+
__decorate([
|
|
14447
|
+
core.Input()
|
|
14448
|
+
], SwitchComponent.prototype, "trueLabel", void 0);
|
|
14449
|
+
__decorate([
|
|
14450
|
+
core.Input()
|
|
14451
|
+
], SwitchComponent.prototype, "falseLabel", void 0);
|
|
14452
|
+
__decorate([
|
|
14453
|
+
core.Input()
|
|
14454
|
+
], SwitchComponent.prototype, "inputId", void 0);
|
|
14455
|
+
__decorate([
|
|
14456
|
+
core.Input()
|
|
14457
|
+
], SwitchComponent.prototype, "disabled", void 0);
|
|
14458
|
+
__decorate([
|
|
14459
|
+
core.Output()
|
|
14460
|
+
], SwitchComponent.prototype, "valueChanged", void 0);
|
|
14461
|
+
__decorate([
|
|
14462
|
+
core.Input()
|
|
14463
|
+
], SwitchComponent.prototype, "value", void 0);
|
|
14464
|
+
__decorate([
|
|
14465
|
+
core.ViewChild("switch", { static: true })
|
|
14466
|
+
], SwitchComponent.prototype, "switchRef", void 0);
|
|
14467
|
+
__decorate([
|
|
14468
|
+
core.HostListener('focusin')
|
|
14469
|
+
], SwitchComponent.prototype, "onFocusIn", null);
|
|
14470
|
+
__decorate([
|
|
14471
|
+
core.HostListener('focusout')
|
|
14472
|
+
], SwitchComponent.prototype, "onFocusOut", null);
|
|
14473
|
+
SwitchComponent = SwitchComponent_1 = __decorate([
|
|
14474
|
+
core.Component({
|
|
14475
|
+
selector: 's-switch',
|
|
14476
|
+
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>",
|
|
14477
|
+
providers: [{
|
|
14478
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
14479
|
+
useExisting: core.forwardRef(function () { return SwitchComponent_1; }),
|
|
14480
|
+
multi: true,
|
|
14481
|
+
}],
|
|
14482
|
+
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}"]
|
|
14483
|
+
})
|
|
14484
|
+
], SwitchComponent);
|
|
14485
|
+
return SwitchComponent;
|
|
14486
|
+
}());
|
|
14487
|
+
|
|
14488
|
+
var SwitchModule = /** @class */ (function () {
|
|
14489
|
+
function SwitchModule() {
|
|
14490
|
+
}
|
|
14491
|
+
SwitchModule = __decorate([
|
|
14492
|
+
core.NgModule({
|
|
14493
|
+
imports: [common.CommonModule],
|
|
14494
|
+
declarations: [SwitchComponent],
|
|
14495
|
+
exports: [SwitchComponent],
|
|
14496
|
+
})
|
|
14497
|
+
], SwitchModule);
|
|
14498
|
+
return SwitchModule;
|
|
14499
|
+
}());
|
|
14500
|
+
|
|
14405
14501
|
var PanelComponent = /** @class */ (function () {
|
|
14406
14502
|
function PanelComponent() {
|
|
14407
14503
|
this.toggleable = true;
|
|
@@ -14820,6 +14916,8 @@
|
|
|
14820
14916
|
exports.StepsComponent = StepsComponent;
|
|
14821
14917
|
exports.StepsModule = StepsModule;
|
|
14822
14918
|
exports.Structure = Structure;
|
|
14919
|
+
exports.SwitchComponent = SwitchComponent;
|
|
14920
|
+
exports.SwitchModule = SwitchModule;
|
|
14823
14921
|
exports.TableFrozenPositionDirective = TableFrozenPositionDirective;
|
|
14824
14922
|
exports.TableHeaderCheckboxComponent = TableHeaderCheckboxComponent;
|
|
14825
14923
|
exports.TableHeaderCheckboxModule = TableHeaderCheckboxModule;
|