@jooler/inputs 0.0.48 → 0.0.50
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/lib/choose-enum/choose-enum.component.mjs +49 -41
- package/esm2020/lib/choose-enum-renderer/choose-enum-renderer.component.mjs +1 -1
- package/esm2020/lib/choose-general-item/choose-general-item.component.mjs +1 -1
- package/esm2020/lib/custom-theme.mjs +104 -0
- package/esm2020/lib/models/enum-helper-functions.mjs +57 -0
- package/esm2020/lib/models/enum-helper.model.mjs +2 -0
- package/esm2020/lib/models/line-type-model-helper.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/inputs.mjs +209 -42
- package/fesm2015/inputs.mjs.map +1 -1
- package/fesm2020/inputs.mjs +209 -42
- package/fesm2020/inputs.mjs.map +1 -1
- package/lib/choose-enum/choose-enum.component.d.ts +20 -14
- package/lib/custom-theme.d.ts +8 -0
- package/lib/models/enum-helper-functions.d.ts +5 -0
- package/lib/models/enum-helper.model.d.ts +6 -0
- package/lib/models/line-type-model-helper.d.ts +2 -2
- package/package.json +6 -6
package/fesm2020/inputs.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, forwardRef, Component,
|
|
2
|
+
import { EventEmitter, forwardRef, Component, Input, Output, Injectable, Inject, Pipe, Directive, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, NgModel, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
@@ -17,22 +17,186 @@ import { AppMaterialModule } from '@jooler/app-material';
|
|
|
17
17
|
import * as i1$2 from '@angular/router';
|
|
18
18
|
import * as i3$1 from '@angular/material/menu';
|
|
19
19
|
|
|
20
|
+
class CustomTheme {
|
|
21
|
+
}
|
|
22
|
+
CustomTheme.$joolerBlue = [
|
|
23
|
+
'#e3ecfa',
|
|
24
|
+
'#b9cff2',
|
|
25
|
+
'#8aafea',
|
|
26
|
+
'#5b8ee1',
|
|
27
|
+
'#3876da',
|
|
28
|
+
'#155ed4',
|
|
29
|
+
'#1256cf',
|
|
30
|
+
'#0f4cc9',
|
|
31
|
+
'#0c42c3',
|
|
32
|
+
'#0631b9',
|
|
33
|
+
'#e3e8ff',
|
|
34
|
+
'#b0bfff',
|
|
35
|
+
'#7d95ff',
|
|
36
|
+
'#6481ff',
|
|
37
|
+
];
|
|
38
|
+
CustomTheme.$joolerTeal = [
|
|
39
|
+
'#b8dfd8',
|
|
40
|
+
'#89cabf',
|
|
41
|
+
'#59b5a5',
|
|
42
|
+
'#36a591',
|
|
43
|
+
'#12957e',
|
|
44
|
+
'#108d76',
|
|
45
|
+
'#0d826b',
|
|
46
|
+
'#0a7861',
|
|
47
|
+
'#05674e',
|
|
48
|
+
'#97ffe1',
|
|
49
|
+
'#64ffd2',
|
|
50
|
+
'#31ffc3',
|
|
51
|
+
'#18ffbc',
|
|
52
|
+
];
|
|
53
|
+
CustomTheme.$joolerRed = [
|
|
54
|
+
'#f5e0e1',
|
|
55
|
+
'#e5b3b3',
|
|
56
|
+
'#d48081',
|
|
57
|
+
'#c24d4e',
|
|
58
|
+
'#b52628',
|
|
59
|
+
'#a80002',
|
|
60
|
+
'#a00002',
|
|
61
|
+
'#970001',
|
|
62
|
+
'#8d0001',
|
|
63
|
+
'#7d0001',
|
|
64
|
+
'#ffaaaa',
|
|
65
|
+
'#ff7777',
|
|
66
|
+
'#ff4444',
|
|
67
|
+
'#ff2a2a',
|
|
68
|
+
];
|
|
69
|
+
CustomTheme.$joolerPink = [
|
|
70
|
+
'#fdeaf3',
|
|
71
|
+
'#fbcbe1',
|
|
72
|
+
'#f8a8ce',
|
|
73
|
+
'#f585ba',
|
|
74
|
+
'#f26aab',
|
|
75
|
+
'#f0509c',
|
|
76
|
+
'#ee4994',
|
|
77
|
+
'#ec408a',
|
|
78
|
+
'#e93780',
|
|
79
|
+
'#e5276e',
|
|
80
|
+
'#ffffff',
|
|
81
|
+
'#ffeef4',
|
|
82
|
+
'#ffbbd3',
|
|
83
|
+
'#ffa1c2',
|
|
84
|
+
];
|
|
85
|
+
CustomTheme.$joolerPurple = [
|
|
86
|
+
'#fcf6fd',
|
|
87
|
+
'#f7e8f9',
|
|
88
|
+
'#f1d8f5',
|
|
89
|
+
'#ebc8f1',
|
|
90
|
+
'#e7bdee',
|
|
91
|
+
'#e3b1eb',
|
|
92
|
+
'#e0aae9',
|
|
93
|
+
'#dca1e5',
|
|
94
|
+
'#d898e2',
|
|
95
|
+
'#d088dd',
|
|
96
|
+
'#ffffff',
|
|
97
|
+
'#ffffff',
|
|
98
|
+
'#ffffff',
|
|
99
|
+
'#fcecff',
|
|
100
|
+
];
|
|
101
|
+
CustomTheme.$joolerCombo = [
|
|
102
|
+
'#b9cff2',
|
|
103
|
+
'#b8dfd8',
|
|
104
|
+
'#ffaaaa',
|
|
105
|
+
'#fbcbe1',
|
|
106
|
+
'#f1d8f5',
|
|
107
|
+
'#8aafea',
|
|
108
|
+
'#97ffe1',
|
|
109
|
+
'#ff7777',
|
|
110
|
+
'#f585ba',
|
|
111
|
+
'#e7bdee',
|
|
112
|
+
'#6481ff',
|
|
113
|
+
'#18ffbc',
|
|
114
|
+
'#ff4444',
|
|
115
|
+
'#ffa1c2',
|
|
116
|
+
'#e0aae9',
|
|
117
|
+
'#1256cf',
|
|
118
|
+
'#108d76',
|
|
119
|
+
'#df0000',
|
|
120
|
+
'#ec408a',
|
|
121
|
+
'#d088dd',
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
class EnumHelperBaseClass {
|
|
125
|
+
static getEnumOptionsFromEnumClass(enumClass, customColors, isAllCaps) {
|
|
126
|
+
let colors = CustomTheme.$joolerCombo;
|
|
127
|
+
if (customColors && customColors.length > 0) {
|
|
128
|
+
colors = customColors;
|
|
129
|
+
}
|
|
130
|
+
let stringValues = [];
|
|
131
|
+
let enumOption;
|
|
132
|
+
let enumOptions = [];
|
|
133
|
+
for (let item in enumClass) {
|
|
134
|
+
if (isNaN(Number(item))) {
|
|
135
|
+
let joinedString;
|
|
136
|
+
stringValues.push(item);
|
|
137
|
+
let splitStr = item.toLowerCase().split('_');
|
|
138
|
+
if (!isAllCaps) {
|
|
139
|
+
for (let i = 0; i < splitStr.length; i++) {
|
|
140
|
+
splitStr[i] =
|
|
141
|
+
splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
for (let i = 0; i < splitStr.length; i++) {
|
|
146
|
+
splitStr[i] = splitStr[i].toUpperCase();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
joinedString = splitStr.join(' ');
|
|
150
|
+
stringValues.splice(stringValues.indexOf(item), 1, joinedString);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let repeatedColors = [];
|
|
154
|
+
let i = 0;
|
|
155
|
+
for (let label of stringValues) {
|
|
156
|
+
// in case the array of colors is smaller than the stringValues array, we repeat the the colors so that they are enough
|
|
157
|
+
repeatedColors.push(colors[stringValues.indexOf(label) % colors.length]);
|
|
158
|
+
enumOption = {
|
|
159
|
+
value: Object.keys(enumClass).map(Number)[i],
|
|
160
|
+
label: label,
|
|
161
|
+
color: repeatedColors[i],
|
|
162
|
+
};
|
|
163
|
+
enumOptions.push(enumOption);
|
|
164
|
+
i++;
|
|
165
|
+
}
|
|
166
|
+
return enumOptions;
|
|
167
|
+
}
|
|
168
|
+
static getLabelAndColorFromEnumValue(enumClass, enumValue, customColors) {
|
|
169
|
+
let enumOptions = EnumHelperBaseClass.getEnumOptionsFromEnumClass(enumClass, customColors);
|
|
170
|
+
let enumOption;
|
|
171
|
+
for (let item of enumOptions) {
|
|
172
|
+
if (enumValue == item.value) {
|
|
173
|
+
enumOption = enumOptions[enumOptions.indexOf(item)];
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return enumOption;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
20
180
|
class ChooseEnumComponent {
|
|
21
181
|
constructor() {
|
|
22
|
-
this.
|
|
182
|
+
this.appendTo = 'body';
|
|
23
183
|
this.allowAllCapsValues = false;
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
184
|
+
this.clearable = true;
|
|
185
|
+
this.getValuesArrayFromEnum = EnumHelperBaseClass.getEnumOptionsFromEnumClass;
|
|
26
186
|
this.indexesToDisable = [];
|
|
187
|
+
this.isChip = true;
|
|
27
188
|
this.isDropdownDisabled = false;
|
|
189
|
+
this.label = 'label';
|
|
190
|
+
this.labelTextAlign = 'left';
|
|
28
191
|
this.percentWidth = false;
|
|
29
|
-
this.
|
|
192
|
+
this.change = new EventEmitter();
|
|
193
|
+
this.close = new EventEmitter();
|
|
30
194
|
this.propagateChange = (_) => { };
|
|
31
195
|
this.propogateTouch = () => { };
|
|
32
196
|
}
|
|
33
197
|
ngOnChanges() {
|
|
34
198
|
if (this.getValuesArrayFromEnum != null) {
|
|
35
|
-
this.items = this.getValuesArrayFromEnum(this.enumChoices, this.allowAllCapsValues);
|
|
199
|
+
this.items = this.getValuesArrayFromEnum(this.enumChoices, this.customColors, this.allowAllCapsValues);
|
|
36
200
|
}
|
|
37
201
|
if (this.isItemDisabled == true) {
|
|
38
202
|
if (this.indexesToDisable.length > 0) {
|
|
@@ -44,7 +208,7 @@ class ChooseEnumComponent {
|
|
|
44
208
|
if (this.isItemHidden == true) {
|
|
45
209
|
if (this.indexesToDisable.length > 0) {
|
|
46
210
|
for (let index of this.indexesToDisable) {
|
|
47
|
-
let itemIndex = this.items.findIndex(item => item.value == index);
|
|
211
|
+
let itemIndex = this.items.findIndex((item) => item.value == index);
|
|
48
212
|
this.items.splice(itemIndex, 1);
|
|
49
213
|
}
|
|
50
214
|
}
|
|
@@ -52,7 +216,7 @@ class ChooseEnumComponent {
|
|
|
52
216
|
}
|
|
53
217
|
ngOnInit() {
|
|
54
218
|
if (this.getValuesArrayFromEnum != null) {
|
|
55
|
-
this.items = this.getValuesArrayFromEnum(this.enumChoices, this.allowAllCapsValues);
|
|
219
|
+
this.items = this.getValuesArrayFromEnum(this.enumChoices, this.customColors, this.allowAllCapsValues);
|
|
56
220
|
}
|
|
57
221
|
if (this.isItemDisabled == true) {
|
|
58
222
|
if (this.indexesToDisable.length > 0) {
|
|
@@ -64,7 +228,7 @@ class ChooseEnumComponent {
|
|
|
64
228
|
if (this.isItemHidden == true) {
|
|
65
229
|
if (this.indexesToDisable.length > 0) {
|
|
66
230
|
for (let index of this.indexesToDisable) {
|
|
67
|
-
let itemIndex = this.items.findIndex(item => item.value == index);
|
|
231
|
+
let itemIndex = this.items.findIndex((item) => item.value == index);
|
|
68
232
|
this.items.splice(itemIndex, 1);
|
|
69
233
|
}
|
|
70
234
|
}
|
|
@@ -86,27 +250,24 @@ class ChooseEnumComponent {
|
|
|
86
250
|
}
|
|
87
251
|
updateBlur() {
|
|
88
252
|
this.propogateTouch();
|
|
253
|
+
this.close.emit();
|
|
89
254
|
}
|
|
90
255
|
onSelectedItemChanged() {
|
|
91
256
|
this.propagateChange(this.selectedItem);
|
|
92
257
|
this.change.emit(this.selectedItem);
|
|
93
258
|
}
|
|
259
|
+
setDisabledState(isDisabled) {
|
|
260
|
+
this.isDropdownDisabled = isDisabled;
|
|
261
|
+
}
|
|
94
262
|
clear() {
|
|
95
263
|
this.selectedItem = null;
|
|
96
264
|
}
|
|
97
265
|
setStyles() {
|
|
98
|
-
let style
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
style = {
|
|
107
|
-
width: this.width + 'rem',
|
|
108
|
-
paddingTop: this.paddingTop + 'rem'
|
|
109
|
-
};
|
|
266
|
+
let style = {
|
|
267
|
+
paddingTop: this.paddingTop + 'rem',
|
|
268
|
+
};
|
|
269
|
+
if (this.width) {
|
|
270
|
+
style['width'] = this.width + 'rem';
|
|
110
271
|
}
|
|
111
272
|
return style;
|
|
112
273
|
}
|
|
@@ -114,19 +275,19 @@ class ChooseEnumComponent {
|
|
|
114
275
|
let style = {
|
|
115
276
|
textAlign: this.labelTextAlign,
|
|
116
277
|
fontWeight: this.labelTextFontWeight,
|
|
117
|
-
fontSize: this.labelTextFontSize + 'rem'
|
|
278
|
+
fontSize: this.labelTextFontSize + 'rem',
|
|
118
279
|
};
|
|
119
280
|
return style;
|
|
120
281
|
}
|
|
121
282
|
}
|
|
122
283
|
ChooseEnumComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
123
|
-
ChooseEnumComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumComponent, selector: "choose-enum", inputs: {
|
|
284
|
+
ChooseEnumComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumComponent, selector: "choose-enum", inputs: { appendTo: "appendTo", allowAllCapsValues: "allowAllCapsValues", clearable: "clearable", customColors: "customColors", enumChoices: "enumChoices", getValuesArrayFromEnum: "getValuesArrayFromEnum", indexesToDisable: "indexesToDisable", isChip: "isChip", isDropdownDisabled: "isDropdownDisabled", isItemHidden: "isItemHidden", isItemDisabled: "isItemDisabled", isMultiple: "isMultiple", label: "label", labelTextAlign: "labelTextAlign", labelTextFontWeight: "labelTextFontWeight", labelTextFontSize: "labelTextFontSize", paddingTop: "paddingTop", placeholder: "placeholder", percentWidth: "percentWidth", selectedItem: "selectedItem", width: "width" }, outputs: { change: "change", close: "close" }, providers: [
|
|
124
285
|
{
|
|
125
286
|
provide: NG_VALUE_ACCESSOR,
|
|
126
287
|
useExisting: forwardRef(() => ChooseEnumComponent),
|
|
127
288
|
multi: true,
|
|
128
289
|
},
|
|
129
|
-
], usesOnChanges: true, ngImport: i0, template: "<div class=\"select\">\r\n
|
|
290
|
+
], usesOnChanges: true, ngImport: i0, template: "<div class=\"select\">\r\n <ng-select\r\n [ngStyle]=\"setStyles()\"\r\n (blur)=\"updateBlur()\"\r\n bindLabel=\"label\"\r\n bindValue=\"value\"\r\n [items]=\"items\"\r\n [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItem\"\r\n [multiple]=\"isMultiple\"\r\n [disabled]=\"isDropdownDisabled\"\r\n [clearable]=\"clearable\"\r\n [clearAllText]=\"'clear everything'\"\r\n (clear)=\"clear()\"\r\n [appendTo]=\"appendTo\"\r\n dropdownPosition=\"bottom\">\r\n <ng-template\r\n class=\"template\"\r\n ng-option-tmp\r\n ng-label-tmp\r\n let-item=\"item\"\r\n let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <div *ngIf=\"isChip\">\r\n <ng-chip [enumClass]=\"enumChoices\" [enumValue]=\"item.value\" [customColors]=\"customColors\">\r\n </ng-chip>\r\n </div>\r\n <div [ngStyle]=\"setLabelStyle()\" *ngIf=\"!isChip\">{{ item.label }}</div>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n", styles: [".select{width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "customColors", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }] });
|
|
130
291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumComponent, decorators: [{
|
|
131
292
|
type: Component,
|
|
132
293
|
args: [{ selector: 'choose-enum', providers: [
|
|
@@ -135,32 +296,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
135
296
|
useExisting: forwardRef(() => ChooseEnumComponent),
|
|
136
297
|
multi: true,
|
|
137
298
|
},
|
|
138
|
-
], template: "<div class=\"select\">\r\n
|
|
139
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
140
|
-
type: Output
|
|
141
|
-
}], label: [{
|
|
142
|
-
type: Input
|
|
143
|
-
}], appendTo: [{
|
|
299
|
+
], template: "<div class=\"select\">\r\n <ng-select\r\n [ngStyle]=\"setStyles()\"\r\n (blur)=\"updateBlur()\"\r\n bindLabel=\"label\"\r\n bindValue=\"value\"\r\n [items]=\"items\"\r\n [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged()\"\r\n [(ngModel)]=\"selectedItem\"\r\n [multiple]=\"isMultiple\"\r\n [disabled]=\"isDropdownDisabled\"\r\n [clearable]=\"clearable\"\r\n [clearAllText]=\"'clear everything'\"\r\n (clear)=\"clear()\"\r\n [appendTo]=\"appendTo\"\r\n dropdownPosition=\"bottom\">\r\n <ng-template\r\n class=\"template\"\r\n ng-option-tmp\r\n ng-label-tmp\r\n let-item=\"item\"\r\n let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <div *ngIf=\"isChip\">\r\n <ng-chip [enumClass]=\"enumChoices\" [enumValue]=\"item.value\" [customColors]=\"customColors\">\r\n </ng-chip>\r\n </div>\r\n <div [ngStyle]=\"setLabelStyle()\" *ngIf=\"!isChip\">{{ item.label }}</div>\r\n </ng-template>\r\n </ng-select>\r\n</div>\r\n", styles: [".select{width:100%}\n"] }]
|
|
300
|
+
}], ctorParameters: function () { return []; }, propDecorators: { appendTo: [{
|
|
144
301
|
type: Input
|
|
145
302
|
}], allowAllCapsValues: [{
|
|
146
303
|
type: Input
|
|
147
|
-
}],
|
|
304
|
+
}], clearable: [{
|
|
148
305
|
type: Input
|
|
149
|
-
}],
|
|
306
|
+
}], customColors: [{
|
|
150
307
|
type: Input
|
|
151
308
|
}], enumChoices: [{
|
|
152
309
|
type: Input
|
|
153
310
|
}], getValuesArrayFromEnum: [{
|
|
154
311
|
type: Input
|
|
312
|
+
}], indexesToDisable: [{
|
|
313
|
+
type: Input
|
|
155
314
|
}], isChip: [{
|
|
156
315
|
type: Input
|
|
157
|
-
}],
|
|
316
|
+
}], isDropdownDisabled: [{
|
|
158
317
|
type: Input
|
|
159
|
-
}],
|
|
318
|
+
}], isItemHidden: [{
|
|
160
319
|
type: Input
|
|
161
|
-
}],
|
|
320
|
+
}], isItemDisabled: [{
|
|
162
321
|
type: Input
|
|
163
|
-
}],
|
|
322
|
+
}], isMultiple: [{
|
|
323
|
+
type: Input
|
|
324
|
+
}], label: [{
|
|
164
325
|
type: Input
|
|
165
326
|
}], labelTextAlign: [{
|
|
166
327
|
type: Input
|
|
@@ -168,14 +329,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
168
329
|
type: Input
|
|
169
330
|
}], labelTextFontSize: [{
|
|
170
331
|
type: Input
|
|
171
|
-
}],
|
|
172
|
-
type: Input
|
|
173
|
-
}], indexesToDisable: [{
|
|
332
|
+
}], paddingTop: [{
|
|
174
333
|
type: Input
|
|
175
|
-
}],
|
|
334
|
+
}], placeholder: [{
|
|
176
335
|
type: Input
|
|
177
336
|
}], percentWidth: [{
|
|
178
337
|
type: Input
|
|
338
|
+
}], selectedItem: [{
|
|
339
|
+
type: Input
|
|
340
|
+
}], width: [{
|
|
341
|
+
type: Input
|
|
342
|
+
}], change: [{
|
|
343
|
+
type: Output
|
|
344
|
+
}], close: [{
|
|
345
|
+
type: Output
|
|
179
346
|
}] } });
|
|
180
347
|
|
|
181
348
|
class ShowTableErrorsComponent {
|
|
@@ -214,7 +381,7 @@ class ChooseEnumRendererComponent {
|
|
|
214
381
|
}
|
|
215
382
|
}
|
|
216
383
|
ChooseEnumRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
-
ChooseEnumRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumRendererComponent, selector: "choose-enum-renderer", ngImport: i0, template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>", styles: [""], dependencies: [{ kind: "component", type: ChooseEnumComponent, selector: "choose-enum", inputs: ["
|
|
384
|
+
ChooseEnumRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ChooseEnumRendererComponent, selector: "choose-enum-renderer", ngImport: i0, template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>", styles: [""], dependencies: [{ kind: "component", type: ChooseEnumComponent, selector: "choose-enum", inputs: ["appendTo", "allowAllCapsValues", "clearable", "customColors", "enumChoices", "getValuesArrayFromEnum", "indexesToDisable", "isChip", "isDropdownDisabled", "isItemHidden", "isItemDisabled", "isMultiple", "label", "labelTextAlign", "labelTextFontWeight", "labelTextFontSize", "paddingTop", "placeholder", "percentWidth", "selectedItem", "width"], outputs: ["change", "close"] }] });
|
|
218
385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseEnumRendererComponent, decorators: [{
|
|
219
386
|
type: Component,
|
|
220
387
|
args: [{ selector: 'choose-enum-renderer', template: "<choose-enum [label]=\"params.label\" [appendTo]=\"'body'\" [isItemHidden]=\"params.isItemHidden\"\r\n [isItemDisabled]=\"params.isItemDisabled\" [labelTextAlign]=\"params.labelTextAlign\"\r\n [labelTextFontWeight]=\"params.labelTextFontWeight\" [labelTextFontSize]=\"params.labelTextFontSize\"\r\n [selectedItem]=\"params.value\" [indexesToDisable]=\"params.indexesToDisable\"\r\n [isDropdownDisabled]=\"params.isDropdownDisabled\" [getValuesArrayFromEnum]=\"params.getLabelAndColorFromEnumValue\"\r\n [enumChoices]=\"params.enumChoices\" [placeholder]=\"params.placeholder\" [width]=\"params.width\"\r\n [isChip]=\"params.isChip\" [paddingTop]=\"params.paddingTop\" [allowAllCapsValues]=\"params.allowAllCapsValues\"\r\n (change)=\"onCellDataChanged($event)\">\r\n</choose-enum>" }]
|
|
@@ -328,7 +495,7 @@ ChooseGeneralItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
328
495
|
useExisting: forwardRef(() => ChooseGeneralItemComponent),
|
|
329
496
|
multi: true,
|
|
330
497
|
},
|
|
331
|
-
], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [hideSelected]=\"hideSelectedItem\" [closeOnSelect]=\"!isMultiple\" [ngStyle]=\"setWidth()\" class=\"component\"\r\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\" (blur)=\"updateBlur()\" [bindLabel]=\"label\"\r\n bindValue=\"id\" [compareWith]=\"\" [items]=\"items\" [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged($event)\" [(ngModel)]=\"selectedItemId\" [multiple]=\"isMultiple\">\r\n <ng-template *ngIf=\"!isChip\" class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [ngStyle]=\"setFontStyles()\" *ngFor=\"let object of objects let isLast = last\">\r\n <span *ngIf=\"showLabel && !isTypeDate\">\r\n {{object.label}}: {{item[object.field]}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"showLabel && isTypeDate\">\r\n {{object.label}}: {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && isTypeDate\">\r\n {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && !isTypeDate\">{{item[object.field]}}{{isLast ? \"\" : separator}}\r\n </span>\r\n </span>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"isMultiple\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-option-tmp let-clear=\"clear\" let-item=\"item\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"false\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
498
|
+
], ngImport: i0, template: "<div class=\"select\">\r\n <ng-select [hideSelected]=\"hideSelectedItem\" [closeOnSelect]=\"!isMultiple\" [ngStyle]=\"setWidth()\" class=\"component\"\r\n [disabled]=\"disabled\" [appendTo]=\"appendTo\" dropdownPosition=\"bottom\" (blur)=\"updateBlur()\" [bindLabel]=\"label\"\r\n bindValue=\"id\" [compareWith]=\"\" [items]=\"items\" [placeholder]=\"placeholder\"\r\n (change)=\"onSelectedItemChanged($event)\" [(ngModel)]=\"selectedItemId\" [multiple]=\"isMultiple\">\r\n <ng-template *ngIf=\"!isChip\" class=\"template\" ng-option-tmp ng-label-tmp let-item=\"item\" let-index=\"index\"\r\n let-search=\"searchTerm\">\r\n <span [ngStyle]=\"setFontStyles()\" *ngFor=\"let object of objects let isLast = last\">\r\n <span *ngIf=\"showLabel && !isTypeDate\">\r\n {{object.label}}: {{item[object.field]}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"showLabel && isTypeDate\">\r\n {{object.label}}: {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && isTypeDate\">\r\n {{item[object.field]| date: 'mediumDate'}} {{isLast ? \"\" : separator}}\r\n </span>\r\n <span *ngIf=\"!showLabel && !isTypeDate\">{{item[object.field]}}{{isLast ? \"\" : separator}}\r\n </span>\r\n </span>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-label-tmp let-item=\"item\" let-clear=\"clear\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"isMultiple\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n <ng-template *ngIf=\"isChip\" ng-option-tmp let-clear=\"clear\" let-item=\"item\">\r\n <ng-chip (mousedown)=\"$event.stopPropagation()\" [clear]=\"clear\" [withCross]=\"false\" [item]=\"item\"\r\n class=\"chip\" [backgroundColor]=\"chipColor\" [label]=\"item[objects[0].field]\"\r\n [width]=\"chipWidth\">\r\n </ng-chip>\r\n </ng-template>\r\n </ng-select>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.NgChipComponent, selector: "ng-chip", inputs: ["backgroundColor", "size", "clear", "customColors", "enumClass", "enumValue", "inputType", "item", "isClickable", "label", "width", "withCross"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
332
499
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ChooseGeneralItemComponent, decorators: [{
|
|
333
500
|
type: Component,
|
|
334
501
|
args: [{ selector: 'choose-general-item', providers: [
|