@inspark/inspark-components 1.0.22 → 1.0.23
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/full/bundles/inspark-inspark-components.umd.js +31 -3
- package/full/bundles/inspark-inspark-components.umd.js.map +1 -1
- package/full/bundles/inspark-inspark-components.umd.min.js +1 -1
- package/full/bundles/inspark-inspark-components.umd.min.js.map +1 -1
- package/full/components/input-text/input-text.component.d.ts +6 -0
- package/full/esm2015/components/input-text/input-text.component.js +32 -4
- package/full/esm5/components/input-text/input-text.component.js +32 -4
- package/full/fesm2015/inspark-inspark-components.js +31 -3
- package/full/fesm2015/inspark-inspark-components.js.map +1 -1
- package/full/fesm5/inspark-inspark-components.js +31 -3
- package/full/fesm5/inspark-inspark-components.js.map +1 -1
- package/full/inspark-inspark-components.metadata.json +1 -1
- package/full/package.json +1 -1
- package/interface/package.json +1 -1
- package/package.json +1 -1
|
@@ -891,14 +891,19 @@
|
|
|
891
891
|
this.error = null;
|
|
892
892
|
this.size = 100000;
|
|
893
893
|
this.maxlength = 100000;
|
|
894
|
-
this.width = '
|
|
894
|
+
this.width = '';
|
|
895
|
+
this.display = false;
|
|
896
|
+
this.large = true;
|
|
897
|
+
this.small = false;
|
|
895
898
|
this.placeholder = '';
|
|
896
899
|
this.id = null;
|
|
897
900
|
this.testId = null;
|
|
898
901
|
this.opacity = true;
|
|
899
902
|
this.shadow = false;
|
|
903
|
+
this.right = false;
|
|
900
904
|
this.focus = new core.EventEmitter();
|
|
901
905
|
this.blur = new core.EventEmitter();
|
|
906
|
+
this.onClick = new core.EventEmitter();
|
|
902
907
|
this.propagateChange = function (_) {
|
|
903
908
|
};
|
|
904
909
|
}
|
|
@@ -929,6 +934,9 @@
|
|
|
929
934
|
// Store the provided function as an internal method.
|
|
930
935
|
this.onTouched = fn;
|
|
931
936
|
};
|
|
937
|
+
InputTextComponent.prototype.clear = function () {
|
|
938
|
+
this.onClick.emit('');
|
|
939
|
+
};
|
|
932
940
|
InputTextComponent.prototype.onChange = function (_) {
|
|
933
941
|
if (this.type === 'number') {
|
|
934
942
|
this.propagateChange(+this.value);
|
|
@@ -972,6 +980,18 @@
|
|
|
972
980
|
core.Input(),
|
|
973
981
|
__metadata("design:type", Object)
|
|
974
982
|
], InputTextComponent.prototype, "width", void 0);
|
|
983
|
+
__decorate([
|
|
984
|
+
core.Input(),
|
|
985
|
+
__metadata("design:type", Object)
|
|
986
|
+
], InputTextComponent.prototype, "display", void 0);
|
|
987
|
+
__decorate([
|
|
988
|
+
core.Input(),
|
|
989
|
+
__metadata("design:type", Object)
|
|
990
|
+
], InputTextComponent.prototype, "large", void 0);
|
|
991
|
+
__decorate([
|
|
992
|
+
core.Input(),
|
|
993
|
+
__metadata("design:type", Object)
|
|
994
|
+
], InputTextComponent.prototype, "small", void 0);
|
|
975
995
|
__decorate([
|
|
976
996
|
core.Input(),
|
|
977
997
|
__metadata("design:type", Object)
|
|
@@ -996,6 +1016,10 @@
|
|
|
996
1016
|
core.Input(),
|
|
997
1017
|
__metadata("design:type", Object)
|
|
998
1018
|
], InputTextComponent.prototype, "shadow", void 0);
|
|
1019
|
+
__decorate([
|
|
1020
|
+
core.Input(),
|
|
1021
|
+
__metadata("design:type", Object)
|
|
1022
|
+
], InputTextComponent.prototype, "right", void 0);
|
|
999
1023
|
__decorate([
|
|
1000
1024
|
core.Input(),
|
|
1001
1025
|
__metadata("design:type", String)
|
|
@@ -1020,10 +1044,14 @@
|
|
|
1020
1044
|
core.Output(),
|
|
1021
1045
|
__metadata("design:type", core.EventEmitter)
|
|
1022
1046
|
], InputTextComponent.prototype, "blur", void 0);
|
|
1047
|
+
__decorate([
|
|
1048
|
+
core.Output(),
|
|
1049
|
+
__metadata("design:type", core.EventEmitter)
|
|
1050
|
+
], InputTextComponent.prototype, "onClick", void 0);
|
|
1023
1051
|
InputTextComponent = InputTextComponent_1 = __decorate([
|
|
1024
1052
|
core.Component({
|
|
1025
1053
|
selector: 'in-input-text',
|
|
1026
|
-
template: "<label [ngStyle]=\"{width: width}\" class=\"label type_varchars\">\n <span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n <span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n <span\n *ngIf=\"maxlength && value && value.length && value.length >= maxlength\"\n class=\"constraints-message__warning u-text_uppercase\">\n {{'maxlength: ' | translate}} {{maxlength}}</span>\n </span>\n <input (blur)=\"this.blur.emit($event)\"\n
|
|
1054
|
+
template: "<label [ngStyle]=\"{width: width}\" class=\"label type_varchars\">\n <span *ngIf=\"label\" class=\"c-label__content\">\n {{label}}\n <span *ngIf=\"required\" class=\"c-label__req\">*</span>\n <span *ngIf=\"error\" class=\"c-label__sub_is-error\">{{error}}</span>\n <span\n *ngIf=\"maxlength && value && value.length && value.length >= maxlength\"\n class=\"constraints-message__warning u-text_uppercase\">\n {{'maxlength: ' | translate}} {{maxlength}}</span>\n </span>\n <form class=\"c-label\">\n <div class=\"input-wrapper u-margin-right-tiny\" [ngClass]=\"{'u-margin-right-tiny': right}\">\n <input (blur)=\"this.blur.emit($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"this.focus.emit($event)\"\n (input)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n [autocomplete]=\"autocomplete? 'on':'off'\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [maxlength]=\"maxlength\"\n [name]=\"name\"\n [ngClass]=\"{'c-input_opaque' : opacity === false,\n 'c-input_shadowed' : shadow,\n 'c-input_large' : large,\n 'c-input_small' : small}\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [size]=\"size\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n class=\"search-box c-input c-input_large c-input_small field_{{id}}\"\n type=\"search\"\n autofocus=\"\"\n tabindex=\"1\"\n style=\"padding-right: 28px\">\n <button (click)=\"clear()\"\n class=\"button-reset empty\"\n [ngClass]=\"{empty: display}\"\n type=\"reset\"\n [attr.title]=\"'Reset' | translate\">\n <i class=\"fa fa-close\"></i>\n </button>\n </div>\n </form>\n</label>\n",
|
|
1027
1055
|
providers: [
|
|
1028
1056
|
{
|
|
1029
1057
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -1031,7 +1059,7 @@
|
|
|
1031
1059
|
multi: true,
|
|
1032
1060
|
}
|
|
1033
1061
|
],
|
|
1034
|
-
styles: ["@charset \"UTF-8\";.label{display:inline-block;margin-bottom:0}.c-input{height:36px}.c-input_opaque{background:var(--colorBgLevel3)}.c-input_shadowed{box-shadow:0 2px 6px 0 rgba(0,0,0,.2)}.constraints-message__warning{color:red}"]
|
|
1062
|
+
styles: ["@charset \"UTF-8\";.label{display:inline-block;margin-bottom:0}.c-input{height:36px}.c-input_opaque{background:var(--colorBgLevel3)}.c-input_shadowed{box-shadow:0 2px 6px 0 rgba(0,0,0,.2)}.constraints-message__warning{color:red}.button-reset{display:flex;align-items:center;position:absolute;right:6px;top:5px;padding:6px;font-size:15px;border:none;outline:0;cursor:pointer;color:var(--colorTextMuted);background-color:transparent}.button-reset:hover{color:var(--ids-theme-btn-default-color,#fff)}.empty{display:none}.input-wrapper{position:relative;display:flex;align-items:baseline}.c-input:not(:valid)~.button-reset{display:none}"]
|
|
1035
1063
|
})
|
|
1036
1064
|
], InputTextComponent);
|
|
1037
1065
|
return InputTextComponent;
|