@sd-angular/core 1.1.77 → 1.1.80
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/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.js +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js +1 -1
- package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.js +118 -112
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.js +33 -26
- package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js +1 -1
- package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
- package/esm2015/autocomplete/src/lib/autocomplete.component.js +2 -2
- package/esm2015/grid-material/sd-angular-core-grid-material.js +31 -31
- package/esm2015/grid-material/src/lib/components/desktop-cell/desktop-cell.component.js +2 -2
- package/esm2015/grid-material/src/lib/grid-material.component.js +15 -6
- package/esm2015/grid-material/src/lib/models/grid.model.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/editor-handler-column.pipe.js +5 -7
- package/esm2015/input-number/src/lib/input-number.component.js +34 -27
- package/fesm2015/sd-angular-core-autocomplete.js +1 -1
- package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
- package/fesm2015/sd-angular-core-grid-material.js +67 -61
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-input-number.js +33 -26
- package/fesm2015/sd-angular-core-input-number.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.d.ts +30 -30
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/grid-material.component.d.ts +4 -1
- package/grid-material/src/lib/models/grid.model.d.ts +1 -0
- package/grid-material/src/lib/pipes/editor-handler-column.pipe.d.ts +1 -2
- package/input-number/sd-angular-core-input-number.metadata.json +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.1.77.tgz → sd-angular-core-1.1.80.tgz} +0 -0
|
@@ -14,7 +14,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
14
14
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
15
|
import { SdTranslateModule } from '@sd-angular/core/translate';
|
|
16
16
|
|
|
17
|
-
var _name, _valueInput, _form, _blurOnEnter_1, _model, _min, _max, _validator, _subscription, _setValueInput, _formatNumber, _updateValidator, _outPutValue, _customValidator;
|
|
17
|
+
var _name, _valueInput, _regexDecimal, _form, _blurOnEnter_1, _model, _min, _max, _validator, _subscription, _setValueInput, _formatNumber, _updateValidator, _outPutValue, _customValidator;
|
|
18
18
|
class SdInputNumberErrotStateMatcher {
|
|
19
19
|
constructor(formControl) {
|
|
20
20
|
this.formControl = formControl;
|
|
@@ -33,6 +33,7 @@ class SdInputNumber {
|
|
|
33
33
|
this.id = `I${v4()}`;
|
|
34
34
|
_name.set(this, v4());
|
|
35
35
|
_valueInput.set(this, void 0);
|
|
36
|
+
_regexDecimal.set(this, void 0);
|
|
36
37
|
_form.set(this, void 0);
|
|
37
38
|
this.disableErrorMessage = false;
|
|
38
39
|
_blurOnEnter_1.set(this, false);
|
|
@@ -101,30 +102,28 @@ class SdInputNumber {
|
|
|
101
102
|
};
|
|
102
103
|
this.onKeydown = (event) => {
|
|
103
104
|
const key = event.keyCode || event.charCode;
|
|
104
|
-
if (key == 8 || key == 46) {
|
|
105
|
+
if (key == 8 || key == 46 || key == 37 || key == 39) {
|
|
105
106
|
return;
|
|
106
107
|
}
|
|
107
108
|
const current = event.target.value;
|
|
108
|
-
const
|
|
109
|
-
|
|
109
|
+
const curval_arr = current.split("");
|
|
110
|
+
curval_arr.splice(event.target.selectionStart, (event.target.selectionEnd - event.target.selectionStart), event.key);
|
|
111
|
+
const newval = curval_arr.join("");
|
|
112
|
+
if (this.type !== 'integers' && newval === '-') {
|
|
110
113
|
return;
|
|
111
114
|
}
|
|
112
|
-
|
|
113
|
-
if (
|
|
114
|
-
regexDecimal = `(([0-9]+(\\.[0-9])?)+)$`;
|
|
115
|
-
}
|
|
116
|
-
if (this.type == 'minus') {
|
|
117
|
-
regexDecimal = `[-]${regexDecimal}`;
|
|
118
|
-
}
|
|
119
|
-
if (!this.type) {
|
|
120
|
-
regexDecimal = `[-]?${regexDecimal}`;
|
|
121
|
-
}
|
|
122
|
-
console.log(regexDecimal);
|
|
123
|
-
const regExp = new RegExp(`^${regexDecimal}`, 'g');
|
|
124
|
-
if (next && !String(next).match(regExp)) {
|
|
115
|
+
const regExp = new RegExp(`^${__classPrivateFieldGet(this, _regexDecimal)}`, 'g');
|
|
116
|
+
if (newval && !String(newval).match(regExp)) {
|
|
125
117
|
event.preventDefault();
|
|
126
118
|
return;
|
|
127
119
|
}
|
|
120
|
+
const value = (newval.toString().replace(/\./g, '').replace(/,/g, '.'));
|
|
121
|
+
if ((__classPrivateFieldGet(this, _max) || __classPrivateFieldGet(this, _max) === 0) && +value > __classPrivateFieldGet(this, _max)) {
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
this.inputControl.setValue(__classPrivateFieldGet(this, _formatNumber).call(this, __classPrivateFieldGet(this, _max)));
|
|
124
|
+
});
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
}
|
|
128
127
|
};
|
|
129
128
|
this.onFocus = () => {
|
|
130
129
|
var _a;
|
|
@@ -269,6 +268,16 @@ class SdInputNumber {
|
|
|
269
268
|
__classPrivateFieldGet(this, _subscription).add(this.inputControl.sdChanges.subscribe(() => {
|
|
270
269
|
this.ref.markForCheck();
|
|
271
270
|
}));
|
|
271
|
+
__classPrivateFieldSet(this, _regexDecimal, `(([0-9]+(\\.[0-9])?)+(\\,[0-9]{0,${this.precision}}){0,1})$`);
|
|
272
|
+
if (this.precision == 0) {
|
|
273
|
+
__classPrivateFieldSet(this, _regexDecimal, `(([0-9]+(\\.[0-9])?)+)$`);
|
|
274
|
+
}
|
|
275
|
+
if (this.type == 'minus') {
|
|
276
|
+
__classPrivateFieldSet(this, _regexDecimal, `[-]${__classPrivateFieldGet(this, _regexDecimal)}`);
|
|
277
|
+
}
|
|
278
|
+
if (!this.type) {
|
|
279
|
+
__classPrivateFieldSet(this, _regexDecimal, `[-]?${__classPrivateFieldGet(this, _regexDecimal)}`);
|
|
280
|
+
}
|
|
272
281
|
}
|
|
273
282
|
ngAfterViewInit() {
|
|
274
283
|
var _a;
|
|
@@ -285,13 +294,11 @@ class SdInputNumber {
|
|
|
285
294
|
}
|
|
286
295
|
__classPrivateFieldSet(this, _valueInput, item);
|
|
287
296
|
let value = (val.toString().replace(/\./g, '').replace(/,/g, '.'));
|
|
288
|
-
if (
|
|
289
|
-
value
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
value = __classPrivateFieldGet(this, _min);
|
|
294
|
-
item = __classPrivateFieldGet(this, _setValueInput).call(this, __classPrivateFieldGet(this, _min).toString());
|
|
297
|
+
if (__classPrivateFieldGet(this, _min) || __classPrivateFieldGet(this, _min) === 0) {
|
|
298
|
+
if (+value < __classPrivateFieldGet(this, _min)) {
|
|
299
|
+
value = __classPrivateFieldGet(this, _min);
|
|
300
|
+
item = __classPrivateFieldGet(this, _setValueInput).call(this, __classPrivateFieldGet(this, _min).toString());
|
|
301
|
+
}
|
|
295
302
|
}
|
|
296
303
|
this.inputControl.setValue(item);
|
|
297
304
|
this.formControl.setValue(value);
|
|
@@ -306,11 +313,11 @@ class SdInputNumber {
|
|
|
306
313
|
__classPrivateFieldGet(this, _subscription).unsubscribe();
|
|
307
314
|
}
|
|
308
315
|
}
|
|
309
|
-
_name = new WeakMap(), _valueInput = new WeakMap(), _form = new WeakMap(), _blurOnEnter_1 = new WeakMap(), _model = new WeakMap(), _min = new WeakMap(), _max = new WeakMap(), _validator = new WeakMap(), _subscription = new WeakMap(), _setValueInput = new WeakMap(), _formatNumber = new WeakMap(), _updateValidator = new WeakMap(), _outPutValue = new WeakMap(), _customValidator = new WeakMap();
|
|
316
|
+
_name = new WeakMap(), _valueInput = new WeakMap(), _regexDecimal = new WeakMap(), _form = new WeakMap(), _blurOnEnter_1 = new WeakMap(), _model = new WeakMap(), _min = new WeakMap(), _max = new WeakMap(), _validator = new WeakMap(), _subscription = new WeakMap(), _setValueInput = new WeakMap(), _formatNumber = new WeakMap(), _updateValidator = new WeakMap(), _outPutValue = new WeakMap(), _customValidator = new WeakMap();
|
|
310
317
|
SdInputNumber.decorators = [
|
|
311
318
|
{ type: Component, args: [{
|
|
312
319
|
selector: 'sd-input-number',
|
|
313
|
-
template: "<label *ngIf=\"!appearance && label\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"
|
|
320
|
+
template: "<label *ngIf=\"!appearance && label\" class=\"d-block mb-0 T14M\">{{label}} <span class=\"text-danger mb-2\"\r\n *ngIf=\"isRequired\">*</span></label>\r\n<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{ 'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n [appearance]=\"appearance || 'outline'\">\r\n <mat-label *ngIf=\"appearance && label\">{{label}}</mat-label>\r\n <input [id]=\"id\" [formControl]=\"inputControl\" #control matInput [placeholder]=\"placeholder || label\"\r\n [errorStateMatcher]=\"matcher\" (keyup.enter)=\"onKeyupEnter()\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\r\n (keydown)=\"onKeydown($event)\" [required]=\"isRequired\" [readonly]=\"isReadonly\" [autocomplete]=\"id\"\r\n autocorrect=\"off\" [step]=\"1\">\r\n <ng-container *ngIf=\"sdSuffix?.templateRef\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"sdSuffix.templateRef\">\r\n </ng-container>\r\n </ng-container>\r\n <mat-error *ngIf=\"formControl?.errors?.required && !disableErrorMessage\">\r\n {{ \"This field is required\" | sdTranslate }}\r\n </mat-error>\r\n <mat-error *ngIf=\"!disableErrorMessage && formControl.errors?.customValidator\">\r\n {{formControl.errors?.customValidator}}\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
|
|
314
321
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
315
322
|
styles: [":host ::ng-deep .mat-form-field.sd-form-tooltip{width:calc(100% - 30px)}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field input.mat-input-element:disabled{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}.sd-tooltip{display:inline-block;margin:auto;text-align:center;width:30px}:host{display:block;padding-top:5px}.sd-md:hover .btn-copy{visibility:visible}.btn-copy{background:#e9e9e9!important;font-size:12px;line-height:26px!important;margin-bottom:3px;visibility:hidden}"]
|
|
316
323
|
},] }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-input-number.js","sources":["../../../../projects/sd-core/input-number/src/lib/input-number.component.ts","../../../../projects/sd-core/input-number/src/lib/input-number.module.ts","../../../../projects/sd-core/input-number/src/public-api.ts","../../../../projects/sd-core/input-number/sd-angular-core-input-number.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n OnDestroy,\r\n AfterViewInit,\r\n ElementRef,\r\n OnInit,\r\n ContentChild,\r\n ChangeDetectionStrategy,\r\n HostListener,\r\n Inject,\r\n Optional\r\n} from '@angular/core';\r\nimport { AbstractControl, NgForm, ValidatorFn, Validators, AsyncValidatorFn, FormGroup, FormControl, FormGroupDirective } from '@angular/forms';\r\nimport * as uuid from 'uuid';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { Subscription } from 'rxjs';\r\n// import { SdInputSuffixDirective } from './directives/input-suffix.directive';\r\nimport { SdFormControl, SdSuffixDirective } from '@sd-angular/core/common';\r\nimport { SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { SdUtilityService } from '@sd-angular/core/utility';\r\nimport { FORM_CONFIG } from '@sd-angular/core/common';\r\nimport { IFormConfiguration } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { ErrorStateMatcher } from '@angular/material/core';\r\nclass SdInputNumberErrotStateMatcher implements ErrorStateMatcher {\r\n constructor(private formControl: FormControl) { }\r\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n const isSubmitted = form && form.submitted;\r\n return !!(this.formControl?.invalid && (this.formControl?.dirty || this.formControl?.touched || isSubmitted));\r\n }\r\n}\r\n@Component({\r\n selector: 'sd-input-number',\r\n templateUrl: './input-number.component.html',\r\n styleUrls: ['./input-number.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n #name = uuid.v4();\r\n #valueInput: string;\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() size: 'sm' | 'lg';\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n @Input() label: string;\r\n @Input() placeholder: string;\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n }\r\n #blurOnEnter = false;\r\n @Input('blurOnEnter') set _blurOnEnter(val: boolean | '') {\r\n this.#blurOnEnter = (val === '') || val;\r\n }\r\n #model: any;\r\n @Input() set model(value: any) {\r\n if (this.#model !== value) {\r\n this.#model = value;\r\n this.formControl.setValue(value, {\r\n emitEvent: false\r\n });\r\n if(value || value==0){\r\n const val = value.toString().replace(/\\./g,',');\r\n this.inputControl.setValue(this.#setValueInput(val));\r\n }\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n\r\n // Validator\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n\r\n @Input() type: 'minus' | 'integers'; //minus: chỉ nhập số âm, integers: chỉ số dương, all: tất cả\r\n @Input() precision:number = 2; //số chữ số thập phân \r\n\r\n isReadonly = false;\r\n @Input() set readonly(val: boolean | '') {\r\n this.isReadonly = (val === '') || val;\r\n }\r\n\r\n #min: number;\r\n @Input() set min(val: number) {\r\n this.#min = val;\r\n this.#updateValidator();\r\n }\r\n\r\n #max: number;\r\n @Input() set max(val: number) {\r\n this.#max = val;\r\n this.#updateValidator();\r\n }\r\n\r\n #validator: (value: any) => string | Promise<string>;\r\n @Input() set validator(validator: (value: any) => string | Promise<string>) {\r\n this.#validator = validator;\r\n this.#updateValidator();\r\n }\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.inputControl.disable();\r\n this.formControl.disable();\r\n } else {\r\n this.inputControl.enable();\r\n this.formControl.enable();\r\n }\r\n }\r\n @Input() appearance: MatFormFieldAppearance;\r\n\r\n @Output() sdChange = new EventEmitter<any>();\r\n @Output() sdFocus = new EventEmitter<any>();\r\n @Output() sdFocusForceBlur = new EventEmitter<any>();\r\n @Output() keyupEnter = new EventEmitter();\r\n\r\n @ViewChild('control') control: ElementRef;\r\n formControl = new SdFormControl();\r\n inputControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n matcher = new SdInputNumberErrotStateMatcher(this.formControl);\r\n\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdSuffixDirective) sdSuffix: SdSuffixDirective;\r\n isFocused = false;\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration,\r\n private utilityService: SdUtilityService) {\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.inputControl.touchChanges.subscribe(() => {\r\n this.formControl.markAsTouched();\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.inputControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.inputControl.valueChanges.pipe(debounceTime(200)).subscribe(val => {\r\n if(!val){\r\n this.formControl.setValue(undefined);\r\n this.modelChange.emit(undefined);\r\n this.sdChange.emit(undefined);\r\n return;\r\n }\r\n let item = this.#setValueInput(val);\r\n if( this.#valueInput === item){\r\n return;\r\n }\r\n this.#valueInput = item;\r\n let value = (val.toString().replace(/\\./g,'').replace(/,/g,'.'));\r\n if(Number(value) > this.#max){\r\n value = this.#max;\r\n item = this.#setValueInput(this.#max.toString());\r\n }\r\n if(Number(value) < this.#min){\r\n value = this.#min;\r\n item = this.#setValueInput(this.#min.toString());\r\n }\r\n this.inputControl.setValue(item);\r\n this.formControl.setValue(value);\r\n this.#outPutValue(Number(value));\r\n }));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n this.ref.detectChanges();\r\n }\r\n\r\n #setValueInput=(value)=>{\r\n const arrayNext = value.split(',');\r\n if (arrayNext.length>=2) {\r\n return `${this.#formatNumber(arrayNext[0])},${arrayNext[1]}`;\r\n }\r\n return this.#formatNumber(value);\r\n }\r\n\r\n #formatNumber=(string) =>{\r\n return string.toString().replace(/\\./g,'').split(\"\").reverse().reduce((acc, num, i, orig) => {\r\n return num + (num != \"-\" && i && !(i % 3) ? \".\" : \"\") + acc;\r\n }, \"\");\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n reValidate = () => {\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n if (this.isRequired) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.#validator) {\r\n asyncValidators.push(this.#customValidator(this.#validator));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.setAsyncValidators(asyncValidators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #outPutValue = (value: any) => {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n\r\n onKeyupEnter = () => {\r\n const val: string = (this.inputControl.value ?? '').toString();\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n this.keyupEnter.emit(this.inputControl.value);\r\n if (this.#blurOnEnter) {\r\n this.blur();\r\n }\r\n }\r\n\r\n onKeydown = (event) => {\r\n const key = event.keyCode || event.charCode;\r\n if ( key == 8 || key == 46 ) {\r\n return;\r\n }\r\n const current: string = event.target.value;\r\n const next: string = current.concat(event.key);\r\n if(this.type !== 'integers'&&next === '-'){\r\n return;\r\n }\r\n let regexDecimal: string = `(([0-9]+(\\\\.[0-9])?)+(\\\\,[0-9]{0,${this.precision}}){0,1})$`;\r\n if (this.precision == 0) {\r\n regexDecimal = `(([0-9]+(\\\\.[0-9])?)+)$`;\r\n }\r\n if (this.type == 'minus') {\r\n regexDecimal = `[-]${regexDecimal}`;\r\n }\r\n if (!this.type) {\r\n regexDecimal = `[-]?${regexDecimal}`;\r\n }\r\n console.log(regexDecimal);\r\n \r\n const regExp: RegExp = new RegExp(`^${regexDecimal}`,'g');\r\n if (next && !String(next).match(regExp)){\r\n event.preventDefault();\r\n return;\r\n }\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n this.sdFocus.emit();\r\n if (this.sdFocusForceBlur.observers?.length > 0) {\r\n this.blur();\r\n this.sdFocusForceBlur.emit();\r\n }\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n let val: string = (this.inputControl.value ?? '').toString();\r\n const arrayValue = val.split(',');\r\n if (arrayValue.length>=2 && arrayValue[1] == '') {\r\n this.inputControl.setValue(this.#formatNumber(arrayValue[0]));\r\n return;\r\n }\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n }\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n blur = () => {\r\n this.isFocused = false;\r\n this.control?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.control?.nativeElement?.focus();\r\n }, 100);\r\n }\r\n\r\n #customValidator = (func: (value: any) => string | Promise<string>): AsyncValidatorFn => {\r\n return async (c: AbstractControl): Promise<{ [key: string]: any } | null> => {\r\n const value = c.value || null;\r\n if (func && typeof (func) === 'function') {\r\n const result = func(value);\r\n if (result instanceof Promise) {\r\n const message = await result;\r\n if (message) {\r\n return {\r\n customValidator: message\r\n };\r\n }\r\n return null;\r\n }\r\n if (result) {\r\n return {\r\n customValidator: result\r\n };\r\n }\r\n return null;\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdInputNumber } from './input-number.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n\r\n@NgModule({\r\n declarations: [SdInputNumber],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n MatButtonModule\r\n ],\r\n exports: [\r\n SdInputNumber\r\n ]\r\n})\r\nexport class SdInputNumberModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/input-number.module';\r\nexport * from './lib/input-number.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAM,8BAA8B;IAClC,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;KAAK;IACjD,YAAY,CAAC,OAA2B,EAAE,IAAwC;;QAChF,MAAM,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC;QAC3C,OAAO,CAAC,EAAE,OAAA,IAAI,CAAC,WAAW,0CAAE,OAAO,MAAK,OAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,YAAI,IAAI,CAAC,WAAW,0CAAE,OAAO,CAAA,IAAI,WAAW,CAAC,CAAC,CAAC;KAC/G;CACF;MAOY,aAAa;IAwGxB,YACU,GAAsB,EACW,UAA8B,EAC/D,cAAgC;QAFhC,QAAG,GAAH,GAAG,CAAmB;QACW,eAAU,GAAV,UAA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A8Id,MAAM,SAAC,WAAW,cAAG,QAAQ;YA5HzB,gBAAgB;;;mBAsBtB,KAAK;mBAKL,KAAK;mBAEL,KAAK;oBASL,KAAK;0BACL,KAAK;mCAEL,KAAK,SAAC,qBAAqB;2BAI3B,KAAK,SAAC,aAAa;oBAInB,KAAK;0BAYL,MAAM;uBAIN,KAAK;mBAKL,KAAK;wBACL,KAAK;uBAGL,KAAK;kBAKL,KAAK;kBAML,KAAK;wBAML,KAAK;uBAKL,KAAK;yBAUL,KAAK;uBAEL,MAAM;sBACN,MAAM;+BACN,MAAM;yBACN,MAAM;sBAEN,SAAS,SAAC,SAAS;qBAMnB,YAAY,SAAC,kBAAkB;uBAC/B,YAAY,SAAC,iBAAiB;;;MClHpB,mBAAmB;;;YAlB/B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,aAAa,CAAC;gBAC7B,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,kBAAkB;oBAClB,cAAc;oBACd,aAAa;oBACb,gBAAgB;oBAChB,iBAAiB;oBACjB,cAAc;oBACd,eAAe;iBAChB;gBACD,OAAO,EAAE;oBACP,aAAa;iBACd;aACF;;;AC7BD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sd-angular-core-input-number.js","sources":["../../../../projects/sd-core/input-number/src/lib/input-number.component.ts","../../../../projects/sd-core/input-number/src/lib/input-number.module.ts","../../../../projects/sd-core/input-number/src/public-api.ts","../../../../projects/sd-core/input-number/sd-angular-core-input-number.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n ViewChild,\r\n Output,\r\n EventEmitter,\r\n ChangeDetectorRef,\r\n OnDestroy,\r\n AfterViewInit,\r\n ElementRef,\r\n OnInit,\r\n ContentChild,\r\n ChangeDetectionStrategy,\r\n HostListener,\r\n Inject,\r\n Optional\r\n} from '@angular/core';\r\nimport { AbstractControl, NgForm, ValidatorFn, Validators, AsyncValidatorFn, FormGroup, FormControl, FormGroupDirective } from '@angular/forms';\r\nimport * as uuid from 'uuid';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { Subscription } from 'rxjs';\r\n// import { SdInputSuffixDirective } from './directives/input-suffix.directive';\r\nimport { SdFormControl, SdSuffixDirective } from '@sd-angular/core/common';\r\nimport { SdViewDefDirective } from '@sd-angular/core/common';\r\nimport { SdUtilityService } from '@sd-angular/core/utility';\r\nimport { FORM_CONFIG } from '@sd-angular/core/common';\r\nimport { IFormConfiguration } from '@sd-angular/core/common';\r\nimport { MatFormFieldAppearance } from '@angular/material/form-field';\r\nimport { ErrorStateMatcher } from '@angular/material/core';\r\nclass SdInputNumberErrotStateMatcher implements ErrorStateMatcher {\r\n constructor(private formControl: FormControl) { }\r\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\r\n const isSubmitted = form && form.submitted;\r\n return !!(this.formControl?.invalid && (this.formControl?.dirty || this.formControl?.touched || isSubmitted));\r\n }\r\n}\r\n@Component({\r\n selector: 'sd-input-number',\r\n templateUrl: './input-number.component.html',\r\n styleUrls: ['./input-number.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {\r\n id = `I${uuid.v4()}`;\r\n #name = uuid.v4();\r\n #valueInput: string;\r\n #regexDecimal: string\r\n @Input() set name(val: string) {\r\n if (val) {\r\n this.#name = val;\r\n }\r\n }\r\n @Input() size: 'sm' | 'lg';\r\n #form: FormGroup;\r\n @Input() set form(val: NgForm | FormGroup) {\r\n if (val) {\r\n if (val instanceof NgForm) {\r\n this.#form = val.form;\r\n } else {\r\n this.#form = val;\r\n }\r\n }\r\n }\r\n @Input() label: string;\r\n @Input() placeholder: string;\r\n disableErrorMessage = false;\r\n @Input('disableErrorMessage') set _disableErrorMessage(val: boolean | '') {\r\n this.disableErrorMessage = (val === '') || val;\r\n }\r\n #blurOnEnter = false;\r\n @Input('blurOnEnter') set _blurOnEnter(val: boolean | '') {\r\n this.#blurOnEnter = (val === '') || val;\r\n }\r\n #model: any;\r\n @Input() set model(value: any) {\r\n if (this.#model !== value) {\r\n this.#model = value;\r\n this.formControl.setValue(value, {\r\n emitEvent: false\r\n });\r\n if (value || value == 0) {\r\n const val = value.toString().replace(/\\./g, ',');\r\n this.inputControl.setValue(this.#setValueInput(val));\r\n }\r\n }\r\n }\r\n @Output() modelChange = new EventEmitter();\r\n\r\n // Validator\r\n isRequired = false;\r\n @Input() set required(val: boolean | '') {\r\n this.isRequired = (val === '') || val;\r\n this.#updateValidator();\r\n }\r\n\r\n @Input() type: 'minus' | 'integers'; //minus: chỉ nhập số âm, integers: chỉ số dương, all: tất cả\r\n @Input() precision: number = 2; //số chữ số thập phân \r\n\r\n isReadonly = false;\r\n @Input() set readonly(val: boolean | '') {\r\n this.isReadonly = (val === '') || val;\r\n }\r\n\r\n #min: number;\r\n @Input() set min(val: number) {\r\n this.#min = val;\r\n this.#updateValidator();\r\n }\r\n\r\n #max: number;\r\n @Input() set max(val: number) {\r\n this.#max = val;\r\n this.#updateValidator();\r\n }\r\n\r\n #validator: (value: any) => string | Promise<string>;\r\n @Input() set validator(validator: (value: any) => string | Promise<string>) {\r\n this.#validator = validator;\r\n this.#updateValidator();\r\n }\r\n\r\n @Input() set disabled(val: boolean | '') {\r\n val = (val === '') || val;\r\n if (val) {\r\n this.inputControl.disable();\r\n this.formControl.disable();\r\n } else {\r\n this.inputControl.enable();\r\n this.formControl.enable();\r\n }\r\n }\r\n @Input() appearance: MatFormFieldAppearance;\r\n\r\n @Output() sdChange = new EventEmitter<any>();\r\n @Output() sdFocus = new EventEmitter<any>();\r\n @Output() sdFocusForceBlur = new EventEmitter<any>();\r\n @Output() keyupEnter = new EventEmitter();\r\n\r\n @ViewChild('control') control: ElementRef;\r\n formControl = new SdFormControl();\r\n inputControl = new SdFormControl();\r\n #subscription = new Subscription();\r\n matcher = new SdInputNumberErrotStateMatcher(this.formControl);\r\n\r\n @ContentChild(SdViewDefDirective) sdView: SdViewDefDirective;\r\n @ContentChild(SdSuffixDirective) sdSuffix: SdSuffixDirective;\r\n isFocused = false;\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n @Inject(FORM_CONFIG) @Optional() private formConfig: IFormConfiguration,\r\n private utilityService: SdUtilityService) {\r\n }\r\n\r\n ngOnInit() {\r\n this.appearance = this.appearance || this.formConfig?.appearance;\r\n this.#subscription.add(this.inputControl.touchChanges.subscribe(() => {\r\n this.formControl.markAsTouched();\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.formControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#subscription.add(this.inputControl.sdChanges.subscribe(() => {\r\n this.ref.markForCheck();\r\n }));\r\n this.#regexDecimal = `(([0-9]+(\\\\.[0-9])?)+(\\\\,[0-9]{0,${this.precision}}){0,1})$`;\r\n if (this.precision == 0) {\r\n this.#regexDecimal = `(([0-9]+(\\\\.[0-9])?)+)$`;\r\n }\r\n if (this.type == 'minus') {\r\n this.#regexDecimal = `[-]${this.#regexDecimal}`;\r\n }\r\n if (!this.type) {\r\n this.#regexDecimal = `[-]?${this.#regexDecimal}`;\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.#subscription.add(this.inputControl.valueChanges.pipe(debounceTime(200)).subscribe(val => {\r\n if (!val) {\r\n this.formControl.setValue(undefined);\r\n this.modelChange.emit(undefined);\r\n this.sdChange.emit(undefined);\r\n return;\r\n }\r\n let item = this.#setValueInput(val);\r\n if (this.#valueInput === item) {\r\n return;\r\n }\r\n this.#valueInput = item;\r\n let value = (val.toString().replace(/\\./g, '').replace(/,/g, '.'));\r\n if (this.#min || this.#min === 0) {\r\n if (+value < this.#min) {\r\n value = this.#min;\r\n item = this.#setValueInput(this.#min.toString());\r\n }\r\n }\r\n this.inputControl.setValue(item);\r\n this.formControl.setValue(value);\r\n this.#outPutValue(Number(value));\r\n }));\r\n this.#form?.addControl(this.#name, this.formControl);\r\n this.ref.detectChanges();\r\n }\r\n\r\n #setValueInput = (value: string) => {\r\n const arrayNext = value.split(',');\r\n if (arrayNext.length >= 2) {\r\n return `${this.#formatNumber(arrayNext[0])},${arrayNext[1]}`;\r\n }\r\n return this.#formatNumber(value);\r\n }\r\n\r\n #formatNumber = (string) => {\r\n return string.toString().replace(/\\./g, '').split(\"\").reverse().reduce((acc, num, i, orig) => {\r\n return num + (num != \"-\" && i && !(i % 3) ? \".\" : \"\") + acc;\r\n }, \"\");\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n this.#form?.removeControl(this.#name);\r\n this.#subscription.unsubscribe();\r\n }\r\n\r\n reValidate = () => {\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #updateValidator = () => {\r\n this.formControl.clearValidators();\r\n this.formControl.clearAsyncValidators();\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n if (this.isRequired) {\r\n validators.push(Validators.required);\r\n }\r\n if (this.#validator) {\r\n asyncValidators.push(this.#customValidator(this.#validator));\r\n }\r\n this.formControl.setValidators(validators);\r\n this.formControl.setAsyncValidators(asyncValidators);\r\n this.formControl.updateValueAndValidity();\r\n }\r\n\r\n #outPutValue = (value: any) => {\r\n this.modelChange.emit(value);\r\n this.sdChange.emit(value);\r\n }\r\n\r\n onKeyupEnter = () => {\r\n const val: string = (this.inputControl.value ?? '').toString();\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n this.keyupEnter.emit(this.inputControl.value);\r\n if (this.#blurOnEnter) {\r\n this.blur();\r\n }\r\n }\r\n\r\n onKeydown = (event) => {\r\n const key = event.keyCode || event.charCode;\r\n if (key == 8 || key == 46 || key == 37 || key == 39) {\r\n return;\r\n }\r\n const current: string = event.target.value;\r\n const curval_arr = current.split(\"\");\r\n curval_arr.splice(event.target.selectionStart, (event.target.selectionEnd - event.target.selectionStart), event.key);\r\n const newval = curval_arr.join(\"\");\r\n if (this.type !== 'integers' && newval === '-') {\r\n return;\r\n }\r\n const regExp: RegExp = new RegExp(`^${this.#regexDecimal}`, 'g');\r\n if (newval && !String(newval).match(regExp)) {\r\n event.preventDefault();\r\n return;\r\n }\r\n const value = (newval.toString().replace(/\\./g, '').replace(/,/g, '.'));\r\n if ((this.#max || this.#max === 0) && +value > this.#max) {\r\n setTimeout(() => { \r\n this.inputControl.setValue(this.#formatNumber(this.#max));\r\n });\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n onFocus = () => {\r\n this.isFocused = true;\r\n this.sdFocus.emit();\r\n if (this.sdFocusForceBlur.observers?.length > 0) {\r\n this.blur();\r\n this.sdFocusForceBlur.emit();\r\n }\r\n }\r\n\r\n onBlur = () => {\r\n this.isFocused = false;\r\n let val: string = (this.inputControl.value ?? '').toString();\r\n const arrayValue = val.split(',');\r\n if (arrayValue.length >= 2 && arrayValue[1] == '') {\r\n this.inputControl.setValue(this.#formatNumber(arrayValue[0]));\r\n return;\r\n }\r\n if (val.length > val.trim().length) {\r\n this.inputControl.setValue(val.trim());\r\n }\r\n }\r\n\r\n onClick = () => {\r\n if (this.sdView?.templateRef) {\r\n if (!this.formControl.disabled && !this.isFocused) {\r\n this.focus();\r\n }\r\n }\r\n }\r\n\r\n blur = () => {\r\n this.isFocused = false;\r\n this.control?.nativeElement?.blur();\r\n }\r\n\r\n focus = () => {\r\n this.isFocused = true;\r\n setTimeout(() => {\r\n this.control?.nativeElement?.focus();\r\n }, 100);\r\n }\r\n\r\n #customValidator = (func: (value: any) => string | Promise<string>): AsyncValidatorFn => {\r\n return async (c: AbstractControl): Promise<{ [key: string]: any } | null> => {\r\n const value = c.value || null;\r\n if (func && typeof (func) === 'function') {\r\n const result = func(value);\r\n if (result instanceof Promise) {\r\n const message = await result;\r\n if (message) {\r\n return {\r\n customValidator: message\r\n };\r\n }\r\n return null;\r\n }\r\n if (result) {\r\n return {\r\n customValidator: result\r\n };\r\n }\r\n return null;\r\n }\r\n return null;\r\n };\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdInputNumber } from './input-number.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { SdTranslateModule } from '@sd-angular/core/translate';\r\nimport { SdCommonModule } from '@sd-angular/core/common';\r\n\r\n@NgModule({\r\n declarations: [SdInputNumber],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n SdTranslateModule,\r\n SdCommonModule,\r\n MatButtonModule\r\n ],\r\n exports: [\r\n SdInputNumber\r\n ]\r\n})\r\nexport class SdInputNumberModule { }\r\n","/*\r\n * Public API Surface of superdev-angular-core\r\n */\r\n\r\nexport * from './lib/input-number.module';\r\nexport * from './lib/input-number.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuid.v4"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAM,8BAA8B;IAClC,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;KAAK;IACjD,YAAY,CAAC,OAA2B,EAAE,IAAwC;;QAChF,MAAM,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC;QAC3C,OAAO,CAAC,EAAE,OAAA,IAAI,CAAC,WAAW,0CAAE,OAAO,MAAK,OAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,YAAI,IAAI,CAAC,WAAW,0CAAE,OAAO,CAAA,IAAI,WAAW,CAAC,CAAC,CAAC;KAC/G;CACF;MAOY,aAAa;IAyGxB,YACU,GAAsB,EACW,UAA8B,EAC/D,cAAgC;QAFhC,QAAG,GAAH,GAAG,CAAmB;QACW,eAAU,GAAV,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AO,EAAE;oBACP,aAAa;iBACd;aACF;;;AC7BD;;;;ACAA;;;;;;"}
|
|
@@ -2,45 +2,45 @@
|
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
4
|
export * from './index';
|
|
5
|
-
export { SdColumnInlineFilter as
|
|
6
|
-
export { SdDesktopCellChildrenView as
|
|
7
|
-
export { SdDesktopCellEditor as
|
|
8
|
-
export { SdDesktopCellView as
|
|
9
|
-
export { SdDesktopCell as
|
|
10
|
-
export { SdDesktopCommand as
|
|
11
|
-
export { SdDesktopEditorValidation as
|
|
12
|
-
export { SdDynamicColumn as
|
|
5
|
+
export { SdColumnInlineFilter as ɵr } from './src/lib/components/column-inline-filter/column-inline-filter.component';
|
|
6
|
+
export { SdDesktopCellChildrenView as ɵp } from './src/lib/components/desktop-cell-children-view/desktop-cell-children-view.component';
|
|
7
|
+
export { SdDesktopCellEditor as ɵm } from './src/lib/components/desktop-cell-editor/desktop-cell-editor.component';
|
|
8
|
+
export { SdDesktopCellView as ɵo } from './src/lib/components/desktop-cell-view/desktop-cell-view.component';
|
|
9
|
+
export { SdDesktopCell as ɵl } from './src/lib/components/desktop-cell/desktop-cell.component';
|
|
10
|
+
export { SdDesktopCommand as ɵq } from './src/lib/components/desktop-command/desktop-command.component';
|
|
11
|
+
export { SdDesktopEditorValidation as ɵn } from './src/lib/components/desktop-editor-validation/desktop-editor-validation.component';
|
|
12
|
+
export { SdDynamicColumn as ɵt } from './src/lib/components/dynamic-column/dynamic-column.component';
|
|
13
13
|
export { SdGridFilter as ɵb } from './src/lib/components/grid-filter/grid-filter.component';
|
|
14
14
|
export { SdPopupExport as ɵe } from './src/lib/components/popup-export/popup-export.component';
|
|
15
15
|
export { SdPopupFilter as ɵc } from './src/lib/components/popup-filter/popup-filter.component';
|
|
16
|
-
export { SdPopupGridConfiguration as
|
|
17
|
-
export { SdGridQuickAction as
|
|
16
|
+
export { SdPopupGridConfiguration as ɵs } from './src/lib/components/popup-grid-configuration/popup-grid-configuration.component';
|
|
17
|
+
export { SdGridQuickAction as ɵk } from './src/lib/components/quick-action/quick-action.component';
|
|
18
18
|
export { MatPaginatorIntlCro as ɵa } from './src/lib/grid-material.module';
|
|
19
19
|
export { GRID_MATERIAL_CONFIG as ɵg, ISdGridMaterialConfiguration as ɵf } from './src/lib/models/grid-configuration.model';
|
|
20
20
|
export { SdCellViewPipe as ɵbp } from './src/lib/pipes/cell-view.pipe';
|
|
21
|
-
export { SdColumnBadgePipe as
|
|
22
|
-
export { SdColumnChildrenFilterPipe as
|
|
23
|
-
export { SdColumnHtmlTemplatePipe as
|
|
24
|
-
export { SdColumnTitlePipe as
|
|
25
|
-
export { SdColumnTooltipPipe as
|
|
26
|
-
export { SdColumnTransformPipe as
|
|
21
|
+
export { SdColumnBadgePipe as ɵbf } from './src/lib/pipes/column-badge.pipe';
|
|
22
|
+
export { SdColumnChildrenFilterPipe as ɵw } from './src/lib/pipes/column-children-filter.pipe';
|
|
23
|
+
export { SdColumnHtmlTemplatePipe as ɵbc } from './src/lib/pipes/column-html-template.pipe';
|
|
24
|
+
export { SdColumnTitlePipe as ɵx } from './src/lib/pipes/column-title.pipe';
|
|
25
|
+
export { SdColumnTooltipPipe as ɵbe } from './src/lib/pipes/column-tooltip.pipe';
|
|
26
|
+
export { SdColumnTransformPipe as ɵbd } from './src/lib/pipes/column-transform.pipe';
|
|
27
27
|
export { SdColumnValuesPipe as ɵi } from './src/lib/pipes/column-values.pipe';
|
|
28
|
-
export { SdCommandDisablePipe as
|
|
29
|
-
export { SdCommandFilterPipe as
|
|
30
|
-
export { SdCommandIconPipe as
|
|
31
|
-
export { SdCommandTitlePipe as
|
|
32
|
-
export { SdEditorHandlerColumnPipe as
|
|
33
|
-
export { SdEditorHandlerRowPipe as
|
|
28
|
+
export { SdCommandDisablePipe as ɵz } from './src/lib/pipes/command-disable.pipe';
|
|
29
|
+
export { SdCommandFilterPipe as ɵy } from './src/lib/pipes/command-filter.pipe';
|
|
30
|
+
export { SdCommandIconPipe as ɵba } from './src/lib/pipes/command-icon.pipe';
|
|
31
|
+
export { SdCommandTitlePipe as ɵbb } from './src/lib/pipes/command-title.pipe';
|
|
32
|
+
export { SdEditorHandlerColumnPipe as ɵj } from './src/lib/pipes/editor-handler-column.pipe';
|
|
33
|
+
export { SdEditorHandlerRowPipe as ɵbm } from './src/lib/pipes/editor-handler-row.pipe';
|
|
34
34
|
export { SdEditorValidatePipe as ɵbn } from './src/lib/pipes/editor-validate.pipe';
|
|
35
|
-
export { SdFilterColumnPipe as
|
|
36
|
-
export { SdFilterExternalPipe as
|
|
37
|
-
export { SdGridConfigurationResultPipe as
|
|
35
|
+
export { SdFilterColumnPipe as ɵbg } from './src/lib/pipes/filter-column.pipe';
|
|
36
|
+
export { SdFilterExternalPipe as ɵbh } from './src/lib/pipes/filter-external.pipe';
|
|
37
|
+
export { SdGridConfigurationResultPipe as ɵv } from './src/lib/pipes/grid-configuration-result.pipe';
|
|
38
38
|
export { SdGroupPipe as ɵbq } from './src/lib/pipes/sd-group.pipe';
|
|
39
|
-
export { SdSelectionActionFilterPipe as
|
|
40
|
-
export { SdSelectionDisablePipe as
|
|
41
|
-
export { SdSelectionVisibleSelectAllPipe as
|
|
42
|
-
export { SdSelectionVisiblePipe as
|
|
39
|
+
export { SdSelectionActionFilterPipe as ɵbi } from './src/lib/pipes/selection-action-filter.pipe';
|
|
40
|
+
export { SdSelectionDisablePipe as ɵbk } from './src/lib/pipes/selection-disable.pipe';
|
|
41
|
+
export { SdSelectionVisibleSelectAllPipe as ɵbl } from './src/lib/pipes/selection-visible-select-all.pipe';
|
|
42
|
+
export { SdSelectionVisiblePipe as ɵbj } from './src/lib/pipes/selection-visible.pipe';
|
|
43
43
|
export { SdStyleRowCss as ɵbo } from './src/lib/pipes/style-row-css.pipe';
|
|
44
|
-
export { SdGeneratedColumnService as
|
|
44
|
+
export { SdGeneratedColumnService as ɵu } from './src/lib/services/generated-column/generated-column.service';
|
|
45
45
|
export { SdGridConfigurationService as ɵh } from './src/lib/services/grid-configuration.service';
|
|
46
46
|
export { SdGridFilterService as ɵd } from './src/lib/services/grid-filter.service';
|