@colijnit/corecomponents_v12 12.0.40 → 12.0.43
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 +302 -28
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +6 -5
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +7 -6
- package/esm2015/lib/components/filter-item/filter-item.component.js +59 -28
- package/esm2015/lib/components/filter-item/filter-item.module.js +5 -2
- package/esm2015/lib/components/input-date-range-picker/input-date-range-picker.component.js +7 -1
- package/esm2015/lib/core/enum/keyboard-key.enum.js +75 -0
- package/esm2015/lib/directives/clickoutside/click-outside-master.service.js +57 -0
- package/esm2015/lib/directives/clickoutside/click-outside.directive.js +71 -0
- package/esm2015/lib/directives/clickoutside/clickoutside.module.js +19 -0
- package/esm2015/public-api.js +3 -1
- package/fesm2015/colijnit-corecomponents_v12.js +278 -30
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/filter-item/filter-item.component.d.ts +5 -2
- package/lib/components/filter-item/style/_layout.scss +25 -19
- package/lib/components/filter-item/style/_material-definition.scss +1 -1
- package/lib/components/input-date-range-picker/input-date-range-picker.component.d.ts +2 -0
- package/lib/components/input-radio-button/style/_layout.scss +5 -5
- package/lib/components/input-radio-button/style/_material-definition.scss +6 -6
- package/lib/components/input-radio-button/style/_theme.scss +21 -2
- package/lib/core/enum/keyboard-key.enum.d.ts +69 -0
- package/lib/directives/clickoutside/click-outside-master.service.d.ts +15 -0
- package/lib/directives/clickoutside/click-outside.directive.d.ts +18 -0
- package/lib/directives/clickoutside/clickoutside.module.d.ts +2 -0
- package/lib/style/_variables.scss +5 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -6389,6 +6389,8 @@
|
|
|
6389
6389
|
_this.startDateChange = new core.EventEmitter();
|
|
6390
6390
|
_this.endDateChange = new core.EventEmitter();
|
|
6391
6391
|
_this.dateRangeChange = new core.EventEmitter();
|
|
6392
|
+
_this.close = new core.EventEmitter();
|
|
6393
|
+
_this.select = new core.EventEmitter();
|
|
6392
6394
|
return _this;
|
|
6393
6395
|
}
|
|
6394
6396
|
InputDateRangePickerComponent.prototype.showClass = function () {
|
|
@@ -6406,7 +6408,7 @@
|
|
|
6406
6408
|
InputDateRangePickerComponent.decorators = [
|
|
6407
6409
|
{ type: core.Component, args: [{
|
|
6408
6410
|
selector: "co-input-date-range",
|
|
6409
|
-
template: "\n <ejs-daterangepicker\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"rangeChange()\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
6411
|
+
template: "\n <ejs-daterangepicker\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n (ngModelChange)=\"rangeChange()\"\n (close)=\"close.next($event)\"\n (select)=\"select.next($event)\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
|
|
6410
6412
|
encapsulation: core.ViewEncapsulation.None
|
|
6411
6413
|
},] }
|
|
6412
6414
|
];
|
|
@@ -6418,6 +6420,8 @@
|
|
|
6418
6420
|
startDateChange: [{ type: core.Output }],
|
|
6419
6421
|
endDateChange: [{ type: core.Output }],
|
|
6420
6422
|
dateRangeChange: [{ type: core.Output }],
|
|
6423
|
+
close: [{ type: core.Output }],
|
|
6424
|
+
select: [{ type: core.Output }],
|
|
6421
6425
|
showClass: [{ type: core.HostBinding, args: ["class.co-input-date-range-picker",] }]
|
|
6422
6426
|
};
|
|
6423
6427
|
|
|
@@ -10014,12 +10018,12 @@
|
|
|
10014
10018
|
this.customContent = false;
|
|
10015
10019
|
// Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
|
|
10016
10020
|
this.showAllResults = false;
|
|
10017
|
-
this.
|
|
10021
|
+
this.singleSelect = false;
|
|
10022
|
+
this.searchPlaceholder = 'Search...';
|
|
10018
10023
|
this.showMoreLabel = 'Show more';
|
|
10019
10024
|
this.showLessLabel = 'Show less';
|
|
10020
10025
|
this.noResultsLabel = "No results";
|
|
10021
10026
|
this.collectionChange = new core.EventEmitter();
|
|
10022
|
-
this.filterTextChange = new core.EventEmitter();
|
|
10023
10027
|
this.filteredCollection = [];
|
|
10024
10028
|
this.limitTo = 10;
|
|
10025
10029
|
this.filterText = "";
|
|
@@ -10063,26 +10067,59 @@
|
|
|
10063
10067
|
}
|
|
10064
10068
|
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;
|
|
10065
10069
|
};
|
|
10070
|
+
FilterItemComponent.prototype.handleModelChange = function (model) {
|
|
10071
|
+
if (this.singleSelect) {
|
|
10072
|
+
this.collection.forEach(function (m) {
|
|
10073
|
+
if (m.code !== model.code && m.description !== model.description) {
|
|
10074
|
+
m.checked = false;
|
|
10075
|
+
}
|
|
10076
|
+
});
|
|
10077
|
+
}
|
|
10078
|
+
model.checked = !model.checked;
|
|
10079
|
+
this.collectionChange.emit(this.collection);
|
|
10080
|
+
};
|
|
10066
10081
|
// Applies filter to the collection.
|
|
10067
10082
|
FilterItemComponent.prototype.applyFilter = function (text) {
|
|
10068
10083
|
var _a, _b;
|
|
10069
|
-
this
|
|
10070
|
-
|
|
10071
|
-
return
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10084
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10085
|
+
var _c, filterText, filteredItemCount;
|
|
10086
|
+
return __generator(this, function (_d) {
|
|
10087
|
+
switch (_d.label) {
|
|
10088
|
+
case 0:
|
|
10089
|
+
if (!(!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn)) return [3 /*break*/, 3];
|
|
10090
|
+
if (!(text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length)) return [3 /*break*/, 2];
|
|
10091
|
+
_c = this;
|
|
10092
|
+
return [4 /*yield*/, this.collectionLoadFn(text)];
|
|
10093
|
+
case 1:
|
|
10094
|
+
_c.collection = _d.sent();
|
|
10095
|
+
return [3 /*break*/, 3];
|
|
10096
|
+
case 2:
|
|
10097
|
+
if (text.length < this.minSearchCharsToLoadCollection) {
|
|
10098
|
+
this.collection = undefined;
|
|
10099
|
+
}
|
|
10100
|
+
_d.label = 3;
|
|
10101
|
+
case 3:
|
|
10102
|
+
this.filterText = text;
|
|
10103
|
+
if (!this.collection) {
|
|
10104
|
+
return [2 /*return*/, []];
|
|
10105
|
+
}
|
|
10106
|
+
filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
|
|
10107
|
+
filteredItemCount = 0;
|
|
10108
|
+
this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
|
|
10109
|
+
var _a;
|
|
10110
|
+
var labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
|
|
10111
|
+
var isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
|
|
10112
|
+
if (isHiddenByFilter) {
|
|
10113
|
+
return false;
|
|
10114
|
+
}
|
|
10115
|
+
else {
|
|
10116
|
+
filteredItemCount++;
|
|
10117
|
+
return true;
|
|
10118
|
+
}
|
|
10119
|
+
});
|
|
10120
|
+
return [2 /*return*/];
|
|
10121
|
+
}
|
|
10122
|
+
});
|
|
10086
10123
|
});
|
|
10087
10124
|
};
|
|
10088
10125
|
return FilterItemComponent;
|
|
@@ -10090,7 +10127,7 @@
|
|
|
10090
10127
|
FilterItemComponent.decorators = [
|
|
10091
10128
|
{ type: core.Component, args: [{
|
|
10092
10129
|
selector: "co-filter-item",
|
|
10093
|
-
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10\"\n [placeholder]=\"searchPlaceholder\"\n [
|
|
10130
|
+
template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [name]=\"'radiogroup'\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
|
|
10094
10131
|
encapsulation: core.ViewEncapsulation.None
|
|
10095
10132
|
},] }
|
|
10096
10133
|
];
|
|
@@ -10102,14 +10139,16 @@
|
|
|
10102
10139
|
placeholder: [{ type: core.Input }],
|
|
10103
10140
|
initialLimit: [{ type: core.Input }],
|
|
10104
10141
|
expanded: [{ type: core.Input }],
|
|
10142
|
+
minSearchCharsToLoadCollection: [{ type: core.Input }],
|
|
10143
|
+
collectionLoadFn: [{ type: core.Input }],
|
|
10105
10144
|
customContent: [{ type: core.Input }],
|
|
10106
10145
|
showAllResults: [{ type: core.Input }],
|
|
10146
|
+
singleSelect: [{ type: core.Input }],
|
|
10107
10147
|
searchPlaceholder: [{ type: core.Input }],
|
|
10108
10148
|
showMoreLabel: [{ type: core.Input }],
|
|
10109
10149
|
showLessLabel: [{ type: core.Input }],
|
|
10110
10150
|
noResultsLabel: [{ type: core.Input }],
|
|
10111
10151
|
collectionChange: [{ type: core.Output }],
|
|
10112
|
-
filterTextChange: [{ type: core.Output }],
|
|
10113
10152
|
showClass: [{ type: core.HostBinding, args: ["class.co-filter-item",] }]
|
|
10114
10153
|
};
|
|
10115
10154
|
|
|
@@ -10164,7 +10203,9 @@
|
|
|
10164
10203
|
IconModule,
|
|
10165
10204
|
scrolling.ScrollingModule,
|
|
10166
10205
|
AppendPipeModule,
|
|
10167
|
-
PrependPipeModule
|
|
10206
|
+
PrependPipeModule,
|
|
10207
|
+
InputTextModule,
|
|
10208
|
+
InputRadioButtonModule
|
|
10168
10209
|
],
|
|
10169
10210
|
declarations: [
|
|
10170
10211
|
FilterItemComponent
|
|
@@ -10175,6 +10216,236 @@
|
|
|
10175
10216
|
},] }
|
|
10176
10217
|
];
|
|
10177
10218
|
|
|
10219
|
+
// Human-readable JS keyboard codes, as in KeyboardEvent.key string values.
|
|
10220
|
+
var KeyboardKey;
|
|
10221
|
+
(function (KeyboardKey) {
|
|
10222
|
+
KeyboardKey["Down"] = "ArrowDown";
|
|
10223
|
+
KeyboardKey["Up"] = "ArrowUp";
|
|
10224
|
+
KeyboardKey["Left"] = "ArrowLeft";
|
|
10225
|
+
KeyboardKey["Right"] = "ArrowRight";
|
|
10226
|
+
KeyboardKey["Tab"] = "Tab";
|
|
10227
|
+
KeyboardKey["Escape"] = "Escape";
|
|
10228
|
+
KeyboardKey["Enter"] = "Enter";
|
|
10229
|
+
KeyboardKey["Home"] = "Home";
|
|
10230
|
+
KeyboardKey["End"] = "End";
|
|
10231
|
+
KeyboardKey["Delete"] = "Delete";
|
|
10232
|
+
KeyboardKey["Insert"] = "Insert";
|
|
10233
|
+
KeyboardKey["ShiftLeft"] = "ShiftLeft";
|
|
10234
|
+
KeyboardKey["ShiftRight"] = "ShiftRight";
|
|
10235
|
+
KeyboardKey["Backspace"] = "Backspace";
|
|
10236
|
+
KeyboardKey["SpaceBar"] = "Space";
|
|
10237
|
+
KeyboardKey["Period"] = "Period";
|
|
10238
|
+
KeyboardKey["DecimalPoint"] = "NumpadDecimal";
|
|
10239
|
+
KeyboardKey["SemiColon"] = "Semicolon";
|
|
10240
|
+
KeyboardKey["ControlRight"] = "ControlRight";
|
|
10241
|
+
KeyboardKey["ControlLeft"] = "ControlLeft";
|
|
10242
|
+
KeyboardKey["Comma"] = "Comma";
|
|
10243
|
+
////Minus,
|
|
10244
|
+
////MinusFireFox,
|
|
10245
|
+
////Substract,
|
|
10246
|
+
KeyboardKey["Zero"] = "Digit0";
|
|
10247
|
+
KeyboardKey["One"] = "Digit1";
|
|
10248
|
+
KeyboardKey["Two"] = "Digit2";
|
|
10249
|
+
KeyboardKey["Three"] = "Digit3";
|
|
10250
|
+
KeyboardKey["Four"] = "Digit4";
|
|
10251
|
+
KeyboardKey["Five"] = "Digit5";
|
|
10252
|
+
KeyboardKey["Six"] = "Digit6";
|
|
10253
|
+
KeyboardKey["Seven"] = "Digit7";
|
|
10254
|
+
KeyboardKey["Eight"] = "Digit8";
|
|
10255
|
+
KeyboardKey["Nine"] = "Digit9";
|
|
10256
|
+
KeyboardKey["NumpadZero"] = "Numpad0";
|
|
10257
|
+
KeyboardKey["NumpadOne"] = "Numpad1";
|
|
10258
|
+
KeyboardKey["NumpadTwo"] = "Numpad2";
|
|
10259
|
+
KeyboardKey["NumpadThree"] = "Numpad3";
|
|
10260
|
+
KeyboardKey["NumpadFour"] = "Numpad4";
|
|
10261
|
+
KeyboardKey["NumpadFive"] = "Numpad5";
|
|
10262
|
+
KeyboardKey["NumpadSix"] = "Numpad6";
|
|
10263
|
+
KeyboardKey["NumpadSeven"] = "Numpad7";
|
|
10264
|
+
KeyboardKey["NumpadEight"] = "Numpad8";
|
|
10265
|
+
KeyboardKey["NumpadNine"] = "Numpad9";
|
|
10266
|
+
KeyboardKey["A"] = "KeyA";
|
|
10267
|
+
KeyboardKey["B"] = "KeyB";
|
|
10268
|
+
KeyboardKey["C"] = "KeyC";
|
|
10269
|
+
KeyboardKey["D"] = "KeyD";
|
|
10270
|
+
KeyboardKey["E"] = "KeyE";
|
|
10271
|
+
KeyboardKey["F"] = "KeyF";
|
|
10272
|
+
KeyboardKey["G"] = "KeyG";
|
|
10273
|
+
KeyboardKey["H"] = "KeyH";
|
|
10274
|
+
KeyboardKey["I"] = "KeyI";
|
|
10275
|
+
KeyboardKey["J"] = "KeyJ";
|
|
10276
|
+
KeyboardKey["K"] = "KeyK";
|
|
10277
|
+
KeyboardKey["L"] = "KeyL";
|
|
10278
|
+
KeyboardKey["M"] = "KeyM";
|
|
10279
|
+
KeyboardKey["N"] = "KeyN";
|
|
10280
|
+
KeyboardKey["O"] = "KeyO";
|
|
10281
|
+
KeyboardKey["P"] = "KeyP";
|
|
10282
|
+
KeyboardKey["Q"] = "KeyQ";
|
|
10283
|
+
KeyboardKey["R"] = "KeyR";
|
|
10284
|
+
KeyboardKey["S"] = "KeyS";
|
|
10285
|
+
KeyboardKey["T"] = "KeyT";
|
|
10286
|
+
KeyboardKey["U"] = "KeyU";
|
|
10287
|
+
KeyboardKey["V"] = "KeyV";
|
|
10288
|
+
KeyboardKey["W"] = "KeyW";
|
|
10289
|
+
KeyboardKey["X"] = "KeyX";
|
|
10290
|
+
KeyboardKey["Y"] = "KeyY";
|
|
10291
|
+
KeyboardKey["Z"] = "KeyZ";
|
|
10292
|
+
})(KeyboardKey || (KeyboardKey = {}));
|
|
10293
|
+
|
|
10294
|
+
var ClickOutsideMasterService = /** @class */ (function () {
|
|
10295
|
+
function ClickOutsideMasterService(_ngZone) {
|
|
10296
|
+
var _this = this;
|
|
10297
|
+
this._ngZone = _ngZone;
|
|
10298
|
+
this._clickOutsideRefs = [];
|
|
10299
|
+
this.onClick = function (event) {
|
|
10300
|
+
_this._currentClick = event;
|
|
10301
|
+
var first = _this._clickOutsideRefs[0];
|
|
10302
|
+
var targets = _this._clickOutsideRefs.filter(function (co) { return co.alwaysTrigger; });
|
|
10303
|
+
if (first) {
|
|
10304
|
+
targets.push(first);
|
|
10305
|
+
}
|
|
10306
|
+
setTimeout(function () {
|
|
10307
|
+
targets.forEach(function (clickOutside) { return _this.checkEmit(clickOutside, event); });
|
|
10308
|
+
});
|
|
10309
|
+
};
|
|
10310
|
+
this.onKeyDown = function (event) {
|
|
10311
|
+
if (event.key === KeyboardKey.Escape) {
|
|
10312
|
+
var first = _this._clickOutsideRefs[0];
|
|
10313
|
+
if (first) {
|
|
10314
|
+
_this.checkEmit(first, event, true);
|
|
10315
|
+
}
|
|
10316
|
+
}
|
|
10317
|
+
};
|
|
10318
|
+
document.addEventListener('click', this.onClick, true);
|
|
10319
|
+
window.addEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
|
|
10320
|
+
}
|
|
10321
|
+
Object.defineProperty(ClickOutsideMasterService.prototype, "currentClick", {
|
|
10322
|
+
get: function () {
|
|
10323
|
+
return this._currentClick;
|
|
10324
|
+
},
|
|
10325
|
+
enumerable: false,
|
|
10326
|
+
configurable: true
|
|
10327
|
+
});
|
|
10328
|
+
ClickOutsideMasterService.prototype.ngOnDestroy = function () {
|
|
10329
|
+
document.removeEventListener('click', this.onClick, true);
|
|
10330
|
+
window.removeEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
|
|
10331
|
+
};
|
|
10332
|
+
ClickOutsideMasterService.prototype.checkEmit = function (clickOutside, event, force) {
|
|
10333
|
+
if (clickOutside && (clickOutside.currentClick !== this.currentClick || force) && this._clickOutsideRefs.indexOf(clickOutside) !== -1) {
|
|
10334
|
+
this._ngZone.run(function () { return clickOutside.clickOutside.emit(event); });
|
|
10335
|
+
}
|
|
10336
|
+
};
|
|
10337
|
+
ClickOutsideMasterService.prototype.addClickOutside = function (clickOutside) {
|
|
10338
|
+
this.removeClickOutside(clickOutside);
|
|
10339
|
+
this._clickOutsideRefs.unshift(clickOutside);
|
|
10340
|
+
};
|
|
10341
|
+
ClickOutsideMasterService.prototype.removeClickOutside = function (clickOutside) {
|
|
10342
|
+
ArrayUtils.RemoveElement(clickOutside, this._clickOutsideRefs);
|
|
10343
|
+
};
|
|
10344
|
+
return ClickOutsideMasterService;
|
|
10345
|
+
}());
|
|
10346
|
+
ClickOutsideMasterService.decorators = [
|
|
10347
|
+
{ type: core.Injectable }
|
|
10348
|
+
];
|
|
10349
|
+
ClickOutsideMasterService.ctorParameters = function () { return [
|
|
10350
|
+
{ type: core.NgZone }
|
|
10351
|
+
]; };
|
|
10352
|
+
|
|
10353
|
+
var ClickOutsideDirective = /** @class */ (function () {
|
|
10354
|
+
function ClickOutsideDirective(elementRef, _ngZone, _master) {
|
|
10355
|
+
var _this = this;
|
|
10356
|
+
this.elementRef = elementRef;
|
|
10357
|
+
this._ngZone = _ngZone;
|
|
10358
|
+
this._master = _master;
|
|
10359
|
+
this.clickOutside = new core.EventEmitter();
|
|
10360
|
+
this._enabled = true;
|
|
10361
|
+
this._initialized = false;
|
|
10362
|
+
this.onClick = function (event) {
|
|
10363
|
+
if (_this._enabled) {
|
|
10364
|
+
_this._currentClick = event;
|
|
10365
|
+
}
|
|
10366
|
+
};
|
|
10367
|
+
}
|
|
10368
|
+
Object.defineProperty(ClickOutsideDirective.prototype, "currentClick", {
|
|
10369
|
+
get: function () {
|
|
10370
|
+
return this._currentClick;
|
|
10371
|
+
},
|
|
10372
|
+
enumerable: false,
|
|
10373
|
+
configurable: true
|
|
10374
|
+
});
|
|
10375
|
+
Object.defineProperty(ClickOutsideDirective.prototype, "enabled", {
|
|
10376
|
+
set: function (enabled) {
|
|
10377
|
+
enabled = enabled === undefined || enabled;
|
|
10378
|
+
// noinspection SuspiciousTypeOfGuard
|
|
10379
|
+
if (typeof enabled === 'boolean' && this._enabled !== enabled) {
|
|
10380
|
+
this._enabled = enabled;
|
|
10381
|
+
if (this._initialized) {
|
|
10382
|
+
this._enabled ? this._master.addClickOutside(this) : this._master.removeClickOutside(this);
|
|
10383
|
+
}
|
|
10384
|
+
}
|
|
10385
|
+
},
|
|
10386
|
+
enumerable: false,
|
|
10387
|
+
configurable: true
|
|
10388
|
+
});
|
|
10389
|
+
ClickOutsideDirective.prototype.ngAfterViewInit = function () {
|
|
10390
|
+
var _this = this;
|
|
10391
|
+
setTimeout(function () {
|
|
10392
|
+
_this._ngZone.runOutsideAngular(function () {
|
|
10393
|
+
if (_this.elementRef && _this.elementRef.nativeElement) {
|
|
10394
|
+
_this.elementRef.nativeElement.addEventListener('click', _this.onClick, EventUtils.passiveCapture);
|
|
10395
|
+
if (_this._enabled) {
|
|
10396
|
+
_this._master.addClickOutside(_this);
|
|
10397
|
+
}
|
|
10398
|
+
_this._initialized = true;
|
|
10399
|
+
}
|
|
10400
|
+
});
|
|
10401
|
+
});
|
|
10402
|
+
};
|
|
10403
|
+
ClickOutsideDirective.prototype.ngOnDestroy = function () {
|
|
10404
|
+
this._master.removeClickOutside(this);
|
|
10405
|
+
this.elementRef.nativeElement.removeEventListener('click', this.onClick, EventUtils.passiveCapture);
|
|
10406
|
+
this.elementRef = undefined;
|
|
10407
|
+
};
|
|
10408
|
+
return ClickOutsideDirective;
|
|
10409
|
+
}());
|
|
10410
|
+
ClickOutsideDirective.decorators = [
|
|
10411
|
+
{ type: core.Directive, args: [{
|
|
10412
|
+
selector: "[clickOutside]",
|
|
10413
|
+
exportAs: 'clickOutside'
|
|
10414
|
+
},] }
|
|
10415
|
+
];
|
|
10416
|
+
ClickOutsideDirective.ctorParameters = function () { return [
|
|
10417
|
+
{ type: core.ElementRef },
|
|
10418
|
+
{ type: core.NgZone },
|
|
10419
|
+
{ type: ClickOutsideMasterService }
|
|
10420
|
+
]; };
|
|
10421
|
+
ClickOutsideDirective.propDecorators = {
|
|
10422
|
+
enabled: [{ type: core.Input, args: ["clickOutside",] }],
|
|
10423
|
+
alwaysTrigger: [{ type: core.Input }],
|
|
10424
|
+
clickOutside: [{ type: core.Output }]
|
|
10425
|
+
};
|
|
10426
|
+
__decorate([
|
|
10427
|
+
InputBoolean()
|
|
10428
|
+
], ClickOutsideDirective.prototype, "alwaysTrigger", void 0);
|
|
10429
|
+
|
|
10430
|
+
var ClickoutsideModule = /** @class */ (function () {
|
|
10431
|
+
function ClickoutsideModule() {
|
|
10432
|
+
}
|
|
10433
|
+
return ClickoutsideModule;
|
|
10434
|
+
}());
|
|
10435
|
+
ClickoutsideModule.decorators = [
|
|
10436
|
+
{ type: core.NgModule, args: [{
|
|
10437
|
+
declarations: [
|
|
10438
|
+
ClickOutsideDirective
|
|
10439
|
+
],
|
|
10440
|
+
providers: [
|
|
10441
|
+
ClickOutsideMasterService
|
|
10442
|
+
],
|
|
10443
|
+
exports: [
|
|
10444
|
+
ClickOutsideDirective
|
|
10445
|
+
]
|
|
10446
|
+
},] }
|
|
10447
|
+
];
|
|
10448
|
+
|
|
10178
10449
|
/*
|
|
10179
10450
|
* Public API Surface of corecomponents
|
|
10180
10451
|
*/
|
|
@@ -10194,6 +10465,7 @@
|
|
|
10194
10465
|
exports.CardModule = CardModule;
|
|
10195
10466
|
exports.Carousel3dComponent = Carousel3dComponent;
|
|
10196
10467
|
exports.Carousel3dModule = Carousel3dModule;
|
|
10468
|
+
exports.ClickoutsideModule = ClickoutsideModule;
|
|
10197
10469
|
exports.CoDialogComponent = CoDialogComponent;
|
|
10198
10470
|
exports.CoDialogModule = CoDialogModule;
|
|
10199
10471
|
exports.CoDialogPromptComponent = CoDialogPromptComponent;
|
|
@@ -10258,6 +10530,7 @@
|
|
|
10258
10530
|
exports.LevelIndicatorModule = LevelIndicatorModule;
|
|
10259
10531
|
exports.MultiSelectListComponent = MultiSelectListComponent;
|
|
10260
10532
|
exports.MultiSelectListModule = MultiSelectListModule;
|
|
10533
|
+
exports.ObserveVisibilityModule = ObserveVisibilityModule;
|
|
10261
10534
|
exports.PopupButtonsComponent = PopupButtonsComponent;
|
|
10262
10535
|
exports.PopupMessageDisplayComponent = PopupMessageDisplayComponent;
|
|
10263
10536
|
exports.PopupModule = PopupModule;
|
|
@@ -10273,10 +10546,11 @@
|
|
|
10273
10546
|
exports.TileModule = TileModule;
|
|
10274
10547
|
exports["ɵa"] = RippleModule;
|
|
10275
10548
|
exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
|
|
10276
|
-
exports["ɵba"] =
|
|
10277
|
-
exports["ɵbb"] =
|
|
10278
|
-
exports["ɵbc"] =
|
|
10279
|
-
exports["ɵbd"] =
|
|
10549
|
+
exports["ɵba"] = SimpleGridCellComponent;
|
|
10550
|
+
exports["ɵbb"] = PrependPipeModule;
|
|
10551
|
+
exports["ɵbc"] = PrependPipe;
|
|
10552
|
+
exports["ɵbd"] = ClickOutsideDirective;
|
|
10553
|
+
exports["ɵbe"] = ClickOutsideMasterService;
|
|
10280
10554
|
exports["ɵc"] = CoRippleDirective;
|
|
10281
10555
|
exports["ɵd"] = CoViewportRulerService;
|
|
10282
10556
|
exports["ɵe"] = CoScrollDispatcherService;
|
|
@@ -10300,7 +10574,7 @@
|
|
|
10300
10574
|
exports["ɵw"] = CommitButtonsComponent;
|
|
10301
10575
|
exports["ɵx"] = PopupShowerService;
|
|
10302
10576
|
exports["ɵy"] = BaseSimpleGridComponent;
|
|
10303
|
-
exports["ɵz"] =
|
|
10577
|
+
exports["ɵz"] = ObserveVisibilityDirective;
|
|
10304
10578
|
|
|
10305
10579
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10306
10580
|
|