@colijnit/corecomponents_v12 12.0.21 → 12.0.24
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/colijnit-corecomponents_v12.umd.js +988 -158
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12-12.0.24.tgz +0 -0
- package/colijnit-corecomponents_v12.d.ts +15 -9
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +16 -10
- package/esm2015/lib/components/base/base-input.component.js +43 -10
- package/esm2015/lib/components/base/commit-buttons/commit-buttons.component.js +92 -0
- package/esm2015/lib/components/base/commit-buttons/commit-buttons.module.js +19 -0
- package/esm2015/lib/components/button/button.component.js +1 -1
- package/esm2015/lib/components/carousel-3d/carousel-3d.component.js +2 -6
- package/esm2015/lib/components/co-dialog-wizard/co-dialog-wizard.component.js +51 -0
- package/esm2015/lib/components/co-dialog-wizard/co-dialog-wizard.module.js +17 -0
- package/esm2015/lib/components/drop-down-list/drop-down-list.component.js +4 -1
- package/esm2015/lib/components/form/form.component.js +8 -3
- package/esm2015/lib/components/grid/base/base-grid.component.js +7 -3
- package/esm2015/lib/components/grid/base/base-inline-edit-grid.component.js +47 -3
- package/esm2015/lib/components/grid/base/base-selection-grid.component.js +12 -2
- package/esm2015/lib/components/grid/co-grid.component.js +35 -32
- package/esm2015/lib/components/grid/co-grid.module.js +4 -2
- package/esm2015/lib/components/grid-toolbar/grid-toolbar.component.js +41 -0
- package/esm2015/lib/components/grid-toolbar/grid-toolbar.module.js +23 -0
- package/esm2015/lib/components/input-checkbox/input-checkbox.component.js +4 -1
- package/esm2015/lib/components/input-checkbox-multi-select/input-checkbox-multi-select.component.js +4 -1
- package/esm2015/lib/components/input-combo-box/input-combo-box.component.js +5 -4
- package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +4 -1
- package/esm2015/lib/components/input-listbox/input-listbox.component.js +4 -1
- package/esm2015/lib/components/input-number-picker/input-number-picker.component.js +22 -24
- package/esm2015/lib/components/input-radio-button/input-radio-button.component.js +4 -1
- package/esm2015/lib/components/input-text/input-text.component.js +11 -13
- package/esm2015/lib/components/input-text/input-text.module.js +4 -2
- package/esm2015/lib/components/input-textarea/input-textarea.component.js +4 -1
- package/esm2015/lib/components/multi-select-list/multi-select-list.component.js +4 -1
- package/esm2015/lib/components/simple-grid/base-simple-grid.component.js +86 -0
- package/esm2015/lib/components/simple-grid/simple-grid-cell.component.js +163 -0
- package/esm2015/lib/components/simple-grid/simple-grid-column.directive.js +43 -4
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +257 -59
- package/esm2015/lib/components/simple-grid/simple-grid.module.js +11 -2
- package/esm2015/lib/core/constant/number-inputs-key-down-white-list.js +2 -1
- package/esm2015/public-api.js +3 -1
- package/fesm2015/colijnit-corecomponents_v12.js +1032 -205
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/base/base-input.component.d.ts +5 -2
- package/lib/components/base/commit-buttons/commit-buttons.component.d.ts +19 -0
- package/lib/components/base/commit-buttons/commit-buttons.module.d.ts +2 -0
- package/lib/components/base/commit-buttons/style/_layout.scss +127 -0
- package/lib/components/base/commit-buttons/style/_material-definition.scss +5 -0
- package/lib/components/base/commit-buttons/style/_theme.scss +34 -0
- package/lib/components/base/commit-buttons/style/material.scss +4 -0
- package/lib/components/co-dialog/style/_layout.scss +3 -0
- package/lib/components/co-dialog-wizard/co-dialog-wizard.component.d.ts +9 -0
- package/lib/components/co-dialog-wizard/co-dialog-wizard.module.d.ts +2 -0
- package/lib/components/co-dialog-wizard/style/_layout.scss +51 -0
- package/lib/components/co-dialog-wizard/style/_material-definition.scss +25 -0
- package/lib/components/co-dialog-wizard/style/_theme.scss +16 -0
- package/lib/components/co-dialog-wizard/style/material.scss +5 -0
- package/lib/components/collapsible/style/_layout.scss +1 -1
- package/lib/components/collapsible/style/_material-definition.scss +1 -0
- package/lib/components/form/form.component.d.ts +1 -0
- package/lib/components/grid/base/base-grid.component.d.ts +3 -0
- package/lib/components/grid/base/base-inline-edit-grid.component.d.ts +11 -2
- package/lib/components/grid/base/base-selection-grid.component.d.ts +4 -0
- package/lib/components/grid-toolbar/grid-toolbar.component.d.ts +13 -0
- package/lib/components/grid-toolbar/grid-toolbar.module.d.ts +2 -0
- package/lib/components/grid-toolbar/style/_layout.scss +10 -0
- package/lib/components/grid-toolbar/style/_material-definition.scss +0 -0
- package/lib/components/grid-toolbar/style/_theme.scss +5 -0
- package/lib/components/grid-toolbar/style/material.scss +5 -0
- package/lib/components/input-combo-box/input-combo-box.component.d.ts +0 -1
- package/lib/components/input-number-picker/input-number-picker.component.d.ts +1 -6
- package/lib/components/input-radio-button/style/_material-definition.scss +1 -1
- package/lib/components/input-text/style/_layout.scss +0 -32
- package/lib/components/input-text/style/_material-definition.scss +0 -3
- package/lib/components/input-text/style/_theme.scss +0 -16
- package/lib/components/input-text/style/material.scss +1 -0
- package/lib/components/simple-grid/base-simple-grid.component.d.ts +31 -0
- package/lib/components/simple-grid/simple-grid-cell.component.d.ts +28 -0
- package/lib/components/simple-grid/simple-grid-column.directive.d.ts +15 -2
- package/lib/components/simple-grid/simple-grid.component.d.ts +39 -22
- package/lib/components/simple-grid/style/_layout.scss +23 -0
- package/lib/components/simple-grid/style/_material-definition.scss +13 -4
- package/lib/components/simple-grid/style/_theme.scss +17 -0
- package/lib/components/simple-grid/style/material.scss +1 -0
- package/lib/style/_input.mixins.scss +1 -1
- package/lib/style/_variables.scss +5 -1
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
|
@@ -2677,6 +2677,56 @@
|
|
|
2677
2677
|
},] }
|
|
2678
2678
|
];
|
|
2679
2679
|
|
|
2680
|
+
var CoDialogWizardComponent = /** @class */ (function () {
|
|
2681
|
+
function CoDialogWizardComponent() {
|
|
2682
|
+
this.icons = exports.CoreComponentsIcon;
|
|
2683
|
+
this.showCloseIcon = true;
|
|
2684
|
+
this.animation = true;
|
|
2685
|
+
this.closeClick = new core.EventEmitter();
|
|
2686
|
+
}
|
|
2687
|
+
CoDialogWizardComponent.prototype.showClass = function () {
|
|
2688
|
+
return true;
|
|
2689
|
+
};
|
|
2690
|
+
return CoDialogWizardComponent;
|
|
2691
|
+
}());
|
|
2692
|
+
CoDialogWizardComponent.decorators = [
|
|
2693
|
+
{ type: core.Component, args: [{
|
|
2694
|
+
selector: 'co-dialog-wizard',
|
|
2695
|
+
template: "\n <div class=\"co-dialog-wizard-wrapper\" [@showHideDialog]=\"animation\">\n <div class=\"dialog-header\">\n <ng-content select=\"[header]\"></ng-content>\n <div class=\"dialog-close-button\" *ngIf=\"showCloseIcon\" (click)=\"closeClick.emit($event)\">\n <co-icon [icon]=\"icons.Cancel\"></co-icon>\n </div>\n </div>\n\n <hr class=\"co-dialog-wizard-divider\">\n\n <div class=\"dialog-content\">\n <ng-content></ng-content>\n </div>\n </div>\n ",
|
|
2696
|
+
animations: [
|
|
2697
|
+
animations.trigger('showHideDialog', [
|
|
2698
|
+
animations.state('*', animations.style({ opacity: 1 })),
|
|
2699
|
+
animations.state('void', animations.style({ opacity: 0 })),
|
|
2700
|
+
animations.transition('void => *', animations.animate('200ms 200ms')),
|
|
2701
|
+
animations.transition('* => void', animations.animate(200))
|
|
2702
|
+
])
|
|
2703
|
+
],
|
|
2704
|
+
encapsulation: core.ViewEncapsulation.None
|
|
2705
|
+
},] }
|
|
2706
|
+
];
|
|
2707
|
+
CoDialogWizardComponent.propDecorators = {
|
|
2708
|
+
showCloseIcon: [{ type: core.Input }],
|
|
2709
|
+
animation: [{ type: core.Input }],
|
|
2710
|
+
closeClick: [{ type: core.Output }],
|
|
2711
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-dialog-wizard",] }]
|
|
2712
|
+
};
|
|
2713
|
+
|
|
2714
|
+
var CoDialogWizardModule = /** @class */ (function () {
|
|
2715
|
+
function CoDialogWizardModule() {
|
|
2716
|
+
}
|
|
2717
|
+
return CoDialogWizardModule;
|
|
2718
|
+
}());
|
|
2719
|
+
CoDialogWizardModule.decorators = [
|
|
2720
|
+
{ type: core.NgModule, args: [{
|
|
2721
|
+
imports: [
|
|
2722
|
+
common.CommonModule,
|
|
2723
|
+
IconModule
|
|
2724
|
+
],
|
|
2725
|
+
declarations: [CoDialogWizardComponent],
|
|
2726
|
+
exports: [CoDialogWizardComponent]
|
|
2727
|
+
},] }
|
|
2728
|
+
];
|
|
2729
|
+
|
|
2680
2730
|
var CoKanbanComponent = /** @class */ (function () {
|
|
2681
2731
|
function CoKanbanComponent() {
|
|
2682
2732
|
this.allowDragAndDrop = true;
|
|
@@ -3174,6 +3224,8 @@
|
|
|
3174
3224
|
this.noFormGroupControl = false;
|
|
3175
3225
|
this.keepFocus = false;
|
|
3176
3226
|
this.canSaveOrCancel = false;
|
|
3227
|
+
this.committing = false;
|
|
3228
|
+
this.commitFinished = true;
|
|
3177
3229
|
this._markedAsUserTouched = false;
|
|
3178
3230
|
this._destroyed = false;
|
|
3179
3231
|
this._hasOnPushCdStrategy = false;
|
|
@@ -3544,16 +3596,24 @@
|
|
|
3544
3596
|
};
|
|
3545
3597
|
BaseInputComponent.prototype.commitClick = function (event) {
|
|
3546
3598
|
return __awaiter(this, void 0, void 0, function () {
|
|
3599
|
+
var success;
|
|
3547
3600
|
return __generator(this, function (_a) {
|
|
3548
3601
|
switch (_a.label) {
|
|
3549
3602
|
case 0:
|
|
3550
3603
|
this.keepFocus = true;
|
|
3604
|
+
this.commitFinished = false;
|
|
3605
|
+
this.committing = true;
|
|
3551
3606
|
return [4 /*yield*/, this.commit(this.model)];
|
|
3552
3607
|
case 1:
|
|
3553
|
-
_a.sent();
|
|
3608
|
+
success = _a.sent();
|
|
3554
3609
|
this.keepFocus = false;
|
|
3555
|
-
this.
|
|
3556
|
-
|
|
3610
|
+
return [4 /*yield*/, this._commitFinished()];
|
|
3611
|
+
case 2:
|
|
3612
|
+
_a.sent();
|
|
3613
|
+
if (success) {
|
|
3614
|
+
this.doBlur(event);
|
|
3615
|
+
}
|
|
3616
|
+
return [2 /*return*/, success];
|
|
3557
3617
|
}
|
|
3558
3618
|
});
|
|
3559
3619
|
});
|
|
@@ -3573,6 +3633,9 @@
|
|
|
3573
3633
|
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(ValidationErrorComponent);
|
|
3574
3634
|
this._errorValidationComponent = this.validationErrorContainer.createComponent(componentFactory);
|
|
3575
3635
|
this._errorValidationComponent.instance.error = error;
|
|
3636
|
+
if (this._hasOnPushCdStrategy) {
|
|
3637
|
+
this.changeDetector.markForCheck();
|
|
3638
|
+
}
|
|
3576
3639
|
this._positionValidationError();
|
|
3577
3640
|
}
|
|
3578
3641
|
};
|
|
@@ -3595,6 +3658,9 @@
|
|
|
3595
3658
|
if (this.canChange && this.input) {
|
|
3596
3659
|
this.input.focus();
|
|
3597
3660
|
this.focused = true;
|
|
3661
|
+
if (this._hasOnPushCdStrategy) {
|
|
3662
|
+
this.markForCheck();
|
|
3663
|
+
}
|
|
3598
3664
|
}
|
|
3599
3665
|
};
|
|
3600
3666
|
BaseInputComponent.prototype.doFocus = function (event) {
|
|
@@ -3604,6 +3670,9 @@
|
|
|
3604
3670
|
this._initialModelSet = false;
|
|
3605
3671
|
this.focused = true;
|
|
3606
3672
|
this.canSaveOrCancel = false;
|
|
3673
|
+
if (this._hasOnPushCdStrategy) {
|
|
3674
|
+
this.markForCheck();
|
|
3675
|
+
}
|
|
3607
3676
|
this.focus.next();
|
|
3608
3677
|
};
|
|
3609
3678
|
BaseInputComponent.prototype.doBlur = function (event) {
|
|
@@ -3616,7 +3685,12 @@
|
|
|
3616
3685
|
return false;
|
|
3617
3686
|
}
|
|
3618
3687
|
_this.focused = false;
|
|
3619
|
-
_this.
|
|
3688
|
+
if (_this._hasOnPushCdStrategy) {
|
|
3689
|
+
_this.markForCheck();
|
|
3690
|
+
}
|
|
3691
|
+
if (_this.input) {
|
|
3692
|
+
_this.input.blur();
|
|
3693
|
+
}
|
|
3620
3694
|
_this.blur.next();
|
|
3621
3695
|
}, 200);
|
|
3622
3696
|
};
|
|
@@ -3729,6 +3803,16 @@
|
|
|
3729
3803
|
this.control.updateValueAndValidity();
|
|
3730
3804
|
}
|
|
3731
3805
|
};
|
|
3806
|
+
BaseInputComponent.prototype._commitFinished = function () {
|
|
3807
|
+
var _this = this;
|
|
3808
|
+
return new Promise(function (resolve) {
|
|
3809
|
+
_this.commitFinished = true;
|
|
3810
|
+
setTimeout(function () {
|
|
3811
|
+
_this.committing = false;
|
|
3812
|
+
resolve();
|
|
3813
|
+
}, 800);
|
|
3814
|
+
});
|
|
3815
|
+
};
|
|
3732
3816
|
BaseInputComponent.prototype._clearErrorComponent = function () {
|
|
3733
3817
|
if (this.validationErrorContainer) {
|
|
3734
3818
|
this.validationErrorContainer.clear();
|
|
@@ -3828,7 +3912,7 @@
|
|
|
3828
3912
|
};
|
|
3829
3913
|
BaseInputComponent.prototype._handleKeyDown = function (event) {
|
|
3830
3914
|
return __awaiter(this, void 0, void 0, function () {
|
|
3831
|
-
var _a, nextSiblingToFocus;
|
|
3915
|
+
var _a, nextSiblingToFocus, success;
|
|
3832
3916
|
return __generator(this, function (_b) {
|
|
3833
3917
|
switch (_b.label) {
|
|
3834
3918
|
case 0:
|
|
@@ -3850,12 +3934,14 @@
|
|
|
3850
3934
|
event.preventDefault();
|
|
3851
3935
|
return [4 /*yield*/, this.commitClick()];
|
|
3852
3936
|
case 4:
|
|
3853
|
-
_b.sent();
|
|
3854
|
-
if (
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3937
|
+
success = _b.sent();
|
|
3938
|
+
if (success) {
|
|
3939
|
+
if (nextSiblingToFocus) {
|
|
3940
|
+
try {
|
|
3941
|
+
this._setFocusOnNextPossibleInput(nextSiblingToFocus, event.shiftKey);
|
|
3942
|
+
}
|
|
3943
|
+
catch (e) {
|
|
3944
|
+
}
|
|
3859
3945
|
}
|
|
3860
3946
|
}
|
|
3861
3947
|
return [2 /*return*/, false];
|
|
@@ -4118,6 +4204,7 @@
|
|
|
4118
4204
|
function FormComponent(_formMaster) {
|
|
4119
4205
|
this._formMaster = _formMaster;
|
|
4120
4206
|
this.onChange = new core.EventEmitter();
|
|
4207
|
+
this.showClass = true;
|
|
4121
4208
|
this.submitted = false;
|
|
4122
4209
|
// Emits true after every valid submit.
|
|
4123
4210
|
this.validSubmit = new core.EventEmitter();
|
|
@@ -4271,7 +4358,8 @@
|
|
|
4271
4358
|
FormComponent.decorators = [
|
|
4272
4359
|
{ type: core.Component, args: [{
|
|
4273
4360
|
selector: "co-form",
|
|
4274
|
-
template: "<ng-content></ng-content
|
|
4361
|
+
template: "\n <ng-content></ng-content>\n ",
|
|
4362
|
+
encapsulation: core.ViewEncapsulation.None
|
|
4275
4363
|
},] }
|
|
4276
4364
|
];
|
|
4277
4365
|
FormComponent.ctorParameters = function () { return [
|
|
@@ -4281,6 +4369,7 @@
|
|
|
4281
4369
|
readonly: [{ type: core.Input }],
|
|
4282
4370
|
keepInView: [{ type: core.Input }],
|
|
4283
4371
|
onChange: [{ type: core.Output }],
|
|
4372
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-form",] }],
|
|
4284
4373
|
submitted: [{ type: core.HostBinding, args: ["class.submitted",] }],
|
|
4285
4374
|
validSubmit: [{ type: core.Output }],
|
|
4286
4375
|
anySubmit: [{ type: core.Output }],
|
|
@@ -4326,6 +4415,9 @@
|
|
|
4326
4415
|
{
|
|
4327
4416
|
provide: COMPONENT_INTERFACE_NAME,
|
|
4328
4417
|
useExisting: core.forwardRef(function () { return DropDownListComponent; })
|
|
4418
|
+
}, {
|
|
4419
|
+
provide: BaseInputComponent,
|
|
4420
|
+
useExisting: DropDownListComponent
|
|
4329
4421
|
}
|
|
4330
4422
|
],
|
|
4331
4423
|
encapsulation: core.ViewEncapsulation.None
|
|
@@ -4400,7 +4492,8 @@
|
|
|
4400
4492
|
})(GridLines || (GridLines = {}));
|
|
4401
4493
|
|
|
4402
4494
|
var BaseGridComponent = /** @class */ (function () {
|
|
4403
|
-
function BaseGridComponent() {
|
|
4495
|
+
function BaseGridComponent(element) {
|
|
4496
|
+
this.element = element;
|
|
4404
4497
|
this.gridLines = GridLines.None;
|
|
4405
4498
|
this.contextMenuItems = [];
|
|
4406
4499
|
this.sortingEnabled = false;
|
|
@@ -4437,6 +4530,9 @@
|
|
|
4437
4530
|
BaseGridComponent.decorators = [
|
|
4438
4531
|
{ type: core.Directive }
|
|
4439
4532
|
];
|
|
4533
|
+
BaseGridComponent.ctorParameters = function () { return [
|
|
4534
|
+
{ type: core.ElementRef }
|
|
4535
|
+
]; };
|
|
4440
4536
|
BaseGridComponent.propDecorators = {
|
|
4441
4537
|
grid: [{ type: core.ViewChild, args: ['grid', { static: false },] }],
|
|
4442
4538
|
data: [{ type: core.Input }],
|
|
@@ -4575,6 +4671,10 @@
|
|
|
4575
4671
|
function BaseInlineEditGridComponent() {
|
|
4576
4672
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4577
4673
|
_this.rowSaved = new core.EventEmitter();
|
|
4674
|
+
_this.beforeRowDelete = new core.EventEmitter(false);
|
|
4675
|
+
_this.rowDeleted = new core.EventEmitter();
|
|
4676
|
+
_this.actionBeginObservable$ = new rxjs.Observable();
|
|
4677
|
+
_this.actionBeginObservableSub = new rxjs.Subscription();
|
|
4578
4678
|
return _this;
|
|
4579
4679
|
}
|
|
4580
4680
|
Object.defineProperty(BaseInlineEditGridComponent.prototype, "inlineEdit", {
|
|
@@ -4594,13 +4694,61 @@
|
|
|
4594
4694
|
enumerable: false,
|
|
4595
4695
|
configurable: true
|
|
4596
4696
|
});
|
|
4697
|
+
BaseInlineEditGridComponent.prototype.ngAfterViewInit = function () {
|
|
4698
|
+
var _this = this;
|
|
4699
|
+
if (this.grid) {
|
|
4700
|
+
this.actionBeginObservable$ = rxjs.fromEvent(this.grid, 'actionBegin');
|
|
4701
|
+
this.actionBeginObservableSub = this.actionBeginObservable$.subscribe(function (action) {
|
|
4702
|
+
_this.handleActionBegin(action);
|
|
4703
|
+
});
|
|
4704
|
+
}
|
|
4705
|
+
};
|
|
4706
|
+
BaseInlineEditGridComponent.prototype.ngOnDestroy = function () {
|
|
4707
|
+
this.actionBeginObservableSub.unsubscribe();
|
|
4708
|
+
};
|
|
4709
|
+
BaseInlineEditGridComponent.prototype.handleActionBegin = function (action) {
|
|
4710
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4711
|
+
return __generator(this, function (_a) {
|
|
4712
|
+
switch (_a.label) {
|
|
4713
|
+
case 0:
|
|
4714
|
+
if (!action) return [3 /*break*/, 3];
|
|
4715
|
+
if (!(action.requestType === "delete")) return [3 /*break*/, 2];
|
|
4716
|
+
return [4 /*yield*/, this.waitForBeforeDelete(action)];
|
|
4717
|
+
case 1:
|
|
4718
|
+
_a.sent();
|
|
4719
|
+
_a.label = 2;
|
|
4720
|
+
case 2:
|
|
4721
|
+
if (action.requestType === "save") {
|
|
4722
|
+
this.rowSaved.next(action.data);
|
|
4723
|
+
}
|
|
4724
|
+
_a.label = 3;
|
|
4725
|
+
case 3: return [2 /*return*/];
|
|
4726
|
+
}
|
|
4727
|
+
});
|
|
4728
|
+
});
|
|
4729
|
+
};
|
|
4597
4730
|
BaseInlineEditGridComponent.prototype.handleActionComplete = function (action) {
|
|
4598
4731
|
if (action) {
|
|
4732
|
+
if (action.requestType === "delete") {
|
|
4733
|
+
this.rowDeleted.next(action.data);
|
|
4734
|
+
}
|
|
4599
4735
|
if (action.requestType === "save") {
|
|
4600
4736
|
this.rowSaved.next(action.data);
|
|
4601
4737
|
}
|
|
4602
4738
|
}
|
|
4603
4739
|
};
|
|
4740
|
+
BaseInlineEditGridComponent.prototype.waitForBeforeDelete = function (action) {
|
|
4741
|
+
var _this = this;
|
|
4742
|
+
// @ts-ignore
|
|
4743
|
+
var beforeRowDelete$ = rxjs.fromEvent(this.element, 'beforeRowDelete');
|
|
4744
|
+
return new Promise(function (resolve) {
|
|
4745
|
+
beforeRowDelete$.subscribe(function (result) {
|
|
4746
|
+
action = result;
|
|
4747
|
+
return resolve(action);
|
|
4748
|
+
}).unsubscribe();
|
|
4749
|
+
_this.beforeRowDelete.next(action);
|
|
4750
|
+
});
|
|
4751
|
+
};
|
|
4604
4752
|
return BaseInlineEditGridComponent;
|
|
4605
4753
|
}(BaseToolbarGridComponent));
|
|
4606
4754
|
BaseInlineEditGridComponent.decorators = [
|
|
@@ -4608,7 +4756,9 @@
|
|
|
4608
4756
|
];
|
|
4609
4757
|
BaseInlineEditGridComponent.propDecorators = {
|
|
4610
4758
|
inlineEdit: [{ type: core.Input }],
|
|
4611
|
-
rowSaved: [{ type: core.Output }]
|
|
4759
|
+
rowSaved: [{ type: core.Output }],
|
|
4760
|
+
beforeRowDelete: [{ type: core.Output }],
|
|
4761
|
+
rowDeleted: [{ type: core.Output }]
|
|
4612
4762
|
};
|
|
4613
4763
|
__decorate([
|
|
4614
4764
|
InputBoolean()
|
|
@@ -4626,6 +4776,8 @@
|
|
|
4626
4776
|
_this.contextMenuItemClick = new core.EventEmitter();
|
|
4627
4777
|
_this.rowDragStartEvent = new core.EventEmitter();
|
|
4628
4778
|
_this.rowDropEvent = new core.EventEmitter();
|
|
4779
|
+
_this.beforeRowsDelete = new core.EventEmitter();
|
|
4780
|
+
_this.rowsDeleted = new core.EventEmitter();
|
|
4629
4781
|
_this.selectionOptions = { type: "Single" };
|
|
4630
4782
|
return _this;
|
|
4631
4783
|
}
|
|
@@ -4677,6 +4829,12 @@
|
|
|
4677
4829
|
BaseSelectionGridComponent.prototype.rowDropClick = function (args) {
|
|
4678
4830
|
this.rowDropEvent.next(args);
|
|
4679
4831
|
};
|
|
4832
|
+
BaseSelectionGridComponent.prototype.handleBeforeBatchDelete = function (args) {
|
|
4833
|
+
this.beforeRowsDelete.next(args);
|
|
4834
|
+
};
|
|
4835
|
+
BaseSelectionGridComponent.prototype.handleBatchDelete = function (rows) {
|
|
4836
|
+
this.rowsDeleted.next(rows);
|
|
4837
|
+
};
|
|
4680
4838
|
return BaseSelectionGridComponent;
|
|
4681
4839
|
}(BaseInlineEditGridComponent));
|
|
4682
4840
|
BaseSelectionGridComponent.decorators = [
|
|
@@ -4691,7 +4849,9 @@
|
|
|
4691
4849
|
detailColumnClick: [{ type: core.Output }],
|
|
4692
4850
|
contextMenuItemClick: [{ type: core.Output }],
|
|
4693
4851
|
rowDragStartEvent: [{ type: core.Output }],
|
|
4694
|
-
rowDropEvent: [{ type: core.Output }]
|
|
4852
|
+
rowDropEvent: [{ type: core.Output }],
|
|
4853
|
+
beforeRowsDelete: [{ type: core.Output }],
|
|
4854
|
+
rowsDeleted: [{ type: core.Output }]
|
|
4695
4855
|
};
|
|
4696
4856
|
__decorate([
|
|
4697
4857
|
InputBoolean()
|
|
@@ -4716,7 +4876,7 @@
|
|
|
4716
4876
|
CoGridComponent.decorators = [
|
|
4717
4877
|
{ type: core.Component, args: [{
|
|
4718
4878
|
selector: 'co-grid',
|
|
4719
|
-
template: "\n
|
|
4879
|
+
template: "\n <ejs-grid #grid id=\"grid\"\n [dataSource]=\"data\"\n [columns]=\"columns\"\n [contextMenuItems]=\"contextMenuItems\"\n [pageSettings]=\"pageSettings\"\n [toolbar]=\"toolbarOptions\"\n [gridLines]=\"gridLines\"\n [frozenColumns]=\"frozenColumns\"\n [frozenRows]=\"frozenRows\"\n [selectionSettings]=\"selectionOptions\"\n [editSettings]=\"editSettings\"\n [allowPaging]=\"pagingEnabled\"\n [allowSorting]=\"sortingEnabled\"\n [allowFiltering]=\"filteringEnabled\"\n [allowGrouping]=\"groupingEnabled\"\n [allowReordering]=\"reorderingEnabled\"\n [allowResizing]=\"resizingEnabled\"\n [allowRowDragAndDrop]=\"rowDragAndDropEnabled\"\n [showColumnMenu]=\"showColumnMenu\"\n [showColumnChooser]=\"showColumnChooser\"\n [allowExcelExport]=\"exportExcelEnabled\"\n [allowPdfExport]=\"exportPdfEnabled\"\n (toolbarClick)=\"toolbarClick($event)\"\n (rowSelected)=\"handleRowSelected($event)\"\n (recordDoubleClick)=\"handleDoubleClick($event)\"\n (recordClick)=\"handleRecordClick($event)\"\n (actionComplete)=\"handleActionComplete($event)\"\n (contextMenuClick)=\"contextMenuClick($event)\"\n (rowDragStart)=\"rowDragStartClick($event)\"\n (rowDrop)=\"rowDropClick($event)\"\n (beforeBatchDelete)=\"handleBeforeBatchDelete($event)\"\n (batchDelete)=\"handleBatchDelete($event)\"\n >\n </ejs-grid>\n ",
|
|
4720
4880
|
providers: [
|
|
4721
4881
|
ej2AngularGrids.RowDDService
|
|
4722
4882
|
],
|
|
@@ -4727,6 +4887,59 @@
|
|
|
4727
4887
|
showClass: [{ type: core.HostBinding, args: ['class.co-grid',] }]
|
|
4728
4888
|
};
|
|
4729
4889
|
|
|
4890
|
+
var GridToolbarComponent = /** @class */ (function () {
|
|
4891
|
+
function GridToolbarComponent(iconsService) {
|
|
4892
|
+
this.iconsService = iconsService;
|
|
4893
|
+
this.icons = exports.CoreComponentsIcon;
|
|
4894
|
+
this.editClick = new core.EventEmitter();
|
|
4895
|
+
this.cancelClick = new core.EventEmitter();
|
|
4896
|
+
this.saveClick = new core.EventEmitter();
|
|
4897
|
+
this.addClick = new core.EventEmitter();
|
|
4898
|
+
}
|
|
4899
|
+
GridToolbarComponent.prototype.showClass = function () {
|
|
4900
|
+
return true;
|
|
4901
|
+
};
|
|
4902
|
+
return GridToolbarComponent;
|
|
4903
|
+
}());
|
|
4904
|
+
GridToolbarComponent.decorators = [
|
|
4905
|
+
{ type: core.Component, args: [{
|
|
4906
|
+
selector: "co-grid-toolbar",
|
|
4907
|
+
template: "\n <div class=\"grid-toolbar-wrapper\">\n <co-button [iconData]=\"iconsService.getIcon(icons.AddToCartDrop)\" [label]=\"'edit'\" (click)=\"editClick.emit($event)\"></co-button>\n <co-button [iconData]=\"iconsService.getIcon(icons.AddToCartDrop)\" [label]=\"'cancel'\" (click)=\"cancelClick.emit()\"></co-button>\n <co-button [iconData]=\"iconsService.getIcon(icons.AddToCartDrop)\" [label]=\"'save'\" (click)=\"saveClick.emit()\"></co-button>\n <co-button [iconData]=\"iconsService.getIcon(icons.AddToCartDrop)\" [label]=\"'add'\" (click)=\"addClick.emit()\"></co-button>\n </div>\n ",
|
|
4908
|
+
encapsulation: core.ViewEncapsulation.None
|
|
4909
|
+
},] }
|
|
4910
|
+
];
|
|
4911
|
+
GridToolbarComponent.ctorParameters = function () { return [
|
|
4912
|
+
{ type: IconCacheService }
|
|
4913
|
+
]; };
|
|
4914
|
+
GridToolbarComponent.propDecorators = {
|
|
4915
|
+
editClick: [{ type: core.Output }],
|
|
4916
|
+
cancelClick: [{ type: core.Output }],
|
|
4917
|
+
saveClick: [{ type: core.Output }],
|
|
4918
|
+
addClick: [{ type: core.Output }],
|
|
4919
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-grid-toolbar",] }]
|
|
4920
|
+
};
|
|
4921
|
+
|
|
4922
|
+
ej2Base.enableRipple(true);
|
|
4923
|
+
var GridToolbarModule = /** @class */ (function () {
|
|
4924
|
+
function GridToolbarModule() {
|
|
4925
|
+
}
|
|
4926
|
+
return GridToolbarModule;
|
|
4927
|
+
}());
|
|
4928
|
+
GridToolbarModule.decorators = [
|
|
4929
|
+
{ type: core.NgModule, args: [{
|
|
4930
|
+
imports: [
|
|
4931
|
+
IconModule,
|
|
4932
|
+
ButtonModule
|
|
4933
|
+
],
|
|
4934
|
+
declarations: [
|
|
4935
|
+
GridToolbarComponent
|
|
4936
|
+
],
|
|
4937
|
+
exports: [
|
|
4938
|
+
GridToolbarComponent
|
|
4939
|
+
]
|
|
4940
|
+
},] }
|
|
4941
|
+
];
|
|
4942
|
+
|
|
4730
4943
|
var CoGridModule = /** @class */ (function () {
|
|
4731
4944
|
function CoGridModule() {
|
|
4732
4945
|
}
|
|
@@ -4737,7 +4950,8 @@
|
|
|
4737
4950
|
imports: [
|
|
4738
4951
|
common.CommonModule,
|
|
4739
4952
|
forms.FormsModule,
|
|
4740
|
-
ej2AngularGrids.GridModule
|
|
4953
|
+
ej2AngularGrids.GridModule,
|
|
4954
|
+
GridToolbarModule
|
|
4741
4955
|
],
|
|
4742
4956
|
declarations: [CoGridComponent],
|
|
4743
4957
|
exports: [CoGridComponent],
|
|
@@ -4795,6 +5009,9 @@
|
|
|
4795
5009
|
providers: [{
|
|
4796
5010
|
provide: COMPONENT_INTERFACE_NAME,
|
|
4797
5011
|
useExisting: core.forwardRef(function () { return InputCheckboxComponent; })
|
|
5012
|
+
}, {
|
|
5013
|
+
provide: BaseInputComponent,
|
|
5014
|
+
useExisting: InputCheckboxComponent
|
|
4798
5015
|
}],
|
|
4799
5016
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
4800
5017
|
encapsulation: core.ViewEncapsulation.None
|
|
@@ -4896,6 +5113,9 @@
|
|
|
4896
5113
|
providers: [{
|
|
4897
5114
|
provide: COMPONENT_INTERFACE_NAME,
|
|
4898
5115
|
useExisting: core.forwardRef(function () { return InputCheckboxMultiSelectComponent; })
|
|
5116
|
+
}, {
|
|
5117
|
+
provide: BaseInputComponent,
|
|
5118
|
+
useExisting: InputCheckboxMultiSelectComponent
|
|
4899
5119
|
}],
|
|
4900
5120
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
4901
5121
|
encapsulation: core.ViewEncapsulation.None
|
|
@@ -4949,7 +5169,6 @@
|
|
|
4949
5169
|
_this.ngZoneWrapper = ngZoneWrapper;
|
|
4950
5170
|
_this.elementRef = elementRef;
|
|
4951
5171
|
_this.shopPopup = true;
|
|
4952
|
-
_this.customHeight = true;
|
|
4953
5172
|
_super.prototype._markAsOnPush.call(_this);
|
|
4954
5173
|
return _this;
|
|
4955
5174
|
}
|
|
@@ -4970,6 +5189,9 @@
|
|
|
4970
5189
|
providers: [{
|
|
4971
5190
|
provide: COMPONENT_INTERFACE_NAME,
|
|
4972
5191
|
useExisting: core.forwardRef(function () { return InputComboBoxComponent; })
|
|
5192
|
+
}, {
|
|
5193
|
+
provide: BaseInputComponent,
|
|
5194
|
+
useExisting: InputComboBoxComponent
|
|
4973
5195
|
}],
|
|
4974
5196
|
encapsulation: core.ViewEncapsulation.None
|
|
4975
5197
|
},] }
|
|
@@ -4989,8 +5211,7 @@
|
|
|
4989
5211
|
selected: [{ type: core.Input }],
|
|
4990
5212
|
placeholder: [{ type: core.Input }],
|
|
4991
5213
|
shopPopup: [{ type: core.Input }],
|
|
4992
|
-
showClass: [{ type: core.HostBinding, args: ["class.co-input-combo-box",] }]
|
|
4993
|
-
customHeight: [{ type: core.HostBinding, args: ["class.custom-height",] }]
|
|
5214
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-input-combo-box",] }]
|
|
4994
5215
|
};
|
|
4995
5216
|
|
|
4996
5217
|
var InputComboBoxModule = /** @class */ (function () {
|
|
@@ -5072,6 +5293,9 @@
|
|
|
5072
5293
|
template: "\n <ejs-datepicker #ejsDatePicker\n floatLabelType=\"Auto\"\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-datepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
5073
5294
|
providers: [{
|
|
5074
5295
|
provide: COMPONENT_INTERFACE_NAME, useExisting: core.forwardRef(function () { return InputDatePickerComponent; })
|
|
5296
|
+
}, {
|
|
5297
|
+
provide: BaseInputComponent,
|
|
5298
|
+
useExisting: InputDatePickerComponent
|
|
5075
5299
|
}],
|
|
5076
5300
|
encapsulation: core.ViewEncapsulation.None
|
|
5077
5301
|
},] }
|
|
@@ -5414,6 +5638,7 @@
|
|
|
5414
5638
|
KeyboardCode.Down,
|
|
5415
5639
|
KeyboardCode.Up,
|
|
5416
5640
|
KeyboardCode.Tab,
|
|
5641
|
+
KeyboardCode.Enter,
|
|
5417
5642
|
KeyboardCode.Home,
|
|
5418
5643
|
KeyboardCode.End,
|
|
5419
5644
|
KeyboardCode.Delete,
|
|
@@ -5449,64 +5674,6 @@
|
|
|
5449
5674
|
KeyboardCode.NumpadNine
|
|
5450
5675
|
];
|
|
5451
5676
|
|
|
5452
|
-
var InputTextComponent = /** @class */ (function (_super) {
|
|
5453
|
-
__extends(InputTextComponent, _super);
|
|
5454
|
-
function InputTextComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
5455
|
-
var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
|
|
5456
|
-
_this.formComponent = formComponent;
|
|
5457
|
-
_this.changeDetector = changeDetector;
|
|
5458
|
-
_this.componentFactoryResolver = componentFactoryResolver;
|
|
5459
|
-
_this.formUserChangeListener = formUserChangeListener;
|
|
5460
|
-
_this.ngZoneWrapper = ngZoneWrapper;
|
|
5461
|
-
_this.elementRef = elementRef;
|
|
5462
|
-
_this.Icons = exports.CoreComponentsIcon;
|
|
5463
|
-
_this.placeholder = "";
|
|
5464
|
-
_this.type = "text";
|
|
5465
|
-
_this.showClearButton = undefined;
|
|
5466
|
-
_this.hasOwnLabel = true;
|
|
5467
|
-
_super.prototype._markAsOnPush.call(_this);
|
|
5468
|
-
return _this;
|
|
5469
|
-
}
|
|
5470
|
-
InputTextComponent.prototype.showClass = function () {
|
|
5471
|
-
return true;
|
|
5472
|
-
};
|
|
5473
|
-
return InputTextComponent;
|
|
5474
|
-
}(BaseInputComponent));
|
|
5475
|
-
InputTextComponent.decorators = [
|
|
5476
|
-
{ type: core.Component, args: [{
|
|
5477
|
-
selector: "co-input-text",
|
|
5478
|
-
template: "\n <label [textContent]=\"placeholder\"></label>\n <input #input\n [type]=\"type\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n >\n <div *ngIf=\"showSaveCancel && focused && canSaveOrCancel\" class=\"input-save-cancel-button-wrapper\" @showHideSaveCancel>\n <div class=\"input-save-cancel-button save\" (click)=\"commitClick($event)\"></div>\n <div class=\"input-save-cancel-button cancel\" (click)=\"cancelClick($event)\"></div>\n </div>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
5479
|
-
providers: [{
|
|
5480
|
-
provide: COMPONENT_INTERFACE_NAME,
|
|
5481
|
-
useExisting: core.forwardRef(function () { return InputTextComponent; })
|
|
5482
|
-
}],
|
|
5483
|
-
animations: [
|
|
5484
|
-
animations.trigger('showHideSaveCancel', [
|
|
5485
|
-
animations.state('*', animations.style({ transform: 'scaleY(1)', opacity: 1 })),
|
|
5486
|
-
animations.state('void', animations.style({ transform: 'scaleY(0)', opacity: 0 })),
|
|
5487
|
-
animations.transition('void <=> *', animations.animate(200))
|
|
5488
|
-
]),
|
|
5489
|
-
],
|
|
5490
|
-
encapsulation: core.ViewEncapsulation.None
|
|
5491
|
-
},] }
|
|
5492
|
-
];
|
|
5493
|
-
InputTextComponent.ctorParameters = function () { return [
|
|
5494
|
-
{ type: FormComponent, decorators: [{ type: core.Optional }] },
|
|
5495
|
-
{ type: core.ChangeDetectorRef },
|
|
5496
|
-
{ type: core.ComponentFactoryResolver },
|
|
5497
|
-
{ type: FormInputUserModelChangeListenerService },
|
|
5498
|
-
{ type: NgZoneWrapperService },
|
|
5499
|
-
{ type: core.ElementRef }
|
|
5500
|
-
]; };
|
|
5501
|
-
InputTextComponent.propDecorators = {
|
|
5502
|
-
placeholder: [{ type: core.Input }],
|
|
5503
|
-
type: [{ type: core.Input }],
|
|
5504
|
-
showClearButton: [{ type: core.Input }],
|
|
5505
|
-
keyDownWhiteList: [{ type: core.Input }],
|
|
5506
|
-
showClass: [{ type: core.HostBinding, args: ["class.co-input-text",] }],
|
|
5507
|
-
hasOwnLabel: [{ type: core.HostBinding, args: ["class.has-own-label",] }]
|
|
5508
|
-
};
|
|
5509
|
-
|
|
5510
5677
|
// Input values for 'buttonShowMode' of NumberPickerComponent.
|
|
5511
5678
|
var InputNumberPickerButtonShowMode;
|
|
5512
5679
|
(function (InputNumberPickerButtonShowMode) {
|
|
@@ -5548,8 +5715,8 @@
|
|
|
5548
5715
|
_this._stepFactor = _this._stepFactors[0];
|
|
5549
5716
|
_this._mayAutoCount = false;
|
|
5550
5717
|
_this._numberLogicValueChangeSub = _this.numberLogic.valueChange.subscribe(function (value) {
|
|
5551
|
-
_this.inputTextComp.model = "" + value; // faster than this.detectChanges() just for that input
|
|
5552
5718
|
if (!_this._mayAutoCount) {
|
|
5719
|
+
_this.model = value;
|
|
5553
5720
|
_this.modelChange.emit(value);
|
|
5554
5721
|
// custom form user chagne listener .next because we don't user super.updateModel() which normally does that for us
|
|
5555
5722
|
if (_this._markedAsUserTouched) {
|
|
@@ -5560,18 +5727,17 @@
|
|
|
5560
5727
|
});
|
|
5561
5728
|
return _this;
|
|
5562
5729
|
}
|
|
5563
|
-
Object.defineProperty(InputNumberPickerComponent.prototype, "model", {
|
|
5564
|
-
get: function () {
|
|
5565
|
-
return this.numberLogic.value;
|
|
5566
|
-
},
|
|
5567
|
-
// @override
|
|
5568
|
-
set: function (model) {
|
|
5569
|
-
this.numberLogic.value = model;
|
|
5570
|
-
},
|
|
5571
|
-
enumerable: false,
|
|
5572
|
-
configurable: true
|
|
5573
|
-
});
|
|
5574
5730
|
Object.defineProperty(InputNumberPickerComponent.prototype, "min", {
|
|
5731
|
+
// @override
|
|
5732
|
+
// @Input()
|
|
5733
|
+
// public set model(model: number) {
|
|
5734
|
+
// super.model = model;
|
|
5735
|
+
// this.numberLogic.value = model;
|
|
5736
|
+
// }
|
|
5737
|
+
//
|
|
5738
|
+
// public get model(): number {
|
|
5739
|
+
// return this.numberLogic.value;
|
|
5740
|
+
// }
|
|
5575
5741
|
set: function (min) {
|
|
5576
5742
|
this.numberLogic.min = min;
|
|
5577
5743
|
},
|
|
@@ -5645,6 +5811,11 @@
|
|
|
5645
5811
|
if (this.myKeyDownWhiteList.find(function (k) { return k === event.keyCode; }) === undefined) {
|
|
5646
5812
|
return false;
|
|
5647
5813
|
}
|
|
5814
|
+
_super.prototype.handleKeyDown.call(this, event);
|
|
5815
|
+
};
|
|
5816
|
+
InputNumberPickerComponent.prototype.handleChangeModel = function (value) {
|
|
5817
|
+
console.log(value);
|
|
5818
|
+
this.numberLogic.setValue(value);
|
|
5648
5819
|
};
|
|
5649
5820
|
// Note: recursive through setTimeout().
|
|
5650
5821
|
InputNumberPickerComponent.prototype.doDecrementAuto = function () {
|
|
@@ -5719,17 +5890,6 @@
|
|
|
5719
5890
|
}
|
|
5720
5891
|
}, this._delayBeforeStartAutoCountMs);
|
|
5721
5892
|
};
|
|
5722
|
-
// Possibly show buttons.
|
|
5723
|
-
InputNumberPickerComponent.prototype.onNumberInputFocus = function () {
|
|
5724
|
-
this._numberInputHasFocus = true;
|
|
5725
|
-
this._updateButtonsShowState();
|
|
5726
|
-
};
|
|
5727
|
-
// Value correction point.
|
|
5728
|
-
InputNumberPickerComponent.prototype.onNumberInputBlur = function () {
|
|
5729
|
-
this._numberInputHasFocus = false;
|
|
5730
|
-
this.numberLogic.setValueByUserInputText(this.inputTextComp.model);
|
|
5731
|
-
this._updateButtonsShowState();
|
|
5732
|
-
};
|
|
5733
5893
|
// Note: recursive.
|
|
5734
5894
|
InputNumberPickerComponent.prototype._doIncreaseStepFactor = function () {
|
|
5735
5895
|
var _this = this;
|
|
@@ -5767,9 +5927,12 @@
|
|
|
5767
5927
|
InputNumberPickerComponent.decorators = [
|
|
5768
5928
|
{ type: core.Component, args: [{
|
|
5769
5929
|
selector: 'co-input-number-picker',
|
|
5770
|
-
template: "\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"minus-operator circle\" [class.select]=\"minSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(minusIcon)\"\n (mousedown)=\"onMinusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n <input type=\"text\"\n [ngModel]=\"
|
|
5930
|
+
template: "\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"minus-operator circle\" [class.select]=\"minSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(minusIcon)\"\n (mousedown)=\"onMinusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n <input type=\"text\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n (ngModelChange)=\"handleChangeModel($event)\"\n (keydown)=\"handleKeyDown($event)\"/>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"plus-operator circle\" [class.select]=\"plusSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(plusIcon)\"\n (mousedown)=\"onPlusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n ",
|
|
5771
5931
|
providers: [{
|
|
5772
5932
|
provide: COMPONENT_INTERFACE_NAME, useExisting: core.forwardRef(function () { return InputNumberPickerComponent; })
|
|
5933
|
+
}, {
|
|
5934
|
+
provide: BaseInputComponent,
|
|
5935
|
+
useExisting: InputNumberPickerComponent
|
|
5773
5936
|
}],
|
|
5774
5937
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
5775
5938
|
encapsulation: core.ViewEncapsulation.None
|
|
@@ -5784,7 +5947,6 @@
|
|
|
5784
5947
|
{ type: FormInputUserModelChangeListenerService }
|
|
5785
5948
|
]; };
|
|
5786
5949
|
InputNumberPickerComponent.propDecorators = {
|
|
5787
|
-
model: [{ type: core.Input }],
|
|
5788
5950
|
min: [{ type: core.Input }],
|
|
5789
5951
|
step: [{ type: core.Input }],
|
|
5790
5952
|
max: [{ type: core.Input }],
|
|
@@ -5795,7 +5957,6 @@
|
|
|
5795
5957
|
noValidation: [{ type: core.Input }],
|
|
5796
5958
|
decimals: [{ type: core.Input }],
|
|
5797
5959
|
modelChange: [{ type: core.Output }],
|
|
5798
|
-
inputTextComp: [{ type: core.ViewChild, args: [InputTextComponent, { static: true },] }],
|
|
5799
5960
|
showButtonsOnFocusOnly: [{ type: core.HostBinding, args: ["class.show-buttons-on-focus-only",] }],
|
|
5800
5961
|
hasLabel: [{ type: core.HostBinding, args: ["class.has-label",] }],
|
|
5801
5962
|
showClass: [{ type: core.HostBinding, args: ['class.co-input-number-picker',] }]
|
|
@@ -5804,6 +5965,60 @@
|
|
|
5804
5965
|
InputBoolean()
|
|
5805
5966
|
], InputNumberPickerComponent.prototype, "noValidation", void 0);
|
|
5806
5967
|
|
|
5968
|
+
var InputTextComponent = /** @class */ (function (_super) {
|
|
5969
|
+
__extends(InputTextComponent, _super);
|
|
5970
|
+
function InputTextComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
|
|
5971
|
+
var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
|
|
5972
|
+
_this.formComponent = formComponent;
|
|
5973
|
+
_this.changeDetector = changeDetector;
|
|
5974
|
+
_this.componentFactoryResolver = componentFactoryResolver;
|
|
5975
|
+
_this.formUserChangeListener = formUserChangeListener;
|
|
5976
|
+
_this.ngZoneWrapper = ngZoneWrapper;
|
|
5977
|
+
_this.elementRef = elementRef;
|
|
5978
|
+
_this.Icons = exports.CoreComponentsIcon;
|
|
5979
|
+
_this.placeholder = "";
|
|
5980
|
+
_this.type = "text";
|
|
5981
|
+
_this.showClearButton = undefined;
|
|
5982
|
+
_this.hasOwnLabel = true;
|
|
5983
|
+
_super.prototype._markAsOnPush.call(_this);
|
|
5984
|
+
return _this;
|
|
5985
|
+
}
|
|
5986
|
+
InputTextComponent.prototype.showClass = function () {
|
|
5987
|
+
return true;
|
|
5988
|
+
};
|
|
5989
|
+
return InputTextComponent;
|
|
5990
|
+
}(BaseInputComponent));
|
|
5991
|
+
InputTextComponent.decorators = [
|
|
5992
|
+
{ type: core.Component, args: [{
|
|
5993
|
+
selector: "co-input-text",
|
|
5994
|
+
template: "\n <label [textContent]=\"placeholder\"></label>\n <input #input\n [type]=\"type\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n >\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
5995
|
+
providers: [{
|
|
5996
|
+
provide: COMPONENT_INTERFACE_NAME,
|
|
5997
|
+
useExisting: core.forwardRef(function () { return InputTextComponent; })
|
|
5998
|
+
}, {
|
|
5999
|
+
provide: BaseInputComponent,
|
|
6000
|
+
useExisting: InputTextComponent
|
|
6001
|
+
}],
|
|
6002
|
+
encapsulation: core.ViewEncapsulation.None
|
|
6003
|
+
},] }
|
|
6004
|
+
];
|
|
6005
|
+
InputTextComponent.ctorParameters = function () { return [
|
|
6006
|
+
{ type: FormComponent, decorators: [{ type: core.Optional }] },
|
|
6007
|
+
{ type: core.ChangeDetectorRef },
|
|
6008
|
+
{ type: core.ComponentFactoryResolver },
|
|
6009
|
+
{ type: FormInputUserModelChangeListenerService },
|
|
6010
|
+
{ type: NgZoneWrapperService },
|
|
6011
|
+
{ type: core.ElementRef }
|
|
6012
|
+
]; };
|
|
6013
|
+
InputTextComponent.propDecorators = {
|
|
6014
|
+
placeholder: [{ type: core.Input }],
|
|
6015
|
+
type: [{ type: core.Input }],
|
|
6016
|
+
showClearButton: [{ type: core.Input }],
|
|
6017
|
+
keyDownWhiteList: [{ type: core.Input }],
|
|
6018
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-input-text",] }],
|
|
6019
|
+
hasOwnLabel: [{ type: core.HostBinding, args: ["class.has-own-label",] }]
|
|
6020
|
+
};
|
|
6021
|
+
|
|
5807
6022
|
var ValidationErrorModule = /** @class */ (function () {
|
|
5808
6023
|
function ValidationErrorModule() {
|
|
5809
6024
|
}
|
|
@@ -5824,22 +6039,132 @@
|
|
|
5824
6039
|
},] }
|
|
5825
6040
|
];
|
|
5826
6041
|
|
|
5827
|
-
var
|
|
5828
|
-
function
|
|
6042
|
+
var CommitButtonsComponent = /** @class */ (function () {
|
|
6043
|
+
function CommitButtonsComponent(_renderer) {
|
|
6044
|
+
var _this = this;
|
|
6045
|
+
this._renderer = _renderer;
|
|
6046
|
+
this.cancelClick = new core.EventEmitter();
|
|
6047
|
+
this.commitClick = new core.EventEmitter();
|
|
6048
|
+
this._committing = false;
|
|
6049
|
+
this._commitFinished = false;
|
|
6050
|
+
this._handleAnimationIteration = function (event) {
|
|
6051
|
+
_this._renderer.removeClass(event.currentTarget, 'animate');
|
|
6052
|
+
event.currentTarget.removeEventListener('animationiteration', _this._handleAnimationIteration);
|
|
6053
|
+
// elem.removeEventListener('webkitAnimationIteration', () => this._handleAnimationIteration(elem));
|
|
6054
|
+
};
|
|
5829
6055
|
}
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
6056
|
+
Object.defineProperty(CommitButtonsComponent.prototype, "content", {
|
|
6057
|
+
set: function (children) {
|
|
6058
|
+
this.animateDivs = children.toArray();
|
|
6059
|
+
this._checkAnimation();
|
|
6060
|
+
},
|
|
6061
|
+
enumerable: false,
|
|
6062
|
+
configurable: true
|
|
6063
|
+
});
|
|
6064
|
+
Object.defineProperty(CommitButtonsComponent.prototype, "committing", {
|
|
6065
|
+
get: function () {
|
|
6066
|
+
return this._committing;
|
|
6067
|
+
},
|
|
6068
|
+
set: function (value) {
|
|
6069
|
+
this._committing = value;
|
|
6070
|
+
this._checkAnimation();
|
|
6071
|
+
},
|
|
6072
|
+
enumerable: false,
|
|
6073
|
+
configurable: true
|
|
6074
|
+
});
|
|
6075
|
+
Object.defineProperty(CommitButtonsComponent.prototype, "commitFinished", {
|
|
6076
|
+
get: function () {
|
|
6077
|
+
return this._commitFinished;
|
|
6078
|
+
},
|
|
6079
|
+
set: function (value) {
|
|
6080
|
+
this._commitFinished = value;
|
|
6081
|
+
this._checkAnimationFinished();
|
|
6082
|
+
},
|
|
6083
|
+
enumerable: false,
|
|
6084
|
+
configurable: true
|
|
6085
|
+
});
|
|
6086
|
+
CommitButtonsComponent.prototype.showClass = function () {
|
|
6087
|
+
return true;
|
|
6088
|
+
};
|
|
6089
|
+
CommitButtonsComponent.prototype._checkAnimation = function () {
|
|
6090
|
+
var _this = this;
|
|
6091
|
+
if (this.committing && this.animateDivs) {
|
|
6092
|
+
this.animateDivs.forEach(function (a) { return _this._renderer.addClass(a.nativeElement, 'animate'); });
|
|
6093
|
+
}
|
|
6094
|
+
};
|
|
6095
|
+
CommitButtonsComponent.prototype._checkAnimationFinished = function () {
|
|
6096
|
+
var _this = this;
|
|
6097
|
+
if (this.commitFinished && this.animateDivs) {
|
|
6098
|
+
this.animateDivs.forEach(function (a) {
|
|
6099
|
+
a.nativeElement.addEventListener('animationiteration', _this._handleAnimationIteration);
|
|
6100
|
+
// a.nativeElement.addEventListener('webkitAnimationIteration', (event) => this._handleAnimationIteration(event));
|
|
6101
|
+
});
|
|
6102
|
+
}
|
|
6103
|
+
};
|
|
6104
|
+
return CommitButtonsComponent;
|
|
6105
|
+
}());
|
|
6106
|
+
CommitButtonsComponent.decorators = [
|
|
6107
|
+
{ type: core.Component, args: [{
|
|
6108
|
+
selector: "co-commit-buttons",
|
|
6109
|
+
template: "\n <div class=\"commit-buttons-wrapper\" @showHideSaveCancel>\n <div class=\"commit-buttons-button save\" [class.finished]=\"commitFinished\"\n (click)=\"commitClick.emit($event)\">\n <div class=\"save-button-spinner\" *ngIf=\"committing || commitFinished\">\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n <div #animatediv></div>\n </div>\n <div class=\"spinner-checkmark\" *ngIf=\"!committing || commitFinished\"></div>\n </div>\n <div class=\"commit-buttons-button cancel\" (click)=\"cancelClick.emit($event)\">\n <div class=\"cancel-button\"></div>\n </div>\n </div>\n ",
|
|
6110
|
+
animations: [
|
|
6111
|
+
animations.trigger('showHideSaveCancel', [
|
|
6112
|
+
animations.state('*', animations.style({ transform: 'scaleY(1)', opacity: 1 })),
|
|
6113
|
+
animations.state('void', animations.style({ transform: 'scaleY(0)', opacity: 0 })),
|
|
6114
|
+
animations.transition('void <=> *', animations.animate(200))
|
|
6115
|
+
]),
|
|
6116
|
+
],
|
|
6117
|
+
encapsulation: core.ViewEncapsulation.None
|
|
6118
|
+
},] }
|
|
6119
|
+
];
|
|
6120
|
+
CommitButtonsComponent.ctorParameters = function () { return [
|
|
6121
|
+
{ type: core.Renderer2 }
|
|
6122
|
+
]; };
|
|
6123
|
+
CommitButtonsComponent.propDecorators = {
|
|
6124
|
+
content: [{ type: core.ViewChildren, args: ['animatediv', { read: core.ElementRef },] }],
|
|
6125
|
+
committing: [{ type: core.Input }],
|
|
6126
|
+
commitFinished: [{ type: core.Input }],
|
|
6127
|
+
cancelClick: [{ type: core.Output }],
|
|
6128
|
+
commitClick: [{ type: core.Output }],
|
|
6129
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-commit-buttons",] }]
|
|
6130
|
+
};
|
|
6131
|
+
|
|
6132
|
+
var CommitButtonsModule = /** @class */ (function () {
|
|
6133
|
+
function CommitButtonsModule() {
|
|
6134
|
+
}
|
|
6135
|
+
return CommitButtonsModule;
|
|
6136
|
+
}());
|
|
6137
|
+
CommitButtonsModule.decorators = [
|
|
6138
|
+
{ type: core.NgModule, args: [{
|
|
6139
|
+
imports: [
|
|
6140
|
+
common.CommonModule
|
|
6141
|
+
],
|
|
6142
|
+
declarations: [
|
|
6143
|
+
CommitButtonsComponent
|
|
6144
|
+
],
|
|
6145
|
+
exports: [
|
|
6146
|
+
CommitButtonsComponent
|
|
6147
|
+
]
|
|
6148
|
+
},] }
|
|
6149
|
+
];
|
|
6150
|
+
|
|
6151
|
+
var InputTextModule = /** @class */ (function () {
|
|
6152
|
+
function InputTextModule() {
|
|
6153
|
+
}
|
|
6154
|
+
return InputTextModule;
|
|
6155
|
+
}());
|
|
6156
|
+
InputTextModule.decorators = [
|
|
6157
|
+
{ type: core.NgModule, args: [{
|
|
6158
|
+
imports: [
|
|
6159
|
+
BaseModule,
|
|
6160
|
+
common.CommonModule,
|
|
6161
|
+
forms.FormsModule,
|
|
6162
|
+
IconModule,
|
|
6163
|
+
AppendPipeModule,
|
|
6164
|
+
ej2AngularInputs.TextBoxAllModule,
|
|
6165
|
+
ej2AngularInputs.NumericTextBoxModule,
|
|
6166
|
+
ValidationErrorModule,
|
|
6167
|
+
CommitButtonsModule
|
|
5843
6168
|
],
|
|
5844
6169
|
declarations: [
|
|
5845
6170
|
InputTextComponent
|
|
@@ -5896,6 +6221,9 @@
|
|
|
5896
6221
|
template: "\n <ejs-radiobutton\n [label]=\"label\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n (change)=\"handleModelChange($event)\"\n ></ejs-radiobutton>\n ",
|
|
5897
6222
|
providers: [{
|
|
5898
6223
|
provide: COMPONENT_INTERFACE_NAME, useExisting: core.forwardRef(function () { return InputRadioButtonComponent; })
|
|
6224
|
+
}, {
|
|
6225
|
+
provide: BaseInputComponent,
|
|
6226
|
+
useExisting: InputRadioButtonComponent
|
|
5899
6227
|
}],
|
|
5900
6228
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
5901
6229
|
encapsulation: core.ViewEncapsulation.None
|
|
@@ -5964,6 +6292,9 @@
|
|
|
5964
6292
|
providers: [{
|
|
5965
6293
|
provide: COMPONENT_INTERFACE_NAME,
|
|
5966
6294
|
useExisting: core.forwardRef(function () { return InputTextareaComponent; })
|
|
6295
|
+
}, {
|
|
6296
|
+
provide: BaseInputComponent,
|
|
6297
|
+
useExisting: InputTextareaComponent
|
|
5967
6298
|
}],
|
|
5968
6299
|
encapsulation: core.ViewEncapsulation.None
|
|
5969
6300
|
},] }
|
|
@@ -6055,6 +6386,9 @@
|
|
|
6055
6386
|
{
|
|
6056
6387
|
provide: COMPONENT_INTERFACE_NAME,
|
|
6057
6388
|
useExisting: core.forwardRef(function () { return MultiSelectListComponent; })
|
|
6389
|
+
}, {
|
|
6390
|
+
provide: BaseInputComponent,
|
|
6391
|
+
useExisting: MultiSelectListComponent
|
|
6058
6392
|
}
|
|
6059
6393
|
],
|
|
6060
6394
|
encapsulation: core.ViewEncapsulation.None
|
|
@@ -7639,6 +7973,9 @@
|
|
|
7639
7973
|
template: "\n <div class=\"co-input-listbox-header\" [textContent]=\"placeholder\"></div>\n <div class=\"co-input-listbox-content\">\n <ejs-listbox\n [ngModel]=\"value\"\n [dataSource]=\"collection\"\n [fields]=\"fields\"\n [selectionSettings]=\"selectionSettings\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-listbox>\n </div>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
7640
7974
|
providers: [{
|
|
7641
7975
|
provide: COMPONENT_INTERFACE_NAME, useExisting: core.forwardRef(function () { return InputListboxComponent; })
|
|
7976
|
+
}, {
|
|
7977
|
+
provide: BaseInputComponent,
|
|
7978
|
+
useExisting: InputListboxComponent
|
|
7642
7979
|
}],
|
|
7643
7980
|
encapsulation: core.ViewEncapsulation.None
|
|
7644
7981
|
},] }
|
|
@@ -7694,6 +8031,10 @@
|
|
|
7694
8031
|
var SimpleGridColumnDirective = /** @class */ (function () {
|
|
7695
8032
|
function SimpleGridColumnDirective() {
|
|
7696
8033
|
this.resizable = true;
|
|
8034
|
+
this.required = false;
|
|
8035
|
+
this.readonly = false;
|
|
8036
|
+
this.order = 0;
|
|
8037
|
+
this.singleColumn = false;
|
|
7697
8038
|
}
|
|
7698
8039
|
Object.defineProperty(SimpleGridColumnDirective.prototype, "template", {
|
|
7699
8040
|
get: function () {
|
|
@@ -7707,6 +8048,38 @@
|
|
|
7707
8048
|
enumerable: false,
|
|
7708
8049
|
configurable: true
|
|
7709
8050
|
});
|
|
8051
|
+
Object.defineProperty(SimpleGridColumnDirective.prototype, "editTemplate", {
|
|
8052
|
+
get: function () {
|
|
8053
|
+
return this._editTemplate;
|
|
8054
|
+
},
|
|
8055
|
+
set: function (template) {
|
|
8056
|
+
if (template) {
|
|
8057
|
+
this._editTemplate = template;
|
|
8058
|
+
}
|
|
8059
|
+
},
|
|
8060
|
+
enumerable: false,
|
|
8061
|
+
configurable: true
|
|
8062
|
+
});
|
|
8063
|
+
SimpleGridColumnDirective.prototype.ngOnInit = function () {
|
|
8064
|
+
this._setSingleColumnProps();
|
|
8065
|
+
};
|
|
8066
|
+
SimpleGridColumnDirective.prototype.getFieldValue = function (value) {
|
|
8067
|
+
var _this = this;
|
|
8068
|
+
if (this.collection && this.displayField) {
|
|
8069
|
+
var result = this.collection.find(function (c) { return c[_this.codeField] === value; });
|
|
8070
|
+
if (result) {
|
|
8071
|
+
return result[this.displayField];
|
|
8072
|
+
}
|
|
8073
|
+
}
|
|
8074
|
+
return value;
|
|
8075
|
+
};
|
|
8076
|
+
SimpleGridColumnDirective.prototype._setSingleColumnProps = function () {
|
|
8077
|
+
if (this.singleColumn) {
|
|
8078
|
+
this.resizable = false;
|
|
8079
|
+
this.readonly = true;
|
|
8080
|
+
this.width = 0;
|
|
8081
|
+
}
|
|
8082
|
+
};
|
|
7710
8083
|
return SimpleGridColumnDirective;
|
|
7711
8084
|
}());
|
|
7712
8085
|
SimpleGridColumnDirective._MinManualResizeWidthPx = 50;
|
|
@@ -7716,39 +8089,55 @@
|
|
|
7716
8089
|
},] }
|
|
7717
8090
|
];
|
|
7718
8091
|
SimpleGridColumnDirective.propDecorators = {
|
|
7719
|
-
template: [{ type: core.ContentChild, args: [
|
|
8092
|
+
template: [{ type: core.ContentChild, args: ['template',] }],
|
|
8093
|
+
editTemplate: [{ type: core.ContentChild, args: ['editTemplate',] }],
|
|
7720
8094
|
headerText: [{ type: core.Input }],
|
|
7721
8095
|
field: [{ type: core.Input }],
|
|
8096
|
+
codeField: [{ type: core.Input }],
|
|
8097
|
+
displayField: [{ type: core.Input }],
|
|
7722
8098
|
textAlign: [{ type: core.Input }],
|
|
7723
8099
|
format: [{ type: core.Input }],
|
|
7724
8100
|
resizable: [{ type: core.Input }],
|
|
7725
|
-
|
|
8101
|
+
required: [{ type: core.Input }],
|
|
8102
|
+
width: [{ type: core.Input }],
|
|
8103
|
+
readonly: [{ type: core.Input }],
|
|
8104
|
+
collection: [{ type: core.Input }],
|
|
8105
|
+
order: [{ type: core.Input }],
|
|
8106
|
+
singleColumn: [{ type: core.Input }]
|
|
7726
8107
|
};
|
|
7727
8108
|
|
|
7728
|
-
var
|
|
7729
|
-
function
|
|
7730
|
-
this.defaultTextAlign = exports.ColumnAlign.Left;
|
|
8109
|
+
var BaseSimpleGridComponent = /** @class */ (function () {
|
|
8110
|
+
function BaseSimpleGridComponent() {
|
|
7731
8111
|
this.data = [];
|
|
7732
8112
|
this.dragDropEnabled = false;
|
|
8113
|
+
this.inlineEdit = false;
|
|
8114
|
+
this.showToolbar = false;
|
|
7733
8115
|
/**
|
|
7734
8116
|
* Should component emit drag and drop actions instead of handle
|
|
7735
8117
|
* (update collection) by itself
|
|
7736
8118
|
*/
|
|
7737
8119
|
this.emitDragDrop = false;
|
|
7738
8120
|
this.onDrop = new core.EventEmitter();
|
|
8121
|
+
this.selectRow = new core.EventEmitter();
|
|
8122
|
+
this.dblClickRow = new core.EventEmitter();
|
|
8123
|
+
this.saveRow = new core.EventEmitter();
|
|
7739
8124
|
this.columns = [];
|
|
7740
8125
|
}
|
|
7741
|
-
Object.defineProperty(
|
|
8126
|
+
Object.defineProperty(BaseSimpleGridComponent.prototype, "content", {
|
|
7742
8127
|
set: function (columnComponents) {
|
|
7743
|
-
this.
|
|
8128
|
+
this._setColumns(columnComponents.toArray());
|
|
7744
8129
|
},
|
|
7745
8130
|
enumerable: false,
|
|
7746
8131
|
configurable: true
|
|
7747
8132
|
});
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
8133
|
+
Object.defineProperty(BaseSimpleGridComponent.prototype, "extraColumns", {
|
|
8134
|
+
set: function (value) {
|
|
8135
|
+
this._setColumns(value);
|
|
8136
|
+
},
|
|
8137
|
+
enumerable: false,
|
|
8138
|
+
configurable: true
|
|
8139
|
+
});
|
|
8140
|
+
BaseSimpleGridComponent.prototype.handleMouseMove = function (event) {
|
|
7752
8141
|
if (event.buttons === 1 && this._columnForResize) {
|
|
7753
8142
|
if (!this._columnForResize.width) {
|
|
7754
8143
|
var rect = event.target.parentElement.getBoundingClientRect();
|
|
@@ -7757,16 +8146,16 @@
|
|
|
7757
8146
|
this._columnForResize.width += event.movementX;
|
|
7758
8147
|
}
|
|
7759
8148
|
};
|
|
7760
|
-
|
|
8149
|
+
BaseSimpleGridComponent.prototype.handleMouseUp = function (event) {
|
|
7761
8150
|
this._columnForResize = undefined;
|
|
7762
8151
|
};
|
|
7763
|
-
|
|
8152
|
+
BaseSimpleGridComponent.prototype.handleSizerMouseDown = function (event, column) {
|
|
7764
8153
|
this._columnForResize = column;
|
|
7765
8154
|
};
|
|
7766
|
-
|
|
8155
|
+
BaseSimpleGridComponent.prototype.handleCanDragDrop = function (drag, drop) {
|
|
7767
8156
|
return true;
|
|
7768
8157
|
};
|
|
7769
|
-
|
|
8158
|
+
BaseSimpleGridComponent.prototype.handleDrop = function (event) {
|
|
7770
8159
|
try {
|
|
7771
8160
|
var from = event.previousIndex;
|
|
7772
8161
|
var to = event.currentIndex;
|
|
@@ -7784,25 +8173,457 @@
|
|
|
7784
8173
|
console.error(e);
|
|
7785
8174
|
}
|
|
7786
8175
|
};
|
|
7787
|
-
|
|
8176
|
+
BaseSimpleGridComponent.prototype._setColumns = function (columns) {
|
|
8177
|
+
var _a;
|
|
8178
|
+
(_a = this.columns).push.apply(_a, __spreadArray([], __read(columns)));
|
|
8179
|
+
this.columns.sort(function (a, b) { return a.order < b.order ? -1 : 1; });
|
|
8180
|
+
};
|
|
8181
|
+
return BaseSimpleGridComponent;
|
|
7788
8182
|
}());
|
|
8183
|
+
BaseSimpleGridComponent.decorators = [
|
|
8184
|
+
{ type: core.Directive }
|
|
8185
|
+
];
|
|
8186
|
+
BaseSimpleGridComponent.propDecorators = {
|
|
8187
|
+
content: [{ type: core.ContentChildren, args: [SimpleGridColumnDirective,] }],
|
|
8188
|
+
data: [{ type: core.Input }],
|
|
8189
|
+
dragDropEnabled: [{ type: core.Input }],
|
|
8190
|
+
inlineEdit: [{ type: core.Input }],
|
|
8191
|
+
showToolbar: [{ type: core.Input }],
|
|
8192
|
+
emitDragDrop: [{ type: core.Input }],
|
|
8193
|
+
extraColumns: [{ type: core.Input }],
|
|
8194
|
+
onDrop: [{ type: core.Output }],
|
|
8195
|
+
selectRow: [{ type: core.Output }],
|
|
8196
|
+
dblClickRow: [{ type: core.Output }],
|
|
8197
|
+
saveRow: [{ type: core.Output }],
|
|
8198
|
+
handleMouseMove: [{ type: core.HostListener, args: ['document:mousemove', ['$event'],] }],
|
|
8199
|
+
handleMouseUp: [{ type: core.HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
8200
|
+
};
|
|
8201
|
+
|
|
8202
|
+
var SimpleGridComponent = /** @class */ (function (_super) {
|
|
8203
|
+
__extends(SimpleGridComponent, _super);
|
|
8204
|
+
function SimpleGridComponent(_changeDetection, _formMaster) {
|
|
8205
|
+
var _this = _super.call(this) || this;
|
|
8206
|
+
_this._changeDetection = _changeDetection;
|
|
8207
|
+
_this._formMaster = _formMaster;
|
|
8208
|
+
_this.defaultTextAlign = exports.ColumnAlign.Left;
|
|
8209
|
+
_this.editting = false;
|
|
8210
|
+
_this.editRowIndex = -1;
|
|
8211
|
+
_this.editCellIndex = -1;
|
|
8212
|
+
_this.selectedRowIndex = -1;
|
|
8213
|
+
_this._doubleClicked = false;
|
|
8214
|
+
_this._newRow = false;
|
|
8215
|
+
return _this;
|
|
8216
|
+
}
|
|
8217
|
+
SimpleGridComponent.prototype.showClass = function () {
|
|
8218
|
+
return true;
|
|
8219
|
+
};
|
|
8220
|
+
SimpleGridComponent.prototype.handleKeyDown = function (event) {
|
|
8221
|
+
var _this = this;
|
|
8222
|
+
if (!this.inlineEdit) {
|
|
8223
|
+
return;
|
|
8224
|
+
}
|
|
8225
|
+
if (event.code === 'Tab') {
|
|
8226
|
+
event.preventDefault();
|
|
8227
|
+
this._nextAvailableCellToEdit(!event.shiftKey, this.editCellIndex)
|
|
8228
|
+
.then(function (index) {
|
|
8229
|
+
_this.editCellIndex = index;
|
|
8230
|
+
_this._changeDetection.markForCheck();
|
|
8231
|
+
});
|
|
8232
|
+
this._detectChanges();
|
|
8233
|
+
}
|
|
8234
|
+
if (event.code === 'Escape') {
|
|
8235
|
+
this.cancelEditRow();
|
|
8236
|
+
}
|
|
8237
|
+
if (event.code === 'Enter') {
|
|
8238
|
+
this.validateAndSave();
|
|
8239
|
+
}
|
|
8240
|
+
};
|
|
8241
|
+
SimpleGridComponent.prototype.isSingleColumn = function (column) {
|
|
8242
|
+
return column.singleColumn;
|
|
8243
|
+
};
|
|
8244
|
+
SimpleGridComponent.prototype.rowContainsSingleColumn = function (row, columns) {
|
|
8245
|
+
var _this = this;
|
|
8246
|
+
var singleColumn = columns.find(function (column) { return _this.isSingleColumn(column) && !!row[column.field]; });
|
|
8247
|
+
return !!singleColumn;
|
|
8248
|
+
};
|
|
8249
|
+
SimpleGridComponent.prototype.addRow = function () {
|
|
8250
|
+
var _this = this;
|
|
8251
|
+
var valid = this.validateAndSave();
|
|
8252
|
+
this._detectChanges();
|
|
8253
|
+
if (valid) {
|
|
8254
|
+
this.data.unshift({});
|
|
8255
|
+
this._newRow = true;
|
|
8256
|
+
this.editRowIndex = 0;
|
|
8257
|
+
this._nextAvailableCellToEdit(true).then(function (index) {
|
|
8258
|
+
_this.editCellIndex = index;
|
|
8259
|
+
});
|
|
8260
|
+
this.editting = true;
|
|
8261
|
+
this.rowToEdit = this.data[0];
|
|
8262
|
+
this._detectChanges();
|
|
8263
|
+
}
|
|
8264
|
+
};
|
|
8265
|
+
SimpleGridComponent.prototype.validateAndSave = function (stopEditting) {
|
|
8266
|
+
if (stopEditting === void 0) { stopEditting = true; }
|
|
8267
|
+
if (!this.editting) {
|
|
8268
|
+
return true;
|
|
8269
|
+
}
|
|
8270
|
+
var valid = this._formMaster.submitSlaves();
|
|
8271
|
+
this._detectChanges();
|
|
8272
|
+
if (valid) {
|
|
8273
|
+
this._saveRow(stopEditting);
|
|
8274
|
+
return true;
|
|
8275
|
+
}
|
|
8276
|
+
};
|
|
8277
|
+
SimpleGridComponent.prototype.cancelEditRow = function () {
|
|
8278
|
+
if (!this.editting) {
|
|
8279
|
+
return;
|
|
8280
|
+
}
|
|
8281
|
+
if (this._newRow) {
|
|
8282
|
+
this.data.shift();
|
|
8283
|
+
}
|
|
8284
|
+
else {
|
|
8285
|
+
this.data[this.editRowIndex] = this.rowToEdit;
|
|
8286
|
+
}
|
|
8287
|
+
this._newRow = false;
|
|
8288
|
+
this.editting = false;
|
|
8289
|
+
this._detectChanges();
|
|
8290
|
+
};
|
|
8291
|
+
SimpleGridComponent.prototype.handleClickRow = function (event, index) {
|
|
8292
|
+
var _this = this;
|
|
8293
|
+
setTimeout(function () {
|
|
8294
|
+
if (_this._doubleClicked) {
|
|
8295
|
+
return;
|
|
8296
|
+
}
|
|
8297
|
+
_this.selectTheRow(index);
|
|
8298
|
+
}, 200);
|
|
8299
|
+
};
|
|
8300
|
+
SimpleGridComponent.prototype.selectTheRow = function (index, emit) {
|
|
8301
|
+
if (emit === void 0) { emit = true; }
|
|
8302
|
+
if (this.selectedRowIndex !== index && ((this.editting && this.validateAndSave()) || !this.editting)) {
|
|
8303
|
+
this.selectedRowIndex = index;
|
|
8304
|
+
if (emit) {
|
|
8305
|
+
this.selectRow.next(this.data[this.selectedRowIndex]);
|
|
8306
|
+
}
|
|
8307
|
+
}
|
|
8308
|
+
this._detectChanges();
|
|
8309
|
+
};
|
|
8310
|
+
SimpleGridComponent.prototype.handleDblClickRow = function (event, index) {
|
|
8311
|
+
this._doubleClicked = true;
|
|
8312
|
+
this.dblClickRow.next(this.data[index]);
|
|
8313
|
+
this.selectTheRow(index, false);
|
|
8314
|
+
if (this.inlineEdit) {
|
|
8315
|
+
this.editRow(event);
|
|
8316
|
+
}
|
|
8317
|
+
this._resetDblClick();
|
|
8318
|
+
};
|
|
8319
|
+
SimpleGridComponent.prototype.editRow = function (event) {
|
|
8320
|
+
var _this = this;
|
|
8321
|
+
this.editRowIndex = this.selectedRowIndex;
|
|
8322
|
+
this.rowToEdit = this.data[this.editRowIndex];
|
|
8323
|
+
this.editting = true;
|
|
8324
|
+
this._nextAvailableCellToEdit(true).then(function (index) {
|
|
8325
|
+
_this.editCellIndex = index;
|
|
8326
|
+
});
|
|
8327
|
+
this._detectChanges();
|
|
8328
|
+
};
|
|
8329
|
+
SimpleGridComponent.prototype.handleCellClick = function (index) {
|
|
8330
|
+
this.editCellIndex = index;
|
|
8331
|
+
this._detectChanges();
|
|
8332
|
+
};
|
|
8333
|
+
SimpleGridComponent.prototype._resetDblClick = function () {
|
|
8334
|
+
var _this = this;
|
|
8335
|
+
setTimeout(function () {
|
|
8336
|
+
_this._doubleClicked = false;
|
|
8337
|
+
}, 500);
|
|
8338
|
+
};
|
|
8339
|
+
/**
|
|
8340
|
+
*
|
|
8341
|
+
* @param next; Move to next or previous cell
|
|
8342
|
+
* @param start; Start from cellindex
|
|
8343
|
+
* @private
|
|
8344
|
+
*/
|
|
8345
|
+
SimpleGridComponent.prototype._nextAvailableCellToEdit = function (next, start) {
|
|
8346
|
+
var _this = this;
|
|
8347
|
+
if (start === void 0) { start = -1; }
|
|
8348
|
+
return new Promise(function (resolve, reject) {
|
|
8349
|
+
var numEditableColumns = _this.columns.filter(function (c) { return !c.readonly; }).length;
|
|
8350
|
+
var wantedIndex = start + (next ? 1 : -1);
|
|
8351
|
+
if (wantedIndex >= numEditableColumns) {
|
|
8352
|
+
_this._getNextEditRowIndex()
|
|
8353
|
+
.then(function (index) {
|
|
8354
|
+
_this.editRowIndex = index;
|
|
8355
|
+
resolve(_this._getNextEditCellIndex(0));
|
|
8356
|
+
})
|
|
8357
|
+
.catch(function (e) {
|
|
8358
|
+
reject();
|
|
8359
|
+
});
|
|
8360
|
+
}
|
|
8361
|
+
else if (wantedIndex < 0) {
|
|
8362
|
+
_this._getPreviousEditRowIndex()
|
|
8363
|
+
.then(function (index) {
|
|
8364
|
+
_this.editRowIndex = index;
|
|
8365
|
+
resolve(_this._getPreviousEditCellIndex(_this.columns.length - 1));
|
|
8366
|
+
})
|
|
8367
|
+
.catch(function (e) {
|
|
8368
|
+
reject();
|
|
8369
|
+
});
|
|
8370
|
+
}
|
|
8371
|
+
else {
|
|
8372
|
+
resolve(next ? _this._getNextEditCellIndex(start + 1) : _this._getPreviousEditCellIndex(start - 1));
|
|
8373
|
+
}
|
|
8374
|
+
});
|
|
8375
|
+
};
|
|
8376
|
+
SimpleGridComponent.prototype._getNextEditCellIndex = function (start) {
|
|
8377
|
+
for (var i = start; i < this.columns.length; i++) {
|
|
8378
|
+
if (!this.columns[i].readonly) {
|
|
8379
|
+
return i;
|
|
8380
|
+
}
|
|
8381
|
+
}
|
|
8382
|
+
};
|
|
8383
|
+
SimpleGridComponent.prototype._getPreviousEditCellIndex = function (start) {
|
|
8384
|
+
for (var i = start; i >= 0; i--) {
|
|
8385
|
+
if (!this.columns[i].readonly) {
|
|
8386
|
+
return i;
|
|
8387
|
+
}
|
|
8388
|
+
}
|
|
8389
|
+
};
|
|
8390
|
+
SimpleGridComponent.prototype._getNextEditRowIndex = function () {
|
|
8391
|
+
var _this = this;
|
|
8392
|
+
return new Promise(function (resolve, reject) {
|
|
8393
|
+
var newRowIndex = 0;
|
|
8394
|
+
if (_this.editRowIndex + 1 >= _this.data.length) {
|
|
8395
|
+
newRowIndex = 0;
|
|
8396
|
+
}
|
|
8397
|
+
else {
|
|
8398
|
+
newRowIndex = _this.editRowIndex + 1;
|
|
8399
|
+
}
|
|
8400
|
+
if (newRowIndex !== _this.editRowIndex) { // go to different row validate current one first
|
|
8401
|
+
if (_this.validateAndSave(false)) {
|
|
8402
|
+
_this.rowToEdit = _this.data[newRowIndex];
|
|
8403
|
+
resolve(newRowIndex);
|
|
8404
|
+
}
|
|
8405
|
+
else {
|
|
8406
|
+
reject();
|
|
8407
|
+
}
|
|
8408
|
+
}
|
|
8409
|
+
else {
|
|
8410
|
+
resolve(newRowIndex);
|
|
8411
|
+
}
|
|
8412
|
+
});
|
|
8413
|
+
};
|
|
8414
|
+
SimpleGridComponent.prototype._getPreviousEditRowIndex = function () {
|
|
8415
|
+
var _this = this;
|
|
8416
|
+
return new Promise(function (resolve, reject) {
|
|
8417
|
+
var newRowIndex = 0;
|
|
8418
|
+
if (_this.editRowIndex - 1 < 0) {
|
|
8419
|
+
newRowIndex = _this.data.length - 1;
|
|
8420
|
+
}
|
|
8421
|
+
else {
|
|
8422
|
+
newRowIndex = _this.editRowIndex - 1;
|
|
8423
|
+
}
|
|
8424
|
+
if (newRowIndex !== _this.editRowIndex) { // go to different row validate current one first
|
|
8425
|
+
if (_this.validateAndSave(false)) {
|
|
8426
|
+
_this.rowToEdit = _this.data[newRowIndex];
|
|
8427
|
+
resolve(newRowIndex);
|
|
8428
|
+
}
|
|
8429
|
+
else {
|
|
8430
|
+
reject();
|
|
8431
|
+
}
|
|
8432
|
+
}
|
|
8433
|
+
else {
|
|
8434
|
+
resolve(newRowIndex);
|
|
8435
|
+
}
|
|
8436
|
+
});
|
|
8437
|
+
};
|
|
8438
|
+
SimpleGridComponent.prototype._saveRow = function (stopEditting) {
|
|
8439
|
+
if (stopEditting === void 0) { stopEditting = true; }
|
|
8440
|
+
// emit saveEvent
|
|
8441
|
+
if (this.rowToEdit) {
|
|
8442
|
+
this.saveRow.next(this.rowToEdit);
|
|
8443
|
+
}
|
|
8444
|
+
this._newRow = false;
|
|
8445
|
+
if (stopEditting) {
|
|
8446
|
+
this.editRowIndex = -1;
|
|
8447
|
+
this.editCellIndex = -1;
|
|
8448
|
+
this.editting = false;
|
|
8449
|
+
this.rowToEdit = undefined;
|
|
8450
|
+
}
|
|
8451
|
+
this._detectChanges();
|
|
8452
|
+
};
|
|
8453
|
+
SimpleGridComponent.prototype._detectChanges = function () {
|
|
8454
|
+
this._changeDetection.detectChanges();
|
|
8455
|
+
};
|
|
8456
|
+
return SimpleGridComponent;
|
|
8457
|
+
}(BaseSimpleGridComponent));
|
|
7789
8458
|
SimpleGridComponent.decorators = [
|
|
7790
8459
|
{ type: core.Component, args: [{
|
|
7791
8460
|
selector: "co-simple-grid",
|
|
7792
|
-
template: "\n <div class=\"simple-grid-column-header-wrapper\">\n <div class=\"simple-grid-column-header\" *ngFor=\"let column of columns; let index = index\"\n [style.min-width.px]=\"column.width\" [style.max-width.px]=\"column.width\">\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText\"\n ></div>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </div>\n <div cdkDropListGroup class=\"drop-list-group\">\n <div #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\"\n >\n <div class=\"simple-grid-row\" *ngFor=\"let row of data\" cdkDrag>\n <div class=\"simple-grid-column-cell\" *ngFor=\"let column of columns\"\n
|
|
8461
|
+
template: "\n <co-grid-toolbar *ngIf=\"inlineEdit && showToolbar\"\n (addClick)=\"addRow()\"\n (editClick)=\"editRow($event)\"\n (saveClick)=\"validateAndSave()\"\n (cancelClick)=\"cancelEditRow()\"\n ></co-grid-toolbar>\n <div class=\"simple-grid-column-header-wrapper\">\n <div class=\"simple-grid-column-header\" *ngFor=\"let column of columns; let index = index\"\n [style.min-width.px]=\"column.width\" [style.max-width.px]=\"column.width\" [style.padding-right.px]=\"isSingleColumn(column) ? 0 : 5\">\n <div class=\"simple-grid-column-header-label\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\"\n [textContent]=\"column.headerText\"\n ></div>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer\"\n (mousedown)=\"handleSizerMouseDown($event, column)\"\n ></div>\n </div>\n </div>\n <div cdkDropListGroup class=\"drop-list-group\">\n <div #dropList cdkDropList cdkDropListOrientation=\"vertical\"\n class=\"simple-grid-drag-drop-list\"\n [cdkDropListDisabled]=\"!dragDropEnabled\"\n [cdkDropListData]=\"data\"\n [cdkDropListEnterPredicate]=\"handleCanDragDrop\"\n (cdkDropListDropped)=\"handleDrop($event)\"\n >\n <div class=\"simple-grid-row\" [class.selected]=\"rowIndex === selectedRowIndex\"\n [class.editting]=\"rowIndex === editRowIndex\" *ngFor=\"let row of data; let rowIndex = index\" cdkDrag\n (click)=\"handleClickRow($event, rowIndex)\" (dblclick)=\"handleDblClickRow($event, rowIndex)\">\n <co-form class=\"simple-grid-row-form\">\n <div class=\"simple-grid-column-cell\" *ngFor=\"let column of columns; let columnIndex = index\"\n [style.min-width]=\"isSingleColumn(column) ? 'fit-content' : column.width\" [style.max-width.px]=\"column.width\"\n [style.padding-right.px]=\"isSingleColumn(column) ? 0 : 5\" >\n <co-simple-grid-cell\n [column]=\"column\"\n [row]=\"row\"\n [editMode]=\"inlineEdit && editting && rowIndex === editRowIndex && !isSingleColumn(column) && !rowContainsSingleColumn(row, columns)\"\n [fieldEditMode]=\"editCellIndex === columnIndex\"\n (cellClick)=\"handleCellClick(columnIndex)\"\n ></co-simple-grid-cell>\n <div *ngIf=\"column.resizable\" class=\"simple-grid-column-sizer-placeholder\"></div>\n </div>\n </co-form>\n </div>\n </div>\n </div>\n ",
|
|
8462
|
+
providers: [
|
|
8463
|
+
FormMasterService
|
|
8464
|
+
],
|
|
7793
8465
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
7794
8466
|
encapsulation: core.ViewEncapsulation.None
|
|
7795
8467
|
},] }
|
|
7796
8468
|
];
|
|
8469
|
+
SimpleGridComponent.ctorParameters = function () { return [
|
|
8470
|
+
{ type: core.ChangeDetectorRef },
|
|
8471
|
+
{ type: FormMasterService }
|
|
8472
|
+
]; };
|
|
7797
8473
|
SimpleGridComponent.propDecorators = {
|
|
7798
|
-
content: [{ type: core.ContentChildren, args: [SimpleGridColumnDirective,] }],
|
|
7799
|
-
data: [{ type: core.Input }],
|
|
7800
|
-
dragDropEnabled: [{ type: core.Input }],
|
|
7801
|
-
emitDragDrop: [{ type: core.Input }],
|
|
7802
|
-
onDrop: [{ type: core.Output }],
|
|
7803
8474
|
showClass: [{ type: core.HostBinding, args: ["class.co-simple-grid",] }],
|
|
7804
|
-
|
|
7805
|
-
|
|
8475
|
+
handleKeyDown: [{ type: core.HostListener, args: ['keydown', ['$event'],] }]
|
|
8476
|
+
};
|
|
8477
|
+
|
|
8478
|
+
var SimpleGridCellComponent = /** @class */ (function () {
|
|
8479
|
+
function SimpleGridCellComponent(_changeDetector) {
|
|
8480
|
+
this._changeDetector = _changeDetector;
|
|
8481
|
+
this.defaultTextAlign = exports.ColumnAlign.Left;
|
|
8482
|
+
this.editMode = false;
|
|
8483
|
+
this.cellClick = new core.EventEmitter();
|
|
8484
|
+
this._fieldEditMode = false;
|
|
8485
|
+
this._focused = false;
|
|
8486
|
+
}
|
|
8487
|
+
Object.defineProperty(SimpleGridCellComponent.prototype, "editTemplateContent", {
|
|
8488
|
+
set: function (template) {
|
|
8489
|
+
if (template) {
|
|
8490
|
+
this._editTemplate = template;
|
|
8491
|
+
this._setFocusComponent();
|
|
8492
|
+
}
|
|
8493
|
+
},
|
|
8494
|
+
enumerable: false,
|
|
8495
|
+
configurable: true
|
|
8496
|
+
});
|
|
8497
|
+
Object.defineProperty(SimpleGridCellComponent.prototype, "noEditTemplateContent", {
|
|
8498
|
+
set: function (template) {
|
|
8499
|
+
if (template) {
|
|
8500
|
+
this._template = template;
|
|
8501
|
+
this._setFocusComponent();
|
|
8502
|
+
}
|
|
8503
|
+
},
|
|
8504
|
+
enumerable: false,
|
|
8505
|
+
configurable: true
|
|
8506
|
+
});
|
|
8507
|
+
Object.defineProperty(SimpleGridCellComponent.prototype, "noTemplateContent", {
|
|
8508
|
+
set: function (template) {
|
|
8509
|
+
if (template) {
|
|
8510
|
+
this._inputTemplate = template;
|
|
8511
|
+
this._setFocusComponent();
|
|
8512
|
+
}
|
|
8513
|
+
},
|
|
8514
|
+
enumerable: false,
|
|
8515
|
+
configurable: true
|
|
8516
|
+
});
|
|
8517
|
+
Object.defineProperty(SimpleGridCellComponent.prototype, "fieldEditMode", {
|
|
8518
|
+
get: function () {
|
|
8519
|
+
return this._fieldEditMode;
|
|
8520
|
+
},
|
|
8521
|
+
set: function (value) {
|
|
8522
|
+
this._fieldEditMode = value;
|
|
8523
|
+
this._setFocusComponent();
|
|
8524
|
+
},
|
|
8525
|
+
enumerable: false,
|
|
8526
|
+
configurable: true
|
|
8527
|
+
});
|
|
8528
|
+
SimpleGridCellComponent.prototype.showClass = function () {
|
|
8529
|
+
return true;
|
|
8530
|
+
};
|
|
8531
|
+
SimpleGridCellComponent.prototype.handleClick = function (event) {
|
|
8532
|
+
if (this.column && !this.column.readonly) {
|
|
8533
|
+
this.cellClick.next();
|
|
8534
|
+
}
|
|
8535
|
+
};
|
|
8536
|
+
SimpleGridCellComponent.prototype._setFocusComponent = function () {
|
|
8537
|
+
if (this.editMode && this.fieldEditMode) {
|
|
8538
|
+
var element = this._getElement();
|
|
8539
|
+
if (element) {
|
|
8540
|
+
var focusEvent = this._createNewEvent(element, 'focus');
|
|
8541
|
+
element.focus();
|
|
8542
|
+
element.dispatchEvent(focusEvent);
|
|
8543
|
+
this._focused = true;
|
|
8544
|
+
}
|
|
8545
|
+
}
|
|
8546
|
+
else {
|
|
8547
|
+
if (this._focused) {
|
|
8548
|
+
var element = this._getElement();
|
|
8549
|
+
if (element) {
|
|
8550
|
+
var blurEvent = this._createNewEvent(element, 'blur');
|
|
8551
|
+
element.blur();
|
|
8552
|
+
element.dispatchEvent(blurEvent);
|
|
8553
|
+
}
|
|
8554
|
+
this._focused = false;
|
|
8555
|
+
}
|
|
8556
|
+
}
|
|
8557
|
+
this._detectChanges();
|
|
8558
|
+
};
|
|
8559
|
+
SimpleGridCellComponent.prototype._getFirstFormInput = function (parent) {
|
|
8560
|
+
if (parent) {
|
|
8561
|
+
var collection_1 = Array.from(parent.getElementsByTagName('input'));
|
|
8562
|
+
var otherCollection = Array.from(parent.getElementsByTagName('textarea'));
|
|
8563
|
+
otherCollection.map(function (o) { return collection_1.push(o); });
|
|
8564
|
+
if (collection_1.length > 0) {
|
|
8565
|
+
return collection_1[0];
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
};
|
|
8569
|
+
SimpleGridCellComponent.prototype._createNewEvent = function (element, eventType) {
|
|
8570
|
+
var event;
|
|
8571
|
+
if ("createEvent" in document) {
|
|
8572
|
+
event = document.createEvent("Event");
|
|
8573
|
+
event.initEvent(eventType, true, true);
|
|
8574
|
+
}
|
|
8575
|
+
else if ("Event" in window) {
|
|
8576
|
+
event = new Event(eventType, { bubbles: true, cancelable: true });
|
|
8577
|
+
}
|
|
8578
|
+
return event;
|
|
8579
|
+
};
|
|
8580
|
+
SimpleGridCellComponent.prototype._getElement = function () {
|
|
8581
|
+
var templ;
|
|
8582
|
+
if (this._editTemplate) {
|
|
8583
|
+
templ = this._editTemplate;
|
|
8584
|
+
}
|
|
8585
|
+
else if (this._template) {
|
|
8586
|
+
templ = this._template;
|
|
8587
|
+
}
|
|
8588
|
+
else {
|
|
8589
|
+
templ = this._inputTemplate;
|
|
8590
|
+
}
|
|
8591
|
+
if (templ) {
|
|
8592
|
+
if (templ && templ.elementRef) {
|
|
8593
|
+
var inputElement = this._getFirstFormInput(templ.elementRef.nativeElement.parentElement);
|
|
8594
|
+
if (inputElement) {
|
|
8595
|
+
return inputElement;
|
|
8596
|
+
}
|
|
8597
|
+
}
|
|
8598
|
+
}
|
|
8599
|
+
};
|
|
8600
|
+
SimpleGridCellComponent.prototype._detectChanges = function () {
|
|
8601
|
+
this._changeDetector.detectChanges();
|
|
8602
|
+
};
|
|
8603
|
+
return SimpleGridCellComponent;
|
|
8604
|
+
}());
|
|
8605
|
+
SimpleGridCellComponent.decorators = [
|
|
8606
|
+
{ type: core.Component, args: [{
|
|
8607
|
+
selector: "co-simple-grid-cell",
|
|
8608
|
+
template: "\n <div class=\"simple-grid-column-cell-value\" [ngClass]=\"column.textAlign ? column.textAlign : defaultTextAlign\">\n <ng-container *ngIf=\"editMode; else noInlineEdit\">\n <ng-container #editTemplate *ngIf=\"column.editTemplate; else noEditTemplate\"\n [ngTemplateOutlet]=\"column.editTemplate\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n <ng-template #noEditTemplate>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <co-input-text [(model)]=\"row[column.field]\" [required]=\"column.required\"></co-input-text>\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-template #noInlineEdit>\n <ng-container *ngIf=\"column.template; else noTemplate\">\n <ng-container [ngTemplateOutlet]=\"column.template\"\n [ngTemplateOutletContext]=\"{value: row[column.field], row: row}\"></ng-container>\n </ng-container>\n <ng-template #noTemplate>\n <div [textContent]=\"column.getFieldValue(row[column.field])\"></div>\n </ng-template>\n </ng-template>\n </div>\n ",
|
|
8609
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
8610
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
8611
|
+
},] }
|
|
8612
|
+
];
|
|
8613
|
+
SimpleGridCellComponent.ctorParameters = function () { return [
|
|
8614
|
+
{ type: core.ChangeDetectorRef }
|
|
8615
|
+
]; };
|
|
8616
|
+
SimpleGridCellComponent.propDecorators = {
|
|
8617
|
+
editTemplateContent: [{ type: core.ViewChild, args: ["editTemplate", { read: BaseInputComponent },] }],
|
|
8618
|
+
noEditTemplateContent: [{ type: core.ViewChild, args: ["noEditTemplate",] }],
|
|
8619
|
+
noTemplateContent: [{ type: core.ViewChild, args: ["noTemplate",] }],
|
|
8620
|
+
column: [{ type: core.Input }],
|
|
8621
|
+
row: [{ type: core.Input }],
|
|
8622
|
+
editMode: [{ type: core.Input }],
|
|
8623
|
+
fieldEditMode: [{ type: core.Input }],
|
|
8624
|
+
cellClick: [{ type: core.Output }],
|
|
8625
|
+
showClass: [{ type: core.HostBinding, args: ["class.co-simple-grid-cell",] }],
|
|
8626
|
+
handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
7806
8627
|
};
|
|
7807
8628
|
|
|
7808
8629
|
var SimpleGridModule = /** @class */ (function () {
|
|
@@ -7814,14 +8635,19 @@
|
|
|
7814
8635
|
{ type: core.NgModule, args: [{
|
|
7815
8636
|
imports: [
|
|
7816
8637
|
common.CommonModule,
|
|
7817
|
-
dragDrop.DragDropModule
|
|
8638
|
+
dragDrop.DragDropModule,
|
|
8639
|
+
GridToolbarModule,
|
|
8640
|
+
InputTextModule,
|
|
8641
|
+
FormModule
|
|
7818
8642
|
],
|
|
7819
8643
|
declarations: [
|
|
7820
8644
|
SimpleGridComponent,
|
|
8645
|
+
SimpleGridCellComponent,
|
|
7821
8646
|
SimpleGridColumnDirective
|
|
7822
8647
|
],
|
|
7823
8648
|
exports: [
|
|
7824
8649
|
SimpleGridComponent,
|
|
8650
|
+
SimpleGridCellComponent,
|
|
7825
8651
|
SimpleGridColumnDirective
|
|
7826
8652
|
]
|
|
7827
8653
|
},] }
|
|
@@ -8085,11 +8911,7 @@
|
|
|
8085
8911
|
boundingBox.getSize(size);
|
|
8086
8912
|
// get the max side of the bounding box (fits to width OR height as needed )
|
|
8087
8913
|
var maxDim = Math.max(size.x, size.y, size.z);
|
|
8088
|
-
|
|
8089
|
-
// let cameraZ = Math.abs(maxDim / 4 * Math.tan(fov * 200));
|
|
8090
|
-
var cameraZ = Math.abs((maxDim / 2) / Math.tan(fov / 2));
|
|
8091
|
-
// cameraZ *= offset; // zoom out a little so that objects don't fill the screen
|
|
8092
|
-
this._camera.position.z = cameraZ;
|
|
8914
|
+
this._camera.position.z = Math.abs((maxDim / 2) * Math.atan(this._camera.fov / 2));
|
|
8093
8915
|
this._camera.lookAt(center);
|
|
8094
8916
|
};
|
|
8095
8917
|
Carousel3dComponent.prototype._checkNavigationButtons = function () {
|
|
@@ -8226,6 +9048,8 @@
|
|
|
8226
9048
|
exports.CoDialogModule = CoDialogModule;
|
|
8227
9049
|
exports.CoDialogPromptComponent = CoDialogPromptComponent;
|
|
8228
9050
|
exports.CoDialogPromptModule = CoDialogPromptModule;
|
|
9051
|
+
exports.CoDialogWizardComponent = CoDialogWizardComponent;
|
|
9052
|
+
exports.CoDialogWizardModule = CoDialogWizardModule;
|
|
8229
9053
|
exports.CoGridComponent = CoGridComponent;
|
|
8230
9054
|
exports.CoGridModule = CoGridModule;
|
|
8231
9055
|
exports.CoKanbanComponent = CoKanbanComponent;
|
|
@@ -8289,6 +9113,8 @@
|
|
|
8289
9113
|
exports.TileModule = TileModule;
|
|
8290
9114
|
exports["ɵa"] = RippleModule;
|
|
8291
9115
|
exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
9116
|
+
exports["ɵba"] = BaseSimpleGridComponent;
|
|
9117
|
+
exports["ɵbb"] = SimpleGridCellComponent;
|
|
8292
9118
|
exports["ɵc"] = CoRippleDirective;
|
|
8293
9119
|
exports["ɵd"] = CoViewportRulerService;
|
|
8294
9120
|
exports["ɵe"] = CoScrollDispatcherService;
|
|
@@ -8300,15 +9126,19 @@
|
|
|
8300
9126
|
exports["ɵk"] = FormInputUserModelChangeListenerService;
|
|
8301
9127
|
exports["ɵl"] = NgZoneWrapperService;
|
|
8302
9128
|
exports["ɵm"] = BaseInputComponent;
|
|
8303
|
-
exports["ɵn"] =
|
|
8304
|
-
exports["ɵo"] =
|
|
8305
|
-
exports["ɵp"] =
|
|
8306
|
-
exports["ɵq"] =
|
|
8307
|
-
exports["ɵr"] =
|
|
8308
|
-
exports["ɵs"] =
|
|
8309
|
-
exports["ɵt"] =
|
|
8310
|
-
exports["ɵu"] =
|
|
8311
|
-
exports["ɵv"] =
|
|
9129
|
+
exports["ɵn"] = GridToolbarModule;
|
|
9130
|
+
exports["ɵo"] = GridToolbarComponent;
|
|
9131
|
+
exports["ɵp"] = BaseSelectionGridComponent;
|
|
9132
|
+
exports["ɵq"] = BaseInlineEditGridComponent;
|
|
9133
|
+
exports["ɵr"] = BaseToolbarGridComponent;
|
|
9134
|
+
exports["ɵs"] = BaseGridComponent;
|
|
9135
|
+
exports["ɵt"] = AppendPipeModule;
|
|
9136
|
+
exports["ɵu"] = AppendPipe;
|
|
9137
|
+
exports["ɵv"] = ValidationErrorModule;
|
|
9138
|
+
exports["ɵw"] = ValidationErrorComponent;
|
|
9139
|
+
exports["ɵx"] = CommitButtonsModule;
|
|
9140
|
+
exports["ɵy"] = CommitButtonsComponent;
|
|
9141
|
+
exports["ɵz"] = PopupShowerService;
|
|
8312
9142
|
|
|
8313
9143
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8314
9144
|
|