coer-elements 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- package/components/index.d.ts +12 -0
- package/components/lib/coer-button/coer-button.component.d.ts +3 -3
- package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +28 -0
- package/components/lib/coer-filebox/coer-filebox.component.d.ts +33 -0
- package/components/lib/coer-form/coer-form.component.d.ts +33 -0
- package/components/lib/coer-grid/coer-grid.component.d.ts +53 -0
- package/components/lib/coer-grid/coer-grid.extension.d.ts +105 -0
- package/components/lib/coer-modal/coer-modal.component.d.ts +38 -0
- package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +56 -0
- package/components/lib/coer-page-title/coer-page-title.component.d.ts +12 -0
- package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +75 -0
- package/components/lib/coer-switch/coer-switch.component.d.ts +31 -0
- package/components/lib/coer-tab/coer-tab.component.d.ts +35 -0
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +51 -0
- package/components/lib/coer-textbox/coer-textbox.component.d.ts +57 -0
- package/components/lib/components.module.d.ts +24 -5
- package/directives/index.d.ts +3 -0
- package/directives/lib/coer-ref.directive.d.ts +14 -0
- package/directives/lib/directives.module.d.ts +8 -0
- package/directives/lib/life-cycle.directive.d.ts +14 -0
- package/esm2022/components/index.mjs +13 -1
- package/esm2022/components/lib/coer-button/coer-button.component.mjs +2 -2
- package/esm2022/components/lib/coer-checkbox/coer-checkbox.component.mjs +84 -0
- package/esm2022/components/lib/coer-filebox/coer-filebox.component.mjs +104 -0
- package/esm2022/components/lib/coer-form/coer-form.component.mjs +102 -0
- package/esm2022/components/lib/coer-grid/coer-grid.component.mjs +515 -0
- package/esm2022/components/lib/coer-grid/coer-grid.extension.mjs +412 -0
- package/esm2022/components/lib/coer-modal/coer-modal.component.mjs +108 -0
- package/esm2022/components/lib/coer-numberbox/coer-numberbox.component.mjs +260 -0
- package/esm2022/components/lib/coer-page-title/coer-page-title.component.mjs +44 -0
- package/esm2022/components/lib/coer-selectbox/coer-selectbox.component.mjs +339 -0
- package/esm2022/components/lib/coer-switch/coer-switch.component.mjs +94 -0
- package/esm2022/components/lib/coer-tab/coer-tab.component.mjs +116 -0
- package/esm2022/components/lib/coer-textarea/coer-textarea.component.mjs +157 -0
- package/esm2022/components/lib/coer-textbox/coer-textbox.component.mjs +196 -0
- package/esm2022/components/lib/components.module.mjs +93 -57
- package/esm2022/directives/index.mjs +4 -0
- package/esm2022/directives/lib/coer-ref.directive.mjs +23 -0
- package/esm2022/directives/lib/directives.module.mjs +25 -0
- package/esm2022/directives/lib/life-cycle.directive.mjs +29 -0
- package/esm2022/interfaces/coer-filebox/index.mjs +3 -0
- package/esm2022/interfaces/coer-grid/index.mjs +21 -0
- package/esm2022/interfaces/index.mjs +1 -3
- package/esm2022/interfaces/lib/coer-filebox/file-image.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-filebox/file.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-button-by-row.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-checkbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-numberbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-selectbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-switch.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-coer-textbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-column.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-data-source.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-header-button.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-header-export-button.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-header.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-import.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-input-checkbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-input-switch-change.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-input-textbox.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-item.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-keyup-enter.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-length.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-search.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-grid/grid-sort.interface.mjs +2 -0
- package/esm2022/interfaces/lib/menu/menu-option-selected.interface.mjs +2 -0
- package/esm2022/interfaces/lib/menu/menu.interface.mjs +2 -0
- package/esm2022/interfaces/lib/page-title/breadcrumb.interface.mjs +2 -0
- package/esm2022/interfaces/lib/page-title/go-back.interface.mjs +2 -0
- package/esm2022/interfaces/page-title/index.mjs +3 -0
- package/esm2022/pipes/index.mjs +5 -0
- package/esm2022/pipes/lib/html.pipe.mjs +18 -0
- package/esm2022/pipes/lib/no-image.pipe.mjs +23 -0
- package/esm2022/pipes/lib/numeric-format.pipe.mjs +15 -0
- package/esm2022/pipes/lib/pipes.module.mjs +31 -0
- package/esm2022/public_api.mjs +3 -1
- package/esm2022/signals/lib/breakpoint.signal.mjs +2 -2
- package/esm2022/signals/lib/is-loading.signal.mjs +2 -2
- package/esm2022/signals/lib/is-modal-open.signal.mjs +2 -2
- package/esm2022/tools/index.mjs +3 -2
- package/esm2022/tools/lib/breadcrumbs.class.mjs +2 -2
- package/esm2022/tools/lib/date-time.class.mjs +14 -7
- package/esm2022/tools/lib/files.class.mjs +2 -2
- package/esm2022/tools/lib/menu.class.mjs +23 -0
- package/esm2022/tools/lib/page.class.mjs +6 -6
- package/esm2022/tools/lib/screen.class.mjs +9 -1
- package/esm2022/tools/lib/source.class.mjs +3 -3
- package/esm2022/tools/lib/tools.mjs +220 -0
- package/fesm2022/coer-elements.mjs +3266 -603
- package/fesm2022/coer-elements.mjs.map +1 -1
- package/interfaces/coer-filebox/index.d.ts +2 -0
- package/interfaces/coer-grid/index.d.ts +20 -0
- package/interfaces/index.d.ts +0 -2
- package/interfaces/lib/coer-filebox/file-image.interface.d.ts +14 -0
- package/interfaces/lib/coer-filebox/file.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-button-by-row.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-checkbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-coer-numberbox.interface.d.ts +12 -0
- package/interfaces/lib/coer-grid/grid-coer-selectbox.interface.d.ts +9 -0
- package/interfaces/lib/coer-grid/grid-coer-switch.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-coer-textbox.interface.d.ts +11 -0
- package/interfaces/lib/coer-grid/grid-column.interface.d.ts +22 -0
- package/interfaces/lib/coer-grid/grid-data-source.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-header-button.interface.d.ts +8 -0
- package/interfaces/lib/coer-grid/grid-header-export-button.interface.d.ts +10 -0
- package/interfaces/lib/coer-grid/grid-header.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-import.interface.d.ts +4 -0
- package/interfaces/lib/coer-grid/grid-input-checkbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-input-switch-change.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-input-textbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-item.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-keyup-enter.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-length.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-search.interface.d.ts +4 -0
- package/interfaces/lib/coer-grid/grid-sort.interface.d.ts +5 -0
- package/interfaces/lib/menu/menu-option-selected.interface.d.ts +9 -0
- package/interfaces/lib/menu/menu.interface.d.ts +6 -0
- package/interfaces/page-title/index.d.ts +2 -0
- package/package.json +1 -1
- package/pipes/index.d.ts +4 -0
- package/pipes/lib/html.pipe.d.ts +10 -0
- package/pipes/lib/no-image.pipe.d.ts +7 -0
- package/pipes/lib/numeric-format.pipe.d.ts +7 -0
- package/pipes/lib/pipes.module.d.ts +9 -0
- package/public_api.d.ts +2 -0
- package/signals/lib/is-loading.signal.d.ts +1 -1
- package/signals/lib/is-modal-open.signal.d.ts +1 -1
- package/src/interfaces/coer-filebox/index.ts +2 -0
- package/src/interfaces/coer-grid/index.ts +20 -0
- package/src/interfaces/index.ts +1 -3
- package/src/interfaces/lib/coer-filebox/file-image.interface.ts +14 -0
- package/src/interfaces/lib/coer-filebox/file.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-button-by-row.interface.ts +7 -0
- package/src/interfaces/lib/coer-grid/grid-checkbox.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-coer-numberbox.interface.ts +12 -0
- package/src/interfaces/lib/coer-grid/grid-coer-selectbox.interface.ts +9 -0
- package/src/interfaces/lib/coer-grid/grid-coer-switch.interface.ts +6 -0
- package/src/interfaces/lib/coer-grid/grid-coer-textbox.interface.ts +11 -0
- package/src/interfaces/lib/coer-grid/grid-column.interface.ts +23 -0
- package/src/interfaces/lib/coer-grid/grid-data-source.interface.ts +6 -0
- package/src/interfaces/lib/coer-grid/grid-header-button.interface.ts +8 -0
- package/src/interfaces/lib/coer-grid/grid-header-export-button.interface.ts +10 -0
- package/src/interfaces/lib/coer-grid/grid-header.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-import.interface.ts +4 -0
- package/src/interfaces/lib/coer-grid/grid-input-checkbox.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-input-switch-change.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-input-textbox.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-item.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-keyup-enter.interface.ts +6 -0
- package/src/interfaces/lib/coer-grid/grid-length.interface.ts +5 -0
- package/src/interfaces/lib/coer-grid/grid-search.interface.ts +4 -0
- package/src/interfaces/lib/coer-grid/grid-sort.interface.ts +5 -0
- package/src/interfaces/lib/menu/menu-option-selected.interface.ts +10 -0
- package/src/interfaces/lib/menu/menu-selected.interface.ts +11 -0
- package/src/interfaces/lib/menu/menu.interface.ts +6 -0
- package/src/interfaces/menu/index.ts +3 -0
- package/src/interfaces/page-title/index.ts +2 -0
- package/tools/index.d.ts +2 -1
- package/tools/lib/breadcrumbs.class.d.ts +1 -1
- package/tools/lib/date-time.class.d.ts +4 -2
- package/tools/lib/menu.class.d.ts +8 -0
- package/tools/lib/page.class.d.ts +4 -3
- package/tools/lib/screen.class.d.ts +3 -1
- package/tools/lib/source.class.d.ts +1 -1
- package/tools/lib/{generi-tools.d.ts → tools.d.ts} +7 -5
- package/esm2022/interfaces/lib/breadcrumb.interface.mjs +0 -2
- package/esm2022/interfaces/lib/go-back.interface.mjs +0 -2
- package/esm2022/tools/lib/generi-tools.mjs +0 -199
- /package/interfaces/lib/{breadcrumb.interface.d.ts → page-title/breadcrumb.interface.d.ts} +0 -0
- /package/interfaces/lib/{go-back.interface.d.ts → page-title/go-back.interface.d.ts} +0 -0
- /package/src/interfaces/lib/{breadcrumb.interface.ts → page-title/breadcrumb.interface.ts} +0 -0
- /package/src/interfaces/lib/{go-back.interface.ts → page-title/go-back.interface.ts} +0 -0
- /package/src/styles/{coer-elements.scss → index.scss} +0 -0
@@ -0,0 +1,412 @@
|
|
1
|
+
import { Component, Input, computed, inject, input, output, signal, viewChild, viewChildren } from "@angular/core";
|
2
|
+
import { CoerAlert } from "../../lib/coer-alert/coer-alert.component";
|
3
|
+
import { CoerCheckbox } from "../../lib/coer-checkbox/coer-checkbox.component";
|
4
|
+
import { CoerNumberBox } from "../../lib/coer-numberbox/coer-numberbox.component";
|
5
|
+
import { CoerSelectbox } from "../../lib/coer-selectbox/coer-selectbox.component";
|
6
|
+
import { CoerTextBox } from "../../lib/coer-textbox/coer-textbox.component";
|
7
|
+
import { ControlValue } from '../../../tools/lib/control-value.class';
|
8
|
+
import { DateTime } from '../../../tools/lib/date-time.class';
|
9
|
+
import { Screen } from '../../../tools/lib/screen.class';
|
10
|
+
import { Tools } from '../../../tools/lib/tools';
|
11
|
+
import * as i0 from "@angular/core";
|
12
|
+
export class CoerGridExtension extends ControlValue {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments);
|
15
|
+
//Injections
|
16
|
+
this.alert = inject(CoerAlert);
|
17
|
+
//Elements
|
18
|
+
this.inputFile = viewChild.required('inputFileRef');
|
19
|
+
this.inputSearch = viewChild.required('inputSearch');
|
20
|
+
this.coerTextboxList = viewChildren(CoerTextBox);
|
21
|
+
this.coerNumberboxList = viewChildren(CoerNumberBox);
|
22
|
+
this.coerSelectboxList = viewChildren(CoerSelectbox);
|
23
|
+
this.coerCheckboxList = viewChildren(CoerCheckbox);
|
24
|
+
//Variables
|
25
|
+
this._value = [];
|
26
|
+
this.value_signal = signal([]);
|
27
|
+
this._gridSearch = signal('');
|
28
|
+
this._isLoading = true;
|
29
|
+
this._isLoadingMessage = true;
|
30
|
+
this._id = Tools.GetGuid('coer-grid');
|
31
|
+
this._expandedGroups = [];
|
32
|
+
this._enableAnimations = false;
|
33
|
+
this._indexFocus = signal(0);
|
34
|
+
this._sort = signal({ columnName: '', direction: 'none', icon: '' });
|
35
|
+
//Generic Tools
|
36
|
+
this.GetNumericFormat = Tools.GetNumericFormat;
|
37
|
+
this.GetDateFormat = DateTime.GetDateFormat;
|
38
|
+
//Inputs
|
39
|
+
this.columns = input([]);
|
40
|
+
this.cleanColumnName = input(true);
|
41
|
+
this.addButton = { show: false };
|
42
|
+
this.exportButton = { show: false };
|
43
|
+
this.importButton = { show: false };
|
44
|
+
this.search = { show: false, ignore: false };
|
45
|
+
this.buttonByRow = {};
|
46
|
+
this.checkbox = { show: false };
|
47
|
+
this.tooltipByRow = input('');
|
48
|
+
this.isLoading = input(false);
|
49
|
+
this.isDisabled = input(false);
|
50
|
+
this.rowsByPage = input(50);
|
51
|
+
this.groupBy = input('');
|
52
|
+
this.showColumnGrouped = input(false);
|
53
|
+
this.rowsByGroup = input(50);
|
54
|
+
this.isInvisible = input(false);
|
55
|
+
this.showFooter = input(true);
|
56
|
+
this.width = input('100%');
|
57
|
+
this.MinWidth = input('250px');
|
58
|
+
this.MaxWidth = input('100%');
|
59
|
+
this.height = input('350px');
|
60
|
+
this.minHeight = input('140px');
|
61
|
+
this.maxHeight = input('100vh');
|
62
|
+
this.margin = input('auto');
|
63
|
+
this.enableSort = input(true);
|
64
|
+
this.enableRowFocus = input(true);
|
65
|
+
//Outputs
|
66
|
+
this.onClickAdd = output();
|
67
|
+
this.onClickImport = output();
|
68
|
+
this.onClickExport = output();
|
69
|
+
this.onClickRow = output();
|
70
|
+
this.onDoubleClickRow = output();
|
71
|
+
this.onClickDeleteRow = output();
|
72
|
+
this.onClickEditRow = output();
|
73
|
+
this.onClickGoRow = output();
|
74
|
+
this.onKeyupEnter = output();
|
75
|
+
this.onKeyupEnterLast = output();
|
76
|
+
this.onSwitchChange = output();
|
77
|
+
this.onTextboxChange = output();
|
78
|
+
this.onSelectboxChange = output();
|
79
|
+
this.onCheckboxChange = output();
|
80
|
+
//computed
|
81
|
+
this._isDisabled = computed(() => {
|
82
|
+
return this.isDisabled() || this.isLoading() || this.isInvisible();
|
83
|
+
});
|
84
|
+
//computed
|
85
|
+
this._isGrouped = computed(() => {
|
86
|
+
return this.groupBy().length > 0;
|
87
|
+
});
|
88
|
+
//computed
|
89
|
+
this.gridColumns = computed(() => {
|
90
|
+
const SET_COLUMNS = new Set();
|
91
|
+
//Has filter columns?
|
92
|
+
if (this.columns().length > 0) {
|
93
|
+
for (const { property } of this.columns()) {
|
94
|
+
SET_COLUMNS.add(property);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
//Get all columns
|
98
|
+
else
|
99
|
+
for (const row of this.value_signal()) {
|
100
|
+
for (const property in row) {
|
101
|
+
SET_COLUMNS.add(property);
|
102
|
+
}
|
103
|
+
}
|
104
|
+
//Remove indexRow column
|
105
|
+
if (SET_COLUMNS.has('indexRow')) {
|
106
|
+
SET_COLUMNS.delete('indexRow');
|
107
|
+
}
|
108
|
+
//Remove groupBy column
|
109
|
+
if (this._isGrouped() && !this.showColumnGrouped() && SET_COLUMNS.has(this.groupBy())) {
|
110
|
+
SET_COLUMNS.delete(this.groupBy());
|
111
|
+
}
|
112
|
+
//Set index column
|
113
|
+
let indexColumn = 0;
|
114
|
+
return Array.from(SET_COLUMNS).map(property => Tools.BreakReference({
|
115
|
+
columnName: property,
|
116
|
+
indexColumn: indexColumn++,
|
117
|
+
width: this._GetColumnConfig(property)?.width || 'auto'
|
118
|
+
}));
|
119
|
+
});
|
120
|
+
//computed
|
121
|
+
this.gridDataSource = computed(() => {
|
122
|
+
let list = this.gridDataSourceFiltered();
|
123
|
+
//It's Grouped?
|
124
|
+
if (this._isGrouped()) {
|
125
|
+
//let indexRow = 0;
|
126
|
+
let indexGroup = 0;
|
127
|
+
const SET_COLUMN = new Set();
|
128
|
+
for (const row of list) {
|
129
|
+
SET_COLUMN.add(row[this.groupBy()]);
|
130
|
+
}
|
131
|
+
const DATA_SOURCE_GROPUED = [];
|
132
|
+
for (const column of SET_COLUMN) {
|
133
|
+
DATA_SOURCE_GROPUED.push({
|
134
|
+
groupBy: column,
|
135
|
+
indexGroup: indexGroup++,
|
136
|
+
length: list.filter((item) => item[this.groupBy()] == column).length,
|
137
|
+
rows: [...list]
|
138
|
+
.filter((item) => item[this.groupBy()] == column)
|
139
|
+
.splice(0, this.rowsByGroup())
|
140
|
+
//.map((item: any) => Object.assign({ indexRow: indexRow++ }, item))
|
141
|
+
});
|
142
|
+
}
|
143
|
+
//Response by group
|
144
|
+
return [...DATA_SOURCE_GROPUED].splice(0, this.rowsByPage());
|
145
|
+
}
|
146
|
+
//Response
|
147
|
+
return [{
|
148
|
+
groupBy: 'Not Grouped',
|
149
|
+
indexGroup: -1,
|
150
|
+
length: -1,
|
151
|
+
rows: [...list].splice(0, this.rowsByPage())
|
152
|
+
}];
|
153
|
+
});
|
154
|
+
//computed
|
155
|
+
this.gridDataSourceFiltered = computed(() => {
|
156
|
+
let list = [];
|
157
|
+
const dataSource = Tools.BreakReference(this.value_signal());
|
158
|
+
//Ignore Filter
|
159
|
+
if (this._gridSearch() == '' || this.search?.ignore) {
|
160
|
+
list = dataSource;
|
161
|
+
}
|
162
|
+
//Filter by search
|
163
|
+
else {
|
164
|
+
const SET_ROW = new Set();
|
165
|
+
let listFiltered = [];
|
166
|
+
for (const { columnName } of this.gridColumns()) {
|
167
|
+
listFiltered = dataSource.filter((item) => !SET_ROW.has(item['indexRow'])
|
168
|
+
&& String(item[Tools.FirstCharToLower(columnName)]).trim().toUpperCase().includes(String(this._gridSearch()).trim().toUpperCase()));
|
169
|
+
for (const { indexRow } of listFiltered) {
|
170
|
+
SET_ROW.add(indexRow);
|
171
|
+
}
|
172
|
+
list = Tools.BreakReference(list.concat(listFiltered));
|
173
|
+
}
|
174
|
+
}
|
175
|
+
return Tools.BreakReference(list);
|
176
|
+
});
|
177
|
+
/** Get Column Configuration */
|
178
|
+
this._GetColumnConfig = (columnName) => {
|
179
|
+
return this.columns().find(x => x.property.replaceAll(' ', '').toUpperCase() == columnName.replaceAll(' ', '').toUpperCase());
|
180
|
+
};
|
181
|
+
/** Clean Name or get alias */
|
182
|
+
this._GetColumnName = (columnName) => {
|
183
|
+
const columnConfig = this._GetColumnConfig(columnName);
|
184
|
+
//Get Alias
|
185
|
+
if (columnConfig && columnConfig.alias && columnConfig.alias.length > 0) {
|
186
|
+
return columnConfig.alias;
|
187
|
+
}
|
188
|
+
//Clean headerName
|
189
|
+
if (this.cleanColumnName() && columnName.length > 0) {
|
190
|
+
columnName = Tools.FirstCharToLower(columnName);
|
191
|
+
const charArray = [];
|
192
|
+
for (const char of columnName) {
|
193
|
+
if (char === char.toUpperCase())
|
194
|
+
charArray.push(' ');
|
195
|
+
charArray.push(char);
|
196
|
+
}
|
197
|
+
charArray[0] = charArray[0].toUpperCase();
|
198
|
+
columnName = charArray.join('');
|
199
|
+
}
|
200
|
+
return columnName.trim();
|
201
|
+
};
|
202
|
+
/** */
|
203
|
+
this._GetShortIcon = (columnName) => {
|
204
|
+
return this._sort().columnName == columnName ? this._sort().icon : '';
|
205
|
+
};
|
206
|
+
/** */
|
207
|
+
this._GetId = (indexRow, indexColumn, suffix = '') => {
|
208
|
+
if (suffix.length > 0)
|
209
|
+
suffix = `-${suffix}`;
|
210
|
+
return `${this._id}-row${indexRow}column${indexColumn}${suffix}`;
|
211
|
+
};
|
212
|
+
/** */
|
213
|
+
this._GetCellValue = (row, columnName) => {
|
214
|
+
return row[Tools.FirstCharToLower(columnName).replaceAll(' ', '')];
|
215
|
+
};
|
216
|
+
/** */
|
217
|
+
this._GetTooltip = (prefix, row, suffix = '') => {
|
218
|
+
let column = Tools.FirstCharToLower(this.tooltipByRow()).replaceAll(' ', '');
|
219
|
+
if (suffix.length > 0) {
|
220
|
+
suffix = ` ${suffix}`;
|
221
|
+
}
|
222
|
+
return this.tooltipByRow().length > 0
|
223
|
+
? `${prefix} ${row[column]}${suffix}`
|
224
|
+
: `${prefix}${suffix}`;
|
225
|
+
};
|
226
|
+
/** */
|
227
|
+
this._HideRow = (group) => {
|
228
|
+
return (this._isGrouped() ? !(this._expandedGroups.some(x => x == group.groupBy)) : false);
|
229
|
+
};
|
230
|
+
}
|
231
|
+
//getter
|
232
|
+
get _height() {
|
233
|
+
let height = this.height();
|
234
|
+
if (height == 'full') {
|
235
|
+
const TOOLBAR = 45;
|
236
|
+
const PAGE_HEADER = 70;
|
237
|
+
const GRID_HEADER = document.getElementById(`${this._id}-header`);
|
238
|
+
const HEADER = (GRID_HEADER && GRID_HEADER.children.length > 0) ? 50 : 0;
|
239
|
+
const MARGIN = 30;
|
240
|
+
const PADDING = 20;
|
241
|
+
const FOOTER = this.showFooter() ? 24.5 : 0;
|
242
|
+
height = (Screen.WINDOW_HEIGHT - TOOLBAR - PAGE_HEADER - MARGIN - HEADER - PADDING - FOOTER) + 'px';
|
243
|
+
}
|
244
|
+
return height;
|
245
|
+
}
|
246
|
+
//getter
|
247
|
+
get _onlyOneCheck() {
|
248
|
+
return Tools.IsNotNull(this.checkbox.onlyOneCheck) && this.checkbox.onlyOneCheck;
|
249
|
+
}
|
250
|
+
ngAfterViewInit() {
|
251
|
+
Tools.Sleep().then(() => {
|
252
|
+
this._enableAnimations = true;
|
253
|
+
this._isLoading = false;
|
254
|
+
this._isLoadingMessage = false;
|
255
|
+
});
|
256
|
+
}
|
257
|
+
//ControlValueAccessor
|
258
|
+
SetValue(value) {
|
259
|
+
let indexRow = 0;
|
260
|
+
if (!Tools.IsNotNull(value))
|
261
|
+
value = [];
|
262
|
+
const dataSource = Tools.BreakReference(value).map((item) => Object.assign({ checked: false }, { ...item }, { indexRow: indexRow++ }));
|
263
|
+
this._UpdateValue(dataSource);
|
264
|
+
this._value = dataSource;
|
265
|
+
this.value_signal.set(dataSource);
|
266
|
+
}
|
267
|
+
//ControlValueAccessor
|
268
|
+
writeValue(value) {
|
269
|
+
let indexRow = 0;
|
270
|
+
if (!Tools.IsNotNull(value))
|
271
|
+
value = [];
|
272
|
+
const dataSource = Tools.BreakReference(value).map((item) => Object.assign({ checked: false }, { ...item }, { indexRow: indexRow++ }));
|
273
|
+
this._value = dataSource;
|
274
|
+
this.value_signal.set(dataSource);
|
275
|
+
}
|
276
|
+
/** */
|
277
|
+
_IsCellType(property, data, type) {
|
278
|
+
let response = false;
|
279
|
+
const columnConfig = this._GetColumnConfig(property);
|
280
|
+
const value = data[property];
|
281
|
+
const row = Tools.BreakReference(data);
|
282
|
+
if (columnConfig) {
|
283
|
+
if (['coerTextbox', 'coerNumberbox', 'coerSelectbox', 'coerSwitch'].includes(type)) {
|
284
|
+
const inputConfig = columnConfig;
|
285
|
+
response = inputConfig.hasOwnProperty(type)
|
286
|
+
&& typeof inputConfig[type] === 'function'
|
287
|
+
&& inputConfig[type]({ property, row, value }).isInput;
|
288
|
+
}
|
289
|
+
else
|
290
|
+
switch (type) {
|
291
|
+
case 'number': {
|
292
|
+
if (typeof columnConfig.typeNumber === 'boolean') {
|
293
|
+
response = columnConfig.typeNumber;
|
294
|
+
}
|
295
|
+
else if (typeof columnConfig.typeNumber === 'function') {
|
296
|
+
response = (data === null) ? false : columnConfig.typeNumber({ property, row, value });
|
297
|
+
}
|
298
|
+
break;
|
299
|
+
}
|
300
|
+
case 'date': {
|
301
|
+
if (data === null)
|
302
|
+
return false;
|
303
|
+
if (typeof columnConfig.typeDate === 'boolean') {
|
304
|
+
response = columnConfig.typeDate;
|
305
|
+
}
|
306
|
+
else if (typeof columnConfig.typeDate === 'function') {
|
307
|
+
response = (data === null) ? false : columnConfig.typeDate({ property, row, value });
|
308
|
+
}
|
309
|
+
break;
|
310
|
+
}
|
311
|
+
case 'template': {
|
312
|
+
if (data === null)
|
313
|
+
return false;
|
314
|
+
response = (typeof columnConfig.template === 'string') || (typeof columnConfig.template === 'function');
|
315
|
+
break;
|
316
|
+
}
|
317
|
+
}
|
318
|
+
}
|
319
|
+
return response;
|
320
|
+
}
|
321
|
+
/** */
|
322
|
+
_IsCellColor(property, data, color) {
|
323
|
+
let response = false;
|
324
|
+
const columnConfig = this._GetColumnConfig(property);
|
325
|
+
if (columnConfig) {
|
326
|
+
if (typeof columnConfig[color] === 'boolean') {
|
327
|
+
response = columnConfig[color];
|
328
|
+
}
|
329
|
+
else if (typeof columnConfig[color] === 'function') {
|
330
|
+
response = columnConfig[color]({
|
331
|
+
property,
|
332
|
+
row: Tools.BreakReference(data),
|
333
|
+
value: data[property]
|
334
|
+
});
|
335
|
+
}
|
336
|
+
}
|
337
|
+
return response;
|
338
|
+
}
|
339
|
+
/** */
|
340
|
+
GetAttribute(property, data, attribute, type) {
|
341
|
+
const columnConfig = this._GetColumnConfig(property);
|
342
|
+
const value = Tools.IsNotNull(data) ? data[property] : null;
|
343
|
+
const row = Tools.BreakReference(data);
|
344
|
+
if (columnConfig) {
|
345
|
+
if (type === 'defaul-cell') {
|
346
|
+
switch (attribute) {
|
347
|
+
case 'textAlign': {
|
348
|
+
return columnConfig?.textAlign || 'left';
|
349
|
+
}
|
350
|
+
case 'template': {
|
351
|
+
const inputConfig = columnConfig;
|
352
|
+
if (inputConfig.hasOwnProperty(attribute)) {
|
353
|
+
if (typeof inputConfig[attribute] === 'string') {
|
354
|
+
return inputConfig[attribute];
|
355
|
+
}
|
356
|
+
else if (typeof inputConfig[attribute] === 'function') {
|
357
|
+
return inputConfig[attribute]({ property, row, value }) || '';
|
358
|
+
}
|
359
|
+
}
|
360
|
+
}
|
361
|
+
}
|
362
|
+
}
|
363
|
+
else if (['coerTextbox', 'coerNumberbox', 'coerSelectbox', 'coerSwitch'].includes(type)) {
|
364
|
+
const inputConfig = columnConfig;
|
365
|
+
if (inputConfig.hasOwnProperty(type) && typeof inputConfig[type] === 'function') {
|
366
|
+
return inputConfig[type]({ property, row, value })[attribute] || null;
|
367
|
+
}
|
368
|
+
}
|
369
|
+
}
|
370
|
+
return null;
|
371
|
+
}
|
372
|
+
/** */
|
373
|
+
ButtonByRow(property, data = null) {
|
374
|
+
let response = false;
|
375
|
+
const buttonByRow = this.buttonByRow;
|
376
|
+
const row = Tools.IsNotNull(data) ? Tools.BreakReference(data) : null;
|
377
|
+
if (buttonByRow.hasOwnProperty(property)) {
|
378
|
+
if (row === null) {
|
379
|
+
response = (typeof buttonByRow[property] === 'boolean') ? buttonByRow[property] : true;
|
380
|
+
}
|
381
|
+
else if (typeof buttonByRow[property] === 'boolean') {
|
382
|
+
response = buttonByRow[property];
|
383
|
+
}
|
384
|
+
else if (typeof buttonByRow[property] === 'function') {
|
385
|
+
response = buttonByRow[property]({ property, row, value: null });
|
386
|
+
}
|
387
|
+
}
|
388
|
+
return response ? (this._value && this._value.length > 0) : false;
|
389
|
+
}
|
390
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerGridExtension, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
391
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.12", type: CoerGridExtension, selector: "coer-grid-extension", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, cleanColumnName: { classPropertyName: "cleanColumnName", publicName: "cleanColumnName", isSignal: true, isRequired: false, transformFunction: null }, addButton: { classPropertyName: "addButton", publicName: "addButton", isSignal: false, isRequired: false, transformFunction: null }, exportButton: { classPropertyName: "exportButton", publicName: "exportButton", isSignal: false, isRequired: false, transformFunction: null }, importButton: { classPropertyName: "importButton", publicName: "importButton", isSignal: false, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: false, isRequired: false, transformFunction: null }, buttonByRow: { classPropertyName: "buttonByRow", publicName: "buttonByRow", isSignal: false, isRequired: false, transformFunction: null }, checkbox: { classPropertyName: "checkbox", publicName: "checkbox", isSignal: false, isRequired: false, transformFunction: null }, tooltipByRow: { classPropertyName: "tooltipByRow", publicName: "tooltipByRow", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, rowsByPage: { classPropertyName: "rowsByPage", publicName: "rowsByPage", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, showColumnGrouped: { classPropertyName: "showColumnGrouped", publicName: "showColumnGrouped", isSignal: true, isRequired: false, transformFunction: null }, rowsByGroup: { classPropertyName: "rowsByGroup", publicName: "rowsByGroup", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, MinWidth: { classPropertyName: "MinWidth", publicName: "MinWidth", isSignal: true, isRequired: false, transformFunction: null }, MaxWidth: { classPropertyName: "MaxWidth", publicName: "MaxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: true, isRequired: false, transformFunction: null }, enableSort: { classPropertyName: "enableSort", publicName: "enableSort", isSignal: true, isRequired: false, transformFunction: null }, enableRowFocus: { classPropertyName: "enableRowFocus", publicName: "enableRowFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickAdd: "onClickAdd", onClickImport: "onClickImport", onClickExport: "onClickExport", onClickRow: "onClickRow", onDoubleClickRow: "onDoubleClickRow", onClickDeleteRow: "onClickDeleteRow", onClickEditRow: "onClickEditRow", onClickGoRow: "onClickGoRow", onKeyupEnter: "onKeyupEnter", onKeyupEnterLast: "onKeyupEnterLast", onSwitchChange: "onSwitchChange", onTextboxChange: "onTextboxChange", onSelectboxChange: "onSelectboxChange", onCheckboxChange: "onCheckboxChange" }, viewQueries: [{ propertyName: "inputFile", first: true, predicate: ["inputFileRef"], descendants: true, isSignal: true }, { propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true, isSignal: true }, { propertyName: "coerTextboxList", predicate: CoerTextBox, descendants: true, isSignal: true }, { propertyName: "coerNumberboxList", predicate: CoerNumberBox, descendants: true, isSignal: true }, { propertyName: "coerSelectboxList", predicate: CoerSelectbox, descendants: true, isSignal: true }, { propertyName: "coerCheckboxList", predicate: CoerCheckbox, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
392
|
+
}
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerGridExtension, decorators: [{
|
394
|
+
type: Component,
|
395
|
+
args: [{
|
396
|
+
selector: 'coer-grid-extension',
|
397
|
+
template: ''
|
398
|
+
}]
|
399
|
+
}], propDecorators: { addButton: [{
|
400
|
+
type: Input
|
401
|
+
}], exportButton: [{
|
402
|
+
type: Input
|
403
|
+
}], importButton: [{
|
404
|
+
type: Input
|
405
|
+
}], search: [{
|
406
|
+
type: Input
|
407
|
+
}], buttonByRow: [{
|
408
|
+
type: Input
|
409
|
+
}], checkbox: [{
|
410
|
+
type: Input
|
411
|
+
}] } });
|
412
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29lci1ncmlkLmV4dGVuc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL2NvbXBvbmVudHMvbGliL2NvZXItZ3JpZC9jb2VyLWdyaWQuZXh0ZW5zaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBaUIsU0FBUyxFQUFjLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDOUksT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDJDQUEyQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpREFBaUQsQ0FBQztBQUMvRSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbURBQW1ELENBQUM7QUFDbEYsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLG1EQUFtRCxDQUFDO0FBQ2xGLE9BQU8sRUFBRSxXQ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3QgUEFERElORyA9IDIwO1xyXG4gICAgICAgICAgICBjb25zdCBGT09URVIgPSB0aGlzLnNob3dGb290ZXIoKSA/IDI0LjUgOiAwO1xyXG4gICAgICAgICAgICBoZWlnaHQgPSAoU2NyZWVuLldJTkRPV19IRUlHSFQgLSBUT09MQkFSIC0gUEFHRV9IRUFERVIgLSBNQVJHSU4gLSBIRUFERVIgLSBQQURESU5HIC0gRk9PVEVSKSArICdweCc7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gaGVpZ2h0O1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvL2dldHRlclxyXG4gICAgcHJvdGVjdGVkIGdldCBfb25seU9uZUNoZWNrKCkge1xyXG4gICAgICAgIHJldHVybiBUb29scy5Jc05vdE51bGwodGhpcy5jaGVja2JveC5vbmx5T25lQ2hlY2spICYmIHRoaXMuY2hlY2tib3gub25seU9uZUNoZWNrO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICBuZ0FmdGVyVmlld0luaXQoKTogdm9pZCB7XHJcbiAgICAgICAgVG9vbHMuU2xlZXAoKS50aGVuKCgpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5fZW5hYmxlQW5pbWF0aW9ucyA9IHRydWU7XHJcbiAgICAgICAgICAgIHRoaXMuX2lzTG9hZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICB0aGlzLl9pc0xvYWRpbmdNZXNzYWdlID0gZmFsc2U7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgLy9Db250cm9sVmFsdWVBY2Nlc3NvclxyXG4gICAgcHVibGljIG92ZXJyaWRlIFNldFZhbHVlKHZhbHVlOiBUW10pOiB2b2lkIHtcclxuICAgICAgICBsZXQgaW5kZXhSb3cgPSAwO1xyXG4gICAgICAgIGlmKCFUb29scy5Jc05vdE51bGwodmFsdWUpKSB2YWx1ZSA9IFtdO1xyXG5cclxuICAgICAgICBjb25zdCBkYXRhU291cmNlID0gVG9vbHMu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AgICAgICAgIGZvciAoY29uc3QgY29sdW1uIG9mIFNFVF9DT0xVTU4pIHtcclxuICAgICAgICAgICAgICAgIERBVEFfU09VUkNFX0dST1BVRUQucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgZ3JvdXBCeTogY29sdW1uLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGV4R3JvdXA6IGluZGV4R3JvdXArKyxcclxuICAgICAgICAgICAgICAgICAgICBsZW5ndGg6IGxpc3QuZmlsdGVyKChpdGVtOiBhbnkpID0+IGl0ZW1bdGhpcy5ncm91cEJ5KCldID09IGNvbHVtbikubGVuZ3RoLFxyXG4gICAgICAgICAgICAgICAgICAgIHJvd3M6IFsuLi5saXN0XVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKChpdGVtOiBhbnkpID0+IGl0ZW1bdGhpcy5ncm91cEJ5KCldID09IGNvbHVtbilcclxuICAgICAgICAgICAgICAgICAgICAgICAgLnNwbGljZSgwLCB0aGlzLnJvd3NCeUdyb3VwKCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vLm1hcCgoaXRlbTogYW55KSA9PiBPYmplY3QuYXNzaWduKHsgaW5kZXhSb3c6IGluZGV4Um93KysgfSwgaXRlbSkpXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy9SZXNwb25zZSBieSBncm91cFxyXG4gICAgICAgICAgICByZXR1cm4gWy4uLkRBVEFfU09VUkNFX0dST1BVRURdLnNwbGljZSgwLCB0aGlzLnJvd3NCeVBhZ2UoKSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvL1Jlc3BvbnNlXHJcbiAgICAgICAgcmV0dXJuIFt7XHJcbiAgICAgICAgICAgIGdyb3VwQnk6ICdOb3QgR3JvdXBlZCcsXHJcbiAgICAgICAgICAgIGluZGV4R3JvdXA6IC0xLFxyXG4gICAgICAgICAgICBsZW5ndGg6IC0xLFxyXG4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RDb2x1bW5Db25maWcoY29sdW1uTmFtZSk7XHJcblxyXG4gICAgICAgIC8vR2V0IEFsaWFzXHJcbiAgICAgICAgaWYgKGNvbHVtbkNvbmZpZyAmJiBjb2x1bW5Db25maWcuYWxpYXMgJiYgY29sdW1uQ29uZmlnLmFsaWFzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIGNvbHVtbkNvbmZpZy5hbGlhcztcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vQ2xlYW4gaGVhZGVyTmFtZVxyXG4gICAgICAgIGlmICh0aGlzLmNsZWFuQ29sdW1uTmFtZSgpICYmIGNvbHVtbk5hbWUubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBjb2x1bW5OYW1lID0gVG9vbHMuRmlyc3RDaGFyVG9Mb3dlcihjb2x1bW5OYW1lKTtcclxuXHJcbiAgICAgICAgICAgIGNvbnN0IGNoYXJBcnJheSA9IFtdO1xyXG4gICAgICAgICAgICBmb3IoY29uc3QgY2hhciBvZiBjb2x1bW5OYW1lKSB7XHJcbiAgICAgICAgICAgICAgICBpZihjaGFyID09PSBjaGFyLnRvVXBwZXJDYXNlKCkpIGNoYXJBcnJheS5wdXNoKCcgJyk7XHJcbiAgICAgICAgICAgICAgICBjaGFyQXJyYXkucHVzaChjaGFyKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgY2hhckFycmF5WzBdID0gY2hhckFycmF5WzBdLnRvVXBwZXJDYXNlKCk7XHJcbiAgICAgICAgICAgIGNvbHVtbk5hbWUgPSBjaGFyQXJyYXkuam9pbignJyk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gY29sdW1uTmFtZS50cmltKCk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiAqL1xyXG4gICAgcHJvdGVjdGVkIF9HZXRTaG9ydEljb24gPSAoY29sdW1uTmFtZTogc3RyaW5nKSA9PiB7XHJcbiAgICAgICAgcmV0dX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XJTd2l0Y2gnXS5pbmNsdWRlcyh0eXBlKSkge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgaW5wdXRDb25maWc6IGFueSA9IGNvbHVtbkNvbmZpZztcclxuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gaW5wdXRDb25maWcuaGFzT3duUHJvcGVydHkodHlwZSlcclxuICAgICAgICAgICAgICAgICAgICAmJiB0eXBlb2YgaW5wdXRDb25maWdbdHlwZV0gPT09ICdmdW5jdGlvbidcclxuICAgICAgICAgICAgICAgICAgICAmJiBpbnB1dENvbmZpZ1t0eXBlXSh7IHByb3BlcnR5LCByb3csIHZhbHVlIH0pLmlzSW5wdXQ7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGVsc2Ugc3dpdGNoKHR5cGUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgJ251bWJlcic6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNvbHVtbkNvbmZpZy50eXBlTnVtYmVyID09PSAnYm9vbGVhbicpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBjb2x1bW5Db25maWcudHlwZU51bWJlcjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBjb2x1bW5Db25maWcudHlwZU51bWJlciA9PT0gJ2Z1bmN0aW9uJykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZSA9IChkYXRhID09PSBudWxsKSA/IGZhbHNlIDogY29sdW1uQ29uZmlnLnR5cGVOdW1iZXIoeyBwcm9wZXJ0eSwgcm93LCB2YWx1ZSB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgJ2RhdGUnOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEgPT09IG51bGwpIHJldHVybiBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjb2x1bW5Db25maWcudHlwZURhdGUgPT09ICdib29sZWFuJykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZSA9IGNvbHVtbkNvbmZpZy50eXBlRGF0ZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBjb2x1bW5Db25maWcudHlwZURhdGUgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSAoZGF0YSA9PT0gbnVsbCkgPyBmYWxzZSA6IGNvbHVtbkNvbmZpZy50eXBlRGF0ZSh7IHByb3BlcnR5LCByb3csIHZhbHVlIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgY2FzZSAndGVtcGxhdGUnOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEgPT09IG51bGwpIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICByZXNwb25zZSA9ICh0eXBlb2YgY29sdW1uQ29uZmlnLnRlbXBsYXRlID09PSAnc3RyaW5nJykgfHwgKHR5cGVvZiBjb2x1bW5Db25maWcudGVtcGxhdGUgPT09ICdmdW5jdGlvbicpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gcmVzcG9uc2U7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiAqL1xyXG4gICAgcHJvdGVjdGVkIF9Jc0NlbGxDb2xvcihwcm9wZXJ0eTogc3RyaW5nLCBkYXRhOiBhbnksIGNvbG9yOiAnY29sb3JCbHVlJyB8ICdjb2xvckdyZWVuJyB8ICdjb2xvclllbGxvdycgfCAnY29sb3JSZWQnKTogYm9vbGVhbiB7XHJcbiAgICAgICAgbGV0IHJlc3BvbnNlID0gZmFsc2U7XHJcbiAgICAgICAgY29uc3QgY29sdW1uQ29uZmlnOiBhbnkgPSB0aGlzLl9HZXRDb2x1bW5Db25maWcocHJvcGVydHkpO1xyXG5cclxuICAgICAgICBpZiAoY29sdW1uQ29uZmlnKSB7XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29sdW1uQ29uZmlnW2NvbG9yXSA9PT0gJ2Jvb2xlYW4nKSB7XHJcbiAgICAgICAgICAgICAgICByZXNwb25zZSA9IGNvbHVtbkNvbmZpZ1tjb2xvcl07XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBjb2x1bW5Db25maWdbY29sb3JdID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICByZXNwb25zZSA9IGNvbHVtbkNvbmZpZ1tjb2xvcl0oe1xyXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5LFxyXG4gICAgICAgICAgICAgICAgICAgIHJvdzogVG9vbHMuQnJlYWtSZWZlcmVuY2UoZGF0YSksXHJcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGRhdGFbcHJvcGVydHldXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHJlc3BvbnNlO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHByb3RlY3RlZCBHZXRBdHRyaWJ1dGUocHJvcGVydHk6IHN0cmluZywgZGF0YTogYW55LCBhdHRyaWJ1dGU6IHN0cmluZywgdHlwZTogJ2NvZXJTd2l0Y2gnIHwgJ2NvZXJUZXh0Ym94JyB8ICdjb2VyTnVtYmVyYm94J3wgJ2NvZXJTZWxlY3Rib3gnIHwgJ2RlZmF1bC1jZWxsJyApOiBhbnkge1xyXG4gICAgICAgIGNvbnN0IGNvbHVtbkNvbmZpZyA9IHRoaXMuX0dldENvbHVtbkNvbmZpZyhwcm9wZXJ0eSk7XHJcbiAgICAgICAgY29uc3QgdmFsdWUgPSBUb29scy5Jc05vdE51bGwoZGF0YSkgPyBkYXRhW3Byb3BlcnR5XSA6IG51bGw7XHJcbiAgICAgICAgY29uc3Qgcm93ID0gVG9vbHMuQnJlYWtSZWZlcmVuY2UoZGF0YSk7XHJcblxyXG4gICAgICAgIGlmIChjb2x1bW5Db25maWcpIHtcclxuICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdkZWZhdWwtY2VsbCcpIHtcclxuICAgICAgICAgICAgICAgIHN3aXRjaChhdHRyaWJ1dGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYXNlICd0ZXh0QWxpZ24nOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb2x1bW5Db25maWc/LnRleHRBbGlnbiB8fCAnbGVmdCc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBjYXNlICd0ZW1wbGF0ZSc6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5wdXRDb25maWc6IGFueSA9IGNvbHVtbkNvbmZpZztcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dENvbmZpZy5oYXNPd25Qcm9wZXJ0eShhdHRyaWJ1dGUpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YgaW5wdXRDb25maWdbYXR0cmlidXRlXSA9PT0gJ3N0cmluZycpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXRDb25maWdbYXR0cmlidXRlXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKHR5cGVvZiBpbnB1dENvbmZpZ1thdHRyaWJ1dGVdID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0Q29uZmlnW2F0dHJpYnV0ZV0oeyBwcm9wZXJ0eSwgcm93LCB2YWx1ZSB9KSB8fCAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZWxzZSBpZihbJ2NvZXJUZXh0Ym94JywgJ2NvZXJOdW1iZXJib3gnLCAnY29lclNlbGVjdGJveCcsICdjb2VyU3dpdGNoJ10uaW5jbHVkZXModHlwZSkpIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGlucHV0Q29uZmlnOiBhbnkgPSBjb2x1bW5Db25maWc7XHJcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXRDb25maWcuaGFzT3duUHJvcGVydHkodHlwZSkgJiYgdHlwZW9mIGlucHV0Q29uZmlnW3R5cGVdID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0Q29uZmlnW3R5cGVdKHsgcHJvcGVydHksIHJvdywgdmFsdWUgfSlbYXR0cmlidXRlXSB8fCBudWxsO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqICovXHJcbiAgICBwcm90ZWN0ZWQgQnV0dG9uQnlSb3cocHJvcGVydHk6ICdzaG93RGVsZX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