@colijnit/corecomponents_v12 12.1.6 → 12.1.8
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/colijnit-corecomponents_v12.umd.js +421 -24
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/lib/components/filter-item/filter-item.component.js +378 -20
- package/esm2015/lib/components/filter-item/filter-item.module.js +8 -2
- package/esm2015/lib/core/enum/filterItem-mode.enum.js +40 -0
- package/esm2015/lib/directives/overlay/overlay.directive.js +26 -7
- package/esm2015/public-api.js +2 -1
- package/fesm2015/colijnit-corecomponents_v12.js +445 -26
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/filter-item/filter-item.component.d.ts +40 -6
- package/lib/components/filter-item/style/_layout.scss +9 -0
- package/lib/core/enum/filterItem-mode.enum.d.ts +14 -0
- package/lib/directives/overlay/overlay.directive.d.ts +5 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -5129,6 +5129,46 @@ IconCollapseHandleModule.decorators = [
|
|
|
5129
5129
|
},] }
|
|
5130
5130
|
];
|
|
5131
5131
|
|
|
5132
|
+
var FilterItemMode;
|
|
5133
|
+
(function (FilterItemMode) {
|
|
5134
|
+
//This mode makes the Filter display a multi select list
|
|
5135
|
+
// Input will be passed along directly as a string with the following syntax: "?>='choice 1', ?<='choice2'"
|
|
5136
|
+
FilterItemMode["Filterlist"] = "filterlist";
|
|
5137
|
+
//This mode makes the Filter display a single select list
|
|
5138
|
+
// Input will be passed along directly as a simple string.
|
|
5139
|
+
FilterItemMode["SingleSelectList"] = "singleSelectList";
|
|
5140
|
+
//This mode makes the Filter display a multi select list
|
|
5141
|
+
// Input will be passed along directly as a simple string.
|
|
5142
|
+
FilterItemMode["SelectListWithStringCollectionOutput"] = "selectListWithStringCollectionOutput";
|
|
5143
|
+
//This mode makes the Filter display a multi select list
|
|
5144
|
+
// Available choices will need to have their identifying value be a number. The summation of all these numbers will be passed along.
|
|
5145
|
+
FilterItemMode["SelectListWithNumberOutput"] = "selectListWithNumberOutput";
|
|
5146
|
+
//This mode makes the Filter display a min and max field. This should eventually be a slider.
|
|
5147
|
+
// input is passed along as "min - max"
|
|
5148
|
+
FilterItemMode["Slider"] = "slider";
|
|
5149
|
+
//This mode makes the Filter display a simple textfield.
|
|
5150
|
+
// The value typed into the field will be passed along directly as a string.
|
|
5151
|
+
FilterItemMode["TextField"] = "textField";
|
|
5152
|
+
//This mode makes the Filter display a simple dateField.
|
|
5153
|
+
// Field input will be passed along directly as a date object.
|
|
5154
|
+
FilterItemMode["DateField"] = "dateField";
|
|
5155
|
+
//This mode makes the Filter display a dateRange field.
|
|
5156
|
+
// Field input will be passed along directly as a string with the following syntax: "?>='01-08-2022'& ?<='31-08-2022'"
|
|
5157
|
+
FilterItemMode["DateRangeField"] = "dateRangeField";
|
|
5158
|
+
//This mode makes the Filter display a simple checkBox.
|
|
5159
|
+
// It's value will be passed along directly as a boolean.
|
|
5160
|
+
FilterItemMode["Checkbox"] = "checkbox";
|
|
5161
|
+
//This mode makes the Filter display a simple checkBox.
|
|
5162
|
+
// It's value will be passed along as either a 'T' or and 'F'.
|
|
5163
|
+
FilterItemMode["CheckboxToSimpleText"] = "checkboxToSimpleText";
|
|
5164
|
+
//This mode makes the Filter display a simple checkBox.
|
|
5165
|
+
// It's value will be passed along as either a "?='T'" or and "?='F'".
|
|
5166
|
+
FilterItemMode["CheckboxToText"] = "checkboxToText";
|
|
5167
|
+
//This mode makes the Filter display a simple checkBox.
|
|
5168
|
+
// It's value will be passed along as either a 1 or and 0.
|
|
5169
|
+
FilterItemMode["CheckboxToBinary"] = "checkboxToBinary";
|
|
5170
|
+
})(FilterItemMode || (FilterItemMode = {}));
|
|
5171
|
+
|
|
5132
5172
|
class BaseModule {
|
|
5133
5173
|
}
|
|
5134
5174
|
BaseModule.decorators = [
|
|
@@ -5379,6 +5419,11 @@ InputDatePickerComponent.propDecorators = {
|
|
|
5379
5419
|
|
|
5380
5420
|
class OverlayDirective {
|
|
5381
5421
|
constructor(elementRef) {
|
|
5422
|
+
/**
|
|
5423
|
+
* true; Element is added to the parent template
|
|
5424
|
+
* false; Element is added to the bottom of the DOM
|
|
5425
|
+
*/
|
|
5426
|
+
this.inline = false;
|
|
5382
5427
|
this.keepInView = false;
|
|
5383
5428
|
this.inheritWidth = false;
|
|
5384
5429
|
this.rightAlign = false;
|
|
@@ -5439,12 +5484,25 @@ class OverlayDirective {
|
|
|
5439
5484
|
if (this._elementRef && this._elementRef.nativeElement && this._parent && this._parent.nativeElement) {
|
|
5440
5485
|
const elementRect = this._elementRef.nativeElement.getBoundingClientRect();
|
|
5441
5486
|
const parentBoundingRect = this._parent.nativeElement.getBoundingClientRect();
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5487
|
+
let parentRect = {};
|
|
5488
|
+
if (!this.inline) {
|
|
5489
|
+
parentRect = {
|
|
5490
|
+
bottom: parentBoundingRect.bottom,
|
|
5491
|
+
right: parentBoundingRect.right,
|
|
5492
|
+
left: parentBoundingRect.left,
|
|
5493
|
+
top: parentBoundingRect.top,
|
|
5494
|
+
width: parentBoundingRect.width
|
|
5495
|
+
};
|
|
5496
|
+
}
|
|
5497
|
+
else {
|
|
5498
|
+
parentRect = {
|
|
5499
|
+
bottom: this._parent.nativeElement.offsetTop + parentBoundingRect.height,
|
|
5500
|
+
right: this._parent.nativeElement.offsetLeft + parentBoundingRect.width,
|
|
5501
|
+
left: this._parent.nativeElement.offsetLeft,
|
|
5502
|
+
top: this._parent.nativeElement.offsetTop,
|
|
5503
|
+
width: parentBoundingRect.width
|
|
5504
|
+
};
|
|
5505
|
+
}
|
|
5448
5506
|
this._placeElement(window.innerHeight, window.innerWidth, parentRect, elementRect);
|
|
5449
5507
|
}
|
|
5450
5508
|
}
|
|
@@ -5497,6 +5555,7 @@ OverlayDirective.ctorParameters = () => [
|
|
|
5497
5555
|
OverlayDirective.propDecorators = {
|
|
5498
5556
|
parent: [{ type: Input, args: ["overlay",] }],
|
|
5499
5557
|
view: [{ type: Input }],
|
|
5558
|
+
inline: [{ type: Input }],
|
|
5500
5559
|
keepInView: [{ type: Input }],
|
|
5501
5560
|
inheritWidth: [{ type: Input }],
|
|
5502
5561
|
rightAlign: [{ type: Input }],
|
|
@@ -10927,21 +10986,26 @@ function emailValidator(control) {
|
|
|
10927
10986
|
}
|
|
10928
10987
|
|
|
10929
10988
|
class FilterItemComponent {
|
|
10930
|
-
constructor(iconService) {
|
|
10989
|
+
constructor(iconService, _changeDetector) {
|
|
10931
10990
|
this.iconService = iconService;
|
|
10991
|
+
this._changeDetector = _changeDetector;
|
|
10932
10992
|
this.icons = CoreComponentsIcon;
|
|
10993
|
+
this.modes = FilterItemMode;
|
|
10994
|
+
this.mode = this.modes.Filterlist;
|
|
10933
10995
|
this.initialLimit = 10;
|
|
10934
10996
|
this.expanded = false;
|
|
10935
10997
|
// Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
|
|
10936
10998
|
this.customContent = false;
|
|
10937
10999
|
// Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
|
|
10938
11000
|
this.showAllResults = false;
|
|
10939
|
-
this.singleSelect = false;
|
|
10940
11001
|
this.filterButtonLabel = "Search";
|
|
10941
11002
|
this.searchPlaceholder = 'Search...';
|
|
10942
11003
|
this.showMoreLabel = 'Show more';
|
|
10943
11004
|
this.showLessLabel = 'Show less';
|
|
10944
11005
|
this.noResultsLabel = "No results";
|
|
11006
|
+
this.sliderDefaultMin = 0;
|
|
11007
|
+
this.sliderDefaultMax = 100000;
|
|
11008
|
+
this.modelChange = new EventEmitter();
|
|
10945
11009
|
this.collectionChange = new EventEmitter();
|
|
10946
11010
|
this.filterButtonClicked = new EventEmitter();
|
|
10947
11011
|
this.filteredCollection = [];
|
|
@@ -10954,16 +11018,51 @@ class FilterItemComponent {
|
|
|
10954
11018
|
var _a;
|
|
10955
11019
|
this._collection = value;
|
|
10956
11020
|
this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
|
|
11021
|
+
//reset the model in case there was no collection to set its values on when it was set.
|
|
11022
|
+
this.model = this._model;
|
|
10957
11023
|
}
|
|
10958
11024
|
get collection() {
|
|
10959
11025
|
return this._collection;
|
|
10960
11026
|
}
|
|
10961
|
-
|
|
10962
|
-
|
|
11027
|
+
set model(filterString) {
|
|
11028
|
+
switch (this.mode) {
|
|
11029
|
+
case this.modes.Filterlist:
|
|
11030
|
+
this._readModelForFilterList(filterString);
|
|
11031
|
+
break;
|
|
11032
|
+
case this.modes.SingleSelectList:
|
|
11033
|
+
this._readModelForSingleSelectList(filterString);
|
|
11034
|
+
break;
|
|
11035
|
+
case this.modes.SelectListWithStringCollectionOutput:
|
|
11036
|
+
this._readModelForStringCollectionList(filterString);
|
|
11037
|
+
break;
|
|
11038
|
+
case this.modes.SelectListWithNumberOutput:
|
|
11039
|
+
this._readModelForSelectListWithNumberOutput(filterString);
|
|
11040
|
+
break;
|
|
11041
|
+
case this.modes.Slider:
|
|
11042
|
+
this._readModelForSliderMode(filterString);
|
|
11043
|
+
break;
|
|
11044
|
+
case this.modes.CheckboxToText:
|
|
11045
|
+
case this.modes.CheckboxToSimpleText:
|
|
11046
|
+
this._readModelForCheckboxToText(filterString);
|
|
11047
|
+
break;
|
|
11048
|
+
case this.modes.CheckboxToBinary:
|
|
11049
|
+
this._readModelForCheckboxToBinary(filterString);
|
|
11050
|
+
break;
|
|
11051
|
+
case this.modes.DateField:
|
|
11052
|
+
this._readModelForDateField(filterString);
|
|
11053
|
+
break;
|
|
11054
|
+
case this.modes.DateRangeField:
|
|
11055
|
+
this._readModelForDateRangeField(filterString);
|
|
11056
|
+
break;
|
|
11057
|
+
}
|
|
11058
|
+
}
|
|
11059
|
+
get model() {
|
|
11060
|
+
return this._model;
|
|
10963
11061
|
}
|
|
10964
11062
|
ngOnInit() {
|
|
10965
11063
|
this.setToInitialLimit();
|
|
10966
11064
|
this.showButton = this.valueSelected();
|
|
11065
|
+
this.checkBoxToTextModel = false;
|
|
10967
11066
|
}
|
|
10968
11067
|
setToInitialLimit() {
|
|
10969
11068
|
this.limitTo = this.initialLimit;
|
|
@@ -10986,17 +11085,57 @@ class FilterItemComponent {
|
|
|
10986
11085
|
return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
|
|
10987
11086
|
}
|
|
10988
11087
|
handleModelChange(model) {
|
|
10989
|
-
this.
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
11088
|
+
switch (this.mode) {
|
|
11089
|
+
case this.modes.Filterlist:
|
|
11090
|
+
this.showButton = true;
|
|
11091
|
+
model.checked = !model.checked;
|
|
11092
|
+
this._createModelForFilterList();
|
|
11093
|
+
break;
|
|
11094
|
+
case this.modes.SelectListWithStringCollectionOutput:
|
|
11095
|
+
this.showButton = true;
|
|
11096
|
+
model.checked = !model.checked;
|
|
11097
|
+
this._createModelForStringCollectionList();
|
|
11098
|
+
break;
|
|
11099
|
+
case this.modes.SingleSelectList:
|
|
11100
|
+
this.showButton = true;
|
|
11101
|
+
this.uncheckForSingleSelect(model);
|
|
11102
|
+
model.checked = !model.checked;
|
|
11103
|
+
this._createModelForSingleSelectList();
|
|
11104
|
+
break;
|
|
11105
|
+
case this.modes.SelectListWithNumberOutput:
|
|
11106
|
+
this.showButton = true;
|
|
11107
|
+
model.checked = !model.checked;
|
|
11108
|
+
this._createModelForSelectListWithNumberOutput();
|
|
11109
|
+
break;
|
|
11110
|
+
case this.modes.Slider:
|
|
11111
|
+
this._createModelForSliderMode();
|
|
11112
|
+
break;
|
|
11113
|
+
case this.modes.CheckboxToText:
|
|
11114
|
+
this._createModelForCheckboxToText();
|
|
11115
|
+
break;
|
|
11116
|
+
case this.modes.CheckboxToSimpleText:
|
|
11117
|
+
this._createModelForCheckboxToSimpleText();
|
|
11118
|
+
break;
|
|
11119
|
+
case this.modes.CheckboxToBinary:
|
|
11120
|
+
this._createModelForCheckboxToBinary();
|
|
11121
|
+
break;
|
|
11122
|
+
case this.modes.DateRangeField:
|
|
11123
|
+
this._createModelForDateRange(model);
|
|
11124
|
+
break;
|
|
11125
|
+
case this.modes.TextField:
|
|
11126
|
+
this._model = (typeof this._model === 'string' && this._model.length === 0) ? undefined : this._model;
|
|
11127
|
+
break;
|
|
10996
11128
|
}
|
|
10997
|
-
|
|
11129
|
+
this.modelChange.emit(this._model);
|
|
10998
11130
|
this.collectionChange.emit(this.collection);
|
|
10999
11131
|
}
|
|
11132
|
+
uncheckForSingleSelect(model) {
|
|
11133
|
+
this.collection.forEach(m => {
|
|
11134
|
+
if (m.code !== model.code && m.description !== model.description) {
|
|
11135
|
+
m.checked = false;
|
|
11136
|
+
}
|
|
11137
|
+
});
|
|
11138
|
+
}
|
|
11000
11139
|
valueSelected() {
|
|
11001
11140
|
if (this.collection) {
|
|
11002
11141
|
return !!this.collection.find(c => c.checked);
|
|
@@ -11038,6 +11177,226 @@ class FilterItemComponent {
|
|
|
11038
11177
|
onButtonClicked() {
|
|
11039
11178
|
this.filterButtonClicked.emit();
|
|
11040
11179
|
}
|
|
11180
|
+
/////////////////////////////////////////////////////////////
|
|
11181
|
+
//Model creation for all of the different options available//
|
|
11182
|
+
/////////////////////////////////////////////////////////////
|
|
11183
|
+
_createModelForFilterList() {
|
|
11184
|
+
let filterRange = [];
|
|
11185
|
+
if (this.collection !== null && this.collection !== undefined) {
|
|
11186
|
+
this.collection.forEach((viewModel) => {
|
|
11187
|
+
if (viewModel.checked) {
|
|
11188
|
+
filterRange.push(`?='${viewModel.code}'`);
|
|
11189
|
+
}
|
|
11190
|
+
});
|
|
11191
|
+
if (filterRange.length > 0) {
|
|
11192
|
+
this._model = filterRange.join(',');
|
|
11193
|
+
}
|
|
11194
|
+
else {
|
|
11195
|
+
this._model = undefined;
|
|
11196
|
+
}
|
|
11197
|
+
}
|
|
11198
|
+
}
|
|
11199
|
+
_createModelForStringCollectionList() {
|
|
11200
|
+
let filterRange = [];
|
|
11201
|
+
this.collection.forEach((viewModel) => {
|
|
11202
|
+
if (viewModel.checked) {
|
|
11203
|
+
filterRange.push(viewModel.code.toString());
|
|
11204
|
+
}
|
|
11205
|
+
});
|
|
11206
|
+
if (filterRange.length > 0) {
|
|
11207
|
+
this._model = filterRange;
|
|
11208
|
+
}
|
|
11209
|
+
else {
|
|
11210
|
+
this._model = undefined;
|
|
11211
|
+
}
|
|
11212
|
+
}
|
|
11213
|
+
_createModelForSingleSelectList() {
|
|
11214
|
+
let filterString = "";
|
|
11215
|
+
this.collection.forEach((viewModel) => {
|
|
11216
|
+
if (viewModel.checked) {
|
|
11217
|
+
filterString = viewModel.code.toString();
|
|
11218
|
+
}
|
|
11219
|
+
});
|
|
11220
|
+
if (filterString.length > 0) {
|
|
11221
|
+
this._model = filterString;
|
|
11222
|
+
}
|
|
11223
|
+
else {
|
|
11224
|
+
this._model = undefined;
|
|
11225
|
+
}
|
|
11226
|
+
}
|
|
11227
|
+
_createModelForSelectListWithNumberOutput() {
|
|
11228
|
+
let filterNumber = null;
|
|
11229
|
+
this.collection.forEach((viewModel) => {
|
|
11230
|
+
if (viewModel.checked) {
|
|
11231
|
+
if (filterNumber == null) {
|
|
11232
|
+
filterNumber = 0;
|
|
11233
|
+
}
|
|
11234
|
+
filterNumber += Number(viewModel.code);
|
|
11235
|
+
}
|
|
11236
|
+
});
|
|
11237
|
+
this._model = filterNumber;
|
|
11238
|
+
}
|
|
11239
|
+
_createModelForSliderMode() {
|
|
11240
|
+
this.sliderMin = !!this.sliderMin ? this.sliderMin : this.sliderDefaultMin;
|
|
11241
|
+
this.sliderMax = !!this.sliderMax ? this.sliderMax : this.sliderDefaultMax;
|
|
11242
|
+
let trueLowerBound = Math.min(this.sliderMin, this.sliderMax);
|
|
11243
|
+
let trueUpperBound = Math.max(this.sliderMin, this.sliderMax);
|
|
11244
|
+
this._model = `${trueLowerBound} - ${trueUpperBound}`;
|
|
11245
|
+
}
|
|
11246
|
+
_createModelForCheckboxToText() {
|
|
11247
|
+
if (this.checkBoxToTextModel) {
|
|
11248
|
+
this._model = "?='J'";
|
|
11249
|
+
}
|
|
11250
|
+
else {
|
|
11251
|
+
this._model = "?='N'";
|
|
11252
|
+
}
|
|
11253
|
+
}
|
|
11254
|
+
_createModelForCheckboxToSimpleText() {
|
|
11255
|
+
if (this.checkBoxToTextModel) {
|
|
11256
|
+
this._model = "J";
|
|
11257
|
+
}
|
|
11258
|
+
else {
|
|
11259
|
+
this._model = "N";
|
|
11260
|
+
}
|
|
11261
|
+
}
|
|
11262
|
+
_createModelForCheckboxToBinary() {
|
|
11263
|
+
if (this.checkBoxToTextModel) {
|
|
11264
|
+
this._model = 1;
|
|
11265
|
+
}
|
|
11266
|
+
else {
|
|
11267
|
+
this._model = 0;
|
|
11268
|
+
}
|
|
11269
|
+
}
|
|
11270
|
+
_createModelForDateRange(dates) {
|
|
11271
|
+
if (dates) {
|
|
11272
|
+
let startDate = dates[0];
|
|
11273
|
+
let endDate = dates[1];
|
|
11274
|
+
const startDateRequest = startDate ? this._formatDateToString(startDate) : '';
|
|
11275
|
+
const endDateRequest = endDate ? this._formatDateToString(endDate) : '';
|
|
11276
|
+
this._model = `?>=\'${startDateRequest}\'& ?<=\'${endDateRequest}\'`;
|
|
11277
|
+
}
|
|
11278
|
+
}
|
|
11279
|
+
_formatDateToString(date) {
|
|
11280
|
+
let day = date.getDate().toString().padStart(2, '0');
|
|
11281
|
+
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
11282
|
+
let year = date.getFullYear();
|
|
11283
|
+
return `${day}-${month}-${year}`;
|
|
11284
|
+
}
|
|
11285
|
+
////////////////////////////////////////////////////////////
|
|
11286
|
+
//Model reading for all of the different options available//
|
|
11287
|
+
////////////////////////////////////////////////////////////
|
|
11288
|
+
_readModelForFilterList(filterModel) {
|
|
11289
|
+
let filterList = [];
|
|
11290
|
+
let itemsToCheck = [];
|
|
11291
|
+
this._uncheckAll();
|
|
11292
|
+
this._model = filterModel;
|
|
11293
|
+
if (filterModel !== null && filterModel !== undefined && typeof filterModel === 'string' && filterModel.length != 0 && this.collection !== null && this.collection !== undefined) {
|
|
11294
|
+
filterList = filterModel.split(",");
|
|
11295
|
+
filterList.forEach((filter) => {
|
|
11296
|
+
itemsToCheck.push(filter.substr(3, filter.length - 4));
|
|
11297
|
+
});
|
|
11298
|
+
for (const item of itemsToCheck) {
|
|
11299
|
+
let filter = this.collection.find(element => element.code.toString() === item);
|
|
11300
|
+
if (filter !== null && filter !== undefined) {
|
|
11301
|
+
filter.checked = true;
|
|
11302
|
+
}
|
|
11303
|
+
else {
|
|
11304
|
+
filter.checked = false;
|
|
11305
|
+
}
|
|
11306
|
+
}
|
|
11307
|
+
this._model = filterModel;
|
|
11308
|
+
}
|
|
11309
|
+
}
|
|
11310
|
+
_readModelForSingleSelectList(singleSelectModel) {
|
|
11311
|
+
this._uncheckAll();
|
|
11312
|
+
this._model = singleSelectModel;
|
|
11313
|
+
if (singleSelectModel !== null && singleSelectModel !== undefined && this.collection !== null && this.collection !== undefined) {
|
|
11314
|
+
let filter = this.collection.find(element => element.code.toString() === singleSelectModel);
|
|
11315
|
+
if (filter) {
|
|
11316
|
+
filter.checked = true;
|
|
11317
|
+
}
|
|
11318
|
+
}
|
|
11319
|
+
}
|
|
11320
|
+
_readModelForStringCollectionList(collectionModel) {
|
|
11321
|
+
this._uncheckAll();
|
|
11322
|
+
this._model = collectionModel;
|
|
11323
|
+
if (collectionModel !== null && collectionModel !== undefined && this.collection !== null && this.collection !== undefined) {
|
|
11324
|
+
this.collection.forEach((viewModel) => {
|
|
11325
|
+
if (collectionModel.indexOf(viewModel.code.toString()) > -1) {
|
|
11326
|
+
viewModel.checked = true;
|
|
11327
|
+
}
|
|
11328
|
+
else {
|
|
11329
|
+
viewModel.checked = false;
|
|
11330
|
+
}
|
|
11331
|
+
});
|
|
11332
|
+
}
|
|
11333
|
+
}
|
|
11334
|
+
_readModelForSelectListWithNumberOutput(numberModel) {
|
|
11335
|
+
this._uncheckAll();
|
|
11336
|
+
this._model = numberModel;
|
|
11337
|
+
if (numberModel !== null && numberModel !== undefined && this.collection !== null && this.collection !== undefined) {
|
|
11338
|
+
for (const item of this.collection) {
|
|
11339
|
+
const itemCode = item.code;
|
|
11340
|
+
const modValue = (numberModel % (2 * itemCode));
|
|
11341
|
+
item.checked = (modValue >= itemCode);
|
|
11342
|
+
}
|
|
11343
|
+
}
|
|
11344
|
+
}
|
|
11345
|
+
_uncheckAll() {
|
|
11346
|
+
if (this.collection !== null && this.collection !== undefined) {
|
|
11347
|
+
this.collection.forEach(m => {
|
|
11348
|
+
m.checked = false;
|
|
11349
|
+
});
|
|
11350
|
+
}
|
|
11351
|
+
}
|
|
11352
|
+
_readModelForSliderMode(sliderModel) {
|
|
11353
|
+
this._model = sliderModel;
|
|
11354
|
+
if (sliderModel !== undefined && sliderModel !== null) {
|
|
11355
|
+
let sliderInputCollection = sliderModel.split(' - ');
|
|
11356
|
+
this.sliderMin = parseInt(sliderInputCollection[0]);
|
|
11357
|
+
this.sliderMax = parseInt(sliderInputCollection[1]);
|
|
11358
|
+
}
|
|
11359
|
+
else {
|
|
11360
|
+
this.sliderMin = this.sliderDefaultMin;
|
|
11361
|
+
this.sliderMax = this.sliderDefaultMax;
|
|
11362
|
+
}
|
|
11363
|
+
}
|
|
11364
|
+
_readModelForCheckboxToText(checkboxToTextModel) {
|
|
11365
|
+
this._model = checkboxToTextModel;
|
|
11366
|
+
if (checkboxToTextModel !== undefined && checkboxToTextModel !== null) {
|
|
11367
|
+
this.checkBoxToTextModel = (checkboxToTextModel.indexOf('J') > -1);
|
|
11368
|
+
}
|
|
11369
|
+
else {
|
|
11370
|
+
this.checkBoxToTextModel = false;
|
|
11371
|
+
}
|
|
11372
|
+
}
|
|
11373
|
+
_readModelForCheckboxToBinary(checkboxToBinary) {
|
|
11374
|
+
this._model = checkboxToBinary;
|
|
11375
|
+
if (checkboxToBinary !== undefined && checkboxToBinary !== null) {
|
|
11376
|
+
this.checkBoxToTextModel = (checkboxToBinary >= 1);
|
|
11377
|
+
}
|
|
11378
|
+
else {
|
|
11379
|
+
this.checkBoxToTextModel = false;
|
|
11380
|
+
}
|
|
11381
|
+
}
|
|
11382
|
+
_readModelForDateField(dateFieldModel) {
|
|
11383
|
+
this._model = dateFieldModel;
|
|
11384
|
+
if (dateFieldModel !== undefined && dateFieldModel !== null) {
|
|
11385
|
+
this._model = new Date(dateFieldModel);
|
|
11386
|
+
}
|
|
11387
|
+
}
|
|
11388
|
+
_readModelForDateRangeField(dateRangeFieldModel) {
|
|
11389
|
+
this._model = dateRangeFieldModel;
|
|
11390
|
+
if (dateRangeFieldModel !== undefined && dateRangeFieldModel !== null) {
|
|
11391
|
+
let dateCollection = dateRangeFieldModel.split('&');
|
|
11392
|
+
let startString = dateCollection[0].trim().substr(4, dateCollection[0].length - 5);
|
|
11393
|
+
let endString = dateCollection[1].trim().substr(4, dateCollection[1].length - 5);
|
|
11394
|
+
let startDateComponents = startString.split('-');
|
|
11395
|
+
let endDateComponents = endString.split('-');
|
|
11396
|
+
this.dateRangeStart = new Date(parseInt(startDateComponents[2]), parseInt(startDateComponents[1]) - 1, parseInt(startDateComponents[0]));
|
|
11397
|
+
this.dateRangeEnd = new Date(parseInt(endDateComponents[2]), parseInt(endDateComponents[1]) - 1, parseInt(endDateComponents[0]));
|
|
11398
|
+
}
|
|
11399
|
+
}
|
|
11041
11400
|
}
|
|
11042
11401
|
FilterItemComponent.decorators = [
|
|
11043
11402
|
{ type: Component, args: [{
|
|
@@ -11059,7 +11418,8 @@ FilterItemComponent.decorators = [
|
|
|
11059
11418
|
<ng-content></ng-content>
|
|
11060
11419
|
</div>
|
|
11061
11420
|
<ng-template #collectionContent>
|
|
11062
|
-
<div class="co-filter-item-collection-content"
|
|
11421
|
+
<div class="co-filter-item-collection-content" *ngIf="mode === modes.Filterlist || mode === modes.SingleSelectList
|
|
11422
|
+
|| mode === modes.SelectListWithNumberOutput || mode === modes.SelectListWithStringCollectionOutput">
|
|
11063
11423
|
<co-input-text
|
|
11064
11424
|
*ngIf="collection?.length > 10 || minSearchCharsToLoadCollection"
|
|
11065
11425
|
[placeholder]="searchPlaceholder"
|
|
@@ -11074,13 +11434,13 @@ FilterItemComponent.decorators = [
|
|
|
11074
11434
|
<ng-container
|
|
11075
11435
|
*ngFor="let option of filteredCollection; let index = index">
|
|
11076
11436
|
<div class="co-filter-item-collection-result-item" *ngIf="index < limitTo || showAllResults">
|
|
11077
|
-
<co-input-checkbox *ngIf="
|
|
11437
|
+
<co-input-checkbox *ngIf="mode !== modes.SingleSelectList"
|
|
11078
11438
|
[label]="option.description"
|
|
11079
11439
|
[model]="option.checked"
|
|
11080
11440
|
[clickableLabel]="false"
|
|
11081
11441
|
(modelChange)="handleModelChange(option)"
|
|
11082
11442
|
></co-input-checkbox>
|
|
11083
|
-
<co-input-radio-button *ngIf="
|
|
11443
|
+
<co-input-radio-button *ngIf="mode === modes.SingleSelectList"
|
|
11084
11444
|
[label]="option.description"
|
|
11085
11445
|
[model]="option.checked"
|
|
11086
11446
|
(modelChange)="handleModelChange(option)"
|
|
@@ -11109,6 +11469,57 @@ FilterItemComponent.decorators = [
|
|
|
11109
11469
|
</div>
|
|
11110
11470
|
</div>
|
|
11111
11471
|
</div>
|
|
11472
|
+
<div class="co-filter-item-slider-content" *ngIf="mode === modes.Slider">
|
|
11473
|
+
<co-input-text
|
|
11474
|
+
class="slider-from"
|
|
11475
|
+
[type]="'number'"
|
|
11476
|
+
[digitsOnly]="true"
|
|
11477
|
+
[hideArrowButtons]="true"
|
|
11478
|
+
[excludePlusMinus]="true"
|
|
11479
|
+
[label]="'FROM' | localize"
|
|
11480
|
+
[(model)]="sliderMin"
|
|
11481
|
+
(modelChange)="handleModelChange($event)"
|
|
11482
|
+
></co-input-text>
|
|
11483
|
+
<co-input-text
|
|
11484
|
+
class="slider-to"
|
|
11485
|
+
[type]="'number'"
|
|
11486
|
+
[digitsOnly]="true"
|
|
11487
|
+
[hideArrowButtons]="true"
|
|
11488
|
+
[excludePlusMinus]="true"
|
|
11489
|
+
[label]="'TO' | localize"
|
|
11490
|
+
[(model)]="sliderMax"
|
|
11491
|
+
(modelChange)="handleModelChange($event)"
|
|
11492
|
+
></co-input-text>
|
|
11493
|
+
</div>
|
|
11494
|
+
<div class="co-filter-item-checkbox-content" *ngIf="mode === modes.Checkbox ">
|
|
11495
|
+
<co-input-checkbox
|
|
11496
|
+
[(model)]="model"
|
|
11497
|
+
(modelChange)="handleModelChange($event)"></co-input-checkbox>
|
|
11498
|
+
</div>
|
|
11499
|
+
<div class="co-filter-item-checkbox-content"
|
|
11500
|
+
*ngIf="mode === modes.CheckboxToText || mode === modes.CheckboxToSimpleText || mode === modes.CheckboxToBinary">
|
|
11501
|
+
<co-input-checkbox
|
|
11502
|
+
[(model)]="checkBoxToTextModel"
|
|
11503
|
+
(modelChange)="handleModelChange($event)"></co-input-checkbox>
|
|
11504
|
+
</div>
|
|
11505
|
+
<div class="co-filter-item-textfield-content" *ngIf="mode === modes.TextField">
|
|
11506
|
+
<co-input-text
|
|
11507
|
+
[(model)]="model"
|
|
11508
|
+
(modelChange)="handleModelChange($event)"></co-input-text>
|
|
11509
|
+
</div>
|
|
11510
|
+
<div class="co-filter-item-dateField-content" *ngIf="mode === modes.DateField">
|
|
11511
|
+
<co-input-date
|
|
11512
|
+
[(model)]="model"
|
|
11513
|
+
(modelChange)="handleModelChange($event)"
|
|
11514
|
+
></co-input-date>
|
|
11515
|
+
</div>
|
|
11516
|
+
<div class="co-filter-item-dateField-content" *ngIf="mode === modes.DateRangeField">
|
|
11517
|
+
<co-input-date-range
|
|
11518
|
+
[model]="[dateRangeStart, dateRangeEnd]"
|
|
11519
|
+
(modelChange)="handleModelChange($event)"
|
|
11520
|
+
[placeholder]="'SELECT_DATE' | localize">
|
|
11521
|
+
</co-input-date-range>
|
|
11522
|
+
</div>
|
|
11112
11523
|
</ng-template>
|
|
11113
11524
|
</div>
|
|
11114
11525
|
</co-collapsible>
|
|
@@ -11120,9 +11531,11 @@ FilterItemComponent.decorators = [
|
|
|
11120
11531
|
},] }
|
|
11121
11532
|
];
|
|
11122
11533
|
FilterItemComponent.ctorParameters = () => [
|
|
11123
|
-
{ type: IconCacheService }
|
|
11534
|
+
{ type: IconCacheService },
|
|
11535
|
+
{ type: ChangeDetectorRef }
|
|
11124
11536
|
];
|
|
11125
11537
|
FilterItemComponent.propDecorators = {
|
|
11538
|
+
mode: [{ type: Input }],
|
|
11126
11539
|
collection: [{ type: Input }],
|
|
11127
11540
|
placeholder: [{ type: Input }],
|
|
11128
11541
|
initialLimit: [{ type: Input }],
|
|
@@ -11131,15 +11544,18 @@ FilterItemComponent.propDecorators = {
|
|
|
11131
11544
|
collectionLoadFn: [{ type: Input }],
|
|
11132
11545
|
customContent: [{ type: Input }],
|
|
11133
11546
|
showAllResults: [{ type: Input }],
|
|
11134
|
-
singleSelect: [{ type: Input }],
|
|
11135
11547
|
filterButtonLabel: [{ type: Input }],
|
|
11136
11548
|
searchPlaceholder: [{ type: Input }],
|
|
11137
11549
|
showMoreLabel: [{ type: Input }],
|
|
11138
11550
|
showLessLabel: [{ type: Input }],
|
|
11139
11551
|
noResultsLabel: [{ type: Input }],
|
|
11552
|
+
sliderDefaultMin: [{ type: Input }],
|
|
11553
|
+
sliderDefaultMax: [{ type: Input }],
|
|
11554
|
+
model: [{ type: Input }],
|
|
11555
|
+
modelChange: [{ type: Output }],
|
|
11140
11556
|
collectionChange: [{ type: Output }],
|
|
11141
11557
|
filterButtonClicked: [{ type: Output }],
|
|
11142
|
-
|
|
11558
|
+
filteredCollection: [{ type: HostBinding, args: ["class.co-filter-item",] }]
|
|
11143
11559
|
};
|
|
11144
11560
|
|
|
11145
11561
|
// A pipe for prepending strings to other strings in view templates.
|
|
@@ -11186,7 +11602,10 @@ FilterItemModule.decorators = [
|
|
|
11186
11602
|
PrependPipeModule,
|
|
11187
11603
|
InputTextModule,
|
|
11188
11604
|
InputRadioButtonModule,
|
|
11189
|
-
InputTextModule
|
|
11605
|
+
InputTextModule,
|
|
11606
|
+
CoreComponentsTranslationModule,
|
|
11607
|
+
InputDatePickerModule,
|
|
11608
|
+
InputDateRangePickerModule
|
|
11190
11609
|
],
|
|
11191
11610
|
declarations: [
|
|
11192
11611
|
FilterItemComponent
|
|
@@ -11639,5 +12058,5 @@ ColorSequenceService.decorators = [
|
|
|
11639
12058
|
* Generated bundle index. Do not edit.
|
|
11640
12059
|
*/
|
|
11641
12060
|
|
|
11642
|
-
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, PrependPipeModule as ɵbe, PrependPipe as ɵbf, TooltipModule as ɵbg, TooltipComponent as ɵbh, TooltipDirective as ɵbi, CheckmarkOverlayComponent as ɵbj, ScreenConfigurationDirective as ɵbk, ScreenConfigComponentWrapper as ɵbl, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, LocalizePipe as ɵp, DictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ObserveVisibilityDirective as ɵz };
|
|
12061
|
+
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TextInputPopupComponent, TileComponent, TileModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, PrependPipeModule as ɵbe, PrependPipe as ɵbf, TooltipModule as ɵbg, TooltipComponent as ɵbh, TooltipDirective as ɵbi, CheckmarkOverlayComponent as ɵbj, ScreenConfigurationDirective as ɵbk, ScreenConfigComponentWrapper as ɵbl, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, LocalizePipe as ɵp, DictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ObserveVisibilityDirective as ɵz };
|
|
11643
12062
|
//# sourceMappingURL=colijnit-corecomponents_v12.js.map
|