@colijnit/corecomponents_v12 12.0.41 → 12.0.42

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.
@@ -10179,6 +10179,236 @@
10179
10179
  },] }
10180
10180
  ];
10181
10181
 
10182
+ // Human-readable JS keyboard codes, as in KeyboardEvent.key string values.
10183
+ var KeyboardKey;
10184
+ (function (KeyboardKey) {
10185
+ KeyboardKey["Down"] = "ArrowDown";
10186
+ KeyboardKey["Up"] = "ArrowUp";
10187
+ KeyboardKey["Left"] = "ArrowLeft";
10188
+ KeyboardKey["Right"] = "ArrowRight";
10189
+ KeyboardKey["Tab"] = "Tab";
10190
+ KeyboardKey["Escape"] = "Escape";
10191
+ KeyboardKey["Enter"] = "Enter";
10192
+ KeyboardKey["Home"] = "Home";
10193
+ KeyboardKey["End"] = "End";
10194
+ KeyboardKey["Delete"] = "Delete";
10195
+ KeyboardKey["Insert"] = "Insert";
10196
+ KeyboardKey["ShiftLeft"] = "ShiftLeft";
10197
+ KeyboardKey["ShiftRight"] = "ShiftRight";
10198
+ KeyboardKey["Backspace"] = "Backspace";
10199
+ KeyboardKey["SpaceBar"] = "Space";
10200
+ KeyboardKey["Period"] = "Period";
10201
+ KeyboardKey["DecimalPoint"] = "NumpadDecimal";
10202
+ KeyboardKey["SemiColon"] = "Semicolon";
10203
+ KeyboardKey["ControlRight"] = "ControlRight";
10204
+ KeyboardKey["ControlLeft"] = "ControlLeft";
10205
+ KeyboardKey["Comma"] = "Comma";
10206
+ ////Minus,
10207
+ ////MinusFireFox,
10208
+ ////Substract,
10209
+ KeyboardKey["Zero"] = "Digit0";
10210
+ KeyboardKey["One"] = "Digit1";
10211
+ KeyboardKey["Two"] = "Digit2";
10212
+ KeyboardKey["Three"] = "Digit3";
10213
+ KeyboardKey["Four"] = "Digit4";
10214
+ KeyboardKey["Five"] = "Digit5";
10215
+ KeyboardKey["Six"] = "Digit6";
10216
+ KeyboardKey["Seven"] = "Digit7";
10217
+ KeyboardKey["Eight"] = "Digit8";
10218
+ KeyboardKey["Nine"] = "Digit9";
10219
+ KeyboardKey["NumpadZero"] = "Numpad0";
10220
+ KeyboardKey["NumpadOne"] = "Numpad1";
10221
+ KeyboardKey["NumpadTwo"] = "Numpad2";
10222
+ KeyboardKey["NumpadThree"] = "Numpad3";
10223
+ KeyboardKey["NumpadFour"] = "Numpad4";
10224
+ KeyboardKey["NumpadFive"] = "Numpad5";
10225
+ KeyboardKey["NumpadSix"] = "Numpad6";
10226
+ KeyboardKey["NumpadSeven"] = "Numpad7";
10227
+ KeyboardKey["NumpadEight"] = "Numpad8";
10228
+ KeyboardKey["NumpadNine"] = "Numpad9";
10229
+ KeyboardKey["A"] = "KeyA";
10230
+ KeyboardKey["B"] = "KeyB";
10231
+ KeyboardKey["C"] = "KeyC";
10232
+ KeyboardKey["D"] = "KeyD";
10233
+ KeyboardKey["E"] = "KeyE";
10234
+ KeyboardKey["F"] = "KeyF";
10235
+ KeyboardKey["G"] = "KeyG";
10236
+ KeyboardKey["H"] = "KeyH";
10237
+ KeyboardKey["I"] = "KeyI";
10238
+ KeyboardKey["J"] = "KeyJ";
10239
+ KeyboardKey["K"] = "KeyK";
10240
+ KeyboardKey["L"] = "KeyL";
10241
+ KeyboardKey["M"] = "KeyM";
10242
+ KeyboardKey["N"] = "KeyN";
10243
+ KeyboardKey["O"] = "KeyO";
10244
+ KeyboardKey["P"] = "KeyP";
10245
+ KeyboardKey["Q"] = "KeyQ";
10246
+ KeyboardKey["R"] = "KeyR";
10247
+ KeyboardKey["S"] = "KeyS";
10248
+ KeyboardKey["T"] = "KeyT";
10249
+ KeyboardKey["U"] = "KeyU";
10250
+ KeyboardKey["V"] = "KeyV";
10251
+ KeyboardKey["W"] = "KeyW";
10252
+ KeyboardKey["X"] = "KeyX";
10253
+ KeyboardKey["Y"] = "KeyY";
10254
+ KeyboardKey["Z"] = "KeyZ";
10255
+ })(KeyboardKey || (KeyboardKey = {}));
10256
+
10257
+ var ClickOutsideMasterService = /** @class */ (function () {
10258
+ function ClickOutsideMasterService(_ngZone) {
10259
+ var _this = this;
10260
+ this._ngZone = _ngZone;
10261
+ this._clickOutsideRefs = [];
10262
+ this.onClick = function (event) {
10263
+ _this._currentClick = event;
10264
+ var first = _this._clickOutsideRefs[0];
10265
+ var targets = _this._clickOutsideRefs.filter(function (co) { return co.alwaysTrigger; });
10266
+ if (first) {
10267
+ targets.push(first);
10268
+ }
10269
+ setTimeout(function () {
10270
+ targets.forEach(function (clickOutside) { return _this.checkEmit(clickOutside, event); });
10271
+ });
10272
+ };
10273
+ this.onKeyDown = function (event) {
10274
+ if (event.key === KeyboardKey.Escape) {
10275
+ var first = _this._clickOutsideRefs[0];
10276
+ if (first) {
10277
+ _this.checkEmit(first, event, true);
10278
+ }
10279
+ }
10280
+ };
10281
+ document.addEventListener('click', this.onClick, true);
10282
+ window.addEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
10283
+ }
10284
+ Object.defineProperty(ClickOutsideMasterService.prototype, "currentClick", {
10285
+ get: function () {
10286
+ return this._currentClick;
10287
+ },
10288
+ enumerable: false,
10289
+ configurable: true
10290
+ });
10291
+ ClickOutsideMasterService.prototype.ngOnDestroy = function () {
10292
+ document.removeEventListener('click', this.onClick, true);
10293
+ window.removeEventListener('keydown', this.onKeyDown, EventUtils.passiveBubble);
10294
+ };
10295
+ ClickOutsideMasterService.prototype.checkEmit = function (clickOutside, event, force) {
10296
+ if (clickOutside && (clickOutside.currentClick !== this.currentClick || force) && this._clickOutsideRefs.indexOf(clickOutside) !== -1) {
10297
+ this._ngZone.run(function () { return clickOutside.clickOutside.emit(event); });
10298
+ }
10299
+ };
10300
+ ClickOutsideMasterService.prototype.addClickOutside = function (clickOutside) {
10301
+ this.removeClickOutside(clickOutside);
10302
+ this._clickOutsideRefs.unshift(clickOutside);
10303
+ };
10304
+ ClickOutsideMasterService.prototype.removeClickOutside = function (clickOutside) {
10305
+ ArrayUtils.RemoveElement(clickOutside, this._clickOutsideRefs);
10306
+ };
10307
+ return ClickOutsideMasterService;
10308
+ }());
10309
+ ClickOutsideMasterService.decorators = [
10310
+ { type: core.Injectable }
10311
+ ];
10312
+ ClickOutsideMasterService.ctorParameters = function () { return [
10313
+ { type: core.NgZone }
10314
+ ]; };
10315
+
10316
+ var ClickOutsideDirective = /** @class */ (function () {
10317
+ function ClickOutsideDirective(elementRef, _ngZone, _master) {
10318
+ var _this = this;
10319
+ this.elementRef = elementRef;
10320
+ this._ngZone = _ngZone;
10321
+ this._master = _master;
10322
+ this.clickOutside = new core.EventEmitter();
10323
+ this._enabled = true;
10324
+ this._initialized = false;
10325
+ this.onClick = function (event) {
10326
+ if (_this._enabled) {
10327
+ _this._currentClick = event;
10328
+ }
10329
+ };
10330
+ }
10331
+ Object.defineProperty(ClickOutsideDirective.prototype, "currentClick", {
10332
+ get: function () {
10333
+ return this._currentClick;
10334
+ },
10335
+ enumerable: false,
10336
+ configurable: true
10337
+ });
10338
+ Object.defineProperty(ClickOutsideDirective.prototype, "enabled", {
10339
+ set: function (enabled) {
10340
+ enabled = enabled === undefined || enabled;
10341
+ // noinspection SuspiciousTypeOfGuard
10342
+ if (typeof enabled === 'boolean' && this._enabled !== enabled) {
10343
+ this._enabled = enabled;
10344
+ if (this._initialized) {
10345
+ this._enabled ? this._master.addClickOutside(this) : this._master.removeClickOutside(this);
10346
+ }
10347
+ }
10348
+ },
10349
+ enumerable: false,
10350
+ configurable: true
10351
+ });
10352
+ ClickOutsideDirective.prototype.ngAfterViewInit = function () {
10353
+ var _this = this;
10354
+ setTimeout(function () {
10355
+ _this._ngZone.runOutsideAngular(function () {
10356
+ if (_this.elementRef && _this.elementRef.nativeElement) {
10357
+ _this.elementRef.nativeElement.addEventListener('click', _this.onClick, EventUtils.passiveCapture);
10358
+ if (_this._enabled) {
10359
+ _this._master.addClickOutside(_this);
10360
+ }
10361
+ _this._initialized = true;
10362
+ }
10363
+ });
10364
+ });
10365
+ };
10366
+ ClickOutsideDirective.prototype.ngOnDestroy = function () {
10367
+ this._master.removeClickOutside(this);
10368
+ this.elementRef.nativeElement.removeEventListener('click', this.onClick, EventUtils.passiveCapture);
10369
+ this.elementRef = undefined;
10370
+ };
10371
+ return ClickOutsideDirective;
10372
+ }());
10373
+ ClickOutsideDirective.decorators = [
10374
+ { type: core.Directive, args: [{
10375
+ selector: "[clickOutside]",
10376
+ exportAs: 'clickOutside'
10377
+ },] }
10378
+ ];
10379
+ ClickOutsideDirective.ctorParameters = function () { return [
10380
+ { type: core.ElementRef },
10381
+ { type: core.NgZone },
10382
+ { type: ClickOutsideMasterService }
10383
+ ]; };
10384
+ ClickOutsideDirective.propDecorators = {
10385
+ enabled: [{ type: core.Input, args: ["clickOutside",] }],
10386
+ alwaysTrigger: [{ type: core.Input }],
10387
+ clickOutside: [{ type: core.Output }]
10388
+ };
10389
+ __decorate([
10390
+ InputBoolean()
10391
+ ], ClickOutsideDirective.prototype, "alwaysTrigger", void 0);
10392
+
10393
+ var ClickoutsideModule = /** @class */ (function () {
10394
+ function ClickoutsideModule() {
10395
+ }
10396
+ return ClickoutsideModule;
10397
+ }());
10398
+ ClickoutsideModule.decorators = [
10399
+ { type: core.NgModule, args: [{
10400
+ declarations: [
10401
+ ClickOutsideDirective
10402
+ ],
10403
+ providers: [
10404
+ ClickOutsideMasterService
10405
+ ],
10406
+ exports: [
10407
+ ClickOutsideDirective
10408
+ ]
10409
+ },] }
10410
+ ];
10411
+
10182
10412
  /*
10183
10413
  * Public API Surface of corecomponents
10184
10414
  */
