@skyux/ag-grid 5.5.0 → 5.6.2
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/skyux-ag-grid.umd.js +1683 -1674
- package/documentation.json +48 -67
- package/esm2015/lib/modules/ag-grid/ag-grid-adapter.service.js +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-adapter.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.js +4 -4
- package/esm2015/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-row-delete.directive.js +5 -5
- package/esm2015/lib/modules/ag-grid/ag-grid-row-delete.directive.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-wrapper.component.js +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-wrapper.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.module.js +8 -8
- package/esm2015/lib/modules/ag-grid/ag-grid.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js +7 -7
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-currency/cell-renderer-currency.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.module.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-lookup/cell-renderer-lookup.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.js +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-row-selector/cell-renderer-row-selector.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-validator-tooltip/cell-renderer-validator-tooltip.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-renderers/cell-renderer-validator-tooltip/cell-renderer-validator-tooltip.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator-tooltip.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-editor-lookup-params.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-renderer-lookup-params.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-renderer-validator-params.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-type.js +13 -4
- package/esm2015/lib/modules/ag-grid/types/cell-type.js.map +1 -1
- package/esm2015/lib/modules/shared/ag-grid-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/ag-grid-resources.module.js.map +1 -1
- package/fesm2015/skyux-ag-grid.js +1158 -1149
- package/fesm2015/skyux-ag-grid.js.map +1 -1
- package/lib/modules/ag-grid/ag-grid-data-manager-adapter.directive.d.ts +1 -1
- package/lib/modules/ag-grid/ag-grid.service.d.ts +2 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.d.ts +1 -1
- package/lib/modules/ag-grid/types/cell-type.d.ts +13 -4
- package/package.json +22 -19
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/ag-grid', ['exports', '@angular/common', '@angular/core', '@skyux/core', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["ag-grid"] = {}), global.ng.common, global.ng.core, global.i1, global.
|
|
5
|
-
})(this, (function (exports, i3
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/core'), require('@skyux/data-manager'), require('@skyux/layout'), require('ag-grid-angular'), require('rxjs'), require('rxjs/operators'), require('@skyux/lookup'), require('@angular/forms'), require('@skyux/i18n'), require('@skyux/autonumeric'), require('ag-grid-community'), require('@skyux/theme'), require('@skyux/datetime'), require('@skyux/forms'), require('@skyux/popovers'), require('@skyux/indicators')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@skyux/ag-grid', ['exports', '@angular/common', '@angular/core', '@skyux/core', '@skyux/data-manager', '@skyux/layout', 'ag-grid-angular', 'rxjs', 'rxjs/operators', '@skyux/lookup', '@angular/forms', '@skyux/i18n', '@skyux/autonumeric', 'ag-grid-community', '@skyux/theme', '@skyux/datetime', '@skyux/forms', '@skyux/popovers', '@skyux/indicators'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["ag-grid"] = {}), global.ng.common, global.ng.core, global.i1, global.i1$1, global.i1$2, global.agGridAngular, global.rxjs, global.rxjs.operators, global.i1$3, global.ng.forms, global.i3$1, global.i2, global.agGridCommunity, global.i1$5, global.i2$1, global.i1$6, global.i2$2, global.i1$7));
|
|
5
|
+
})(this, (function (exports, i3, i0, i1, i1$1, i1$2, agGridAngular, rxjs, operators, i1$3, i1$4, i3$1, i2, agGridCommunity, i1$5, i2$1, i1$6, i2$2, i1$7) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -22,1908 +22,1908 @@
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var i3__namespace
|
|
25
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
26
26
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
27
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
-
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
29
|
-
var i1__namespace$7 = /*#__PURE__*/_interopNamespace(i1$7);
|
|
30
28
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
31
29
|
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
32
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
33
30
|
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
34
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
35
31
|
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
36
|
-
var
|
|
32
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
37
34
|
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
35
|
+
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
36
|
+
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
38
37
|
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
38
|
+
var i1__namespace$7 = /*#__PURE__*/_interopNamespace(i1$7);
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
/*! *****************************************************************************
|
|
41
|
+
Copyright (c) Microsoft Corporation.
|
|
42
|
+
|
|
43
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
44
|
+
purpose with or without fee is hereby granted.
|
|
45
|
+
|
|
46
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
47
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
48
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
49
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
50
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
51
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
52
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
53
|
+
***************************************************************************** */
|
|
54
|
+
/* global Reflect, Promise */
|
|
55
|
+
var extendStatics = function (d, b) {
|
|
56
|
+
extendStatics = Object.setPrototypeOf ||
|
|
57
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
58
|
+
function (d, b) { for (var p in b)
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
60
|
+
d[p] = b[p]; };
|
|
61
|
+
return extendStatics(d, b);
|
|
62
|
+
};
|
|
63
|
+
function __extends(d, b) {
|
|
64
|
+
if (typeof b !== "function" && b !== null)
|
|
65
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
66
|
+
extendStatics(d, b);
|
|
67
|
+
function __() { this.constructor = d; }
|
|
68
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
69
|
+
}
|
|
70
|
+
var __assign = function () {
|
|
71
|
+
__assign = Object.assign || function __assign(t) {
|
|
72
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
73
|
+
s = arguments[i];
|
|
74
|
+
for (var p in s)
|
|
75
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
76
|
+
t[p] = s[p];
|
|
50
77
|
}
|
|
78
|
+
return t;
|
|
51
79
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
80
|
+
return __assign.apply(this, arguments);
|
|
81
|
+
};
|
|
82
|
+
function __rest(s, e) {
|
|
83
|
+
var t = {};
|
|
84
|
+
for (var p in s)
|
|
85
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
86
|
+
t[p] = s[p];
|
|
87
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
88
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
89
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
90
|
+
t[p[i]] = s[p[i]];
|
|
57
91
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
?
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
92
|
+
return t;
|
|
93
|
+
}
|
|
94
|
+
function __decorate(decorators, target, key, desc) {
|
|
95
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
96
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
97
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
98
|
+
else
|
|
99
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
100
|
+
if (d = decorators[i])
|
|
101
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
102
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
103
|
+
}
|
|
104
|
+
function __param(paramIndex, decorator) {
|
|
105
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
106
|
+
}
|
|
107
|
+
function __metadata(metadataKey, metadataValue) {
|
|
108
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
109
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
110
|
+
}
|
|
111
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
112
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
113
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
114
|
+
function fulfilled(value) { try {
|
|
115
|
+
step(generator.next(value));
|
|
73
116
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
117
|
+
catch (e) {
|
|
118
|
+
reject(e);
|
|
119
|
+
} }
|
|
120
|
+
function rejected(value) { try {
|
|
121
|
+
step(generator["throw"](value));
|
|
79
122
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridAdapterService, decorators: [{
|
|
86
|
-
type: i0.Injectable,
|
|
87
|
-
args: [{
|
|
88
|
-
providedIn: 'root',
|
|
89
|
-
}]
|
|
90
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.SkyCoreAdapterService }]; } });
|
|
91
|
-
|
|
92
|
-
var idIndex = 0;
|
|
93
|
-
/**
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
96
|
-
var SkyAgGridWrapperComponent = /** @class */ (function () {
|
|
97
|
-
function SkyAgGridWrapperComponent(adapterService, changeDetector, elementRef) {
|
|
98
|
-
this.adapterService = adapterService;
|
|
99
|
-
this.changeDetector = changeDetector;
|
|
100
|
-
this.elementRef = elementRef;
|
|
101
|
-
this._viewkeeperClasses = [];
|
|
102
|
-
idIndex++;
|
|
103
|
-
this.afterAnchorId = 'sky-ag-grid-nav-anchor-after-' + idIndex;
|
|
104
|
-
this.beforeAnchorId = 'sky-ag-grid-nav-anchor-before-' + idIndex;
|
|
105
|
-
this.gridId = 'sky-ag-grid-' + idIndex;
|
|
106
|
-
}
|
|
107
|
-
Object.defineProperty(SkyAgGridWrapperComponent.prototype, "viewkeeperClasses", {
|
|
108
|
-
get: function () {
|
|
109
|
-
return this._viewkeeperClasses;
|
|
110
|
-
},
|
|
111
|
-
set: function (value) {
|
|
112
|
-
this._viewkeeperClasses = value;
|
|
113
|
-
this.changeDetector.markForCheck();
|
|
114
|
-
},
|
|
115
|
-
enumerable: false,
|
|
116
|
-
configurable: true
|
|
123
|
+
catch (e) {
|
|
124
|
+
reject(e);
|
|
125
|
+
} }
|
|
126
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
127
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
117
128
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return true;
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
var innerEditing_1 = false;
|
|
158
|
-
this.agGrid.api.forEachDetailGridInfo(function (detailGrid) {
|
|
159
|
-
if (detailGrid.api.getEditingCells().length > 0) {
|
|
160
|
-
innerEditing_1 = true;
|
|
129
|
+
}
|
|
130
|
+
function __generator(thisArg, body) {
|
|
131
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
132
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
133
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
134
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
135
|
+
function step(op) {
|
|
136
|
+
if (f)
|
|
137
|
+
throw new TypeError("Generator is already executing.");
|
|
138
|
+
while (_)
|
|
139
|
+
try {
|
|
140
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
141
|
+
return t;
|
|
142
|
+
if (y = 0, t)
|
|
143
|
+
op = [op[0] & 2, t.value];
|
|
144
|
+
switch (op[0]) {
|
|
145
|
+
case 0:
|
|
146
|
+
case 1:
|
|
147
|
+
t = op;
|
|
148
|
+
break;
|
|
149
|
+
case 4:
|
|
150
|
+
_.label++;
|
|
151
|
+
return { value: op[1], done: false };
|
|
152
|
+
case 5:
|
|
153
|
+
_.label++;
|
|
154
|
+
y = op[1];
|
|
155
|
+
op = [0];
|
|
156
|
+
continue;
|
|
157
|
+
case 7:
|
|
158
|
+
op = _.ops.pop();
|
|
159
|
+
_.trys.pop();
|
|
160
|
+
continue;
|
|
161
|
+
default:
|
|
162
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
163
|
+
_ = 0;
|
|
164
|
+
continue;
|
|
161
165
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
166
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
167
|
+
_.label = op[1];
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
171
|
+
_.label = t[1];
|
|
172
|
+
t = op;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
if (t && _.label < t[2]) {
|
|
176
|
+
_.label = t[2];
|
|
177
|
+
_.ops.push(op);
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
if (t[2])
|
|
181
|
+
_.ops.pop();
|
|
182
|
+
_.trys.pop();
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
op = body.call(thisArg, _);
|
|
186
|
+
}
|
|
187
|
+
catch (e) {
|
|
188
|
+
op = [6, e];
|
|
189
|
+
y = 0;
|
|
190
|
+
}
|
|
191
|
+
finally {
|
|
192
|
+
f = t = 0;
|
|
193
|
+
}
|
|
194
|
+
if (op[0] & 5)
|
|
195
|
+
throw op[1];
|
|
196
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
200
|
+
if (k2 === undefined)
|
|
201
|
+
k2 = k;
|
|
202
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
203
|
+
}) : (function (o, m, k, k2) {
|
|
204
|
+
if (k2 === undefined)
|
|
205
|
+
k2 = k;
|
|
206
|
+
o[k2] = m[k];
|
|
207
|
+
});
|
|
208
|
+
function __exportStar(m, o) {
|
|
209
|
+
for (var p in m)
|
|
210
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
211
|
+
__createBinding(o, m, p);
|
|
212
|
+
}
|
|
213
|
+
function __values(o) {
|
|
214
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
215
|
+
if (m)
|
|
216
|
+
return m.call(o);
|
|
217
|
+
if (o && typeof o.length === "number")
|
|
218
|
+
return {
|
|
219
|
+
next: function () {
|
|
220
|
+
if (o && i >= o.length)
|
|
221
|
+
o = void 0;
|
|
222
|
+
return { value: o && o[i++], done: !o };
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
226
|
+
}
|
|
227
|
+
function __read(o, n) {
|
|
228
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
229
|
+
if (!m)
|
|
230
|
+
return o;
|
|
231
|
+
var i = m.call(o), r, ar = [], e;
|
|
232
|
+
try {
|
|
233
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
234
|
+
ar.push(r.value);
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
e = { error: error };
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
try {
|
|
241
|
+
if (r && !r.done && (m = i["return"]))
|
|
242
|
+
m.call(i);
|
|
243
|
+
}
|
|
244
|
+
finally {
|
|
245
|
+
if (e)
|
|
246
|
+
throw e.error;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return ar;
|
|
250
|
+
}
|
|
251
|
+
/** @deprecated */
|
|
252
|
+
function __spread() {
|
|
253
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
254
|
+
ar = ar.concat(__read(arguments[i]));
|
|
255
|
+
return ar;
|
|
256
|
+
}
|
|
257
|
+
/** @deprecated */
|
|
258
|
+
function __spreadArrays() {
|
|
259
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
260
|
+
s += arguments[i].length;
|
|
261
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
262
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
263
|
+
r[k] = a[j];
|
|
264
|
+
return r;
|
|
265
|
+
}
|
|
266
|
+
function __spreadArray(to, from, pack) {
|
|
267
|
+
if (pack || arguments.length === 2)
|
|
268
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
269
|
+
if (ar || !(i in from)) {
|
|
270
|
+
if (!ar)
|
|
271
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
272
|
+
ar[i] = from[i];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
276
|
+
}
|
|
277
|
+
function __await(v) {
|
|
278
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
279
|
+
}
|
|
280
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
281
|
+
if (!Symbol.asyncIterator)
|
|
282
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
283
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
284
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
285
|
+
function verb(n) { if (g[n])
|
|
286
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
287
|
+
function resume(n, v) { try {
|
|
288
|
+
step(g[n](v));
|
|
289
|
+
}
|
|
290
|
+
catch (e) {
|
|
291
|
+
settle(q[0][3], e);
|
|
292
|
+
} }
|
|
293
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
294
|
+
function fulfill(value) { resume("next", value); }
|
|
295
|
+
function reject(value) { resume("throw", value); }
|
|
296
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
297
|
+
resume(q[0][0], q[0][1]); }
|
|
298
|
+
}
|
|
299
|
+
function __asyncDelegator(o) {
|
|
300
|
+
var i, p;
|
|
301
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
302
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
303
|
+
}
|
|
304
|
+
function __asyncValues(o) {
|
|
305
|
+
if (!Symbol.asyncIterator)
|
|
306
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
307
|
+
var m = o[Symbol.asyncIterator], i;
|
|
308
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
309
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
310
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
311
|
+
}
|
|
312
|
+
function __makeTemplateObject(cooked, raw) {
|
|
313
|
+
if (Object.defineProperty) {
|
|
314
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
cooked.raw = raw;
|
|
318
|
+
}
|
|
319
|
+
return cooked;
|
|
320
|
+
}
|
|
321
|
+
;
|
|
322
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
323
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
324
|
+
}) : function (o, v) {
|
|
325
|
+
o["default"] = v;
|
|
326
|
+
};
|
|
327
|
+
function __importStar(mod) {
|
|
328
|
+
if (mod && mod.__esModule)
|
|
329
|
+
return mod;
|
|
330
|
+
var result = {};
|
|
331
|
+
if (mod != null)
|
|
332
|
+
for (var k in mod)
|
|
333
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
334
|
+
__createBinding(result, mod, k);
|
|
335
|
+
__setModuleDefault(result, mod);
|
|
336
|
+
return result;
|
|
337
|
+
}
|
|
338
|
+
function __importDefault(mod) {
|
|
339
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
340
|
+
}
|
|
341
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
342
|
+
if (kind === "a" && !f)
|
|
343
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
344
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
345
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
346
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
347
|
+
}
|
|
348
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
349
|
+
if (kind === "m")
|
|
350
|
+
throw new TypeError("Private method is not writable");
|
|
351
|
+
if (kind === "a" && !f)
|
|
352
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
353
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
354
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
355
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
var SkyAgGridAdapterService = /** @class */ (function () {
|
|
359
|
+
function SkyAgGridAdapterService(skyAdapterService) {
|
|
360
|
+
this.skyAdapterService = skyAdapterService;
|
|
361
|
+
}
|
|
362
|
+
SkyAgGridAdapterService.prototype.getElementOrParentWithClass = function (element, className) {
|
|
363
|
+
if (element && element.classList.contains(className)) {
|
|
364
|
+
return element;
|
|
365
|
+
}
|
|
366
|
+
else if (element.parentElement) {
|
|
367
|
+
return this.getElementOrParentWithClass(element.parentElement, className);
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
SkyAgGridAdapterService.prototype.setFocusedElementById = function (parentEl, selector) {
|
|
371
|
+
var element = parentEl.querySelector("#" + selector);
|
|
372
|
+
/* istanbul ignore else */
|
|
373
|
+
if (element) {
|
|
374
|
+
element.focus();
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
SkyAgGridAdapterService.prototype.getFocusedElement = function () {
|
|
378
|
+
return document.activeElement;
|
|
379
|
+
};
|
|
380
|
+
SkyAgGridAdapterService.prototype.getNextFocusableElement = function (currentEl, parentEl, moveFocusLeft) {
|
|
381
|
+
if (parentEl) {
|
|
382
|
+
var focusableChildren = this.skyAdapterService.getFocusableChildren(parentEl);
|
|
383
|
+
var currentElementIndex = focusableChildren.indexOf(currentEl);
|
|
384
|
+
var nextIndex = moveFocusLeft
|
|
385
|
+
? currentElementIndex - 1
|
|
386
|
+
: currentElementIndex + 1;
|
|
387
|
+
if ((!moveFocusLeft && focusableChildren.length >= nextIndex) ||
|
|
388
|
+
(moveFocusLeft && nextIndex >= 0)) {
|
|
389
|
+
return focusableChildren[nextIndex];
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
SkyAgGridAdapterService.prototype.focusOnFocusableChildren = function (element) {
|
|
394
|
+
var focusableChildren = this.skyAdapterService.getFocusableChildren(element);
|
|
395
|
+
if (focusableChildren.length) {
|
|
396
|
+
focusableChildren[0].focus();
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
return SkyAgGridAdapterService;
|
|
174
400
|
}());
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
178
|
-
type: i0.
|
|
401
|
+
SkyAgGridAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridAdapterService, deps: [{ token: i1__namespace.SkyCoreAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
402
|
+
SkyAgGridAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridAdapterService, providedIn: 'root' });
|
|
403
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridAdapterService, decorators: [{
|
|
404
|
+
type: i0.Injectable,
|
|
179
405
|
args: [{
|
|
180
|
-
|
|
181
|
-
template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n",
|
|
182
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
406
|
+
providedIn: 'root',
|
|
183
407
|
}]
|
|
184
|
-
}], ctorParameters: function () { return [{ type:
|
|
185
|
-
type: i0.ContentChild,
|
|
186
|
-
args: [agGridAngular.AgGridAngular, {
|
|
187
|
-
static: true,
|
|
188
|
-
}]
|
|
189
|
-
}] } });
|
|
408
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.SkyCoreAdapterService }]; } });
|
|
190
409
|
|
|
410
|
+
var idIndex = 0;
|
|
191
411
|
/**
|
|
192
412
|
* @internal
|
|
193
413
|
*/
|
|
194
|
-
var
|
|
195
|
-
function
|
|
196
|
-
this.
|
|
414
|
+
var SkyAgGridWrapperComponent = /** @class */ (function () {
|
|
415
|
+
function SkyAgGridWrapperComponent(adapterService, changeDetector, elementRef) {
|
|
416
|
+
this.adapterService = adapterService;
|
|
417
|
+
this.changeDetector = changeDetector;
|
|
418
|
+
this.elementRef = elementRef;
|
|
419
|
+
this._viewkeeperClasses = [];
|
|
420
|
+
idIndex++;
|
|
421
|
+
this.afterAnchorId = 'sky-ag-grid-nav-anchor-after-' + idIndex;
|
|
422
|
+
this.beforeAnchorId = 'sky-ag-grid-nav-anchor-before-' + idIndex;
|
|
423
|
+
this.gridId = 'sky-ag-grid-' + idIndex;
|
|
197
424
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
425
|
+
Object.defineProperty(SkyAgGridWrapperComponent.prototype, "viewkeeperClasses", {
|
|
426
|
+
get: function () {
|
|
427
|
+
return this._viewkeeperClasses;
|
|
428
|
+
},
|
|
429
|
+
set: function (value) {
|
|
430
|
+
this._viewkeeperClasses = value;
|
|
431
|
+
this.changeDetector.markForCheck();
|
|
432
|
+
},
|
|
433
|
+
enumerable: false,
|
|
434
|
+
configurable: true
|
|
435
|
+
});
|
|
436
|
+
SkyAgGridWrapperComponent.prototype.ngAfterContentInit = function () {
|
|
437
|
+
if (this.agGrid.gridOptions &&
|
|
438
|
+
this.agGrid.gridOptions.domLayout === 'autoHeight') {
|
|
439
|
+
this.viewkeeperClasses.push('.ag-header');
|
|
440
|
+
}
|
|
204
441
|
};
|
|
205
|
-
|
|
206
|
-
this.
|
|
442
|
+
SkyAgGridWrapperComponent.prototype.onGridKeydown = function (event) {
|
|
443
|
+
if (this.agGrid && !this.isInEditMode && event.key === 'Tab') {
|
|
444
|
+
var idToFocus = event.shiftKey
|
|
445
|
+
? this.beforeAnchorId
|
|
446
|
+
: this.afterAnchorId;
|
|
447
|
+
this.adapterService.setFocusedElementById(this.elementRef.nativeElement, idToFocus);
|
|
448
|
+
}
|
|
207
449
|
};
|
|
208
|
-
|
|
209
|
-
|
|
450
|
+
SkyAgGridWrapperComponent.prototype.onAnchorFocus = function (event) {
|
|
451
|
+
var gridId = this.gridId;
|
|
452
|
+
var relatedTarget = event.relatedTarget;
|
|
453
|
+
var previousFocusedId = relatedTarget && relatedTarget.id;
|
|
454
|
+
var previousWasCell = relatedTarget &&
|
|
455
|
+
!!this.adapterService.getElementOrParentWithClass(relatedTarget, 'ag-cell');
|
|
456
|
+
if (previousFocusedId !== gridId && !previousWasCell) {
|
|
457
|
+
var columns = this.agGrid.columnApi.getAllDisplayedColumns();
|
|
458
|
+
var firstColumn = columns && columns[0];
|
|
459
|
+
var rowIndex = this.agGrid.api.getFirstDisplayedRow();
|
|
460
|
+
if (firstColumn && rowIndex >= 0) {
|
|
461
|
+
this.agGrid.api.setFocusedCell(rowIndex, firstColumn);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
210
464
|
};
|
|
211
|
-
|
|
465
|
+
Object.defineProperty(SkyAgGridWrapperComponent.prototype, "isInEditMode", {
|
|
466
|
+
get: function () {
|
|
467
|
+
/* Sanity check */
|
|
468
|
+
/* istanbul ignore else */
|
|
469
|
+
if (this.agGrid && this.agGrid.api) {
|
|
470
|
+
var primaryGridEditing = this.agGrid.api.getEditingCells().length > 0;
|
|
471
|
+
if (primaryGridEditing) {
|
|
472
|
+
return true;
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
var innerEditing_1 = false;
|
|
476
|
+
this.agGrid.api.forEachDetailGridInfo(function (detailGrid) {
|
|
477
|
+
if (detailGrid.api.getEditingCells().length > 0) {
|
|
478
|
+
innerEditing_1 = true;
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
return innerEditing_1;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
return false;
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
enumerable: false,
|
|
489
|
+
configurable: true
|
|
490
|
+
});
|
|
491
|
+
return SkyAgGridWrapperComponent;
|
|
212
492
|
}());
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
493
|
+
SkyAgGridWrapperComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridWrapperComponent, deps: [{ token: SkyAgGridAdapterService }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
494
|
+
SkyAgGridWrapperComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridWrapperComponent, selector: "sky-ag-grid-wrapper", queries: [{ propertyName: "agGrid", first: true, predicate: agGridAngular.AgGridAngular, descendants: true, static: true }], ngImport: i0__namespace, template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n", directives: [{ type: i1__namespace.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
495
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridWrapperComponent, decorators: [{
|
|
216
496
|
type: i0.Component,
|
|
217
497
|
args: [{
|
|
218
|
-
selector: 'sky-ag-grid-
|
|
219
|
-
template: "<
|
|
220
|
-
styles: ["sky-autocomplete input{border:none;box-shadow:none}\n"],
|
|
498
|
+
selector: 'sky-ag-grid-wrapper',
|
|
499
|
+
template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n",
|
|
221
500
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
222
501
|
}]
|
|
223
|
-
}], propDecorators: {
|
|
224
|
-
type: i0.
|
|
225
|
-
args: [
|
|
502
|
+
}], ctorParameters: function () { return [{ type: SkyAgGridAdapterService }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }]; }, propDecorators: { agGrid: [{
|
|
503
|
+
type: i0.ContentChild,
|
|
504
|
+
args: [agGridAngular.AgGridAngular, {
|
|
505
|
+
static: true,
|
|
506
|
+
}]
|
|
226
507
|
}] } });
|
|
227
508
|
|
|
228
509
|
/**
|
|
229
|
-
*
|
|
230
|
-
* The contents of this file were automatically generated by
|
|
231
|
-
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/ag-grid' schematic.
|
|
232
|
-
* To update this file, simply rerun the command.
|
|
510
|
+
* @internal
|
|
233
511
|
*/
|
|
234
|
-
var
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
sky_ag_grid_cell_editor_number_aria_label: {
|
|
240
|
-
message: 'Editable number {0} for row {1}',
|
|
241
|
-
},
|
|
242
|
-
sky_ag_grid_cell_editor_text_aria_label: {
|
|
243
|
-
message: 'Editable text {0} for row {1}',
|
|
244
|
-
},
|
|
245
|
-
sky_ag_grid_cell_editor_autocomplete_aria_label: {
|
|
246
|
-
message: 'Editable autocomplete {0} for row {1}',
|
|
247
|
-
},
|
|
248
|
-
sky_ag_grid_cell_renderer_currency_aria_label: {
|
|
249
|
-
message: 'Editable currency {0} for row {1}',
|
|
250
|
-
},
|
|
251
|
-
sky_ag_grid_cell_renderer_number_validator_message: {
|
|
252
|
-
message: 'Please enter a valid number',
|
|
253
|
-
},
|
|
254
|
-
sky_ag_grid_cell_renderer_currency_validator_message: {
|
|
255
|
-
message: 'Please enter a valid currency',
|
|
256
|
-
},
|
|
257
|
-
skyux_lookup_tokens_summary: { message: '{0} items selected' },
|
|
258
|
-
},
|
|
259
|
-
};
|
|
260
|
-
var AgGridResourcesProvider = /** @class */ (function () {
|
|
261
|
-
function AgGridResourcesProvider() {
|
|
512
|
+
var SkyAgGridDataManagerAdapterDirective = /** @class */ (function () {
|
|
513
|
+
function SkyAgGridDataManagerAdapterDirective(changeDetector, dataManagerSvc) {
|
|
514
|
+
this.changeDetector = changeDetector;
|
|
515
|
+
this.dataManagerSvc = dataManagerSvc;
|
|
516
|
+
this.ngUnsubscribe = new rxjs.Subject();
|
|
262
517
|
}
|
|
263
|
-
|
|
264
|
-
|
|
518
|
+
SkyAgGridDataManagerAdapterDirective.prototype.ngAfterContentInit = function () {
|
|
519
|
+
var _this = this;
|
|
520
|
+
this.dataManagerSvc.setViewkeeperClasses(this.viewId, ['.ag-header']);
|
|
521
|
+
this.viewConfig = this.dataManagerSvc.getViewById(this.viewId);
|
|
522
|
+
this.checkForAgGrid();
|
|
523
|
+
this.checkForSkyAgGridWrapper();
|
|
524
|
+
this.agGridList.changes
|
|
525
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
526
|
+
.subscribe(function () { return _this.checkForAgGrid(); });
|
|
527
|
+
this.skyAgGridWrapperList.changes
|
|
528
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
529
|
+
.subscribe(function () { return _this.checkForSkyAgGridWrapper(); });
|
|
265
530
|
};
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
{
|
|
280
|
-
|
|
281
|
-
useClass: AgGridResourcesProvider,
|
|
282
|
-
multi: true,
|
|
283
|
-
},
|
|
284
|
-
], imports: [i3.SkyI18nModule] });
|
|
285
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AgGridResourcesModule, decorators: [{
|
|
286
|
-
type: i0.NgModule,
|
|
287
|
-
args: [{
|
|
288
|
-
exports: [i3.SkyI18nModule],
|
|
289
|
-
providers: [
|
|
290
|
-
{
|
|
291
|
-
provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
|
|
292
|
-
useClass: AgGridResourcesProvider,
|
|
293
|
-
multi: true,
|
|
294
|
-
},
|
|
295
|
-
],
|
|
296
|
-
}]
|
|
297
|
-
}] });
|
|
298
|
-
|
|
299
|
-
var SkyAgGridCellEditorAutocompleteModule = /** @class */ (function () {
|
|
300
|
-
function SkyAgGridCellEditorAutocompleteModule() {
|
|
301
|
-
}
|
|
302
|
-
return SkyAgGridCellEditorAutocompleteModule;
|
|
303
|
-
}());
|
|
304
|
-
SkyAgGridCellEditorAutocompleteModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
305
|
-
SkyAgGridCellEditorAutocompleteModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, declarations: [SkyAgGridCellEditorAutocompleteComponent], imports: [i1$2.FormsModule, AgGridResourcesModule, i1$1.SkyAutocompleteModule], exports: [SkyAgGridCellEditorAutocompleteComponent] });
|
|
306
|
-
SkyAgGridCellEditorAutocompleteModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, imports: [[i1$2.FormsModule, AgGridResourcesModule, i1$1.SkyAutocompleteModule]] });
|
|
307
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, decorators: [{
|
|
308
|
-
type: i0.NgModule,
|
|
309
|
-
args: [{
|
|
310
|
-
imports: [i1$2.FormsModule, AgGridResourcesModule, i1$1.SkyAutocompleteModule],
|
|
311
|
-
declarations: [SkyAgGridCellEditorAutocompleteComponent],
|
|
312
|
-
exports: [SkyAgGridCellEditorAutocompleteComponent],
|
|
313
|
-
}]
|
|
314
|
-
}] });
|
|
315
|
-
|
|
316
|
-
/*! *****************************************************************************
|
|
317
|
-
Copyright (c) Microsoft Corporation.
|
|
318
|
-
|
|
319
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
320
|
-
purpose with or without fee is hereby granted.
|
|
321
|
-
|
|
322
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
323
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
324
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
325
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
326
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
327
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
328
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
329
|
-
***************************************************************************** */
|
|
330
|
-
/* global Reflect, Promise */
|
|
331
|
-
var extendStatics = function (d, b) {
|
|
332
|
-
extendStatics = Object.setPrototypeOf ||
|
|
333
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
334
|
-
function (d, b) { for (var p in b)
|
|
335
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
336
|
-
d[p] = b[p]; };
|
|
337
|
-
return extendStatics(d, b);
|
|
338
|
-
};
|
|
339
|
-
function __extends(d, b) {
|
|
340
|
-
if (typeof b !== "function" && b !== null)
|
|
341
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
342
|
-
extendStatics(d, b);
|
|
343
|
-
function __() { this.constructor = d; }
|
|
344
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
345
|
-
}
|
|
346
|
-
var __assign = function () {
|
|
347
|
-
__assign = Object.assign || function __assign(t) {
|
|
348
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
349
|
-
s = arguments[i];
|
|
350
|
-
for (var p in s)
|
|
351
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
352
|
-
t[p] = s[p];
|
|
531
|
+
SkyAgGridDataManagerAdapterDirective.prototype.ngOnDestroy = function () {
|
|
532
|
+
this.ngUnsubscribe.next();
|
|
533
|
+
this.ngUnsubscribe.complete();
|
|
534
|
+
};
|
|
535
|
+
SkyAgGridDataManagerAdapterDirective.prototype.checkForAgGrid = function () {
|
|
536
|
+
var agGridCount = this.agGridList.length;
|
|
537
|
+
/* istanbul ignore else */
|
|
538
|
+
if (agGridCount === 0) {
|
|
539
|
+
this.unregisterAgGrid();
|
|
540
|
+
}
|
|
541
|
+
else if (this.agGridList.first !== this.currentAgGrid) {
|
|
542
|
+
this.registerAgGrid();
|
|
543
|
+
}
|
|
544
|
+
if (agGridCount > 1) {
|
|
545
|
+
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
353
546
|
}
|
|
354
|
-
return t;
|
|
355
547
|
};
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
362
|
-
t[p] = s[p];
|
|
363
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
364
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
365
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
366
|
-
t[p[i]] = s[p[i]];
|
|
548
|
+
SkyAgGridDataManagerAdapterDirective.prototype.checkForSkyAgGridWrapper = function () {
|
|
549
|
+
var skyAgGridWrapperCount = this.skyAgGridWrapperList.length;
|
|
550
|
+
/* istanbul ignore else */
|
|
551
|
+
if (skyAgGridWrapperCount === 0) {
|
|
552
|
+
this.unregisterSkyAgGridWrapper();
|
|
367
553
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
function __decorate(decorators, target, key, desc) {
|
|
371
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
372
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
373
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
374
|
-
else
|
|
375
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
376
|
-
if (d = decorators[i])
|
|
377
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
378
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
379
|
-
}
|
|
380
|
-
function __param(paramIndex, decorator) {
|
|
381
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
382
|
-
}
|
|
383
|
-
function __metadata(metadataKey, metadataValue) {
|
|
384
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
385
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
386
|
-
}
|
|
387
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
388
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
389
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
390
|
-
function fulfilled(value) { try {
|
|
391
|
-
step(generator.next(value));
|
|
554
|
+
else if (this.skyAgGridWrapperList.first !== this.currentSkyAgGridWrapper) {
|
|
555
|
+
this.registerSkyAgGridWrapper();
|
|
392
556
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
} }
|
|
396
|
-
function rejected(value) { try {
|
|
397
|
-
step(generator["throw"](value));
|
|
557
|
+
if (skyAgGridWrapperCount > 1) {
|
|
558
|
+
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
398
559
|
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
return t;
|
|
418
|
-
if (y = 0, t)
|
|
419
|
-
op = [op[0] & 2, t.value];
|
|
420
|
-
switch (op[0]) {
|
|
421
|
-
case 0:
|
|
422
|
-
case 1:
|
|
423
|
-
t = op;
|
|
424
|
-
break;
|
|
425
|
-
case 4:
|
|
426
|
-
_.label++;
|
|
427
|
-
return { value: op[1], done: false };
|
|
428
|
-
case 5:
|
|
429
|
-
_.label++;
|
|
430
|
-
y = op[1];
|
|
431
|
-
op = [0];
|
|
432
|
-
continue;
|
|
433
|
-
case 7:
|
|
434
|
-
op = _.ops.pop();
|
|
435
|
-
_.trys.pop();
|
|
436
|
-
continue;
|
|
437
|
-
default:
|
|
438
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
439
|
-
_ = 0;
|
|
440
|
-
continue;
|
|
441
|
-
}
|
|
442
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
443
|
-
_.label = op[1];
|
|
444
|
-
break;
|
|
445
|
-
}
|
|
446
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
447
|
-
_.label = t[1];
|
|
448
|
-
t = op;
|
|
449
|
-
break;
|
|
450
|
-
}
|
|
451
|
-
if (t && _.label < t[2]) {
|
|
452
|
-
_.label = t[2];
|
|
453
|
-
_.ops.push(op);
|
|
454
|
-
break;
|
|
455
|
-
}
|
|
456
|
-
if (t[2])
|
|
457
|
-
_.ops.pop();
|
|
458
|
-
_.trys.pop();
|
|
459
|
-
continue;
|
|
460
|
-
}
|
|
461
|
-
op = body.call(thisArg, _);
|
|
560
|
+
};
|
|
561
|
+
SkyAgGridDataManagerAdapterDirective.prototype.unregisterAgGrid = function () {
|
|
562
|
+
this.currentAgGrid = undefined;
|
|
563
|
+
/* istanbul ignore if */
|
|
564
|
+
if (this.dataStateSub) {
|
|
565
|
+
this.dataStateSub.unsubscribe();
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
SkyAgGridDataManagerAdapterDirective.prototype.unregisterSkyAgGridWrapper = function () {
|
|
569
|
+
this.currentSkyAgGridWrapper = undefined;
|
|
570
|
+
};
|
|
571
|
+
SkyAgGridDataManagerAdapterDirective.prototype.registerSkyAgGridWrapper = function () {
|
|
572
|
+
var _this = this;
|
|
573
|
+
this.unregisterSkyAgGridWrapper();
|
|
574
|
+
this.currentSkyAgGridWrapper = this.skyAgGridWrapperList.first;
|
|
575
|
+
setTimeout(function () {
|
|
576
|
+
if (_this.currentSkyAgGridWrapper) {
|
|
577
|
+
_this.currentSkyAgGridWrapper.viewkeeperClasses = [];
|
|
462
578
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
SkyAgGridDataManagerAdapterDirective.prototype.registerAgGrid = function () {
|
|
582
|
+
var _this = this;
|
|
583
|
+
this.unregisterAgGrid();
|
|
584
|
+
var agGrid = this.agGridList.first;
|
|
585
|
+
this.currentAgGrid = agGrid;
|
|
586
|
+
agGrid.gridReady.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
587
|
+
_this.viewConfig.onSelectAllClick = _this.selectAll.bind(_this);
|
|
588
|
+
_this.viewConfig.onClearAllClick = _this.clearAll.bind(_this);
|
|
589
|
+
_this.dataManagerSvc.updateViewConfig(_this.viewConfig);
|
|
590
|
+
_this.dataStateSub = _this.dataManagerSvc
|
|
591
|
+
.getDataStateUpdates(_this.viewConfig.id)
|
|
592
|
+
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
593
|
+
.subscribe(function (dataState) {
|
|
594
|
+
_this.currentDataState = dataState;
|
|
595
|
+
_this.displayColumns(dataState);
|
|
596
|
+
});
|
|
597
|
+
agGrid.api.sizeColumnsToFit();
|
|
598
|
+
});
|
|
599
|
+
agGrid.columnMoved
|
|
600
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.filter(function (event) { return ![
|
|
601
|
+
'gridInitializing',
|
|
602
|
+
'uiColumnResized',
|
|
603
|
+
'uiColumnDragged',
|
|
604
|
+
'api',
|
|
605
|
+
].includes(event.source); }))
|
|
606
|
+
.subscribe(function (value) {
|
|
607
|
+
_this.updateColumnsInCurrentDataState(value.columnApi);
|
|
608
|
+
});
|
|
609
|
+
var currentColumns;
|
|
610
|
+
agGrid.dragStarted
|
|
611
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
612
|
+
.subscribe(function (value) {
|
|
613
|
+
currentColumns = _this.getColumnOrder(value.columnApi);
|
|
614
|
+
});
|
|
615
|
+
agGrid.dragStopped
|
|
616
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
617
|
+
.subscribe(function (value) {
|
|
618
|
+
var newColumns = _this.getColumnOrder(value.columnApi);
|
|
619
|
+
var hasChanged = currentColumns.findIndex(function (colId, i) { return colId !== newColumns[i]; });
|
|
620
|
+
if (hasChanged > -1) {
|
|
621
|
+
_this.updateColumnsInCurrentDataState(value.columnApi);
|
|
466
622
|
}
|
|
467
|
-
|
|
468
|
-
|
|
623
|
+
});
|
|
624
|
+
agGrid.rowSelected
|
|
625
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
626
|
+
.subscribe(function (event) {
|
|
627
|
+
var row = event.node;
|
|
628
|
+
var selectedIds = _this.currentDataState.selectedIds || [];
|
|
629
|
+
var rowIndex = selectedIds.indexOf(row.data.id);
|
|
630
|
+
if (row.isSelected() && rowIndex === -1) {
|
|
631
|
+
selectedIds.push(row.data.id);
|
|
469
632
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
476
|
-
if (k2 === undefined)
|
|
477
|
-
k2 = k;
|
|
478
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
479
|
-
}) : (function (o, m, k, k2) {
|
|
480
|
-
if (k2 === undefined)
|
|
481
|
-
k2 = k;
|
|
482
|
-
o[k2] = m[k];
|
|
483
|
-
});
|
|
484
|
-
function __exportStar(m, o) {
|
|
485
|
-
for (var p in m)
|
|
486
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
487
|
-
__createBinding(o, m, p);
|
|
488
|
-
}
|
|
489
|
-
function __values(o) {
|
|
490
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
491
|
-
if (m)
|
|
492
|
-
return m.call(o);
|
|
493
|
-
if (o && typeof o.length === "number")
|
|
494
|
-
return {
|
|
495
|
-
next: function () {
|
|
496
|
-
if (o && i >= o.length)
|
|
497
|
-
o = void 0;
|
|
498
|
-
return { value: o && o[i++], done: !o };
|
|
633
|
+
else if (!row.isSelected() && rowIndex !== -1) {
|
|
634
|
+
selectedIds.splice(rowIndex, 1);
|
|
499
635
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
if (e)
|
|
522
|
-
throw e.error;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
return ar;
|
|
526
|
-
}
|
|
527
|
-
/** @deprecated */
|
|
528
|
-
function __spread() {
|
|
529
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
530
|
-
ar = ar.concat(__read(arguments[i]));
|
|
531
|
-
return ar;
|
|
532
|
-
}
|
|
533
|
-
/** @deprecated */
|
|
534
|
-
function __spreadArrays() {
|
|
535
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
536
|
-
s += arguments[i].length;
|
|
537
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
538
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
539
|
-
r[k] = a[j];
|
|
540
|
-
return r;
|
|
541
|
-
}
|
|
542
|
-
function __spreadArray(to, from, pack) {
|
|
543
|
-
if (pack || arguments.length === 2)
|
|
544
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
545
|
-
if (ar || !(i in from)) {
|
|
546
|
-
if (!ar)
|
|
547
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
548
|
-
ar[i] = from[i];
|
|
636
|
+
_this.currentDataState.selectedIds = selectedIds;
|
|
637
|
+
_this.dataManagerSvc.updateDataState(_this.currentDataState, _this.viewConfig.id);
|
|
638
|
+
_this.changeDetector.markForCheck();
|
|
639
|
+
});
|
|
640
|
+
agGrid.sortChanged.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
641
|
+
var gridColumnStates = agGrid.columnApi.getColumnState();
|
|
642
|
+
var sortOption;
|
|
643
|
+
/* istanbul ignore else */
|
|
644
|
+
if (gridColumnStates.length) {
|
|
645
|
+
var activeSortColumnState_1 = gridColumnStates.find(function (aGridColumnState) { return aGridColumnState.sortIndex === 0; });
|
|
646
|
+
var dataManagerConfig = _this.dataManagerSvc.getCurrentDataManagerConfig();
|
|
647
|
+
/* istanbul ignore else */
|
|
648
|
+
if (dataManagerConfig.sortOptions && activeSortColumnState_1) {
|
|
649
|
+
sortOption = dataManagerConfig.sortOptions.find(function (option) {
|
|
650
|
+
return (option.propertyName === activeSortColumnState_1.colId &&
|
|
651
|
+
option.descending === (activeSortColumnState_1.sort === 'desc'));
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
sortOption = undefined;
|
|
656
|
+
}
|
|
549
657
|
}
|
|
658
|
+
_this.currentDataState.activeSortOption = sortOption;
|
|
659
|
+
_this.dataManagerSvc.updateDataState(_this.currentDataState, _this.viewConfig.id);
|
|
660
|
+
});
|
|
661
|
+
};
|
|
662
|
+
SkyAgGridDataManagerAdapterDirective.prototype.updateColumnsInCurrentDataState = function (columnApi) {
|
|
663
|
+
var columnOrder = this.getColumnOrder(columnApi);
|
|
664
|
+
var viewState = this.currentDataState.getViewStateById(this.viewConfig.id);
|
|
665
|
+
viewState.displayedColumnIds = columnOrder;
|
|
666
|
+
this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id, viewState), this.viewConfig.id);
|
|
667
|
+
};
|
|
668
|
+
SkyAgGridDataManagerAdapterDirective.prototype.getColumnOrder = function (columnApi) {
|
|
669
|
+
return columnApi
|
|
670
|
+
.getAllDisplayedVirtualColumns()
|
|
671
|
+
.map(function (col) { return col.getColDef().colId; });
|
|
672
|
+
};
|
|
673
|
+
SkyAgGridDataManagerAdapterDirective.prototype.displayColumns = function (dataState) {
|
|
674
|
+
var e_1, _a;
|
|
675
|
+
var agGrid = this.currentAgGrid;
|
|
676
|
+
var viewState = dataState.getViewStateById(this.viewConfig.id);
|
|
677
|
+
var displayedColumnIds = [];
|
|
678
|
+
/*istanbul ignore else*/
|
|
679
|
+
if (viewState.displayedColumnIds) {
|
|
680
|
+
displayedColumnIds = viewState.displayedColumnIds;
|
|
550
681
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
return
|
|
578
|
-
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
682
|
+
var columns = agGrid.columnApi.getAllColumns();
|
|
683
|
+
try {
|
|
684
|
+
for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
|
|
685
|
+
var column = columns_1_1.value;
|
|
686
|
+
var colId = column.getColId();
|
|
687
|
+
var colIndex = displayedColumnIds.indexOf(colId);
|
|
688
|
+
agGrid.columnApi.setColumnVisible(colId, colIndex !== -1);
|
|
689
|
+
agGrid.columnApi.moveColumn(colId, colIndex);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
693
|
+
finally {
|
|
694
|
+
try {
|
|
695
|
+
if (columns_1_1 && !columns_1_1.done && (_a = columns_1.return)) _a.call(columns_1);
|
|
696
|
+
}
|
|
697
|
+
finally { if (e_1) throw e_1.error; }
|
|
698
|
+
}
|
|
699
|
+
};
|
|
700
|
+
SkyAgGridDataManagerAdapterDirective.prototype.selectAll = function () {
|
|
701
|
+
var agGrid = this.agGridList.first;
|
|
702
|
+
agGrid.api.selectAll();
|
|
703
|
+
};
|
|
704
|
+
SkyAgGridDataManagerAdapterDirective.prototype.clearAll = function () {
|
|
705
|
+
var agGrid = this.agGridList.first;
|
|
706
|
+
agGrid.api.deselectAll();
|
|
707
|
+
};
|
|
708
|
+
return SkyAgGridDataManagerAdapterDirective;
|
|
709
|
+
}());
|
|
710
|
+
SkyAgGridDataManagerAdapterDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridDataManagerAdapterDirective, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$1.SkyDataManagerService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
711
|
+
SkyAgGridDataManagerAdapterDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridDataManagerAdapterDirective, selector: "[skyAgGridDataManagerAdapter]", inputs: { viewId: "viewId" }, queries: [{ propertyName: "agGridList", predicate: agGridAngular.AgGridAngular, descendants: true }, { propertyName: "skyAgGridWrapperList", predicate: SkyAgGridWrapperComponent, descendants: true }], ngImport: i0__namespace });
|
|
712
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridDataManagerAdapterDirective, decorators: [{
|
|
713
|
+
type: i0.Directive,
|
|
714
|
+
args: [{
|
|
715
|
+
selector: '[skyAgGridDataManagerAdapter]',
|
|
716
|
+
}]
|
|
717
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$1.SkyDataManagerService }]; }, propDecorators: { viewId: [{
|
|
718
|
+
type: i0.Input
|
|
719
|
+
}], agGridList: [{
|
|
720
|
+
type: i0.ContentChildren,
|
|
721
|
+
args: [agGridAngular.AgGridAngular, { descendants: true }]
|
|
722
|
+
}], skyAgGridWrapperList: [{
|
|
723
|
+
type: i0.ContentChildren,
|
|
724
|
+
args: [SkyAgGridWrapperComponent, { descendants: true }]
|
|
725
|
+
}] } });
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Component for rendering the inline delete template in the overlay.
|
|
729
|
+
* @internal
|
|
730
|
+
*/
|
|
731
|
+
var SkyAgGridRowDeleteComponent = /** @class */ (function () {
|
|
732
|
+
function SkyAgGridRowDeleteComponent() {
|
|
594
733
|
}
|
|
595
|
-
return
|
|
596
|
-
}
|
|
597
|
-
;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
__setModuleDefault(result, mod);
|
|
612
|
-
return result;
|
|
613
|
-
}
|
|
614
|
-
function __importDefault(mod) {
|
|
615
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
616
|
-
}
|
|
617
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
618
|
-
if (kind === "a" && !f)
|
|
619
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
620
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
621
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
622
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
623
|
-
}
|
|
624
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
625
|
-
if (kind === "m")
|
|
626
|
-
throw new TypeError("Private method is not writable");
|
|
627
|
-
if (kind === "a" && !f)
|
|
628
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
629
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
630
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
631
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
632
|
-
}
|
|
734
|
+
return SkyAgGridRowDeleteComponent;
|
|
735
|
+
}());
|
|
736
|
+
SkyAgGridRowDeleteComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridRowDeleteComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
737
|
+
SkyAgGridRowDeleteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridRowDeleteComponent, selector: "ng-component", viewQueries: [{ propertyName: "inlineDeleteTemplateRef", first: true, predicate: ["inlineDeleteTemplateRef"], descendants: true, read: i0.TemplateRef }, { propertyName: "inlineDeleteRefs", predicate: ["inlineDeleteRef"], descendants: true }], ngImport: i0__namespace, template: "\n <ng-template\n let-row\n let-tableWidth=\"tableWidth()\"\n let-getRowDeleteItem=\"getRowDeleteItem\"\n let-cancelRowDelete=\"cancelRowDelete\"\n let-confirmRowDelete=\"confirmRowDelete\"\n #inlineDeleteTemplateRef\n >\n <div\n class=\"sky-ag-grid-row-delete\"\n [id]=\"'row-delete-ref-' + row.id\"\n [ngStyle]=\"{\n height: row.rowHeight + 'px',\n position: 'fixed',\n width: tableWidth + 'px'\n }\"\n #inlineDeleteRef\n >\n <sky-inline-delete\n [pending]=\"getRowDeleteItem(row).pending\"\n (cancelTriggered)=\"cancelRowDelete(row)\"\n (deleteTriggered)=\"confirmRowDelete(row)\"\n ></sky-inline-delete>\n </div>\n </ng-template>\n ", isInline: true, components: [{ type: i1__namespace$2.λ8, selector: "sky-inline-delete", inputs: ["pending"], outputs: ["cancelTriggered", "deleteTriggered"] }], directives: [{ type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
738
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridRowDeleteComponent, decorators: [{
|
|
739
|
+
type: i0.Component,
|
|
740
|
+
args: [{
|
|
741
|
+
template: "\n <ng-template\n let-row\n let-tableWidth=\"tableWidth()\"\n let-getRowDeleteItem=\"getRowDeleteItem\"\n let-cancelRowDelete=\"cancelRowDelete\"\n let-confirmRowDelete=\"confirmRowDelete\"\n #inlineDeleteTemplateRef\n >\n <div\n class=\"sky-ag-grid-row-delete\"\n [id]=\"'row-delete-ref-' + row.id\"\n [ngStyle]=\"{\n height: row.rowHeight + 'px',\n position: 'fixed',\n width: tableWidth + 'px'\n }\"\n #inlineDeleteRef\n >\n <sky-inline-delete\n [pending]=\"getRowDeleteItem(row).pending\"\n (cancelTriggered)=\"cancelRowDelete(row)\"\n (deleteTriggered)=\"confirmRowDelete(row)\"\n ></sky-inline-delete>\n </div>\n </ng-template>\n ",
|
|
742
|
+
}]
|
|
743
|
+
}], propDecorators: { inlineDeleteRefs: [{
|
|
744
|
+
type: i0.ViewChildren,
|
|
745
|
+
args: ['inlineDeleteRef']
|
|
746
|
+
}], inlineDeleteTemplateRef: [{
|
|
747
|
+
type: i0.ViewChild,
|
|
748
|
+
args: ['inlineDeleteTemplateRef', { read: i0.TemplateRef }]
|
|
749
|
+
}] } });
|
|
633
750
|
|
|
634
751
|
/**
|
|
635
752
|
* @internal
|
|
636
753
|
*/
|
|
637
|
-
var
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
754
|
+
var SkyAgGridRowDeleteDirective = /** @class */ (function () {
|
|
755
|
+
function SkyAgGridRowDeleteDirective(affixService, changeDetector, elementRef, resolver, overlayService, viewContainerRef) {
|
|
756
|
+
this.affixService = affixService;
|
|
757
|
+
this.changeDetector = changeDetector;
|
|
758
|
+
this.elementRef = elementRef;
|
|
759
|
+
this.resolver = resolver;
|
|
760
|
+
this.overlayService = overlayService;
|
|
761
|
+
this.viewContainerRef = viewContainerRef;
|
|
762
|
+
/**
|
|
763
|
+
* Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
|
|
764
|
+
*/
|
|
765
|
+
this.rowDeleteCancel = new i0.EventEmitter();
|
|
766
|
+
/**
|
|
767
|
+
* Emits a `SkyAgGridRowDeleteConfirmArgs` object when a row's inline delete is confirmed.
|
|
768
|
+
*/
|
|
769
|
+
this.rowDeleteConfirm = new i0.EventEmitter();
|
|
770
|
+
/**
|
|
771
|
+
* Emits when the list of ids of the data in the rows where inline deletes are shown changes.
|
|
772
|
+
*/
|
|
773
|
+
this.rowDeleteIdsChange = new i0.EventEmitter();
|
|
774
|
+
this.rowDeleteConfigs = [];
|
|
775
|
+
this.ngUnsubscribe = new rxjs.Subject();
|
|
776
|
+
this.rowDeleteContents = {};
|
|
644
777
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
778
|
+
Object.defineProperty(SkyAgGridRowDeleteDirective.prototype, "rowDeleteIds", {
|
|
779
|
+
get: function () {
|
|
780
|
+
return this._rowDeleteIds;
|
|
781
|
+
},
|
|
782
|
+
/**
|
|
783
|
+
* Specifies the ids of the data in the rows on which inline delete's should be shown.
|
|
784
|
+
*/
|
|
785
|
+
set: function (value) {
|
|
786
|
+
var e_1, _b, e_2, _c, e_3, _d;
|
|
787
|
+
var _this = this;
|
|
788
|
+
this._rowDeleteIds = value;
|
|
789
|
+
if (!value) {
|
|
790
|
+
try {
|
|
791
|
+
for (var _e = __values(this.rowDeleteConfigs), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
792
|
+
var config = _f.value;
|
|
793
|
+
this.destroyRowDelete(config.id);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
797
|
+
finally {
|
|
798
|
+
try {
|
|
799
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
800
|
+
}
|
|
801
|
+
finally { if (e_1) throw e_1.error; }
|
|
802
|
+
}
|
|
803
|
+
this.changeDetector.markForCheck();
|
|
804
|
+
return;
|
|
664
805
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
806
|
+
var _loop_1 = function (id) {
|
|
807
|
+
var existingConfig = this_1.rowDeleteConfigs.find(function (config) { return config.id === id; });
|
|
808
|
+
if (existingConfig) {
|
|
809
|
+
existingConfig.pending = false;
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
this_1.rowDeleteConfigs.push({
|
|
813
|
+
id: id,
|
|
814
|
+
pending: false,
|
|
815
|
+
});
|
|
816
|
+
var overlay_1 = this_1.overlayService.create({
|
|
817
|
+
enableScroll: true,
|
|
818
|
+
showBackdrop: false,
|
|
819
|
+
closeOnNavigation: true,
|
|
820
|
+
enableClose: false,
|
|
821
|
+
enablePointerEvents: true,
|
|
822
|
+
});
|
|
823
|
+
overlay_1.attachTemplate(this_1.rowDeleteComponent.inlineDeleteTemplateRef, {
|
|
824
|
+
$implicit: this_1.agGrid.api.getRowNode(id),
|
|
825
|
+
tableWidth: function () {
|
|
826
|
+
return _this.tableWidth;
|
|
827
|
+
},
|
|
828
|
+
getRowDeleteItem: function (row) { return _this.getRowDeleteItem(row); },
|
|
829
|
+
cancelRowDelete: function (row) { return _this.cancelRowDelete(row); },
|
|
830
|
+
confirmRowDelete: function (row) { return _this.confirmRowDelete(row); },
|
|
831
|
+
});
|
|
832
|
+
/**
|
|
833
|
+
* We are manually setting the z-index here because overlays will always be on top of
|
|
834
|
+
* the omnibar. This manual setting is 2 less than the omnibar's z-index of 1000 and one less than
|
|
835
|
+
* the header row's viewkeeper which is 999. We discussed changing the overlay service to allow for this
|
|
836
|
+
* but decided against that change at this time due to its niche nature.
|
|
837
|
+
*/
|
|
838
|
+
overlay_1.componentRef.instance.zIndex = '998';
|
|
839
|
+
setTimeout(function () {
|
|
840
|
+
var inlineDeleteRef = _this.rowDeleteComponent.inlineDeleteRefs
|
|
841
|
+
.toArray()
|
|
842
|
+
.find(function (elRef) {
|
|
843
|
+
return elRef.nativeElement.id === 'row-delete-ref-' + id;
|
|
844
|
+
});
|
|
845
|
+
var affixer = _this.affixService.createAffixer(inlineDeleteRef);
|
|
846
|
+
_this.affixToRow(affixer, id);
|
|
847
|
+
_this.rowDeleteContents[id] = {
|
|
848
|
+
affixer: affixer,
|
|
849
|
+
overlay: overlay_1,
|
|
850
|
+
};
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
var this_1 = this;
|
|
855
|
+
try {
|
|
856
|
+
for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {
|
|
857
|
+
var id = value_1_1.value;
|
|
858
|
+
_loop_1(id);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
862
|
+
finally {
|
|
863
|
+
try {
|
|
864
|
+
if (value_1_1 && !value_1_1.done && (_c = value_1.return)) _c.call(value_1);
|
|
865
|
+
}
|
|
866
|
+
finally { if (e_2) throw e_2.error; }
|
|
867
|
+
}
|
|
868
|
+
try {
|
|
869
|
+
for (var _g = __values(this.rowDeleteConfigs), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
870
|
+
var config = _h.value;
|
|
871
|
+
if (value.indexOf(config.id) < 0) {
|
|
872
|
+
this.destroyRowDelete(config.id);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
877
|
+
finally {
|
|
878
|
+
try {
|
|
879
|
+
if (_h && !_h.done && (_d = _g.return)) _d.call(_g);
|
|
880
|
+
}
|
|
881
|
+
finally { if (e_3) throw e_3.error; }
|
|
669
882
|
}
|
|
883
|
+
this.changeDetector.markForCheck();
|
|
884
|
+
},
|
|
885
|
+
enumerable: false,
|
|
886
|
+
configurable: true
|
|
887
|
+
});
|
|
888
|
+
Object.defineProperty(SkyAgGridRowDeleteDirective.prototype, "tableWidth", {
|
|
889
|
+
get: function () {
|
|
890
|
+
return this.elementRef.nativeElement.querySelectorAll('.sky-ag-grid')[0]
|
|
891
|
+
.offsetWidth;
|
|
892
|
+
},
|
|
893
|
+
enumerable: false,
|
|
894
|
+
configurable: true
|
|
895
|
+
});
|
|
896
|
+
SkyAgGridRowDeleteDirective.prototype.ngAfterContentInit = function () {
|
|
897
|
+
var _this = this;
|
|
898
|
+
var factory = this.resolver.resolveComponentFactory(SkyAgGridRowDeleteComponent);
|
|
899
|
+
this.rowDeleteComponent =
|
|
900
|
+
this.viewContainerRef.createComponent(factory).instance;
|
|
901
|
+
this.agGrid.rowDataChanged
|
|
902
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
903
|
+
.subscribe(function () {
|
|
904
|
+
_this.updateRowDeleteStates();
|
|
670
905
|
});
|
|
906
|
+
this.agGrid.rowDataUpdated
|
|
907
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
908
|
+
.subscribe(function () {
|
|
909
|
+
_this.updateRowDeleteStates();
|
|
910
|
+
});
|
|
911
|
+
this.agGrid.sortChanged
|
|
912
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
913
|
+
.subscribe(function () {
|
|
914
|
+
_this.updateRowDeleteStates();
|
|
915
|
+
});
|
|
916
|
+
this.agGrid.filterChanged
|
|
917
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
918
|
+
.subscribe(function () {
|
|
919
|
+
_this.updateRowDeleteStates();
|
|
920
|
+
});
|
|
921
|
+
this.agGrid.getRowNodeId = function (data) {
|
|
922
|
+
return data.id.toString();
|
|
923
|
+
};
|
|
671
924
|
};
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
this.
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
680
|
-
*/
|
|
681
|
-
SkyAgGridCellEditorDatepickerComponent.prototype.getValue = function () {
|
|
682
|
-
this.datepickerInput.nativeElement.blur();
|
|
683
|
-
return this.currentDate;
|
|
684
|
-
};
|
|
685
|
-
SkyAgGridCellEditorDatepickerComponent.prototype.focusOnDatepickerInput = function () {
|
|
686
|
-
this.datepickerInput.nativeElement.focus();
|
|
687
|
-
};
|
|
688
|
-
return SkyAgGridCellEditorDatepickerComponent;
|
|
689
|
-
}(agGridCommunity.PopupComponent));
|
|
690
|
-
SkyAgGridCellEditorDatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerComponent, deps: [{ token: i1__namespace$3.SkyThemeService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
691
|
-
SkyAgGridCellEditorDatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorDatepickerComponent, selector: "sky-ag-grid-cell-editor-datepicker", viewQueries: [{ propertyName: "datepickerInput", first: true, predicate: ["skyCellEditorDatepickerInput"], descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"sky-ag-grid-cell-editor-datepicker\"\n [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n skyDatepickerInput\n [disabled]=\"skyComponentProperties.disabled\"\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"currentDate\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n", styles: [".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}\n"], components: [{ type: i2__namespace.λ2, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange"] }], directives: [{ type: i1__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.λ3, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { type: i1__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
692
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerComponent, decorators: [{
|
|
693
|
-
type: i0.Component,
|
|
694
|
-
args: [{
|
|
695
|
-
selector: 'sky-ag-grid-cell-editor-datepicker',
|
|
696
|
-
template: "<div\n class=\"sky-ag-grid-cell-editor-datepicker\"\n [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n skyDatepickerInput\n [disabled]=\"skyComponentProperties.disabled\"\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"currentDate\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n",
|
|
697
|
-
styles: [".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}\n"],
|
|
698
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
699
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
700
|
-
}]
|
|
701
|
-
}], ctorParameters: function () {
|
|
702
|
-
return [{ type: i1__namespace$3.SkyThemeService, decorators: [{
|
|
703
|
-
type: i0.Optional
|
|
704
|
-
}] }];
|
|
705
|
-
}, propDecorators: { datepickerInput: [{
|
|
706
|
-
type: i0.ViewChild,
|
|
707
|
-
args: ['skyCellEditorDatepickerInput', { read: i0.ElementRef }]
|
|
708
|
-
}] } });
|
|
709
|
-
|
|
710
|
-
var SkyAgGridCellEditorDatepickerModule = /** @class */ (function () {
|
|
711
|
-
function SkyAgGridCellEditorDatepickerModule() {
|
|
712
|
-
}
|
|
713
|
-
return SkyAgGridCellEditorDatepickerModule;
|
|
714
|
-
}());
|
|
715
|
-
SkyAgGridCellEditorDatepickerModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
716
|
-
SkyAgGridCellEditorDatepickerModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, declarations: [SkyAgGridCellEditorDatepickerComponent], imports: [i2.SkyDatepickerModule, i1$2.FormsModule], exports: [SkyAgGridCellEditorDatepickerComponent] });
|
|
717
|
-
SkyAgGridCellEditorDatepickerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, imports: [[i2.SkyDatepickerModule, i1$2.FormsModule]] });
|
|
718
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, decorators: [{
|
|
719
|
-
type: i0.NgModule,
|
|
720
|
-
args: [{
|
|
721
|
-
imports: [i2.SkyDatepickerModule, i1$2.FormsModule],
|
|
722
|
-
declarations: [SkyAgGridCellEditorDatepickerComponent],
|
|
723
|
-
exports: [SkyAgGridCellEditorDatepickerComponent],
|
|
724
|
-
}]
|
|
725
|
-
}] });
|
|
726
|
-
|
|
727
|
-
function applySkyLookupPropertiesDefaults(skyLookupProperties) {
|
|
728
|
-
return {
|
|
729
|
-
addClick: skyLookupProperties.addClick || undefined,
|
|
730
|
-
ariaLabel: skyLookupProperties.ariaLabel || '',
|
|
731
|
-
autocompleteAttribute: skyLookupProperties.autocompleteAttribute || 'off',
|
|
732
|
-
data: skyLookupProperties.data || [],
|
|
733
|
-
debounceTime: skyLookupProperties.debounceTime || 0,
|
|
734
|
-
descriptorProperty: skyLookupProperties.descriptorProperty || 'name',
|
|
735
|
-
disabled: skyLookupProperties.disabled || false,
|
|
736
|
-
enableShowMore: skyLookupProperties.enableShowMore || false,
|
|
737
|
-
idProperty: skyLookupProperties.idProperty || undefined,
|
|
738
|
-
placeholderText: skyLookupProperties.placeholderText || '',
|
|
739
|
-
propertiesToSearch: skyLookupProperties.propertiesToSearch || undefined,
|
|
740
|
-
search: skyLookupProperties.search || undefined,
|
|
741
|
-
searchAsync: skyLookupProperties.searchAsync || undefined,
|
|
742
|
-
searchFilters: skyLookupProperties.searchFilters || [],
|
|
743
|
-
searchResultsLimit: skyLookupProperties.searchResultsLimit || undefined,
|
|
744
|
-
searchResultTemplate: skyLookupProperties.searchResultTemplate || undefined,
|
|
745
|
-
searchTextMinimumCharacters: skyLookupProperties.searchTextMinimumCharacters || 1,
|
|
746
|
-
selectMode: skyLookupProperties.selectMode || undefined,
|
|
747
|
-
showAddButton: skyLookupProperties.showAddButton || false,
|
|
748
|
-
showMoreConfig: skyLookupProperties.showMoreConfig || {},
|
|
749
|
-
wrapperClass: 'ag-custom-component-popup',
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
var SkyAgGridCellEditorLookupComponent = /** @class */ (function () {
|
|
754
|
-
function SkyAgGridCellEditorLookupComponent(changeDetector, elementRef) {
|
|
755
|
-
this.changeDetector = changeDetector;
|
|
756
|
-
this.elementRef = elementRef;
|
|
757
|
-
this.isAlive = false;
|
|
758
|
-
this.lookupForm = new i1$2.FormGroup({
|
|
759
|
-
currentSelection: new i1$2.FormControl({
|
|
760
|
-
value: [],
|
|
761
|
-
disabled: false,
|
|
762
|
-
}),
|
|
925
|
+
SkyAgGridRowDeleteDirective.prototype.ngOnDestroy = function () {
|
|
926
|
+
var _this = this;
|
|
927
|
+
this.ngUnsubscribe.next();
|
|
928
|
+
this.ngUnsubscribe.complete();
|
|
929
|
+
Object.keys(this.rowDeleteContents).forEach(function (id) {
|
|
930
|
+
_this.destroyRowDelete(id);
|
|
763
931
|
});
|
|
764
|
-
this.useAsyncSearch = false;
|
|
765
|
-
}
|
|
766
|
-
SkyAgGridCellEditorLookupComponent.prototype.agInit = function (params) {
|
|
767
|
-
this.params = params;
|
|
768
|
-
if (!Array.isArray(this.params.value)) {
|
|
769
|
-
throw new Error("Lookup value must be an array");
|
|
770
|
-
}
|
|
771
|
-
var control = this.lookupForm.get('currentSelection');
|
|
772
|
-
control.setValue(this.params.value);
|
|
773
|
-
if (this.params.skyComponentProperties.disabled) {
|
|
774
|
-
control.disable();
|
|
775
|
-
}
|
|
776
|
-
this.skyComponentProperties = this.updateComponentProperties(this.params);
|
|
777
|
-
this.useAsyncSearch =
|
|
778
|
-
typeof this.skyComponentProperties.searchAsync === 'function';
|
|
779
|
-
this.isAlive = true;
|
|
780
|
-
this.changeDetector.markForCheck();
|
|
781
932
|
};
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
this.
|
|
785
|
-
this.
|
|
786
|
-
return false;
|
|
933
|
+
SkyAgGridRowDeleteDirective.prototype.cancelRowDelete = function (row) {
|
|
934
|
+
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(function (config) { return config.id !== row.id; });
|
|
935
|
+
this.rowDeleteCancel.emit({ id: row.id });
|
|
936
|
+
this.destroyRowDelete(row.id);
|
|
787
937
|
};
|
|
788
|
-
|
|
789
|
-
return
|
|
938
|
+
SkyAgGridRowDeleteDirective.prototype.confirmRowDelete = function (row) {
|
|
939
|
+
this.rowDeleteConfigs.find(function (config) { return config.id === row.id; }).pending = true;
|
|
940
|
+
this.rowDeleteConfirm.emit({ id: row.id });
|
|
790
941
|
};
|
|
791
|
-
|
|
792
|
-
return this.
|
|
942
|
+
SkyAgGridRowDeleteDirective.prototype.getRowDeleteItem = function (row) {
|
|
943
|
+
return this.rowDeleteConfigs.find(function (rowDelete) { return rowDelete.id === row.id; });
|
|
793
944
|
};
|
|
794
|
-
|
|
795
|
-
|
|
945
|
+
SkyAgGridRowDeleteDirective.prototype.affixToRow = function (affixer, id) {
|
|
946
|
+
var rowElement = this.elementRef.nativeElement.querySelector("\n [row-id=\"" + id + "\"] div[aria-colindex=\"1\"],\n .ag-row.sky-ag-grid-row-" + id + " div[aria-colindex=\"1\"]\n ");
|
|
947
|
+
// This covers cases where AG Grid places the column index on an inner element (such as with the `enableCellTextSelection` option)
|
|
948
|
+
// This appears to have been fixed by AG Grid in version 24 and so it is not testable after that version.
|
|
949
|
+
/* istanbul ignore if */
|
|
950
|
+
if (!rowElement) {
|
|
951
|
+
var columns = this.elementRef.nativeElement.querySelectorAll('[row-id="' + id + '"] > div');
|
|
952
|
+
for (var i = 0; i < columns.length; i++) {
|
|
953
|
+
if (columns[i].querySelector('[aria-colindex="1"]')) {
|
|
954
|
+
rowElement = columns[i];
|
|
955
|
+
break;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
affixer.affixTo(rowElement, {
|
|
960
|
+
autoFitContext: i1.SkyAffixAutoFitContext.Viewport,
|
|
961
|
+
isSticky: true,
|
|
962
|
+
placement: 'above',
|
|
963
|
+
verticalAlignment: 'top',
|
|
964
|
+
horizontalAlignment: 'left',
|
|
965
|
+
enableAutoFit: false,
|
|
966
|
+
});
|
|
796
967
|
};
|
|
797
|
-
|
|
798
|
-
SkyAgGridCellEditorLookupComponent.prototype.afterGuiAttached = function () {
|
|
968
|
+
SkyAgGridRowDeleteDirective.prototype.destroyRowDelete = function (id) {
|
|
799
969
|
var _a;
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
type: i0.Component,
|
|
812
|
-
args: [{
|
|
813
|
-
selector: 'sky-ag-grid-cell-editor-lookup',
|
|
814
|
-
template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties.searchAsync($event)\"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n",
|
|
815
|
-
styles: [":host{display:block}\n"],
|
|
816
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
817
|
-
}]
|
|
818
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }]; } });
|
|
819
|
-
|
|
820
|
-
var SkyAgGridCellEditorLookupModule = /** @class */ (function () {
|
|
821
|
-
function SkyAgGridCellEditorLookupModule() {
|
|
822
|
-
}
|
|
823
|
-
return SkyAgGridCellEditorLookupModule;
|
|
824
|
-
}());
|
|
825
|
-
SkyAgGridCellEditorLookupModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
826
|
-
SkyAgGridCellEditorLookupModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, declarations: [SkyAgGridCellEditorLookupComponent], imports: [i3$1.CommonModule,
|
|
827
|
-
i1$2.ReactiveFormsModule,
|
|
828
|
-
i3.SkyI18nModule,
|
|
829
|
-
i1$4.SkyInputBoxModule,
|
|
830
|
-
i1$1.SkyLookupModule], exports: [SkyAgGridCellEditorLookupComponent] });
|
|
831
|
-
SkyAgGridCellEditorLookupModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, imports: [[
|
|
832
|
-
i3$1.CommonModule,
|
|
833
|
-
i1$2.ReactiveFormsModule,
|
|
834
|
-
i3.SkyI18nModule,
|
|
835
|
-
i1$4.SkyInputBoxModule,
|
|
836
|
-
i1$1.SkyLookupModule,
|
|
837
|
-
]] });
|
|
838
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, decorators: [{
|
|
839
|
-
type: i0.NgModule,
|
|
840
|
-
args: [{
|
|
841
|
-
declarations: [SkyAgGridCellEditorLookupComponent],
|
|
842
|
-
exports: [SkyAgGridCellEditorLookupComponent],
|
|
843
|
-
imports: [
|
|
844
|
-
i3$1.CommonModule,
|
|
845
|
-
i1$2.ReactiveFormsModule,
|
|
846
|
-
i3.SkyI18nModule,
|
|
847
|
-
i1$4.SkyInputBoxModule,
|
|
848
|
-
i1$1.SkyLookupModule,
|
|
849
|
-
],
|
|
850
|
-
}]
|
|
851
|
-
}] });
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
* @internal
|
|
855
|
-
*/
|
|
856
|
-
var SkyAgGridCellEditorNumberComponent = /** @class */ (function () {
|
|
857
|
-
function SkyAgGridCellEditorNumberComponent() {
|
|
858
|
-
}
|
|
859
|
-
/**
|
|
860
|
-
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
861
|
-
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
862
|
-
*/
|
|
863
|
-
SkyAgGridCellEditorNumberComponent.prototype.agInit = function (params) {
|
|
864
|
-
this.params = params;
|
|
865
|
-
this.value = this.params.value;
|
|
866
|
-
this.columnHeader = this.params.colDef.headerName;
|
|
867
|
-
this.rowNumber = this.params.rowIndex + 1;
|
|
868
|
-
this.columnWidth = this.params.column.getActualWidth();
|
|
869
|
-
this.rowHeightWithoutBorders =
|
|
870
|
-
this.params.node && this.params.node.rowHeight - 4;
|
|
871
|
-
};
|
|
872
|
-
/**
|
|
873
|
-
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
874
|
-
*/
|
|
875
|
-
SkyAgGridCellEditorNumberComponent.prototype.afterGuiAttached = function () {
|
|
876
|
-
this.input.nativeElement.focus();
|
|
970
|
+
var rowDeleteContents = this.rowDeleteContents[id];
|
|
971
|
+
/* sanity check */
|
|
972
|
+
/* istanbul ignore else */
|
|
973
|
+
if (rowDeleteContents) {
|
|
974
|
+
rowDeleteContents.affixer.destroy();
|
|
975
|
+
this.overlayService.close(rowDeleteContents.overlay);
|
|
976
|
+
delete this.rowDeleteContents[id];
|
|
977
|
+
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(function (config) { return config.id !== id; });
|
|
978
|
+
this._rowDeleteIds = (_a = this.rowDeleteIds) === null || _a === void 0 ? void 0 : _a.filter(function (arrayId) { return arrayId !== id; });
|
|
979
|
+
this.rowDeleteIdsChange.emit(this._rowDeleteIds);
|
|
980
|
+
}
|
|
877
981
|
};
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
982
|
+
SkyAgGridRowDeleteDirective.prototype.updateRowDeleteStates = function () {
|
|
983
|
+
var _this = this;
|
|
984
|
+
this.rowDeleteConfigs.forEach(function (config) {
|
|
985
|
+
if (!_this.agGrid.api.getRowNode(config.id)) {
|
|
986
|
+
_this.destroyRowDelete(config.id);
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
// We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
|
|
990
|
+
// to is destroyed.
|
|
991
|
+
_this.affixToRow(_this.rowDeleteContents[config.id].affixer, config.id);
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
this.changeDetector.markForCheck();
|
|
883
995
|
};
|
|
884
|
-
return
|
|
996
|
+
return SkyAgGridRowDeleteDirective;
|
|
885
997
|
}());
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
889
|
-
type: i0.
|
|
998
|
+
SkyAgGridRowDeleteDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridRowDeleteDirective, deps: [{ token: i1__namespace.SkyAffixService }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ComponentFactoryResolver }, { token: i1__namespace.SkyOverlayService }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
999
|
+
SkyAgGridRowDeleteDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridRowDeleteDirective, selector: "[skyAgGridRowDelete]", inputs: { rowDeleteIds: "rowDeleteIds" }, outputs: { rowDeleteCancel: "rowDeleteCancel", rowDeleteConfirm: "rowDeleteConfirm", rowDeleteIdsChange: "rowDeleteIdsChange" }, queries: [{ propertyName: "agGrid", first: true, predicate: agGridAngular.AgGridAngular, descendants: true }], ngImport: i0__namespace });
|
|
1000
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridRowDeleteDirective, decorators: [{
|
|
1001
|
+
type: i0.Directive,
|
|
890
1002
|
args: [{
|
|
891
|
-
selector: '
|
|
892
|
-
template: "<input\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n #skyCellEditorNumber\n/>\n",
|
|
893
|
-
styles: ["input{border:none;text-align:right}\n"],
|
|
894
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1003
|
+
selector: '[skyAgGridRowDelete]',
|
|
895
1004
|
}]
|
|
896
|
-
}], propDecorators: {
|
|
897
|
-
type: i0.
|
|
898
|
-
|
|
1005
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.SkyAffixService }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ComponentFactoryResolver }, { type: i1__namespace.SkyOverlayService }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { rowDeleteIds: [{
|
|
1006
|
+
type: i0.Input
|
|
1007
|
+
}], rowDeleteCancel: [{
|
|
1008
|
+
type: i0.Output
|
|
1009
|
+
}], rowDeleteConfirm: [{
|
|
1010
|
+
type: i0.Output
|
|
1011
|
+
}], rowDeleteIdsChange: [{
|
|
1012
|
+
type: i0.Output
|
|
1013
|
+
}], agGrid: [{
|
|
1014
|
+
type: i0.ContentChild,
|
|
1015
|
+
args: [agGridAngular.AgGridAngular]
|
|
899
1016
|
}] } });
|
|
900
1017
|
|
|
901
|
-
var SkyAgGridCellEditorNumberModule = /** @class */ (function () {
|
|
902
|
-
function SkyAgGridCellEditorNumberModule() {
|
|
903
|
-
}
|
|
904
|
-
return SkyAgGridCellEditorNumberModule;
|
|
905
|
-
}());
|
|
906
|
-
SkyAgGridCellEditorNumberModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
907
|
-
SkyAgGridCellEditorNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [AgGridResourcesModule, i1$2.FormsModule], exports: [SkyAgGridCellEditorNumberComponent] });
|
|
908
|
-
SkyAgGridCellEditorNumberModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, imports: [[AgGridResourcesModule, i1$2.FormsModule]] });
|
|
909
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, decorators: [{
|
|
910
|
-
type: i0.NgModule,
|
|
911
|
-
args: [{
|
|
912
|
-
imports: [AgGridResourcesModule, i1$2.FormsModule],
|
|
913
|
-
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
914
|
-
exports: [SkyAgGridCellEditorNumberComponent],
|
|
915
|
-
}]
|
|
916
|
-
}] });
|
|
917
|
-
|
|
918
1018
|
/**
|
|
919
1019
|
* @internal
|
|
920
1020
|
*/
|
|
921
|
-
var
|
|
922
|
-
function
|
|
1021
|
+
var SkyAgGridCellEditorAutocompleteComponent = /** @class */ (function () {
|
|
1022
|
+
function SkyAgGridCellEditorAutocompleteComponent() {
|
|
1023
|
+
this.skyComponentProperties = {};
|
|
923
1024
|
}
|
|
924
|
-
|
|
925
|
-
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
926
|
-
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
927
|
-
*/
|
|
928
|
-
SkyAgGridCellEditorTextComponent.prototype.agInit = function (params) {
|
|
1025
|
+
SkyAgGridCellEditorAutocompleteComponent.prototype.agInit = function (params) {
|
|
929
1026
|
this.params = params;
|
|
930
|
-
this.
|
|
931
|
-
this.columnHeader = this.params.colDef.headerName;
|
|
1027
|
+
this.currentSelection = this.params.value;
|
|
1028
|
+
this.columnHeader = this.params.colDef && this.params.colDef.headerName;
|
|
932
1029
|
this.rowNumber = this.params.rowIndex + 1;
|
|
933
|
-
this.
|
|
934
|
-
this.rowHeightWithoutBorders =
|
|
935
|
-
this.params.node && this.params.node.rowHeight - 4;
|
|
1030
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
936
1031
|
};
|
|
937
|
-
|
|
938
|
-
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
939
|
-
*/
|
|
940
|
-
SkyAgGridCellEditorTextComponent.prototype.afterGuiAttached = function () {
|
|
1032
|
+
SkyAgGridCellEditorAutocompleteComponent.prototype.afterGuiAttached = function () {
|
|
941
1033
|
this.input.nativeElement.focus();
|
|
942
1034
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
*/
|
|
946
|
-
SkyAgGridCellEditorTextComponent.prototype.getValue = function () {
|
|
947
|
-
return this.value;
|
|
1035
|
+
SkyAgGridCellEditorAutocompleteComponent.prototype.getValue = function () {
|
|
1036
|
+
return this.currentSelection;
|
|
948
1037
|
};
|
|
949
|
-
return
|
|
1038
|
+
return SkyAgGridCellEditorAutocompleteComponent;
|
|
950
1039
|
}());
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1040
|
+
SkyAgGridCellEditorAutocompleteComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1041
|
+
SkyAgGridCellEditorAutocompleteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorAutocompleteComponent, selector: "sky-ag-grid-cell-editor-autocomplete", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorAutocomplete"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div class=\"sky-ag-grid-cell-editor-autocomplete\">\n <sky-autocomplete\n [data]=\"skyComponentProperties.data\"\n [debounceTime]=\"skyComponentProperties.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties.descriptorProperty\"\n [propertiesToSearch]=\"skyComponentProperties.propertiesToSearch\"\n [search]=\"skyComponentProperties.search\"\n [searchFilters]=\"skyComponentProperties.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties.searchTextMinimumCharacters\n \"\n (selectionChange)=\"\n skyComponentProperties.selectionChange &&\n skyComponentProperties.selectionChange($event)\n \"\n >\n <input\n skyAutocomplete\n #skyCellEditorAutocomplete\n type=\"text\"\n [(ngModel)]=\"currentSelection\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_autocomplete_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n />\n </sky-autocomplete>\n</div>\n", styles: ["sky-autocomplete input{border:none;box-shadow:none}\n"], components: [{ type: i1__namespace$3.λ2, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync"] }], directives: [{ type: i1__namespace$3.λ1, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1042
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteComponent, decorators: [{
|
|
954
1043
|
type: i0.Component,
|
|
955
1044
|
args: [{
|
|
956
|
-
selector: 'sky-ag-grid-cell-editor-
|
|
957
|
-
template: "<
|
|
958
|
-
styles: ["input{border:none;
|
|
1045
|
+
selector: 'sky-ag-grid-cell-editor-autocomplete',
|
|
1046
|
+
template: "<div class=\"sky-ag-grid-cell-editor-autocomplete\">\n <sky-autocomplete\n [data]=\"skyComponentProperties.data\"\n [debounceTime]=\"skyComponentProperties.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties.descriptorProperty\"\n [propertiesToSearch]=\"skyComponentProperties.propertiesToSearch\"\n [search]=\"skyComponentProperties.search\"\n [searchFilters]=\"skyComponentProperties.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties.searchTextMinimumCharacters\n \"\n (selectionChange)=\"\n skyComponentProperties.selectionChange &&\n skyComponentProperties.selectionChange($event)\n \"\n >\n <input\n skyAutocomplete\n #skyCellEditorAutocomplete\n type=\"text\"\n [(ngModel)]=\"currentSelection\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_autocomplete_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n />\n </sky-autocomplete>\n</div>\n",
|
|
1047
|
+
styles: ["sky-autocomplete input{border:none;box-shadow:none}\n"],
|
|
959
1048
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
960
1049
|
}]
|
|
961
1050
|
}], propDecorators: { input: [{
|
|
962
1051
|
type: i0.ViewChild,
|
|
963
|
-
args: ['
|
|
1052
|
+
args: ['skyCellEditorAutocomplete', { read: i0.ElementRef }]
|
|
964
1053
|
}] } });
|
|
965
1054
|
|
|
966
|
-
|
|
967
|
-
|
|
1055
|
+
/**
|
|
1056
|
+
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
1057
|
+
* The contents of this file were automatically generated by
|
|
1058
|
+
* the 'ng generate @skyux/i18n:lib-resources-module modules/shared/ag-grid' schematic.
|
|
1059
|
+
* To update this file, simply rerun the command.
|
|
1060
|
+
*/
|
|
1061
|
+
var RESOURCES = {
|
|
1062
|
+
'EN-US': {
|
|
1063
|
+
sky_ag_grid_row_selector_aria_label: {
|
|
1064
|
+
message: 'Row selector for row {0}',
|
|
1065
|
+
},
|
|
1066
|
+
sky_ag_grid_cell_editor_number_aria_label: {
|
|
1067
|
+
message: 'Editable number {0} for row {1}',
|
|
1068
|
+
},
|
|
1069
|
+
sky_ag_grid_cell_editor_text_aria_label: {
|
|
1070
|
+
message: 'Editable text {0} for row {1}',
|
|
1071
|
+
},
|
|
1072
|
+
sky_ag_grid_cell_editor_autocomplete_aria_label: {
|
|
1073
|
+
message: 'Editable autocomplete {0} for row {1}',
|
|
1074
|
+
},
|
|
1075
|
+
sky_ag_grid_cell_renderer_currency_aria_label: {
|
|
1076
|
+
message: 'Editable currency {0} for row {1}',
|
|
1077
|
+
},
|
|
1078
|
+
sky_ag_grid_cell_renderer_number_validator_message: {
|
|
1079
|
+
message: 'Please enter a valid number',
|
|
1080
|
+
},
|
|
1081
|
+
sky_ag_grid_cell_renderer_currency_validator_message: {
|
|
1082
|
+
message: 'Please enter a valid currency',
|
|
1083
|
+
},
|
|
1084
|
+
skyux_lookup_tokens_summary: { message: '{0} items selected' },
|
|
1085
|
+
},
|
|
1086
|
+
};
|
|
1087
|
+
var AgGridResourcesProvider = /** @class */ (function () {
|
|
1088
|
+
function AgGridResourcesProvider() {
|
|
968
1089
|
}
|
|
969
|
-
|
|
1090
|
+
AgGridResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
1091
|
+
return i3$1.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
1092
|
+
};
|
|
1093
|
+
return AgGridResourcesProvider;
|
|
970
1094
|
}());
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1095
|
+
/**
|
|
1096
|
+
* Import into any component library module that needs to use resource strings.
|
|
1097
|
+
*/
|
|
1098
|
+
var AgGridResourcesModule = /** @class */ (function () {
|
|
1099
|
+
function AgGridResourcesModule() {
|
|
1100
|
+
}
|
|
1101
|
+
return AgGridResourcesModule;
|
|
1102
|
+
}());
|
|
1103
|
+
AgGridResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AgGridResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1104
|
+
AgGridResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AgGridResourcesModule, exports: [i3$1.SkyI18nModule] });
|
|
1105
|
+
AgGridResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AgGridResourcesModule, providers: [
|
|
1106
|
+
{
|
|
1107
|
+
provide: i3$1.SKY_LIB_RESOURCES_PROVIDERS,
|
|
1108
|
+
useClass: AgGridResourcesProvider,
|
|
1109
|
+
multi: true,
|
|
1110
|
+
},
|
|
1111
|
+
], imports: [i3$1.SkyI18nModule] });
|
|
1112
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AgGridResourcesModule, decorators: [{
|
|
975
1113
|
type: i0.NgModule,
|
|
976
1114
|
args: [{
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
1115
|
+
exports: [i3$1.SkyI18nModule],
|
|
1116
|
+
providers: [
|
|
1117
|
+
{
|
|
1118
|
+
provide: i3$1.SKY_LIB_RESOURCES_PROVIDERS,
|
|
1119
|
+
useClass: AgGridResourcesProvider,
|
|
1120
|
+
multi: true,
|
|
1121
|
+
},
|
|
1122
|
+
],
|
|
980
1123
|
}]
|
|
981
1124
|
}] });
|
|
982
1125
|
|
|
983
|
-
/**
|
|
984
|
-
|
|
985
|
-
*/
|
|
986
|
-
var SkyAgGridCellValidatorTooltipComponent = /** @class */ (function () {
|
|
987
|
-
function SkyAgGridCellValidatorTooltipComponent(changeDetector, zone) {
|
|
988
|
-
this.changeDetector = changeDetector;
|
|
989
|
-
this.zone = zone;
|
|
990
|
-
this.indicatorShouldShow = true;
|
|
991
|
-
this.popoverMessageStream = new rxjs.Subject();
|
|
1126
|
+
var SkyAgGridCellEditorAutocompleteModule = /** @class */ (function () {
|
|
1127
|
+
function SkyAgGridCellEditorAutocompleteModule() {
|
|
992
1128
|
}
|
|
993
|
-
|
|
994
|
-
set: function (value) {
|
|
995
|
-
var _this = this;
|
|
996
|
-
var _a, _b, _c, _d, _e;
|
|
997
|
-
this.cellRendererParams = value;
|
|
998
|
-
/*istanbul ignore next*/
|
|
999
|
-
(_a = this.cellRendererParams.api) === null || _a === void 0 ? void 0 : _a.addEventListener(agGridCommunity.Events.EVENT_CELL_FOCUSED, function (eventParams) {
|
|
1000
|
-
// We want to close any popovers that are opened when other cells are focused, but open a popover if the current cell is focused.
|
|
1001
|
-
if (eventParams.column.getColId() !==
|
|
1002
|
-
_this.cellRendererParams.column.getColId() ||
|
|
1003
|
-
eventParams.rowIndex !== _this.cellRendererParams.rowIndex) {
|
|
1004
|
-
_this.hidePopover();
|
|
1005
|
-
}
|
|
1006
|
-
});
|
|
1007
|
-
/*istanbul ignore next*/
|
|
1008
|
-
(_b = this.cellRendererParams.eGridCell) === null || _b === void 0 ? void 0 : _b.addEventListener('keyup', function (event) {
|
|
1009
|
-
if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
|
|
1010
|
-
_this.showPopover();
|
|
1011
|
-
}
|
|
1012
|
-
});
|
|
1013
|
-
/*istanbul ignore next*/
|
|
1014
|
-
(_c = this.cellRendererParams.api) === null || _c === void 0 ? void 0 : _c.addEventListener(agGridCommunity.Events.EVENT_CELL_EDITING_STARTED, function () {
|
|
1015
|
-
_this.hidePopover();
|
|
1016
|
-
});
|
|
1017
|
-
if (typeof ((_d = this.cellRendererParams.skyComponentProperties) === null || _d === void 0 ? void 0 : _d.validatorMessage) === 'function') {
|
|
1018
|
-
this.validatorMessage =
|
|
1019
|
-
this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
|
|
1020
|
-
}
|
|
1021
|
-
else {
|
|
1022
|
-
this.validatorMessage =
|
|
1023
|
-
(_e = this.cellRendererParams.skyComponentProperties) === null || _e === void 0 ? void 0 : _e.validatorMessage;
|
|
1024
|
-
}
|
|
1025
|
-
this.changeDetector.markForCheck();
|
|
1026
|
-
},
|
|
1027
|
-
enumerable: false,
|
|
1028
|
-
configurable: true
|
|
1029
|
-
});
|
|
1030
|
-
SkyAgGridCellValidatorTooltipComponent.prototype.hideIndicator = function () {
|
|
1031
|
-
var _this = this;
|
|
1032
|
-
this.zone.run(function () {
|
|
1033
|
-
_this.indicatorShouldShow = false;
|
|
1034
|
-
_this.changeDetector.detectChanges();
|
|
1035
|
-
});
|
|
1036
|
-
};
|
|
1037
|
-
SkyAgGridCellValidatorTooltipComponent.prototype.hidePopover = function () {
|
|
1038
|
-
this.popoverMessageStream.next({ type: i2$1.SkyPopoverMessageType.Close });
|
|
1039
|
-
};
|
|
1040
|
-
SkyAgGridCellValidatorTooltipComponent.prototype.showIndicator = function () {
|
|
1041
|
-
var _this = this;
|
|
1042
|
-
this.zone.run(function () {
|
|
1043
|
-
_this.indicatorShouldShow = true;
|
|
1044
|
-
_this.changeDetector.detectChanges();
|
|
1045
|
-
});
|
|
1046
|
-
};
|
|
1047
|
-
SkyAgGridCellValidatorTooltipComponent.prototype.showPopover = function () {
|
|
1048
|
-
this.popoverMessageStream.next({ type: i2$1.SkyPopoverMessageType.Open });
|
|
1049
|
-
};
|
|
1050
|
-
return SkyAgGridCellValidatorTooltipComponent;
|
|
1129
|
+
return SkyAgGridCellEditorAutocompleteModule;
|
|
1051
1130
|
}());
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
i0__namespace.ɵɵ
|
|
1055
|
-
|
|
1131
|
+
SkyAgGridCellEditorAutocompleteModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1132
|
+
SkyAgGridCellEditorAutocompleteModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, declarations: [SkyAgGridCellEditorAutocompleteComponent], imports: [i1$4.FormsModule, AgGridResourcesModule, i1$3.SkyAutocompleteModule], exports: [SkyAgGridCellEditorAutocompleteComponent] });
|
|
1133
|
+
SkyAgGridCellEditorAutocompleteModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, imports: [[i1$4.FormsModule, AgGridResourcesModule, i1$3.SkyAutocompleteModule]] });
|
|
1134
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorAutocompleteModule, decorators: [{
|
|
1135
|
+
type: i0.NgModule,
|
|
1056
1136
|
args: [{
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1137
|
+
imports: [i1$4.FormsModule, AgGridResourcesModule, i1$3.SkyAutocompleteModule],
|
|
1138
|
+
declarations: [SkyAgGridCellEditorAutocompleteComponent],
|
|
1139
|
+
exports: [SkyAgGridCellEditorAutocompleteComponent],
|
|
1061
1140
|
}]
|
|
1062
|
-
}]
|
|
1063
|
-
type: i0.Input
|
|
1064
|
-
}] } });
|
|
1141
|
+
}] });
|
|
1065
1142
|
|
|
1066
1143
|
/**
|
|
1067
1144
|
* @internal
|
|
1068
1145
|
*/
|
|
1069
|
-
var
|
|
1070
|
-
function
|
|
1146
|
+
var SkyAgGridCellEditorCurrencyComponent = /** @class */ (function () {
|
|
1147
|
+
function SkyAgGridCellEditorCurrencyComponent() {
|
|
1071
1148
|
this.skyComponentProperties = {};
|
|
1072
|
-
this.numericOptions = {};
|
|
1073
1149
|
}
|
|
1074
|
-
Object.defineProperty(SkyAgGridCellRendererCurrencyComponent.prototype, "params", {
|
|
1075
|
-
set: function (value) {
|
|
1076
|
-
this.agInit(value);
|
|
1077
|
-
},
|
|
1078
|
-
enumerable: false,
|
|
1079
|
-
configurable: true
|
|
1080
|
-
});
|
|
1081
1150
|
/**
|
|
1082
|
-
* agInit is called by agGrid once after the
|
|
1083
|
-
* @param params The cell
|
|
1151
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1152
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1084
1153
|
*/
|
|
1085
|
-
|
|
1086
|
-
this.
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
SkyAgGridCellRendererCurrencyComponent.prototype.updateProperties = function (params) {
|
|
1092
|
-
var _a;
|
|
1093
|
-
this._params = params;
|
|
1094
|
-
this.value = this._params.value;
|
|
1095
|
-
this.columnHeader = this._params.colDef && this._params.colDef.headerName;
|
|
1096
|
-
this.rowNumber = this._params.rowIndex + 1;
|
|
1097
|
-
this.columnWidth = (_a = this._params.column) === null || _a === void 0 ? void 0 : _a.getActualWidth();
|
|
1154
|
+
SkyAgGridCellEditorCurrencyComponent.prototype.agInit = function (params) {
|
|
1155
|
+
this.params = params;
|
|
1156
|
+
this.value = this.params.value;
|
|
1157
|
+
this.columnHeader = this.params.colDef.headerName;
|
|
1158
|
+
this.rowNumber = this.params.rowIndex + 1;
|
|
1159
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
1098
1160
|
this.rowHeightWithoutBorders =
|
|
1099
|
-
this.
|
|
1100
|
-
this.skyComponentProperties = this.
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1161
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
1162
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {
|
|
1163
|
+
decimalPlaces: 2,
|
|
1164
|
+
currencySymbol: '$',
|
|
1165
|
+
};
|
|
1104
1166
|
};
|
|
1105
|
-
return SkyAgGridCellRendererCurrencyComponent;
|
|
1106
|
-
}());
|
|
1107
|
-
SkyAgGridCellRendererCurrencyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1108
|
-
SkyAgGridCellRendererCurrencyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0__namespace, template: "<span\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_renderer_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe, "skyNumeric": i1__namespace.SkyNumericPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1109
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
|
|
1110
|
-
type: i0.Component,
|
|
1111
|
-
args: [{
|
|
1112
|
-
selector: 'sky-ag-grid-cell-renderer-currency',
|
|
1113
|
-
template: "<span\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_renderer_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n",
|
|
1114
|
-
styles: ["input{border:none;padding-left:11px}\n"],
|
|
1115
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1116
|
-
}]
|
|
1117
|
-
}], propDecorators: { params: [{
|
|
1118
|
-
type: i0.Input
|
|
1119
|
-
}] } });
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
* @internal
|
|
1123
|
-
*/
|
|
1124
|
-
var SkyAgGridCellRendererCurrencyValidatorComponent = /** @class */ (function () {
|
|
1125
|
-
function SkyAgGridCellRendererCurrencyValidatorComponent(changeDetector) {
|
|
1126
|
-
this.changeDetector = changeDetector;
|
|
1127
|
-
}
|
|
1128
|
-
Object.defineProperty(SkyAgGridCellRendererCurrencyValidatorComponent.prototype, "parameters", {
|
|
1129
|
-
set: function (value) {
|
|
1130
|
-
this.agInit(value);
|
|
1131
|
-
},
|
|
1132
|
-
enumerable: false,
|
|
1133
|
-
configurable: true
|
|
1134
|
-
});
|
|
1135
1167
|
/**
|
|
1136
|
-
*
|
|
1137
|
-
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1168
|
+
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
1138
1169
|
*/
|
|
1139
|
-
|
|
1140
|
-
this.
|
|
1141
|
-
this.changeDetector.markForCheck();
|
|
1142
|
-
};
|
|
1143
|
-
SkyAgGridCellRendererCurrencyValidatorComponent.prototype.isNumeric = function (value) {
|
|
1144
|
-
return !isNaN(parseFloat(value));
|
|
1170
|
+
SkyAgGridCellEditorCurrencyComponent.prototype.afterGuiAttached = function () {
|
|
1171
|
+
this.input.nativeElement.focus();
|
|
1145
1172
|
};
|
|
1146
|
-
|
|
1147
|
-
|
|
1173
|
+
/**
|
|
1174
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1175
|
+
*/
|
|
1176
|
+
SkyAgGridCellEditorCurrencyComponent.prototype.getValue = function () {
|
|
1177
|
+
return this.value;
|
|
1148
1178
|
};
|
|
1149
|
-
return
|
|
1179
|
+
return SkyAgGridCellEditorCurrencyComponent;
|
|
1150
1180
|
}());
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1181
|
+
SkyAgGridCellEditorCurrencyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorCurrencyComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1182
|
+
SkyAgGridCellEditorCurrencyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<input\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n [skyAutonumeric]=\"skyComponentProperties\"\n #skyCellEditorCurrency\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1183
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorCurrencyComponent, decorators: [{
|
|
1154
1184
|
type: i0.Component,
|
|
1155
1185
|
args: [{
|
|
1156
|
-
selector: 'sky-ag-grid-cell-
|
|
1157
|
-
template: "<
|
|
1186
|
+
selector: 'sky-ag-grid-cell-editor-currency',
|
|
1187
|
+
template: "<input\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n [skyAutonumeric]=\"skyComponentProperties\"\n #skyCellEditorCurrency\n/>\n",
|
|
1188
|
+
styles: ["input{border:none;padding-left:11px}\n"],
|
|
1158
1189
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1159
1190
|
}]
|
|
1160
|
-
}],
|
|
1161
|
-
type: i0.
|
|
1191
|
+
}], propDecorators: { input: [{
|
|
1192
|
+
type: i0.ViewChild,
|
|
1193
|
+
args: ['skyCellEditorCurrency', { read: i0.ElementRef }]
|
|
1162
1194
|
}] } });
|
|
1163
1195
|
|
|
1164
|
-
var
|
|
1165
|
-
function
|
|
1166
|
-
this.changeDetector = changeDetector;
|
|
1167
|
-
this.value = '';
|
|
1168
|
-
this.summaryCount = 0;
|
|
1169
|
-
}
|
|
1170
|
-
SkyAgGridCellRendererLookupComponent.prototype.agInit = function (params) {
|
|
1171
|
-
var _a;
|
|
1172
|
-
this.lookupProperties = applySkyLookupPropertiesDefaults(params);
|
|
1173
|
-
this.summaryCount = ((_a = params.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
1174
|
-
this.value = "" + params.valueFormatted;
|
|
1175
|
-
this.changeDetector.markForCheck();
|
|
1176
|
-
};
|
|
1177
|
-
SkyAgGridCellRendererLookupComponent.prototype.refresh = function (params) {
|
|
1178
|
-
this.agInit(params);
|
|
1179
|
-
return true;
|
|
1180
|
-
};
|
|
1181
|
-
return SkyAgGridCellRendererLookupComponent;
|
|
1182
|
-
}());
|
|
1183
|
-
SkyAgGridCellRendererLookupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1184
|
-
SkyAgGridCellRendererLookupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererLookupComponent, selector: "sky-cell-renderer-lookup", ngImport: i0__namespace, template: "<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources: summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n", styles: [":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], directives: [{ type: i3__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1185
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupComponent, decorators: [{
|
|
1186
|
-
type: i0.Component,
|
|
1187
|
-
args: [{
|
|
1188
|
-
selector: 'sky-cell-renderer-lookup',
|
|
1189
|
-
template: "<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources: summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n",
|
|
1190
|
-
styles: [":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"],
|
|
1191
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1192
|
-
}]
|
|
1193
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; } });
|
|
1194
|
-
|
|
1195
|
-
var SkyAgGridCellRendererLookupModule = /** @class */ (function () {
|
|
1196
|
-
function SkyAgGridCellRendererLookupModule() {
|
|
1196
|
+
var SkyAgGridCellEditorCurrencyModule = /** @class */ (function () {
|
|
1197
|
+
function SkyAgGridCellEditorCurrencyModule() {
|
|
1197
1198
|
}
|
|
1198
|
-
return
|
|
1199
|
+
return SkyAgGridCellEditorCurrencyModule;
|
|
1199
1200
|
}());
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1201
|
+
SkyAgGridCellEditorCurrencyModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorCurrencyModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1202
|
+
SkyAgGridCellEditorCurrencyModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorCurrencyModule, declarations: [SkyAgGridCellEditorCurrencyComponent], imports: [AgGridResourcesModule, i1$4.FormsModule, i2.SkyAutonumericModule], exports: [SkyAgGridCellEditorCurrencyComponent] });
|
|
1203
|
+
SkyAgGridCellEditorCurrencyModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorCurrencyModule, imports: [[AgGridResourcesModule, i1$4.FormsModule, i2.SkyAutonumericModule]] });
|
|
1204
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorCurrencyModule, decorators: [{
|
|
1204
1205
|
type: i0.NgModule,
|
|
1205
1206
|
args: [{
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1207
|
+
imports: [AgGridResourcesModule, i1$4.FormsModule, i2.SkyAutonumericModule],
|
|
1208
|
+
declarations: [SkyAgGridCellEditorCurrencyComponent],
|
|
1209
|
+
exports: [SkyAgGridCellEditorCurrencyComponent],
|
|
1209
1210
|
}]
|
|
1210
1211
|
}] });
|
|
1211
1212
|
|
|
1212
1213
|
/**
|
|
1213
1214
|
* @internal
|
|
1214
1215
|
*/
|
|
1215
|
-
var
|
|
1216
|
-
|
|
1217
|
-
|
|
1216
|
+
var SkyAgGridCellEditorDatepickerComponent = /** @class */ (function (_super) {
|
|
1217
|
+
__extends(SkyAgGridCellEditorDatepickerComponent, _super);
|
|
1218
|
+
function SkyAgGridCellEditorDatepickerComponent(themeSvc) {
|
|
1219
|
+
var _this = _super.call(this) || this;
|
|
1220
|
+
_this.themeSvc = themeSvc;
|
|
1221
|
+
_this.skyComponentProperties = {};
|
|
1222
|
+
return _this;
|
|
1218
1223
|
}
|
|
1219
1224
|
/**
|
|
1220
|
-
* agInit is called by agGrid once after the
|
|
1221
|
-
* @param params The cell
|
|
1225
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1226
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1222
1227
|
*/
|
|
1223
|
-
|
|
1228
|
+
SkyAgGridCellEditorDatepickerComponent.prototype.agInit = function (params) {
|
|
1224
1229
|
var _this = this;
|
|
1230
|
+
var _a;
|
|
1225
1231
|
this.params = params;
|
|
1226
|
-
this.
|
|
1227
|
-
this.
|
|
1228
|
-
this.
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
this.
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1232
|
+
this.currentDate = this.params.value;
|
|
1233
|
+
this.skyComponentProperties = this.params.skyComponentProperties || {};
|
|
1234
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
1235
|
+
this.columnWidthWithoutBorders = this.columnWidth - 2;
|
|
1236
|
+
this.rowHeightWithoutBorders =
|
|
1237
|
+
this.params.node && this.params.node.rowHeight - 3;
|
|
1238
|
+
(_a = this.themeSvc) === null || _a === void 0 ? void 0 : _a.settingsChange.subscribe(function (themeSettings) {
|
|
1239
|
+
if (themeSettings.currentSettings.theme.name === 'modern') {
|
|
1240
|
+
_this.columnWidthWithoutBorders = _this.columnWidth;
|
|
1241
|
+
_this.rowHeightWithoutBorders =
|
|
1242
|
+
_this.params.node && _this.params.node.rowHeight;
|
|
1243
|
+
}
|
|
1244
|
+
else {
|
|
1245
|
+
_this.columnWidthWithoutBorders = _this.columnWidth - 2;
|
|
1246
|
+
_this.rowHeightWithoutBorders =
|
|
1247
|
+
_this.params.node && _this.params.node.rowHeight - 3;
|
|
1248
|
+
}
|
|
1238
1249
|
});
|
|
1239
1250
|
};
|
|
1240
1251
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
* successful, or false if the cell should be destroyed and rerendered. If consumers have external logic that changes the value of a
|
|
1243
|
-
* checkbox cell, rerendering it will gurantee the change applies without knowing the consumer's implementation.
|
|
1252
|
+
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
1244
1253
|
*/
|
|
1245
|
-
|
|
1246
|
-
|
|
1254
|
+
SkyAgGridCellEditorDatepickerComponent.prototype.afterGuiAttached = function () {
|
|
1255
|
+
this.focusOnDatepickerInput();
|
|
1247
1256
|
};
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1257
|
+
/**
|
|
1258
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1259
|
+
*/
|
|
1260
|
+
SkyAgGridCellEditorDatepickerComponent.prototype.getValue = function () {
|
|
1261
|
+
this.datepickerInput.nativeElement.blur();
|
|
1262
|
+
return this.currentDate;
|
|
1253
1263
|
};
|
|
1254
|
-
|
|
1255
|
-
this.
|
|
1256
|
-
if (this.dataField) {
|
|
1257
|
-
this.rowNode.data[this.dataField] = this.checked;
|
|
1258
|
-
}
|
|
1259
|
-
this.changeDetection.markForCheck();
|
|
1264
|
+
SkyAgGridCellEditorDatepickerComponent.prototype.focusOnDatepickerInput = function () {
|
|
1265
|
+
this.datepickerInput.nativeElement.focus();
|
|
1260
1266
|
};
|
|
1261
|
-
return
|
|
1262
|
-
}());
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1267
|
+
return SkyAgGridCellEditorDatepickerComponent;
|
|
1268
|
+
}(agGridCommunity.PopupComponent));
|
|
1269
|
+
SkyAgGridCellEditorDatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerComponent, deps: [{ token: i1__namespace$5.SkyThemeService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1270
|
+
SkyAgGridCellEditorDatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorDatepickerComponent, selector: "sky-ag-grid-cell-editor-datepicker", viewQueries: [{ propertyName: "datepickerInput", first: true, predicate: ["skyCellEditorDatepickerInput"], descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"sky-ag-grid-cell-editor-datepicker\"\n [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n skyDatepickerInput\n [disabled]=\"skyComponentProperties.disabled\"\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"currentDate\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n", styles: [".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}\n"], components: [{ type: i2__namespace$1.λ2, selector: "sky-datepicker", inputs: ["pickerClass"], outputs: ["calendarDateRangeChange"] }], directives: [{ type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace$1.λ3, selector: "[skyDatepickerInput]", inputs: ["dateFormat", "disabled", "maxDate", "minDate", "skyDatepickerInput", "skyDatepickerNoValidate", "startingDay", "strict"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1271
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerComponent, decorators: [{
|
|
1266
1272
|
type: i0.Component,
|
|
1267
1273
|
args: [{
|
|
1268
|
-
selector: 'sky-ag-grid-cell-
|
|
1269
|
-
template: "<sky-
|
|
1270
|
-
styles: [".sky-ag-grid-cell-
|
|
1274
|
+
selector: 'sky-ag-grid-cell-editor-datepicker',
|
|
1275
|
+
template: "<div\n class=\"sky-ag-grid-cell-editor-datepicker\"\n [style.width.px]=\"columnWidthWithoutBorders\"\n>\n <sky-datepicker\n data-sky-id=\"cell-datepicker\"\n pickerClass=\"ag-custom-component-popup\"\n >\n <input\n skyDatepickerInput\n [disabled]=\"skyComponentProperties.disabled\"\n [minDate]=\"skyComponentProperties.minDate\"\n [maxDate]=\"skyComponentProperties.maxDate\"\n [dateFormat]=\"skyComponentProperties.dateFormat\"\n [startingDay]=\"skyComponentProperties.startingDay\"\n [skyDatepickerNoValidate]=\"skyComponentProperties.skyDatepickerNoValidate\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"currentDate\"\n #skyCellEditorDatepickerInput\n />\n </sky-datepicker>\n</div>\n",
|
|
1276
|
+
styles: [".sky-ag-grid-cell-editor-datepicker{position:relative;top:1px;left:1px}.sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{box-shadow:none;border-width:1px;border-style:solid;border-color:transparent #cdcfd2 transparent transparent}.sky-ag-grid-cell-editor-datepicker sky-datepicker .sky-input-group-datepicker-btn{border-radius:0}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}:host-context(.sky-theme-modern) .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker{position:static;top:initial;left:initial}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control{border-radius:0;border:1px solid #1870B8}.sky-theme-modern .sky-ag-grid-cell-editor-datepicker sky-datepicker input.sky-form-control:focus{border-width:2px!important}\n"],
|
|
1271
1277
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1272
1278
|
encapsulation: i0.ViewEncapsulation.None,
|
|
1273
1279
|
}]
|
|
1274
|
-
}], ctorParameters: function () {
|
|
1280
|
+
}], ctorParameters: function () {
|
|
1281
|
+
return [{ type: i1__namespace$5.SkyThemeService, decorators: [{
|
|
1282
|
+
type: i0.Optional
|
|
1283
|
+
}] }];
|
|
1284
|
+
}, propDecorators: { datepickerInput: [{
|
|
1285
|
+
type: i0.ViewChild,
|
|
1286
|
+
args: ['skyCellEditorDatepickerInput', { read: i0.ElementRef }]
|
|
1287
|
+
}] } });
|
|
1275
1288
|
|
|
1276
|
-
var
|
|
1277
|
-
function
|
|
1289
|
+
var SkyAgGridCellEditorDatepickerModule = /** @class */ (function () {
|
|
1290
|
+
function SkyAgGridCellEditorDatepickerModule() {
|
|
1278
1291
|
}
|
|
1279
|
-
return
|
|
1292
|
+
return SkyAgGridCellEditorDatepickerModule;
|
|
1280
1293
|
}());
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1294
|
+
SkyAgGridCellEditorDatepickerModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1295
|
+
SkyAgGridCellEditorDatepickerModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, declarations: [SkyAgGridCellEditorDatepickerComponent], imports: [i2$1.SkyDatepickerModule, i1$4.FormsModule], exports: [SkyAgGridCellEditorDatepickerComponent] });
|
|
1296
|
+
SkyAgGridCellEditorDatepickerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, imports: [[i2$1.SkyDatepickerModule, i1$4.FormsModule]] });
|
|
1297
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorDatepickerModule, decorators: [{
|
|
1285
1298
|
type: i0.NgModule,
|
|
1286
1299
|
args: [{
|
|
1287
|
-
imports: [
|
|
1288
|
-
declarations: [
|
|
1289
|
-
exports: [
|
|
1300
|
+
imports: [i2$1.SkyDatepickerModule, i1$4.FormsModule],
|
|
1301
|
+
declarations: [SkyAgGridCellEditorDatepickerComponent],
|
|
1302
|
+
exports: [SkyAgGridCellEditorDatepickerComponent],
|
|
1290
1303
|
}]
|
|
1291
1304
|
}] });
|
|
1292
1305
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1306
|
+
function applySkyLookupPropertiesDefaults(skyLookupProperties) {
|
|
1307
|
+
return {
|
|
1308
|
+
addClick: skyLookupProperties.addClick || undefined,
|
|
1309
|
+
ariaLabel: skyLookupProperties.ariaLabel || '',
|
|
1310
|
+
autocompleteAttribute: skyLookupProperties.autocompleteAttribute || 'off',
|
|
1311
|
+
data: skyLookupProperties.data || [],
|
|
1312
|
+
debounceTime: skyLookupProperties.debounceTime || 0,
|
|
1313
|
+
descriptorProperty: skyLookupProperties.descriptorProperty || 'name',
|
|
1314
|
+
disabled: skyLookupProperties.disabled || false,
|
|
1315
|
+
enableShowMore: skyLookupProperties.enableShowMore || false,
|
|
1316
|
+
idProperty: skyLookupProperties.idProperty || undefined,
|
|
1317
|
+
placeholderText: skyLookupProperties.placeholderText || '',
|
|
1318
|
+
propertiesToSearch: skyLookupProperties.propertiesToSearch || undefined,
|
|
1319
|
+
search: skyLookupProperties.search || undefined,
|
|
1320
|
+
searchAsync: skyLookupProperties.searchAsync || undefined,
|
|
1321
|
+
searchFilters: skyLookupProperties.searchFilters || [],
|
|
1322
|
+
searchResultsLimit: skyLookupProperties.searchResultsLimit || undefined,
|
|
1323
|
+
searchResultTemplate: skyLookupProperties.searchResultTemplate || undefined,
|
|
1324
|
+
searchTextMinimumCharacters: skyLookupProperties.searchTextMinimumCharacters || 1,
|
|
1325
|
+
selectMode: skyLookupProperties.selectMode || undefined,
|
|
1326
|
+
showAddButton: skyLookupProperties.showAddButton || false,
|
|
1327
|
+
showMoreConfig: skyLookupProperties.showMoreConfig || {},
|
|
1328
|
+
wrapperClass: 'ag-custom-component-popup',
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
var SkyAgGridCellEditorLookupComponent = /** @class */ (function () {
|
|
1333
|
+
function SkyAgGridCellEditorLookupComponent(changeDetector, elementRef) {
|
|
1298
1334
|
this.changeDetector = changeDetector;
|
|
1299
|
-
this.
|
|
1300
|
-
this.
|
|
1335
|
+
this.elementRef = elementRef;
|
|
1336
|
+
this.isAlive = false;
|
|
1337
|
+
this.lookupForm = new i1$4.FormGroup({
|
|
1338
|
+
currentSelection: new i1$4.FormControl({
|
|
1339
|
+
value: [],
|
|
1340
|
+
disabled: false,
|
|
1341
|
+
}),
|
|
1342
|
+
});
|
|
1343
|
+
this.useAsyncSearch = false;
|
|
1301
1344
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
this.checkForAgGrid();
|
|
1307
|
-
this.checkForSkyAgGridWrapper();
|
|
1308
|
-
this.agGridList.changes
|
|
1309
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1310
|
-
.subscribe(function () { return _this.checkForAgGrid(); });
|
|
1311
|
-
this.skyAgGridWrapperList.changes
|
|
1312
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1313
|
-
.subscribe(function () { return _this.checkForSkyAgGridWrapper(); });
|
|
1314
|
-
};
|
|
1315
|
-
SkyAgGridDataManagerAdapterDirective.prototype.ngOnDestroy = function () {
|
|
1316
|
-
this.ngUnsubscribe.next();
|
|
1317
|
-
this.ngUnsubscribe.complete();
|
|
1318
|
-
};
|
|
1319
|
-
SkyAgGridDataManagerAdapterDirective.prototype.checkForAgGrid = function () {
|
|
1320
|
-
var agGridCount = this.agGridList.length;
|
|
1321
|
-
/* istanbul ignore else */
|
|
1322
|
-
if (agGridCount === 0) {
|
|
1323
|
-
this.unregisterAgGrid();
|
|
1324
|
-
}
|
|
1325
|
-
else if (this.agGridList.first !== this.currentAgGrid) {
|
|
1326
|
-
this.registerAgGrid();
|
|
1327
|
-
}
|
|
1328
|
-
if (agGridCount > 1) {
|
|
1329
|
-
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
1330
|
-
}
|
|
1331
|
-
};
|
|
1332
|
-
SkyAgGridDataManagerAdapterDirective.prototype.checkForSkyAgGridWrapper = function () {
|
|
1333
|
-
var skyAgGridWrapperCount = this.skyAgGridWrapperList.length;
|
|
1334
|
-
/* istanbul ignore else */
|
|
1335
|
-
if (skyAgGridWrapperCount === 0) {
|
|
1336
|
-
this.unregisterSkyAgGridWrapper();
|
|
1337
|
-
}
|
|
1338
|
-
else if (this.skyAgGridWrapperList.first !== this.currentSkyAgGridWrapper) {
|
|
1339
|
-
this.registerSkyAgGridWrapper();
|
|
1340
|
-
}
|
|
1341
|
-
if (skyAgGridWrapperCount > 1) {
|
|
1342
|
-
console.warn('More than one ag-grid child component was found. Using the first ag-Grid.');
|
|
1345
|
+
SkyAgGridCellEditorLookupComponent.prototype.agInit = function (params) {
|
|
1346
|
+
this.params = params;
|
|
1347
|
+
if (!Array.isArray(this.params.value)) {
|
|
1348
|
+
throw new Error("Lookup value must be an array");
|
|
1343
1349
|
}
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
this.
|
|
1347
|
-
|
|
1348
|
-
if (this.dataStateSub) {
|
|
1349
|
-
this.dataStateSub.unsubscribe();
|
|
1350
|
+
var control = this.lookupForm.get('currentSelection');
|
|
1351
|
+
control.setValue(this.params.value);
|
|
1352
|
+
if (this.params.skyComponentProperties.disabled) {
|
|
1353
|
+
control.disable();
|
|
1350
1354
|
}
|
|
1355
|
+
this.skyComponentProperties = this.updateComponentProperties(this.params);
|
|
1356
|
+
this.useAsyncSearch =
|
|
1357
|
+
typeof this.skyComponentProperties.searchAsync === 'function';
|
|
1358
|
+
this.isAlive = true;
|
|
1359
|
+
this.changeDetector.markForCheck();
|
|
1351
1360
|
};
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
this.unregisterSkyAgGridWrapper();
|
|
1358
|
-
this.currentSkyAgGridWrapper = this.skyAgGridWrapperList.first;
|
|
1359
|
-
setTimeout(function () {
|
|
1360
|
-
if (_this.currentSkyAgGridWrapper) {
|
|
1361
|
-
_this.currentSkyAgGridWrapper.viewkeeperClasses = [];
|
|
1362
|
-
}
|
|
1363
|
-
});
|
|
1364
|
-
};
|
|
1365
|
-
SkyAgGridDataManagerAdapterDirective.prototype.registerAgGrid = function () {
|
|
1366
|
-
var _this = this;
|
|
1367
|
-
this.unregisterAgGrid();
|
|
1368
|
-
var agGrid = this.agGridList.first;
|
|
1369
|
-
this.currentAgGrid = agGrid;
|
|
1370
|
-
agGrid.gridReady.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
1371
|
-
_this.viewConfig.onSelectAllClick = _this.selectAll.bind(_this);
|
|
1372
|
-
_this.viewConfig.onClearAllClick = _this.clearAll.bind(_this);
|
|
1373
|
-
_this.dataManagerSvc.updateViewConfig(_this.viewConfig);
|
|
1374
|
-
_this.dataStateSub = _this.dataManagerSvc
|
|
1375
|
-
.getDataStateUpdates(_this.viewConfig.id)
|
|
1376
|
-
.pipe(operators.takeUntil(_this.ngUnsubscribe))
|
|
1377
|
-
.subscribe(function (dataState) {
|
|
1378
|
-
_this.currentDataState = dataState;
|
|
1379
|
-
_this.displayColumns(dataState);
|
|
1380
|
-
});
|
|
1381
|
-
agGrid.api.sizeColumnsToFit();
|
|
1382
|
-
});
|
|
1383
|
-
agGrid.columnMoved
|
|
1384
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.filter(function (event) { return ![
|
|
1385
|
-
'gridInitializing',
|
|
1386
|
-
'uiColumnResized',
|
|
1387
|
-
'uiColumnDragged',
|
|
1388
|
-
'api',
|
|
1389
|
-
].includes(event.source); }))
|
|
1390
|
-
.subscribe(function (value) {
|
|
1391
|
-
_this.updateColumnsInCurrentDataState(value.columnApi);
|
|
1392
|
-
});
|
|
1393
|
-
var currentColumns;
|
|
1394
|
-
agGrid.dragStarted
|
|
1395
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1396
|
-
.subscribe(function (value) {
|
|
1397
|
-
currentColumns = _this.getColumnOrder(value.columnApi);
|
|
1398
|
-
});
|
|
1399
|
-
agGrid.dragStopped
|
|
1400
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1401
|
-
.subscribe(function (value) {
|
|
1402
|
-
var newColumns = _this.getColumnOrder(value.columnApi);
|
|
1403
|
-
var hasChanged = currentColumns.findIndex(function (colId, i) { return colId !== newColumns[i]; });
|
|
1404
|
-
if (hasChanged > -1) {
|
|
1405
|
-
_this.updateColumnsInCurrentDataState(value.columnApi);
|
|
1406
|
-
}
|
|
1407
|
-
});
|
|
1408
|
-
agGrid.rowSelected
|
|
1409
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1410
|
-
.subscribe(function (event) {
|
|
1411
|
-
var row = event.node;
|
|
1412
|
-
var selectedIds = _this.currentDataState.selectedIds || [];
|
|
1413
|
-
var rowIndex = selectedIds.indexOf(row.data.id);
|
|
1414
|
-
if (row.isSelected() && rowIndex === -1) {
|
|
1415
|
-
selectedIds.push(row.data.id);
|
|
1416
|
-
}
|
|
1417
|
-
else if (!row.isSelected() && rowIndex !== -1) {
|
|
1418
|
-
selectedIds.splice(rowIndex, 1);
|
|
1419
|
-
}
|
|
1420
|
-
_this.currentDataState.selectedIds = selectedIds;
|
|
1421
|
-
_this.dataManagerSvc.updateDataState(_this.currentDataState, _this.viewConfig.id);
|
|
1422
|
-
_this.changeDetector.markForCheck();
|
|
1423
|
-
});
|
|
1424
|
-
agGrid.sortChanged.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
1425
|
-
var gridColumnStates = agGrid.columnApi.getColumnState();
|
|
1426
|
-
var sortOption;
|
|
1427
|
-
/* istanbul ignore else */
|
|
1428
|
-
if (gridColumnStates.length) {
|
|
1429
|
-
var activeSortColumnState_1 = gridColumnStates.find(function (aGridColumnState) { return aGridColumnState.sortIndex === 0; });
|
|
1430
|
-
var dataManagerConfig = _this.dataManagerSvc.getCurrentDataManagerConfig();
|
|
1431
|
-
/* istanbul ignore else */
|
|
1432
|
-
if (dataManagerConfig.sortOptions && activeSortColumnState_1) {
|
|
1433
|
-
sortOption = dataManagerConfig.sortOptions.find(function (option) {
|
|
1434
|
-
return (option.propertyName === activeSortColumnState_1.colId &&
|
|
1435
|
-
option.descending === (activeSortColumnState_1.sort === 'desc'));
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1438
|
-
else {
|
|
1439
|
-
sortOption = undefined;
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
_this.currentDataState.activeSortOption = sortOption;
|
|
1443
|
-
_this.dataManagerSvc.updateDataState(_this.currentDataState, _this.viewConfig.id);
|
|
1444
|
-
});
|
|
1445
|
-
};
|
|
1446
|
-
SkyAgGridDataManagerAdapterDirective.prototype.updateColumnsInCurrentDataState = function (columnApi) {
|
|
1447
|
-
var columnOrder = this.getColumnOrder(columnApi);
|
|
1448
|
-
var viewState = this.currentDataState.getViewStateById(this.viewConfig.id);
|
|
1449
|
-
viewState.displayedColumnIds = columnOrder;
|
|
1450
|
-
this.dataManagerSvc.updateDataState(this.currentDataState.addOrUpdateView(this.viewConfig.id, viewState), this.viewConfig.id);
|
|
1361
|
+
SkyAgGridCellEditorLookupComponent.prototype.isCancelAfterEnd = function () {
|
|
1362
|
+
// Shut down components to commit values before final value syncs to grid.
|
|
1363
|
+
this.isAlive = false;
|
|
1364
|
+
this.changeDetector.detectChanges();
|
|
1365
|
+
return false;
|
|
1451
1366
|
};
|
|
1452
|
-
|
|
1453
|
-
return
|
|
1454
|
-
.getAllDisplayedVirtualColumns()
|
|
1455
|
-
.map(function (col) { return col.getColDef().colId; });
|
|
1367
|
+
SkyAgGridCellEditorLookupComponent.prototype.getGui = function () {
|
|
1368
|
+
return this.elementRef.nativeElement;
|
|
1456
1369
|
};
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
var agGrid = this.currentAgGrid;
|
|
1460
|
-
var viewState = dataState.getViewStateById(this.viewConfig.id);
|
|
1461
|
-
var displayedColumnIds = [];
|
|
1462
|
-
/*istanbul ignore else*/
|
|
1463
|
-
if (viewState.displayedColumnIds) {
|
|
1464
|
-
displayedColumnIds = viewState.displayedColumnIds;
|
|
1465
|
-
}
|
|
1466
|
-
var columns = agGrid.columnApi.getAllColumns();
|
|
1467
|
-
try {
|
|
1468
|
-
for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
|
|
1469
|
-
var column = columns_1_1.value;
|
|
1470
|
-
var colId = column.getColId();
|
|
1471
|
-
var colIndex = displayedColumnIds.indexOf(colId);
|
|
1472
|
-
agGrid.columnApi.setColumnVisible(colId, colIndex !== -1);
|
|
1473
|
-
agGrid.columnApi.moveColumn(colId, colIndex);
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1477
|
-
finally {
|
|
1478
|
-
try {
|
|
1479
|
-
if (columns_1_1 && !columns_1_1.done && (_a = columns_1.return)) _a.call(columns_1);
|
|
1480
|
-
}
|
|
1481
|
-
finally { if (e_1) throw e_1.error; }
|
|
1482
|
-
}
|
|
1370
|
+
SkyAgGridCellEditorLookupComponent.prototype.getValue = function () {
|
|
1371
|
+
return this.lookupForm.get('currentSelection').value;
|
|
1483
1372
|
};
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
agGrid.api.selectAll();
|
|
1373
|
+
SkyAgGridCellEditorLookupComponent.prototype.isPopup = function () {
|
|
1374
|
+
return true;
|
|
1487
1375
|
};
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1376
|
+
/*istanbul ignore next*/
|
|
1377
|
+
SkyAgGridCellEditorLookupComponent.prototype.afterGuiAttached = function () {
|
|
1378
|
+
var _a;
|
|
1379
|
+
(_a = this.elementRef.nativeElement.querySelector('.sky-lookup-input')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1491
1380
|
};
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
type: i0.Directive,
|
|
1498
|
-
args: [{
|
|
1499
|
-
selector: '[skyAgGridDataManagerAdapter]',
|
|
1500
|
-
}]
|
|
1501
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$6.SkyDataManagerService }]; }, propDecorators: { viewId: [{
|
|
1502
|
-
type: i0.Input
|
|
1503
|
-
}], agGridList: [{
|
|
1504
|
-
type: i0.ContentChildren,
|
|
1505
|
-
args: [agGridAngular.AgGridAngular, { descendants: true }]
|
|
1506
|
-
}], skyAgGridWrapperList: [{
|
|
1507
|
-
type: i0.ContentChildren,
|
|
1508
|
-
args: [SkyAgGridWrapperComponent, { descendants: true }]
|
|
1509
|
-
}] } });
|
|
1510
|
-
|
|
1511
|
-
var SkyAgGridCellValidatorModule = /** @class */ (function () {
|
|
1512
|
-
function SkyAgGridCellValidatorModule() {
|
|
1513
|
-
}
|
|
1514
|
-
return SkyAgGridCellValidatorModule;
|
|
1381
|
+
SkyAgGridCellEditorLookupComponent.prototype.updateComponentProperties = function (params) {
|
|
1382
|
+
var skyLookupProperties = params.skyComponentProperties;
|
|
1383
|
+
return applySkyLookupPropertiesDefaults(skyLookupProperties);
|
|
1384
|
+
};
|
|
1385
|
+
return SkyAgGridCellEditorLookupComponent;
|
|
1515
1386
|
}());
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
type: i0.NgModule,
|
|
1387
|
+
SkyAgGridCellEditorLookupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1388
|
+
SkyAgGridCellEditorLookupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", ngImport: i0__namespace, template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties.searchAsync($event)\"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n", styles: [":host{display:block}\n"], components: [{ type: i1__namespace$6.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled"] }, { type: i1__namespace$3.λ4, selector: "sky-lookup", inputs: ["ariaLabel", "ariaLabelledBy", "autocompleteAttribute", "data", "disabled", "enableShowMore", "placeholderText", "idProperty", "showAddButton", "showMoreConfig", "selectMode", "wrapperClass"], outputs: ["addClick"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1389
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupComponent, decorators: [{
|
|
1390
|
+
type: i0.Component,
|
|
1521
1391
|
args: [{
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1392
|
+
selector: 'sky-ag-grid-cell-editor-lookup',
|
|
1393
|
+
template: "<sky-input-box\n *ngIf=\"isAlive && useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n (searchAsync)=\"skyComponentProperties.searchAsync($event)\"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n<sky-input-box\n *ngIf=\"isAlive && !useAsyncSearch\"\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"lookupForm\"\n>\n <sky-lookup\n [ariaLabel]=\"skyComponentProperties?.ariaLabel\"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n formControlName=\"currentSelection\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n >\n </sky-lookup>\n</sky-input-box>\n",
|
|
1394
|
+
styles: [":host{display:block}\n"],
|
|
1395
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1525
1396
|
}]
|
|
1526
|
-
}] });
|
|
1397
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }]; } });
|
|
1527
1398
|
|
|
1528
|
-
var
|
|
1529
|
-
function
|
|
1399
|
+
var SkyAgGridCellEditorLookupModule = /** @class */ (function () {
|
|
1400
|
+
function SkyAgGridCellEditorLookupModule() {
|
|
1530
1401
|
}
|
|
1531
|
-
return
|
|
1402
|
+
return SkyAgGridCellEditorLookupModule;
|
|
1532
1403
|
}());
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
i1$
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
i3$1.
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
i1$2.FormsModule,
|
|
1546
|
-
i1.SkyNumericModule,
|
|
1404
|
+
SkyAgGridCellEditorLookupModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1405
|
+
SkyAgGridCellEditorLookupModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, declarations: [SkyAgGridCellEditorLookupComponent], imports: [i3.CommonModule,
|
|
1406
|
+
i1$4.ReactiveFormsModule,
|
|
1407
|
+
i3$1.SkyI18nModule,
|
|
1408
|
+
i1$6.SkyInputBoxModule,
|
|
1409
|
+
i1$3.SkyLookupModule], exports: [SkyAgGridCellEditorLookupComponent] });
|
|
1410
|
+
SkyAgGridCellEditorLookupModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, imports: [[
|
|
1411
|
+
i3.CommonModule,
|
|
1412
|
+
i1$4.ReactiveFormsModule,
|
|
1413
|
+
i3$1.SkyI18nModule,
|
|
1414
|
+
i1$6.SkyInputBoxModule,
|
|
1415
|
+
i1$3.SkyLookupModule,
|
|
1547
1416
|
]] });
|
|
1548
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1417
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorLookupModule, decorators: [{
|
|
1549
1418
|
type: i0.NgModule,
|
|
1550
1419
|
args: [{
|
|
1420
|
+
declarations: [SkyAgGridCellEditorLookupComponent],
|
|
1421
|
+
exports: [SkyAgGridCellEditorLookupComponent],
|
|
1551
1422
|
imports: [
|
|
1552
|
-
i3
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
i1$
|
|
1556
|
-
i1.
|
|
1557
|
-
],
|
|
1558
|
-
declarations: [
|
|
1559
|
-
SkyAgGridCellRendererCurrencyComponent,
|
|
1560
|
-
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1561
|
-
],
|
|
1562
|
-
exports: [
|
|
1563
|
-
SkyAgGridCellRendererCurrencyComponent,
|
|
1564
|
-
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1423
|
+
i3.CommonModule,
|
|
1424
|
+
i1$4.ReactiveFormsModule,
|
|
1425
|
+
i3$1.SkyI18nModule,
|
|
1426
|
+
i1$6.SkyInputBoxModule,
|
|
1427
|
+
i1$3.SkyLookupModule,
|
|
1565
1428
|
],
|
|
1566
1429
|
}]
|
|
1567
1430
|
}] });
|
|
1568
1431
|
|
|
1569
1432
|
/**
|
|
1570
|
-
* Component for rendering the inline delete template in the overlay.
|
|
1571
1433
|
* @internal
|
|
1572
1434
|
*/
|
|
1573
|
-
var
|
|
1574
|
-
function
|
|
1435
|
+
var SkyAgGridCellEditorNumberComponent = /** @class */ (function () {
|
|
1436
|
+
function SkyAgGridCellEditorNumberComponent() {
|
|
1575
1437
|
}
|
|
1576
|
-
|
|
1438
|
+
/**
|
|
1439
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1440
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1441
|
+
*/
|
|
1442
|
+
SkyAgGridCellEditorNumberComponent.prototype.agInit = function (params) {
|
|
1443
|
+
this.params = params;
|
|
1444
|
+
this.value = this.params.value;
|
|
1445
|
+
this.columnHeader = this.params.colDef.headerName;
|
|
1446
|
+
this.rowNumber = this.params.rowIndex + 1;
|
|
1447
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
1448
|
+
this.rowHeightWithoutBorders =
|
|
1449
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
1450
|
+
};
|
|
1451
|
+
/**
|
|
1452
|
+
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
1453
|
+
*/
|
|
1454
|
+
SkyAgGridCellEditorNumberComponent.prototype.afterGuiAttached = function () {
|
|
1455
|
+
this.input.nativeElement.focus();
|
|
1456
|
+
};
|
|
1457
|
+
/**
|
|
1458
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1459
|
+
*/
|
|
1460
|
+
SkyAgGridCellEditorNumberComponent.prototype.getValue = function () {
|
|
1461
|
+
return this.value;
|
|
1462
|
+
};
|
|
1463
|
+
return SkyAgGridCellEditorNumberComponent;
|
|
1577
1464
|
}());
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1465
|
+
SkyAgGridCellEditorNumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1466
|
+
SkyAgGridCellEditorNumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<input\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n #skyCellEditorNumber\n/>\n", styles: ["input{border:none;text-align:right}\n"], directives: [{ type: i1__namespace$4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1467
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberComponent, decorators: [{
|
|
1581
1468
|
type: i0.Component,
|
|
1582
1469
|
args: [{
|
|
1583
|
-
|
|
1470
|
+
selector: 'sky-ag-grid-cell-editor-number',
|
|
1471
|
+
template: "<input\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n #skyCellEditorNumber\n/>\n",
|
|
1472
|
+
styles: ["input{border:none;text-align:right}\n"],
|
|
1473
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1584
1474
|
}]
|
|
1585
|
-
}], propDecorators: {
|
|
1586
|
-
type: i0.ViewChildren,
|
|
1587
|
-
args: ['inlineDeleteRef']
|
|
1588
|
-
}], inlineDeleteTemplateRef: [{
|
|
1475
|
+
}], propDecorators: { input: [{
|
|
1589
1476
|
type: i0.ViewChild,
|
|
1590
|
-
args: ['
|
|
1477
|
+
args: ['skyCellEditorNumber', { read: i0.ElementRef }]
|
|
1591
1478
|
}] } });
|
|
1592
1479
|
|
|
1480
|
+
var SkyAgGridCellEditorNumberModule = /** @class */ (function () {
|
|
1481
|
+
function SkyAgGridCellEditorNumberModule() {
|
|
1482
|
+
}
|
|
1483
|
+
return SkyAgGridCellEditorNumberModule;
|
|
1484
|
+
}());
|
|
1485
|
+
SkyAgGridCellEditorNumberModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1486
|
+
SkyAgGridCellEditorNumberModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, declarations: [SkyAgGridCellEditorNumberComponent], imports: [AgGridResourcesModule, i1$4.FormsModule], exports: [SkyAgGridCellEditorNumberComponent] });
|
|
1487
|
+
SkyAgGridCellEditorNumberModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, imports: [[AgGridResourcesModule, i1$4.FormsModule]] });
|
|
1488
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorNumberModule, decorators: [{
|
|
1489
|
+
type: i0.NgModule,
|
|
1490
|
+
args: [{
|
|
1491
|
+
imports: [AgGridResourcesModule, i1$4.FormsModule],
|
|
1492
|
+
declarations: [SkyAgGridCellEditorNumberComponent],
|
|
1493
|
+
exports: [SkyAgGridCellEditorNumberComponent],
|
|
1494
|
+
}]
|
|
1495
|
+
}] });
|
|
1496
|
+
|
|
1593
1497
|
/**
|
|
1594
1498
|
* @internal
|
|
1595
1499
|
*/
|
|
1596
|
-
var
|
|
1597
|
-
function
|
|
1598
|
-
this.affixService = affixService;
|
|
1599
|
-
this.changeDetector = changeDetector;
|
|
1600
|
-
this.elementRef = elementRef;
|
|
1601
|
-
this.resolver = resolver;
|
|
1602
|
-
this.overlayService = overlayService;
|
|
1603
|
-
this.viewContainerRef = viewContainerRef;
|
|
1604
|
-
/**
|
|
1605
|
-
* Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
|
|
1606
|
-
*/
|
|
1607
|
-
this.rowDeleteCancel = new i0.EventEmitter();
|
|
1608
|
-
/**
|
|
1609
|
-
* Emits a `SkyAgGridRowDeleteConfirmArgs` object when a row's inline delete is confirmed.
|
|
1610
|
-
*/
|
|
1611
|
-
this.rowDeleteConfirm = new i0.EventEmitter();
|
|
1612
|
-
/**
|
|
1613
|
-
* Emits when the list of ids of the data in the rows where inline deletes are shown changes.
|
|
1614
|
-
*/
|
|
1615
|
-
this.rowDeleteIdsChange = new i0.EventEmitter();
|
|
1616
|
-
this.rowDeleteConfigs = [];
|
|
1617
|
-
this.ngUnsubscribe = new rxjs.Subject();
|
|
1618
|
-
this.rowDeleteContents = {};
|
|
1500
|
+
var SkyAgGridCellEditorTextComponent = /** @class */ (function () {
|
|
1501
|
+
function SkyAgGridCellEditorTextComponent() {
|
|
1619
1502
|
}
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1704
|
-
finally {
|
|
1705
|
-
try {
|
|
1706
|
-
if (value_1_1 && !value_1_1.done && (_c = value_1.return)) _c.call(value_1);
|
|
1503
|
+
/**
|
|
1504
|
+
* agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.
|
|
1505
|
+
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1506
|
+
*/
|
|
1507
|
+
SkyAgGridCellEditorTextComponent.prototype.agInit = function (params) {
|
|
1508
|
+
this.params = params;
|
|
1509
|
+
this.value = this.params.charPress || this.params.value;
|
|
1510
|
+
this.columnHeader = this.params.colDef.headerName;
|
|
1511
|
+
this.rowNumber = this.params.rowIndex + 1;
|
|
1512
|
+
this.columnWidth = this.params.column.getActualWidth();
|
|
1513
|
+
this.rowHeightWithoutBorders =
|
|
1514
|
+
this.params.node && this.params.node.rowHeight - 4;
|
|
1515
|
+
};
|
|
1516
|
+
/**
|
|
1517
|
+
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
1518
|
+
*/
|
|
1519
|
+
SkyAgGridCellEditorTextComponent.prototype.afterGuiAttached = function () {
|
|
1520
|
+
this.input.nativeElement.focus();
|
|
1521
|
+
};
|
|
1522
|
+
/**
|
|
1523
|
+
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
1524
|
+
*/
|
|
1525
|
+
SkyAgGridCellEditorTextComponent.prototype.getValue = function () {
|
|
1526
|
+
return this.value;
|
|
1527
|
+
};
|
|
1528
|
+
return SkyAgGridCellEditorTextComponent;
|
|
1529
|
+
}());
|
|
1530
|
+
SkyAgGridCellEditorTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1531
|
+
SkyAgGridCellEditorTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<input\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n #skyCellEditorText\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1__namespace$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1532
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorTextComponent, decorators: [{
|
|
1533
|
+
type: i0.Component,
|
|
1534
|
+
args: [{
|
|
1535
|
+
selector: 'sky-ag-grid-cell-editor-text',
|
|
1536
|
+
template: "<input\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [(ngModel)]=\"value\"\n #skyCellEditorText\n/>\n",
|
|
1537
|
+
styles: ["input{border:none;padding-left:11px}\n"],
|
|
1538
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1539
|
+
}]
|
|
1540
|
+
}], propDecorators: { input: [{
|
|
1541
|
+
type: i0.ViewChild,
|
|
1542
|
+
args: ['skyCellEditorText', { read: i0.ElementRef }]
|
|
1543
|
+
}] } });
|
|
1544
|
+
|
|
1545
|
+
var SkyAgGridCellEditorTextModule = /** @class */ (function () {
|
|
1546
|
+
function SkyAgGridCellEditorTextModule() {
|
|
1547
|
+
}
|
|
1548
|
+
return SkyAgGridCellEditorTextModule;
|
|
1549
|
+
}());
|
|
1550
|
+
SkyAgGridCellEditorTextModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorTextModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1551
|
+
SkyAgGridCellEditorTextModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [AgGridResourcesModule, i1$4.FormsModule], exports: [SkyAgGridCellEditorTextComponent] });
|
|
1552
|
+
SkyAgGridCellEditorTextModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorTextModule, imports: [[AgGridResourcesModule, i1$4.FormsModule]] });
|
|
1553
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellEditorTextModule, decorators: [{
|
|
1554
|
+
type: i0.NgModule,
|
|
1555
|
+
args: [{
|
|
1556
|
+
imports: [AgGridResourcesModule, i1$4.FormsModule],
|
|
1557
|
+
declarations: [SkyAgGridCellEditorTextComponent],
|
|
1558
|
+
exports: [SkyAgGridCellEditorTextComponent],
|
|
1559
|
+
}]
|
|
1560
|
+
}] });
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* @internal
|
|
1564
|
+
*/
|
|
1565
|
+
var SkyAgGridCellValidatorTooltipComponent = /** @class */ (function () {
|
|
1566
|
+
function SkyAgGridCellValidatorTooltipComponent(changeDetector, zone) {
|
|
1567
|
+
this.changeDetector = changeDetector;
|
|
1568
|
+
this.zone = zone;
|
|
1569
|
+
this.indicatorShouldShow = true;
|
|
1570
|
+
this.popoverMessageStream = new rxjs.Subject();
|
|
1571
|
+
}
|
|
1572
|
+
Object.defineProperty(SkyAgGridCellValidatorTooltipComponent.prototype, "params", {
|
|
1573
|
+
set: function (value) {
|
|
1574
|
+
var _this = this;
|
|
1575
|
+
var _a, _b, _c, _d, _e;
|
|
1576
|
+
this.cellRendererParams = value;
|
|
1577
|
+
/*istanbul ignore next*/
|
|
1578
|
+
(_a = this.cellRendererParams.api) === null || _a === void 0 ? void 0 : _a.addEventListener(agGridCommunity.Events.EVENT_CELL_FOCUSED, function (eventParams) {
|
|
1579
|
+
// We want to close any popovers that are opened when other cells are focused, but open a popover if the current cell is focused.
|
|
1580
|
+
if (eventParams.column.getColId() !==
|
|
1581
|
+
_this.cellRendererParams.column.getColId() ||
|
|
1582
|
+
eventParams.rowIndex !== _this.cellRendererParams.rowIndex) {
|
|
1583
|
+
_this.hidePopover();
|
|
1707
1584
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
if (value.indexOf(config.id) < 0) {
|
|
1714
|
-
this.destroyRowDelete(config.id);
|
|
1715
|
-
}
|
|
1585
|
+
});
|
|
1586
|
+
/*istanbul ignore next*/
|
|
1587
|
+
(_b = this.cellRendererParams.eGridCell) === null || _b === void 0 ? void 0 : _b.addEventListener('keyup', function (event) {
|
|
1588
|
+
if (['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(event.key)) {
|
|
1589
|
+
_this.showPopover();
|
|
1716
1590
|
}
|
|
1591
|
+
});
|
|
1592
|
+
/*istanbul ignore next*/
|
|
1593
|
+
(_c = this.cellRendererParams.api) === null || _c === void 0 ? void 0 : _c.addEventListener(agGridCommunity.Events.EVENT_CELL_EDITING_STARTED, function () {
|
|
1594
|
+
_this.hidePopover();
|
|
1595
|
+
});
|
|
1596
|
+
if (typeof ((_d = this.cellRendererParams.skyComponentProperties) === null || _d === void 0 ? void 0 : _d.validatorMessage) === 'function') {
|
|
1597
|
+
this.validatorMessage =
|
|
1598
|
+
this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
|
|
1717
1599
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
if (_h && !_h.done && (_d = _g.return)) _d.call(_g);
|
|
1722
|
-
}
|
|
1723
|
-
finally { if (e_3) throw e_3.error; }
|
|
1600
|
+
else {
|
|
1601
|
+
this.validatorMessage =
|
|
1602
|
+
(_e = this.cellRendererParams.skyComponentProperties) === null || _e === void 0 ? void 0 : _e.validatorMessage;
|
|
1724
1603
|
}
|
|
1725
1604
|
this.changeDetector.markForCheck();
|
|
1726
1605
|
},
|
|
1727
1606
|
enumerable: false,
|
|
1728
1607
|
configurable: true
|
|
1729
1608
|
});
|
|
1730
|
-
|
|
1731
|
-
get: function () {
|
|
1732
|
-
return this.elementRef.nativeElement.querySelectorAll('.sky-ag-grid')[0]
|
|
1733
|
-
.offsetWidth;
|
|
1734
|
-
},
|
|
1735
|
-
enumerable: false,
|
|
1736
|
-
configurable: true
|
|
1737
|
-
});
|
|
1738
|
-
SkyAgGridRowDeleteDirective.prototype.ngAfterContentInit = function () {
|
|
1609
|
+
SkyAgGridCellValidatorTooltipComponent.prototype.hideIndicator = function () {
|
|
1739
1610
|
var _this = this;
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
this.agGrid.rowDataChanged
|
|
1744
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1745
|
-
.subscribe(function () {
|
|
1746
|
-
_this.updateRowDeleteStates();
|
|
1747
|
-
});
|
|
1748
|
-
this.agGrid.rowDataUpdated
|
|
1749
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1750
|
-
.subscribe(function () {
|
|
1751
|
-
_this.updateRowDeleteStates();
|
|
1752
|
-
});
|
|
1753
|
-
this.agGrid.sortChanged
|
|
1754
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1755
|
-
.subscribe(function () {
|
|
1756
|
-
_this.updateRowDeleteStates();
|
|
1757
|
-
});
|
|
1758
|
-
this.agGrid.filterChanged
|
|
1759
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1760
|
-
.subscribe(function () {
|
|
1761
|
-
_this.updateRowDeleteStates();
|
|
1611
|
+
this.zone.run(function () {
|
|
1612
|
+
_this.indicatorShouldShow = false;
|
|
1613
|
+
_this.changeDetector.detectChanges();
|
|
1762
1614
|
});
|
|
1763
|
-
this.agGrid.getRowNodeId = function (data) {
|
|
1764
|
-
return data.id.toString();
|
|
1765
|
-
};
|
|
1766
1615
|
};
|
|
1767
|
-
|
|
1616
|
+
SkyAgGridCellValidatorTooltipComponent.prototype.hidePopover = function () {
|
|
1617
|
+
this.popoverMessageStream.next({ type: i2$2.SkyPopoverMessageType.Close });
|
|
1618
|
+
};
|
|
1619
|
+
SkyAgGridCellValidatorTooltipComponent.prototype.showIndicator = function () {
|
|
1768
1620
|
var _this = this;
|
|
1769
|
-
this.
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
_this.destroyRowDelete(id);
|
|
1621
|
+
this.zone.run(function () {
|
|
1622
|
+
_this.indicatorShouldShow = true;
|
|
1623
|
+
_this.changeDetector.detectChanges();
|
|
1773
1624
|
});
|
|
1774
1625
|
};
|
|
1775
|
-
|
|
1776
|
-
this.
|
|
1777
|
-
this.rowDeleteCancel.emit({ id: row.id });
|
|
1778
|
-
this.destroyRowDelete(row.id);
|
|
1626
|
+
SkyAgGridCellValidatorTooltipComponent.prototype.showPopover = function () {
|
|
1627
|
+
this.popoverMessageStream.next({ type: i2$2.SkyPopoverMessageType.Open });
|
|
1779
1628
|
};
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1629
|
+
return SkyAgGridCellValidatorTooltipComponent;
|
|
1630
|
+
}());
|
|
1631
|
+
SkyAgGridCellValidatorTooltipComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellValidatorTooltipComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1632
|
+
SkyAgGridCellValidatorTooltipComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: { params: "params" }, ngImport: i0__namespace, template: "<div\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n class=\"sky-validator-cell\"\n>\n <ng-content></ng-content>\n <sky-status-indicator\n *ngIf=\"indicatorShouldShow\"\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n ></sky-status-indicator>\n</div>\n<sky-popover\n #validatorPopover\n (popoverClosed)=\"showIndicator()\"\n (popoverOpened)=\"hideIndicator()\"\n popoverType=\"danger\"\n>\n {{ validatorMessage }}\n</sky-popover>\n", styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"], components: [{ type: i1__namespace$7.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription"] }, { type: i2__namespace$2.λ6, selector: "sky-popover", inputs: ["alignment", "dismissOnBlur", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }], directives: [{ type: i2__namespace$2.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1633
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellValidatorTooltipComponent, decorators: [{
|
|
1634
|
+
type: i0.Component,
|
|
1635
|
+
args: [{
|
|
1636
|
+
selector: 'sky-ag-grid-cell-validator-tooltip',
|
|
1637
|
+
styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"],
|
|
1638
|
+
template: "<div\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n class=\"sky-validator-cell\"\n>\n <ng-content></ng-content>\n <sky-status-indicator\n *ngIf=\"indicatorShouldShow\"\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n ></sky-status-indicator>\n</div>\n<sky-popover\n #validatorPopover\n (popoverClosed)=\"showIndicator()\"\n (popoverOpened)=\"hideIndicator()\"\n popoverType=\"danger\"\n>\n {{ validatorMessage }}\n</sky-popover>\n",
|
|
1639
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1640
|
+
}]
|
|
1641
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }]; }, propDecorators: { params: [{
|
|
1642
|
+
type: i0.Input
|
|
1643
|
+
}] } });
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* @internal
|
|
1647
|
+
*/
|
|
1648
|
+
var SkyAgGridCellRendererCurrencyComponent = /** @class */ (function () {
|
|
1649
|
+
function SkyAgGridCellRendererCurrencyComponent() {
|
|
1650
|
+
this.skyComponentProperties = {};
|
|
1651
|
+
this.numericOptions = {};
|
|
1652
|
+
}
|
|
1653
|
+
Object.defineProperty(SkyAgGridCellRendererCurrencyComponent.prototype, "params", {
|
|
1654
|
+
set: function (value) {
|
|
1655
|
+
this.agInit(value);
|
|
1656
|
+
},
|
|
1657
|
+
enumerable: false,
|
|
1658
|
+
configurable: true
|
|
1659
|
+
});
|
|
1660
|
+
/**
|
|
1661
|
+
* agInit is called by agGrid once after the renderer is created and provides the renderer with the information it needs.
|
|
1662
|
+
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1663
|
+
*/
|
|
1664
|
+
SkyAgGridCellRendererCurrencyComponent.prototype.agInit = function (params) {
|
|
1665
|
+
this.updateProperties(params);
|
|
1783
1666
|
};
|
|
1784
|
-
|
|
1785
|
-
return
|
|
1667
|
+
SkyAgGridCellRendererCurrencyComponent.prototype.refresh = function (params) {
|
|
1668
|
+
return false;
|
|
1786
1669
|
};
|
|
1787
|
-
|
|
1788
|
-
var
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1670
|
+
SkyAgGridCellRendererCurrencyComponent.prototype.updateProperties = function (params) {
|
|
1671
|
+
var _a;
|
|
1672
|
+
this._params = params;
|
|
1673
|
+
this.value = this._params.value;
|
|
1674
|
+
this.columnHeader = this._params.colDef && this._params.colDef.headerName;
|
|
1675
|
+
this.rowNumber = this._params.rowIndex + 1;
|
|
1676
|
+
this.columnWidth = (_a = this._params.column) === null || _a === void 0 ? void 0 : _a.getActualWidth();
|
|
1677
|
+
this.rowHeightWithoutBorders =
|
|
1678
|
+
this._params.node && this._params.node.rowHeight - 4;
|
|
1679
|
+
this.skyComponentProperties = this._params.skyComponentProperties || {};
|
|
1680
|
+
this.skyComponentProperties.format = 'currency';
|
|
1681
|
+
this.skyComponentProperties.minDigits = 2;
|
|
1682
|
+
this.skyComponentProperties.truncate = false;
|
|
1683
|
+
};
|
|
1684
|
+
return SkyAgGridCellRendererCurrencyComponent;
|
|
1685
|
+
}());
|
|
1686
|
+
SkyAgGridCellRendererCurrencyComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1687
|
+
SkyAgGridCellRendererCurrencyComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: { params: "params" }, ngImport: i0__namespace, template: "<span\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_renderer_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n", styles: ["input{border:none;padding-left:11px}\n"], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe, "skyNumeric": i1__namespace.SkyNumericPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1688
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyComponent, decorators: [{
|
|
1689
|
+
type: i0.Component,
|
|
1690
|
+
args: [{
|
|
1691
|
+
selector: 'sky-ag-grid-cell-renderer-currency',
|
|
1692
|
+
template: "<span\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_renderer_currency_aria_label'\n | skyLibResources: columnHeader:rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n>\n {{ value | skyNumeric: skyComponentProperties }}\n</span>\n",
|
|
1693
|
+
styles: ["input{border:none;padding-left:11px}\n"],
|
|
1694
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1695
|
+
}]
|
|
1696
|
+
}], propDecorators: { params: [{
|
|
1697
|
+
type: i0.Input
|
|
1698
|
+
}] } });
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* @internal
|
|
1702
|
+
*/
|
|
1703
|
+
var SkyAgGridCellRendererCurrencyValidatorComponent = /** @class */ (function () {
|
|
1704
|
+
function SkyAgGridCellRendererCurrencyValidatorComponent(changeDetector) {
|
|
1705
|
+
this.changeDetector = changeDetector;
|
|
1706
|
+
}
|
|
1707
|
+
Object.defineProperty(SkyAgGridCellRendererCurrencyValidatorComponent.prototype, "parameters", {
|
|
1708
|
+
set: function (value) {
|
|
1709
|
+
this.agInit(value);
|
|
1710
|
+
},
|
|
1711
|
+
enumerable: false,
|
|
1712
|
+
configurable: true
|
|
1713
|
+
});
|
|
1714
|
+
/**
|
|
1715
|
+
* agInit is called by agGrid once after the renderer is created and provides the renderer with the information it needs.
|
|
1716
|
+
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1717
|
+
*/
|
|
1718
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.prototype.agInit = function (params) {
|
|
1719
|
+
this.cellRendererParams = params;
|
|
1720
|
+
this.changeDetector.markForCheck();
|
|
1809
1721
|
};
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
var rowDeleteContents = this.rowDeleteContents[id];
|
|
1813
|
-
/* sanity check */
|
|
1814
|
-
/* istanbul ignore else */
|
|
1815
|
-
if (rowDeleteContents) {
|
|
1816
|
-
rowDeleteContents.affixer.destroy();
|
|
1817
|
-
this.overlayService.close(rowDeleteContents.overlay);
|
|
1818
|
-
delete this.rowDeleteContents[id];
|
|
1819
|
-
this.rowDeleteConfigs = this.rowDeleteConfigs.filter(function (config) { return config.id !== id; });
|
|
1820
|
-
this._rowDeleteIds = (_a = this.rowDeleteIds) === null || _a === void 0 ? void 0 : _a.filter(function (arrayId) { return arrayId !== id; });
|
|
1821
|
-
this.rowDeleteIdsChange.emit(this._rowDeleteIds);
|
|
1822
|
-
}
|
|
1722
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.prototype.isNumeric = function (value) {
|
|
1723
|
+
return !isNaN(parseFloat(value));
|
|
1823
1724
|
};
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
this.rowDeleteConfigs.forEach(function (config) {
|
|
1827
|
-
if (!_this.agGrid.api.getRowNode(config.id)) {
|
|
1828
|
-
_this.destroyRowDelete(config.id);
|
|
1829
|
-
}
|
|
1830
|
-
else {
|
|
1831
|
-
// We must reaffix things when the data changes because the rows rerender and the previous element that the delete was affixed
|
|
1832
|
-
// to is destroyed.
|
|
1833
|
-
_this.affixToRow(_this.rowDeleteContents[config.id].affixer, config.id);
|
|
1834
|
-
}
|
|
1835
|
-
});
|
|
1836
|
-
this.changeDetector.markForCheck();
|
|
1725
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.prototype.refresh = function (params) {
|
|
1726
|
+
return false;
|
|
1837
1727
|
};
|
|
1838
|
-
return
|
|
1728
|
+
return SkyAgGridCellRendererCurrencyValidatorComponent;
|
|
1839
1729
|
}());
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1843
|
-
type: i0.
|
|
1730
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyValidatorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1731
|
+
SkyAgGridCellRendererCurrencyValidatorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererCurrencyValidatorComponent, selector: "sky-ag-grid-cell-renderer-currency-validator", inputs: { parameters: "parameters" }, ngImport: i0__namespace, template: "<sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n <sky-ag-grid-cell-renderer-currency\n *ngIf=\"isNumeric(cellRendererParams.value); else rawValue\"\n [params]=\"cellRendererParams\"\n ></sky-ag-grid-cell-renderer-currency>\n <ng-template #rawValue>{{ cellRendererParams.value }}</ng-template>\n</sky-ag-grid-cell-validator-tooltip>\n", components: [{ type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: ["params"] }, { type: SkyAgGridCellRendererCurrencyComponent, selector: "sky-ag-grid-cell-renderer-currency", inputs: ["params"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1732
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyValidatorComponent, decorators: [{
|
|
1733
|
+
type: i0.Component,
|
|
1844
1734
|
args: [{
|
|
1845
|
-
selector: '
|
|
1735
|
+
selector: 'sky-ag-grid-cell-renderer-currency-validator',
|
|
1736
|
+
template: "<sky-ag-grid-cell-validator-tooltip [params]=\"cellRendererParams\">\n <sky-ag-grid-cell-renderer-currency\n *ngIf=\"isNumeric(cellRendererParams.value); else rawValue\"\n [params]=\"cellRendererParams\"\n ></sky-ag-grid-cell-renderer-currency>\n <ng-template #rawValue>{{ cellRendererParams.value }}</ng-template>\n</sky-ag-grid-cell-validator-tooltip>\n",
|
|
1737
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1846
1738
|
}]
|
|
1847
|
-
}], ctorParameters: function () { return [{ type:
|
|
1739
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { parameters: [{
|
|
1848
1740
|
type: i0.Input
|
|
1849
|
-
}], rowDeleteCancel: [{
|
|
1850
|
-
type: i0.Output
|
|
1851
|
-
}], rowDeleteConfirm: [{
|
|
1852
|
-
type: i0.Output
|
|
1853
|
-
}], rowDeleteIdsChange: [{
|
|
1854
|
-
type: i0.Output
|
|
1855
|
-
}], agGrid: [{
|
|
1856
|
-
type: i0.ContentChild,
|
|
1857
|
-
args: [agGridAngular.AgGridAngular]
|
|
1858
1741
|
}] } });
|
|
1859
1742
|
|
|
1743
|
+
var SkyAgGridCellValidatorModule = /** @class */ (function () {
|
|
1744
|
+
function SkyAgGridCellValidatorModule() {
|
|
1745
|
+
}
|
|
1746
|
+
return SkyAgGridCellValidatorModule;
|
|
1747
|
+
}());
|
|
1748
|
+
SkyAgGridCellValidatorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellValidatorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1749
|
+
SkyAgGridCellValidatorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellValidatorModule, declarations: [SkyAgGridCellValidatorTooltipComponent], imports: [i3.CommonModule, i2$2.SkyPopoverModule, i1$7.SkyStatusIndicatorModule], exports: [SkyAgGridCellValidatorTooltipComponent] });
|
|
1750
|
+
SkyAgGridCellValidatorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellValidatorModule, imports: [[i3.CommonModule, i2$2.SkyPopoverModule, i1$7.SkyStatusIndicatorModule]] });
|
|
1751
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellValidatorModule, decorators: [{
|
|
1752
|
+
type: i0.NgModule,
|
|
1753
|
+
args: [{
|
|
1754
|
+
declarations: [SkyAgGridCellValidatorTooltipComponent],
|
|
1755
|
+
exports: [SkyAgGridCellValidatorTooltipComponent],
|
|
1756
|
+
imports: [i3.CommonModule, i2$2.SkyPopoverModule, i1$7.SkyStatusIndicatorModule],
|
|
1757
|
+
}]
|
|
1758
|
+
}] });
|
|
1759
|
+
|
|
1760
|
+
var SkyAgGridCellRendererCurrencyModule = /** @class */ (function () {
|
|
1761
|
+
function SkyAgGridCellRendererCurrencyModule() {
|
|
1762
|
+
}
|
|
1763
|
+
return SkyAgGridCellRendererCurrencyModule;
|
|
1764
|
+
}());
|
|
1765
|
+
SkyAgGridCellRendererCurrencyModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1766
|
+
SkyAgGridCellRendererCurrencyModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyModule, declarations: [SkyAgGridCellRendererCurrencyComponent,
|
|
1767
|
+
SkyAgGridCellRendererCurrencyValidatorComponent], imports: [i3.CommonModule,
|
|
1768
|
+
AgGridResourcesModule,
|
|
1769
|
+
SkyAgGridCellValidatorModule,
|
|
1770
|
+
i1$4.FormsModule,
|
|
1771
|
+
i1.SkyNumericModule], exports: [SkyAgGridCellRendererCurrencyComponent,
|
|
1772
|
+
SkyAgGridCellRendererCurrencyValidatorComponent] });
|
|
1773
|
+
SkyAgGridCellRendererCurrencyModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyModule, imports: [[
|
|
1774
|
+
i3.CommonModule,
|
|
1775
|
+
AgGridResourcesModule,
|
|
1776
|
+
SkyAgGridCellValidatorModule,
|
|
1777
|
+
i1$4.FormsModule,
|
|
1778
|
+
i1.SkyNumericModule,
|
|
1779
|
+
]] });
|
|
1780
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererCurrencyModule, decorators: [{
|
|
1781
|
+
type: i0.NgModule,
|
|
1782
|
+
args: [{
|
|
1783
|
+
imports: [
|
|
1784
|
+
i3.CommonModule,
|
|
1785
|
+
AgGridResourcesModule,
|
|
1786
|
+
SkyAgGridCellValidatorModule,
|
|
1787
|
+
i1$4.FormsModule,
|
|
1788
|
+
i1.SkyNumericModule,
|
|
1789
|
+
],
|
|
1790
|
+
declarations: [
|
|
1791
|
+
SkyAgGridCellRendererCurrencyComponent,
|
|
1792
|
+
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1793
|
+
],
|
|
1794
|
+
exports: [
|
|
1795
|
+
SkyAgGridCellRendererCurrencyComponent,
|
|
1796
|
+
SkyAgGridCellRendererCurrencyValidatorComponent,
|
|
1797
|
+
],
|
|
1798
|
+
}]
|
|
1799
|
+
}] });
|
|
1800
|
+
|
|
1801
|
+
var SkyAgGridCellRendererLookupComponent = /** @class */ (function () {
|
|
1802
|
+
function SkyAgGridCellRendererLookupComponent(changeDetector) {
|
|
1803
|
+
this.changeDetector = changeDetector;
|
|
1804
|
+
this.value = '';
|
|
1805
|
+
this.summaryCount = 0;
|
|
1806
|
+
}
|
|
1807
|
+
SkyAgGridCellRendererLookupComponent.prototype.agInit = function (params) {
|
|
1808
|
+
var _a;
|
|
1809
|
+
this.lookupProperties = applySkyLookupPropertiesDefaults(params);
|
|
1810
|
+
this.summaryCount = ((_a = params.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
1811
|
+
this.value = "" + params.valueFormatted;
|
|
1812
|
+
this.changeDetector.markForCheck();
|
|
1813
|
+
};
|
|
1814
|
+
SkyAgGridCellRendererLookupComponent.prototype.refresh = function (params) {
|
|
1815
|
+
this.agInit(params);
|
|
1816
|
+
return true;
|
|
1817
|
+
};
|
|
1818
|
+
return SkyAgGridCellRendererLookupComponent;
|
|
1819
|
+
}());
|
|
1820
|
+
SkyAgGridCellRendererLookupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1821
|
+
SkyAgGridCellRendererLookupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererLookupComponent, selector: "sky-cell-renderer-lookup", ngImport: i0__namespace, template: "<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources: summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n", styles: [":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1822
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupComponent, decorators: [{
|
|
1823
|
+
type: i0.Component,
|
|
1824
|
+
args: [{
|
|
1825
|
+
selector: 'sky-cell-renderer-lookup',
|
|
1826
|
+
template: "<ng-container *ngIf=\"summaryCount > 5; else showValue\">\n {{ 'skyux_lookup_tokens_summary' | skyLibResources: summaryCount }}\n</ng-container>\n<ng-template #showValue>{{ value }}</ng-template>\n",
|
|
1827
|
+
styles: [":host{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"],
|
|
1828
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1829
|
+
}]
|
|
1830
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; } });
|
|
1831
|
+
|
|
1832
|
+
var SkyAgGridCellRendererLookupModule = /** @class */ (function () {
|
|
1833
|
+
function SkyAgGridCellRendererLookupModule() {
|
|
1834
|
+
}
|
|
1835
|
+
return SkyAgGridCellRendererLookupModule;
|
|
1836
|
+
}());
|
|
1837
|
+
SkyAgGridCellRendererLookupModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1838
|
+
SkyAgGridCellRendererLookupModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupModule, declarations: [SkyAgGridCellRendererLookupComponent], imports: [i3.CommonModule, AgGridResourcesModule], exports: [SkyAgGridCellRendererLookupComponent] });
|
|
1839
|
+
SkyAgGridCellRendererLookupModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupModule, imports: [[i3.CommonModule, AgGridResourcesModule]] });
|
|
1840
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererLookupModule, decorators: [{
|
|
1841
|
+
type: i0.NgModule,
|
|
1842
|
+
args: [{
|
|
1843
|
+
declarations: [SkyAgGridCellRendererLookupComponent],
|
|
1844
|
+
exports: [SkyAgGridCellRendererLookupComponent],
|
|
1845
|
+
imports: [i3.CommonModule, AgGridResourcesModule],
|
|
1846
|
+
}]
|
|
1847
|
+
}] });
|
|
1848
|
+
|
|
1860
1849
|
/**
|
|
1861
1850
|
* @internal
|
|
1862
1851
|
*/
|
|
1863
|
-
var
|
|
1864
|
-
function
|
|
1865
|
-
this.
|
|
1852
|
+
var SkyAgGridCellRendererRowSelectorComponent = /** @class */ (function () {
|
|
1853
|
+
function SkyAgGridCellRendererRowSelectorComponent(changeDetection) {
|
|
1854
|
+
this.changeDetection = changeDetection;
|
|
1866
1855
|
}
|
|
1867
1856
|
/**
|
|
1868
|
-
* agInit is called by agGrid once after the
|
|
1869
|
-
* @param params The cell
|
|
1857
|
+
* agInit is called by agGrid once after the cell is created and provides the renderer with the information it needs.
|
|
1858
|
+
* @param params The cell renderer params that include data about the cell, column, row, and grid.
|
|
1870
1859
|
*/
|
|
1871
|
-
|
|
1860
|
+
SkyAgGridCellRendererRowSelectorComponent.prototype.agInit = function (params) {
|
|
1861
|
+
var _this = this;
|
|
1872
1862
|
this.params = params;
|
|
1873
|
-
this.
|
|
1874
|
-
this.
|
|
1863
|
+
this.dataField = this.params.colDef && this.params.colDef.field;
|
|
1864
|
+
this.rowNode = this.params.node;
|
|
1875
1865
|
this.rowNumber = this.params.rowIndex + 1;
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
this.
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
}
|
|
1866
|
+
if (this.dataField) {
|
|
1867
|
+
this.checked = this.params.value;
|
|
1868
|
+
this.rowNode.setSelected(this.checked);
|
|
1869
|
+
}
|
|
1870
|
+
else {
|
|
1871
|
+
this.checked = this.rowNode.isSelected();
|
|
1872
|
+
}
|
|
1873
|
+
this.rowNode.addEventListener(agGridCommunity.RowNode.EVENT_ROW_SELECTED, function (event) {
|
|
1874
|
+
_this.rowSelectedListener(event);
|
|
1875
|
+
});
|
|
1883
1876
|
};
|
|
1884
1877
|
/**
|
|
1885
|
-
*
|
|
1878
|
+
* Used by agGrid to update cell value after a user triggers a refresh. It updates the cell DOM and returns true when the refresh is
|
|
1879
|
+
* successful, or false if the cell should be destroyed and rerendered. If consumers have external logic that changes the value of a
|
|
1880
|
+
* checkbox cell, rerendering it will gurantee the change applies without knowing the consumer's implementation.
|
|
1886
1881
|
*/
|
|
1887
|
-
|
|
1888
|
-
|
|
1882
|
+
SkyAgGridCellRendererRowSelectorComponent.prototype.refresh = function () {
|
|
1883
|
+
return false;
|
|
1889
1884
|
};
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1885
|
+
SkyAgGridCellRendererRowSelectorComponent.prototype.updateRow = function () {
|
|
1886
|
+
this.rowNode.setSelected(this.checked);
|
|
1887
|
+
if (this.dataField) {
|
|
1888
|
+
this.rowNode.data[this.dataField] = this.checked;
|
|
1889
|
+
}
|
|
1895
1890
|
};
|
|
1896
|
-
|
|
1891
|
+
SkyAgGridCellRendererRowSelectorComponent.prototype.rowSelectedListener = function (event) {
|
|
1892
|
+
this.checked = event.node.isSelected();
|
|
1893
|
+
if (this.dataField) {
|
|
1894
|
+
this.rowNode.data[this.dataField] = this.checked;
|
|
1895
|
+
}
|
|
1896
|
+
this.changeDetection.markForCheck();
|
|
1897
|
+
};
|
|
1898
|
+
return SkyAgGridCellRendererRowSelectorComponent;
|
|
1897
1899
|
}());
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1900
|
+
SkyAgGridCellRendererRowSelectorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererRowSelectorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1901
|
+
SkyAgGridCellRendererRowSelectorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellRendererRowSelectorComponent, selector: "sky-ag-grid-cell-renderer-row-selector", ngImport: i0__namespace, template: "<sky-checkbox\n data-sky-id=\"row-checkbox\"\n tabindex=\"-1\"\n [label]=\"'sky_ag_grid_row_selector_aria_label' | skyLibResources: rowNumber\"\n [attr.aria-label]=\"\n 'sky_ag_grid_row_selector_aria_label' | skyLibResources: rowNumber\n \"\n [(ngModel)]=\"checked\"\n (change)=\"updateRow()\"\n>\n</sky-checkbox>\n", styles: [".sky-ag-grid-cell-row-selector .sky-switch-control{top:-6px}\n"], components: [{ type: i1__namespace$6.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }], directives: [{ type: i1__namespace$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3__namespace$1.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1902
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererRowSelectorComponent, decorators: [{
|
|
1901
1903
|
type: i0.Component,
|
|
1902
1904
|
args: [{
|
|
1903
|
-
selector: 'sky-ag-grid-cell-
|
|
1904
|
-
template: "<
|
|
1905
|
-
styles: ["
|
|
1905
|
+
selector: 'sky-ag-grid-cell-renderer-row-selector',
|
|
1906
|
+
template: "<sky-checkbox\n data-sky-id=\"row-checkbox\"\n tabindex=\"-1\"\n [label]=\"'sky_ag_grid_row_selector_aria_label' | skyLibResources: rowNumber\"\n [attr.aria-label]=\"\n 'sky_ag_grid_row_selector_aria_label' | skyLibResources: rowNumber\n \"\n [(ngModel)]=\"checked\"\n (change)=\"updateRow()\"\n>\n</sky-checkbox>\n",
|
|
1907
|
+
styles: [".sky-ag-grid-cell-row-selector .sky-switch-control{top:-6px}\n"],
|
|
1906
1908
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1909
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1907
1910
|
}]
|
|
1908
|
-
}],
|
|
1909
|
-
type: i0.ViewChild,
|
|
1910
|
-
args: ['skyCellEditorCurrency', { read: i0.ElementRef }]
|
|
1911
|
-
}] } });
|
|
1911
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; } });
|
|
1912
1912
|
|
|
1913
|
-
var
|
|
1914
|
-
function
|
|
1913
|
+
var SkyAgGridCellRendererRowSelectorModule = /** @class */ (function () {
|
|
1914
|
+
function SkyAgGridCellRendererRowSelectorModule() {
|
|
1915
1915
|
}
|
|
1916
|
-
return
|
|
1916
|
+
return SkyAgGridCellRendererRowSelectorModule;
|
|
1917
1917
|
}());
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1918
|
+
SkyAgGridCellRendererRowSelectorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererRowSelectorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1919
|
+
SkyAgGridCellRendererRowSelectorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererRowSelectorModule, declarations: [SkyAgGridCellRendererRowSelectorComponent], imports: [AgGridResourcesModule, i1$6.SkyCheckboxModule, i1$4.FormsModule], exports: [SkyAgGridCellRendererRowSelectorComponent] });
|
|
1920
|
+
SkyAgGridCellRendererRowSelectorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererRowSelectorModule, imports: [[AgGridResourcesModule, i1$6.SkyCheckboxModule, i1$4.FormsModule]] });
|
|
1921
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridCellRendererRowSelectorModule, decorators: [{
|
|
1922
1922
|
type: i0.NgModule,
|
|
1923
1923
|
args: [{
|
|
1924
|
-
imports: [AgGridResourcesModule, i1$
|
|
1925
|
-
declarations: [
|
|
1926
|
-
exports: [
|
|
1924
|
+
imports: [AgGridResourcesModule, i1$6.SkyCheckboxModule, i1$4.FormsModule],
|
|
1925
|
+
declarations: [SkyAgGridCellRendererRowSelectorComponent],
|
|
1926
|
+
exports: [SkyAgGridCellRendererRowSelectorComponent],
|
|
1927
1927
|
}]
|
|
1928
1928
|
}] });
|
|
1929
1929
|
|
|
@@ -1997,7 +1997,7 @@
|
|
|
1997
1997
|
SkyAgGridRowDeleteComponent,
|
|
1998
1998
|
SkyAgGridRowDeleteDirective,
|
|
1999
1999
|
SkyAgGridWrapperComponent], imports: [agGridAngular.AgGridModule,
|
|
2000
|
-
i3
|
|
2000
|
+
i3.CommonModule,
|
|
2001
2001
|
SkyAgGridCellEditorAutocompleteModule,
|
|
2002
2002
|
SkyAgGridCellEditorDatepickerModule,
|
|
2003
2003
|
SkyAgGridCellEditorLookupModule,
|
|
@@ -2009,15 +2009,15 @@
|
|
|
2009
2009
|
SkyAgGridCellRendererValidatorTooltipModule,
|
|
2010
2010
|
SkyAgGridCellValidatorModule,
|
|
2011
2011
|
SkyAgGridCellEditorTextModule,
|
|
2012
|
-
i1$
|
|
2013
|
-
i1$
|
|
2012
|
+
i1$1.SkyDataManagerModule,
|
|
2013
|
+
i1$2.SkyInlineDeleteModule,
|
|
2014
2014
|
i1.SkyViewkeeperModule], exports: [SkyAgGridDataManagerAdapterDirective,
|
|
2015
2015
|
SkyAgGridRowDeleteComponent,
|
|
2016
2016
|
SkyAgGridRowDeleteDirective,
|
|
2017
2017
|
SkyAgGridWrapperComponent] });
|
|
2018
2018
|
SkyAgGridModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridModule, imports: [[
|
|
2019
2019
|
agGridAngular.AgGridModule,
|
|
2020
|
-
i3
|
|
2020
|
+
i3.CommonModule,
|
|
2021
2021
|
SkyAgGridCellEditorAutocompleteModule,
|
|
2022
2022
|
SkyAgGridCellEditorDatepickerModule,
|
|
2023
2023
|
SkyAgGridCellEditorLookupModule,
|
|
@@ -2029,8 +2029,8 @@
|
|
|
2029
2029
|
SkyAgGridCellRendererValidatorTooltipModule,
|
|
2030
2030
|
SkyAgGridCellValidatorModule,
|
|
2031
2031
|
SkyAgGridCellEditorTextModule,
|
|
2032
|
-
i1$
|
|
2033
|
-
i1$
|
|
2032
|
+
i1$1.SkyDataManagerModule,
|
|
2033
|
+
i1$2.SkyInlineDeleteModule,
|
|
2034
2034
|
i1.SkyViewkeeperModule,
|
|
2035
2035
|
]] });
|
|
2036
2036
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridModule, decorators: [{
|
|
@@ -2044,7 +2044,7 @@
|
|
|
2044
2044
|
],
|
|
2045
2045
|
imports: [
|
|
2046
2046
|
agGridAngular.AgGridModule,
|
|
2047
|
-
i3
|
|
2047
|
+
i3.CommonModule,
|
|
2048
2048
|
SkyAgGridCellEditorAutocompleteModule,
|
|
2049
2049
|
SkyAgGridCellEditorDatepickerModule,
|
|
2050
2050
|
SkyAgGridCellEditorLookupModule,
|
|
@@ -2056,8 +2056,8 @@
|
|
|
2056
2056
|
SkyAgGridCellRendererValidatorTooltipModule,
|
|
2057
2057
|
SkyAgGridCellValidatorModule,
|
|
2058
2058
|
SkyAgGridCellEditorTextModule,
|
|
2059
|
-
i1$
|
|
2060
|
-
i1$
|
|
2059
|
+
i1$1.SkyDataManagerModule,
|
|
2060
|
+
i1$2.SkyInlineDeleteModule,
|
|
2061
2061
|
i1.SkyViewkeeperModule,
|
|
2062
2062
|
],
|
|
2063
2063
|
exports: [
|
|
@@ -2099,7 +2099,7 @@
|
|
|
2099
2099
|
})(exports.SkyCellClass || (exports.SkyCellClass = {}));
|
|
2100
2100
|
|
|
2101
2101
|
/**
|
|
2102
|
-
* These column types can be used by setting the AG Grid [column definition `type`](https://www.ag-grid.com/
|
|
2102
|
+
* These column types can be used by setting the AG Grid [column definition `type`](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing) to one of the following values.
|
|
2103
2103
|
* <br/>
|
|
2104
2104
|
* Any [SKY UX component](https://developer.blackbaud.com/skyux/components) can be made into a [cell editor](https://www.ag-grid.com/javascript-grid-cell-editor/) or [cell renderer](https://www.ag-grid.com/javascript-grid-cell-rendering-components/) component. If you would like to use a component that does not have a column definition yet, please consider [contributing it](https://developer.blackbaud.com/skyux/contribute/contribution-process) to the SKY UX data entry grid module, or [file an issue](https://developer.blackbaud.com/skyux/contribute/contribution-process/file-issue) in the [`@skyux/ag-grid` repo](https://github.com/blackbaud/skyux-ag-grid).
|
|
2105
2105
|
*/
|
|
@@ -2108,7 +2108,7 @@
|
|
|
2108
2108
|
/**
|
|
2109
2109
|
* **Edit mode**
|
|
2110
2110
|
* <br/>
|
|
2111
|
-
* Specifies that cells in the column will be edited as [SKY UX autocomplete components](https://developer.blackbaud.com/skyux/components/autocomplete). You can set any of the autocomplete component's properties by passing
|
|
2111
|
+
* Specifies that cells in the column will be edited as [SKY UX autocomplete components](https://developer.blackbaud.com/skyux/components/autocomplete). You can set any of the autocomplete component's properties by passing `SkyCellEditorAutocompleteParams` in the [column definition's `cellEditorParams` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing). These params can be updated as other cell edits are made or [provided dynamically](https://www.ag-grid.com/javascript-grid-cell-editing/#dynamic-parameters) based on other cell values. See the demo for an example. Text can be entered and a value selected from the provided list.
|
|
2112
2112
|
* <br/><br/>
|
|
2113
2113
|
* **Read-only mode**
|
|
2114
2114
|
* <br/>
|
|
@@ -2134,13 +2134,22 @@
|
|
|
2134
2134
|
/**
|
|
2135
2135
|
* **Edit mode**
|
|
2136
2136
|
* <br/>
|
|
2137
|
-
* Specifies that cells in the column will be edited as [SKY UX datepicker components](https://developer.blackbaud.com/skyux/components/datepicker). You can set any of the datepicker component's properties by passing
|
|
2137
|
+
* Specifies that cells in the column will be edited as [SKY UX datepicker components](https://developer.blackbaud.com/skyux/components/datepicker). You can set any of the datepicker component's properties by passing `SkyCellEditorDatepickerParams` in the [column definition's `cellEditorParams` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing). These params can be updated as other cell edits are made or [provided dynamically](https://www.ag-grid.com/javascript-grid-cell-editing/#dynamic-parameters) based on other cell values. See the demo for an example. Date values can be entered.
|
|
2138
2138
|
* <br/><br/>
|
|
2139
2139
|
* **Read-only mode**
|
|
2140
2140
|
* <br/>
|
|
2141
2141
|
* Specifies that cells in the column will display the currently selected date formatted as `MM-DD-YYYY`, or the date format of the locale passed to `getGridOptions()`. If you would like to overwrite this format, you can [define a `valueFormatter`](https://www.ag-grid.com/javascript-grid-value-formatters/) on the column definition. See the demo for an example.
|
|
2142
2142
|
*/
|
|
2143
2143
|
SkyCellType["Date"] = "skyCellDate";
|
|
2144
|
+
/**
|
|
2145
|
+
* **Edit mode**
|
|
2146
|
+
* <br/>
|
|
2147
|
+
* Specifies that cells in the column will be edited as [SKY UX lookup components](https://developer.blackbaud.com/skyux-v5/components/lookup). You can set any of the lookup component's properties by passing `SkyCellEditorLookupParams` in the [column definition's `cellEditorParams` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing). These params can be updated as other cell edits are made or [provided dynamically](https://www.ag-grid.com/javascript-grid-cell-editing/#dynamic-parameters) based on other cell values. See the demo for an example. Text can be entered and a value selected from the provided list.
|
|
2148
|
+
* <br/><br/>
|
|
2149
|
+
* **Read-only mode**
|
|
2150
|
+
* <br/>
|
|
2151
|
+
* Specifies that cells the column will display, by default, either: the name(s) of the selected value(s) if there are less than 6, or a summary count of the values if there are more than 5. If the lookup needs to show a different property or needs to be formatted in any way, you can [define a `valueFormatter`](https://www.ag-grid.com/javascript-grid-value-formatters/) on the column definition.
|
|
2152
|
+
*/
|
|
2144
2153
|
SkyCellType["Lookup"] = "skyCellLookup";
|
|
2145
2154
|
/**
|
|
2146
2155
|
* **Edit mode**
|
|
@@ -2177,7 +2186,7 @@
|
|
|
2177
2186
|
/**
|
|
2178
2187
|
* **Edit and read-only modes**
|
|
2179
2188
|
* <br/>
|
|
2180
|
-
* Specifies cell in the column will be passed to a validator function which flags erroneous entries. You can set the validator function and message by passing them to [column definition's `cellRendererParams` property](https://www.ag-grid.com/
|
|
2189
|
+
* Specifies cell in the column will be passed to a validator function which flags erroneous entries. You can set the validator function and message by passing them to [column definition's `cellRendererParams` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing) as `skyComponentProperties.validator` and `skyComponentProperties.validatorMessage`. SkyCellType.Validator can be combined with other cell types, such as SkyCellType.Autocomplete or SkyCellType.Date, by using the array syntax for the [column definition's `type` property](https://www.ag-grid.com/angular-data-grid/column-properties/#reference-editing).
|
|
2181
2190
|
*/
|
|
2182
2191
|
SkyCellType["Validator"] = "skyCellValidator";
|
|
2183
2192
|
})(exports.SkyCellType || (exports.SkyCellType = {}));
|
|
@@ -2513,7 +2522,7 @@
|
|
|
2513
2522
|
};
|
|
2514
2523
|
return SkyAgGridService;
|
|
2515
2524
|
}());
|
|
2516
|
-
SkyAgGridService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridService, deps: [{ token: SkyAgGridAdapterService }, { token: i1__namespace$
|
|
2525
|
+
SkyAgGridService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridService, deps: [{ token: SkyAgGridAdapterService }, { token: i1__namespace$5.SkyThemeService, optional: true }, { token: i3__namespace$1.SkyLibResourcesService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2517
2526
|
SkyAgGridService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridService, providedIn: 'any' });
|
|
2518
2527
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyAgGridService, decorators: [{
|
|
2519
2528
|
type: i0.Injectable,
|
|
@@ -2521,9 +2530,9 @@
|
|
|
2521
2530
|
providedIn: 'any',
|
|
2522
2531
|
}]
|
|
2523
2532
|
}], ctorParameters: function () {
|
|
2524
|
-
return [{ type: SkyAgGridAdapterService }, { type: i1__namespace$
|
|
2533
|
+
return [{ type: SkyAgGridAdapterService }, { type: i1__namespace$5.SkyThemeService, decorators: [{
|
|
2525
2534
|
type: i0.Optional
|
|
2526
|
-
}] }, { type: i3__namespace.SkyLibResourcesService, decorators: [{
|
|
2535
|
+
}] }, { type: i3__namespace$1.SkyLibResourcesService, decorators: [{
|
|
2527
2536
|
type: i0.Optional
|
|
2528
2537
|
}] }];
|
|
2529
2538
|
} });
|