@yibozhang/pro-table 0.0.18 → 0.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/yibozhang-pro-table.umd.js +83 -3
- package/bundles/yibozhang-pro-table.umd.js.map +1 -1
- package/bundles/yibozhang-pro-table.umd.min.js +1 -1
- package/bundles/yibozhang-pro-table.umd.min.js.map +1 -1
- package/esm2015/lib/directives/trim-input.directive.js +66 -0
- package/esm2015/lib/directives/trim-input.module.js +11 -0
- package/esm2015/lib/plate-input/plate-input.module.js +3 -1
- package/esm2015/public-api.js +2 -1
- package/esm2015/yibozhang-pro-table.js +5 -4
- package/fesm2015/yibozhang-pro-table.js +77 -3
- package/fesm2015/yibozhang-pro-table.js.map +1 -1
- package/lib/components/colmuns-setting/colmuns-setting.component.less.shim.ngstyle.d.ts.map +1 -0
- package/lib/components/colmuns-setting/colmuns-setting.component.ngfactory.d.ts.map +1 -0
- package/lib/components/dynamic-search-field/dynamic-search-field.component.ngfactory.d.ts.map +1 -0
- package/lib/directives/trim-input.directive.d.ts +11 -0
- package/lib/directives/trim-input.directive.d.ts.map +1 -0
- package/lib/directives/trim-input.directive.ngfactory.d.ts.map +1 -0
- package/lib/directives/trim-input.module.d.ts +3 -0
- package/lib/directives/trim-input.module.d.ts.map +1 -0
- package/lib/directives/trim-input.module.ngfactory.d.ts.map +1 -0
- package/lib/page-container/page-container.component.less.shim.ngstyle.d.ts.map +1 -0
- package/lib/page-container/page-container.component.ngfactory.d.ts.map +1 -0
- package/lib/page-container/page-container.module.ngfactory.d.ts.map +1 -0
- package/lib/page-public/antd-form.ngfactory.d.ts.map +1 -0
- package/lib/page-public/array-form.ngfactory.d.ts.map +1 -0
- package/lib/plate-input/plate-input.component.less.shim.ngstyle.d.ts.map +1 -0
- package/lib/plate-input/plate-input.component.ngfactory.d.ts.map +1 -0
- package/lib/plate-input/plate-input.module.d.ts.map +1 -1
- package/lib/plate-input/plate-input.module.ngfactory.d.ts.map +1 -0
- package/lib/plate-input/plate-prefix-load.service.ngfactory.d.ts.map +1 -0
- package/lib/pro-table.component.css.shim.ngstyle.d.ts.map +1 -0
- package/lib/pro-table.component.ngfactory.d.ts.map +1 -0
- package/lib/pro-table.module.ngfactory.d.ts.map +1 -0
- package/lib/table-search-bar/table-search-bar-module.ngfactory.d.ts.map +1 -0
- package/lib/table-search-bar/table-search-bar.component.less.shim.ngstyle.d.ts.map +1 -0
- package/lib/table-search-bar/table-search-bar.component.ngfactory.d.ts.map +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -1
- package/yibozhang-pro-table.d.ts +4 -3
- package/yibozhang-pro-table.d.ts.map +1 -1
- package/yibozhang-pro-table.metadata.json +1 -1
|
@@ -2032,6 +2032,83 @@
|
|
|
2032
2032
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [PLATE_PREFIX_LOAD_SERVICE,] }] }
|
|
2033
2033
|
]; };
|
|
2034
2034
|
|
|
2035
|
+
var TrimInputDirective = /** @class */ (function () {
|
|
2036
|
+
function TrimInputDirective(el, ngControl) {
|
|
2037
|
+
this.el = el;
|
|
2038
|
+
this.ngControl = ngControl;
|
|
2039
|
+
}
|
|
2040
|
+
TrimInputDirective.prototype.shouldProcess = function () {
|
|
2041
|
+
if (this.el.nativeElement.hasAttribute("allow-trim")) {
|
|
2042
|
+
return false;
|
|
2043
|
+
}
|
|
2044
|
+
if (this.el.nativeElement.hasAttribute("not-allow-trim")) {
|
|
2045
|
+
return true;
|
|
2046
|
+
}
|
|
2047
|
+
var element = this.el.nativeElement;
|
|
2048
|
+
while (element) {
|
|
2049
|
+
var className = element.className;
|
|
2050
|
+
if (typeof className === "string" &&
|
|
2051
|
+
className.includes("ant-form-custom")) {
|
|
2052
|
+
return true;
|
|
2053
|
+
}
|
|
2054
|
+
element = element.parentElement;
|
|
2055
|
+
}
|
|
2056
|
+
return false;
|
|
2057
|
+
};
|
|
2058
|
+
TrimInputDirective.prototype.onBlur = function () {
|
|
2059
|
+
if (!this.shouldProcess()) {
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2062
|
+
var value = this.el.nativeElement.value;
|
|
2063
|
+
if (typeof value === "string") {
|
|
2064
|
+
var trimmedValue = value.trim();
|
|
2065
|
+
this.el.nativeElement.value = trimmedValue;
|
|
2066
|
+
if (this.ngControl && this.ngControl.control) {
|
|
2067
|
+
this.ngControl.control.setValue(trimmedValue, { emitEvent: false });
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
};
|
|
2071
|
+
TrimInputDirective.prototype.onInput = function () {
|
|
2072
|
+
if (!this.shouldProcess()) {
|
|
2073
|
+
return;
|
|
2074
|
+
}
|
|
2075
|
+
var value = this.el.nativeElement.value;
|
|
2076
|
+
if (typeof value === "string" && /\s/.test(value)) {
|
|
2077
|
+
var noSpaceValue = value.replace(/\s/g, "");
|
|
2078
|
+
this.el.nativeElement.value = noSpaceValue;
|
|
2079
|
+
if (this.ngControl && this.ngControl.control) {
|
|
2080
|
+
this.ngControl.control.setValue(noSpaceValue, { emitEvent: false });
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
};
|
|
2084
|
+
return TrimInputDirective;
|
|
2085
|
+
}());
|
|
2086
|
+
TrimInputDirective.decorators = [
|
|
2087
|
+
{ type: i0.Directive, args: [{
|
|
2088
|
+
selector: "input[nz-input]",
|
|
2089
|
+
},] }
|
|
2090
|
+
];
|
|
2091
|
+
TrimInputDirective.ctorParameters = function () { return [
|
|
2092
|
+
{ type: i0.ElementRef },
|
|
2093
|
+
{ type: i1.NgControl, decorators: [{ type: i0.Optional }] }
|
|
2094
|
+
]; };
|
|
2095
|
+
TrimInputDirective.propDecorators = {
|
|
2096
|
+
onBlur: [{ type: i0.HostListener, args: ["blur",] }],
|
|
2097
|
+
onInput: [{ type: i0.HostListener, args: ["input",] }]
|
|
2098
|
+
};
|
|
2099
|
+
|
|
2100
|
+
var TrimInputModule = /** @class */ (function () {
|
|
2101
|
+
function TrimInputModule() {
|
|
2102
|
+
}
|
|
2103
|
+
return TrimInputModule;
|
|
2104
|
+
}());
|
|
2105
|
+
TrimInputModule.decorators = [
|
|
2106
|
+
{ type: i0.NgModule, args: [{
|
|
2107
|
+
declarations: [TrimInputDirective],
|
|
2108
|
+
exports: [TrimInputDirective],
|
|
2109
|
+
},] }
|
|
2110
|
+
];
|
|
2111
|
+
|
|
2035
2112
|
var PlateInputModule = /** @class */ (function () {
|
|
2036
2113
|
function PlateInputModule() {
|
|
2037
2114
|
}
|
|
@@ -2046,6 +2123,7 @@
|
|
|
2046
2123
|
input.NzInputModule,
|
|
2047
2124
|
popover.NzPopoverModule,
|
|
2048
2125
|
icon.NzIconModule,
|
|
2126
|
+
TrimInputModule,
|
|
2049
2127
|
],
|
|
2050
2128
|
declarations: [PlateInputComponent],
|
|
2051
2129
|
providers: [],
|
|
@@ -3462,14 +3540,16 @@
|
|
|
3462
3540
|
exports.ProTableComponent = ProTableComponent;
|
|
3463
3541
|
exports.ProTableModule = ProTableModule;
|
|
3464
3542
|
exports.TableSearchBarModule = TableSearchBarModule;
|
|
3543
|
+
exports.TrimInputModule = TrimInputModule;
|
|
3465
3544
|
exports["ɵ0"] = ɵ0;
|
|
3466
3545
|
exports["ɵ1"] = ɵ1;
|
|
3467
3546
|
exports["ɵ2"] = ɵ2;
|
|
3468
3547
|
exports["ɵa"] = PageContainerComponent;
|
|
3469
3548
|
exports["ɵb"] = TableSearchBarComponent;
|
|
3470
|
-
exports["ɵc"] =
|
|
3471
|
-
exports["ɵd"] =
|
|
3472
|
-
exports["ɵe"] =
|
|
3549
|
+
exports["ɵc"] = TrimInputDirective;
|
|
3550
|
+
exports["ɵd"] = PlateInputComponent;
|
|
3551
|
+
exports["ɵe"] = ColmunsSettingComponent;
|
|
3552
|
+
exports["ɵf"] = DynamicSearchFieldComponent;
|
|
3473
3553
|
|
|
3474
3554
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3475
3555
|
|