@colijnit/corecomponents_v12 12.2.14 → 12.2.16

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.
@@ -9853,6 +9853,7 @@
9853
9853
  _this.defaultTextAlign = exports.ColumnAlign.Left;
9854
9854
  _this.showAdd = false;
9855
9855
  _this.showDelete = false;
9856
+ _this.editOnCellClick = true;
9856
9857
  _this.rightToolbar = false;
9857
9858
  _this.rowsPerPage = 1000;
9858
9859
  _this.editing = false;
@@ -10003,17 +10004,35 @@
10003
10004
  this._detectChanges();
10004
10005
  };
10005
10006
  SimpleGridComponent.prototype.handleDblClickRow = function (event, index, row) {
10006
- if (this.isRowDisabled(row)) {
10007
- this.selectedRowIndex = -1;
10008
- return;
10009
- }
10010
- this._doubleClicked = true;
10011
- this.dblClickRow.next(this.data[index]);
10012
- this.selectTheRow(index, false);
10013
- if (this.inlineEdit) {
10014
- this.editRow(event);
10015
- }
10016
- this._resetDblClick();
10007
+ return __awaiter(this, void 0, void 0, function () {
10008
+ var canEdit;
10009
+ return __generator(this, function (_a) {
10010
+ switch (_a.label) {
10011
+ case 0:
10012
+ if (this.isRowDisabled(row)) {
10013
+ this.selectedRowIndex = -1;
10014
+ return [2 /*return*/];
10015
+ }
10016
+ canEdit = true;
10017
+ if (!(this.canRowBeEdittedFn && typeof this.canRowBeEdittedFn === 'function')) return [3 /*break*/, 2];
10018
+ return [4 /*yield*/, this.canRowBeEdittedFn.call(this)];
10019
+ case 1:
10020
+ canEdit = _a.sent();
10021
+ _a.label = 2;
10022
+ case 2:
10023
+ if (canEdit) {
10024
+ this._doubleClicked = true;
10025
+ this.dblClickRow.next(this.data[index]);
10026
+ this.selectTheRow(index, false);
10027
+ if (this.inlineEdit) {
10028
+ this.editRow(event);
10029
+ }
10030
+ }
10031
+ this._resetDblClick();
10032
+ return [2 /*return*/];
10033
+ }
10034
+ });
10035
+ });
10017
10036
  };
10018
10037
  SimpleGridComponent.prototype.editRow = function (event, selectCell) {
10019
10038
  var _this = this;
@@ -10029,16 +10048,21 @@
10029
10048
  this._detectChanges();
10030
10049
  };
10031
10050
  SimpleGridComponent.prototype.handleCellClick = function (event, row, rowIndex, cellIndex) {
10032
- if (this.isRowDisabled(row)) {
10033
- this.selectedRowIndex = -1;
10034
- return;
10051
+ if (this.editOnCellClick) {
10052
+ if (this.isRowDisabled(row)) {
10053
+ this.selectedRowIndex = -1;
10054
+ return;
10055
+ }
10056
+ this.selectTheRow(rowIndex, false);
10057
+ if (this.inlineEdit) {
10058
+ this.editRowIndex = rowIndex;
10059
+ this.editCellIndex = cellIndex;
10060
+ this.editing = true;
10061
+ this.editRow(event, false);
10062
+ }
10035
10063
  }
10036
- this.selectTheRow(rowIndex, false);
10037
- if (this.inlineEdit) {
10038
- this.editRowIndex = rowIndex;
10064
+ else {
10039
10065
  this.editCellIndex = cellIndex;
10040
- this.editing = true;
10041
- this.editRow(event, false);
10042
10066
  }
10043
10067
  this._detectChanges();
10044
10068
  };
@@ -10206,9 +10230,11 @@
10206
10230
  headerCells: [{ type: i0.ViewChildren, args: ['headerCell',] }],
10207
10231
  showAdd: [{ type: i0.Input }],
10208
10232
  showDelete: [{ type: i0.Input }],
10233
+ editOnCellClick: [{ type: i0.Input }],
10209
10234
  rightToolbar: [{ type: i0.Input }],
10210
10235
  rowsPerPage: [{ type: i0.Input }],
10211
10236
  rowDisabledFn: [{ type: i0.Input }],
10237
+ canRowBeEdittedFn: [{ type: i0.Input }],
10212
10238
  showClass: [{ type: i0.HostBinding, args: ['class.co-simple-grid',] }],
10213
10239
  handleKeyDown: [{ type: i0.HostListener, args: ['keydown', ['$event'],] }]
10214
10240
  };
@@ -12834,6 +12860,44 @@
12834
12860
  },] }
