@universis/ngx-tables 0.6.7 → 0.6.11
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/universis-ngx-tables.umd.js +252 -84
- package/bundles/universis-ngx-tables.umd.js.map +1 -1
- package/bundles/universis-ngx-tables.umd.min.js +1 -1
- package/bundles/universis-ngx-tables.umd.min.js.map +1 -1
- package/esm2015/lib/components/advanced-select/advanced-select.component.js +2 -2
- package/esm2015/lib/components/advanced-table/advanced-table-search.component.js +3 -3
- package/esm2015/lib/components/advanced-table/advanced-table.component.js +18 -6
- package/esm2015/lib/components/advanced-table/advanced-table.formatters.interface.js +4 -2
- package/esm2015/lib/components/advanced-table/advanced-table.formatters.js +195 -58
- package/esm2015/lib/components/advanced-table-modal/advanced-table-modal-base.component.js +17 -10
- package/esm2015/lib/tables.module.js +1 -3
- package/esm5/lib/components/advanced-select/advanced-select.component.js +2 -2
- package/esm5/lib/components/advanced-table/advanced-table-search.component.js +3 -3
- package/esm5/lib/components/advanced-table/advanced-table.component.js +18 -6
- package/esm5/lib/components/advanced-table/advanced-table.formatters.interface.js +4 -2
- package/esm5/lib/components/advanced-table/advanced-table.formatters.js +202 -67
- package/esm5/lib/components/advanced-table-modal/advanced-table-modal-base.component.js +12 -5
- package/esm5/lib/tables.module.js +1 -3
- package/fesm2015/universis-ngx-tables.js +233 -77
- package/fesm2015/universis-ngx-tables.js.map +1 -1
- package/fesm5/universis-ngx-tables.js +233 -81
- package/fesm5/universis-ngx-tables.js.map +1 -1
- package/lib/components/advanced-table/advanced-table.formatters.d.ts +15 -0
- package/lib/components/advanced-table/advanced-table.formatters.interface.d.ts +3 -1
- package/lib/components/advanced-table-modal/advanced-table-modal-base.component.d.ts +5 -1
- package/package.json +1 -1
- package/universis-ngx-tables.metadata.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getNativeName } from 'iso-639-1/build';
|
|
2
|
-
import { Dropdown } from 'bootstrap';
|
|
3
2
|
import * as jQuery_ from 'jquery';
|
|
4
3
|
import 'datatables.net';
|
|
5
4
|
import { template, at } from 'lodash';
|
|
@@ -20,7 +19,6 @@ import { ServiceUrlPreProcessor, TranslatePreProcessor, AdvancedFormsModule } fr
|
|
|
20
19
|
import { FormioModule } from 'angular-formio';
|
|
21
20
|
import { ActivatedRoute, Router, NavigationStart, RouterModule } from '@angular/router';
|
|
22
21
|
import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap/modal';
|
|
23
|
-
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
|
|
24
22
|
import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
|
|
25
23
|
import { GroupByPipe, NgPipesModule } from 'ngx-pipes';
|
|
26
24
|
|
|
@@ -34,50 +32,13 @@ class AdvancedColumnFormatter {
|
|
|
34
32
|
AdvancedColumnFormatter.templateCache.set(expr, result);
|
|
35
33
|
return result;
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class NestedPropertyFormatter extends AdvancedColumnFormatter {
|
|
40
|
-
render(data, type, row, meta) {
|
|
41
|
-
// get column
|
|
42
|
-
const column = meta.settings.aoColumns[meta.col];
|
|
43
|
-
if (column && column.data) {
|
|
44
|
-
return at(row, column.data.replace(/\//g, '.'));
|
|
45
|
-
}
|
|
46
|
-
return data;
|
|
47
|
-
}
|
|
48
|
-
constructor() {
|
|
49
|
-
super();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
class ButtonFormatter extends AdvancedColumnFormatter {
|
|
53
|
-
render(data, type, row, meta) {
|
|
54
|
-
if (data == null) {
|
|
55
|
-
return '';
|
|
56
|
-
}
|
|
57
|
-
// get column
|
|
58
|
-
const column = meta.settings.aoColumns[meta.col];
|
|
59
|
-
// get format options
|
|
60
|
-
const formatOptions = Object.assign({
|
|
61
|
-
buttonClass: 'btn btn-default',
|
|
62
|
-
}, this.formatOptions);
|
|
63
|
-
// get text content
|
|
64
|
-
let buttonText;
|
|
65
|
-
let buttonTitle = '';
|
|
66
|
-
if (formatOptions.buttonText) {
|
|
67
|
-
buttonText = this.injector.get(TranslateService).instant(formatOptions.buttonText);
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
buttonText = formatOptions.buttonContent;
|
|
71
|
-
}
|
|
72
|
-
if (formatOptions.buttonTitle) {
|
|
73
|
-
buttonTitle = this.injector.get(TranslateService).instant(formatOptions.buttonTitle);
|
|
74
|
-
}
|
|
75
|
-
if (Array.isArray(this.formatOptions.commands)) {
|
|
35
|
+
createUrlTree(data, options) {
|
|
36
|
+
if (Array.isArray(options.commands)) {
|
|
76
37
|
const activatedRoute = this.injector.get(ActivatedRoute);
|
|
77
38
|
const router = this.injector.get(Router);
|
|
78
|
-
const commands =
|
|
39
|
+
const commands = options.commands.map((command) => {
|
|
79
40
|
if (typeof command === 'string') {
|
|
80
|
-
return AdvancedColumnFormatter.template(command)(
|
|
41
|
+
return AdvancedColumnFormatter.template(command)(data);
|
|
81
42
|
}
|
|
82
43
|
if (command.outlets) {
|
|
83
44
|
const commandOutlets = {};
|
|
@@ -90,7 +51,7 @@ class ButtonFormatter extends AdvancedColumnFormatter {
|
|
|
90
51
|
configurable: true,
|
|
91
52
|
writable: true,
|
|
92
53
|
value: outlet.map((x) => {
|
|
93
|
-
return AdvancedColumnFormatter.template(x)(
|
|
54
|
+
return AdvancedColumnFormatter.template(x)(data);
|
|
94
55
|
}),
|
|
95
56
|
});
|
|
96
57
|
}
|
|
@@ -112,24 +73,67 @@ class ButtonFormatter extends AdvancedColumnFormatter {
|
|
|
112
73
|
});
|
|
113
74
|
const queryParams = {};
|
|
114
75
|
let replaceUrl = true;
|
|
115
|
-
if (
|
|
116
|
-
Object.keys(
|
|
117
|
-
|
|
76
|
+
if (options.navigationExtras && options.navigationExtras.queryParams) {
|
|
77
|
+
Object.keys(options.navigationExtras.queryParams).map((key) => {
|
|
78
|
+
const text = options.navigationExtras.queryParams[key];
|
|
79
|
+
queryParams[key] = AdvancedColumnFormatter.template(text)(data);
|
|
118
80
|
});
|
|
119
81
|
}
|
|
120
|
-
if (
|
|
121
|
-
replaceUrl =
|
|
82
|
+
if (options.navigationExtras && typeof options.navigationExtras.replaceUrl !== 'undefined') {
|
|
83
|
+
replaceUrl = options.navigationExtras.replaceUrl;
|
|
122
84
|
}
|
|
123
85
|
let skipLocationChange = false;
|
|
124
|
-
if (
|
|
125
|
-
skipLocationChange =
|
|
86
|
+
if (options.navigationExtras && typeof options.navigationExtras.skipLocationChange !== 'undefined') {
|
|
87
|
+
skipLocationChange = options.navigationExtras.skipLocationChange;
|
|
126
88
|
}
|
|
127
|
-
|
|
89
|
+
return router.createUrlTree(commands, {
|
|
128
90
|
relativeTo: activatedRoute,
|
|
129
91
|
queryParams,
|
|
130
92
|
replaceUrl,
|
|
131
93
|
skipLocationChange,
|
|
132
|
-
})
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
AdvancedColumnFormatter.templateCache = new Map();
|
|
99
|
+
class NestedPropertyFormatter extends AdvancedColumnFormatter {
|
|
100
|
+
render(data, type, row, meta) {
|
|
101
|
+
// get column
|
|
102
|
+
const column = meta.settings.aoColumns[meta.col];
|
|
103
|
+
if (column && column.data) {
|
|
104
|
+
return at(row, column.data.replace(/\//g, '.'));
|
|
105
|
+
}
|
|
106
|
+
return data;
|
|
107
|
+
}
|
|
108
|
+
constructor() {
|
|
109
|
+
super();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
class ButtonFormatter extends AdvancedColumnFormatter {
|
|
113
|
+
render(data, type, row, meta) {
|
|
114
|
+
if (data == null) {
|
|
115
|
+
return '';
|
|
116
|
+
}
|
|
117
|
+
// get column
|
|
118
|
+
const column = meta.settings.aoColumns[meta.col];
|
|
119
|
+
// get format options
|
|
120
|
+
const formatOptions = Object.assign({
|
|
121
|
+
buttonClass: 'btn btn-default',
|
|
122
|
+
}, this.formatOptions);
|
|
123
|
+
// get text content
|
|
124
|
+
let buttonText;
|
|
125
|
+
let buttonTitle = '';
|
|
126
|
+
if (formatOptions.buttonText) {
|
|
127
|
+
buttonText = this.injector.get(TranslateService).instant(formatOptions.buttonText);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
buttonText = formatOptions.buttonContent;
|
|
131
|
+
}
|
|
132
|
+
if (formatOptions.buttonTitle) {
|
|
133
|
+
buttonTitle = this.injector.get(TranslateService).instant(formatOptions.buttonTitle);
|
|
134
|
+
}
|
|
135
|
+
if (Array.isArray(this.formatOptions.commands)) {
|
|
136
|
+
const routerLink = this.createUrlTree(row, this.formatOptions);
|
|
133
137
|
return `<a class="${formatOptions.buttonClass}" title="${buttonTitle}" href="#${routerLink}">${buttonText}</a>`;
|
|
134
138
|
}
|
|
135
139
|
// and return button
|
|
@@ -168,13 +172,21 @@ class ActionLinkFormatter extends AdvancedColumnFormatter {
|
|
|
168
172
|
}
|
|
169
173
|
// return the dropdown menu with 3 dots
|
|
170
174
|
return `<div class='dropdown details-control' data-id='${data}' data-type='student' >
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
<a id="dropdownMenuButton-${data}"
|
|
176
|
+
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
177
|
+
<span class="fa-2x text-dots"></span>
|
|
178
|
+
</a>
|
|
173
179
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton-${data}">
|
|
174
180
|
${actions.map((x) => {
|
|
175
181
|
if (x.type === 'divider') {
|
|
176
182
|
return `<div class="dropdown-divider"></div>`;
|
|
177
183
|
}
|
|
184
|
+
if (x.formatOptions && x.formatOptions.commands) {
|
|
185
|
+
const urlTree = this.createUrlTree(row, x.formatOptions);
|
|
186
|
+
return `<a data-name='${x.name}' class="dropdown-item" href="${urlTree.toString()}">
|
|
187
|
+
${this.injector.get(TranslateService).instant(x.title)}
|
|
188
|
+
</a>`;
|
|
189
|
+
}
|
|
178
190
|
return `<a data-name='${x.name}' class="dropdown-item" href="${AdvancedColumnFormatter.template(x.href)(row)}">
|
|
179
191
|
${this.injector.get(TranslateService).instant(x.title)}
|
|
180
192
|
</a>`;
|
|
@@ -189,9 +201,133 @@ class ActionLinkFormatter extends AdvancedColumnFormatter {
|
|
|
189
201
|
super();
|
|
190
202
|
}
|
|
191
203
|
afterRender(cell, cellData, rowData, rowIndex, colIndex) {
|
|
192
|
-
// assign bootstrap dropdown
|
|
193
|
-
|
|
194
|
-
|
|
204
|
+
// assign bootstrap dropdown (?)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
class ActionButtonFormatter extends AdvancedColumnFormatter {
|
|
208
|
+
render(data, type, row, meta) {
|
|
209
|
+
// get column
|
|
210
|
+
const column = meta.settings.aoColumns[meta.col];
|
|
211
|
+
if (column && column.data) {
|
|
212
|
+
const actions = this.actions || [];
|
|
213
|
+
let index = 1;
|
|
214
|
+
for (const action of actions) {
|
|
215
|
+
Object.assign(action, {
|
|
216
|
+
name: action.name || `action${index}`,
|
|
217
|
+
});
|
|
218
|
+
index += 1;
|
|
219
|
+
}
|
|
220
|
+
let buttonText;
|
|
221
|
+
if (this.formatOptions && this.formatOptions.buttonText) {
|
|
222
|
+
// if button text is a literal expression
|
|
223
|
+
if (this.formatOptions.buttonText.includes('${')) {
|
|
224
|
+
// use template
|
|
225
|
+
buttonText = AdvancedColumnFormatter.template(this.formatOptions.buttonText)(row);
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
// otherwise translate it
|
|
229
|
+
buttonText = this.injector.get(TranslateService).instant(this.formatOptions.buttonText);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let buttonTitle;
|
|
233
|
+
if (this.formatOptions && this.formatOptions.buttonTitle) {
|
|
234
|
+
buttonTitle = this.injector.get(TranslateService).instant(this.formatOptions.buttonTbuttonTitleext);
|
|
235
|
+
}
|
|
236
|
+
const buttonClass = (this.formatOptions && this.formatOptions.buttonClass) || 'btn btn-light';
|
|
237
|
+
// return the dropdown menu with 3 dots
|
|
238
|
+
return `<div class='dropdown details-control' data-id='${data}'>
|
|
239
|
+
<a class="${buttonClass} dropdown-toggle" href="#" role="button" title="${buttonTitle}"
|
|
240
|
+
id="dropdownMenuButton-${data}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
241
|
+
${buttonText}
|
|
242
|
+
</a>
|
|
243
|
+
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton-${data}">
|
|
244
|
+
${actions.map((x) => {
|
|
245
|
+
if (x.type === 'divider') {
|
|
246
|
+
return `<div class="dropdown-divider"></div>`;
|
|
247
|
+
}
|
|
248
|
+
if (x.commands) {
|
|
249
|
+
const urlTree = this.createUrlTree(row, x);
|
|
250
|
+
return `<a class="dropdown-item" href="${urlTree.toString()}">
|
|
251
|
+
${this.injector.get(TranslateService).instant(x.title)}
|
|
252
|
+
</a>`;
|
|
253
|
+
}
|
|
254
|
+
return `<a class="dropdown-item" href="${AdvancedColumnFormatter.template(x.href)(row)}">
|
|
255
|
+
${this.injector.get(TranslateService).instant(x.title)}
|
|
256
|
+
</a>`;
|
|
257
|
+
})
|
|
258
|
+
.join('')}
|
|
259
|
+
</div>
|
|
260
|
+
</div>`;
|
|
261
|
+
}
|
|
262
|
+
return data;
|
|
263
|
+
}
|
|
264
|
+
constructor() {
|
|
265
|
+
super();
|
|
266
|
+
}
|
|
267
|
+
afterRender(cell, cellData, rowData, rowIndex, colIndex) {
|
|
268
|
+
// assign bootstrap dropdown (?)
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
class ActionSplitButtonFormatter extends AdvancedColumnFormatter {
|
|
272
|
+
render(data, type, row, meta) {
|
|
273
|
+
// get column
|
|
274
|
+
const column = meta.settings.aoColumns[meta.col];
|
|
275
|
+
if (column && column.data) {
|
|
276
|
+
const actions = this.actions || [];
|
|
277
|
+
let index = 1;
|
|
278
|
+
for (const action of actions) {
|
|
279
|
+
Object.assign(action, {
|
|
280
|
+
name: action.name || `action${index}`,
|
|
281
|
+
});
|
|
282
|
+
index += 1;
|
|
283
|
+
}
|
|
284
|
+
if (actions.length === 0) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const buttonClass = (this.formatOptions && this.formatOptions.buttonClass) || 'btn btn-light';
|
|
288
|
+
// return the dropdown menu with 3 dots
|
|
289
|
+
const defaultAction = actions[0];
|
|
290
|
+
let defaultActionHref;
|
|
291
|
+
if (defaultAction && defaultAction.commands) {
|
|
292
|
+
defaultActionHref = this.createUrlTree(row, defaultAction).toString();
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
defaultActionHref = AdvancedColumnFormatter.template(defaultAction.href)(row);
|
|
296
|
+
}
|
|
297
|
+
return `<div class="btn-group">
|
|
298
|
+
<a type="button" class="${buttonClass}" href="${defaultActionHref}">
|
|
299
|
+
${this.injector.get(TranslateService).instant(defaultAction.title)}
|
|
300
|
+
</a>
|
|
301
|
+
<button type="button" class="${buttonClass} dropdown-toggle dropdown-toggle-split"
|
|
302
|
+
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
303
|
+
<span class="sr-only">${this.injector.get(TranslateService).instant('Toggle Dropdown')}</span>
|
|
304
|
+
</button>
|
|
305
|
+
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton-${data}">
|
|
306
|
+
${actions.map((x) => {
|
|
307
|
+
if (x.title === '-') {
|
|
308
|
+
return `<div class="dropdown-divider"></div>`;
|
|
309
|
+
}
|
|
310
|
+
if (x.commands) {
|
|
311
|
+
const urlTree = this.createUrlTree(row, x);
|
|
312
|
+
return `<a class="dropdown-item" href="${urlTree.toString()}">
|
|
313
|
+
${this.injector.get(TranslateService).instant(x.title)}
|
|
314
|
+
</a>`;
|
|
315
|
+
}
|
|
316
|
+
return `<a class="dropdown-item" href="${AdvancedColumnFormatter.template(x.href)(row)}">
|
|
317
|
+
${this.injector.get(TranslateService).instant(x.title)}
|
|
318
|
+
</a>`;
|
|
319
|
+
})
|
|
320
|
+
.join('')}
|
|
321
|
+
</div>
|
|
322
|
+
</div>`;
|
|
323
|
+
}
|
|
324
|
+
return data;
|
|
325
|
+
}
|
|
326
|
+
constructor() {
|
|
327
|
+
super();
|
|
328
|
+
}
|
|
329
|
+
afterRender(cell, cellData, rowData, rowIndex, colIndex) {
|
|
330
|
+
// assign bootstrap dropdown (?)
|
|
195
331
|
}
|
|
196
332
|
}
|
|
197
333
|
class SelectRowFormatter extends AdvancedColumnFormatter {
|
|
@@ -399,7 +535,7 @@ class AdvancedTableComponent {
|
|
|
399
535
|
this.configChanges = new BehaviorSubject(null);
|
|
400
536
|
this.height = 800;
|
|
401
537
|
this.showActions = true;
|
|
402
|
-
this.autoLoad =
|
|
538
|
+
this.autoLoad = true;
|
|
403
539
|
this.load = new EventEmitter();
|
|
404
540
|
this.init = new EventEmitter();
|
|
405
541
|
this.reload = new EventEmitter();
|
|
@@ -837,7 +973,7 @@ class AdvancedTableComponent {
|
|
|
837
973
|
});
|
|
838
974
|
if (items.length > 0) {
|
|
839
975
|
Object.assign(columnDefinition, {
|
|
840
|
-
|
|
976
|
+
createdCell(cell, cellData, rowData, rowIndex, colIndex) {
|
|
841
977
|
items.forEach((columnFormatter) => {
|
|
842
978
|
const formatter = self._columnFormatters[columnFormatter.formatter];
|
|
843
979
|
if (formatter && typeof formatter.afterRender === 'function') {
|
|
@@ -855,6 +991,14 @@ class AdvancedTableComponent {
|
|
|
855
991
|
render: formatter.render.bind(column),
|
|
856
992
|
});
|
|
857
993
|
}
|
|
994
|
+
if (formatter && typeof formatter.afterRender === 'function') {
|
|
995
|
+
Object.assign(columnDefinition, {
|
|
996
|
+
render: formatter.render.bind(column),
|
|
997
|
+
});
|
|
998
|
+
Object.assign(columnDefinition, {
|
|
999
|
+
createdCell: formatter.afterRender.bind(column),
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
858
1002
|
}
|
|
859
1003
|
return columnDefinition;
|
|
860
1004
|
});
|
|
@@ -914,7 +1058,8 @@ class AdvancedTableComponent {
|
|
|
914
1058
|
self.select.emit(row);
|
|
915
1059
|
});
|
|
916
1060
|
}
|
|
917
|
-
tableElement.find('input.s-row')
|
|
1061
|
+
const elements = tableElement.find('input.s-row');
|
|
1062
|
+
elements.off('click').on('click', this.onSelectionChange.bind(this));
|
|
918
1063
|
// make selection on current page
|
|
919
1064
|
const key = this.config.columns[0].property;
|
|
920
1065
|
if (this.selected.length > 0) {
|
|
@@ -1126,6 +1271,7 @@ class AdvancedTableComponent {
|
|
|
1126
1271
|
}
|
|
1127
1272
|
else {
|
|
1128
1273
|
Object.assign(settings, {
|
|
1274
|
+
scrollY: this.scrollY,
|
|
1129
1275
|
paging: this.paging,
|
|
1130
1276
|
pageLength: this.pageLength,
|
|
1131
1277
|
});
|
|
@@ -1231,7 +1377,7 @@ class AdvancedTableComponent {
|
|
|
1231
1377
|
if (item) {
|
|
1232
1378
|
// redraw row
|
|
1233
1379
|
row.data(item);
|
|
1234
|
-
jQuery(row.node()).find(':checkbox').on('click', this.onSelectionChange.bind(this));
|
|
1380
|
+
jQuery(row.node()).find(':checkbox').off('click').on('click', this.onSelectionChange.bind(this));
|
|
1235
1381
|
// if row is already selected
|
|
1236
1382
|
if (checked) {
|
|
1237
1383
|
this.selectRow(row, true);
|
|
@@ -1269,6 +1415,7 @@ class AdvancedTableComponent {
|
|
|
1269
1415
|
if (findItemIndex < 0) {
|
|
1270
1416
|
// add row to selected rows
|
|
1271
1417
|
this.selected.push(row);
|
|
1418
|
+
this.selectedItems.emit(this.selected);
|
|
1272
1419
|
}
|
|
1273
1420
|
}
|
|
1274
1421
|
else {
|
|
@@ -1282,6 +1429,7 @@ class AdvancedTableComponent {
|
|
|
1282
1429
|
});
|
|
1283
1430
|
if (findItemIndex < 0) {
|
|
1284
1431
|
this.unselected.push(row);
|
|
1432
|
+
this.selectedItems.emit(this.selected);
|
|
1285
1433
|
}
|
|
1286
1434
|
}
|
|
1287
1435
|
}
|
|
@@ -1363,7 +1511,7 @@ AdvancedTableComponent.decorators = [
|
|
|
1363
1511
|
</div>
|
|
1364
1512
|
`,
|
|
1365
1513
|
encapsulation: ViewEncapsulation.None,
|
|
1366
|
-
styles: ["table.dataTable thead .sorting{background-image:none}table.dataTable thead .sorting_asc{background-position:95% 60%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsSAAALEgHS3X78AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAEtJREFUKJFjYBgywAOKMQALFjE/BgaGTCibjYGBYRM+kz0ZGBh2MTAw8DAwMHAxMDBsY2BgCCBGMQzg1IRNMV5NuVAJXIALqmYwAgBBkAlPRCLcLwAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-position:95% 60%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAArzAAAK8wHvFRX1AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAFNJREFUKJHVzTEKgDAQRNGHZfBg2sSTeDMLKwXPYuVJbBKQQEyrH6bZ+cPyWWaElz4kR5cOJ1b0FXnBVRYjjmIUsGGqvX6OmnImYk+JLTkzpPyBGwrtCvfBe56nAAAAAElFTkSuQmCC)}table.dataTable thead th{color:#73818e;font-size:.75rem;font-weight:600;padding-top:16px;padding-bottom:4px;border-bottom:none;padding-left:8px}table.dataTable tbody tr:first-child td:first-child{border-radius:6px 0}table.dataTable tbody tr:first-child td:last-child{border-radius:0 6px}table.dataTable tbody tr{border-radius:6px}table.dataTable tbody tr td:first-child{border-left:1px solid #c2cfd6}table.dataTable tbody tr td:last-child{border-right:1px solid #c2cfd6}table.dataTable tbody tr td{padding-top:
|
|
1514
|
+
styles: ["table.dataTable thead .sorting{background-image:none}table.dataTable thead .sorting_asc{background-position:95% 60%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsSAAALEgHS3X78AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAEtJREFUKJFjYBgywAOKMQALFjE/BgaGTCibjYGBYRM+kz0ZGBh2MTAw8DAwMHAxMDBsY2BgCCBGMQzg1IRNMV5NuVAJXIALqmYwAgBBkAlPRCLcLwAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc{background-position:95% 60%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAArzAAAK8wHvFRX1AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAFNJREFUKJHVzTEKgDAQRNGHZfBg2sSTeDMLKwXPYuVJbBKQQEyrH6bZ+cPyWWaElz4kR5cOJ1b0FXnBVRYjjmIUsGGqvX6OmnImYk+JLTkzpPyBGwrtCvfBe56nAAAAAElFTkSuQmCC)}table.dataTable thead th{color:#73818e;font-size:.75rem;font-weight:600;padding-top:16px;padding-bottom:4px;border-bottom:none;padding-left:8px}table.dataTable tbody tr:first-child td:first-child{border-radius:6px 0}table.dataTable tbody tr:first-child td:last-child{border-radius:0 6px}table.dataTable tbody tr{border-radius:6px}table.dataTable tbody tr td:first-child{border-left:1px solid #c2cfd6}table.dataTable tbody tr td:last-child{border-right:1px solid #c2cfd6}table.dataTable tbody tr td{padding-top:8px;padding-bottom:8px;border-top:1px solid #c2cfd6}table.dataTable tbody tr:last-child td:first-child{border-radius:0 0 0 6px}table.dataTable tbody tr:last-child td:last-child{border-radius:0 0 6px}table.dataTable tbody tr:last-child td{border-bottom:1px solid #c2cfd6}table.dataTable td.dataTables_empty{border:none!important}table.dataTable.no-footer{border-bottom:none}.dataTables_paginate .btn.previous{margin-right:8px}.dataTables_paginate .btn.next{margin-left:8px}.dataTables_info,.dataTables_paginate{margin-top:1rem}.dataTables_paginate span .btn{border-radius:1.5rem}.dataTables_filter{display:none}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:0;overflow:auto}.dataTables_paginate{display:none}.dataTable.processing{opacity:15%}.dataTables_wrapper .dataTables_processing{background:0 0;position:absolute;display:inline-block;top:25%;z-index:5;color:#73818e}.text-decoration-line-through{text-decoration:line-through!important}tr.removed .checkbox+label{visibility:hidden}"]
|
|
1367
1515
|
}] }
|
|
1368
1516
|
];
|
|
1369
1517
|
/** @nocollapse */
|
|
@@ -1446,16 +1594,16 @@ const AdvancedTableModalBaseTemplate = `
|
|
|
1446
1594
|
<button class="btn btn-gray-100">
|
|
1447
1595
|
<i class="fa fa-sliders-h pr-2 text-secondary" aria-hidden="true"></i>{{'Tables.Filters' | translate}}
|
|
1448
1596
|
</button>
|
|
1449
|
-
<div #dropdownFilter class="dropdown ml-3"
|
|
1597
|
+
<div #dropdownFilter class="dropdown ml-3">
|
|
1450
1598
|
<button class="btn btn-gray-100 dropdown-toggle"
|
|
1451
1599
|
type="button" id="dropdownDefaultFilters"
|
|
1452
1600
|
data-toggle="dropdown" dropdownToggle>
|
|
1453
1601
|
{{ this.defaultFilter.name | translate }}
|
|
1454
1602
|
</button>
|
|
1455
|
-
<div class="dropdown-menu" aria-labelledby="dropdownDefaultFilters"
|
|
1456
|
-
<
|
|
1603
|
+
<div class="dropdown-menu" aria-labelledby="dropdownDefaultFilters">
|
|
1604
|
+
<button type="button" class="dropdown-item" *ngFor="let filter of defaultFilters" (click)="onFilterSelect(filter)">
|
|
1457
1605
|
{{ filter.name | translate }}
|
|
1458
|
-
</
|
|
1606
|
+
</button>
|
|
1459
1607
|
</div>
|
|
1460
1608
|
</div>
|
|
1461
1609
|
</div>
|
|
@@ -1482,13 +1630,13 @@ const AdvancedTableModalBaseTemplate = `
|
|
|
1482
1630
|
<div class="row mt-3 table-custom-pager">
|
|
1483
1631
|
<div class="col-12 d-flex" *ngIf="recordsTotal">
|
|
1484
1632
|
<div class="mt-2 ml-auto mr-3 text-secondary" [translate]="'Tables.RecordsPerPage'"></div>
|
|
1485
|
-
<div #dropdownLength class="dropdown mr-3"
|
|
1633
|
+
<div #dropdownLength class="dropdown mr-3">
|
|
1486
1634
|
<button class="btn btn-gray-100 dropdown-toggle"
|
|
1487
1635
|
type="button" id="dropdownPageSize" data-toggle="dropdown"
|
|
1488
1636
|
dropdownToggle>
|
|
1489
1637
|
{{pageLength}}
|
|
1490
1638
|
</button>
|
|
1491
|
-
<div class="dropdown-menu" aria-labelledby="dropdownPageSize"
|
|
1639
|
+
<div class="dropdown-menu" aria-labelledby="dropdownPageSize">
|
|
1492
1640
|
<button (click)="setLength(item)"
|
|
1493
1641
|
class="dropdown-item dropdown-item-theme"
|
|
1494
1642
|
type="button" *ngFor="let item of lengthMenu">{{item}}</button>
|
|
@@ -1675,13 +1823,16 @@ class AdvancedTableModalBaseComponent extends RouterModalOkCancel {
|
|
|
1675
1823
|
getFilters(tableConfig, defaultFilterValues = {}, searchItem) {
|
|
1676
1824
|
// Do nothing in absence of configuration.
|
|
1677
1825
|
if (!tableConfig || !Array.isArray(tableConfig.criteria)) {
|
|
1678
|
-
|
|
1826
|
+
return [];
|
|
1827
|
+
}
|
|
1828
|
+
if (searchItem.filter == null) {
|
|
1679
1829
|
return [];
|
|
1680
1830
|
}
|
|
1681
1831
|
const matchedCriterion = tableConfig.criteria.find(criterion => Object.prototype.hasOwnProperty.call(searchItem.filter, criterion.name));
|
|
1682
|
-
if (
|
|
1832
|
+
if (matchedCriterion == null) {
|
|
1683
1833
|
return [];
|
|
1684
1834
|
}
|
|
1835
|
+
const value = searchItem.filter[matchedCriterion.name];
|
|
1685
1836
|
const criterionSafeName = matchedCriterion.name !== null
|
|
1686
1837
|
? matchedCriterion.name.toString()
|
|
1687
1838
|
: '';
|
|
@@ -1695,7 +1846,7 @@ class AdvancedTableModalBaseComponent extends RouterModalOkCancel {
|
|
|
1695
1846
|
}
|
|
1696
1847
|
else if (criterionSafeName !== 'undefined') {
|
|
1697
1848
|
applicableFilter = (this._template.transform(matchedCriterion.filter, Object.assign({
|
|
1698
|
-
value:
|
|
1849
|
+
value: value
|
|
1699
1850
|
}, defaultFilterValues)));
|
|
1700
1851
|
}
|
|
1701
1852
|
else {
|
|
@@ -1703,6 +1854,9 @@ class AdvancedTableModalBaseComponent extends RouterModalOkCancel {
|
|
|
1703
1854
|
}
|
|
1704
1855
|
return [applicableFilter];
|
|
1705
1856
|
}
|
|
1857
|
+
onFilterSelect(value) {
|
|
1858
|
+
this.advancedSearch(value);
|
|
1859
|
+
}
|
|
1706
1860
|
/**
|
|
1707
1861
|
*
|
|
1708
1862
|
* Runs a filter against the modal table
|
|
@@ -1750,6 +1904,7 @@ AdvancedTableModalBaseComponent.DEFAULT_ALL_FILTER = {
|
|
|
1750
1904
|
};
|
|
1751
1905
|
AdvancedTableModalBaseComponent.decorators = [
|
|
1752
1906
|
{ type: Component, args: [{
|
|
1907
|
+
// tslint:disable-next-line: component-selector
|
|
1753
1908
|
selector: 'app-advanced-table-modal',
|
|
1754
1909
|
template: AdvancedTableModalBaseTemplate,
|
|
1755
1910
|
styles: [`
|
|
@@ -2677,7 +2832,7 @@ AdvancedSelectComponent.decorators = [
|
|
|
2677
2832
|
{ type: Component, args: [{
|
|
2678
2833
|
// tslint:disable-next-line: component-selector
|
|
2679
2834
|
selector: 'app-advanced-select',
|
|
2680
|
-
template: "<div class=\"modal-header\" *ngIf=\"modalTitle\">\n <h5 class=\"modal-title\">{{modalTitle | translate}}</h5>\n <button [disabled]=\"cancelButtonDisabled\" (click)=\"cancel()\" type=\"button\" class=\"close\" data-dismiss=\"modal\"\n aria-label=\"Cancel\">\n <span aria-hidden=\"true\">×</span>\n </button>\n</div>\n<div class=\"modal-body\">\n <div>\n <!-- search -->\n <div class=\"row mt-3\">\n <div class=\"col-12 col-lg-3\">\n <div class=\"input-group mb-3\">\n <input spellcheck=\"false\" type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"searchText\"\n class=\"form-control bg-gray-100 border-0\" placeholder=\"{{'Tables.SearchPlaceholder' | translate}}\"\n aria-label=\"Search\" aria-describedby=\"basic-addon2\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-default bg-gray-100 border-0\" type=\"button\">\n <i class=\"fa fa-search text-secondary\"></i>\n </button>\n </div>\n </div>\n </div>\n <div #emptyTable class=\"d-none\">\n <div>\n <div class=\"mt-4\">\n <div class=\"icon-circle bg-gray-300 border-gray-100\"></div>\n </div>\n <div class=\"mt-4\">\n <h4 class=\"font-3xl text-dark\" [translate]=\"'Tables.EmptyTableTitle'\"></h4>\n <p class=\"font-lg text-dark\" [translate]=\"'Tables.EmptyTableMessage'\"></p>\n </div>\n\n </div>\n </div>\n <div class=\"col-12 col-lg-5\">\n <div class=\"btn-toolbar\">\n <button class=\"btn btn-gray-100\">\n <i class=\"fa fa-sliders-h pr-2 text-secondary\" aria-hidden=\"true\"></i>{{'Tables.Filters' | translate}}\n </button>\n <div class=\"dropdown ml-3\"
|
|
2835
|
+
template: "<div class=\"modal-header\" *ngIf=\"modalTitle\">\n <h5 class=\"modal-title\">{{modalTitle | translate}}</h5>\n <button [disabled]=\"cancelButtonDisabled\" (click)=\"cancel()\" type=\"button\" class=\"close\" data-dismiss=\"modal\"\n aria-label=\"Cancel\">\n <span aria-hidden=\"true\">×</span>\n </button>\n</div>\n<div class=\"modal-body\">\n <div>\n <!-- search -->\n <div class=\"row mt-3\">\n <div class=\"col-12 col-lg-3\">\n <div class=\"input-group mb-3\">\n <input spellcheck=\"false\" type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"searchText\"\n class=\"form-control bg-gray-100 border-0\" placeholder=\"{{'Tables.SearchPlaceholder' | translate}}\"\n aria-label=\"Search\" aria-describedby=\"basic-addon2\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-default bg-gray-100 border-0\" type=\"button\">\n <i class=\"fa fa-search text-secondary\"></i>\n </button>\n </div>\n </div>\n </div>\n <div #emptyTable class=\"d-none\">\n <div>\n <div class=\"mt-4\">\n <div class=\"icon-circle bg-gray-300 border-gray-100\"></div>\n </div>\n <div class=\"mt-4\">\n <h4 class=\"font-3xl text-dark\" [translate]=\"'Tables.EmptyTableTitle'\"></h4>\n <p class=\"font-lg text-dark\" [translate]=\"'Tables.EmptyTableMessage'\"></p>\n </div>\n\n </div>\n </div>\n <div class=\"col-12 col-lg-5\">\n <div class=\"btn-toolbar\">\n <button class=\"btn btn-gray-100\">\n <i class=\"fa fa-sliders-h pr-2 text-secondary\" aria-hidden=\"true\"></i>{{'Tables.Filters' | translate}}\n </button>\n <div class=\"dropdown ml-3\">\n <button dropdownToggle class=\"btn btn-gray-100 dropdown-toggle\" type=\"button\" id=\"dropdownDefaultFilters\"\n data-toggle=\"dropdown\">\n {{ this.defaultFilter.name | translate }}\n </button>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownDefaultFilters\">\n <a class=\"dropdown-item\" *ngFor=\"let filter of defaultFilters\"\n (click)=\"advancedSearch(filter.filter ? filter : '')\">\n {{ filter.name | translate }}\n </a>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col text-lg-right mt-3 mt-lg-0\">\n <button [disabled]=\"true\" class=\"btn rounded-pill btn-outline-theme\">\n <span class=\"pr-2 font-lg\">+</span><span [translate]=\"'Tables.AddItem'\"></span>\n </button>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\" [ngClass]=\"{ 'component-loading': loading}\">\n <app-advanced-table #advancedTable (init)=\"onTableInit($event)\" (load)=\"onDataLoad($event)\"\n [autoLoad]=\"true\"\n [selectable]=\"true\" [multipleSelect]=\"true\" [scrollX]=\"false\" [scrollY]=\"320\" [pageLength]=\"pageLength\"\n [scrollable]=\"false\" [showFooter]=\"false\" [showActions]=\"false\" [lengthMenu]=\"lengthMenu\"\n [config]=\"tableConfig\" [configSrc]=\"tableConfigSrc\"></app-advanced-table>\n </div>\n </div>\n <div class=\"row mt-3 table-custom-pager\">\n <div class=\"col-12 d-flex\" *ngIf=\"recordsTotal\">\n <div class=\"mt-2 ml-auto mr-3 text-secondary\" [translate]=\"'Tables.RecordsPerPage'\"></div>\n <div class=\"dropdown mr-3\">\n <button dropdownToggle class=\"btn btn-gray-100 dropdown-toggle\" type=\"button\" id=\"dropdownPageSize\"\n data-toggle=\"dropdown\">\n {{pageLength}}\n </button>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownPageSize\">\n <button (click)=\"setLength(item)\" class=\"dropdown-item dropdown-item-theme\" type=\"button\"\n *ngFor=\"let item of lengthMenu\">{{item}}</button>\n </div>\n </div>\n <div class=\"mt-2 mr-2\" [translate]=\"'Tables.PageInfo'\" [translateParams]=\"pageInfo\"></div>\n <button [disabled]=\"pageInfo && pageInfo.page === 0\" class=\"btn text-nowrap\" (click)=\"firstPage()\">\n <i class=\"fa fa-chevron-left text-color-theme\"></i>\n <i class=\"fa fa-chevron-left text-color-theme\"></i>\n </button>\n <button [disabled]=\"pageInfo && pageInfo.page===0\" class=\"btn\" (click)=\"previousPage()\">\n <i class=\"fa fa-chevron-left text-color-theme\"></i>\n </button>\n <button [disabled]=\"pageInfo && pageInfo.page===pageInfo.pages-1\" class=\"btn\" (click)=\"nextPage()\">\n <i class=\"fa fa-chevron-right text-color-theme\"></i>\n </button>\n <button [disabled]=\"pageInfo && pageInfo.page===pageInfo.pages-1\" class=\"btn text-nowrap\"\n (click)=\"lastPage()\">\n <i class=\"fa fa-chevron-right text-color-theme\"></i>\n <i class=\"fa fa-chevron-right text-color-theme\"></i>\n </button>\n </div>\n </div>\n </div>\n</div>\n<div class=\"modal-footer justify-content-end\">\n <button [disabled]=\"okButtonDisabled\" (click)=\"ok()\" type=\"button\" [ngClass]=\"okButtonClass\">\n {{okButtonText | translate}}\n </button>\n <button [disabled]=\"cancelButtonDisabled\" (click)=\"cancel()\" type=\"button\" [ngClass]=\"cancelButtonClass\"\n data-dismiss=\"modal\">\n {{ cancelButtonText | translate}}\n </button>\n</div>\n",
|
|
2681
2836
|
encapsulation: ViewEncapsulation.None,
|
|
2682
2837
|
styles: [`
|
|
2683
2838
|
.modal-table .dataTables_wrapper {
|
|
@@ -2921,7 +3076,7 @@ class AdvancedTableSearchComponent extends AdvancedTableSearchBaseComponent {
|
|
|
2921
3076
|
this.collapsed = true;
|
|
2922
3077
|
this.allowSave = true;
|
|
2923
3078
|
this.showMore = true;
|
|
2924
|
-
this.mergeQueryParams =
|
|
3079
|
+
this.mergeQueryParams = false;
|
|
2925
3080
|
this.viewChange = new EventEmitter();
|
|
2926
3081
|
this.userSearchList = [];
|
|
2927
3082
|
this.selectedList = null;
|
|
@@ -3384,7 +3539,7 @@ AdvancedTableSearchComponent.decorators = [
|
|
|
3384
3539
|
{ type: Component, args: [{
|
|
3385
3540
|
// tslint:disable-next-line: component-selector
|
|
3386
3541
|
selector: 'app-advanced-table-search',
|
|
3387
|
-
template: "<div class=\"s--list-navbar d-none d-sm-block\">\n\n <div id=\"collapse-header\" [ngClass]=\"{'show':collapsed}\" class=\"collapse multi-collapse\">\n <form class=\"form-inline p-3 col\">\n <div class=\"form-group col-7\" [ngClass]= \"{ 'col-12': !showMore }\">\n <label class=\"pr-3\" for=\"searchText\" [translate]=\"'Tables.Search'\"></label>\n <input (keydown)=\"onSearchKeyDown($event)\" spellcheck=\"false\" type=\"text\" id=\"searchText\" name=\"searchText\"\n class=\"form-control col text-left\" placeholder=\"{{ 'Tables.SearchPlaceholder' | translate }}\" #searchText>\n </div>\n <div *ngIf=\"showMore\" class=\"col-5 text-right text-secondary\" id=\"heading3\">\n <button class=\"d-inline-block btn btn-link collapsed float-right text-secondary text-decoration-none\"\n type=\"button\" (click)=\"toggleView();\">\n <span class=\"d-none d-sm-inline\" [translate]=\"'AdvancedSearch.More'\"></span>\n <i class=\"ml-2 pt-1 fa fa-chevron-down\"></i>\n </button>\n </div>\n </form>\n </div>\n\n <div id=\"collapse3\" [ngClass]=\"{'show':!collapsed}\" class=\"collapse multi-collapse\" aria-labelledby=\"heading3\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <div id=\"advanced-form\">\n <ng-content select=\"advanced-search\"></ng-content>\n <hr class=\"mt-0 mb-0\" width=\"97%\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <div class=\"form-inline pb-3 pt-3 pr-1 pl-1 col\">\n\n <div class=\"form-group col-4\">\n <div class=\"d-flex flex-row w-100\" *ngIf=\"allowSave\">\n <label class=\"pr-3 d-none\" [translate]=\"'AdvancedSearch.SavedSearches'\"></label>\n <select *ngIf=\"userSearchList\" class=\"custom-select text-secondary flex col-12\" (change)=\"onSelectUserSearch($event)\" [(ngModel)]=\"selectedList\">\n <option [ngValue]=\"null\" [translate]=\"'AdvancedSearch.Choose'\"></option>\n <option *ngFor=\"let item of userSearchList\" [ngValue]=\"item\">{{ item.name }}</option>\n </select>\n <select *ngIf=\"!userSearchList\" class=\"custom-select flex col-6\">\n <option [value]=\"null\" [translate]=\"'AdvancedSearch.Choose'\"></option>\n </select>\n </div>\n </div>\n\n <div class=\"col-3 d-flex flex-row w-100\">\n <div class=\"btn-group\" *ngIf=\"allowSave\"
|
|
3542
|
+
template: "<div class=\"s--list-navbar d-none d-sm-block\">\n\n <div id=\"collapse-header\" [ngClass]=\"{'show':collapsed}\" class=\"collapse multi-collapse\">\n <form class=\"form-inline p-3 col\">\n <div class=\"form-group col-7\" [ngClass]= \"{ 'col-12': !showMore }\">\n <label class=\"pr-3\" for=\"searchText\" [translate]=\"'Tables.Search'\"></label>\n <input (keydown)=\"onSearchKeyDown($event)\" spellcheck=\"false\" type=\"text\" id=\"searchText\" name=\"searchText\"\n class=\"form-control col text-left\" placeholder=\"{{ 'Tables.SearchPlaceholder' | translate }}\" #searchText>\n </div>\n <div *ngIf=\"showMore\" class=\"col-5 text-right text-secondary\" id=\"heading3\">\n <button class=\"d-inline-block btn btn-link collapsed float-right text-secondary text-decoration-none\"\n type=\"button\" (click)=\"toggleView();\">\n <span class=\"d-none d-sm-inline\" [translate]=\"'AdvancedSearch.More'\"></span>\n <i class=\"ml-2 pt-1 fa fa-chevron-down\"></i>\n </button>\n </div>\n </form>\n </div>\n\n <div id=\"collapse3\" [ngClass]=\"{'show':!collapsed}\" class=\"collapse multi-collapse\" aria-labelledby=\"heading3\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <div id=\"advanced-form\">\n <ng-content select=\"advanced-search\"></ng-content>\n <hr class=\"mt-0 mb-0\" width=\"97%\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <div class=\"form-inline pb-3 pt-3 pr-1 pl-1 col\">\n\n <div class=\"form-group col-4\">\n <div class=\"d-flex flex-row w-100\" *ngIf=\"allowSave\">\n <label class=\"pr-3 d-none\" [translate]=\"'AdvancedSearch.SavedSearches'\"></label>\n <select *ngIf=\"userSearchList\" class=\"custom-select text-secondary flex col-12\" (change)=\"onSelectUserSearch($event)\" [(ngModel)]=\"selectedList\">\n <option [ngValue]=\"null\" [translate]=\"'AdvancedSearch.Choose'\"></option>\n <option *ngFor=\"let item of userSearchList\" [ngValue]=\"item\">{{ item.name }}</option>\n </select>\n <select *ngIf=\"!userSearchList\" class=\"custom-select flex col-6\">\n <option [value]=\"null\" [translate]=\"'AdvancedSearch.Choose'\"></option>\n </select>\n </div>\n </div>\n\n <div class=\"col-3 d-flex flex-row w-100\">\n <div class=\"btn-group\" *ngIf=\"allowSave\">\n <button type=\"button\" class=\"btn btn-sm btn-primary\" (click)=\"saveSearch(templateToUse, ( (selectedList && selectedList.readOnly) ? true : false ) )\" [translate]=\"'AdvancedSearch.SaveCurrentSearch'\"></button>\n <button type=\"button\" dropdownToggle class=\"btn btn-sm btn-primary dropdown-toggle dropdown-toggle-split\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <span class=\"sr-only\" [translate]=\"'AdvancedSearch.ToggleDropdown'\"></span>\n </button>\n\n <div class=\"dropdown-menu\">\n <a [ngClass]=\"{'disabled': selectedList && selectedList.readOnly}\" class=\"dropdown-item\" (click)=\"saveSearch(templateToUse, false)\" [translate]=\"'AdvancedSearch.Save'\" href=\"javascript:void(0)\"></a>\n <a class=\"dropdown-item\" (click)=\"saveSearch(templateToUse)\" [translate]=\"'AdvancedSearch.SaveAs'\" href=\"javascript:void(0)\"></a>\n <div class=\"dropdown-divider\"></div>\n <a [ngClass]=\"{'disabled': selectedList && selectedList.readOnly}\" class=\"dropdown-item\" (click)=\"deleteItemFromSavedSearchListByObject(selectedList)\" [translate]=\"'AdvancedSearch.Delete'\" href=\"javascript:void(0)\"></a>\n </div>\n </div>\n </div>\n\n <div class=\"col-5 text-right text-secondary\">\n <button type=\"button\" class=\"btn btn-light text-secondary pl-2 pr-2 mr-2\" (click)=\"clear()\">\n <i class=\"fa fa-eraser\"></i>\n </button>\n <button type=\"button\" class=\"btn btn-success pl-4 pr-4 mr-2\" (click)=\"advancedSearch($event);\"\n [translate]=\"'Tables.Search'\"></button>\n <button class=\"d-inline-block btn btn-link collapsed float-right text-secondary text-decoration-none\"\n type=\"button\" (click)=\"toggleView();\">\n <span class=\"d-none d-sm-inline\" [translate]=\"'AdvancedSearch.Less'\"></span>\n <i class=\"ml-2 pt-1 fa fa-chevron-up\"></i>\n </button>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #templateToUse>\n <div class=\"modal-header\">\n <h4 class=\"modal-title pull-left\" [translate]=\"'AdvancedSearch.Modal.Title'\"></h4>\n <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body mt-0 mb-0 text-center\">\n <div>\n <p class=\"text-secondary text-left\" [translate]=\"'AdvancedSearch.Modal.Help'\"></p>\n </div>\n <form class=\"p-3 text-center\" #newListForm=\"ngForm\" >\n <div [ngVar]=\"{ name: ( selectedList?.name ? ( selectedList?.name + ' (1)' ) : null ) }\" #model=\"ngVar\">\n <input [(ngModel)]=\"model.value.name\" [required]=\"true\" id=\"newListName\" name=\"newListName\" type=\"text\" class=\"form-control\" placeholder=\"{{ 'AdvancedSearch.Modal.SaveNamePlaceholder' | translate }}\"/>\n <div class=\"btn-group mt-4\">\n <button [disabled]=\"newListForm.invalid\" type=\"button\" class=\"btn btn-primary\" (click)=\"confirmModal(model.value.name)\" [translate]=\"'AdvancedSearch.Modal.Accept'\"></button>\n <button type=\"button\" class=\"btn btn-gray-300 text-white\" (click)=\"closeModal()\" [translate]=\"'AdvancedSearch.Modal.Close'\"></button>\n </div>\n </div>\n </form>\n </div>\n </ng-template>\n\n</div>\n",
|
|
3388
3543
|
encapsulation: ViewEncapsulation.None
|
|
3389
3544
|
}] }
|
|
3390
3545
|
];
|
|
@@ -3423,6 +3578,8 @@ const FORMATTERS = {
|
|
|
3423
3578
|
TemplateFormatter: new TemplateFormatter(),
|
|
3424
3579
|
TranslationFormatter: new TranslationFormatter(),
|
|
3425
3580
|
TrueFalseFormatter: new TrueFalseFormatter(),
|
|
3581
|
+
ActionButtonFormatter: new ActionButtonFormatter(),
|
|
3582
|
+
ActionSplitButtonFormatter: new ActionSplitButtonFormatter(),
|
|
3426
3583
|
};
|
|
3427
3584
|
|
|
3428
3585
|
class SimpleHeaderToolsComponent {
|
|
@@ -4150,7 +4307,6 @@ TablesModule.decorators = [
|
|
|
4150
4307
|
AdvancedFormsModule,
|
|
4151
4308
|
SharedModule,
|
|
4152
4309
|
ModalModule,
|
|
4153
|
-
BsDropdownModule,
|
|
4154
4310
|
ProgressbarModule,
|
|
4155
4311
|
NgPipesModule
|
|
4156
4312
|
],
|
|
@@ -4223,6 +4379,6 @@ TablesModule.ctorParameters = () => [
|
|
|
4223
4379
|
* Generated bundle index. Do not edit.
|
|
4224
4380
|
*/
|
|
4225
4381
|
|
|
4226
|
-
export { AddItemsComponent, AdvancedAggregatorComponent, AdvancedAggregatorListComponent, AdvancedListComponent, AdvancedRowActionComponent, AdvancedSearchFormComponent, AdvancedSelectComponent, AdvancedSelectService, AdvancedTableConfigurationResolver, AdvancedSearchConfigurationResolver, AdvancedColumnFormatter, NestedPropertyFormatter, ButtonFormatter, LinkFormatter, ActionLinkFormatter, SelectRowFormatter, TemplateFormatter, TrueFalseFormatter, TranslationFormatter, DateTimeFormatter, NgClassFormatter, LanguageFormatter, COLUMN_FORMATTERS, AdvancedTableConfiguration, AdvancedTableComponent, AdvancedTableSettingsComponent, AdvancedTableSearchBaseComponent, AdvancedTableSearchComponent, FORMATTERS, AdvancedFilterValueProvider, AdvancedTableModalBaseTemplate, AdvancedTableModalBaseComponent, SimpleHeaderToolsComponent, TableSimpleHeaderComponent, AdvancedTableNotNullError, AdvancedTableEditorDirective, BtnExpDirective, AdvancedAggregatorPipe, ParseTitlePipe, AdvancedAggregatorService, TablesModule, ɵ0, ActivatedTableService };
|
|
4382
|
+
export { AddItemsComponent, AdvancedAggregatorComponent, AdvancedAggregatorListComponent, AdvancedListComponent, AdvancedRowActionComponent, AdvancedSearchFormComponent, AdvancedSelectComponent, AdvancedSelectService, AdvancedTableConfigurationResolver, AdvancedSearchConfigurationResolver, AdvancedColumnFormatter, NestedPropertyFormatter, ButtonFormatter, LinkFormatter, ActionLinkFormatter, ActionButtonFormatter, ActionSplitButtonFormatter, SelectRowFormatter, TemplateFormatter, TrueFalseFormatter, TranslationFormatter, DateTimeFormatter, NgClassFormatter, LanguageFormatter, COLUMN_FORMATTERS, AdvancedTableConfiguration, AdvancedTableComponent, AdvancedTableSettingsComponent, AdvancedTableSearchBaseComponent, AdvancedTableSearchComponent, FORMATTERS, AdvancedFilterValueProvider, AdvancedTableModalBaseTemplate, AdvancedTableModalBaseComponent, SimpleHeaderToolsComponent, TableSimpleHeaderComponent, AdvancedTableNotNullError, AdvancedTableEditorDirective, BtnExpDirective, AdvancedAggregatorPipe, ParseTitlePipe, AdvancedAggregatorService, TablesModule, ɵ0, ActivatedTableService };
|
|
4227
4383
|
|
|
4228
4384
|
//# sourceMappingURL=universis-ngx-tables.js.map
|