@rxap/material-table-window-system 12.0.8-next.0 → 13.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/index.mjs +4 -0
- package/esm2020/lib/open-table-select.directive.mjs +154 -0
- package/esm2020/lib/window-table-select.module.mjs +17 -0
- package/esm2020/lib/window-table-select.service.mjs +93 -0
- package/esm2020/rxap-material-table-window-system.mjs +5 -0
- package/fesm2015/{rxap-material-table-window-system.js → rxap-material-table-window-system.mjs} +70 -45
- package/fesm2015/rxap-material-table-window-system.mjs.map +1 -0
- package/fesm2020/rxap-material-table-window-system.mjs +262 -0
- package/fesm2020/rxap-material-table-window-system.mjs.map +1 -0
- package/lib/open-table-select.directive.d.ts +4 -2
- package/lib/window-table-select.service.d.ts +4 -2
- package/package.json +53 -35
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-material-table-window-system.umd.js +0 -600
- package/bundles/rxap-material-table-window-system.umd.js.map +0 -1
- package/esm2015/index.js +0 -4
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/open-table-select.directive.js +0 -149
- package/esm2015/lib/open-table-select.directive.js.map +0 -1
- package/esm2015/lib/window-table-select.module.js +0 -17
- package/esm2015/lib/window-table-select.module.js.map +0 -1
- package/esm2015/lib/window-table-select.service.js +0 -78
- package/esm2015/lib/window-table-select.service.js.map +0 -1
- package/esm2015/rxap-material-table-window-system.js +0 -5
- package/esm2015/rxap-material-table-window-system.js.map +0 -1
- package/fesm2015/rxap-material-table-window-system.js.map +0 -1
|
@@ -1,600 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@rxap/material-table-system'), require('@rxap/window-system'), require('rxjs/operators'), require('@rxap/data-source/table'), require('@angular/cdk/portal'), require('@rxap/utilities'), require('@angular/material/form-field'), require('@rxap/form-system'), require('@rxap/mixin'), require('@rxap/forms'), require('@rxap/data-source'), require('@angular/material/select')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@rxap/material-table-window-system', ['exports', '@angular/core', '@rxap/material-table-system', '@rxap/window-system', 'rxjs/operators', '@rxap/data-source/table', '@angular/cdk/portal', '@rxap/utilities', '@angular/material/form-field', '@rxap/form-system', '@rxap/mixin', '@rxap/forms', '@rxap/data-source', '@angular/material/select'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap['material-table-window-system'] = {}), global.ng.core, global.materialTableSystem, global.i1, global.rxjs.operators, global.table, global.ng.cdk.portal, global.utilities, global.ng.material.formField, global.formSystem, global.mixin, global.forms, global.i2, global.ng.material.select));
|
|
5
|
-
}(this, (function (exports, i0, materialTableSystem, i1, operators, table, portal, utilities, i1$1, formSystem, mixin, forms, i2, select) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
-
|
|
32
|
-
/*! *****************************************************************************
|
|
33
|
-
Copyright (c) Microsoft Corporation.
|
|
34
|
-
|
|
35
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
36
|
-
purpose with or without fee is hereby granted.
|
|
37
|
-
|
|
38
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
39
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
40
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
41
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
42
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
-
***************************************************************************** */
|
|
46
|
-
/* global Reflect, Promise */
|
|
47
|
-
var extendStatics = function (d, b) {
|
|
48
|
-
extendStatics = Object.setPrototypeOf ||
|
|
49
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
50
|
-
function (d, b) { for (var p in b)
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
52
|
-
d[p] = b[p]; };
|
|
53
|
-
return extendStatics(d, b);
|
|
54
|
-
};
|
|
55
|
-
function __extends(d, b) {
|
|
56
|
-
if (typeof b !== "function" && b !== null)
|
|
57
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
58
|
-
extendStatics(d, b);
|
|
59
|
-
function __() { this.constructor = d; }
|
|
60
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
61
|
-
}
|
|
62
|
-
var __assign = function () {
|
|
63
|
-
__assign = Object.assign || function __assign(t) {
|
|
64
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
65
|
-
s = arguments[i];
|
|
66
|
-
for (var p in s)
|
|
67
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
68
|
-
t[p] = s[p];
|
|
69
|
-
}
|
|
70
|
-
return t;
|
|
71
|
-
};
|
|
72
|
-
return __assign.apply(this, arguments);
|
|
73
|
-
};
|
|
74
|
-
function __rest(s, e) {
|
|
75
|
-
var t = {};
|
|
76
|
-
for (var p in s)
|
|
77
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
78
|
-
t[p] = s[p];
|
|
79
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
80
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
81
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
82
|
-
t[p[i]] = s[p[i]];
|
|
83
|
-
}
|
|
84
|
-
return t;
|
|
85
|
-
}
|
|
86
|
-
function __decorate(decorators, target, key, desc) {
|
|
87
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
88
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
89
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
90
|
-
else
|
|
91
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
92
|
-
if (d = decorators[i])
|
|
93
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
94
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
95
|
-
}
|
|
96
|
-
function __param(paramIndex, decorator) {
|
|
97
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
98
|
-
}
|
|
99
|
-
function __metadata(metadataKey, metadataValue) {
|
|
100
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
101
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
102
|
-
}
|
|
103
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
104
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
105
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
106
|
-
function fulfilled(value) { try {
|
|
107
|
-
step(generator.next(value));
|
|
108
|
-
}
|
|
109
|
-
catch (e) {
|
|
110
|
-
reject(e);
|
|
111
|
-
} }
|
|
112
|
-
function rejected(value) { try {
|
|
113
|
-
step(generator["throw"](value));
|
|
114
|
-
}
|
|
115
|
-
catch (e) {
|
|
116
|
-
reject(e);
|
|
117
|
-
} }
|
|
118
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
119
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function __generator(thisArg, body) {
|
|
123
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
124
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
125
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
126
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
127
|
-
function step(op) {
|
|
128
|
-
if (f)
|
|
129
|
-
throw new TypeError("Generator is already executing.");
|
|
130
|
-
while (_)
|
|
131
|
-
try {
|
|
132
|
-
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)
|
|
133
|
-
return t;
|
|
134
|
-
if (y = 0, t)
|
|
135
|
-
op = [op[0] & 2, t.value];
|
|
136
|
-
switch (op[0]) {
|
|
137
|
-
case 0:
|
|
138
|
-
case 1:
|
|
139
|
-
t = op;
|
|
140
|
-
break;
|
|
141
|
-
case 4:
|
|
142
|
-
_.label++;
|
|
143
|
-
return { value: op[1], done: false };
|
|
144
|
-
case 5:
|
|
145
|
-
_.label++;
|
|
146
|
-
y = op[1];
|
|
147
|
-
op = [0];
|
|
148
|
-
continue;
|
|
149
|
-
case 7:
|
|
150
|
-
op = _.ops.pop();
|
|
151
|
-
_.trys.pop();
|
|
152
|
-
continue;
|
|
153
|
-
default:
|
|
154
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
155
|
-
_ = 0;
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
159
|
-
_.label = op[1];
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
163
|
-
_.label = t[1];
|
|
164
|
-
t = op;
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
if (t && _.label < t[2]) {
|
|
168
|
-
_.label = t[2];
|
|
169
|
-
_.ops.push(op);
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
if (t[2])
|
|
173
|
-
_.ops.pop();
|
|
174
|
-
_.trys.pop();
|
|
175
|
-
continue;
|
|
176
|
-
}
|
|
177
|
-
op = body.call(thisArg, _);
|
|
178
|
-
}
|
|
179
|
-
catch (e) {
|
|
180
|
-
op = [6, e];
|
|
181
|
-
y = 0;
|
|
182
|
-
}
|
|
183
|
-
finally {
|
|
184
|
-
f = t = 0;
|
|
185
|
-
}
|
|
186
|
-
if (op[0] & 5)
|
|
187
|
-
throw op[1];
|
|
188
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
192
|
-
if (k2 === undefined)
|
|
193
|
-
k2 = k;
|
|
194
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
195
|
-
}) : (function (o, m, k, k2) {
|
|
196
|
-
if (k2 === undefined)
|
|
197
|
-
k2 = k;
|
|
198
|
-
o[k2] = m[k];
|
|
199
|
-
});
|
|
200
|
-
function __exportStar(m, o) {
|
|
201
|
-
for (var p in m)
|
|
202
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
203
|
-
__createBinding(o, m, p);
|
|
204
|
-
}
|
|
205
|
-
function __values(o) {
|
|
206
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
207
|
-
if (m)
|
|
208
|
-
return m.call(o);
|
|
209
|
-
if (o && typeof o.length === "number")
|
|
210
|
-
return {
|
|
211
|
-
next: function () {
|
|
212
|
-
if (o && i >= o.length)
|
|
213
|
-
o = void 0;
|
|
214
|
-
return { value: o && o[i++], done: !o };
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
218
|
-
}
|
|
219
|
-
function __read(o, n) {
|
|
220
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
221
|
-
if (!m)
|
|
222
|
-
return o;
|
|
223
|
-
var i = m.call(o), r, ar = [], e;
|
|
224
|
-
try {
|
|
225
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
226
|
-
ar.push(r.value);
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
e = { error: error };
|
|
230
|
-
}
|
|
231
|
-
finally {
|
|
232
|
-
try {
|
|
233
|
-
if (r && !r.done && (m = i["return"]))
|
|
234
|
-
m.call(i);
|
|
235
|
-
}
|
|
236
|
-
finally {
|
|
237
|
-
if (e)
|
|
238
|
-
throw e.error;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return ar;
|
|
242
|
-
}
|
|
243
|
-
/** @deprecated */
|
|
244
|
-
function __spread() {
|
|
245
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
246
|
-
ar = ar.concat(__read(arguments[i]));
|
|
247
|
-
return ar;
|
|
248
|
-
}
|
|
249
|
-
/** @deprecated */
|
|
250
|
-
function __spreadArrays() {
|
|
251
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
252
|
-
s += arguments[i].length;
|
|
253
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
254
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
255
|
-
r[k] = a[j];
|
|
256
|
-
return r;
|
|
257
|
-
}
|
|
258
|
-
function __spreadArray(to, from) {
|
|
259
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
260
|
-
to[j] = from[i];
|
|
261
|
-
return to;
|
|
262
|
-
}
|
|
263
|
-
function __await(v) {
|
|
264
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
265
|
-
}
|
|
266
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
267
|
-
if (!Symbol.asyncIterator)
|
|
268
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
269
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
270
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
271
|
-
function verb(n) { if (g[n])
|
|
272
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
273
|
-
function resume(n, v) { try {
|
|
274
|
-
step(g[n](v));
|
|
275
|
-
}
|
|
276
|
-
catch (e) {
|
|
277
|
-
settle(q[0][3], e);
|
|
278
|
-
} }
|
|
279
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
280
|
-
function fulfill(value) { resume("next", value); }
|
|
281
|
-
function reject(value) { resume("throw", value); }
|
|
282
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
283
|
-
resume(q[0][0], q[0][1]); }
|
|
284
|
-
}
|
|
285
|
-
function __asyncDelegator(o) {
|
|
286
|
-
var i, p;
|
|
287
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
288
|
-
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; }
|
|
289
|
-
}
|
|
290
|
-
function __asyncValues(o) {
|
|
291
|
-
if (!Symbol.asyncIterator)
|
|
292
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
293
|
-
var m = o[Symbol.asyncIterator], i;
|
|
294
|
-
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);
|
|
295
|
-
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); }); }; }
|
|
296
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
297
|
-
}
|
|
298
|
-
function __makeTemplateObject(cooked, raw) {
|
|
299
|
-
if (Object.defineProperty) {
|
|
300
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
cooked.raw = raw;
|
|
304
|
-
}
|
|
305
|
-
return cooked;
|
|
306
|
-
}
|
|
307
|
-
;
|
|
308
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
309
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
310
|
-
}) : function (o, v) {
|
|
311
|
-
o["default"] = v;
|
|
312
|
-
};
|
|
313
|
-
function __importStar(mod) {
|
|
314
|
-
if (mod && mod.__esModule)
|
|
315
|
-
return mod;
|
|
316
|
-
var result = {};
|
|
317
|
-
if (mod != null)
|
|
318
|
-
for (var k in mod)
|
|
319
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
320
|
-
__createBinding(result, mod, k);
|
|
321
|
-
__setModuleDefault(result, mod);
|
|
322
|
-
return result;
|
|
323
|
-
}
|
|
324
|
-
function __importDefault(mod) {
|
|
325
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
326
|
-
}
|
|
327
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
328
|
-
if (kind === "a" && !f)
|
|
329
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
330
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
331
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
332
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
333
|
-
}
|
|
334
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
335
|
-
if (kind === "m")
|
|
336
|
-
throw new TypeError("Private method is not writable");
|
|
337
|
-
if (kind === "a" && !f)
|
|
338
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
339
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
340
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
341
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
var WindowTableSelectService = /** @class */ (function () {
|
|
345
|
-
function WindowTableSelectService(windowService, injector) {
|
|
346
|
-
this.windowService = windowService;
|
|
347
|
-
this.injector = injector;
|
|
348
|
-
}
|
|
349
|
-
WindowTableSelectService.prototype.open = function (component, options, windowConfig) {
|
|
350
|
-
if (windowConfig === void 0) { windowConfig = {}; }
|
|
351
|
-
var _a, _b, _c, _d, _e;
|
|
352
|
-
var providers = [
|
|
353
|
-
{
|
|
354
|
-
provide: materialTableSystem.RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS,
|
|
355
|
-
useValue: {
|
|
356
|
-
multiple: (_a = options.multiple) !== null && _a !== void 0 ? _a : false,
|
|
357
|
-
selected: (_b = options.selected) !== null && _b !== void 0 ? _b : [],
|
|
358
|
-
},
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
provide: i1.RXAP_WINDOW_SETTINGS,
|
|
362
|
-
useValue: {
|
|
363
|
-
title: (_c = options.title) !== null && _c !== void 0 ? _c : $localize(templateObject_1 || (templateObject_1 = __makeTemplateObject([":@@rxap.window-table-system.select-table.title:Select Options"], [":@@rxap.window-table-system.select-table.title:Select Options"]))),
|
|
364
|
-
},
|
|
365
|
-
},
|
|
366
|
-
];
|
|
367
|
-
if (options.data) {
|
|
368
|
-
providers.push({
|
|
369
|
-
provide: materialTableSystem.TABLE_DATA_SOURCE,
|
|
370
|
-
useValue: new table.TableDataSource(options.data),
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
else {
|
|
374
|
-
providers.push({
|
|
375
|
-
provide: materialTableSystem.TABLE_DATA_SOURCE,
|
|
376
|
-
useValue: null,
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
providers.push({
|
|
380
|
-
provide: materialTableSystem.TABLE_REMOTE_METHOD,
|
|
381
|
-
useValue: null,
|
|
382
|
-
});
|
|
383
|
-
var windowRef = this.windowService.open(Object.assign(Object.assign({}, windowConfig), { viewContainerRef: options.viewContainerRef, injector: i0.Injector.create({
|
|
384
|
-
parent: (_e = (_d = options.injector) !== null && _d !== void 0 ? _d : windowConfig.injector) !== null && _e !== void 0 ? _e : this.injector,
|
|
385
|
-
providers: providers,
|
|
386
|
-
}), component: component }));
|
|
387
|
-
windowRef.attachedRef$
|
|
388
|
-
.pipe(operators.take(1), operators.tap(function (attachedRef) {
|
|
389
|
-
if (attachedRef instanceof i0.ComponentRef) {
|
|
390
|
-
windowRef.setFooterPortal(new portal.ComponentPortal(materialTableSystem.TableSelectControlsComponent, options.viewContainerRef, attachedRef.injector));
|
|
391
|
-
}
|
|
392
|
-
else {
|
|
393
|
-
throw new Error('FATAL: the attached ref was not an instance of Component ref');
|
|
394
|
-
}
|
|
395
|
-
}))
|
|
396
|
-
.subscribe();
|
|
397
|
-
return windowRef.closed$
|
|
398
|
-
.pipe(operators.take(1), operators.map(function (selected) { return selected !== null && selected !== void 0 ? selected : []; }))
|
|
399
|
-
.toPromise();
|
|
400
|
-
};
|
|
401
|
-
return WindowTableSelectService;
|
|
402
|
-
}());
|
|
403
|
-
WindowTableSelectService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectService, deps: [{ token: i1.WindowService }, { token: i0.INJECTOR }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
404
|
-
WindowTableSelectService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectService, providedIn: 'root' });
|
|
405
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectService, decorators: [{
|
|
406
|
-
type: i0.Injectable,
|
|
407
|
-
args: [{ providedIn: 'root' }]
|
|
408
|
-
}], ctorParameters: function () {
|
|
409
|
-
return [{ type: i1__namespace.WindowService, decorators: [{
|
|
410
|
-
type: i0.Inject,
|
|
411
|
-
args: [i1.WindowService]
|
|
412
|
-
}] }, { type: i0__namespace.Injector, decorators: [{
|
|
413
|
-
type: i0.Inject,
|
|
414
|
-
args: [i0.INJECTOR]
|
|
415
|
-
}] }];
|
|
416
|
-
} });
|
|
417
|
-
var templateObject_1;
|
|
418
|
-
|
|
419
|
-
var WindowTableSelectModule = /** @class */ (function () {
|
|
420
|
-
function WindowTableSelectModule() {
|
|
421
|
-
}
|
|
422
|
-
return WindowTableSelectModule;
|
|
423
|
-
}());
|
|
424
|
-
WindowTableSelectModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
425
|
-
WindowTableSelectModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectModule, exports: [materialTableSystem.TableSelectControlsComponentModule] });
|
|
426
|
-
WindowTableSelectModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectModule, providers: [WindowTableSelectService], imports: [materialTableSystem.TableSelectControlsComponentModule] });
|
|
427
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: WindowTableSelectModule, decorators: [{
|
|
428
|
-
type: i0.NgModule,
|
|
429
|
-
args: [{
|
|
430
|
-
exports: [materialTableSystem.TableSelectControlsComponentModule],
|
|
431
|
-
providers: [WindowTableSelectService]
|
|
432
|
-
}]
|
|
433
|
-
}] });
|
|
434
|
-
|
|
435
|
-
exports.ExtractDatasourceMixin = /** @class */ (function () {
|
|
436
|
-
function ExtractDatasourceMixin() {
|
|
437
|
-
}
|
|
438
|
-
// TODO : mv to rxap and replace in InputSelectOptionsDirective
|
|
439
|
-
ExtractDatasourceMixin.prototype.extractDatasource = function (dataSourceName, control) {
|
|
440
|
-
if (control === void 0) { control = this.control; }
|
|
441
|
-
var useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);
|
|
442
|
-
var dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource, this.metadata, this.injector);
|
|
443
|
-
var settings = useDataSourceValue.settings;
|
|
444
|
-
if (settings === null || settings === void 0 ? void 0 : settings.transformer) {
|
|
445
|
-
dataSource = new i2.PipeDataSource(dataSource, operators.map(settings.transformer));
|
|
446
|
-
}
|
|
447
|
-
return this.dataSource = dataSource;
|
|
448
|
-
};
|
|
449
|
-
ExtractDatasourceMixin.prototype.extractDataSourceValue = function (dataSourceName, control) {
|
|
450
|
-
if (control === void 0) { control = this.control; }
|
|
451
|
-
var formDefinition = this.extractFormDefinition(control);
|
|
452
|
-
var useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);
|
|
453
|
-
if (!useDataSourceValueMap.has(dataSourceName)) {
|
|
454
|
-
throw new Error("The data source with the name 'options' is not defined");
|
|
455
|
-
}
|
|
456
|
-
return useDataSourceValueMap.get(dataSourceName);
|
|
457
|
-
};
|
|
458
|
-
ExtractDatasourceMixin.prototype.extractDataSourceTransformer = function (dataSourceName, control) {
|
|
459
|
-
if (control === void 0) { control = this.control; }
|
|
460
|
-
var _a;
|
|
461
|
-
var useDataSourceValue = this.extractDataSourceValue(dataSourceName, control);
|
|
462
|
-
var settings = useDataSourceValue.settings;
|
|
463
|
-
return (_a = settings === null || settings === void 0 ? void 0 : settings.transformer) !== null && _a !== void 0 ? _a : (function (v) { return v; });
|
|
464
|
-
};
|
|
465
|
-
return ExtractDatasourceMixin;
|
|
466
|
-
}());
|
|
467
|
-
exports.ExtractDatasourceMixin = __decorate([
|
|
468
|
-
mixin.Mixin(formSystem.ExtractFormDefinitionMixin, formSystem.ExtractDataSourcesMixin)
|
|
469
|
-
], exports.ExtractDatasourceMixin);
|
|
470
|
-
exports.OpenTableSelectDirective = /** @class */ (function () {
|
|
471
|
-
function OpenTableSelectDirective(formField, dataSourceLoader, injector, viewContainerRef) {
|
|
472
|
-
this.formField = formField;
|
|
473
|
-
this.dataSourceLoader = dataSourceLoader;
|
|
474
|
-
this.injector = injector;
|
|
475
|
-
this.viewContainerRef = viewContainerRef;
|
|
476
|
-
this.type = 'button';
|
|
477
|
-
}
|
|
478
|
-
OpenTableSelectDirective.prototype.ngOnInit = function () {
|
|
479
|
-
var _a;
|
|
480
|
-
var control = (_a = this.formField._control.ngControl) === null || _a === void 0 ? void 0 : _a.control;
|
|
481
|
-
if (!control) {
|
|
482
|
-
throw new Error('Could not extract the control from the form field');
|
|
483
|
-
}
|
|
484
|
-
if (!(control instanceof forms.RxapFormControl)) {
|
|
485
|
-
throw new Error('The control is not an instance of RxapFormControl');
|
|
486
|
-
}
|
|
487
|
-
this.extractDatasource('options', this.control = control);
|
|
488
|
-
this.tableSelectDataSource = new i2.PipeDataSource(this.dataSource, operators.map(function (source) {
|
|
489
|
-
if (!Array.isArray(source)) {
|
|
490
|
-
throw new Error('Only control options data source are supported as source data source for a select table');
|
|
491
|
-
}
|
|
492
|
-
return source.map(function (item) { return item.value; });
|
|
493
|
-
}));
|
|
494
|
-
};
|
|
495
|
-
OpenTableSelectDirective.prototype.onClick = function () {
|
|
496
|
-
var _a;
|
|
497
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
498
|
-
var selected;
|
|
499
|
-
return __generator(this, function (_b) {
|
|
500
|
-
switch (_b.label) {
|
|
501
|
-
case 0: return [4 /*yield*/, this.openMethod.call({
|
|
502
|
-
data: this.tableSelectDataSource,
|
|
503
|
-
selected: utilities.coerceArray(this.control.value),
|
|
504
|
-
multiple: this.isMultiple(),
|
|
505
|
-
injector: this.injector,
|
|
506
|
-
viewContainerRef: this.viewContainerRef
|
|
507
|
-
})];
|
|
508
|
-
case 1:
|
|
509
|
-
selected = _b.sent();
|
|
510
|
-
if (i0.isDevMode()) {
|
|
511
|
-
console.log('table select returns', selected);
|
|
512
|
-
}
|
|
513
|
-
if (selected && Array.isArray(selected)) {
|
|
514
|
-
if (this.isMultiple()) {
|
|
515
|
-
this.control.setValue(selected);
|
|
516
|
-
}
|
|
517
|
-
else {
|
|
518
|
-
this.control.setValue((_a = selected[0]) !== null && _a !== void 0 ? _a : null);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
return [2 /*return*/];
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
});
|
|
525
|
-
};
|
|
526
|
-
OpenTableSelectDirective.prototype.isMultiple = function () {
|
|
527
|
-
var formFieldControl = this.formField._control;
|
|
528
|
-
if (formFieldControl instanceof select.MatSelect) {
|
|
529
|
-
return formFieldControl.multiple;
|
|
530
|
-
}
|
|
531
|
-
return false;
|
|
532
|
-
};
|
|
533
|
-
return OpenTableSelectDirective;
|
|
534
|
-
}());
|
|
535
|
-
exports.OpenTableSelectDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: exports.OpenTableSelectDirective, deps: [{ token: i1$1.MAT_FORM_FIELD }, { token: i2.DataSourceLoader }, { token: i0.INJECTOR }, { token: i0.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
536
|
-
exports.OpenTableSelectDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: exports.OpenTableSelectDirective, selector: "[rxapOpenTableSelect]", inputs: { openMethod: ["rxapOpenTableSelect", "openMethod"] }, host: { listeners: { "click": "onClick()" }, properties: { "type": "this.type" } }, ngImport: i0__namespace });
|
|
537
|
-
exports.OpenTableSelectDirective = __decorate([
|
|
538
|
-
mixin.Mixin(exports.ExtractDatasourceMixin),
|
|
539
|
-
__metadata("design:paramtypes", [i1$1.MatFormField,
|
|
540
|
-
i2.DataSourceLoader,
|
|
541
|
-
i0.Injector,
|
|
542
|
-
i0.ViewContainerRef])
|
|
543
|
-
], exports.OpenTableSelectDirective);
|
|
544
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: exports.OpenTableSelectDirective, decorators: [{
|
|
545
|
-
type: i0.Directive,
|
|
546
|
-
args: [{
|
|
547
|
-
selector: '[rxapOpenTableSelect]'
|
|
548
|
-
}]
|
|
549
|
-
}], ctorParameters: function () {
|
|
550
|
-
return [{ type: i1__namespace$1.MatFormField, decorators: [{
|
|
551
|
-
type: i0.Inject,
|
|
552
|
-
args: [i1$1.MAT_FORM_FIELD]
|
|
553
|
-
}] }, { type: i2__namespace.DataSourceLoader, decorators: [{
|
|
554
|
-
type: i0.Inject,
|
|
555
|
-
args: [i2.DataSourceLoader]
|
|
556
|
-
}] }, { type: i0__namespace.Injector, decorators: [{
|
|
557
|
-
type: i0.Inject,
|
|
558
|
-
args: [i0.INJECTOR]
|
|
559
|
-
}] }, { type: i0__namespace.ViewContainerRef, decorators: [{
|
|
560
|
-
type: i0.Inject,
|
|
561
|
-
args: [i0.ViewContainerRef]
|
|
562
|
-
}] }];
|
|
563
|
-
}, propDecorators: { type: [{
|
|
564
|
-
type: i0.HostBinding,
|
|
565
|
-
args: ['type']
|
|
566
|
-
}], openMethod: [{
|
|
567
|
-
type: i0.Input,
|
|
568
|
-
args: ['rxapOpenTableSelect']
|
|
569
|
-
}], onClick: [{
|
|
570
|
-
type: i0.HostListener,
|
|
571
|
-
args: ['click']
|
|
572
|
-
}] } });
|
|
573
|
-
var OpenTableSelectDirectiveModule = /** @class */ (function () {
|
|
574
|
-
function OpenTableSelectDirectiveModule() {
|
|
575
|
-
}
|
|
576
|
-
return OpenTableSelectDirectiveModule;
|
|
577
|
-
}());
|
|
578
|
-
OpenTableSelectDirectiveModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OpenTableSelectDirectiveModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
579
|
-
OpenTableSelectDirectiveModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OpenTableSelectDirectiveModule, declarations: [exports.OpenTableSelectDirective], exports: [exports.OpenTableSelectDirective] });
|
|
580
|
-
OpenTableSelectDirectiveModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OpenTableSelectDirectiveModule });
|
|
581
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: OpenTableSelectDirectiveModule, decorators: [{
|
|
582
|
-
type: i0.NgModule,
|
|
583
|
-
args: [{
|
|
584
|
-
declarations: [exports.OpenTableSelectDirective],
|
|
585
|
-
exports: [exports.OpenTableSelectDirective]
|
|
586
|
-
}]
|
|
587
|
-
}] });
|
|
588
|
-
|
|
589
|
-
/**
|
|
590
|
-
* Generated bundle index. Do not edit.
|
|
591
|
-
*/
|
|
592
|
-
|
|
593
|
-
exports.OpenTableSelectDirectiveModule = OpenTableSelectDirectiveModule;
|
|
594
|
-
exports.WindowTableSelectModule = WindowTableSelectModule;
|
|
595
|
-
exports.WindowTableSelectService = WindowTableSelectService;
|
|
596
|
-
|
|
597
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
598
|
-
|
|
599
|
-
})));
|
|
600
|
-
//# sourceMappingURL=rxap-material-table-window-system.umd.js.map
|