12835
12861
  ];
12836
12862
 
12863
+ var LoaderComponent = /** @class */ (function () {
12864
+ function LoaderComponent() {
12865
+ }
12866
+ LoaderComponent.prototype.showClass = function () {
12867
+ return true;
12868
+ };
12869
+ return LoaderComponent;
12870
+ }());
12871
+ LoaderComponent.decorators = [
12872
+ { type: i0.Component, args: [{
12873
+ selector: 'co-loader',
12874
+ template: "\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 200 200\" xml:space=\"preserve\">\n <defs>\n <linearGradient id=\"gradientFade\" x1=\"20%\" x2=\"50%\" y1=\"60%\" y2=\"100%\">\n <stop offset=\"0%\" class=\"spinner-gradient-stop\" />\n <stop offset=\"25%\" stop-opacity=\"75%\" class=\"spinner-gradient-stop\" />\n <stop offset=\"50%\" stop-opacity=\"50%\" class=\"spinner-gradient-stop\" />\n <stop offset=\"75%\" stop-opacity=\"25%\" class=\"spinner-gradient-stop\" />\n <stop offset=\"100%\" stop-opacity=\"5%\" class=\"spinner-gradient-stop\" />\n </linearGradient>\n </defs> \n <g id=\"mask\">\n <ellipse transform=\"matrix(0.7071 -0.7071 0.7071 0.7071 -41.0887 100.8995)\" class=\"circle\" cx=\"101.25\" cy=\"101.25\" rx=\"77.58\"\n ry=\"77.58\"/>\n </g>\n <g>\n <circle id=\"ring\" class=\"ring-color\" cx=\"100\" cy=\"100\" r=\"90\" fill=\"transparent\" />\n </g>\n <g id=\"js\">\n <path class=\"main-color\" d=\"M87.93,149.17c-0.12-0.17-0.08-0.4,0.09-0.52l0.61-0.45c2.92-2.14,4.34-4.61,4.34-7.56l0-20.64h2.47\n c0.74,0,1.34,0.6,1.34,1.34v18.32c0,2.97-0.65,5.4-1.93,7.23c-0.61,0.89-1.25,1.66-1.9,2.28c-0.63,0.6-1.41,1.23-2.3,1.87\n l-0.65,0.47c-0.18,0.12-0.42,0.08-0.54-0.1L87.93,149.17z\"/>\n <path class=\"main-color\" d=\"M107.12,142.92c-2.24,0-4.18-0.59-5.79-1.75l0,0c-0.47-0.34-0.59-1-0.27-1.48l1.06-1.59\n c0.12-0.17,0.35-0.22,0.53-0.11l0.58,0.38c1.18,0.77,2.43,1.14,3.84,1.14c1.36,0,2.39-0.25,3.05-0.75\n c0.59-0.44,0.86-1.04,0.86-1.92c0-0.59-0.22-1.15-0.68-1.71c-0.55-0.67-1.23-1.29-2.02-1.84c-0.85-0.58-1.74-1.22-2.66-1.88\n c-0.97-0.7-1.81-1.55-2.5-2.53c-0.75-1.06-1.12-2.23-1.12-3.46c0-1.67,0.63-3.02,1.89-4.01c1.17-0.93,2.74-1.4,4.66-1.4\n c1.83,0,3.55,0.37,5.13,1.11l0.62,0.29c0.19,0.09,0.27,0.31,0.19,0.5l-1.03,2.37c-0.08,0.19-0.31,0.28-0.5,0.2l-0.64-0.27\n c-1.22-0.52-2.45-0.78-3.64-0.78c-3.01,0-3.01,1.31-3.01,1.94c0,0.63,0.22,1.21,0.68,1.77c0.55,0.67,1.22,1.28,2.01,1.8\n c0.91,0.61,1.8,1.22,2.66,1.82c0.97,0.68,1.82,1.52,2.5,2.47c0.75,1.04,1.13,2.2,1.13,3.44c0,2.05-0.72,3.64-2.14,4.72\n C111.17,142.4,109.36,142.92,107.12,142.92z\"/>\n </g>\n <g id=\"i\">\n <path class=\"second-color\" d=\"M38.1,100.24V80.62c0-0.18,0.14-0.32,0.32-0.32h2.53c0.88,0,1.6,0.72,1.6,1.6v18.34\n c0,0.18-0.14,0.32-0.32,0.32h-3.8C38.25,100.56,38.1,100.42,38.1,100.24z\"/>\n </g>\n <g id=\"n\">\n <path class=\"second-color\" d=\"M126.95,107l-14.97-17.18c-0.19-0.22-0.56-0.09-0.56,0.21v16.62c0,0.18-0.14,0.32-0.32,0.32h-3.8\n c-0.18,0-0.32-0.14-0.32-0.32V82.12c0-0.88,0.72-1.6,1.6-1.6h1.07c0.09,0,0.18,0.04,0.24,0.11l14.97,17.22\n c0.19,0.22,0.56,0.09,0.56-0.21V80.99c0-0.18,0.14-0.32,0.32-0.32h3.8c0.18,0,0.32,0.14,0.32,0.32v25.81\n c0,0.18-0.14,0.32-0.32,0.32h-2.35C127.1,107.11,127.01,107.07,126.95,107z\"/>\n </g>\n <g id=\"e\">\n <path class=\"second-color\" d=\"M150.28,105.37V80.99c0-0.18,0.14-0.32,0.32-0.32h13.12c0.18,0,0.32,0.14,0.32,0.32v3.59\n c0,0.18-0.14,0.32-0.32,0.32h-8.68c-0.18,0-0.32,0.14-0.32,0.32v5.14c0,0.18,0.14,0.32,0.32,0.32h7.77c0.18,0,0.32,0.14,0.32,0.32\n v3.55c0,0.18-0.14,0.32-0.32,0.32h-7.77c-0.18,0-0.32,0.14-0.32,0.32v7.17c0,0.18,0.14,0.32,0.32,0.32h9.04\n c0.18,0,0.32,0.14,0.32,0.32v3.66c0,0.18-0.14,0.32-0.32,0.32h-12.2C151,106.97,150.28,106.25,150.28,105.37z\"/>\n </g>\n <g id=\"o\">\n <path class=\"second-color\" d=\"M67.44,86.2c0.59,0.54,0.68,1.43,0.23,2.09c-0.41,0.6-0.75,1.24-1.01,1.92c-0.42,1.1-0.63,2.31-0.63,3.61\n c0,1.3,0.21,2.51,0.63,3.61c0.42,1.1,1.04,2.1,1.88,2.98c0.82,0.87,1.75,1.53,2.8,1.97c1.04,0.44,2.19,0.66,3.44,0.66\n c1.25,0,2.4-0.22,3.43-0.66c1.04-0.44,1.97-1.09,2.78-1.97c0.83-0.88,1.45-1.88,1.86-2.98c0.42-1.1,0.63-2.31,0.63-3.61\n c0-1.3-0.21-2.51-0.63-3.62c-0.42-1.1-1.04-2.11-1.87-3c-0.81-0.87-1.74-1.53-2.78-1.97c-1.04-0.44-2.18-0.66-3.43-0.66\n c-0.77,0-1.49,0.08-2.18,0.25c-0.75,0.18-1.53-0.19-1.84-0.9l-1.03-2.32c-0.07-0.17,0-0.36,0.17-0.43\n c1.49-0.58,3.12-0.87,4.86-0.87c1.87,0,3.59,0.33,5.17,0.99c1.58,0.66,3,1.64,4.27,2.95c1.26,1.3,2.21,2.76,2.84,4.36\n c0.63,1.6,0.95,3.34,0.95,5.22c0,1.88-0.32,3.62-0.95,5.22c-0.63,1.6-1.58,3.06-2.84,4.36c-1.27,1.31-2.69,2.29-4.27,2.95\n c-1.58,0.66-3.31,0.99-5.17,0.99c-1.87,0-3.6-0.33-5.17-0.99c-1.58-0.66-3-1.64-4.27-2.95c-1.26-1.3-2.21-2.76-2.84-4.36\n c-0.63-1.6-0.95-3.34-0.95-5.22c0-1.88,0.32-3.62,0.95-5.22c0.6-1.51,1.47-2.88,2.63-4.13c0.12-0.13,0.32-0.13,0.45-0.02\n L67.44,86.2z\"/>\n </g>\n <g id=\"smile\">\n <path class=\"main-color\" d=\"M101.26,178.35c-3.73-0.01-7.38-0.28-10.86-0.82c-3.62-0.57-6.94-1.38-9.85-2.4c-3.01-1.05-5.69-2.3-7.94-3.73\n c-1.09-0.71-2.1-1.76-2.99-2.84c0.98,0.74,2.03,1.44,3.16,2.07c2.38,1.38,5.13,2.58,8.16,3.55c5.99,1.93,13.15,2.99,20.17,2.99\n h0.31c7.01,0,14.17-1.06,20.16-2.99c3.03-0.97,5.78-2.16,8.17-3.55c1.12-0.64,2.17-1.32,3.15-2.06c-0.89,1.08-1.89,2.13-2.99,2.83\n c-2.25,1.42-4.92,2.67-7.94,3.72c-2.91,1.02-6.23,1.83-9.85,2.4C108.65,178.07,105,178.35,101.26,178.35z\"/>\n </g>\n </svg>\n ",
12875
+ encapsulation: i0.ViewEncapsulation.None
12876
+ },] }
12877
+ ];
12878
+ LoaderComponent.propDecorators = {
12879
+ showClass: [{ type: i0.HostBinding, args: ['class.co-loader',] }]
12880
+ };
12881
+
12882
+ var LoaderModule = /** @class */ (function () {
12883
+ function LoaderModule() {
12884
+ }
12885
+ return LoaderModule;
12886
+ }());
12887
+ LoaderModule.decorators = [
12888
+ { type: i0.NgModule, args: [{
12889
+ imports: [
12890
+ common.CommonModule
12891
+ ],
12892
+ declarations: [
12893
+ LoaderComponent
12894
+ ],
12895
+ exports: [
12896
+ LoaderComponent
12897
+ ]
12898
+ },] }
12899
+ ];
12900
+
12837
12901
  var FilterPipe = /** @class */ (function () {
12838
12902
  function FilterPipe() {
12839
12903
  }
@@ -13671,6 +13735,8 @@
13671
13735
  exports.ListOfValuesComponent = ListOfValuesComponent;
13672
13736
  exports.ListOfValuesModule = ListOfValuesModule;
13673
13737
  exports.ListOfValuesPopupComponent = ListOfValuesPopupComponent;
13738
+ exports.LoaderComponent = LoaderComponent;
13739
+ exports.LoaderModule = LoaderModule;
13674
13740
  exports.NgZoneWrapperService = NgZoneWrapperService;
13675
13741
  exports.ObserveVisibilityModule = ObserveVisibilityModule;
13676
13742
  exports.OrientationOfDirection = OrientationOfDirection;