@@ -10198,6 +10428,7 @@
10198
10428
  exports.CardModule = CardModule;
10199
10429
  exports.Carousel3dComponent = Carousel3dComponent;
10200
10430
  exports.Carousel3dModule = Carousel3dModule;
10431
+ exports.ClickoutsideModule = ClickoutsideModule;
10201
10432
  exports.CoDialogComponent = CoDialogComponent;
10202
10433
  exports.CoDialogModule = CoDialogModule;
10203
10434
  exports.CoDialogPromptComponent = CoDialogPromptComponent;
@@ -10262,6 +10493,7 @@
10262
10493
  exports.LevelIndicatorModule = LevelIndicatorModule;
10263
10494
  exports.MultiSelectListComponent = MultiSelectListComponent;
10264
10495
  exports.MultiSelectListModule = MultiSelectListModule;
10496
+ exports.ObserveVisibilityModule = ObserveVisibilityModule;
10265
10497
  exports.PopupButtonsComponent = PopupButtonsComponent;
10266
10498
  exports.PopupMessageDisplayComponent = PopupMessageDisplayComponent;
10267
10499
  exports.PopupModule = PopupModule;
@@ -10277,10 +10509,11 @@
10277
10509
  exports.TileModule = TileModule;
10278
10510
  exports["ɵa"] = RippleModule;
10279
10511
  exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
10280
- exports["ɵba"] = ObserveVisibilityDirective;
10281
- exports["ɵbb"] = SimpleGridCellComponent;
10282
- exports["ɵbc"] = PrependPipeModule;
10283
- exports["ɵbd"] = PrependPipe;
10512
+ exports["ɵba"] = SimpleGridCellComponent;
10513
+ exports["ɵbb"] = PrependPipeModule;
10514
+ exports["ɵbc"] = PrependPipe;
10515
+ exports["ɵbd"] = ClickOutsideDirective;
10516
+ exports["ɵbe"] = ClickOutsideMasterService;
10284
10517
  exports["ɵc"] = CoRippleDirective;
10285
10518
  exports["ɵd"] = CoViewportRulerService;
10286
10519
  exports["ɵe"] = CoScrollDispatcherService;
@@ -10304,7 +10537,7 @@
10304
10537
  exports["ɵw"] = CommitButtonsComponent;
10305
10538
  exports["ɵx"] = PopupShowerService;
10306
10539
  exports["ɵy"] = BaseSimpleGridComponent;
10307
- exports["ɵz"] = ObserveVisibilityModule;
10540
+ exports["ɵz"] = ObserveVisibilityDirective;
10308
10541
 
10309
10542
  Object.defineProperty(exports, '__esModule', { value: true });
10310
10543